UNPKG

@selldone/sdk-storefront

Version:

A TypeScript SDK to connect to your shop and build a fully functional storefront and website by simply developing a frontend web application. All backend operations are seamlessly managed by the serverless Selldone solution.

189 lines (188 loc) 5.51 kB
/** * Represents an application with various properties and settings. */ export interface Application { /** * The unique identifier of the application. * @type {number} */ id: number; /** * The unique identifier of the company associated with the application. * @type {number} */ company_id: number; /** * The mode of the application. * @type {string} * @see Application.AppMode */ mode: string; /** * The category of the application. * @type {string} * @see Application.ApplicationCategories */ category: string; /** * Indicates whether the application is enabled. * @type {boolean} */ enable: boolean; /** * Indicates whether the application is published. * @type {boolean} */ publish: boolean; /** * The GitHub repository URL for the application. * @type {string} */ github: string; /** * The source code of the application. * @type {string} */ code: string; /** * The name of the application. * @type {string} */ name: string; /** * The unique identifier of the client associated with the application. * @type {number} */ client_id: number; /** * The API endpoint for the application. * @type {string} */ api: string; /** * The short public description of the application. * @type {string} */ description: string; /** * The detailed public description of the application. * @type {string} */ note: string; /** * The rate value of the application, from 1 to 5. * @type {number} */ rate: number; /** * The total count of rates received by the application. * @type {number} */ rate_count: number; /** * The list of required permissions for the application. * @type {string[]} */ permissions: string[]; /** * The URL to the privacy policy of the application. * @type {string} */ privacy: string; /** * The URL to the web page of the application. * @type {string} */ web: string; /** * The public data form of the application. This information is available to the public in the storefront. * @type {object} * @example [{ "name": "public1", "title": "public1", "type": null }, { "name": "public2", "title": "public2", "type": null }] */ public: object; /** * The private data form of the application. This information is available only to the admin in the dashboard. * @type {object} * @example [{ "name": "private1", "title": "private1", "type": null }, { "name": "private2", "title": "private2", "type": null }] */ private: object; /** * Additional information about the application. * @type {object} */ info: object; /** * The logo of the application. * @type {string} */ logo: string; /** * The icon of the application. * @type {string} */ icon: string; /** * The URL to the application's video. * @type {string} */ video: string; /** * The number of installs of the application. * @type {number} */ installs: number; /** * The number of uninstalls of the application. * @type {number} */ uninstalls: number; /** * The number of active installations of the application. * @type {number} */ actives: number; } export declare namespace Application { export enum AppVersionType { PRODUCTION = "production", BETA = "beta", ALPHA = "alpha" } /** * Interface representing the structure of an application mode. * @interface IAppMode * @property {string} title - The display title of the application mode. * @property {string} code - A unique code identifier for the application mode. * @property {string} src - The path to the mode's icon or image. This path is typically obtained using a `require` statement. */ interface IAppMode { title: string; code: string; src: string; } /** * Enumerates various application modes with associated metadata. * This is part of the Selldone open-source library, which enables developers to build custom storefronts and back offices. * Each mode is represented as an object conforming to the IAppMode interface. */ export const AppMode: Record<string, IAppMode>; /** * Interface representing the structure of an application category. * @interface * @property {string} code - The unique code identifier for the application category. * @property {string} name - The name of the application category, typically used for display purposes. * @property {string} icon - The icon representing the application category, usually a class name for a font icon. */ interface IApplicationCategory { code: string; name: string; icon: string; } /** * Enumerates various application categories with associated metadata. This is part of the Selldone open-source library, * enabling developers to build custom storefronts and back offices. * Each category is defined with a unique code, a name for display, and an icon for visual representation. */ export const ApplicationCategories: Record<string, IApplicationCategory>; export {}; }