npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

headless-commerce-types

v1.0.25

Published

| Field | Type | Description | |-------------|---------------|----------------------------------------------------| | id | Int | Primary key, auto-incremented.

Downloads

1,526

Readme

Models

User

| Field | Type | Description | |-------------|---------------|----------------------------------------------------| | id | Int | Primary key, auto-incremented. | | username | String | Unique username, limited to 255 characters. | | email | String | Unique email, limited to 255 characters. | | mobile | String | Mobile number, limited to 255 characters. | | password | String | Password, encrypted and limited to 255 characters. | | role | Role | Role of the user, defaults to 'seller'. | | createdAt | DateTime | Timestamp of creation, defaults to current time. | | updatedAt | DateTime | Timestamp of the last update, automatically set. | | deletedAt | DateTime? | Soft delete timestamp, nullable. | | bannedAt | DateTime? | Soft ban timestamp, nullable. | | confirmedAt | DateTime? | Account confirmation timestamp, nullable. | | stores | Store[] | List of stores owned by the user. | | access | UserOnStore[] | List of stores to which the user has access. |

Store Model

| Field | Type | Description | |-----------------|---------------|--------------------------------------------------| | id | Int | Primary key, auto-incremented. | | name | String | Name of the store, limited to 255 characters. | | slug | String | Unique slug for the store. | | active | Boolean | Status of the store, defaults to 'false'. | | paymentPerMonth | Int | Monthly payment amount, defaults to 7. | | paymentHistory | DateTime[] | Array of payment timestamps, defaults to empty. | | createdAt | DateTime | Timestamp of creation, defaults to current time. | | updatedAt | DateTime | Timestamp of the last update, automatically set. | | deletedAt | DateTime? | Soft delete timestamp, nullable. | | bannedAt | DateTime? | Soft ban timestamp, nullable. | | owner | User | Reference to the owner of the store. | | ownerId | Int | Foreign key to the owner. | | access | UserOnStore[] | List of users with access to the store. | | products | Product[] | List of products in the store. | | merchants | Merchant[] | List of merchants associated with the store. |

Merchant Model

| Field | Type | Description | |---------|------------------|------------------------------------------------------| | id | Int | Primary key, auto-incremented. | | service | MerchantServices | Type of merchant service (e.g., wayforpay). | | token | String | Encrypted token for authentication. | | data | Json | JSON data related to the merchant. | | store | Store | Reference to the store associated with the merchant. | | storeId | Int | Foreign key to the store. |

Product Model

| Field | Type | Description | |-----------------|---------------------|-----------------------------------------------------------| | id | Int | Primary key, auto-incremented. | | name | String | Name of the product, limited to 255 characters. | | slug | String | Unique slug for the product. | | description | String | Detailed description of the product. | | metaTitle | String | Meta title for SEO, limited to 255 characters. | | metaDescription | String | Meta description for SEO, limited to 255 characters. | | price | Float | Price of the product. | | priceCompare | Float? | Comparison price, nullable. | | discount | Float? | Discount percentage, nullable. | | draft | Boolean | Whether the product is in draft mode, defaults to 'true'. | | weight | Int? | Weight of the product, nullable. | | height | Int? | Height of the product, nullable. | | width | Int? | Width of the product, nullable. | | length | Int? | Length of the product, nullable. | | createdAt | DateTime | Timestamp of creation, defaults to current time. | | updatedAt | DateTime | Timestamp of the last update, automatically set. | | deletedAt | DateTime? | Soft delete timestamp, nullable. | | diactivatedAt | DateTime? | Soft deactivation timestamp, nullable. | | store | Store | Reference to the store the product belongs to. | | storeId | Int | Foreign key to the store. | | categories | ProductOnCategory[] | Categories this product belongs to. | | orders | Order[] | Orders associated with this product. |

Category Model

| Field | Type | Description | |-----------------|---------------------|------------------------------------------------------| | id | Int | Primary key, auto-incremented. | | name | String | Name of the category, limited to 255 characters. | | slug | String | Unique slug for the category. | | description | String | Detailed description of the category. | | metaTitle | String | Meta title for SEO, limited to 255 characters. | | metaDescription | String | Meta description for SEO, limited to 255 characters. | | createdAt | DateTime | Timestamp of creation, defaults to current time. | | updatedAt | DateTime | Timestamp of the last update, automatically set. | | deletedAt | DateTime? | Soft delete timestamp, nullable. | | products | ProductOnCategory[] | Products associated with this category. |

Order Model

| Field | Type | Description | |-----------|---------|------------------------------------------| | id | Int | Primary key, auto-incremented. | | shipping | String | Shipping details for the order. | | message | String | Message or instructions, stored as text. | | paid | Float | Amount paid for the order. | | data | Json | JSON data associated with the order. | | product | Product | Reference to the product in the order. | | productId | Int | Foreign key to the product. |

UserOnStore Model

| Field | Type | Description | |---------|-------|---------------------------| | user | User | Reference to the user. | | userId | Int | Foreign key to the user. | | store | Store | Reference to the store. | | storeId | Int | Foreign key to the store. |

ProductOnCategory Model

| Field | Type | Description | |------------|----------|------------------------------| | product | Product | Reference to the product. | | productId | Int | Foreign key to the product. | | category | Category | Reference to the category. | | categoryId | Int | Foreign key to the category. |