@mydoormot/app-types 1.7.27 → 1.7.29

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.26 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
- CJS dist/index.cjs 9.03 KB
12
- CJS ⚡️ Build success in 114ms
13
- ESM dist/index.js 7.18 KB
14
- ESM ⚡️ Build success in 115ms
15
- DTS Build start
16
- DTS ⚡️ Build success in 1286ms
17
- DTS dist/index.d.ts 26.30 KB
18
- DTS dist/index.d.cts 26.30 KB
1
+
2
+ > @mydoormot/app-types@1.7.28 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
+ ESM dist/index.js 7.13 KB
12
+ ESM ⚡️ Build success in 64ms
13
+ CJS dist/index.cjs 8.99 KB
14
+ CJS ⚡️ Build success in 64ms
15
+ DTS Build start
16
+ DTS ⚡️ Build success in 872ms
17
+ DTS dist/index.d.ts 26.76 KB
18
+ DTS dist/index.d.cts 26.76 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated rider api types
8
+
9
+ ## 1.7.28
10
+
11
+ ### Patch Changes
12
+
13
+ - Added product count
14
+
3
15
  ## 1.7.27
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -175,7 +175,6 @@ var VehicleType = /* @__PURE__ */ ((VehicleType2) => {
175
175
  })(VehicleType || {});
176
176
  var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
177
177
  VehicleLogType2["REFUEL"] = "REFUEL";
178
- VehicleLogType2["MAINTENANCE"] = "MAINTENANCE";
179
178
  return VehicleLogType2;
180
179
  })(VehicleLogType || {});
181
180
  var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
package/dist/index.d.cts CHANGED
@@ -183,11 +183,11 @@ interface InvoiceItem {
183
183
  type Rider = {
184
184
  id: string;
185
185
  userId: string;
186
- vehicleId: string;
186
+ vehicleId?: string;
187
187
  currLocation: {
188
188
  coordinates: number[];
189
189
  };
190
- vehicleNumber: string;
190
+ vehicleNumber?: string;
191
191
  verified: boolean;
192
192
  active: boolean;
193
193
  updatedAt: Date;
@@ -212,16 +212,16 @@ type Vehicle = {
212
212
  vehicleType: VehicleType | `${VehicleType}`;
213
213
  businessId: string;
214
214
  shortName?: string;
215
- riderId?: string;
216
215
  userId?: string;
217
216
  };
217
+ type RiderWithUserDetails = Rider & {
218
+ userDetails?: User;
219
+ };
218
220
  type VehicleWithRider = Vehicle & {
219
- rider: Rider | null;
220
- riderUserDetails: User | null;
221
+ riders: RiderWithUserDetails[];
221
222
  };
222
223
  declare enum VehicleLogType {
223
- REFUEL = "REFUEL",
224
- MAINTENANCE = "MAINTENANCE"
224
+ REFUEL = "REFUEL"
225
225
  }
226
226
  type VehicleLog = {
227
227
  id: string;
@@ -235,8 +235,6 @@ type VehicleLog = {
235
235
  updatedAt: string;
236
236
  previousLogId?: string;
237
237
  errandIdsSinceLastRefuel?: string[];
238
- maintenanceType?: string;
239
- maintenanceCost?: number;
240
238
  vehicleDetails?: Vehicle;
241
239
  };
242
240
  type VehicleLogWithErrands = VehicleLog & {
@@ -785,6 +783,7 @@ interface Collection {
785
783
  updated_at: string;
786
784
  deleted_at?: string | null;
787
785
  metadata?: Record<string, unknown> | null;
786
+ products_count?: number;
788
787
  }
789
788
  interface ProductTag {
790
789
  id: string;
@@ -794,6 +793,25 @@ interface ProductTag {
794
793
  updated_at?: string;
795
794
  deleted_at?: string | null;
796
795
  }
796
+ interface AddonGroupItem {
797
+ id: string;
798
+ product_id: string;
799
+ product?: Product;
800
+ addon_group_id: string;
801
+ created_at?: string;
802
+ updated_at?: string;
803
+ deleted_at?: string | null;
804
+ }
805
+ interface AddonGroup {
806
+ id: string;
807
+ product_id: string;
808
+ title: string;
809
+ max_select: number;
810
+ items?: AddonGroupItem[];
811
+ created_at?: string;
812
+ updated_at?: string;
813
+ deleted_at?: string | null;
814
+ }
797
815
  interface ProductCategory {
798
816
  id: string;
799
817
  name: string;
@@ -830,6 +848,7 @@ interface Transaction {
830
848
  businessId?: string;
831
849
  categoryId?: string;
832
850
  customerId?: string;
851
+ riderId?: string;
833
852
  items?: TransactionItem[];
834
853
  customerDetails?: Customer;
835
854
  }
@@ -1028,4 +1047,4 @@ declare enum LinkDestination {
1028
1047
  }
1029
1048
  type NullOrUndefined = null | undefined;
1030
1049
 
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 };
1050
+ export { type AddonGroup, type AddonGroupItem, 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, type RiderWithUserDetails, 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
@@ -183,11 +183,11 @@ interface InvoiceItem {
183
183
  type Rider = {
184
184
  id: string;
185
185
  userId: string;
186
- vehicleId: string;
186
+ vehicleId?: string;
187
187
  currLocation: {
188
188
  coordinates: number[];
189
189
  };
190
- vehicleNumber: string;
190
+ vehicleNumber?: string;
191
191
  verified: boolean;
192
192
  active: boolean;
193
193
  updatedAt: Date;
@@ -212,16 +212,16 @@ type Vehicle = {
212
212
  vehicleType: VehicleType | `${VehicleType}`;
213
213
  businessId: string;
214
214
  shortName?: string;
215
- riderId?: string;
216
215
  userId?: string;
217
216
  };
217
+ type RiderWithUserDetails = Rider & {
218
+ userDetails?: User;
219
+ };
218
220
  type VehicleWithRider = Vehicle & {
219
- rider: Rider | null;
220
- riderUserDetails: User | null;
221
+ riders: RiderWithUserDetails[];
221
222
  };
222
223
  declare enum VehicleLogType {
223
- REFUEL = "REFUEL",
224
- MAINTENANCE = "MAINTENANCE"
224
+ REFUEL = "REFUEL"
225
225
  }
226
226
  type VehicleLog = {
227
227
  id: string;
@@ -235,8 +235,6 @@ type VehicleLog = {
235
235
  updatedAt: string;
236
236
  previousLogId?: string;
237
237
  errandIdsSinceLastRefuel?: string[];
238
- maintenanceType?: string;
239
- maintenanceCost?: number;
240
238
  vehicleDetails?: Vehicle;
241
239
  };
242
240
  type VehicleLogWithErrands = VehicleLog & {
@@ -785,6 +783,7 @@ interface Collection {
785
783
  updated_at: string;
786
784
  deleted_at?: string | null;
787
785
  metadata?: Record<string, unknown> | null;
786
+ products_count?: number;
788
787
  }
789
788
  interface ProductTag {
790
789
  id: string;
@@ -794,6 +793,25 @@ interface ProductTag {
794
793
  updated_at?: string;
795
794
  deleted_at?: string | null;
796
795
  }
796
+ interface AddonGroupItem {
797
+ id: string;
798
+ product_id: string;
799
+ product?: Product;
800
+ addon_group_id: string;
801
+ created_at?: string;
802
+ updated_at?: string;
803
+ deleted_at?: string | null;
804
+ }
805
+ interface AddonGroup {
806
+ id: string;
807
+ product_id: string;
808
+ title: string;
809
+ max_select: number;
810
+ items?: AddonGroupItem[];
811
+ created_at?: string;
812
+ updated_at?: string;
813
+ deleted_at?: string | null;
814
+ }
797
815
  interface ProductCategory {
798
816
  id: string;
799
817
  name: string;
@@ -830,6 +848,7 @@ interface Transaction {
830
848
  businessId?: string;
831
849
  categoryId?: string;
832
850
  customerId?: string;
851
+ riderId?: string;
833
852
  items?: TransactionItem[];
834
853
  customerDetails?: Customer;
835
854
  }
@@ -1028,4 +1047,4 @@ declare enum LinkDestination {
1028
1047
  }
1029
1048
  type NullOrUndefined = null | undefined;
1030
1049
 
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 };
1050
+ export { type AddonGroup, type AddonGroupItem, 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, type RiderWithUserDetails, 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
@@ -127,7 +127,6 @@ var VehicleType = /* @__PURE__ */ ((VehicleType2) => {
127
127
  })(VehicleType || {});
128
128
  var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
129
129
  VehicleLogType2["REFUEL"] = "REFUEL";
130
- VehicleLogType2["MAINTENANCE"] = "MAINTENANCE";
131
130
  return VehicleLogType2;
132
131
  })(VehicleLogType || {});
133
132
  var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.27",
3
+ "version": "1.7.29",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/commerce.ts CHANGED
@@ -113,6 +113,7 @@ export interface Collection {
113
113
  updated_at: string;
114
114
  deleted_at?: string | null;
115
115
  metadata?: Record<string, unknown> | null;
116
+ products_count?: number;
116
117
  }
117
118
 
118
119
  export interface ProductTag {
@@ -124,6 +125,27 @@ export interface ProductTag {
124
125
  deleted_at?: string | null;
125
126
  }
126
127
 
128
+ export interface AddonGroupItem {
129
+ id: string;
130
+ product_id: string;
131
+ product?: Product;
132
+ addon_group_id: string;
133
+ created_at?: string;
134
+ updated_at?: string;
135
+ deleted_at?: string | null;
136
+ }
137
+
138
+ export interface AddonGroup {
139
+ id: string;
140
+ product_id: string;
141
+ title: string;
142
+ max_select: number;
143
+ items?: AddonGroupItem[];
144
+ created_at?: string;
145
+ updated_at?: string;
146
+ deleted_at?: string | null;
147
+ }
148
+
127
149
  export interface ProductCategory {
128
150
  id: string;
129
151
  name: string;
package/src/rider.ts CHANGED
@@ -6,14 +6,14 @@ import { User } from './user';
6
6
  export type Rider = {
7
7
  id: string;
8
8
  userId: string;
9
- vehicleId: string;
9
+ vehicleId?: string;
10
10
 
11
11
  // city: string | City;
12
12
  currLocation: {
13
13
  coordinates: number[];
14
14
  };
15
15
  // vehicle: string | Vehicle;
16
- vehicleNumber: string;
16
+ vehicleNumber?: string;
17
17
  verified: boolean;
18
18
  active: boolean;
19
19
  updatedAt: Date;
@@ -44,18 +44,19 @@ export type Vehicle = {
44
44
  businessId: string;
45
45
 
46
46
  shortName?: string;
47
- riderId?: string;
48
47
  userId?: string;
49
48
  };
50
49
 
50
+ export type RiderWithUserDetails = Rider & {
51
+ userDetails?: User;
52
+ };
53
+
51
54
  export type VehicleWithRider = Vehicle & {
52
- rider: Rider | null;
53
- riderUserDetails: User | null;
55
+ riders: RiderWithUserDetails[];
54
56
  };
55
57
 
56
58
  export enum VehicleLogType {
57
59
  REFUEL = 'REFUEL',
58
- MAINTENANCE = 'MAINTENANCE',
59
60
  }
60
61
 
61
62
  export type VehicleLog = {
@@ -70,8 +71,6 @@ export type VehicleLog = {
70
71
  updatedAt: string;
71
72
  previousLogId?: string;
72
73
  errandIdsSinceLastRefuel?: string[];
73
- maintenanceType?: string;
74
- maintenanceCost?: number;
75
74
  vehicleDetails?: Vehicle;
76
75
  };
77
76
 
@@ -21,6 +21,7 @@ export interface Transaction {
21
21
  businessId?: string;
22
22
  categoryId?: string;
23
23
  customerId?: string;
24
+ riderId?: string;
24
25
  items?: TransactionItem[];
25
26
  customerDetails?: Customer;
26
27
  }