@abyss-project/console 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.d.ts +1 -2
  3. package/dist/api/index.js +1 -2
  4. package/dist/api/ip-address.api.d.ts +6 -0
  5. package/dist/api/ip-address.api.js +29 -0
  6. package/dist/api/workflow.admin.api.d.ts +8 -8
  7. package/dist/api/workflow.admin.api.js +29 -24
  8. package/dist/api/workflow.api.d.ts +11 -6
  9. package/dist/api/workflow.api.js +60 -23
  10. package/dist/index.d.ts +43 -28
  11. package/dist/index.js +46 -27
  12. package/dist/types/constants/index.d.ts +1 -0
  13. package/dist/types/constants/index.js +17 -0
  14. package/dist/types/constants/webhook.constants.d.ts +6 -0
  15. package/dist/types/constants/webhook.constants.js +9 -0
  16. package/dist/types/dto/index.d.ts +1 -0
  17. package/dist/types/dto/index.js +1 -0
  18. package/dist/types/dto/workflow.dto.d.ts +63 -0
  19. package/dist/types/dto/workflow.dto.js +2 -0
  20. package/dist/types/enum/api-error.enum.d.ts +13 -3
  21. package/dist/types/enum/api-error.enum.js +13 -3
  22. package/dist/types/enum/index.d.ts +1 -0
  23. package/dist/types/enum/index.js +1 -0
  24. package/dist/types/enum/workflow.enum.d.ts +82 -0
  25. package/dist/types/enum/workflow.enum.js +97 -0
  26. package/dist/types/index.d.ts +1 -0
  27. package/dist/types/index.js +1 -0
  28. package/dist/types/interface/api/index.d.ts +2 -0
  29. package/dist/types/interface/api/index.js +2 -0
  30. package/dist/types/interface/api/requests/ip-address.request.d.ts +32 -0
  31. package/dist/types/interface/api/requests/ip-address.request.js +2 -0
  32. package/dist/types/interface/api/requests/workflow-webhook-trigger.request.d.ts +66 -0
  33. package/dist/types/interface/api/requests/workflow-webhook-trigger.request.js +2 -0
  34. package/dist/types/interface/api/requests/workflow-webhook.request.d.ts +123 -0
  35. package/dist/types/interface/api/requests/workflow-webhook.request.js +2 -0
  36. package/dist/types/interface/api/requests/workflow.admin.request.d.ts +14 -20
  37. package/dist/types/interface/api/requests/workflow.request.d.ts +83 -46
  38. package/dist/types/interface/api/responses/ip-address.response.d.ts +21 -0
  39. package/dist/types/interface/api/responses/ip-address.response.js +2 -0
  40. package/dist/types/interface/api/responses/workflow-webhook-action.response.d.ts +24 -0
  41. package/dist/types/interface/api/responses/workflow-webhook-action.response.js +2 -0
  42. package/dist/types/interface/api/responses/workflow-webhook-public.response.d.ts +7 -0
  43. package/dist/types/interface/api/responses/workflow-webhook-public.response.js +2 -0
  44. package/dist/types/interface/api/responses/workflow-webhook-trigger.response.d.ts +41 -0
  45. package/dist/types/interface/api/responses/workflow-webhook-trigger.response.js +2 -0
  46. package/dist/types/interface/api/responses/workflow-webhook.response.d.ts +56 -0
  47. package/dist/types/interface/api/responses/workflow-webhook.response.js +2 -0
  48. package/dist/types/interface/api/responses/workflow.admin.response.d.ts +4 -3
  49. package/dist/types/interface/api/responses/workflow.response.d.ts +43 -18
  50. package/dist/types/interface/index.d.ts +5 -1
  51. package/dist/types/interface/index.js +5 -1
  52. package/dist/types/interface/models/domain-verification.model.d.ts +3 -3
  53. package/dist/types/interface/models/ip-address.model.d.ts +17 -0
  54. package/dist/types/interface/models/ip-address.model.js +11 -0
  55. package/dist/types/interface/models/ip-whitelist.model.d.ts +19 -0
  56. package/dist/types/interface/models/ip-whitelist.model.js +9 -0
  57. package/dist/types/interface/models/project.model.d.ts +3 -5
  58. package/dist/types/interface/models/trigger-filter.model.d.ts +0 -0
  59. package/dist/types/interface/models/trigger-filter.model.js +1 -0
  60. package/dist/types/interface/models/webhook-action-log.model.d.ts +22 -0
  61. package/dist/types/interface/models/webhook-action-log.model.js +9 -0
  62. package/dist/types/interface/models/webhook-trigger-log.model.d.ts +23 -0
  63. package/dist/types/interface/models/webhook-trigger-log.model.js +9 -0
  64. package/dist/types/interface/models/workflow-execution.model.d.ts +12 -66
  65. package/dist/types/interface/models/workflow-execution.model.js +0 -11
  66. package/dist/types/interface/models/workflow-step-config.model.d.ts +0 -0
  67. package/dist/types/interface/models/workflow-step-config.model.js +1 -0
  68. package/dist/types/interface/models/workflow-step-data.model.d.ts +0 -0
  69. package/dist/types/interface/models/workflow-step-data.model.js +1 -0
  70. package/dist/types/interface/models/workflow-step-execution.model.d.ts +23 -0
  71. package/dist/types/interface/models/workflow-step-execution.model.js +2 -0
  72. package/dist/types/interface/models/workflow-step.model.d.ts +10 -94
  73. package/dist/types/interface/models/workflow-step.model.js +0 -42
  74. package/dist/types/interface/models/workflow-trigger-config.model.d.ts +0 -0
  75. package/dist/types/interface/models/workflow-trigger-config.model.js +1 -0
  76. package/dist/types/interface/models/workflow-trigger.model.d.ts +35 -0
  77. package/dist/types/interface/models/workflow-trigger.model.js +2 -0
  78. package/dist/types/interface/models/workflow-webhook-action.model.d.ts +27 -0
  79. package/dist/types/interface/models/workflow-webhook-action.model.js +2 -0
  80. package/dist/types/interface/models/workflow-webhook-incoming-log.model.d.ts +19 -0
  81. package/dist/types/interface/models/workflow-webhook-incoming-log.model.js +2 -0
  82. package/dist/types/interface/models/workflow-webhook-outgoing-log.model.d.ts +21 -0
  83. package/dist/types/interface/models/workflow-webhook-outgoing-log.model.js +2 -0
  84. package/dist/types/interface/models/workflow-webhook-trigger-allowed-ip.model.d.ts +10 -0
  85. package/dist/types/interface/models/workflow-webhook-trigger-allowed-ip.model.js +2 -0
  86. package/dist/types/interface/models/workflow-webhook-trigger.model.d.ts +20 -0
  87. package/dist/types/interface/models/workflow-webhook-trigger.model.js +2 -0
  88. package/dist/types/interface/models/workflow-webhook.model.d.ts +27 -0
  89. package/dist/types/interface/models/workflow-webhook.model.js +2 -0
  90. package/dist/types/interface/models/workflow.model.d.ts +4 -72
  91. package/dist/types/interface/models/workflow.model.js +0 -22
  92. package/dist/utils/__tests__/ip-address-reference.utils.test.d.ts +0 -0
  93. package/dist/utils/__tests__/ip-address-reference.utils.test.js +1 -0
  94. package/dist/utils/__tests__/reference-resolver.examples.d.ts +0 -0
  95. package/dist/utils/__tests__/reference-resolver.examples.js +1 -0
  96. package/dist/utils/index.d.ts +2 -0
  97. package/dist/utils/index.js +2 -0
  98. package/dist/utils/ip-address-reference.utils.d.ts +0 -0
  99. package/dist/utils/ip-address-reference.utils.js +1 -0
  100. package/dist/utils/ip-address-validator.utils.d.ts +14 -0
  101. package/dist/utils/ip-address-validator.utils.js +119 -0
  102. package/dist/utils/reference-resolver.utils.d.ts +52 -0
  103. package/dist/utils/reference-resolver.utils.js +219 -0
  104. package/package.json +1 -1
  105. package/USAGE_EXAMPLES.md +0 -257
  106. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,63 @@
1
+ import { FilterOperator, SwitchConditionOperator, HttpMethod, WorkflowActionType } from '../enum';
2
+ export interface IUserRegistrationWorkflowTriggerData {
3
+ userId: string;
4
+ email: string;
5
+ emailDomain: string;
6
+ alias?: string;
7
+ metadata?: Record<string, any>;
8
+ }
9
+ export interface IWebhookWorkflowTriggerData {
10
+ webhookId: string;
11
+ headers: Record<string, string>;
12
+ body: any;
13
+ method?: string;
14
+ url?: string;
15
+ receivedAt: string;
16
+ sourceIp?: string;
17
+ }
18
+ export type WorkflowTriggerData = IUserRegistrationWorkflowTriggerData | IWebhookWorkflowTriggerData | Record<string, any>;
19
+ export interface IFilterStepConfig {
20
+ filters: Array<{
21
+ field: string;
22
+ operator: FilterOperator;
23
+ value: any;
24
+ }>;
25
+ }
26
+ export interface ISleepStepConfig {
27
+ duration: number;
28
+ }
29
+ export interface ISwitchCondition {
30
+ field: string;
31
+ operator: SwitchConditionOperator;
32
+ value: any;
33
+ targetStepId: string;
34
+ }
35
+ export interface ISwitchStepConfig {
36
+ conditions: ISwitchCondition[];
37
+ defaultTargetStepId: string | null;
38
+ }
39
+ export interface ICallWebhookActionConfig {
40
+ actionType: WorkflowActionType.CALL_WEBHOOK;
41
+ url: string;
42
+ method: HttpMethod;
43
+ headers?: Record<string, string>;
44
+ body?: Record<string, any>;
45
+ timeout?: number;
46
+ retryCount?: number;
47
+ retryDelay?: number;
48
+ }
49
+ export interface IInviteToProjectActionConfig {
50
+ actionType: WorkflowActionType.INVITE_TO_PROJECT;
51
+ projectId: string;
52
+ permissions: string[];
53
+ message?: string;
54
+ }
55
+ export type IActionStepConfig = ICallWebhookActionConfig | IInviteToProjectActionConfig;
56
+ export type StepConfig = IFilterStepConfig | ISleepStepConfig | ISwitchStepConfig | IActionStepConfig;
57
+ export interface IWorkflowSettings {
58
+ maxExecutionsPerHour?: number;
59
+ maxExecutionsPerDay?: number;
60
+ retryOnFailure?: boolean;
61
+ maxRetryAttempts?: number;
62
+ retryDelaySeconds?: number;
63
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,7 +14,17 @@ export declare enum Code {
14
14
  serviceUnavailable = "service_unavailable",
15
15
  invalidData = "invalid_data",
16
16
  notImplemented = "not_implemented",
17
- maxCronTaskNumber = "max_cron_task_number",
18
- maxEventPublishPerDay = "max_event_publish_per_day",
19
- maxSentinelNumber = "max_sentinel_number"
17
+ workflowCannotUpdateArchived = "workflow_cannot_update_archived",
18
+ workflowCannotActivateWithoutSteps = "workflow_cannot_activate_without_steps",
19
+ workflowCannotDeleteActive = "workflow_cannot_delete_active",
20
+ workflowCannotDeleteWithRunningExecutions = "workflow_cannot_delete_with_running_executions",
21
+ workflowArchivedCanOnlySetDraft = "workflow_archived_can_only_set_draft",
22
+ workflowCannotCancelFinished = "workflow_cannot_cancel_finished",
23
+ ipAddressValueRequired = "ip_address_value_required",
24
+ ipAddressInvalidIPv4Format = "ip_address_invalid_ipv4_format",
25
+ ipAddressInvalidIPv6Format = "ip_address_invalid_ipv6_format",
26
+ ipAddressInvalidIPv4CIDRFormat = "ip_address_invalid_ipv4_cidr_format",
27
+ ipAddressInvalidIPv6CIDRFormat = "ip_address_invalid_ipv6_cidr_format",
28
+ ipAddressInvalidDomainFormat = "ip_address_invalid_domain_format",
29
+ ipAddressInvalidType = "ip_address_invalid_type"
20
30
  }
@@ -19,7 +19,17 @@ var Code;
19
19
  Code["serviceUnavailable"] = "service_unavailable";
20
20
  Code["invalidData"] = "invalid_data";
21
21
  Code["notImplemented"] = "not_implemented";
22
- Code["maxCronTaskNumber"] = "max_cron_task_number";
23
- Code["maxEventPublishPerDay"] = "max_event_publish_per_day";
24
- Code["maxSentinelNumber"] = "max_sentinel_number";
22
+ Code["workflowCannotUpdateArchived"] = "workflow_cannot_update_archived";
23
+ Code["workflowCannotActivateWithoutSteps"] = "workflow_cannot_activate_without_steps";
24
+ Code["workflowCannotDeleteActive"] = "workflow_cannot_delete_active";
25
+ Code["workflowCannotDeleteWithRunningExecutions"] = "workflow_cannot_delete_with_running_executions";
26
+ Code["workflowArchivedCanOnlySetDraft"] = "workflow_archived_can_only_set_draft";
27
+ Code["workflowCannotCancelFinished"] = "workflow_cannot_cancel_finished";
28
+ Code["ipAddressValueRequired"] = "ip_address_value_required";
29
+ Code["ipAddressInvalidIPv4Format"] = "ip_address_invalid_ipv4_format";
30
+ Code["ipAddressInvalidIPv6Format"] = "ip_address_invalid_ipv6_format";
31
+ Code["ipAddressInvalidIPv4CIDRFormat"] = "ip_address_invalid_ipv4_cidr_format";
32
+ Code["ipAddressInvalidIPv6CIDRFormat"] = "ip_address_invalid_ipv6_cidr_format";
33
+ Code["ipAddressInvalidDomainFormat"] = "ip_address_invalid_domain_format";
34
+ Code["ipAddressInvalidType"] = "ip_address_invalid_type";
25
35
  })(Code || (exports.Code = Code = {}));
@@ -1 +1,2 @@
1
1
  export * from './api-error.enum';
2
+ export * from './workflow.enum';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-error.enum"), exports);
18
+ __exportStar(require("./workflow.enum"), exports);
@@ -0,0 +1,82 @@
1
+ export declare enum WorkflowStatus {
2
+ DRAFT = "DRAFT",
3
+ ACTIVE = "ACTIVE",
4
+ PAUSED = "PAUSED",
5
+ ARCHIVED = "ARCHIVED"
6
+ }
7
+ export declare enum WorkflowTriggerType {
8
+ USER_REGISTRATION = "USER_REGISTRATION",
9
+ WEBHOOK = "WEBHOOK",
10
+ MANUAL = "MANUAL"
11
+ }
12
+ export declare enum WorkflowTemplate {
13
+ AUTO_INVITE_BY_DOMAIN = "AUTO_INVITE_BY_DOMAIN"
14
+ }
15
+ export declare enum WorkflowStepType {
16
+ FILTER = "FILTER",
17
+ SLEEP = "SLEEP",
18
+ SWITCH = "SWITCH",
19
+ ACTION = "ACTION"
20
+ }
21
+ export declare enum WorkflowActionType {
22
+ CALL_WEBHOOK = "CALL_WEBHOOK",
23
+ INVITE_TO_PROJECT = "INVITE_TO_PROJECT"
24
+ }
25
+ export declare enum WorkflowStepStatus {
26
+ PENDING = "PENDING",
27
+ RUNNING = "RUNNING",
28
+ COMPLETED = "COMPLETED",
29
+ FAILED = "FAILED",
30
+ SKIPPED = "SKIPPED"
31
+ }
32
+ export declare enum WorkflowExecutionStatus {
33
+ PENDING = "PENDING",
34
+ RUNNING = "RUNNING",
35
+ COMPLETED = "COMPLETED",
36
+ FAILED = "FAILED",
37
+ CANCELLED = "CANCELLED"
38
+ }
39
+ export declare enum WebhookDirection {
40
+ INCOMING = "INCOMING",
41
+ OUTGOING = "OUTGOING"
42
+ }
43
+ export declare enum WebhookStatus {
44
+ PENDING = "PENDING",
45
+ SUCCESS = "SUCCESS",
46
+ FAILED = "FAILED",
47
+ RETRYING = "RETRYING"
48
+ }
49
+ export declare enum FilterOperator {
50
+ EQUALS = "EQUALS",
51
+ NOT_EQUALS = "NOT_EQUALS",
52
+ CONTAINS = "CONTAINS",
53
+ NOT_CONTAINS = "NOT_CONTAINS",
54
+ STARTS_WITH = "STARTS_WITH",
55
+ ENDS_WITH = "ENDS_WITH",
56
+ GREATER_THAN = "GREATER_THAN",
57
+ LESS_THAN = "LESS_THAN",
58
+ GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL",
59
+ LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL",
60
+ IN = "IN",
61
+ NOT_IN = "NOT_IN",
62
+ IS_EMPTY = "IS_EMPTY",
63
+ IS_NOT_EMPTY = "IS_NOT_EMPTY",
64
+ MATCHES_REGEX = "MATCHES_REGEX"
65
+ }
66
+ export declare enum SwitchConditionOperator {
67
+ EQUALS = "EQUALS",
68
+ NOT_EQUALS = "NOT_EQUALS",
69
+ CONTAINS = "CONTAINS",
70
+ NOT_CONTAINS = "NOT_CONTAINS",
71
+ GREATER_THAN = "GREATER_THAN",
72
+ LESS_THAN = "LESS_THAN"
73
+ }
74
+ export declare enum HttpMethod {
75
+ GET = "GET",
76
+ POST = "POST",
77
+ PUT = "PUT",
78
+ PATCH = "PATCH",
79
+ DELETE = "DELETE",
80
+ HEAD = "HEAD",
81
+ OPTIONS = "OPTIONS"
82
+ }
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpMethod = exports.SwitchConditionOperator = exports.FilterOperator = exports.WebhookStatus = exports.WebhookDirection = exports.WorkflowExecutionStatus = exports.WorkflowStepStatus = exports.WorkflowActionType = exports.WorkflowStepType = exports.WorkflowTemplate = exports.WorkflowTriggerType = exports.WorkflowStatus = void 0;
4
+ var WorkflowStatus;
5
+ (function (WorkflowStatus) {
6
+ WorkflowStatus["DRAFT"] = "DRAFT";
7
+ WorkflowStatus["ACTIVE"] = "ACTIVE";
8
+ WorkflowStatus["PAUSED"] = "PAUSED";
9
+ WorkflowStatus["ARCHIVED"] = "ARCHIVED";
10
+ })(WorkflowStatus || (exports.WorkflowStatus = WorkflowStatus = {}));
11
+ var WorkflowTriggerType;
12
+ (function (WorkflowTriggerType) {
13
+ WorkflowTriggerType["USER_REGISTRATION"] = "USER_REGISTRATION";
14
+ WorkflowTriggerType["WEBHOOK"] = "WEBHOOK";
15
+ WorkflowTriggerType["MANUAL"] = "MANUAL";
16
+ })(WorkflowTriggerType || (exports.WorkflowTriggerType = WorkflowTriggerType = {}));
17
+ var WorkflowTemplate;
18
+ (function (WorkflowTemplate) {
19
+ WorkflowTemplate["AUTO_INVITE_BY_DOMAIN"] = "AUTO_INVITE_BY_DOMAIN";
20
+ })(WorkflowTemplate || (exports.WorkflowTemplate = WorkflowTemplate = {}));
21
+ var WorkflowStepType;
22
+ (function (WorkflowStepType) {
23
+ WorkflowStepType["FILTER"] = "FILTER";
24
+ WorkflowStepType["SLEEP"] = "SLEEP";
25
+ WorkflowStepType["SWITCH"] = "SWITCH";
26
+ WorkflowStepType["ACTION"] = "ACTION";
27
+ })(WorkflowStepType || (exports.WorkflowStepType = WorkflowStepType = {}));
28
+ var WorkflowActionType;
29
+ (function (WorkflowActionType) {
30
+ WorkflowActionType["CALL_WEBHOOK"] = "CALL_WEBHOOK";
31
+ WorkflowActionType["INVITE_TO_PROJECT"] = "INVITE_TO_PROJECT";
32
+ })(WorkflowActionType || (exports.WorkflowActionType = WorkflowActionType = {}));
33
+ var WorkflowStepStatus;
34
+ (function (WorkflowStepStatus) {
35
+ WorkflowStepStatus["PENDING"] = "PENDING";
36
+ WorkflowStepStatus["RUNNING"] = "RUNNING";
37
+ WorkflowStepStatus["COMPLETED"] = "COMPLETED";
38
+ WorkflowStepStatus["FAILED"] = "FAILED";
39
+ WorkflowStepStatus["SKIPPED"] = "SKIPPED";
40
+ })(WorkflowStepStatus || (exports.WorkflowStepStatus = WorkflowStepStatus = {}));
41
+ var WorkflowExecutionStatus;
42
+ (function (WorkflowExecutionStatus) {
43
+ WorkflowExecutionStatus["PENDING"] = "PENDING";
44
+ WorkflowExecutionStatus["RUNNING"] = "RUNNING";
45
+ WorkflowExecutionStatus["COMPLETED"] = "COMPLETED";
46
+ WorkflowExecutionStatus["FAILED"] = "FAILED";
47
+ WorkflowExecutionStatus["CANCELLED"] = "CANCELLED";
48
+ })(WorkflowExecutionStatus || (exports.WorkflowExecutionStatus = WorkflowExecutionStatus = {}));
49
+ var WebhookDirection;
50
+ (function (WebhookDirection) {
51
+ WebhookDirection["INCOMING"] = "INCOMING";
52
+ WebhookDirection["OUTGOING"] = "OUTGOING";
53
+ })(WebhookDirection || (exports.WebhookDirection = WebhookDirection = {}));
54
+ var WebhookStatus;
55
+ (function (WebhookStatus) {
56
+ WebhookStatus["PENDING"] = "PENDING";
57
+ WebhookStatus["SUCCESS"] = "SUCCESS";
58
+ WebhookStatus["FAILED"] = "FAILED";
59
+ WebhookStatus["RETRYING"] = "RETRYING";
60
+ })(WebhookStatus || (exports.WebhookStatus = WebhookStatus = {}));
61
+ var FilterOperator;
62
+ (function (FilterOperator) {
63
+ FilterOperator["EQUALS"] = "EQUALS";
64
+ FilterOperator["NOT_EQUALS"] = "NOT_EQUALS";
65
+ FilterOperator["CONTAINS"] = "CONTAINS";
66
+ FilterOperator["NOT_CONTAINS"] = "NOT_CONTAINS";
67
+ FilterOperator["STARTS_WITH"] = "STARTS_WITH";
68
+ FilterOperator["ENDS_WITH"] = "ENDS_WITH";
69
+ FilterOperator["GREATER_THAN"] = "GREATER_THAN";
70
+ FilterOperator["LESS_THAN"] = "LESS_THAN";
71
+ FilterOperator["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
72
+ FilterOperator["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
73
+ FilterOperator["IN"] = "IN";
74
+ FilterOperator["NOT_IN"] = "NOT_IN";
75
+ FilterOperator["IS_EMPTY"] = "IS_EMPTY";
76
+ FilterOperator["IS_NOT_EMPTY"] = "IS_NOT_EMPTY";
77
+ FilterOperator["MATCHES_REGEX"] = "MATCHES_REGEX";
78
+ })(FilterOperator || (exports.FilterOperator = FilterOperator = {}));
79
+ var SwitchConditionOperator;
80
+ (function (SwitchConditionOperator) {
81
+ SwitchConditionOperator["EQUALS"] = "EQUALS";
82
+ SwitchConditionOperator["NOT_EQUALS"] = "NOT_EQUALS";
83
+ SwitchConditionOperator["CONTAINS"] = "CONTAINS";
84
+ SwitchConditionOperator["NOT_CONTAINS"] = "NOT_CONTAINS";
85
+ SwitchConditionOperator["GREATER_THAN"] = "GREATER_THAN";
86
+ SwitchConditionOperator["LESS_THAN"] = "LESS_THAN";
87
+ })(SwitchConditionOperator || (exports.SwitchConditionOperator = SwitchConditionOperator = {}));
88
+ var HttpMethod;
89
+ (function (HttpMethod) {
90
+ HttpMethod["GET"] = "GET";
91
+ HttpMethod["POST"] = "POST";
92
+ HttpMethod["PUT"] = "PUT";
93
+ HttpMethod["PATCH"] = "PATCH";
94
+ HttpMethod["DELETE"] = "DELETE";
95
+ HttpMethod["HEAD"] = "HEAD";
96
+ HttpMethod["OPTIONS"] = "OPTIONS";
97
+ })(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
@@ -1,3 +1,4 @@
1
1
  export * from './interface';
2
2
  export * from './enum';
3
3
  export * from './dto';
4
+ export * from './constants';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./interface"), exports);
18
18
  __exportStar(require("./enum"), exports);
19
19
  __exportStar(require("./dto"), exports);
20
+ __exportStar(require("./constants"), exports);
@@ -4,10 +4,12 @@ export * from './type-message/base-order';
4
4
  export * from './type-message/base-paginate';
5
5
  export * from './requests/domain-verification.request';
6
6
  export * from './requests/domain-verification.admin.request';
7
+ export * from './requests/ip-address.request';
7
8
  export * from './requests/workflow.request';
8
9
  export * from './requests/workflow.admin.request';
9
10
  export * from './responses/monitor.response';
10
11
  export * from './responses/domain-verification.response';
11
12
  export * from './responses/domain-verification.admin.response';
13
+ export * from './responses/ip-address.response';
12
14
  export * from './responses/workflow.response';
13
15
  export * from './responses/workflow.admin.response';
@@ -20,10 +20,12 @@ __exportStar(require("./type-message/base-order"), exports);
20
20
  __exportStar(require("./type-message/base-paginate"), exports);
21
21
  __exportStar(require("./requests/domain-verification.request"), exports);
22
22
  __exportStar(require("./requests/domain-verification.admin.request"), exports);
23
+ __exportStar(require("./requests/ip-address.request"), exports);
23
24
  __exportStar(require("./requests/workflow.request"), exports);
24
25
  __exportStar(require("./requests/workflow.admin.request"), exports);
25
26
  __exportStar(require("./responses/monitor.response"), exports);
26
27
  __exportStar(require("./responses/domain-verification.response"), exports);
27
28
  __exportStar(require("./responses/domain-verification.admin.response"), exports);
29
+ __exportStar(require("./responses/ip-address.response"), exports);
28
30
  __exportStar(require("./responses/workflow.response"), exports);
29
31
  __exportStar(require("./responses/workflow.admin.response"), exports);
@@ -0,0 +1,32 @@
1
+ import { IpAddressType } from '../../models/ip-address.model';
2
+ export interface ICreateIpAddressParams {
3
+ projectId: string;
4
+ }
5
+ export interface ICreateIpAddressBody {
6
+ name: string;
7
+ description?: string | null;
8
+ type: IpAddressType;
9
+ value: string;
10
+ }
11
+ export interface IListIpAddressParams {
12
+ projectId: string;
13
+ }
14
+ export interface IGetIpAddressParams {
15
+ projectId: string;
16
+ ipAddressId: string;
17
+ }
18
+ export interface IUpdateIpAddressParams {
19
+ projectId: string;
20
+ ipAddressId: string;
21
+ }
22
+ export interface IUpdateIpAddressBody {
23
+ name?: string;
24
+ description?: string | null;
25
+ type?: IpAddressType;
26
+ value?: string;
27
+ isActive?: boolean;
28
+ }
29
+ export interface IDeleteIpAddressParams {
30
+ projectId: string;
31
+ ipAddressId: string;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,66 @@
1
+ export interface ICreateWorkflowWebhookTriggerParams {
2
+ projectId: string;
3
+ workflowId: string;
4
+ }
5
+ export interface ICreateWorkflowWebhookTriggerBody {
6
+ name: string;
7
+ description?: string | null;
8
+ signatureHeader?: string;
9
+ allowedIpIds?: string[];
10
+ }
11
+ export interface IListWorkflowWebhookTriggersParams {
12
+ projectId: string;
13
+ workflowId: string;
14
+ }
15
+ export interface IGetWorkflowWebhookTriggerParams {
16
+ projectId: string;
17
+ workflowId: string;
18
+ webhookTriggerId: string;
19
+ }
20
+ export interface IUpdateWorkflowWebhookTriggerParams {
21
+ projectId: string;
22
+ workflowId: string;
23
+ webhookTriggerId: string;
24
+ }
25
+ export interface IUpdateWorkflowWebhookTriggerBody {
26
+ name?: string;
27
+ description?: string | null;
28
+ signatureHeader?: string;
29
+ isEnabled?: boolean;
30
+ allowedIpIds?: string[];
31
+ }
32
+ export interface IDeleteWorkflowWebhookTriggerParams {
33
+ projectId: string;
34
+ workflowId: string;
35
+ webhookTriggerId: string;
36
+ }
37
+ export interface IRegenerateWebhookTriggerSecretParams {
38
+ projectId: string;
39
+ workflowId: string;
40
+ webhookTriggerId: string;
41
+ }
42
+ export interface IGetWebhookTriggerLogsParams {
43
+ projectId: string;
44
+ workflowId: string;
45
+ webhookTriggerId: string;
46
+ }
47
+ export interface IGetWebhookTriggerLogsQuery {
48
+ page?: number;
49
+ limit?: number;
50
+ status?: string;
51
+ startDate?: string;
52
+ endDate?: string;
53
+ }
54
+ export interface ITestWorkflowWebhookTriggerParams {
55
+ projectId: string;
56
+ workflowId: string;
57
+ webhookTriggerId: string;
58
+ }
59
+ export interface ITestWorkflowWebhookTriggerBody {
60
+ headers?: Record<string, string>;
61
+ body?: Record<string, unknown>;
62
+ }
63
+ export interface ITriggerWebhookParams {
64
+ projectId: string;
65
+ urlId: string;
66
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,123 @@
1
+ import { QueryPaginate } from '../type-message/base-paginate';
2
+ export interface ICreateWorkflowWebhookTriggerParams {
3
+ projectId: string;
4
+ workflowId: string;
5
+ }
6
+ export interface ICreateWorkflowWebhookTriggerBody {
7
+ name: string;
8
+ description?: string | null;
9
+ signatureHeader?: string;
10
+ }
11
+ export interface IListWorkflowWebhookTriggerParams {
12
+ projectId: string;
13
+ workflowId: string;
14
+ }
15
+ export interface IGetWorkflowWebhookTriggerParams {
16
+ projectId: string;
17
+ workflowId: string;
18
+ webhookTriggerId: string;
19
+ }
20
+ export interface IUpdateWorkflowWebhookTriggerParams {
21
+ projectId: string;
22
+ workflowId: string;
23
+ webhookTriggerId: string;
24
+ }
25
+ export interface IUpdateWorkflowWebhookTriggerBody {
26
+ name?: string;
27
+ description?: string | null;
28
+ signatureHeader?: string;
29
+ isEnabled?: boolean;
30
+ }
31
+ export interface IRegenerateWebhookTriggerSecretParams {
32
+ projectId: string;
33
+ workflowId: string;
34
+ webhookTriggerId: string;
35
+ }
36
+ export interface IDeleteWorkflowWebhookTriggerParams {
37
+ projectId: string;
38
+ workflowId: string;
39
+ webhookTriggerId: string;
40
+ }
41
+ export interface IPaginateWebhookIncomingLogsParams {
42
+ projectId: string;
43
+ workflowId: string;
44
+ webhookTriggerId: string;
45
+ }
46
+ export interface IPaginateWebhookIncomingLogsQuery extends QueryPaginate {
47
+ signatureValid?: boolean;
48
+ success?: boolean;
49
+ startDate?: string;
50
+ endDate?: string;
51
+ }
52
+ export interface ICreateWorkflowWebhookActionParams {
53
+ projectId: string;
54
+ workflowId: string;
55
+ workflowStepId: string;
56
+ }
57
+ export interface ICreateWorkflowWebhookActionBody {
58
+ name: string;
59
+ description?: string | null;
60
+ url: string;
61
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
62
+ headers?: Record<string, string>;
63
+ bodyTemplate?: string | null;
64
+ signatureSecret: string;
65
+ signatureHeader?: string | null;
66
+ retryOnFailure?: boolean;
67
+ maxRetries?: number;
68
+ retryDelayMs?: number;
69
+ timeoutMs?: number;
70
+ }
71
+ export interface IListWorkflowWebhookActionParams {
72
+ projectId: string;
73
+ workflowId: string;
74
+ workflowStepId: string;
75
+ }
76
+ export interface IGetWorkflowWebhookActionParams {
77
+ projectId: string;
78
+ workflowId: string;
79
+ workflowStepId: string;
80
+ webhookActionId: string;
81
+ }
82
+ export interface IUpdateWorkflowWebhookActionParams {
83
+ projectId: string;
84
+ workflowId: string;
85
+ workflowStepId: string;
86
+ webhookActionId: string;
87
+ }
88
+ export interface IUpdateWorkflowWebhookActionBody {
89
+ name?: string;
90
+ description?: string | null;
91
+ url?: string;
92
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
93
+ headers?: Record<string, string>;
94
+ bodyTemplate?: string | null;
95
+ signatureSecret?: string;
96
+ signatureHeader?: string | null;
97
+ retryOnFailure?: boolean;
98
+ maxRetries?: number;
99
+ retryDelayMs?: number;
100
+ timeoutMs?: number;
101
+ isEnabled?: boolean;
102
+ }
103
+ export interface IDeleteWorkflowWebhookActionParams {
104
+ projectId: string;
105
+ workflowId: string;
106
+ workflowStepId: string;
107
+ webhookActionId: string;
108
+ }
109
+ export interface IPaginateWebhookOutgoingLogsParams {
110
+ projectId: string;
111
+ workflowId: string;
112
+ workflowStepId: string;
113
+ webhookActionId: string;
114
+ }
115
+ export interface IPaginateWebhookOutgoingLogsQuery extends QueryPaginate {
116
+ success?: boolean;
117
+ startDate?: string;
118
+ endDate?: string;
119
+ }
120
+ export interface IReceiveWebhookParams {
121
+ projectId: string;
122
+ urlId: string;
123
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,22 +1,15 @@
1
- import { WorkflowMode, WorkflowStatus, IWorkflowTriggerData } from '../../models/workflow.model';
2
- import { WorkflowExecutionStatus } from '../../models/workflow-execution.model';
3
- import { QueryPaginate } from '..';
4
- export interface IGetWorkflowAdminParams {
5
- workflowId: string;
6
- }
7
- export interface ITriggerWorkflowAdminParams {
8
- workflowId: string;
9
- }
10
- export interface ICancelWorkflowExecutionAdminParams {
11
- workflowExecutionId: string;
12
- }
1
+ import { WorkflowStatus, WorkflowExecutionStatus } from '../../../enum/workflow.enum';
2
+ import { QueryPaginate } from '../type-message/base-paginate';
13
3
  export interface IPaginateWorkflowAdminQuery extends QueryPaginate {
14
4
  projectId?: string;
15
5
  status?: WorkflowStatus;
16
- mode?: WorkflowMode;
17
6
  search?: string;
18
- orderBy?: 'name' | 'createdAt' | 'updatedAt' | 'status';
19
- orderDirection?: 'ASC' | 'DESC';
7
+ }
8
+ export interface IGetWorkflowAdminParams {
9
+ workflowId: string;
10
+ }
11
+ export interface IUpdateWorkflowStatusAdminBody {
12
+ status: WorkflowStatus;
20
13
  }
21
14
  export interface IPaginateWorkflowExecutionsAdminQuery extends QueryPaginate {
22
15
  projectId?: string;
@@ -24,12 +17,13 @@ export interface IPaginateWorkflowExecutionsAdminQuery extends QueryPaginate {
24
17
  status?: WorkflowExecutionStatus;
25
18
  startDate?: string;
26
19
  endDate?: string;
27
- orderBy?: 'startedAt' | 'completedAt' | 'status';
28
- orderDirection?: 'ASC' | 'DESC';
29
20
  }
30
- export interface IUpdateWorkflowStatusAdminBody {
31
- status: WorkflowStatus;
21
+ export interface ICancelWorkflowExecutionAdminParams {
22
+ workflowExecutionId: string;
23
+ }
24
+ export interface ITriggerWorkflowAdminParams {
25
+ workflowId: string;
32
26
  }
33
27
  export interface ITriggerWorkflowAdminBody {
34
- triggerData: IWorkflowTriggerData;
28
+ triggerData: Record<string, unknown>;
35
29
  }