@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.
- package/dist/auth-links/auth-links.d.ts.map +1 -1
- package/dist/beneficiaries/beneficiaries.d.ts.map +1 -1
- package/dist/cards/cards.d.ts +39 -26
- package/dist/cards/cards.d.ts.map +1 -1
- package/dist/common/common.types.d.ts +9 -0
- package/dist/common/common.types.d.ts.map +1 -0
- package/dist/common/common.utils.d.ts +9 -0
- package/dist/common/common.utils.d.ts.map +1 -1
- package/dist/common/network/network.d.ts +7 -2
- package/dist/common/network/network.d.ts.map +1 -1
- package/dist/common/operation-settings/operation-settings.d.ts +3 -0
- package/dist/common/operation-settings/operation-settings.d.ts.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +1 -1
- package/dist/index.umd.js +1632 -18
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +6 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +6 -0
- package/dist/organizations/organizations.d.ts +11 -6
- package/dist/organizations/organizations.d.ts.map +1 -1
- package/dist/sca/sca.d.ts.map +1 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts +9 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts.map +1 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +25 -32
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.d.ts +36 -51
- package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
- package/dist/src/auth-links/auth-links.js +1 -1
- package/dist/src/beneficiaries/beneficiaries.js +1 -1
- package/dist/src/cards/cards.js +1 -1
- package/dist/src/common/api-pagination/api-pagination.js +1 -1
- package/dist/src/common/common.utils.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/organizations/organizations.js +1 -1
- package/dist/src/sca/sca.js +1 -1
- package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.api.js +1 -1
- package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.public-api.js +1 -1
- package/dist/src/transactions/transactions.js +1 -1
- package/dist/src/ui/animations/general_success.json.js +1 -0
- package/dist/src/ui/animations/generic_error.json.js +1 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.js +29 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.styles.js +178 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.utils.js +1 -0
- package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.js +10 -0
- package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.styles.js +140 -0
- package/dist/src/ui/customizable-components/select-field/qonto-option.js +5 -0
- package/dist/src/ui/customizable-components/select-field/qonto-select-field.js +73 -0
- package/dist/src/ui/customizable-components/select-field/qonto-select-field.styles.js +307 -0
- package/dist/src/ui/customizable-components/text-field/qonto-text-field.js +24 -0
- package/dist/src/ui/customizable-components/text-field/qonto-text-field.styles.js +139 -0
- package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +3 -3
- package/dist/src/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.js +20 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.styles.js +70 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.utils.js +16 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page-utils.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.js +106 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.styles.js +110 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.js +11 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.styles.js +14 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.js +16 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.styles.js +21 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.js +89 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.styles.js +169 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.utils.js +15 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.events.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +32 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.styles.js +33 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.utils.js +1 -0
- package/dist/src/ui/ui-elements.constants.js +1 -1
- package/dist/src/ui/ui-elements.js +1 -1
- package/dist/src/validation/operation-settings-validation.js +1 -1
- package/dist/transactions/transactions.d.ts.map +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/pages/transfer-summary-page.d.ts.map +1 -1
- package/dist/ui/ui-elements.constants.d.ts +1 -0
- package/dist/ui/ui-elements.constants.d.ts.map +1 -1
- package/dist/ui/ui-elements.d.ts.map +1 -1
- package/dist/validation/operation-settings-validation.d.ts +27 -1
- package/dist/validation/operation-settings-validation.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/mocks/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EACV,sBAAsB,EAGtB,eAAe,EACf,oBAAoB,EACpB,8BAA8B,EAC/B,MAAM,qDAAqD,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAK5C,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAK3D,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA+BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,sBAchC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,qBAY/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,qBAAqB,EAe1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAkBpC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAqBrE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,sBAqBxC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAoBrE,CAAC;AAEF,eAAO,MAAM,wBAAwB,iEAC2B,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,cAuD1B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,qBA2CzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA8EzD,CAAC;AAGF,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,WAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAKtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,8BAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,oBAAoB,CAAC,eAAe,CAI7E,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;CAiB7C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CAuBzC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/mocks/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EACV,sBAAsB,EAGtB,eAAe,EACf,oBAAoB,EACpB,8BAA8B,EAC/B,MAAM,qDAAqD,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAK5C,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAK3D,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA+BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,sBAchC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,qBAY/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,qBAAqB,EAe1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAkBpC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAqBrE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,sBAqBxC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAoBrE,CAAC;AAEF,eAAO,MAAM,wBAAwB,iEAC2B,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,cAuD1B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,qBA2CzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA8EzD,CAAC;AAGF,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,WAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAKtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,8BAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,oBAAoB,CAAC,eAAe,CAI7E,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;CAiB7C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CAuBzC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,eAAO,MAAM,WAAW,6BAyvBvB,CAAC"}
|
|
@@ -4,10 +4,12 @@ import { type OperationSettings } from '@validation/operation-settings-validatio
|
|
|
4
4
|
* Retrieves the organization information.
|
|
5
5
|
*
|
|
6
6
|
* @param operationSettings - An object with operation-level settings such as
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
* @
|
|
10
|
-
* to.
|
|
7
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
8
|
+
* `accessToken`, `stagingToken`, and other optional
|
|
9
|
+
* parameters. See {@link OperationSettings}.
|
|
10
|
+
* @returns A promise that resolves to the organization the current user belongs to.
|
|
11
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
12
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
11
13
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
12
14
|
*/
|
|
13
15
|
export declare const getOrganization: (operationSettings: OperationSettings) => Promise<Organization>;
|
|
@@ -15,9 +17,12 @@ export declare const getOrganization: (operationSettings: OperationSettings) =>
|
|
|
15
17
|
* Retrieves the bank accounts for the organization.
|
|
16
18
|
*
|
|
17
19
|
* @param operationSettings - An object with operation-level settings such as
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
21
|
+
* `accessToken`, `stagingToken`, and other optional
|
|
22
|
+
* parameters. See {@link OperationSettings}.
|
|
20
23
|
* @returns A promise that resolves to the bank accounts for the organization.
|
|
24
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
25
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
21
26
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
22
27
|
*/
|
|
23
28
|
export declare const getBankAccounts: (operationSettings: OperationSettings) => Promise<BankAccount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AAGnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,CAC5B,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC,YAAY,CAyBxB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,CAC5B,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC,WAAW,EAAE,CAuBzB,CAAC"}
|
package/dist/sca/sca.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sca.d.ts","sourceRoot":"","sources":["../../src/sca/sca.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sca.d.ts","sourceRoot":"","sources":["../../src/sca/sca.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,sBAAsB,EAEtB,SAAS,EACV,MAAM,gBAAgB,CAAC;AAGxB,wBAAuB,cAAc,CAAC,EACpC,WAAW,EACX,iBAAiB,GAClB,EAAE,SAAS,CAAC,sBAAsB,CAAC,mEA6BnC"}
|
|
@@ -6,7 +6,9 @@ interface AuthParams {
|
|
|
6
6
|
accessToken: string;
|
|
7
7
|
stagingToken?: string;
|
|
8
8
|
}
|
|
9
|
-
interface GetBulkTransfersParams
|
|
9
|
+
interface GetBulkTransfersParams {
|
|
10
|
+
accessToken?: string;
|
|
11
|
+
stagingToken?: string;
|
|
10
12
|
paginationSettings?: PaginationSettings;
|
|
11
13
|
}
|
|
12
14
|
interface GetBulkTransfersApiResponse {
|
|
@@ -27,7 +29,13 @@ interface VerifySepaPayeesParams {
|
|
|
27
29
|
stagingToken?: string;
|
|
28
30
|
}
|
|
29
31
|
export declare const BULK_TRANSFERS_ENDPOINT = "/v2/sepa/bulk_transfers";
|
|
32
|
+
export declare function prepareGetBulkTransfersCall({ paginationSettings, accessToken, stagingToken, }: GetBulkTransfersParams): NetworkCallDescriptor;
|
|
30
33
|
export declare function getBulkTransfers({ accessToken, stagingToken, paginationSettings, }: GetBulkTransfersParams): Promise<GetBulkTransfersApiResponse>;
|
|
34
|
+
export declare function prepareGetBulkTransferCall({ bulkTransferId, accessToken, stagingToken, }: {
|
|
35
|
+
bulkTransferId: string;
|
|
36
|
+
accessToken?: string;
|
|
37
|
+
stagingToken?: string;
|
|
38
|
+
}): NetworkCallDescriptor;
|
|
31
39
|
export declare function getBulkTransfer({ accessToken, stagingToken, bulkTransferId, }: GetBulkTransferParams): Promise<BulkTransferDataObject>;
|
|
32
40
|
export declare function createBulkTransfer({ bulkTransfers, accessToken, stagingToken, bankAccountId, idempotencyKey, }: CreateBulkTransferParams): Promise<BulkTransferDataObject>;
|
|
33
41
|
export declare function prepareVerifySepaPayeesCall({ sepaPayees, accessToken, stagingToken, }: VerifySepaPayeesParams): NetworkCallDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-transfers.api.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/bulk-transfers/bulk-transfers.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,8BAA8B,EAC/B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGtE,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,
|
|
1
|
+
{"version":3,"file":"bulk-transfers.api.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/bulk-transfers/bulk-transfers.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,8BAA8B,EAC/B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGtE,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,sBAAsB;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED,UAAU,2BAA2B;IACnC,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,IAAI,EAAE,4BAA4B,CAAC;CACpC;AAED,UAAU,qBAAsB,SAAQ,UAAU;IAChD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAyB,SAAQ,UAAU;IAC1D,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,sBAAsB;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,wBAAgB,2BAA2B,CAAC,EAC1C,kBAAkB,EAClB,WAAW,EACX,YAAY,GACb,EAAE,sBAAsB,GAAG,qBAAqB,CAgBhD;AAED,wBAAsB,gBAAgB,CAAC,EACrC,WAAW,EACX,YAAY,EACZ,kBAAkB,GACnB,EAAE,sBAAsB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAe/D;AAED,wBAAgB,0BAA0B,CAAC,EACzC,cAAc,EACd,WAAW,EACX,YAAY,GACb,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,qBAAqB,CAWxB;AAED,wBAAsB,eAAe,CAAC,EACpC,WAAW,EACX,YAAY,EACZ,cAAc,GACf,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAUzD;AAED,wBAAsB,kBAAkB,CAAC,EACvC,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,GACf,EAAE,wBAAwB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAoC5D;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,UAAU,EACV,WAAW,EACX,YAAY,GACb,EAAE,sBAAsB,GAAG,qBAAqB,CAchD;AAED,wBAAsB,gBAAgB,CAAC,EACrC,UAAU,EACV,WAAW,EACX,YAAY,GACb,EAAE,sBAAsB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CASlE"}
|
|
@@ -2,15 +2,16 @@ import type { BulkTransfer, BulkTransferParams, GetBulkTransfer, GetBulkTransfer
|
|
|
2
2
|
import type { SepaTransferParams } from '@sepa-transfers/sepa-transfers.types';
|
|
3
3
|
/**
|
|
4
4
|
* Fetches the list of SEPA bulk transfers for the current user.
|
|
5
|
-
* @param getBulkTransfersParams - An optional object containing
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @returns A promise that resolves to an object containing an array of bulk
|
|
11
|
-
*
|
|
12
|
-
* @throws `
|
|
13
|
-
*
|
|
5
|
+
* @param getBulkTransfersParams - An optional object containing:
|
|
6
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
7
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
8
|
+
* `accessToken`, `stagingToken`, `paginationSettings`, and other optional
|
|
9
|
+
* parameters. See {@link BulkTransferParams}.
|
|
10
|
+
* @returns A promise that resolves to an object containing an array of bulk
|
|
11
|
+
* transfers and a `meta` object containing pagination state.
|
|
12
|
+
* @throws `InvalidParametersError` If any parameter validation fails.
|
|
13
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
14
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
14
15
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
15
16
|
*/
|
|
16
17
|
export declare function getBulkTransfers(getBulkTransfersParams?: SepaTransferParams<never>): Promise<GetBulkTransfersResponse>;
|
|
@@ -20,12 +21,15 @@ export declare function getBulkTransfers(getBulkTransfersParams?: SepaTransferPa
|
|
|
20
21
|
* - `sepaTransferSettings`: An object that contains the mandatory `bulkTransferId`
|
|
21
22
|
* to identify the bulk transfer to retrieve.
|
|
22
23
|
* - `operationSettings`: An object with operation-level settings such as
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
28
|
-
* @throws `InvalidParametersError` If the `bulkTransferId` parameter is not a string
|
|
24
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
25
|
+
* `accessToken`, `stagingToken`, and other optional
|
|
26
|
+
* parameters. See {@link BulkTransferParams}.
|
|
27
|
+
* @returns A promise that resolves to a BulkTransfer object containing details of
|
|
28
|
+
* the requested bulk transfer.
|
|
29
|
+
* @throws `InvalidParametersError` If the `bulkTransferId` parameter is not a string
|
|
30
|
+
* or missing, or if any parameter validation fails.
|
|
31
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
32
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
29
33
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
30
34
|
*/
|
|
31
35
|
export declare function getBulkTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<GetBulkTransfer>): Promise<BulkTransfer>;
|
|
@@ -45,30 +49,19 @@ export declare function getBulkTransfer({ sepaTransferSettings, operationSetting
|
|
|
45
49
|
* - `bulkTransferSettings`: An object that contains the mandatory `bankAccountId`
|
|
46
50
|
* and an array of `bulkTransfers`.
|
|
47
51
|
* - `operationSettings`: An object with operation-level settings such as
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* This has to specify the ID of the DOM element where the UI for MFA will be
|
|
51
|
-
* displayed. Note that this means that creating transfers
|
|
52
|
-
* can only happen in the client side. The `createBulkTransfer` function
|
|
53
|
-
* expects an `idempotencyKey` as well. If this property is not passed as part
|
|
54
|
-
* of `operationSettings`, a new one will be generated automatically.
|
|
55
|
-
* You can also specify an `mfaPreference` in the `operationSettings` to choose the
|
|
56
|
-
* multi-factor authentication method to use for the SCA flow (e.g., 'passkey',
|
|
57
|
-
* 'sms-otp', or 'paired-device'). If not provided, the default MFA method will be used.
|
|
52
|
+
* `accessToken`, `stagingToken`, `idempotencyKey`, `mfaPreference`, `uiParentElementId`,
|
|
53
|
+
* and other optional parameters. See {@link BulkTransferParams}.
|
|
58
54
|
* @returns As a yielded value, a promise that resolves to VoP check results for
|
|
59
55
|
* all unique beneficiaries.
|
|
60
56
|
* @returns As the final return value, a promise that resolves to the created
|
|
61
57
|
* bulk transfer.
|
|
62
|
-
* @throws `AuthenticationError` If the access token is invalid or missing.
|
|
63
|
-
* Ensure initialize has been called before using this function if you are not
|
|
64
|
-
* passing the access token.
|
|
65
58
|
* @throws `InvalidParametersError` If the `bulkTransferSettings` parameter is not an object
|
|
66
|
-
* or is missing, or if the required properties
|
|
67
|
-
*
|
|
68
|
-
* `
|
|
59
|
+
* or is missing, or if the required properties are missing or invalid, or if
|
|
60
|
+
* `uiParentElementId` is not provided in `operationSettings`.
|
|
61
|
+
* @throws `AuthenticationError` If the `accessToken` is invalid or missing within
|
|
62
|
+
* `operationSettings`.
|
|
69
63
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
70
64
|
* @throws `InvalidRuntimeError` If the function is called in a non-browser environment.
|
|
71
|
-
* This operation can only be performed from a browser since it requires an iframe.
|
|
72
65
|
*/
|
|
73
66
|
export declare function createBulkTransfer({ bulkTransferSettings, operationSettings, }: BulkTransferParams<NewBulkTransferWithBeneficiary>): AsyncGenerator<SingleBulkVopVerificationResult[], BulkTransfer | undefined>;
|
|
74
67
|
//# sourceMappingURL=bulk-transfers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-transfers.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/bulk-transfers/bulk-transfers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bulk-transfers.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/bulk-transfers/bulk-transfers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,YAAY,EAEZ,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAuB9C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAuDnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CA2B7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,8BAA8B,CAAC,GAAG,cAAc,CACpE,+BAA+B,EAAE,EACjC,YAAY,GAAG,SAAS,CACzB,CAyFA"}
|
|
@@ -6,14 +6,11 @@ import '../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts';
|
|
|
6
6
|
* @param getSepaTransfersParams - An object containing:
|
|
7
7
|
* - `operationSettings`: An object with operation-level settings such as
|
|
8
8
|
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
9
|
-
* `accessToken`, `stagingToken`, `
|
|
10
|
-
* parameters.
|
|
11
|
-
* `paginationSettings` property under `operationSettings`, which accepts an
|
|
12
|
-
* object with the page and itemsPerPage properties.
|
|
9
|
+
* `accessToken`, `stagingToken`, `paginationSettings`, and other optional
|
|
10
|
+
* parameters. See {@link SepaTransferParams}.
|
|
13
11
|
* @returns A promise that resolves to an object containing an array of SEPA
|
|
14
12
|
* transfers and a `meta` object containing pagination state.
|
|
15
|
-
* @throws `InvalidParametersError` If any
|
|
16
|
-
* operationSettings is invalid.
|
|
13
|
+
* @throws `InvalidParametersError` If any parameter validation fails.
|
|
17
14
|
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
18
15
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
19
16
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
@@ -24,13 +21,14 @@ export declare function getSepaTransfers(getSepaTransfersParams?: SepaTransferPa
|
|
|
24
21
|
* @param getSepaTransferParams - An object containing:
|
|
25
22
|
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
26
23
|
* - `operationSettings`: An object with operation-level settings such as
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
25
|
+
* `accessToken`, `stagingToken`, and other optional
|
|
26
|
+
* parameters. See {@link SepaTransferParams}.
|
|
30
27
|
* @returns A promise that resolves to a SEPA transfer.
|
|
31
|
-
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is not a string
|
|
32
|
-
*
|
|
33
|
-
* `
|
|
28
|
+
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is not a string
|
|
29
|
+
* or missing, or if any parameter validation fails.
|
|
30
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
31
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
34
32
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
35
33
|
*/
|
|
36
34
|
export declare function getSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<GetSepaTransfer>): Promise<SepaTransfer>;
|
|
@@ -62,29 +60,16 @@ export declare function getSepaTransfer({ sepaTransferSettings, operationSetting
|
|
|
62
60
|
* beginning. This allows the caller to get only beneficiary details to start
|
|
63
61
|
* the process and require the user to give the transfer data after the VoP
|
|
64
62
|
* result.
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* `operationSettings` object can have other data, like the `stagingToken`.
|
|
70
|
-
* If the transfer needs to be created
|
|
71
|
-
* for an untrusted beneficiary, the `operationSettings` object must also include
|
|
72
|
-
* the `uiParentElementId` property. This has to specify the ID of the DOM element
|
|
73
|
-
* where the UI for MFA will be displayed. Note that this means that creating
|
|
74
|
-
* transfers for untrusted beneficiaries can only happen in the client side.
|
|
75
|
-
* The `createSepaTransfer` function requires an `idempotencyKey` as well. If this
|
|
76
|
-
* property is not passed as part of `operationSettings`, a new one will be
|
|
77
|
-
* generated automatically.
|
|
78
|
-
* You can also specify an `mfaPreference` in the `operationSettings` to choose the
|
|
79
|
-
* multi-factor authentication method to use for the SCA flow (e.g., 'passkey',
|
|
80
|
-
* 'sms-otp', or 'paired-device'). If not provided, the default MFA method will be used.
|
|
63
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
64
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
65
|
+
* `accessToken`, `stagingToken`, `idempotencyKey`, `mfaPreference`,
|
|
66
|
+
* `uiParentElementId`, and other optional parameters. See {@link SepaTransferParams}.
|
|
81
67
|
* @returns As the first yielded value, a promise that resolves to the VoP check
|
|
82
68
|
* result.
|
|
83
69
|
* @returns As the final return value, a promise that resolves to the created
|
|
84
70
|
* SEPA transfer.
|
|
85
|
-
* @throws `AuthenticationError` If the
|
|
86
|
-
*
|
|
87
|
-
* passing the access token.
|
|
71
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
72
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
88
73
|
* @throws `InvalidParametersError` If the `transfer` parameter is not an object
|
|
89
74
|
* or is missing, or if the required properties of the transfer object are
|
|
90
75
|
* missing or invalid.
|
|
@@ -147,16 +132,17 @@ export declare function getSepaTransfer({ sepaTransferSettings, operationSetting
|
|
|
147
132
|
export declare function createSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<NewSepaTransfer | BeneficiaryInformationForVop>): AsyncGenerator<VopVerificationResult, SepaTransfer | undefined>;
|
|
148
133
|
/**
|
|
149
134
|
* Cancels an existing SEPA transfer identified by the provided `sepaTransferId`.
|
|
150
|
-
* @param cancelSepaTransferParams - An object
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
135
|
+
* @param cancelSepaTransferParams - An object containing:
|
|
136
|
+
* - `sepaTransferSettings`: An object with the `sepaTransferId` property (string).
|
|
137
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
138
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
139
|
+
* `accessToken`, `stagingToken`, and other optional
|
|
140
|
+
* parameters. See {@link SepaTransferParams}.
|
|
155
141
|
* @returns A promise that resolves without return value.
|
|
142
|
+
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is missing
|
|
143
|
+
* or not a string, or if any parameter validation fails.
|
|
156
144
|
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
157
145
|
* `accessToken` are invalid or missing within `operationSettings`.
|
|
158
|
-
* @throws `InvalidParametersError` If the `sepaTransferId` parameter is
|
|
159
|
-
* missing, or if the provided value is not a string.
|
|
160
146
|
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
161
147
|
*/
|
|
162
148
|
export declare function cancelSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<CancelSepaTransferParams>): Promise<void>;
|
|
@@ -165,21 +151,20 @@ export declare function cancelSepaTransfer({ sepaTransferSettings, operationSett
|
|
|
165
151
|
* a hosted page. This flow will allow users to create a SEPA transfer from a
|
|
166
152
|
* Qonto hosted page, which will guide them through the necessary steps to
|
|
167
153
|
* complete the transfer, including the Verification of Payee check.
|
|
168
|
-
* @param getSepaTransferCreationFlowLinkParams - An object
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* `
|
|
174
|
-
*
|
|
175
|
-
* or the `accessToken` and `stagingToken` values. It is also possible, and
|
|
176
|
-
* advisable, to pass a `locale` property within operationSettings to set the
|
|
177
|
-
* language in which the hosted page will be shown. If not provided, it will
|
|
178
|
-
* default to English.
|
|
154
|
+
* @param getSepaTransferCreationFlowLinkParams - An object containing:
|
|
155
|
+
* - `sepaTransferSettings`: An object with the `callbackUrl` property, which
|
|
156
|
+
* will be used to return the user to the desired location after completion.
|
|
157
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
158
|
+
* `proxyRequestFunction` (preferred over using the access token flow),
|
|
159
|
+
* `accessToken`, `stagingToken`, `locale`, and other optional
|
|
160
|
+
* parameters. See {@link SepaTransferParams}.
|
|
179
161
|
* @returns A promise that resolves to an object representing the Embed Auth Link.
|
|
180
162
|
* This object contains a `url` property with the link to start the SEPA transfer.
|
|
181
|
-
* @throws `InvalidParametersError` If
|
|
182
|
-
*
|
|
163
|
+
* @throws `InvalidParametersError` If the callbackUrl is invalid or missing, or
|
|
164
|
+
* if any parameter validation fails.
|
|
165
|
+
* @throws `AuthenticationError` If both the `proxyRequestFunction` and
|
|
166
|
+
* `accessToken` are invalid or missing within `operationSettings`.
|
|
167
|
+
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
183
168
|
*/
|
|
184
169
|
export declare function getSepaTransferCreationFlowLink({ sepaTransferSettings, operationSettings, }: SepaTransferParams<SepaTransferCreationFlowRequest>): Promise<AuthLinkRequestResult>;
|
|
185
170
|
//# sourceMappingURL=sepa-transfers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,EAGlB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,EAGlB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAyBhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAQ1E,OAAO,4DAA4D,CAAC;AAMpE;;;;;;;;;;;;;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,CAwJlE;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validateOperationSettingsParams as t}from"../validation/operation-settings-validation.js";import"../common/auth/auth.js";import{validatePresenceOfAuthToken as
|
|
1
|
+
import{validateOperationSettingsParams as t}from"../validation/operation-settings-validation.js";import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{validateAuthLinkRequestSettings as a}from"./auth-links.validate.js";import{prepareAuthLinkRequest as n,requestAuthLink as i}from"./auth-links.api.js";import{callProxyFunction as r}from"../common/common.utils.js";function c(t){return{url:t.url,postAuthAction:t.post_authn_action,callbackUrl:t.callback_url,expiresAt:t.expired_at,usedAt:t.used_at}}async function s({requestSettings:s,operationSettings:e}){a(s);const{proxyRequestFunction:l,stagingToken:u}=t(e||{});if(l){const t=n({stagingToken:u,action:s.action,callbackUrl:s.callbackUrl});return c((await r({proxyFunction:l,networkCallDescriptor:t})).body)}{const t=e?.accessToken||o();return c(await i({accessToken:t,stagingToken:u,action:s.action,callbackUrl:s.callbackUrl}))}}export{s as request};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as e}from"../common/auth/auth.validate.js";import{
|
|
1
|
+
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as e}from"../common/auth/auth.validate.js";import{prepareGetBeneficiariesCall as n,getBeneficiaries as i,prepareGetBeneficiaryCall as t,getBeneficiary as o,prepareUntrustBeneficiaryCall as a,untrustBeneficiaries as r,prepareUpdateBeneficiaryCall as s,updateBeneficiary as c,prepareAddBeneficiaryCall as m,addBeneficiary as p}from"./beneficiaries.api.js";import{serializeBeneficiary as f}from"./beneficiaries.serializer.js";import{validateGetBeneficiaryParams as y,validateTrustBeneficiariesParams as g,validateUpdateBeneficiaryParams as u,validateAddBeneficiaryParams as b}from"./beneficiaries.validate.js";import{serializePaginationResponse as d}from"../common/api-pagination/api-pagination.js";import"../common/operation-settings/operation-settings.js";import{callProxyFunction as k}from"../common/common.utils.js";import"../common/environment/environment-manager.js";import"../common/locale/locale-manager.js";import{validateOperationSettingsParams as l}from"../validation/operation-settings-validation.js";async function T(t){const{stagingToken:o,proxyRequestFunction:a,accessToken:r,paginationSettings:s}=l(t?.operationSettings||{});if(a){const e=n({paginationSettings:s}),i=await k({proxyFunction:a,networkCallDescriptor:e}),t=i.body.beneficiaries.map((e=>f(e))),o=d(i.body.meta);return{beneficiaries:t,...o?{meta:o}:{}}}{const n=r||e(),t=await i({accessToken:n,stagingToken:o,paginationSettings:s}),a=t.beneficiaries.map((e=>f(e))),c=d(t.meta);return{beneficiaries:a,...c?{meta:c}:{}}}}async function w({beneficiarySettings:n,operationSettings:i}){const a=y(n?.beneficiaryId),{proxyRequestFunction:r,accessToken:s,stagingToken:c}=l(i||{});if(r){const e=t({beneficiaryId:a}),n=await k({proxyFunction:r,networkCallDescriptor:e});return f(n.body.beneficiary)}{const n=s||e(),i=await o({beneficiaryId:a,accessToken:n,stagingToken:c});return f(i)}}async function S({beneficiarySettings:n,operationSettings:i}){const t=b(n),{proxyRequestFunction:o,accessToken:a,stagingToken:r,idempotencyKey:s}=l(i||{});if(o){const e=m({beneficiary:t,idempotencyKey:s}),n=await k({proxyFunction:o,networkCallDescriptor:e});return f(n.body.beneficiary)}{const n=a||e(),i=await p({beneficiary:t,accessToken:n,stagingToken:r,idempotencyKey:s});return f(i)}}async function j({beneficiarySettings:n,operationSettings:i}){const t=u(n),{stagingToken:o,idempotencyKey:a,mfaPreference:r,proxyRequestFunction:m}=l(i),p={beneficiaryParamsBeingEdited:t,idempotencyKey:a,mfaPreference:r};if(m){const e=s(p),n=await k({proxyFunction:m,networkCallDescriptor:e});return f(n.body.beneficiary)}{const n=i?.accessToken||e(),t=await c({...p,accessToken:n,stagingToken:o});return f(t)}}async function x({beneficiarySettings:n,operationSettings:i}){const t=g(n?.beneficiaryIds),{proxyRequestFunction:o,accessToken:s,stagingToken:c}=l(i||{});if(o){const e=a({beneficiaryIds:t});return(await k({proxyFunction:o,networkCallDescriptor:e})).body.beneficiaries.map(f)}{const n=s||e();return(await r({beneficiaryIds:t,accessToken:n,stagingToken:c})).map(f)}}export{S as addBeneficiary,T as getBeneficiaries,w as getBeneficiary,x as untrustBeneficiaries,j as updateBeneficiary};
|
package/dist/src/cards/cards.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../common/auth/auth.validate.js";import{
|
|
1
|
+
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../common/auth/auth.validate.js";import{callProxyFunction as r}from"../common/common.utils.js";import{prepareGetCardIframeUrl as n,getCardIframeURL as a,prepareGetCardCall as o,getCard as s,prepareGetCardsCall as i,getCards as c}from"./cards.api.js";import"./cards.types.js";import{validateDisplayCardParams as d,validateUnlockCardParams as m,validateOrderCardParams as g,validateGetCardParams as u}from"./cards.validate.js";import{buildIframeUrl as p,createIframe as f}from"../iframe/iframe-manager.js";import{serializeUnlockCardPayload as l,serializeCard as k,serializeOrderCardPayload as y}from"./cards.serializer.js";import{validateOperationSettingsParams as T}from"../validation/operation-settings-validation.js";import{InvalidParametersError as I}from"../errors/InvalidParametersError.js";import{createEmbedUI as S}from"./cards.helper.js";async function h(e){try{const n=e?.cardSettings?.membershipId;if(n&&"string"!=typeof n)throw new I("membershipId must be a string");const{proxyRequestFunction:a,stagingToken:o}=T(e?.operationSettings||{});if(a){const e=i({membershipId:n,stagingToken:o});return(await r({proxyFunction:a,networkCallDescriptor:e})).body.cards.map((e=>k(e)))}{const r=e?.operationSettings?.accessToken||t();return(await c({membershipId:n,accessToken:r,stagingToken:o})).map((e=>k(e)))}}catch(e){return Promise.reject(e)}}async function b({cardSettings:e,operationSettings:n}){try{u(e);const a=e.cardId,{proxyRequestFunction:i,stagingToken:c}=T(n||{});if(i){const e=o({cardId:a,stagingToken:c}),t=(await r({proxyFunction:i,networkCallDescriptor:e})).body.cards;if(Array.isArray(t)&&t.length>0)return k(t[0]);throw new I("Unable to retrieve card data")}{const e=n?.accessToken||t(),r=await s({cardId:a,accessToken:e,stagingToken:c});return k(r)}}catch(e){return Promise.reject(e)}}async function w(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=T(r.operationSettings,{requiresUI:!0});g(r.cardSettings);const s=p({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await f({iframeUrl:s,parentElementId:a}),c=y(r.cardSettings),d=await i.postMessage(c);return i.destroy(),k(d)}catch(e){return Promise.reject(e)}}async function j(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=T(r.operationSettings,{requiresUI:!0});m(r.cardSettings);const s=p({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await f({iframeUrl:s,parentElementId:a}),c=l(r),d=await i.postMessage(c);return i.destroy(),k(d)}catch(e){return Promise.reject(e)}}async function P(e){try{const{uiParentElementId:o,accessToken:s,stagingToken:i,debugMode:c,mfaPreference:m,proxyRequestFunction:g}=T(e.operationSettings,{requiresUI:!0});if(d(e.cardSettings),g){const t=n({stagingToken:i}),a=(await r({proxyFunction:g,networkCallDescriptor:t})).body.embed_auth_link;return S({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c},cardIframeUrl:a.url})}{const r=s||t(),n=await a({...e.cardSettings,accessToken:r,stagingToken:i});return S({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c,mfaPreference:m},cardIframeUrl:n.url})}}catch(e){return Promise.reject(e)}}export{P as displayCard,b as getCard,h as getCards,w as orderCard,j as unlockCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function t(
|
|
1
|
+
function e(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function t(e){if(e)return{totalItems:e?.total_count,totalPages:e?.total_pages,currentPage:e?.current_page,itemsPerPage:e?.per_page,previousPage:e?.prev_page||null,nextPage:e?.next_page||null}}export{e as buildPaginationParams,t as serializePaginationResponse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EmbedOperationError as e}from"../errors/EmbedOperationError.js";function
|
|
1
|
+
import{EmbedOperationError as e}from"../errors/EmbedOperationError.js";import{buildRequestHeaders as t,encodeNetworkCall as o,decodeNetworkResponse as r}from"./network/network.js";import{EmbedApiError as n}from"../errors/EmbedApiError.js";function s(t){let o=null;if(o="function"==typeof t?t():document.getElementById(t),!(o&&o instanceof HTMLElement))throw new e(`Could not install the UI Element because the parent element with id ${t} was not found.\nPlease make sure to pass a valid parentElementId or ensure the parentElementId function returns a valid element.`);return o}async function i({proxyFunction:s,networkCallDescriptor:i,proxyEndpointDescriptor:a}){if(a){const e={...Object.fromEntries([...t(i.options?.headers)??{}])},s={...i,options:{...i.options,headers:e}},p=o(s),d=await fetch(a.path,{method:a.method,headers:a.options.headers,body:p}),m=await d.text(),c=r(m);if(!d.ok)throw new n({code:d.status,data:c,message:`Error from proxy endpoint: ${d.status} ${d.statusText}`});return c}if(s){const e=Object.fromEntries([...t(i.options?.headers)??{}]),n={...i,options:{...i.options,headers:e}},a=o(n),p=await s(a);return r(p)}throw new e("No proxy function or proxy endpoint descriptor provided for proxy call.")}export{i as callProxyFunction,s as getUIParentElement};
|
|
@@ -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.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=e.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode,proxyRequestFunction:this.proxyRequestFunction}}}const n=t.getInstance();export{t as OperationSettingsManager,n as operationSettingsManager};
|
|
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.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction),e.proxyEndpointDescriptor&&(this.proxyEndpointDescriptor=e.proxyEndpointDescriptor)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}getProxyEndpointDescriptor(){return this.proxyEndpointDescriptor}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=e.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode,proxyRequestFunction:this.proxyRequestFunction}}}const n=t.getInstance();export{t as OperationSettingsManager,n as operationSettingsManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{QontoEmbedSdkError as e}from"./QontoEmbedSdkError.js";class t extends e{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid
|
|
1
|
+
import{QontoEmbedSdkError as e}from"./QontoEmbedSdkError.js";class t extends e{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid authentication method. Provide either a proxyRequestFunction (recommended) or accessToken, either as parameters or by calling the initialize function first."}}export{t as AuthenticationError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{prepareGetBankAccounts as n,getBankAccounts as t,prepareGetOrganization as a,getOrganization as
|
|
1
|
+
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{prepareGetBankAccounts as n,getBankAccounts as t,prepareGetOrganization as a,getOrganization as i}from"./organizations.api.js";import{serializeBankAccount as s,serializeOrganization as r}from"./organizations.serializer.js";import{validateOperationSettingsParams as e}from"../validation/operation-settings-validation.js";import{callProxyFunction as c}from"../common/common.utils.js";const m=async n=>{const{stagingToken:t,proxyRequestFunction:s}=e(n);if(s){const o=a({stagingToken:t}),n=await c({proxyFunction:s,networkCallDescriptor:o});return r(n.body.organization)}{const a=n.accessToken||o(),s=await i({accessToken:a,stagingToken:t});return r(s.organization)}},g=async a=>{const{stagingToken:i,proxyRequestFunction:r}=e(a);if(r){const o=n({stagingToken:i});return(await c({proxyFunction:r,networkCallDescriptor:o})).body.bank_accounts.map(s)}{const n=a.accessToken||o();return(await t({accessToken:n,stagingToken:i})).bank_accounts.map(s)}};export{g as getBankAccounts,m as getOrganization};
|
package/dist/src/sca/sca.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";import{prepareScaPollingCall as s}from"./sca.api.js";import{serializeScaPollingResponse as
|
|
1
|
+
import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";import{prepareScaPollingCall as s}from"./sca.api.js";import{serializeScaPollingResponse as t}from"./sca.serializer.js";import{callProxyFunction as e}from"../common/common.utils.js";import{SCA_POLLING_RESULTS as n}from"./sca.constants.js";async function*i({scaSettings:i,operationSettings:r}){if(!i||!i.scaSessionToken)throw new o("scaSettings with scaSessionToken is required to poll SCA session.");if(!r?.proxyRequestFunction)throw new o("operationSettings with proxyRequestFunction is required to poll SCA session.");const a=s({scaSessionToken:i.scaSessionToken,stagingToken:r.stagingToken});let c;do{c&&(yield c);const o=await e({proxyFunction:r.proxyRequestFunction,networkCallDescriptor:a});c=t(o.body)}while(c.result===n.WAITING);return c}export{i as pollScaSession};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeNetworkCall as
|
|
1
|
+
import{makeNetworkCall as n}from"../../common/network/network.js";import"../../common/environment/environment-manager.js";import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{SEPA_ENDPOINT as s}from"../sepa-transfers.api.js";import{serializeToSepaPayeeDataObject as a}from"../sepa-transfers.serializer.js";const t="/v2/sepa/bulk_transfers";function o({paginationSettings:n,accessToken:s,stagingToken:a}){const o={method:"GET",headers:{accessToken:s,stagingToken:a}},r=e(n),i=r.size?`?${r.toString()}`:"";return{path:`${t}${i}`,options:o}}async function r({accessToken:e,stagingToken:s,paginationSettings:a}){const t=o({paginationSettings:a,accessToken:e,stagingToken:s}),{bulk_transfers:r,meta:i}=await n(t);return{bulkTransfers:r,meta:i}}function i({bulkTransferId:n,accessToken:e,stagingToken:s}){return{path:`${t}/${n}`,options:{method:"GET",headers:{accessToken:e,stagingToken:s}}}}async function c({accessToken:e,stagingToken:s,bulkTransferId:a}){const t=i({bulkTransferId:a,accessToken:e,stagingToken:s}),{bulk_transfer:o}=await n(t);return o}function g({sepaPayees:n,accessToken:e,stagingToken:t}){return{path:`${s}/bulk_verify_payee`,options:{method:"POST",headers:{accessToken:e,stagingToken:t},body:{requests:n.map(a)}}}}async function k({sepaPayees:e,accessToken:s,stagingToken:a}){const t=g({sepaPayees:e,accessToken:s,stagingToken:a});return await n(t)}export{t as BULK_TRANSFERS_ENDPOINT,c as getBulkTransfer,r as getBulkTransfers,i as prepareGetBulkTransferCall,o as prepareGetBulkTransfersCall,g as prepareVerifySepaPayeesCall,k as verifySepaPayees};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{authManager as
|
|
1
|
+
import{authManager as n}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as e}from"../../common/auth/auth.validate.js";import{serializePaginationResponse as t}from"../../common/api-pagination/api-pagination.js";import{verifySepaPayees as o,prepareGetBulkTransferCall as a,getBulkTransfer as r,prepareGetBulkTransfersCall as s,getBulkTransfers as i}from"./bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as m,serializeToNewBulkTransferDataObject as c,serializeBulkTransfer as u}from"./bulk-transfers.serializer.js";import{validateOperationSettingsParams as f}from"../../validation/operation-settings-validation.js";import{validateCreateBulkTransferParams as p,validateBulkTransferParams as l}from"./bulk-transfers.validate.js";import{isRunningInBrowser as g}from"../../common/runtime/runtime.validation.js";import{InvalidRuntimeError as d,RUNTIME_ENVIRONMENT as k}from"../../errors/InvalidRuntimeError.js";import{buildIframeUrl as T,createIframe as b}from"../../iframe/iframe-manager.js";import{buildIframeMessage as y}from"../../iframe/iframe-message-builder.js";import{VOP_DECISIONS as j,ACTIONS as w}from"../../common/constants.js";import{callProxyFunction as S}from"../../common/common.utils.js";import v from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function I(n){const{stagingToken:o,proxyRequestFunction:a,accessToken:r,paginationSettings:m}=f(n?.operationSettings||{});if(a){const n=s({paginationSettings:m}),e=await S({proxyFunction:a,networkCallDescriptor:n}),o=e.body.bulk_transfers.map(u),r=t(e.body.meta);return{bulkTransfers:o,...r?{meta:r}:{}}}{const n=r||e(),a=await i({accessToken:n,stagingToken:o,paginationSettings:m}),s=a.bulkTransfers?.map(u),c=t(a.meta);return{bulkTransfers:s,...c?{meta:c}:{}}}}async function E({sepaTransferSettings:n,operationSettings:t}){const o=l(n?.bulkTransferId),{proxyRequestFunction:s,accessToken:i,stagingToken:m}=f(t||{});if(s){const n=a({bulkTransferId:o}),e=await S({proxyFunction:s,networkCallDescriptor:n});return u(e.body.bulk_transfer)}{const n=i||e(),t=await r({accessToken:n,stagingToken:m,bulkTransferId:o});return u(t)}}async function*R({bulkTransferSettings:t,operationSettings:a}){const r=a?.accessToken||e(),s=a?.stagingToken||n.getStagingToken(),i=a?.idempotencyKey||v();p(t);const{uiParentElementId:l,debugMode:S}=f(a,{requiresUI:!0});if(!g())throw new d(k.BROWSER);const I=new Map;for(const n of t.bulkTransfers){const e=n.beneficiary.iban;e&&!I.has(e)&&I.set(e,{name:n.beneficiary.name,iban:e})}const E=Array.from(I.values()),R=await o({sepaPayees:E,accessToken:r,stagingToken:s||void 0});if((yield R.requests.map(m))===j.REJECT)return;let h,_;try{const n=T({accessToken:r,stagingToken:s||void 0,debugMode:S});_=await b({iframeUrl:n,parentElementId:l});const e={bankAccountId:t.bankAccountId,bulkTransfers:t.bulkTransfers.map((n=>c(n)))};h=await _.postMessage(y({actionId:w.TRANSFER_BULK_CREATE,actionData:{body:e,idempotencyKey:i}}))}finally{_?.destroy()}return u(h)}export{R as createBulkTransfer,E as getBulkTransfer,I as getBulkTransfers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../common/auth/auth.validate.js";import{serializePaginationResponse as t}from"../common/api-pagination/api-pagination.js";import{prepareGetSepaTransfersCall as
|
|
1
|
+
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../common/auth/auth.validate.js";import{serializePaginationResponse as t}from"../common/api-pagination/api-pagination.js";import{prepareGetSepaTransfersCall as o,getSepaTransfers as s,prepareCreateSepaTransferCall as r,createSepaTransfer as a,prepareCancelSepaTransferCall as i,cancelSepaTransfer as c,prepareGetSepaTransferCall as p,getSepaTransfer as f,prepareVerifySepaPayeeCall as m,verifySepaPayee as u}from"./sepa-transfers.api.js";import{serializeSepaTransfer as g,serializeToVopVerificationResult as y}from"./sepa-transfers.serializer.js";import{validateTransferBeneficiaryParams as T,validateCreateSepaTransferParams as k,validateGetSepaTransferCreationFlowLinkParams as l,validateCancelSepaTransferParams as d,validateGetSepaTransferParams as S}from"./sepa-transfers.validate.js";import{validateOperationSettingsParams as w}from"../validation/operation-settings-validation.js";import{VOP_DECISIONS as x,HTTP_CODES as E,AUTH_LINK_ACTIONS as R}from"../common/constants.js";import{isRunningInBrowser as j}from"../common/runtime/runtime.validation.js";import{InvalidRuntimeError as F,RUNTIME_ENVIRONMENT as v}from"../errors/InvalidRuntimeError.js";import{makeNetworkCall as b}from"../common/network/network.js";import{authLinks as D}from"../auth-links/index.js";import{findBeneficiary as q,createSepaTransferScaElement as I,waitForSepaTransferScaResult as P,decorateUrlWithExtraParams as C}from"./sepa-transfers.utils.js";import"../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js";import{EmbedApiError as h}from"../errors/EmbedApiError.js";import{serializePreconditionRequiredResponse as _}from"../sca/sca.serializer.js";import{callProxyFunction as A}from"../common/common.utils.js";import K from"../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function N(e){const{stagingToken:r,proxyRequestFunction:a,accessToken:i,paginationSettings:c}=w(e?.operationSettings||{});if(a){const e=o({paginationSettings:c}),n=await A({proxyFunction:a,networkCallDescriptor:e}),s=n.body.transfers.map(g),r=t(n.body.meta);return{transfers:s,...r?{meta:r}:{}}}{const e=i||n(),o=await s({accessToken:e,stagingToken:r,paginationSettings:c}),a=o.transfers.map(g),p=t(o.meta);return{transfers:a,...p?{meta:p}:{}}}}async function O({sepaTransferSettings:e,operationSettings:t}){const o=S(e?.sepaTransferId),{proxyRequestFunction:s,accessToken:r,stagingToken:a}=w(t||{});if(s){const e=p({sepaTransferId:o}),n=await A({proxyFunction:s,networkCallDescriptor:e});return g(n.body.transfer)}{const e=r||n(),t=await f({sepaTransferId:o,accessToken:e,stagingToken:a});return g(t)}}async function*U({sepaTransferSettings:t,operationSettings:o}){const{proxyRequestFunction:s,proxyEndpointDescriptor:i,accessToken:c,stagingToken:p}=w(o||{}),f=p||e.getStagingToken(),l=o?.idempotencyKey||K();let d;T(t);const S=await q({sepaTransferSettings:t,operationSettings:o}),R={name:S.name,iban:S.iban},D=await async function({sepaPayee:e,operationSettings:t}){const{proxyRequestFunction:o,accessToken:s,stagingToken:r}=w(t||{});if(o){const n=m({sepaPayee:e});return(await A({proxyFunction:o,networkCallDescriptor:n})).body}{const t=s||n();return await u({sepaPayee:e,accessToken:t,stagingToken:r})}}({sepaPayee:R,operationSettings:o}),C=yield y(D);let N;if("string"==typeof C){if(C===x.REJECT)return}else{if(C.vopDecision===x.REJECT)return;N=C.sepaTransferSettings}const O={...t,...N};k(O);const U={...O,beneficiary:S};if(U.beneficiary?.trusted)if(s||i){const e=r({transfer:U,vopProofToken:D.proof_token.token,idempotencyKey:l});d=(await A({proxyFunction:s,networkCallDescriptor:e,proxyEndpointDescriptor:i})).body.transfer}else{const e=c||n();d=await a({transfer:U,vopProofToken:D.proof_token.token,accessToken:e,stagingToken:f||void 0,idempotencyKey:l})}else{if(!j())throw new F(v.BROWSER);const{uiParentElementId:e,proxyEndpointDescriptor:t,proxyRequestFunction:s,locale:a}=w(o,{requiresUI:!0}),i=c||n(),p=r({transfer:U,vopProofToken:D.proof_token.token,accessToken:i,stagingToken:f||void 0,idempotencyKey:l});let m;try{if(s||t){d=(await A({proxyFunction:s,networkCallDescriptor:p,proxyEndpointDescriptor:t})).body.transfer}else d=await b(p)}catch(e){if(!(e instanceof h&&e.code===E.PRECONDITION_REQUIRED))throw e;m=_(e.data.body).scaSessionToken}const u=I({networkCallDescriptor:p,scaSessionToken:m,operationSettings:{uiParentElementId:e,proxyRequestFunction:s,locale:a}});try{d=await P(u)}finally{u.remove()}}return g(d)}async function z({sepaTransferSettings:e,operationSettings:t}){const o=d(e?.sepaTransferId),{proxyRequestFunction:s,accessToken:r,stagingToken:a}=w(t||{});if(s){const e=i({sepaTransferId:o});await A({proxyFunction:s,networkCallDescriptor:e})}else{const e=r||n();await c({sepaTransferId:o,accessToken:e,stagingToken:a})}}async function J({sepaTransferSettings:e,operationSettings:t}){const o=l(e),{proxyRequestFunction:s,stagingToken:r,accessToken:a}=w(t||{}),i=s?{proxyRequestFunction:s}:{stagingToken:r,accessToken:a||n()},c=await D.request({requestSettings:{action:R.SEPA_TRANSFER_CREATE,callbackUrl:o},operationSettings:i});return{...c,url:C(c.url,t)}}export{z as cancelSepaTransfer,U as createSepaTransfer,O as getSepaTransfer,J as getSepaTransferCreationFlowLink,N as getSepaTransfers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createBulkTransfer as r,getBulkTransfer as e,getBulkTransfers as a}from"./bulk-transfers/bulk-transfers.js";import{
|
|
1
|
+
import{createBulkTransfer as r,getBulkTransfer as e,getBulkTransfers as a}from"./bulk-transfers/bulk-transfers.js";import{createSepaTransfer as s,getSepaTransferCreationFlowLink as n,cancelSepaTransfer as t,getSepaTransfer as f,getSepaTransfers as p}from"./sepa-transfers.js";const T={getSepaTransfers:p,getSepaTransfer:f,createSepaTransfer:s,cancelSepaTransfer:t,getSepaTransferCreationFlowLink:n,bulkTransfers:{getBulkTransfers:a,getBulkTransfer:e,createBulkTransfer:r}};export{T as sepaTransfers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../common/auth/auth.validate.js";import{prepareGetTransactionCall as n,getTransaction as a,prepareGetTransactionsCall as o,getTransactions as s}from"./transactions.api.js";import{validateOperationSettingsParams as i}from"../validation/operation-settings-validation.js";import{
|
|
1
|
+
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../common/auth/auth.validate.js";import{prepareGetTransactionCall as n,getTransaction as a,prepareGetTransactionsCall as o,getTransactions as s}from"./transactions.api.js";import{validateOperationSettingsParams as i}from"../validation/operation-settings-validation.js";import{serializeTransaction as r}from"./transactions.serializer.js";import{validateGetTransactionParams as e}from"./transactions.validation.js";import{callProxyFunction as c}from"../common/common.utils.js";async function m(n){const{stagingToken:a,proxyRequestFunction:e,accessToken:m,paginationSettings:p}=i(n?.operationSettings||{}),g={...n?.transactionSettings||{},paginationSettings:p};if(e){const t=o(g),n=await c({proxyFunction:e,networkCallDescriptor:t});return{transactions:n.body.transactions.map(r),meta:n.body.meta}}{const n=m||t(),o=await s({...g,accessToken:n,stagingToken:a});return{transactions:o.transactions.map(r),meta:o.meta}}}async function p({transactionSettings:o,operationSettings:s}){const{proxyRequestFunction:m,accessToken:p,stagingToken:g}=i(s||{}),{transactionId:u}=e(o);if(m){const t=n({transactionId:u}),a=await c({proxyFunction:m,networkCallDescriptor:t});return r(a.body.transaction)}{const n=p||t(),o=await a({transactionId:u,accessToken:n,stagingToken:g});return r(o)}}export{p as getTransaction,m as getTransactions};
|