@mydoormot/app-types 1.4.5 → 1.5.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.4.4 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.5.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
@@ -9,10 +9,10 @@
9
9
  ESM Build start
10
10
  CJS Build start
11
11
  CJS dist/index.cjs 6.67 KB
12
- CJS ⚡️ Build success in 82ms
12
+ CJS ⚡️ Build success in 93ms
13
13
  ESM dist/index.js 5.14 KB
14
- ESM ⚡️ Build success in 82ms
14
+ ESM ⚡️ Build success in 93ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 919ms
17
- DTS dist/index.d.ts 12.77 KB
18
- DTS dist/index.d.cts 12.77 KB
16
+ DTS ⚡️ Build success in 1513ms
17
+ DTS dist/index.d.ts 13.71 KB
18
+ DTS dist/index.d.cts 13.71 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified transaction table
8
+
9
+ ## 1.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Transaction category
14
+
3
15
  ## 1.4.5
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -507,6 +507,39 @@ interface Customer {
507
507
  state?: State;
508
508
  }
509
509
 
510
+ type TransactionType = 'sale' | 'expense';
511
+ interface Transaction {
512
+ id: string;
513
+ type: TransactionType;
514
+ amount: number;
515
+ description: string;
516
+ transactionDate: string | Date;
517
+ createdAt: string | Date;
518
+ updatedAt: string | Date;
519
+ userId: string;
520
+ businessId?: string;
521
+ categoryId?: string;
522
+ }
523
+ interface TransactionCategory {
524
+ id: string;
525
+ name: string;
526
+ createdAt: string | Date;
527
+ updatedAt: string | Date;
528
+ colorCode?: string;
529
+ businessId?: string;
530
+ }
531
+ interface TransactionWithJoin extends Transaction {
532
+ categoryId?: string;
533
+ categoryName?: string;
534
+ categoryColorCode?: string;
535
+ categoryBusinessId?: string;
536
+ categoryCreatedAt?: string | Date;
537
+ categoryUpdatedAt?: string | Date;
538
+ }
539
+ interface TransactionWithCategory extends Transaction {
540
+ category: TransactionCategory;
541
+ }
542
+
510
543
  interface PaginateResult<T> {
511
544
  docs: T[];
512
545
  totalDocs: number;
@@ -529,4 +562,4 @@ declare enum LinkDestination {
529
562
  }
530
563
  type NullOrUndefined = null | undefined;
531
564
 
532
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type User, type UserAddress, type Vehicle, VehicleType, errandTimeline };
565
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, VehicleType, errandTimeline };
package/dist/index.d.ts CHANGED
@@ -507,6 +507,39 @@ interface Customer {
507
507
  state?: State;
508
508
  }
509
509
 
510
+ type TransactionType = 'sale' | 'expense';
511
+ interface Transaction {
512
+ id: string;
513
+ type: TransactionType;
514
+ amount: number;
515
+ description: string;
516
+ transactionDate: string | Date;
517
+ createdAt: string | Date;
518
+ updatedAt: string | Date;
519
+ userId: string;
520
+ businessId?: string;
521
+ categoryId?: string;
522
+ }
523
+ interface TransactionCategory {
524
+ id: string;
525
+ name: string;
526
+ createdAt: string | Date;
527
+ updatedAt: string | Date;
528
+ colorCode?: string;
529
+ businessId?: string;
530
+ }
531
+ interface TransactionWithJoin extends Transaction {
532
+ categoryId?: string;
533
+ categoryName?: string;
534
+ categoryColorCode?: string;
535
+ categoryBusinessId?: string;
536
+ categoryCreatedAt?: string | Date;
537
+ categoryUpdatedAt?: string | Date;
538
+ }
539
+ interface TransactionWithCategory extends Transaction {
540
+ category: TransactionCategory;
541
+ }
542
+
510
543
  interface PaginateResult<T> {
511
544
  docs: T[];
512
545
  totalDocs: number;
@@ -529,4 +562,4 @@ declare enum LinkDestination {
529
562
  }
530
563
  type NullOrUndefined = null | undefined;
531
564
 
532
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type User, type UserAddress, type Vehicle, VehicleType, errandTimeline };
565
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, VehicleType, errandTimeline };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.4.5",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/index.ts CHANGED
@@ -32,3 +32,4 @@ export * from './enterprise';
32
32
  export * from './coupon';
33
33
  export * from './business';
34
34
  export * from './customer';
35
+ export * from './transaction';
@@ -0,0 +1,36 @@
1
+ export type TransactionType = 'sale' | 'expense';
2
+
3
+ export interface Transaction {
4
+ id: string;
5
+ type: TransactionType;
6
+ amount: number;
7
+ description: string;
8
+ transactionDate: string | Date;
9
+ createdAt: string | Date;
10
+ updatedAt: string | Date;
11
+ userId: string;
12
+ businessId?: string;
13
+ categoryId?: string;
14
+ }
15
+
16
+ export interface TransactionCategory {
17
+ id: string;
18
+ name: string;
19
+ createdAt: string | Date;
20
+ updatedAt: string | Date;
21
+ colorCode?: string;
22
+ businessId?: string;
23
+ }
24
+
25
+ export interface TransactionWithJoin extends Transaction {
26
+ categoryId?: string;
27
+ categoryName?: string;
28
+ categoryColorCode?: string;
29
+ categoryBusinessId?: string;
30
+ categoryCreatedAt?: string | Date;
31
+ categoryUpdatedAt?: string | Date;
32
+ }
33
+
34
+ export interface TransactionWithCategory extends Transaction {
35
+ category: TransactionCategory;
36
+ }