@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.
Files changed (59) hide show
  1. package/dist/commonjs/lib/config.d.ts +3 -3
  2. package/dist/commonjs/lib/config.js +1 -1
  3. package/dist/commonjs/lib/matchers.d.ts.map +1 -1
  4. package/dist/commonjs/lib/matchers.js +22 -2
  5. package/dist/commonjs/lib/matchers.js.map +1 -1
  6. package/dist/commonjs/sdk/users/customers.d.ts +6 -0
  7. package/dist/commonjs/sdk/users/customers.d.ts.map +1 -0
  8. package/dist/commonjs/sdk/users/customers.js +16 -0
  9. package/dist/commonjs/sdk/users/customers.js.map +1 -0
  10. package/dist/commonjs/sdk/users/index.d.ts +12 -11
  11. package/dist/commonjs/sdk/users/index.d.ts.map +1 -1
  12. package/dist/commonjs/sdk/users/index.js +16 -44
  13. package/dist/commonjs/sdk/users/index.js.map +1 -1
  14. package/dist/commonjs/sdk/users/mfa-methods.d.ts +11 -0
  15. package/dist/commonjs/sdk/users/mfa-methods.d.ts.map +1 -0
  16. package/dist/commonjs/sdk/users/mfa-methods.js +36 -0
  17. package/dist/commonjs/sdk/users/mfa-methods.js.map +1 -0
  18. package/dist/commonjs/sdk/users/oauth-accounts.d.ts +6 -0
  19. package/dist/commonjs/sdk/users/oauth-accounts.d.ts.map +1 -0
  20. package/dist/commonjs/sdk/users/oauth-accounts.js +16 -0
  21. package/dist/commonjs/sdk/users/oauth-accounts.js.map +1 -0
  22. package/dist/commonjs/sdk/users/recovery-codes.d.ts +8 -0
  23. package/dist/commonjs/sdk/users/recovery-codes.d.ts.map +1 -0
  24. package/dist/commonjs/sdk/users/recovery-codes.js +24 -0
  25. package/dist/commonjs/sdk/users/recovery-codes.js.map +1 -0
  26. package/dist/esm/lib/config.d.ts +3 -3
  27. package/dist/esm/lib/config.js +1 -1
  28. package/dist/esm/lib/matchers.d.ts.map +1 -1
  29. package/dist/esm/lib/matchers.js +23 -3
  30. package/dist/esm/lib/matchers.js.map +1 -1
  31. package/dist/esm/sdk/users/customers.d.ts +6 -0
  32. package/dist/esm/sdk/users/customers.d.ts.map +1 -0
  33. package/dist/esm/sdk/users/customers.js +12 -0
  34. package/dist/esm/sdk/users/customers.js.map +1 -0
  35. package/dist/esm/sdk/users/index.d.ts +12 -11
  36. package/dist/esm/sdk/users/index.d.ts.map +1 -1
  37. package/dist/esm/sdk/users/index.js +16 -44
  38. package/dist/esm/sdk/users/index.js.map +1 -1
  39. package/dist/esm/sdk/users/mfa-methods.d.ts +11 -0
  40. package/dist/esm/sdk/users/mfa-methods.d.ts.map +1 -0
  41. package/dist/esm/sdk/users/mfa-methods.js +32 -0
  42. package/dist/esm/sdk/users/mfa-methods.js.map +1 -0
  43. package/dist/esm/sdk/users/oauth-accounts.d.ts +6 -0
  44. package/dist/esm/sdk/users/oauth-accounts.d.ts.map +1 -0
  45. package/dist/esm/sdk/users/oauth-accounts.js +12 -0
  46. package/dist/esm/sdk/users/oauth-accounts.js.map +1 -0
  47. package/dist/esm/sdk/users/recovery-codes.d.ts +8 -0
  48. package/dist/esm/sdk/users/recovery-codes.d.ts.map +1 -0
  49. package/dist/esm/sdk/users/recovery-codes.js +20 -0
  50. package/dist/esm/sdk/users/recovery-codes.js.map +1 -0
  51. package/jsr.json +1 -1
  52. package/package.json +1 -1
  53. package/src/lib/config.ts +1 -1
  54. package/src/lib/matchers.ts +37 -3
  55. package/src/sdk/users/customers.ts +21 -0
  56. package/src/sdk/users/index.ts +24 -132
  57. package/src/sdk/users/mfa-methods.ts +81 -0
  58. package/src/sdk/users/oauth-accounts.ts +21 -0
  59. package/src/sdk/users/recovery-codes.ts +45 -0
@@ -0,0 +1,81 @@
1
+ /*
2
+ * User MFA methods 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 { usersListMfaMethods } from "../../funcs/users/usersListMfaMethods.js";
9
+ import { usersGetMfaMethod } from "../../funcs/users/usersGetMfaMethod.js";
10
+ import { usersEnableMfa } from "../../funcs/users/usersEnableMfa.js";
11
+ import { usersDisableMfa } from "../../funcs/users/usersDisableMfa.js";
12
+ import { usersValidateMfa } from "../../funcs/users/usersValidateMfa.js";
13
+ import { usersSendMfa } from "../../funcs/users/usersSendMfa.js";
14
+
15
+ export class UserMfaMethods extends ClientSDK {
16
+ async list(
17
+ request: operations.ListUserMfaMethodsRequest,
18
+ options?: RequestOptions,
19
+ ): Promise<operations.ListUserMfaMethodsResponse> {
20
+ return unwrapAsync(usersListMfaMethods(
21
+ this,
22
+ request,
23
+ options,
24
+ ));
25
+ }
26
+
27
+ async get(
28
+ request: operations.GetMfaMethodRequest,
29
+ options?: RequestOptions,
30
+ ): Promise<operations.GetMfaMethodResponse> {
31
+ return unwrapAsync(usersGetMfaMethod(
32
+ this,
33
+ request,
34
+ options,
35
+ ));
36
+ }
37
+
38
+ async enable(
39
+ request: operations.EnableMfaRequest,
40
+ options?: RequestOptions,
41
+ ): Promise<operations.EnableMfaResponse> {
42
+ return unwrapAsync(usersEnableMfa(
43
+ this,
44
+ request,
45
+ options,
46
+ ));
47
+ }
48
+
49
+ async disable(
50
+ request: operations.DisableMfaRequest,
51
+ options?: RequestOptions,
52
+ ): Promise<operations.DisableMfaResponse> {
53
+ return unwrapAsync(usersDisableMfa(
54
+ this,
55
+ request,
56
+ options,
57
+ ));
58
+ }
59
+
60
+ async validate(
61
+ request: operations.ValidateMfaRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<operations.ValidateMfaResponse> {
64
+ return unwrapAsync(usersValidateMfa(
65
+ this,
66
+ request,
67
+ options,
68
+ ));
69
+ }
70
+
71
+ async send(
72
+ request: operations.SendMfaRequest,
73
+ options?: RequestOptions,
74
+ ): Promise<operations.SendMfaResponse> {
75
+ return unwrapAsync(usersSendMfa(
76
+ this,
77
+ request,
78
+ options,
79
+ ));
80
+ }
81
+ }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * User OAuth accounts 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 { usersListOAuthAccounts } from "../../funcs/users/usersListOAuthAccounts.js";
9
+
10
+ export class UserOAuthAccounts extends ClientSDK {
11
+ async list(
12
+ request: operations.ListUserOAuthAccountsRequest,
13
+ options?: RequestOptions,
14
+ ): Promise<operations.ListUserOAuthAccountsResponse> {
15
+ return unwrapAsync(usersListOAuthAccounts(
16
+ this,
17
+ request,
18
+ options,
19
+ ));
20
+ }
21
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * User recovery codes 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 { usersListRecoveryCodes } from "../../funcs/users/usersListRecoveryCodes.js";
9
+ import { usersRegenerateRecoveryCodes } from "../../funcs/users/usersRegenerateRecoveryCodes.js";
10
+ import { usersValidateRecoveryCode } from "../../funcs/users/usersValidateRecoveryCode.js";
11
+
12
+ export class UserRecoveryCodes extends ClientSDK {
13
+ async list(
14
+ request: operations.ListUserRecoveryCodesRequest,
15
+ options?: RequestOptions,
16
+ ): Promise<operations.ListUserRecoveryCodesResponse> {
17
+ return unwrapAsync(usersListRecoveryCodes(
18
+ this,
19
+ request,
20
+ options,
21
+ ));
22
+ }
23
+
24
+ async regenerate(
25
+ request: operations.RegenerateRecoveryCodesRequest,
26
+ options?: RequestOptions,
27
+ ): Promise<operations.RegenerateRecoveryCodesResponse> {
28
+ return unwrapAsync(usersRegenerateRecoveryCodes(
29
+ this,
30
+ request,
31
+ options,
32
+ ));
33
+ }
34
+
35
+ async validate(
36
+ request: operations.ValidateRecoveryCodeRequest,
37
+ options?: RequestOptions,
38
+ ): Promise<operations.ValidateRecoveryCodeResponse> {
39
+ return unwrapAsync(usersValidateRecoveryCode(
40
+ this,
41
+ request,
42
+ options,
43
+ ));
44
+ }
45
+ }