@zyphr-dev/node-sdk 0.1.33 → 0.1.34

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,247 @@
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 { InboundEmailFrom } from './InboundEmailFrom';
17
+ import {
18
+ InboundEmailFromFromJSON,
19
+ InboundEmailFromFromJSONTyped,
20
+ InboundEmailFromToJSON,
21
+ InboundEmailFromToJSONTyped,
22
+ } from './InboundEmailFrom';
23
+ import type { InboundEmailAttachment } from './InboundEmailAttachment';
24
+ import {
25
+ InboundEmailAttachmentFromJSON,
26
+ InboundEmailAttachmentFromJSONTyped,
27
+ InboundEmailAttachmentToJSON,
28
+ InboundEmailAttachmentToJSONTyped,
29
+ } from './InboundEmailAttachment';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface InboundEmail
35
+ */
36
+ export interface InboundEmail {
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof InboundEmail
41
+ */
42
+ id?: string;
43
+ /**
44
+ * The receiving address the mail was sent to
45
+ * @type {string}
46
+ * @memberof InboundEmail
47
+ */
48
+ toEmail?: string;
49
+ /**
50
+ *
51
+ * @type {InboundEmailFrom}
52
+ * @memberof InboundEmail
53
+ */
54
+ from?: InboundEmailFrom;
55
+ /**
56
+ *
57
+ * @type {Array<string>}
58
+ * @memberof InboundEmail
59
+ */
60
+ cc?: Array<string>;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof InboundEmail
65
+ */
66
+ subject?: string | null;
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof InboundEmail
71
+ */
72
+ textBody?: string | null;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof InboundEmail
77
+ */
78
+ htmlBody?: string | null;
79
+ /**
80
+ * RFC Message-ID this is a reply to, if any
81
+ * @type {string}
82
+ * @memberof InboundEmail
83
+ */
84
+ inReplyTo?: string | null;
85
+ /**
86
+ * Resolved outbound message this is a reply to, if correlated
87
+ * @type {string}
88
+ * @memberof InboundEmail
89
+ */
90
+ repliedToMessageId?: string | null;
91
+ /**
92
+ * False when SPF or DMARC failed — treat the sender as unverified
93
+ * @type {boolean}
94
+ * @memberof InboundEmail
95
+ */
96
+ verified?: boolean;
97
+ /**
98
+ *
99
+ * @type {string}
100
+ * @memberof InboundEmail
101
+ */
102
+ spfVerdict?: InboundEmailSpfVerdictEnum | null;
103
+ /**
104
+ *
105
+ * @type {string}
106
+ * @memberof InboundEmail
107
+ */
108
+ dkimVerdict?: InboundEmailDkimVerdictEnum | null;
109
+ /**
110
+ *
111
+ * @type {string}
112
+ * @memberof InboundEmail
113
+ */
114
+ dmarcVerdict?: InboundEmailDmarcVerdictEnum | null;
115
+ /**
116
+ *
117
+ * @type {string}
118
+ * @memberof InboundEmail
119
+ */
120
+ status?: InboundEmailStatusEnum;
121
+ /**
122
+ *
123
+ * @type {Array<InboundEmailAttachment>}
124
+ * @memberof InboundEmail
125
+ */
126
+ attachments?: Array<InboundEmailAttachment>;
127
+ /**
128
+ *
129
+ * @type {Date}
130
+ * @memberof InboundEmail
131
+ */
132
+ createdAt?: Date;
133
+ }
134
+
135
+
136
+ /**
137
+ * @export
138
+ */
139
+ export const InboundEmailSpfVerdictEnum = {
140
+ PASS: 'PASS',
141
+ FAIL: 'FAIL',
142
+ GRAY: 'GRAY',
143
+ PROCESSING_FAILED: 'PROCESSING_FAILED'
144
+ } as const;
145
+ export type InboundEmailSpfVerdictEnum = typeof InboundEmailSpfVerdictEnum[keyof typeof InboundEmailSpfVerdictEnum];
146
+
147
+ /**
148
+ * @export
149
+ */
150
+ export const InboundEmailDkimVerdictEnum = {
151
+ PASS: 'PASS',
152
+ FAIL: 'FAIL',
153
+ GRAY: 'GRAY',
154
+ PROCESSING_FAILED: 'PROCESSING_FAILED'
155
+ } as const;
156
+ export type InboundEmailDkimVerdictEnum = typeof InboundEmailDkimVerdictEnum[keyof typeof InboundEmailDkimVerdictEnum];
157
+
158
+ /**
159
+ * @export
160
+ */
161
+ export const InboundEmailDmarcVerdictEnum = {
162
+ PASS: 'PASS',
163
+ FAIL: 'FAIL',
164
+ GRAY: 'GRAY',
165
+ PROCESSING_FAILED: 'PROCESSING_FAILED'
166
+ } as const;
167
+ export type InboundEmailDmarcVerdictEnum = typeof InboundEmailDmarcVerdictEnum[keyof typeof InboundEmailDmarcVerdictEnum];
168
+
169
+ /**
170
+ * @export
171
+ */
172
+ export const InboundEmailStatusEnum = {
173
+ RECEIVED: 'received',
174
+ PROCESSED: 'processed',
175
+ QUARANTINED: 'quarantined',
176
+ DROPPED: 'dropped',
177
+ FAILED: 'failed'
178
+ } as const;
179
+ export type InboundEmailStatusEnum = typeof InboundEmailStatusEnum[keyof typeof InboundEmailStatusEnum];
180
+
181
+
182
+ /**
183
+ * Check if a given object implements the InboundEmail interface.
184
+ */
185
+ export function instanceOfInboundEmail(value: object): value is InboundEmail {
186
+ return true;
187
+ }
188
+
189
+ export function InboundEmailFromJSON(json: any): InboundEmail {
190
+ return InboundEmailFromJSONTyped(json, false);
191
+ }
192
+
193
+ export function InboundEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmail {
194
+ if (json == null) {
195
+ return json;
196
+ }
197
+ return {
198
+
199
+ 'id': json['id'] == null ? undefined : json['id'],
200
+ 'toEmail': json['to_email'] == null ? undefined : json['to_email'],
201
+ 'from': json['from'] == null ? undefined : InboundEmailFromFromJSON(json['from']),
202
+ 'cc': json['cc'] == null ? undefined : json['cc'],
203
+ 'subject': json['subject'] == null ? undefined : json['subject'],
204
+ 'textBody': json['text_body'] == null ? undefined : json['text_body'],
205
+ 'htmlBody': json['html_body'] == null ? undefined : json['html_body'],
206
+ 'inReplyTo': json['in_reply_to'] == null ? undefined : json['in_reply_to'],
207
+ 'repliedToMessageId': json['replied_to_message_id'] == null ? undefined : json['replied_to_message_id'],
208
+ 'verified': json['verified'] == null ? undefined : json['verified'],
209
+ 'spfVerdict': json['spf_verdict'] == null ? undefined : json['spf_verdict'],
210
+ 'dkimVerdict': json['dkim_verdict'] == null ? undefined : json['dkim_verdict'],
211
+ 'dmarcVerdict': json['dmarc_verdict'] == null ? undefined : json['dmarc_verdict'],
212
+ 'status': json['status'] == null ? undefined : json['status'],
213
+ 'attachments': json['attachments'] == null ? undefined : ((json['attachments'] as Array<any>).map(InboundEmailAttachmentFromJSON)),
214
+ 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
215
+ };
216
+ }
217
+
218
+ export function InboundEmailToJSON(json: any): InboundEmail {
219
+ return InboundEmailToJSONTyped(json, false);
220
+ }
221
+
222
+ export function InboundEmailToJSONTyped(value?: InboundEmail | null, ignoreDiscriminator: boolean = false): any {
223
+ if (value == null) {
224
+ return value;
225
+ }
226
+
227
+ return {
228
+
229
+ 'id': value['id'],
230
+ 'to_email': value['toEmail'],
231
+ 'from': InboundEmailFromToJSON(value['from']),
232
+ 'cc': value['cc'],
233
+ 'subject': value['subject'],
234
+ 'text_body': value['textBody'],
235
+ 'html_body': value['htmlBody'],
236
+ 'in_reply_to': value['inReplyTo'],
237
+ 'replied_to_message_id': value['repliedToMessageId'],
238
+ 'verified': value['verified'],
239
+ 'spf_verdict': value['spfVerdict'],
240
+ 'dkim_verdict': value['dkimVerdict'],
241
+ 'dmarc_verdict': value['dmarcVerdict'],
242
+ 'status': value['status'],
243
+ 'attachments': value['attachments'] == null ? undefined : ((value['attachments'] as Array<any>).map(InboundEmailAttachmentToJSON)),
244
+ 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
245
+ };
246
+ }
247
+
@@ -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 InboundEmailAttachment
20
+ */
21
+ export interface InboundEmailAttachment {
22
+ /**
23
+ * Positional attachment id, used in the attachment download endpoint
24
+ * @type {string}
25
+ * @memberof InboundEmailAttachment
26
+ */
27
+ id?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof InboundEmailAttachment
32
+ */
33
+ filename?: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof InboundEmailAttachment
38
+ */
39
+ contentType?: string;
40
+ /**
41
+ * Size in bytes
42
+ * @type {number}
43
+ * @memberof InboundEmailAttachment
44
+ */
45
+ size?: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the InboundEmailAttachment interface.
50
+ */
51
+ export function instanceOfInboundEmailAttachment(value: object): value is InboundEmailAttachment {
52
+ return true;
53
+ }
54
+
55
+ export function InboundEmailAttachmentFromJSON(json: any): InboundEmailAttachment {
56
+ return InboundEmailAttachmentFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function InboundEmailAttachmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmailAttachment {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'id': json['id'] == null ? undefined : json['id'],
66
+ 'filename': json['filename'] == null ? undefined : json['filename'],
67
+ 'contentType': json['content_type'] == null ? undefined : json['content_type'],
68
+ 'size': json['size'] == null ? undefined : json['size'],
69
+ };
70
+ }
71
+
72
+ export function InboundEmailAttachmentToJSON(json: any): InboundEmailAttachment {
73
+ return InboundEmailAttachmentToJSONTyped(json, false);
74
+ }
75
+
76
+ export function InboundEmailAttachmentToJSONTyped(value?: InboundEmailAttachment | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'id': value['id'],
84
+ 'filename': value['filename'],
85
+ 'content_type': value['contentType'],
86
+ 'size': value['size'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface InboundEmailFrom
20
+ */
21
+ export interface InboundEmailFrom {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof InboundEmailFrom
26
+ */
27
+ email?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof InboundEmailFrom
32
+ */
33
+ name?: string | null;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the InboundEmailFrom interface.
38
+ */
39
+ export function instanceOfInboundEmailFrom(value: object): value is InboundEmailFrom {
40
+ return true;
41
+ }
42
+
43
+ export function InboundEmailFromFromJSON(json: any): InboundEmailFrom {
44
+ return InboundEmailFromFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function InboundEmailFromFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmailFrom {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'email': json['email'] == null ? undefined : json['email'],
54
+ 'name': json['name'] == null ? undefined : json['name'],
55
+ };
56
+ }
57
+
58
+ export function InboundEmailFromToJSON(json: any): InboundEmailFrom {
59
+ return InboundEmailFromToJSONTyped(json, false);
60
+ }
61
+
62
+ export function InboundEmailFromToJSONTyped(value?: InboundEmailFrom | null, ignoreDiscriminator: boolean = false): any {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+
67
+ return {
68
+
69
+ 'email': value['email'],
70
+ 'name': value['name'],
71
+ };
72
+ }
73
+
@@ -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 { InboundEmail } from './InboundEmail';
17
+ import {
18
+ InboundEmailFromJSON,
19
+ InboundEmailFromJSONTyped,
20
+ InboundEmailToJSON,
21
+ InboundEmailToJSONTyped,
22
+ } from './InboundEmail';
23
+ import type { InboundEmailListResponseMeta } from './InboundEmailListResponseMeta';
24
+ import {
25
+ InboundEmailListResponseMetaFromJSON,
26
+ InboundEmailListResponseMetaFromJSONTyped,
27
+ InboundEmailListResponseMetaToJSON,
28
+ InboundEmailListResponseMetaToJSONTyped,
29
+ } from './InboundEmailListResponseMeta';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface InboundEmailListResponse
35
+ */
36
+ export interface InboundEmailListResponse {
37
+ /**
38
+ *
39
+ * @type {Array<InboundEmail>}
40
+ * @memberof InboundEmailListResponse
41
+ */
42
+ data?: Array<InboundEmail>;
43
+ /**
44
+ *
45
+ * @type {InboundEmailListResponseMeta}
46
+ * @memberof InboundEmailListResponse
47
+ */
48
+ meta?: InboundEmailListResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the InboundEmailListResponse interface.
53
+ */
54
+ export function instanceOfInboundEmailListResponse(value: object): value is InboundEmailListResponse {
55
+ return true;
56
+ }
57
+
58
+ export function InboundEmailListResponseFromJSON(json: any): InboundEmailListResponse {
59
+ return InboundEmailListResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function InboundEmailListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmailListResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(InboundEmailFromJSON)),
69
+ 'meta': json['meta'] == null ? undefined : InboundEmailListResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function InboundEmailListResponseToJSON(json: any): InboundEmailListResponse {
74
+ return InboundEmailListResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function InboundEmailListResponseToJSONTyped(value?: InboundEmailListResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(InboundEmailToJSON)),
85
+ 'meta': InboundEmailListResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -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 InboundEmailListResponseMeta
20
+ */
21
+ export interface InboundEmailListResponseMeta {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof InboundEmailListResponseMeta
26
+ */
27
+ requestId?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof InboundEmailListResponseMeta
32
+ */
33
+ total?: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof InboundEmailListResponseMeta
38
+ */
39
+ limit?: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof InboundEmailListResponseMeta
44
+ */
45
+ offset?: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the InboundEmailListResponseMeta interface.
50
+ */
51
+ export function instanceOfInboundEmailListResponseMeta(value: object): value is InboundEmailListResponseMeta {
52
+ return true;
53
+ }
54
+
55
+ export function InboundEmailListResponseMetaFromJSON(json: any): InboundEmailListResponseMeta {
56
+ return InboundEmailListResponseMetaFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function InboundEmailListResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmailListResponseMeta {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'requestId': json['request_id'] == null ? undefined : json['request_id'],
66
+ 'total': json['total'] == null ? undefined : json['total'],
67
+ 'limit': json['limit'] == null ? undefined : json['limit'],
68
+ 'offset': json['offset'] == null ? undefined : json['offset'],
69
+ };
70
+ }
71
+
72
+ export function InboundEmailListResponseMetaToJSON(json: any): InboundEmailListResponseMeta {
73
+ return InboundEmailListResponseMetaToJSONTyped(json, false);
74
+ }
75
+
76
+ export function InboundEmailListResponseMetaToJSONTyped(value?: InboundEmailListResponseMeta | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'request_id': value['requestId'],
84
+ 'total': value['total'],
85
+ 'limit': value['limit'],
86
+ 'offset': value['offset'],
87
+ };
88
+ }
89
+
@@ -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 { InboundEmail } from './InboundEmail';
17
+ import {
18
+ InboundEmailFromJSON,
19
+ InboundEmailFromJSONTyped,
20
+ InboundEmailToJSON,
21
+ InboundEmailToJSONTyped,
22
+ } from './InboundEmail';
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 InboundEmailResponse
35
+ */
36
+ export interface InboundEmailResponse {
37
+ /**
38
+ *
39
+ * @type {InboundEmail}
40
+ * @memberof InboundEmailResponse
41
+ */
42
+ data?: InboundEmail;
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof InboundEmailResponse
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the InboundEmailResponse interface.
53
+ */
54
+ export function instanceOfInboundEmailResponse(value: object): value is InboundEmailResponse {
55
+ return true;
56
+ }
57
+
58
+ export function InboundEmailResponseFromJSON(json: any): InboundEmailResponse {
59
+ return InboundEmailResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function InboundEmailResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundEmailResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : InboundEmailFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function InboundEmailResponseToJSON(json: any): InboundEmailResponse {
74
+ return InboundEmailResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function InboundEmailResponseToJSONTyped(value?: InboundEmailResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': InboundEmailToJSON(value['data']),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+