@hosterai/types 0.0.24 → 0.0.26
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 +2 -1
- package/dist/dtos/addon-field.dto.d.ts +7 -0
- package/dist/dtos/addon-field.dto.js +11 -0
- package/dist/dtos/attribute-field.dto.d.ts +20 -0
- package/dist/dtos/attribute-field.dto.js +74 -0
- package/dist/dtos/country.dto.d.ts +7 -0
- package/dist/dtos/country.dto.js +4 -0
- package/dist/dtos/field.dto.d.ts +2 -23
- package/dist/dtos/field.dto.js +8 -64
- package/dist/dtos/info.dto.d.ts +3 -2
- package/dist/dtos/info.dto.js +11 -6
- package/dist/dtos/invoice/invoice-info.dto.d.ts +15 -0
- package/dist/dtos/invoice/invoice-info.dto.js +42 -0
- package/dist/dtos/invoice/invoice-item-data.dto.d.ts +10 -0
- package/dist/dtos/invoice/invoice-item-data.dto.js +27 -0
- package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +9 -0
- package/dist/dtos/invoice/requests/credit-note-request.dto.js +26 -0
- package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +9 -0
- package/dist/dtos/invoice/requests/invoice-request.dto.js +26 -0
- package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +21 -0
- package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +56 -0
- package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +7 -0
- package/dist/dtos/invoice/responses/credit-note-response.dto.js +11 -0
- package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +7 -0
- package/dist/dtos/invoice/responses/invoice-response.dto.js +11 -0
- package/dist/dtos/invoice/responses/proforma-invoice-response.dto.d.ts +12 -0
- package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +35 -0
- package/dist/dtos/invoice/transaction-data.dto.d.ts +14 -0
- package/dist/dtos/invoice/transaction-data.dto.js +42 -0
- package/dist/dtos/invoice-contact-data.dto.d.ts +43 -0
- package/dist/dtos/invoice-contact-data.dto.js +120 -0
- package/dist/dtos/item-data.dto.d.ts +44 -0
- package/dist/dtos/item-data.dto.js +70 -0
- package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +18 -0
- package/dist/dtos/notification/requests/notification-send-request.dto.js +66 -0
- package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +9 -0
- package/dist/dtos/notification/responses/notification-send-response.dto.js +26 -0
- package/dist/dtos/product/product-info.dto.d.ts +5 -0
- package/dist/dtos/product/product-info.dto.js +20 -0
- package/dist/dtos/product/product-item-data.dto.d.ts +7 -28
- package/dist/dtos/product/product-item-data.dto.js +7 -23
- package/dist/dtos/product/requests/product-create-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-delete-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-delete-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-renew-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-renew-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-suspend-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-unsuspend-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-upgradable-request.dto.js +1 -1
- package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-upgrade-request.dto.js +1 -1
- package/dist/dtos/product/responses/product-info-response.dto.js +17 -0
- package/dist/dtos/responses/validate-attributes-response.dto.js +18 -0
- package/dist/dtos/settings.dto.d.ts +18 -0
- package/dist/dtos/settings.dto.js +19 -2
- package/dist/dtos/success-response.dto.d.ts +0 -4
- package/dist/dtos/success-response.dto.js +0 -14
- package/dist/enums/invoice/invoice-item-actions.enum.d.ts +8 -0
- package/dist/enums/invoice/invoice-item-actions.enum.js +12 -0
- package/dist/enums/invoice/invoice-types.enum.d.ts +5 -0
- package/dist/enums/invoice/invoice-types.enum.js +9 -0
- package/dist/enums/item-actions.enum.d.ts +11 -0
- package/dist/enums/item-actions.enum.js +16 -0
- package/dist/enums/language.enum.d.ts +184 -184
- package/dist/enums/language.enum.js +184 -367
- package/dist/helpers/country.helper.d.ts +1 -1
- package/dist/helpers/country.helper.js +1 -3
- package/dist/index.d.ts +13 -6
- package/dist/index.js +14 -8
- package/dist/openapi/schemas/components.schemas.d.ts +42 -54
- package/dist/openapi/schemas/components.schemas.js +822 -802
- package/dist/validators/company-data-validator.spec.js +6 -6
- package/dist/validators/field-validator.spec.js +3 -3
- package/dist/validators/multilang-text-validator.spec.js +2 -2
- package/dist/validators/notification-info-validator.spec.js +11 -11
- package/dist/validators/notification-request-validator.js +1 -1
- package/dist/validators/product-info-validator.spec.js +39 -51
- package/package.json +1 -1
|
@@ -18,11 +18,19 @@ const class_transformer_1 = require("class-transformer");
|
|
|
18
18
|
const is_plain_object_validator_1 = require("../../decorators/is-plain-object.validator");
|
|
19
19
|
const unique_field_in_array_validator_1 = require("../../decorators/unique-field-in-array.validator");
|
|
20
20
|
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
21
|
+
const item_actions_enum_1 = require("../../enums/item-actions.enum");
|
|
21
22
|
/**
|
|
22
23
|
* DTO for notification information.
|
|
23
24
|
* Extends the base InfoDto to include the notification message type.
|
|
24
25
|
*/
|
|
25
26
|
class ProductInfoDto extends info_dto_1.InfoDto {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
/**
|
|
30
|
+
* A list of actions that are supported by this integration.
|
|
31
|
+
*/
|
|
32
|
+
this.supportedTypes = [];
|
|
33
|
+
}
|
|
26
34
|
}
|
|
27
35
|
exports.ProductInfoDto = ProductInfoDto;
|
|
28
36
|
__decorate([
|
|
@@ -82,3 +90,15 @@ __decorate([
|
|
|
82
90
|
}),
|
|
83
91
|
__metadata("design:type", Object)
|
|
84
92
|
], ProductInfoDto.prototype, "responseDataFieldNames", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
95
|
+
(0, class_validator_1.IsArray)(),
|
|
96
|
+
(0, class_validator_1.IsEnum)(item_actions_enum_1.ProductItemActionsEnum, { each: true }),
|
|
97
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
98
|
+
title: 'Supported Actions',
|
|
99
|
+
description: 'Actions supported by this integration.',
|
|
100
|
+
type: 'array',
|
|
101
|
+
items: { type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) }
|
|
102
|
+
}),
|
|
103
|
+
__metadata("design:type", Array)
|
|
104
|
+
], ProductInfoDto.prototype, "supportedTypes", void 0);
|
|
@@ -1,31 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProductItemActionsEnum } from "../../enums/item-actions.enum";
|
|
2
|
+
import { ItemDataDto } from "../item-data.dto";
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Product item data sent to product integrations.
|
|
5
|
+
* Uses product-specific actions distinct from invoice integration actions.
|
|
5
6
|
*/
|
|
6
|
-
export declare class ProductItemDataDto {
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
itemId?: string;
|
|
11
|
-
/**
|
|
12
|
-
* A record of product-level attributes.
|
|
13
|
-
* These are general attributes defined for the product type.
|
|
14
|
-
*/
|
|
15
|
-
productAttributes: Record<string, unknown>;
|
|
16
|
-
/**
|
|
17
|
-
* A record of item-specific attributes.
|
|
18
|
-
* These are attributes that are unique to this particular instance of the product.
|
|
19
|
-
*/
|
|
20
|
-
itemAttributes: Record<string, unknown>;
|
|
21
|
-
/**
|
|
22
|
-
* Data returned from the creation response.
|
|
23
|
-
* This field should not be present in the create request.
|
|
24
|
-
* @optional
|
|
25
|
-
*/
|
|
26
|
-
creationResponseData?: Record<string, unknown>;
|
|
27
|
-
/**
|
|
28
|
-
* The duration of the product subscription or license.
|
|
29
|
-
*/
|
|
30
|
-
duration: DurationEnum;
|
|
7
|
+
export declare class ProductItemDataDto extends ItemDataDto {
|
|
8
|
+
/** Product-specific action type for this item */
|
|
9
|
+
action: ProductItemActionsEnum;
|
|
31
10
|
}
|
|
@@ -11,33 +11,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductItemDataDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
const
|
|
14
|
+
const item_actions_enum_1 = require("../../enums/item-actions.enum");
|
|
15
|
+
const item_data_dto_1 = require("../item-data.dto");
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Product item data sent to product integrations.
|
|
18
|
+
* Uses product-specific actions distinct from invoice integration actions.
|
|
18
19
|
*/
|
|
19
|
-
class ProductItemDataDto {
|
|
20
|
+
class ProductItemDataDto extends item_data_dto_1.ItemDataDto {
|
|
20
21
|
}
|
|
21
22
|
exports.ProductItemDataDto = ProductItemDataDto;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, class_validator_1.IsOptional)(),
|
|
24
|
-
(0, class_validator_1.IsString)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], ProductItemDataDto.prototype, "itemId", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsDefined)(),
|
|
29
|
-
__metadata("design:type", Object)
|
|
30
|
-
], ProductItemDataDto.prototype, "productAttributes", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsDefined)(),
|
|
33
|
-
__metadata("design:type", Object)
|
|
34
|
-
], ProductItemDataDto.prototype, "itemAttributes", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_validator_1.IsOptional)(),
|
|
37
|
-
__metadata("design:type", Object)
|
|
38
|
-
], ProductItemDataDto.prototype, "creationResponseData", void 0);
|
|
39
23
|
__decorate([
|
|
40
24
|
(0, class_validator_1.IsDefined)(),
|
|
41
|
-
(0, class_validator_1.IsEnum)(
|
|
25
|
+
(0, class_validator_1.IsEnum)(item_actions_enum_1.ProductItemActionsEnum),
|
|
42
26
|
__metadata("design:type", String)
|
|
43
|
-
], ProductItemDataDto.prototype, "
|
|
27
|
+
], ProductItemDataDto.prototype, "action", void 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to create a new product item.
|
|
5
5
|
* This DTO contains all the necessary information for the creation process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductCreateRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to create a new product item.
|
|
19
19
|
* This DTO contains all the necessary information for the creation process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to delete a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the deletion process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductDeleteRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to delete a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the deletion process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to check if a product item is downgradable.
|
|
5
5
|
* This DTO contains all the necessary information for the check.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductDowngradableRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to check if a product item is downgradable.
|
|
19
19
|
* This DTO contains all the necessary information for the check.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to downgrade a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the downgrade process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductDowngradeRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to downgrade a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the downgrade process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to renew a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the renewal process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductRenewRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to renew a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the renewal process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to suspend a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the suspension process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductSuspendRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to suspend a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the suspension process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to unsuspend a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the unsuspend process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductUnsuspendRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to unsuspend a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the unsuspend process.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to check if a product item is upgradable.
|
|
5
5
|
* This DTO contains all the necessary information for the check.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductUpgradableRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to check if a product item is upgradable.
|
|
19
19
|
* This DTO contains all the necessary information for the check.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
2
1
|
import { ClientDataDto } from '../../client-data.dto';
|
|
2
|
+
import { ProductItemDataDto } from '../product-item-data.dto';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a request to upgrade a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the upgrade process.
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductUpgradeRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
16
15
|
const client_data_dto_1 = require("../../client-data.dto");
|
|
16
|
+
const product_item_data_dto_1 = require("../product-item-data.dto");
|
|
17
17
|
/**
|
|
18
18
|
* Represents a request to upgrade a product item.
|
|
19
19
|
* This DTO contains all the necessary information for the upgrade process.
|
|
@@ -1,7 +1,19 @@
|
|
|
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.ProductInfoResponseDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
4
15
|
const base_response_dto_1 = require("../../base-response.dto");
|
|
16
|
+
const product_info_dto_1 = require("../product-info.dto");
|
|
5
17
|
/**
|
|
6
18
|
* Represents the response containing product information.
|
|
7
19
|
* This DTO extends the `BaseResponse` and includes the detailed product information.
|
|
@@ -9,3 +21,8 @@ const base_response_dto_1 = require("../../base-response.dto");
|
|
|
9
21
|
class ProductInfoResponseDto extends base_response_dto_1.BaseResponse {
|
|
10
22
|
}
|
|
11
23
|
exports.ProductInfoResponseDto = ProductInfoResponseDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.ValidateNested)(),
|
|
26
|
+
(0, class_transformer_1.Type)(() => product_info_dto_1.ProductInfoDto),
|
|
27
|
+
__metadata("design:type", product_info_dto_1.ProductInfoDto)
|
|
28
|
+
], ProductInfoResponseDto.prototype, "info", void 0);
|
|
@@ -1,7 +1,19 @@
|
|
|
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.ValidateAttributesResponseDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
4
15
|
const base_response_dto_1 = require("../base-response.dto");
|
|
16
|
+
const field_dto_1 = require("../field.dto");
|
|
5
17
|
/**
|
|
6
18
|
* Represents the response from validating product attributes.
|
|
7
19
|
* Contains the list of attributes that have been validated.
|
|
@@ -9,3 +21,9 @@ const base_response_dto_1 = require("../base-response.dto");
|
|
|
9
21
|
class ValidateAttributesResponseDto extends base_response_dto_1.BaseResponse {
|
|
10
22
|
}
|
|
11
23
|
exports.ValidateAttributesResponseDto = ValidateAttributesResponseDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsArray)(),
|
|
26
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
27
|
+
(0, class_transformer_1.Type)(() => field_dto_1.FieldDto),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], ValidateAttributesResponseDto.prototype, "validatedAttributes", void 0);
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { TabDto } from './tab.dto';
|
|
2
|
+
/**
|
|
3
|
+
* Base settings properties shared by all settings variants.
|
|
4
|
+
*/
|
|
2
5
|
export declare class SettingsDto {
|
|
6
|
+
/** Label of the settings page */
|
|
3
7
|
label: string;
|
|
8
|
+
/** Icon of the settings page */
|
|
4
9
|
icon: string;
|
|
10
|
+
/** Description of the settings page */
|
|
5
11
|
description: string;
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Settings configuration with a direct URL.
|
|
15
|
+
* Used when the settings page is a single URL without tabs.
|
|
16
|
+
*/
|
|
7
17
|
export declare class SettingsWithUrlDto extends SettingsDto {
|
|
18
|
+
/** URL to the settings page */
|
|
8
19
|
url: string;
|
|
20
|
+
/** Explicitly prevents tabs from being added to this variant */
|
|
9
21
|
tabs?: never;
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Settings configuration with multiple tabs.
|
|
25
|
+
* Used when the settings page has multiple sections organized as tabs.
|
|
26
|
+
*/
|
|
11
27
|
export declare class SettingsWithTabsDto extends SettingsDto {
|
|
28
|
+
/** List of tabs for the settings page */
|
|
12
29
|
tabs: [TabDto, ...TabDto[]];
|
|
30
|
+
/** Explicitly prevents URL from being added to this variant */
|
|
13
31
|
url?: never;
|
|
14
32
|
}
|
|
@@ -16,6 +16,9 @@ const tab_dto_1 = require("./tab.dto");
|
|
|
16
16
|
const class_validator_2 = require("class-validator");
|
|
17
17
|
const is_property_forbidden_validator_1 = require("../decorators/is-property-forbidden.validator");
|
|
18
18
|
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
19
|
+
/**
|
|
20
|
+
* Base settings properties shared by all settings variants.
|
|
21
|
+
*/
|
|
19
22
|
class SettingsDto {
|
|
20
23
|
}
|
|
21
24
|
exports.SettingsDto = SettingsDto;
|
|
@@ -50,17 +53,31 @@ __decorate([
|
|
|
50
53
|
}),
|
|
51
54
|
__metadata("design:type", String)
|
|
52
55
|
], SettingsDto.prototype, "description", void 0);
|
|
56
|
+
/**
|
|
57
|
+
* Settings configuration with a direct URL.
|
|
58
|
+
* Used when the settings page is a single URL without tabs.
|
|
59
|
+
*/
|
|
53
60
|
class SettingsWithUrlDto extends SettingsDto {
|
|
54
61
|
}
|
|
55
62
|
exports.SettingsWithUrlDto = SettingsWithUrlDto;
|
|
56
63
|
__decorate([
|
|
57
64
|
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
65
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
66
|
+
title: 'URL',
|
|
67
|
+
description: 'URL to the settings page.',
|
|
68
|
+
type: 'string',
|
|
69
|
+
format: 'url',
|
|
70
|
+
}),
|
|
58
71
|
__metadata("design:type", String)
|
|
59
72
|
], SettingsWithUrlDto.prototype, "url", void 0);
|
|
60
73
|
__decorate([
|
|
61
74
|
(0, is_property_forbidden_validator_1.IsPropertyForbidden)('tabs'),
|
|
62
75
|
__metadata("design:type", void 0)
|
|
63
76
|
], SettingsWithUrlDto.prototype, "tabs", void 0);
|
|
77
|
+
/**
|
|
78
|
+
* Settings configuration with multiple tabs.
|
|
79
|
+
* Used when the settings page has multiple sections organized as tabs.
|
|
80
|
+
*/
|
|
64
81
|
class SettingsWithTabsDto extends SettingsDto {
|
|
65
82
|
}
|
|
66
83
|
exports.SettingsWithTabsDto = SettingsWithTabsDto;
|
|
@@ -69,9 +86,9 @@ __decorate([
|
|
|
69
86
|
(0, class_transformer_1.Type)(() => tab_dto_1.TabDto),
|
|
70
87
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
71
88
|
title: 'Tabs',
|
|
72
|
-
description: '
|
|
89
|
+
description: 'List of tabs for the settings page.',
|
|
73
90
|
type: 'array',
|
|
74
|
-
items: { $ref: '#/components/schemas/TabDto' }
|
|
91
|
+
items: { $ref: '#/components/schemas/TabDto' },
|
|
75
92
|
}),
|
|
76
93
|
__metadata("design:type", Array)
|
|
77
94
|
], SettingsWithTabsDto.prototype, "tabs", void 0);
|
|
@@ -1,16 +1,6 @@
|
|
|
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
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.SuccessResponseDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
4
|
/**
|
|
15
5
|
* DTO for a successful response.
|
|
16
6
|
* Used to return the ID of a created resource.
|
|
@@ -18,7 +8,3 @@ const class_validator_1 = require("class-validator");
|
|
|
18
8
|
class SuccessResponseDto {
|
|
19
9
|
}
|
|
20
10
|
exports.SuccessResponseDto = SuccessResponseDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], SuccessResponseDto.prototype, "notificationId", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvoiceItemActionsEnum = void 0;
|
|
4
|
+
var InvoiceItemActionsEnum;
|
|
5
|
+
(function (InvoiceItemActionsEnum) {
|
|
6
|
+
InvoiceItemActionsEnum["CREATE"] = "create";
|
|
7
|
+
InvoiceItemActionsEnum["RENEW"] = "renew";
|
|
8
|
+
InvoiceItemActionsEnum["UPGRADE"] = "upgrade";
|
|
9
|
+
InvoiceItemActionsEnum["DOWNGRADE"] = "downgrade";
|
|
10
|
+
InvoiceItemActionsEnum["TRANSFER"] = "transfer";
|
|
11
|
+
InvoiceItemActionsEnum["TRADE"] = "trade";
|
|
12
|
+
})(InvoiceItemActionsEnum || (exports.InvoiceItemActionsEnum = InvoiceItemActionsEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvoiceTypesEnum = void 0;
|
|
4
|
+
var InvoiceTypesEnum;
|
|
5
|
+
(function (InvoiceTypesEnum) {
|
|
6
|
+
InvoiceTypesEnum["INVOICE"] = "invoice";
|
|
7
|
+
InvoiceTypesEnum["CREDIT_NOTE"] = "credit-note";
|
|
8
|
+
InvoiceTypesEnum["PROFORMA"] = "proforma";
|
|
9
|
+
})(InvoiceTypesEnum || (exports.InvoiceTypesEnum = InvoiceTypesEnum = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductItemActionsEnum = void 0;
|
|
4
|
+
//TODO να γινει ProductActionsEnum
|
|
5
|
+
var ProductItemActionsEnum;
|
|
6
|
+
(function (ProductItemActionsEnum) {
|
|
7
|
+
ProductItemActionsEnum["CREATE"] = "create";
|
|
8
|
+
ProductItemActionsEnum["RENEW"] = "renew";
|
|
9
|
+
ProductItemActionsEnum["UPGRADE"] = "upgrade";
|
|
10
|
+
ProductItemActionsEnum["DOWNGRADE"] = "downgrade";
|
|
11
|
+
ProductItemActionsEnum["TRANSFER"] = "transfer";
|
|
12
|
+
ProductItemActionsEnum["TRADE"] = "trade";
|
|
13
|
+
ProductItemActionsEnum["SUSPEND"] = "suspend";
|
|
14
|
+
ProductItemActionsEnum["UNSUSPEND"] = "unsuspend";
|
|
15
|
+
ProductItemActionsEnum["DELETE"] = "delete";
|
|
16
|
+
})(ProductItemActionsEnum || (exports.ProductItemActionsEnum = ProductItemActionsEnum = {}));
|