@zyphr-dev/node-sdk 0.1.43 → 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.
@@ -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 { 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
+
@@ -10,6 +10,8 @@ export * from './AddWorkflowStepRequest';
10
10
  export * from './ApiError';
11
11
  export * from './ApiErrorError';
12
12
  export * from './ApiErrorMeta';
13
+ export * from './ApplicationSelf';
14
+ export * from './ApplicationSelfResponse';
13
15
  export * from './AuthEmailTemplate';
14
16
  export * from './AuthEmailTemplateDefault';
15
17
  export * from './AuthEmailTemplateDefaultResponse';
@@ -30,6 +32,7 @@ export * from './AuthEmailType';
30
32
  export * from './AuthLoginResponse';
31
33
  export * from './AuthLoginResult';
32
34
  export * from './AuthLoginResultMfaChallenge';
35
+ export * from './AuthMethods';
33
36
  export * from './AuthResult';
34
37
  export * from './AuthResultResponse';
35
38
  export * from './AuthSession';
@@ -123,6 +126,7 @@ export * from './GenerateSubscriberTokenRequest';
123
126
  export * from './GenerateWaaSPortalToken201Response';
124
127
  export * from './GetDomain200Response';
125
128
  export * from './GetDomain200ResponseMeta';
129
+ export * from './GetEndUserAuthMethods200Response';
126
130
  export * from './GetEndUserById200Response';
127
131
  export * from './GetEndUserClaims200Response';
128
132
  export * from './GetEndUserClaims200ResponseData';