@mydoormot/app-types 1.7.23 → 1.7.25

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.
@@ -1,18 +1,18 @@
1
-
2
- > @mydoormot/app-types@1.7.22 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
- > tsup src/index.ts --format esm,cjs --dts
4
-
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.3.0
8
- CLI Target: es2021
9
- ESM Build start
10
- CJS Build start
11
- DTS Build start
12
- ESM dist/index.js 6.97 KB
13
- ESM ⚡️ Build success in 412ms
14
- CJS dist/index.cjs 8.78 KB
15
- CJS ⚡️ Build success in 413ms
16
- DTS ⚡️ Build success in 907ms
17
- DTS dist/index.d.ts 22.43 KB
18
- DTS dist/index.d.cts 22.43 KB
1
+
2
+ > @mydoormot/app-types@1.7.24 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
+ > tsup src/index.ts --format esm,cjs --dts
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v7.3.0
8
+ CLI Target: es2021
9
+ ESM Build start
10
+ CJS Build start
11
+ DTS Build start
12
+ CJS dist/index.cjs 9.03 KB
13
+ CJS ⚡️ Build success in 479ms
14
+ ESM dist/index.js 7.18 KB
15
+ ESM ⚡️ Build success in 480ms
16
+ DTS ⚡️ Build success in 826ms
17
+ DTS dist/index.d.ts 26.30 KB
18
+ DTS dist/index.d.cts 26.30 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.25
4
+
5
+ ### Patch Changes
6
+
7
+ - Added commerce
8
+
9
+ ## 1.7.24
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified business routes
14
+
3
15
  ## 1.7.23
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  AddressTypes: () => AddressTypes,
24
24
  AuthType: () => AuthType,
25
+ BusinessCapability: () => BusinessCapability,
25
26
  BusinessRole: () => BusinessRole,
26
27
  DeliveryStatus: () => DeliveryStatus,
27
28
  EnterpriseType: () => EnterpriseType,
@@ -199,6 +200,10 @@ var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
199
200
  })(EnterpriseType || {});
200
201
 
201
202
  // src/business.ts
203
+ var BusinessCapability = /* @__PURE__ */ ((BusinessCapability2) => {
204
+ BusinessCapability2["SELF_FULFILLMENT"] = "self_fulfillment";
205
+ return BusinessCapability2;
206
+ })(BusinessCapability || {});
202
207
  var BusinessRole = /* @__PURE__ */ ((BusinessRole2) => {
203
208
  BusinessRole2["OWNER"] = "OWNER";
204
209
  BusinessRole2["MANAGER"] = "MANAGER";
@@ -232,6 +237,7 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
232
237
  0 && (module.exports = {
233
238
  AddressTypes,
234
239
  AuthType,
240
+ BusinessCapability,
235
241
  BusinessRole,
236
242
  DeliveryStatus,
237
243
  EnterpriseType,
package/dist/index.d.cts CHANGED
@@ -598,6 +598,9 @@ interface EnterpriseSubCategoryDoc {
598
598
  createdAt: string;
599
599
  }
600
600
 
601
+ declare enum BusinessCapability {
602
+ SELF_FULFILLMENT = "self_fulfillment"
603
+ }
601
604
  interface Business {
602
605
  id: string;
603
606
  userId: string;
@@ -629,6 +632,7 @@ interface Business {
629
632
  registrationCompletedAt: string | NullOrUndefined | Date;
630
633
  isManaged: boolean | NullOrUndefined;
631
634
  businessCategoryDetails: BusinessCategory | NullOrUndefined;
635
+ capabilities: BusinessCapability[] | NullOrUndefined;
632
636
  }
633
637
  interface BusinessPg extends Business {
634
638
  pgId: any;
@@ -673,6 +677,140 @@ interface BusinessMember {
673
677
  updatedAt: string | NullOrUndefined;
674
678
  }
675
679
 
680
+ type ProductStatus = 'draft' | 'proposed' | 'published' | 'rejected';
681
+ interface ProductImage {
682
+ id: string;
683
+ url: string;
684
+ rank: number;
685
+ created_at?: string;
686
+ updated_at?: string;
687
+ deleted_at?: string | null;
688
+ metadata?: Record<string, unknown> | null;
689
+ }
690
+ interface ProductOptionValue {
691
+ id: string;
692
+ value: string;
693
+ option?: ProductOption | null;
694
+ option_id?: string | null;
695
+ metadata?: Record<string, unknown> | null;
696
+ created_at?: string;
697
+ updated_at?: string;
698
+ deleted_at?: string | null;
699
+ }
700
+ interface ProductOption {
701
+ id: string;
702
+ title: string;
703
+ product_id?: string | null;
704
+ values?: ProductOptionValue[];
705
+ metadata?: Record<string, unknown> | null;
706
+ created_at?: string;
707
+ updated_at?: string;
708
+ deleted_at?: string | null;
709
+ }
710
+ interface ProductVariant {
711
+ id: string;
712
+ title: string | null;
713
+ sku: string | null;
714
+ barcode: string | null;
715
+ ean: string | null;
716
+ upc: string | null;
717
+ allow_backorder: boolean | null;
718
+ manage_inventory: boolean | null;
719
+ inventory_quantity?: number;
720
+ hs_code: string | null;
721
+ origin_country: string | null;
722
+ mid_code: string | null;
723
+ material: string | null;
724
+ weight: number | null;
725
+ length: number | null;
726
+ height: number | null;
727
+ width: number | null;
728
+ variant_rank?: number | null;
729
+ options: ProductOptionValue[] | null;
730
+ prices: ProductVariantPrice[] | null;
731
+ product_id?: string;
732
+ created_at: string;
733
+ updated_at: string;
734
+ deleted_at: string | null;
735
+ metadata?: Record<string, unknown> | null;
736
+ }
737
+ interface ProductVariantPrice {
738
+ id: string;
739
+ currency_code: string;
740
+ amount: number;
741
+ min_quantity?: number | null;
742
+ max_quantity?: number | null;
743
+ created_at: string;
744
+ updated_at: string;
745
+ deleted_at: string | null;
746
+ }
747
+ interface Product {
748
+ id: string;
749
+ title: string;
750
+ handle: string;
751
+ subtitle: string | null;
752
+ description: string | null;
753
+ is_giftcard: boolean;
754
+ status: ProductStatus;
755
+ thumbnail: string | null;
756
+ width: number | null;
757
+ weight: number | null;
758
+ length: number | null;
759
+ height: number | null;
760
+ origin_country: string | null;
761
+ hs_code: string | null;
762
+ mid_code: string | null;
763
+ material: string | null;
764
+ collection_id: string | null;
765
+ collection?: Collection | null;
766
+ type_id: string | null;
767
+ discountable: boolean;
768
+ external_id: string | null;
769
+ variants: ProductVariant[] | null;
770
+ options: ProductOption[] | null;
771
+ images: ProductImage[] | null;
772
+ tags?: ProductTag[] | null;
773
+ categories?: ProductCategory[] | null;
774
+ created_at: string | null;
775
+ updated_at: string | null;
776
+ deleted_at: string | null;
777
+ metadata?: Record<string, unknown> | null;
778
+ }
779
+ interface Collection {
780
+ id: string;
781
+ title: string;
782
+ handle: string;
783
+ products?: Product[];
784
+ created_at: string;
785
+ updated_at: string;
786
+ deleted_at?: string | null;
787
+ metadata?: Record<string, unknown> | null;
788
+ }
789
+ interface ProductTag {
790
+ id: string;
791
+ value: string;
792
+ metadata?: Record<string, unknown> | null;
793
+ created_at?: string;
794
+ updated_at?: string;
795
+ deleted_at?: string | null;
796
+ }
797
+ interface ProductCategory {
798
+ id: string;
799
+ name: string;
800
+ handle: string;
801
+ description?: string;
802
+ is_active?: boolean;
803
+ is_internal?: boolean;
804
+ rank?: number;
805
+ parent_category_id?: string | null;
806
+ parent_category?: ProductCategory | null;
807
+ category_children?: ProductCategory[];
808
+ metadata?: Record<string, unknown> | null;
809
+ created_at?: string;
810
+ updated_at?: string;
811
+ deleted_at?: string | null;
812
+ }
813
+
676
814
  type TransactionType = 'sale' | 'expense';
677
815
  interface TransactionItem {
678
816
  name: string;
@@ -890,4 +1028,4 @@ declare enum LinkDestination {
890
1028
  }
891
1029
  type NullOrUndefined = null | undefined;
892
1030
 
893
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
1031
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Collection, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
package/dist/index.d.ts CHANGED
@@ -598,6 +598,9 @@ interface EnterpriseSubCategoryDoc {
598
598
  createdAt: string;
599
599
  }
600
600
 
601
+ declare enum BusinessCapability {
602
+ SELF_FULFILLMENT = "self_fulfillment"
603
+ }
601
604
  interface Business {
602
605
  id: string;
603
606
  userId: string;
@@ -629,6 +632,7 @@ interface Business {
629
632
  registrationCompletedAt: string | NullOrUndefined | Date;
630
633
  isManaged: boolean | NullOrUndefined;
631
634
  businessCategoryDetails: BusinessCategory | NullOrUndefined;
635
+ capabilities: BusinessCapability[] | NullOrUndefined;
632
636
  }
633
637
  interface BusinessPg extends Business {
634
638
  pgId: any;
@@ -673,6 +677,140 @@ interface BusinessMember {
673
677
  updatedAt: string | NullOrUndefined;
674
678
  }
675
679
 
680
+ type ProductStatus = 'draft' | 'proposed' | 'published' | 'rejected';
681
+ interface ProductImage {
682
+ id: string;
683
+ url: string;
684
+ rank: number;
685
+ created_at?: string;
686
+ updated_at?: string;
687
+ deleted_at?: string | null;
688
+ metadata?: Record<string, unknown> | null;
689
+ }
690
+ interface ProductOptionValue {
691
+ id: string;
692
+ value: string;
693
+ option?: ProductOption | null;
694
+ option_id?: string | null;
695
+ metadata?: Record<string, unknown> | null;
696
+ created_at?: string;
697
+ updated_at?: string;
698
+ deleted_at?: string | null;
699
+ }
700
+ interface ProductOption {
701
+ id: string;
702
+ title: string;
703
+ product_id?: string | null;
704
+ values?: ProductOptionValue[];
705
+ metadata?: Record<string, unknown> | null;
706
+ created_at?: string;
707
+ updated_at?: string;
708
+ deleted_at?: string | null;
709
+ }
710
+ interface ProductVariant {
711
+ id: string;
712
+ title: string | null;
713
+ sku: string | null;
714
+ barcode: string | null;
715
+ ean: string | null;
716
+ upc: string | null;
717
+ allow_backorder: boolean | null;
718
+ manage_inventory: boolean | null;
719
+ inventory_quantity?: number;
720
+ hs_code: string | null;
721
+ origin_country: string | null;
722
+ mid_code: string | null;
723
+ material: string | null;
724
+ weight: number | null;
725
+ length: number | null;
726
+ height: number | null;
727
+ width: number | null;
728
+ variant_rank?: number | null;
729
+ options: ProductOptionValue[] | null;
730
+ prices: ProductVariantPrice[] | null;
731
+ product_id?: string;
732
+ created_at: string;
733
+ updated_at: string;
734
+ deleted_at: string | null;
735
+ metadata?: Record<string, unknown> | null;
736
+ }
737
+ interface ProductVariantPrice {
738
+ id: string;
739
+ currency_code: string;
740
+ amount: number;
741
+ min_quantity?: number | null;
742
+ max_quantity?: number | null;
743
+ created_at: string;
744
+ updated_at: string;
745
+ deleted_at: string | null;
746
+ }
747
+ interface Product {
748
+ id: string;
749
+ title: string;
750
+ handle: string;
751
+ subtitle: string | null;
752
+ description: string | null;
753
+ is_giftcard: boolean;
754
+ status: ProductStatus;
755
+ thumbnail: string | null;
756
+ width: number | null;
757
+ weight: number | null;
758
+ length: number | null;
759
+ height: number | null;
760
+ origin_country: string | null;
761
+ hs_code: string | null;
762
+ mid_code: string | null;
763
+ material: string | null;
764
+ collection_id: string | null;
765
+ collection?: Collection | null;
766
+ type_id: string | null;
767
+ discountable: boolean;
768
+ external_id: string | null;
769
+ variants: ProductVariant[] | null;
770
+ options: ProductOption[] | null;
771
+ images: ProductImage[] | null;
772
+ tags?: ProductTag[] | null;
773
+ categories?: ProductCategory[] | null;
774
+ created_at: string | null;
775
+ updated_at: string | null;
776
+ deleted_at: string | null;
777
+ metadata?: Record<string, unknown> | null;
778
+ }
779
+ interface Collection {
780
+ id: string;
781
+ title: string;
782
+ handle: string;
783
+ products?: Product[];
784
+ created_at: string;
785
+ updated_at: string;
786
+ deleted_at?: string | null;
787
+ metadata?: Record<string, unknown> | null;
788
+ }
789
+ interface ProductTag {
790
+ id: string;
791
+ value: string;
792
+ metadata?: Record<string, unknown> | null;
793
+ created_at?: string;
794
+ updated_at?: string;
795
+ deleted_at?: string | null;
796
+ }
797
+ interface ProductCategory {
798
+ id: string;
799
+ name: string;
800
+ handle: string;
801
+ description?: string;
802
+ is_active?: boolean;
803
+ is_internal?: boolean;
804
+ rank?: number;
805
+ parent_category_id?: string | null;
806
+ parent_category?: ProductCategory | null;
807
+ category_children?: ProductCategory[];
808
+ metadata?: Record<string, unknown> | null;
809
+ created_at?: string;
810
+ updated_at?: string;
811
+ deleted_at?: string | null;
812
+ }
813
+
676
814
  type TransactionType = 'sale' | 'expense';
677
815
  interface TransactionItem {
678
816
  name: string;
@@ -890,4 +1028,4 @@ declare enum LinkDestination {
890
1028
  }
891
1029
  type NullOrUndefined = null | undefined;
892
1030
 
893
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
1031
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Collection, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
package/dist/index.js CHANGED
@@ -152,6 +152,10 @@ var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
152
152
  })(EnterpriseType || {});
153
153
 
154
154
  // src/business.ts
155
+ var BusinessCapability = /* @__PURE__ */ ((BusinessCapability2) => {
156
+ BusinessCapability2["SELF_FULFILLMENT"] = "self_fulfillment";
157
+ return BusinessCapability2;
158
+ })(BusinessCapability || {});
155
159
  var BusinessRole = /* @__PURE__ */ ((BusinessRole2) => {
156
160
  BusinessRole2["OWNER"] = "OWNER";
157
161
  BusinessRole2["MANAGER"] = "MANAGER";
@@ -184,6 +188,7 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
184
188
  export {
185
189
  AddressTypes,
186
190
  AuthType,
191
+ BusinessCapability,
187
192
  BusinessRole,
188
193
  DeliveryStatus,
189
194
  EnterpriseType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.23",
3
+ "version": "1.7.25",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/business.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { NullOrUndefined, User } from '.';
2
2
 
3
+ export enum BusinessCapability {
4
+ SELF_FULFILLMENT = 'self_fulfillment',
5
+ }
6
+
3
7
  export interface Business {
4
8
  id: string;
5
9
  userId: string;
@@ -38,6 +42,7 @@ export interface Business {
38
42
  registrationCompletedAt: string | NullOrUndefined | Date;
39
43
  isManaged: boolean | NullOrUndefined;
40
44
  businessCategoryDetails: BusinessCategory | NullOrUndefined;
45
+ capabilities: BusinessCapability[] | NullOrUndefined;
41
46
  }
42
47
 
43
48
  export interface BusinessPg extends Business {
@@ -0,0 +1,142 @@
1
+ export type ProductStatus = 'draft' | 'proposed' | 'published' | 'rejected';
2
+
3
+ export interface ProductImage {
4
+ id: string;
5
+ url: string;
6
+ rank: number;
7
+ created_at?: string;
8
+ updated_at?: string;
9
+ deleted_at?: string | null;
10
+ metadata?: Record<string, unknown> | null;
11
+ }
12
+
13
+ export interface ProductOptionValue {
14
+ id: string;
15
+ value: string;
16
+ option?: ProductOption | null;
17
+ option_id?: string | null;
18
+ metadata?: Record<string, unknown> | null;
19
+ created_at?: string;
20
+ updated_at?: string;
21
+ deleted_at?: string | null;
22
+ }
23
+
24
+ export interface ProductOption {
25
+ id: string;
26
+ title: string;
27
+ product_id?: string | null;
28
+ values?: ProductOptionValue[];
29
+ metadata?: Record<string, unknown> | null;
30
+ created_at?: string;
31
+ updated_at?: string;
32
+ deleted_at?: string | null;
33
+ }
34
+
35
+ export interface ProductVariant {
36
+ id: string;
37
+ title: string | null;
38
+ sku: string | null;
39
+ barcode: string | null;
40
+ ean: string | null;
41
+ upc: string | null;
42
+ allow_backorder: boolean | null;
43
+ manage_inventory: boolean | null;
44
+ inventory_quantity?: number;
45
+ hs_code: string | null;
46
+ origin_country: string | null;
47
+ mid_code: string | null;
48
+ material: string | null;
49
+ weight: number | null;
50
+ length: number | null;
51
+ height: number | null;
52
+ width: number | null;
53
+ variant_rank?: number | null;
54
+ options: ProductOptionValue[] | null;
55
+ prices: ProductVariantPrice[] | null;
56
+ product_id?: string;
57
+ created_at: string;
58
+ updated_at: string;
59
+ deleted_at: string | null;
60
+ metadata?: Record<string, unknown> | null;
61
+ }
62
+
63
+ export interface ProductVariantPrice {
64
+ id: string;
65
+ currency_code: string;
66
+ amount: number;
67
+ min_quantity?: number | null;
68
+ max_quantity?: number | null;
69
+ created_at: string;
70
+ updated_at: string;
71
+ deleted_at: string | null;
72
+ }
73
+
74
+ export interface Product {
75
+ id: string;
76
+ title: string;
77
+ handle: string;
78
+ subtitle: string | null;
79
+ description: string | null;
80
+ is_giftcard: boolean;
81
+ status: ProductStatus;
82
+ thumbnail: string | null;
83
+ width: number | null;
84
+ weight: number | null;
85
+ length: number | null;
86
+ height: number | null;
87
+ origin_country: string | null;
88
+ hs_code: string | null;
89
+ mid_code: string | null;
90
+ material: string | null;
91
+ collection_id: string | null;
92
+ collection?: Collection | null;
93
+ type_id: string | null;
94
+ discountable: boolean;
95
+ external_id: string | null;
96
+ variants: ProductVariant[] | null;
97
+ options: ProductOption[] | null;
98
+ images: ProductImage[] | null;
99
+ tags?: ProductTag[] | null;
100
+ categories?: ProductCategory[] | null;
101
+ created_at: string | null;
102
+ updated_at: string | null;
103
+ deleted_at: string | null;
104
+ metadata?: Record<string, unknown> | null;
105
+ }
106
+
107
+ export interface Collection {
108
+ id: string;
109
+ title: string;
110
+ handle: string;
111
+ products?: Product[];
112
+ created_at: string;
113
+ updated_at: string;
114
+ deleted_at?: string | null;
115
+ metadata?: Record<string, unknown> | null;
116
+ }
117
+
118
+ export interface ProductTag {
119
+ id: string;
120
+ value: string;
121
+ metadata?: Record<string, unknown> | null;
122
+ created_at?: string;
123
+ updated_at?: string;
124
+ deleted_at?: string | null;
125
+ }
126
+
127
+ export interface ProductCategory {
128
+ id: string;
129
+ name: string;
130
+ handle: string;
131
+ description?: string;
132
+ is_active?: boolean;
133
+ is_internal?: boolean;
134
+ rank?: number;
135
+ parent_category_id?: string | null;
136
+ parent_category?: ProductCategory | null;
137
+ category_children?: ProductCategory[];
138
+ metadata?: Record<string, unknown> | null;
139
+ created_at?: string;
140
+ updated_at?: string;
141
+ deleted_at?: string | null;
142
+ }
package/src/index.ts CHANGED
@@ -31,6 +31,7 @@ export * from './rider';
31
31
  export * from './enterprise';
32
32
  export * from './coupon';
33
33
  export * from './business';
34
+ export * from './commerce';
34
35
  export * from './customer';
35
36
  export * from './transaction';
36
37
  export * from './stat';