@merkaly/api 0.7.1 → 0.8.0

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.
Files changed (39) hide show
  1. package/dist/app.schemas.d.ts +6 -4
  2. package/dist/contact/customer/customer.entity.d.ts +5 -0
  3. package/dist/contact/customer/customer.enum.d.ts +4 -0
  4. package/dist/contact/customer/customer.enum.js +5 -0
  5. package/dist/contact/customer/request.validator.d.ts +18 -0
  6. package/dist/{order/sale → contact}/customer/request.validator.js +15 -15
  7. package/dist/contact/vendor/index.d.ts +1 -0
  8. package/dist/contact/vendor/index.js +1 -0
  9. package/dist/contact/vendor/vendor.entity.d.ts +6 -0
  10. package/dist/contact.entity.d.ts +11 -0
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +3 -4
  13. package/dist/integration/supplier/index.d.ts +4 -0
  14. package/dist/{order/purchase/vendor → integration/supplier}/index.js +1 -0
  15. package/dist/{supplier/product/product.preview.d.ts → integration/supplier/product.d.ts} +11 -5
  16. package/dist/{supplier/source/source.entity.d.ts → integration/supplier/supplier.entity.d.ts} +1 -1
  17. package/dist/inventory/catalog/product/product.entity.d.ts +5 -3
  18. package/dist/inventory/catalog/variant/variant.entity.d.ts +2 -2
  19. package/dist/order/purchase/transaction/transaction.entity.d.ts +2 -2
  20. package/dist/order/sale/transaction/transaction.entity.d.ts +2 -2
  21. package/package.json +1 -1
  22. package/dist/order/purchase/vendor/index.d.ts +0 -2
  23. package/dist/order/purchase/vendor/request.validator.d.ts +0 -16
  24. package/dist/order/purchase/vendor/request.validator.js +0 -93
  25. package/dist/order/purchase/vendor/vendor.entity.d.ts +0 -11
  26. package/dist/order/sale/customer/customer.entity.d.ts +0 -13
  27. package/dist/order/sale/customer/customer.enum.d.ts +0 -4
  28. package/dist/order/sale/customer/customer.enum.js +0 -5
  29. package/dist/order/sale/customer/request.validator.d.ts +0 -18
  30. package/dist/supplier/product/index.d.ts +0 -2
  31. package/dist/supplier/product/index.js +0 -1
  32. package/dist/supplier/source/index.d.ts +0 -2
  33. package/dist/supplier/source/index.js +0 -1
  34. /package/dist/{order/sale → contact}/customer/index.d.ts +0 -0
  35. /package/dist/{order/sale → contact}/customer/index.js +0 -0
  36. /package/dist/{supplier/source → integration/supplier}/provider.enum.d.ts +0 -0
  37. /package/dist/{supplier/source → integration/supplier}/provider.enum.js +0 -0
  38. /package/dist/{supplier/product → integration/supplier}/request.validator.d.ts +0 -0
  39. /package/dist/{supplier/product → integration/supplier}/request.validator.js +0 -0
@@ -5,6 +5,10 @@ export declare abstract class AppSchemas {
5
5
  static get assets(): {
6
6
  files: string;
7
7
  };
8
+ static get contact(): {
9
+ customers: string;
10
+ vendors: string;
11
+ };
8
12
  static get finance(): {
9
13
  payments: string;
10
14
  subscriptions: string;
@@ -22,10 +26,8 @@ export declare abstract class AppSchemas {
22
26
  purchase: {
23
27
  items: string;
24
28
  transactions: string;
25
- vendors: string;
26
29
  };
27
30
  sale: {
28
- customers: string;
29
31
  items: string;
30
32
  transactions: string;
31
33
  };
@@ -34,8 +36,8 @@ export declare abstract class AppSchemas {
34
36
  transactions: string;
35
37
  };
36
38
  };
37
- static get supplier(): {
38
- sources: string;
39
+ static get integration(): {
40
+ suppliers: string;
39
41
  };
40
42
  static get settings(): {
41
43
  organizations: string;
@@ -0,0 +1,5 @@
1
+ import { ContactEntity } from '../../contact.entity.js';
2
+ import { ContactCustomerTypeEnum } from './customer.enum.js';
3
+ export declare class ContactCustomerEntity extends ContactEntity {
4
+ type: ContactCustomerTypeEnum;
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ContactCustomerTypeEnum {
2
+ B2B = "B2B",
3
+ B2C = "B2C"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var ContactCustomerTypeEnum;
2
+ (function (ContactCustomerTypeEnum) {
3
+ ContactCustomerTypeEnum["B2B"] = "B2B";
4
+ ContactCustomerTypeEnum["B2C"] = "B2C";
5
+ })(ContactCustomerTypeEnum || (ContactCustomerTypeEnum = {}));
@@ -0,0 +1,18 @@
1
+ import { ContactCustomerTypeEnum } from './customer.enum.js';
2
+ import { AbstractRequestValidator } from '../../abstract.validator.js';
3
+ import type { ContactCustomerEntity } from './customer.entity.js';
4
+ export declare class CreateContactCustomerRequestValidator extends AbstractRequestValidator {
5
+ name: string;
6
+ type: ContactCustomerTypeEnum;
7
+ description?: string;
8
+ email?: string;
9
+ logo?: string;
10
+ phone?: string;
11
+ website?: string;
12
+ taxId?: string;
13
+ active?: boolean;
14
+ constructor(customer?: ContactCustomerEntity);
15
+ }
16
+ export declare class UpdateContactCustomerRequestValidator extends CreateContactCustomerRequestValidator {
17
+ name: string;
18
+ }
@@ -10,10 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  import * as class_validator_1 from "class-validator";
12
12
  import * as customer_enum_1 from './customer.enum.js';
13
- import * as abstract_validator_1 from '../../../abstract.validator.js';
14
- export class CreateSaleCustomerRequestValidator extends abstract_validator_1.AbstractRequestValidator {
13
+ import * as abstract_validator_1 from '../../abstract.validator.js';
14
+ export class CreateContactCustomerRequestValidator extends abstract_validator_1.AbstractRequestValidator {
15
15
  name;
16
- type = customer_enum_1.SaleCustomerTypeEnum.B2C;
16
+ type = customer_enum_1.ContactCustomerTypeEnum.B2C;
17
17
  description;
18
18
  email;
19
19
  logo;
@@ -44,58 +44,58 @@ __decorate([
44
44
  (0, class_validator_1.IsNotEmpty)(),
45
45
  (0, class_validator_1.Length)(0, 100),
46
46
  __metadata("design:type", String)
47
- ], CreateSaleCustomerRequestValidator.prototype, "name", void 0);
47
+ ], CreateContactCustomerRequestValidator.prototype, "name", void 0);
48
48
  __decorate([
49
- (0, class_validator_1.IsEnum)(customer_enum_1.SaleCustomerTypeEnum),
49
+ (0, class_validator_1.IsEnum)(customer_enum_1.ContactCustomerTypeEnum),
50
50
  (0, class_validator_1.IsOptional)(),
51
51
  __metadata("design:type", String)
52
- ], CreateSaleCustomerRequestValidator.prototype, "type", void 0);
52
+ ], CreateContactCustomerRequestValidator.prototype, "type", void 0);
53
53
  __decorate([
54
54
  (0, class_validator_1.IsString)(),
55
55
  (0, class_validator_1.Length)(0, 1000),
56
56
  (0, class_validator_1.IsOptional)(),
57
57
  __metadata("design:type", String)
58
- ], CreateSaleCustomerRequestValidator.prototype, "description", void 0);
58
+ ], CreateContactCustomerRequestValidator.prototype, "description", void 0);
59
59
  __decorate([
60
60
  (0, class_validator_1.IsEmail)(),
61
61
  (0, class_validator_1.Length)(0, 254),
62
62
  (0, class_validator_1.IsOptional)(),
63
63
  (0, class_validator_1.ValidateIf)((o) => o.email),
64
64
  __metadata("design:type", String)
65
- ], CreateSaleCustomerRequestValidator.prototype, "email", void 0);
65
+ ], CreateContactCustomerRequestValidator.prototype, "email", void 0);
66
66
  __decorate([
67
67
  (0, class_validator_1.IsUrl)(),
68
68
  (0, class_validator_1.Length)(0, 2048),
69
69
  (0, class_validator_1.IsOptional)(),
70
70
  (0, class_validator_1.ValidateIf)((o) => o.logo),
71
71
  __metadata("design:type", String)
72
- ], CreateSaleCustomerRequestValidator.prototype, "logo", void 0);
72
+ ], CreateContactCustomerRequestValidator.prototype, "logo", void 0);
73
73
  __decorate([
74
74
  (0, class_validator_1.IsString)(),
75
75
  (0, class_validator_1.Length)(0, 20),
76
76
  (0, class_validator_1.IsOptional)(),
77
77
  __metadata("design:type", String)
78
- ], CreateSaleCustomerRequestValidator.prototype, "phone", void 0);
78
+ ], CreateContactCustomerRequestValidator.prototype, "phone", void 0);
79
79
  __decorate([
80
80
  (0, class_validator_1.IsString)(),
81
81
  (0, class_validator_1.Length)(0, 2048),
82
82
  (0, class_validator_1.IsOptional)(),
83
83
  __metadata("design:type", String)
84
- ], CreateSaleCustomerRequestValidator.prototype, "website", void 0);
84
+ ], CreateContactCustomerRequestValidator.prototype, "website", void 0);
85
85
  __decorate([
86
86
  (0, class_validator_1.IsString)(),
87
87
  (0, class_validator_1.Length)(0, 20),
88
88
  (0, class_validator_1.IsOptional)(),
89
89
  __metadata("design:type", String)
90
- ], CreateSaleCustomerRequestValidator.prototype, "taxId", void 0);
90
+ ], CreateContactCustomerRequestValidator.prototype, "taxId", void 0);
91
91
  __decorate([
92
92
  (0, class_validator_1.IsBoolean)(),
93
93
  (0, class_validator_1.IsOptional)(),
94
94
  __metadata("design:type", Boolean)
95
- ], CreateSaleCustomerRequestValidator.prototype, "active", void 0);
96
- export class UpdateSaleCustomerRequestValidator extends CreateSaleCustomerRequestValidator {
95
+ ], CreateContactCustomerRequestValidator.prototype, "active", void 0);
96
+ export class UpdateContactCustomerRequestValidator extends CreateContactCustomerRequestValidator {
97
97
  }
98
98
  __decorate([
99
99
  (0, class_validator_1.IsOptional)(),
100
100
  __metadata("design:type", String)
101
- ], UpdateSaleCustomerRequestValidator.prototype, "name", void 0);
101
+ ], UpdateContactCustomerRequestValidator.prototype, "name", void 0);
@@ -0,0 +1 @@
1
+ export * from './vendor.entity';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,6 @@
1
+ import { ContactEntity } from '../../contact.entity.js';
2
+ import type { IntegrationSupplierEntity } from '../../integration/supplier';
3
+ export declare class ContactVendorEntity extends ContactEntity {
4
+ supplier: IntegrationSupplierEntity;
5
+ externalId: string;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { AbstractEntity } from './abstract.entity.js';
2
+ export declare abstract class ContactEntity extends AbstractEntity {
3
+ name: string;
4
+ description?: string;
5
+ email?: string;
6
+ phone?: string;
7
+ website?: string;
8
+ logo?: string;
9
+ taxId?: string;
10
+ active: boolean;
11
+ }
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './not-equal-to.decorator';
5
5
  export * from './address.validator';
6
6
  export * from './address.entity';
7
7
  export * from './transaction.entity';
8
+ export * from './contact.entity';
8
9
  export * from './transitionable.interface';
9
10
  export * from './abstract.entity';
10
11
  export * from './abstract.transition';
@@ -12,18 +13,17 @@ export * from './abstract.validator';
12
13
  export * from './relation.status.enum';
13
14
  export * from './account/user';
14
15
  export * from './assets/asset';
16
+ export * from './contact/customer';
17
+ export * from './contact/vendor';
15
18
  export * from './finance/payment';
19
+ export * from './integration/supplier';
16
20
  export * from './inventory/catalog/brand';
17
21
  export * from './inventory/catalog/category';
18
22
  export * from './inventory/catalog/product';
19
23
  export * from './inventory/catalog/variant';
20
24
  export * from './order/purchase/item';
21
25
  export * from './order/purchase/transaction';
22
- export * from './order/purchase/vendor';
23
- export * from './order/sale/customer';
24
26
  export * from './order/sale/item';
25
27
  export * from './order/sale/transaction';
26
28
  export * from './settings/organization';
27
- export * from './supplier/product';
28
- export * from './supplier/source';
29
29
  export type { SaveEntityArgs } from './repository.types';
package/dist/index.js CHANGED
@@ -5,17 +5,16 @@ export * from './abstract.validator.js';
5
5
  export * from './relation.status.enum.js';
6
6
  export * from './account/user/index.js';
7
7
  export * from './assets/asset/index.js';
8
+ export * from './contact/customer/index.js';
9
+ export * from './contact/vendor/index.js';
8
10
  export * from './finance/payment/index.js';
11
+ export * from './integration/supplier/index.js';
9
12
  export * from './inventory/catalog/brand/index.js';
10
13
  export * from './inventory/catalog/category/index.js';
11
14
  export * from './inventory/catalog/product/index.js';
12
15
  export * from './inventory/catalog/variant/index.js';
13
16
  export * from './order/purchase/item/index.js';
14
17
  export * from './order/purchase/transaction/index.js';
15
- export * from './order/purchase/vendor/index.js';
16
- export * from './order/sale/customer/index.js';
17
18
  export * from './order/sale/item/index.js';
18
19
  export * from './order/sale/transaction/index.js';
19
20
  export * from './settings/organization/index.js';
20
- export * from './supplier/product/index.js';
21
- export * from './supplier/source/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './supplier.entity';
2
+ export * from './provider.enum';
3
+ export * from './product';
4
+ export * from './request.validator';
@@ -1 +1,2 @@
1
+ export * from './provider.enum.js';
1
2
  export * from './request.validator.js';
@@ -1,23 +1,29 @@
1
- import type { SupplierProviderEnum } from '../source';
2
- export interface SupplierVariantPreview {
1
+ import type { SupplierProviderEnum } from './provider.enum.js';
2
+ import type { AssetType } from '../../assets/asset';
3
+ export interface SupplierProductAsset {
4
+ type: AssetType;
5
+ url: string;
6
+ }
7
+ export interface SupplierProductVariant {
3
8
  externalVariantId: string;
4
9
  name: string;
5
10
  supplierPrice: number;
6
11
  stock: number;
7
12
  picture?: string;
8
13
  }
9
- export interface SupplierProductPreview {
14
+ export interface SupplierProduct {
10
15
  provider: SupplierProviderEnum;
11
16
  externalProductId: string;
12
17
  name: string;
13
18
  description: string;
14
- pictures: string[];
19
+ assets: SupplierProductAsset[];
15
20
  currency: string;
16
21
  deliveryDays?: number;
17
22
  store?: {
23
+ externalId: string;
18
24
  name: string;
19
25
  rating?: string;
20
26
  };
21
- variants: SupplierVariantPreview[];
27
+ variants: SupplierProductVariant[];
22
28
  importedProduct?: string;
23
29
  }
@@ -1,5 +1,5 @@
1
1
  import { AbstractEntity } from '../../abstract.entity.js';
2
2
  import { SupplierProviderEnum } from './provider.enum.js';
3
- export declare class SupplierSourceEntity extends AbstractEntity {
3
+ export declare class IntegrationSupplierEntity extends AbstractEntity {
4
4
  provider: SupplierProviderEnum;
5
5
  }
@@ -3,13 +3,15 @@ import { AbstractEntity } from '../../../abstract.entity.js';
3
3
  import type { CatalogBrandEntity } from '../brand';
4
4
  import type { CatalogCategoryEntity } from '../category';
5
5
  import type { CatalogVariantEntity } from '../variant';
6
- import type { SupplierSourceEntity } from '../../../supplier/source';
6
+ import type { ContactVendorEntity } from '../../../contact/vendor';
7
+ import type { IntegrationSupplierEntity } from '../../../integration/supplier';
7
8
  export declare class CatalogProductEntity extends AbstractEntity {
8
9
  sku?: string;
9
10
  name: string;
10
11
  description?: string;
11
12
  active: boolean;
12
- source?: SupplierSourceEntity;
13
+ supplier?: IntegrationSupplierEntity;
14
+ vendor?: ContactVendorEntity;
13
15
  externalProductId?: string;
14
16
  variant: CatalogVariantEntity;
15
17
  readonly supplierPrice: number;
@@ -18,6 +20,6 @@ export declare class CatalogProductEntity extends AbstractEntity {
18
20
  brand?: CatalogBrandEntity;
19
21
  hashtags: string[];
20
22
  readonly picture: AssetEntity;
21
- readonly pictures: AssetEntity[];
23
+ readonly assets: AssetEntity[];
22
24
  readonly variants: CatalogVariantEntity[];
23
25
  }
@@ -6,7 +6,7 @@ export declare class CatalogVariantEntity extends AbstractEntity {
6
6
  supplierPrice: number;
7
7
  retailPrice: number;
8
8
  active: boolean;
9
- pictures: AssetEntity[];
9
+ picture?: AssetEntity;
10
+ assets: AssetEntity[];
10
11
  externalVariantId?: string;
11
- readonly picture: AssetEntity;
12
12
  }
@@ -1,8 +1,8 @@
1
+ import { ContactVendorEntity } from '../../../contact/vendor';
1
2
  import { ItemEntity } from '../../sale/item';
2
3
  import { TransactionEntity } from '../../../transaction.entity.js';
3
4
  import { PurchaseTransactionStatusEnum } from './transaction.enum.js';
4
- import { PurchaseVendorEntity } from '../vendor';
5
5
  export declare class PurchaseTransactionEntity extends TransactionEntity<PurchaseTransactionStatusEnum> {
6
- vendor: PurchaseVendorEntity;
6
+ vendor?: ContactVendorEntity;
7
7
  items: ItemEntity[];
8
8
  }
@@ -1,8 +1,8 @@
1
+ import { ContactCustomerEntity } from '../../../contact/customer';
1
2
  import { ItemEntity } from '../item';
2
3
  import { TransactionEntity } from '../../../transaction.entity.js';
3
4
  import { SaleTransactionStatusEnum } from './transaction.enum.js';
4
- import { SaleCustomerEntity } from '../customer';
5
5
  export declare class SaleTransactionEntity extends TransactionEntity<SaleTransactionStatusEnum> {
6
- customer: SaleCustomerEntity;
6
+ customer: ContactCustomerEntity;
7
7
  items: ItemEntity[];
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "Shared TypeScript interfaces and enums for Merkaly API",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- export * from './vendor.entity';
2
- export * from './request.validator';
@@ -1,16 +0,0 @@
1
- import { AbstractRequestValidator } from '../../../abstract.validator.js';
2
- import type { PurchaseVendorEntity } from './vendor.entity.js';
3
- export declare class CreatePurchaseVendorRequestValidator extends AbstractRequestValidator {
4
- name: string;
5
- description?: string;
6
- email?: string;
7
- logo?: string;
8
- phone?: string;
9
- website?: string;
10
- taxId?: string;
11
- active?: boolean;
12
- constructor(vendor?: PurchaseVendorEntity);
13
- }
14
- export declare class UpdatePurchaseVendorRequestValidator extends CreatePurchaseVendorRequestValidator {
15
- name: string;
16
- }
@@ -1,93 +0,0 @@
1
- import 'reflect-metadata';
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- import * as class_transformer_1 from "class-transformer";
12
- import * as class_validator_1 from "class-validator";
13
- import * as abstract_validator_1 from '../../../abstract.validator.js';
14
- const emptyToUndefined = ({ value }) => (value === '' ? undefined : value);
15
- export class CreatePurchaseVendorRequestValidator extends abstract_validator_1.AbstractRequestValidator {
16
- name;
17
- description;
18
- email;
19
- logo;
20
- phone;
21
- website;
22
- taxId;
23
- active;
24
- constructor(vendor) {
25
- super();
26
- if (!vendor) {
27
- return;
28
- }
29
- this.name = vendor.name;
30
- this.description = vendor.description;
31
- this.email = vendor.email;
32
- this.logo = vendor.logo;
33
- this.phone = vendor.phone;
34
- this.website = vendor.website;
35
- this.taxId = vendor.taxId;
36
- this.active = vendor.active;
37
- }
38
- }
39
- __decorate([
40
- (0, class_validator_1.IsString)(),
41
- (0, class_validator_1.IsNotEmpty)(),
42
- (0, class_validator_1.Length)(0, 100),
43
- __metadata("design:type", String)
44
- ], CreatePurchaseVendorRequestValidator.prototype, "name", void 0);
45
- __decorate([
46
- (0, class_validator_1.IsString)(),
47
- (0, class_validator_1.Length)(0, 1000),
48
- (0, class_validator_1.IsOptional)(),
49
- __metadata("design:type", String)
50
- ], CreatePurchaseVendorRequestValidator.prototype, "description", void 0);
51
- __decorate([
52
- (0, class_transformer_1.Transform)(emptyToUndefined),
53
- (0, class_validator_1.IsEmail)(),
54
- (0, class_validator_1.Length)(0, 254),
55
- (0, class_validator_1.IsOptional)(),
56
- __metadata("design:type", String)
57
- ], CreatePurchaseVendorRequestValidator.prototype, "email", void 0);
58
- __decorate([
59
- (0, class_transformer_1.Transform)(emptyToUndefined),
60
- (0, class_validator_1.IsUrl)(),
61
- (0, class_validator_1.Length)(0, 2048),
62
- (0, class_validator_1.IsOptional)(),
63
- __metadata("design:type", String)
64
- ], CreatePurchaseVendorRequestValidator.prototype, "logo", void 0);
65
- __decorate([
66
- (0, class_validator_1.IsString)(),
67
- (0, class_validator_1.Length)(0, 20),
68
- (0, class_validator_1.IsOptional)(),
69
- __metadata("design:type", String)
70
- ], CreatePurchaseVendorRequestValidator.prototype, "phone", void 0);
71
- __decorate([
72
- (0, class_validator_1.IsString)(),
73
- (0, class_validator_1.Length)(0, 2048),
74
- (0, class_validator_1.IsOptional)(),
75
- __metadata("design:type", String)
76
- ], CreatePurchaseVendorRequestValidator.prototype, "website", void 0);
77
- __decorate([
78
- (0, class_validator_1.IsString)(),
79
- (0, class_validator_1.Length)(0, 20),
80
- (0, class_validator_1.IsOptional)(),
81
- __metadata("design:type", String)
82
- ], CreatePurchaseVendorRequestValidator.prototype, "taxId", void 0);
83
- __decorate([
84
- (0, class_validator_1.IsBoolean)(),
85
- (0, class_validator_1.IsOptional)(),
86
- __metadata("design:type", Boolean)
87
- ], CreatePurchaseVendorRequestValidator.prototype, "active", void 0);
88
- export class UpdatePurchaseVendorRequestValidator extends CreatePurchaseVendorRequestValidator {
89
- }
90
- __decorate([
91
- (0, class_validator_1.IsOptional)(),
92
- __metadata("design:type", String)
93
- ], UpdatePurchaseVendorRequestValidator.prototype, "name", void 0);
@@ -1,11 +0,0 @@
1
- import { AbstractEntity } from '../../../abstract.entity.js';
2
- export declare class PurchaseVendorEntity extends AbstractEntity {
3
- name: string;
4
- description: string;
5
- email: string;
6
- phone?: string;
7
- website?: string;
8
- logo?: string;
9
- taxId?: string;
10
- active: boolean;
11
- }
@@ -1,13 +0,0 @@
1
- import { AbstractEntity } from '../../../abstract.entity.js';
2
- import { SaleCustomerTypeEnum } from './customer.enum.js';
3
- export declare class SaleCustomerEntity extends AbstractEntity {
4
- name: string;
5
- type: SaleCustomerTypeEnum;
6
- description: string;
7
- email: string;
8
- phone?: string;
9
- website?: string;
10
- logo?: string;
11
- taxId?: string;
12
- active: boolean;
13
- }
@@ -1,4 +0,0 @@
1
- export declare enum SaleCustomerTypeEnum {
2
- B2B = "B2B",
3
- B2C = "B2C"
4
- }
@@ -1,5 +0,0 @@
1
- export var SaleCustomerTypeEnum;
2
- (function (SaleCustomerTypeEnum) {
3
- SaleCustomerTypeEnum["B2B"] = "B2B";
4
- SaleCustomerTypeEnum["B2C"] = "B2C";
5
- })(SaleCustomerTypeEnum || (SaleCustomerTypeEnum = {}));
@@ -1,18 +0,0 @@
1
- import { SaleCustomerTypeEnum } from './customer.enum.js';
2
- import { AbstractRequestValidator } from '../../../abstract.validator.js';
3
- import type { SaleCustomerEntity } from './customer.entity.js';
4
- export declare class CreateSaleCustomerRequestValidator extends AbstractRequestValidator {
5
- name: string;
6
- type: SaleCustomerTypeEnum;
7
- description?: string;
8
- email?: string;
9
- logo?: string;
10
- phone?: string;
11
- website?: string;
12
- taxId?: string;
13
- active?: boolean;
14
- constructor(customer?: SaleCustomerEntity);
15
- }
16
- export declare class UpdateSaleCustomerRequestValidator extends CreateSaleCustomerRequestValidator {
17
- name: string;
18
- }
@@ -1,2 +0,0 @@
1
- export * from './product.preview';
2
- export * from './request.validator';
@@ -1 +0,0 @@
1
- export * from './request.validator.js';
@@ -1,2 +0,0 @@
1
- export * from './source.entity';
2
- export * from './provider.enum';
@@ -1 +0,0 @@
1
- export * from './provider.enum.js';
File without changes