@zyphr-dev/node-sdk 0.1.32 → 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.
- package/dist/index.cjs +2245 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3139 -933
- package/dist/index.d.ts +3139 -933
- package/dist/index.js +2100 -117
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +30 -0
- package/src/client.ts +9 -0
- package/src/src/apis/AuthOrganizationsApi.ts +823 -0
- package/src/src/apis/AuthUserProfileApi.ts +62 -0
- package/src/src/apis/DomainsApi.ts +73 -0
- package/src/src/apis/InboundEmailApi.ts +264 -0
- package/src/src/apis/MuseApi.ts +531 -0
- package/src/src/apis/index.ts +3 -0
- package/src/src/models/AddOrganizationMemberRequest.ts +74 -0
- package/src/src/models/CreateOrganizationRequest.ts +82 -0
- package/src/src/models/InboundAttachmentUrlResponse.ts +88 -0
- package/src/src/models/InboundAttachmentUrlResponseData.ts +81 -0
- package/src/src/models/InboundEmail.ts +247 -0
- package/src/src/models/InboundEmailAttachment.ts +89 -0
- package/src/src/models/InboundEmailFrom.ts +73 -0
- package/src/src/models/InboundEmailListResponse.ts +88 -0
- package/src/src/models/InboundEmailListResponseMeta.ts +89 -0
- package/src/src/models/InboundEmailResponse.ts +88 -0
- package/src/src/models/LoginRequest.ts +12 -0
- package/src/src/models/Organization.ts +137 -0
- package/src/src/models/OrganizationListResponse.ts +90 -0
- package/src/src/models/OrganizationListResponseMeta.ts +73 -0
- package/src/src/models/OrganizationMembersListResponse.ts +90 -0
- package/src/src/models/OrganizationMembership.ts +119 -0
- package/src/src/models/OrganizationMembershipResponse.ts +90 -0
- package/src/src/models/OrganizationMembershipWithUser.ts +135 -0
- package/src/src/models/OrganizationResponse.ts +90 -0
- package/src/src/models/RegisterRequest.ts +23 -0
- package/src/src/models/SetDomainInboundRequest.ts +65 -0
- package/src/src/models/SwitchOrganizationRequest.ts +75 -0
- package/src/src/models/SwitchOrganizationResponse.ts +90 -0
- package/src/src/models/SwitchOrganizationResponseData.ts +99 -0
- package/src/src/models/SwitchOrganizationResponseDataTokens.ts +103 -0
- package/src/src/models/SwitchOrganizationResponseDataUser.ts +73 -0
- package/src/src/models/UpdateOrganizationMemberRoleRequest.ts +66 -0
- package/src/src/models/UpdateOrganizationRequest.ts +81 -0
- package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +105 -0
- package/src/src/models/index.ts +27 -0
|
@@ -0,0 +1,82 @@
|
|
|
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 CreateOrganizationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateOrganizationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateOrganizationRequest
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional human-friendly identifier, unique per environment when present.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateOrganizationRequest
|
|
32
|
+
*/
|
|
33
|
+
slug?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Integrator-owned opaque JSON.
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof CreateOrganizationRequest
|
|
38
|
+
*/
|
|
39
|
+
metadata?: object;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CreateOrganizationRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCreateOrganizationRequest(value: object): value is CreateOrganizationRequest {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CreateOrganizationRequestFromJSON(json: any): CreateOrganizationRequest {
|
|
51
|
+
return CreateOrganizationRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CreateOrganizationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrganizationRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'name': json['name'],
|
|
61
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
62
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CreateOrganizationRequestToJSON(json: any): CreateOrganizationRequest {
|
|
67
|
+
return CreateOrganizationRequestToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CreateOrganizationRequestToJSONTyped(value?: CreateOrganizationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'name': value['name'],
|
|
78
|
+
'slug': value['slug'],
|
|
79
|
+
'metadata': value['metadata'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { InboundAttachmentUrlResponseData } from './InboundAttachmentUrlResponseData';
|
|
17
|
+
import {
|
|
18
|
+
InboundAttachmentUrlResponseDataFromJSON,
|
|
19
|
+
InboundAttachmentUrlResponseDataFromJSONTyped,
|
|
20
|
+
InboundAttachmentUrlResponseDataToJSON,
|
|
21
|
+
InboundAttachmentUrlResponseDataToJSONTyped,
|
|
22
|
+
} from './InboundAttachmentUrlResponseData';
|
|
23
|
+
import type { RequestMeta } from './RequestMeta';
|
|
24
|
+
import {
|
|
25
|
+
RequestMetaFromJSON,
|
|
26
|
+
RequestMetaFromJSONTyped,
|
|
27
|
+
RequestMetaToJSON,
|
|
28
|
+
RequestMetaToJSONTyped,
|
|
29
|
+
} from './RequestMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface InboundAttachmentUrlResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface InboundAttachmentUrlResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {InboundAttachmentUrlResponseData}
|
|
40
|
+
* @memberof InboundAttachmentUrlResponse
|
|
41
|
+
*/
|
|
42
|
+
data?: InboundAttachmentUrlResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {RequestMeta}
|
|
46
|
+
* @memberof InboundAttachmentUrlResponse
|
|
47
|
+
*/
|
|
48
|
+
meta?: RequestMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the InboundAttachmentUrlResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfInboundAttachmentUrlResponse(value: object): value is InboundAttachmentUrlResponse {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function InboundAttachmentUrlResponseFromJSON(json: any): InboundAttachmentUrlResponse {
|
|
59
|
+
return InboundAttachmentUrlResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function InboundAttachmentUrlResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundAttachmentUrlResponse {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : InboundAttachmentUrlResponseDataFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function InboundAttachmentUrlResponseToJSON(json: any): InboundAttachmentUrlResponse {
|
|
74
|
+
return InboundAttachmentUrlResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function InboundAttachmentUrlResponseToJSONTyped(value?: InboundAttachmentUrlResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': InboundAttachmentUrlResponseDataToJSON(value['data']),
|
|
85
|
+
'meta': RequestMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface InboundAttachmentUrlResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface InboundAttachmentUrlResponseData {
|
|
22
|
+
/**
|
|
23
|
+
* Short-lived presigned S3 download URL
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
26
|
+
*/
|
|
27
|
+
downloadUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
32
|
+
*/
|
|
33
|
+
filename?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof InboundAttachmentUrlResponseData
|
|
38
|
+
*/
|
|
39
|
+
contentType?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the InboundAttachmentUrlResponseData interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfInboundAttachmentUrlResponseData(value: object): value is InboundAttachmentUrlResponseData {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function InboundAttachmentUrlResponseDataFromJSON(json: any): InboundAttachmentUrlResponseData {
|
|
50
|
+
return InboundAttachmentUrlResponseDataFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function InboundAttachmentUrlResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InboundAttachmentUrlResponseData {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'downloadUrl': json['download_url'] == null ? undefined : json['download_url'],
|
|
60
|
+
'filename': json['filename'] == null ? undefined : json['filename'],
|
|
61
|
+
'contentType': json['content_type'] == null ? undefined : json['content_type'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function InboundAttachmentUrlResponseDataToJSON(json: any): InboundAttachmentUrlResponseData {
|
|
66
|
+
return InboundAttachmentUrlResponseDataToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function InboundAttachmentUrlResponseDataToJSONTyped(value?: InboundAttachmentUrlResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'download_url': value['downloadUrl'],
|
|
77
|
+
'filename': value['filename'],
|
|
78
|
+
'content_type': value['contentType'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -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
|
+
|