@zyphr-dev/node-sdk 0.1.31 → 0.1.33

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