@zyphr-dev/node-sdk 0.1.32 → 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 +1624 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1780 -237
- package/dist/index.d.ts +1780 -237
- package/dist/index.js +1530 -84
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +20 -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/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/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/index.ts +18 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UpdateOrganizationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateOrganizationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UpdateOrganizationRequest
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UpdateOrganizationRequest
|
|
32
|
+
*/
|
|
33
|
+
slug?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof UpdateOrganizationRequest
|
|
38
|
+
*/
|
|
39
|
+
metadata?: object;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the UpdateOrganizationRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUpdateOrganizationRequest(value: object): value is UpdateOrganizationRequest {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function UpdateOrganizationRequestFromJSON(json: any): UpdateOrganizationRequest {
|
|
50
|
+
return UpdateOrganizationRequestFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UpdateOrganizationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrganizationRequest {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
60
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
61
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function UpdateOrganizationRequestToJSON(json: any): UpdateOrganizationRequest {
|
|
66
|
+
return UpdateOrganizationRequestToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function UpdateOrganizationRequestToJSONTyped(value?: UpdateOrganizationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'name': value['name'],
|
|
77
|
+
'slug': value['slug'],
|
|
78
|
+
'metadata': value['metadata'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
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 V1MuseSubjectsSuggestPostRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface V1MuseSubjectsSuggestPostRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Optional template id. When provided, the route resolves the
|
|
24
|
+
* template body server-side. Cannot be combined with template_body.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof V1MuseSubjectsSuggestPostRequest
|
|
27
|
+
*/
|
|
28
|
+
templateId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional raw template body. Empty/missing is allowed —
|
|
31
|
+
* the prompt handles sparse input by falling back to channel
|
|
32
|
+
* best-practices.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof V1MuseSubjectsSuggestPostRequest
|
|
35
|
+
*/
|
|
36
|
+
templateBody?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof V1MuseSubjectsSuggestPostRequest
|
|
41
|
+
*/
|
|
42
|
+
channel: V1MuseSubjectsSuggestPostRequestChannelEnum;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof V1MuseSubjectsSuggestPostRequest
|
|
47
|
+
*/
|
|
48
|
+
projectId: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export const V1MuseSubjectsSuggestPostRequestChannelEnum = {
|
|
56
|
+
EMAIL: 'email',
|
|
57
|
+
PUSH: 'push'
|
|
58
|
+
} as const;
|
|
59
|
+
export type V1MuseSubjectsSuggestPostRequestChannelEnum = typeof V1MuseSubjectsSuggestPostRequestChannelEnum[keyof typeof V1MuseSubjectsSuggestPostRequestChannelEnum];
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the V1MuseSubjectsSuggestPostRequest interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfV1MuseSubjectsSuggestPostRequest(value: object): value is V1MuseSubjectsSuggestPostRequest {
|
|
66
|
+
if (!('channel' in value) || value['channel'] === undefined) return false;
|
|
67
|
+
if (!('projectId' in value) || value['projectId'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function V1MuseSubjectsSuggestPostRequestFromJSON(json: any): V1MuseSubjectsSuggestPostRequest {
|
|
72
|
+
return V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function V1MuseSubjectsSuggestPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1MuseSubjectsSuggestPostRequest {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'templateId': json['template_id'] == null ? undefined : json['template_id'],
|
|
82
|
+
'templateBody': json['template_body'] == null ? undefined : json['template_body'],
|
|
83
|
+
'channel': json['channel'],
|
|
84
|
+
'projectId': json['project_id'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function V1MuseSubjectsSuggestPostRequestToJSON(json: any): V1MuseSubjectsSuggestPostRequest {
|
|
89
|
+
return V1MuseSubjectsSuggestPostRequestToJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function V1MuseSubjectsSuggestPostRequestToJSONTyped(value?: V1MuseSubjectsSuggestPostRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'template_id': value['templateId'],
|
|
100
|
+
'template_body': value['templateBody'],
|
|
101
|
+
'channel': value['channel'],
|
|
102
|
+
'project_id': value['projectId'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './AddDomain200Response';
|
|
4
4
|
export * from './AddDomain200ResponseMeta';
|
|
5
5
|
export * from './AddDomainRequest';
|
|
6
|
+
export * from './AddOrganizationMemberRequest';
|
|
6
7
|
export * from './AddTopicSubscribersRequest';
|
|
7
8
|
export * from './ApiError';
|
|
8
9
|
export * from './ApiErrorError';
|
|
@@ -58,6 +59,7 @@ export * from './ConvertAnonymousUserRequestOneOf1';
|
|
|
58
59
|
export * from './ConvertAnonymousUserRequestOneOf1AppleUser';
|
|
59
60
|
export * from './ConvertAnonymousUserRequestOneOf1AppleUserName';
|
|
60
61
|
export * from './CreateCategoryRequest';
|
|
62
|
+
export * from './CreateOrganizationRequest';
|
|
61
63
|
export * from './CreateSubscriberRequest';
|
|
62
64
|
export * from './CreateTemplateRequest';
|
|
63
65
|
export * from './CreateTopicRequest';
|
|
@@ -167,6 +169,14 @@ export * from './OAuthTokensRefreshResponse';
|
|
|
167
169
|
export * from './OAuthTokensRefreshResponseData';
|
|
168
170
|
export * from './OAuthTokensResponse';
|
|
169
171
|
export * from './OAuthTokensResponseData';
|
|
172
|
+
export * from './Organization';
|
|
173
|
+
export * from './OrganizationListResponse';
|
|
174
|
+
export * from './OrganizationListResponseMeta';
|
|
175
|
+
export * from './OrganizationMembersListResponse';
|
|
176
|
+
export * from './OrganizationMembership';
|
|
177
|
+
export * from './OrganizationMembershipResponse';
|
|
178
|
+
export * from './OrganizationMembershipWithUser';
|
|
179
|
+
export * from './OrganizationResponse';
|
|
170
180
|
export * from './PaginationMeta';
|
|
171
181
|
export * from './PasswordRequirements';
|
|
172
182
|
export * from './PasswordRequirementsResponse';
|
|
@@ -279,6 +289,11 @@ export * from './SubscriberListResponse';
|
|
|
279
289
|
export * from './SubscriberPreference';
|
|
280
290
|
export * from './SubscriberResponse';
|
|
281
291
|
export * from './SuccessResult';
|
|
292
|
+
export * from './SwitchOrganizationRequest';
|
|
293
|
+
export * from './SwitchOrganizationResponse';
|
|
294
|
+
export * from './SwitchOrganizationResponseData';
|
|
295
|
+
export * from './SwitchOrganizationResponseDataTokens';
|
|
296
|
+
export * from './SwitchOrganizationResponseDataUser';
|
|
282
297
|
export * from './Template';
|
|
283
298
|
export * from './TemplateListResponse';
|
|
284
299
|
export * from './TemplateRenderResponse';
|
|
@@ -307,6 +322,8 @@ export * from './UnsubscribeRequest';
|
|
|
307
322
|
export * from './UnsubscribeResponse';
|
|
308
323
|
export * from './UpdateCategoryRequest';
|
|
309
324
|
export * from './UpdateEndUserRequest';
|
|
325
|
+
export * from './UpdateOrganizationMemberRoleRequest';
|
|
326
|
+
export * from './UpdateOrganizationRequest';
|
|
310
327
|
export * from './UpdateSubscriberPreferencesRequest';
|
|
311
328
|
export * from './UpdateSubscriberPreferencesRequestPreferencesInner';
|
|
312
329
|
export * from './UpdateSubscriberRequest';
|
|
@@ -320,6 +337,7 @@ export * from './UpsertAuthEmailTemplateRequest';
|
|
|
320
337
|
export * from './UpsertSmsConfigRequest';
|
|
321
338
|
export * from './UserDevicesDeleteResponse';
|
|
322
339
|
export * from './UserDevicesDeleteResponseData';
|
|
340
|
+
export * from './V1MuseSubjectsSuggestPostRequest';
|
|
323
341
|
export * from './ValidateResetTokenRequest';
|
|
324
342
|
export * from './ValidateResetTokenResponse';
|
|
325
343
|
export * from './ValidateResetTokenResponseData';
|