@zyphr-dev/node-sdk 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs +478 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +482 -1
- package/dist/index.d.ts +482 -1
- package/dist/index.js +430 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +9 -0
- package/src/errors.ts +31 -0
- package/src/src/apis/AuthEmailTemplatesApi.ts +3 -0
- package/src/src/apis/AuthRegistrationApi.ts +126 -0
- package/src/src/apis/EmailsApi.ts +3 -0
- package/src/src/apis/InboxApi.ts +3 -0
- package/src/src/apis/PushApi.ts +3 -0
- package/src/src/apis/SMSApi.ts +3 -0
- package/src/src/apis/TemplatesApi.ts +3 -0
- package/src/src/models/AuthUser.ts +24 -0
- package/src/src/models/ConvertAnonymousUserRequest.ts +73 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf.ts +102 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1.ts +110 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUser.ts +73 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUserName.ts +73 -0
- package/src/src/models/PayloadTooLargeError.ts +89 -0
- package/src/src/models/PayloadTooLargeErrorError.ts +101 -0
- package/src/src/models/PayloadTooLargeErrorErrorDetails.ts +73 -0
- package/src/src/models/SignInAnonymouslyRequest.ts +82 -0
- package/src/src/models/index.ts +9 -0
|
@@ -0,0 +1,110 @@
|
|
|
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 ## 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 { ConvertAnonymousUserRequestOneOf1AppleUser } from './ConvertAnonymousUserRequestOneOf1AppleUser';
|
|
17
|
+
import {
|
|
18
|
+
ConvertAnonymousUserRequestOneOf1AppleUserFromJSON,
|
|
19
|
+
ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped,
|
|
20
|
+
ConvertAnonymousUserRequestOneOf1AppleUserToJSON,
|
|
21
|
+
ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped,
|
|
22
|
+
} from './ConvertAnonymousUserRequestOneOf1AppleUser';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ConvertAnonymousUserRequestOneOf1
|
|
28
|
+
*/
|
|
29
|
+
export interface ConvertAnonymousUserRequestOneOf1 {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConvertAnonymousUserRequestOneOf1
|
|
34
|
+
*/
|
|
35
|
+
method: ConvertAnonymousUserRequestOneOf1MethodEnum;
|
|
36
|
+
/**
|
|
37
|
+
* Authorization code returned by the OAuth provider after the user authorizes.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConvertAnonymousUserRequestOneOf1
|
|
40
|
+
*/
|
|
41
|
+
code: string;
|
|
42
|
+
/**
|
|
43
|
+
* Opaque state token previously issued by GET /v1/auth/oauth/authorize.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ConvertAnonymousUserRequestOneOf1
|
|
46
|
+
*/
|
|
47
|
+
state: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {ConvertAnonymousUserRequestOneOf1AppleUser}
|
|
51
|
+
* @memberof ConvertAnonymousUserRequestOneOf1
|
|
52
|
+
*/
|
|
53
|
+
appleUser?: ConvertAnonymousUserRequestOneOf1AppleUser;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export const ConvertAnonymousUserRequestOneOf1MethodEnum = {
|
|
61
|
+
OAUTH: 'oauth'
|
|
62
|
+
} as const;
|
|
63
|
+
export type ConvertAnonymousUserRequestOneOf1MethodEnum = typeof ConvertAnonymousUserRequestOneOf1MethodEnum[keyof typeof ConvertAnonymousUserRequestOneOf1MethodEnum];
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the ConvertAnonymousUserRequestOneOf1 interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfConvertAnonymousUserRequestOneOf1(value: object): value is ConvertAnonymousUserRequestOneOf1 {
|
|
70
|
+
if (!('method' in value) || value['method'] === undefined) return false;
|
|
71
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
72
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function ConvertAnonymousUserRequestOneOf1FromJSON(json: any): ConvertAnonymousUserRequestOneOf1 {
|
|
77
|
+
return ConvertAnonymousUserRequestOneOf1FromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ConvertAnonymousUserRequestOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): ConvertAnonymousUserRequestOneOf1 {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'method': json['method'],
|
|
87
|
+
'code': json['code'],
|
|
88
|
+
'state': json['state'],
|
|
89
|
+
'appleUser': json['apple_user'] == null ? undefined : ConvertAnonymousUserRequestOneOf1AppleUserFromJSON(json['apple_user']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function ConvertAnonymousUserRequestOneOf1ToJSON(json: any): ConvertAnonymousUserRequestOneOf1 {
|
|
94
|
+
return ConvertAnonymousUserRequestOneOf1ToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ConvertAnonymousUserRequestOneOf1ToJSONTyped(value?: ConvertAnonymousUserRequestOneOf1 | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'method': value['method'],
|
|
105
|
+
'code': value['code'],
|
|
106
|
+
'state': value['state'],
|
|
107
|
+
'apple_user': ConvertAnonymousUserRequestOneOf1AppleUserToJSON(value['appleUser']),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -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 ## 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 { ConvertAnonymousUserRequestOneOf1AppleUserName } from './ConvertAnonymousUserRequestOneOf1AppleUserName';
|
|
17
|
+
import {
|
|
18
|
+
ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON,
|
|
19
|
+
ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped,
|
|
20
|
+
ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON,
|
|
21
|
+
ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped,
|
|
22
|
+
} from './ConvertAnonymousUserRequestOneOf1AppleUserName';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sign in with Apple only -- first-call name payload, since Apple omits the name from /userinfo on subsequent sign-ins.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ConvertAnonymousUserRequestOneOf1AppleUser
|
|
28
|
+
*/
|
|
29
|
+
export interface ConvertAnonymousUserRequestOneOf1AppleUser {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ConvertAnonymousUserRequestOneOf1AppleUserName}
|
|
33
|
+
* @memberof ConvertAnonymousUserRequestOneOf1AppleUser
|
|
34
|
+
*/
|
|
35
|
+
name?: ConvertAnonymousUserRequestOneOf1AppleUserName;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ConvertAnonymousUserRequestOneOf1AppleUser interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfConvertAnonymousUserRequestOneOf1AppleUser(value: object): value is ConvertAnonymousUserRequestOneOf1AppleUser {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserFromJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUser {
|
|
46
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConvertAnonymousUserRequestOneOf1AppleUser {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'name': json['name'] == null ? undefined : ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON(json['name']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserToJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUser {
|
|
60
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserToJSONTyped(value?: ConvertAnonymousUserRequestOneOf1AppleUser | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'name': ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON(value['name']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -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 ## 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 ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
20
|
+
*/
|
|
21
|
+
export interface ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
26
|
+
*/
|
|
27
|
+
firstName?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
32
|
+
*/
|
|
33
|
+
lastName?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ConvertAnonymousUserRequestOneOf1AppleUserName interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfConvertAnonymousUserRequestOneOf1AppleUserName(value: object): value is ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
44
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'firstName': json['firstName'] == null ? undefined : json['firstName'],
|
|
54
|
+
'lastName': json['lastName'] == null ? undefined : json['lastName'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
59
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(value?: ConvertAnonymousUserRequestOneOf1AppleUserName | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'firstName': value['firstName'],
|
|
70
|
+
'lastName': value['lastName'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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 ## 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 { PayloadTooLargeErrorError } from './PayloadTooLargeErrorError';
|
|
17
|
+
import {
|
|
18
|
+
PayloadTooLargeErrorErrorFromJSON,
|
|
19
|
+
PayloadTooLargeErrorErrorFromJSONTyped,
|
|
20
|
+
PayloadTooLargeErrorErrorToJSON,
|
|
21
|
+
PayloadTooLargeErrorErrorToJSONTyped,
|
|
22
|
+
} from './PayloadTooLargeErrorError';
|
|
23
|
+
import type { RequestMeta } from './RequestMeta';
|
|
24
|
+
import {
|
|
25
|
+
RequestMetaFromJSON,
|
|
26
|
+
RequestMetaFromJSONTyped,
|
|
27
|
+
RequestMetaToJSON,
|
|
28
|
+
RequestMetaToJSONTyped,
|
|
29
|
+
} from './RequestMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PayloadTooLargeError
|
|
35
|
+
*/
|
|
36
|
+
export interface PayloadTooLargeError {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {PayloadTooLargeErrorError}
|
|
40
|
+
* @memberof PayloadTooLargeError
|
|
41
|
+
*/
|
|
42
|
+
error: PayloadTooLargeErrorError;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof PayloadTooLargeError
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PayloadTooLargeError interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPayloadTooLargeError(value: object): value is PayloadTooLargeError {
|
|
55
|
+
if (!('error' in value) || value['error'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PayloadTooLargeErrorFromJSON(json: any): PayloadTooLargeError {
|
|
60
|
+
return PayloadTooLargeErrorFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function PayloadTooLargeErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): PayloadTooLargeError {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'error': PayloadTooLargeErrorErrorFromJSON(json['error']),
|
|
70
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function PayloadTooLargeErrorToJSON(json: any): PayloadTooLargeError {
|
|
75
|
+
return PayloadTooLargeErrorToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function PayloadTooLargeErrorToJSONTyped(value?: PayloadTooLargeError | null, ignoreDiscriminator: boolean = false): any {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'error': PayloadTooLargeErrorErrorToJSON(value['error']),
|
|
86
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 ## 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 { PayloadTooLargeErrorErrorDetails } from './PayloadTooLargeErrorErrorDetails';
|
|
17
|
+
import {
|
|
18
|
+
PayloadTooLargeErrorErrorDetailsFromJSON,
|
|
19
|
+
PayloadTooLargeErrorErrorDetailsFromJSONTyped,
|
|
20
|
+
PayloadTooLargeErrorErrorDetailsToJSON,
|
|
21
|
+
PayloadTooLargeErrorErrorDetailsToJSONTyped,
|
|
22
|
+
} from './PayloadTooLargeErrorErrorDetails';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PayloadTooLargeErrorError
|
|
28
|
+
*/
|
|
29
|
+
export interface PayloadTooLargeErrorError {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PayloadTooLargeErrorError
|
|
34
|
+
*/
|
|
35
|
+
code: PayloadTooLargeErrorErrorCodeEnum;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PayloadTooLargeErrorError
|
|
40
|
+
*/
|
|
41
|
+
message: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {PayloadTooLargeErrorErrorDetails}
|
|
45
|
+
* @memberof PayloadTooLargeErrorError
|
|
46
|
+
*/
|
|
47
|
+
details?: PayloadTooLargeErrorErrorDetails;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const PayloadTooLargeErrorErrorCodeEnum = {
|
|
55
|
+
PAYLOAD_TOO_LARGE: 'payload_too_large'
|
|
56
|
+
} as const;
|
|
57
|
+
export type PayloadTooLargeErrorErrorCodeEnum = typeof PayloadTooLargeErrorErrorCodeEnum[keyof typeof PayloadTooLargeErrorErrorCodeEnum];
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the PayloadTooLargeErrorError interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfPayloadTooLargeErrorError(value: object): value is PayloadTooLargeErrorError {
|
|
64
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
65
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function PayloadTooLargeErrorErrorFromJSON(json: any): PayloadTooLargeErrorError {
|
|
70
|
+
return PayloadTooLargeErrorErrorFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function PayloadTooLargeErrorErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): PayloadTooLargeErrorError {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'code': json['code'],
|
|
80
|
+
'message': json['message'],
|
|
81
|
+
'details': json['details'] == null ? undefined : PayloadTooLargeErrorErrorDetailsFromJSON(json['details']),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function PayloadTooLargeErrorErrorToJSON(json: any): PayloadTooLargeErrorError {
|
|
86
|
+
return PayloadTooLargeErrorErrorToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function PayloadTooLargeErrorErrorToJSONTyped(value?: PayloadTooLargeErrorError | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'code': value['code'],
|
|
97
|
+
'message': value['message'],
|
|
98
|
+
'details': PayloadTooLargeErrorErrorDetailsToJSON(value['details']),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -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 ## 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 PayloadTooLargeErrorErrorDetails
|
|
20
|
+
*/
|
|
21
|
+
export interface PayloadTooLargeErrorErrorDetails {
|
|
22
|
+
/**
|
|
23
|
+
* Maximum allowed request body size in bytes.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PayloadTooLargeErrorErrorDetails
|
|
26
|
+
*/
|
|
27
|
+
limitBytes?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Size of the rejected request body in bytes.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PayloadTooLargeErrorErrorDetails
|
|
32
|
+
*/
|
|
33
|
+
receivedBytes?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the PayloadTooLargeErrorErrorDetails interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfPayloadTooLargeErrorErrorDetails(value: object): value is PayloadTooLargeErrorErrorDetails {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function PayloadTooLargeErrorErrorDetailsFromJSON(json: any): PayloadTooLargeErrorErrorDetails {
|
|
44
|
+
return PayloadTooLargeErrorErrorDetailsFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PayloadTooLargeErrorErrorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PayloadTooLargeErrorErrorDetails {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'limitBytes': json['limit_bytes'] == null ? undefined : json['limit_bytes'],
|
|
54
|
+
'receivedBytes': json['received_bytes'] == null ? undefined : json['received_bytes'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function PayloadTooLargeErrorErrorDetailsToJSON(json: any): PayloadTooLargeErrorErrorDetails {
|
|
59
|
+
return PayloadTooLargeErrorErrorDetailsToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function PayloadTooLargeErrorErrorDetailsToJSONTyped(value?: PayloadTooLargeErrorErrorDetails | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'limit_bytes': value['limitBytes'],
|
|
70
|
+
'received_bytes': value['receivedBytes'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
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 ## 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 SignInAnonymouslyRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SignInAnonymouslyRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Stable per-device identifier supplied by the client. Use a cryptographically-random opaque value persisted to client storage on first run.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SignInAnonymouslyRequest
|
|
26
|
+
*/
|
|
27
|
+
deviceId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional display name. If omitted, the user has no name until conversion.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SignInAnonymouslyRequest
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {{ [key: string]: any; }}
|
|
37
|
+
* @memberof SignInAnonymouslyRequest
|
|
38
|
+
*/
|
|
39
|
+
metadata?: { [key: string]: any; };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the SignInAnonymouslyRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfSignInAnonymouslyRequest(value: object): value is SignInAnonymouslyRequest {
|
|
46
|
+
if (!('deviceId' in value) || value['deviceId'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SignInAnonymouslyRequestFromJSON(json: any): SignInAnonymouslyRequest {
|
|
51
|
+
return SignInAnonymouslyRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function SignInAnonymouslyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignInAnonymouslyRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'deviceId': json['device_id'],
|
|
61
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
62
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SignInAnonymouslyRequestToJSON(json: any): SignInAnonymouslyRequest {
|
|
67
|
+
return SignInAnonymouslyRequestToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SignInAnonymouslyRequestToJSONTyped(value?: SignInAnonymouslyRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'device_id': value['deviceId'],
|
|
78
|
+
'name': value['name'],
|
|
79
|
+
'metadata': value['metadata'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -49,6 +49,11 @@ export * from './ConsentRecordResponseData';
|
|
|
49
49
|
export * from './ConsentStatus';
|
|
50
50
|
export * from './ConsentStatusResponse';
|
|
51
51
|
export * from './ConsentWithdrawResponse';
|
|
52
|
+
export * from './ConvertAnonymousUserRequest';
|
|
53
|
+
export * from './ConvertAnonymousUserRequestOneOf';
|
|
54
|
+
export * from './ConvertAnonymousUserRequestOneOf1';
|
|
55
|
+
export * from './ConvertAnonymousUserRequestOneOf1AppleUser';
|
|
56
|
+
export * from './ConvertAnonymousUserRequestOneOf1AppleUserName';
|
|
52
57
|
export * from './CreateCategoryRequest';
|
|
53
58
|
export * from './CreateSubscriberRequest';
|
|
54
59
|
export * from './CreateTemplateRequest';
|
|
@@ -155,6 +160,9 @@ export * from './PaginationMeta';
|
|
|
155
160
|
export * from './PasswordRequirements';
|
|
156
161
|
export * from './PasswordRequirementsResponse';
|
|
157
162
|
export * from './PasswordRequirementsResponseData';
|
|
163
|
+
export * from './PayloadTooLargeError';
|
|
164
|
+
export * from './PayloadTooLargeErrorError';
|
|
165
|
+
export * from './PayloadTooLargeErrorErrorDetails';
|
|
158
166
|
export * from './PhoneAuthAvailabilityResponse';
|
|
159
167
|
export * from './PhoneAuthAvailabilityResponseData';
|
|
160
168
|
export * from './PhoneLoginVerifyRequest';
|
|
@@ -236,6 +244,7 @@ export * from './SessionListResponseData';
|
|
|
236
244
|
export * from './SessionListResponseDataSessionInfo';
|
|
237
245
|
export * from './SetPreferencesRequest';
|
|
238
246
|
export * from './SetPreferencesRequestPreferencesInner';
|
|
247
|
+
export * from './SignInAnonymouslyRequest';
|
|
239
248
|
export * from './SlackMessage';
|
|
240
249
|
export * from './SlackMessageListResponse';
|
|
241
250
|
export * from './SlackMessageListResponseMeta';
|