@zyphr-dev/node-sdk 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.cjs +2245 -117
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3139 -933
  4. package/dist/index.d.ts +3139 -933
  5. package/dist/index.js +2100 -117
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +30 -0
  9. package/src/client.ts +9 -0
  10. package/src/src/apis/AuthOrganizationsApi.ts +823 -0
  11. package/src/src/apis/AuthUserProfileApi.ts +62 -0
  12. package/src/src/apis/DomainsApi.ts +73 -0
  13. package/src/src/apis/InboundEmailApi.ts +264 -0
  14. package/src/src/apis/MuseApi.ts +531 -0
  15. package/src/src/apis/index.ts +3 -0
  16. package/src/src/models/AddOrganizationMemberRequest.ts +74 -0
  17. package/src/src/models/CreateOrganizationRequest.ts +82 -0
  18. package/src/src/models/InboundAttachmentUrlResponse.ts +88 -0
  19. package/src/src/models/InboundAttachmentUrlResponseData.ts +81 -0
  20. package/src/src/models/InboundEmail.ts +247 -0
  21. package/src/src/models/InboundEmailAttachment.ts +89 -0
  22. package/src/src/models/InboundEmailFrom.ts +73 -0
  23. package/src/src/models/InboundEmailListResponse.ts +88 -0
  24. package/src/src/models/InboundEmailListResponseMeta.ts +89 -0
  25. package/src/src/models/InboundEmailResponse.ts +88 -0
  26. package/src/src/models/LoginRequest.ts +12 -0
  27. package/src/src/models/Organization.ts +137 -0
  28. package/src/src/models/OrganizationListResponse.ts +90 -0
  29. package/src/src/models/OrganizationListResponseMeta.ts +73 -0
  30. package/src/src/models/OrganizationMembersListResponse.ts +90 -0
  31. package/src/src/models/OrganizationMembership.ts +119 -0
  32. package/src/src/models/OrganizationMembershipResponse.ts +90 -0
  33. package/src/src/models/OrganizationMembershipWithUser.ts +135 -0
  34. package/src/src/models/OrganizationResponse.ts +90 -0
  35. package/src/src/models/RegisterRequest.ts +23 -0
  36. package/src/src/models/SetDomainInboundRequest.ts +65 -0
  37. package/src/src/models/SwitchOrganizationRequest.ts +75 -0
  38. package/src/src/models/SwitchOrganizationResponse.ts +90 -0
  39. package/src/src/models/SwitchOrganizationResponseData.ts +99 -0
  40. package/src/src/models/SwitchOrganizationResponseDataTokens.ts +103 -0
  41. package/src/src/models/SwitchOrganizationResponseDataUser.ts +73 -0
  42. package/src/src/models/UpdateOrganizationMemberRoleRequest.ts +66 -0
  43. package/src/src/models/UpdateOrganizationRequest.ts +81 -0
  44. package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +105 -0
  45. package/src/src/models/index.ts +27 -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 { OrganizationListResponseMeta } from './OrganizationListResponseMeta';
17
+ import {
18
+ OrganizationListResponseMetaFromJSON,
19
+ OrganizationListResponseMetaFromJSONTyped,
20
+ OrganizationListResponseMetaToJSON,
21
+ OrganizationListResponseMetaToJSONTyped,
22
+ } from './OrganizationListResponseMeta';
23
+ import type { OrganizationMembershipWithUser } from './OrganizationMembershipWithUser';
24
+ import {
25
+ OrganizationMembershipWithUserFromJSON,
26
+ OrganizationMembershipWithUserFromJSONTyped,
27
+ OrganizationMembershipWithUserToJSON,
28
+ OrganizationMembershipWithUserToJSONTyped,
29
+ } from './OrganizationMembershipWithUser';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface OrganizationMembersListResponse
35
+ */
36
+ export interface OrganizationMembersListResponse {
37
+ /**
38
+ *
39
+ * @type {Array<OrganizationMembershipWithUser>}
40
+ * @memberof OrganizationMembersListResponse
41
+ */
42
+ data: Array<OrganizationMembershipWithUser>;
43
+ /**
44
+ *
45
+ * @type {OrganizationListResponseMeta}
46
+ * @memberof OrganizationMembersListResponse
47
+ */
48
+ meta: OrganizationListResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the OrganizationMembersListResponse interface.
53
+ */
54
+ export function instanceOfOrganizationMembersListResponse(value: object): value is OrganizationMembersListResponse {
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 OrganizationMembersListResponseFromJSON(json: any): OrganizationMembersListResponse {
61
+ return OrganizationMembersListResponseFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function OrganizationMembersListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationMembersListResponse {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'data': ((json['data'] as Array<any>).map(OrganizationMembershipWithUserFromJSON)),
71
+ 'meta': OrganizationListResponseMetaFromJSON(json['meta']),
72
+ };
73
+ }
74
+
75
+ export function OrganizationMembersListResponseToJSON(json: any): OrganizationMembersListResponse {
76
+ return OrganizationMembersListResponseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function OrganizationMembersListResponseToJSONTyped(value?: OrganizationMembersListResponse | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'data': ((value['data'] as Array<any>).map(OrganizationMembershipWithUserToJSON)),
87
+ 'meta': OrganizationListResponseMetaToJSON(value['meta']),
88
+ };
89
+ }
90
+
@@ -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,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SetDomainInboundRequest
20
+ */
21
+ export interface SetDomainInboundRequest {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof SetDomainInboundRequest
26
+ */
27
+ enabled?: boolean;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the SetDomainInboundRequest interface.
32
+ */
33
+ export function instanceOfSetDomainInboundRequest(value: object): value is SetDomainInboundRequest {
34
+ return true;
35
+ }
36
+
37
+ export function SetDomainInboundRequestFromJSON(json: any): SetDomainInboundRequest {
38
+ return SetDomainInboundRequestFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function SetDomainInboundRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetDomainInboundRequest {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
48
+ };
49
+ }
50
+
51
+ export function SetDomainInboundRequestToJSON(json: any): SetDomainInboundRequest {
52
+ return SetDomainInboundRequestToJSONTyped(json, false);
53
+ }
54
+
55
+ export function SetDomainInboundRequestToJSONTyped(value?: SetDomainInboundRequest | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'enabled': value['enabled'],
63
+ };
64
+ }
65
+