@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.
Files changed (64) hide show
  1. package/README.md +6 -4
  2. package/dist/index.cjs +2056 -345
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +2258 -466
  5. package/dist/index.d.ts +2258 -466
  6. package/dist/index.js +1852 -340
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/.openapi-generator/FILES +40 -1
  10. package/src/client.ts +18 -3
  11. package/src/clientAuth.ts +45 -12
  12. package/src/src/apis/AuthApplicationApi.ts +93 -0
  13. package/src/src/apis/AuthEmailTemplatesApi.ts +4 -4
  14. package/src/src/apis/AuthUserDirectoryApi.ts +120 -36
  15. package/src/src/apis/DomainsApi.ts +7 -6
  16. package/src/src/apis/InboxApi.ts +78 -54
  17. package/src/src/apis/TemplatesApi.ts +10 -6
  18. package/src/src/apis/WaaSDeliveriesApi.ts +17 -12
  19. package/src/src/apis/WaaSEndpointsApi.ts +50 -30
  20. package/src/src/apis/WaaSEventTypesApi.ts +17 -12
  21. package/src/src/apis/index.ts +1 -0
  22. package/src/src/models/ApplicationSelf.ts +118 -0
  23. package/src/src/models/ApplicationSelfResponse.ts +88 -0
  24. package/src/src/models/AuthEmailTemplateTestRequest.ts +1 -1
  25. package/src/src/models/AuthMethods.ts +111 -0
  26. package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
  27. package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
  28. package/src/src/models/GetEndUserAuthMethods200Response.ts +88 -0
  29. package/src/src/models/GetEndUserById200Response.ts +88 -0
  30. package/src/src/models/GetEndUserClaims200Response.ts +88 -0
  31. package/src/src/models/GetEndUserClaims200ResponseData.ts +65 -0
  32. package/src/src/models/GetSubscriberInboxPreferences200Response.ts +73 -0
  33. package/src/src/models/GetSubscriberInboxPreferences200ResponseData.ts +88 -0
  34. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInner.ts +88 -0
  35. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory.ts +97 -0
  36. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobal.ts +73 -0
  37. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner.ts +94 -0
  38. package/src/src/models/GetSubscriberNotification200Response.ts +73 -0
  39. package/src/src/models/GetSubscriberUnreadCount200Response.ts +73 -0
  40. package/src/src/models/GetWaaSDelivery200Response.ts +88 -0
  41. package/src/src/models/GetWaaSEndpointCircuit200Response.ts +88 -0
  42. package/src/src/models/GetWaaSEndpointCircuit200ResponseData.ts +123 -0
  43. package/src/src/models/GetWaaSEndpointMetrics200Response.ts +88 -0
  44. package/src/src/models/GetWaaSEndpointMetrics200ResponseData.ts +99 -0
  45. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataHealth.ts +87 -0
  46. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataWindowsValue.ts +126 -0
  47. package/src/src/models/InviteEndUser200Response.ts +88 -0
  48. package/src/src/models/InviteEndUser200ResponseData.ts +81 -0
  49. package/src/src/models/ListEndUsers200Response.ts +88 -0
  50. package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts} +15 -15
  51. package/src/src/models/ListWorkflowExecutions200Response.ts +11 -11
  52. package/src/src/models/MarkAllSubscriberNotificationsRead200Response.ts +73 -0
  53. package/src/src/models/RotateWaaSEndpointSecret200Response.ts +88 -0
  54. package/src/src/models/RotateWaaSEndpointSecret200ResponseData.ts +66 -0
  55. package/src/src/models/SendTemplateTestEmail202Response.ts +90 -0
  56. package/src/src/models/SendTemplateTestEmail202ResponseData.ts +120 -0
  57. package/src/src/models/SendTemplateTestEmail202ResponseMeta.ts +66 -0
  58. package/src/src/models/SmsListResponse.ts +10 -10
  59. package/src/src/models/UpdateSubscriberPreferences200Response.ts +73 -0
  60. package/src/src/models/UpdateSubscriberPreferences200ResponseData.ts +81 -0
  61. package/src/src/models/UpdateSubscriberPreferences200ResponseDataPreferencesInner.ts +102 -0
  62. package/src/src/models/UpdateWaaSEndpoint200Response.ts +88 -0
  63. package/src/src/models/UpdateWaaSEventType200Response.ts +88 -0
  64. package/src/src/models/index.ts +39 -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
+ import type { GetSubscriberInboxPreferences200ResponseData } from './GetSubscriberInboxPreferences200ResponseData';
17
+ import {
18
+ GetSubscriberInboxPreferences200ResponseDataFromJSON,
19
+ GetSubscriberInboxPreferences200ResponseDataFromJSONTyped,
20
+ GetSubscriberInboxPreferences200ResponseDataToJSON,
21
+ GetSubscriberInboxPreferences200ResponseDataToJSONTyped,
22
+ } from './GetSubscriberInboxPreferences200ResponseData';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetSubscriberInboxPreferences200Response
28
+ */
29
+ export interface GetSubscriberInboxPreferences200Response {
30
+ /**
31
+ *
32
+ * @type {GetSubscriberInboxPreferences200ResponseData}
33
+ * @memberof GetSubscriberInboxPreferences200Response
34
+ */
35
+ data?: GetSubscriberInboxPreferences200ResponseData;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetSubscriberInboxPreferences200Response interface.
40
+ */
41
+ export function instanceOfGetSubscriberInboxPreferences200Response(value: object): value is GetSubscriberInboxPreferences200Response {
42
+ return true;
43
+ }
44
+
45
+ export function GetSubscriberInboxPreferences200ResponseFromJSON(json: any): GetSubscriberInboxPreferences200Response {
46
+ return GetSubscriberInboxPreferences200ResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetSubscriberInboxPreferences200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200Response {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : GetSubscriberInboxPreferences200ResponseDataFromJSON(json['data']),
56
+ };
57
+ }
58
+
59
+ export function GetSubscriberInboxPreferences200ResponseToJSON(json: any): GetSubscriberInboxPreferences200Response {
60
+ return GetSubscriberInboxPreferences200ResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function GetSubscriberInboxPreferences200ResponseToJSONTyped(value?: GetSubscriberInboxPreferences200Response | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'data': GetSubscriberInboxPreferences200ResponseDataToJSON(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 { GetSubscriberInboxPreferences200ResponseDataCategoriesInner } from './GetSubscriberInboxPreferences200ResponseDataCategoriesInner';
17
+ import {
18
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSON,
19
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSONTyped,
20
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSON,
21
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSONTyped,
22
+ } from './GetSubscriberInboxPreferences200ResponseDataCategoriesInner';
23
+ import type { GetSubscriberInboxPreferences200ResponseDataGlobal } from './GetSubscriberInboxPreferences200ResponseDataGlobal';
24
+ import {
25
+ GetSubscriberInboxPreferences200ResponseDataGlobalFromJSON,
26
+ GetSubscriberInboxPreferences200ResponseDataGlobalFromJSONTyped,
27
+ GetSubscriberInboxPreferences200ResponseDataGlobalToJSON,
28
+ GetSubscriberInboxPreferences200ResponseDataGlobalToJSONTyped,
29
+ } from './GetSubscriberInboxPreferences200ResponseDataGlobal';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetSubscriberInboxPreferences200ResponseData
35
+ */
36
+ export interface GetSubscriberInboxPreferences200ResponseData {
37
+ /**
38
+ *
39
+ * @type {GetSubscriberInboxPreferences200ResponseDataGlobal}
40
+ * @memberof GetSubscriberInboxPreferences200ResponseData
41
+ */
42
+ global?: GetSubscriberInboxPreferences200ResponseDataGlobal;
43
+ /**
44
+ *
45
+ * @type {Array<GetSubscriberInboxPreferences200ResponseDataCategoriesInner>}
46
+ * @memberof GetSubscriberInboxPreferences200ResponseData
47
+ */
48
+ categories?: Array<GetSubscriberInboxPreferences200ResponseDataCategoriesInner>;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetSubscriberInboxPreferences200ResponseData interface.
53
+ */
54
+ export function instanceOfGetSubscriberInboxPreferences200ResponseData(value: object): value is GetSubscriberInboxPreferences200ResponseData {
55
+ return true;
56
+ }
57
+
58
+ export function GetSubscriberInboxPreferences200ResponseDataFromJSON(json: any): GetSubscriberInboxPreferences200ResponseData {
59
+ return GetSubscriberInboxPreferences200ResponseDataFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetSubscriberInboxPreferences200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200ResponseData {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'global': json['global'] == null ? undefined : GetSubscriberInboxPreferences200ResponseDataGlobalFromJSON(json['global']),
69
+ 'categories': json['categories'] == null ? undefined : ((json['categories'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSON)),
70
+ };
71
+ }
72
+
73
+ export function GetSubscriberInboxPreferences200ResponseDataToJSON(json: any): GetSubscriberInboxPreferences200ResponseData {
74
+ return GetSubscriberInboxPreferences200ResponseDataToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetSubscriberInboxPreferences200ResponseDataToJSONTyped(value?: GetSubscriberInboxPreferences200ResponseData | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'global': GetSubscriberInboxPreferences200ResponseDataGlobalToJSON(value['global']),
85
+ 'categories': value['categories'] == null ? undefined : ((value['categories'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSON)),
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 { GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory } from './GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory';
17
+ import {
18
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSON,
19
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSONTyped,
20
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSON,
21
+ GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSONTyped,
22
+ } from './GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory';
23
+ import type { GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner } from './GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner';
24
+ import {
25
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSON,
26
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSONTyped,
27
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSON,
28
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSONTyped,
29
+ } from './GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetSubscriberInboxPreferences200ResponseDataCategoriesInner
35
+ */
36
+ export interface GetSubscriberInboxPreferences200ResponseDataCategoriesInner {
37
+ /**
38
+ *
39
+ * @type {GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory}
40
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInner
41
+ */
42
+ category?: GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory;
43
+ /**
44
+ *
45
+ * @type {Array<GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner>}
46
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInner
47
+ */
48
+ channels?: Array<GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner>;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetSubscriberInboxPreferences200ResponseDataCategoriesInner interface.
53
+ */
54
+ export function instanceOfGetSubscriberInboxPreferences200ResponseDataCategoriesInner(value: object): value is GetSubscriberInboxPreferences200ResponseDataCategoriesInner {
55
+ return true;
56
+ }
57
+
58
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSON(json: any): GetSubscriberInboxPreferences200ResponseDataCategoriesInner {
59
+ return GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200ResponseDataCategoriesInner {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'category': json['category'] == null ? undefined : GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSON(json['category']),
69
+ 'channels': json['channels'] == null ? undefined : ((json['channels'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSON)),
70
+ };
71
+ }
72
+
73
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSON(json: any): GetSubscriberInboxPreferences200ResponseDataCategoriesInner {
74
+ return GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerToJSONTyped(value?: GetSubscriberInboxPreferences200ResponseDataCategoriesInner | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'category': GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSON(value['category']),
85
+ 'channels': value['channels'] == null ? undefined : ((value['channels'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSON)),
86
+ };
87
+ }
88
+
@@ -0,0 +1,97 @@
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 GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
20
+ */
21
+ export interface GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
26
+ */
27
+ id?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
32
+ */
33
+ name?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
38
+ */
39
+ slug?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
44
+ */
45
+ description?: string | null;
46
+ /**
47
+ *
48
+ * @type {boolean}
49
+ * @memberof GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory
50
+ */
51
+ allowUnsubscribe?: boolean;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory interface.
56
+ */
57
+ export function instanceOfGetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory(value: object): value is GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory {
58
+ return true;
59
+ }
60
+
61
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSON(json: any): GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory {
62
+ return GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory {
66
+ if (json == null) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'id': json['id'] == null ? undefined : json['id'],
72
+ 'name': json['name'] == null ? undefined : json['name'],
73
+ 'slug': json['slug'] == null ? undefined : json['slug'],
74
+ 'description': json['description'] == null ? undefined : json['description'],
75
+ 'allowUnsubscribe': json['allow_unsubscribe'] == null ? undefined : json['allow_unsubscribe'],
76
+ };
77
+ }
78
+
79
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSON(json: any): GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory {
80
+ return GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSONTyped(json, false);
81
+ }
82
+
83
+ export function GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategoryToJSONTyped(value?: GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory | null, ignoreDiscriminator: boolean = false): any {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+
88
+ return {
89
+
90
+ 'id': value['id'],
91
+ 'name': value['name'],
92
+ 'slug': value['slug'],
93
+ 'description': value['description'],
94
+ 'allow_unsubscribe': value['allowUnsubscribe'],
95
+ };
96
+ }
97
+
@@ -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 { GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner } from './GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner';
17
+ import {
18
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSON,
19
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSONTyped,
20
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSON,
21
+ GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSONTyped,
22
+ } from './GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetSubscriberInboxPreferences200ResponseDataGlobal
28
+ */
29
+ export interface GetSubscriberInboxPreferences200ResponseDataGlobal {
30
+ /**
31
+ *
32
+ * @type {Array<GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner>}
33
+ * @memberof GetSubscriberInboxPreferences200ResponseDataGlobal
34
+ */
35
+ channels?: Array<GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetSubscriberInboxPreferences200ResponseDataGlobal interface.
40
+ */
41
+ export function instanceOfGetSubscriberInboxPreferences200ResponseDataGlobal(value: object): value is GetSubscriberInboxPreferences200ResponseDataGlobal {
42
+ return true;
43
+ }
44
+
45
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalFromJSON(json: any): GetSubscriberInboxPreferences200ResponseDataGlobal {
46
+ return GetSubscriberInboxPreferences200ResponseDataGlobalFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200ResponseDataGlobal {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'channels': json['channels'] == null ? undefined : ((json['channels'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalToJSON(json: any): GetSubscriberInboxPreferences200ResponseDataGlobal {
60
+ return GetSubscriberInboxPreferences200ResponseDataGlobalToJSONTyped(json, false);
61
+ }
62
+
63
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalToJSONTyped(value?: GetSubscriberInboxPreferences200ResponseDataGlobal | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'channels': value['channels'] == null ? undefined : ((value['channels'] as Array<any>).map(GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,94 @@
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 GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner
20
+ */
21
+ export interface GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner
26
+ */
27
+ channel?: GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerChannelEnum;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner
32
+ */
33
+ enabled?: boolean;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner
38
+ */
39
+ source?: string;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerChannelEnum = {
47
+ EMAIL: 'email',
48
+ PUSH: 'push',
49
+ SMS: 'sms',
50
+ IN_APP: 'in_app'
51
+ } as const;
52
+ export type GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerChannelEnum = typeof GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerChannelEnum[keyof typeof GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerChannelEnum];
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner interface.
57
+ */
58
+ export function instanceOfGetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner(value: object): value is GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner {
59
+ return true;
60
+ }
61
+
62
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSON(json: any): GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner {
63
+ return GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'channel': json['channel'] == null ? undefined : json['channel'],
73
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
74
+ 'source': json['source'] == null ? undefined : json['source'],
75
+ };
76
+ }
77
+
78
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSON(json: any): GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner {
79
+ return GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSONTyped(json, false);
80
+ }
81
+
82
+ export function GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInnerToJSONTyped(value?: GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner | null, ignoreDiscriminator: boolean = false): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+
87
+ return {
88
+
89
+ 'channel': value['channel'],
90
+ 'enabled': value['enabled'],
91
+ 'source': value['source'],
92
+ };
93
+ }
94
+
@@ -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 { InAppNotification } from './InAppNotification';
17
+ import {
18
+ InAppNotificationFromJSON,
19
+ InAppNotificationFromJSONTyped,
20
+ InAppNotificationToJSON,
21
+ InAppNotificationToJSONTyped,
22
+ } from './InAppNotification';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetSubscriberNotification200Response
28
+ */
29
+ export interface GetSubscriberNotification200Response {
30
+ /**
31
+ *
32
+ * @type {InAppNotification}
33
+ * @memberof GetSubscriberNotification200Response
34
+ */
35
+ data?: InAppNotification;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetSubscriberNotification200Response interface.
40
+ */
41
+ export function instanceOfGetSubscriberNotification200Response(value: object): value is GetSubscriberNotification200Response {
42
+ return true;
43
+ }
44
+
45
+ export function GetSubscriberNotification200ResponseFromJSON(json: any): GetSubscriberNotification200Response {
46
+ return GetSubscriberNotification200ResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetSubscriberNotification200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSubscriberNotification200Response {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'data': json['data'] == null ? undefined : InAppNotificationFromJSON(json['data']),
56
+ };
57
+ }
58
+
59
+ export function GetSubscriberNotification200ResponseToJSON(json: any): GetSubscriberNotification200Response {
60
+ return GetSubscriberNotification200ResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function GetSubscriberNotification200ResponseToJSONTyped(value?: GetSubscriberNotification200Response | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'data': InAppNotificationToJSON(value['data']),
71
+ };
72
+ }
73
+