@zyphr-dev/node-sdk 0.1.42 → 0.1.44
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 +6 -4
- package/dist/index.cjs +2056 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2258 -466
- package/dist/index.d.ts +2258 -466
- package/dist/index.js +1852 -340
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +40 -1
- package/src/client.ts +18 -3
- package/src/clientAuth.ts +45 -12
- package/src/src/apis/AuthApplicationApi.ts +93 -0
- package/src/src/apis/AuthEmailTemplatesApi.ts +4 -4
- package/src/src/apis/AuthUserDirectoryApi.ts +120 -36
- package/src/src/apis/DomainsApi.ts +7 -6
- package/src/src/apis/InboxApi.ts +78 -54
- package/src/src/apis/TemplatesApi.ts +10 -6
- package/src/src/apis/WaaSDeliveriesApi.ts +17 -12
- package/src/src/apis/WaaSEndpointsApi.ts +50 -30
- package/src/src/apis/WaaSEventTypesApi.ts +17 -12
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/ApplicationSelf.ts +118 -0
- package/src/src/models/ApplicationSelfResponse.ts +88 -0
- package/src/src/models/AuthEmailTemplateTestRequest.ts +1 -1
- package/src/src/models/AuthMethods.ts +111 -0
- package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
- package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
- package/src/src/models/GetEndUserAuthMethods200Response.ts +88 -0
- package/src/src/models/GetEndUserById200Response.ts +88 -0
- package/src/src/models/GetEndUserClaims200Response.ts +88 -0
- package/src/src/models/GetEndUserClaims200ResponseData.ts +65 -0
- package/src/src/models/GetSubscriberInboxPreferences200Response.ts +73 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseData.ts +88 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInner.ts +88 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory.ts +97 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobal.ts +73 -0
- package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner.ts +94 -0
- package/src/src/models/GetSubscriberNotification200Response.ts +73 -0
- package/src/src/models/GetSubscriberUnreadCount200Response.ts +73 -0
- package/src/src/models/GetWaaSDelivery200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointCircuit200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointCircuit200ResponseData.ts +123 -0
- package/src/src/models/GetWaaSEndpointMetrics200Response.ts +88 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseData.ts +99 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseDataHealth.ts +87 -0
- package/src/src/models/GetWaaSEndpointMetrics200ResponseDataWindowsValue.ts +126 -0
- package/src/src/models/InviteEndUser200Response.ts +88 -0
- package/src/src/models/InviteEndUser200ResponseData.ts +81 -0
- package/src/src/models/ListEndUsers200Response.ts +88 -0
- package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts} +15 -15
- package/src/src/models/ListWorkflowExecutions200Response.ts +11 -11
- package/src/src/models/MarkAllSubscriberNotificationsRead200Response.ts +73 -0
- package/src/src/models/RotateWaaSEndpointSecret200Response.ts +88 -0
- package/src/src/models/RotateWaaSEndpointSecret200ResponseData.ts +66 -0
- package/src/src/models/SendTemplateTestEmail202Response.ts +90 -0
- package/src/src/models/SendTemplateTestEmail202ResponseData.ts +120 -0
- package/src/src/models/SendTemplateTestEmail202ResponseMeta.ts +66 -0
- package/src/src/models/SmsListResponse.ts +10 -10
- package/src/src/models/UpdateSubscriberPreferences200Response.ts +73 -0
- package/src/src/models/UpdateSubscriberPreferences200ResponseData.ts +81 -0
- package/src/src/models/UpdateSubscriberPreferences200ResponseDataPreferencesInner.ts +102 -0
- package/src/src/models/UpdateWaaSEndpoint200Response.ts +88 -0
- package/src/src/models/UpdateWaaSEventType200Response.ts +88 -0
- package/src/src/models/index.ts +39 -1
|
@@ -15,14 +15,29 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
GetEndUserAuthMethods200Response,
|
|
19
|
+
GetEndUserById200Response,
|
|
20
|
+
GetEndUserClaims200Response,
|
|
21
|
+
InviteEndUser200Response,
|
|
18
22
|
InviteEndUserRequest,
|
|
23
|
+
ListEndUsers200Response,
|
|
19
24
|
SetEndUserClaims200Response,
|
|
20
25
|
SetEndUserClaimsRequest,
|
|
21
26
|
UpdateEndUserByApplicationRequest,
|
|
22
27
|
} from '../models/index';
|
|
23
28
|
import {
|
|
29
|
+
GetEndUserAuthMethods200ResponseFromJSON,
|
|
30
|
+
GetEndUserAuthMethods200ResponseToJSON,
|
|
31
|
+
GetEndUserById200ResponseFromJSON,
|
|
32
|
+
GetEndUserById200ResponseToJSON,
|
|
33
|
+
GetEndUserClaims200ResponseFromJSON,
|
|
34
|
+
GetEndUserClaims200ResponseToJSON,
|
|
35
|
+
InviteEndUser200ResponseFromJSON,
|
|
36
|
+
InviteEndUser200ResponseToJSON,
|
|
24
37
|
InviteEndUserRequestFromJSON,
|
|
25
38
|
InviteEndUserRequestToJSON,
|
|
39
|
+
ListEndUsers200ResponseFromJSON,
|
|
40
|
+
ListEndUsers200ResponseToJSON,
|
|
26
41
|
SetEndUserClaims200ResponseFromJSON,
|
|
27
42
|
SetEndUserClaims200ResponseToJSON,
|
|
28
43
|
SetEndUserClaimsRequestFromJSON,
|
|
@@ -35,6 +50,10 @@ export interface AuthUserDirectoryApiDeleteEndUserByApplicationRequest {
|
|
|
35
50
|
userId: string;
|
|
36
51
|
}
|
|
37
52
|
|
|
53
|
+
export interface AuthUserDirectoryApiGetEndUserAuthMethodsRequest {
|
|
54
|
+
userId: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
38
57
|
export interface AuthUserDirectoryApiGetEndUserByEmailRequest {
|
|
39
58
|
email: string;
|
|
40
59
|
}
|
|
@@ -91,6 +110,22 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
91
110
|
*/
|
|
92
111
|
deleteEndUserByApplication(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
93
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
115
|
+
* @summary Get an end user\'s sign-in methods (server-side admin)
|
|
116
|
+
* @param {string} userId
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
120
|
+
*/
|
|
121
|
+
getEndUserAuthMethodsRaw(requestParameters: AuthUserDirectoryApiGetEndUserAuthMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserAuthMethods200Response>>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
125
|
+
* Get an end user\'s sign-in methods (server-side admin)
|
|
126
|
+
*/
|
|
127
|
+
getEndUserAuthMethods(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserAuthMethods200Response>;
|
|
128
|
+
|
|
94
129
|
/**
|
|
95
130
|
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
96
131
|
* @summary Look up an end user by email (server-side admin)
|
|
@@ -99,13 +134,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
99
134
|
* @throws {RequiredError}
|
|
100
135
|
* @memberof AuthUserDirectoryApiInterface
|
|
101
136
|
*/
|
|
102
|
-
getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
137
|
+
getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>>;
|
|
103
138
|
|
|
104
139
|
/**
|
|
105
140
|
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
106
141
|
* Look up an end user by email (server-side admin)
|
|
107
142
|
*/
|
|
108
|
-
getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
143
|
+
getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response>;
|
|
109
144
|
|
|
110
145
|
/**
|
|
111
146
|
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
@@ -115,13 +150,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
115
150
|
* @throws {RequiredError}
|
|
116
151
|
* @memberof AuthUserDirectoryApiInterface
|
|
117
152
|
*/
|
|
118
|
-
getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
153
|
+
getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>>;
|
|
119
154
|
|
|
120
155
|
/**
|
|
121
156
|
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
122
157
|
* Get an end user by id (server-side admin)
|
|
123
158
|
*/
|
|
124
|
-
getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
159
|
+
getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response>;
|
|
125
160
|
|
|
126
161
|
/**
|
|
127
162
|
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
@@ -131,13 +166,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
131
166
|
* @throws {RequiredError}
|
|
132
167
|
* @memberof AuthUserDirectoryApiInterface
|
|
133
168
|
*/
|
|
134
|
-
getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
169
|
+
getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserClaims200Response>>;
|
|
135
170
|
|
|
136
171
|
/**
|
|
137
172
|
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
138
173
|
* Get an end user\'s stored custom claims (server-side admin)
|
|
139
174
|
*/
|
|
140
|
-
getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
175
|
+
getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserClaims200Response>;
|
|
141
176
|
|
|
142
177
|
/**
|
|
143
178
|
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
@@ -147,13 +182,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
147
182
|
* @throws {RequiredError}
|
|
148
183
|
* @memberof AuthUserDirectoryApiInterface
|
|
149
184
|
*/
|
|
150
|
-
inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
185
|
+
inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteEndUser200Response>>;
|
|
151
186
|
|
|
152
187
|
/**
|
|
153
188
|
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
154
189
|
* Pre-provision (invite) an end user (server-side admin)
|
|
155
190
|
*/
|
|
156
|
-
inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
191
|
+
inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteEndUser200Response>;
|
|
157
192
|
|
|
158
193
|
/**
|
|
159
194
|
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
@@ -166,13 +201,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
166
201
|
* @throws {RequiredError}
|
|
167
202
|
* @memberof AuthUserDirectoryApiInterface
|
|
168
203
|
*/
|
|
169
|
-
listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
204
|
+
listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEndUsers200Response>>;
|
|
170
205
|
|
|
171
206
|
/**
|
|
172
207
|
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
173
208
|
* List / search end users (server-side admin)
|
|
174
209
|
*/
|
|
175
|
-
listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
210
|
+
listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEndUsers200Response>;
|
|
176
211
|
|
|
177
212
|
/**
|
|
178
213
|
* Secret-key-scoped upsert of the authoritative custom_claims for an end user. Set server-side only — clients cannot write these, which is what makes them safe for authorization (e.g. an account-type/admin flag). Claims are embedded into the user\'s JWTs on the next login/refresh. Max 4KB; reserved JWT/Zyphr claim names are rejected. Each write bumps a monotonic `claims_version` (returned in the response). The change applies seamlessly on the user\'s next login or token refresh — a token carrying an older `claims_version` is rejected on verification and the client silently re-mints with the new claims, without a forced logout. For a hard cut-off (log the user out of all sessions immediately), call POST /auth/sessions/revoke-all after updating claims.
|
|
@@ -200,13 +235,13 @@ export interface AuthUserDirectoryApiInterface {
|
|
|
200
235
|
* @throws {RequiredError}
|
|
201
236
|
* @memberof AuthUserDirectoryApiInterface
|
|
202
237
|
*/
|
|
203
|
-
updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
238
|
+
updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>>;
|
|
204
239
|
|
|
205
240
|
/**
|
|
206
241
|
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
207
242
|
* Update an end user (server-side admin)
|
|
208
243
|
*/
|
|
209
|
-
updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
244
|
+
updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response>;
|
|
210
245
|
|
|
211
246
|
}
|
|
212
247
|
|
|
@@ -257,11 +292,54 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
257
292
|
await this.deleteEndUserByApplicationRaw({ userId: userId }, initOverrides);
|
|
258
293
|
}
|
|
259
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
297
|
+
* Get an end user\'s sign-in methods (server-side admin)
|
|
298
|
+
*/
|
|
299
|
+
async getEndUserAuthMethodsRaw(requestParameters: AuthUserDirectoryApiGetEndUserAuthMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserAuthMethods200Response>> {
|
|
300
|
+
if (requestParameters['userId'] == null) {
|
|
301
|
+
throw new runtime.RequiredError(
|
|
302
|
+
'userId',
|
|
303
|
+
'Required parameter "userId" was null or undefined when calling getEndUserAuthMethods().'
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const queryParameters: any = {};
|
|
308
|
+
|
|
309
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
310
|
+
|
|
311
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
312
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
316
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const response = await this.request({
|
|
320
|
+
path: `/auth/users/{user_id}/auth-methods`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
321
|
+
method: 'GET',
|
|
322
|
+
headers: headerParameters,
|
|
323
|
+
query: queryParameters,
|
|
324
|
+
}, initOverrides);
|
|
325
|
+
|
|
326
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetEndUserAuthMethods200ResponseFromJSON(jsonValue));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
|
|
331
|
+
* Get an end user\'s sign-in methods (server-side admin)
|
|
332
|
+
*/
|
|
333
|
+
async getEndUserAuthMethods(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserAuthMethods200Response> {
|
|
334
|
+
const response = await this.getEndUserAuthMethodsRaw({ userId: userId }, initOverrides);
|
|
335
|
+
return await response.value();
|
|
336
|
+
}
|
|
337
|
+
|
|
260
338
|
/**
|
|
261
339
|
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
262
340
|
* Look up an end user by email (server-side admin)
|
|
263
341
|
*/
|
|
264
|
-
async getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
342
|
+
async getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>> {
|
|
265
343
|
if (requestParameters['email'] == null) {
|
|
266
344
|
throw new runtime.RequiredError(
|
|
267
345
|
'email',
|
|
@@ -292,22 +370,23 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
292
370
|
query: queryParameters,
|
|
293
371
|
}, initOverrides);
|
|
294
372
|
|
|
295
|
-
return new runtime.
|
|
373
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetEndUserById200ResponseFromJSON(jsonValue));
|
|
296
374
|
}
|
|
297
375
|
|
|
298
376
|
/**
|
|
299
377
|
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
300
378
|
* Look up an end user by email (server-side admin)
|
|
301
379
|
*/
|
|
302
|
-
async getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
303
|
-
await this.getEndUserByEmailRaw({ email: email }, initOverrides);
|
|
380
|
+
async getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response> {
|
|
381
|
+
const response = await this.getEndUserByEmailRaw({ email: email }, initOverrides);
|
|
382
|
+
return await response.value();
|
|
304
383
|
}
|
|
305
384
|
|
|
306
385
|
/**
|
|
307
386
|
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
308
387
|
* Get an end user by id (server-side admin)
|
|
309
388
|
*/
|
|
310
|
-
async getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
389
|
+
async getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>> {
|
|
311
390
|
if (requestParameters['userId'] == null) {
|
|
312
391
|
throw new runtime.RequiredError(
|
|
313
392
|
'userId',
|
|
@@ -334,22 +413,23 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
334
413
|
query: queryParameters,
|
|
335
414
|
}, initOverrides);
|
|
336
415
|
|
|
337
|
-
return new runtime.
|
|
416
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetEndUserById200ResponseFromJSON(jsonValue));
|
|
338
417
|
}
|
|
339
418
|
|
|
340
419
|
/**
|
|
341
420
|
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
342
421
|
* Get an end user by id (server-side admin)
|
|
343
422
|
*/
|
|
344
|
-
async getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
345
|
-
await this.getEndUserByIdRaw({ userId: userId }, initOverrides);
|
|
423
|
+
async getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response> {
|
|
424
|
+
const response = await this.getEndUserByIdRaw({ userId: userId }, initOverrides);
|
|
425
|
+
return await response.value();
|
|
346
426
|
}
|
|
347
427
|
|
|
348
428
|
/**
|
|
349
429
|
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
350
430
|
* Get an end user\'s stored custom claims (server-side admin)
|
|
351
431
|
*/
|
|
352
|
-
async getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
432
|
+
async getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserClaims200Response>> {
|
|
353
433
|
if (requestParameters['userId'] == null) {
|
|
354
434
|
throw new runtime.RequiredError(
|
|
355
435
|
'userId',
|
|
@@ -376,22 +456,23 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
376
456
|
query: queryParameters,
|
|
377
457
|
}, initOverrides);
|
|
378
458
|
|
|
379
|
-
return new runtime.
|
|
459
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetEndUserClaims200ResponseFromJSON(jsonValue));
|
|
380
460
|
}
|
|
381
461
|
|
|
382
462
|
/**
|
|
383
463
|
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
384
464
|
* Get an end user\'s stored custom claims (server-side admin)
|
|
385
465
|
*/
|
|
386
|
-
async getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
387
|
-
await this.getEndUserClaimsRaw({ userId: userId }, initOverrides);
|
|
466
|
+
async getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserClaims200Response> {
|
|
467
|
+
const response = await this.getEndUserClaimsRaw({ userId: userId }, initOverrides);
|
|
468
|
+
return await response.value();
|
|
388
469
|
}
|
|
389
470
|
|
|
390
471
|
/**
|
|
391
472
|
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
392
473
|
* Pre-provision (invite) an end user (server-side admin)
|
|
393
474
|
*/
|
|
394
|
-
async inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
475
|
+
async inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteEndUser200Response>> {
|
|
395
476
|
if (requestParameters['inviteEndUserRequest'] == null) {
|
|
396
477
|
throw new runtime.RequiredError(
|
|
397
478
|
'inviteEndUserRequest',
|
|
@@ -421,22 +502,23 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
421
502
|
body: InviteEndUserRequestToJSON(requestParameters['inviteEndUserRequest']),
|
|
422
503
|
}, initOverrides);
|
|
423
504
|
|
|
424
|
-
return new runtime.
|
|
505
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InviteEndUser200ResponseFromJSON(jsonValue));
|
|
425
506
|
}
|
|
426
507
|
|
|
427
508
|
/**
|
|
428
509
|
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
429
510
|
* Pre-provision (invite) an end user (server-side admin)
|
|
430
511
|
*/
|
|
431
|
-
async inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
432
|
-
await this.inviteEndUserRaw({ inviteEndUserRequest: inviteEndUserRequest }, initOverrides);
|
|
512
|
+
async inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteEndUser200Response> {
|
|
513
|
+
const response = await this.inviteEndUserRaw({ inviteEndUserRequest: inviteEndUserRequest }, initOverrides);
|
|
514
|
+
return await response.value();
|
|
433
515
|
}
|
|
434
516
|
|
|
435
517
|
/**
|
|
436
518
|
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
437
519
|
* List / search end users (server-side admin)
|
|
438
520
|
*/
|
|
439
|
-
async listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
521
|
+
async listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEndUsers200Response>> {
|
|
440
522
|
const queryParameters: any = {};
|
|
441
523
|
|
|
442
524
|
if (requestParameters['page'] != null) {
|
|
@@ -472,15 +554,16 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
472
554
|
query: queryParameters,
|
|
473
555
|
}, initOverrides);
|
|
474
556
|
|
|
475
|
-
return new runtime.
|
|
557
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListEndUsers200ResponseFromJSON(jsonValue));
|
|
476
558
|
}
|
|
477
559
|
|
|
478
560
|
/**
|
|
479
561
|
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
480
562
|
* List / search end users (server-side admin)
|
|
481
563
|
*/
|
|
482
|
-
async listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
483
|
-
await this.listEndUsersRaw({ page: page, perPage: perPage, search: search, environment: environment }, initOverrides);
|
|
564
|
+
async listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEndUsers200Response> {
|
|
565
|
+
const response = await this.listEndUsersRaw({ page: page, perPage: perPage, search: search, environment: environment }, initOverrides);
|
|
566
|
+
return await response.value();
|
|
484
567
|
}
|
|
485
568
|
|
|
486
569
|
/**
|
|
@@ -540,7 +623,7 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
540
623
|
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
541
624
|
* Update an end user (server-side admin)
|
|
542
625
|
*/
|
|
543
|
-
async updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
626
|
+
async updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEndUserById200Response>> {
|
|
544
627
|
if (requestParameters['userId'] == null) {
|
|
545
628
|
throw new runtime.RequiredError(
|
|
546
629
|
'userId',
|
|
@@ -577,15 +660,16 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
|
|
|
577
660
|
body: UpdateEndUserByApplicationRequestToJSON(requestParameters['updateEndUserByApplicationRequest']),
|
|
578
661
|
}, initOverrides);
|
|
579
662
|
|
|
580
|
-
return new runtime.
|
|
663
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetEndUserById200ResponseFromJSON(jsonValue));
|
|
581
664
|
}
|
|
582
665
|
|
|
583
666
|
/**
|
|
584
667
|
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
585
668
|
* Update an end user (server-side admin)
|
|
586
669
|
*/
|
|
587
|
-
async updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
588
|
-
await this.updateEndUserByApplicationRaw({ userId: userId, updateEndUserByApplicationRequest: updateEndUserByApplicationRequest }, initOverrides);
|
|
670
|
+
async updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserById200Response> {
|
|
671
|
+
const response = await this.updateEndUserByApplicationRaw({ userId: userId, updateEndUserByApplicationRequest: updateEndUserByApplicationRequest }, initOverrides);
|
|
672
|
+
return await response.value();
|
|
589
673
|
}
|
|
590
674
|
|
|
591
675
|
}
|
|
@@ -166,13 +166,13 @@ export interface DomainsApiInterface {
|
|
|
166
166
|
* @throws {RequiredError}
|
|
167
167
|
* @memberof DomainsApiInterface
|
|
168
168
|
*/
|
|
169
|
-
setDomainInboundRaw(requestParameters: DomainsApiSetDomainInboundOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
169
|
+
setDomainInboundRaw(requestParameters: DomainsApiSetDomainInboundOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDomain200Response>>;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* Toggle email receiving for a domain. When enabled, the domain\'s DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
|
|
173
173
|
* Enable or disable inbound email for a domain
|
|
174
174
|
*/
|
|
175
|
-
setDomainInbound(id: string, setDomainInboundRequest: SetDomainInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
175
|
+
setDomainInbound(id: string, setDomainInboundRequest: SetDomainInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDomain200Response>;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
|
|
@@ -392,7 +392,7 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
|
|
|
392
392
|
* Toggle email receiving for a domain. When enabled, the domain\'s DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
|
|
393
393
|
* Enable or disable inbound email for a domain
|
|
394
394
|
*/
|
|
395
|
-
async setDomainInboundRaw(requestParameters: DomainsApiSetDomainInboundOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
395
|
+
async setDomainInboundRaw(requestParameters: DomainsApiSetDomainInboundOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDomain200Response>> {
|
|
396
396
|
if (requestParameters['id'] == null) {
|
|
397
397
|
throw new runtime.RequiredError(
|
|
398
398
|
'id',
|
|
@@ -425,15 +425,16 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
|
|
|
425
425
|
body: SetDomainInboundRequestToJSON(requestParameters['setDomainInboundRequest']),
|
|
426
426
|
}, initOverrides);
|
|
427
427
|
|
|
428
|
-
return new runtime.
|
|
428
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetDomain200ResponseFromJSON(jsonValue));
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
/**
|
|
432
432
|
* Toggle email receiving for a domain. When enabled, the domain\'s DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
|
|
433
433
|
* Enable or disable inbound email for a domain
|
|
434
434
|
*/
|
|
435
|
-
async setDomainInbound(id: string, setDomainInboundRequest: SetDomainInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
436
|
-
await this.setDomainInboundRaw({ id: id, setDomainInboundRequest: setDomainInboundRequest }, initOverrides);
|
|
435
|
+
async setDomainInbound(id: string, setDomainInboundRequest: SetDomainInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDomain200Response> {
|
|
436
|
+
const response = await this.setDomainInboundRaw({ id: id, setDomainInboundRequest: setDomainInboundRequest }, initOverrides);
|
|
437
|
+
return await response.value();
|
|
437
438
|
}
|
|
438
439
|
|
|
439
440
|
/**
|