@qonto/embed-sdk 0.66.0 → 0.68.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.
- package/dist/cards/client/cards.client.d.ts.map +1 -1
- package/dist/common/common.types.d.ts +0 -1
- package/dist/common/common.types.d.ts.map +1 -1
- package/dist/common/common.utils.d.ts +3 -4
- package/dist/common/common.utils.d.ts.map +1 -1
- package/dist/common/initialize/initialize.validate.d.ts.map +1 -1
- package/dist/common/operation-settings/operation-settings.d.ts +0 -2
- package/dist/common/operation-settings/operation-settings.d.ts.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +4 -4
- package/dist/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts +3 -3
- package/dist/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
- package/dist/sepa-transfers/bulk-transfers/index.d.ts +2 -2
- package/dist/sepa-transfers/client/sepa-transfers.client.d.ts +8 -9
- package/dist/sepa-transfers/client/sepa-transfers.client.d.ts.map +1 -1
- package/dist/sepa-transfers/index.d.ts +3 -3
- package/dist/sepa-transfers/sepa-transfers.d.ts +10 -10
- package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
- package/dist/sepa-transfers/shared/sepa-transfers.api.d.ts +3 -3
- package/dist/server/cards/client/cards.client.d.ts.map +1 -1
- package/dist/server/common/common.types.d.ts +0 -1
- package/dist/server/common/common.types.d.ts.map +1 -1
- package/dist/server/common/common.utils.d.ts +3 -4
- package/dist/server/common/common.utils.d.ts.map +1 -1
- package/dist/server/common/initialize/initialize.validate.d.ts.map +1 -1
- package/dist/server/common/operation-settings/operation-settings.d.ts +0 -2
- package/dist/server/common/operation-settings/operation-settings.d.ts.map +1 -1
- package/dist/server/index.server.umd.js +1 -1
- package/dist/server/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +4 -4
- package/dist/server/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts +3 -3
- package/dist/server/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
- package/dist/server/sepa-transfers/bulk-transfers/index.d.ts +2 -2
- package/dist/server/sepa-transfers/client/sepa-transfers.client.d.ts +8 -9
- package/dist/server/sepa-transfers/client/sepa-transfers.client.d.ts.map +1 -1
- package/dist/server/sepa-transfers/index.d.ts +3 -3
- package/dist/server/sepa-transfers/sepa-transfers.d.ts +10 -10
- package/dist/server/sepa-transfers/sepa-transfers.d.ts.map +1 -1
- package/dist/server/sepa-transfers/shared/sepa-transfers.api.d.ts +3 -3
- package/dist/server/src/common/common.utils.js +1 -1
- package/dist/server/src/common/operation-settings/operation-settings.js +1 -1
- package/dist/server/src/errors/AuthenticationError.js +1 -1
- package/dist/server/src/validation/operation-settings-validation.js +1 -1
- package/dist/server/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
- package/dist/server/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.d.ts +1 -1
- package/dist/server/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.d.ts.map +1 -1
- package/dist/server/ui/ui-elements/transaction-list/create-transaction-list-element.d.ts +1 -1
- package/dist/server/ui/ui-elements/transaction-list/transaction-list.d.ts.map +1 -1
- package/dist/server/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts +1 -1
- package/dist/server/ui/ui-elements.types.d.ts +2 -3
- package/dist/server/ui/ui-elements.types.d.ts.map +1 -1
- package/dist/server/validation/operation-settings-validation.d.ts +8 -45
- package/dist/server/validation/operation-settings-validation.d.ts.map +1 -1
- package/dist/src/cards/client/cards.client.js +1 -1
- package/dist/src/common/common.utils.js +1 -1
- package/dist/src/common/initialize/initialize.validate.js +1 -1
- package/dist/src/common/operation-settings/operation-settings.js +1 -1
- package/dist/src/errors/AuthenticationError.js +1 -1
- package/dist/src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.js +1 -1
- package/dist/src/sepa-transfers/client/sepa-transfers.client.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.js +1 -1
- package/dist/src/sepa-transfers/shared/sepa-transfers.utils.js +1 -1
- package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +1 -1
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +7 -7
- package/dist/src/ui/ui-elements/transaction-list/transaction-list.js +4 -4
- package/dist/src/validation/operation-settings-validation.js +1 -1
- package/dist/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
- package/dist/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.d.ts +1 -1
- package/dist/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.d.ts.map +1 -1
- package/dist/ui/ui-elements/transaction-list/create-transaction-list-element.d.ts +1 -1
- package/dist/ui/ui-elements/transaction-list/transaction-list.d.ts.map +1 -1
- package/dist/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts +1 -1
- package/dist/ui/ui-elements.types.d.ts +2 -3
- package/dist/ui/ui-elements.types.d.ts.map +1 -1
- package/dist/validation/operation-settings-validation.d.ts +8 -45
- package/dist/validation/operation-settings-validation.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/server/src/errors/EmbedOperationError.js +0 -1
|
@@ -4,13 +4,13 @@ import type { BulkTransfer, BulkTransferParams, GetBulkTransfer, GetBulkTransfer
|
|
|
4
4
|
* Fetches the list of SEPA bulk transfers for the current user.
|
|
5
5
|
* @param getBulkTransfersParams - An optional object containing:
|
|
6
6
|
* - `operationSettings`: An object with operation-level settings such as
|
|
7
|
-
* `
|
|
7
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
8
8
|
* `accessToken`, `stagingToken`, `paginationSettings`, and other optional
|
|
9
9
|
* parameters.
|
|
10
10
|
* @returns A promise that resolves to an object containing an array of bulk
|
|
11
11
|
* transfers and a `meta` object containing pagination state.
|
|
12
12
|
* @throws `InvalidParametersError` If any parameter validation fails.
|
|
13
|
-
* @throws `AuthenticationError` If both the `
|
|
13
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
14
14
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
15
15
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
16
16
|
*/
|
|
@@ -21,14 +21,14 @@ export declare function getBulkTransfers(getBulkTransfersParams?: SepaTransferPa
|
|
|
21
21
|
* - `sepaTransferSettings`: An object that contains the mandatory `bulkTransferId`
|
|
22
22
|
* to identify the bulk transfer to retrieve.
|
|
23
23
|
* - `operationSettings`: An object with operation-level settings such as
|
|
24
|
-
* `
|
|
24
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
25
25
|
* `accessToken`, `stagingToken`, and other optional
|
|
26
26
|
* parameters.
|
|
27
27
|
* @returns A promise that resolves to a BulkTransfer object containing details of
|
|
28
28
|
* the requested bulk transfer.
|
|
29
29
|
* @throws `InvalidParametersError` If the `bulkTransferId` parameter is not a string
|
|
30
30
|
* or missing, or if any parameter validation fails.
|
|
31
|
-
* @throws `AuthenticationError` If both the `
|
|
31
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
32
32
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
33
33
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
34
34
|
*/
|
|
@@ -10,7 +10,7 @@ export interface BulkTransferClientParams<T> {
|
|
|
10
10
|
/**
|
|
11
11
|
* Fetches the list of SEPA bulk transfers for the current user.
|
|
12
12
|
* @param getBulkTransfersParams - An optional object containing operation settings with
|
|
13
|
-
*
|
|
13
|
+
* proxyEndpointDescriptor (required).
|
|
14
14
|
* @returns A promise that resolves to an object containing an array of bulk
|
|
15
15
|
* transfers and a `meta` object containing pagination state.
|
|
16
16
|
*/
|
|
@@ -18,7 +18,7 @@ export declare function getBulkTransfers(getBulkTransfersParams?: BulkTransferCl
|
|
|
18
18
|
/**
|
|
19
19
|
* Fetches a specific SEPA bulk transfer by its ID.
|
|
20
20
|
* @param params - An object containing the bulkTransferId and operation settings with
|
|
21
|
-
*
|
|
21
|
+
* proxyEndpointDescriptor (required).
|
|
22
22
|
* @returns A promise that resolves to a BulkTransfer object.
|
|
23
23
|
*/
|
|
24
24
|
export declare function getBulkTransfer({ bulkTransferSettings, operationSettings, }: BulkTransferClientParams<GetBulkTransfer>): Promise<BulkTransfer>;
|
|
@@ -34,7 +34,7 @@ interface CreateBulkTransferClientParams {
|
|
|
34
34
|
* This function is only available in client-side (browser) environments as it requires UI interaction.
|
|
35
35
|
*
|
|
36
36
|
* @param params - An object containing bulk transfer settings and operation settings with
|
|
37
|
-
*
|
|
37
|
+
* proxyEndpointDescriptor (required).
|
|
38
38
|
* @returns As a yielded value, VoP check results for all unique beneficiaries.
|
|
39
39
|
* As the final return value, an object containing the created bulk transfer and metadata
|
|
40
40
|
* including the idempotency key.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAiBzF,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAEhC,MAAM,gCAAgC,CAAC;AAMxC;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAqBnE;AAqBD;;GAEG;AACH,UAAU,8BAA8B;IACtC,oBAAoB,EAAE,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,8BAA8B,GAAG,cAAc,CAChD,+BAA+B,EAAE,EACjC,0BAA0B,GAAG,SAAS,CACvC,CAkEA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBulkTransfer, getBulkTransfer, getBulkTransfers } from './client/bulk-transfers.client';
|
|
2
2
|
/**
|
|
3
3
|
* The bulkTransfers namespace contains client-side functions for SEPA bulk transfer operations.
|
|
4
|
-
* This version uses proxy-based authentication (
|
|
4
|
+
* This version uses proxy-based authentication (proxyEndpointDescriptor)
|
|
5
5
|
* and is designed for browser environments.
|
|
6
6
|
*
|
|
7
7
|
* For server-side operations using access tokens, import from '\@qonto/embed-sdk/server/sepa-transfers' and access sepaTransfers.bulkTransfers.
|
|
@@ -12,7 +12,7 @@ import { createBulkTransfer, getBulkTransfer, getBulkTransfers } from './client/
|
|
|
12
12
|
* const { bulkTransfers } = sepaTransfers;
|
|
13
13
|
*
|
|
14
14
|
* await bulkTransfers.getBulkTransfers({
|
|
15
|
-
* operationSettings: {
|
|
15
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
@@ -13,12 +13,11 @@ export interface SepaTransferClientParams<T> {
|
|
|
13
13
|
* Fetches the list of SEPA transfers for the current user.
|
|
14
14
|
* @param getSepaTransfersParams - An object containing:
|
|
15
15
|
* - `operationSettings`: An object with operation-level settings such as
|
|
16
|
-
* `
|
|
16
|
+
* `proxyEndpointDescriptor` (required),
|
|
17
17
|
* `paginationSettings`, and other optional parameters.
|
|
18
18
|
* @returns A promise that resolves to an object containing an array of SEPA
|
|
19
19
|
* transfers and a `meta` object containing pagination state.
|
|
20
|
-
* @throws `InvalidParametersError` If
|
|
21
|
-
* proxyEndpointDescriptor is provided.
|
|
20
|
+
* @throws `InvalidParametersError` If proxyEndpointDescriptor is not provided.
|
|
22
21
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
23
22
|
*/
|
|
24
23
|
export declare function getSepaTransfers(getSepaTransfersParams?: SepaTransferClientParams<never>): Promise<GetSepaTransfersResponse>;
|
|
@@ -27,10 +26,10 @@ export declare function getSepaTransfers(getSepaTransfersParams?: SepaTransferCl
|
|
|
27
26
|
* @param getSepaTransferParams - An object containing:
|
|
28
27
|
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
29
28
|
* - `operationSettings`: An object with operation-level settings such as
|
|
30
|
-
* `
|
|
29
|
+
* `proxyEndpointDescriptor` (required).
|
|
31
30
|
* @returns A promise that resolves to a SEPA transfer.
|
|
32
31
|
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is not a string,
|
|
33
|
-
* missing, or if
|
|
32
|
+
* missing, or if proxyEndpointDescriptor is not provided.
|
|
34
33
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
35
34
|
*/
|
|
36
35
|
export declare function getSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferClientParams<GetSepaTransfer>): Promise<SepaTransfer>;
|
|
@@ -61,10 +60,10 @@ export declare function createSepaTransfer({ sepaTransferSettings, operationSett
|
|
|
61
60
|
* @param cancelSepaTransferParams - An object containing:
|
|
62
61
|
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
63
62
|
* - `operationSettings`: An object with operation-level settings such as
|
|
64
|
-
* `
|
|
63
|
+
* `proxyEndpointDescriptor` (required).
|
|
65
64
|
* @returns A promise that resolves without return value.
|
|
66
65
|
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is missing,
|
|
67
|
-
* not a string, or if
|
|
66
|
+
* not a string, or if proxyEndpointDescriptor is not provided.
|
|
68
67
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
69
68
|
*/
|
|
70
69
|
export declare function cancelSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferClientParams<CancelSepaTransferParams>): Promise<void>;
|
|
@@ -75,10 +74,10 @@ export declare function cancelSepaTransfer({ sepaTransferSettings, operationSett
|
|
|
75
74
|
* @param getSepaTransferCreationFlowLinkParams - An object containing:
|
|
76
75
|
* - `sepaTransferSettings`: An object with the `callbackUrl` property.
|
|
77
76
|
* - `operationSettings`: An object with operation-level settings such as
|
|
78
|
-
* `
|
|
77
|
+
* `proxyEndpointDescriptor` (required).
|
|
79
78
|
* @returns A promise that resolves to an object representing the Embed Auth Link.
|
|
80
79
|
* @throws `InvalidParametersError` If the callbackUrl is invalid or missing, or if
|
|
81
|
-
*
|
|
80
|
+
* proxyEndpointDescriptor is not provided.
|
|
82
81
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
83
82
|
*/
|
|
84
83
|
export declare function getSepaTransferCreationFlowLink({ sepaTransferSettings, operationSettings, }: SepaTransferClientParams<SepaTransferCreationFlowRequest>): Promise<AuthLinkRequestResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAcjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED
|
|
1
|
+
{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAcjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAqBnE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CACzB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAChB,qBAAqB,EACrB,0BAA0B,GAAG,SAAS,CACvC,CAiIA;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpE;AA2BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA0B5F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cancelSepaTransfer, createSepaTransfer, getSepaTransfer, getSepaTransferCreationFlowLink, getSepaTransfers } from './client/sepa-transfers.client';
|
|
2
2
|
/**
|
|
3
3
|
* The sepaTransfers namespace contains all the client-side functions related to SEPA transfer operations.
|
|
4
|
-
* This version uses proxy-based authentication (
|
|
4
|
+
* This version uses proxy-based authentication (proxyEndpointDescriptor)
|
|
5
5
|
* and is designed for browser environments.
|
|
6
6
|
*
|
|
7
7
|
* For server-side operations using access tokens, import from '\@qonto/embed-sdk/server/sepa-transfers'.
|
|
@@ -15,11 +15,11 @@ import { cancelSepaTransfer, createSepaTransfer, getSepaTransfer, getSepaTransfe
|
|
|
15
15
|
* ```ts
|
|
16
16
|
* // Single SEPA transfers
|
|
17
17
|
* await sepaTransfers.getSepaTransfers({
|
|
18
|
-
* operationSettings: {
|
|
18
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
19
19
|
* });
|
|
20
20
|
* await sepaTransfers.getSepaTransfer({
|
|
21
21
|
* sepaTransferSettings: { sepaTransferId: '...' },
|
|
22
|
-
* operationSettings: {
|
|
22
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
23
23
|
* });
|
|
24
24
|
*
|
|
25
25
|
* // Bulk transfers are nested under sepaTransfers.bulkTransfers
|
|
@@ -5,13 +5,13 @@ import '../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts';
|
|
|
5
5
|
* Fetches the list of SEPA transfers for the current user.
|
|
6
6
|
* @param getSepaTransfersParams - An object containing:
|
|
7
7
|
* - `operationSettings`: An object with operation-level settings such as
|
|
8
|
-
* `
|
|
8
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
9
9
|
* `accessToken`, `stagingToken`, `paginationSettings`, and other optional
|
|
10
10
|
* parameters.
|
|
11
11
|
* @returns A promise that resolves to an object containing an array of SEPA
|
|
12
12
|
* transfers and a `meta` object containing pagination state.
|
|
13
13
|
* @throws `InvalidParametersError` If any parameter validation fails.
|
|
14
|
-
* @throws `AuthenticationError` If both the `
|
|
14
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
15
15
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
16
16
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
17
17
|
*/
|
|
@@ -21,13 +21,13 @@ export declare function getSepaTransfers(getSepaTransfersParams?: SepaTransferPa
|
|
|
21
21
|
* @param getSepaTransferParams - An object containing:
|
|
22
22
|
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
23
23
|
* - `operationSettings`: An object with operation-level settings such as
|
|
24
|
-
* `
|
|
24
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
25
25
|
* `accessToken`, `stagingToken`, and other optional
|
|
26
26
|
* parameters.
|
|
27
27
|
* @returns A promise that resolves to a SEPA transfer.
|
|
28
28
|
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is not a string
|
|
29
29
|
* or missing, or if any parameter validation fails.
|
|
30
|
-
* @throws `AuthenticationError` If both the `
|
|
30
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
31
31
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
32
32
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
33
33
|
*/
|
|
@@ -61,14 +61,14 @@ export declare function getSepaTransfer({ sepaTransferSettings, operationSetting
|
|
|
61
61
|
* the process and require the user to give the transfer data after the VoP
|
|
62
62
|
* result.
|
|
63
63
|
* - `operationSettings`: An object with operation-level settings such as
|
|
64
|
-
* `
|
|
64
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
65
65
|
* `accessToken`, `stagingToken`, `idempotencyKey`, `mfaPreference`,
|
|
66
66
|
* `uiParentElementId`, and other optional parameters.
|
|
67
67
|
* @returns As the first yielded value, a promise that resolves to the VoP check
|
|
68
68
|
* result.
|
|
69
69
|
* @returns As the final return value, a promise that resolves to the created
|
|
70
70
|
* SEPA transfer.
|
|
71
|
-
* @throws `AuthenticationError` If both the `
|
|
71
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
72
72
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
73
73
|
* @throws `InvalidParametersError` If the `transfer` parameter is not an object
|
|
74
74
|
* or is missing, or if the required properties of the transfer object are
|
|
@@ -135,13 +135,13 @@ export declare function createSepaTransfer({ sepaTransferSettings, operationSett
|
|
|
135
135
|
* @param cancelSepaTransferParams - An object containing:
|
|
136
136
|
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
137
137
|
* - `operationSettings`: An object with operation-level settings such as
|
|
138
|
-
* `
|
|
138
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
139
139
|
* `accessToken`, `stagingToken`, and other optional
|
|
140
140
|
* parameters.
|
|
141
141
|
* @returns A promise that resolves without return value.
|
|
142
142
|
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is missing
|
|
143
143
|
* or not a string, or if any parameter validation fails.
|
|
144
|
-
* @throws `AuthenticationError` If both the `
|
|
144
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
145
145
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
146
146
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
147
147
|
*/
|
|
@@ -155,14 +155,14 @@ export declare function cancelSepaTransfer({ sepaTransferSettings, operationSett
|
|
|
155
155
|
* - `sepaTransferSettings`: An object with the `callbackUrl` property, which
|
|
156
156
|
* will be used to return the user to the desired location after completion.
|
|
157
157
|
* - `operationSettings`: An object with operation-level settings such as
|
|
158
|
-
* `
|
|
158
|
+
* `proxyEndpointDescriptor` (preferred over using the access token flow),
|
|
159
159
|
* `accessToken`, `stagingToken`, `locale`, and other optional
|
|
160
160
|
* parameters.
|
|
161
161
|
* @returns A promise that resolves to an object representing the Embed Auth Link.
|
|
162
162
|
* This object contains a `url` property with the link to start the SEPA transfer.
|
|
163
163
|
* @throws `InvalidParametersError` If the callbackUrl is invalid or missing, or
|
|
164
164
|
* if any parameter validation fails.
|
|
165
|
-
* @throws `AuthenticationError` If both the `
|
|
165
|
+
* @throws `AuthenticationError` If both the `proxyEndpointDescriptor` and
|
|
166
166
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
167
167
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
168
168
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAwCjF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,EAGlB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAgBvC,OAAO,4DAA4D,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAuDnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CA2B7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CACnB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAAC,qBAAqB,EAAE,YAAY,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAwCjF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,EAGlB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAgBvC,OAAO,4DAA4D,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAuDnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CA2B7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CACnB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAAC,qBAAqB,EAAE,YAAY,GAAG,SAAS,CAAC,CAiJlE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB9D;AA+BD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyBtF"}
|
|
@@ -46,7 +46,7 @@ export declare function prepareGetSepaTransfersCall({ paginationSettings, access
|
|
|
46
46
|
export declare function getSepaTransfers({ accessToken, stagingToken, paginationSettings, }: GetSepaTransfersParams): Promise<GetSepaTransfersApiResponse>;
|
|
47
47
|
/**
|
|
48
48
|
* Prepares a network call descriptor for fetching a single SEPA transfer by ID.
|
|
49
|
-
* This function is used internally to support
|
|
49
|
+
* This function is used internally to support the proxyEndpointDescriptor flow
|
|
50
50
|
* and the access token flow in the getSepaTransfer function.
|
|
51
51
|
*
|
|
52
52
|
* @param params - An object containing:
|
|
@@ -65,7 +65,7 @@ export declare function prepareGetSepaTransferCall({ sepaTransferId, accessToken
|
|
|
65
65
|
export declare function getSepaTransfer({ accessToken, stagingToken, sepaTransferId, }: GetSepaTransferParams): Promise<SepaTransferDataObject>;
|
|
66
66
|
/**
|
|
67
67
|
* Prepares a network call descriptor for creating a SEPA transfer.
|
|
68
|
-
* This function is used internally to support
|
|
68
|
+
* This function is used internally to support the proxyEndpointDescriptor flow
|
|
69
69
|
* and the access token flow in the createSepaTransfer function.
|
|
70
70
|
*
|
|
71
71
|
* @param params - An object containing:
|
|
@@ -82,7 +82,7 @@ export declare function prepareCreateSepaTransferCall({ transfer, vopProofToken,
|
|
|
82
82
|
export declare function createSepaTransfer({ transfer, vopProofToken, accessToken, stagingToken, scaSessionToken, idempotencyKey, }: CreateSepaTransferParams): Promise<SepaTransferDataObject>;
|
|
83
83
|
/**
|
|
84
84
|
* Prepares a network call descriptor for canceling a SEPA transfer by ID.
|
|
85
|
-
* This function is used internally to support
|
|
85
|
+
* This function is used internally to support the proxyEndpointDescriptor flow
|
|
86
86
|
* and the access token flow in the cancelSepaTransfer function.
|
|
87
87
|
*
|
|
88
88
|
* @param params - An object containing:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildRequestHeaders as
|
|
1
|
+
import{buildRequestHeaders as t,encodeNetworkCall as o,decodeNetworkResponse as r}from"./network/network.js";import{EmbedApiError as e}from"../errors/EmbedApiError.js";async function s({networkCallDescriptor:s,proxyEndpointDescriptor:n}){const a={...Object.fromEntries([...t(s.options?.headers)??{}])},i={...s,options:{...s.options,headers:a}},p=o(i),d=await fetch(n.path,{method:n.method,headers:n.options.headers,body:p}),m=await d.text(),h=r(m);if(!d.ok)throw new e({code:d.status,data:h,message:`Error from proxy endpoint: ${d.status} ${d.statusText}`});return h}export{s as callProxyFunction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MFA_METHODS as e}from"../constants.js";class t{constructor(){this.mfaPreference=e.PASSKEY,this.debugMode=!1}static getInstance(){return t.instance||(t.instance=new t),t.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.
|
|
1
|
+
import{MFA_METHODS as e}from"../constants.js";class t{constructor(){this.mfaPreference=e.PASSKEY,this.debugMode=!1}static getInstance(){return t.instance||(t.instance=new t),t.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyEndpointDescriptor&&(this.proxyEndpointDescriptor=e.proxyEndpointDescriptor)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyEndpointDescriptor(){return this.proxyEndpointDescriptor}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=e.PASSKEY,this.debugMode=!1,this.proxyEndpointDescriptor=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode}}}const r=t.getInstance();export{t as OperationSettingsManager,r as operationSettingsManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{QontoEmbedSdkError as
|
|
1
|
+
import{QontoEmbedSdkError as t}from"./QontoEmbedSdkError.js";class e extends t{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid authentication method. Provide either a proxyEndpointDescriptor or accessToken, either as parameters or by calling the initialize function first."}}export{e as AuthenticationError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MFA_METHODS as e}from"../common/constants.js";import{environmentManager as t}from"../common/environment/environment-manager.js";import{operationSettingsManager as n}from"../common/operation-settings/operation-settings.js";import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";const r={requiresUI:!1};function i(i,{requiresUI:
|
|
1
|
+
import{MFA_METHODS as e}from"../common/constants.js";import{environmentManager as t}from"../common/environment/environment-manager.js";import{operationSettingsManager as n}from"../common/operation-settings/operation-settings.js";import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";const r={requiresUI:!1};function i(i,{requiresUI:a}=r){const s=i?.uiParentElementId||n.getUIParentElementId();if(a){if(!s)throw new o("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");if(!["string","function"].includes(typeof s))throw new o("operationSettings.uiParentElementId must be a string or a function returning an HTMLElement")}const m=i?.mfaPreference||n.getMFAPreference();if(m){const n=(c=Object.values(e),t.isProductionEnvironment()?c.filter((t=>t!==e.MOCK)):c);if(!n.includes(m))throw new o(`operationSettings.mfaPreference must be one of ${n.join(", ")}`);if(t.isProductionEnvironment()&&m===e.MOCK)throw new o("operationSettings.mfaPreference cannot be set to mock in production environment.")}var c;const p=i?.debugMode||n.getDebugMode();if(void 0!==p&&"boolean"!=typeof p)throw new o("operationSettings.debugMode must be a boolean.");const f=i?.proxyEndpointDescriptor||n.getProxyEndpointDescriptor();if(f&&!f.path)throw new o("operationSettings.proxyEndpointDescriptor must have at least a string-formatted path property.");return{...i,uiParentElementId:s,mfaPreference:m,debugMode:p,proxyEndpointDescriptor:f}}export{i as validateOperationSettingsParams};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qonto-sca-passkey-waiting.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,oEAAoE,CAAC;AAC5E,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAClE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AAMzD,qBAEa,sBAAuB,SAAQ,UAAU;IACpD,MAAM,CAAC,MAAM,0BAAgC;IAG7C,gBAAgB,EAAE,MAAM,CAAM;IAG9B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAG9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,OAAO,CAAC,WAAW,CAAkB;IAGrC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAO,CAAC,gBAAgB,CAEV;IAEd,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;YAKd,YAAY;IAkC1B,OAAO,CAAC,WAAW;YAOL,kBAAkB;
|
|
1
|
+
{"version":3,"file":"qonto-sca-passkey-waiting.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,oEAAoE,CAAC;AAC5E,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAClE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AAMzD,qBAEa,sBAAuB,SAAQ,UAAU;IACpD,MAAM,CAAC,MAAM,0BAAgC;IAG7C,gBAAgB,EAAE,MAAM,CAAM;IAG9B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAG9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,OAAO,CAAC,WAAW,CAAkB;IAGrC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAO,CAAC,gBAAgB,CAEV;IAEd,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;YAKd,YAAY;IAkC1B,OAAO,CAAC,WAAW;YAOL,kBAAkB;YAmClB,iBAAiB;IAsB/B,OAAO,CAAC,gBAAgB;IAWxB,MAAM;CA4CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
|
package/dist/server/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
|
|
|
6
6
|
*
|
|
7
7
|
* @param params - Object containing:
|
|
8
8
|
* - containerElement: The DOM element where the component will be appended
|
|
9
|
-
* - operationSettings: Settings passed to the component (accessToken,
|
|
9
|
+
* - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, locale, etc.)
|
|
10
10
|
* - uiElementSettings: Optional settings including event listeners
|
|
11
11
|
*/
|
|
12
12
|
export declare function createSepaTransferCreationElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<never>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfer-creation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAgBvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AASnF,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,iDAAiD,CAAC;AASzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,qBAEa,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAC,MAAM,0BAA8B;IAG3C,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,MAAM,EAAE,MAAM,CAAQ;IAGtB,OAAO,CAAC,WAAW,CACyB;IAG5C,OAAO,CAAC,QAAQ,CAKd;IAGF,OAAO,CAAC,uBAAuB,CAKjB;IAGd,OAAO,CAAC,SAAS,CAAoC;IAGrD,OAAO,CAAC,kBAAkB,CAAkB;IAG5C,OAAO,CAAC,aAAa,CAAqB;IAE1C,iBAAiB;IAkBjB,oBAAoB;IAoBpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,OAAO,CAAC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"sepa-transfer-creation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAgBvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AASnF,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,iDAAiD,CAAC;AASzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,qBAEa,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAC,MAAM,0BAA8B;IAG3C,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,MAAM,EAAE,MAAM,CAAQ;IAGtB,OAAO,CAAC,WAAW,CACyB;IAG5C,OAAO,CAAC,QAAQ,CAKd;IAGF,OAAO,CAAC,uBAAuB,CAKjB;IAGd,OAAO,CAAC,SAAS,CAAoC;IAGrD,OAAO,CAAC,kBAAkB,CAAkB;IAG5C,OAAO,CAAC,aAAa,CAAqB;IAE1C,iBAAiB;IAkBjB,oBAAoB;IAoBpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,OAAO,CAAC,4BAA4B,CA4DlC;IAEF,OAAO,CAAC,8BAA8B,CAYpC;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,uBAAuB,CAkD7B;IAEF,MAAM;CA+CP"}
|
|
@@ -7,7 +7,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
|
|
|
7
7
|
*
|
|
8
8
|
* @param params - Object containing:
|
|
9
9
|
* - containerElement: The DOM element where the component will be appended
|
|
10
|
-
* - operationSettings: Settings passed to the component (accessToken,
|
|
10
|
+
* - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, paginationSettings, etc.)
|
|
11
11
|
* - uiElementSettings: Optional settings including event listeners
|
|
12
12
|
*/
|
|
13
13
|
export declare function createTransactionListElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<GetTransactionsSettings>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-list.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/transaction-list/transaction-list.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAMnF,OAAO,iDAAiD,CAAC;AACzD,OAAO,sDAAsD,CAAC;AAC9D,OAAO,uDAAuD,CAAC;AAE/D,qBAEa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAe;IAG5B,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAGzD,OAAO,CAAC,YAAY,CAA4B;IAGhD,OAAO,CAAC,eAAe,CAA8B;IAGrD,OAAO,CAAC,SAAS,CAAkB;IAGnC,OAAO,CAAC,KAAK,CAAqB;IAElC,iBAAiB;IAMjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;YAMjC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"transaction-list.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/transaction-list/transaction-list.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAMnF,OAAO,iDAAiD,CAAC;AACzD,OAAO,sDAAsD,CAAC;AAC9D,OAAO,uDAAuD,CAAC;AAE/D,qBAEa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAe;IAG5B,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAGzD,OAAO,CAAC,YAAY,CAA4B;IAGhD,OAAO,CAAC,eAAe,CAA8B;IAGrD,OAAO,CAAC,SAAS,CAAkB;IAGnC,OAAO,CAAC,KAAK,CAAqB;IAElC,iBAAiB;IAMjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;YAMjC,iBAAiB;IAiC/B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;IAOtB,MAAM;CAsEP"}
|
|
@@ -6,7 +6,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
|
|
|
6
6
|
*
|
|
7
7
|
* @param params - Object containing:
|
|
8
8
|
* - containerElement: The DOM element where the component will be appended
|
|
9
|
-
* - operationSettings: Settings passed to the component (accessToken,
|
|
9
|
+
* - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, paginationSettings, etc.)
|
|
10
10
|
* - uiElementSettings: Optional settings including event listeners
|
|
11
11
|
*/
|
|
12
12
|
export declare function createTransferListElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<never>): void;
|
|
@@ -44,8 +44,7 @@ export interface UIElementSettings<T> {
|
|
|
44
44
|
* initialize function previously) and contains settings related
|
|
45
45
|
* to the overall operation. For UI elements, it has to include at least the
|
|
46
46
|
* `uiParentElementId`, which specifies the DOM element where the UI element
|
|
47
|
-
* will be appended. In addition, it may include authentication details
|
|
48
|
-
* the preferred method is to provide a `proxyRequestFunction`.
|
|
47
|
+
* will be appended. In addition, it may include authentication details via `proxyEndpointDescriptor`.
|
|
49
48
|
*/
|
|
50
49
|
export interface UIElementParams<T> {
|
|
51
50
|
uiElementSettings: UIElementSettings<T>;
|
|
@@ -66,7 +65,7 @@ export interface UIElementCreatorParams<T> {
|
|
|
66
65
|
*/
|
|
67
66
|
uiElementSettings?: UIElementSettings<T>;
|
|
68
67
|
/**
|
|
69
|
-
* Operation-level settings such as accessToken, stagingToken,
|
|
68
|
+
* Operation-level settings such as accessToken, stagingToken, proxyEndpointDescriptor, etc.
|
|
70
69
|
* These settings are passed directly to SDK API functions.
|
|
71
70
|
*/
|
|
72
71
|
operationSettings?: OperationSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-elements.types.d.ts","sourceRoot":"","sources":["../../../src/ui/ui-elements.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE/E;;;;;;;;GAQG;AACH,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,aAAa,EAAE,cAAc,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC;IACpB,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1D;AAED
|
|
1
|
+
{"version":3,"file":"ui-elements.types.d.ts","sourceRoot":"","sources":["../../../src/ui/ui-elements.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE/E;;;;;;;;GAQG;AACH,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,aAAa,EAAE,cAAc,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC;IACpB,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC;;OAEG;IACH,gBAAgB,EAAE,WAAW,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACzC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PaginationSettings } from '@common/api-pagination/api-pagination.types';
|
|
2
|
-
import type { ProxyEndpointDescriptor
|
|
2
|
+
import type { ProxyEndpointDescriptor } from '@common/common.types.ts';
|
|
3
3
|
import type { Locale } from '@common/locale/locale.types';
|
|
4
4
|
import type { MfaMethod } from '@common/operation-settings/operation-settings.types';
|
|
5
5
|
export type UIParentElementId = string | (() => HTMLElement);
|
|
@@ -49,26 +49,6 @@ export interface OperationSettings {
|
|
|
49
49
|
* is not subject to pagination, this parameter will be ignored.
|
|
50
50
|
*/
|
|
51
51
|
paginationSettings?: PaginationSettings;
|
|
52
|
-
/**
|
|
53
|
-
* `proxyRequestFunction` is a mechanism to avoid operating with sensitive
|
|
54
|
-
* information, like the access token and the staging token, in client side
|
|
55
|
-
* environments. Using them in client side could lead to data leak.It works as
|
|
56
|
-
* follows:
|
|
57
|
-
*
|
|
58
|
-
* Qonto Embed exposes a proxy endpoint in its API that is capable of getting
|
|
59
|
-
* requests prepared by the SDK. In your web application, you must implement a
|
|
60
|
-
* backend endpoint that receives a string value in the body,
|
|
61
|
-
* adds the access token in the `Authentication` header and calls the Qonto
|
|
62
|
-
* Embed proxy endpoint with the string payload you received. The `proxyRequestFunction`
|
|
63
|
-
* the SDK expects is a function in which you will implement the call to your
|
|
64
|
-
* backend endpoint. It receives a string parameter, it must perform a call to
|
|
65
|
-
* your endpoint and return the data the endpoint sends you back.
|
|
66
|
-
*
|
|
67
|
-
* The SDK will then decode the received data and return the appropriate return
|
|
68
|
-
* value to the called function. Read more about implementing the whole flow in
|
|
69
|
-
* [the Proxy Endpoint Implementation guide](https://docs.qonto.com/api-reference/embed-sdk-api/variables/overview-common).
|
|
70
|
-
*/
|
|
71
|
-
proxyRequestFunction?: ProxyRequestFunction;
|
|
72
52
|
/**
|
|
73
53
|
* `proxyEndpointDescriptor` is a mechanism to avoid operating with sensitive
|
|
74
54
|
* information, like the access token and the staging token, in client side
|
|
@@ -120,24 +100,6 @@ export type OperationSettingsWithUI = OperationSettings & {
|
|
|
120
100
|
* to authentication tokens should be avoided for security reasons.
|
|
121
101
|
*/
|
|
122
102
|
export interface ClientOperationSettings {
|
|
123
|
-
/**
|
|
124
|
-
* Required for client-side operations: either proxyRequestFunction or proxyEndpointDescriptor.
|
|
125
|
-
*
|
|
126
|
-
* `proxyRequestFunction` is a mechanism to avoid operating with sensitive
|
|
127
|
-
* information, like the access token and the staging token, in client side
|
|
128
|
-
* environments. Using them in client side could lead to data leak. It works as
|
|
129
|
-
* follows:
|
|
130
|
-
*
|
|
131
|
-
* Qonto Embed exposes a proxy endpoint in its API that is capable of getting
|
|
132
|
-
* requests prepared by the SDK. In your web application, you must implement a
|
|
133
|
-
* backend endpoint that receives a string value in the body,
|
|
134
|
-
* adds the access token in the `Authentication` header and calls the Qonto
|
|
135
|
-
* Embed proxy endpoint with the string payload you received. The `proxyRequestFunction`
|
|
136
|
-
* the SDK expects is a function in which you will implement the call to your
|
|
137
|
-
* backend endpoint. It receives a string parameter, it must perform a call to
|
|
138
|
-
* your endpoint and return the data the endpoint sends you back.
|
|
139
|
-
*/
|
|
140
|
-
proxyRequestFunction?: ProxyRequestFunction;
|
|
141
103
|
/**
|
|
142
104
|
* `proxyEndpointDescriptor` is a mechanism to avoid operating with sensitive
|
|
143
105
|
* information, like the access token and the staging token, in client side
|
|
@@ -240,7 +202,6 @@ export interface ServerOperationSettings {
|
|
|
240
202
|
* Client-only properties are explicitly excluded from server settings.
|
|
241
203
|
* Use `@qonto/embed-sdk/{namespace}` for client-side operations.
|
|
242
204
|
*/
|
|
243
|
-
proxyRequestFunction?: never;
|
|
244
205
|
proxyEndpointDescriptor?: never;
|
|
245
206
|
uiParentElementId?: never;
|
|
246
207
|
mfaPreference?: never;
|
|
@@ -254,23 +215,25 @@ export declare function validateOperationSettingsParams(params: OperationSetting
|
|
|
254
215
|
requiresUI?: false;
|
|
255
216
|
}): OperationSettings;
|
|
256
217
|
/**
|
|
257
|
-
* Validates client operation settings and ensures
|
|
258
|
-
*
|
|
218
|
+
* Validates client operation settings and ensures proxyEndpointDescriptor is provided
|
|
219
|
+
* (either in params or from global settings).
|
|
259
220
|
*
|
|
260
221
|
* @param params - Client operation settings to validate
|
|
261
222
|
* @param errorMessage - Custom error message to throw if validation fails
|
|
262
223
|
* @returns Validated client operation settings with proxy configuration
|
|
263
|
-
* @throws InvalidParametersError if
|
|
224
|
+
* @throws InvalidParametersError if proxyEndpointDescriptor is not provided
|
|
264
225
|
*
|
|
265
226
|
* @example
|
|
266
227
|
* ```typescript
|
|
267
228
|
* const settings = validateClientOperationSettings(
|
|
268
229
|
* params?.operationSettings,
|
|
269
|
-
* 'Client-side operations require
|
|
230
|
+
* 'Client-side operations require proxyEndpointDescriptor. ' +
|
|
270
231
|
* 'For security, never expose access tokens in the browser. ' +
|
|
271
232
|
* 'Use "@qonto/embed-sdk/server/{namespace}" only in server-side/backend environments.'
|
|
272
233
|
* );
|
|
273
234
|
* ```
|
|
274
235
|
*/
|
|
275
|
-
export declare function validateClientOperationSettings(params: ClientOperationSettings | undefined, errorMessage?: string): ClientOperationSettings
|
|
236
|
+
export declare function validateClientOperationSettings(params: ClientOperationSettings | undefined, errorMessage?: string): ClientOperationSettings & {
|
|
237
|
+
proxyEndpointDescriptor: ProxyEndpointDescriptor;
|
|
238
|
+
};
|
|
276
239
|
//# sourceMappingURL=operation-settings-validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-settings-validation.d.ts","sourceRoot":"","sources":["../../../src/validation/operation-settings-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"operation-settings-validation.d.ts","sourceRoot":"","sources":["../../../src/validation/operation-settings-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAIrF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IAEH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCAAwC;IACvD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG;IACxD,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;OAaG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAElD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,GAAG;IACpE,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,KAAK,CAAC;IAChC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAC1B,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAMD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,MAAM,EAAE,wCAAwC,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE,GACtE,uBAAuB,CAAC;AAC3B,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,MAAM,CAAC,EAAE,wCAAwC,GAAG;IAAE,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GACzE,iBAAiB,CAAC;AAqErB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,uBAAuB,GAAG,SAAS,EAC3C,YAAY,CAAC,EAAE,MAAM,GACpB,uBAAuB,GAAG;IAAE,uBAAuB,EAAE,uBAAuB,CAAA;CAAE,CAiBhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{authManager as r}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../../common/auth/auth.validate.js";import{callProxyFunction as
|
|
1
|
+
import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{authManager as r}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{validateOperationSettingsParams as o,validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as a}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as s,createIframe as d}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as c,prepareGetCardCall as m,prepareGetCardsCall as p}from"../shared/cards.api.js";import{createEmbedUI as g}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as u,serializeCard as l,serializeOrderCardPayload as f}from"../shared/cards.serializer.js";import{validateDisplayCardParams as y,validateUnlockCardParams as k,validateOrderCardParams as w,validateGetCardParams as b}from"../shared/cards.validate.js";async function h(r){e.cardsList();const t=r?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new a("membershipId must be a string");const{proxyEndpointDescriptor:o,stagingToken:s}=i(r?.operationSettings,'Client-side card operations require proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/server/cards" only in server-side/backend environments.'),d=p({membershipId:t,stagingToken:s});return(await n({proxyEndpointDescriptor:o,networkCallDescriptor:d})).body.cards.map((e=>l(e)))}async function I({cardSettings:r,operationSettings:t}){e.cardsGet(),b(r);const o=r.cardId,{proxyEndpointDescriptor:s,stagingToken:d}=i(t,'Client-side card operations require proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/server/cards" only in server-side/backend environments.'),c=m({cardId:o,stagingToken:d}),p=(await n({proxyEndpointDescriptor:s,networkCallDescriptor:c})).body.cards;if(Array.isArray(p)&&p.length>0)return l(p[0]);throw new a("Unable to retrieve card data")}async function E(n){e.cardsOrder();const o=t(),{uiParentElementId:i,debugMode:c}=n.operationSettings;if(!i)throw new a("uiParentElementId is required");w(n.cardSettings);const m=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),p=await d({iframeUrl:m,parentElementId:i}),g=f(n.cardSettings),u=await p.postMessage(g);return p.destroy(),l(u)}async function S(n){e.cardsUnlock();const o=t(),{uiParentElementId:i,debugMode:c}=n.operationSettings;if(!i)throw new a("uiParentElementId is required");k(n.cardSettings);const m=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),p=await d({iframeUrl:m,parentElementId:i}),g=u(n),f=await p.postMessage(g);return p.destroy(),l(f)}async function v(r){e.cardsDisplay();const{uiParentElementId:i,accessToken:s,stagingToken:d,debugMode:m,mfaPreference:p,proxyEndpointDescriptor:u}=o(r.operationSettings,{requiresUI:!0});if(!i)throw new a("uiParentElementId is required");if(y(r.cardSettings),u){const e=c({stagingToken:d}),t=(await n({proxyEndpointDescriptor:u,networkCallDescriptor:e})).body.embed_auth_link;return g({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:i,debugMode:m},cardIframeUrl:t.url})}{const e=s||t(),{getCardIframeURL:n}=await import("../shared/cards.api.js"),o=await n({...r.cardSettings,accessToken:e,stagingToken:d});return g({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:i,debugMode:m},cardIframeUrl:o.url})}}export{v as displayCard,I as getCard,h as getCards,E as orderCard,S as unlockCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildRequestHeaders as e,encodeNetworkCall as t,decodeNetworkResponse as o}from"./network/network.js";import{EmbedApiError as r}from"../errors/EmbedApiError.js";import{EmbedOperationError as n}from"../errors/EmbedOperationError.js";function s(e){let t=null;if(t="function"==typeof e?e():document.getElementById(e),!(t&&t instanceof HTMLElement))throw new n(`Could not install the UI Element because the parent element with id ${e} was not found.\nPlease make sure to pass a valid parentElementId or ensure the parentElementId function returns a valid element.`);return t}async function
|
|
1
|
+
import{buildRequestHeaders as e,encodeNetworkCall as t,decodeNetworkResponse as o}from"./network/network.js";import{EmbedApiError as r}from"../errors/EmbedApiError.js";import{EmbedOperationError as n}from"../errors/EmbedOperationError.js";function s(e){let t=null;if(t="function"==typeof e?e():document.getElementById(e),!(t&&t instanceof HTMLElement))throw new n(`Could not install the UI Element because the parent element with id ${e} was not found.\nPlease make sure to pass a valid parentElementId or ensure the parentElementId function returns a valid element.`);return t}async function a({networkCallDescriptor:n,proxyEndpointDescriptor:s}){const a={...Object.fromEntries([...e(n.options?.headers)??{}])},i={...n,options:{...n.options,headers:a}},d=t(i),m=await fetch(s.path,{method:s.method,headers:s.options.headers,body:d}),p=await m.text(),l=o(p);if(!m.ok)throw new r({code:m.status,data:l,message:`Error from proxy endpoint: ${m.status} ${m.statusText}`});return l}export{a as callProxyFunction,s as getUIParentElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validateLocale as n}from"../locale/locale.validate.js";import{validateOperationSettingsParams as o}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as t}from"../../errors/InvalidParametersError.js";function e(e){if(!e?.accessToken&&!e?.operationSettings?.
|
|
1
|
+
import{validateLocale as n}from"../locale/locale.validate.js";import{validateOperationSettingsParams as o}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as t}from"../../errors/InvalidParametersError.js";function e(e){if(!e?.accessToken&&!e?.operationSettings?.proxyEndpointDescriptor)throw new t("Either operationSettings.proxyEndpointDescriptor or access token is required when calling initialize()");return e?.operationSettings&&o(e.operationSettings),function(n){if(n.environment){if(!["production","staging","local"].includes(n.environment))throw new t('If provided, environment must be either "production" or "staging"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.environment.PRODUCTION" or "constants.environment.STAGING"');if(n.branch&&!["master","sandbox","qa"].includes(n.branch))throw new t('If provided, branch must be either "master", "sandbox" or "qa"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.branch.MASTER" or "constants.environment.SANDBOX" and so on')}}(e),e.locale&&n(e.locale),e}export{e as validateInitializeParams};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MFA_METHODS as e}from"../constants.js";class t{constructor(){this.mfaPreference=e.PASSKEY,this.debugMode=!1}static getInstance(){return t.instance||(t.instance=new t),t.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.
|
|
1
|
+
import{MFA_METHODS as e}from"../constants.js";class t{constructor(){this.mfaPreference=e.PASSKEY,this.debugMode=!1}static getInstance(){return t.instance||(t.instance=new t),t.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyEndpointDescriptor&&(this.proxyEndpointDescriptor=e.proxyEndpointDescriptor)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyEndpointDescriptor(){return this.proxyEndpointDescriptor}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=e.PASSKEY,this.debugMode=!1,this.proxyEndpointDescriptor=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode}}}const r=t.getInstance();export{t as OperationSettingsManager,r as operationSettingsManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{QontoEmbedSdkError as
|
|
1
|
+
import{QontoEmbedSdkError as t}from"./QontoEmbedSdkError.js";class e extends t{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid authentication method. Provide either a proxyEndpointDescriptor or accessToken, either as parameters or by calling the initialize function first."}}export{e as AuthenticationError};
|