@zyphr-dev/node-sdk 0.1.39 → 0.1.41
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 +2315 -1220
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1724 -622
- package/dist/index.d.ts +1724 -622
- package/dist/index.js +2195 -1203
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +24 -4
- package/src/src/apis/AuthRegistrationApi.ts +4 -4
- package/src/src/apis/WorkflowsApi.ts +912 -0
- package/src/src/apis/index.ts +1 -1
- package/src/src/models/AddWorkflowStep201Response.ts +88 -0
- package/src/src/models/AddWorkflowStepRequest.ts +136 -0
- package/src/src/models/CreateWorkflow201Response.ts +88 -0
- package/src/src/models/CreateWorkflowRequest.ts +98 -0
- package/src/src/models/DeleteWorkflow200Response.ts +88 -0
- package/src/src/models/{TopicDeleteResponseData.ts → DeleteWorkflow200ResponseData.ts} +12 -12
- package/src/src/models/DeleteWorkflowStep200Response.ts +88 -0
- package/src/src/models/DeleteWorkflowStep200ResponseData.ts +81 -0
- package/src/src/models/ListWorkflowExecutions200Response.ts +88 -0
- package/src/src/models/{SmsListResponseMeta.ts → ListWorkflowExecutions200ResponseMeta.ts} +15 -15
- package/src/src/models/ListWorkflows200Response.ts +88 -0
- package/src/src/models/ListWorkflows200ResponseMeta.ts +121 -0
- package/src/src/models/ReorderWorkflowStepsRequest.ts +66 -0
- package/src/src/models/SignInWithGameCenterRequest.ts +1 -1
- package/src/src/models/SmsListResponse.ts +10 -10
- package/src/src/models/TopicDeleteResponse.ts +10 -10
- package/src/src/models/TriggerWorkflow202Response.ts +88 -0
- package/src/src/models/TriggerWorkflow202ResponseData.ts +81 -0
- package/src/src/models/TriggerWorkflowRequest.ts +90 -0
- package/src/src/models/UpdateWorkflowRequest.ts +89 -0
- package/src/src/models/UpdateWorkflowStatusRequest.ts +76 -0
- package/src/src/models/UpdateWorkflowStepRequest.ts +73 -0
- package/src/src/models/Workflow.ts +187 -0
- package/src/src/models/WorkflowStatus.ts +55 -0
- package/src/src/models/WorkflowStep.ts +176 -0
- package/src/src/models/WorkflowStepType.ts +60 -0
- package/src/src/models/index.ts +23 -3
- package/src/src/apis/MuseApi.ts +0 -531
- package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +0 -105
package/src/src/apis/index.ts
CHANGED
|
@@ -21,7 +21,6 @@ export * from './EmailsApi';
|
|
|
21
21
|
export * from './ExecutionsApi';
|
|
22
22
|
export * from './InboundEmailApi';
|
|
23
23
|
export * from './InboxApi';
|
|
24
|
-
export * from './MuseApi';
|
|
25
24
|
export * from './PushApi';
|
|
26
25
|
export * from './SMSApi';
|
|
27
26
|
export * from './SlackApi';
|
|
@@ -36,3 +35,4 @@ export * from './WaaSEventTypesApi';
|
|
|
36
35
|
export * from './WaaSEventsApi';
|
|
37
36
|
export * from './WaaSPortalApi';
|
|
38
37
|
export * from './WebhooksApi';
|
|
38
|
+
export * from './WorkflowsApi';
|
|
@@ -0,0 +1,88 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 { WorkflowStep } from './WorkflowStep';
|
|
17
|
+
import {
|
|
18
|
+
WorkflowStepFromJSON,
|
|
19
|
+
WorkflowStepFromJSONTyped,
|
|
20
|
+
WorkflowStepToJSON,
|
|
21
|
+
WorkflowStepToJSONTyped,
|
|
22
|
+
} from './WorkflowStep';
|
|
23
|
+
import type { RequestMeta } from './RequestMeta';
|
|
24
|
+
import {
|
|
25
|
+
RequestMetaFromJSON,
|
|
26
|
+
RequestMetaFromJSONTyped,
|
|
27
|
+
RequestMetaToJSON,
|
|
28
|
+
RequestMetaToJSONTyped,
|
|
29
|
+
} from './RequestMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AddWorkflowStep201Response
|
|
35
|
+
*/
|
|
36
|
+
export interface AddWorkflowStep201Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {WorkflowStep}
|
|
40
|
+
* @memberof AddWorkflowStep201Response
|
|
41
|
+
*/
|
|
42
|
+
data?: WorkflowStep;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof AddWorkflowStep201Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the AddWorkflowStep201Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfAddWorkflowStep201Response(value: object): value is AddWorkflowStep201Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function AddWorkflowStep201ResponseFromJSON(json: any): AddWorkflowStep201Response {
|
|
59
|
+
return AddWorkflowStep201ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function AddWorkflowStep201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddWorkflowStep201Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : WorkflowStepFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AddWorkflowStep201ResponseToJSON(json: any): AddWorkflowStep201Response {
|
|
74
|
+
return AddWorkflowStep201ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function AddWorkflowStep201ResponseToJSONTyped(value?: AddWorkflowStep201Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': WorkflowStepToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,136 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 { WorkflowStepType } from './WorkflowStepType';
|
|
17
|
+
import {
|
|
18
|
+
WorkflowStepTypeFromJSON,
|
|
19
|
+
WorkflowStepTypeFromJSONTyped,
|
|
20
|
+
WorkflowStepTypeToJSON,
|
|
21
|
+
WorkflowStepTypeToJSONTyped,
|
|
22
|
+
} from './WorkflowStepType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AddWorkflowStepRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface AddWorkflowStepRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Unique step identifier within the workflow.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AddWorkflowStepRequest
|
|
34
|
+
*/
|
|
35
|
+
stepKey: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human-readable step name.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AddWorkflowStepRequest
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {WorkflowStepType}
|
|
45
|
+
* @memberof AddWorkflowStepRequest
|
|
46
|
+
*/
|
|
47
|
+
type: WorkflowStepType;
|
|
48
|
+
/**
|
|
49
|
+
* Optional ordering position; appended to the end when omitted.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof AddWorkflowStepRequest
|
|
52
|
+
*/
|
|
53
|
+
position?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Step configuration whose shape depends on `type`.
|
|
56
|
+
* @type {{ [key: string]: any; }}
|
|
57
|
+
* @memberof AddWorkflowStepRequest
|
|
58
|
+
*/
|
|
59
|
+
config: { [key: string]: any; };
|
|
60
|
+
/**
|
|
61
|
+
* Parent step id (used for branch children).
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof AddWorkflowStepRequest
|
|
64
|
+
*/
|
|
65
|
+
parentStepId?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Which branch path this step belongs to (branch children only).
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof AddWorkflowStepRequest
|
|
70
|
+
*/
|
|
71
|
+
branchPath?: AddWorkflowStepRequestBranchPathEnum;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export const AddWorkflowStepRequestBranchPathEnum = {
|
|
79
|
+
TRUE: 'true',
|
|
80
|
+
FALSE: 'false'
|
|
81
|
+
} as const;
|
|
82
|
+
export type AddWorkflowStepRequestBranchPathEnum = typeof AddWorkflowStepRequestBranchPathEnum[keyof typeof AddWorkflowStepRequestBranchPathEnum];
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the AddWorkflowStepRequest interface.
|
|
87
|
+
*/
|
|
88
|
+
export function instanceOfAddWorkflowStepRequest(value: object): value is AddWorkflowStepRequest {
|
|
89
|
+
if (!('stepKey' in value) || value['stepKey'] === undefined) return false;
|
|
90
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
91
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
92
|
+
if (!('config' in value) || value['config'] === undefined) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function AddWorkflowStepRequestFromJSON(json: any): AddWorkflowStepRequest {
|
|
97
|
+
return AddWorkflowStepRequestFromJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function AddWorkflowStepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddWorkflowStepRequest {
|
|
101
|
+
if (json == null) {
|
|
102
|
+
return json;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'stepKey': json['step_key'],
|
|
107
|
+
'name': json['name'],
|
|
108
|
+
'type': WorkflowStepTypeFromJSON(json['type']),
|
|
109
|
+
'position': json['position'] == null ? undefined : json['position'],
|
|
110
|
+
'config': json['config'],
|
|
111
|
+
'parentStepId': json['parent_step_id'] == null ? undefined : json['parent_step_id'],
|
|
112
|
+
'branchPath': json['branch_path'] == null ? undefined : json['branch_path'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function AddWorkflowStepRequestToJSON(json: any): AddWorkflowStepRequest {
|
|
117
|
+
return AddWorkflowStepRequestToJSONTyped(json, false);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function AddWorkflowStepRequestToJSONTyped(value?: AddWorkflowStepRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
|
|
127
|
+
'step_key': value['stepKey'],
|
|
128
|
+
'name': value['name'],
|
|
129
|
+
'type': WorkflowStepTypeToJSON(value['type']),
|
|
130
|
+
'position': value['position'],
|
|
131
|
+
'config': value['config'],
|
|
132
|
+
'parent_step_id': value['parentStepId'],
|
|
133
|
+
'branch_path': value['branchPath'],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 { RequestMeta } from './RequestMeta';
|
|
17
|
+
import {
|
|
18
|
+
RequestMetaFromJSON,
|
|
19
|
+
RequestMetaFromJSONTyped,
|
|
20
|
+
RequestMetaToJSON,
|
|
21
|
+
RequestMetaToJSONTyped,
|
|
22
|
+
} from './RequestMeta';
|
|
23
|
+
import type { Workflow } from './Workflow';
|
|
24
|
+
import {
|
|
25
|
+
WorkflowFromJSON,
|
|
26
|
+
WorkflowFromJSONTyped,
|
|
27
|
+
WorkflowToJSON,
|
|
28
|
+
WorkflowToJSONTyped,
|
|
29
|
+
} from './Workflow';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateWorkflow201Response
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateWorkflow201Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Workflow}
|
|
40
|
+
* @memberof CreateWorkflow201Response
|
|
41
|
+
*/
|
|
42
|
+
data?: Workflow;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof CreateWorkflow201Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the CreateWorkflow201Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfCreateWorkflow201Response(value: object): value is CreateWorkflow201Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function CreateWorkflow201ResponseFromJSON(json: any): CreateWorkflow201Response {
|
|
59
|
+
return CreateWorkflow201ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CreateWorkflow201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWorkflow201Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : WorkflowFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function CreateWorkflow201ResponseToJSON(json: any): CreateWorkflow201Response {
|
|
74
|
+
return CreateWorkflow201ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function CreateWorkflow201ResponseToJSONTyped(value?: CreateWorkflow201Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': WorkflowToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateWorkflowRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateWorkflowRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable workflow name.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateWorkflowRequest
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Unique workflow key within the project. Derived from `name` when omitted.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateWorkflowRequest
|
|
32
|
+
*/
|
|
33
|
+
key?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional description of what the workflow does.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CreateWorkflowRequest
|
|
38
|
+
*/
|
|
39
|
+
description?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Marks the workflow as critical (bypasses certain preference checks).
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof CreateWorkflowRequest
|
|
44
|
+
*/
|
|
45
|
+
isCritical?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Optional tags for organizing workflows.
|
|
48
|
+
* @type {Array<string>}
|
|
49
|
+
* @memberof CreateWorkflowRequest
|
|
50
|
+
*/
|
|
51
|
+
tags?: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CreateWorkflowRequest interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCreateWorkflowRequest(value: object): value is CreateWorkflowRequest {
|
|
58
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CreateWorkflowRequestFromJSON(json: any): CreateWorkflowRequest {
|
|
63
|
+
return CreateWorkflowRequestFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CreateWorkflowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWorkflowRequest {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'name': json['name'],
|
|
73
|
+
'key': json['key'] == null ? undefined : json['key'],
|
|
74
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
75
|
+
'isCritical': json['is_critical'] == null ? undefined : json['is_critical'],
|
|
76
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function CreateWorkflowRequestToJSON(json: any): CreateWorkflowRequest {
|
|
81
|
+
return CreateWorkflowRequestToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CreateWorkflowRequestToJSONTyped(value?: CreateWorkflowRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'name': value['name'],
|
|
92
|
+
'key': value['key'],
|
|
93
|
+
'description': value['description'],
|
|
94
|
+
'is_critical': value['isCritical'],
|
|
95
|
+
'tags': value['tags'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 { RequestMeta } from './RequestMeta';
|
|
17
|
+
import {
|
|
18
|
+
RequestMetaFromJSON,
|
|
19
|
+
RequestMetaFromJSONTyped,
|
|
20
|
+
RequestMetaToJSON,
|
|
21
|
+
RequestMetaToJSONTyped,
|
|
22
|
+
} from './RequestMeta';
|
|
23
|
+
import type { DeleteWorkflow200ResponseData } from './DeleteWorkflow200ResponseData';
|
|
24
|
+
import {
|
|
25
|
+
DeleteWorkflow200ResponseDataFromJSON,
|
|
26
|
+
DeleteWorkflow200ResponseDataFromJSONTyped,
|
|
27
|
+
DeleteWorkflow200ResponseDataToJSON,
|
|
28
|
+
DeleteWorkflow200ResponseDataToJSONTyped,
|
|
29
|
+
} from './DeleteWorkflow200ResponseData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface DeleteWorkflow200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface DeleteWorkflow200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DeleteWorkflow200ResponseData}
|
|
40
|
+
* @memberof DeleteWorkflow200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: DeleteWorkflow200ResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof DeleteWorkflow200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the DeleteWorkflow200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfDeleteWorkflow200Response(value: object): value is DeleteWorkflow200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DeleteWorkflow200ResponseFromJSON(json: any): DeleteWorkflow200Response {
|
|
59
|
+
return DeleteWorkflow200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function DeleteWorkflow200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteWorkflow200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : DeleteWorkflow200ResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function DeleteWorkflow200ResponseToJSON(json: any): DeleteWorkflow200Response {
|
|
74
|
+
return DeleteWorkflow200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function DeleteWorkflow200ResponseToJSONTyped(value?: DeleteWorkflow200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': DeleteWorkflow200ResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -16,35 +16,35 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface DeleteWorkflow200ResponseData
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface DeleteWorkflow200ResponseData {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof DeleteWorkflow200ResponseData
|
|
26
26
|
*/
|
|
27
27
|
key?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {boolean}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof DeleteWorkflow200ResponseData
|
|
32
32
|
*/
|
|
33
33
|
deleted?: boolean;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Check if a given object implements the
|
|
37
|
+
* Check if a given object implements the DeleteWorkflow200ResponseData interface.
|
|
38
38
|
*/
|
|
39
|
-
export function
|
|
39
|
+
export function instanceOfDeleteWorkflow200ResponseData(value: object): value is DeleteWorkflow200ResponseData {
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function
|
|
44
|
-
return
|
|
43
|
+
export function DeleteWorkflow200ResponseDataFromJSON(json: any): DeleteWorkflow200ResponseData {
|
|
44
|
+
return DeleteWorkflow200ResponseDataFromJSONTyped(json, false);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
47
|
+
export function DeleteWorkflow200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteWorkflow200ResponseData {
|
|
48
48
|
if (json == null) {
|
|
49
49
|
return json;
|
|
50
50
|
}
|
|
@@ -55,11 +55,11 @@ export function TopicDeleteResponseDataFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export function
|
|
59
|
-
return
|
|
58
|
+
export function DeleteWorkflow200ResponseDataToJSON(json: any): DeleteWorkflow200ResponseData {
|
|
59
|
+
return DeleteWorkflow200ResponseDataToJSONTyped(json, false);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export function
|
|
62
|
+
export function DeleteWorkflow200ResponseDataToJSONTyped(value?: DeleteWorkflow200ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
63
63
|
if (value == null) {
|
|
64
64
|
return value;
|
|
65
65
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 { RequestMeta } from './RequestMeta';
|
|
17
|
+
import {
|
|
18
|
+
RequestMetaFromJSON,
|
|
19
|
+
RequestMetaFromJSONTyped,
|
|
20
|
+
RequestMetaToJSON,
|
|
21
|
+
RequestMetaToJSONTyped,
|
|
22
|
+
} from './RequestMeta';
|
|
23
|
+
import type { DeleteWorkflowStep200ResponseData } from './DeleteWorkflowStep200ResponseData';
|
|
24
|
+
import {
|
|
25
|
+
DeleteWorkflowStep200ResponseDataFromJSON,
|
|
26
|
+
DeleteWorkflowStep200ResponseDataFromJSONTyped,
|
|
27
|
+
DeleteWorkflowStep200ResponseDataToJSON,
|
|
28
|
+
DeleteWorkflowStep200ResponseDataToJSONTyped,
|
|
29
|
+
} from './DeleteWorkflowStep200ResponseData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface DeleteWorkflowStep200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface DeleteWorkflowStep200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DeleteWorkflowStep200ResponseData}
|
|
40
|
+
* @memberof DeleteWorkflowStep200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: DeleteWorkflowStep200ResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof DeleteWorkflowStep200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the DeleteWorkflowStep200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfDeleteWorkflowStep200Response(value: object): value is DeleteWorkflowStep200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DeleteWorkflowStep200ResponseFromJSON(json: any): DeleteWorkflowStep200Response {
|
|
59
|
+
return DeleteWorkflowStep200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function DeleteWorkflowStep200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteWorkflowStep200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : DeleteWorkflowStep200ResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function DeleteWorkflowStep200ResponseToJSON(json: any): DeleteWorkflowStep200Response {
|
|
74
|
+
return DeleteWorkflowStep200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function DeleteWorkflowStep200ResponseToJSONTyped(value?: DeleteWorkflowStep200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': DeleteWorkflowStep200ResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|