@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.
@@ -0,0 +1,173 @@
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 { DnsRecord } from './DnsRecord';
17
+ import {
18
+ DnsRecordFromJSON,
19
+ DnsRecordFromJSONTyped,
20
+ DnsRecordToJSON,
21
+ DnsRecordToJSONTyped,
22
+ } from './DnsRecord';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface DomainResponse
28
+ */
29
+ export interface DomainResponse {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof DomainResponse
34
+ */
35
+ id: string;
36
+ /**
37
+ * The sending domain
38
+ * @type {string}
39
+ * @memberof DomainResponse
40
+ */
41
+ domain: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof DomainResponse
46
+ */
47
+ status: DomainResponseStatusEnum;
48
+ /**
49
+ *
50
+ * @type {Array<DnsRecord>}
51
+ * @memberof DomainResponse
52
+ */
53
+ dnsRecords: Array<DnsRecord>;
54
+ /**
55
+ * Count of `dns_records[]` entries with `verified=true`
56
+ * @type {number}
57
+ * @memberof DomainResponse
58
+ */
59
+ recordsVerified: number;
60
+ /**
61
+ * Total entries in `dns_records[]`
62
+ * @type {number}
63
+ * @memberof DomainResponse
64
+ */
65
+ recordsTotal: number;
66
+ /**
67
+ * Token used for the verification TXT record (also visible in `dns_records[]`)
68
+ * @type {string}
69
+ * @memberof DomainResponse
70
+ */
71
+ verificationToken?: string;
72
+ /**
73
+ * Timestamp when verification first succeeded
74
+ * @type {Date}
75
+ * @memberof DomainResponse
76
+ */
77
+ verifiedAt?: Date | null;
78
+ /**
79
+ * Timestamp of the most recent verification attempt
80
+ * @type {Date}
81
+ * @memberof DomainResponse
82
+ */
83
+ lastCheckedAt?: Date | null;
84
+ /**
85
+ *
86
+ * @type {Date}
87
+ * @memberof DomainResponse
88
+ */
89
+ createdAt: Date;
90
+ /**
91
+ *
92
+ * @type {Date}
93
+ * @memberof DomainResponse
94
+ */
95
+ updatedAt?: Date;
96
+ }
97
+
98
+
99
+ /**
100
+ * @export
101
+ */
102
+ export const DomainResponseStatusEnum = {
103
+ PENDING: 'pending',
104
+ VERIFYING: 'verifying',
105
+ VERIFIED: 'verified',
106
+ FAILED: 'failed'
107
+ } as const;
108
+ export type DomainResponseStatusEnum = typeof DomainResponseStatusEnum[keyof typeof DomainResponseStatusEnum];
109
+
110
+
111
+ /**
112
+ * Check if a given object implements the DomainResponse interface.
113
+ */
114
+ export function instanceOfDomainResponse(value: object): value is DomainResponse {
115
+ if (!('id' in value) || value['id'] === undefined) return false;
116
+ if (!('domain' in value) || value['domain'] === undefined) return false;
117
+ if (!('status' in value) || value['status'] === undefined) return false;
118
+ if (!('dnsRecords' in value) || value['dnsRecords'] === undefined) return false;
119
+ if (!('recordsVerified' in value) || value['recordsVerified'] === undefined) return false;
120
+ if (!('recordsTotal' in value) || value['recordsTotal'] === undefined) return false;
121
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
122
+ return true;
123
+ }
124
+
125
+ export function DomainResponseFromJSON(json: any): DomainResponse {
126
+ return DomainResponseFromJSONTyped(json, false);
127
+ }
128
+
129
+ export function DomainResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainResponse {
130
+ if (json == null) {
131
+ return json;
132
+ }
133
+ return {
134
+
135
+ 'id': json['id'],
136
+ 'domain': json['domain'],
137
+ 'status': json['status'],
138
+ 'dnsRecords': ((json['dns_records'] as Array<any>).map(DnsRecordFromJSON)),
139
+ 'recordsVerified': json['records_verified'],
140
+ 'recordsTotal': json['records_total'],
141
+ 'verificationToken': json['verification_token'] == null ? undefined : json['verification_token'],
142
+ 'verifiedAt': json['verified_at'] == null ? undefined : (new Date(json['verified_at'])),
143
+ 'lastCheckedAt': json['last_checked_at'] == null ? undefined : (new Date(json['last_checked_at'])),
144
+ 'createdAt': (new Date(json['created_at'])),
145
+ 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
146
+ };
147
+ }
148
+
149
+ export function DomainResponseToJSON(json: any): DomainResponse {
150
+ return DomainResponseToJSONTyped(json, false);
151
+ }
152
+
153
+ export function DomainResponseToJSONTyped(value?: DomainResponse | null, ignoreDiscriminator: boolean = false): any {
154
+ if (value == null) {
155
+ return value;
156
+ }
157
+
158
+ return {
159
+
160
+ 'id': value['id'],
161
+ 'domain': value['domain'],
162
+ 'status': value['status'],
163
+ 'dns_records': ((value['dnsRecords'] as Array<any>).map(DnsRecordToJSON)),
164
+ 'records_verified': value['recordsVerified'],
165
+ 'records_total': value['recordsTotal'],
166
+ 'verification_token': value['verificationToken'],
167
+ 'verified_at': value['verifiedAt'] == null ? undefined : ((value['verifiedAt'] as any).toISOString()),
168
+ 'last_checked_at': value['lastCheckedAt'] == null ? undefined : ((value['lastCheckedAt'] as any).toISOString()),
169
+ 'created_at': ((value['createdAt']).toISOString()),
170
+ 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
171
+ };
172
+ }
173
+
@@ -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
+
@@ -0,0 +1,65 @@
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 GetDomain200ResponseMeta
20
+ */
21
+ export interface GetDomain200ResponseMeta {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetDomain200ResponseMeta
26
+ */
27
+ requestId?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetDomain200ResponseMeta interface.
32
+ */
33
+ export function instanceOfGetDomain200ResponseMeta(value: object): value is GetDomain200ResponseMeta {
34
+ return true;
35
+ }
36
+
37
+ export function GetDomain200ResponseMetaFromJSON(json: any): GetDomain200ResponseMeta {
38
+ return GetDomain200ResponseMetaFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function GetDomain200ResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetDomain200ResponseMeta {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'requestId': json['request_id'] == null ? undefined : json['request_id'],
48
+ };
49
+ }
50
+
51
+ export function GetDomain200ResponseMetaToJSON(json: any): GetDomain200ResponseMeta {
52
+ return GetDomain200ResponseMetaToJSONTyped(json, false);
53
+ }
54
+
55
+ export function GetDomain200ResponseMetaToJSONTyped(value?: GetDomain200ResponseMeta | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'request_id': value['requestId'],
63
+ };
64
+ }
65
+
@@ -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 { VerificationStatusResponseData } from './VerificationStatusResponseData';
17
+ import {
18
+ VerificationStatusResponseDataFromJSON,
19
+ VerificationStatusResponseDataFromJSONTyped,
20
+ VerificationStatusResponseDataToJSON,
21
+ VerificationStatusResponseDataToJSONTyped,
22
+ } from './VerificationStatusResponseData';
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 VerificationStatusResponse
35
+ */
36
+ export interface VerificationStatusResponse {
37
+ /**
38
+ *
39
+ * @type {VerificationStatusResponseData}
40
+ * @memberof VerificationStatusResponse
41
+ */
42
+ data: VerificationStatusResponseData;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof VerificationStatusResponse
47
+ */
48
+ meta: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the VerificationStatusResponse interface.
53
+ */
54
+ export function instanceOfVerificationStatusResponse(value: object): value is VerificationStatusResponse {
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 VerificationStatusResponseFromJSON(json: any): VerificationStatusResponse {
61
+ return VerificationStatusResponseFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function VerificationStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerificationStatusResponse {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'data': VerificationStatusResponseDataFromJSON(json['data']),
71
+ 'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
72
+ };
73
+ }
74
+
75
+ export function VerificationStatusResponseToJSON(json: any): VerificationStatusResponse {
76
+ return VerificationStatusResponseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function VerificationStatusResponseToJSONTyped(value?: VerificationStatusResponse | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'data': VerificationStatusResponseDataToJSON(value['data']),
87
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
88
+ };
89
+ }
90
+
@@ -0,0 +1,148 @@
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 { DnsRecord } from './DnsRecord';
17
+ import {
18
+ DnsRecordFromJSON,
19
+ DnsRecordFromJSONTyped,
20
+ DnsRecordToJSON,
21
+ DnsRecordToJSONTyped,
22
+ } from './DnsRecord';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface VerificationStatusResponseData
28
+ */
29
+ export interface VerificationStatusResponseData {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof VerificationStatusResponseData
34
+ */
35
+ domainId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof VerificationStatusResponseData
40
+ */
41
+ domain: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof VerificationStatusResponseData
46
+ */
47
+ status: VerificationStatusResponseDataStatusEnum;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof VerificationStatusResponseData
52
+ */
53
+ recordsVerified: number;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof VerificationStatusResponseData
58
+ */
59
+ recordsTotal: number;
60
+ /**
61
+ * Internal verification progress detail
62
+ * @type {{ [key: string]: any; }}
63
+ * @memberof VerificationStatusResponseData
64
+ */
65
+ progress?: { [key: string]: any; };
66
+ /**
67
+ *
68
+ * @type {Array<DnsRecord>}
69
+ * @memberof VerificationStatusResponseData
70
+ */
71
+ dnsRecords: Array<DnsRecord>;
72
+ /**
73
+ *
74
+ * @type {Date}
75
+ * @memberof VerificationStatusResponseData
76
+ */
77
+ lastCheckedAt?: Date | null;
78
+ }
79
+
80
+
81
+ /**
82
+ * @export
83
+ */
84
+ export const VerificationStatusResponseDataStatusEnum = {
85
+ PENDING: 'pending',
86
+ VERIFYING: 'verifying',
87
+ VERIFIED: 'verified',
88
+ FAILED: 'failed'
89
+ } as const;
90
+ export type VerificationStatusResponseDataStatusEnum = typeof VerificationStatusResponseDataStatusEnum[keyof typeof VerificationStatusResponseDataStatusEnum];
91
+
92
+
93
+ /**
94
+ * Check if a given object implements the VerificationStatusResponseData interface.
95
+ */
96
+ export function instanceOfVerificationStatusResponseData(value: object): value is VerificationStatusResponseData {
97
+ if (!('domainId' in value) || value['domainId'] === undefined) return false;
98
+ if (!('domain' in value) || value['domain'] === undefined) return false;
99
+ if (!('status' in value) || value['status'] === undefined) return false;
100
+ if (!('recordsVerified' in value) || value['recordsVerified'] === undefined) return false;
101
+ if (!('recordsTotal' in value) || value['recordsTotal'] === undefined) return false;
102
+ if (!('dnsRecords' in value) || value['dnsRecords'] === undefined) return false;
103
+ return true;
104
+ }
105
+
106
+ export function VerificationStatusResponseDataFromJSON(json: any): VerificationStatusResponseData {
107
+ return VerificationStatusResponseDataFromJSONTyped(json, false);
108
+ }
109
+
110
+ export function VerificationStatusResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerificationStatusResponseData {
111
+ if (json == null) {
112
+ return json;
113
+ }
114
+ return {
115
+
116
+ 'domainId': json['domain_id'],
117
+ 'domain': json['domain'],
118
+ 'status': json['status'],
119
+ 'recordsVerified': json['records_verified'],
120
+ 'recordsTotal': json['records_total'],
121
+ 'progress': json['progress'] == null ? undefined : json['progress'],
122
+ 'dnsRecords': ((json['dns_records'] as Array<any>).map(DnsRecordFromJSON)),
123
+ 'lastCheckedAt': json['last_checked_at'] == null ? undefined : (new Date(json['last_checked_at'])),
124
+ };
125
+ }
126
+
127
+ export function VerificationStatusResponseDataToJSON(json: any): VerificationStatusResponseData {
128
+ return VerificationStatusResponseDataToJSONTyped(json, false);
129
+ }
130
+
131
+ export function VerificationStatusResponseDataToJSONTyped(value?: VerificationStatusResponseData | null, ignoreDiscriminator: boolean = false): any {
132
+ if (value == null) {
133
+ return value;
134
+ }
135
+
136
+ return {
137
+
138
+ 'domain_id': value['domainId'],
139
+ 'domain': value['domain'],
140
+ 'status': value['status'],
141
+ 'records_verified': value['recordsVerified'],
142
+ 'records_total': value['recordsTotal'],
143
+ 'progress': value['progress'],
144
+ 'dns_records': ((value['dnsRecords'] as Array<any>).map(DnsRecordToJSON)),
145
+ 'last_checked_at': value['lastCheckedAt'] == null ? undefined : ((value['lastCheckedAt'] as any).toISOString()),
146
+ };
147
+ }
148
+
@@ -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 { VerifyDomainResponseData } from './VerifyDomainResponseData';
17
+ import {
18
+ VerifyDomainResponseDataFromJSON,
19
+ VerifyDomainResponseDataFromJSONTyped,
20
+ VerifyDomainResponseDataToJSON,
21
+ VerifyDomainResponseDataToJSONTyped,
22
+ } from './VerifyDomainResponseData';
23
+ import type { AddDomain200ResponseMeta } from './AddDomain200ResponseMeta';
24
+ import {
25
+ AddDomain200ResponseMetaFromJSON,
26
+ AddDomain200ResponseMetaFromJSONTyped,
27
+ AddDomain200ResponseMetaToJSON,
28
+ AddDomain200ResponseMetaToJSONTyped,
29
+ } from './AddDomain200ResponseMeta';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface VerifyDomainResponse
35
+ */
36
+ export interface VerifyDomainResponse {
37
+ /**
38
+ *
39
+ * @type {VerifyDomainResponseData}
40
+ * @memberof VerifyDomainResponse
41
+ */
42
+ data: VerifyDomainResponseData;
43
+ /**
44
+ *
45
+ * @type {AddDomain200ResponseMeta}
46
+ * @memberof VerifyDomainResponse
47
+ */
48
+ meta: AddDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the VerifyDomainResponse interface.
53
+ */
54
+ export function instanceOfVerifyDomainResponse(value: object): value is VerifyDomainResponse {
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 VerifyDomainResponseFromJSON(json: any): VerifyDomainResponse {
61
+ return VerifyDomainResponseFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function VerifyDomainResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyDomainResponse {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'data': VerifyDomainResponseDataFromJSON(json['data']),
71
+ 'meta': AddDomain200ResponseMetaFromJSON(json['meta']),
72
+ };
73
+ }
74
+
75
+ export function VerifyDomainResponseToJSON(json: any): VerifyDomainResponse {
76
+ return VerifyDomainResponseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function VerifyDomainResponseToJSONTyped(value?: VerifyDomainResponse | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'data': VerifyDomainResponseDataToJSON(value['data']),
87
+ 'meta': AddDomain200ResponseMetaToJSON(value['meta']),
88
+ };
89
+ }
90
+