@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,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
|
+
|
|
@@ -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
|
+
|
|
@@ -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 { Organization } from './Organization';
|
|
17
|
+
import {
|
|
18
|
+
OrganizationFromJSON,
|
|
19
|
+
OrganizationFromJSONTyped,
|
|
20
|
+
OrganizationToJSON,
|
|
21
|
+
OrganizationToJSONTyped,
|
|
22
|
+
} from './Organization';
|
|
23
|
+
import type { OrganizationListResponseMeta } from './OrganizationListResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
OrganizationListResponseMetaFromJSON,
|
|
26
|
+
OrganizationListResponseMetaFromJSONTyped,
|
|
27
|
+
OrganizationListResponseMetaToJSON,
|
|
28
|
+
OrganizationListResponseMetaToJSONTyped,
|
|
29
|
+
} from './OrganizationListResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface OrganizationListResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface OrganizationListResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<Organization>}
|
|
40
|
+
* @memberof OrganizationListResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<Organization>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {OrganizationListResponseMeta}
|
|
46
|
+
* @memberof OrganizationListResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: OrganizationListResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the OrganizationListResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfOrganizationListResponse(value: object): value is OrganizationListResponse {
|
|
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 OrganizationListResponseFromJSON(json: any): OrganizationListResponse {
|
|
61
|
+
return OrganizationListResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function OrganizationListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationListResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(OrganizationFromJSON)),
|
|
71
|
+
'meta': OrganizationListResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function OrganizationListResponseToJSON(json: any): OrganizationListResponse {
|
|
76
|
+
return OrganizationListResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function OrganizationListResponseToJSONTyped(value?: OrganizationListResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(OrganizationToJSON)),
|
|
87
|
+
'meta': OrganizationListResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -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 OrganizationListResponseMeta
|
|
20
|
+
*/
|
|
21
|
+
export interface OrganizationListResponseMeta {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OrganizationListResponseMeta
|
|
26
|
+
*/
|
|
27
|
+
requestId?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OrganizationListResponseMeta
|
|
32
|
+
*/
|
|
33
|
+
nextCursor?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the OrganizationListResponseMeta interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfOrganizationListResponseMeta(value: object): value is OrganizationListResponseMeta {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function OrganizationListResponseMetaFromJSON(json: any): OrganizationListResponseMeta {
|
|
44
|
+
return OrganizationListResponseMetaFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function OrganizationListResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationListResponseMeta {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'requestId': json['request_id'] == null ? undefined : json['request_id'],
|
|
54
|
+
'nextCursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function OrganizationListResponseMetaToJSON(json: any): OrganizationListResponseMeta {
|
|
59
|
+
return OrganizationListResponseMetaToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function OrganizationListResponseMetaToJSONTyped(value?: OrganizationListResponseMeta | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'request_id': value['requestId'],
|
|
70
|
+
'next_cursor': value['nextCursor'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|