@zyphr-dev/node-sdk 0.1.42 → 0.1.43
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 +1763 -321
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2122 -643
- package/dist/index.d.ts +2122 -643
- package/dist/index.js +1582 -316
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +35 -1
- package/src/src/apis/AuthUserDirectoryApi.ts +54 -36
- package/src/src/apis/DomainsApi.ts +7 -6
- package/src/src/apis/InboxApi.ts +78 -54
- package/src/src/apis/TemplatesApi.ts +10 -6
- package/src/src/apis/WaaSDeliveriesApi.ts +17 -12
- package/src/src/apis/WaaSEndpointsApi.ts +50 -30
- package/src/src/apis/WaaSEventTypesApi.ts +17 -12
- package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
- package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
- package/src/src/models/GetEndUserById200Response.ts +88 -0
- package/src/src/models/GetEndUserClaims200Response.ts +88 -0
- package/src/src/models/GetEndUserClaims200ResponseData.ts +65 -0
- package/src/src/models/GetSubscriberInboxPreferences200Response.ts +73 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseData.ts +88 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInner.ts +88 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory.ts +97 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobal.ts +73 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner.ts +94 -0
- package/src/src/models/GetSubscriberNotification200Response.ts +73 -0
- package/src/src/models/GetSubscriberUnreadCount200Response.ts +73 -0
- package/src/src/models/GetWaaSDelivery200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointCircuit200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointCircuit200ResponseData.ts +123 -0
- package/src/src/models/GetWaaSEndpointMetrics200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseData.ts +99 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseDataHealth.ts +87 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseDataWindowsValue.ts +126 -0
- package/src/src/models/InviteEndUser200Response.ts +88 -0
- package/src/src/models/InviteEndUser200ResponseData.ts +81 -0
- package/src/src/models/ListEndUsers200Response.ts +88 -0
- package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts} +15 -15
- package/src/src/models/ListWorkflowExecutions200Response.ts +11 -11
- package/src/src/models/MarkAllSubscriberNotificationsRead200Response.ts +73 -0
- package/src/src/models/RotateWaaSEndpointSecret200Response.ts +88 -0
- package/src/src/models/RotateWaaSEndpointSecret200ResponseData.ts +66 -0
- package/src/src/models/SendTemplateTestEmail202Response.ts +90 -0
- package/src/src/models/SendTemplateTestEmail202ResponseData.ts +120 -0
- package/src/src/models/SendTemplateTestEmail202ResponseMeta.ts +66 -0
- package/src/src/models/SmsListResponse.ts +10 -10
- package/src/src/models/UpdateSubscriberPreferences200Response.ts +73 -0
- package/src/src/models/UpdateSubscriberPreferences200ResponseData.ts +81 -0
- package/src/src/models/UpdateSubscriberPreferences200ResponseDataPreferencesInner.ts +102 -0
- package/src/src/models/UpdateWaaSEndpoint200Response.ts +88 -0
- package/src/src/models/UpdateWaaSEventType200Response.ts +88 -0
- package/src/src/models/index.ts +35 -1
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type { ListWorkflowExecutions200ResponseMeta } from './ListWorkflowExecutions200ResponseMeta';
|
|
17
|
-
import {
|
|
18
|
-
ListWorkflowExecutions200ResponseMetaFromJSON,
|
|
19
|
-
ListWorkflowExecutions200ResponseMetaFromJSONTyped,
|
|
20
|
-
ListWorkflowExecutions200ResponseMetaToJSON,
|
|
21
|
-
ListWorkflowExecutions200ResponseMetaToJSONTyped,
|
|
22
|
-
} from './ListWorkflowExecutions200ResponseMeta';
|
|
23
16
|
import type { WorkflowExecution } from './WorkflowExecution';
|
|
24
17
|
import {
|
|
25
18
|
WorkflowExecutionFromJSON,
|
|
@@ -27,6 +20,13 @@ import {
|
|
|
27
20
|
WorkflowExecutionToJSON,
|
|
28
21
|
WorkflowExecutionToJSONTyped,
|
|
29
22
|
} from './WorkflowExecution';
|
|
23
|
+
import type { ListEndUsers200ResponseMeta } from './ListEndUsers200ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
ListEndUsers200ResponseMetaFromJSON,
|
|
26
|
+
ListEndUsers200ResponseMetaFromJSONTyped,
|
|
27
|
+
ListEndUsers200ResponseMetaToJSON,
|
|
28
|
+
ListEndUsers200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './ListEndUsers200ResponseMeta';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
@@ -42,10 +42,10 @@ export interface ListWorkflowExecutions200Response {
|
|
|
42
42
|
data?: Array<WorkflowExecution>;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
|
-
* @type {
|
|
45
|
+
* @type {ListEndUsers200ResponseMeta}
|
|
46
46
|
* @memberof ListWorkflowExecutions200Response
|
|
47
47
|
*/
|
|
48
|
-
meta?:
|
|
48
|
+
meta?: ListEndUsers200ResponseMeta;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -66,7 +66,7 @@ export function ListWorkflowExecutions200ResponseFromJSONTyped(json: any, ignore
|
|
|
66
66
|
return {
|
|
67
67
|
|
|
68
68
|
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(WorkflowExecutionFromJSON)),
|
|
69
|
-
'meta': json['meta'] == null ? undefined :
|
|
69
|
+
'meta': json['meta'] == null ? undefined : ListEndUsers200ResponseMetaFromJSON(json['meta']),
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -82,7 +82,7 @@ export function ListWorkflowExecutions200ResponseToJSONTyped(value?: ListWorkflo
|
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
84
|
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(WorkflowExecutionToJSON)),
|
|
85
|
-
'meta':
|
|
85
|
+
'meta': ListEndUsers200ResponseMetaToJSON(value['meta']),
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -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
|
+
import type { MarkAllReadData } from './MarkAllReadData';
|
|
17
|
+
import {
|
|
18
|
+
MarkAllReadDataFromJSON,
|
|
19
|
+
MarkAllReadDataFromJSONTyped,
|
|
20
|
+
MarkAllReadDataToJSON,
|
|
21
|
+
MarkAllReadDataToJSONTyped,
|
|
22
|
+
} from './MarkAllReadData';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface MarkAllSubscriberNotificationsRead200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface MarkAllSubscriberNotificationsRead200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {MarkAllReadData}
|
|
33
|
+
* @memberof MarkAllSubscriberNotificationsRead200Response
|
|
34
|
+
*/
|
|
35
|
+
data?: MarkAllReadData;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the MarkAllSubscriberNotificationsRead200Response interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfMarkAllSubscriberNotificationsRead200Response(value: object): value is MarkAllSubscriberNotificationsRead200Response {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function MarkAllSubscriberNotificationsRead200ResponseFromJSON(json: any): MarkAllSubscriberNotificationsRead200Response {
|
|
46
|
+
return MarkAllSubscriberNotificationsRead200ResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function MarkAllSubscriberNotificationsRead200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarkAllSubscriberNotificationsRead200Response {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : MarkAllReadDataFromJSON(json['data']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function MarkAllSubscriberNotificationsRead200ResponseToJSON(json: any): MarkAllSubscriberNotificationsRead200Response {
|
|
60
|
+
return MarkAllSubscriberNotificationsRead200ResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function MarkAllSubscriberNotificationsRead200ResponseToJSONTyped(value?: MarkAllSubscriberNotificationsRead200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': MarkAllReadDataToJSON(value['data']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -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 { RotateWaaSEndpointSecret200ResponseData } from './RotateWaaSEndpointSecret200ResponseData';
|
|
17
|
+
import {
|
|
18
|
+
RotateWaaSEndpointSecret200ResponseDataFromJSON,
|
|
19
|
+
RotateWaaSEndpointSecret200ResponseDataFromJSONTyped,
|
|
20
|
+
RotateWaaSEndpointSecret200ResponseDataToJSON,
|
|
21
|
+
RotateWaaSEndpointSecret200ResponseDataToJSONTyped,
|
|
22
|
+
} from './RotateWaaSEndpointSecret200ResponseData';
|
|
23
|
+
import type { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
GetDomain200ResponseMetaFromJSON,
|
|
26
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
27
|
+
GetDomain200ResponseMetaToJSON,
|
|
28
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './GetDomain200ResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface RotateWaaSEndpointSecret200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface RotateWaaSEndpointSecret200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {RotateWaaSEndpointSecret200ResponseData}
|
|
40
|
+
* @memberof RotateWaaSEndpointSecret200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: RotateWaaSEndpointSecret200ResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof RotateWaaSEndpointSecret200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the RotateWaaSEndpointSecret200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfRotateWaaSEndpointSecret200Response(value: object): value is RotateWaaSEndpointSecret200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function RotateWaaSEndpointSecret200ResponseFromJSON(json: any): RotateWaaSEndpointSecret200Response {
|
|
59
|
+
return RotateWaaSEndpointSecret200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RotateWaaSEndpointSecret200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RotateWaaSEndpointSecret200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : RotateWaaSEndpointSecret200ResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function RotateWaaSEndpointSecret200ResponseToJSON(json: any): RotateWaaSEndpointSecret200Response {
|
|
74
|
+
return RotateWaaSEndpointSecret200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function RotateWaaSEndpointSecret200ResponseToJSONTyped(value?: RotateWaaSEndpointSecret200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': RotateWaaSEndpointSecret200ResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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 RotateWaaSEndpointSecret200ResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface RotateWaaSEndpointSecret200ResponseData {
|
|
22
|
+
/**
|
|
23
|
+
* The newly generated signing secret. Returned only on rotation.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RotateWaaSEndpointSecret200ResponseData
|
|
26
|
+
*/
|
|
27
|
+
secret: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the RotateWaaSEndpointSecret200ResponseData interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfRotateWaaSEndpointSecret200ResponseData(value: object): value is RotateWaaSEndpointSecret200ResponseData {
|
|
34
|
+
if (!('secret' in value) || value['secret'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function RotateWaaSEndpointSecret200ResponseDataFromJSON(json: any): RotateWaaSEndpointSecret200ResponseData {
|
|
39
|
+
return RotateWaaSEndpointSecret200ResponseDataFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function RotateWaaSEndpointSecret200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RotateWaaSEndpointSecret200ResponseData {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'secret': json['secret'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function RotateWaaSEndpointSecret200ResponseDataToJSON(json: any): RotateWaaSEndpointSecret200ResponseData {
|
|
53
|
+
return RotateWaaSEndpointSecret200ResponseDataToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function RotateWaaSEndpointSecret200ResponseDataToJSONTyped(value?: RotateWaaSEndpointSecret200ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'secret': value['secret'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -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
|
+
import type { SendTemplateTestEmail202ResponseData } from './SendTemplateTestEmail202ResponseData';
|
|
17
|
+
import {
|
|
18
|
+
SendTemplateTestEmail202ResponseDataFromJSON,
|
|
19
|
+
SendTemplateTestEmail202ResponseDataFromJSONTyped,
|
|
20
|
+
SendTemplateTestEmail202ResponseDataToJSON,
|
|
21
|
+
SendTemplateTestEmail202ResponseDataToJSONTyped,
|
|
22
|
+
} from './SendTemplateTestEmail202ResponseData';
|
|
23
|
+
import type { SendTemplateTestEmail202ResponseMeta } from './SendTemplateTestEmail202ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
SendTemplateTestEmail202ResponseMetaFromJSON,
|
|
26
|
+
SendTemplateTestEmail202ResponseMetaFromJSONTyped,
|
|
27
|
+
SendTemplateTestEmail202ResponseMetaToJSON,
|
|
28
|
+
SendTemplateTestEmail202ResponseMetaToJSONTyped,
|
|
29
|
+
} from './SendTemplateTestEmail202ResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface SendTemplateTestEmail202Response
|
|
35
|
+
*/
|
|
36
|
+
export interface SendTemplateTestEmail202Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {SendTemplateTestEmail202ResponseData}
|
|
40
|
+
* @memberof SendTemplateTestEmail202Response
|
|
41
|
+
*/
|
|
42
|
+
data: SendTemplateTestEmail202ResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SendTemplateTestEmail202ResponseMeta}
|
|
46
|
+
* @memberof SendTemplateTestEmail202Response
|
|
47
|
+
*/
|
|
48
|
+
meta: SendTemplateTestEmail202ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the SendTemplateTestEmail202Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfSendTemplateTestEmail202Response(value: object): value is SendTemplateTestEmail202Response {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SendTemplateTestEmail202ResponseFromJSON(json: any): SendTemplateTestEmail202Response {
|
|
61
|
+
return SendTemplateTestEmail202ResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SendTemplateTestEmail202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateTestEmail202Response {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': SendTemplateTestEmail202ResponseDataFromJSON(json['data']),
|
|
71
|
+
'meta': SendTemplateTestEmail202ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function SendTemplateTestEmail202ResponseToJSON(json: any): SendTemplateTestEmail202Response {
|
|
76
|
+
return SendTemplateTestEmail202ResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function SendTemplateTestEmail202ResponseToJSONTyped(value?: SendTemplateTestEmail202Response | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': SendTemplateTestEmail202ResponseDataToJSON(value['data']),
|
|
87
|
+
'meta': SendTemplateTestEmail202ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
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 SendTemplateTestEmail202ResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface SendTemplateTestEmail202ResponseData {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
32
|
+
*/
|
|
33
|
+
messageId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
38
|
+
*/
|
|
39
|
+
to: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
44
|
+
*/
|
|
45
|
+
from: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
50
|
+
*/
|
|
51
|
+
subject: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
56
|
+
*/
|
|
57
|
+
templateId: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof SendTemplateTestEmail202ResponseData
|
|
62
|
+
*/
|
|
63
|
+
templateName: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the SendTemplateTestEmail202ResponseData interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfSendTemplateTestEmail202ResponseData(value: object): value is SendTemplateTestEmail202ResponseData {
|
|
70
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
71
|
+
if (!('messageId' in value) || value['messageId'] === undefined) return false;
|
|
72
|
+
if (!('to' in value) || value['to'] === undefined) return false;
|
|
73
|
+
if (!('from' in value) || value['from'] === undefined) return false;
|
|
74
|
+
if (!('subject' in value) || value['subject'] === undefined) return false;
|
|
75
|
+
if (!('templateId' in value) || value['templateId'] === undefined) return false;
|
|
76
|
+
if (!('templateName' in value) || value['templateName'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SendTemplateTestEmail202ResponseDataFromJSON(json: any): SendTemplateTestEmail202ResponseData {
|
|
81
|
+
return SendTemplateTestEmail202ResponseDataFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function SendTemplateTestEmail202ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateTestEmail202ResponseData {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'message': json['message'],
|
|
91
|
+
'messageId': json['message_id'],
|
|
92
|
+
'to': json['to'],
|
|
93
|
+
'from': json['from'],
|
|
94
|
+
'subject': json['subject'],
|
|
95
|
+
'templateId': json['template_id'],
|
|
96
|
+
'templateName': json['template_name'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function SendTemplateTestEmail202ResponseDataToJSON(json: any): SendTemplateTestEmail202ResponseData {
|
|
101
|
+
return SendTemplateTestEmail202ResponseDataToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function SendTemplateTestEmail202ResponseDataToJSONTyped(value?: SendTemplateTestEmail202ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'message': value['message'],
|
|
112
|
+
'message_id': value['messageId'],
|
|
113
|
+
'to': value['to'],
|
|
114
|
+
'from': value['from'],
|
|
115
|
+
'subject': value['subject'],
|
|
116
|
+
'template_id': value['templateId'],
|
|
117
|
+
'template_name': value['templateName'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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 SendTemplateTestEmail202ResponseMeta
|
|
20
|
+
*/
|
|
21
|
+
export interface SendTemplateTestEmail202ResponseMeta {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SendTemplateTestEmail202ResponseMeta
|
|
26
|
+
*/
|
|
27
|
+
requestId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SendTemplateTestEmail202ResponseMeta interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSendTemplateTestEmail202ResponseMeta(value: object): value is SendTemplateTestEmail202ResponseMeta {
|
|
34
|
+
if (!('requestId' in value) || value['requestId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SendTemplateTestEmail202ResponseMetaFromJSON(json: any): SendTemplateTestEmail202ResponseMeta {
|
|
39
|
+
return SendTemplateTestEmail202ResponseMetaFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SendTemplateTestEmail202ResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTemplateTestEmail202ResponseMeta {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'requestId': json['request_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SendTemplateTestEmail202ResponseMetaToJSON(json: any): SendTemplateTestEmail202ResponseMeta {
|
|
53
|
+
return SendTemplateTestEmail202ResponseMetaToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SendTemplateTestEmail202ResponseMetaToJSONTyped(value?: SendTemplateTestEmail202ResponseMeta | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'request_id': value['requestId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
SmsMessageToJSON,
|
|
21
21
|
SmsMessageToJSONTyped,
|
|
22
22
|
} from './SmsMessage';
|
|
23
|
-
import type {
|
|
23
|
+
import type { ListEndUsers200ResponseMeta } from './ListEndUsers200ResponseMeta';
|
|
24
24
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from './
|
|
25
|
+
ListEndUsers200ResponseMetaFromJSON,
|
|
26
|
+
ListEndUsers200ResponseMetaFromJSONTyped,
|
|
27
|
+
ListEndUsers200ResponseMetaToJSON,
|
|
28
|
+
ListEndUsers200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './ListEndUsers200ResponseMeta';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
@@ -42,10 +42,10 @@ export interface SmsListResponse {
|
|
|
42
42
|
data?: Array<SmsMessage>;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
|
-
* @type {
|
|
45
|
+
* @type {ListEndUsers200ResponseMeta}
|
|
46
46
|
* @memberof SmsListResponse
|
|
47
47
|
*/
|
|
48
|
-
meta?:
|
|
48
|
+
meta?: ListEndUsers200ResponseMeta;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -66,7 +66,7 @@ export function SmsListResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
66
66
|
return {
|
|
67
67
|
|
|
68
68
|
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(SmsMessageFromJSON)),
|
|
69
|
-
'meta': json['meta'] == null ? undefined :
|
|
69
|
+
'meta': json['meta'] == null ? undefined : ListEndUsers200ResponseMetaFromJSON(json['meta']),
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -82,7 +82,7 @@ export function SmsListResponseToJSONTyped(value?: SmsListResponse | null, ignor
|
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
84
|
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(SmsMessageToJSON)),
|
|
85
|
-
'meta':
|
|
85
|
+
'meta': ListEndUsers200ResponseMetaToJSON(value['meta']),
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|