@hosterai/types 0.0.27 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
  2. package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
  3. package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
  4. package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
  5. package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
  6. package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
  7. package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
  8. package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
  9. package/dist/enums/events.enum.d.ts +3 -0
  10. package/dist/enums/events.enum.js +3 -0
  11. package/dist/openapi/schemas/components.schemas.d.ts +3 -3
  12. package/dist/openapi/schemas/components.schemas.js +9 -0
  13. package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
  14. package/dist/validators/product-downgradeable-request-validator.js +17 -0
  15. package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
  16. package/dist/validators/product-upgradeable-request-validator.js +17 -0
  17. package/package.json +1 -1
  18. package/dist/dtos/info/info-notification.dto.d.ts +0 -5
  19. package/dist/dtos/info/info-notification.dto.js +0 -7
  20. package/dist/dtos/info/info.dto.d.ts +0 -196
  21. package/dist/dtos/info/info.dto.js +0 -278
  22. package/dist/dtos/notification/notification-request.dto.d.ts +0 -20
  23. package/dist/dtos/notification/notification-request.dto.js +0 -31
  24. package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
  25. package/dist/dtos/receiver/receiver-email.dto.js +0 -39
  26. package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
  27. package/dist/dtos/receiver/receiver-push.dto.js +0 -31
  28. package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
  29. package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
  30. package/dist/dtos/request.dto.d.ts +0 -20
  31. package/dist/dtos/request.dto.js +0 -31
  32. package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
  33. package/dist/dtos/sender/sender-email.dto.js +0 -46
  34. package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
  35. package/dist/dtos/sender/sender-push.dto.js +0 -50
  36. package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
  37. package/dist/dtos/sender/sender-sms.dto.js +0 -30
  38. package/dist/enums/message-type.enum.d.ts +0 -5
  39. package/dist/enums/message-type.enum.js +0 -9
@@ -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);
@@ -0,0 +1,22 @@
1
+ import { ResponseStatusEnum } from '../../../enums/response-status.enum';
2
+ import { BaseResponse } from '../../base-response.dto';
3
+ /**
4
+ * Represents the response for a product downgradeable check.
5
+ * It indicates whether a product item is downgradeable and may contain additional data.
6
+ */
7
+ export declare class ProductDowngradeableResponseDto extends BaseResponse {
8
+ /**
9
+ * The status of the response, indicating success or failure.
10
+ */
11
+ status: ResponseStatusEnum;
12
+ /**
13
+ * The unique identifier of the product item being checked.
14
+ */
15
+ itemId: string;
16
+ /**
17
+ * Optional data associated with the downgradeable check.
18
+ * Can contain details about available downgrades or reasons for failure.
19
+ * @optional
20
+ */
21
+ data?: Record<string, unknown>;
22
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductDowngradeableResponseDto = void 0;
4
+ const base_response_dto_1 = require("../../base-response.dto");
5
+ /**
6
+ * Represents the response for a product downgradeable check.
7
+ * It indicates whether a product item is downgradeable and may contain additional data.
8
+ */
9
+ class ProductDowngradeableResponseDto extends base_response_dto_1.BaseResponse {
10
+ }
11
+ exports.ProductDowngradeableResponseDto = ProductDowngradeableResponseDto;
@@ -0,0 +1,22 @@
1
+ import { ResponseStatusEnum } from '../../../enums/response-status.enum';
2
+ import { BaseResponse } from '../../base-response.dto';
3
+ /**
4
+ * Represents the response for a product upgradeable check.
5
+ * It indicates whether a product item is upgradeable and may contain additional data.
6
+ */
7
+ export declare class ProductUpgradeableResponseDto extends BaseResponse {
8
+ /**
9
+ * The status of the response, indicating success or failure.
10
+ */
11
+ status: ResponseStatusEnum;
12
+ /**
13
+ * The unique identifier of the product item being checked.
14
+ */
15
+ itemId: string;
16
+ /**
17
+ * Optional data associated with the upgradeable check.
18
+ * Can contain details about available upgrades or reasons for failure.
19
+ * @optional
20
+ */
21
+ data?: Record<string, unknown>;
22
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductUpgradeableResponseDto = void 0;
4
+ const base_response_dto_1 = require("../../base-response.dto");
5
+ /**
6
+ * Represents the response for a product upgradeable check.
7
+ * It indicates whether a product item is upgradeable and may contain additional data.
8
+ */
9
+ class ProductUpgradeableResponseDto extends base_response_dto_1.BaseResponse {
10
+ }
11
+ exports.ProductUpgradeableResponseDto = ProductUpgradeableResponseDto;
@@ -170,6 +170,9 @@ export declare enum EventsEnum {
170
170
  ITEM_ACTIVATED = "item/activated",
171
171
  ITEM_DEACTIVATED = "item/set-inactive",
172
172
  ITEM_PROCESSED = "item/processed",
173
+ ITEM_REFUND_REQUESTED = "item/refund-requested",
174
+ ITEM_REFUND_ACCEPTED = "item/refund-accepted",
175
+ ITEM_REFUND_REJECTED = "item/refund-rejected",
173
176
  ORDER_PAID = "order/paid",
174
177
  TEST = "test",
175
178
  DEAD_LETTER = "dead-lettering",
@@ -174,6 +174,9 @@ var EventsEnum;
174
174
  EventsEnum["ITEM_ACTIVATED"] = "item/activated";
175
175
  EventsEnum["ITEM_DEACTIVATED"] = "item/set-inactive";
176
176
  EventsEnum["ITEM_PROCESSED"] = "item/processed";
177
+ EventsEnum["ITEM_REFUND_REQUESTED"] = "item/refund-requested";
178
+ EventsEnum["ITEM_REFUND_ACCEPTED"] = "item/refund-accepted";
179
+ EventsEnum["ITEM_REFUND_REJECTED"] = "item/refund-rejected";
177
180
  EventsEnum["ORDER_PAID"] = "order/paid";
178
181
  EventsEnum["TEST"] = "test";
179
182
  EventsEnum["DEAD_LETTER"] = "dead-lettering";
@@ -616,7 +616,7 @@ export declare const ComponentsSchemas: {
616
616
  };
617
617
  readonly listenEvents: {
618
618
  readonly items: {
619
- readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "order/paid", "test", "dead-lettering", "core-queue"];
619
+ readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "item/refund-requested", "item/refund-accepted", "item/refund-rejected", "order/paid", "test", "dead-lettering", "core-queue"];
620
620
  readonly type: "string";
621
621
  };
622
622
  readonly minItems: 1;
@@ -748,7 +748,7 @@ export declare const ComponentsSchemas: {
748
748
  };
749
749
  readonly listenEvents: {
750
750
  readonly items: {
751
- readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "order/paid", "test", "dead-lettering", "core-queue"];
751
+ readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "item/refund-requested", "item/refund-accepted", "item/refund-rejected", "order/paid", "test", "dead-lettering", "core-queue"];
752
752
  readonly type: "string";
753
753
  };
754
754
  readonly minItems: 1;
@@ -1003,7 +1003,7 @@ export declare const ComponentsSchemas: {
1003
1003
  };
1004
1004
  readonly listenEvents: {
1005
1005
  readonly items: {
1006
- readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "order/paid", "test", "dead-lettering", "core-queue"];
1006
+ readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "item/refund-requested", "item/refund-accepted", "item/refund-rejected", "order/paid", "test", "dead-lettering", "core-queue"];
1007
1007
  readonly type: "string";
1008
1008
  };
1009
1009
  readonly minItems: 1;
@@ -1499,6 +1499,9 @@ exports.ComponentsSchemas = {
1499
1499
  "item/activated",
1500
1500
  "item/set-inactive",
1501
1501
  "item/processed",
1502
+ "item/refund-requested",
1503
+ "item/refund-accepted",
1504
+ "item/refund-rejected",
1502
1505
  "order/paid",
1503
1506
  "test",
1504
1507
  "dead-lettering",
@@ -2060,6 +2063,9 @@ exports.ComponentsSchemas = {
2060
2063
  "item/activated",
2061
2064
  "item/set-inactive",
2062
2065
  "item/processed",
2066
+ "item/refund-requested",
2067
+ "item/refund-accepted",
2068
+ "item/refund-rejected",
2063
2069
  "order/paid",
2064
2070
  "test",
2065
2071
  "dead-lettering",
@@ -2768,6 +2774,9 @@ exports.ComponentsSchemas = {
2768
2774
  "item/activated",
2769
2775
  "item/set-inactive",
2770
2776
  "item/processed",
2777
+ "item/refund-requested",
2778
+ "item/refund-accepted",
2779
+ "item/refund-rejected",
2771
2780
  "order/paid",
2772
2781
  "test",
2773
2782
  "dead-lettering",
@@ -0,0 +1,8 @@
1
+ import { ValidationError } from 'class-validator';
2
+ /**
3
+ * Validates a product downgradable request object.
4
+ *
5
+ * @param {Record<string, unknown>} plainObject - The plain object to validate.
6
+ * @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
7
+ */
8
+ export declare const validateProductDowngradableRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateProductDowngradableRequestDto = void 0;
4
+ const class_validator_1 = require("class-validator");
5
+ const class_transformer_1 = require("class-transformer");
6
+ const product_downgradable_request_dto_1 = require("../dtos/product/requests/product-downgradable-request.dto");
7
+ /**
8
+ * Validates a product downgradable request object.
9
+ *
10
+ * @param {Record<string, unknown>} plainObject - The plain object to validate.
11
+ * @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
12
+ */
13
+ const validateProductDowngradableRequestDto = async (plainObject) => {
14
+ const request = (0, class_transformer_1.plainToInstance)(product_downgradable_request_dto_1.ProductDowngradableRequestDto, plainObject);
15
+ return await (0, class_validator_1.validate)(request);
16
+ };
17
+ exports.validateProductDowngradableRequestDto = validateProductDowngradableRequestDto;
@@ -0,0 +1,8 @@
1
+ import { ValidationError } from 'class-validator';
2
+ /**
3
+ * Validates a product upgradeable request object.
4
+ *
5
+ * @param {Record<string, unknown>} plainObject - The plain object to validate.
6
+ * @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
7
+ */
8
+ export declare const validateProductUpgradeableRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateProductUpgradeableRequestDto = void 0;
4
+ const class_validator_1 = require("class-validator");
5
+ const class_transformer_1 = require("class-transformer");
6
+ const product_upgradeable_request_dto_1 = require("../dtos/product/requests/product-upgradeable-request.dto");
7
+ /**
8
+ * Validates a product upgradeable request object.
9
+ *
10
+ * @param {Record<string, unknown>} plainObject - The plain object to validate.
11
+ * @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
12
+ */
13
+ const validateProductUpgradeableRequestDto = async (plainObject) => {
14
+ const request = (0, class_transformer_1.plainToInstance)(product_upgradeable_request_dto_1.ProductUpgradeableRequestDto, plainObject);
15
+ return await (0, class_validator_1.validate)(request);
16
+ };
17
+ exports.validateProductUpgradeableRequestDto = validateProductUpgradeableRequestDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hosterai/types",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,5 +0,0 @@
1
- import { MessageTypeEnum } from "../../enums/message-type.enum";
2
- import { InfoDto } from "./info.dto";
3
- export declare class InfoNotificationDto extends InfoDto {
4
- type: MessageTypeEnum;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfoNotificationDto = void 0;
4
- const info_dto_1 = require("./info.dto");
5
- class InfoNotificationDto extends info_dto_1.InfoDto {
6
- }
7
- exports.InfoNotificationDto = InfoNotificationDto;
@@ -1,196 +0,0 @@
1
- import { ActionsEnum } from '../../enums/actions.enum';
2
- import { EventsEnum } from '../../enums/events.enum';
3
- import { FieldDto } from '../field.dto';
4
- import { ResponseDataDto } from '../response-data.dto';
5
- import { UnitDto } from '../unit.dto';
6
- import { LanguageEnum } from '../../enums/language.enum';
7
- import { RolesEnum } from '../../enums/roles.enum';
8
- import { ActionDto } from '../action.dto';
9
- /**
10
- * DTO for integration information
11
- * Contains all information related to a service integration
12
- */
13
- export declare class InfoDto {
14
- /**
15
- * The title of the integration
16
- */
17
- title: string;
18
- /**
19
- * The logo of the integration (optional)
20
- */
21
- logo?: string;
22
- /**
23
- * Description of the integration and its services (optional)
24
- */
25
- description?: string;
26
- /**
27
- * List of supported languages for the integration.
28
- */
29
- supported_languages: LanguageEnum[];
30
- /**
31
- * Custom attributes for products.
32
- */
33
- product_attributes?: FieldDto[];
34
- /**
35
- * Custom attributes for items.
36
- */
37
- item_attributes?: FieldDto[];
38
- /**
39
- * Events that the integration listens to.
40
- */
41
- listen_events?: EventsEnum[];
42
- /**
43
- * The roles that need to be accepted by the company
44
- */
45
- requiredRoles?: RolesEnum[];
46
- /**
47
- * Actions that are not supported by the integration.
48
- */
49
- unsupportedActions?: ActionsEnum[];
50
- /**
51
- * Configuration for the admin panel.
52
- */
53
- adminPanel?: AdminPanelDto;
54
- /**
55
- * Configuration for the client panel.
56
- */
57
- clientPanel?: ClientPanelDto;
58
- /**
59
- * The url for the onboarding process after installation of the integration
60
- */
61
- onboardingUrl?: string;
62
- /**
63
- * Units for pay-per-use billing.
64
- */
65
- payPerUseUnits?: UnitDto[];
66
- /**
67
- * Mapping of response data field names.
68
- */
69
- responseDataFieldNames?: Record<keyof ResponseDataDto, string>;
70
- }
71
- /**
72
- * DTO for tabs
73
- * Used for defining tabs in the user interface
74
- */
75
- declare class TabDto {
76
- /**
77
- * The label displayed on the tab
78
- */
79
- label: string;
80
- /**
81
- * The URL associated with the tab.
82
- * The requests coming from the hoster will be signed
83
- * with jwt, which will contain information about the company
84
- */
85
- url: string;
86
- }
87
- /**
88
- * DTO for menu items
89
- * Extends TabDto and adds icon information
90
- */
91
- declare class MenuDto {
92
- /**
93
- * The icon to be displayed for the menu item
94
- */
95
- icon: string;
96
- /**
97
- * The name to be displayed for the menu item
98
- */
99
- label: string;
100
- /**
101
- * The list of tabs that will appear in the submenu and as a navigation bar above the main content
102
- * In case of only one tab, there will be neither a submenu nor a navigation bar.
103
- */
104
- tabs: TabDto[];
105
- }
106
- /**
107
- * DTO for the tabs in the admin panel.
108
- */
109
- declare class AdminPanelTabsDto {
110
- /**
111
- * Tabs related to products.
112
- */
113
- product: TabDto[];
114
- /**
115
- * Tabs related to items.
116
- */
117
- item: TabDto[];
118
- /**
119
- * Tabs related to clients.
120
- */
121
- client: TabDto[];
122
- /**
123
- * Tabs related to orders.
124
- */
125
- order: TabDto[];
126
- }
127
- /**
128
- * DTO for actions available in a panel.
129
- */
130
- declare class PanelActionsDto {
131
- /**
132
- * Actions related to clients.
133
- */
134
- client?: ActionDto[];
135
- /**
136
- * Actions related to items.
137
- */
138
- item?: ActionDto[];
139
- }
140
- /**
141
- * DTO for the admin panel configuration.
142
- */
143
- declare class AdminPanelDto {
144
- /**
145
- * Configuration for the tabs in the admin panel.
146
- */
147
- tabs?: AdminPanelTabsDto;
148
- /**
149
- * Additional actions available in the admin panel.
150
- */
151
- moreActions?: PanelActionsDto;
152
- /**
153
- * Main menu for the admin panel.
154
- */
155
- menu?: MenuDto;
156
- /**
157
- * Settings menu for the admin panel.
158
- */
159
- settings?: MenuDto;
160
- }
161
- /**
162
- * DTO for the tabs in the client panel.
163
- */
164
- declare class ClientPanelTabsDto {
165
- /**
166
- * Tabs related to items.
167
- */
168
- item: TabDto[];
169
- }
170
- /**
171
- * DTO for actions available in the client panel.
172
- */
173
- declare class ClientPanelActionsDto {
174
- /**
175
- * Actions related to items.
176
- */
177
- item?: ActionDto[];
178
- }
179
- /**
180
- * DTO for the client panel configuration.
181
- */
182
- declare class ClientPanelDto {
183
- /**
184
- * Configuration for the tabs in the client panel.
185
- */
186
- tabs?: ClientPanelTabsDto;
187
- /**
188
- * Additional actions available in the client panel.
189
- */
190
- moreActions?: ClientPanelActionsDto;
191
- /**
192
- * Main menu for the client panel.
193
- */
194
- menu?: MenuDto;
195
- }
196
- export {};