@qonto/embed-sdk 0.49.0 → 0.50.0

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 (83) hide show
  1. package/dist/auth-links/auth-links.d.ts.map +1 -1
  2. package/dist/beneficiaries/beneficiaries.d.ts.map +1 -1
  3. package/dist/cards/cards.d.ts +39 -26
  4. package/dist/cards/cards.d.ts.map +1 -1
  5. package/dist/common/common.types.d.ts +9 -0
  6. package/dist/common/common.types.d.ts.map +1 -0
  7. package/dist/common/common.utils.d.ts +9 -0
  8. package/dist/common/common.utils.d.ts.map +1 -1
  9. package/dist/common/network/network.d.ts +7 -2
  10. package/dist/common/network/network.d.ts.map +1 -1
  11. package/dist/common/operation-settings/operation-settings.d.ts +3 -0
  12. package/dist/common/operation-settings/operation-settings.d.ts.map +1 -1
  13. package/dist/errors/AuthenticationError.d.ts +1 -1
  14. package/dist/index.umd.js +1632 -18
  15. package/dist/mocks/handlers.d.ts.map +1 -1
  16. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +6 -0
  17. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +6 -0
  18. package/dist/organizations/organizations.d.ts +11 -6
  19. package/dist/organizations/organizations.d.ts.map +1 -1
  20. package/dist/sca/sca.d.ts.map +1 -1
  21. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts +9 -1
  22. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts.map +1 -1
  23. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +25 -32
  24. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts.map +1 -1
  25. package/dist/sepa-transfers/sepa-transfers.d.ts +36 -51
  26. package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
  27. package/dist/src/auth-links/auth-links.js +1 -1
  28. package/dist/src/beneficiaries/beneficiaries.js +1 -1
  29. package/dist/src/cards/cards.js +1 -1
  30. package/dist/src/common/api-pagination/api-pagination.js +1 -1
  31. package/dist/src/common/common.utils.js +1 -1
  32. package/dist/src/common/operation-settings/operation-settings.js +1 -1
  33. package/dist/src/errors/AuthenticationError.js +1 -1
  34. package/dist/src/organizations/organizations.js +1 -1
  35. package/dist/src/sca/sca.js +1 -1
  36. package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.api.js +1 -1
  37. package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.js +1 -1
  38. package/dist/src/sepa-transfers/sepa-transfers.js +1 -1
  39. package/dist/src/sepa-transfers/sepa-transfers.public-api.js +1 -1
  40. package/dist/src/transactions/transactions.js +1 -1
  41. package/dist/src/ui/animations/general_success.json.js +1 -0
  42. package/dist/src/ui/animations/generic_error.json.js +1 -0
  43. package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.js +29 -0
  44. package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.styles.js +178 -0
  45. package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.utils.js +1 -0
  46. package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.js +10 -0
  47. package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.styles.js +140 -0
  48. package/dist/src/ui/customizable-components/select-field/qonto-option.js +5 -0
  49. package/dist/src/ui/customizable-components/select-field/qonto-select-field.js +73 -0
  50. package/dist/src/ui/customizable-components/select-field/qonto-select-field.styles.js +307 -0
  51. package/dist/src/ui/customizable-components/text-field/qonto-text-field.js +24 -0
  52. package/dist/src/ui/customizable-components/text-field/qonto-text-field.styles.js +139 -0
  53. package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +3 -3
  54. package/dist/src/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.js +1 -0
  55. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.js +20 -0
  56. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.styles.js +70 -0
  57. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.utils.js +16 -0
  58. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page-utils.js +1 -0
  59. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.js +106 -0
  60. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.styles.js +110 -0
  61. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.js +11 -0
  62. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.styles.js +14 -0
  63. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.js +16 -0
  64. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.styles.js +21 -0
  65. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.js +89 -0
  66. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.styles.js +169 -0
  67. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.utils.js +15 -0
  68. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.events.js +1 -0
  69. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +32 -0
  70. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.styles.js +33 -0
  71. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.utils.js +1 -0
  72. package/dist/src/ui/ui-elements.constants.js +1 -1
  73. package/dist/src/ui/ui-elements.js +1 -1
  74. package/dist/src/validation/operation-settings-validation.js +1 -1
  75. package/dist/transactions/transactions.d.ts.map +1 -1
  76. package/dist/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
  77. package/dist/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.d.ts.map +1 -1
  78. package/dist/ui/ui-elements.constants.d.ts +1 -0
  79. package/dist/ui/ui-elements.constants.d.ts.map +1 -1
  80. package/dist/ui/ui-elements.d.ts.map +1 -1
  81. package/dist/validation/operation-settings-validation.d.ts +27 -1
  82. package/dist/validation/operation-settings-validation.d.ts.map +1 -1
  83. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"auth-links.d.ts","sourceRoot":"","sources":["../../src/auth-links/auth-links.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAiB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAqCxD"}
1
+ {"version":3,"file":"auth-links.d.ts","sourceRoot":"","sources":["../../src/auth-links/auth-links.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAiB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAqCxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"beneficiaries.d.ts","sourceRoot":"","sources":["../../src/beneficiaries/beneficiaries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAwB/B,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,2CAA2C,CAAC;AAMnD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAA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B,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CA2B1E"}
@@ -52,13 +52,14 @@ export declare function getCards(getCardsParams?: CardParams<{
52
52
  * @param getCardParams - An object containing:
53
53
  * - `cardSettings`: An object with the `cardId` property (string).
54
54
  * - `operationSettings`: An object with operation-level settings such as
55
- * `proxyRequestFunction` (preferred over using the access token flow),
56
- * `accessToken`, `stagingToken`, and other optional parameters.
57
- * See {@link OperationSettings} for more details.
55
+ * `proxyRequestFunction` (preferred over using the access token flow),
56
+ * `accessToken`, `stagingToken`, and other optional
57
+ * parameters. See {@link CardParams}.
58
58
  * @returns A promise that resolves to a card.
59
- * @throws `InvalidParametersError` If the cardId is not provided or if the cardId is not a string.
60
- * @throws `AuthenticationError` If both the `proxyRequestFunction` and `accessToken` are invalid or missing within
61
- * `operationSettings`.
59
+ * @throws `InvalidParametersError` If the cardId is not provided, not a string, or
60
+ * if any parameter validation fails.
61
+ * @throws `AuthenticationError` If both the `proxyRequestFunction` and
62
+ * `accessToken` are invalid or missing within `operationSettings`.
62
63
  * @throws `EmbedApiError` If the API request fails or returns an error.
63
64
  */
64
65
  export declare function getCard({ cardSettings, operationSettings, }: CardParams<{
@@ -68,13 +69,17 @@ export declare function getCard({ cardSettings, operationSettings, }: CardParams
68
69
  * Requests the creation of a card by showing the user the UI to perform MFA in the calling page.
69
70
  * It will show an element on the screen where users will be able to go through the MFA
70
71
  * authentication process and upon successful authentication, will perform the ordering operation.
71
- * @param cardConfig - An object with the parameters to order the card. If it was not provided when
72
- * calling the SDK's `initialize` function, an `operationSettings` object has to be passed too
73
- * with the `uiParentElementId` property. This has to specify the ID of the DOM element where
74
- * the UI for MFA will be displayed.
72
+ * @param cardConfig - An object containing:
73
+ * - `cardSettings`: An object with the card order parameters (see examples below).
74
+ * - `operationSettings`: Required settings to configure this operation. Must include
75
+ * `uiParentElementId` to specify where the UI will be rendered. Also supports
76
+ * `accessToken`, `stagingToken`, `mfaPreference`, `debugMode`, and other properties.
77
+ * See {@link OperationSettings} for details.
75
78
  * @returns A promise that resolves to an object representing the ordered card.
76
- * @throws `InvalidParametersError` If the cardId is not provided or if the cardId is not a string.
77
- * @throws `InvalidParametersError` If the uiParentElementId or operationSettings are not provided.
79
+ * @throws `InvalidParametersError` If `uiParentElementId` is missing, if the card
80
+ * settings are invalid, or if any parameter validation fails.
81
+ * @throws `AuthenticationError` If the `accessToken` is invalid or missing.
82
+ * @throws `EmbedApiError` If the API request fails or returns an error.
78
83
  * @example Ordering a physical card to be shipped to the org's business address
79
84
  * ```ts
80
85
  * const cardConfig = {
@@ -153,14 +158,17 @@ export declare function orderCard(cardConfig: CardParams<CardOrderSettings>): Pr
153
158
  * Unlocks a locked card by showing the user the UI to perform MFA in the calling page.
154
159
  * It will show an element on the screen where users will be able to go through the MFA
155
160
  * authentication process and upon successful authentication, will perform the unlock operation.
156
- * @param cardConfig - An object with the parameters to unlock the card.
157
- * It requires a `cardSettings` object with the `cardId` property. If it was not provided when
158
- * calling the SDK's `initialize` function, an `operationSettings` object has to be passed too
159
- * with the `uiParentElementId` property. This has to specify the ID of the DOM element where
160
- * the UI for MFA will be displayed.
161
+ * @param cardConfig - An object containing:
162
+ * - `cardSettings`: An object with the `cardId` property (string).
163
+ * - `operationSettings`: Required settings to configure this operation. Must include
164
+ * `uiParentElementId` to specify where the UI will be rendered. Also supports
165
+ * `accessToken`, `stagingToken`, `mfaPreference`, `debugMode`, and other properties.
166
+ * See {@link OperationSettings} for details.
161
167
  * @returns A promise that resolves to an object representing the unlocked card.
162
- * @throws `InvalidParametersError` If the cardId is not provided or if the cardId is not a string.
163
- * @throws `InvalidParametersError` If the uiParentElementId or operationSettings are not provided.
168
+ * @throws `InvalidParametersError` If `uiParentElementId` is missing, if the cardId
169
+ * is not provided or not a string, or if any parameter validation fails.
170
+ * @throws `AuthenticationError` If the `accessToken` is invalid or missing.
171
+ * @throws `EmbedApiError` If the API request fails or returns an error.
164
172
  * @example
165
173
  * ```ts
166
174
  * const cardConfig = {
@@ -178,15 +186,20 @@ export declare function unlockCard(cardConfig: CardParams<UnlockCardSettings>):
178
186
  /**
179
187
  * Displays a Cards UI in the calling page which allows the user to see card details and perform
180
188
  * some operations.
181
- * @param cardConfig - An object with the parameters to display the card.
182
- * It requires a `cardSettings` object with the `cardId` property. If it was not provided when
183
- * calling the SDK's `initialize` function, an `operationSettings` object has to be passed too
184
- * with the `uiParentElementId` property. This has to specify the ID of the DOM element where
185
- * the UI for MFA will be displayed.
189
+ * @param cardConfig - An object containing:
190
+ * - `cardSettings`: An object with the `cardId` property (string).
191
+ * - `operationSettings`: Required settings to configure this operation. Must include
192
+ * `uiParentElementId` to specify where the UI will be rendered. Also supports
193
+ * `proxyRequestFunction` (recommended for production to avoid exposing tokens),
194
+ * `accessToken`, `stagingToken`, and other properties. See {@link OperationSettings}
195
+ * for details.
186
196
  * @returns A promise that resolves to an object with a `destroyEmbedUI` function. When calling
187
197
  * this function, the UI will be removed from the DOM.
188
- * @throws `InvalidParametersError` If the cardId is not provided or if the cardId is not a string.
189
- * @throws `InvalidParametersError` If the uiParentElementId or operationSettings are not provided.
198
+ * @throws `InvalidParametersError` If `uiParentElementId` is missing, if the cardId
199
+ * is not provided or not a string, or if any parameter validation fails.
200
+ * @throws `AuthenticationError` If both `proxyRequestFunction` and `accessToken`
201
+ * are invalid or missing.
202
+ * @throws `EmbedApiError` If the API request fails or returns an error.
190
203
  */
191
204
  export declare function displayCard(cardConfig: CardParams<DisplayCardSettings>): Promise<DisplayCardReturnObject>;
192
205
  //# sourceMappingURL=cards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/cards/cards.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAA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'PUT' | 'DELETE' | 'PATCH';
4
+ options: {
5
+ headers?: Record<string, string>;
6
+ };
7
+ }
8
+ export type ProxyRequestFunction = (operationPayload: string) => Promise<string>;
9
+ //# sourceMappingURL=common.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/common/common.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpD,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAClC,CAAC;CACH;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,gBAAgB,EAAE,MAAM,KACrB,OAAO,CAAC,MAAM,CAAC,CAAC"}
@@ -1,3 +1,12 @@
1
1
  import type { UIParentElementId } from '@validation/operation-settings-validation.ts';
2
+ import { type NetworkCallDescriptor, type NetworkResponse } from '@common/network/network.ts';
3
+ import type { ProxyEndpointDescriptor, ProxyRequestFunction } from '@common/common.types.ts';
2
4
  export declare function getUIParentElement(uiParentElementId: UIParentElementId): HTMLElement;
5
+ interface CallProxyFunctionParams {
6
+ proxyFunction?: ProxyRequestFunction;
7
+ networkCallDescriptor: NetworkCallDescriptor;
8
+ proxyEndpointDescriptor?: ProxyEndpointDescriptor;
9
+ }
10
+ export declare function callProxyFunction<T>({ proxyFunction, networkCallDescriptor, proxyEndpointDescriptor, }: CallProxyFunctionParams): Promise<NetworkResponse<T>>;
11
+ export {};
3
12
  //# sourceMappingURL=common.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.utils.d.ts","sourceRoot":"","sources":["../../src/common/common.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,wBAAgB,kBAAkB,CAAC,iBAAiB,EAAE,iBAAiB,eActE"}
1
+ {"version":3,"file":"common.utils.d.ts","sourceRoot":"","sources":["../../src/common/common.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,kBAAkB,CAAC,iBAAiB,EAAE,iBAAiB,eActE;AAED,UAAU,uBAAuB;IAC/B,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,EACzC,aAAa,EACb,qBAAqB,EACrB,uBAAuB,GACxB,EAAE,uBAAuB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAkDvD"}
@@ -14,13 +14,18 @@ export interface NetworkCallDescriptor {
14
14
  body?: Record<string, unknown>;
15
15
  };
16
16
  }
17
- interface NetworkResponse<T> {
17
+ export type NetworkCall = Omit<NetworkCallDescriptor, 'options'> & {
18
+ options: Omit<NetworkCallDescriptor['options'], 'headers'> & {
19
+ headers: Headers | Record<string, string>;
20
+ };
21
+ };
22
+ export interface NetworkResponse<T> {
18
23
  headers: Record<string, unknown>;
19
24
  body: T;
20
25
  }
21
26
  export declare function buildRequestHeaders({ accessToken, stagingToken, idempotencyKey, mfaPreference, scaSessionToken, }: QontoApiHeaders): Headers;
22
27
  export declare function makeNetworkCall<T>({ path, options, }: NetworkCallDescriptor): Promise<T>;
23
- export declare function encodeNetworkCall(call: NetworkCallDescriptor): string;
28
+ export declare function encodeNetworkCall(call: NetworkCall): string;
24
29
  export declare function decodeNetworkResponse<T>(response: string): NetworkResponse<T>;
25
30
  export {};
26
31
  //# sourceMappingURL=network.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/common/network/network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAOrF,UAAU,eAAe;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,eAAe,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;CACH;AAED,UAAU,eAAe,CAAC,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC;CACT;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,YAAY,EACZ,cAAc,EACd,aAAa,EACb,eAAe,GAChB,EAAE,eAAe,GAAG,OAAO,CAqB3B;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,EACvC,IAAI,EACJ,OAAO,GACR,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC,CAiCpC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAUrE;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,CAE7E"}
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/common/network/network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,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"}
@@ -1,5 +1,6 @@
1
1
  import type { OperationSettings, UIParentElementId } from '@validation/operation-settings-validation';
2
2
  import type { MfaMethod } from '@common/operation-settings/operation-settings.types';
3
+ import type { ProxyEndpointDescriptor } from '@common/common.types.ts';
3
4
  /**
4
5
  * A singleton class to manage operation settings
5
6
  */
@@ -9,6 +10,7 @@ export declare class OperationSettingsManager {
9
10
  private mfaPreference;
10
11
  private debugMode;
11
12
  private proxyRequestFunction;
13
+ private proxyEndpointDescriptor;
12
14
  private constructor();
13
15
  /**
14
16
  * Gets the singleton instance of OperationSettingsManager
@@ -35,6 +37,7 @@ export declare class OperationSettingsManager {
35
37
  */
36
38
  getDebugMode(): boolean;
37
39
  getProxyRequestFunction(): ((operationPayload: string) => Promise<string>) | undefined;
40
+ getProxyEndpointDescriptor(): ProxyEndpointDescriptor | undefined;
38
41
  /**
39
42
  * Clears all operation settings
40
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"operation-settings.d.ts","sourceRoot":"","sources":["../../../src/common/operation-settings/operation-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAGrF;;GAEG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA2B;IAClD,OAAO,CAAC,iBAAiB,CAAgC;IACzD,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,oBAAoB,CAEd;IAEd,OAAO;IAIP;;OAEG;WACW,WAAW,IAAI,wBAAwB;IAOrD;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAe9D;;;OAGG;IACI,oBAAoB,IAAI,iBAAiB,GAAG,SAAS;IAI5D;;;OAGG;IACI,gBAAgB,IAAI,SAAS;IAIpC;;;OAGG;IACI,YAAY,IAAI,OAAO;IAIvB,uBAAuB,wBA5DN,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;IAgElD;;OAEG;IACI,aAAa,IAAI,IAAI;IAOrB,WAAW,IAAI,iBAAiB;CAQxC;AAGD,eAAO,MAAM,wBAAwB,0BAAyC,CAAC"}
1
+ {"version":3,"file":"operation-settings.d.ts","sourceRoot":"","sources":["../../../src/common/operation-settings/operation-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAErF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;GAEG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA2B;IAClD,OAAO,CAAC,iBAAiB,CAAgC;IACzD,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,oBAAoB,CAEd;IACd,OAAO,CAAC,uBAAuB,CAAsC;IAErE,OAAO;IAIP;;OAEG;WACW,WAAW,IAAI,wBAAwB;IAOrD;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAkB9D;;;OAGG;IACI,oBAAoB,IAAI,iBAAiB,GAAG,SAAS;IAI5D;;;OAGG;IACI,gBAAgB,IAAI,SAAS;IAIpC;;;OAGG;IACI,YAAY,IAAI,OAAO;IAIvB,uBAAuB,wBAhEN,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;IAoE3C,0BAA0B,IAAI,uBAAuB,GAAG,SAAS;IAIxE;;OAEG;IACI,aAAa,IAAI,IAAI;IAOrB,WAAW,IAAI,iBAAiB;CAQxC;AAGD,eAAO,MAAM,wBAAwB,0BAAyC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { QontoEmbedSdkError } from './QontoEmbedSdkError';
2
2
  /**
3
- * Error thrown when authentication fails due to missing or invalid tokens
3
+ * Error thrown when authentication fails due to missing or invalid authentication methods
4
4
  */
5
5
  export declare class AuthenticationError extends QontoEmbedSdkError {
6
6
  /**