@zyphr-dev/node-sdk 0.1.31 → 0.1.33
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 +2204 -157
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2214 -145
- package/dist/index.d.ts +2214 -145
- package/dist/index.js +2066 -157
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +28 -0
- package/src/client.ts +5 -0
- package/src/src/apis/AuthOrganizationsApi.ts +823 -0
- package/src/src/apis/AuthUserProfileApi.ts +62 -0
- package/src/src/apis/DomainsApi.ts +248 -0
- package/src/src/apis/MuseApi.ts +531 -0
- package/src/src/apis/index.ts +2 -0
- package/src/src/models/AddOrganizationMemberRequest.ts +74 -0
- package/src/src/models/CreateOrganizationRequest.ts +82 -0
- package/src/src/models/DeleteDomainResponse.ts +90 -0
- package/src/src/models/DeleteDomainResponseData.ts +75 -0
- package/src/src/models/DomainResponse.ts +47 -1
- package/src/src/models/GetDomain200Response.ts +88 -0
- package/src/src/models/GetDomain200ResponseMeta.ts +65 -0
- package/src/src/models/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/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/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 +26 -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,90 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
|
|
17
|
+
import {
|
|
18
|
+
GetDomain200ResponseMetaFromJSON,
|
|
19
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
20
|
+
GetDomain200ResponseMetaToJSON,
|
|
21
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
22
|
+
} from './GetDomain200ResponseMeta';
|
|
23
|
+
import type { DeleteDomainResponseData } from './DeleteDomainResponseData';
|
|
24
|
+
import {
|
|
25
|
+
DeleteDomainResponseDataFromJSON,
|
|
26
|
+
DeleteDomainResponseDataFromJSONTyped,
|
|
27
|
+
DeleteDomainResponseDataToJSON,
|
|
28
|
+
DeleteDomainResponseDataToJSONTyped,
|
|
29
|
+
} from './DeleteDomainResponseData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface DeleteDomainResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface DeleteDomainResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DeleteDomainResponseData}
|
|
40
|
+
* @memberof DeleteDomainResponse
|
|
41
|
+
*/
|
|
42
|
+
data: DeleteDomainResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof DeleteDomainResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the DeleteDomainResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfDeleteDomainResponse(value: object): value is DeleteDomainResponse {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function DeleteDomainResponseFromJSON(json: any): DeleteDomainResponse {
|
|
61
|
+
return DeleteDomainResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DeleteDomainResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': DeleteDomainResponseDataFromJSON(json['data']),
|
|
71
|
+
'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function DeleteDomainResponseToJSON(json: any): DeleteDomainResponse {
|
|
76
|
+
return DeleteDomainResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function DeleteDomainResponseToJSONTyped(value?: DeleteDomainResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': DeleteDomainResponseDataToJSON(value['data']),
|
|
87
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DeleteDomainResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface DeleteDomainResponseData {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DeleteDomainResponseData
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof DeleteDomainResponseData
|
|
32
|
+
*/
|
|
33
|
+
deleted: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the DeleteDomainResponseData interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfDeleteDomainResponseData(value: object): value is DeleteDomainResponseData {
|
|
40
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
41
|
+
if (!('deleted' in value) || value['deleted'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DeleteDomainResponseDataFromJSON(json: any): DeleteDomainResponseData {
|
|
46
|
+
return DeleteDomainResponseDataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DeleteDomainResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainResponseData {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'deleted': json['deleted'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function DeleteDomainResponseDataToJSON(json: any): DeleteDomainResponseData {
|
|
61
|
+
return DeleteDomainResponseDataToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DeleteDomainResponseDataToJSONTyped(value?: DeleteDomainResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'id': value['id'],
|
|
72
|
+
'deleted': value['deleted'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -70,7 +70,25 @@ export interface DomainResponse {
|
|
|
70
70
|
*/
|
|
71
71
|
verificationToken?: string;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* AWS SES identity-verification sub-status. Surfaced so callers can
|
|
74
|
+
* see WHY top-level `status` is still `pending` when all DNS records
|
|
75
|
+
* report `verified: true` — typically because SES DKIM propagation
|
|
76
|
+
* hasn't completed yet (can take a few minutes after DNS records
|
|
77
|
+
* land). Top-level `status` only flips to `verified` once both this
|
|
78
|
+
* and `ses_dkim_status` are `success`.
|
|
79
|
+
*
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof DomainResponse
|
|
82
|
+
*/
|
|
83
|
+
sesIdentityStatus?: DomainResponseSesIdentityStatusEnum;
|
|
84
|
+
/**
|
|
85
|
+
* AWS SES DKIM verification sub-status. See `ses_identity_status`.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof DomainResponse
|
|
88
|
+
*/
|
|
89
|
+
sesDkimStatus?: DomainResponseSesDkimStatusEnum;
|
|
90
|
+
/**
|
|
91
|
+
* Timestamp when verification first succeeded. Cleared to null if status later reverts away from `verified` (e.g. DNS records observed but SES DKIM not yet propagated).
|
|
74
92
|
* @type {Date}
|
|
75
93
|
* @memberof DomainResponse
|
|
76
94
|
*/
|
|
@@ -107,6 +125,30 @@ export const DomainResponseStatusEnum = {
|
|
|
107
125
|
} as const;
|
|
108
126
|
export type DomainResponseStatusEnum = typeof DomainResponseStatusEnum[keyof typeof DomainResponseStatusEnum];
|
|
109
127
|
|
|
128
|
+
/**
|
|
129
|
+
* @export
|
|
130
|
+
*/
|
|
131
|
+
export const DomainResponseSesIdentityStatusEnum = {
|
|
132
|
+
PENDING: 'pending',
|
|
133
|
+
SUCCESS: 'success',
|
|
134
|
+
FAILED: 'failed',
|
|
135
|
+
TEMPORARY_FAILURE: 'temporary_failure',
|
|
136
|
+
NOT_STARTED: 'not_started'
|
|
137
|
+
} as const;
|
|
138
|
+
export type DomainResponseSesIdentityStatusEnum = typeof DomainResponseSesIdentityStatusEnum[keyof typeof DomainResponseSesIdentityStatusEnum];
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @export
|
|
142
|
+
*/
|
|
143
|
+
export const DomainResponseSesDkimStatusEnum = {
|
|
144
|
+
PENDING: 'pending',
|
|
145
|
+
SUCCESS: 'success',
|
|
146
|
+
FAILED: 'failed',
|
|
147
|
+
TEMPORARY_FAILURE: 'temporary_failure',
|
|
148
|
+
NOT_STARTED: 'not_started'
|
|
149
|
+
} as const;
|
|
150
|
+
export type DomainResponseSesDkimStatusEnum = typeof DomainResponseSesDkimStatusEnum[keyof typeof DomainResponseSesDkimStatusEnum];
|
|
151
|
+
|
|
110
152
|
|
|
111
153
|
/**
|
|
112
154
|
* Check if a given object implements the DomainResponse interface.
|
|
@@ -139,6 +181,8 @@ export function DomainResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
139
181
|
'recordsVerified': json['records_verified'],
|
|
140
182
|
'recordsTotal': json['records_total'],
|
|
141
183
|
'verificationToken': json['verification_token'] == null ? undefined : json['verification_token'],
|
|
184
|
+
'sesIdentityStatus': json['ses_identity_status'] == null ? undefined : json['ses_identity_status'],
|
|
185
|
+
'sesDkimStatus': json['ses_dkim_status'] == null ? undefined : json['ses_dkim_status'],
|
|
142
186
|
'verifiedAt': json['verified_at'] == null ? undefined : (new Date(json['verified_at'])),
|
|
143
187
|
'lastCheckedAt': json['last_checked_at'] == null ? undefined : (new Date(json['last_checked_at'])),
|
|
144
188
|
'createdAt': (new Date(json['created_at'])),
|
|
@@ -164,6 +208,8 @@ export function DomainResponseToJSONTyped(value?: DomainResponse | null, ignoreD
|
|
|
164
208
|
'records_verified': value['recordsVerified'],
|
|
165
209
|
'records_total': value['recordsTotal'],
|
|
166
210
|
'verification_token': value['verificationToken'],
|
|
211
|
+
'ses_identity_status': value['sesIdentityStatus'],
|
|
212
|
+
'ses_dkim_status': value['sesDkimStatus'],
|
|
167
213
|
'verified_at': value['verifiedAt'] == null ? undefined : ((value['verifiedAt'] as any).toISOString()),
|
|
168
214
|
'last_checked_at': value['lastCheckedAt'] == null ? undefined : ((value['lastCheckedAt'] as any).toISOString()),
|
|
169
215
|
'created_at': ((value['createdAt']).toISOString()),
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DomainResponse } from './DomainResponse';
|
|
17
|
+
import {
|
|
18
|
+
DomainResponseFromJSON,
|
|
19
|
+
DomainResponseFromJSONTyped,
|
|
20
|
+
DomainResponseToJSON,
|
|
21
|
+
DomainResponseToJSONTyped,
|
|
22
|
+
} from './DomainResponse';
|
|
23
|
+
import type { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
GetDomain200ResponseMetaFromJSON,
|
|
26
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
27
|
+
GetDomain200ResponseMetaToJSON,
|
|
28
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './GetDomain200ResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface GetDomain200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface GetDomain200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DomainResponse}
|
|
40
|
+
* @memberof GetDomain200Response
|
|
41
|
+
*/
|
|
42
|
+
data?: DomainResponse;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof GetDomain200Response
|
|
47
|
+
*/
|
|
48
|
+
meta?: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the GetDomain200Response interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfGetDomain200Response(value: object): value is GetDomain200Response {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GetDomain200ResponseFromJSON(json: any): GetDomain200Response {
|
|
59
|
+
return GetDomain200ResponseFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function GetDomain200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetDomain200Response {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'data': json['data'] == null ? undefined : DomainResponseFromJSON(json['data']),
|
|
69
|
+
'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function GetDomain200ResponseToJSON(json: any): GetDomain200Response {
|
|
74
|
+
return GetDomain200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function GetDomain200ResponseToJSONTyped(value?: GetDomain200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': DomainResponseToJSON(value['data']),
|
|
85
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -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
|
+
|
|
@@ -37,6 +37,16 @@ export interface LoginRequest {
|
|
|
37
37
|
* @memberof LoginRequest
|
|
38
38
|
*/
|
|
39
39
|
customClaims?: { [key: string]: any; };
|
|
40
|
+
/**
|
|
41
|
+
* Optional active organization for the resulting token (sc-5591).
|
|
42
|
+
* If specified the user must be a member; the token's org_id is set
|
|
43
|
+
* to it. If omitted and the user has 0 or 1 non-Default memberships,
|
|
44
|
+
* org_id is auto-populated. If 2+ memberships, omit and call
|
|
45
|
+
* switchOrganization to pick. Requires Pro/Enterprise.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof LoginRequest
|
|
48
|
+
*/
|
|
49
|
+
organizationId?: string;
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
/**
|
|
@@ -61,6 +71,7 @@ export function LoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
61
71
|
'email': json['email'],
|
|
62
72
|
'password': json['password'],
|
|
63
73
|
'customClaims': json['custom_claims'] == null ? undefined : json['custom_claims'],
|
|
74
|
+
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
|
|
@@ -78,6 +89,7 @@ export function LoginRequestToJSONTyped(value?: LoginRequest | null, ignoreDiscr
|
|
|
78
89
|
'email': value['email'],
|
|
79
90
|
'password': value['password'],
|
|
80
91
|
'custom_claims': value['customClaims'],
|
|
92
|
+
'organization_id': value['organizationId'],
|
|
81
93
|
};
|
|
82
94
|
}
|
|
83
95
|
|
|
@@ -0,0 +1,137 @@
|
|
|
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 sub-tenant inside an Auth application × environment.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Organization
|
|
20
|
+
*/
|
|
21
|
+
export interface Organization {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Organization
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Organization
|
|
32
|
+
*/
|
|
33
|
+
applicationId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Organization
|
|
38
|
+
*/
|
|
39
|
+
environmentId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Organization
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
* Optional human-friendly identifier, unique per environment when present.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Organization
|
|
50
|
+
*/
|
|
51
|
+
slug?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {{ [key: string]: any; }}
|
|
55
|
+
* @memberof Organization
|
|
56
|
+
*/
|
|
57
|
+
metadata: { [key: string]: any; };
|
|
58
|
+
/**
|
|
59
|
+
* True for the auto-created Default org per environment. Cannot be renamed or deleted via API.
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof Organization
|
|
62
|
+
*/
|
|
63
|
+
isDefault: boolean;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Date}
|
|
67
|
+
* @memberof Organization
|
|
68
|
+
*/
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof Organization
|
|
74
|
+
*/
|
|
75
|
+
updatedAt: Date;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the Organization interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfOrganization(value: object): value is Organization {
|
|
82
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
83
|
+
if (!('applicationId' in value) || value['applicationId'] === undefined) return false;
|
|
84
|
+
if (!('environmentId' in value) || value['environmentId'] === undefined) return false;
|
|
85
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
86
|
+
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
87
|
+
if (!('isDefault' in value) || value['isDefault'] === undefined) return false;
|
|
88
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
89
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function OrganizationFromJSON(json: any): Organization {
|
|
94
|
+
return OrganizationFromJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function OrganizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organization {
|
|
98
|
+
if (json == null) {
|
|
99
|
+
return json;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'id': json['id'],
|
|
104
|
+
'applicationId': json['application_id'],
|
|
105
|
+
'environmentId': json['environment_id'],
|
|
106
|
+
'name': json['name'],
|
|
107
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
108
|
+
'metadata': json['metadata'],
|
|
109
|
+
'isDefault': json['is_default'],
|
|
110
|
+
'createdAt': (new Date(json['created_at'])),
|
|
111
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function OrganizationToJSON(json: any): Organization {
|
|
116
|
+
return OrganizationToJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function OrganizationToJSONTyped(value?: Organization | null, ignoreDiscriminator: boolean = false): any {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'id': value['id'],
|
|
127
|
+
'application_id': value['applicationId'],
|
|
128
|
+
'environment_id': value['environmentId'],
|
|
129
|
+
'name': value['name'],
|
|
130
|
+
'slug': value['slug'],
|
|
131
|
+
'metadata': value['metadata'],
|
|
132
|
+
'is_default': value['isDefault'],
|
|
133
|
+
'created_at': ((value['createdAt']).toISOString()),
|
|
134
|
+
'updated_at': ((value['updatedAt']).toISOString()),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|