@mydoormot/app-types 1.8.0 → 1.8.2
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 +6 -6
- package/CHANGELOG.md +12 -0
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/package.json +1 -1
- package/src/customer.ts +19 -0
- package/src/maintenance.ts +7 -0
- package/src/vehicle.ts +6 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.
|
|
2
|
+
> @mydoormot/app-types@1.8.1 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 @@ CLI Target: es2021
|
|
|
9
9
|
ESM Build start
|
|
10
10
|
CJS Build start
|
|
11
11
|
ESM dist/index.js 11.40 KB
|
|
12
|
-
ESM ⚡️ Build success in
|
|
12
|
+
ESM ⚡️ Build success in 87ms
|
|
13
13
|
CJS dist/index.cjs 13.82 KB
|
|
14
|
-
CJS ⚡️ Build success in
|
|
14
|
+
CJS ⚡️ Build success in 88ms
|
|
15
15
|
DTS Build start
|
|
16
|
-
DTS ⚡️ Build success in
|
|
17
|
-
DTS dist/index.d.ts 34
|
|
18
|
-
DTS dist/index.d.cts 34
|
|
16
|
+
DTS ⚡️ Build success in 904ms
|
|
17
|
+
DTS dist/index.d.ts 35.34 KB
|
|
18
|
+
DTS dist/index.d.cts 35.34 KB
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -101,14 +101,32 @@ interface CustomerTransactionStats {
|
|
|
101
101
|
lastTransactionDate: string | null;
|
|
102
102
|
updatedAt: string;
|
|
103
103
|
}
|
|
104
|
+
interface CustomerAddress {
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
address: string;
|
|
108
|
+
landmark?: string;
|
|
109
|
+
cityId?: string;
|
|
110
|
+
location?: {
|
|
111
|
+
type: 'Point';
|
|
112
|
+
coordinates: number[];
|
|
113
|
+
};
|
|
114
|
+
isDefault: boolean;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
}
|
|
104
118
|
interface Customer {
|
|
105
119
|
id: string;
|
|
106
120
|
businessId: string;
|
|
107
121
|
phoneNumber: string;
|
|
108
122
|
fullName: string;
|
|
109
123
|
cityId: string;
|
|
124
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
110
125
|
address: string;
|
|
126
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
111
127
|
landmark?: string;
|
|
128
|
+
/** Absent on customers created before the address-book backfill. */
|
|
129
|
+
addresses?: CustomerAddress[];
|
|
112
130
|
createdAt: string;
|
|
113
131
|
updatedAt: string;
|
|
114
132
|
customerBusinessId?: string;
|
|
@@ -386,6 +404,12 @@ type VehicleLog = {
|
|
|
386
404
|
type VehicleLogWithErrands = VehicleLog & {
|
|
387
405
|
errandsCount?: number;
|
|
388
406
|
totalErrandsRevenue?: number;
|
|
407
|
+
/**
|
|
408
|
+
* Only the most recent fuel log for a vehicle is deletable — false when a
|
|
409
|
+
* newer log exists. Use it to enable/disable the delete affordance, but still
|
|
410
|
+
* handle a 400 from the delete endpoint: a newer log may land in between.
|
|
411
|
+
*/
|
|
412
|
+
canDelete?: boolean;
|
|
389
413
|
};
|
|
390
414
|
interface VehicleErrandStats {
|
|
391
415
|
count: number;
|
|
@@ -1098,6 +1122,13 @@ interface MaintenanceItem {
|
|
|
1098
1122
|
unit?: string;
|
|
1099
1123
|
defaultUnitPrice?: number;
|
|
1100
1124
|
isActive: boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* `maintenanceDate` of the most recent record that used this item.
|
|
1127
|
+
* Undefined until first use, and always undefined on global items
|
|
1128
|
+
* (`businessId: null`) — a shared item's "last used by anyone" is not a
|
|
1129
|
+
* fact any single business can act on.
|
|
1130
|
+
*/
|
|
1131
|
+
lastUsedAt?: string;
|
|
1101
1132
|
createdAt: string;
|
|
1102
1133
|
updatedAt: string;
|
|
1103
1134
|
}
|
|
@@ -1275,4 +1306,4 @@ declare enum LinkDestination {
|
|
|
1275
1306
|
}
|
|
1276
1307
|
type NullOrUndefined = null | undefined;
|
|
1277
1308
|
|
|
1278
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessMember, type BusinessModules, type BusinessPg, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerTransactionStats, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type GeoPoint, 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 OpeningHours, 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, type State, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, 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 };
|
|
1309
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessMember, type BusinessModules, type BusinessPg, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerTransactionStats, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type GeoPoint, 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 OpeningHours, 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, type State, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, 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
|
@@ -101,14 +101,32 @@ interface CustomerTransactionStats {
|
|
|
101
101
|
lastTransactionDate: string | null;
|
|
102
102
|
updatedAt: string;
|
|
103
103
|
}
|
|
104
|
+
interface CustomerAddress {
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
address: string;
|
|
108
|
+
landmark?: string;
|
|
109
|
+
cityId?: string;
|
|
110
|
+
location?: {
|
|
111
|
+
type: 'Point';
|
|
112
|
+
coordinates: number[];
|
|
113
|
+
};
|
|
114
|
+
isDefault: boolean;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
}
|
|
104
118
|
interface Customer {
|
|
105
119
|
id: string;
|
|
106
120
|
businessId: string;
|
|
107
121
|
phoneNumber: string;
|
|
108
122
|
fullName: string;
|
|
109
123
|
cityId: string;
|
|
124
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
110
125
|
address: string;
|
|
126
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
111
127
|
landmark?: string;
|
|
128
|
+
/** Absent on customers created before the address-book backfill. */
|
|
129
|
+
addresses?: CustomerAddress[];
|
|
112
130
|
createdAt: string;
|
|
113
131
|
updatedAt: string;
|
|
114
132
|
customerBusinessId?: string;
|
|
@@ -386,6 +404,12 @@ type VehicleLog = {
|
|
|
386
404
|
type VehicleLogWithErrands = VehicleLog & {
|
|
387
405
|
errandsCount?: number;
|
|
388
406
|
totalErrandsRevenue?: number;
|
|
407
|
+
/**
|
|
408
|
+
* Only the most recent fuel log for a vehicle is deletable — false when a
|
|
409
|
+
* newer log exists. Use it to enable/disable the delete affordance, but still
|
|
410
|
+
* handle a 400 from the delete endpoint: a newer log may land in between.
|
|
411
|
+
*/
|
|
412
|
+
canDelete?: boolean;
|
|
389
413
|
};
|
|
390
414
|
interface VehicleErrandStats {
|
|
391
415
|
count: number;
|
|
@@ -1098,6 +1122,13 @@ interface MaintenanceItem {
|
|
|
1098
1122
|
unit?: string;
|
|
1099
1123
|
defaultUnitPrice?: number;
|
|
1100
1124
|
isActive: boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* `maintenanceDate` of the most recent record that used this item.
|
|
1127
|
+
* Undefined until first use, and always undefined on global items
|
|
1128
|
+
* (`businessId: null`) — a shared item's "last used by anyone" is not a
|
|
1129
|
+
* fact any single business can act on.
|
|
1130
|
+
*/
|
|
1131
|
+
lastUsedAt?: string;
|
|
1101
1132
|
createdAt: string;
|
|
1102
1133
|
updatedAt: string;
|
|
1103
1134
|
}
|
|
@@ -1275,4 +1306,4 @@ declare enum LinkDestination {
|
|
|
1275
1306
|
}
|
|
1276
1307
|
type NullOrUndefined = null | undefined;
|
|
1277
1308
|
|
|
1278
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessMember, type BusinessModules, type BusinessPg, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerTransactionStats, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type GeoPoint, 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 OpeningHours, 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, type State, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, 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 };
|
|
1309
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessMember, type BusinessModules, type BusinessPg, BusinessRole, type BusinessSettings, BusinessStatus, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerTransactionStats, DEFAULT_BUSINESS_MODULES, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type GeoPoint, 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 OpeningHours, 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, type State, type TrackerPosition, type Transaction, type TransactionCategory, type TransactionItem, 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/package.json
CHANGED
package/src/customer.ts
CHANGED
|
@@ -9,14 +9,33 @@ export interface CustomerTransactionStats {
|
|
|
9
9
|
updatedAt: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface CustomerAddress {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
address: string;
|
|
16
|
+
landmark?: string;
|
|
17
|
+
cityId?: string;
|
|
18
|
+
location?: {
|
|
19
|
+
type: 'Point';
|
|
20
|
+
coordinates: number[];
|
|
21
|
+
};
|
|
22
|
+
isDefault: boolean;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
12
27
|
export interface Customer {
|
|
13
28
|
id: string;
|
|
14
29
|
businessId: string;
|
|
15
30
|
phoneNumber: string;
|
|
16
31
|
fullName: string;
|
|
17
32
|
cityId: string;
|
|
33
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
18
34
|
address: string;
|
|
35
|
+
/** @deprecated Mirrored from the default entry in `addresses`. */
|
|
19
36
|
landmark?: string;
|
|
37
|
+
/** Absent on customers created before the address-book backfill. */
|
|
38
|
+
addresses?: CustomerAddress[];
|
|
20
39
|
createdAt: string;
|
|
21
40
|
updatedAt: string;
|
|
22
41
|
|
package/src/maintenance.ts
CHANGED
|
@@ -10,6 +10,13 @@ export interface MaintenanceItem {
|
|
|
10
10
|
unit?: string; // "piece", "liter", etc.
|
|
11
11
|
defaultUnitPrice?: number;
|
|
12
12
|
isActive: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* `maintenanceDate` of the most recent record that used this item.
|
|
15
|
+
* Undefined until first use, and always undefined on global items
|
|
16
|
+
* (`businessId: null`) — a shared item's "last used by anyone" is not a
|
|
17
|
+
* fact any single business can act on.
|
|
18
|
+
*/
|
|
19
|
+
lastUsedAt?: string;
|
|
13
20
|
createdAt: string;
|
|
14
21
|
updatedAt: string;
|
|
15
22
|
}
|
package/src/vehicle.ts
CHANGED
|
@@ -81,6 +81,12 @@ export type VehicleLog = {
|
|
|
81
81
|
export type VehicleLogWithErrands = VehicleLog & {
|
|
82
82
|
errandsCount?: number;
|
|
83
83
|
totalErrandsRevenue?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Only the most recent fuel log for a vehicle is deletable — false when a
|
|
86
|
+
* newer log exists. Use it to enable/disable the delete affordance, but still
|
|
87
|
+
* handle a 400 from the delete endpoint: a newer log may land in between.
|
|
88
|
+
*/
|
|
89
|
+
canDelete?: boolean;
|
|
84
90
|
};
|
|
85
91
|
|
|
86
92
|
// Vehicle Performance Types
|