@mydoormot/app-types 1.7.21 → 1.7.22

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,5 +1,5 @@
1
1
 
2
- > @mydoormot/app-types@1.7.20 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.7.21 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,10 +9,10 @@
9
9
  ESM Build start
10
10
  CJS Build start
11
11
  DTS Build start
12
- CJS dist/index.cjs 9.29 KB
13
- CJS ⚡️ Build success in 837ms
14
- ESM dist/index.js 7.44 KB
15
- ESM ⚡️ Build success in 837ms
16
- DTS ⚡️ Build success in 792ms
17
- DTS dist/index.d.ts 22.98 KB
18
- DTS dist/index.d.cts 22.98 KB
12
+ ESM dist/index.js 6.75 KB
13
+ ESM ⚡️ Build success in 440ms
14
+ CJS dist/index.cjs 8.51 KB
15
+ CJS ⚡️ Build success in 440ms
16
+ DTS ⚡️ Build success in 1476ms
17
+ DTS dist/index.d.ts 22.32 KB
18
+ DTS dist/index.d.cts 22.32 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified rider settlements
8
+
3
9
  ## 1.7.21
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -34,9 +34,7 @@ __export(src_exports, {
34
34
  MembershipStatus: () => MembershipStatus,
35
35
  NotificationType: () => NotificationType,
36
36
  ParcelSize: () => ParcelSize,
37
- PaymentMethod: () => PaymentMethod,
38
37
  PaymentOptions: () => PaymentOptions,
39
- RemittanceMethod: () => RemittanceMethod,
40
38
  RemittanceStatus: () => RemittanceStatus,
41
39
  RoleType: () => RoleType,
42
40
  TraccarDeviceStatus: () => TraccarDeviceStatus,
@@ -181,24 +179,9 @@ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
181
179
  var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
182
180
  RemittanceStatus2["Pending"] = "pending";
183
181
  RemittanceStatus2["Remitted"] = "remitted";
184
- RemittanceStatus2["Waived"] = "waived";
185
182
  RemittanceStatus2["Cancelled"] = "cancelled";
186
183
  return RemittanceStatus2;
187
184
  })(RemittanceStatus || {});
188
- var RemittanceMethod = /* @__PURE__ */ ((RemittanceMethod2) => {
189
- RemittanceMethod2["Cash"] = "cash";
190
- RemittanceMethod2["Transfer"] = "transfer";
191
- RemittanceMethod2["Deduction"] = "deduction";
192
- RemittanceMethod2["Other"] = "other";
193
- return RemittanceMethod2;
194
- })(RemittanceMethod || {});
195
- var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
196
- PaymentMethod2["CashOnDelivery"] = "cash_on_delivery";
197
- PaymentMethod2["PrepaidOnline"] = "prepaid_online";
198
- PaymentMethod2["PrepaidTransfer"] = "prepaid_transfer";
199
- PaymentMethod2["BusinessInvoice"] = "business_invoice";
200
- return PaymentMethod2;
201
- })(PaymentMethod || {});
202
185
 
203
186
  // src/enterprise.ts
204
187
  var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
@@ -255,9 +238,7 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
255
238
  MembershipStatus,
256
239
  NotificationType,
257
240
  ParcelSize,
258
- PaymentMethod,
259
241
  PaymentOptions,
260
- RemittanceMethod,
261
242
  RemittanceStatus,
262
243
  RoleType,
263
244
  TraccarDeviceStatus,
package/dist/index.d.cts CHANGED
@@ -246,45 +246,21 @@ type VehicleLogWithErrands = VehicleLog & {
246
246
  declare enum RemittanceStatus {
247
247
  Pending = "pending",
248
248
  Remitted = "remitted",
249
- Waived = "waived",
250
249
  Cancelled = "cancelled"
251
250
  }
252
- declare enum RemittanceMethod {
253
- Cash = "cash",
254
- Transfer = "transfer",
255
- Deduction = "deduction",
256
- Other = "other"
257
- }
258
- declare enum PaymentMethod {
259
- CashOnDelivery = "cash_on_delivery",
260
- PrepaidOnline = "prepaid_online",
261
- PrepaidTransfer = "prepaid_transfer",
262
- BusinessInvoice = "business_invoice"
263
- }
264
- interface AdditionalFee {
265
- description: string;
266
- amount: number;
267
- createdAt?: Date;
268
- createdBy?: string;
269
- }
270
251
  interface RiderSettlement {
271
252
  id: string;
272
253
  errandId: string;
273
254
  riderId: string;
274
255
  businessId: string;
275
- deliveryFeeAmount: number;
276
- payOnDeliveryAmount: number;
277
- additionalFees: AdditionalFee[];
256
+ deliveryFee: number;
257
+ additionalAmount: number;
278
258
  totalCollectionAmount: number;
279
- collectionRequired: boolean;
280
- remittanceStatus: RemittanceStatus;
281
259
  remittedAmount: number;
260
+ remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
282
261
  remittedAt?: Date;
283
262
  remittedBy?: string;
284
- remittanceMethod?: RemittanceMethod;
285
- remittanceReference?: string;
286
- paymentMethod?: PaymentMethod;
287
- isPrePaid: boolean;
263
+ description?: string;
288
264
  notes?: string;
289
265
  createdAt: Date;
290
266
  updatedAt: Date;
@@ -910,4 +886,4 @@ declare enum LinkDestination {
910
886
  }
911
887
  type NullOrUndefined = null | undefined;
912
888
 
913
- export { type AdditionalFee, 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, PaymentMethod, PaymentOptions, type PendingErrand, RemittanceMethod, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, 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 };
889
+ 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, 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
@@ -246,45 +246,21 @@ type VehicleLogWithErrands = VehicleLog & {
246
246
  declare enum RemittanceStatus {
247
247
  Pending = "pending",
248
248
  Remitted = "remitted",
249
- Waived = "waived",
250
249
  Cancelled = "cancelled"
251
250
  }
252
- declare enum RemittanceMethod {
253
- Cash = "cash",
254
- Transfer = "transfer",
255
- Deduction = "deduction",
256
- Other = "other"
257
- }
258
- declare enum PaymentMethod {
259
- CashOnDelivery = "cash_on_delivery",
260
- PrepaidOnline = "prepaid_online",
261
- PrepaidTransfer = "prepaid_transfer",
262
- BusinessInvoice = "business_invoice"
263
- }
264
- interface AdditionalFee {
265
- description: string;
266
- amount: number;
267
- createdAt?: Date;
268
- createdBy?: string;
269
- }
270
251
  interface RiderSettlement {
271
252
  id: string;
272
253
  errandId: string;
273
254
  riderId: string;
274
255
  businessId: string;
275
- deliveryFeeAmount: number;
276
- payOnDeliveryAmount: number;
277
- additionalFees: AdditionalFee[];
256
+ deliveryFee: number;
257
+ additionalAmount: number;
278
258
  totalCollectionAmount: number;
279
- collectionRequired: boolean;
280
- remittanceStatus: RemittanceStatus;
281
259
  remittedAmount: number;
260
+ remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
282
261
  remittedAt?: Date;
283
262
  remittedBy?: string;
284
- remittanceMethod?: RemittanceMethod;
285
- remittanceReference?: string;
286
- paymentMethod?: PaymentMethod;
287
- isPrePaid: boolean;
263
+ description?: string;
288
264
  notes?: string;
289
265
  createdAt: Date;
290
266
  updatedAt: Date;
@@ -910,4 +886,4 @@ declare enum LinkDestination {
910
886
  }
911
887
  type NullOrUndefined = null | undefined;
912
888
 
913
- export { type AdditionalFee, 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, PaymentMethod, PaymentOptions, type PendingErrand, RemittanceMethod, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, 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 };
889
+ 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, 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
@@ -133,24 +133,9 @@ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
133
133
  var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
134
134
  RemittanceStatus2["Pending"] = "pending";
135
135
  RemittanceStatus2["Remitted"] = "remitted";
136
- RemittanceStatus2["Waived"] = "waived";
137
136
  RemittanceStatus2["Cancelled"] = "cancelled";
138
137
  return RemittanceStatus2;
139
138
  })(RemittanceStatus || {});
140
- var RemittanceMethod = /* @__PURE__ */ ((RemittanceMethod2) => {
141
- RemittanceMethod2["Cash"] = "cash";
142
- RemittanceMethod2["Transfer"] = "transfer";
143
- RemittanceMethod2["Deduction"] = "deduction";
144
- RemittanceMethod2["Other"] = "other";
145
- return RemittanceMethod2;
146
- })(RemittanceMethod || {});
147
- var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
148
- PaymentMethod2["CashOnDelivery"] = "cash_on_delivery";
149
- PaymentMethod2["PrepaidOnline"] = "prepaid_online";
150
- PaymentMethod2["PrepaidTransfer"] = "prepaid_transfer";
151
- PaymentMethod2["BusinessInvoice"] = "business_invoice";
152
- return PaymentMethod2;
153
- })(PaymentMethod || {});
154
139
 
155
140
  // src/enterprise.ts
156
141
  var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
@@ -206,9 +191,7 @@ export {
206
191
  MembershipStatus,
207
192
  NotificationType,
208
193
  ParcelSize,
209
- PaymentMethod,
210
194
  PaymentOptions,
211
- RemittanceMethod,
212
195
  RemittanceStatus,
213
196
  RoleType,
214
197
  TraccarDeviceStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.21",
3
+ "version": "1.7.22",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/rider.ts CHANGED
@@ -80,59 +80,34 @@ export type VehicleLogWithErrands = VehicleLog & {
80
80
  totalErrandsRevenue?: number;
81
81
  };
82
82
 
83
- // export type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
84
- // riderDetails: Rider | null;
85
- // riderUserDetails: User | null;
86
- // };
87
-
88
83
  // Rider Settlement Types
89
84
  export enum RemittanceStatus {
90
85
  Pending = 'pending',
91
86
  Remitted = 'remitted',
92
- Waived = 'waived',
93
87
  Cancelled = 'cancelled',
94
88
  }
95
89
 
96
- export enum RemittanceMethod {
97
- Cash = 'cash',
98
- Transfer = 'transfer',
99
- Deduction = 'deduction',
100
- Other = 'other',
101
- }
102
-
103
- export enum PaymentMethod {
104
- CashOnDelivery = 'cash_on_delivery',
105
- PrepaidOnline = 'prepaid_online',
106
- PrepaidTransfer = 'prepaid_transfer',
107
- BusinessInvoice = 'business_invoice',
108
- }
109
-
110
- export interface AdditionalFee {
111
- description: string;
112
- amount: number;
113
- createdAt?: Date;
114
- createdBy?: string;
115
- }
116
-
117
90
  export interface RiderSettlement {
118
91
  id: string;
119
92
  errandId: string;
120
93
  riderId: string;
121
94
  businessId: string;
122
- deliveryFeeAmount: number;
123
- payOnDeliveryAmount: number;
124
- additionalFees: AdditionalFee[];
95
+
96
+ // Money breakdown
97
+ deliveryFee: number;
98
+ additionalAmount: number;
125
99
  totalCollectionAmount: number;
126
- collectionRequired: boolean;
127
- remittanceStatus: RemittanceStatus;
128
100
  remittedAmount: number;
101
+
102
+ // Status
103
+ remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
129
104
  remittedAt?: Date;
130
105
  remittedBy?: string;
131
- remittanceMethod?: RemittanceMethod;
132
- remittanceReference?: string;
133
- paymentMethod?: PaymentMethod;
134
- isPrePaid: boolean;
106
+
107
+ // Optional
108
+ description?: string;
135
109
  notes?: string;
110
+
136
111
  createdAt: Date;
137
112
  updatedAt: Date;
138
113
  version: number;