@zyphr-dev/node-sdk 0.1.37 → 0.1.39
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/README.md +39 -0
- package/dist/index.cjs +762 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +720 -59
- package/dist/index.d.ts +720 -59
- package/dist/index.js +726 -47
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/src/.openapi-generator/FILES +7 -0
- package/src/clientAuth.ts +182 -0
- package/src/errors.ts +29 -16
- package/src/index.ts +4 -1
- package/src/src/apis/AuthOAuthApi.ts +27 -24
- package/src/src/apis/AuthRegistrationApi.ts +134 -4
- package/src/src/apis/AuthUserDirectoryApi.ts +596 -0
- package/src/src/apis/AuthUserProfileApi.ts +0 -62
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/InviteEndUserRequest.ts +110 -0
- package/src/src/models/OAuthProviderName.ts +56 -0
- package/src/src/models/SetEndUserClaimsRequest.ts +65 -0
- package/src/src/models/SignInAnonymouslyRequest.ts +16 -0
- package/src/src/models/SignInWithGameCenterRequest.ts +111 -0
- package/src/src/models/SignInWithGooglePlayGamesRequest.ts +66 -0
- package/src/src/models/UpdateEndUserByApplicationRequest.ts +97 -0
- package/src/src/models/index.ts +6 -0
|
@@ -31,10 +31,6 @@ import {
|
|
|
31
31
|
UpdateEndUserRequestToJSON,
|
|
32
32
|
} from '../models/index';
|
|
33
33
|
|
|
34
|
-
export interface AuthUserProfileApiDeleteEndUserByApplicationRequest {
|
|
35
|
-
userId: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
34
|
export interface AuthUserProfileApiUpdateEndUserOperationRequest {
|
|
39
35
|
updateEndUserRequest: UpdateEndUserRequest;
|
|
40
36
|
}
|
|
@@ -61,22 +57,6 @@ export interface AuthUserProfileApiInterface {
|
|
|
61
57
|
*/
|
|
62
58
|
deleteEndUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EndUserDeleteResponse>;
|
|
63
59
|
|
|
64
|
-
/**
|
|
65
|
-
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
66
|
-
* @summary Delete an end user (test environment only)
|
|
67
|
-
* @param {string} userId
|
|
68
|
-
* @param {*} [options] Override http request option.
|
|
69
|
-
* @throws {RequiredError}
|
|
70
|
-
* @memberof AuthUserProfileApiInterface
|
|
71
|
-
*/
|
|
72
|
-
deleteEndUserByApplicationRaw(requestParameters: AuthUserProfileApiDeleteEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
76
|
-
* Delete an end user (test environment only)
|
|
77
|
-
*/
|
|
78
|
-
deleteEndUserByApplication(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
79
|
-
|
|
80
60
|
/**
|
|
81
61
|
* Retrieve the profile of the currently authenticated end user.
|
|
82
62
|
* @summary Get current end user profile
|
|
@@ -155,48 +135,6 @@ export class AuthUserProfileApi extends runtime.BaseAPI implements AuthUserProfi
|
|
|
155
135
|
return await response.value();
|
|
156
136
|
}
|
|
157
137
|
|
|
158
|
-
/**
|
|
159
|
-
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
160
|
-
* Delete an end user (test environment only)
|
|
161
|
-
*/
|
|
162
|
-
async deleteEndUserByApplicationRaw(requestParameters: AuthUserProfileApiDeleteEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
163
|
-
if (requestParameters['userId'] == null) {
|
|
164
|
-
throw new runtime.RequiredError(
|
|
165
|
-
'userId',
|
|
166
|
-
'Required parameter "userId" was null or undefined when calling deleteEndUserByApplication().'
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const queryParameters: any = {};
|
|
171
|
-
|
|
172
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
173
|
-
|
|
174
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
175
|
-
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
179
|
-
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const response = await this.request({
|
|
183
|
-
path: `/auth/users/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
184
|
-
method: 'DELETE',
|
|
185
|
-
headers: headerParameters,
|
|
186
|
-
query: queryParameters,
|
|
187
|
-
}, initOverrides);
|
|
188
|
-
|
|
189
|
-
return new runtime.VoidApiResponse(response);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
194
|
-
* Delete an end user (test environment only)
|
|
195
|
-
*/
|
|
196
|
-
async deleteEndUserByApplication(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
197
|
-
await this.deleteEndUserByApplicationRaw({ userId: userId }, initOverrides);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
138
|
/**
|
|
201
139
|
* Retrieve the profile of the currently authenticated end user.
|
|
202
140
|
* Get current end user profile
|
package/src/src/apis/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './AuthPasswordResetApi';
|
|
|
12
12
|
export * from './AuthPhoneApi';
|
|
13
13
|
export * from './AuthRegistrationApi';
|
|
14
14
|
export * from './AuthSessionsApi';
|
|
15
|
+
export * from './AuthUserDirectoryApi';
|
|
15
16
|
export * from './AuthUserProfileApi';
|
|
16
17
|
export * from './AuthWebAuthnApi';
|
|
17
18
|
export * from './DevicesApi';
|
|
@@ -0,0 +1,110 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 InviteEndUserRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface InviteEndUserRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InviteEndUserRequest
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InviteEndUserRequest
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof InviteEndUserRequest
|
|
38
|
+
*/
|
|
39
|
+
metadata?: object;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof InviteEndUserRequest
|
|
44
|
+
*/
|
|
45
|
+
sendLink?: InviteEndUserRequestSendLinkEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof InviteEndUserRequest
|
|
50
|
+
*/
|
|
51
|
+
redirectUrl?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const InviteEndUserRequestSendLinkEnum = {
|
|
59
|
+
MAGIC: 'magic',
|
|
60
|
+
PASSWORD_RESET: 'password_reset',
|
|
61
|
+
NONE: 'none'
|
|
62
|
+
} as const;
|
|
63
|
+
export type InviteEndUserRequestSendLinkEnum = typeof InviteEndUserRequestSendLinkEnum[keyof typeof InviteEndUserRequestSendLinkEnum];
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the InviteEndUserRequest interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfInviteEndUserRequest(value: object): value is InviteEndUserRequest {
|
|
70
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function InviteEndUserRequestFromJSON(json: any): InviteEndUserRequest {
|
|
75
|
+
return InviteEndUserRequestFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function InviteEndUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteEndUserRequest {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'email': json['email'],
|
|
85
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
86
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
87
|
+
'sendLink': json['send_link'] == null ? undefined : json['send_link'],
|
|
88
|
+
'redirectUrl': json['redirect_url'] == null ? undefined : json['redirect_url'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function InviteEndUserRequestToJSON(json: any): InviteEndUserRequest {
|
|
93
|
+
return InviteEndUserRequestToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function InviteEndUserRequestToJSONTyped(value?: InviteEndUserRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'email': value['email'],
|
|
104
|
+
'name': value['name'],
|
|
105
|
+
'metadata': value['metadata'],
|
|
106
|
+
'send_link': value['sendLink'],
|
|
107
|
+
'redirect_url': value['redirectUrl'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* OAuth provider name
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const OAuthProviderName = {
|
|
21
|
+
GOOGLE: 'google',
|
|
22
|
+
APPLE: 'apple',
|
|
23
|
+
FACEBOOK: 'facebook',
|
|
24
|
+
GITHUB: 'github',
|
|
25
|
+
MICROSOFT: 'microsoft'
|
|
26
|
+
} as const;
|
|
27
|
+
export type OAuthProviderName = typeof OAuthProviderName[keyof typeof OAuthProviderName];
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export function instanceOfOAuthProviderName(value: any): boolean {
|
|
31
|
+
for (const key in OAuthProviderName) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(OAuthProviderName, key)) {
|
|
33
|
+
if (OAuthProviderName[key as keyof typeof OAuthProviderName] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function OAuthProviderNameFromJSON(json: any): OAuthProviderName {
|
|
42
|
+
return OAuthProviderNameFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function OAuthProviderNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthProviderName {
|
|
46
|
+
return json as OAuthProviderName;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function OAuthProviderNameToJSON(value?: OAuthProviderName | null): any {
|
|
50
|
+
return value as any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function OAuthProviderNameToJSONTyped(value: any, ignoreDiscriminator: boolean): OAuthProviderName {
|
|
54
|
+
return value as OAuthProviderName;
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 SetEndUserClaimsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SetEndUserClaimsRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {object}
|
|
25
|
+
* @memberof SetEndUserClaimsRequest
|
|
26
|
+
*/
|
|
27
|
+
claims?: object;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SetEndUserClaimsRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSetEndUserClaimsRequest(value: object): value is SetEndUserClaimsRequest {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function SetEndUserClaimsRequestFromJSON(json: any): SetEndUserClaimsRequest {
|
|
38
|
+
return SetEndUserClaimsRequestFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function SetEndUserClaimsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetEndUserClaimsRequest {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'claims': json['claims'] == null ? undefined : json['claims'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SetEndUserClaimsRequestToJSON(json: any): SetEndUserClaimsRequest {
|
|
52
|
+
return SetEndUserClaimsRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function SetEndUserClaimsRequestToJSONTyped(value?: SetEndUserClaimsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'claims': value['claims'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -37,6 +37,18 @@ export interface SignInAnonymouslyRequest {
|
|
|
37
37
|
* @memberof SignInAnonymouslyRequest
|
|
38
38
|
*/
|
|
39
39
|
metadata?: { [key: string]: any; };
|
|
40
|
+
/**
|
|
41
|
+
* Optional organization to scope the anonymous user into. Must exist in the key's environment. When set, the returned token carries org_id and orgs.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SignInAnonymouslyRequest
|
|
44
|
+
*/
|
|
45
|
+
organizationId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Optional membership role for the org add. Requires organization_id. Opaque, up to 80 characters.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SignInAnonymouslyRequest
|
|
50
|
+
*/
|
|
51
|
+
organizationRole?: string;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
/**
|
|
@@ -60,6 +72,8 @@ export function SignInAnonymouslyRequestFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
60
72
|
'deviceId': json['device_id'],
|
|
61
73
|
'name': json['name'] == null ? undefined : json['name'],
|
|
62
74
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
75
|
+
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
76
|
+
'organizationRole': json['organization_role'] == null ? undefined : json['organization_role'],
|
|
63
77
|
};
|
|
64
78
|
}
|
|
65
79
|
|
|
@@ -77,6 +91,8 @@ export function SignInAnonymouslyRequestToJSONTyped(value?: SignInAnonymouslyReq
|
|
|
77
91
|
'device_id': value['deviceId'],
|
|
78
92
|
'name': value['name'],
|
|
79
93
|
'metadata': value['metadata'],
|
|
94
|
+
'organization_id': value['organizationId'],
|
|
95
|
+
'organization_role': value['organizationRole'],
|
|
80
96
|
};
|
|
81
97
|
}
|
|
82
98
|
|
|
@@ -0,0 +1,111 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 SignInWithGameCenterRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SignInWithGameCenterRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The modern scoped gamePlayerID from GKLocalPlayer (NOT the deprecated legacy playerID).
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SignInWithGameCenterRequest
|
|
26
|
+
*/
|
|
27
|
+
playerId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Apple-supplied URL to the public-key certificate. Must be https on an apple.com host; server-side SSRF-guarded before fetch.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SignInWithGameCenterRequest
|
|
32
|
+
*/
|
|
33
|
+
publicKeyUrl: string;
|
|
34
|
+
/**
|
|
35
|
+
* Base64-encoded RSA signature returned by GameKit.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SignInWithGameCenterRequest
|
|
38
|
+
*/
|
|
39
|
+
signature: string;
|
|
40
|
+
/**
|
|
41
|
+
* Base64-encoded salt bytes returned by GameKit.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SignInWithGameCenterRequest
|
|
44
|
+
*/
|
|
45
|
+
salt: string;
|
|
46
|
+
/**
|
|
47
|
+
* Apple-supplied timestamp (epoch milliseconds) returned by GameKit.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SignInWithGameCenterRequest
|
|
50
|
+
*/
|
|
51
|
+
timestamp: number;
|
|
52
|
+
/**
|
|
53
|
+
* The iOS bundle identifier the assertion was generated for. Must match a bundle id configured on the application's Game Center provider.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SignInWithGameCenterRequest
|
|
56
|
+
*/
|
|
57
|
+
bundleId: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the SignInWithGameCenterRequest interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfSignInWithGameCenterRequest(value: object): value is SignInWithGameCenterRequest {
|
|
64
|
+
if (!('playerId' in value) || value['playerId'] === undefined) return false;
|
|
65
|
+
if (!('publicKeyUrl' in value) || value['publicKeyUrl'] === undefined) return false;
|
|
66
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
67
|
+
if (!('salt' in value) || value['salt'] === undefined) return false;
|
|
68
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
69
|
+
if (!('bundleId' in value) || value['bundleId'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function SignInWithGameCenterRequestFromJSON(json: any): SignInWithGameCenterRequest {
|
|
74
|
+
return SignInWithGameCenterRequestFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function SignInWithGameCenterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignInWithGameCenterRequest {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'playerId': json['playerId'],
|
|
84
|
+
'publicKeyUrl': json['publicKeyUrl'],
|
|
85
|
+
'signature': json['signature'],
|
|
86
|
+
'salt': json['salt'],
|
|
87
|
+
'timestamp': json['timestamp'],
|
|
88
|
+
'bundleId': json['bundleId'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function SignInWithGameCenterRequestToJSON(json: any): SignInWithGameCenterRequest {
|
|
93
|
+
return SignInWithGameCenterRequestToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function SignInWithGameCenterRequestToJSONTyped(value?: SignInWithGameCenterRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'playerId': value['playerId'],
|
|
104
|
+
'publicKeyUrl': value['publicKeyUrl'],
|
|
105
|
+
'signature': value['signature'],
|
|
106
|
+
'salt': value['salt'],
|
|
107
|
+
'timestamp': value['timestamp'],
|
|
108
|
+
'bundleId': value['bundleId'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 SignInWithGooglePlayGamesRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SignInWithGooglePlayGamesRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The single-use server auth code from GamesSignInClient.requestServerSideAccess (obtained with the game's web/server client id). Zyphr exchanges it server-side; a client-supplied player id is neither accepted nor trusted.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SignInWithGooglePlayGamesRequest
|
|
26
|
+
*/
|
|
27
|
+
serverAuthCode: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SignInWithGooglePlayGamesRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSignInWithGooglePlayGamesRequest(value: object): value is SignInWithGooglePlayGamesRequest {
|
|
34
|
+
if (!('serverAuthCode' in value) || value['serverAuthCode'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SignInWithGooglePlayGamesRequestFromJSON(json: any): SignInWithGooglePlayGamesRequest {
|
|
39
|
+
return SignInWithGooglePlayGamesRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SignInWithGooglePlayGamesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignInWithGooglePlayGamesRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'serverAuthCode': json['serverAuthCode'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SignInWithGooglePlayGamesRequestToJSON(json: any): SignInWithGooglePlayGamesRequest {
|
|
53
|
+
return SignInWithGooglePlayGamesRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SignInWithGooglePlayGamesRequestToJSONTyped(value?: SignInWithGooglePlayGamesRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'serverAuthCode': value['serverAuthCode'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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 ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## 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 UpdateEndUserByApplicationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateEndUserByApplicationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UpdateEndUserByApplicationRequest
|
|
26
|
+
*/
|
|
27
|
+
email?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UpdateEndUserByApplicationRequest
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof UpdateEndUserByApplicationRequest
|
|
38
|
+
*/
|
|
39
|
+
avatarUrl?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {object}
|
|
43
|
+
* @memberof UpdateEndUserByApplicationRequest
|
|
44
|
+
*/
|
|
45
|
+
metadata?: object;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof UpdateEndUserByApplicationRequest
|
|
50
|
+
*/
|
|
51
|
+
status?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the UpdateEndUserByApplicationRequest interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfUpdateEndUserByApplicationRequest(value: object): value is UpdateEndUserByApplicationRequest {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function UpdateEndUserByApplicationRequestFromJSON(json: any): UpdateEndUserByApplicationRequest {
|
|
62
|
+
return UpdateEndUserByApplicationRequestFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function UpdateEndUserByApplicationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateEndUserByApplicationRequest {
|
|
66
|
+
if (json == null) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
72
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
73
|
+
'avatarUrl': json['avatar_url'] == null ? undefined : json['avatar_url'],
|
|
74
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
75
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function UpdateEndUserByApplicationRequestToJSON(json: any): UpdateEndUserByApplicationRequest {
|
|
80
|
+
return UpdateEndUserByApplicationRequestToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function UpdateEndUserByApplicationRequestToJSONTyped(value?: UpdateEndUserByApplicationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'email': value['email'],
|
|
91
|
+
'name': value['name'],
|
|
92
|
+
'avatar_url': value['avatarUrl'],
|
|
93
|
+
'metadata': value['metadata'],
|
|
94
|
+
'status': value['status'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|