@zyphr-dev/node-sdk 0.1.42 → 0.1.44
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/README.md +6 -4
- package/dist/index.cjs +2056 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2258 -466
- package/dist/index.d.ts +2258 -466
- package/dist/index.js +1852 -340
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +40 -1
- package/src/client.ts +18 -3
- package/src/clientAuth.ts +45 -12
- package/src/src/apis/AuthApplicationApi.ts +93 -0
- package/src/src/apis/AuthEmailTemplatesApi.ts +4 -4
- package/src/src/apis/AuthUserDirectoryApi.ts +120 -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/apis/index.ts +1 -0
- package/src/src/models/ApplicationSelf.ts +118 -0
- package/src/src/models/ApplicationSelfResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateTestRequest.ts +1 -1
- package/src/src/models/AuthMethods.ts +111 -0
- package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
- package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
- package/src/src/models/GetEndUserAuthMethods200Response.ts +88 -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 +39 -1
|
@@ -0,0 +1,126 @@
|
|
|
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 GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
20
|
+
*/
|
|
21
|
+
export interface GetWaaSEndpointMetrics200ResponseDataWindowsValue {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
26
|
+
*/
|
|
27
|
+
window?: GetWaaSEndpointMetrics200ResponseDataWindowsValueWindowEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
32
|
+
*/
|
|
33
|
+
total?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
38
|
+
*/
|
|
39
|
+
successes?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
44
|
+
*/
|
|
45
|
+
failures?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
50
|
+
*/
|
|
51
|
+
successRate?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
56
|
+
*/
|
|
57
|
+
avgLatencyMs?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof GetWaaSEndpointMetrics200ResponseDataWindowsValue
|
|
62
|
+
*/
|
|
63
|
+
p95LatencyMs?: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export const GetWaaSEndpointMetrics200ResponseDataWindowsValueWindowEnum = {
|
|
71
|
+
_1H: '1h',
|
|
72
|
+
_24H: '24h',
|
|
73
|
+
_7D: '7d',
|
|
74
|
+
_30D: '30d'
|
|
75
|
+
} as const;
|
|
76
|
+
export type GetWaaSEndpointMetrics200ResponseDataWindowsValueWindowEnum = typeof GetWaaSEndpointMetrics200ResponseDataWindowsValueWindowEnum[keyof typeof GetWaaSEndpointMetrics200ResponseDataWindowsValueWindowEnum];
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the GetWaaSEndpointMetrics200ResponseDataWindowsValue interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfGetWaaSEndpointMetrics200ResponseDataWindowsValue(value: object): value is GetWaaSEndpointMetrics200ResponseDataWindowsValue {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function GetWaaSEndpointMetrics200ResponseDataWindowsValueFromJSON(json: any): GetWaaSEndpointMetrics200ResponseDataWindowsValue {
|
|
87
|
+
return GetWaaSEndpointMetrics200ResponseDataWindowsValueFromJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function GetWaaSEndpointMetrics200ResponseDataWindowsValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetWaaSEndpointMetrics200ResponseDataWindowsValue {
|
|
91
|
+
if (json == null) {
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'window': json['window'] == null ? undefined : json['window'],
|
|
97
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
98
|
+
'successes': json['successes'] == null ? undefined : json['successes'],
|
|
99
|
+
'failures': json['failures'] == null ? undefined : json['failures'],
|
|
100
|
+
'successRate': json['success_rate'] == null ? undefined : json['success_rate'],
|
|
101
|
+
'avgLatencyMs': json['avg_latency_ms'] == null ? undefined : json['avg_latency_ms'],
|
|
102
|
+
'p95LatencyMs': json['p95_latency_ms'] == null ? undefined : json['p95_latency_ms'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function GetWaaSEndpointMetrics200ResponseDataWindowsValueToJSON(json: any): GetWaaSEndpointMetrics200ResponseDataWindowsValue {
|
|
107
|
+
return GetWaaSEndpointMetrics200ResponseDataWindowsValueToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function GetWaaSEndpointMetrics200ResponseDataWindowsValueToJSONTyped(value?: GetWaaSEndpointMetrics200ResponseDataWindowsValue | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'window': value['window'],
|
|
118
|
+
'total': value['total'],
|
|
119
|
+
'successes': value['successes'],
|
|
120
|
+
'failures': value['failures'],
|
|
121
|
+
'success_rate': value['successRate'],
|
|
122
|
+
'avg_latency_ms': value['avgLatencyMs'],
|
|
123
|
+
'p95_latency_ms': value['p95LatencyMs'],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -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 { InviteEndUser200ResponseData } from './InviteEndUser200ResponseData';
|
|
17
|
+
import {
|
|
18
|
+
InviteEndUser200ResponseDataFromJSON,
|
|
19
|
+
InviteEndUser200ResponseDataFromJSONTyped,
|
|
20
|
+
InviteEndUser200ResponseDataToJSON,
|
|
21
|
+
InviteEndUser200ResponseDataToJSONTyped,
|
|
22
|
+
} from './InviteEndUser200ResponseData';
|
|
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 InviteEndUser200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface InviteEndUser200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {InviteEndUser200ResponseData}
|
|
40
|
+
* @memberof InviteEndUser200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: InviteEndUser200ResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof InviteEndUser200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the InviteEndUser200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfInviteEndUser200Response(value: object): value is InviteEndUser200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function InviteEndUser200ResponseFromJSON(json: any): InviteEndUser200Response {
|
|
59
|
+
return InviteEndUser200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function InviteEndUser200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteEndUser200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : InviteEndUser200ResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function InviteEndUser200ResponseToJSON(json: any): InviteEndUser200Response {
|
|
74
|
+
return InviteEndUser200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function InviteEndUser200ResponseToJSONTyped(value?: InviteEndUser200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': InviteEndUser200ResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': GetDomain200ResponseMetaToJSON(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 InviteEndUser200ResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface InviteEndUser200ResponseData {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InviteEndUser200ResponseData
|
|
26
|
+
*/
|
|
27
|
+
userId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* True when a new user was provisioned; false when an existing user was reused (idempotent on email).
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof InviteEndUser200ResponseData
|
|
32
|
+
*/
|
|
33
|
+
created?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True when a magic-link or password-reset email was successfully dispatched.
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof InviteEndUser200ResponseData
|
|
38
|
+
*/
|
|
39
|
+
linkSent?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the InviteEndUser200ResponseData interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfInviteEndUser200ResponseData(value: object): value is InviteEndUser200ResponseData {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function InviteEndUser200ResponseDataFromJSON(json: any): InviteEndUser200ResponseData {
|
|
50
|
+
return InviteEndUser200ResponseDataFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function InviteEndUser200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteEndUser200ResponseData {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
60
|
+
'created': json['created'] == null ? undefined : json['created'],
|
|
61
|
+
'linkSent': json['link_sent'] == null ? undefined : json['link_sent'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function InviteEndUser200ResponseDataToJSON(json: any): InviteEndUser200ResponseData {
|
|
66
|
+
return InviteEndUser200ResponseDataToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function InviteEndUser200ResponseDataToJSONTyped(value?: InviteEndUser200ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'user_id': value['userId'],
|
|
77
|
+
'created': value['created'],
|
|
78
|
+
'link_sent': value['linkSent'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -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 { AuthUser } from './AuthUser';
|
|
17
|
+
import {
|
|
18
|
+
AuthUserFromJSON,
|
|
19
|
+
AuthUserFromJSONTyped,
|
|
20
|
+
AuthUserToJSON,
|
|
21
|
+
AuthUserToJSONTyped,
|
|
22
|
+
} from './AuthUser';
|
|
23
|
+
import type { ListEndUsers200ResponseMeta } from './ListEndUsers200ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
ListEndUsers200ResponseMetaFromJSON,
|
|
26
|
+
ListEndUsers200ResponseMetaFromJSONTyped,
|
|
27
|
+
ListEndUsers200ResponseMetaToJSON,
|
|
28
|
+
ListEndUsers200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './ListEndUsers200ResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ListEndUsers200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface ListEndUsers200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<AuthUser>}
|
|
40
|
+
* @memberof ListEndUsers200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: Array<AuthUser>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ListEndUsers200ResponseMeta}
|
|
46
|
+
* @memberof ListEndUsers200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: ListEndUsers200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the ListEndUsers200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfListEndUsers200Response(value: object): value is ListEndUsers200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ListEndUsers200ResponseFromJSON(json: any): ListEndUsers200Response {
|
|
59
|
+
return ListEndUsers200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ListEndUsers200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListEndUsers200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(AuthUserFromJSON)),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : ListEndUsers200ResponseMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ListEndUsers200ResponseToJSON(json: any): ListEndUsers200Response {
|
|
74
|
+
return ListEndUsers200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ListEndUsers200ResponseToJSONTyped(value?: ListEndUsers200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(AuthUserToJSON)),
|
|
85
|
+
'meta': ListEndUsers200ResponseMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts}
RENAMED
|
@@ -16,53 +16,53 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface ListEndUsers200ResponseMeta
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface ListEndUsers200ResponseMeta {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof ListEndUsers200ResponseMeta
|
|
26
26
|
*/
|
|
27
27
|
requestId?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof ListEndUsers200ResponseMeta
|
|
32
32
|
*/
|
|
33
33
|
page?: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
37
|
-
* @memberof
|
|
37
|
+
* @memberof ListEndUsers200ResponseMeta
|
|
38
38
|
*/
|
|
39
39
|
perPage?: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
|
-
* @memberof
|
|
43
|
+
* @memberof ListEndUsers200ResponseMeta
|
|
44
44
|
*/
|
|
45
45
|
total?: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
|
-
* @memberof
|
|
49
|
+
* @memberof ListEndUsers200ResponseMeta
|
|
50
50
|
*/
|
|
51
51
|
totalPages?: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* Check if a given object implements the
|
|
55
|
+
* Check if a given object implements the ListEndUsers200ResponseMeta interface.
|
|
56
56
|
*/
|
|
57
|
-
export function
|
|
57
|
+
export function instanceOfListEndUsers200ResponseMeta(value: object): value is ListEndUsers200ResponseMeta {
|
|
58
58
|
return true;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export function
|
|
62
|
-
return
|
|
61
|
+
export function ListEndUsers200ResponseMetaFromJSON(json: any): ListEndUsers200ResponseMeta {
|
|
62
|
+
return ListEndUsers200ResponseMetaFromJSONTyped(json, false);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function
|
|
65
|
+
export function ListEndUsers200ResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListEndUsers200ResponseMeta {
|
|
66
66
|
if (json == null) {
|
|
67
67
|
return json;
|
|
68
68
|
}
|
|
@@ -76,11 +76,11 @@ export function ListWorkflowExecutions200ResponseMetaFromJSONTyped(json: any, ig
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function
|
|
80
|
-
return
|
|
79
|
+
export function ListEndUsers200ResponseMetaToJSON(json: any): ListEndUsers200ResponseMeta {
|
|
80
|
+
return ListEndUsers200ResponseMetaToJSONTyped(json, false);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export function
|
|
83
|
+
export function ListEndUsers200ResponseMetaToJSONTyped(value?: ListEndUsers200ResponseMeta | null, ignoreDiscriminator: boolean = false): any {
|
|
84
84
|
if (value == null) {
|
|
85
85
|
return value;
|
|
86
86
|
}
|
|
@@ -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
|
+
|