@extrahorizon/javascript-sdk 8.10.0-dev-160-0c77af1 → 8.10.0-dev-162-aab55c5

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 (155) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/btoa.d.ts +6 -0
  3. package/build/client.d.ts +147 -0
  4. package/build/constants.d.ts +17 -0
  5. package/build/errorHandler.d.ts +1 -0
  6. package/build/errors.d.ts +361 -0
  7. package/build/http/client.d.ts +2 -0
  8. package/build/http/index.d.ts +4 -0
  9. package/build/http/interceptors.d.ts +9 -0
  10. package/build/http/oAuth1Signature.d.ts +18 -0
  11. package/build/http/oauth1.d.ts +3 -0
  12. package/build/http/oauth2.d.ts +3 -0
  13. package/build/http/proxy.d.ts +3 -0
  14. package/build/http/types.d.ts +331 -0
  15. package/build/http/utils.d.ts +21 -0
  16. package/build/index.cjs.js +1 -1
  17. package/build/index.d.ts +9 -0
  18. package/build/index.mjs +1 -1
  19. package/build/mock.d.ts +43 -0
  20. package/build/mockType.d.ts +1721 -0
  21. package/build/parseStoredCredentials.d.ts +11 -0
  22. package/build/rql/index.d.ts +16 -0
  23. package/build/rql/parser.d.ts +1 -0
  24. package/build/rql/types.d.ts +174 -0
  25. package/build/services/auth/applications/index.d.ts +5 -0
  26. package/build/services/auth/applications/types.d.ts +260 -0
  27. package/build/services/auth/index.d.ts +3 -0
  28. package/build/services/auth/oauth1/index.d.ts +5 -0
  29. package/build/services/auth/oauth1/types.d.ts +102 -0
  30. package/build/services/auth/oauth2/index.d.ts +5 -0
  31. package/build/services/auth/oauth2/types.d.ts +100 -0
  32. package/build/services/auth/oidc/index.d.ts +5 -0
  33. package/build/services/auth/oidc/loginAttempts/index.d.ts +5 -0
  34. package/build/services/auth/oidc/loginAttempts/types.d.ts +67 -0
  35. package/build/services/auth/oidc/providers/index.d.ts +5 -0
  36. package/build/services/auth/oidc/providers/types.d.ts +148 -0
  37. package/build/services/auth/oidc/types.d.ts +40 -0
  38. package/build/services/auth/types.d.ts +39 -0
  39. package/build/services/auth/users/index.d.ts +5 -0
  40. package/build/services/auth/users/types.d.ts +121 -0
  41. package/build/services/configurations/general.d.ts +5 -0
  42. package/build/services/configurations/groups.d.ts +5 -0
  43. package/build/services/configurations/index.d.ts +10 -0
  44. package/build/services/configurations/patients.d.ts +5 -0
  45. package/build/services/configurations/staff.d.ts +5 -0
  46. package/build/services/configurations/types.d.ts +222 -0
  47. package/build/services/configurations/users.d.ts +5 -0
  48. package/build/services/data/comments.d.ts +5 -0
  49. package/build/services/data/documents.d.ts +5 -0
  50. package/build/services/data/index.d.ts +13 -0
  51. package/build/services/data/indexes.d.ts +5 -0
  52. package/build/services/data/infrastructure.d.ts +10 -0
  53. package/build/services/data/json-schema.d.ts +121 -0
  54. package/build/services/data/properties.d.ts +5 -0
  55. package/build/services/data/schemas.d.ts +5 -0
  56. package/build/services/data/statuses.d.ts +5 -0
  57. package/build/services/data/transitions.d.ts +5 -0
  58. package/build/services/data/types.d.ts +1500 -0
  59. package/build/services/dispatchers/actions/index.d.ts +5 -0
  60. package/build/services/dispatchers/actions/types.d.ts +78 -0
  61. package/build/services/dispatchers/dispatchers/index.d.ts +5 -0
  62. package/build/services/dispatchers/dispatchers/types.d.ts +111 -0
  63. package/build/services/dispatchers/index.d.ts +7 -0
  64. package/build/services/dispatchers/types.d.ts +2 -0
  65. package/build/services/events/events.d.ts +5 -0
  66. package/build/services/events/index.d.ts +5 -0
  67. package/build/services/events/subscriptions.d.ts +5 -0
  68. package/build/services/events/types.d.ts +107 -0
  69. package/build/services/files/files.d.ts +5 -0
  70. package/build/services/files/formHelpers.d.ts +3 -0
  71. package/build/services/files/index.d.ts +6 -0
  72. package/build/services/files/settings/index.d.ts +5 -0
  73. package/build/services/files/settings/types.d.ts +38 -0
  74. package/build/services/files/tokens.d.ts +5 -0
  75. package/build/services/files/types.d.ts +185 -0
  76. package/build/services/helpers.d.ts +7 -0
  77. package/build/services/http-client.d.ts +22 -0
  78. package/build/services/index.d.ts +16 -0
  79. package/build/services/localizations/countries.d.ts +5 -0
  80. package/build/services/localizations/index.d.ts +3 -0
  81. package/build/services/localizations/languages.d.ts +5 -0
  82. package/build/services/localizations/localizations.d.ts +5 -0
  83. package/build/services/localizations/types.d.ts +150 -0
  84. package/build/services/logs/access/index.d.ts +5 -0
  85. package/build/services/logs/access/types.d.ts +41 -0
  86. package/build/services/logs/index.d.ts +3 -0
  87. package/build/services/logs/types.d.ts +4 -0
  88. package/build/services/mails/index.d.ts +3 -0
  89. package/build/services/mails/mails.d.ts +5 -0
  90. package/build/services/mails/types.d.ts +149 -0
  91. package/build/services/notifications/index.d.ts +6 -0
  92. package/build/services/notifications/notifications.d.ts +5 -0
  93. package/build/services/notifications/settings.d.ts +5 -0
  94. package/build/services/notifications/types.d.ts +235 -0
  95. package/build/services/notificationsV2/index.d.ts +6 -0
  96. package/build/services/notificationsV2/notificationsV2.d.ts +5 -0
  97. package/build/services/notificationsV2/types.d.ts +166 -0
  98. package/build/services/notificationsV2/userSettings/index.d.ts +5 -0
  99. package/build/services/notificationsV2/userSettings/types.d.ts +138 -0
  100. package/build/services/payments/appStore.d.ts +5 -0
  101. package/build/services/payments/appStoreSubscriptions.d.ts +5 -0
  102. package/build/services/payments/health.d.ts +9 -0
  103. package/build/services/payments/index.d.ts +15 -0
  104. package/build/services/payments/orders.d.ts +5 -0
  105. package/build/services/payments/playStore.d.ts +5 -0
  106. package/build/services/payments/playStoreHistory.d.ts +5 -0
  107. package/build/services/payments/playStoreSubscriptions.d.ts +5 -0
  108. package/build/services/payments/products.d.ts +5 -0
  109. package/build/services/payments/stripe.d.ts +5 -0
  110. package/build/services/payments/subscriptions.d.ts +5 -0
  111. package/build/services/payments/types.d.ts +1198 -0
  112. package/build/services/profiles/groups.d.ts +5 -0
  113. package/build/services/profiles/index.d.ts +8 -0
  114. package/build/services/profiles/logs.d.ts +5 -0
  115. package/build/services/profiles/profiles.d.ts +5 -0
  116. package/build/services/profiles/types.d.ts +375 -0
  117. package/build/services/tasks/api/index.d.ts +5 -0
  118. package/build/services/tasks/api/types.d.ts +146 -0
  119. package/build/services/tasks/apiRequests/index.d.ts +5 -0
  120. package/build/services/tasks/apiRequests/logs/index.d.ts +5 -0
  121. package/build/services/tasks/apiRequests/logs/types.d.ts +25 -0
  122. package/build/services/tasks/apiRequests/types.d.ts +83 -0
  123. package/build/services/tasks/functions/index.d.ts +5 -0
  124. package/build/services/tasks/functions/types.d.ts +171 -0
  125. package/build/services/tasks/index.d.ts +15 -0
  126. package/build/services/tasks/logs/index.d.ts +5 -0
  127. package/build/services/tasks/logs/types.d.ts +28 -0
  128. package/build/services/tasks/schedules/index.d.ts +5 -0
  129. package/build/services/tasks/schedules/types.d.ts +92 -0
  130. package/build/services/tasks/tasks.d.ts +5 -0
  131. package/build/services/tasks/types.d.ts +118 -0
  132. package/build/services/templates/index.d.ts +3 -0
  133. package/build/services/templates/templates.d.ts +5 -0
  134. package/build/services/templates/types.d.ts +237 -0
  135. package/build/services/templatesV2/index.d.ts +3 -0
  136. package/build/services/templatesV2/templatesV2.d.ts +5 -0
  137. package/build/services/templatesV2/types.d.ts +156 -0
  138. package/build/services/types.d.ts +103 -0
  139. package/build/services/users/activationRequests/index.d.ts +4 -0
  140. package/build/services/users/activationRequests/types.d.ts +70 -0
  141. package/build/services/users/forgotPasswordRequests/index.d.ts +4 -0
  142. package/build/services/users/forgotPasswordRequests/types.d.ts +70 -0
  143. package/build/services/users/globalRoles.d.ts +5 -0
  144. package/build/services/users/groupRoles.d.ts +5 -0
  145. package/build/services/users/index.d.ts +14 -0
  146. package/build/services/users/settings/index.d.ts +4 -0
  147. package/build/services/users/settings/types.d.ts +47 -0
  148. package/build/services/users/types.d.ts +1278 -0
  149. package/build/services/users/users.d.ts +5 -0
  150. package/build/sha1.d.ts +11 -0
  151. package/build/types/version.d.ts +1 -1
  152. package/build/types.d.ts +104 -0
  153. package/build/utils.d.ts +5 -0
  154. package/build/version.d.ts +1 -0
  155. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [8.10.0]
9
9
 
10
+ ### Fixed
11
+ - The following vulnerabilities were resolved, but not applicable:
12
+ - Bumped Axios version to resolve `CVE-2026-40175` and `CVE-2025-62718`
13
+ - Bumped brace-expansion version to resolve `CVE-2026-33750`
14
+ - Bumped picomatch version to resolve `CVE-2026-33672` and `CVE-2026-33671`
15
+ - Bumped flatted version to resolve `CVE-2026-33228` and `CVE-2026-32141`
16
+
10
17
  ### Added
11
18
  - `exh.users.getEmailTemplates` and `exh.users.setEmailTemplates` now support `_name` variants
12
19
  - `activationEmailTemplateName`
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This implementation is copy pasted from abab
3
+ * https://github.com/jsdom/abab/blob/master/lib/btoa.js
4
+ */
5
+ export declare function btoa(input: string): string;
6
+ export default btoa;
@@ -0,0 +1,147 @@
1
+ import { AuthHttpClient, OAuth1HttpClient, OAuth2HttpClient, ProxyInstance } from './http/types';
2
+ import { authService, configurationsService, dataService, dispatchersService, eventsService, filesService, localizationsService, logsService, mailsService, notificationsService, notificationsV2Service, paymentsService, profilesService, tasksService, templatesService, usersService } from './services';
3
+ import { templatesV2Service } from './services/templatesV2';
4
+ import { ClientParams, ParamsOauth1, ParamsOauth2, ParamsProxy } from './types';
5
+ export interface Client<T extends ClientParams> {
6
+ raw: AuthHttpClient;
7
+ /**
8
+ * The template service manages templates used to build emails. It can be used to retrieve, create, update or delete templates as well as resolving them.
9
+ * @see https://swagger.extrahorizon.com/listing/?service=templates-service&redirectToVersion=1
10
+ */
11
+ templates: ReturnType<typeof templatesService>;
12
+ /**
13
+ * The template service manages templates used to build emails. It can be used to retrieve, create, update or delete templates as well as resolving them.
14
+ * @see https://swagger.extrahorizon.com/listing/?service=templates-service&redirectToVersion=2
15
+ */
16
+ templatesV2: ReturnType<typeof templatesV2Service>;
17
+ /**
18
+ * Provides mail functionality for other services.
19
+ * @see https://swagger.extrahorizon.com/listing/?service=mail-service&redirectToVersion=1
20
+ */
21
+ mails: ReturnType<typeof mailsService>;
22
+ /**
23
+ * A flexible data storage for structured data. Additionally, the service enables you to configure a state machine for instances of the structured data. You can couple actions that need to be triggered by the state machine, when/as the entities (instance of structured data) change their state. Thanks to these actions you can define automation rules (see later for more in depth description). These actions also make it possible to interact with other services.
24
+ * @see https://swagger.extrahorizon.com/listing/?service=data-service&redirectToVersion=1
25
+ */
26
+ data: ReturnType<typeof dataService>;
27
+ /**
28
+ * A service that handles file storage, metadata & file retrieval based on tokens.
29
+ * @see https://swagger.extrahorizon.com/listing/?service=files-service&redirectToVersion=1
30
+ */
31
+ files: ReturnType<typeof filesService>;
32
+ /**
33
+ * Start functions on demand, directly or at a future moment.
34
+ * @see https://swagger.extrahorizon.com/listing/?service=tasks-service&redirectToVersion=1
35
+ */
36
+ tasks: ReturnType<typeof tasksService>;
37
+ /**
38
+ * Provides storage for custom configuration objects. On different levels (general, groups, users, links between groups and users).
39
+ * @see https://swagger.extrahorizon.com/listing/?service=configurations-service&redirectToVersion=2
40
+ */
41
+ configurations: ReturnType<typeof configurationsService>;
42
+ /**
43
+ * Configure actions that need to be invoked when a specific event is/was triggered.
44
+ * @see https://swagger.extrahorizon.com/listing/?service=dispatchers-service&redirectToVersion=1
45
+ */
46
+ dispatchers: ReturnType<typeof dispatchersService>;
47
+ /**
48
+ * A service that provides payment functionality.
49
+ * @see https://swagger.extrahorizon.com/listing/?service=payments-service&redirectToVersion=1
50
+ */
51
+ payments: ReturnType<typeof paymentsService>;
52
+ /**
53
+ * Storage and retrieval of text snippets, translated into multiple languages.
54
+ * @see https://swagger.extrahorizon.com/listing/?service=localizations-service&redirectToVersion=1
55
+ */
56
+ localizations: ReturnType<typeof localizationsService>;
57
+ /**
58
+ * Storage service of profiles. A profile is a separate object on its own, comprising medical information like medication and medical history, as well as technical information, like what phone a user is using.
59
+ * @see https://swagger.extrahorizon.com/listing/?service=profiles-service&redirectToVersion=1
60
+ */
61
+ profiles: ReturnType<typeof profilesService>;
62
+ /**
63
+ * A service that handles push notifications.
64
+ * @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=1
65
+ */
66
+ notifications: ReturnType<typeof notificationsService>;
67
+ /**
68
+ * A service that handles push notifications.
69
+ * @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=2
70
+ */
71
+ notificationsV2: ReturnType<typeof notificationsV2Service>;
72
+ /**
73
+ * Service that provides event (publish/subscribe) functionality for other services.
74
+ * @see https://swagger.extrahorizon.com/listing/?service=events-service&redirectToVersion=1
75
+ */
76
+ events: ReturnType<typeof eventsService>;
77
+ /**
78
+ * The user service stands in for managing users themselves, as well as roles related to users and groups of users.
79
+ * @see https://swagger.extrahorizon.com/listing/?service=users-service&redirectToVersion=1
80
+ */
81
+ users: ReturnType<typeof usersService>;
82
+ /**
83
+ * The logs service allows an authorized party to retrieve logs of the system.
84
+ * @see https://swagger.extrahorizon.com/listing/?service=logs-service&redirectToVersion=1
85
+ */
86
+ logs: ReturnType<typeof logsService>;
87
+ /**
88
+ * Provides authentication functionality. The Authentication service supports both OAuth 1.0a and OAuth 2.0 standards.
89
+ * @see https://swagger.extrahorizon.com/listing/?service=auth-service&redirectToVersion=2
90
+ */
91
+ auth: T extends ParamsOauth1 ? ReturnType<typeof authService> & OAuth1HttpClient['extraAuthMethods'] : T extends ParamsOauth2 ? ReturnType<typeof authService> & OAuth2HttpClient['extraAuthMethods'] : ReturnType<typeof authService> & ProxyInstance['extraAuthMethods'];
92
+ }
93
+ /**
94
+ * Create ExtraHorizon client.
95
+ *
96
+ * @example
97
+ * const exh = createClient({
98
+ * host: 'xxx.extrahorizon.io',
99
+ * clientId: 'string',
100
+ * });
101
+ * await exh.auth.authenticate({
102
+ * username: 'string',
103
+ * password: 'string',
104
+ * });
105
+ */
106
+ export declare function createClient<T extends ClientParams>(rawConfig: T): Client<T>;
107
+ export declare type OAuth1Client = Client<ParamsOauth1>;
108
+ /**
109
+ * Create ExtraHorizon OAuth1 client.
110
+ *
111
+ * @example
112
+ * const exh = createOAuth1Client({
113
+ * host: 'sandbox.extrahorizon.io',
114
+ * consumerKey: 'string',
115
+ * consumerSecret: 'string',
116
+ * });
117
+ * await exh.auth.authenticate({
118
+ * email: 'string',
119
+ * password: 'string',
120
+ * });
121
+ */
122
+ export declare const createOAuth1Client: (rawConfig: ParamsOauth1) => OAuth1Client;
123
+ export declare type OAuth2Client = Client<ParamsOauth2>;
124
+ /**
125
+ * Create ExtraHorizon OAuth2 client.
126
+ *
127
+ * @example
128
+ * const exh = createOAuth2Client({
129
+ * host: 'sandbox.extrahorizon.io',
130
+ * clientId: 'string',
131
+ * });
132
+ * await exh.auth.authenticate({
133
+ * username: 'string',
134
+ * password: 'string',
135
+ * });
136
+ */
137
+ export declare const createOAuth2Client: (rawConfig: ParamsOauth2) => OAuth2Client;
138
+ export declare type ProxyClient = Client<ParamsProxy>;
139
+ /**
140
+ * Create ExtraHorizon Proxy client.
141
+ *
142
+ * @example
143
+ * const exh = createProxyClient({
144
+ * host: 'apx.sandbox.extrahorizon.io',
145
+ * });
146
+ */
147
+ export declare const createProxyClient: (rawConfig: ParamsProxy) => ProxyClient;
@@ -0,0 +1,17 @@
1
+ export declare const AUTH_BASE = "/auth/v2";
2
+ export declare const USER_BASE = "/users/v1";
3
+ export declare const DATA_BASE = "/data/v1";
4
+ export declare const FILES_BASE = "/files/v1";
5
+ export declare const TASKS_BASE = "/tasks/v1";
6
+ export declare const CONFIGURATION_BASE = "/configurations/v2";
7
+ export declare const TEMPLATE_BASE = "/templates/v1";
8
+ export declare const TEMPLATES_V2_BASE = "/templates/v2";
9
+ export declare const MAIL_BASE = "/mail/v1";
10
+ export declare const DISPATCHERS_BASE = "/dispatchers/v1";
11
+ export declare const PAYMENTS_BASE = "/payments/v1";
12
+ export declare const PROFILES_BASE = "/profiles/v1";
13
+ export declare const NOTIFICATIONS_BASE = "/notifications/v1";
14
+ export declare const NOTIFICATIONS_V2_BASE = "/notifications/v2";
15
+ export declare const LOCALIZATIONS_BASE = "/localizations/v1";
16
+ export declare const EVENTS_BASE = "/events/v1";
17
+ export declare const LOGS_BASE = "/logs/v1";
@@ -0,0 +1 @@
1
+ export declare function typeReceivedError(error: any): any;
@@ -0,0 +1,361 @@
1
+ import { TemplatesV2ErrorInfo } from './services/templatesV2/types';
2
+ import { MfaMethod, NotificationV2Error } from './types';
3
+ declare type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH';
4
+ interface RequestConfig {
5
+ url?: string;
6
+ method?: Method;
7
+ baseURL?: string;
8
+ headers?: any;
9
+ params?: any;
10
+ data?: any;
11
+ }
12
+ interface Response<T = any> {
13
+ data: T;
14
+ status: number;
15
+ statusText: string;
16
+ headers: any;
17
+ config: RequestConfig;
18
+ request?: any;
19
+ }
20
+ export interface HttpError<T = any> extends Error {
21
+ config: RequestConfig;
22
+ code?: string;
23
+ request?: any;
24
+ response?: Response<T>;
25
+ isAxiosError: boolean;
26
+ type: 'proxy' | 'oauth1' | 'oauth2';
27
+ toJSON: () => Record<string, unknown>;
28
+ }
29
+ export declare class ApiError extends Error {
30
+ qName?: string;
31
+ name: string;
32
+ status?: number;
33
+ statusText?: string;
34
+ error?: string;
35
+ request?: Record<string, any>;
36
+ response?: Record<string, any>;
37
+ constructor(data: ApiError);
38
+ static createFromHttpError(error: HttpError): ApiError;
39
+ }
40
+ export declare class OAuth2LoginError extends ApiError {
41
+ exhError: ApiError;
42
+ constructor(apiError: ApiError);
43
+ static createFromHttpError(error: HttpError): OAuth2LoginError;
44
+ }
45
+ export declare class BodyFormatError extends ApiError {
46
+ }
47
+ export declare class BadRequestError extends ApiError {
48
+ }
49
+ export declare class ResourceAlreadyExistsError extends BadRequestError {
50
+ }
51
+ export declare class IllegalArgumentError extends BadRequestError {
52
+ }
53
+ export declare class ApplicationUnknownError extends BadRequestError {
54
+ }
55
+ export declare class CallbackNotValidError extends BadRequestError {
56
+ }
57
+ export declare class UnsupportedResponseTypeError extends BadRequestError {
58
+ }
59
+ export declare class UnsupportedGrantError extends BadRequestError {
60
+ }
61
+ export declare class InvalidMfaCodeError extends BadRequestError {
62
+ }
63
+ export declare class InvalidMfaTokenError extends BadRequestError {
64
+ }
65
+ export declare class MfaReattemptDelayError extends BadRequestError {
66
+ }
67
+ export declare class NotEnoughMfaMethodsError extends BadRequestError {
68
+ }
69
+ export declare class InvalidPresenceTokenError extends BadRequestError {
70
+ }
71
+ export declare class EmailUsedError extends BadRequestError {
72
+ }
73
+ export declare class PasswordError extends BadRequestError {
74
+ }
75
+ export declare class AlreadyActivatedError extends BadRequestError {
76
+ }
77
+ export declare class EmailUnknownError extends BadRequestError {
78
+ }
79
+ export declare class ActivationUnknownError extends BadRequestError {
80
+ }
81
+ export declare class NotActivatedError extends BadRequestError {
82
+ }
83
+ export declare class EmptyBodyError extends BadRequestError {
84
+ }
85
+ export declare class NewPasswordHashUnknownError extends BadRequestError {
86
+ }
87
+ export declare class NewPasswordPinCodeUnknownError extends BadRequestError {
88
+ }
89
+ export declare class IncorrectPinCodeError extends BadRequestError {
90
+ }
91
+ export declare class IllegalStateError extends BadRequestError {
92
+ }
93
+ export declare class StatusInUseError extends BadRequestError {
94
+ }
95
+ export declare class LockedDocumentError extends BadRequestError {
96
+ }
97
+ export declare class FileTooLargeError extends BadRequestError {
98
+ }
99
+ export declare class InvalidTokenError extends BadRequestError {
100
+ }
101
+ export declare class LocalizationKeyMissingError extends BadRequestError {
102
+ }
103
+ export declare class TemplateFillingError extends BadRequestError {
104
+ }
105
+ export declare class TemplateSyntaxError extends BadRequestError {
106
+ syntaxError: TemplatesV2ErrorInfo;
107
+ constructor(apiError: ApiError);
108
+ }
109
+ export declare class TemplateResolvingError extends BadRequestError {
110
+ resolveError: TemplatesV2ErrorInfo;
111
+ constructor(apiError: ApiError);
112
+ }
113
+ export declare class MissingRequiredFieldsError extends BadRequestError {
114
+ }
115
+ export declare class InvalidCurrencyForProductPrice extends BadRequestError {
116
+ }
117
+ export declare class InvalidReceiptDataError extends BadRequestError {
118
+ }
119
+ export declare class UnknownReceiptTransactionError extends BadRequestError {
120
+ }
121
+ export declare class AppStoreTransactionAlreadyLinked extends BadRequestError {
122
+ }
123
+ export declare class NoMatchingPlayStoreLinkedSubscription extends BadRequestError {
124
+ }
125
+ export declare class PlayStoreTransactionAlreadyLinked extends BadRequestError {
126
+ }
127
+ export declare class NoConfiguredPlayStoreProduct extends BadRequestError {
128
+ }
129
+ export declare class StripePaymentMethodError extends BadRequestError {
130
+ }
131
+ export declare class DefaultLocalizationMissingError extends BadRequestError {
132
+ }
133
+ export declare class IDFormatError extends BadRequestError {
134
+ }
135
+ export declare class ProfileAlreadyExistsError extends BadRequestError {
136
+ }
137
+ export declare class OAuth2MissingClientCredentialsError extends BadRequestError {
138
+ }
139
+ export declare class InvalidNonceError extends BadRequestError {
140
+ }
141
+ export declare class OidcProviderResponseError extends BadRequestError {
142
+ }
143
+ export declare class OidcInvalidAuthorizationCodeError extends BadRequestError {
144
+ }
145
+ export declare class InvalidPKCEError extends BadRequestError {
146
+ }
147
+ export declare class AuthorizationUnknownError extends BadRequestError {
148
+ }
149
+ export declare class AuthorizationCodeExpiredError extends BadRequestError {
150
+ }
151
+ export declare class MissingPKCEVerifierError extends BadRequestError {
152
+ }
153
+ export declare class RefreshTokenUnknownError extends BadRequestError {
154
+ }
155
+ export declare class RefreshTokenExpiredError extends BadRequestError {
156
+ }
157
+ export declare class LambdaInvocationError extends BadRequestError {
158
+ }
159
+ export declare class FirebaseInvalidPlatformDataError extends BadRequestError {
160
+ notificationId?: string;
161
+ errors?: NotificationV2Error[];
162
+ constructor(apiError: ApiError);
163
+ }
164
+ export declare class UnauthorizedError extends ApiError {
165
+ }
166
+ export declare class ApplicationNotAuthenticatedError extends UnauthorizedError {
167
+ }
168
+ export declare class AuthenticationError extends UnauthorizedError {
169
+ }
170
+ export declare class LoginTimeoutError extends UnauthorizedError {
171
+ }
172
+ export declare class LoginFreezeError extends UnauthorizedError {
173
+ }
174
+ export declare class TooManyFailedAttemptsError extends UnauthorizedError {
175
+ }
176
+ export declare class OauthKeyError extends UnauthorizedError {
177
+ }
178
+ export declare class OauthSignatureError extends UnauthorizedError {
179
+ }
180
+ export declare class DuplicateRequestError extends UnauthorizedError {
181
+ }
182
+ export declare class AccessTokenUnknownError extends UnauthorizedError {
183
+ }
184
+ export declare class AccessTokenExpiredError extends UnauthorizedError {
185
+ }
186
+ export declare class NoPermissionError extends UnauthorizedError {
187
+ }
188
+ export declare class UnauthorizedTokenError extends UnauthorizedError {
189
+ }
190
+ export declare class OAuth2ClientIdError extends UnauthorizedError {
191
+ }
192
+ export declare class OAuth2ClientSecretError extends UnauthorizedError {
193
+ }
194
+ export declare class UserNotAuthenticatedError extends UnauthorizedError {
195
+ static createFromHttpError(error: HttpError): ApiError;
196
+ }
197
+ export declare class OauthTokenError extends UnauthorizedError {
198
+ static createFromHttpError(error: HttpError): ApiError;
199
+ }
200
+ export declare class ForbiddenError extends ApiError {
201
+ }
202
+ export declare class TokenNotDeleteableError extends ForbiddenError {
203
+ }
204
+ export declare class RemoveFieldError extends ForbiddenError {
205
+ }
206
+ export declare class DisabledForOidcUsersError extends ForbiddenError {
207
+ }
208
+ export declare class NewMFARequiredError extends ForbiddenError {
209
+ }
210
+ export declare class PinCodesNotEnabledError extends ForbiddenError {
211
+ }
212
+ export declare class ForgotPasswordRequestLimitError extends ForbiddenError {
213
+ }
214
+ export declare class ForgotPasswordRequestTimeoutError extends ForbiddenError {
215
+ }
216
+ export declare class ActivationRequestLimitError extends ForbiddenError {
217
+ }
218
+ export declare class ActivationRequestTimeoutError extends ForbiddenError {
219
+ }
220
+ export declare class NotFoundError extends ApiError {
221
+ }
222
+ export declare class ResourceUnknownError extends NotFoundError {
223
+ }
224
+ export declare class ServiceNotFoundError extends NotFoundError {
225
+ }
226
+ export declare class NoConfiguredAppStoreProduct extends NotFoundError {
227
+ }
228
+ export declare class ServerError extends ApiError {
229
+ }
230
+ export declare class FieldFormatError extends ServerError {
231
+ }
232
+ export declare class BadGatewayServerError extends ApiError {
233
+ }
234
+ export declare class StripeRequestError extends BadGatewayServerError {
235
+ }
236
+ export declare class FirebaseConnectionError extends BadGatewayServerError {
237
+ notificationId?: string;
238
+ errors?: NotificationV2Error[];
239
+ constructor(apiError: ApiError);
240
+ }
241
+ export declare class ServiceUnavailableError extends ApiError {
242
+ }
243
+ export declare class OidcIdTokenError extends ServiceUnavailableError {
244
+ }
245
+ export declare class InvalidGrantError extends OAuth2LoginError {
246
+ }
247
+ export declare class InvalidClientError extends OAuth2LoginError {
248
+ }
249
+ export declare class InvalidRequestError extends OAuth2LoginError {
250
+ }
251
+ export declare class UnauthorizedClientError extends OAuth2LoginError {
252
+ }
253
+ export declare class UnsupportedGrantTypeError extends OAuth2LoginError {
254
+ }
255
+ export declare class MfaRequiredError extends OAuth2LoginError {
256
+ mfa: {
257
+ token: string;
258
+ tokenExpiresIn: number;
259
+ methods: Array<Pick<MfaMethod, 'id' | 'type' | 'name' | 'tags'>>;
260
+ };
261
+ constructor(apiError: ApiError);
262
+ }
263
+ export declare const OAuth2ErrorClassMap: {
264
+ invalid_grant: typeof InvalidGrantError;
265
+ invalid_client: typeof InvalidClientError;
266
+ invalid_request: typeof InvalidRequestError;
267
+ unauthorized_client: typeof UnauthorizedClientError;
268
+ unsupported_grant_type: typeof UnsupportedGrantTypeError;
269
+ mfa_required: typeof MfaRequiredError;
270
+ };
271
+ export declare const ErrorClassMap: {
272
+ 1: typeof ServerError;
273
+ 10: typeof NoPermissionError;
274
+ 11: typeof RemoveFieldError;
275
+ 12: typeof IDFormatError;
276
+ 13: typeof EmptyBodyError;
277
+ 14: typeof MissingRequiredFieldsError;
278
+ 15: typeof FieldFormatError;
279
+ 16: typeof ResourceUnknownError;
280
+ 17: typeof ResourceAlreadyExistsError;
281
+ 22: typeof BodyFormatError;
282
+ 26: typeof IllegalArgumentError;
283
+ 27: typeof IllegalStateError;
284
+ 101: typeof ApplicationNotAuthenticatedError;
285
+ 103: typeof ApplicationUnknownError;
286
+ 104: typeof UserNotAuthenticatedError;
287
+ 106: typeof AuthenticationError;
288
+ 107: typeof OauthKeyError;
289
+ 108: typeof OauthTokenError;
290
+ 109: typeof OauthSignatureError;
291
+ 110: typeof DuplicateRequestError;
292
+ 113: typeof CallbackNotValidError;
293
+ 114: typeof UnsupportedResponseTypeError;
294
+ 115: typeof AuthorizationUnknownError;
295
+ 116: typeof AuthorizationCodeExpiredError;
296
+ 117: typeof AccessTokenUnknownError;
297
+ 118: typeof AccessTokenExpiredError;
298
+ 119: typeof RefreshTokenUnknownError;
299
+ 120: typeof RefreshTokenExpiredError;
300
+ 121: typeof UnsupportedGrantError;
301
+ 122: typeof InvalidPKCEError;
302
+ 123: typeof OAuth2ClientIdError;
303
+ 124: typeof OAuth2ClientSecretError;
304
+ 126: typeof OAuth2MissingClientCredentialsError;
305
+ 128: typeof MissingPKCEVerifierError;
306
+ 129: typeof MfaRequiredError;
307
+ 130: typeof InvalidMfaCodeError;
308
+ 131: typeof InvalidMfaTokenError;
309
+ 132: typeof InvalidPresenceTokenError;
310
+ 133: typeof NotEnoughMfaMethodsError;
311
+ 134: typeof MfaReattemptDelayError;
312
+ 136: typeof OidcIdTokenError;
313
+ 137: typeof InvalidNonceError;
314
+ 138: typeof OidcProviderResponseError;
315
+ 139: typeof OidcInvalidAuthorizationCodeError;
316
+ 202: typeof EmailUnknownError;
317
+ 203: typeof EmailUsedError;
318
+ 204: typeof NotActivatedError;
319
+ 205: typeof ActivationUnknownError;
320
+ 206: typeof AlreadyActivatedError;
321
+ 207: typeof NewPasswordHashUnknownError;
322
+ 208: typeof PasswordError;
323
+ 211: typeof LoginTimeoutError;
324
+ 212: typeof LoginFreezeError;
325
+ 213: typeof TooManyFailedAttemptsError;
326
+ 215: typeof DisabledForOidcUsersError;
327
+ 218: typeof PinCodesNotEnabledError;
328
+ 219: typeof NewPasswordPinCodeUnknownError;
329
+ 220: typeof ForgotPasswordRequestLimitError;
330
+ 221: typeof ForgotPasswordRequestTimeoutError;
331
+ 222: typeof ActivationRequestLimitError;
332
+ 223: typeof ActivationRequestTimeoutError;
333
+ 224: typeof IncorrectPinCodeError;
334
+ 301: typeof ProfileAlreadyExistsError;
335
+ 414: typeof StatusInUseError;
336
+ 415: typeof LockedDocumentError;
337
+ 801: typeof DefaultLocalizationMissingError;
338
+ 903: typeof ServiceNotFoundError;
339
+ 1002: typeof LocalizationKeyMissingError;
340
+ 1003: typeof TemplateFillingError;
341
+ 1004: typeof TemplateSyntaxError;
342
+ 1005: typeof TemplateResolvingError;
343
+ 1405: typeof LambdaInvocationError;
344
+ 2605: typeof InvalidTokenError;
345
+ 2606: typeof UnauthorizedTokenError;
346
+ 2607: typeof TokenNotDeleteableError;
347
+ 2610: typeof FileTooLargeError;
348
+ 2707: typeof InvalidReceiptDataError;
349
+ 2708: typeof UnknownReceiptTransactionError;
350
+ 2712: typeof StripeRequestError;
351
+ 2713: typeof StripePaymentMethodError;
352
+ 2714: typeof InvalidCurrencyForProductPrice;
353
+ 2716: typeof NoConfiguredAppStoreProduct;
354
+ 2717: typeof AppStoreTransactionAlreadyLinked;
355
+ 2718: typeof NoMatchingPlayStoreLinkedSubscription;
356
+ 2719: typeof NoConfiguredPlayStoreProduct;
357
+ 2720: typeof PlayStoreTransactionAlreadyLinked;
358
+ };
359
+ export declare class RequestAbortedError extends Error {
360
+ }
361
+ export {};
@@ -0,0 +1,2 @@
1
+ import { HttpClientConfig, HttpInstance } from '../types';
2
+ export declare function createHttpClient({ packageVersion, host, requestLogger, responseLogger, headers, }: HttpClientConfig): HttpInstance;
@@ -0,0 +1,4 @@
1
+ export { createOAuth1HttpClient } from './oauth1';
2
+ export { createOAuth2HttpClient } from './oauth2';
3
+ export { createProxyHttpClient } from './proxy';
4
+ export { createHttpClient } from './client';
@@ -0,0 +1,9 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { HttpError } from '../errors';
3
+ import { HttpRequestConfig, HttpResponse, HttpResponseError } from './types';
4
+ export declare const retryInterceptor: (axios: AxiosInstance) => (error: HttpResponseError) => Promise<unknown>;
5
+ export declare const camelizeResponseData: ({ data, config, ...response }: HttpResponse) => HttpResponse;
6
+ export declare const decamelizeRequestData: (data: any, httpRequestConfig?: HttpRequestConfig) => Record<string, unknown>;
7
+ export declare const transformResponseData: ({ data, config, ...response }: HttpResponse) => HttpResponse;
8
+ export declare const transformKeysResponseData: ({ data, config, ...response }: HttpResponse) => HttpResponse;
9
+ export declare const typeReceivedErrorsInterceptor: (error: HttpError) => Promise<never>;
@@ -0,0 +1,18 @@
1
+ import { TokenDataOauth1 } from './types';
2
+ interface OAuth1RequestInformation {
3
+ method: string;
4
+ url: string;
5
+ consumer: {
6
+ key: string;
7
+ secret: string;
8
+ };
9
+ tokenData?: Pick<TokenDataOauth1, 'key' | 'secret'>;
10
+ }
11
+ export declare function getOAuth1AuthorizationHeader(requestInformation: OAuth1RequestInformation): {
12
+ Authorization: string;
13
+ };
14
+ export declare function getUrlInfoFromRequest(url: string): {
15
+ baseUrl: string;
16
+ searchParameters: any;
17
+ };
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ParamsOauth1 } from '../types';
2
+ import { HttpInstance, OAuth1HttpClient } from './types';
3
+ export declare function createOAuth1HttpClient(http: HttpInstance, options: ParamsOauth1): OAuth1HttpClient;
@@ -0,0 +1,3 @@
1
+ import { ParamsOauth2 } from '../types';
2
+ import { HttpInstance, OAuth2HttpClient } from './types';
3
+ export declare function createOAuth2HttpClient(http: HttpInstance, options: ParamsOauth2): OAuth2HttpClient;
@@ -0,0 +1,3 @@
1
+ import { ParamsProxy } from '../types';
2
+ import { AuthHttpClient, HttpInstance } from './types';
3
+ export declare function createProxyHttpClient(http: HttpInstance, options: ParamsProxy): AuthHttpClient;