@zyphr-dev/node-sdk 0.1.41 → 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.
Files changed (56) hide show
  1. package/dist/index.cjs +1912 -392
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2055 -501
  4. package/dist/index.d.ts +2055 -501
  5. package/dist/index.js +1721 -387
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +37 -1
  9. package/src/client.ts +4 -0
  10. package/src/src/apis/AuthUserDirectoryApi.ts +68 -46
  11. package/src/src/apis/DomainsApi.ts +7 -6
  12. package/src/src/apis/InboxApi.ts +82 -58
  13. package/src/src/apis/TemplatesApi.ts +10 -6
  14. package/src/src/apis/WaaSDeliveriesApi.ts +17 -12
  15. package/src/src/apis/WaaSEndpointsApi.ts +50 -30
  16. package/src/src/apis/WaaSEventTypesApi.ts +17 -12
  17. package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
  18. package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
  19. package/src/src/models/GetEndUserById200Response.ts +88 -0
  20. package/src/src/models/GetEndUserClaims200Response.ts +88 -0
  21. package/src/src/models/GetEndUserClaims200ResponseData.ts +65 -0
  22. package/src/src/models/GetSubscriberInboxPreferences200Response.ts +73 -0
  23. package/src/src/models/GetSubscriberInboxPreferences200ResponseData.ts +88 -0
  24. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInner.ts +88 -0
  25. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory.ts +97 -0
  26. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobal.ts +73 -0
  27. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner.ts +94 -0
  28. package/src/src/models/GetSubscriberNotification200Response.ts +73 -0
  29. package/src/src/models/GetSubscriberUnreadCount200Response.ts +73 -0
  30. package/src/src/models/GetWaaSDelivery200Response.ts +88 -0
  31. package/src/src/models/GetWaaSEndpointCircuit200Response.ts +88 -0
  32. package/src/src/models/GetWaaSEndpointCircuit200ResponseData.ts +123 -0
  33. package/src/src/models/GetWaaSEndpointMetrics200Response.ts +88 -0
  34. package/src/src/models/GetWaaSEndpointMetrics200ResponseData.ts +99 -0
  35. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataHealth.ts +87 -0
  36. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataWindowsValue.ts +126 -0
  37. package/src/src/models/InviteEndUser200Response.ts +88 -0
  38. package/src/src/models/InviteEndUser200ResponseData.ts +81 -0
  39. package/src/src/models/ListEndUsers200Response.ts +88 -0
  40. package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts} +15 -15
  41. package/src/src/models/ListWorkflowExecutions200Response.ts +11 -11
  42. package/src/src/models/MarkAllSubscriberNotificationsRead200Response.ts +73 -0
  43. package/src/src/models/RotateWaaSEndpointSecret200Response.ts +88 -0
  44. package/src/src/models/RotateWaaSEndpointSecret200ResponseData.ts +66 -0
  45. package/src/src/models/SendTemplateTestEmail202Response.ts +90 -0
  46. package/src/src/models/SendTemplateTestEmail202ResponseData.ts +120 -0
  47. package/src/src/models/SendTemplateTestEmail202ResponseMeta.ts +66 -0
  48. package/src/src/models/SetEndUserClaims200Response.ts +73 -0
  49. package/src/src/models/SetEndUserClaims200ResponseData.ts +73 -0
  50. package/src/src/models/SmsListResponse.ts +10 -10
  51. package/src/src/models/UpdateSubscriberPreferences200Response.ts +73 -0
  52. package/src/src/models/UpdateSubscriberPreferences200ResponseData.ts +81 -0
  53. package/src/src/models/UpdateSubscriberPreferences200ResponseDataPreferencesInner.ts +102 -0
  54. package/src/src/models/UpdateWaaSEndpoint200Response.ts +88 -0
  55. package/src/src/models/UpdateWaaSEventType200Response.ts +88 -0
  56. package/src/src/models/index.ts +37 -1
@@ -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 SetEndUserClaims200ResponseData
20
+ */
21
+ export interface SetEndUserClaims200ResponseData {
22
+ /**
23
+ *
24
+ * @type {object}
25
+ * @memberof SetEndUserClaims200ResponseData
26
+ */
27
+ claims?: object;
28
+ /**
29
+ * Monotonic version bumped on each write; embedded in issued tokens.
30
+ * @type {number}
31
+ * @memberof SetEndUserClaims200ResponseData
32
+ */
33
+ claimsVersion?: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the SetEndUserClaims200ResponseData interface.
38
+ */
39
+ export function instanceOfSetEndUserClaims200ResponseData(value: object): value is SetEndUserClaims200ResponseData {
40
+ return true;
41
+ }
42
+
43
+ export function SetEndUserClaims200ResponseDataFromJSON(json: any): SetEndUserClaims200ResponseData {
44
+ return SetEndUserClaims200ResponseDataFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function SetEndUserClaims200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetEndUserClaims200ResponseData {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'claims': json['claims'] == null ? undefined : json['claims'],
54
+ 'claimsVersion': json['claims_version'] == null ? undefined : json['claims_version'],
55
+ };
56
+ }
57
+
58
+ export function SetEndUserClaims200ResponseDataToJSON(json: any): SetEndUserClaims200ResponseData {
59
+ return SetEndUserClaims200ResponseDataToJSONTyped(json, false);
60
+ }
61
+
62
+ export function SetEndUserClaims200ResponseDataToJSONTyped(value?: SetEndUserClaims200ResponseData | null, ignoreDiscriminator: boolean = false): any {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+
67
+ return {
68
+
69
+ 'claims': value['claims'],
70
+ 'claims_version': value['claimsVersion'],
71
+ };
72
+ }
73
+
@@ -20,13 +20,13 @@ import {
20
20
  SmsMessageToJSON,
21
21
  SmsMessageToJSONTyped,
22
22
  } from './SmsMessage';
23
- import type { ListWorkflowExecutions200ResponseMeta } from './ListWorkflowExecutions200ResponseMeta';
23
+ import type { ListEndUsers200ResponseMeta } from './ListEndUsers200ResponseMeta';
24
24
  import {
25
- ListWorkflowExecutions200ResponseMetaFromJSON,
26
- ListWorkflowExecutions200ResponseMetaFromJSONTyped,
27
- ListWorkflowExecutions200ResponseMetaToJSON,
28
- ListWorkflowExecutions200ResponseMetaToJSONTyped,
29
- } from './ListWorkflowExecutions200ResponseMeta';
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 {ListWorkflowExecutions200ResponseMeta}
45
+ * @type {ListEndUsers200ResponseMeta}
46
46
  * @memberof SmsListResponse
47
47
  */
48
- meta?: ListWorkflowExecutions200ResponseMeta;
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 : ListWorkflowExecutions200ResponseMetaFromJSON(json['meta']),
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': ListWorkflowExecutions200ResponseMetaToJSON(value['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 { UpdateSubscriberPreferences200ResponseData } from './UpdateSubscriberPreferences200ResponseData';
17
+ import {
18
+ UpdateSubscriberPreferences200ResponseDataFromJSON,
19
+ UpdateSubscriberPreferences200ResponseDataFromJSONTyped,
20
+ UpdateSubscriberPreferences200ResponseDataToJSON,
21
+ UpdateSubscriberPreferences200ResponseDataToJSONTyped,
22
+ } from './UpdateSubscriberPreferences200ResponseData';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateSubscriberPreferences200Response
28
+ */
29
+ export interface UpdateSubscriberPreferences200Response {
30
+ /**
31
+ *
32
+ * @type {UpdateSubscriberPreferences200ResponseData}
33
+ * @memberof UpdateSubscriberPreferences200Response
34
+ */
35
+ data?: UpdateSubscriberPreferences200ResponseData;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the UpdateSubscriberPreferences200Response interface.
40
+ */
41
+ export function instanceOfUpdateSubscriberPreferences200Response(value: object): value is UpdateSubscriberPreferences200Response {
42
+ return true;
43
+ }
44
+
45
+ export function UpdateSubscriberPreferences200ResponseFromJSON(json: any): UpdateSubscriberPreferences200Response {
46
+ return UpdateSubscriberPreferences200ResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function UpdateSubscriberPreferences200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSubscriberPreferences200Response {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : UpdateSubscriberPreferences200ResponseDataFromJSON(json['data']),
56
+ };
57
+ }
58
+
59
+ export function UpdateSubscriberPreferences200ResponseToJSON(json: any): UpdateSubscriberPreferences200Response {
60
+ return UpdateSubscriberPreferences200ResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function UpdateSubscriberPreferences200ResponseToJSONTyped(value?: UpdateSubscriberPreferences200Response | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'data': UpdateSubscriberPreferences200ResponseDataToJSON(value['data']),
71
+ };
72
+ }
73
+
@@ -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
+ import type { UpdateSubscriberPreferences200ResponseDataPreferencesInner } from './UpdateSubscriberPreferences200ResponseDataPreferencesInner';
17
+ import {
18
+ UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSON,
19
+ UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSONTyped,
20
+ UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSON,
21
+ UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSONTyped,
22
+ } from './UpdateSubscriberPreferences200ResponseDataPreferencesInner';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateSubscriberPreferences200ResponseData
28
+ */
29
+ export interface UpdateSubscriberPreferences200ResponseData {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof UpdateSubscriberPreferences200ResponseData
34
+ */
35
+ updated?: number;
36
+ /**
37
+ *
38
+ * @type {Array<UpdateSubscriberPreferences200ResponseDataPreferencesInner>}
39
+ * @memberof UpdateSubscriberPreferences200ResponseData
40
+ */
41
+ preferences?: Array<UpdateSubscriberPreferences200ResponseDataPreferencesInner>;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the UpdateSubscriberPreferences200ResponseData interface.
46
+ */
47
+ export function instanceOfUpdateSubscriberPreferences200ResponseData(value: object): value is UpdateSubscriberPreferences200ResponseData {
48
+ return true;
49
+ }
50
+
51
+ export function UpdateSubscriberPreferences200ResponseDataFromJSON(json: any): UpdateSubscriberPreferences200ResponseData {
52
+ return UpdateSubscriberPreferences200ResponseDataFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function UpdateSubscriberPreferences200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSubscriberPreferences200ResponseData {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'updated': json['updated'] == null ? undefined : json['updated'],
62
+ 'preferences': json['preferences'] == null ? undefined : ((json['preferences'] as Array<any>).map(UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSON)),
63
+ };
64
+ }
65
+
66
+ export function UpdateSubscriberPreferences200ResponseDataToJSON(json: any): UpdateSubscriberPreferences200ResponseData {
67
+ return UpdateSubscriberPreferences200ResponseDataToJSONTyped(json, false);
68
+ }
69
+
70
+ export function UpdateSubscriberPreferences200ResponseDataToJSONTyped(value?: UpdateSubscriberPreferences200ResponseData | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'updated': value['updated'],
78
+ 'preferences': value['preferences'] == null ? undefined : ((value['preferences'] as Array<any>).map(UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSON)),
79
+ };
80
+ }
81
+
@@ -0,0 +1,102 @@
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 UpdateSubscriberPreferences200ResponseDataPreferencesInner
20
+ */
21
+ export interface UpdateSubscriberPreferences200ResponseDataPreferencesInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UpdateSubscriberPreferences200ResponseDataPreferencesInner
26
+ */
27
+ categoryId?: string | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UpdateSubscriberPreferences200ResponseDataPreferencesInner
32
+ */
33
+ channel?: UpdateSubscriberPreferences200ResponseDataPreferencesInnerChannelEnum;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof UpdateSubscriberPreferences200ResponseDataPreferencesInner
38
+ */
39
+ enabled?: boolean;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof UpdateSubscriberPreferences200ResponseDataPreferencesInner
44
+ */
45
+ source?: string;
46
+ }
47
+
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const UpdateSubscriberPreferences200ResponseDataPreferencesInnerChannelEnum = {
53
+ EMAIL: 'email',
54
+ PUSH: 'push',
55
+ SMS: 'sms',
56
+ IN_APP: 'in_app'
57
+ } as const;
58
+ export type UpdateSubscriberPreferences200ResponseDataPreferencesInnerChannelEnum = typeof UpdateSubscriberPreferences200ResponseDataPreferencesInnerChannelEnum[keyof typeof UpdateSubscriberPreferences200ResponseDataPreferencesInnerChannelEnum];
59
+
60
+
61
+ /**
62
+ * Check if a given object implements the UpdateSubscriberPreferences200ResponseDataPreferencesInner interface.
63
+ */
64
+ export function instanceOfUpdateSubscriberPreferences200ResponseDataPreferencesInner(value: object): value is UpdateSubscriberPreferences200ResponseDataPreferencesInner {
65
+ return true;
66
+ }
67
+
68
+ export function UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSON(json: any): UpdateSubscriberPreferences200ResponseDataPreferencesInner {
69
+ return UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSONTyped(json, false);
70
+ }
71
+
72
+ export function UpdateSubscriberPreferences200ResponseDataPreferencesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSubscriberPreferences200ResponseDataPreferencesInner {
73
+ if (json == null) {
74
+ return json;
75
+ }
76
+ return {
77
+
78
+ 'categoryId': json['category_id'] == null ? undefined : json['category_id'],
79
+ 'channel': json['channel'] == null ? undefined : json['channel'],
80
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
81
+ 'source': json['source'] == null ? undefined : json['source'],
82
+ };
83
+ }
84
+
85
+ export function UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSON(json: any): UpdateSubscriberPreferences200ResponseDataPreferencesInner {
86
+ return UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSONTyped(json, false);
87
+ }
88
+
89
+ export function UpdateSubscriberPreferences200ResponseDataPreferencesInnerToJSONTyped(value?: UpdateSubscriberPreferences200ResponseDataPreferencesInner | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value;
92
+ }
93
+
94
+ return {
95
+
96
+ 'category_id': value['categoryId'],
97
+ 'channel': value['channel'],
98
+ 'enabled': value['enabled'],
99
+ 'source': value['source'],
100
+ };
101
+ }
102
+
@@ -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 { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
17
+ import {
18
+ GetDomain200ResponseMetaFromJSON,
19
+ GetDomain200ResponseMetaFromJSONTyped,
20
+ GetDomain200ResponseMetaToJSON,
21
+ GetDomain200ResponseMetaToJSONTyped,
22
+ } from './GetDomain200ResponseMeta';
23
+ import type { WaaSEndpoint } from './WaaSEndpoint';
24
+ import {
25
+ WaaSEndpointFromJSON,
26
+ WaaSEndpointFromJSONTyped,
27
+ WaaSEndpointToJSON,
28
+ WaaSEndpointToJSONTyped,
29
+ } from './WaaSEndpoint';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface UpdateWaaSEndpoint200Response
35
+ */
36
+ export interface UpdateWaaSEndpoint200Response {
37
+ /**
38
+ *
39
+ * @type {WaaSEndpoint}
40
+ * @memberof UpdateWaaSEndpoint200Response
41
+ */
42
+ data?: WaaSEndpoint;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof UpdateWaaSEndpoint200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the UpdateWaaSEndpoint200Response interface.
53
+ */
54
+ export function instanceOfUpdateWaaSEndpoint200Response(value: object): value is UpdateWaaSEndpoint200Response {
55
+ return true;
56
+ }
57
+
58
+ export function UpdateWaaSEndpoint200ResponseFromJSON(json: any): UpdateWaaSEndpoint200Response {
59
+ return UpdateWaaSEndpoint200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function UpdateWaaSEndpoint200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateWaaSEndpoint200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : WaaSEndpointFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function UpdateWaaSEndpoint200ResponseToJSON(json: any): UpdateWaaSEndpoint200Response {
74
+ return UpdateWaaSEndpoint200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function UpdateWaaSEndpoint200ResponseToJSONTyped(value?: UpdateWaaSEndpoint200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': WaaSEndpointToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -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 { WaaSEventType } from './WaaSEventType';
17
+ import {
18
+ WaaSEventTypeFromJSON,
19
+ WaaSEventTypeFromJSONTyped,
20
+ WaaSEventTypeToJSON,
21
+ WaaSEventTypeToJSONTyped,
22
+ } from './WaaSEventType';
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 UpdateWaaSEventType200Response
35
+ */
36
+ export interface UpdateWaaSEventType200Response {
37
+ /**
38
+ *
39
+ * @type {WaaSEventType}
40
+ * @memberof UpdateWaaSEventType200Response
41
+ */
42
+ data?: WaaSEventType;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof UpdateWaaSEventType200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the UpdateWaaSEventType200Response interface.
53
+ */
54
+ export function instanceOfUpdateWaaSEventType200Response(value: object): value is UpdateWaaSEventType200Response {
55
+ return true;
56
+ }
57
+
58
+ export function UpdateWaaSEventType200ResponseFromJSON(json: any): UpdateWaaSEventType200Response {
59
+ return UpdateWaaSEventType200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function UpdateWaaSEventType200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateWaaSEventType200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : WaaSEventTypeFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function UpdateWaaSEventType200ResponseToJSON(json: any): UpdateWaaSEventType200Response {
74
+ return UpdateWaaSEventType200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function UpdateWaaSEventType200ResponseToJSONTyped(value?: UpdateWaaSEventType200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': WaaSEventTypeToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+