@mydoormot/app-types 1.7.15 → 1.7.16

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.14 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.7.15 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 @@
8
8
  CLI Target: es2021
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.js 6.17 KB
12
- ESM ⚡️ Build success in 136ms
13
11
  CJS dist/index.cjs 7.84 KB
14
- CJS ⚡️ Build success in 137ms
12
+ CJS ⚡️ Build success in 61ms
13
+ ESM dist/index.js 6.17 KB
14
+ ESM ⚡️ Build success in 61ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1414ms
17
- DTS dist/index.d.ts 18.13 KB
18
- DTS dist/index.d.cts 18.13 KB
16
+ DTS ⚡️ Build success in 686ms
17
+ DTS dist/index.d.ts 17.71 KB
18
+ DTS dist/index.d.cts 17.71 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified invoice stypes
8
+
3
9
  ## 1.7.15
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -107,59 +107,26 @@ interface Coupon {
107
107
  fullName?: string;
108
108
  }
109
109
 
110
- declare enum EnterpriseType {
111
- Restaurant = "restaurant",
112
- Dispatch = "dispatch",
113
- Property = "property",
114
- Store = "store"
115
- }
116
- type Enterprise = {
117
- id: string;
118
- user: string | User;
119
- name: string;
120
- city: string;
121
- verified: boolean;
122
- mobileNumber?: string;
123
- enterpriseType: EnterpriseType | `${EnterpriseType}`;
124
- deleted: boolean;
125
- updatedAt: Date;
126
- createdAt: Date;
127
- isActive: boolean;
128
- version: number;
129
- officeNumber?: string;
130
- address?: {
131
- coordinates?: number[];
132
- address?: string;
133
- };
134
- image?: string;
135
- coverImage?: string;
136
- activationDate?: string;
137
- category: EnterpriseCategoryDoc[] | string[];
138
- subCategory: EnterpriseSubCategoryDoc[] | string[];
139
- socialLinks: {
140
- name: string;
141
- url: string;
142
- active: boolean;
143
- }[];
144
- };
145
- interface EnterpriseCategoryDoc {
146
- id: string;
147
- name: string;
148
- slug: string;
149
- subCategories: EnterpriseSubCategoryDoc[];
110
+ interface CustomerTransactionStats {
111
+ totalSaleCount: number;
112
+ totalSaleAmount: number;
113
+ totalExpenseCount: number;
114
+ totalExpenseAmount: number;
115
+ lastTransactionDate: string | null;
150
116
  updatedAt: string;
151
- createdAt: string;
152
- image?: string;
153
117
  }
154
- interface EnterpriseSubCategoryDoc {
118
+ interface Customer {
155
119
  id: string;
156
- name: string;
157
- category: string;
158
- slug: string;
159
- image?: string;
160
- serviceItems: string[];
161
- updatedAt: string;
120
+ businessId: string;
121
+ phoneNumber: string;
122
+ fullName: string;
123
+ cityId: string;
124
+ address: string;
125
+ landmark?: string;
162
126
  createdAt: string;
127
+ updatedAt: string;
128
+ customerBusinessId?: string;
129
+ transactionStats?: CustomerTransactionStats;
163
130
  }
164
131
 
165
132
  declare enum InvoiceStatus {
@@ -183,26 +150,20 @@ declare enum PaymentOptions {
183
150
  }
184
151
  interface Invoice {
185
152
  id: string;
186
- user: string;
187
- invoiceType: EnterpriseType | `${EnterpriseType}`;
188
- amount: number;
189
- paymentType: PaymentOptions | `${PaymentOptions}`;
153
+ businessId: string;
154
+ userId: string;
155
+ invoiceNumber: string;
156
+ startDate: string;
157
+ endDate: string;
158
+ totalAmount: number;
159
+ paidAmount: number;
160
+ unpaidAmount: number;
190
161
  status: InvoiceStatus | `${InvoiceStatus}`;
191
- version: number;
192
- referenceId?: string;
193
- errandId?: string;
194
- authorizationUrl?: string;
195
- accessCode?: string;
196
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
197
- startDate?: string;
198
- endDate?: string;
199
- dueDate?: string;
200
- invoiceNumber?: string;
201
- isErrandsPaid?: boolean;
162
+ customerId: string;
202
163
  items: InvoiceItem[];
203
- businessId?: string;
204
164
  createdAt: string;
205
165
  updatedAt: string;
166
+ customerDetails?: Customer;
206
167
  }
207
168
  interface InvoiceItem {
208
169
  id: string;
@@ -360,13 +321,7 @@ interface Errand {
360
321
  parcelSize: `${ParcelSize}`;
361
322
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
362
323
  paymentStatus: `${InvoiceStatus}`;
363
- invoice: {
364
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
365
- refId: string;
366
- authorizationUrl: string;
367
- accessCode: string;
368
- invoiceId?: string | Invoice;
369
- };
324
+ invoiceId?: string;
370
325
  aliasId: string;
371
326
  updatedAt: Date;
372
327
  createdAt: Date;
@@ -538,6 +493,61 @@ type Notification = {
538
493
  updatedAt: string;
539
494
  };
540
495
 
496
+ declare enum EnterpriseType {
497
+ Restaurant = "restaurant",
498
+ Dispatch = "dispatch",
499
+ Property = "property",
500
+ Store = "store"
501
+ }
502
+ type Enterprise = {
503
+ id: string;
504
+ user: string | User;
505
+ name: string;
506
+ city: string;
507
+ verified: boolean;
508
+ mobileNumber?: string;
509
+ enterpriseType: EnterpriseType | `${EnterpriseType}`;
510
+ deleted: boolean;
511
+ updatedAt: Date;
512
+ createdAt: Date;
513
+ isActive: boolean;
514
+ version: number;
515
+ officeNumber?: string;
516
+ address?: {
517
+ coordinates?: number[];
518
+ address?: string;
519
+ };
520
+ image?: string;
521
+ coverImage?: string;
522
+ activationDate?: string;
523
+ category: EnterpriseCategoryDoc[] | string[];
524
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
525
+ socialLinks: {
526
+ name: string;
527
+ url: string;
528
+ active: boolean;
529
+ }[];
530
+ };
531
+ interface EnterpriseCategoryDoc {
532
+ id: string;
533
+ name: string;
534
+ slug: string;
535
+ subCategories: EnterpriseSubCategoryDoc[];
536
+ updatedAt: string;
537
+ createdAt: string;
538
+ image?: string;
539
+ }
540
+ interface EnterpriseSubCategoryDoc {
541
+ id: string;
542
+ name: string;
543
+ category: string;
544
+ slug: string;
545
+ image?: string;
546
+ serviceItems: string[];
547
+ updatedAt: string;
548
+ createdAt: string;
549
+ }
550
+
541
551
  interface Business {
542
552
  id: string;
543
553
  userId: string;
@@ -613,28 +623,6 @@ interface BusinessMember {
613
623
  updatedAt: string | NullOrUndefined;
614
624
  }
615
625
 
616
- interface CustomerTransactionStats {
617
- totalSaleCount: number;
618
- totalSaleAmount: number;
619
- totalExpenseCount: number;
620
- totalExpenseAmount: number;
621
- lastTransactionDate: string | null;
622
- updatedAt: string;
623
- }
624
- interface Customer {
625
- id: string;
626
- businessId: string;
627
- phoneNumber: string;
628
- fullName: string;
629
- cityId: string;
630
- address: string;
631
- landmark?: string;
632
- createdAt: string;
633
- updatedAt: string;
634
- customerBusinessId?: string;
635
- transactionStats?: CustomerTransactionStats;
636
- }
637
-
638
626
  type TransactionType = 'sale' | 'expense';
639
627
  interface TransactionItem {
640
628
  name: string;
package/dist/index.d.ts CHANGED
@@ -107,59 +107,26 @@ interface Coupon {
107
107
  fullName?: string;
108
108
  }
109
109
 
110
- declare enum EnterpriseType {
111
- Restaurant = "restaurant",
112
- Dispatch = "dispatch",
113
- Property = "property",
114
- Store = "store"
115
- }
116
- type Enterprise = {
117
- id: string;
118
- user: string | User;
119
- name: string;
120
- city: string;
121
- verified: boolean;
122
- mobileNumber?: string;
123
- enterpriseType: EnterpriseType | `${EnterpriseType}`;
124
- deleted: boolean;
125
- updatedAt: Date;
126
- createdAt: Date;
127
- isActive: boolean;
128
- version: number;
129
- officeNumber?: string;
130
- address?: {
131
- coordinates?: number[];
132
- address?: string;
133
- };
134
- image?: string;
135
- coverImage?: string;
136
- activationDate?: string;
137
- category: EnterpriseCategoryDoc[] | string[];
138
- subCategory: EnterpriseSubCategoryDoc[] | string[];
139
- socialLinks: {
140
- name: string;
141
- url: string;
142
- active: boolean;
143
- }[];
144
- };
145
- interface EnterpriseCategoryDoc {
146
- id: string;
147
- name: string;
148
- slug: string;
149
- subCategories: EnterpriseSubCategoryDoc[];
110
+ interface CustomerTransactionStats {
111
+ totalSaleCount: number;
112
+ totalSaleAmount: number;
113
+ totalExpenseCount: number;
114
+ totalExpenseAmount: number;
115
+ lastTransactionDate: string | null;
150
116
  updatedAt: string;
151
- createdAt: string;
152
- image?: string;
153
117
  }
154
- interface EnterpriseSubCategoryDoc {
118
+ interface Customer {
155
119
  id: string;
156
- name: string;
157
- category: string;
158
- slug: string;
159
- image?: string;
160
- serviceItems: string[];
161
- updatedAt: string;
120
+ businessId: string;
121
+ phoneNumber: string;
122
+ fullName: string;
123
+ cityId: string;
124
+ address: string;
125
+ landmark?: string;
162
126
  createdAt: string;
127
+ updatedAt: string;
128
+ customerBusinessId?: string;
129
+ transactionStats?: CustomerTransactionStats;
163
130
  }
164
131
 
165
132
  declare enum InvoiceStatus {
@@ -183,26 +150,20 @@ declare enum PaymentOptions {
183
150
  }
184
151
  interface Invoice {
185
152
  id: string;
186
- user: string;
187
- invoiceType: EnterpriseType | `${EnterpriseType}`;
188
- amount: number;
189
- paymentType: PaymentOptions | `${PaymentOptions}`;
153
+ businessId: string;
154
+ userId: string;
155
+ invoiceNumber: string;
156
+ startDate: string;
157
+ endDate: string;
158
+ totalAmount: number;
159
+ paidAmount: number;
160
+ unpaidAmount: number;
190
161
  status: InvoiceStatus | `${InvoiceStatus}`;
191
- version: number;
192
- referenceId?: string;
193
- errandId?: string;
194
- authorizationUrl?: string;
195
- accessCode?: string;
196
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
197
- startDate?: string;
198
- endDate?: string;
199
- dueDate?: string;
200
- invoiceNumber?: string;
201
- isErrandsPaid?: boolean;
162
+ customerId: string;
202
163
  items: InvoiceItem[];
203
- businessId?: string;
204
164
  createdAt: string;
205
165
  updatedAt: string;
166
+ customerDetails?: Customer;
206
167
  }
207
168
  interface InvoiceItem {
208
169
  id: string;
@@ -360,13 +321,7 @@ interface Errand {
360
321
  parcelSize: `${ParcelSize}`;
361
322
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
362
323
  paymentStatus: `${InvoiceStatus}`;
363
- invoice: {
364
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
365
- refId: string;
366
- authorizationUrl: string;
367
- accessCode: string;
368
- invoiceId?: string | Invoice;
369
- };
324
+ invoiceId?: string;
370
325
  aliasId: string;
371
326
  updatedAt: Date;
372
327
  createdAt: Date;
@@ -538,6 +493,61 @@ type Notification = {
538
493
  updatedAt: string;
539
494
  };
540
495
 
496
+ declare enum EnterpriseType {
497
+ Restaurant = "restaurant",
498
+ Dispatch = "dispatch",
499
+ Property = "property",
500
+ Store = "store"
501
+ }
502
+ type Enterprise = {
503
+ id: string;
504
+ user: string | User;
505
+ name: string;
506
+ city: string;
507
+ verified: boolean;
508
+ mobileNumber?: string;
509
+ enterpriseType: EnterpriseType | `${EnterpriseType}`;
510
+ deleted: boolean;
511
+ updatedAt: Date;
512
+ createdAt: Date;
513
+ isActive: boolean;
514
+ version: number;
515
+ officeNumber?: string;
516
+ address?: {
517
+ coordinates?: number[];
518
+ address?: string;
519
+ };
520
+ image?: string;
521
+ coverImage?: string;
522
+ activationDate?: string;
523
+ category: EnterpriseCategoryDoc[] | string[];
524
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
525
+ socialLinks: {
526
+ name: string;
527
+ url: string;
528
+ active: boolean;
529
+ }[];
530
+ };
531
+ interface EnterpriseCategoryDoc {
532
+ id: string;
533
+ name: string;
534
+ slug: string;
535
+ subCategories: EnterpriseSubCategoryDoc[];
536
+ updatedAt: string;
537
+ createdAt: string;
538
+ image?: string;
539
+ }
540
+ interface EnterpriseSubCategoryDoc {
541
+ id: string;
542
+ name: string;
543
+ category: string;
544
+ slug: string;
545
+ image?: string;
546
+ serviceItems: string[];
547
+ updatedAt: string;
548
+ createdAt: string;
549
+ }
550
+
541
551
  interface Business {
542
552
  id: string;
543
553
  userId: string;
@@ -613,28 +623,6 @@ interface BusinessMember {
613
623
  updatedAt: string | NullOrUndefined;
614
624
  }
615
625
 
616
- interface CustomerTransactionStats {
617
- totalSaleCount: number;
618
- totalSaleAmount: number;
619
- totalExpenseCount: number;
620
- totalExpenseAmount: number;
621
- lastTransactionDate: string | null;
622
- updatedAt: string;
623
- }
624
- interface Customer {
625
- id: string;
626
- businessId: string;
627
- phoneNumber: string;
628
- fullName: string;
629
- cityId: string;
630
- address: string;
631
- landmark?: string;
632
- createdAt: string;
633
- updatedAt: string;
634
- customerBusinessId?: string;
635
- transactionStats?: CustomerTransactionStats;
636
- }
637
-
638
626
  type TransactionType = 'sale' | 'expense';
639
627
  interface TransactionItem {
640
628
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.15",
3
+ "version": "1.7.16",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/errand.ts CHANGED
@@ -129,13 +129,15 @@ export interface Errand {
129
129
  parcelSize: `${ParcelSize}`;
130
130
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
131
131
  paymentStatus: `${InvoiceStatus}`;
132
- invoice: {
133
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
134
- refId: string;
135
- authorizationUrl: string;
136
- accessCode: string;
137
- invoiceId?: string | Invoice;
138
- };
132
+ invoiceId?: string;
133
+
134
+ // invoice: {
135
+ // invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
136
+ // refId: string;
137
+ // authorizationUrl: string;
138
+ // accessCode: string;
139
+ // invoiceId?: string | Invoice;
140
+ // };
139
141
  aliasId: string;
140
142
  updatedAt: Date;
141
143
  createdAt: Date;
package/src/invoice.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { EnterpriseType } from './enterprise';
1
+ import { Customer } from './customer';
2
2
  import { Errand } from './errand';
3
3
 
4
4
  export enum InvoiceStatus {
@@ -27,26 +27,21 @@ export enum PaymentOptions {
27
27
 
28
28
  export interface Invoice {
29
29
  id: string;
30
- user: string;
31
- invoiceType: EnterpriseType | `${EnterpriseType}`;
32
- amount: number;
33
- paymentType: PaymentOptions | `${PaymentOptions}`;
30
+ businessId: string;
31
+ userId: string;
32
+ invoiceNumber: string;
33
+ startDate: string;
34
+ endDate: string;
35
+ totalAmount: number;
36
+ paidAmount: number;
37
+ unpaidAmount: number;
34
38
  status: InvoiceStatus | `${InvoiceStatus}`;
35
- version: number;
36
- referenceId?: string;
37
- errandId?: string;
38
- authorizationUrl?: string;
39
- accessCode?: string;
40
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
41
- startDate?: string;
42
- endDate?: string;
43
- dueDate?: string;
44
- invoiceNumber?: string;
45
- isErrandsPaid?: boolean;
39
+ customerId: string;
46
40
  items: InvoiceItem[];
47
- businessId?: string;
48
41
  createdAt: string;
49
42
  updatedAt: string;
43
+
44
+ customerDetails?: Customer;
50
45
  }
51
46
 
52
47
  export interface InvoiceItem {