@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,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 { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
|
|
24
|
+
import {
|
|
25
|
+
GetDomain200ResponseMetaFromJSON,
|
|
26
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
27
|
+
GetDomain200ResponseMetaToJSON,
|
|
28
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
29
|
+
} from './GetDomain200ResponseMeta';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface OrganizationResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface OrganizationResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Organization}
|
|
40
|
+
* @memberof OrganizationResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Organization;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof OrganizationResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the OrganizationResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfOrganizationResponse(value: object): value is OrganizationResponse {
|
|
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 OrganizationResponseFromJSON(json: any): OrganizationResponse {
|
|
61
|
+
return OrganizationResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function OrganizationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': OrganizationFromJSON(json['data']),
|
|
71
|
+
'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function OrganizationResponseToJSON(json: any): OrganizationResponse {
|
|
76
|
+
return OrganizationResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function OrganizationResponseToJSONTyped(value?: OrganizationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': OrganizationToJSON(value['data']),
|
|
87
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -43,6 +43,25 @@ export interface RegisterRequest {
|
|
|
43
43
|
* @memberof RegisterRequest
|
|
44
44
|
*/
|
|
45
45
|
metadata?: { [key: string]: any; };
|
|
46
|
+
/**
|
|
47
|
+
* Optional organization to add the new user to atomically (sc-5591).
|
|
48
|
+
* If specified, registration adds the new user as a member of this
|
|
49
|
+
* org in the same flow; the resulting token's org_id is set to it.
|
|
50
|
+
* Membership is Zyphr-attested at mint time. Requires Pro/Enterprise.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof RegisterRequest
|
|
53
|
+
*/
|
|
54
|
+
organizationId?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Optional role label to attach to the membership created by
|
|
57
|
+
* organization_id. Opaque to Zyphr — your application interprets it
|
|
58
|
+
* (e.g. "owner", "admin", "member"). Ignored when organization_id is
|
|
59
|
+
* absent. When omitted, the membership is created with role=null
|
|
60
|
+
* (set later via PATCH organizations/:id/members/:user_id).
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof RegisterRequest
|
|
63
|
+
*/
|
|
64
|
+
organizationRole?: string;
|
|
46
65
|
}
|
|
47
66
|
|
|
48
67
|
/**
|
|
@@ -68,6 +87,8 @@ export function RegisterRequestFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
68
87
|
'password': json['password'],
|
|
69
88
|
'name': json['name'] == null ? undefined : json['name'],
|
|
70
89
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
90
|
+
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
91
|
+
'organizationRole': json['organization_role'] == null ? undefined : json['organization_role'],
|
|
71
92
|
};
|
|
72
93
|
}
|
|
73
94
|
|
|
@@ -86,6 +107,8 @@ export function RegisterRequestToJSONTyped(value?: RegisterRequest | null, ignor
|
|
|
86
107
|
'password': value['password'],
|
|
87
108
|
'name': value['name'],
|
|
88
109
|
'metadata': value['metadata'],
|
|
110
|
+
'organization_id': value['organizationId'],
|
|
111
|
+
'organization_role': value['organizationRole'],
|
|
89
112
|
};
|
|
90
113
|
}
|
|
91
114
|
|
|
@@ -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 SwitchOrganizationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SwitchOrganizationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SwitchOrganizationRequest
|
|
26
|
+
*/
|
|
27
|
+
refreshToken: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SwitchOrganizationRequest
|
|
32
|
+
*/
|
|
33
|
+
organizationId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the SwitchOrganizationRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfSwitchOrganizationRequest(value: object): value is SwitchOrganizationRequest {
|
|
40
|
+
if (!('refreshToken' in value) || value['refreshToken'] === undefined) return false;
|
|
41
|
+
if (!('organizationId' in value) || value['organizationId'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function SwitchOrganizationRequestFromJSON(json: any): SwitchOrganizationRequest {
|
|
46
|
+
return SwitchOrganizationRequestFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function SwitchOrganizationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwitchOrganizationRequest {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'refreshToken': json['refresh_token'],
|
|
56
|
+
'organizationId': json['organization_id'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SwitchOrganizationRequestToJSON(json: any): SwitchOrganizationRequest {
|
|
61
|
+
return SwitchOrganizationRequestToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SwitchOrganizationRequestToJSONTyped(value?: SwitchOrganizationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'refresh_token': value['refreshToken'],
|
|
72
|
+
'organization_id': value['organizationId'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -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 { SwitchOrganizationResponseData } from './SwitchOrganizationResponseData';
|
|
24
|
+
import {
|
|
25
|
+
SwitchOrganizationResponseDataFromJSON,
|
|
26
|
+
SwitchOrganizationResponseDataFromJSONTyped,
|
|
27
|
+
SwitchOrganizationResponseDataToJSON,
|
|
28
|
+
SwitchOrganizationResponseDataToJSONTyped,
|
|
29
|
+
} from './SwitchOrganizationResponseData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface SwitchOrganizationResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface SwitchOrganizationResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {SwitchOrganizationResponseData}
|
|
40
|
+
* @memberof SwitchOrganizationResponse
|
|
41
|
+
*/
|
|
42
|
+
data: SwitchOrganizationResponseData;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof SwitchOrganizationResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the SwitchOrganizationResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfSwitchOrganizationResponse(value: object): value is SwitchOrganizationResponse {
|
|
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 SwitchOrganizationResponseFromJSON(json: any): SwitchOrganizationResponse {
|
|
61
|
+
return SwitchOrganizationResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SwitchOrganizationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwitchOrganizationResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': SwitchOrganizationResponseDataFromJSON(json['data']),
|
|
71
|
+
'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function SwitchOrganizationResponseToJSON(json: any): SwitchOrganizationResponse {
|
|
76
|
+
return SwitchOrganizationResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function SwitchOrganizationResponseToJSONTyped(value?: SwitchOrganizationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': SwitchOrganizationResponseDataToJSON(value['data']),
|
|
87
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { SwitchOrganizationResponseDataUser } from './SwitchOrganizationResponseDataUser';
|
|
17
|
+
import {
|
|
18
|
+
SwitchOrganizationResponseDataUserFromJSON,
|
|
19
|
+
SwitchOrganizationResponseDataUserFromJSONTyped,
|
|
20
|
+
SwitchOrganizationResponseDataUserToJSON,
|
|
21
|
+
SwitchOrganizationResponseDataUserToJSONTyped,
|
|
22
|
+
} from './SwitchOrganizationResponseDataUser';
|
|
23
|
+
import type { SwitchOrganizationResponseDataTokens } from './SwitchOrganizationResponseDataTokens';
|
|
24
|
+
import {
|
|
25
|
+
SwitchOrganizationResponseDataTokensFromJSON,
|
|
26
|
+
SwitchOrganizationResponseDataTokensFromJSONTyped,
|
|
27
|
+
SwitchOrganizationResponseDataTokensToJSON,
|
|
28
|
+
SwitchOrganizationResponseDataTokensToJSONTyped,
|
|
29
|
+
} from './SwitchOrganizationResponseDataTokens';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface SwitchOrganizationResponseData
|
|
35
|
+
*/
|
|
36
|
+
export interface SwitchOrganizationResponseData {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {SwitchOrganizationResponseDataTokens}
|
|
40
|
+
* @memberof SwitchOrganizationResponseData
|
|
41
|
+
*/
|
|
42
|
+
tokens: SwitchOrganizationResponseDataTokens;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof SwitchOrganizationResponseData
|
|
47
|
+
*/
|
|
48
|
+
organizationId: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {SwitchOrganizationResponseDataUser}
|
|
52
|
+
* @memberof SwitchOrganizationResponseData
|
|
53
|
+
*/
|
|
54
|
+
user: SwitchOrganizationResponseDataUser;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the SwitchOrganizationResponseData interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfSwitchOrganizationResponseData(value: object): value is SwitchOrganizationResponseData {
|
|
61
|
+
if (!('tokens' in value) || value['tokens'] === undefined) return false;
|
|
62
|
+
if (!('organizationId' in value) || value['organizationId'] === undefined) return false;
|
|
63
|
+
if (!('user' in value) || value['user'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function SwitchOrganizationResponseDataFromJSON(json: any): SwitchOrganizationResponseData {
|
|
68
|
+
return SwitchOrganizationResponseDataFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function SwitchOrganizationResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwitchOrganizationResponseData {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'tokens': SwitchOrganizationResponseDataTokensFromJSON(json['tokens']),
|
|
78
|
+
'organizationId': json['organization_id'],
|
|
79
|
+
'user': SwitchOrganizationResponseDataUserFromJSON(json['user']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SwitchOrganizationResponseDataToJSON(json: any): SwitchOrganizationResponseData {
|
|
84
|
+
return SwitchOrganizationResponseDataToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function SwitchOrganizationResponseDataToJSONTyped(value?: SwitchOrganizationResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'tokens': SwitchOrganizationResponseDataTokensToJSON(value['tokens']),
|
|
95
|
+
'organization_id': value['organizationId'],
|
|
96
|
+
'user': SwitchOrganizationResponseDataUserToJSON(value['user']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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 SwitchOrganizationResponseDataTokens
|
|
20
|
+
*/
|
|
21
|
+
export interface SwitchOrganizationResponseDataTokens {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SwitchOrganizationResponseDataTokens
|
|
26
|
+
*/
|
|
27
|
+
accessToken: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SwitchOrganizationResponseDataTokens
|
|
32
|
+
*/
|
|
33
|
+
refreshToken: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SwitchOrganizationResponseDataTokens
|
|
38
|
+
*/
|
|
39
|
+
expiresIn: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SwitchOrganizationResponseDataTokens
|
|
44
|
+
*/
|
|
45
|
+
tokenType: SwitchOrganizationResponseDataTokensTokenTypeEnum;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const SwitchOrganizationResponseDataTokensTokenTypeEnum = {
|
|
53
|
+
BEARER: 'Bearer'
|
|
54
|
+
} as const;
|
|
55
|
+
export type SwitchOrganizationResponseDataTokensTokenTypeEnum = typeof SwitchOrganizationResponseDataTokensTokenTypeEnum[keyof typeof SwitchOrganizationResponseDataTokensTokenTypeEnum];
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the SwitchOrganizationResponseDataTokens interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfSwitchOrganizationResponseDataTokens(value: object): value is SwitchOrganizationResponseDataTokens {
|
|
62
|
+
if (!('accessToken' in value) || value['accessToken'] === undefined) return false;
|
|
63
|
+
if (!('refreshToken' in value) || value['refreshToken'] === undefined) return false;
|
|
64
|
+
if (!('expiresIn' in value) || value['expiresIn'] === undefined) return false;
|
|
65
|
+
if (!('tokenType' in value) || value['tokenType'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function SwitchOrganizationResponseDataTokensFromJSON(json: any): SwitchOrganizationResponseDataTokens {
|
|
70
|
+
return SwitchOrganizationResponseDataTokensFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function SwitchOrganizationResponseDataTokensFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwitchOrganizationResponseDataTokens {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'accessToken': json['access_token'],
|
|
80
|
+
'refreshToken': json['refresh_token'],
|
|
81
|
+
'expiresIn': json['expires_in'],
|
|
82
|
+
'tokenType': json['token_type'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function SwitchOrganizationResponseDataTokensToJSON(json: any): SwitchOrganizationResponseDataTokens {
|
|
87
|
+
return SwitchOrganizationResponseDataTokensToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function SwitchOrganizationResponseDataTokensToJSONTyped(value?: SwitchOrganizationResponseDataTokens | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'access_token': value['accessToken'],
|
|
98
|
+
'refresh_token': value['refreshToken'],
|
|
99
|
+
'expires_in': value['expiresIn'],
|
|
100
|
+
'token_type': value['tokenType'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
@@ -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 SwitchOrganizationResponseDataUser
|
|
20
|
+
*/
|
|
21
|
+
export interface SwitchOrganizationResponseDataUser {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SwitchOrganizationResponseDataUser
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SwitchOrganizationResponseDataUser
|
|
32
|
+
*/
|
|
33
|
+
email?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the SwitchOrganizationResponseDataUser interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfSwitchOrganizationResponseDataUser(value: object): value is SwitchOrganizationResponseDataUser {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function SwitchOrganizationResponseDataUserFromJSON(json: any): SwitchOrganizationResponseDataUser {
|
|
44
|
+
return SwitchOrganizationResponseDataUserFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function SwitchOrganizationResponseDataUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwitchOrganizationResponseDataUser {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
54
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function SwitchOrganizationResponseDataUserToJSON(json: any): SwitchOrganizationResponseDataUser {
|
|
59
|
+
return SwitchOrganizationResponseDataUserToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SwitchOrganizationResponseDataUserToJSONTyped(value?: SwitchOrganizationResponseDataUser | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'id': value['id'],
|
|
70
|
+
'email': value['email'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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 UpdateOrganizationMemberRoleRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateOrganizationMemberRoleRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UpdateOrganizationMemberRoleRequest
|
|
26
|
+
*/
|
|
27
|
+
role: string | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the UpdateOrganizationMemberRoleRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfUpdateOrganizationMemberRoleRequest(value: object): value is UpdateOrganizationMemberRoleRequest {
|
|
34
|
+
if (!('role' in value) || value['role'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UpdateOrganizationMemberRoleRequestFromJSON(json: any): UpdateOrganizationMemberRoleRequest {
|
|
39
|
+
return UpdateOrganizationMemberRoleRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function UpdateOrganizationMemberRoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrganizationMemberRoleRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'role': json['role'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function UpdateOrganizationMemberRoleRequestToJSON(json: any): UpdateOrganizationMemberRoleRequest {
|
|
53
|
+
return UpdateOrganizationMemberRoleRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function UpdateOrganizationMemberRoleRequestToJSONTyped(value?: UpdateOrganizationMemberRoleRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'role': value['role'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|