@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,111 @@
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
+ * Aggregate view of the sign-in methods configured for a single end user, for building a customer "sign-in methods" screen.
18
+ * @export
19
+ * @interface AuthMethods
20
+ */
21
+ export interface AuthMethods {
22
+ /**
23
+ * True if the user has a password credential (false for OAuth-only / passwordless users).
24
+ * @type {boolean}
25
+ * @memberof AuthMethods
26
+ */
27
+ hasPassword: boolean;
28
+ /**
29
+ * Distinct OAuth providers linked to the user (e.g. google, apple).
30
+ * @type {Array<string>}
31
+ * @memberof AuthMethods
32
+ */
33
+ oauthProviders: Array<string>;
34
+ /**
35
+ * True if the user has multi-factor authentication enabled.
36
+ * @type {boolean}
37
+ * @memberof AuthMethods
38
+ */
39
+ mfaEnabled: boolean;
40
+ /**
41
+ * True if the user's email address has been verified.
42
+ * @type {boolean}
43
+ * @memberof AuthMethods
44
+ */
45
+ emailVerified: boolean;
46
+ /**
47
+ * True if the user's phone number has been verified.
48
+ * @type {boolean}
49
+ * @memberof AuthMethods
50
+ */
51
+ phoneVerified: boolean;
52
+ /**
53
+ * Number of WebAuthn passkeys registered for the user.
54
+ * @type {number}
55
+ * @memberof AuthMethods
56
+ */
57
+ passkeys: number;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the AuthMethods interface.
62
+ */
63
+ export function instanceOfAuthMethods(value: object): value is AuthMethods {
64
+ if (!('hasPassword' in value) || value['hasPassword'] === undefined) return false;
65
+ if (!('oauthProviders' in value) || value['oauthProviders'] === undefined) return false;
66
+ if (!('mfaEnabled' in value) || value['mfaEnabled'] === undefined) return false;
67
+ if (!('emailVerified' in value) || value['emailVerified'] === undefined) return false;
68
+ if (!('phoneVerified' in value) || value['phoneVerified'] === undefined) return false;
69
+ if (!('passkeys' in value) || value['passkeys'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function AuthMethodsFromJSON(json: any): AuthMethods {
74
+ return AuthMethodsFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function AuthMethodsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthMethods {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'hasPassword': json['has_password'],
84
+ 'oauthProviders': json['oauth_providers'],
85
+ 'mfaEnabled': json['mfa_enabled'],
86
+ 'emailVerified': json['email_verified'],
87
+ 'phoneVerified': json['phone_verified'],
88
+ 'passkeys': json['passkeys'],
89
+ };
90
+ }
91
+
92
+ export function AuthMethodsToJSON(json: any): AuthMethods {
93
+ return AuthMethodsToJSONTyped(json, false);
94
+ }
95
+
96
+ export function AuthMethodsToJSONTyped(value?: AuthMethods | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'has_password': value['hasPassword'],
104
+ 'oauth_providers': value['oauthProviders'],
105
+ 'mfa_enabled': value['mfaEnabled'],
106
+ 'email_verified': value['emailVerified'],
107
+ 'phone_verified': value['phoneVerified'],
108
+ 'passkeys': value['passkeys'],
109
+ };
110
+ }
111
+
@@ -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 { CloseWaaSEndpointCircuit200ResponseData } from './CloseWaaSEndpointCircuit200ResponseData';
24
+ import {
25
+ CloseWaaSEndpointCircuit200ResponseDataFromJSON,
26
+ CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
27
+ CloseWaaSEndpointCircuit200ResponseDataToJSON,
28
+ CloseWaaSEndpointCircuit200ResponseDataToJSONTyped,
29
+ } from './CloseWaaSEndpointCircuit200ResponseData';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface CloseWaaSEndpointCircuit200Response
35
+ */
36
+ export interface CloseWaaSEndpointCircuit200Response {
37
+ /**
38
+ *
39
+ * @type {CloseWaaSEndpointCircuit200ResponseData}
40
+ * @memberof CloseWaaSEndpointCircuit200Response
41
+ */
42
+ data?: CloseWaaSEndpointCircuit200ResponseData;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof CloseWaaSEndpointCircuit200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the CloseWaaSEndpointCircuit200Response interface.
53
+ */
54
+ export function instanceOfCloseWaaSEndpointCircuit200Response(value: object): value is CloseWaaSEndpointCircuit200Response {
55
+ return true;
56
+ }
57
+
58
+ export function CloseWaaSEndpointCircuit200ResponseFromJSON(json: any): CloseWaaSEndpointCircuit200Response {
59
+ return CloseWaaSEndpointCircuit200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function CloseWaaSEndpointCircuit200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CloseWaaSEndpointCircuit200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : CloseWaaSEndpointCircuit200ResponseDataFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function CloseWaaSEndpointCircuit200ResponseToJSON(json: any): CloseWaaSEndpointCircuit200Response {
74
+ return CloseWaaSEndpointCircuit200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function CloseWaaSEndpointCircuit200ResponseToJSONTyped(value?: CloseWaaSEndpointCircuit200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': CloseWaaSEndpointCircuit200ResponseDataToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CloseWaaSEndpointCircuit200ResponseData
20
+ */
21
+ export interface CloseWaaSEndpointCircuit200ResponseData {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CloseWaaSEndpointCircuit200ResponseData
26
+ */
27
+ state: CloseWaaSEndpointCircuit200ResponseDataStateEnum;
28
+ }
29
+
30
+
31
+ /**
32
+ * @export
33
+ */
34
+ export const CloseWaaSEndpointCircuit200ResponseDataStateEnum = {
35
+ CLOSED: 'closed'
36
+ } as const;
37
+ export type CloseWaaSEndpointCircuit200ResponseDataStateEnum = typeof CloseWaaSEndpointCircuit200ResponseDataStateEnum[keyof typeof CloseWaaSEndpointCircuit200ResponseDataStateEnum];
38
+
39
+
40
+ /**
41
+ * Check if a given object implements the CloseWaaSEndpointCircuit200ResponseData interface.
42
+ */
43
+ export function instanceOfCloseWaaSEndpointCircuit200ResponseData(value: object): value is CloseWaaSEndpointCircuit200ResponseData {
44
+ if (!('state' in value) || value['state'] === undefined) return false;
45
+ return true;
46
+ }
47
+
48
+ export function CloseWaaSEndpointCircuit200ResponseDataFromJSON(json: any): CloseWaaSEndpointCircuit200ResponseData {
49
+ return CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CloseWaaSEndpointCircuit200ResponseData {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+
58
+ 'state': json['state'],
59
+ };
60
+ }
61
+
62
+ export function CloseWaaSEndpointCircuit200ResponseDataToJSON(json: any): CloseWaaSEndpointCircuit200ResponseData {
63
+ return CloseWaaSEndpointCircuit200ResponseDataToJSONTyped(json, false);
64
+ }
65
+
66
+ export function CloseWaaSEndpointCircuit200ResponseDataToJSONTyped(value?: CloseWaaSEndpointCircuit200ResponseData | null, ignoreDiscriminator: boolean = false): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+
71
+ return {
72
+
73
+ 'state': value['state'],
74
+ };
75
+ }
76
+
@@ -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 { AuthMethods } from './AuthMethods';
17
+ import {
18
+ AuthMethodsFromJSON,
19
+ AuthMethodsFromJSONTyped,
20
+ AuthMethodsToJSON,
21
+ AuthMethodsToJSONTyped,
22
+ } from './AuthMethods';
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 GetEndUserAuthMethods200Response
35
+ */
36
+ export interface GetEndUserAuthMethods200Response {
37
+ /**
38
+ *
39
+ * @type {AuthMethods}
40
+ * @memberof GetEndUserAuthMethods200Response
41
+ */
42
+ data?: AuthMethods;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof GetEndUserAuthMethods200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetEndUserAuthMethods200Response interface.
53
+ */
54
+ export function instanceOfGetEndUserAuthMethods200Response(value: object): value is GetEndUserAuthMethods200Response {
55
+ return true;
56
+ }
57
+
58
+ export function GetEndUserAuthMethods200ResponseFromJSON(json: any): GetEndUserAuthMethods200Response {
59
+ return GetEndUserAuthMethods200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetEndUserAuthMethods200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEndUserAuthMethods200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : AuthMethodsFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function GetEndUserAuthMethods200ResponseToJSON(json: any): GetEndUserAuthMethods200Response {
74
+ return GetEndUserAuthMethods200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetEndUserAuthMethods200ResponseToJSONTyped(value?: GetEndUserAuthMethods200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': AuthMethodsToJSON(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 { AuthUser } from './AuthUser';
17
+ import {
18
+ AuthUserFromJSON,
19
+ AuthUserFromJSONTyped,
20
+ AuthUserToJSON,
21
+ AuthUserToJSONTyped,
22
+ } from './AuthUser';
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 GetEndUserById200Response
35
+ */
36
+ export interface GetEndUserById200Response {
37
+ /**
38
+ *
39
+ * @type {AuthUser}
40
+ * @memberof GetEndUserById200Response
41
+ */
42
+ data?: AuthUser;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof GetEndUserById200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetEndUserById200Response interface.
53
+ */
54
+ export function instanceOfGetEndUserById200Response(value: object): value is GetEndUserById200Response {
55
+ return true;
56
+ }
57
+
58
+ export function GetEndUserById200ResponseFromJSON(json: any): GetEndUserById200Response {
59
+ return GetEndUserById200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetEndUserById200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEndUserById200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : AuthUserFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function GetEndUserById200ResponseToJSON(json: any): GetEndUserById200Response {
74
+ return GetEndUserById200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetEndUserById200ResponseToJSONTyped(value?: GetEndUserById200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': AuthUserToJSON(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 { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
17
+ import {
18
+ GetDomain200ResponseMetaFromJSON,
19
+ GetDomain200ResponseMetaFromJSONTyped,
20
+ GetDomain200ResponseMetaToJSON,
21
+ GetDomain200ResponseMetaToJSONTyped,
22
+ } from './GetDomain200ResponseMeta';
23
+ import type { GetEndUserClaims200ResponseData } from './GetEndUserClaims200ResponseData';
24
+ import {
25
+ GetEndUserClaims200ResponseDataFromJSON,
26
+ GetEndUserClaims200ResponseDataFromJSONTyped,
27
+ GetEndUserClaims200ResponseDataToJSON,
28
+ GetEndUserClaims200ResponseDataToJSONTyped,
29
+ } from './GetEndUserClaims200ResponseData';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetEndUserClaims200Response
35
+ */
36
+ export interface GetEndUserClaims200Response {
37
+ /**
38
+ *
39
+ * @type {GetEndUserClaims200ResponseData}
40
+ * @memberof GetEndUserClaims200Response
41
+ */
42
+ data?: GetEndUserClaims200ResponseData;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof GetEndUserClaims200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetEndUserClaims200Response interface.
53
+ */
54
+ export function instanceOfGetEndUserClaims200Response(value: object): value is GetEndUserClaims200Response {
55
+ return true;
56
+ }
57
+
58
+ export function GetEndUserClaims200ResponseFromJSON(json: any): GetEndUserClaims200Response {
59
+ return GetEndUserClaims200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetEndUserClaims200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEndUserClaims200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : GetEndUserClaims200ResponseDataFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function GetEndUserClaims200ResponseToJSON(json: any): GetEndUserClaims200Response {
74
+ return GetEndUserClaims200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetEndUserClaims200ResponseToJSONTyped(value?: GetEndUserClaims200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': GetEndUserClaims200ResponseDataToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,65 @@
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 GetEndUserClaims200ResponseData
20
+ */
21
+ export interface GetEndUserClaims200ResponseData {
22
+ /**
23
+ * Stored custom_claims for the user; empty object when none are set.
24
+ * @type {{ [key: string]: any; }}
25
+ * @memberof GetEndUserClaims200ResponseData
26
+ */
27
+ claims?: { [key: string]: any; };
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetEndUserClaims200ResponseData interface.
32
+ */
33
+ export function instanceOfGetEndUserClaims200ResponseData(value: object): value is GetEndUserClaims200ResponseData {
34
+ return true;
35
+ }
36
+
37
+ export function GetEndUserClaims200ResponseDataFromJSON(json: any): GetEndUserClaims200ResponseData {
38
+ return GetEndUserClaims200ResponseDataFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function GetEndUserClaims200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEndUserClaims200ResponseData {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'claims': json['claims'] == null ? undefined : json['claims'],
48
+ };
49
+ }
50
+
51
+ export function GetEndUserClaims200ResponseDataToJSON(json: any): GetEndUserClaims200ResponseData {
52
+ return GetEndUserClaims200ResponseDataToJSONTyped(json, false);
53
+ }
54
+
55
+ export function GetEndUserClaims200ResponseDataToJSONTyped(value?: GetEndUserClaims200ResponseData | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'claims': value['claims'],
63
+ };
64
+ }
65
+