@ominity/api-typescript 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +1 -1
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +22 -2
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/sdk/users/customers.d.ts +6 -0
- package/dist/commonjs/sdk/users/customers.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/customers.js +16 -0
- package/dist/commonjs/sdk/users/customers.js.map +1 -0
- package/dist/commonjs/sdk/users/index.d.ts +12 -11
- package/dist/commonjs/sdk/users/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/users/index.js +16 -44
- package/dist/commonjs/sdk/users/index.js.map +1 -1
- package/dist/commonjs/sdk/users/mfa-methods.d.ts +11 -0
- package/dist/commonjs/sdk/users/mfa-methods.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/mfa-methods.js +36 -0
- package/dist/commonjs/sdk/users/mfa-methods.js.map +1 -0
- package/dist/commonjs/sdk/users/oauth-accounts.d.ts +6 -0
- package/dist/commonjs/sdk/users/oauth-accounts.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/oauth-accounts.js +16 -0
- package/dist/commonjs/sdk/users/oauth-accounts.js.map +1 -0
- package/dist/commonjs/sdk/users/recovery-codes.d.ts +8 -0
- package/dist/commonjs/sdk/users/recovery-codes.d.ts.map +1 -0
- package/dist/commonjs/sdk/users/recovery-codes.js +24 -0
- package/dist/commonjs/sdk/users/recovery-codes.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +1 -1
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +23 -3
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/sdk/users/customers.d.ts +6 -0
- package/dist/esm/sdk/users/customers.d.ts.map +1 -0
- package/dist/esm/sdk/users/customers.js +12 -0
- package/dist/esm/sdk/users/customers.js.map +1 -0
- package/dist/esm/sdk/users/index.d.ts +12 -11
- package/dist/esm/sdk/users/index.d.ts.map +1 -1
- package/dist/esm/sdk/users/index.js +16 -44
- package/dist/esm/sdk/users/index.js.map +1 -1
- package/dist/esm/sdk/users/mfa-methods.d.ts +11 -0
- package/dist/esm/sdk/users/mfa-methods.d.ts.map +1 -0
- package/dist/esm/sdk/users/mfa-methods.js +32 -0
- package/dist/esm/sdk/users/mfa-methods.js.map +1 -0
- package/dist/esm/sdk/users/oauth-accounts.d.ts +6 -0
- package/dist/esm/sdk/users/oauth-accounts.d.ts.map +1 -0
- package/dist/esm/sdk/users/oauth-accounts.js +12 -0
- package/dist/esm/sdk/users/oauth-accounts.js.map +1 -0
- package/dist/esm/sdk/users/recovery-codes.d.ts +8 -0
- package/dist/esm/sdk/users/recovery-codes.d.ts.map +1 -0
- package/dist/esm/sdk/users/recovery-codes.js +20 -0
- package/dist/esm/sdk/users/recovery-codes.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +1 -1
- package/src/lib/matchers.ts +37 -3
- package/src/sdk/users/customers.ts +21 -0
- package/src/sdk/users/index.ts +24 -132
- package/src/sdk/users/mfa-methods.ts +81 -0
- package/src/sdk/users/oauth-accounts.ts +21 -0
- package/src/sdk/users/recovery-codes.ts +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/customers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAG/D,qBAAa,aAAc,SAAQ,SAAS;IACpC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;CAOjD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* User customers SDK.
|
|
3
|
+
*/
|
|
4
|
+
import { ClientSDK } from "../../lib/sdks.js";
|
|
5
|
+
import { unwrapAsync } from "../../types/fp.js";
|
|
6
|
+
import { usersListCustomers } from "../../funcs/users/usersListCustomers.js";
|
|
7
|
+
export class UserCustomers extends ClientSDK {
|
|
8
|
+
async list(request, options) {
|
|
9
|
+
return unwrapAsync(usersListCustomers(this, request, options));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=customers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../../src/sdk/users/customers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,IAAI,CACR,OAA4C,EAC5C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
2
2
|
import * as operations from "../../models/operations/index.js";
|
|
3
|
+
import { UserCustomers } from "./customers.js";
|
|
3
4
|
import { UserLogins } from "./logins.js";
|
|
5
|
+
import { UserMfaMethods } from "./mfa-methods.js";
|
|
6
|
+
import { UserOAuthAccounts } from "./oauth-accounts.js";
|
|
7
|
+
import { UserRecoveryCodes } from "./recovery-codes.js";
|
|
4
8
|
export declare class Users extends ClientSDK {
|
|
5
9
|
private _logins?;
|
|
10
|
+
private _customers?;
|
|
11
|
+
private _oauthAccounts?;
|
|
12
|
+
private _mfaMethods?;
|
|
13
|
+
private _recoveryCodes?;
|
|
6
14
|
get logins(): UserLogins;
|
|
15
|
+
get customers(): UserCustomers;
|
|
16
|
+
get oauthAccounts(): UserOAuthAccounts;
|
|
17
|
+
get mfaMethods(): UserMfaMethods;
|
|
18
|
+
get recoveryCodes(): UserRecoveryCodes;
|
|
7
19
|
list(request?: operations.UsersListParams | undefined, options?: RequestOptions): Promise<operations.ListUsersResponse>;
|
|
8
20
|
get(request: operations.GetUserRequest, options?: RequestOptions): Promise<operations.GetUserResponse>;
|
|
9
21
|
create(request: operations.CreateUserRequest, options?: RequestOptions): Promise<operations.CreateUserResponse>;
|
|
@@ -11,16 +23,5 @@ export declare class Users extends ClientSDK {
|
|
|
11
23
|
issueToken(request: operations.IssueUserAccessTokenRequest, options?: RequestOptions): Promise<operations.IssueUserAccessTokenResponse>;
|
|
12
24
|
sendPasswordResetLink(request: operations.SendPasswordResetLinkRequest, options?: RequestOptions): Promise<operations.SendPasswordResetLinkResponse>;
|
|
13
25
|
resetPassword(request: operations.ResetPasswordRequest, options?: RequestOptions): Promise<operations.ResetPasswordResponse>;
|
|
14
|
-
listCustomers(request: operations.ListUserCustomersRequest, options?: RequestOptions): Promise<operations.ListUserCustomersResponse>;
|
|
15
|
-
listOAuthAccounts(request: operations.ListUserOAuthAccountsRequest, options?: RequestOptions): Promise<operations.ListUserOAuthAccountsResponse>;
|
|
16
|
-
listMfaMethods(request: operations.ListUserMfaMethodsRequest, options?: RequestOptions): Promise<operations.ListUserMfaMethodsResponse>;
|
|
17
|
-
getMfaMethod(request: operations.GetMfaMethodRequest, options?: RequestOptions): Promise<operations.GetMfaMethodResponse>;
|
|
18
|
-
enableMfa(request: operations.EnableMfaRequest, options?: RequestOptions): Promise<operations.EnableMfaResponse>;
|
|
19
|
-
disableMfa(request: operations.DisableMfaRequest, options?: RequestOptions): Promise<operations.DisableMfaResponse>;
|
|
20
|
-
validateMfa(request: operations.ValidateMfaRequest, options?: RequestOptions): Promise<operations.ValidateMfaResponse>;
|
|
21
|
-
sendMfa(request: operations.SendMfaRequest, options?: RequestOptions): Promise<operations.SendMfaResponse>;
|
|
22
|
-
listRecoveryCodes(request: operations.ListUserRecoveryCodesRequest, options?: RequestOptions): Promise<operations.ListUserRecoveryCodesResponse>;
|
|
23
|
-
regenerateRecoveryCodes(request: operations.RegenerateRecoveryCodesRequest, options?: RequestOptions): Promise<operations.RegenerateRecoveryCodesResponse>;
|
|
24
|
-
validateRecoveryCode(request: operations.ValidateRecoveryCodeRequest, options?: RequestOptions): Promise<operations.ValidateRecoveryCodeResponse>;
|
|
25
26
|
}
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAQ/D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,KAAM,SAAQ,SAAS;IAClC,OAAO,CAAC,OAAO,CAAC,CAAa;IAC7B,OAAO,C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@ -10,22 +10,27 @@ import { usersList } from "../../funcs/users/usersList.js";
|
|
|
10
10
|
import { usersUpdate } from "../../funcs/users/usersUpdate.js";
|
|
11
11
|
import { usersSendPasswordResetLink } from "../../funcs/users/usersSendPasswordResetLink.js";
|
|
12
12
|
import { usersResetPassword } from "../../funcs/users/usersResetPassword.js";
|
|
13
|
-
import {
|
|
14
|
-
import { usersListOAuthAccounts } from "../../funcs/users/usersListOAuthAccounts.js";
|
|
15
|
-
import { usersListMfaMethods } from "../../funcs/users/usersListMfaMethods.js";
|
|
16
|
-
import { usersGetMfaMethod } from "../../funcs/users/usersGetMfaMethod.js";
|
|
17
|
-
import { usersEnableMfa } from "../../funcs/users/usersEnableMfa.js";
|
|
18
|
-
import { usersDisableMfa } from "../../funcs/users/usersDisableMfa.js";
|
|
19
|
-
import { usersValidateMfa } from "../../funcs/users/usersValidateMfa.js";
|
|
20
|
-
import { usersSendMfa } from "../../funcs/users/usersSendMfa.js";
|
|
21
|
-
import { usersListRecoveryCodes } from "../../funcs/users/usersListRecoveryCodes.js";
|
|
22
|
-
import { usersRegenerateRecoveryCodes } from "../../funcs/users/usersRegenerateRecoveryCodes.js";
|
|
23
|
-
import { usersValidateRecoveryCode } from "../../funcs/users/usersValidateRecoveryCode.js";
|
|
13
|
+
import { UserCustomers } from "./customers.js";
|
|
24
14
|
import { UserLogins } from "./logins.js";
|
|
15
|
+
import { UserMfaMethods } from "./mfa-methods.js";
|
|
16
|
+
import { UserOAuthAccounts } from "./oauth-accounts.js";
|
|
17
|
+
import { UserRecoveryCodes } from "./recovery-codes.js";
|
|
25
18
|
export class Users extends ClientSDK {
|
|
26
19
|
get logins() {
|
|
27
20
|
return (this._logins ?? (this._logins = new UserLogins(this._options)));
|
|
28
21
|
}
|
|
22
|
+
get customers() {
|
|
23
|
+
return (this._customers ?? (this._customers = new UserCustomers(this._options)));
|
|
24
|
+
}
|
|
25
|
+
get oauthAccounts() {
|
|
26
|
+
return (this._oauthAccounts ?? (this._oauthAccounts = new UserOAuthAccounts(this._options)));
|
|
27
|
+
}
|
|
28
|
+
get mfaMethods() {
|
|
29
|
+
return (this._mfaMethods ?? (this._mfaMethods = new UserMfaMethods(this._options)));
|
|
30
|
+
}
|
|
31
|
+
get recoveryCodes() {
|
|
32
|
+
return (this._recoveryCodes ?? (this._recoveryCodes = new UserRecoveryCodes(this._options)));
|
|
33
|
+
}
|
|
29
34
|
async list(request, options) {
|
|
30
35
|
return unwrapAsync(usersList(this, request, options));
|
|
31
36
|
}
|
|
@@ -47,38 +52,5 @@ export class Users extends ClientSDK {
|
|
|
47
52
|
async resetPassword(request, options) {
|
|
48
53
|
return unwrapAsync(usersResetPassword(this, request, options));
|
|
49
54
|
}
|
|
50
|
-
async listCustomers(request, options) {
|
|
51
|
-
return unwrapAsync(usersListCustomers(this, request, options));
|
|
52
|
-
}
|
|
53
|
-
async listOAuthAccounts(request, options) {
|
|
54
|
-
return unwrapAsync(usersListOAuthAccounts(this, request, options));
|
|
55
|
-
}
|
|
56
|
-
async listMfaMethods(request, options) {
|
|
57
|
-
return unwrapAsync(usersListMfaMethods(this, request, options));
|
|
58
|
-
}
|
|
59
|
-
async getMfaMethod(request, options) {
|
|
60
|
-
return unwrapAsync(usersGetMfaMethod(this, request, options));
|
|
61
|
-
}
|
|
62
|
-
async enableMfa(request, options) {
|
|
63
|
-
return unwrapAsync(usersEnableMfa(this, request, options));
|
|
64
|
-
}
|
|
65
|
-
async disableMfa(request, options) {
|
|
66
|
-
return unwrapAsync(usersDisableMfa(this, request, options));
|
|
67
|
-
}
|
|
68
|
-
async validateMfa(request, options) {
|
|
69
|
-
return unwrapAsync(usersValidateMfa(this, request, options));
|
|
70
|
-
}
|
|
71
|
-
async sendMfa(request, options) {
|
|
72
|
-
return unwrapAsync(usersSendMfa(this, request, options));
|
|
73
|
-
}
|
|
74
|
-
async listRecoveryCodes(request, options) {
|
|
75
|
-
return unwrapAsync(usersListRecoveryCodes(this, request, options));
|
|
76
|
-
}
|
|
77
|
-
async regenerateRecoveryCodes(request, options) {
|
|
78
|
-
return unwrapAsync(usersRegenerateRecoveryCodes(this, request, options));
|
|
79
|
-
}
|
|
80
|
-
async validateRecoveryCode(request, options) {
|
|
81
|
-
return unwrapAsync(usersValidateRecoveryCode(this, request, options));
|
|
82
|
-
}
|
|
83
55
|
}
|
|
84
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/users/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/users/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,C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AAC,IAAI,CACR,OAAgD,EAChD,OAAwB;QAExB,OAAO,WAAW,CAAC,SAAS,CAC1B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CACP,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,QAAQ,CACzB,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAA+C,EAC/C,OAAwB;QAExB,OAAO,WAAW,CAAC,eAAe,CAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,OAAgD,EAChD,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,OAAwC,EACxC,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
2
|
+
import * as operations from "../../models/operations/index.js";
|
|
3
|
+
export declare class UserMfaMethods extends ClientSDK {
|
|
4
|
+
list(request: operations.ListUserMfaMethodsRequest, options?: RequestOptions): Promise<operations.ListUserMfaMethodsResponse>;
|
|
5
|
+
get(request: operations.GetMfaMethodRequest, options?: RequestOptions): Promise<operations.GetMfaMethodResponse>;
|
|
6
|
+
enable(request: operations.EnableMfaRequest, options?: RequestOptions): Promise<operations.EnableMfaResponse>;
|
|
7
|
+
disable(request: operations.DisableMfaRequest, options?: RequestOptions): Promise<operations.DisableMfaResponse>;
|
|
8
|
+
validate(request: operations.ValidateMfaRequest, options?: RequestOptions): Promise<operations.ValidateMfaResponse>;
|
|
9
|
+
send(request: operations.SendMfaRequest, options?: RequestOptions): Promise<operations.SendMfaResponse>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=mfa-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfa-methods.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/mfa-methods.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAQ/D,qBAAa,cAAe,SAAQ,SAAS;IACrC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;IAQ3C,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQrC,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAQlC,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQnC,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQpC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,cAAc,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC;CAOvC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* User MFA methods SDK.
|
|
3
|
+
*/
|
|
4
|
+
import { ClientSDK } from "../../lib/sdks.js";
|
|
5
|
+
import { unwrapAsync } from "../../types/fp.js";
|
|
6
|
+
import { usersListMfaMethods } from "../../funcs/users/usersListMfaMethods.js";
|
|
7
|
+
import { usersGetMfaMethod } from "../../funcs/users/usersGetMfaMethod.js";
|
|
8
|
+
import { usersEnableMfa } from "../../funcs/users/usersEnableMfa.js";
|
|
9
|
+
import { usersDisableMfa } from "../../funcs/users/usersDisableMfa.js";
|
|
10
|
+
import { usersValidateMfa } from "../../funcs/users/usersValidateMfa.js";
|
|
11
|
+
import { usersSendMfa } from "../../funcs/users/usersSendMfa.js";
|
|
12
|
+
export class UserMfaMethods extends ClientSDK {
|
|
13
|
+
async list(request, options) {
|
|
14
|
+
return unwrapAsync(usersListMfaMethods(this, request, options));
|
|
15
|
+
}
|
|
16
|
+
async get(request, options) {
|
|
17
|
+
return unwrapAsync(usersGetMfaMethod(this, request, options));
|
|
18
|
+
}
|
|
19
|
+
async enable(request, options) {
|
|
20
|
+
return unwrapAsync(usersEnableMfa(this, request, options));
|
|
21
|
+
}
|
|
22
|
+
async disable(request, options) {
|
|
23
|
+
return unwrapAsync(usersDisableMfa(this, request, options));
|
|
24
|
+
}
|
|
25
|
+
async validate(request, options) {
|
|
26
|
+
return unwrapAsync(usersValidateMfa(this, request, options));
|
|
27
|
+
}
|
|
28
|
+
async send(request, options) {
|
|
29
|
+
return unwrapAsync(usersSendMfa(this, request, options));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=mfa-methods.js.map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,gBAAgB,CACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CACR,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
2
|
+
import * as operations from "../../models/operations/index.js";
|
|
3
|
+
export declare class UserOAuthAccounts extends ClientSDK {
|
|
4
|
+
list(request: operations.ListUserOAuthAccountsRequest, options?: RequestOptions): Promise<operations.ListUserOAuthAccountsResponse>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=oauth-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-accounts.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/oauth-accounts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAG/D,qBAAa,iBAAkB,SAAQ,SAAS;IACxC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAOrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* User OAuth accounts SDK.
|
|
3
|
+
*/
|
|
4
|
+
import { ClientSDK } from "../../lib/sdks.js";
|
|
5
|
+
import { unwrapAsync } from "../../types/fp.js";
|
|
6
|
+
import { usersListOAuthAccounts } from "../../funcs/users/usersListOAuthAccounts.js";
|
|
7
|
+
export class UserOAuthAccounts extends ClientSDK {
|
|
8
|
+
async list(request, options) {
|
|
9
|
+
return unwrapAsync(usersListOAuthAccounts(this, request, options));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=oauth-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-accounts.js","sourceRoot":"","sources":["../../../../src/sdk/users/oauth-accounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,KAAK,CAAC,IAAI,CACR,OAAgD,EAChD,OAAwB;QAExB,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
2
|
+
import * as operations from "../../models/operations/index.js";
|
|
3
|
+
export declare class UserRecoveryCodes extends ClientSDK {
|
|
4
|
+
list(request: operations.ListUserRecoveryCodesRequest, options?: RequestOptions): Promise<operations.ListUserRecoveryCodesResponse>;
|
|
5
|
+
regenerate(request: operations.RegenerateRecoveryCodesRequest, options?: RequestOptions): Promise<operations.RegenerateRecoveryCodesResponse>;
|
|
6
|
+
validate(request: operations.ValidateRecoveryCodeRequest, options?: RequestOptions): Promise<operations.ValidateRecoveryCodeResponse>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=recovery-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-codes.d.ts","sourceRoot":"","sources":["../../../../src/sdk/users/recovery-codes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAK/D,qBAAa,iBAAkB,SAAQ,SAAS;IACxC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAQ9C,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQhD,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAOpD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* User recovery codes SDK.
|
|
3
|
+
*/
|
|
4
|
+
import { ClientSDK } from "../../lib/sdks.js";
|
|
5
|
+
import { unwrapAsync } from "../../types/fp.js";
|
|
6
|
+
import { usersListRecoveryCodes } from "../../funcs/users/usersListRecoveryCodes.js";
|
|
7
|
+
import { usersRegenerateRecoveryCodes } from "../../funcs/users/usersRegenerateRecoveryCodes.js";
|
|
8
|
+
import { usersValidateRecoveryCode } from "../../funcs/users/usersValidateRecoveryCode.js";
|
|
9
|
+
export class UserRecoveryCodes extends ClientSDK {
|
|
10
|
+
async list(request, options) {
|
|
11
|
+
return unwrapAsync(usersListRecoveryCodes(this, request, options));
|
|
12
|
+
}
|
|
13
|
+
async regenerate(request, options) {
|
|
14
|
+
return unwrapAsync(usersRegenerateRecoveryCodes(this, request, options));
|
|
15
|
+
}
|
|
16
|
+
async validate(request, options) {
|
|
17
|
+
return unwrapAsync(usersValidateRecoveryCode(this, request, options));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=recovery-codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-codes.js","sourceRoot":"","sources":["../../../../src/sdk/users/recovery-codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAE3F,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,KAAK,CAAC,IAAI,CACR,OAAgD,EAChD,OAAwB;QAExB,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAkD,EAClD,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAA+C,EAC/C,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
package/src/lib/matchers.ts
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
import { OminityDefaultError } from "../models/errors/ominity-default-error.js";
|
|
3
3
|
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
4
4
|
import { ERR, OK, Result } from "../types/fp.js";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
matchContentType,
|
|
7
|
+
matchStatusCode,
|
|
8
|
+
StatusCodePredicate,
|
|
9
|
+
} from "./http.js";
|
|
6
10
|
import { isPlainObject } from "./is-plain-object.js";
|
|
7
11
|
|
|
8
12
|
export type Encoding =
|
|
@@ -176,6 +180,19 @@ export type MatchFunc<T, E> = (
|
|
|
176
180
|
options?: { resultKey?: string; extraFields?: Record<string, unknown> },
|
|
177
181
|
) => Promise<[result: Result<T, E>, raw: unknown]>;
|
|
178
182
|
|
|
183
|
+
function isJsonLikeResponse(response: Response): boolean {
|
|
184
|
+
const contentType =
|
|
185
|
+
response.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase()
|
|
186
|
+
|| "application/octet-stream";
|
|
187
|
+
const [type = "", subtype = ""] = contentType.split("/", 2);
|
|
188
|
+
|
|
189
|
+
if (type !== "application" || subtype.length === 0) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return subtype === "json" || subtype.endsWith("+json");
|
|
194
|
+
}
|
|
195
|
+
|
|
179
196
|
export function match<T, E>(
|
|
180
197
|
...matchers: Array<Matcher<T, E>>
|
|
181
198
|
): MatchFunc<T, E | OminityDefaultError | ResponseValidationError> {
|
|
@@ -193,13 +210,30 @@ export function match<T, E>(
|
|
|
193
210
|
let matcher: Matcher<T, E> | undefined;
|
|
194
211
|
for (const match of matchers) {
|
|
195
212
|
const { codes } = match;
|
|
213
|
+
const hasExplicitContentType =
|
|
214
|
+
"ctype" in match && typeof match.ctype === "string";
|
|
196
215
|
const ctpattern = "ctype" in match
|
|
197
216
|
? match.ctype
|
|
198
217
|
: DEFAULT_CONTENT_TYPES[match.enc];
|
|
199
|
-
|
|
218
|
+
|
|
219
|
+
if (!matchStatusCode(response, codes)) {
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (!ctpattern) {
|
|
200
224
|
matcher = match;
|
|
201
225
|
break;
|
|
202
|
-
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (matchContentType(response, ctpattern)) {
|
|
229
|
+
matcher = match;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// The API often returns HAL+JSON (`application/*+json`) for JSON payloads.
|
|
234
|
+
// Keep explicit content-type matchers strict, but allow default JSON
|
|
235
|
+
// matchers to accept any JSON-compatible media type.
|
|
236
|
+
if (!hasExplicitContentType && match.enc === "json" && isJsonLikeResponse(response)) {
|
|
203
237
|
matcher = match;
|
|
204
238
|
break;
|
|
205
239
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* User customers SDK.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK, RequestOptions } from "../../lib/sdks.js";
|
|
6
|
+
import { unwrapAsync } from "../../types/fp.js";
|
|
7
|
+
import * as operations from "../../models/operations/index.js";
|
|
8
|
+
import { usersListCustomers } from "../../funcs/users/usersListCustomers.js";
|
|
9
|
+
|
|
10
|
+
export class UserCustomers extends ClientSDK {
|
|
11
|
+
async list(
|
|
12
|
+
request: operations.ListUserCustomersRequest,
|
|
13
|
+
options?: RequestOptions,
|
|
14
|
+
): Promise<operations.ListUserCustomersResponse> {
|
|
15
|
+
return unwrapAsync(usersListCustomers(
|
|
16
|
+
this,
|
|
17
|
+
request,
|
|
18
|
+
options,
|
|
19
|
+
));
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/sdk/users/index.ts
CHANGED
|
@@ -12,26 +12,39 @@ import { usersList } from "../../funcs/users/usersList.js";
|
|
|
12
12
|
import { usersUpdate } from "../../funcs/users/usersUpdate.js";
|
|
13
13
|
import { usersSendPasswordResetLink } from "../../funcs/users/usersSendPasswordResetLink.js";
|
|
14
14
|
import { usersResetPassword } from "../../funcs/users/usersResetPassword.js";
|
|
15
|
-
import {
|
|
16
|
-
import { usersListOAuthAccounts } from "../../funcs/users/usersListOAuthAccounts.js";
|
|
17
|
-
import { usersListMfaMethods } from "../../funcs/users/usersListMfaMethods.js";
|
|
18
|
-
import { usersGetMfaMethod } from "../../funcs/users/usersGetMfaMethod.js";
|
|
19
|
-
import { usersEnableMfa } from "../../funcs/users/usersEnableMfa.js";
|
|
20
|
-
import { usersDisableMfa } from "../../funcs/users/usersDisableMfa.js";
|
|
21
|
-
import { usersValidateMfa } from "../../funcs/users/usersValidateMfa.js";
|
|
22
|
-
import { usersSendMfa } from "../../funcs/users/usersSendMfa.js";
|
|
23
|
-
import { usersListRecoveryCodes } from "../../funcs/users/usersListRecoveryCodes.js";
|
|
24
|
-
import { usersRegenerateRecoveryCodes } from "../../funcs/users/usersRegenerateRecoveryCodes.js";
|
|
25
|
-
import { usersValidateRecoveryCode } from "../../funcs/users/usersValidateRecoveryCode.js";
|
|
15
|
+
import { UserCustomers } from "./customers.js";
|
|
26
16
|
import { UserLogins } from "./logins.js";
|
|
17
|
+
import { UserMfaMethods } from "./mfa-methods.js";
|
|
18
|
+
import { UserOAuthAccounts } from "./oauth-accounts.js";
|
|
19
|
+
import { UserRecoveryCodes } from "./recovery-codes.js";
|
|
27
20
|
|
|
28
21
|
export class Users extends ClientSDK {
|
|
29
22
|
private _logins?: UserLogins;
|
|
23
|
+
private _customers?: UserCustomers;
|
|
24
|
+
private _oauthAccounts?: UserOAuthAccounts;
|
|
25
|
+
private _mfaMethods?: UserMfaMethods;
|
|
26
|
+
private _recoveryCodes?: UserRecoveryCodes;
|
|
30
27
|
|
|
31
28
|
get logins(): UserLogins {
|
|
32
29
|
return (this._logins ??= new UserLogins(this._options));
|
|
33
30
|
}
|
|
34
31
|
|
|
32
|
+
get customers(): UserCustomers {
|
|
33
|
+
return (this._customers ??= new UserCustomers(this._options));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get oauthAccounts(): UserOAuthAccounts {
|
|
37
|
+
return (this._oauthAccounts ??= new UserOAuthAccounts(this._options));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get mfaMethods(): UserMfaMethods {
|
|
41
|
+
return (this._mfaMethods ??= new UserMfaMethods(this._options));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
get recoveryCodes(): UserRecoveryCodes {
|
|
45
|
+
return (this._recoveryCodes ??= new UserRecoveryCodes(this._options));
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
async list(
|
|
36
49
|
request?: operations.UsersListParams | undefined,
|
|
37
50
|
options?: RequestOptions,
|
|
@@ -108,125 +121,4 @@ export class Users extends ClientSDK {
|
|
|
108
121
|
options,
|
|
109
122
|
));
|
|
110
123
|
}
|
|
111
|
-
|
|
112
|
-
async listCustomers(
|
|
113
|
-
request: operations.ListUserCustomersRequest,
|
|
114
|
-
options?: RequestOptions,
|
|
115
|
-
): Promise<operations.ListUserCustomersResponse> {
|
|
116
|
-
return unwrapAsync(usersListCustomers(
|
|
117
|
-
this,
|
|
118
|
-
request,
|
|
119
|
-
options,
|
|
120
|
-
));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
async listOAuthAccounts(
|
|
124
|
-
request: operations.ListUserOAuthAccountsRequest,
|
|
125
|
-
options?: RequestOptions,
|
|
126
|
-
): Promise<operations.ListUserOAuthAccountsResponse> {
|
|
127
|
-
return unwrapAsync(usersListOAuthAccounts(
|
|
128
|
-
this,
|
|
129
|
-
request,
|
|
130
|
-
options,
|
|
131
|
-
));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async listMfaMethods(
|
|
135
|
-
request: operations.ListUserMfaMethodsRequest,
|
|
136
|
-
options?: RequestOptions,
|
|
137
|
-
): Promise<operations.ListUserMfaMethodsResponse> {
|
|
138
|
-
return unwrapAsync(usersListMfaMethods(
|
|
139
|
-
this,
|
|
140
|
-
request,
|
|
141
|
-
options,
|
|
142
|
-
));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
async getMfaMethod(
|
|
146
|
-
request: operations.GetMfaMethodRequest,
|
|
147
|
-
options?: RequestOptions,
|
|
148
|
-
): Promise<operations.GetMfaMethodResponse> {
|
|
149
|
-
return unwrapAsync(usersGetMfaMethod(
|
|
150
|
-
this,
|
|
151
|
-
request,
|
|
152
|
-
options,
|
|
153
|
-
));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
async enableMfa(
|
|
157
|
-
request: operations.EnableMfaRequest,
|
|
158
|
-
options?: RequestOptions,
|
|
159
|
-
): Promise<operations.EnableMfaResponse> {
|
|
160
|
-
return unwrapAsync(usersEnableMfa(
|
|
161
|
-
this,
|
|
162
|
-
request,
|
|
163
|
-
options,
|
|
164
|
-
));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
async disableMfa(
|
|
168
|
-
request: operations.DisableMfaRequest,
|
|
169
|
-
options?: RequestOptions,
|
|
170
|
-
): Promise<operations.DisableMfaResponse> {
|
|
171
|
-
return unwrapAsync(usersDisableMfa(
|
|
172
|
-
this,
|
|
173
|
-
request,
|
|
174
|
-
options,
|
|
175
|
-
));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
async validateMfa(
|
|
179
|
-
request: operations.ValidateMfaRequest,
|
|
180
|
-
options?: RequestOptions,
|
|
181
|
-
): Promise<operations.ValidateMfaResponse> {
|
|
182
|
-
return unwrapAsync(usersValidateMfa(
|
|
183
|
-
this,
|
|
184
|
-
request,
|
|
185
|
-
options,
|
|
186
|
-
));
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
async sendMfa(
|
|
190
|
-
request: operations.SendMfaRequest,
|
|
191
|
-
options?: RequestOptions,
|
|
192
|
-
): Promise<operations.SendMfaResponse> {
|
|
193
|
-
return unwrapAsync(usersSendMfa(
|
|
194
|
-
this,
|
|
195
|
-
request,
|
|
196
|
-
options,
|
|
197
|
-
));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
async listRecoveryCodes(
|
|
201
|
-
request: operations.ListUserRecoveryCodesRequest,
|
|
202
|
-
options?: RequestOptions,
|
|
203
|
-
): Promise<operations.ListUserRecoveryCodesResponse> {
|
|
204
|
-
return unwrapAsync(usersListRecoveryCodes(
|
|
205
|
-
this,
|
|
206
|
-
request,
|
|
207
|
-
options,
|
|
208
|
-
));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async regenerateRecoveryCodes(
|
|
212
|
-
request: operations.RegenerateRecoveryCodesRequest,
|
|
213
|
-
options?: RequestOptions,
|
|
214
|
-
): Promise<operations.RegenerateRecoveryCodesResponse> {
|
|
215
|
-
return unwrapAsync(usersRegenerateRecoveryCodes(
|
|
216
|
-
this,
|
|
217
|
-
request,
|
|
218
|
-
options,
|
|
219
|
-
));
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
async validateRecoveryCode(
|
|
223
|
-
request: operations.ValidateRecoveryCodeRequest,
|
|
224
|
-
options?: RequestOptions,
|
|
225
|
-
): Promise<operations.ValidateRecoveryCodeResponse> {
|
|
226
|
-
return unwrapAsync(usersValidateRecoveryCode(
|
|
227
|
-
this,
|
|
228
|
-
request,
|
|
229
|
-
options,
|
|
230
|
-
));
|
|
231
|
-
}
|
|
232
124
|
}
|