@zyphr-dev/node-sdk 0.1.18 → 0.1.20
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/dist/index.cjs +2473 -200
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4376 -1787
- package/dist/index.d.ts +4376 -1787
- package/dist/index.js +2274 -195
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +40 -1
- package/src/client.ts +3 -0
- package/src/src/apis/AuthEmailTemplatesApi.ts +734 -0
- package/src/src/apis/ExecutionsApi.ts +225 -0
- package/src/src/apis/SlackApi.ts +264 -0
- package/src/src/apis/index.ts +3 -0
- package/src/src/models/AuthEmailTemplate.ts +181 -0
- package/src/src/models/AuthEmailTemplateDefault.ts +107 -0
- package/src/src/models/AuthEmailTemplateDefaultResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateDeleteResponse.ts +88 -0
- package/src/src/models/{SuccessResultData.ts → AuthEmailTemplateDeleteResponseData.ts} +11 -11
- package/src/src/models/AuthEmailTemplateListResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplatePreviewRequest.ts +65 -0
- package/src/src/models/AuthEmailTemplatePreviewResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplatePreviewResult.ts +97 -0
- package/src/src/models/AuthEmailTemplateResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateTestRequest.ts +74 -0
- package/src/src/models/AuthEmailTemplateTestResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateTestResult.ts +73 -0
- package/src/src/models/AuthEmailTemplateVersion.ts +157 -0
- package/src/src/models/AuthEmailTemplateVersionsResponse.ts +88 -0
- package/src/src/models/AuthEmailType.ts +54 -0
- package/src/src/models/BulkUpsertAuthEmailTemplatesRequest.ts +91 -0
- package/src/src/models/BulkUpsertAuthEmailTemplatesResponse.ts +88 -0
- package/src/src/models/ExecutionCancelResponse.ts +88 -0
- package/src/src/models/ExecutionCancelResponseData.ts +83 -0
- package/src/src/models/ExecutionResponse.ts +88 -0
- package/src/src/models/ExecutionRetryResponse.ts +88 -0
- package/src/src/models/ExecutionRetryResponseData.ts +94 -0
- package/src/src/models/ResubscribeResponse.ts +10 -10
- package/src/src/models/SendSlackMessageRequest.ts +156 -0
- package/src/src/models/SendSlackMessageResponse.ts +88 -0
- package/src/src/models/SendSlackMessageResult.ts +115 -0
- package/src/src/models/SlackMessage.ts +203 -0
- package/src/src/models/SlackMessageListResponse.ts +88 -0
- package/src/src/models/SlackMessageListResponseMeta.ts +89 -0
- package/src/src/models/SlackMessageResponse.ts +88 -0
- package/src/src/models/SlackMessageStatus.ts +56 -0
- package/src/src/models/SlackMessageSummary.ts +155 -0
- package/src/src/models/SuccessResult.ts +10 -10
- package/src/src/models/UpsertAuthEmailTemplateRequest.ts +143 -0
- package/src/src/models/WorkflowExecution.ts +201 -0
- package/src/src/models/WorkflowExecutionStatus.ts +56 -0
- package/src/src/models/WorkflowStepExecution.ts +184 -0
- package/src/src/models/WorkflowStepExecutionStatus.ts +57 -0
- package/src/src/models/index.ts +37 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { WorkflowExecutionStatus } from './WorkflowExecutionStatus';
|
|
17
|
+
import {
|
|
18
|
+
WorkflowExecutionStatusFromJSON,
|
|
19
|
+
WorkflowExecutionStatusFromJSONTyped,
|
|
20
|
+
WorkflowExecutionStatusToJSON,
|
|
21
|
+
WorkflowExecutionStatusToJSONTyped,
|
|
22
|
+
} from './WorkflowExecutionStatus';
|
|
23
|
+
import type { WorkflowStepExecution } from './WorkflowStepExecution';
|
|
24
|
+
import {
|
|
25
|
+
WorkflowStepExecutionFromJSON,
|
|
26
|
+
WorkflowStepExecutionFromJSONTyped,
|
|
27
|
+
WorkflowStepExecutionToJSON,
|
|
28
|
+
WorkflowStepExecutionToJSONTyped,
|
|
29
|
+
} from './WorkflowStepExecution';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface WorkflowExecution
|
|
35
|
+
*/
|
|
36
|
+
export interface WorkflowExecution {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof WorkflowExecution
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof WorkflowExecution
|
|
47
|
+
*/
|
|
48
|
+
workflowId: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof WorkflowExecution
|
|
53
|
+
*/
|
|
54
|
+
accountId: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof WorkflowExecution
|
|
59
|
+
*/
|
|
60
|
+
projectId: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof WorkflowExecution
|
|
65
|
+
*/
|
|
66
|
+
subscriberId: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof WorkflowExecution
|
|
71
|
+
*/
|
|
72
|
+
topicKey?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {{ [key: string]: any; }}
|
|
76
|
+
* @memberof WorkflowExecution
|
|
77
|
+
*/
|
|
78
|
+
triggerPayload?: { [key: string]: any; };
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof WorkflowExecution
|
|
83
|
+
*/
|
|
84
|
+
transactionId?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof WorkflowExecution
|
|
89
|
+
*/
|
|
90
|
+
senderFrom?: string | null;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {WorkflowExecutionStatus}
|
|
94
|
+
* @memberof WorkflowExecution
|
|
95
|
+
*/
|
|
96
|
+
status: WorkflowExecutionStatus;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof WorkflowExecution
|
|
101
|
+
*/
|
|
102
|
+
currentStepId?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {Array<WorkflowStepExecution>}
|
|
106
|
+
* @memberof WorkflowExecution
|
|
107
|
+
*/
|
|
108
|
+
stepExecutions?: Array<WorkflowStepExecution>;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {Date}
|
|
112
|
+
* @memberof WorkflowExecution
|
|
113
|
+
*/
|
|
114
|
+
startedAt?: Date | null;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {Date}
|
|
118
|
+
* @memberof WorkflowExecution
|
|
119
|
+
*/
|
|
120
|
+
completedAt?: Date | null;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @type {Date}
|
|
124
|
+
* @memberof WorkflowExecution
|
|
125
|
+
*/
|
|
126
|
+
createdAt: Date;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Check if a given object implements the WorkflowExecution interface.
|
|
133
|
+
*/
|
|
134
|
+
export function instanceOfWorkflowExecution(value: object): value is WorkflowExecution {
|
|
135
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
136
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
137
|
+
if (!('accountId' in value) || value['accountId'] === undefined) return false;
|
|
138
|
+
if (!('projectId' in value) || value['projectId'] === undefined) return false;
|
|
139
|
+
if (!('subscriberId' in value) || value['subscriberId'] === undefined) return false;
|
|
140
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
141
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function WorkflowExecutionFromJSON(json: any): WorkflowExecution {
|
|
146
|
+
return WorkflowExecutionFromJSONTyped(json, false);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function WorkflowExecutionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowExecution {
|
|
150
|
+
if (json == null) {
|
|
151
|
+
return json;
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
|
|
155
|
+
'id': json['id'],
|
|
156
|
+
'workflowId': json['workflow_id'],
|
|
157
|
+
'accountId': json['account_id'],
|
|
158
|
+
'projectId': json['project_id'],
|
|
159
|
+
'subscriberId': json['subscriber_id'],
|
|
160
|
+
'topicKey': json['topic_key'] == null ? undefined : json['topic_key'],
|
|
161
|
+
'triggerPayload': json['trigger_payload'] == null ? undefined : json['trigger_payload'],
|
|
162
|
+
'transactionId': json['transaction_id'] == null ? undefined : json['transaction_id'],
|
|
163
|
+
'senderFrom': json['sender_from'] == null ? undefined : json['sender_from'],
|
|
164
|
+
'status': WorkflowExecutionStatusFromJSON(json['status']),
|
|
165
|
+
'currentStepId': json['current_step_id'] == null ? undefined : json['current_step_id'],
|
|
166
|
+
'stepExecutions': json['step_executions'] == null ? undefined : ((json['step_executions'] as Array<any>).map(WorkflowStepExecutionFromJSON)),
|
|
167
|
+
'startedAt': json['started_at'] == null ? undefined : (new Date(json['started_at'])),
|
|
168
|
+
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
|
|
169
|
+
'createdAt': (new Date(json['created_at'])),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function WorkflowExecutionToJSON(json: any): WorkflowExecution {
|
|
174
|
+
return WorkflowExecutionToJSONTyped(json, false);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function WorkflowExecutionToJSONTyped(value?: WorkflowExecution | null, ignoreDiscriminator: boolean = false): any {
|
|
178
|
+
if (value == null) {
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
|
|
184
|
+
'id': value['id'],
|
|
185
|
+
'workflow_id': value['workflowId'],
|
|
186
|
+
'account_id': value['accountId'],
|
|
187
|
+
'project_id': value['projectId'],
|
|
188
|
+
'subscriber_id': value['subscriberId'],
|
|
189
|
+
'topic_key': value['topicKey'],
|
|
190
|
+
'trigger_payload': value['triggerPayload'],
|
|
191
|
+
'transaction_id': value['transactionId'],
|
|
192
|
+
'sender_from': value['senderFrom'],
|
|
193
|
+
'status': WorkflowExecutionStatusToJSON(value['status']),
|
|
194
|
+
'current_step_id': value['currentStepId'],
|
|
195
|
+
'step_executions': value['stepExecutions'] == null ? undefined : ((value['stepExecutions'] as Array<any>).map(WorkflowStepExecutionToJSON)),
|
|
196
|
+
'started_at': value['startedAt'] == null ? undefined : ((value['startedAt'] as any).toISOString()),
|
|
197
|
+
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
|
198
|
+
'created_at': ((value['createdAt']).toISOString()),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Status of a workflow execution
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const WorkflowExecutionStatus = {
|
|
21
|
+
PENDING: 'pending',
|
|
22
|
+
RUNNING: 'running',
|
|
23
|
+
COMPLETED: 'completed',
|
|
24
|
+
FAILED: 'failed',
|
|
25
|
+
CANCELLED: 'cancelled'
|
|
26
|
+
} as const;
|
|
27
|
+
export type WorkflowExecutionStatus = typeof WorkflowExecutionStatus[keyof typeof WorkflowExecutionStatus];
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export function instanceOfWorkflowExecutionStatus(value: any): boolean {
|
|
31
|
+
for (const key in WorkflowExecutionStatus) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(WorkflowExecutionStatus, key)) {
|
|
33
|
+
if (WorkflowExecutionStatus[key as keyof typeof WorkflowExecutionStatus] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function WorkflowExecutionStatusFromJSON(json: any): WorkflowExecutionStatus {
|
|
42
|
+
return WorkflowExecutionStatusFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function WorkflowExecutionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowExecutionStatus {
|
|
46
|
+
return json as WorkflowExecutionStatus;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function WorkflowExecutionStatusToJSON(value?: WorkflowExecutionStatus | null): any {
|
|
50
|
+
return value as any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function WorkflowExecutionStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): WorkflowExecutionStatus {
|
|
54
|
+
return value as WorkflowExecutionStatus;
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { WorkflowStepExecutionStatus } from './WorkflowStepExecutionStatus';
|
|
17
|
+
import {
|
|
18
|
+
WorkflowStepExecutionStatusFromJSON,
|
|
19
|
+
WorkflowStepExecutionStatusFromJSONTyped,
|
|
20
|
+
WorkflowStepExecutionStatusToJSON,
|
|
21
|
+
WorkflowStepExecutionStatusToJSONTyped,
|
|
22
|
+
} from './WorkflowStepExecutionStatus';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface WorkflowStepExecution
|
|
28
|
+
*/
|
|
29
|
+
export interface WorkflowStepExecution {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof WorkflowStepExecution
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof WorkflowStepExecution
|
|
40
|
+
*/
|
|
41
|
+
executionId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof WorkflowStepExecution
|
|
46
|
+
*/
|
|
47
|
+
stepId: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {WorkflowStepExecutionStatus}
|
|
51
|
+
* @memberof WorkflowStepExecution
|
|
52
|
+
*/
|
|
53
|
+
status: WorkflowStepExecutionStatus;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {{ [key: string]: any; }}
|
|
57
|
+
* @memberof WorkflowStepExecution
|
|
58
|
+
*/
|
|
59
|
+
result?: { [key: string]: any; };
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof WorkflowStepExecution
|
|
64
|
+
*/
|
|
65
|
+
startedAt?: Date | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof WorkflowStepExecution
|
|
70
|
+
*/
|
|
71
|
+
completedAt?: Date | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof WorkflowStepExecution
|
|
76
|
+
*/
|
|
77
|
+
error?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof WorkflowStepExecution
|
|
82
|
+
*/
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
/**
|
|
85
|
+
* Step key from the workflow definition
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof WorkflowStepExecution
|
|
88
|
+
*/
|
|
89
|
+
stepKey?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Human-readable step name
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof WorkflowStepExecution
|
|
94
|
+
*/
|
|
95
|
+
stepName?: string;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof WorkflowStepExecution
|
|
100
|
+
*/
|
|
101
|
+
stepType?: WorkflowStepExecutionStepTypeEnum;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @export
|
|
107
|
+
*/
|
|
108
|
+
export const WorkflowStepExecutionStepTypeEnum = {
|
|
109
|
+
EMAIL: 'email',
|
|
110
|
+
PUSH: 'push',
|
|
111
|
+
SMS: 'sms',
|
|
112
|
+
IN_APP: 'in_app',
|
|
113
|
+
SLACK: 'slack',
|
|
114
|
+
DISCORD: 'discord',
|
|
115
|
+
TEAMS: 'teams',
|
|
116
|
+
DELAY: 'delay',
|
|
117
|
+
BRANCH: 'branch'
|
|
118
|
+
} as const;
|
|
119
|
+
export type WorkflowStepExecutionStepTypeEnum = typeof WorkflowStepExecutionStepTypeEnum[keyof typeof WorkflowStepExecutionStepTypeEnum];
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Check if a given object implements the WorkflowStepExecution interface.
|
|
124
|
+
*/
|
|
125
|
+
export function instanceOfWorkflowStepExecution(value: object): value is WorkflowStepExecution {
|
|
126
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
127
|
+
if (!('executionId' in value) || value['executionId'] === undefined) return false;
|
|
128
|
+
if (!('stepId' in value) || value['stepId'] === undefined) return false;
|
|
129
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
130
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function WorkflowStepExecutionFromJSON(json: any): WorkflowStepExecution {
|
|
135
|
+
return WorkflowStepExecutionFromJSONTyped(json, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function WorkflowStepExecutionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowStepExecution {
|
|
139
|
+
if (json == null) {
|
|
140
|
+
return json;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'id': json['id'],
|
|
145
|
+
'executionId': json['execution_id'],
|
|
146
|
+
'stepId': json['step_id'],
|
|
147
|
+
'status': WorkflowStepExecutionStatusFromJSON(json['status']),
|
|
148
|
+
'result': json['result'] == null ? undefined : json['result'],
|
|
149
|
+
'startedAt': json['started_at'] == null ? undefined : (new Date(json['started_at'])),
|
|
150
|
+
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
|
|
151
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
152
|
+
'createdAt': (new Date(json['created_at'])),
|
|
153
|
+
'stepKey': json['step_key'] == null ? undefined : json['step_key'],
|
|
154
|
+
'stepName': json['step_name'] == null ? undefined : json['step_name'],
|
|
155
|
+
'stepType': json['step_type'] == null ? undefined : json['step_type'],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function WorkflowStepExecutionToJSON(json: any): WorkflowStepExecution {
|
|
160
|
+
return WorkflowStepExecutionToJSONTyped(json, false);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function WorkflowStepExecutionToJSONTyped(value?: WorkflowStepExecution | null, ignoreDiscriminator: boolean = false): any {
|
|
164
|
+
if (value == null) {
|
|
165
|
+
return value;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
|
|
170
|
+
'id': value['id'],
|
|
171
|
+
'execution_id': value['executionId'],
|
|
172
|
+
'step_id': value['stepId'],
|
|
173
|
+
'status': WorkflowStepExecutionStatusToJSON(value['status']),
|
|
174
|
+
'result': value['result'],
|
|
175
|
+
'started_at': value['startedAt'] == null ? undefined : ((value['startedAt'] as any).toISOString()),
|
|
176
|
+
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
|
177
|
+
'error': value['error'],
|
|
178
|
+
'created_at': ((value['createdAt']).toISOString()),
|
|
179
|
+
'step_key': value['stepKey'],
|
|
180
|
+
'step_name': value['stepName'],
|
|
181
|
+
'step_type': value['stepType'],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Status of an individual step within a workflow execution
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const WorkflowStepExecutionStatus = {
|
|
21
|
+
PENDING: 'pending',
|
|
22
|
+
RUNNING: 'running',
|
|
23
|
+
COMPLETED: 'completed',
|
|
24
|
+
SKIPPED: 'skipped',
|
|
25
|
+
FAILED: 'failed',
|
|
26
|
+
WAITING: 'waiting'
|
|
27
|
+
} as const;
|
|
28
|
+
export type WorkflowStepExecutionStatus = typeof WorkflowStepExecutionStatus[keyof typeof WorkflowStepExecutionStatus];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export function instanceOfWorkflowStepExecutionStatus(value: any): boolean {
|
|
32
|
+
for (const key in WorkflowStepExecutionStatus) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(WorkflowStepExecutionStatus, key)) {
|
|
34
|
+
if (WorkflowStepExecutionStatus[key as keyof typeof WorkflowStepExecutionStatus] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function WorkflowStepExecutionStatusFromJSON(json: any): WorkflowStepExecutionStatus {
|
|
43
|
+
return WorkflowStepExecutionStatusFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function WorkflowStepExecutionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowStepExecutionStatus {
|
|
47
|
+
return json as WorkflowStepExecutionStatus;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function WorkflowStepExecutionStatusToJSON(value?: WorkflowStepExecutionStatus | null): any {
|
|
51
|
+
return value as any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function WorkflowStepExecutionStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): WorkflowStepExecutionStatus {
|
|
55
|
+
return value as WorkflowStepExecutionStatus;
|
|
56
|
+
}
|
|
57
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -4,6 +4,22 @@ export * from './AddTopicSubscribersRequest';
|
|
|
4
4
|
export * from './ApiError';
|
|
5
5
|
export * from './ApiErrorError';
|
|
6
6
|
export * from './ApiErrorMeta';
|
|
7
|
+
export * from './AuthEmailTemplate';
|
|
8
|
+
export * from './AuthEmailTemplateDefault';
|
|
9
|
+
export * from './AuthEmailTemplateDefaultResponse';
|
|
10
|
+
export * from './AuthEmailTemplateDeleteResponse';
|
|
11
|
+
export * from './AuthEmailTemplateDeleteResponseData';
|
|
12
|
+
export * from './AuthEmailTemplateListResponse';
|
|
13
|
+
export * from './AuthEmailTemplatePreviewRequest';
|
|
14
|
+
export * from './AuthEmailTemplatePreviewResponse';
|
|
15
|
+
export * from './AuthEmailTemplatePreviewResult';
|
|
16
|
+
export * from './AuthEmailTemplateResponse';
|
|
17
|
+
export * from './AuthEmailTemplateTestRequest';
|
|
18
|
+
export * from './AuthEmailTemplateTestResponse';
|
|
19
|
+
export * from './AuthEmailTemplateTestResult';
|
|
20
|
+
export * from './AuthEmailTemplateVersion';
|
|
21
|
+
export * from './AuthEmailTemplateVersionsResponse';
|
|
22
|
+
export * from './AuthEmailType';
|
|
7
23
|
export * from './AuthLoginResponse';
|
|
8
24
|
export * from './AuthLoginResult';
|
|
9
25
|
export * from './AuthLoginResultMfaChallenge';
|
|
@@ -16,6 +32,8 @@ export * from './AuthUserResponse';
|
|
|
16
32
|
export * from './AuthUserResponseData';
|
|
17
33
|
export * from './BatchPublishWaaSEvents201Response';
|
|
18
34
|
export * from './BulkRetryWebhookDeliveriesRequest';
|
|
35
|
+
export * from './BulkUpsertAuthEmailTemplatesRequest';
|
|
36
|
+
export * from './BulkUpsertAuthEmailTemplatesResponse';
|
|
19
37
|
export * from './Category';
|
|
20
38
|
export * from './CategoryListResponse';
|
|
21
39
|
export * from './CategoryResponse';
|
|
@@ -65,6 +83,11 @@ export * from './EmailTrackingOpens';
|
|
|
65
83
|
export * from './EmailTrackingResponse';
|
|
66
84
|
export * from './EndUserDeleteResponse';
|
|
67
85
|
export * from './EndUserDeleteResponseData';
|
|
86
|
+
export * from './ExecutionCancelResponse';
|
|
87
|
+
export * from './ExecutionCancelResponseData';
|
|
88
|
+
export * from './ExecutionResponse';
|
|
89
|
+
export * from './ExecutionRetryResponse';
|
|
90
|
+
export * from './ExecutionRetryResponseData';
|
|
68
91
|
export * from './ForgotPasswordRequest';
|
|
69
92
|
export * from './GenerateSubscriberToken200Response';
|
|
70
93
|
export * from './GenerateSubscriberToken200ResponseData';
|
|
@@ -196,6 +219,9 @@ export * from './SendPushResponseData';
|
|
|
196
219
|
export * from './SendPushToTopicData';
|
|
197
220
|
export * from './SendPushToTopicRequest';
|
|
198
221
|
export * from './SendPushToTopicResponse';
|
|
222
|
+
export * from './SendSlackMessageRequest';
|
|
223
|
+
export * from './SendSlackMessageResponse';
|
|
224
|
+
export * from './SendSlackMessageResult';
|
|
199
225
|
export * from './SendSmsData';
|
|
200
226
|
export * from './SendSmsRequest';
|
|
201
227
|
export * from './SendSmsResponse';
|
|
@@ -208,6 +234,12 @@ export * from './SessionListResponseData';
|
|
|
208
234
|
export * from './SessionListResponseDataSessionInfo';
|
|
209
235
|
export * from './SetPreferencesRequest';
|
|
210
236
|
export * from './SetPreferencesRequestPreferencesInner';
|
|
237
|
+
export * from './SlackMessage';
|
|
238
|
+
export * from './SlackMessageListResponse';
|
|
239
|
+
export * from './SlackMessageListResponseMeta';
|
|
240
|
+
export * from './SlackMessageResponse';
|
|
241
|
+
export * from './SlackMessageStatus';
|
|
242
|
+
export * from './SlackMessageSummary';
|
|
211
243
|
export * from './SmsBatchResultMessage';
|
|
212
244
|
export * from './SmsBatchResultSummary';
|
|
213
245
|
export * from './SmsConfig';
|
|
@@ -225,7 +257,6 @@ export * from './SubscriberListResponse';
|
|
|
225
257
|
export * from './SubscriberPreference';
|
|
226
258
|
export * from './SubscriberResponse';
|
|
227
259
|
export * from './SuccessResult';
|
|
228
|
-
export * from './SuccessResultData';
|
|
229
260
|
export * from './Template';
|
|
230
261
|
export * from './TemplateListResponse';
|
|
231
262
|
export * from './TemplateRenderResponse';
|
|
@@ -263,6 +294,7 @@ export * from './UpdateWaaSApplicationRequest';
|
|
|
263
294
|
export * from './UpdateWaaSEndpointRequest';
|
|
264
295
|
export * from './UpdateWaaSEventTypeRequest';
|
|
265
296
|
export * from './UpdateWebhookRequest';
|
|
297
|
+
export * from './UpsertAuthEmailTemplateRequest';
|
|
266
298
|
export * from './UpsertSmsConfigRequest';
|
|
267
299
|
export * from './UserDevicesDeleteResponse';
|
|
268
300
|
export * from './UserDevicesDeleteResponseData';
|
|
@@ -335,3 +367,7 @@ export * from './WebhookVersion';
|
|
|
335
367
|
export * from './WebhookVersionsResponse';
|
|
336
368
|
export * from './WebhookVersionsResponseData';
|
|
337
369
|
export * from './WithdrawSubscriberConsentRequest';
|
|
370
|
+
export * from './WorkflowExecution';
|
|
371
|
+
export * from './WorkflowExecutionStatus';
|
|
372
|
+
export * from './WorkflowStepExecution';
|
|
373
|
+
export * from './WorkflowStepExecutionStatus';
|