@merkaly/api 0.2.2-8 → 0.2.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.
Files changed (143) hide show
  1. package/.output/abstract/abstract.document.d.ts +10 -0
  2. package/.output/abstract/abstract.document.js +13 -0
  3. package/.output/{configs/app.entity.d.ts → abstract/abstract.entity.d.ts} +3 -3
  4. package/.output/abstract/abstract.entity.js +54 -0
  5. package/.output/abstract/abstract.fixture.d.ts +4 -0
  6. package/.output/abstract/abstract.fixture.js +11 -0
  7. package/.output/abstract/abstract.validator.d.ts +18 -0
  8. package/.output/abstract/abstract.validator.js +73 -0
  9. package/.output/modules/assets/asset.entity.d.ts +2 -2
  10. package/.output/modules/assets/asset.entity.js +69 -0
  11. package/.output/modules/content/banners/banner.document.d.ts +6 -0
  12. package/.output/modules/content/banners/banner.document.js +30 -0
  13. package/.output/modules/content/banners/banner.entity.d.ts +7 -0
  14. package/.output/modules/content/banners/banner.entity.js +54 -0
  15. package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
  16. package/.output/modules/content/banners/banner.fixture.js +39 -0
  17. package/.output/modules/content/banners/banner.validator.d.ts +8 -0
  18. package/.output/modules/content/banners/banner.validator.js +63 -0
  19. package/.output/modules/content/pages/page.document.d.ts +10 -0
  20. package/.output/modules/content/pages/page.document.js +32 -0
  21. package/.output/modules/content/pages/page.entity.d.ts +11 -0
  22. package/.output/modules/content/pages/page.entity.js +69 -0
  23. package/.output/modules/content/pages/page.fixture.d.ts +5 -0
  24. package/.output/modules/content/pages/page.fixture.js +39 -0
  25. package/.output/modules/content/pages/page.types.d.ts +8 -0
  26. package/.output/modules/content/pages/page.types.js +13 -0
  27. package/.output/modules/content/pages/page.validator.d.ts +11 -0
  28. package/.output/modules/content/pages/page.validator.js +73 -0
  29. package/.output/modules/insight/validators/order.validator.d.ts +4 -0
  30. package/.output/modules/insight/validators/order.validator.js +27 -0
  31. package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
  32. package/.output/modules/inventory/brands/brand.document.js +30 -0
  33. package/.output/modules/inventory/brands/brand.entity.d.ts +2 -2
  34. package/.output/modules/inventory/brands/brand.entity.js +50 -0
  35. package/.output/modules/inventory/brands/brand.validator.js +45 -0
  36. package/.output/modules/inventory/categories/category.document.d.ts +6 -0
  37. package/.output/modules/inventory/categories/category.document.js +31 -0
  38. package/.output/modules/inventory/categories/category.entity.d.ts +5 -2
  39. package/.output/modules/inventory/categories/category.entity.js +61 -0
  40. package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
  41. package/.output/modules/inventory/categories/category.fixture.js +38 -0
  42. package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
  43. package/.output/modules/inventory/categories/category.validator.js +57 -0
  44. package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
  45. package/.output/modules/inventory/products/entities/code.entity.js +53 -0
  46. package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
  47. package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
  48. package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
  49. package/.output/modules/inventory/products/entities/price.entity.js +49 -0
  50. package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
  51. package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
  52. package/.output/modules/inventory/products/product.document.d.ts +24 -0
  53. package/.output/modules/inventory/products/product.document.js +33 -0
  54. package/.output/modules/inventory/products/product.entity.d.ts +13 -3
  55. package/.output/modules/inventory/products/product.entity.js +101 -0
  56. package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
  57. package/.output/modules/inventory/products/product.fixture.js +54 -0
  58. package/.output/modules/inventory/products/product.validator.d.ts +15 -11
  59. package/.output/modules/inventory/products/product.validator.js +118 -0
  60. package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
  61. package/.output/modules/inventory/products/validators/code.validator.js +37 -0
  62. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
  63. package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
  64. package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
  65. package/.output/modules/inventory/products/validators/price.validator.js +30 -0
  66. package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
  67. package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
  68. package/.output/modules/inventory/properties/property.entity.d.ts +7 -0
  69. package/.output/modules/inventory/properties/property.entity.js +55 -0
  70. package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
  71. package/.output/modules/inventory/properties/property.validator.js +51 -0
  72. package/.output/modules/sales/clients/client.entity.d.ts +12 -0
  73. package/.output/modules/sales/clients/client.entity.js +73 -0
  74. package/.output/modules/sales/clients/client.validator.d.ts +12 -0
  75. package/.output/modules/sales/clients/client.validator.js +67 -0
  76. package/.output/modules/{store/orders/billing/billing.validator.d.ts → sales/orders/billing/billing.document.d.ts} +4 -4
  77. package/.output/modules/sales/orders/billing/billing.document.js +9 -0
  78. package/.output/modules/{store → sales}/orders/billing/billing.entity.d.ts +0 -0
  79. package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
  80. package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
  81. package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
  82. package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
  83. package/.output/modules/sales/orders/item/item.document.js +9 -0
  84. package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
  85. package/.output/modules/sales/orders/item/item.entity.js +54 -0
  86. package/.output/modules/{store/orders/item/item.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -8
  87. package/.output/modules/sales/orders/item/item.schema.js +6 -0
  88. package/.output/modules/{store → sales}/orders/item/item.validator.d.ts +0 -0
  89. package/.output/modules/sales/orders/item/item.validator.js +29 -0
  90. package/.output/modules/sales/orders/order.entity.d.ts +19 -0
  91. package/.output/modules/sales/orders/order.entity.js +82 -0
  92. package/.output/modules/sales/orders/order.validator.d.ts +18 -0
  93. package/.output/modules/sales/orders/order.validator.js +75 -0
  94. package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
  95. package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
  96. package/.output/modules/sales/orders/payment/payment.schema.d.ts +27 -0
  97. package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
  98. package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
  99. package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
  100. package/.output/modules/{store/orders/shipping/shipping.validator.d.ts → sales/orders/shipping/shipping.document.d.ts} +4 -4
  101. package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
  102. package/.output/modules/{store → sales}/orders/shipping/shipping.entity.d.ts +0 -0
  103. package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
  104. package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
  105. package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
  106. package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
  107. package/.output/modules/sales/orders/status/status.document.js +9 -0
  108. package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
  109. package/.output/modules/sales/orders/status/status.entity.js +37 -0
  110. package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
  111. package/.output/modules/sales/orders/status/status.validator.js +12 -0
  112. package/.output/modules/search/search.validator.d.ts +6 -0
  113. package/.output/modules/search/search.validator.js +49 -0
  114. package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
  115. package/.output/modules/setting/connections/connection.validator.js +37 -0
  116. package/.output/modules/setting/layout/layout.document.d.ts +5 -0
  117. package/.output/modules/setting/layout/layout.document.js +29 -0
  118. package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
  119. package/.output/modules/setting/layout/layout.entity.js +46 -0
  120. package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
  121. package/.output/modules/setting/members/member.validator.js +2 -0
  122. package/.output/modules/setting/organization/organization.document.d.ts +15 -0
  123. package/.output/modules/setting/organization/organization.document.js +31 -0
  124. package/.output/modules/setting/organization/organization.entity.d.ts +4 -0
  125. package/.output/modules/setting/organization/organization.entity.js +28 -0
  126. package/.output/modules/setting/organization/organization.types.d.ts +22 -0
  127. package/.output/modules/setting/organization/organization.types.js +102 -0
  128. package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
  129. package/.output/modules/setting/organization/organization.validator.js +83 -0
  130. package/.output/modules/setting/theme/theme.entity.d.ts +6 -0
  131. package/.output/modules/setting/theme/theme.entity.js +46 -0
  132. package/.output/modules/users/user.validator.d.ts +10 -0
  133. package/.output/modules/users/user.validator.js +50 -0
  134. package/.output/types.d.ts +23 -0
  135. package/.output/types.js +2 -0
  136. package/package.json +22 -11
  137. package/.output/main.d.ts +0 -0
  138. package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
  139. package/.output/modules/store/cart/cart.entity.d.ts +0 -14
  140. package/.output/modules/store/cart/cart.validator.d.ts +0 -11
  141. package/.output/modules/store/orders/order.entity.d.ts +0 -14
  142. package/.output/modules/store/orders/order.validator.d.ts +0 -10
  143. package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
@@ -0,0 +1,5 @@
1
+ import { AbstractDocument } from '../../../abstract/abstract.document';
2
+ export declare class LayoutDocument extends AbstractDocument {
3
+ path: string;
4
+ content: Record<string, any>;
5
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.LayoutDocument = void 0;
19
+ var abstract_document_1 = require("../../../abstract/abstract.document");
20
+ var LayoutDocument = (function (_super) {
21
+ __extends(LayoutDocument, _super);
22
+ function LayoutDocument() {
23
+ var _this = _super !== null && _super.apply(this, arguments) || this;
24
+ _this.content = {};
25
+ return _this;
26
+ }
27
+ return LayoutDocument;
28
+ }(abstract_document_1.AbstractDocument));
29
+ exports.LayoutDocument = LayoutDocument;
@@ -0,0 +1,6 @@
1
+ import { AbstractEntity } from '../../../abstract/abstract.entity';
2
+ export declare class LayoutEntity extends AbstractEntity {
3
+ static readonly $index = "settings_layout";
4
+ path: string;
5
+ content: Map<string, any>;
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ 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;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.LayoutEntity = void 0;
28
+ var mongoose_1 = require("@nestjs/mongoose");
29
+ var mongoose_2 = require("mongoose");
30
+ var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
+ var LayoutEntity = (function (_super) {
32
+ __extends(LayoutEntity, _super);
33
+ function LayoutEntity() {
34
+ return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ LayoutEntity.$index = 'settings_layout';
37
+ __decorate([
38
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
39
+ __metadata("design:type", String)
40
+ ], LayoutEntity.prototype, "path", void 0);
41
+ LayoutEntity = __decorate([
42
+ (0, mongoose_1.Schema)({ timestamps: true })
43
+ ], LayoutEntity);
44
+ return LayoutEntity;
45
+ }(abstract_entity_1.AbstractEntity));
46
+ exports.LayoutEntity = LayoutEntity;
@@ -1,3 +1,2 @@
1
- import 'reflect-metadata';
2
1
  export declare type AddOrganizationMembers = string[];
3
2
  export declare type RemoveOrganizationMembers = string[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { AbstractDocument } from '../../../abstract/abstract.document';
2
+ import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from './organization.types';
3
+ interface OrganizationMetadata {
4
+ information?: OrganizationMetadataInformation;
5
+ localization?: OrganizationMetadataLocalization;
6
+ address?: OrganizationMetadataAddress;
7
+ social?: OrganizationMetadataSocial[];
8
+ }
9
+ export declare class OrganizationDocument extends AbstractDocument {
10
+ logoUrl: string;
11
+ name: string;
12
+ displayName: string;
13
+ metadata: OrganizationMetadata;
14
+ }
15
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.OrganizationDocument = void 0;
19
+ var abstract_document_1 = require("../../../abstract/abstract.document");
20
+ var OrganizationDocument = (function (_super) {
21
+ __extends(OrganizationDocument, _super);
22
+ function OrganizationDocument() {
23
+ var _this = _super !== null && _super.apply(this, arguments) || this;
24
+ _this.metadata = {
25
+ social: [],
26
+ };
27
+ return _this;
28
+ }
29
+ return OrganizationDocument;
30
+ }(abstract_document_1.AbstractDocument));
31
+ exports.OrganizationDocument = OrganizationDocument;
@@ -0,0 +1,4 @@
1
+ import { AbstractEntity } from '../../../abstract/abstract.entity';
2
+ export declare class OrganizationEntity extends AbstractEntity {
3
+ static readonly $index = "setting_organization";
4
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.OrganizationEntity = void 0;
19
+ var abstract_entity_1 = require("../../../abstract/abstract.entity");
20
+ var OrganizationEntity = (function (_super) {
21
+ __extends(OrganizationEntity, _super);
22
+ function OrganizationEntity() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ OrganizationEntity.$index = 'setting_organization';
26
+ return OrganizationEntity;
27
+ }(abstract_entity_1.AbstractEntity));
28
+ exports.OrganizationEntity = OrganizationEntity;
@@ -0,0 +1,22 @@
1
+ import { MetaAddress } from '../../../types';
2
+ export declare class OrganizationMetadataInformation {
3
+ title: string;
4
+ description?: string;
5
+ keywords: string[];
6
+ }
7
+ export declare class OrganizationMetadataLocalization {
8
+ language: string;
9
+ currency: string;
10
+ }
11
+ export declare class OrganizationMetadataSocial {
12
+ name: string;
13
+ url: string;
14
+ }
15
+ export declare class OrganizationMetadataAddress implements Omit<MetaAddress, 'name'> {
16
+ country: string;
17
+ code: string;
18
+ line1: string;
19
+ line2?: string;
20
+ city: string;
21
+ state: string;
22
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrganizationMetadataAddress = exports.OrganizationMetadataSocial = exports.OrganizationMetadataLocalization = exports.OrganizationMetadataInformation = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var OrganizationMetadataInformation = (function () {
15
+ function OrganizationMetadataInformation() {
16
+ this.keywords = [];
17
+ }
18
+ __decorate([
19
+ (0, class_validator_1.IsOptional)(),
20
+ (0, class_validator_1.IsString)(),
21
+ __metadata("design:type", String)
22
+ ], OrganizationMetadataInformation.prototype, "title", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], OrganizationMetadataInformation.prototype, "description", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsString)({ each: true }),
31
+ __metadata("design:type", Array)
32
+ ], OrganizationMetadataInformation.prototype, "keywords", void 0);
33
+ return OrganizationMetadataInformation;
34
+ }());
35
+ exports.OrganizationMetadataInformation = OrganizationMetadataInformation;
36
+ var OrganizationMetadataLocalization = (function () {
37
+ function OrganizationMetadataLocalization() {
38
+ }
39
+ __decorate([
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsString)(),
42
+ __metadata("design:type", String)
43
+ ], OrganizationMetadataLocalization.prototype, "language", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_validator_1.IsString)(),
47
+ __metadata("design:type", String)
48
+ ], OrganizationMetadataLocalization.prototype, "currency", void 0);
49
+ return OrganizationMetadataLocalization;
50
+ }());
51
+ exports.OrganizationMetadataLocalization = OrganizationMetadataLocalization;
52
+ var OrganizationMetadataSocial = (function () {
53
+ function OrganizationMetadataSocial() {
54
+ }
55
+ __decorate([
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, class_validator_1.IsString)(),
58
+ __metadata("design:type", String)
59
+ ], OrganizationMetadataSocial.prototype, "name", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsOptional)(),
62
+ (0, class_validator_1.IsUrl)(),
63
+ __metadata("design:type", String)
64
+ ], OrganizationMetadataSocial.prototype, "url", void 0);
65
+ return OrganizationMetadataSocial;
66
+ }());
67
+ exports.OrganizationMetadataSocial = OrganizationMetadataSocial;
68
+ var OrganizationMetadataAddress = (function () {
69
+ function OrganizationMetadataAddress() {
70
+ }
71
+ __decorate([
72
+ (0, class_validator_1.IsOptional)(),
73
+ __metadata("design:type", String)
74
+ ], OrganizationMetadataAddress.prototype, "country", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsString)(),
77
+ (0, class_validator_1.IsOptional)(),
78
+ __metadata("design:type", String)
79
+ ], OrganizationMetadataAddress.prototype, "code", void 0);
80
+ __decorate([
81
+ (0, class_validator_1.IsString)(),
82
+ (0, class_validator_1.IsOptional)(),
83
+ __metadata("design:type", String)
84
+ ], OrganizationMetadataAddress.prototype, "line1", void 0);
85
+ __decorate([
86
+ (0, class_validator_1.IsString)(),
87
+ (0, class_validator_1.IsOptional)(),
88
+ __metadata("design:type", String)
89
+ ], OrganizationMetadataAddress.prototype, "line2", void 0);
90
+ __decorate([
91
+ (0, class_validator_1.IsOptional)(),
92
+ (0, class_validator_1.IsString)(),
93
+ __metadata("design:type", String)
94
+ ], OrganizationMetadataAddress.prototype, "city", void 0);
95
+ __decorate([
96
+ (0, class_validator_1.IsString)(),
97
+ (0, class_validator_1.IsOptional)(),
98
+ __metadata("design:type", String)
99
+ ], OrganizationMetadataAddress.prototype, "state", void 0);
100
+ return OrganizationMetadataAddress;
101
+ }());
102
+ exports.OrganizationMetadataAddress = OrganizationMetadataAddress;
@@ -0,0 +1,17 @@
1
+ import { CreateOrganization, UpdateOrganization } from 'auth0';
2
+ import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from './organization.types';
3
+ export declare class OrganizationMetadataValidator {
4
+ information?: OrganizationMetadataInformation;
5
+ localization?: OrganizationMetadataLocalization;
6
+ address?: OrganizationMetadataAddress;
7
+ social?: OrganizationMetadataSocial[];
8
+ }
9
+ export declare class CreateOrganizationValidator implements CreateOrganization {
10
+ name: string;
11
+ email: string;
12
+ password?: string;
13
+ }
14
+ export declare class UpdateOrganizationValidator implements UpdateOrganization {
15
+ display_name?: string;
16
+ metadata: OrganizationMetadataValidator;
17
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateOrganizationValidator = exports.CreateOrganizationValidator = exports.OrganizationMetadataValidator = void 0;
13
+ var class_transformer_1 = require("class-transformer");
14
+ var class_validator_1 = require("class-validator");
15
+ var organization_types_1 = require("./organization.types");
16
+ var OrganizationMetadataValidator = (function () {
17
+ function OrganizationMetadataValidator() {
18
+ }
19
+ __decorate([
20
+ (0, class_validator_1.IsOptional)(),
21
+ (0, class_validator_1.ValidateNested)(),
22
+ (0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataInformation; }),
23
+ __metadata("design:type", organization_types_1.OrganizationMetadataInformation)
24
+ ], OrganizationMetadataValidator.prototype, "information", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.ValidateNested)(),
28
+ (0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataLocalization; }),
29
+ __metadata("design:type", organization_types_1.OrganizationMetadataLocalization)
30
+ ], OrganizationMetadataValidator.prototype, "localization", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.ValidateNested)(),
34
+ (0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataAddress; }),
35
+ __metadata("design:type", organization_types_1.OrganizationMetadataAddress)
36
+ ], OrganizationMetadataValidator.prototype, "address", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.ValidateNested)({ each: true }),
40
+ (0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataSocial; }),
41
+ __metadata("design:type", Array)
42
+ ], OrganizationMetadataValidator.prototype, "social", void 0);
43
+ return OrganizationMetadataValidator;
44
+ }());
45
+ exports.OrganizationMetadataValidator = OrganizationMetadataValidator;
46
+ var CreateOrganizationValidator = (function () {
47
+ function CreateOrganizationValidator() {
48
+ }
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ (0, class_validator_1.Length)(3, 255),
52
+ __metadata("design:type", String)
53
+ ], CreateOrganizationValidator.prototype, "name", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsString)(),
56
+ (0, class_validator_1.IsEmail)(),
57
+ __metadata("design:type", String)
58
+ ], CreateOrganizationValidator.prototype, "email", void 0);
59
+ __decorate([
60
+ (0, class_validator_1.IsString)(),
61
+ __metadata("design:type", String)
62
+ ], CreateOrganizationValidator.prototype, "password", void 0);
63
+ return CreateOrganizationValidator;
64
+ }());
65
+ exports.CreateOrganizationValidator = CreateOrganizationValidator;
66
+ var UpdateOrganizationValidator = (function () {
67
+ function UpdateOrganizationValidator() {
68
+ }
69
+ __decorate([
70
+ (0, class_validator_1.IsString)(),
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, class_validator_1.Length)(3, 255),
73
+ __metadata("design:type", String)
74
+ ], UpdateOrganizationValidator.prototype, "display_name", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsOptional)(),
77
+ (0, class_validator_1.ValidateNested)(),
78
+ (0, class_transformer_1.Type)(function () { return OrganizationMetadataValidator; }),
79
+ __metadata("design:type", OrganizationMetadataValidator)
80
+ ], UpdateOrganizationValidator.prototype, "metadata", void 0);
81
+ return UpdateOrganizationValidator;
82
+ }());
83
+ exports.UpdateOrganizationValidator = UpdateOrganizationValidator;
@@ -0,0 +1,6 @@
1
+ import { AbstractEntity } from '../../../abstract/abstract.entity';
2
+ export declare class ThemeEntity extends AbstractEntity {
3
+ static readonly $index = "settings_theme";
4
+ path: string;
5
+ content: Map<string, any>;
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ 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;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.ThemeEntity = void 0;
28
+ var mongoose_1 = require("@nestjs/mongoose");
29
+ var mongoose_2 = require("mongoose");
30
+ var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
+ var ThemeEntity = (function (_super) {
32
+ __extends(ThemeEntity, _super);
33
+ function ThemeEntity() {
34
+ return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ ThemeEntity.$index = 'settings_theme';
37
+ __decorate([
38
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
39
+ __metadata("design:type", String)
40
+ ], ThemeEntity.prototype, "path", void 0);
41
+ ThemeEntity = __decorate([
42
+ (0, mongoose_1.Schema)({ timestamps: true })
43
+ ], ThemeEntity);
44
+ return ThemeEntity;
45
+ }(abstract_entity_1.AbstractEntity));
46
+ exports.ThemeEntity = ThemeEntity;
@@ -0,0 +1,10 @@
1
+ import { MetaAddress } from '../../types';
2
+ export declare class AddressValidator implements MetaAddress {
3
+ name: string;
4
+ country: string;
5
+ code: string;
6
+ line1: string;
7
+ line2?: string;
8
+ city: string;
9
+ state: string;
10
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AddressValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var AddressValidator = (function () {
15
+ function AddressValidator() {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", String)
20
+ ], AddressValidator.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsISO31661Alpha2)(),
23
+ __metadata("design:type", String)
24
+ ], AddressValidator.prototype, "country", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], AddressValidator.prototype, "code", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], AddressValidator.prototype, "line1", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.IsOptional)(),
36
+ __metadata("design:type", String)
37
+ ], AddressValidator.prototype, "line2", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsString)(),
41
+ __metadata("design:type", String)
42
+ ], AddressValidator.prototype, "city", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsString)(),
45
+ (0, class_validator_1.IsOptional)(),
46
+ __metadata("design:type", String)
47
+ ], AddressValidator.prototype, "state", void 0);
48
+ return AddressValidator;
49
+ }());
50
+ exports.AddressValidator = AddressValidator;
@@ -0,0 +1,23 @@
1
+ import { GetResponse, SearchHit, SearchRequest, SearchTotalHits } from '@elastic/elasticsearch/lib/api/types';
2
+ import { AppMetadata, User, UserMetadata } from 'auth0';
3
+ export declare type Document<D> = GetResponse<D>;
4
+ export declare type Search<D> = {
5
+ total: SearchTotalHits;
6
+ hits: SearchHit<D>[];
7
+ max_score?: number;
8
+ };
9
+ export declare type SearchQuery = Omit<SearchRequest, 'index' | 'filter_path'>;
10
+ export interface MetaAddress {
11
+ name: string;
12
+ country: string;
13
+ code: string;
14
+ line1: string;
15
+ line2?: string;
16
+ city: string;
17
+ state: string;
18
+ }
19
+ export interface UserMeta extends UserMetadata {
20
+ addresses?: MetaAddress[];
21
+ }
22
+ export declare type AppMeta = AppMetadata;
23
+ export declare type UserDocument = User<AppMeta, UserMeta>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });