@zyphr-dev/node-sdk 0.1.26 → 0.1.28
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 +887 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +957 -10
- package/dist/index.d.ts +957 -10
- package/dist/index.js +806 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/.openapi-generator/FILES +16 -0
- package/src/src/apis/DomainsApi.ts +405 -0
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/AddDomain200Response.ts +88 -0
- package/src/src/models/AddDomain200ResponseMeta.ts +73 -0
- package/src/src/models/AddDomainRequest.ts +66 -0
- package/src/src/models/DeleteDomainResponse.ts +90 -0
- package/src/src/models/DeleteDomainResponseData.ts +75 -0
- package/src/src/models/DnsRecord.ts +127 -0
- package/src/src/models/DomainListResponse.ts +90 -0
- package/src/src/models/DomainListResponseMeta.ts +89 -0
- package/src/src/models/DomainResponse.ts +173 -0
- 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 +15 -0
|
@@ -0,0 +1,66 @@
|
|
|
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 AddDomainRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AddDomainRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The sending domain to add (will be lowercased and trimmed)
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AddDomainRequest
|
|
26
|
+
*/
|
|
27
|
+
domain: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AddDomainRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAddDomainRequest(value: object): value is AddDomainRequest {
|
|
34
|
+
if (!('domain' in value) || value['domain'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AddDomainRequestFromJSON(json: any): AddDomainRequest {
|
|
39
|
+
return AddDomainRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AddDomainRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddDomainRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'domain': json['domain'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AddDomainRequestToJSON(json: any): AddDomainRequest {
|
|
53
|
+
return AddDomainRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AddDomainRequestToJSONTyped(value?: AddDomainRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'domain': value['domain'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
* A single DNS record that must be published for the sending domain to verify
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DnsRecord
|
|
20
|
+
*/
|
|
21
|
+
export interface DnsRecord {
|
|
22
|
+
/**
|
|
23
|
+
* DNS record type
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DnsRecord
|
|
26
|
+
*/
|
|
27
|
+
type: DnsRecordTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
* DNS record name (host)
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DnsRecord
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* DNS record value
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof DnsRecord
|
|
38
|
+
*/
|
|
39
|
+
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* What this record is for — useful for partial failure reasoning
|
|
42
|
+
* (e.g. "SPF verified, DKIM #2 still pending") instead of treating
|
|
43
|
+
* the set as opaque.
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof DnsRecord
|
|
47
|
+
*/
|
|
48
|
+
purpose: DnsRecordPurposeEnum;
|
|
49
|
+
/**
|
|
50
|
+
* Whether this specific record has been observed in DNS
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof DnsRecord
|
|
53
|
+
*/
|
|
54
|
+
verified: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @export
|
|
60
|
+
*/
|
|
61
|
+
export const DnsRecordTypeEnum = {
|
|
62
|
+
TXT: 'TXT',
|
|
63
|
+
CNAME: 'CNAME'
|
|
64
|
+
} as const;
|
|
65
|
+
export type DnsRecordTypeEnum = typeof DnsRecordTypeEnum[keyof typeof DnsRecordTypeEnum];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export const DnsRecordPurposeEnum = {
|
|
71
|
+
DOMAIN_VERIFICATION: 'domain_verification',
|
|
72
|
+
SPF: 'spf',
|
|
73
|
+
DMARC: 'dmarc',
|
|
74
|
+
DKIM: 'dkim'
|
|
75
|
+
} as const;
|
|
76
|
+
export type DnsRecordPurposeEnum = typeof DnsRecordPurposeEnum[keyof typeof DnsRecordPurposeEnum];
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the DnsRecord interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfDnsRecord(value: object): value is DnsRecord {
|
|
83
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
84
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
85
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
86
|
+
if (!('purpose' in value) || value['purpose'] === undefined) return false;
|
|
87
|
+
if (!('verified' in value) || value['verified'] === undefined) return false;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function DnsRecordFromJSON(json: any): DnsRecord {
|
|
92
|
+
return DnsRecordFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function DnsRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): DnsRecord {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'type': json['type'],
|
|
102
|
+
'name': json['name'],
|
|
103
|
+
'value': json['value'],
|
|
104
|
+
'purpose': json['purpose'],
|
|
105
|
+
'verified': json['verified'],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function DnsRecordToJSON(json: any): DnsRecord {
|
|
110
|
+
return DnsRecordToJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function DnsRecordToJSONTyped(value?: DnsRecord | null, ignoreDiscriminator: boolean = false): any {
|
|
114
|
+
if (value == null) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'type': value['type'],
|
|
121
|
+
'name': value['name'],
|
|
122
|
+
'value': value['value'],
|
|
123
|
+
'purpose': value['purpose'],
|
|
124
|
+
'verified': value['verified'],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
@@ -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 { DomainListResponseMeta } from './DomainListResponseMeta';
|
|
17
|
+
import {
|
|
18
|
+
DomainListResponseMetaFromJSON,
|
|
19
|
+
DomainListResponseMetaFromJSONTyped,
|
|
20
|
+
DomainListResponseMetaToJSON,
|
|
21
|
+
DomainListResponseMetaToJSONTyped,
|
|
22
|
+
} from './DomainListResponseMeta';
|
|
23
|
+
import type { DomainResponse } from './DomainResponse';
|
|
24
|
+
import {
|
|
25
|
+
DomainResponseFromJSON,
|
|
26
|
+
DomainResponseFromJSONTyped,
|
|
27
|
+
DomainResponseToJSON,
|
|
28
|
+
DomainResponseToJSONTyped,
|
|
29
|
+
} from './DomainResponse';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface DomainListResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface DomainListResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<DomainResponse>}
|
|
40
|
+
* @memberof DomainListResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<DomainResponse>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {DomainListResponseMeta}
|
|
46
|
+
* @memberof DomainListResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: DomainListResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the DomainListResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfDomainListResponse(value: object): value is DomainListResponse {
|
|
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 DomainListResponseFromJSON(json: any): DomainListResponse {
|
|
61
|
+
return DomainListResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DomainListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainListResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(DomainResponseFromJSON)),
|
|
71
|
+
'meta': DomainListResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function DomainListResponseToJSON(json: any): DomainListResponse {
|
|
76
|
+
return DomainListResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function DomainListResponseToJSONTyped(value?: DomainListResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(DomainResponseToJSON)),
|
|
87
|
+
'meta': DomainListResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DomainListResponseMeta
|
|
20
|
+
*/
|
|
21
|
+
export interface DomainListResponseMeta {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DomainListResponseMeta
|
|
26
|
+
*/
|
|
27
|
+
requestId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Account-wide domain count (across all projects)
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof DomainListResponseMeta
|
|
32
|
+
*/
|
|
33
|
+
count?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Per-account domain limit from the current plan
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof DomainListResponseMeta
|
|
38
|
+
*/
|
|
39
|
+
limit?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof DomainListResponseMeta
|
|
44
|
+
*/
|
|
45
|
+
plan?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the DomainListResponseMeta interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfDomainListResponseMeta(value: object): value is DomainListResponseMeta {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function DomainListResponseMetaFromJSON(json: any): DomainListResponseMeta {
|
|
56
|
+
return DomainListResponseMetaFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function DomainListResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainListResponseMeta {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'requestId': json['request_id'] == null ? undefined : json['request_id'],
|
|
66
|
+
'count': json['count'] == null ? undefined : json['count'],
|
|
67
|
+
'limit': json['limit'] == null ? undefined : json['limit'],
|
|
68
|
+
'plan': json['plan'] == null ? undefined : json['plan'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function DomainListResponseMetaToJSON(json: any): DomainListResponseMeta {
|
|
73
|
+
return DomainListResponseMetaToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function DomainListResponseMetaToJSONTyped(value?: DomainListResponseMeta | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'request_id': value['requestId'],
|
|
84
|
+
'count': value['count'],
|
|
85
|
+
'limit': value['limit'],
|
|
86
|
+
'plan': value['plan'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|