@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.
Files changed (40) hide show
  1. package/dist/index.cjs +2315 -1220
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1724 -622
  4. package/dist/index.d.ts +1724 -622
  5. package/dist/index.js +2195 -1203
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +24 -4
  9. package/src/src/apis/AuthRegistrationApi.ts +4 -4
  10. package/src/src/apis/WorkflowsApi.ts +912 -0
  11. package/src/src/apis/index.ts +1 -1
  12. package/src/src/models/AddWorkflowStep201Response.ts +88 -0
  13. package/src/src/models/AddWorkflowStepRequest.ts +136 -0
  14. package/src/src/models/CreateWorkflow201Response.ts +88 -0
  15. package/src/src/models/CreateWorkflowRequest.ts +98 -0
  16. package/src/src/models/DeleteWorkflow200Response.ts +88 -0
  17. package/src/src/models/{TopicDeleteResponseData.ts → DeleteWorkflow200ResponseData.ts} +12 -12
  18. package/src/src/models/DeleteWorkflowStep200Response.ts +88 -0
  19. package/src/src/models/DeleteWorkflowStep200ResponseData.ts +81 -0
  20. package/src/src/models/ListWorkflowExecutions200Response.ts +88 -0
  21. package/src/src/models/{SmsListResponseMeta.ts → ListWorkflowExecutions200ResponseMeta.ts} +15 -15
  22. package/src/src/models/ListWorkflows200Response.ts +88 -0
  23. package/src/src/models/ListWorkflows200ResponseMeta.ts +121 -0
  24. package/src/src/models/ReorderWorkflowStepsRequest.ts +66 -0
  25. package/src/src/models/SignInWithGameCenterRequest.ts +1 -1
  26. package/src/src/models/SmsListResponse.ts +10 -10
  27. package/src/src/models/TopicDeleteResponse.ts +10 -10
  28. package/src/src/models/TriggerWorkflow202Response.ts +88 -0
  29. package/src/src/models/TriggerWorkflow202ResponseData.ts +81 -0
  30. package/src/src/models/TriggerWorkflowRequest.ts +90 -0
  31. package/src/src/models/UpdateWorkflowRequest.ts +89 -0
  32. package/src/src/models/UpdateWorkflowStatusRequest.ts +76 -0
  33. package/src/src/models/UpdateWorkflowStepRequest.ts +73 -0
  34. package/src/src/models/Workflow.ts +187 -0
  35. package/src/src/models/WorkflowStatus.ts +55 -0
  36. package/src/src/models/WorkflowStep.ts +176 -0
  37. package/src/src/models/WorkflowStepType.ts +60 -0
  38. package/src/src/models/index.ts +23 -3
  39. package/src/src/apis/MuseApi.ts +0 -531
  40. package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +0 -105
@@ -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 { TriggerWorkflow202ResponseData } from './TriggerWorkflow202ResponseData';
24
+ import {
25
+ TriggerWorkflow202ResponseDataFromJSON,
26
+ TriggerWorkflow202ResponseDataFromJSONTyped,
27
+ TriggerWorkflow202ResponseDataToJSON,
28
+ TriggerWorkflow202ResponseDataToJSONTyped,
29
+ } from './TriggerWorkflow202ResponseData';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface TriggerWorkflow202Response
35
+ */
36
+ export interface TriggerWorkflow202Response {
37
+ /**
38
+ *
39
+ * @type {TriggerWorkflow202ResponseData}
40
+ * @memberof TriggerWorkflow202Response
41
+ */
42
+ data?: TriggerWorkflow202ResponseData;
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof TriggerWorkflow202Response
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the TriggerWorkflow202Response interface.
53
+ */
54
+ export function instanceOfTriggerWorkflow202Response(value: object): value is TriggerWorkflow202Response {
55
+ return true;
56
+ }
57
+
58
+ export function TriggerWorkflow202ResponseFromJSON(json: any): TriggerWorkflow202Response {
59
+ return TriggerWorkflow202ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function TriggerWorkflow202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TriggerWorkflow202Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : TriggerWorkflow202ResponseDataFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function TriggerWorkflow202ResponseToJSON(json: any): TriggerWorkflow202Response {
74
+ return TriggerWorkflow202ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function TriggerWorkflow202ResponseToJSONTyped(value?: TriggerWorkflow202Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': TriggerWorkflow202ResponseDataToJSON(value['data']),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,81 @@
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 TriggerWorkflow202ResponseData
20
+ */
21
+ export interface TriggerWorkflow202ResponseData {
22
+ /**
23
+ *
24
+ * @type {Array<string>}
25
+ * @memberof TriggerWorkflow202ResponseData
26
+ */
27
+ executionIds?: Array<string>;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof TriggerWorkflow202ResponseData
32
+ */
33
+ subscriberCount?: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof TriggerWorkflow202ResponseData
38
+ */
39
+ workflowKey?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the TriggerWorkflow202ResponseData interface.
44
+ */
45
+ export function instanceOfTriggerWorkflow202ResponseData(value: object): value is TriggerWorkflow202ResponseData {
46
+ return true;
47
+ }
48
+
49
+ export function TriggerWorkflow202ResponseDataFromJSON(json: any): TriggerWorkflow202ResponseData {
50
+ return TriggerWorkflow202ResponseDataFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function TriggerWorkflow202ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TriggerWorkflow202ResponseData {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'executionIds': json['execution_ids'] == null ? undefined : json['execution_ids'],
60
+ 'subscriberCount': json['subscriber_count'] == null ? undefined : json['subscriber_count'],
61
+ 'workflowKey': json['workflow_key'] == null ? undefined : json['workflow_key'],
62
+ };
63
+ }
64
+
65
+ export function TriggerWorkflow202ResponseDataToJSON(json: any): TriggerWorkflow202ResponseData {
66
+ return TriggerWorkflow202ResponseDataToJSONTyped(json, false);
67
+ }
68
+
69
+ export function TriggerWorkflow202ResponseDataToJSONTyped(value?: TriggerWorkflow202ResponseData | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'execution_ids': value['executionIds'],
77
+ 'subscriber_count': value['subscriberCount'],
78
+ 'workflow_key': value['workflowKey'],
79
+ };
80
+ }
81
+
@@ -0,0 +1,90 @@
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 TriggerWorkflowRequest
20
+ */
21
+ export interface TriggerWorkflowRequest {
22
+ /**
23
+ * Recipient(s). An array of subscriber ids. For convenience the API also accepts a single subscriber id string, or a topic fan-out object `{ "topic": "<topic_key>" }` to deliver to every subscriber of a topic.
24
+ * @type {Array<string>}
25
+ * @memberof TriggerWorkflowRequest
26
+ */
27
+ to: Array<string>;
28
+ /**
29
+ * Data made available to step templates and branch conditions.
30
+ * @type {{ [key: string]: any; }}
31
+ * @memberof TriggerWorkflowRequest
32
+ */
33
+ payload?: { [key: string]: any; };
34
+ /**
35
+ * Optional idempotency/correlation identifier.
36
+ * @type {string}
37
+ * @memberof TriggerWorkflowRequest
38
+ */
39
+ transactionId?: string;
40
+ /**
41
+ * Optional sender override for email steps (e.g. `noreply@yourdomain.com`).
42
+ * @type {string}
43
+ * @memberof TriggerWorkflowRequest
44
+ */
45
+ from?: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the TriggerWorkflowRequest interface.
50
+ */
51
+ export function instanceOfTriggerWorkflowRequest(value: object): value is TriggerWorkflowRequest {
52
+ if (!('to' in value) || value['to'] === undefined) return false;
53
+ return true;
54
+ }
55
+
56
+ export function TriggerWorkflowRequestFromJSON(json: any): TriggerWorkflowRequest {
57
+ return TriggerWorkflowRequestFromJSONTyped(json, false);
58
+ }
59
+
60
+ export function TriggerWorkflowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TriggerWorkflowRequest {
61
+ if (json == null) {
62
+ return json;
63
+ }
64
+ return {
65
+
66
+ 'to': json['to'],
67
+ 'payload': json['payload'] == null ? undefined : json['payload'],
68
+ 'transactionId': json['transaction_id'] == null ? undefined : json['transaction_id'],
69
+ 'from': json['from'] == null ? undefined : json['from'],
70
+ };
71
+ }
72
+
73
+ export function TriggerWorkflowRequestToJSON(json: any): TriggerWorkflowRequest {
74
+ return TriggerWorkflowRequestToJSONTyped(json, false);
75
+ }
76
+
77
+ export function TriggerWorkflowRequestToJSONTyped(value?: TriggerWorkflowRequest | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'to': value['to'],
85
+ 'payload': value['payload'],
86
+ 'transaction_id': value['transactionId'],
87
+ 'from': value['from'],
88
+ };
89
+ }
90
+
@@ -0,0 +1,89 @@
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 UpdateWorkflowRequest
20
+ */
21
+ export interface UpdateWorkflowRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UpdateWorkflowRequest
26
+ */
27
+ name?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UpdateWorkflowRequest
32
+ */
33
+ description?: string | null;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof UpdateWorkflowRequest
38
+ */
39
+ isCritical?: boolean;
40
+ /**
41
+ *
42
+ * @type {Array<string>}
43
+ * @memberof UpdateWorkflowRequest
44
+ */
45
+ tags?: Array<string>;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the UpdateWorkflowRequest interface.
50
+ */
51
+ export function instanceOfUpdateWorkflowRequest(value: object): value is UpdateWorkflowRequest {
52
+ return true;
53
+ }
54
+
55
+ export function UpdateWorkflowRequestFromJSON(json: any): UpdateWorkflowRequest {
56
+ return UpdateWorkflowRequestFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function UpdateWorkflowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateWorkflowRequest {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'name': json['name'] == null ? undefined : json['name'],
66
+ 'description': json['description'] == null ? undefined : json['description'],
67
+ 'isCritical': json['is_critical'] == null ? undefined : json['is_critical'],
68
+ 'tags': json['tags'] == null ? undefined : json['tags'],
69
+ };
70
+ }
71
+
72
+ export function UpdateWorkflowRequestToJSON(json: any): UpdateWorkflowRequest {
73
+ return UpdateWorkflowRequestToJSONTyped(json, false);
74
+ }
75
+
76
+ export function UpdateWorkflowRequestToJSONTyped(value?: UpdateWorkflowRequest | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'name': value['name'],
84
+ 'description': value['description'],
85
+ 'is_critical': value['isCritical'],
86
+ 'tags': value['tags'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,76 @@
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 { WorkflowStatus } from './WorkflowStatus';
17
+ import {
18
+ WorkflowStatusFromJSON,
19
+ WorkflowStatusFromJSONTyped,
20
+ WorkflowStatusToJSON,
21
+ WorkflowStatusToJSONTyped,
22
+ } from './WorkflowStatus';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateWorkflowStatusRequest
28
+ */
29
+ export interface UpdateWorkflowStatusRequest {
30
+ /**
31
+ *
32
+ * @type {WorkflowStatus}
33
+ * @memberof UpdateWorkflowStatusRequest
34
+ */
35
+ status: WorkflowStatus;
36
+ }
37
+
38
+
39
+
40
+ /**
41
+ * Check if a given object implements the UpdateWorkflowStatusRequest interface.
42
+ */
43
+ export function instanceOfUpdateWorkflowStatusRequest(value: object): value is UpdateWorkflowStatusRequest {
44
+ if (!('status' in value) || value['status'] === undefined) return false;
45
+ return true;
46
+ }
47
+
48
+ export function UpdateWorkflowStatusRequestFromJSON(json: any): UpdateWorkflowStatusRequest {
49
+ return UpdateWorkflowStatusRequestFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function UpdateWorkflowStatusRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateWorkflowStatusRequest {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+
58
+ 'status': WorkflowStatusFromJSON(json['status']),
59
+ };
60
+ }
61
+
62
+ export function UpdateWorkflowStatusRequestToJSON(json: any): UpdateWorkflowStatusRequest {
63
+ return UpdateWorkflowStatusRequestToJSONTyped(json, false);
64
+ }
65
+
66
+ export function UpdateWorkflowStatusRequestToJSONTyped(value?: UpdateWorkflowStatusRequest | null, ignoreDiscriminator: boolean = false): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+
71
+ return {
72
+
73
+ 'status': WorkflowStatusToJSON(value['status']),
74
+ };
75
+ }
76
+
@@ -0,0 +1,73 @@
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 UpdateWorkflowStepRequest
20
+ */
21
+ export interface UpdateWorkflowStepRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UpdateWorkflowStepRequest
26
+ */
27
+ name?: string;
28
+ /**
29
+ * Step configuration whose shape depends on the step's type.
30
+ * @type {{ [key: string]: any; }}
31
+ * @memberof UpdateWorkflowStepRequest
32
+ */
33
+ config?: { [key: string]: any; };
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the UpdateWorkflowStepRequest interface.
38
+ */
39
+ export function instanceOfUpdateWorkflowStepRequest(value: object): value is UpdateWorkflowStepRequest {
40
+ return true;
41
+ }
42
+
43
+ export function UpdateWorkflowStepRequestFromJSON(json: any): UpdateWorkflowStepRequest {
44
+ return UpdateWorkflowStepRequestFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function UpdateWorkflowStepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateWorkflowStepRequest {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'name': json['name'] == null ? undefined : json['name'],
54
+ 'config': json['config'] == null ? undefined : json['config'],
55
+ };
56
+ }
57
+
58
+ export function UpdateWorkflowStepRequestToJSON(json: any): UpdateWorkflowStepRequest {
59
+ return UpdateWorkflowStepRequestToJSONTyped(json, false);
60
+ }
61
+
62
+ export function UpdateWorkflowStepRequestToJSONTyped(value?: UpdateWorkflowStepRequest | null, ignoreDiscriminator: boolean = false): any {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+
67
+ return {
68
+
69
+ 'name': value['name'],
70
+ 'config': value['config'],
71
+ };
72
+ }
73
+