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.

115 lines (114 loc) 4.22 kB
export interface Community { /** Unique identifier for the community */ id: number; /** Identifier for the associated shop */ shop_id: number; /** Identifier for the associated user */ user_id: number; /** Name of the community */ name: string; /** Title of the community */ title: string; /** Description of the community */ desc: string; /** Rules of the community */ rule: string; /** Image associated with the community */ image: string; /** * Stage access level determining who can post a new topic. * {@see Community.StageLevel} */ stage: keyof typeof Community.StageLevels; /** * Determines who can attach files. * {@see Community.AttachmentAccess} */ attachment: keyof typeof Community.AttachmentAccesses; /** Allowed file types for attachments */ mims: string[]; /** Indicates if links should be marked as "nofollow" */ nofollow: boolean; /** Indicates if topics can be forked */ cross: boolean; /** Indicates if the community is enabled or not */ enable: boolean; /** Total number of categories in the community */ total_categories: number; /** Total number of topics in the community */ total_topics: number; /** Total number of posts in the community */ total_posts: number; /** Total number of comments in the community */ total_comments: number; /** Indicates if penalties are applied */ penalty: boolean; /** Indicates if the admins list is accessible */ admins_list: boolean; /** Indicates if the moderators list is accessible */ moderators_list: boolean; /** * Configuration for bots in the community. * Example: Publishing on a Telegram channel. * Note: Telegram channel names are saved without the '@' prefix. */ bots: { Telegram?: { enable: boolean; channel: string; errors: any[]; }; }; } export declare namespace Community { /** * CommunityAttachmentAccess Enum * * Represents the different access levels for attaching files within a community. */ export enum AttachmentAccessValues { PUBLIC = "PUBLIC", PRIVATE = "PRIVATE", VERIFIED = "VERIFIED" } interface IAttachmentAccess { code: AttachmentAccessValues; name: string; icon: string; description: string; } /** * community.stage_level.PUBLIC: All registered users, irrespective of their roles or verification status, have the ability to attach files. * community.stage_level.PRIVATE: Only those users with administrative or moderating roles can attach files. Regular users or members without any elevated permissions cannot. * community.stage_level.VERIFIED: In addition to admins and moderators, users who have undergone a verification process or have been nominated for the same can attach files. This can be useful in communities where certain privileges are reserved for trusted or recognized members. */ export const AttachmentAccesses: Record<AttachmentAccessValues, IAttachmentAccess>; /** * Represents the various stage levels of a community. * * - **PUBLIC**: All logged-in users have the ability to create topics and send posts to the community. * - **PRIVATE**: Only administrators and moderators are granted the privilege to create topics, while other users can only send posts within these created topics. * - **VERIFIED**: Administrators, moderators, and users who have been verified or nominated possess the right to create topics. All other members are limited to sending posts within these established topics. */ export const StageLevels: { PUBLIC: { code: string; name: string; icon: string; description: string; }; PRIVATE: { code: string; name: string; icon: string; description: string; }; VERIFIED: { code: string; name: string; icon: string; description: string; }; }; export {}; }