@mydoormot/app-types 1.8.0 → 1.8.1

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.42 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.8.0 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
+ DTS Build start
11
12
  ESM dist/index.js 11.40 KB
12
- ESM ⚡️ Build success in 56ms
13
+ ESM ⚡️ Build success in 313ms
13
14
  CJS dist/index.cjs 13.82 KB
14
- CJS ⚡️ Build success in 56ms
15
- DTS Build start
16
- DTS ⚡️ Build success in 669ms
17
- DTS dist/index.d.ts 34.23 KB
18
- DTS dist/index.d.cts 34.23 KB
15
+ CJS ⚡️ Build success in 313ms
16
+ DTS ⚡️ Build success in 791ms
17
+ DTS dist/index.d.ts 35.07 KB
18
+ DTS dist/index.d.cts 35.07 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added customer addresses
8
+
3
9
  ## 1.8.0
4
10
 
5
11
  ### Minor Changes
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;
@@ -1098,6 +1116,13 @@ interface MaintenanceItem {
1098
1116
  unit?: string;
1099
1117
  defaultUnitPrice?: number;
1100
1118
  isActive: boolean;
1119
+ /**
1120
+ * `maintenanceDate` of the most recent record that used this item.
1121
+ * Undefined until first use, and always undefined on global items
1122
+ * (`businessId: null`) — a shared item's "last used by anyone" is not a
1123
+ * fact any single business can act on.
1124
+ */
1125
+ lastUsedAt?: string;
1101
1126
  createdAt: string;
1102
1127
  updatedAt: string;
1103
1128
  }
@@ -1275,4 +1300,4 @@ declare enum LinkDestination {
1275
1300
  }
1276
1301
  type NullOrUndefined = null | undefined;
1277
1302
 
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 };
1303
+ 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;
@@ -1098,6 +1116,13 @@ interface MaintenanceItem {
1098
1116
  unit?: string;
1099
1117
  defaultUnitPrice?: number;
1100
1118
  isActive: boolean;
1119
+ /**
1120
+ * `maintenanceDate` of the most recent record that used this item.
1121
+ * Undefined until first use, and always undefined on global items
1122
+ * (`businessId: null`) — a shared item's "last used by anyone" is not a
1123
+ * fact any single business can act on.
1124
+ */
1125
+ lastUsedAt?: string;
1101
1126
  createdAt: string;
1102
1127
  updatedAt: string;
1103
1128
  }
@@ -1275,4 +1300,4 @@ declare enum LinkDestination {
1275
1300
  }
1276
1301
  type NullOrUndefined = null | undefined;
1277
1302
 
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 };
1303
+ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
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
 
@@ -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
  }