@zyphr-dev/node-sdk 0.1.31 → 0.1.32
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 +507 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +528 -2
- package/dist/index.d.ts +528 -2
- package/dist/index.js +463 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +8 -0
- package/src/src/apis/DomainsApi.ts +248 -0
- package/src/src/models/DeleteDomainResponse.ts +90 -0
- package/src/src/models/DeleteDomainResponseData.ts +75 -0
- package/src/src/models/DomainResponse.ts +47 -1
- package/src/src/models/GetDomain200Response.ts +88 -0
- package/src/src/models/GetDomain200ResponseMeta.ts +65 -0
- package/src/src/models/VerificationStatusResponse.ts +90 -0
- package/src/src/models/VerificationStatusResponseData.ts +148 -0
- package/src/src/models/VerifyDomainResponse.ts +90 -0
- package/src/src/models/VerifyDomainResponseData.ts +103 -0
- package/src/src/models/index.ts +8 -0
package/package.json
CHANGED
|
@@ -104,6 +104,8 @@ src/models/CreateWaaSEndpointResponse.ts
|
|
|
104
104
|
src/models/CreateWaaSEventType201Response.ts
|
|
105
105
|
src/models/CreateWaaSEventTypeRequest.ts
|
|
106
106
|
src/models/CreateWebhookRequest.ts
|
|
107
|
+
src/models/DeleteDomainResponse.ts
|
|
108
|
+
src/models/DeleteDomainResponseData.ts
|
|
107
109
|
src/models/DeleteResult.ts
|
|
108
110
|
src/models/DeleteResultData.ts
|
|
109
111
|
src/models/Device.ts
|
|
@@ -142,6 +144,8 @@ src/models/GenerateSubscriberToken200Response.ts
|
|
|
142
144
|
src/models/GenerateSubscriberToken200ResponseData.ts
|
|
143
145
|
src/models/GenerateSubscriberTokenRequest.ts
|
|
144
146
|
src/models/GenerateWaaSPortalToken201Response.ts
|
|
147
|
+
src/models/GetDomain200Response.ts
|
|
148
|
+
src/models/GetDomain200ResponseMeta.ts
|
|
145
149
|
src/models/GetWaaSEndpoint200Response.ts
|
|
146
150
|
src/models/GetWaaSUsage200Response.ts
|
|
147
151
|
src/models/InAppNotification.ts
|
|
@@ -354,6 +358,10 @@ src/models/UserDevicesDeleteResponseData.ts
|
|
|
354
358
|
src/models/ValidateResetTokenRequest.ts
|
|
355
359
|
src/models/ValidateResetTokenResponse.ts
|
|
356
360
|
src/models/ValidateResetTokenResponseData.ts
|
|
361
|
+
src/models/VerificationStatusResponse.ts
|
|
362
|
+
src/models/VerificationStatusResponseData.ts
|
|
363
|
+
src/models/VerifyDomainResponse.ts
|
|
364
|
+
src/models/VerifyDomainResponseData.ts
|
|
357
365
|
src/models/VerifySmsConfigData.ts
|
|
358
366
|
src/models/VerifySmsConfigResponse.ts
|
|
359
367
|
src/models/WaaSApplication.ts
|
|
@@ -18,7 +18,11 @@ import type {
|
|
|
18
18
|
AddDomain200Response,
|
|
19
19
|
AddDomainRequest,
|
|
20
20
|
ApiError,
|
|
21
|
+
DeleteDomainResponse,
|
|
21
22
|
DomainListResponse,
|
|
23
|
+
GetDomain200Response,
|
|
24
|
+
VerificationStatusResponse,
|
|
25
|
+
VerifyDomainResponse,
|
|
22
26
|
} from '../models/index';
|
|
23
27
|
import {
|
|
24
28
|
AddDomain200ResponseFromJSON,
|
|
@@ -27,14 +31,38 @@ import {
|
|
|
27
31
|
AddDomainRequestToJSON,
|
|
28
32
|
ApiErrorFromJSON,
|
|
29
33
|
ApiErrorToJSON,
|
|
34
|
+
DeleteDomainResponseFromJSON,
|
|
35
|
+
DeleteDomainResponseToJSON,
|
|
30
36
|
DomainListResponseFromJSON,
|
|
31
37
|
DomainListResponseToJSON,
|
|
38
|
+
GetDomain200ResponseFromJSON,
|
|
39
|
+
GetDomain200ResponseToJSON,
|
|
40
|
+
VerificationStatusResponseFromJSON,
|
|
41
|
+
VerificationStatusResponseToJSON,
|
|
42
|
+
VerifyDomainResponseFromJSON,
|
|
43
|
+
VerifyDomainResponseToJSON,
|
|
32
44
|
} from '../models/index';
|
|
33
45
|
|
|
34
46
|
export interface DomainsApiAddDomainOperationRequest {
|
|
35
47
|
addDomainRequest: AddDomainRequest;
|
|
36
48
|
}
|
|
37
49
|
|
|
50
|
+
export interface DomainsApiDeleteDomainRequest {
|
|
51
|
+
id: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface DomainsApiGetDomainRequest {
|
|
55
|
+
id: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface DomainsApiGetDomainVerificationStatusRequest {
|
|
59
|
+
id: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface DomainsApiVerifyDomainRequest {
|
|
63
|
+
id: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
38
66
|
/**
|
|
39
67
|
* DomainsApi - interface
|
|
40
68
|
*
|
|
@@ -58,6 +86,54 @@ export interface DomainsApiInterface {
|
|
|
58
86
|
*/
|
|
59
87
|
addDomain(addDomainRequest: AddDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddDomain200Response>;
|
|
60
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
|
|
91
|
+
* @summary Remove a sending domain
|
|
92
|
+
* @param {string} id
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof DomainsApiInterface
|
|
96
|
+
*/
|
|
97
|
+
deleteDomainRaw(requestParameters: DomainsApiDeleteDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteDomainResponse>>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
|
|
101
|
+
* Remove a sending domain
|
|
102
|
+
*/
|
|
103
|
+
deleteDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteDomainResponse>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
107
|
+
* @summary Get a sending domain
|
|
108
|
+
* @param {string} id
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
* @memberof DomainsApiInterface
|
|
112
|
+
*/
|
|
113
|
+
getDomainRaw(requestParameters: DomainsApiGetDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDomain200Response>>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
117
|
+
* Get a sending domain
|
|
118
|
+
*/
|
|
119
|
+
getDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDomain200Response>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
|
|
123
|
+
* @summary Get domain verification status
|
|
124
|
+
* @param {string} id Domain ID
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
* @memberof DomainsApiInterface
|
|
128
|
+
*/
|
|
129
|
+
getDomainVerificationStatusRaw(requestParameters: DomainsApiGetDomainVerificationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerificationStatusResponse>>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
|
|
133
|
+
* Get domain verification status
|
|
134
|
+
*/
|
|
135
|
+
getDomainVerificationStatus(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerificationStatusResponse>;
|
|
136
|
+
|
|
61
137
|
/**
|
|
62
138
|
* List sending domains on the current project, with verification status and DNS records.
|
|
63
139
|
* @summary List sending domains
|
|
@@ -73,6 +149,22 @@ export interface DomainsApiInterface {
|
|
|
73
149
|
*/
|
|
74
150
|
listDomains(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainListResponse>;
|
|
75
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
154
|
+
* @summary Trigger domain verification
|
|
155
|
+
* @param {string} id
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
* @memberof DomainsApiInterface
|
|
159
|
+
*/
|
|
160
|
+
verifyDomainRaw(requestParameters: DomainsApiVerifyDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyDomainResponse>>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
164
|
+
* Trigger domain verification
|
|
165
|
+
*/
|
|
166
|
+
verifyDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyDomainResponse>;
|
|
167
|
+
|
|
76
168
|
}
|
|
77
169
|
|
|
78
170
|
/**
|
|
@@ -122,6 +214,123 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
|
|
|
122
214
|
return await response.value();
|
|
123
215
|
}
|
|
124
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
|
|
219
|
+
* Remove a sending domain
|
|
220
|
+
*/
|
|
221
|
+
async deleteDomainRaw(requestParameters: DomainsApiDeleteDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteDomainResponse>> {
|
|
222
|
+
if (requestParameters['id'] == null) {
|
|
223
|
+
throw new runtime.RequiredError(
|
|
224
|
+
'id',
|
|
225
|
+
'Required parameter "id" was null or undefined when calling deleteDomain().'
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const queryParameters: any = {};
|
|
230
|
+
|
|
231
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
232
|
+
|
|
233
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
234
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const response = await this.request({
|
|
238
|
+
path: `/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
239
|
+
method: 'DELETE',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
|
|
244
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteDomainResponseFromJSON(jsonValue));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
|
|
249
|
+
* Remove a sending domain
|
|
250
|
+
*/
|
|
251
|
+
async deleteDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteDomainResponse> {
|
|
252
|
+
const response = await this.deleteDomainRaw({ id: id }, initOverrides);
|
|
253
|
+
return await response.value();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
258
|
+
* Get a sending domain
|
|
259
|
+
*/
|
|
260
|
+
async getDomainRaw(requestParameters: DomainsApiGetDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDomain200Response>> {
|
|
261
|
+
if (requestParameters['id'] == null) {
|
|
262
|
+
throw new runtime.RequiredError(
|
|
263
|
+
'id',
|
|
264
|
+
'Required parameter "id" was null or undefined when calling getDomain().'
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const queryParameters: any = {};
|
|
269
|
+
|
|
270
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
271
|
+
|
|
272
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
273
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const response = await this.request({
|
|
277
|
+
path: `/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
278
|
+
method: 'GET',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
}, initOverrides);
|
|
282
|
+
|
|
283
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetDomain200ResponseFromJSON(jsonValue));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
288
|
+
* Get a sending domain
|
|
289
|
+
*/
|
|
290
|
+
async getDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDomain200Response> {
|
|
291
|
+
const response = await this.getDomainRaw({ id: id }, initOverrides);
|
|
292
|
+
return await response.value();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
|
|
297
|
+
* Get domain verification status
|
|
298
|
+
*/
|
|
299
|
+
async getDomainVerificationStatusRaw(requestParameters: DomainsApiGetDomainVerificationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerificationStatusResponse>> {
|
|
300
|
+
if (requestParameters['id'] == null) {
|
|
301
|
+
throw new runtime.RequiredError(
|
|
302
|
+
'id',
|
|
303
|
+
'Required parameter "id" was null or undefined when calling getDomainVerificationStatus().'
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const queryParameters: any = {};
|
|
308
|
+
|
|
309
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
310
|
+
|
|
311
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
312
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const response = await this.request({
|
|
316
|
+
path: `/domains/{id}/verification-status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
317
|
+
method: 'GET',
|
|
318
|
+
headers: headerParameters,
|
|
319
|
+
query: queryParameters,
|
|
320
|
+
}, initOverrides);
|
|
321
|
+
|
|
322
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VerificationStatusResponseFromJSON(jsonValue));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
|
|
327
|
+
* Get domain verification status
|
|
328
|
+
*/
|
|
329
|
+
async getDomainVerificationStatus(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerificationStatusResponse> {
|
|
330
|
+
const response = await this.getDomainVerificationStatusRaw({ id: id }, initOverrides);
|
|
331
|
+
return await response.value();
|
|
332
|
+
}
|
|
333
|
+
|
|
125
334
|
/**
|
|
126
335
|
* List sending domains on the current project, with verification status and DNS records.
|
|
127
336
|
* List sending domains
|
|
@@ -154,4 +363,43 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
|
|
|
154
363
|
return await response.value();
|
|
155
364
|
}
|
|
156
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
368
|
+
* Trigger domain verification
|
|
369
|
+
*/
|
|
370
|
+
async verifyDomainRaw(requestParameters: DomainsApiVerifyDomainRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyDomainResponse>> {
|
|
371
|
+
if (requestParameters['id'] == null) {
|
|
372
|
+
throw new runtime.RequiredError(
|
|
373
|
+
'id',
|
|
374
|
+
'Required parameter "id" was null or undefined when calling verifyDomain().'
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const queryParameters: any = {};
|
|
379
|
+
|
|
380
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
381
|
+
|
|
382
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
383
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const response = await this.request({
|
|
387
|
+
path: `/domains/{id}/verify`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
388
|
+
method: 'POST',
|
|
389
|
+
headers: headerParameters,
|
|
390
|
+
query: queryParameters,
|
|
391
|
+
}, initOverrides);
|
|
392
|
+
|
|
393
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VerifyDomainResponseFromJSON(jsonValue));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
398
|
+
* Trigger domain verification
|
|
399
|
+
*/
|
|
400
|
+
async verifyDomain(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyDomainResponse> {
|
|
401
|
+
const response = await this.verifyDomainRaw({ id: id }, initOverrides);
|
|
402
|
+
return await response.value();
|
|
403
|
+
}
|
|
404
|
+
|
|
157
405
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
|
|
17
|
+
import {
|
|
18
|
+
GetDomain200ResponseMetaFromJSON,
|
|
19
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
20
|
+
GetDomain200ResponseMetaToJSON,
|
|
21
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
22
|
+
} from './GetDomain200ResponseMeta';
|
|
23
|
+
import type { DeleteDomainResponseData } from './DeleteDomainResponseData';
|
|
24
|
+
import {
|
|
25
|
+
DeleteDomainResponseDataFromJSON,
|
|
26
|
+
DeleteDomainResponseDataFromJSONTyped,
|
|
27
|
+
DeleteDomainResponseDataToJSON,
|
|
28
|
+
DeleteDomainResponseDataToJSONTyped,
|
|
29
|
+
} from './DeleteDomainResponseData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface DeleteDomainResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface DeleteDomainResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DeleteDomainResponseData}
|
|
40
|
+
* @memberof DeleteDomainResponse
|
|
41
|
+
*/
|
|
42
|
+
data: DeleteDomainResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof DeleteDomainResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the DeleteDomainResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfDeleteDomainResponse(value: object): value is DeleteDomainResponse {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function DeleteDomainResponseFromJSON(json: any): DeleteDomainResponse {
|
|
61
|
+
return DeleteDomainResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DeleteDomainResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': DeleteDomainResponseDataFromJSON(json['data']),
|
|
71
|
+
'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function DeleteDomainResponseToJSON(json: any): DeleteDomainResponse {
|
|
76
|
+
return DeleteDomainResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function DeleteDomainResponseToJSONTyped(value?: DeleteDomainResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': DeleteDomainResponseDataToJSON(value['data']),
|
|
87
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
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 DeleteDomainResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface DeleteDomainResponseData {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DeleteDomainResponseData
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof DeleteDomainResponseData
|
|
32
|
+
*/
|
|
33
|
+
deleted: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the DeleteDomainResponseData interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfDeleteDomainResponseData(value: object): value is DeleteDomainResponseData {
|
|
40
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
41
|
+
if (!('deleted' in value) || value['deleted'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DeleteDomainResponseDataFromJSON(json: any): DeleteDomainResponseData {
|
|
46
|
+
return DeleteDomainResponseDataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DeleteDomainResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainResponseData {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'deleted': json['deleted'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function DeleteDomainResponseDataToJSON(json: any): DeleteDomainResponseData {
|
|
61
|
+
return DeleteDomainResponseDataToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DeleteDomainResponseDataToJSONTyped(value?: DeleteDomainResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'id': value['id'],
|
|
72
|
+
'deleted': value['deleted'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -70,7 +70,25 @@ export interface DomainResponse {
|
|
|
70
70
|
*/
|
|
71
71
|
verificationToken?: string;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* AWS SES identity-verification sub-status. Surfaced so callers can
|
|
74
|
+
* see WHY top-level `status` is still `pending` when all DNS records
|
|
75
|
+
* report `verified: true` — typically because SES DKIM propagation
|
|
76
|
+
* hasn't completed yet (can take a few minutes after DNS records
|
|
77
|
+
* land). Top-level `status` only flips to `verified` once both this
|
|
78
|
+
* and `ses_dkim_status` are `success`.
|
|
79
|
+
*
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof DomainResponse
|
|
82
|
+
*/
|
|
83
|
+
sesIdentityStatus?: DomainResponseSesIdentityStatusEnum;
|
|
84
|
+
/**
|
|
85
|
+
* AWS SES DKIM verification sub-status. See `ses_identity_status`.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof DomainResponse
|
|
88
|
+
*/
|
|
89
|
+
sesDkimStatus?: DomainResponseSesDkimStatusEnum;
|
|
90
|
+
/**
|
|
91
|
+
* Timestamp when verification first succeeded. Cleared to null if status later reverts away from `verified` (e.g. DNS records observed but SES DKIM not yet propagated).
|
|
74
92
|
* @type {Date}
|
|
75
93
|
* @memberof DomainResponse
|
|
76
94
|
*/
|
|
@@ -107,6 +125,30 @@ export const DomainResponseStatusEnum = {
|
|
|
107
125
|
} as const;
|
|
108
126
|
export type DomainResponseStatusEnum = typeof DomainResponseStatusEnum[keyof typeof DomainResponseStatusEnum];
|
|
109
127
|
|
|
128
|
+
/**
|
|
129
|
+
* @export
|
|
130
|
+
*/
|
|
131
|
+
export const DomainResponseSesIdentityStatusEnum = {
|
|
132
|
+
PENDING: 'pending',
|
|
133
|
+
SUCCESS: 'success',
|
|
134
|
+
FAILED: 'failed',
|
|
135
|
+
TEMPORARY_FAILURE: 'temporary_failure',
|
|
136
|
+
NOT_STARTED: 'not_started'
|
|
137
|
+
} as const;
|
|
138
|
+
export type DomainResponseSesIdentityStatusEnum = typeof DomainResponseSesIdentityStatusEnum[keyof typeof DomainResponseSesIdentityStatusEnum];
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @export
|
|
142
|
+
*/
|
|
143
|
+
export const DomainResponseSesDkimStatusEnum = {
|
|
144
|
+
PENDING: 'pending',
|
|
145
|
+
SUCCESS: 'success',
|
|
146
|
+
FAILED: 'failed',
|
|
147
|
+
TEMPORARY_FAILURE: 'temporary_failure',
|
|
148
|
+
NOT_STARTED: 'not_started'
|
|
149
|
+
} as const;
|
|
150
|
+
export type DomainResponseSesDkimStatusEnum = typeof DomainResponseSesDkimStatusEnum[keyof typeof DomainResponseSesDkimStatusEnum];
|
|
151
|
+
|
|
110
152
|
|
|
111
153
|
/**
|
|
112
154
|
* Check if a given object implements the DomainResponse interface.
|
|
@@ -139,6 +181,8 @@ export function DomainResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
139
181
|
'recordsVerified': json['records_verified'],
|
|
140
182
|
'recordsTotal': json['records_total'],
|
|
141
183
|
'verificationToken': json['verification_token'] == null ? undefined : json['verification_token'],
|
|
184
|
+
'sesIdentityStatus': json['ses_identity_status'] == null ? undefined : json['ses_identity_status'],
|
|
185
|
+
'sesDkimStatus': json['ses_dkim_status'] == null ? undefined : json['ses_dkim_status'],
|
|
142
186
|
'verifiedAt': json['verified_at'] == null ? undefined : (new Date(json['verified_at'])),
|
|
143
187
|
'lastCheckedAt': json['last_checked_at'] == null ? undefined : (new Date(json['last_checked_at'])),
|
|
144
188
|
'createdAt': (new Date(json['created_at'])),
|
|
@@ -164,6 +208,8 @@ export function DomainResponseToJSONTyped(value?: DomainResponse | null, ignoreD
|
|
|
164
208
|
'records_verified': value['recordsVerified'],
|
|
165
209
|
'records_total': value['recordsTotal'],
|
|
166
210
|
'verification_token': value['verificationToken'],
|
|
211
|
+
'ses_identity_status': value['sesIdentityStatus'],
|
|
212
|
+
'ses_dkim_status': value['sesDkimStatus'],
|
|
167
213
|
'verified_at': value['verifiedAt'] == null ? undefined : ((value['verifiedAt'] as any).toISOString()),
|
|
168
214
|
'last_checked_at': value['lastCheckedAt'] == null ? undefined : ((value['lastCheckedAt'] as any).toISOString()),
|
|
169
215
|
'created_at': ((value['createdAt']).toISOString()),
|
|
@@ -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 { DomainResponse } from './DomainResponse';
|
|
17
|
+
import {
|
|
18
|
+
DomainResponseFromJSON,
|
|
19
|
+
DomainResponseFromJSONTyped,
|
|
20
|
+
DomainResponseToJSON,
|
|
21
|
+
DomainResponseToJSONTyped,
|
|
22
|
+
} from './DomainResponse';
|
|
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 GetDomain200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface GetDomain200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DomainResponse}
|
|
40
|
+
* @memberof GetDomain200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: DomainResponse;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof GetDomain200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the GetDomain200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfGetDomain200Response(value: object): value is GetDomain200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GetDomain200ResponseFromJSON(json: any): GetDomain200Response {
|
|
59
|
+
return GetDomain200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function GetDomain200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetDomain200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : DomainResponseFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function GetDomain200ResponseToJSON(json: any): GetDomain200Response {
|
|
74
|
+
return GetDomain200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function GetDomain200ResponseToJSONTyped(value?: GetDomain200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': DomainResponseToJSON(value['data']),
|
|
85
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|