@hosterai/types 0.0.17 → 0.0.19
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.
- package/README.md +12 -9
- package/dist/decorators/all-or-none-validator.spec.d.ts +1 -0
- package/dist/decorators/all-or-none-validator.spec.js +91 -0
- package/dist/decorators/all-or-none.validator.d.ts +2 -0
- package/dist/decorators/all-or-none.validator.js +71 -0
- package/dist/decorators/at-least-one-non-empty-validator.spec.d.ts +1 -0
- package/dist/decorators/at-least-one-non-empty-validator.spec.js +79 -0
- package/dist/decorators/at-least-one-non-empty.validator.d.ts +2 -0
- package/dist/decorators/at-least-one-non-empty.validator.js +43 -0
- package/dist/decorators/is-of-allowed-types-validator.spec.d.ts +1 -0
- package/dist/decorators/is-of-allowed-types-validator.spec.js +188 -0
- package/dist/decorators/is-of-allowed-types.validator.d.ts +16 -0
- package/dist/decorators/is-of-allowed-types.validator.js +105 -0
- package/dist/decorators/is-one-of-validator.spec.d.ts +1 -0
- package/dist/decorators/is-one-of-validator.spec.js +51 -0
- package/dist/decorators/is-one-of.validator.d.ts +2 -0
- package/dist/decorators/is-one-of.validator.js +19 -0
- package/dist/decorators/is-plain-object-validator.spec.d.ts +1 -0
- package/dist/decorators/is-plain-object-validator.spec.js +46 -0
- package/dist/decorators/is-plain-object.validator.d.ts +2 -0
- package/dist/decorators/is-plain-object.validator.js +30 -0
- package/dist/decorators/is-property-forbidden-validator.spec.d.ts +1 -0
- package/dist/decorators/is-property-forbidden-validator.spec.js +62 -0
- package/dist/decorators/is-property-forbidden.validator.d.ts +2 -0
- package/dist/decorators/is-property-forbidden.validator.js +22 -0
- package/dist/decorators/is-regex-validator.spec.d.ts +1 -0
- package/dist/decorators/is-regex-validator.spec.js +46 -0
- package/dist/decorators/is-regex.validator.d.ts +2 -0
- package/dist/decorators/is-regex.validator.js +32 -0
- package/dist/decorators/min-less-or-equal-validator.spec.d.ts +1 -0
- package/dist/decorators/min-less-or-equal-validator.spec.js +60 -0
- package/dist/decorators/min-less-or-equal.validator.d.ts +2 -0
- package/dist/decorators/min-less-or-equal.validator.js +58 -0
- package/dist/decorators/unique-field-in-array-validator.spec.d.ts +1 -0
- package/dist/decorators/unique-field-in-array-validator.spec.js +39 -0
- package/dist/decorators/unique-field-in-array.validator.d.ts +6 -0
- package/dist/decorators/unique-field-in-array.validator.js +47 -0
- package/dist/dtos/action.dto.js +25 -1
- package/dist/dtos/admin-panel.dto.d.ts +38 -0
- package/dist/dtos/admin-panel.dto.js +241 -0
- package/dist/dtos/client-panel.dto.d.ts +24 -0
- package/dist/dtos/client-panel.dto.js +105 -0
- package/dist/dtos/company-data.dto.js +1 -1
- package/dist/dtos/field-option.dto.js +16 -0
- package/dist/dtos/field.dto.d.ts +2 -0
- package/dist/dtos/field.dto.js +112 -2
- package/dist/dtos/info.dto.d.ts +4 -79
- package/dist/dtos/info.dto.js +141 -0
- package/dist/dtos/menu.dto.d.ts +5 -6
- package/dist/dtos/menu.dto.js +108 -0
- package/dist/dtos/multilang-text.dto.js +1 -1
- package/dist/dtos/notification/notification-info.dto.js +42 -0
- package/dist/dtos/product/product-info.dto.js +73 -0
- package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
- package/dist/dtos/settings.dto.d.ts +14 -0
- package/dist/dtos/settings.dto.js +81 -0
- package/dist/dtos/tab.dto.js +32 -0
- package/dist/dtos/unit.dto.js +47 -0
- package/dist/index.d.ts +23 -7
- package/dist/index.js +26 -7
- package/dist/openapi/schemas/components.schemas.d.ts +991 -0
- package/dist/openapi/schemas/components.schemas.js +2552 -0
- package/dist/transformers/menu.transformer.d.ts +2 -0
- package/dist/transformers/menu.transformer.js +16 -0
- package/dist/transformers/settings.transformer.d.ts +1 -0
- package/dist/transformers/settings.transformer.js +15 -0
- package/dist/validators/action-validator.spec.d.ts +1 -0
- package/dist/validators/action-validator.spec.js +67 -0
- package/dist/validators/admin-panel-more-actions-validator.spec.d.ts +1 -0
- package/dist/validators/admin-panel-more-actions-validator.spec.js +129 -0
- package/dist/validators/admin-panel-more-actions.validator.d.ts +2 -0
- package/dist/validators/admin-panel-more-actions.validator.js +11 -0
- package/dist/validators/admin-panel-tabs-validator.spec.d.ts +1 -0
- package/dist/validators/admin-panel-tabs-validator.spec.js +39 -0
- package/dist/validators/admin-panel-tabs.validator.d.ts +2 -0
- package/dist/validators/admin-panel-tabs.validator.js +11 -0
- package/dist/validators/admin-panel-validator.spec.d.ts +1 -0
- package/dist/validators/admin-panel-validator.spec.js +112 -0
- package/dist/validators/admin-panel.validator.d.ts +2 -0
- package/dist/validators/admin-panel.validator.js +14 -0
- package/dist/validators/client-data-validator.spec.d.ts +1 -0
- package/dist/validators/client-data-validator.spec.js +35 -0
- package/dist/validators/client-panel-validator.spec.d.ts +1 -0
- package/dist/validators/client-panel-validator.spec.js +51 -0
- package/dist/validators/client-panel.validator.d.ts +2 -0
- package/dist/validators/client-panel.validator.js +14 -0
- package/dist/validators/company-data-validator.spec.d.ts +1 -0
- package/dist/validators/company-data-validator.spec.js +73 -0
- package/dist/validators/field-option-validator.spec.d.ts +1 -0
- package/dist/validators/field-option-validator.spec.js +28 -0
- package/dist/validators/field-option.validator.d.ts +2 -0
- package/dist/validators/field-option.validator.js +11 -0
- package/dist/validators/field-validator.spec.d.ts +1 -0
- package/dist/validators/field-validator.spec.js +102 -0
- package/dist/validators/jwt-validator.spec.d.ts +2 -0
- package/dist/validators/jwt-validator.spec.js +43 -0
- package/dist/validators/menu-with-submenu-validator.spec.d.ts +1 -0
- package/dist/validators/menu-with-submenu-validator.spec.js +52 -0
- package/dist/validators/menu-with-submenu.validator.d.ts +2 -0
- package/dist/validators/menu-with-submenu.validator.js +11 -0
- package/dist/validators/menu-with-url-validator.spec.d.ts +1 -0
- package/dist/validators/menu-with-url-validator.spec.js +70 -0
- package/dist/validators/menu-with-url.validator.d.ts +2 -0
- package/dist/validators/menu-with-url.validator.js +11 -0
- package/dist/validators/multilang-text-validator.spec.d.ts +1 -0
- package/dist/validators/multilang-text-validator.spec.js +33 -0
- package/dist/validators/notification-info-validator.spec.d.ts +1 -0
- package/dist/validators/notification-info-validator.spec.js +82 -0
- package/dist/validators/notification-info.validator.d.ts +7 -0
- package/dist/validators/notification-info.validator.js +16 -0
- package/dist/validators/notification-request-validator.spec.d.ts +1 -0
- package/dist/validators/notification-request-validator.spec.js +115 -0
- package/dist/validators/product-create-request-validator.spec.d.ts +2 -0
- package/dist/validators/product-create-request-validator.spec.js +44 -0
- package/dist/validators/product-delete-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-delete-request-validator.spec.js +40 -0
- package/dist/validators/product-downgradable-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-downgradable-request-validator.spec.js +40 -0
- package/dist/validators/product-downgrade-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-downgrade-request-validator.spec.js +46 -0
- package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-downgradeable-request-validator.js +17 -0
- package/dist/validators/product-info-validator.spec.d.ts +1 -0
- package/dist/validators/product-info-validator.spec.js +259 -0
- package/dist/validators/product-info.validator.d.ts +2 -0
- package/dist/validators/product-info.validator.js +11 -0
- package/dist/validators/product-renew-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-renew-request-validator.spec.js +40 -0
- package/dist/validators/product-suspend-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-suspend-request-validator.spec.js +40 -0
- package/dist/validators/product-unsuspend-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-unsuspend-request-validator.spec.js +40 -0
- package/dist/validators/product-upgradable-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-upgradable-request-validator.spec.js +40 -0
- package/dist/validators/product-upgrade-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-upgrade-request-validator.spec.js +46 -0
- package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-upgradeable-request-validator.js +17 -0
- package/dist/validators/product-validate-attributes-request-validator.spec.d.ts +1 -0
- package/dist/validators/product-validate-attributes-request-validator.spec.js +27 -0
- package/dist/validators/receiver-email-validator.spec.d.ts +1 -0
- package/dist/validators/receiver-email-validator.spec.js +32 -0
- package/dist/validators/receiver-push-validator.spec.d.ts +1 -0
- package/dist/validators/receiver-push-validator.spec.js +31 -0
- package/dist/validators/receiver-sms-validator.spec.d.ts +1 -0
- package/dist/validators/receiver-sms-validator.spec.js +29 -0
- package/dist/validators/sender-email-validator.spec.d.ts +2 -0
- package/dist/validators/sender-email-validator.spec.js +62 -0
- package/dist/validators/sender-push-validator.spec.d.ts +1 -0
- package/dist/validators/sender-push-validator.spec.js +38 -0
- package/dist/validators/sender-sms-validator.spec.d.ts +1 -0
- package/dist/validators/sender-sms-validator.spec.js +22 -0
- package/dist/validators/settings-with-tabs-validator.spec.d.ts +1 -0
- package/dist/validators/settings-with-tabs-validator.spec.js +29 -0
- package/dist/validators/settings-with-tabs.validator.d.ts +2 -0
- package/dist/validators/settings-with-tabs.validator.js +11 -0
- package/dist/validators/settings-with-url-validator.spec.d.ts +1 -0
- package/dist/validators/settings-with-url-validator.spec.js +29 -0
- package/dist/validators/settings-with-url.validator.d.ts +2 -0
- package/dist/validators/settings-with-url.validator.js +11 -0
- package/dist/validators/unit-validator.spec.d.ts +1 -0
- package/dist/validators/unit-validator.spec.js +27 -0
- package/dist/validators/unit.validator.d.ts +2 -0
- package/dist/validators/unit.validator.js +11 -0
- package/package.json +4 -1
- package/dist/dtos/info/info-notification.dto.d.ts +0 -5
- package/dist/dtos/info/info-notification.dto.js +0 -7
- package/dist/dtos/info/info.dto.d.ts +0 -196
- package/dist/dtos/info/info.dto.js +0 -278
- package/dist/dtos/notification/notification-request.dto.d.ts +0 -20
- package/dist/dtos/notification/notification-request.dto.js +0 -31
- package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
- package/dist/dtos/receiver/receiver-email.dto.js +0 -39
- package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
- package/dist/dtos/receiver/receiver-push.dto.js +0 -31
- package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
- package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
- package/dist/dtos/request.dto.d.ts +0 -20
- package/dist/dtos/request.dto.js +0 -31
- package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
- package/dist/dtos/sender/sender-email.dto.js +0 -46
- package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
- package/dist/dtos/sender/sender-push.dto.js +0 -50
- package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
- package/dist/dtos/sender/sender-sms.dto.js +0 -30
- package/dist/enums/message-type.enum.d.ts +0 -5
- package/dist/enums/message-type.enum.js +0 -9
package/dist/dtos/info.dto.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { ActionsEnum } from '../enums/actions.enum';
|
|
|
2
2
|
import { EventsEnum } from '../enums/events.enum';
|
|
3
3
|
import { LanguageEnum } from '../enums/language.enum';
|
|
4
4
|
import { RolesEnum } from '../enums/roles.enum';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { MenuDtoWithSubmenu, MenuDtoWithUrl } from './menu.dto';
|
|
5
|
+
import { AdminPanelDto } from './admin-panel.dto';
|
|
6
|
+
import { ClientPanelDto } from './client-panel.dto';
|
|
8
7
|
/**
|
|
9
8
|
* DTO for integration information.
|
|
10
9
|
* This is a central DTO that contains all the necessary information
|
|
@@ -48,86 +47,12 @@ export declare class InfoDto {
|
|
|
48
47
|
* Configuration for the admin panel.
|
|
49
48
|
* This section defines the entire user interface for the integration's admin panel.
|
|
50
49
|
*/
|
|
51
|
-
adminPanel?:
|
|
52
|
-
/**
|
|
53
|
-
* Defines the tab structure for different sections of the admin panel.
|
|
54
|
-
* Each property represents a section (e.g., product, item) and contains an array of TabDto objects.
|
|
55
|
-
*/
|
|
56
|
-
tabs?: {
|
|
57
|
-
/** Tabs for the product management section. */
|
|
58
|
-
product: TabDto[];
|
|
59
|
-
/** Tabs for the item management section. */
|
|
60
|
-
item: TabDto[];
|
|
61
|
-
/** Tabs for the client management section. */
|
|
62
|
-
client: TabDto[];
|
|
63
|
-
/** Tabs for the user management section. */
|
|
64
|
-
user: TabDto[];
|
|
65
|
-
/** Tabs for the order management section. */
|
|
66
|
-
order: TabDto[];
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Defines additional actions that can be performed in different sections of the admin panel.
|
|
70
|
-
*/
|
|
71
|
-
moreActions?: {
|
|
72
|
-
/** Actions available in the client management section. */
|
|
73
|
-
client?: ActionDto[];
|
|
74
|
-
/** Actions available in the item management section. */
|
|
75
|
-
item?: ActionDto[];
|
|
76
|
-
/** Actions available in the invoice management section. */
|
|
77
|
-
invoice?: ActionDto[];
|
|
78
|
-
/** Actions available in the user management section. */
|
|
79
|
-
user?: ActionDto[];
|
|
80
|
-
/** Actions available in the order management section. */
|
|
81
|
-
order?: ActionDto[];
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* The main menu for the admin panel.
|
|
85
|
-
* This can be a simple menu with a URL or a menu with submenus.
|
|
86
|
-
*/
|
|
87
|
-
menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
|
|
88
|
-
/**
|
|
89
|
-
* Configuration for the integration's settings page.
|
|
90
|
-
*/
|
|
91
|
-
settings?: {
|
|
92
|
-
/** The label for the settings page. */
|
|
93
|
-
label: string;
|
|
94
|
-
/** The icon for the settings page. */
|
|
95
|
-
icon: string;
|
|
96
|
-
/** A description of the settings page. */
|
|
97
|
-
description: string;
|
|
98
|
-
} & ({
|
|
99
|
-
url: string;
|
|
100
|
-
tabs?: never;
|
|
101
|
-
} | {
|
|
102
|
-
url?: never;
|
|
103
|
-
tabs: [TabDto, ...TabDto[]];
|
|
104
|
-
});
|
|
105
|
-
};
|
|
50
|
+
adminPanel?: AdminPanelDto;
|
|
106
51
|
/**
|
|
107
52
|
* Configuration for the client panel.
|
|
108
53
|
* This section defines the user interface for the integration's client-facing panel.
|
|
109
54
|
*/
|
|
110
|
-
clientPanel?:
|
|
111
|
-
/**
|
|
112
|
-
* Defines the tab structure for the client panel.
|
|
113
|
-
*/
|
|
114
|
-
tabs?: {
|
|
115
|
-
/** Tabs for the item management section. */
|
|
116
|
-
item: TabDto[];
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Defines additional actions that can be performed in the client panel.
|
|
120
|
-
*/
|
|
121
|
-
moreActions?: {
|
|
122
|
-
/** Actions available in the item management section. */
|
|
123
|
-
item?: ActionDto[];
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* The main menu for the client panel.
|
|
127
|
-
* This can be a simple menu with a URL or a menu with submenus.
|
|
128
|
-
*/
|
|
129
|
-
menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
|
|
130
|
-
};
|
|
55
|
+
clientPanel?: ClientPanelDto;
|
|
131
56
|
/**
|
|
132
57
|
* The URL for the onboarding process after the integration is installed.
|
|
133
58
|
* This URL will be displayed in a popup or side sheet with a JWT for authentication.
|
package/dist/dtos/info.dto.js
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.InfoDto = void 0;
|
|
13
|
+
const actions_enum_1 = require("../enums/actions.enum");
|
|
14
|
+
const events_enum_1 = require("../enums/events.enum");
|
|
15
|
+
const language_enum_1 = require("../enums/language.enum");
|
|
16
|
+
const roles_enum_1 = require("../enums/roles.enum");
|
|
17
|
+
// import { ActionDto } from './action.dto';
|
|
18
|
+
// import { TabDto } from './tab.dto';
|
|
19
|
+
// import { MenuDtoWithSubmenu, MenuDtoWithUrl } from './menu.dto';
|
|
20
|
+
const class_validator_1 = require("class-validator");
|
|
21
|
+
const class_transformer_1 = require("class-transformer");
|
|
22
|
+
const admin_panel_dto_1 = require("./admin-panel.dto");
|
|
23
|
+
const client_panel_dto_1 = require("./client-panel.dto");
|
|
24
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
4
25
|
/**
|
|
5
26
|
* DTO for integration information.
|
|
6
27
|
* This is a central DTO that contains all the necessary information
|
|
@@ -16,3 +37,123 @@ class InfoDto {
|
|
|
16
37
|
}
|
|
17
38
|
}
|
|
18
39
|
exports.InfoDto = InfoDto;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
44
|
+
title: 'Title',
|
|
45
|
+
description: 'Integration display title.',
|
|
46
|
+
type: 'string',
|
|
47
|
+
example: 'Example Product'
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], InfoDto.prototype, "title", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
55
|
+
title: 'Logo URL',
|
|
56
|
+
description: 'Public HTTPS URL for the integration logo.',
|
|
57
|
+
type: 'string',
|
|
58
|
+
format: 'uri',
|
|
59
|
+
example: 'https://cdn.example.com/logo.png'
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], InfoDto.prototype, "logo", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
67
|
+
title: 'Description',
|
|
68
|
+
description: 'Short description of the integration.',
|
|
69
|
+
type: 'string',
|
|
70
|
+
example: 'An example product integration.'
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], InfoDto.prototype, "description", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsDefined)(),
|
|
76
|
+
(0, class_validator_1.IsArray)(),
|
|
77
|
+
(0, class_validator_1.IsEnum)(language_enum_1.LanguageEnum, { each: true }),
|
|
78
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
79
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
80
|
+
title: 'Supported Languages',
|
|
81
|
+
description: 'Locales supported by the integration.',
|
|
82
|
+
type: 'array',
|
|
83
|
+
items: { type: 'string', enum: Object.values(language_enum_1.LanguageEnum) },
|
|
84
|
+
example: ['en']
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Array)
|
|
87
|
+
], InfoDto.prototype, "supportedLanguages", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsArray)(),
|
|
91
|
+
(0, class_validator_1.IsEnum)(actions_enum_1.ActionsEnum, { each: true }),
|
|
92
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
93
|
+
title: 'Supported Actions',
|
|
94
|
+
description: 'Actions supported by this integration.',
|
|
95
|
+
type: 'array',
|
|
96
|
+
items: { type: 'string', enum: Object.values(actions_enum_1.ActionsEnum) }
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], InfoDto.prototype, "supportedActions", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
(0, class_validator_1.IsArray)(),
|
|
103
|
+
(0, class_validator_1.IsEnum)(events_enum_1.EventsEnum, { each: true }),
|
|
104
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
105
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
106
|
+
title: 'Listen Events',
|
|
107
|
+
description: 'Platform events the integration can subscribe to.',
|
|
108
|
+
type: 'array',
|
|
109
|
+
items: { type: 'string', enum: Object.values(events_enum_1.EventsEnum) }
|
|
110
|
+
}),
|
|
111
|
+
__metadata("design:type", Array)
|
|
112
|
+
], InfoDto.prototype, "listenEvents", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
(0, class_validator_1.IsArray)(),
|
|
116
|
+
(0, class_validator_1.IsEnum)(roles_enum_1.RolesEnum, { each: true }),
|
|
117
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
118
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
119
|
+
title: 'Required Roles',
|
|
120
|
+
description: 'Roles required for this integration to operate.',
|
|
121
|
+
type: 'array',
|
|
122
|
+
items: { type: 'string', enum: Object.values(roles_enum_1.RolesEnum) }
|
|
123
|
+
}),
|
|
124
|
+
__metadata("design:type", Array)
|
|
125
|
+
], InfoDto.prototype, "requiredRoles", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.IsOptional)(),
|
|
128
|
+
(0, class_validator_1.ValidateNested)(),
|
|
129
|
+
(0, class_transformer_1.Type)(() => admin_panel_dto_1.AdminPanelDto),
|
|
130
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
131
|
+
title: 'Admin Panel',
|
|
132
|
+
description: 'Admin UI links, tabs, and actions provided by the integration.',
|
|
133
|
+
type: 'object'
|
|
134
|
+
}),
|
|
135
|
+
__metadata("design:type", admin_panel_dto_1.AdminPanelDto)
|
|
136
|
+
], InfoDto.prototype, "adminPanel", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsOptional)(),
|
|
139
|
+
(0, class_validator_1.ValidateNested)(),
|
|
140
|
+
(0, class_transformer_1.Type)(() => client_panel_dto_1.ClientPanelDto),
|
|
141
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
142
|
+
title: 'Client Panel',
|
|
143
|
+
description: 'Client UI links, tabs, and actions provided by the integration.',
|
|
144
|
+
type: 'object'
|
|
145
|
+
}),
|
|
146
|
+
__metadata("design:type", client_panel_dto_1.ClientPanelDto)
|
|
147
|
+
], InfoDto.prototype, "clientPanel", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, class_validator_1.IsOptional)(),
|
|
150
|
+
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
151
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
152
|
+
title: 'Onboarding URL',
|
|
153
|
+
description: 'URL to onboard/configure the integration.',
|
|
154
|
+
type: 'string',
|
|
155
|
+
format: 'uri',
|
|
156
|
+
example: 'https://example.com/onboarding'
|
|
157
|
+
}),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], InfoDto.prototype, "onboardingUrl", void 0);
|
package/dist/dtos/menu.dto.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TabDto } from './tab.dto';
|
|
2
2
|
/**
|
|
3
3
|
* Base properties shared by all menu items.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
export declare class BaseMenuDto {
|
|
6
6
|
/**
|
|
7
7
|
* The icon to be displayed for the menu item.
|
|
8
8
|
* @example "home"
|
|
@@ -18,7 +18,7 @@ interface BaseMenuDto {
|
|
|
18
18
|
* Represents a menu item that links directly to a URL.
|
|
19
19
|
* This type of menu item does not have a submenu.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export declare class MenuDtoWithUrl extends BaseMenuDto {
|
|
22
22
|
/**
|
|
23
23
|
* The type of the menu item. This is a discriminator property.
|
|
24
24
|
*/
|
|
@@ -37,7 +37,7 @@ export interface MenuDtoWithUrl extends BaseMenuDto {
|
|
|
37
37
|
* Represents a menu item that contains a submenu.
|
|
38
38
|
* This type of menu item does not have a direct URL.
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export declare class MenuDtoWithSubmenu extends BaseMenuDto {
|
|
41
41
|
/**
|
|
42
42
|
* The type of the menu item. This is a discriminator property.
|
|
43
43
|
*/
|
|
@@ -50,6 +50,5 @@ export interface MenuDtoWithSubmenu extends BaseMenuDto {
|
|
|
50
50
|
* The list of tabs that will appear in the submenu.
|
|
51
51
|
* If there is only one tab, no submenu or navigation bar will be displayed.
|
|
52
52
|
*/
|
|
53
|
-
submenu:
|
|
53
|
+
submenu: TabDto[];
|
|
54
54
|
}
|
|
55
|
-
export {};
|
package/dist/dtos/menu.dto.js
CHANGED
|
@@ -1,2 +1,110 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MenuDtoWithSubmenu = exports.MenuDtoWithUrl = exports.BaseMenuDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const is_property_forbidden_validator_1 = require("../decorators/is-property-forbidden.validator");
|
|
16
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
17
|
+
const tab_dto_1 = require("./tab.dto");
|
|
18
|
+
/**
|
|
19
|
+
* Base properties shared by all menu items.
|
|
20
|
+
*/
|
|
21
|
+
class BaseMenuDto {
|
|
22
|
+
}
|
|
23
|
+
exports.BaseMenuDto = BaseMenuDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
28
|
+
title: 'Icon',
|
|
29
|
+
description: 'Icon for the menu item.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], BaseMenuDto.prototype, "icon", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
38
|
+
title: 'Label',
|
|
39
|
+
description: 'Label for the menu item.',
|
|
40
|
+
type: 'string',
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], BaseMenuDto.prototype, "label", void 0);
|
|
44
|
+
/**
|
|
45
|
+
* Represents a menu item that links directly to a URL.
|
|
46
|
+
* This type of menu item does not have a submenu.
|
|
47
|
+
*/
|
|
48
|
+
class MenuDtoWithUrl extends BaseMenuDto {
|
|
49
|
+
}
|
|
50
|
+
exports.MenuDtoWithUrl = MenuDtoWithUrl;
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
55
|
+
title: 'Type',
|
|
56
|
+
description: 'Type of the menu item.',
|
|
57
|
+
type: 'string',
|
|
58
|
+
}),
|
|
59
|
+
(0, class_validator_1.IsIn)(['only-url']),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], MenuDtoWithUrl.prototype, "type", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
64
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
65
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
66
|
+
title: 'URL',
|
|
67
|
+
description: 'URL associated with the menu item.',
|
|
68
|
+
type: 'string',
|
|
69
|
+
format: 'uri'
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], MenuDtoWithUrl.prototype, "url", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, is_property_forbidden_validator_1.IsPropertyForbidden)('submenu', { message: 'submenu is forbidden in MenuDtoWithUrl' }),
|
|
75
|
+
__metadata("design:type", void 0)
|
|
76
|
+
], MenuDtoWithUrl.prototype, "submenu", void 0);
|
|
77
|
+
/**
|
|
78
|
+
* Represents a menu item that contains a submenu.
|
|
79
|
+
* This type of menu item does not have a direct URL.
|
|
80
|
+
*/
|
|
81
|
+
class MenuDtoWithSubmenu extends BaseMenuDto {
|
|
82
|
+
}
|
|
83
|
+
exports.MenuDtoWithSubmenu = MenuDtoWithSubmenu;
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
87
|
+
(0, class_validator_1.IsIn)(['with-submenu']),
|
|
88
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
89
|
+
title: 'Type',
|
|
90
|
+
description: 'Type of the menu item.',
|
|
91
|
+
type: 'string',
|
|
92
|
+
}),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], MenuDtoWithSubmenu.prototype, "type", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, is_property_forbidden_validator_1.IsPropertyForbidden)('url', { message: 'url is forbidden in MenuDtoWithSubmenu' }),
|
|
97
|
+
__metadata("design:type", void 0)
|
|
98
|
+
], MenuDtoWithSubmenu.prototype, "url", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsDefined)(),
|
|
101
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
102
|
+
(0, class_transformer_1.Type)(() => tab_dto_1.TabDto),
|
|
103
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
104
|
+
title: 'Submenu',
|
|
105
|
+
description: 'List of tabs that will appear in the submenu.',
|
|
106
|
+
type: 'array',
|
|
107
|
+
items: { $ref: '#/components/schemas/TabDto' }
|
|
108
|
+
}),
|
|
109
|
+
__metadata("design:type", Array)
|
|
110
|
+
], MenuDtoWithSubmenu.prototype, "submenu", void 0);
|
|
@@ -26,6 +26,6 @@ __decorate([
|
|
|
26
26
|
], MultilangTextDto.prototype, "language", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], MultilangTextDto.prototype, "text", void 0);
|
|
@@ -1,7 +1,21 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.NotificationInfoDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const notification_message_type_enum_1 = require("../../enums/notification/notification-message-type.enum");
|
|
4
15
|
const info_dto_1 = require("../info.dto");
|
|
16
|
+
const unit_dto_1 = require("../unit.dto");
|
|
17
|
+
const class_transformer_1 = require("class-transformer");
|
|
18
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
5
19
|
/**
|
|
6
20
|
* DTO for notification information.
|
|
7
21
|
* Extends the base InfoDto to include the notification message type.
|
|
@@ -9,3 +23,31 @@ const info_dto_1 = require("../info.dto");
|
|
|
9
23
|
class NotificationInfoDto extends info_dto_1.InfoDto {
|
|
10
24
|
}
|
|
11
25
|
exports.NotificationInfoDto = NotificationInfoDto;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsEnum)(notification_message_type_enum_1.NotificationMessageTypeEnum),
|
|
28
|
+
(0, class_validator_1.IsDefined)(),
|
|
29
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
30
|
+
title: 'Notification Type',
|
|
31
|
+
description: 'Notification channel type.',
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: Object.values(notification_message_type_enum_1.NotificationMessageTypeEnum),
|
|
34
|
+
example: Object.values(notification_message_type_enum_1.NotificationMessageTypeEnum)[0]
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], NotificationInfoDto.prototype, "type", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsArray)(),
|
|
41
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
42
|
+
(0, class_transformer_1.Type)(() => unit_dto_1.UnitDto),
|
|
43
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
44
|
+
title: 'Pay-Per-Use Units',
|
|
45
|
+
description: 'Optional metering units for pay-per-use billing.',
|
|
46
|
+
type: 'array',
|
|
47
|
+
items: { $ref: '#/components/schemas/UnitDto' },
|
|
48
|
+
example: [
|
|
49
|
+
{ id: 'messages', unitDescription: 'Message sent', intervalDescription: 'Per month' }
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], NotificationInfoDto.prototype, "payPerUseUnits", void 0);
|
|
@@ -1,7 +1,23 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.ProductInfoDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const field_dto_1 = require("../field.dto");
|
|
4
15
|
const info_dto_1 = require("../info.dto");
|
|
16
|
+
const unit_dto_1 = require("../unit.dto");
|
|
17
|
+
const class_transformer_1 = require("class-transformer");
|
|
18
|
+
const is_plain_object_validator_1 = require("../../decorators/is-plain-object.validator");
|
|
19
|
+
const unique_field_in_array_validator_1 = require("../../decorators/unique-field-in-array.validator");
|
|
20
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
5
21
|
/**
|
|
6
22
|
* DTO for notification information.
|
|
7
23
|
* Extends the base InfoDto to include the notification message type.
|
|
@@ -9,3 +25,60 @@ const info_dto_1 = require("../info.dto");
|
|
|
9
25
|
class ProductInfoDto extends info_dto_1.InfoDto {
|
|
10
26
|
}
|
|
11
27
|
exports.ProductInfoDto = ProductInfoDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsArray)(),
|
|
31
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
32
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
33
|
+
(0, class_transformer_1.Type)(() => field_dto_1.FieldDto),
|
|
34
|
+
(0, unique_field_in_array_validator_1.UniqueFieldInArray)('id'),
|
|
35
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
36
|
+
title: 'Product Attributes',
|
|
37
|
+
description: 'Configurable attributes that apply at the product level.',
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: { $ref: '#/components/schemas/FieldDto' }
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], ProductInfoDto.prototype, "productAttributes", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsArray)(),
|
|
46
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
47
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
48
|
+
(0, class_transformer_1.Type)(() => field_dto_1.FieldDto),
|
|
49
|
+
(0, unique_field_in_array_validator_1.UniqueFieldInArray)('id'),
|
|
50
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
51
|
+
title: 'Item Attributes',
|
|
52
|
+
description: 'Configurable attributes that apply at the item level.',
|
|
53
|
+
type: 'array',
|
|
54
|
+
items: { $ref: '#/components/schemas/FieldDto' }
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Array)
|
|
57
|
+
], ProductInfoDto.prototype, "itemAttributes", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsArray)(),
|
|
61
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
62
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
63
|
+
(0, class_transformer_1.Type)(() => unit_dto_1.UnitDto),
|
|
64
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
65
|
+
title: 'Pay-Per-Use Units',
|
|
66
|
+
description: 'Optional metering units for pay-per-use billing.',
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: { $ref: '#/components/schemas/UnitDto' },
|
|
69
|
+
example: [{ id: 'requests', unitDescription: 'API request', intervalDescription: 'Per month' }]
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], ProductInfoDto.prototype, "payPerUseUnits", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, is_plain_object_validator_1.IsPlainObject)(),
|
|
76
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
77
|
+
title: 'Response Data Field Names',
|
|
78
|
+
description: 'Mapping of field names used in provider responses.',
|
|
79
|
+
type: 'object',
|
|
80
|
+
additionalProperties: { type: 'string' },
|
|
81
|
+
example: { external_id: 'id', status_text: 'status' }
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], ProductInfoDto.prototype, "responseDataFieldNames", void 0);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
|
+
import { ClientDataDto } from '../../client-data.dto';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a request to check if a product item is downgradable.
|
|
5
|
+
* This DTO contains all the necessary information for the check.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ProductDowngradableRequestDto {
|
|
8
|
+
/**
|
|
9
|
+
* The client's data.
|
|
10
|
+
* This object holds all the relevant information about the client initiating the request.
|
|
11
|
+
*/
|
|
12
|
+
clientData: ClientDataDto;
|
|
13
|
+
/**
|
|
14
|
+
* The data of the product item to be checked.
|
|
15
|
+
* This object contains the specific details of the product instance being evaluated.
|
|
16
|
+
*/
|
|
17
|
+
itemData: ProductItemDataDto;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.ProductDowngradableRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
|
+
const client_data_dto_1 = require("../../client-data.dto");
|
|
17
|
+
/**
|
|
18
|
+
* Represents a request to check if a product item is downgradable.
|
|
19
|
+
* This DTO contains all the necessary information for the check.
|
|
20
|
+
*/
|
|
21
|
+
class ProductDowngradableRequestDto {
|
|
22
|
+
}
|
|
23
|
+
exports.ProductDowngradableRequestDto = ProductDowngradableRequestDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsDefined)(),
|
|
26
|
+
(0, class_validator_1.IsObject)(),
|
|
27
|
+
(0, class_validator_1.ValidateNested)(),
|
|
28
|
+
(0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
|
|
29
|
+
__metadata("design:type", client_data_dto_1.ClientDataDto)
|
|
30
|
+
], ProductDowngradableRequestDto.prototype, "clientData", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsDefined)(),
|
|
33
|
+
(0, class_validator_1.IsObject)(),
|
|
34
|
+
(0, class_validator_1.ValidateNested)(),
|
|
35
|
+
(0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
|
|
36
|
+
__metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
|
|
37
|
+
], ProductDowngradableRequestDto.prototype, "itemData", void 0);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
|
+
import { ClientDataDto } from '../../client-data.dto';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a request to check if a product item is upgradeable.
|
|
5
|
+
* This DTO contains all the necessary information for the check.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ProductUpgradeableRequestDto {
|
|
8
|
+
/**
|
|
9
|
+
* The client's data.
|
|
10
|
+
* This object holds all the relevant information about the client initiating the request.
|
|
11
|
+
*/
|
|
12
|
+
clientData: ClientDataDto;
|
|
13
|
+
/**
|
|
14
|
+
* The data of the product item to be checked.
|
|
15
|
+
* This object contains the specific details of the product instance being evaluated.
|
|
16
|
+
*/
|
|
17
|
+
itemData: ProductItemDataDto;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.ProductUpgradeableRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
|
+
const client_data_dto_1 = require("../../client-data.dto");
|
|
17
|
+
/**
|
|
18
|
+
* Represents a request to check if a product item is upgradeable.
|
|
19
|
+
* This DTO contains all the necessary information for the check.
|
|
20
|
+
*/
|
|
21
|
+
class ProductUpgradeableRequestDto {
|
|
22
|
+
}
|
|
23
|
+
exports.ProductUpgradeableRequestDto = ProductUpgradeableRequestDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsDefined)(),
|
|
26
|
+
(0, class_validator_1.IsObject)(),
|
|
27
|
+
(0, class_validator_1.ValidateNested)(),
|
|
28
|
+
(0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
|
|
29
|
+
__metadata("design:type", client_data_dto_1.ClientDataDto)
|
|
30
|
+
], ProductUpgradeableRequestDto.prototype, "clientData", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsDefined)(),
|
|
33
|
+
(0, class_validator_1.IsObject)(),
|
|
34
|
+
(0, class_validator_1.ValidateNested)(),
|
|
35
|
+
(0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
|
|
36
|
+
__metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
|
|
37
|
+
], ProductUpgradeableRequestDto.prototype, "itemData", void 0);
|