@extrahorizon/javascript-sdk 8.10.0-dev-159-0e9a0f1 → 8.10.0-dev-161-c1dd6ca
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/CHANGELOG.md +22 -0
- package/build/btoa.d.ts +6 -0
- package/build/client.d.ts +147 -0
- package/build/constants.d.ts +17 -0
- package/build/errorHandler.d.ts +1 -0
- package/build/errors.d.ts +361 -0
- package/build/http/client.d.ts +2 -0
- package/build/http/index.d.ts +4 -0
- package/build/http/interceptors.d.ts +9 -0
- package/build/http/oAuth1Signature.d.ts +18 -0
- package/build/http/oauth1.d.ts +3 -0
- package/build/http/oauth2.d.ts +3 -0
- package/build/http/proxy.d.ts +3 -0
- package/build/http/types.d.ts +331 -0
- package/build/http/utils.d.ts +21 -0
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +9 -0
- package/build/index.mjs +1 -1
- package/build/mock.d.ts +43 -0
- package/build/mockType.d.ts +1721 -0
- package/build/parseStoredCredentials.d.ts +11 -0
- package/build/rql/index.d.ts +16 -0
- package/build/rql/parser.d.ts +1 -0
- package/build/rql/types.d.ts +174 -0
- package/build/services/auth/applications/index.d.ts +5 -0
- package/build/services/auth/applications/types.d.ts +260 -0
- package/build/services/auth/index.d.ts +3 -0
- package/build/services/auth/oauth1/index.d.ts +5 -0
- package/build/services/auth/oauth1/types.d.ts +102 -0
- package/build/services/auth/oauth2/index.d.ts +5 -0
- package/build/services/auth/oauth2/types.d.ts +100 -0
- package/build/services/auth/oidc/index.d.ts +5 -0
- package/build/services/auth/oidc/loginAttempts/index.d.ts +5 -0
- package/build/services/auth/oidc/loginAttempts/types.d.ts +67 -0
- package/build/services/auth/oidc/providers/index.d.ts +5 -0
- package/build/services/auth/oidc/providers/types.d.ts +148 -0
- package/build/services/auth/oidc/types.d.ts +40 -0
- package/build/services/auth/types.d.ts +39 -0
- package/build/services/auth/users/index.d.ts +5 -0
- package/build/services/auth/users/types.d.ts +121 -0
- package/build/services/configurations/general.d.ts +5 -0
- package/build/services/configurations/groups.d.ts +5 -0
- package/build/services/configurations/index.d.ts +10 -0
- package/build/services/configurations/patients.d.ts +5 -0
- package/build/services/configurations/staff.d.ts +5 -0
- package/build/services/configurations/types.d.ts +222 -0
- package/build/services/configurations/users.d.ts +5 -0
- package/build/services/data/comments.d.ts +5 -0
- package/build/services/data/documents.d.ts +5 -0
- package/build/services/data/index.d.ts +13 -0
- package/build/services/data/indexes.d.ts +5 -0
- package/build/services/data/infrastructure.d.ts +10 -0
- package/build/services/data/json-schema.d.ts +121 -0
- package/build/services/data/properties.d.ts +5 -0
- package/build/services/data/schemas.d.ts +5 -0
- package/build/services/data/statuses.d.ts +5 -0
- package/build/services/data/transitions.d.ts +5 -0
- package/build/services/data/types.d.ts +1500 -0
- package/build/services/dispatchers/actions/index.d.ts +5 -0
- package/build/services/dispatchers/actions/types.d.ts +78 -0
- package/build/services/dispatchers/dispatchers/index.d.ts +5 -0
- package/build/services/dispatchers/dispatchers/types.d.ts +111 -0
- package/build/services/dispatchers/index.d.ts +7 -0
- package/build/services/dispatchers/types.d.ts +2 -0
- package/build/services/events/events.d.ts +5 -0
- package/build/services/events/index.d.ts +5 -0
- package/build/services/events/subscriptions.d.ts +5 -0
- package/build/services/events/types.d.ts +107 -0
- package/build/services/files/files.d.ts +5 -0
- package/build/services/files/formHelpers.d.ts +3 -0
- package/build/services/files/index.d.ts +6 -0
- package/build/services/files/settings/index.d.ts +5 -0
- package/build/services/files/settings/types.d.ts +38 -0
- package/build/services/files/tokens.d.ts +5 -0
- package/build/services/files/types.d.ts +185 -0
- package/build/services/helpers.d.ts +7 -0
- package/build/services/http-client.d.ts +22 -0
- package/build/services/index.d.ts +16 -0
- package/build/services/localizations/countries.d.ts +5 -0
- package/build/services/localizations/index.d.ts +3 -0
- package/build/services/localizations/languages.d.ts +5 -0
- package/build/services/localizations/localizations.d.ts +5 -0
- package/build/services/localizations/types.d.ts +150 -0
- package/build/services/logs/access/index.d.ts +5 -0
- package/build/services/logs/access/types.d.ts +41 -0
- package/build/services/logs/index.d.ts +3 -0
- package/build/services/logs/types.d.ts +4 -0
- package/build/services/mails/index.d.ts +3 -0
- package/build/services/mails/mails.d.ts +5 -0
- package/build/services/mails/types.d.ts +149 -0
- package/build/services/notifications/index.d.ts +6 -0
- package/build/services/notifications/notifications.d.ts +5 -0
- package/build/services/notifications/settings.d.ts +5 -0
- package/build/services/notifications/types.d.ts +235 -0
- package/build/services/notificationsV2/index.d.ts +6 -0
- package/build/services/notificationsV2/notificationsV2.d.ts +5 -0
- package/build/services/notificationsV2/types.d.ts +166 -0
- package/build/services/notificationsV2/userSettings/index.d.ts +5 -0
- package/build/services/notificationsV2/userSettings/types.d.ts +138 -0
- package/build/services/payments/appStore.d.ts +5 -0
- package/build/services/payments/appStoreSubscriptions.d.ts +5 -0
- package/build/services/payments/health.d.ts +9 -0
- package/build/services/payments/index.d.ts +15 -0
- package/build/services/payments/orders.d.ts +5 -0
- package/build/services/payments/playStore.d.ts +5 -0
- package/build/services/payments/playStoreHistory.d.ts +5 -0
- package/build/services/payments/playStoreSubscriptions.d.ts +5 -0
- package/build/services/payments/products.d.ts +5 -0
- package/build/services/payments/stripe.d.ts +5 -0
- package/build/services/payments/subscriptions.d.ts +5 -0
- package/build/services/payments/types.d.ts +1198 -0
- package/build/services/profiles/groups.d.ts +5 -0
- package/build/services/profiles/index.d.ts +8 -0
- package/build/services/profiles/logs.d.ts +5 -0
- package/build/services/profiles/profiles.d.ts +5 -0
- package/build/services/profiles/types.d.ts +375 -0
- package/build/services/tasks/api/index.d.ts +5 -0
- package/build/services/tasks/api/types.d.ts +146 -0
- package/build/services/tasks/apiRequests/index.d.ts +5 -0
- package/build/services/tasks/apiRequests/logs/index.d.ts +5 -0
- package/build/services/tasks/apiRequests/logs/types.d.ts +25 -0
- package/build/services/tasks/apiRequests/types.d.ts +83 -0
- package/build/services/tasks/functions/index.d.ts +5 -0
- package/build/services/tasks/functions/types.d.ts +171 -0
- package/build/services/tasks/index.d.ts +15 -0
- package/build/services/tasks/logs/index.d.ts +5 -0
- package/build/services/tasks/logs/types.d.ts +28 -0
- package/build/services/tasks/schedules/index.d.ts +5 -0
- package/build/services/tasks/schedules/types.d.ts +92 -0
- package/build/services/tasks/tasks.d.ts +5 -0
- package/build/services/tasks/types.d.ts +118 -0
- package/build/services/templates/index.d.ts +3 -0
- package/build/services/templates/templates.d.ts +5 -0
- package/build/services/templates/types.d.ts +237 -0
- package/build/services/templatesV2/index.d.ts +3 -0
- package/build/services/templatesV2/templatesV2.d.ts +5 -0
- package/build/services/templatesV2/types.d.ts +156 -0
- package/build/services/types.d.ts +103 -0
- package/build/services/users/activationRequests/index.d.ts +4 -0
- package/build/services/users/activationRequests/types.d.ts +70 -0
- package/build/services/users/forgotPasswordRequests/index.d.ts +4 -0
- package/build/services/users/forgotPasswordRequests/types.d.ts +70 -0
- package/build/services/users/globalRoles.d.ts +5 -0
- package/build/services/users/groupRoles.d.ts +5 -0
- package/build/services/users/index.d.ts +14 -0
- package/build/services/users/settings/index.d.ts +4 -0
- package/build/services/users/settings/types.d.ts +47 -0
- package/build/services/users/types.d.ts +1278 -0
- package/build/services/users/users.d.ts +5 -0
- package/build/sha1.d.ts +11 -0
- package/build/types/services/users/types.d.ts +69 -25
- package/build/types/version.d.ts +1 -1
- package/build/types.d.ts +104 -0
- package/build/utils.d.ts +5 -0
- package/build/version.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { UsersService } from './types';
|
|
4
|
+
declare const _default: (userClient: HttpClient, httpWithAuth: HttpInstance, http: HttpInstance) => UsersService;
|
|
5
|
+
export default _default;
|
package/build/sha1.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copied from https://github.com/pH200/hmacsha1-js/blob/master/index.js
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Computes a HMAC-SHA1 code.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} k Secret key.
|
|
8
|
+
* @param {string} d Data to be hashed.
|
|
9
|
+
* @return {string} The hashed string.
|
|
10
|
+
*/
|
|
11
|
+
export declare function HmacSHA1(k: any, d: any, _p?: any, _z?: any): string;
|
|
@@ -419,22 +419,64 @@ export interface UserRoles {
|
|
|
419
419
|
roles: ObjectId[];
|
|
420
420
|
}
|
|
421
421
|
export interface EmailTemplates {
|
|
422
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* Template id used by the User Service for the account activation email.
|
|
424
|
+
* @deprecated activationEmailTemplateId is deprecated in favor of activationEmailTemplateName
|
|
425
|
+
*/
|
|
423
426
|
activationEmailTemplateId: string;
|
|
424
|
-
/**
|
|
427
|
+
/**
|
|
428
|
+
* Template name used by the User Service for the account activation email.
|
|
429
|
+
*/
|
|
430
|
+
activationEmailTemplateName: string;
|
|
431
|
+
/**
|
|
432
|
+
* Template id used by the User Service for the account reactivation email.
|
|
433
|
+
* @deprecated reactivationEmailTemplateId is deprecated in favor of reactivationEmailTemplateName
|
|
434
|
+
*/
|
|
425
435
|
reactivationEmailTemplateId: string;
|
|
426
|
-
/** Template
|
|
436
|
+
/** Template name used by the User Service for the account reactivation email. */
|
|
437
|
+
reactivationEmailTemplateName: string;
|
|
438
|
+
/**
|
|
439
|
+
* Template id used by the User Service for the password reset email.
|
|
440
|
+
* @deprecated passwordResetEmailTemplateId is deprecated in favor of passwordResetEmailTemplateName
|
|
441
|
+
*/
|
|
427
442
|
passwordResetEmailTemplateId: string;
|
|
428
|
-
/** Template
|
|
443
|
+
/** Template name used by the User Service for the password reset email. */
|
|
444
|
+
passwordResetEmailTemplateName: string;
|
|
445
|
+
/**
|
|
446
|
+
* Template id used by the User Service for the OIDC unlink email.
|
|
447
|
+
* @deprecated oidcUnlinkEmailTemplateId is deprecated in favor of oidcUnlinkEmailTemplateName
|
|
448
|
+
*/
|
|
429
449
|
oidcUnlinkEmailTemplateId: string;
|
|
430
|
-
/** Template
|
|
450
|
+
/** Template name used by the User Service for the OIDC unlink email. */
|
|
451
|
+
oidcUnlinkEmailTemplateName: string;
|
|
452
|
+
/**
|
|
453
|
+
* Template id used by the User Service for the OIDC unlink pin code email.
|
|
454
|
+
* @deprecated oidcUnlinkPinEmailTemplateId is deprecated in favor of oidcUnlinkPinEmailTemplateName
|
|
455
|
+
*/
|
|
431
456
|
oidcUnlinkPinEmailTemplateId: string;
|
|
432
|
-
/** Template
|
|
457
|
+
/** Template name used by the User Service for the OIDC unlink pin code email. */
|
|
458
|
+
oidcUnlinkPinEmailTemplateName: string;
|
|
459
|
+
/**
|
|
460
|
+
* Template id used by the User Service for the account activation pin code email.
|
|
461
|
+
* @deprecated activationPinEmailTemplateId is deprecated in favor of activationPinEmailTemplateName
|
|
462
|
+
*/
|
|
433
463
|
activationPinEmailTemplateId: string;
|
|
434
|
-
/** Template
|
|
464
|
+
/** Template name used by the User Service for the account activation pin code email. */
|
|
465
|
+
activationPinEmailTemplateName: string;
|
|
466
|
+
/**
|
|
467
|
+
* Template id used by the User Service for the account reactivation pin code email.
|
|
468
|
+
* @deprecated reactivationPinEmailTemplateId is deprecated in favor of reactivationPinEmailTemplateName
|
|
469
|
+
*/
|
|
435
470
|
reactivationPinEmailTemplateId: string;
|
|
436
|
-
/** Template
|
|
471
|
+
/** Template name used by the User Service for the account reactivation pin code email. */
|
|
472
|
+
reactivationPinEmailTemplateName: string;
|
|
473
|
+
/**
|
|
474
|
+
* Template id used by the User Service for the password reset pin code email.
|
|
475
|
+
* @deprecated passwordResetPinEmailTemplateId is deprecated in favor of passwordResetPinEmailTemplateName
|
|
476
|
+
*/
|
|
437
477
|
passwordResetPinEmailTemplateId: string;
|
|
478
|
+
/** Template name used by the User Service for the password reset pin code email. */
|
|
479
|
+
passwordResetPinEmailTemplateName: string;
|
|
438
480
|
}
|
|
439
481
|
export interface PasswordResetRequestData {
|
|
440
482
|
email: string;
|
|
@@ -897,14 +939,14 @@ export interface UsersService {
|
|
|
897
939
|
* An email is send to the new email address with a token and instructions to reactivate the account.
|
|
898
940
|
* The token should be used to complete the account activation via `exh.users.validateEmailActivation`.
|
|
899
941
|
*
|
|
900
|
-
* By default the email send to the user is the email template configured by `
|
|
942
|
+
* By default the email send to the user is the email template configured by `reactivationEmailTemplateName`.
|
|
901
943
|
* The template receives a 40 hexadecimal character hash in the `content.activation_hash` variable.
|
|
902
944
|
* The hash should be used within 60 minutes, otherwise `exh.users.requestEmailActivation` should be used to request a new email.
|
|
903
945
|
*
|
|
904
946
|
* If enabled, a pin code can be used rather than a hash.
|
|
905
947
|
* The pin code mode must be enabled by the `enablePinCodeActivationRequests` verification setting.
|
|
906
948
|
* To use the pin code mode, the `activationMode` field can be set to `pin_code`.
|
|
907
|
-
* Then the email send to the user is the email template configured by `
|
|
949
|
+
* Then the email send to the user is the email template configured by `reactivationPinEmailTemplateName`.
|
|
908
950
|
* The pin code template receives a 8 digit pin code in the `content.pin_code` variable.
|
|
909
951
|
* The pin code should be used within 15 minutes, otherwise `exh.users.requestEmailActivation` should be used to request a new email.
|
|
910
952
|
*
|
|
@@ -953,14 +995,14 @@ export interface UsersService {
|
|
|
953
995
|
* An email is send to the supplied email address with a token and instructions to activate the account.
|
|
954
996
|
* The token should be used to complete the account activation via `exh.users.validateEmailActivation`.
|
|
955
997
|
*
|
|
956
|
-
* By default the email send to the user is the email template configured by `
|
|
998
|
+
* By default the email send to the user is the email template configured by `activationEmailTemplateName`.
|
|
957
999
|
* The template receives a 40 hexadecimal character hash in the `content.activation_hash` variable.
|
|
958
1000
|
* The hash should be used within 60 minutes, otherwise `exh.users.requestEmailActivation` should be used to request a new email.
|
|
959
1001
|
*
|
|
960
1002
|
* If enabled, a pin code can be used rather than a hash.
|
|
961
1003
|
* The pin code mode must be enabled by the `enablePinCodeActivationRequests` verification setting.
|
|
962
1004
|
* To use the pin code mode, the `activationMode` field can be set to `pin_code`.
|
|
963
|
-
* Then the email send to the user is the email template configured by `
|
|
1005
|
+
* Then the email send to the user is the email template configured by `activationPinEmailTemplateName`.
|
|
964
1006
|
* The pin code template receives a 8 digit pin code in the `content.pin_code` variable.
|
|
965
1007
|
* The pin code should be used within 15 minutes, otherwise `exh.users.requestEmailActivation` should be used to request a new email.
|
|
966
1008
|
*
|
|
@@ -1006,7 +1048,7 @@ export interface UsersService {
|
|
|
1006
1048
|
* An email is send to the supplied email address with a token and instructions to activate the account.
|
|
1007
1049
|
* The token should be used to complete the account activation via `exh.users.validateEmailActivation`.
|
|
1008
1050
|
*
|
|
1009
|
-
* The email send to the user is the email template configured by `
|
|
1051
|
+
* The email send to the user is the email template configured by `activationEmailTemplateName`.
|
|
1010
1052
|
* The template receives a 40 hexadecimal character hash in the `content.activation_hash` variable.
|
|
1011
1053
|
* The hash should be used within 60 minutes, otherwise this method should be called again to request a new email.
|
|
1012
1054
|
*
|
|
@@ -1016,7 +1058,7 @@ export interface UsersService {
|
|
|
1016
1058
|
*
|
|
1017
1059
|
* @throws {EmailUnknownError}
|
|
1018
1060
|
* @throws {AlreadyActivatedError}
|
|
1019
|
-
* @throws {IllegalStateError} Attempting to use `
|
|
1061
|
+
* @throws {IllegalStateError} Attempting to use `activationEmailTemplateName` while not configured. See `exh.users.setEmailTemplates`.
|
|
1020
1062
|
* @throws {ActivationRequestLimitError} The maximum allowed consecutive activation requests is reached
|
|
1021
1063
|
* @throws {ActivationRequestTimeoutError} Activation request too short after the previous one
|
|
1022
1064
|
*/
|
|
@@ -1027,14 +1069,14 @@ export interface UsersService {
|
|
|
1027
1069
|
* An email is send to the supplied email address with a token and instructions to activate the account.
|
|
1028
1070
|
* The token should be used to complete the account activation via `exh.users.validateEmailActivation`.
|
|
1029
1071
|
*
|
|
1030
|
-
* By default the email send to the user is the email template configured by `
|
|
1072
|
+
* By default the email send to the user is the email template configured by `activationEmailTemplateName`.
|
|
1031
1073
|
* The template receives a 40 hexadecimal character hash in the `content.activation_hash` variable.
|
|
1032
1074
|
* The hash should be used within 60 minutes, otherwise this method should be called again to request a new email.
|
|
1033
1075
|
*
|
|
1034
1076
|
* If enabled, a pin code can be used rather than a hash.
|
|
1035
1077
|
* The pin code mode must be enabled by the `enablePinCodeActivationRequests` verification setting.
|
|
1036
1078
|
* To use the pin code mode, the `activationMode` field can be set to `pin_code`.
|
|
1037
|
-
* Then the email send to the user is the email template configured by `
|
|
1079
|
+
* Then the email send to the user is the email template configured by `activationPinEmailTemplateName`.
|
|
1038
1080
|
* The pin code template receives a 8 digit pin code in the `content.pin_code` variable.
|
|
1039
1081
|
* The pin code should be used within 15 minutes, otherwise this method should be called again to request a new email.
|
|
1040
1082
|
*
|
|
@@ -1044,7 +1086,7 @@ export interface UsersService {
|
|
|
1044
1086
|
*
|
|
1045
1087
|
* @throws {EmailUnknownError}
|
|
1046
1088
|
* @throws {AlreadyActivatedError}
|
|
1047
|
-
* @throws {IllegalStateError} Attempting to use either `
|
|
1089
|
+
* @throws {IllegalStateError} Attempting to use either `activationEmailTemplateName` or `activationPinEmailTemplateName` while not configured. See `exh.users.setEmailTemplates`.
|
|
1048
1090
|
* @throws {ActivationRequestLimitError} The maximum allowed consecutive activation requests is reached
|
|
1049
1091
|
* @throws {ActivationRequestTimeoutError} Activation request too short after the previous one
|
|
1050
1092
|
*/
|
|
@@ -1070,7 +1112,7 @@ export interface UsersService {
|
|
|
1070
1112
|
* An email is send to the targeted user with a token and instructions to reset their password.
|
|
1071
1113
|
* The token should be used to complete the password reset via `exh.users.validatePasswordReset`.
|
|
1072
1114
|
*
|
|
1073
|
-
* The email send to the user is the email template configured by `
|
|
1115
|
+
* The email send to the user is the email template configured by `passwordResetEmailTemplateName`.
|
|
1074
1116
|
* The template receives a 40 hexadecimal character hash in the `content.reset_hash` variable.
|
|
1075
1117
|
* The hash should be used within 60 minutes, otherwise this method should be called again to request a new email.
|
|
1076
1118
|
*
|
|
@@ -1080,7 +1122,7 @@ export interface UsersService {
|
|
|
1080
1122
|
*
|
|
1081
1123
|
* @throws {EmailUnknownError}
|
|
1082
1124
|
* @throws {NotActivatedError}
|
|
1083
|
-
* @throws {IllegalStateError} Attempting to use either `
|
|
1125
|
+
* @throws {IllegalStateError} Attempting to use either `passwordResetEmailTemplateName` or `passwordResetPinEmailTemplateName` while not configured. See `exh.users.setEmailTemplates`.
|
|
1084
1126
|
* @throws {ForgotPasswordRequestLimitError} The maximum allowed consecutive forgot password requests is reached
|
|
1085
1127
|
* @throws {ForgotPasswordRequestTimeoutError} Forgot password request too short after the previous one
|
|
1086
1128
|
*/
|
|
@@ -1091,14 +1133,14 @@ export interface UsersService {
|
|
|
1091
1133
|
* An email is send to the targeted user with a token and instructions to reset their password.
|
|
1092
1134
|
* The token should be used to complete the password reset via `exh.users.validatePasswordReset`.
|
|
1093
1135
|
*
|
|
1094
|
-
* By default the email send to the user is the email template configured by `
|
|
1136
|
+
* By default the email send to the user is the email template configured by `passwordResetEmailTemplateName`.
|
|
1095
1137
|
* The template receives a 40 hexadecimal character hash in the `content.reset_hash` variable.
|
|
1096
1138
|
* The hash should be used within 60 minutes, otherwise this method should be called again to request a new email.
|
|
1097
1139
|
*
|
|
1098
1140
|
* If enabled, a pin code can be used rather than a hash.
|
|
1099
1141
|
* The pin code mode must be enabled by the `enablePinCodeForgotPasswordRequests` verification setting.
|
|
1100
1142
|
* To use the pin code mode, the `mode` field can be set to `pin_code`.
|
|
1101
|
-
* Then the email send to the user is the email template configured by `
|
|
1143
|
+
* Then the email send to the user is the email template configured by `passwordResetPinEmailTemplateName`.
|
|
1102
1144
|
* The pin code template receives a 8 digit pin code in the `content.pin_code` variable.
|
|
1103
1145
|
* The pin code should be used within 15 minutes, otherwise this method should be called again to request a new email.
|
|
1104
1146
|
*
|
|
@@ -1108,7 +1150,7 @@ export interface UsersService {
|
|
|
1108
1150
|
*
|
|
1109
1151
|
* @throws {EmailUnknownError}
|
|
1110
1152
|
* @throws {NotActivatedError}
|
|
1111
|
-
* @throws {IllegalStateError} Attempting to use either `
|
|
1153
|
+
* @throws {IllegalStateError} Attempting to use either `passwordResetEmailTemplateName` or `passwordResetPinEmailTemplateName` while not configured. See `exh.users.setEmailTemplates`.
|
|
1112
1154
|
* @throws {DisabledForOidcUsersError}
|
|
1113
1155
|
* @throws {PinCodesNotEnabledError} Pin codes are not enabled, please check the verification settings
|
|
1114
1156
|
* @throws {ForgotPasswordRequestLimitError} The maximum allowed consecutive forgot password requests is reached
|
|
@@ -1213,7 +1255,7 @@ export interface UsersService {
|
|
|
1213
1255
|
* @param options {@link OptionsBase} - Add options to the request
|
|
1214
1256
|
* @returns A list of email templates {@link EmailTemplates}
|
|
1215
1257
|
*/
|
|
1216
|
-
getEmailTemplates(options?: OptionsBase): Promise<EmailTemplates
|
|
1258
|
+
getEmailTemplates(options?: OptionsBase): Promise<Partial<EmailTemplates>>;
|
|
1217
1259
|
/**
|
|
1218
1260
|
* ## Set the list of email templates
|
|
1219
1261
|
*
|
|
@@ -1222,10 +1264,12 @@ export interface UsersService {
|
|
|
1222
1264
|
*
|
|
1223
1265
|
* **Notes:**
|
|
1224
1266
|
* - This operation works as an update and will only update the templates that are provided
|
|
1225
|
-
*
|
|
1267
|
+
* - id fields are deprecated and will be removed in a future release, it is recommended to use the name fields instead
|
|
1268
|
+
* - name and id fields are mutually exclusive, e.g., setting `activation_email_template_name` will remove `activation_email_template_id` and vice versa
|
|
1269
|
+
* @param templates {@link EmailTemplates} - A partial list of email templates to update
|
|
1226
1270
|
* @returns A list of email templates {@link EmailTemplates}
|
|
1227
1271
|
*/
|
|
1228
|
-
setEmailTemplates(templates: Partial<EmailTemplates>): Promise<EmailTemplates
|
|
1272
|
+
setEmailTemplates(templates: Partial<EmailTemplates>): Promise<Partial<EmailTemplates>>;
|
|
1229
1273
|
/**
|
|
1230
1274
|
* Perform a health check
|
|
1231
1275
|
* @returns {boolean} success
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.10.0-dev-
|
|
1
|
+
export declare const version = "8.10.0-dev-161-c1dd6ca";
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { TokenDataOauth2, HttpRequestConfig } from './http/types';
|
|
3
|
+
export * from './http/types';
|
|
4
|
+
export * from './services/types';
|
|
5
|
+
export * from './services/auth/types';
|
|
6
|
+
export * from './services/data/types';
|
|
7
|
+
export * from './services/files/types';
|
|
8
|
+
export * from './services/tasks/types';
|
|
9
|
+
export * from './services/users/types';
|
|
10
|
+
export * from './services/mails/types';
|
|
11
|
+
export * from './services/templates/types';
|
|
12
|
+
export * from './services/templatesV2/types';
|
|
13
|
+
export * from './services/configurations/types';
|
|
14
|
+
export * from './services/dispatchers/types';
|
|
15
|
+
export * from './services/payments/types';
|
|
16
|
+
export * from './services/localizations/types';
|
|
17
|
+
export * from './services/profiles/types';
|
|
18
|
+
export * from './services/notifications/types';
|
|
19
|
+
export * from './services/notificationsV2/types';
|
|
20
|
+
export * from './services/events/types';
|
|
21
|
+
export interface ParamsOauth1WithEmail {
|
|
22
|
+
email: string;
|
|
23
|
+
password: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ParamsOauth1WithToken {
|
|
26
|
+
token: string;
|
|
27
|
+
tokenSecret: string;
|
|
28
|
+
skipTokenCheck?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ParamsOauth2AuthorizationCode {
|
|
31
|
+
code: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ParamsOauth2Password {
|
|
34
|
+
username: string;
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ParamsOauth2Refresh {
|
|
38
|
+
refreshToken: string;
|
|
39
|
+
}
|
|
40
|
+
export declare type Oauth1AuthParams = ParamsOauth1WithEmail | ParamsOauth1WithToken;
|
|
41
|
+
export declare type Oauth2AuthParams = ParamsOauth2AuthorizationCode | ParamsOauth2Password | ParamsOauth2Refresh;
|
|
42
|
+
export declare type AuthParams = Oauth1AuthParams | Oauth2AuthParams;
|
|
43
|
+
interface ParamsBase {
|
|
44
|
+
host: string;
|
|
45
|
+
responseLogger?: (response: AxiosResponse | Error) => unknown;
|
|
46
|
+
requestLogger?: (request: HttpRequestConfig | Error) => unknown;
|
|
47
|
+
headers?: {
|
|
48
|
+
'X-Request-Service'?: string;
|
|
49
|
+
'X-Forwarded-Application'?: string;
|
|
50
|
+
'X-Forwarded-User'?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated this property is only meant to be used for backwards compatibility when upgrading to v8.0.0.
|
|
54
|
+
*
|
|
55
|
+
* Key names that are not chosen by Extra Horizon where also affected by the data normalization before v8.0.0.
|
|
56
|
+
* They were converted from camel case to snake case before sending the request and the other way around before
|
|
57
|
+
* providing the response.
|
|
58
|
+
*
|
|
59
|
+
* Also fields ending with the name timestamp not chosen by extra horizon in custom properties where automatically
|
|
60
|
+
* converted to dates. Even though they could be just booleans, strings or numbers. Dates provided in such fields will
|
|
61
|
+
* now be converted to strings while all other types will stay as they are.
|
|
62
|
+
*
|
|
63
|
+
* 'records_affected', 'recordsAffected' as keys in custom properties were converted to affectedRecords. In v8.0.0
|
|
64
|
+
* they also stay as they are.
|
|
65
|
+
*
|
|
66
|
+
* To enable this behaviour again, set to true.
|
|
67
|
+
*/
|
|
68
|
+
normalizeCustomData?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface ParamsOauth1Consumer extends ParamsBase {
|
|
71
|
+
consumerKey: string;
|
|
72
|
+
consumerSecret: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ParamsOauth1Token extends ParamsOauth1Consumer {
|
|
75
|
+
token: string;
|
|
76
|
+
tokenSecret: string;
|
|
77
|
+
}
|
|
78
|
+
export declare type ParamsOauth1 = ParamsOauth1Consumer | ParamsOauth1Token;
|
|
79
|
+
export interface ParamsOauth2Client extends ParamsBase {
|
|
80
|
+
clientId: string;
|
|
81
|
+
clientSecret?: string;
|
|
82
|
+
freshTokensCallback?: (tokenData: TokenDataOauth2) => void;
|
|
83
|
+
}
|
|
84
|
+
export interface ParamsOauth2AccessToken extends ParamsOauth2Client {
|
|
85
|
+
refreshToken: string;
|
|
86
|
+
accessToken: string;
|
|
87
|
+
/**
|
|
88
|
+
* Can be supplied just as it is returned by the different authentication methods and the `freshTokensCallback`.
|
|
89
|
+
* Allows the SDK to continue using the supplied access token until just before it expires, then it is automatically refreshed.
|
|
90
|
+
*/
|
|
91
|
+
expiresIn?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Can be supplied just as it is returned by the different authentication methods and the `freshTokensCallback`.
|
|
94
|
+
* Allows the SDK to continue using the supplied access token until just before it expires, then it is automatically refreshed.
|
|
95
|
+
*/
|
|
96
|
+
creationTimestamp?: Date | string;
|
|
97
|
+
}
|
|
98
|
+
export declare type ParamsOauth2 = ParamsOauth2Client | ParamsOauth2AccessToken;
|
|
99
|
+
export declare type ParamsProxy = ParamsBase;
|
|
100
|
+
interface HttpClientBase {
|
|
101
|
+
packageVersion: string;
|
|
102
|
+
}
|
|
103
|
+
export declare type ClientParams = ParamsOauth1 | ParamsOauth2 | ParamsProxy;
|
|
104
|
+
export declare type HttpClientConfig = HttpClientBase & ClientParams;
|
package/build/utils.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ClientParams, GlobalPermissionName } from './types';
|
|
2
|
+
export declare function validateConfig<T extends ClientParams>(params: T): T;
|
|
3
|
+
export declare function delay(ms: number): Promise<void>;
|
|
4
|
+
/** @deprecated Any permission string is now accepted by the permission add/removing methods. The GlobalPermissionName enum can still be used as a source of known permissions. */
|
|
5
|
+
export declare function parseGlobalPermissions(permissions: string[]): GlobalPermissionName[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "8.10.0-dev-161-c1dd6ca";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.10.0-dev-
|
|
3
|
+
"version": "8.10.0-dev-161-c1dd6ca",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"axios": "0.
|
|
35
|
+
"axios": "0.31.0",
|
|
36
36
|
"buffer": "6.0.3",
|
|
37
37
|
"fflate": "0.8.2",
|
|
38
38
|
"form-data": "4.0.4",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@extrahorizon/eslint-config-node": "^1.6.0",
|
|
45
45
|
"@rollup/plugin-json": "^4.1.0",
|
|
46
46
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
47
|
-
"@rollup/plugin-typescript": "^8.
|
|
47
|
+
"@rollup/plugin-typescript": "^8.5.0",
|
|
48
48
|
"@types/jest": "^29.5.12",
|
|
49
49
|
"@types/node": "^17.0.21",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|