@zyphr-dev/node-sdk 0.1.33 → 0.1.35
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/dist/index.cjs +975 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1025 -42
- package/dist/index.d.ts +1025 -42
- package/dist/index.js +898 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +16 -1
- package/src/client.ts +4 -0
- package/src/src/apis/AuthEmailOTPApi.ts +371 -0
- package/src/src/apis/DomainsApi.ts +73 -0
- package/src/src/apis/InboundEmailApi.ts +264 -0
- package/src/src/apis/index.ts +2 -0
- package/src/src/models/CheckEmailOtpAvailability200Response.ts +73 -0
- package/src/src/models/{PhoneAuthAvailabilityResponseData.ts → CheckEmailOtpAvailability200ResponseData.ts} +12 -12
- package/src/src/models/InboundAttachmentUrlResponse.ts +88 -0
- package/src/src/models/InboundAttachmentUrlResponseData.ts +81 -0
- package/src/src/models/InboundEmail.ts +247 -0
- package/src/src/models/InboundEmailAttachment.ts +89 -0
- package/src/src/models/InboundEmailFrom.ts +73 -0
- package/src/src/models/InboundEmailListResponse.ts +88 -0
- package/src/src/models/InboundEmailListResponseMeta.ts +89 -0
- package/src/src/models/InboundEmailResponse.ts +88 -0
- package/src/src/models/PhoneAuthAvailabilityResponse.ts +10 -10
- package/src/src/models/SendEmailOtpRegistrationRequest.ts +66 -0
- package/src/src/models/SetDomainInboundRequest.ts +65 -0
- package/src/src/models/VerifyEmailOtpLoginRequest.ts +83 -0
- package/src/src/models/VerifyEmailOtpRegistrationRequest.ts +91 -0
- package/src/src/models/index.ts +14 -1
|
@@ -0,0 +1,264 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
InboundAttachmentUrlResponse,
|
|
19
|
+
InboundEmailListResponse,
|
|
20
|
+
InboundEmailResponse,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
InboundAttachmentUrlResponseFromJSON,
|
|
24
|
+
InboundAttachmentUrlResponseToJSON,
|
|
25
|
+
InboundEmailListResponseFromJSON,
|
|
26
|
+
InboundEmailListResponseToJSON,
|
|
27
|
+
InboundEmailResponseFromJSON,
|
|
28
|
+
InboundEmailResponseToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface InboundEmailApiGetInboundAttachmentUrlRequest {
|
|
32
|
+
id: string;
|
|
33
|
+
attachmentId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface InboundEmailApiGetInboundEmailRequest {
|
|
37
|
+
id: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface InboundEmailApiListInboundEmailsRequest {
|
|
41
|
+
status?: ListInboundEmailsStatusEnum;
|
|
42
|
+
to?: string;
|
|
43
|
+
includeWithheld?: boolean;
|
|
44
|
+
limit?: number;
|
|
45
|
+
offset?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* InboundEmailApi - interface
|
|
50
|
+
*
|
|
51
|
+
* @export
|
|
52
|
+
* @interface InboundEmailApiInterface
|
|
53
|
+
*/
|
|
54
|
+
export interface InboundEmailApiInterface {
|
|
55
|
+
/**
|
|
56
|
+
* Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
|
|
57
|
+
* @summary Get an attachment download URL
|
|
58
|
+
* @param {string} id
|
|
59
|
+
* @param {string} attachmentId
|
|
60
|
+
* @param {*} [options] Override http request option.
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof InboundEmailApiInterface
|
|
63
|
+
*/
|
|
64
|
+
getInboundAttachmentUrlRaw(requestParameters: InboundEmailApiGetInboundAttachmentUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundAttachmentUrlResponse>>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
|
|
68
|
+
* Get an attachment download URL
|
|
69
|
+
*/
|
|
70
|
+
getInboundAttachmentUrl(id: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundAttachmentUrlResponse>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Retrieve a single inbound email by id (scoped to the project).
|
|
74
|
+
* @summary Get a received email
|
|
75
|
+
* @param {string} id
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof InboundEmailApiInterface
|
|
79
|
+
*/
|
|
80
|
+
getInboundEmailRaw(requestParameters: InboundEmailApiGetInboundEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundEmailResponse>>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Retrieve a single inbound email by id (scoped to the project).
|
|
84
|
+
* Get a received email
|
|
85
|
+
*/
|
|
86
|
+
getInboundEmail(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundEmailResponse>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
|
|
90
|
+
* @summary List received emails
|
|
91
|
+
* @param {'received' | 'processed' | 'quarantined' | 'dropped' | 'failed'} [status]
|
|
92
|
+
* @param {string} [to] Filter by receiving address
|
|
93
|
+
* @param {boolean} [includeWithheld] Include quarantined/dropped mail
|
|
94
|
+
* @param {number} [limit]
|
|
95
|
+
* @param {number} [offset]
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
* @memberof InboundEmailApiInterface
|
|
99
|
+
*/
|
|
100
|
+
listInboundEmailsRaw(requestParameters: InboundEmailApiListInboundEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundEmailListResponse>>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
|
|
104
|
+
* List received emails
|
|
105
|
+
*/
|
|
106
|
+
listInboundEmails(status?: ListInboundEmailsStatusEnum, to?: string, includeWithheld?: boolean, limit?: number, offset?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundEmailListResponse>;
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
export class InboundEmailApi extends runtime.BaseAPI implements InboundEmailApiInterface {
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
|
|
117
|
+
* Get an attachment download URL
|
|
118
|
+
*/
|
|
119
|
+
async getInboundAttachmentUrlRaw(requestParameters: InboundEmailApiGetInboundAttachmentUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundAttachmentUrlResponse>> {
|
|
120
|
+
if (requestParameters['id'] == null) {
|
|
121
|
+
throw new runtime.RequiredError(
|
|
122
|
+
'id',
|
|
123
|
+
'Required parameter "id" was null or undefined when calling getInboundAttachmentUrl().'
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (requestParameters['attachmentId'] == null) {
|
|
128
|
+
throw new runtime.RequiredError(
|
|
129
|
+
'attachmentId',
|
|
130
|
+
'Required parameter "attachmentId" was null or undefined when calling getInboundAttachmentUrl().'
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const queryParameters: any = {};
|
|
135
|
+
|
|
136
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
137
|
+
|
|
138
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
139
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const response = await this.request({
|
|
143
|
+
path: `/inbound-emails/{id}/attachments/{attachmentId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))),
|
|
144
|
+
method: 'GET',
|
|
145
|
+
headers: headerParameters,
|
|
146
|
+
query: queryParameters,
|
|
147
|
+
}, initOverrides);
|
|
148
|
+
|
|
149
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InboundAttachmentUrlResponseFromJSON(jsonValue));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email\'s `attachments` array.
|
|
154
|
+
* Get an attachment download URL
|
|
155
|
+
*/
|
|
156
|
+
async getInboundAttachmentUrl(id: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundAttachmentUrlResponse> {
|
|
157
|
+
const response = await this.getInboundAttachmentUrlRaw({ id: id, attachmentId: attachmentId }, initOverrides);
|
|
158
|
+
return await response.value();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Retrieve a single inbound email by id (scoped to the project).
|
|
163
|
+
* Get a received email
|
|
164
|
+
*/
|
|
165
|
+
async getInboundEmailRaw(requestParameters: InboundEmailApiGetInboundEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundEmailResponse>> {
|
|
166
|
+
if (requestParameters['id'] == null) {
|
|
167
|
+
throw new runtime.RequiredError(
|
|
168
|
+
'id',
|
|
169
|
+
'Required parameter "id" was null or undefined when calling getInboundEmail().'
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const queryParameters: any = {};
|
|
174
|
+
|
|
175
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
176
|
+
|
|
177
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
178
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const response = await this.request({
|
|
182
|
+
path: `/inbound-emails/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
183
|
+
method: 'GET',
|
|
184
|
+
headers: headerParameters,
|
|
185
|
+
query: queryParameters,
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
|
|
188
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InboundEmailResponseFromJSON(jsonValue));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Retrieve a single inbound email by id (scoped to the project).
|
|
193
|
+
* Get a received email
|
|
194
|
+
*/
|
|
195
|
+
async getInboundEmail(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundEmailResponse> {
|
|
196
|
+
const response = await this.getInboundEmailRaw({ id: id }, initOverrides);
|
|
197
|
+
return await response.value();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
|
|
202
|
+
* List received emails
|
|
203
|
+
*/
|
|
204
|
+
async listInboundEmailsRaw(requestParameters: InboundEmailApiListInboundEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboundEmailListResponse>> {
|
|
205
|
+
const queryParameters: any = {};
|
|
206
|
+
|
|
207
|
+
if (requestParameters['status'] != null) {
|
|
208
|
+
queryParameters['status'] = requestParameters['status'];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (requestParameters['to'] != null) {
|
|
212
|
+
queryParameters['to'] = requestParameters['to'];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (requestParameters['includeWithheld'] != null) {
|
|
216
|
+
queryParameters['include_withheld'] = requestParameters['includeWithheld'];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (requestParameters['limit'] != null) {
|
|
220
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (requestParameters['offset'] != null) {
|
|
224
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
228
|
+
|
|
229
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
230
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const response = await this.request({
|
|
234
|
+
path: `/inbound-emails`,
|
|
235
|
+
method: 'GET',
|
|
236
|
+
headers: headerParameters,
|
|
237
|
+
query: queryParameters,
|
|
238
|
+
}, initOverrides);
|
|
239
|
+
|
|
240
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InboundEmailListResponseFromJSON(jsonValue));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
|
|
245
|
+
* List received emails
|
|
246
|
+
*/
|
|
247
|
+
async listInboundEmails(status?: ListInboundEmailsStatusEnum, to?: string, includeWithheld?: boolean, limit?: number, offset?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboundEmailListResponse> {
|
|
248
|
+
const response = await this.listInboundEmailsRaw({ status: status, to: to, includeWithheld: includeWithheld, limit: limit, offset: offset }, initOverrides);
|
|
249
|
+
return await response.value();
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @export
|
|
256
|
+
*/
|
|
257
|
+
export const ListInboundEmailsStatusEnum = {
|
|
258
|
+
RECEIVED: 'received',
|
|
259
|
+
PROCESSED: 'processed',
|
|
260
|
+
QUARANTINED: 'quarantined',
|
|
261
|
+
DROPPED: 'dropped',
|
|
262
|
+
FAILED: 'failed'
|
|
263
|
+
} as const;
|
|
264
|
+
export type ListInboundEmailsStatusEnum = typeof ListInboundEmailsStatusEnum[keyof typeof ListInboundEmailsStatusEnum];
|
package/src/src/apis/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AuthEmailOTPApi';
|
|
3
4
|
export * from './AuthEmailTemplatesApi';
|
|
4
5
|
export * from './AuthEmailVerificationApi';
|
|
5
6
|
export * from './AuthLoginApi';
|
|
@@ -17,6 +18,7 @@ export * from './DevicesApi';
|
|
|
17
18
|
export * from './DomainsApi';
|
|
18
19
|
export * from './EmailsApi';
|
|
19
20
|
export * from './ExecutionsApi';
|
|
21
|
+
export * from './InboundEmailApi';
|
|
20
22
|
export * from './InboxApi';
|
|
21
23
|
export * from './MuseApi';
|
|
22
24
|
export * from './PushApi';
|
|
@@ -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 { CheckEmailOtpAvailability200ResponseData } from './CheckEmailOtpAvailability200ResponseData';
|
|
17
|
+
import {
|
|
18
|
+
CheckEmailOtpAvailability200ResponseDataFromJSON,
|
|
19
|
+
CheckEmailOtpAvailability200ResponseDataFromJSONTyped,
|
|
20
|
+
CheckEmailOtpAvailability200ResponseDataToJSON,
|
|
21
|
+
CheckEmailOtpAvailability200ResponseDataToJSONTyped,
|
|
22
|
+
} from './CheckEmailOtpAvailability200ResponseData';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CheckEmailOtpAvailability200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface CheckEmailOtpAvailability200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CheckEmailOtpAvailability200ResponseData}
|
|
33
|
+
* @memberof CheckEmailOtpAvailability200Response
|
|
34
|
+
*/
|
|
35
|
+
data?: CheckEmailOtpAvailability200ResponseData;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CheckEmailOtpAvailability200Response interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCheckEmailOtpAvailability200Response(value: object): value is CheckEmailOtpAvailability200Response {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CheckEmailOtpAvailability200ResponseFromJSON(json: any): CheckEmailOtpAvailability200Response {
|
|
46
|
+
return CheckEmailOtpAvailability200ResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CheckEmailOtpAvailability200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckEmailOtpAvailability200Response {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : CheckEmailOtpAvailability200ResponseDataFromJSON(json['data']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CheckEmailOtpAvailability200ResponseToJSON(json: any): CheckEmailOtpAvailability200Response {
|
|
60
|
+
return CheckEmailOtpAvailability200ResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CheckEmailOtpAvailability200ResponseToJSONTyped(value?: CheckEmailOtpAvailability200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': CheckEmailOtpAvailability200ResponseDataToJSON(value['data']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -16,35 +16,35 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface CheckEmailOtpAvailability200ResponseData
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface CheckEmailOtpAvailability200ResponseData {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {boolean}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof CheckEmailOtpAvailability200ResponseData
|
|
26
26
|
*/
|
|
27
27
|
available?: boolean;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof CheckEmailOtpAvailability200ResponseData
|
|
32
32
|
*/
|
|
33
33
|
message?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Check if a given object implements the
|
|
37
|
+
* Check if a given object implements the CheckEmailOtpAvailability200ResponseData interface.
|
|
38
38
|
*/
|
|
39
|
-
export function
|
|
39
|
+
export function instanceOfCheckEmailOtpAvailability200ResponseData(value: object): value is CheckEmailOtpAvailability200ResponseData {
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function
|
|
44
|
-
return
|
|
43
|
+
export function CheckEmailOtpAvailability200ResponseDataFromJSON(json: any): CheckEmailOtpAvailability200ResponseData {
|
|
44
|
+
return CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json, false);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
47
|
+
export function CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckEmailOtpAvailability200ResponseData {
|
|
48
48
|
if (json == null) {
|
|
49
49
|
return json;
|
|
50
50
|
}
|
|
@@ -55,11 +55,11 @@ export function PhoneAuthAvailabilityResponseDataFromJSONTyped(json: any, ignore
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export function
|
|
59
|
-
return
|
|
58
|
+
export function CheckEmailOtpAvailability200ResponseDataToJSON(json: any): CheckEmailOtpAvailability200ResponseData {
|
|
59
|
+
return CheckEmailOtpAvailability200ResponseDataToJSONTyped(json, false);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export function
|
|
62
|
+
export function CheckEmailOtpAvailability200ResponseDataToJSONTyped(value?: CheckEmailOtpAvailability200ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
63
63
|
if (value == null) {
|
|
64
64
|
return value;
|
|
65
65
|
}
|
|
@@ -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 ## 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 { InboundAttachmentUrlResponseData } from './InboundAttachmentUrlResponseData';
|
|
17
|
+
import {
|
|
18
|
+
InboundAttachmentUrlResponseDataFromJSON,
|
|
19
|
+
InboundAttachmentUrlResponseDataFromJSONTyped,
|
|
20
|
+
InboundAttachmentUrlResponseDataToJSON,
|
|
21
|
+
InboundAttachmentUrlResponseDataToJSONTyped,
|
|
22
|
+
} from './InboundAttachmentUrlResponseData';
|
|
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 InboundAttachmentUrlResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface InboundAttachmentUrlResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {InboundAttachmentUrlResponseData}
|
|
40
|
+
* @memberof InboundAttachmentUrlResponse
|
|
41
|
+
*/
|
|
42
|
+
data?: InboundAttachmentUrlResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof InboundAttachmentUrlResponse
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the InboundAttachmentUrlResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfInboundAttachmentUrlResponse(value: object): value is InboundAttachmentUrlResponse {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function InboundAttachmentUrlResponseFromJSON(json: any): InboundAttachmentUrlResponse {
|
|
59
|
+
return InboundAttachmentUrlResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function InboundAttachmentUrlResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundAttachmentUrlResponse {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : InboundAttachmentUrlResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function InboundAttachmentUrlResponseToJSON(json: any): InboundAttachmentUrlResponse {
|
|
74
|
+
return InboundAttachmentUrlResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function InboundAttachmentUrlResponseToJSONTyped(value?: InboundAttachmentUrlResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': InboundAttachmentUrlResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## 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 InboundAttachmentUrlResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface InboundAttachmentUrlResponseData {
|
|
22
|
+
/**
|
|
23
|
+
* Short-lived presigned S3 download URL
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
26
|
+
*/
|
|
27
|
+
downloadUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
32
|
+
*/
|
|
33
|
+
filename?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
38
|
+
*/
|
|
39
|
+
contentType?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the InboundAttachmentUrlResponseData interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfInboundAttachmentUrlResponseData(value: object): value is InboundAttachmentUrlResponseData {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function InboundAttachmentUrlResponseDataFromJSON(json: any): InboundAttachmentUrlResponseData {
|
|
50
|
+
return InboundAttachmentUrlResponseDataFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function InboundAttachmentUrlResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundAttachmentUrlResponseData {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'downloadUrl': json['download_url'] == null ? undefined : json['download_url'],
|
|
60
|
+
'filename': json['filename'] == null ? undefined : json['filename'],
|
|
61
|
+
'contentType': json['content_type'] == null ? undefined : json['content_type'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function InboundAttachmentUrlResponseDataToJSON(json: any): InboundAttachmentUrlResponseData {
|
|
66
|
+
return InboundAttachmentUrlResponseDataToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function InboundAttachmentUrlResponseDataToJSONTyped(value?: InboundAttachmentUrlResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'download_url': value['downloadUrl'],
|
|
77
|
+
'filename': value['filename'],
|
|
78
|
+
'content_type': value['contentType'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|