@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,119 @@
|
|
|
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
|
+
* One row in the end_user × organization join table.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OrganizationMembership
|
|
20
|
+
*/
|
|
21
|
+
export interface OrganizationMembership {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OrganizationMembership
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OrganizationMembership
|
|
32
|
+
*/
|
|
33
|
+
organizationId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OrganizationMembership
|
|
38
|
+
*/
|
|
39
|
+
endUserId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof OrganizationMembership
|
|
44
|
+
*/
|
|
45
|
+
environmentId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Opaque role string. Not interpreted by Zyphr in v1.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof OrganizationMembership
|
|
50
|
+
*/
|
|
51
|
+
role?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof OrganizationMembership
|
|
56
|
+
*/
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof OrganizationMembership
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the OrganizationMembership interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfOrganizationMembership(value: object): value is OrganizationMembership {
|
|
70
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
71
|
+
if (!('organizationId' in value) || value['organizationId'] === undefined) return false;
|
|
72
|
+
if (!('endUserId' in value) || value['endUserId'] === undefined) return false;
|
|
73
|
+
if (!('environmentId' in value) || value['environmentId'] === undefined) return false;
|
|
74
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
75
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function OrganizationMembershipFromJSON(json: any): OrganizationMembership {
|
|
80
|
+
return OrganizationMembershipFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function OrganizationMembershipFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationMembership {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'id': json['id'],
|
|
90
|
+
'organizationId': json['organization_id'],
|
|
91
|
+
'endUserId': json['end_user_id'],
|
|
92
|
+
'environmentId': json['environment_id'],
|
|
93
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
94
|
+
'createdAt': (new Date(json['created_at'])),
|
|
95
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function OrganizationMembershipToJSON(json: any): OrganizationMembership {
|
|
100
|
+
return OrganizationMembershipToJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function OrganizationMembershipToJSONTyped(value?: OrganizationMembership | null, ignoreDiscriminator: boolean = false): any {
|
|
104
|
+
if (value == null) {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'id': value['id'],
|
|
111
|
+
'organization_id': value['organizationId'],
|
|
112
|
+
'end_user_id': value['endUserId'],
|
|
113
|
+
'environment_id': value['environmentId'],
|
|
114
|
+
'role': value['role'],
|
|
115
|
+
'created_at': ((value['createdAt']).toISOString()),
|
|
116
|
+
'updated_at': ((value['updatedAt']).toISOString()),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
@@ -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 { OrganizationMembership } from './OrganizationMembership';
|
|
17
|
+
import {
|
|
18
|
+
OrganizationMembershipFromJSON,
|
|
19
|
+
OrganizationMembershipFromJSONTyped,
|
|
20
|
+
OrganizationMembershipToJSON,
|
|
21
|
+
OrganizationMembershipToJSONTyped,
|
|
22
|
+
} from './OrganizationMembership';
|
|
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 OrganizationMembershipResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface OrganizationMembershipResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {OrganizationMembership}
|
|
40
|
+
* @memberof OrganizationMembershipResponse
|
|
41
|
+
*/
|
|
42
|
+
data: OrganizationMembership;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GetDomain200ResponseMeta}
|
|
46
|
+
* @memberof OrganizationMembershipResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: GetDomain200ResponseMeta;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the OrganizationMembershipResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfOrganizationMembershipResponse(value: object): value is OrganizationMembershipResponse {
|
|
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 OrganizationMembershipResponseFromJSON(json: any): OrganizationMembershipResponse {
|
|
61
|
+
return OrganizationMembershipResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function OrganizationMembershipResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationMembershipResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': OrganizationMembershipFromJSON(json['data']),
|
|
71
|
+
'meta': GetDomain200ResponseMetaFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function OrganizationMembershipResponseToJSON(json: any): OrganizationMembershipResponse {
|
|
76
|
+
return OrganizationMembershipResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function OrganizationMembershipResponseToJSONTyped(value?: OrganizationMembershipResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': OrganizationMembershipToJSON(value['data']),
|
|
87
|
+
'meta': GetDomain200ResponseMetaToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
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 OrganizationMembershipWithUser
|
|
20
|
+
*/
|
|
21
|
+
export interface OrganizationMembershipWithUser {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OrganizationMembershipWithUser
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OrganizationMembershipWithUser
|
|
32
|
+
*/
|
|
33
|
+
organizationId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OrganizationMembershipWithUser
|
|
38
|
+
*/
|
|
39
|
+
endUserId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof OrganizationMembershipWithUser
|
|
44
|
+
*/
|
|
45
|
+
environmentId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Opaque role string. Not interpreted by Zyphr in v1.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof OrganizationMembershipWithUser
|
|
50
|
+
*/
|
|
51
|
+
role?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof OrganizationMembershipWithUser
|
|
56
|
+
*/
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof OrganizationMembershipWithUser
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof OrganizationMembershipWithUser
|
|
68
|
+
*/
|
|
69
|
+
email?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof OrganizationMembershipWithUser
|
|
74
|
+
*/
|
|
75
|
+
name?: string | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the OrganizationMembershipWithUser interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfOrganizationMembershipWithUser(value: object): value is OrganizationMembershipWithUser {
|
|
82
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
83
|
+
if (!('organizationId' in value) || value['organizationId'] === undefined) return false;
|
|
84
|
+
if (!('endUserId' in value) || value['endUserId'] === undefined) return false;
|
|
85
|
+
if (!('environmentId' in value) || value['environmentId'] === undefined) return false;
|
|
86
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
87
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function OrganizationMembershipWithUserFromJSON(json: any): OrganizationMembershipWithUser {
|
|
92
|
+
return OrganizationMembershipWithUserFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function OrganizationMembershipWithUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationMembershipWithUser {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'id': json['id'],
|
|
102
|
+
'organizationId': json['organization_id'],
|
|
103
|
+
'endUserId': json['end_user_id'],
|
|
104
|
+
'environmentId': json['environment_id'],
|
|
105
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
106
|
+
'createdAt': (new Date(json['created_at'])),
|
|
107
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
108
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
109
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function OrganizationMembershipWithUserToJSON(json: any): OrganizationMembershipWithUser {
|
|
114
|
+
return OrganizationMembershipWithUserToJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function OrganizationMembershipWithUserToJSONTyped(value?: OrganizationMembershipWithUser | null, ignoreDiscriminator: boolean = false): any {
|
|
118
|
+
if (value == null) {
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'id': value['id'],
|
|
125
|
+
'organization_id': value['organizationId'],
|
|
126
|
+
'end_user_id': value['endUserId'],
|
|
127
|
+
'environment_id': value['environmentId'],
|
|
128
|
+
'role': value['role'],
|
|
129
|
+
'created_at': ((value['createdAt']).toISOString()),
|
|
130
|
+
'updated_at': ((value['updatedAt']).toISOString()),
|
|
131
|
+
'email': value['email'],
|
|
132
|
+
'name': value['name'],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
@@ -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
|
+
|