@extrahorizon/javascript-sdk 8.2.0 → 8.2.1-dev-49-61b4511

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 (152) hide show
  1. package/CHANGELOG.md +1182 -1161
  2. package/README.md +108 -119
  3. package/build/index.cjs.js +1 -1
  4. package/build/index.mjs +1 -1
  5. package/build/types/btoa.d.ts +6 -6
  6. package/build/types/client.d.ts +136 -136
  7. package/build/types/constants.d.ts +15 -15
  8. package/build/types/errorHandler.d.ts +2 -2
  9. package/build/types/errors.d.ts +332 -332
  10. package/build/types/http/client.d.ts +2 -2
  11. package/build/types/http/index.d.ts +4 -4
  12. package/build/types/http/interceptors.d.ts +9 -9
  13. package/build/types/http/oAuth1Signature.d.ts +14 -14
  14. package/build/types/http/oauth1.d.ts +3 -3
  15. package/build/types/http/oauth2.d.ts +3 -3
  16. package/build/types/http/proxy.d.ts +3 -3
  17. package/build/types/http/types.d.ts +331 -331
  18. package/build/types/http/utils.d.ts +21 -21
  19. package/build/types/index.d.ts +9 -9
  20. package/build/types/mock.d.ts +43 -43
  21. package/build/types/mockType.d.ts +1547 -1511
  22. package/build/types/parseStoredCredentials.d.ts +11 -11
  23. package/build/types/rql/index.d.ts +16 -16
  24. package/build/types/rql/parser.d.ts +1 -1
  25. package/build/types/rql/types.d.ts +168 -168
  26. package/build/types/services/auth/applications/index.d.ts +5 -5
  27. package/build/types/services/auth/applications/types.d.ts +260 -190
  28. package/build/types/services/auth/index.d.ts +3 -3
  29. package/build/types/services/auth/oauth1/index.d.ts +5 -5
  30. package/build/types/services/auth/oauth1/types.d.ts +63 -63
  31. package/build/types/services/auth/oauth2/index.d.ts +5 -5
  32. package/build/types/services/auth/oauth2/types.d.ts +52 -52
  33. package/build/types/services/auth/oidc/index.d.ts +5 -5
  34. package/build/types/services/auth/oidc/loginAttempts/index.d.ts +5 -5
  35. package/build/types/services/auth/oidc/loginAttempts/types.d.ts +67 -67
  36. package/build/types/services/auth/oidc/providers/index.d.ts +5 -5
  37. package/build/types/services/auth/oidc/providers/types.d.ts +144 -144
  38. package/build/types/services/auth/oidc/types.d.ts +40 -40
  39. package/build/types/services/auth/types.d.ts +39 -39
  40. package/build/types/services/auth/users/index.d.ts +5 -5
  41. package/build/types/services/auth/users/types.d.ts +121 -121
  42. package/build/types/services/configurations/general.d.ts +5 -5
  43. package/build/types/services/configurations/groups.d.ts +5 -5
  44. package/build/types/services/configurations/index.d.ts +10 -10
  45. package/build/types/services/configurations/patients.d.ts +5 -5
  46. package/build/types/services/configurations/staff.d.ts +5 -5
  47. package/build/types/services/configurations/types.d.ts +222 -222
  48. package/build/types/services/configurations/users.d.ts +5 -5
  49. package/build/types/services/data/comments.d.ts +5 -5
  50. package/build/types/services/data/documents.d.ts +5 -5
  51. package/build/types/services/data/index.d.ts +13 -13
  52. package/build/types/services/data/indexes.d.ts +5 -5
  53. package/build/types/services/data/infrastructure.d.ts +10 -10
  54. package/build/types/services/data/json-schema.d.ts +121 -121
  55. package/build/types/services/data/properties.d.ts +5 -5
  56. package/build/types/services/data/schemas.d.ts +5 -5
  57. package/build/types/services/data/statuses.d.ts +5 -5
  58. package/build/types/services/data/transitions.d.ts +5 -5
  59. package/build/types/services/data/types.d.ts +899 -899
  60. package/build/types/services/dispatchers/actions/index.d.ts +5 -5
  61. package/build/types/services/dispatchers/actions/types.d.ts +78 -78
  62. package/build/types/services/dispatchers/dispatchers/index.d.ts +5 -5
  63. package/build/types/services/dispatchers/dispatchers/types.d.ts +111 -111
  64. package/build/types/services/dispatchers/index.d.ts +7 -7
  65. package/build/types/services/dispatchers/types.d.ts +2 -2
  66. package/build/types/services/events/events.d.ts +5 -5
  67. package/build/types/services/events/health.d.ts +9 -9
  68. package/build/types/services/events/index.d.ts +6 -6
  69. package/build/types/services/events/subscriptions.d.ts +5 -5
  70. package/build/types/services/events/types.d.ts +90 -90
  71. package/build/types/services/files/files.d.ts +5 -5
  72. package/build/types/services/files/formHelpers.d.ts +3 -3
  73. package/build/types/services/files/index.d.ts +6 -6
  74. package/build/types/services/files/settings/index.d.ts +5 -5
  75. package/build/types/services/files/settings/types.d.ts +38 -38
  76. package/build/types/services/files/tokens.d.ts +5 -5
  77. package/build/types/services/files/types.d.ts +185 -185
  78. package/build/types/services/helpers.d.ts +7 -7
  79. package/build/types/services/http-client.d.ts +22 -22
  80. package/build/types/services/index.d.ts +15 -15
  81. package/build/types/services/localizations/countries.d.ts +5 -5
  82. package/build/types/services/localizations/health.d.ts +9 -9
  83. package/build/types/services/localizations/index.d.ts +4 -4
  84. package/build/types/services/localizations/languages.d.ts +5 -5
  85. package/build/types/services/localizations/localizations.d.ts +5 -5
  86. package/build/types/services/localizations/types.d.ts +145 -145
  87. package/build/types/services/logs/access/index.d.ts +5 -5
  88. package/build/types/services/logs/access/types.d.ts +41 -41
  89. package/build/types/services/logs/index.d.ts +3 -3
  90. package/build/types/services/logs/types.d.ts +4 -4
  91. package/build/types/services/mails/index.d.ts +3 -3
  92. package/build/types/services/mails/mails.d.ts +5 -5
  93. package/build/types/services/mails/types.d.ts +141 -141
  94. package/build/types/services/notifications/health.d.ts +9 -9
  95. package/build/types/services/notifications/index.d.ts +7 -7
  96. package/build/types/services/notifications/notifications.d.ts +5 -5
  97. package/build/types/services/notifications/settings.d.ts +5 -5
  98. package/build/types/services/notifications/types.d.ts +222 -222
  99. package/build/types/services/payments/appStore.d.ts +5 -5
  100. package/build/types/services/payments/appStoreSubscriptions.d.ts +5 -5
  101. package/build/types/services/payments/health.d.ts +9 -9
  102. package/build/types/services/payments/index.d.ts +15 -15
  103. package/build/types/services/payments/orders.d.ts +5 -5
  104. package/build/types/services/payments/playStore.d.ts +5 -5
  105. package/build/types/services/payments/playStoreHistory.d.ts +5 -5
  106. package/build/types/services/payments/playStoreSubscriptions.d.ts +5 -5
  107. package/build/types/services/payments/products.d.ts +5 -5
  108. package/build/types/services/payments/stripe.d.ts +5 -5
  109. package/build/types/services/payments/subscriptions.d.ts +5 -5
  110. package/build/types/services/payments/types.d.ts +1189 -1189
  111. package/build/types/services/profiles/groups.d.ts +5 -5
  112. package/build/types/services/profiles/health.d.ts +9 -9
  113. package/build/types/services/profiles/index.d.ts +9 -9
  114. package/build/types/services/profiles/logs.d.ts +5 -5
  115. package/build/types/services/profiles/profiles.d.ts +5 -5
  116. package/build/types/services/profiles/types.d.ts +370 -369
  117. package/build/types/services/tasks/api/index.d.ts +5 -5
  118. package/build/types/services/tasks/api/types.d.ts +146 -146
  119. package/build/types/services/tasks/apiRequests/index.d.ts +5 -5
  120. package/build/types/services/tasks/apiRequests/logs/index.d.ts +5 -5
  121. package/build/types/services/tasks/apiRequests/logs/types.d.ts +25 -25
  122. package/build/types/services/tasks/apiRequests/types.d.ts +83 -83
  123. package/build/types/services/tasks/functions/index.d.ts +5 -5
  124. package/build/types/services/tasks/functions/types.d.ts +27 -27
  125. package/build/types/services/tasks/index.d.ts +15 -15
  126. package/build/types/services/tasks/logs/index.d.ts +5 -5
  127. package/build/types/services/tasks/logs/types.d.ts +28 -28
  128. package/build/types/services/tasks/schedules/index.d.ts +5 -5
  129. package/build/types/services/tasks/schedules/types.d.ts +88 -88
  130. package/build/types/services/tasks/tasks.d.ts +5 -5
  131. package/build/types/services/tasks/types.d.ts +107 -107
  132. package/build/types/services/templates/index.d.ts +3 -3
  133. package/build/types/services/templates/templates.d.ts +5 -5
  134. package/build/types/services/templates/types.d.ts +202 -202
  135. package/build/types/services/types.d.ts +77 -77
  136. package/build/types/services/users/activationRequests/index.d.ts +4 -4
  137. package/build/types/services/users/activationRequests/types.d.ts +70 -70
  138. package/build/types/services/users/forgotPasswordRequests/index.d.ts +4 -4
  139. package/build/types/services/users/forgotPasswordRequests/types.d.ts +70 -70
  140. package/build/types/services/users/globalRoles.d.ts +5 -5
  141. package/build/types/services/users/groupRoles.d.ts +5 -5
  142. package/build/types/services/users/health.d.ts +9 -9
  143. package/build/types/services/users/index.d.ts +16 -16
  144. package/build/types/services/users/settings/index.d.ts +4 -4
  145. package/build/types/services/users/settings/types.d.ts +47 -47
  146. package/build/types/services/users/types.d.ts +1202 -1055
  147. package/build/types/services/users/users.d.ts +5 -5
  148. package/build/types/sha1.d.ts +11 -11
  149. package/build/types/types.d.ts +102 -102
  150. package/build/types/utils.d.ts +4 -4
  151. package/build/types/version.d.ts +1 -1
  152. package/package.json +62 -62
@@ -1,40 +1,40 @@
1
- import { AffectedRecords } from '../../types';
2
- import { LoginAttemptsService } from './loginAttempts/types';
3
- import { OidcProviderService } from './providers/types';
4
- export * from './loginAttempts/types';
5
- export * from './providers/types';
6
- export interface OidcService {
7
- /**
8
- * ## Link the authenticated user to a provider
9
- * ### You can use this function to link the currently logged-in user to a registered provider.
10
- *
11
- * **Default Permissions:**
12
- * - Any authenticated user can execute this function.
13
- *
14
- * @param providerName {@link string} The name of the OpenID Connect provider to link the user to
15
- * @param data {@link OidcLinkRequestBody} - The link to OpenID Connect provider data
16
- * @returns An affected records response {@link AffectedRecords}
17
- * @throws {@link IllegalStateError} when the provider is disabled. The provider must be enabled to link a user.
18
- * @throws {@link ResourceUnknownError} when no provider is found for the specified providerName.
19
- */
20
- linkUserToOidcProvider(providerName: string, data: OidcLinkRequestBody): Promise<AffectedRecords>;
21
- /**
22
- * ## Unlink a user from OpenID Connect
23
- * ### You can use this function to unlink a user from an OpenId Connect Provider.
24
- *
25
- * **Global Permissions:**
26
- * - `UNLINK_USER_FROM_OIDC` - Allows a user to unlink users from OpenID Connect
27
- *
28
- * @param userId {@link string} - The Extra Horizon id of the user to be unlinked from OpenID Connect
29
- * @returns An affected records response {@link AffectedRecords}
30
- */
31
- unlinkUserFromOidc(userId: string): Promise<AffectedRecords>;
32
- providers: OidcProviderService;
33
- loginAttempts: LoginAttemptsService;
34
- }
35
- export interface OidcLinkRequestBody {
36
- /** ### The users Extra Horizon presence token - Obtained from {@link AuthService.confirmPresence confirmPresence} */
37
- presenceToken: string;
38
- /** ### Obtained from the OpenID Connect application upon successful user login. */
39
- authorizationCode: string;
40
- }
1
+ import { AffectedRecords } from '../../types';
2
+ import { LoginAttemptsService } from './loginAttempts/types';
3
+ import { OidcProviderService } from './providers/types';
4
+ export * from './loginAttempts/types';
5
+ export * from './providers/types';
6
+ export interface OidcService {
7
+ /**
8
+ * ## Link the authenticated user to a provider
9
+ * ### You can use this function to link the currently logged-in user to a registered provider.
10
+ *
11
+ * **Default Permissions:**
12
+ * - Any authenticated user can execute this function.
13
+ *
14
+ * @param providerName {@link string} The name of the OpenID Connect provider to link the user to
15
+ * @param data {@link OidcLinkRequestBody} - The link to OpenID Connect provider data
16
+ * @returns An affected records response {@link AffectedRecords}
17
+ * @throws {@link IllegalStateError} when the provider is disabled. The provider must be enabled to link a user.
18
+ * @throws {@link ResourceUnknownError} when no provider is found for the specified providerName.
19
+ */
20
+ linkUserToOidcProvider(providerName: string, data: OidcLinkRequestBody): Promise<AffectedRecords>;
21
+ /**
22
+ * ## Unlink a user from OpenID Connect
23
+ * ### You can use this function to unlink a user from an OpenId Connect Provider.
24
+ *
25
+ * **Global Permissions:**
26
+ * - `UNLINK_USER_FROM_OIDC` - Allows a user to unlink users from OpenID Connect
27
+ *
28
+ * @param userId {@link string} - The Extra Horizon id of the user to be unlinked from OpenID Connect
29
+ * @returns An affected records response {@link AffectedRecords}
30
+ */
31
+ unlinkUserFromOidc(userId: string): Promise<AffectedRecords>;
32
+ providers: OidcProviderService;
33
+ loginAttempts: LoginAttemptsService;
34
+ }
35
+ export interface OidcLinkRequestBody {
36
+ /** ### The users Extra Horizon presence token - Obtained from {@link AuthService.confirmPresence confirmPresence} */
37
+ presenceToken: string;
38
+ /** ### Obtained from the OpenID Connect application upon successful user login. */
39
+ authorizationCode: string;
40
+ }
@@ -1,39 +1,39 @@
1
- import { OptionsBase } from '../types';
2
- import { AuthApplicationsService } from './applications/types';
3
- import { AuthOauth1Service } from './oauth1/types';
4
- import { AuthOauth2Service } from './oauth2/types';
5
- import { OidcService } from './oidc/types';
6
- import { AuthUsersService } from './users/types';
7
- export * from './applications/types';
8
- export * from './oauth1/types';
9
- export * from './oauth2/types';
10
- export * from './oidc/types';
11
- export * from './users/types';
12
- export interface AuthService {
13
- /**
14
- * # Applications
15
- * Applications represent mobile apps, web apps, web services or scripts that can communicate with the Extra Horizon API.
16
- *
17
- * ### Default applications
18
- * When launching a new cluster two default applications are already created for you:
19
- *
20
- * **ExH Control center**: An oAuth2 app that gives our control center (available on [app.extrahorizon.com](app.extrahorizon.com)) the ability to communicate with your cluster. You as an admin can use this app to explore and manage your cluster.
21
- *
22
- * **CLI**: An oAuth1.0 application that you can use when installing our CLI in order to send configurations to your cluster. Credentials are provided to your cluster manager during onboarding.
23
- */
24
- applications: AuthApplicationsService;
25
- oauth2: AuthOauth2Service;
26
- oauth1: AuthOauth1Service;
27
- users: AuthUsersService;
28
- oidc: OidcService;
29
- confirmPresence(data: {
30
- password: string;
31
- }, options?: OptionsBase): Promise<Presence>;
32
- health(): Promise<boolean>;
33
- }
34
- export { AuthApplicationsService };
35
- export interface Presence {
36
- token: string;
37
- updateTimestamp: Date;
38
- creationTimestamp: Date;
39
- }
1
+ import { OptionsBase } from '../types';
2
+ import { AuthApplicationsService } from './applications/types';
3
+ import { AuthOauth1Service } from './oauth1/types';
4
+ import { AuthOauth2Service } from './oauth2/types';
5
+ import { OidcService } from './oidc/types';
6
+ import { AuthUsersService } from './users/types';
7
+ export * from './applications/types';
8
+ export * from './oauth1/types';
9
+ export * from './oauth2/types';
10
+ export * from './oidc/types';
11
+ export * from './users/types';
12
+ export interface AuthService {
13
+ /**
14
+ * # Applications
15
+ * Applications represent mobile apps, web apps, web services or scripts that can communicate with the Extra Horizon API.
16
+ *
17
+ * ### Default applications
18
+ * When launching a new cluster two default applications are already created for you:
19
+ *
20
+ * **ExH Control center**: An oAuth2 app that gives our control center (available on [app.extrahorizon.com](app.extrahorizon.com)) the ability to communicate with your cluster. You as an admin can use this app to explore and manage your cluster.
21
+ *
22
+ * **CLI**: An oAuth1.0 application that you can use when installing our CLI in order to send configurations to your cluster. Credentials are provided to your cluster manager during onboarding.
23
+ */
24
+ applications: AuthApplicationsService;
25
+ oauth2: AuthOauth2Service;
26
+ oauth1: AuthOauth1Service;
27
+ users: AuthUsersService;
28
+ oidc: OidcService;
29
+ confirmPresence(data: {
30
+ password: string;
31
+ }, options?: OptionsBase): Promise<Presence>;
32
+ health(): Promise<boolean>;
33
+ }
34
+ export { AuthApplicationsService };
35
+ export interface Presence {
36
+ token: string;
37
+ updateTimestamp: Date;
38
+ creationTimestamp: Date;
39
+ }
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../../types';
2
- import { HttpClient } from '../../http-client';
3
- import type { AuthUsersService } from './types';
4
- declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthUsersService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../../types';
2
+ import { HttpClient } from '../../http-client';
3
+ import type { AuthUsersService } from './types';
4
+ declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthUsersService;
5
+ export default _default;
@@ -1,121 +1,121 @@
1
- import { AffectedRecords, OptionsBase } from '../../types';
2
- export interface AuthUsersService {
3
- /**
4
- * View the MFA settings of a user (or create the settings if they have none)
5
- *
6
- * Permission | Scope | Effect
7
- * - | - | -
8
- * none | | See your own MFA settings
9
- * `VIEW_USER_MFA_SETTINGS` | global | See anyone their MFA settings
10
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/get_mfa_users__userId_
11
- */
12
- getMfaSetting(userId: string, options?: OptionsBase): Promise<MfaSetting>;
13
- /**
14
- * Enable MFA for a user
15
- *
16
- * Permission | Scope | Effect
17
- * - | - | -
18
- * none | | Enable MFA for your own account
19
- * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
20
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__enable
21
- * @throws {InvalidPresenceTokenError}
22
- * @throws {NotEnoughMfaMethodsError}
23
- */
24
- enableMfa(userId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
25
- /**
26
- * Disable MFA for a user
27
- *
28
- * Permission | Scope | Effect
29
- * - | - | -
30
- * none | | Disable MFA for your own account
31
- * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
32
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__disable
33
- * @throws {InvalidPresenceTokenError}
34
- */
35
- disableMfa(userId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
36
- /**
37
- * Add a MFA method to a user
38
- *
39
- * Permission | Scope | Effect
40
- * - | - | -
41
- * none | | Add a MFA method to your user
42
- * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
43
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__disable
44
- * @throws {InvalidPresenceTokenError}
45
- */
46
- addMfaMethod<T extends RecoveryCodesMethodCreation | TotpMethodCreation>(userId: string, data: T, options?: OptionsBase): Promise<T extends RecoveryCodesMethodCreation ? RecoveryCodesMethod : TotpMethod>;
47
- /**
48
- * Confirm the correct functioning of a MFA method
49
- *
50
- * Permission | Scope | Effect
51
- * - | - | -
52
- * none | | Confirm a MFA method for your user
53
- * `UPDATE_USER_MFA_SETTINGS` | global | Confirm a MFA method for any user
54
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__methods__methodId__verification_confirm
55
- * @throws {ResourceUnknownError}
56
- * @throws {IllegalArgumentError}
57
- * @throws {InvalidMfaCodeError}
58
- * @throws {InvalidPresenceTokenError}
59
- */
60
- confirmMfaMethodVerification(userId: string, methodId: string, data: MfaMethodVerification, options?: OptionsBase): Promise<{
61
- description: string;
62
- }>;
63
- /**
64
- * Remove a MFA method from a user
65
- *
66
- * Permission | Scope | Effect
67
- * - | - | -
68
- * none | | Remove a MFA method for your user
69
- * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
70
- * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__methods__methodId__remove
71
- * @throws {NotEnoughMfaMethodsError}
72
- * @throws {InvalidPresenceTokenError}
73
- */
74
- removeMfaMethod(userId: string, methodId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
75
- }
76
- export interface RecoveryCodesMethod {
77
- id: string;
78
- name: string;
79
- tags: string[];
80
- verified: boolean;
81
- type: 'recoveryCodes';
82
- codes: string[];
83
- updateTimestamp: Date;
84
- creationTimestamp: Date;
85
- }
86
- export interface TotpMethod {
87
- id: string;
88
- name: string;
89
- tags: string[];
90
- verified: boolean;
91
- type: 'totp';
92
- secret: string;
93
- updateTimestamp: Date;
94
- creationTimestamp: Date;
95
- }
96
- export declare type MfaMethod = RecoveryCodesMethod | TotpMethod;
97
- export interface MfaSetting {
98
- id: string;
99
- methods: [MfaMethod];
100
- enabled: boolean;
101
- updateTimestamp: Date;
102
- }
103
- interface MfaMethodCreationBase {
104
- presenceToken: string;
105
- name?: string;
106
- tags?: string[];
107
- }
108
- export interface RecoveryCodesMethodCreation extends MfaMethodCreationBase {
109
- type: 'recoveryCodes';
110
- }
111
- export interface TotpMethodCreation extends MfaMethodCreationBase {
112
- type: 'totp';
113
- }
114
- export interface MfaMethodVerification {
115
- presenceToken: string;
116
- code: string;
117
- }
118
- export interface PresenceToken {
119
- presenceToken: string;
120
- }
121
- export {};
1
+ import { AffectedRecords, OptionsBase } from '../../types';
2
+ export interface AuthUsersService {
3
+ /**
4
+ * View the MFA settings of a user (or create the settings if they have none)
5
+ *
6
+ * Permission | Scope | Effect
7
+ * - | - | -
8
+ * none | | See your own MFA settings
9
+ * `VIEW_USER_MFA_SETTINGS` | global | See anyone their MFA settings
10
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/get_mfa_users__userId_
11
+ */
12
+ getMfaSetting(userId: string, options?: OptionsBase): Promise<MfaSetting>;
13
+ /**
14
+ * Enable MFA for a user
15
+ *
16
+ * Permission | Scope | Effect
17
+ * - | - | -
18
+ * none | | Enable MFA for your own account
19
+ * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
20
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__enable
21
+ * @throws {InvalidPresenceTokenError}
22
+ * @throws {NotEnoughMfaMethodsError}
23
+ */
24
+ enableMfa(userId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
25
+ /**
26
+ * Disable MFA for a user
27
+ *
28
+ * Permission | Scope | Effect
29
+ * - | - | -
30
+ * none | | Disable MFA for your own account
31
+ * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
32
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__disable
33
+ * @throws {InvalidPresenceTokenError}
34
+ */
35
+ disableMfa(userId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
36
+ /**
37
+ * Add a MFA method to a user
38
+ *
39
+ * Permission | Scope | Effect
40
+ * - | - | -
41
+ * none | | Add a MFA method to your user
42
+ * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
43
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__disable
44
+ * @throws {InvalidPresenceTokenError}
45
+ */
46
+ addMfaMethod<T extends RecoveryCodesMethodCreation | TotpMethodCreation>(userId: string, data: T, options?: OptionsBase): Promise<T extends RecoveryCodesMethodCreation ? RecoveryCodesMethod : TotpMethod>;
47
+ /**
48
+ * Confirm the correct functioning of a MFA method
49
+ *
50
+ * Permission | Scope | Effect
51
+ * - | - | -
52
+ * none | | Confirm a MFA method for your user
53
+ * `UPDATE_USER_MFA_SETTINGS` | global | Confirm a MFA method for any user
54
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__methods__methodId__verification_confirm
55
+ * @throws {ResourceUnknownError}
56
+ * @throws {IllegalArgumentError}
57
+ * @throws {InvalidMfaCodeError}
58
+ * @throws {InvalidPresenceTokenError}
59
+ */
60
+ confirmMfaMethodVerification(userId: string, methodId: string, data: MfaMethodVerification, options?: OptionsBase): Promise<{
61
+ description: string;
62
+ }>;
63
+ /**
64
+ * Remove a MFA method from a user
65
+ *
66
+ * Permission | Scope | Effect
67
+ * - | - | -
68
+ * none | | Remove a MFA method for your user
69
+ * `UPDATE_USER_MFA_SETTINGS` | global | Enable MFA for any account
70
+ * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/MFA/post_mfa_users__userId__methods__methodId__remove
71
+ * @throws {NotEnoughMfaMethodsError}
72
+ * @throws {InvalidPresenceTokenError}
73
+ */
74
+ removeMfaMethod(userId: string, methodId: string, data: PresenceToken, options?: OptionsBase): Promise<AffectedRecords>;
75
+ }
76
+ export interface RecoveryCodesMethod {
77
+ id: string;
78
+ name: string;
79
+ tags: string[];
80
+ verified: boolean;
81
+ type: 'recoveryCodes';
82
+ codes: string[];
83
+ updateTimestamp: Date;
84
+ creationTimestamp: Date;
85
+ }
86
+ export interface TotpMethod {
87
+ id: string;
88
+ name: string;
89
+ tags: string[];
90
+ verified: boolean;
91
+ type: 'totp';
92
+ secret: string;
93
+ updateTimestamp: Date;
94
+ creationTimestamp: Date;
95
+ }
96
+ export declare type MfaMethod = RecoveryCodesMethod | TotpMethod;
97
+ export interface MfaSetting {
98
+ id: string;
99
+ methods: [MfaMethod];
100
+ enabled: boolean;
101
+ updateTimestamp: Date;
102
+ }
103
+ interface MfaMethodCreationBase {
104
+ presenceToken: string;
105
+ name?: string;
106
+ tags?: string[];
107
+ }
108
+ export interface RecoveryCodesMethodCreation extends MfaMethodCreationBase {
109
+ type: 'recoveryCodes';
110
+ }
111
+ export interface TotpMethodCreation extends MfaMethodCreationBase {
112
+ type: 'totp';
113
+ }
114
+ export interface MfaMethodVerification {
115
+ presenceToken: string;
116
+ code: string;
117
+ }
118
+ export interface PresenceToken {
119
+ presenceToken: string;
120
+ }
121
+ export {};
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../types';
2
- import { HttpClient } from '../http-client';
3
- import type { ConfigurationsGeneralService } from './types';
4
- declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsGeneralService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../types';
2
+ import { HttpClient } from '../http-client';
3
+ import type { ConfigurationsGeneralService } from './types';
4
+ declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsGeneralService;
5
+ export default _default;
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../types';
2
- import { HttpClient } from '../http-client';
3
- import type { ConfigurationsGroupsService } from './types';
4
- declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsGroupsService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../types';
2
+ import { HttpClient } from '../http-client';
3
+ import type { ConfigurationsGroupsService } from './types';
4
+ declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsGroupsService;
5
+ export default _default;
@@ -1,10 +1,10 @@
1
- import type { HttpInstance } from '../../types';
2
- import { ConfigurationsGeneralService, ConfigurationsGroupsService, ConfigurationsPatientsService, ConfigurationsStaffService, ConfigurationsUsersService } from './types';
3
- export declare type ConfigurationsService = {
4
- general: ConfigurationsGeneralService;
5
- groups: ConfigurationsGroupsService;
6
- users: ConfigurationsUsersService;
7
- patients: ConfigurationsPatientsService;
8
- staff: ConfigurationsStaffService;
9
- };
10
- export declare const configurationsService: (httpWithAuth: HttpInstance) => ConfigurationsService;
1
+ import type { HttpInstance } from '../../types';
2
+ import { ConfigurationsGeneralService, ConfigurationsGroupsService, ConfigurationsPatientsService, ConfigurationsStaffService, ConfigurationsUsersService } from './types';
3
+ export declare type ConfigurationsService = {
4
+ general: ConfigurationsGeneralService;
5
+ groups: ConfigurationsGroupsService;
6
+ users: ConfigurationsUsersService;
7
+ patients: ConfigurationsPatientsService;
8
+ staff: ConfigurationsStaffService;
9
+ };
10
+ export declare const configurationsService: (httpWithAuth: HttpInstance) => ConfigurationsService;
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../types';
2
- import { HttpClient } from '../http-client';
3
- import type { ConfigurationsPatientsService } from './types';
4
- declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsPatientsService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../types';
2
+ import { HttpClient } from '../http-client';
3
+ import type { ConfigurationsPatientsService } from './types';
4
+ declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsPatientsService;
5
+ export default _default;
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../types';
2
- import { HttpClient } from '../http-client';
3
- import type { ConfigurationsStaffService } from './types';
4
- declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsStaffService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../types';
2
+ import { HttpClient } from '../http-client';
3
+ import type { ConfigurationsStaffService } from './types';
4
+ declare const _default: (client: HttpClient, httpAuth: HttpInstance) => ConfigurationsStaffService;
5
+ export default _default;