@chopkola/common 1.0.107 → 1.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from './helpers/helpers';
9
9
  export * from './types/cart';
10
10
  export * from './types/apis';
11
11
  export * from './types/file.types';
12
+ export * from './types/category';
package/build/index.js CHANGED
@@ -25,3 +25,4 @@ __exportStar(require("./helpers/helpers"), exports);
25
25
  __exportStar(require("./types/cart"), exports);
26
26
  __exportStar(require("./types/apis"), exports);
27
27
  __exportStar(require("./types/file.types"), exports);
28
+ __exportStar(require("./types/category"), exports);
@@ -1,6 +1,6 @@
1
1
  import type { LucideIcon } from "lucide-react";
2
2
  import { SystemLoggedActivityI, SystemPerformanceI } from "../../global";
3
- import { VendorI } from "../../user";
3
+ import { VendorI } from "../../vendor";
4
4
  export declare enum AdministratorDashboardIconEnum {
5
5
  BADGE_DOLLAR_SIGN = "badge_dollar_sign",
6
6
  WALLET = "wallet",
@@ -1,6 +1,6 @@
1
1
  import { LucideIcon } from "lucide-react";
2
2
  import { BusinessTypeFilterTab } from "../../global";
3
- import { VendorI } from "../../user";
3
+ import { VendorI } from "../../vendor";
4
4
  export declare enum AdministratorVendorManagementIconEnum {
5
5
  STORE = "store"
6
6
  }
@@ -1,4 +1,4 @@
1
- import { VendorI } from "../../user";
1
+ import { VendorI } from "../../vendor";
2
2
  export interface ToggleBusinessOpenedState {
3
3
  business: VendorI;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { LucideIcon } from "lucide-react";
2
- import { VendorI } from "../../user";
2
+ import { VendorI } from "../../vendor";
3
3
  export declare enum VendorUserSummaryStatisticsIconEnum {
4
4
  BUILDING_2 = "building_2",
5
5
  STORE = "store",
@@ -0,0 +1,17 @@
1
+ import { CategoryScopeEnum, CategoryStatusEnum } from "./enum/user";
2
+ export interface CategoryI {
3
+ id: string;
4
+ parent_id: string | null;
5
+ path: string;
6
+ level: number;
7
+ name: string;
8
+ slug: string;
9
+ description: string | null;
10
+ scope: CategoryScopeEnum;
11
+ status: CategoryStatusEnum;
12
+ aliases: string[] | null;
13
+ tags: string[] | null;
14
+ metadata: Record<string, unknown> | null;
15
+ created_at: Date;
16
+ updated_at: Date;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
1
  import { PermissionEnum, UserAccountTypeEnum, VendorStatusEnum } from "./enum/user";
2
+ import { AdministratorAsaUserI, CustomerAsaUserI, RoleI, UserI } from "./user";
3
+ import { VendorI } from "./vendor";
2
4
  export declare const ACCESS_TOKEN_EXPIRATION_DURATION = "1h";
3
5
  export declare const REFRESH_TOKEN_EXPIRATION_DURATION = "1d";
4
6
  export declare const CART_SESSION_TOKEN_EXPIRATION_DURATION = "30d";
@@ -26,3 +28,20 @@ export type PermissionCollectionType = PermissionEnum;
26
28
  export declare const filterTabs: readonly FilterTab[];
27
29
  export declare const businessFilterTabs: readonly BusinessTypeFilterTab[];
28
30
  export declare const PermissionCollection: readonly PermissionCollectionType[];
31
+ export interface VendorAsaUserI extends UserI {
32
+ businesses: VendorI[];
33
+ role: RoleI;
34
+ permission?: string | undefined;
35
+ }
36
+ export type UserType = AdministratorAsaUserI | VendorAsaUserI | CustomerAsaUserI;
37
+ export type SuccessfulUserRegistrationResponseType = {
38
+ data: {
39
+ vendor?: VendorI;
40
+ user: UserI;
41
+ };
42
+ payload?: any;
43
+ subject: string;
44
+ context?: string;
45
+ message?: string;
46
+ };
47
+ export type UserVendorI = UserI & VendorI;
@@ -1,4 +1,4 @@
1
- import { UserGenderEnum, UserAccountTypeEnum, RoleRiskLevelEnum, VerificationPurposeEnum, UserAccountStatusEnum, VendorBusinessTypeEnum, VendorStatusEnum } from "./enum/user";
1
+ import { UserGenderEnum, UserAccountTypeEnum, RoleRiskLevelEnum, VerificationPurposeEnum, UserAccountStatusEnum } from "./enum/user";
2
2
  export declare enum RoleIconEnum {
3
3
  SHIELD = "shield",
4
4
  USERS = "users",
@@ -65,51 +65,7 @@ export interface AdministratorAsaUserI extends UserI {
65
65
  role: RoleI;
66
66
  permissions?: string[] | undefined;
67
67
  }
68
- export interface VendorAsaUserI extends UserI {
69
- businesses: VendorI[];
70
- role: RoleI;
71
- permission?: string | undefined;
72
- }
73
68
  export interface CustomerAsaUserI extends UserI {
74
69
  dietry_preferences?: string[];
75
70
  orders: string[];
76
71
  }
77
- export type UserType = AdministratorAsaUserI | VendorAsaUserI | CustomerAsaUserI;
78
- export interface VendorI {
79
- id?: string;
80
- owner_id: string;
81
- business_name: string;
82
- slug: string;
83
- description: string;
84
- business_type: VendorBusinessTypeEnum;
85
- business_status: VendorStatusEnum;
86
- business_email: string;
87
- business_phone: string;
88
- business_address?: string;
89
- location?: string;
90
- logo_url: string;
91
- banner_url: string;
92
- operating_hours: string;
93
- is_accepting_orders: boolean;
94
- avg_preparation_time_minutes: number;
95
- rating: number;
96
- review_count: number;
97
- payout_provider_account_id: string;
98
- verification_documents: string;
99
- owner?: UserI;
100
- approved_by: string;
101
- approved_on: Date;
102
- created_at: Date;
103
- updated_at: Date;
104
- }
105
- export type SuccessfulUserRegistrationResponseType = {
106
- data: {
107
- vendor?: VendorI;
108
- user: UserI;
109
- };
110
- payload?: any;
111
- subject: string;
112
- context?: string;
113
- message?: string;
114
- };
115
- export type UserVendorI = UserI & VendorI;
@@ -0,0 +1,29 @@
1
+ import { VendorBusinessTypeEnum, VendorStatusEnum } from "./enum/user";
2
+ import { UserI } from "./user";
3
+ export interface VendorI {
4
+ id?: string;
5
+ owner_id: string;
6
+ business_name: string;
7
+ slug: string;
8
+ description: string;
9
+ business_type: VendorBusinessTypeEnum;
10
+ business_status: VendorStatusEnum;
11
+ business_email: string;
12
+ business_phone: string;
13
+ business_address?: string;
14
+ location?: string;
15
+ logo_url: string;
16
+ banner_url: string;
17
+ operating_hours: string;
18
+ is_accepting_orders: boolean;
19
+ avg_preparation_time_minutes: number;
20
+ rating: number;
21
+ review_count: number;
22
+ payout_provider_account_id: string;
23
+ verification_documents: string;
24
+ owner?: UserI;
25
+ approved_by: string;
26
+ approved_on: Date;
27
+ created_at: Date;
28
+ updated_at: Date;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chopkola/common",
3
- "version": "1.0.107",
3
+ "version": "1.0.109",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "akrosoft technology ltd",