@mydoormot/app-types 2.0.5 → 2.0.6
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +0 -9
- package/dist/index.d.cts +11 -13
- package/dist/index.d.ts +11 -13
- package/dist/index.js +0 -8
- package/package.json +1 -1
- package/src/delivery.ts +0 -7
- package/src/errand.ts +0 -11
- package/src/rider.ts +11 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@2.0.
|
|
2
|
+
> @mydoormot/app-types@2.0.5 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
|
|
@@ -8,11 +8,11 @@ CLI tsup v7.3.0
|
|
|
8
8
|
CLI Target: es2021
|
|
9
9
|
ESM Build start
|
|
10
10
|
CJS Build start
|
|
11
|
-
ESM dist/index.js 14.
|
|
12
|
-
ESM ⚡️ Build success in
|
|
13
|
-
CJS dist/index.cjs 17.
|
|
14
|
-
CJS ⚡️ Build success in
|
|
11
|
+
ESM dist/index.js 14.38 KB
|
|
12
|
+
ESM ⚡️ Build success in 180ms
|
|
13
|
+
CJS dist/index.cjs 17.31 KB
|
|
14
|
+
CJS ⚡️ Build success in 180ms
|
|
15
15
|
DTS Build start
|
|
16
|
-
DTS ⚡️ Build success in
|
|
17
|
-
DTS dist/index.d.ts 50.
|
|
18
|
-
DTS dist/index.d.cts 50.
|
|
16
|
+
DTS ⚡️ Build success in 682ms
|
|
17
|
+
DTS dist/index.d.ts 50.65 KB
|
|
18
|
+
DTS dist/index.d.cts 50.65 KB
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,6 @@ __export(src_exports, {
|
|
|
47
47
|
LinkDestination: () => LinkDestination,
|
|
48
48
|
MembershipStatus: () => MembershipStatus,
|
|
49
49
|
NotificationType: () => NotificationType,
|
|
50
|
-
ParcelSize: () => ParcelSize,
|
|
51
50
|
PaymentOptions: () => PaymentOptions,
|
|
52
51
|
PayoutPeriodType: () => PayoutPeriodType,
|
|
53
52
|
PayoutRateSource: () => PayoutRateSource,
|
|
@@ -166,13 +165,6 @@ var DeliveryStatus = /* @__PURE__ */ ((DeliveryStatus2) => {
|
|
|
166
165
|
DeliveryStatus2["Cancelled"] = "cancelled";
|
|
167
166
|
return DeliveryStatus2;
|
|
168
167
|
})(DeliveryStatus || {});
|
|
169
|
-
var ParcelSize = /* @__PURE__ */ ((ParcelSize2) => {
|
|
170
|
-
ParcelSize2["Bike"] = "bike";
|
|
171
|
-
ParcelSize2["Large"] = "large";
|
|
172
|
-
ParcelSize2["Medium"] = "medium";
|
|
173
|
-
ParcelSize2["Small"] = "small";
|
|
174
|
-
return ParcelSize2;
|
|
175
|
-
})(ParcelSize || {});
|
|
176
168
|
var DraftErrandStatus = /* @__PURE__ */ ((DraftErrandStatus2) => {
|
|
177
169
|
DraftErrandStatus2["Draft"] = "draft";
|
|
178
170
|
DraftErrandStatus2["RiderCompleted"] = "rider_completed";
|
|
@@ -456,7 +448,6 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
|
456
448
|
LinkDestination,
|
|
457
449
|
MembershipStatus,
|
|
458
450
|
NotificationType,
|
|
459
|
-
ParcelSize,
|
|
460
451
|
PaymentOptions,
|
|
461
452
|
PayoutPeriodType,
|
|
462
453
|
PayoutRateSource,
|
package/dist/index.d.cts
CHANGED
|
@@ -731,13 +731,21 @@ type Rider = {
|
|
|
731
731
|
hasBeenRated: boolean;
|
|
732
732
|
payoutPercentage?: number | null;
|
|
733
733
|
state?: string | State;
|
|
734
|
-
currentErrand?: Errand;
|
|
735
|
-
lastDeliveredErrand?: Errand;
|
|
736
734
|
};
|
|
737
735
|
type RiderWithUserDetails = Rider & {
|
|
738
736
|
userDetails?: User;
|
|
739
737
|
vehicleDetails?: Vehicle | null;
|
|
740
738
|
businessMemberDetails?: BusinessMember;
|
|
739
|
+
/**
|
|
740
|
+
* What the rider owes us: the sum of their pending (unremitted) settlements,
|
|
741
|
+
* scoped to the rider's own business. Same figure as the rider register's
|
|
742
|
+
* `cashOwed`.
|
|
743
|
+
*/
|
|
744
|
+
cashOwed?: number;
|
|
745
|
+
/** How many pending settlements make up `cashOwed`. */
|
|
746
|
+
unremittedSettlements?: number;
|
|
747
|
+
/** When the oldest of those settlements was raised — null when none are. */
|
|
748
|
+
oldestUnremittedAt?: Date | null;
|
|
741
749
|
};
|
|
742
750
|
declare enum RemittanceStatus {
|
|
743
751
|
Pending = "pending",
|
|
@@ -904,7 +912,6 @@ interface PendingErrand {
|
|
|
904
912
|
_id: string;
|
|
905
913
|
rider: string;
|
|
906
914
|
customerId: string;
|
|
907
|
-
parcelSize: ParcelSize;
|
|
908
915
|
deliveryStatus: ErrandStatus;
|
|
909
916
|
invoice: {
|
|
910
917
|
invoiceStatus: string;
|
|
@@ -978,7 +985,6 @@ interface Errand {
|
|
|
978
985
|
courierBusinessId?: string;
|
|
979
986
|
pickupDetails: AddressDetails;
|
|
980
987
|
deliveryDetails: AddressDetails;
|
|
981
|
-
parcelSize: `${ParcelSize}`;
|
|
982
988
|
deliveryStatus: ErrandStatus | `${ErrandStatus}`;
|
|
983
989
|
paymentStatus: `${InvoiceStatus}`;
|
|
984
990
|
invoiceId?: string;
|
|
@@ -1034,7 +1040,6 @@ interface Errand {
|
|
|
1034
1040
|
feePaymentStatus?: `${FeePaymentStatus}`;
|
|
1035
1041
|
}
|
|
1036
1042
|
interface AggregatedErrand extends Errand {
|
|
1037
|
-
parcelSize: `${ParcelSize}`;
|
|
1038
1043
|
invoiceDetails: Invoice;
|
|
1039
1044
|
pickupLocation: {
|
|
1040
1045
|
cityId: string;
|
|
@@ -1075,12 +1080,6 @@ declare enum DeliveryStatus {
|
|
|
1075
1080
|
Delivered = "delivered",
|
|
1076
1081
|
Cancelled = "cancelled"
|
|
1077
1082
|
}
|
|
1078
|
-
declare enum ParcelSize {
|
|
1079
|
-
Bike = "bike",
|
|
1080
|
-
Large = "large",
|
|
1081
|
-
Medium = "medium",
|
|
1082
|
-
Small = "small"
|
|
1083
|
-
}
|
|
1084
1083
|
interface ErrandTimeline {
|
|
1085
1084
|
id: string;
|
|
1086
1085
|
errandId: string;
|
|
@@ -1150,7 +1149,6 @@ interface DraftErrand {
|
|
|
1150
1149
|
pickupDetails?: AddressDetails;
|
|
1151
1150
|
deliveryDetails?: AddressDetails;
|
|
1152
1151
|
additionalData?: string;
|
|
1153
|
-
parcelSize?: `${ParcelSize}`;
|
|
1154
1152
|
status: DraftErrandStatus;
|
|
1155
1153
|
convertedErrandId?: string;
|
|
1156
1154
|
settlementId?: string;
|
|
@@ -1725,4 +1723,4 @@ declare enum LinkDestination {
|
|
|
1725
1723
|
}
|
|
1726
1724
|
type NullOrUndefined = null | undefined;
|
|
1727
1725
|
|
|
1728
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessMember, type BusinessModules, type BusinessPg, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, 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 OpeningHours, type PaginateResult,
|
|
1726
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessMember, type BusinessModules, type BusinessPg, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, 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 OpeningHours, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -731,13 +731,21 @@ type Rider = {
|
|
|
731
731
|
hasBeenRated: boolean;
|
|
732
732
|
payoutPercentage?: number | null;
|
|
733
733
|
state?: string | State;
|
|
734
|
-
currentErrand?: Errand;
|
|
735
|
-
lastDeliveredErrand?: Errand;
|
|
736
734
|
};
|
|
737
735
|
type RiderWithUserDetails = Rider & {
|
|
738
736
|
userDetails?: User;
|
|
739
737
|
vehicleDetails?: Vehicle | null;
|
|
740
738
|
businessMemberDetails?: BusinessMember;
|
|
739
|
+
/**
|
|
740
|
+
* What the rider owes us: the sum of their pending (unremitted) settlements,
|
|
741
|
+
* scoped to the rider's own business. Same figure as the rider register's
|
|
742
|
+
* `cashOwed`.
|
|
743
|
+
*/
|
|
744
|
+
cashOwed?: number;
|
|
745
|
+
/** How many pending settlements make up `cashOwed`. */
|
|
746
|
+
unremittedSettlements?: number;
|
|
747
|
+
/** When the oldest of those settlements was raised — null when none are. */
|
|
748
|
+
oldestUnremittedAt?: Date | null;
|
|
741
749
|
};
|
|
742
750
|
declare enum RemittanceStatus {
|
|
743
751
|
Pending = "pending",
|
|
@@ -904,7 +912,6 @@ interface PendingErrand {
|
|
|
904
912
|
_id: string;
|
|
905
913
|
rider: string;
|
|
906
914
|
customerId: string;
|
|
907
|
-
parcelSize: ParcelSize;
|
|
908
915
|
deliveryStatus: ErrandStatus;
|
|
909
916
|
invoice: {
|
|
910
917
|
invoiceStatus: string;
|
|
@@ -978,7 +985,6 @@ interface Errand {
|
|
|
978
985
|
courierBusinessId?: string;
|
|
979
986
|
pickupDetails: AddressDetails;
|
|
980
987
|
deliveryDetails: AddressDetails;
|
|
981
|
-
parcelSize: `${ParcelSize}`;
|
|
982
988
|
deliveryStatus: ErrandStatus | `${ErrandStatus}`;
|
|
983
989
|
paymentStatus: `${InvoiceStatus}`;
|
|
984
990
|
invoiceId?: string;
|
|
@@ -1034,7 +1040,6 @@ interface Errand {
|
|
|
1034
1040
|
feePaymentStatus?: `${FeePaymentStatus}`;
|
|
1035
1041
|
}
|
|
1036
1042
|
interface AggregatedErrand extends Errand {
|
|
1037
|
-
parcelSize: `${ParcelSize}`;
|
|
1038
1043
|
invoiceDetails: Invoice;
|
|
1039
1044
|
pickupLocation: {
|
|
1040
1045
|
cityId: string;
|
|
@@ -1075,12 +1080,6 @@ declare enum DeliveryStatus {
|
|
|
1075
1080
|
Delivered = "delivered",
|
|
1076
1081
|
Cancelled = "cancelled"
|
|
1077
1082
|
}
|
|
1078
|
-
declare enum ParcelSize {
|
|
1079
|
-
Bike = "bike",
|
|
1080
|
-
Large = "large",
|
|
1081
|
-
Medium = "medium",
|
|
1082
|
-
Small = "small"
|
|
1083
|
-
}
|
|
1084
1083
|
interface ErrandTimeline {
|
|
1085
1084
|
id: string;
|
|
1086
1085
|
errandId: string;
|
|
@@ -1150,7 +1149,6 @@ interface DraftErrand {
|
|
|
1150
1149
|
pickupDetails?: AddressDetails;
|
|
1151
1150
|
deliveryDetails?: AddressDetails;
|
|
1152
1151
|
additionalData?: string;
|
|
1153
|
-
parcelSize?: `${ParcelSize}`;
|
|
1154
1152
|
status: DraftErrandStatus;
|
|
1155
1153
|
convertedErrandId?: string;
|
|
1156
1154
|
settlementId?: string;
|
|
@@ -1725,4 +1723,4 @@ declare enum LinkDestination {
|
|
|
1725
1723
|
}
|
|
1726
1724
|
type NullOrUndefined = null | undefined;
|
|
1727
1725
|
|
|
1728
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessMember, type BusinessModules, type BusinessPg, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, 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 OpeningHours, type PaginateResult,
|
|
1726
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessMember, type BusinessModules, type BusinessPg, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, 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 OpeningHours, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
package/dist/index.js
CHANGED
|
@@ -96,13 +96,6 @@ var DeliveryStatus = /* @__PURE__ */ ((DeliveryStatus2) => {
|
|
|
96
96
|
DeliveryStatus2["Cancelled"] = "cancelled";
|
|
97
97
|
return DeliveryStatus2;
|
|
98
98
|
})(DeliveryStatus || {});
|
|
99
|
-
var ParcelSize = /* @__PURE__ */ ((ParcelSize2) => {
|
|
100
|
-
ParcelSize2["Bike"] = "bike";
|
|
101
|
-
ParcelSize2["Large"] = "large";
|
|
102
|
-
ParcelSize2["Medium"] = "medium";
|
|
103
|
-
ParcelSize2["Small"] = "small";
|
|
104
|
-
return ParcelSize2;
|
|
105
|
-
})(ParcelSize || {});
|
|
106
99
|
var DraftErrandStatus = /* @__PURE__ */ ((DraftErrandStatus2) => {
|
|
107
100
|
DraftErrandStatus2["Draft"] = "draft";
|
|
108
101
|
DraftErrandStatus2["RiderCompleted"] = "rider_completed";
|
|
@@ -385,7 +378,6 @@ export {
|
|
|
385
378
|
LinkDestination,
|
|
386
379
|
MembershipStatus,
|
|
387
380
|
NotificationType,
|
|
388
|
-
ParcelSize,
|
|
389
381
|
PaymentOptions,
|
|
390
382
|
PayoutPeriodType,
|
|
391
383
|
PayoutRateSource,
|
package/package.json
CHANGED
package/src/delivery.ts
CHANGED
package/src/errand.ts
CHANGED
|
@@ -62,7 +62,6 @@ export interface PendingErrand {
|
|
|
62
62
|
_id: string;
|
|
63
63
|
rider: string;
|
|
64
64
|
customerId: string;
|
|
65
|
-
parcelSize: ParcelSize;
|
|
66
65
|
deliveryStatus: ErrandStatus;
|
|
67
66
|
invoice: {
|
|
68
67
|
invoiceStatus: string;
|
|
@@ -169,7 +168,6 @@ export interface Errand {
|
|
|
169
168
|
|
|
170
169
|
pickupDetails: AddressDetails;
|
|
171
170
|
deliveryDetails: AddressDetails;
|
|
172
|
-
parcelSize: `${ParcelSize}`;
|
|
173
171
|
deliveryStatus: ErrandStatus | `${ErrandStatus}`;
|
|
174
172
|
paymentStatus: `${InvoiceStatus}`;
|
|
175
173
|
invoiceId?: string;
|
|
@@ -241,7 +239,6 @@ export interface Errand {
|
|
|
241
239
|
}
|
|
242
240
|
|
|
243
241
|
export interface AggregatedErrand extends Errand {
|
|
244
|
-
parcelSize: `${ParcelSize}`;
|
|
245
242
|
invoiceDetails: Invoice;
|
|
246
243
|
pickupLocation: {
|
|
247
244
|
cityId: string;
|
|
@@ -301,13 +298,6 @@ export enum DeliveryStatus {
|
|
|
301
298
|
Cancelled = 'cancelled',
|
|
302
299
|
}
|
|
303
300
|
|
|
304
|
-
export enum ParcelSize {
|
|
305
|
-
Bike = 'bike',
|
|
306
|
-
Large = 'large',
|
|
307
|
-
Medium = 'medium',
|
|
308
|
-
Small = 'small',
|
|
309
|
-
}
|
|
310
|
-
|
|
311
301
|
export interface ErrandTimeline {
|
|
312
302
|
id: string;
|
|
313
303
|
errandId: string;
|
|
@@ -371,7 +361,6 @@ export interface DraftErrand {
|
|
|
371
361
|
pickupDetails?: AddressDetails;
|
|
372
362
|
deliveryDetails?: AddressDetails;
|
|
373
363
|
additionalData?: string;
|
|
374
|
-
parcelSize?: `${ParcelSize}`;
|
|
375
364
|
|
|
376
365
|
// Lifecycle
|
|
377
366
|
status: DraftErrandStatus;
|
package/src/rider.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// import { Enterprise } from './enterprise';
|
|
2
2
|
import { BusinessMember } from './business';
|
|
3
|
-
import { Errand } from './errand';
|
|
4
3
|
import { State } from './location';
|
|
5
4
|
import { User } from './user';
|
|
6
5
|
import type { Vehicle } from './vehicle';
|
|
@@ -48,14 +47,23 @@ export type Rider = {
|
|
|
48
47
|
// isTracking: boolean;
|
|
49
48
|
|
|
50
49
|
state?: string | State;
|
|
51
|
-
currentErrand?: Errand;
|
|
52
|
-
lastDeliveredErrand?: Errand;
|
|
53
50
|
};
|
|
54
51
|
|
|
55
52
|
export type RiderWithUserDetails = Rider & {
|
|
56
53
|
userDetails?: User;
|
|
57
54
|
vehicleDetails?: Vehicle | null;
|
|
58
55
|
businessMemberDetails?: BusinessMember;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* What the rider owes us: the sum of their pending (unremitted) settlements,
|
|
59
|
+
* scoped to the rider's own business. Same figure as the rider register's
|
|
60
|
+
* `cashOwed`.
|
|
61
|
+
*/
|
|
62
|
+
cashOwed?: number;
|
|
63
|
+
/** How many pending settlements make up `cashOwed`. */
|
|
64
|
+
unremittedSettlements?: number;
|
|
65
|
+
/** When the oldest of those settlements was raised — null when none are. */
|
|
66
|
+
oldestUnremittedAt?: Date | null;
|
|
59
67
|
};
|
|
60
68
|
|
|
61
69
|
// Rider Settlement Types
|