@qonto/embed-sdk 0.48.0 → 0.49.1
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/cards.d.ts +39 -26
- package/dist/cards/cards.d.ts.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/organizations/organizations.d.ts +11 -6
- package/dist/organizations/organizations.d.ts.map +1 -1
- package/dist/payment-links/index.d.ts +1 -1
- package/dist/payment-links/payment-links.d.ts +26 -14
- package/dist/payment-links/payment-links.d.ts.map +1 -1
- package/dist/payment-links/payment-links.public-api.d.ts +1 -1
- package/dist/payment-links/payment-links.types.d.ts +1 -1
- package/dist/payment-links/payment-links.types.d.ts.map +1 -1
- package/dist/payment-links/validation/payment-links.validate.d.ts +5 -2
- package/dist/payment-links/validation/payment-links.validate.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/cards/cards.js +1 -1
- package/dist/src/common/api-pagination/api-pagination.js +1 -1
- package/dist/src/errors/AuthenticationError.js +1 -1
- package/dist/src/payment-links/payment-links.js +1 -1
- package/dist/src/payment-links/validation/payment-links.validate.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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/mocks/handlers.ts"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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,6BAoqBvB,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;AAMnD
|
|
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;AAMnD;;;;;;;;;;;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"}
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* ```
|
|
9
9
|
*/
|
|
10
10
|
export declare const paymentLinks: {
|
|
11
|
-
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => string
|
|
11
|
+
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => Promise<string>;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,43 +4,55 @@ import type { CreatePaymentLinkSettings, PaymentLinkParams } from './payment-lin
|
|
|
4
4
|
*
|
|
5
5
|
* @param params - An object containing:
|
|
6
6
|
* - paymentLinkSettings: An object containing:
|
|
7
|
-
* - authUrl: The embed auth link retrieved from the Qonto API. Must be a valid URL.
|
|
8
7
|
* - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
|
|
8
|
+
* - callbackUrl: Required callback URL to redirect to after payment link creation.
|
|
9
|
+
* - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```ts
|
|
12
|
-
* const url = getPaymentLinkCreationFlowUrl({
|
|
13
|
+
* const url = await getPaymentLinkCreationFlowUrl({
|
|
13
14
|
* paymentLinkSettings: {
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
16
|
+
* },
|
|
17
|
+
* operationSettings: {
|
|
18
|
+
* proxyRequestFunction: async (encodedCall) => {
|
|
19
|
+
* // Implement your proxy logic here
|
|
20
|
+
* },
|
|
16
21
|
* }
|
|
17
22
|
* });
|
|
18
23
|
* ```
|
|
19
|
-
* @returns
|
|
24
|
+
* @returns Promise resolving to the full URL as a string, which can be used to launch the payment link creation flow in an iframe or browser.
|
|
20
25
|
*
|
|
21
|
-
* @throws `InvalidParametersError` If the provided
|
|
26
|
+
* @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
|
|
27
|
+
* @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
|
|
22
28
|
*/
|
|
23
|
-
export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => string
|
|
29
|
+
export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<string>;
|
|
24
30
|
/**
|
|
25
31
|
* Redirects to the payment link creation flow with specified items.
|
|
26
32
|
*
|
|
27
33
|
* @param params - An object containing:
|
|
28
34
|
* - paymentLinkSettings: An object containing:
|
|
29
|
-
* - authUrl: The embed auth link retrieved from the Qonto API. Must be a valid URL.
|
|
30
35
|
* - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
|
|
36
|
+
* - callbackUrl: Required callback URL to redirect to after payment link creation.
|
|
37
|
+
* - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
|
|
31
38
|
*
|
|
32
39
|
* @example
|
|
33
40
|
* ```ts
|
|
34
|
-
*
|
|
41
|
+
* await redirectToPaymentLinkCreationFlow({
|
|
35
42
|
* paymentLinkSettings: {
|
|
36
|
-
*
|
|
37
|
-
*
|
|
43
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
44
|
+
* },
|
|
45
|
+
* operationSettings: {
|
|
46
|
+
* proxyRequestFunction: async (encodedCall) => {
|
|
47
|
+
* // Implement your proxy logic here
|
|
48
|
+
* },
|
|
38
49
|
* }
|
|
39
50
|
* });
|
|
40
51
|
* ```
|
|
41
|
-
* @returns
|
|
52
|
+
* @returns This function redirects the browser to the payment link creation flow. Due to the redirect, the returned promise will not resolve.
|
|
42
53
|
*
|
|
43
|
-
* @throws `InvalidParametersError` If the provided
|
|
54
|
+
* @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
|
|
55
|
+
* @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
|
|
44
56
|
*/
|
|
45
|
-
export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => void
|
|
57
|
+
export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<void>;
|
|
46
58
|
//# sourceMappingURL=payment-links.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAQ/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,MAAM,CAsB/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,IAAI,CAM7D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const paymentLinks: {
|
|
2
|
-
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => string
|
|
2
|
+
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => Promise<string>;
|
|
3
3
|
};
|
|
4
4
|
export { paymentLinks };
|
|
5
5
|
//# sourceMappingURL=payment-links.public-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.types.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,MAAM,CAAC,CAAC,GAAG,MAAM;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,
|
|
1
|
+
{"version":3,"file":"payment-links.types.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,MAAM,CAAC,CAAC,GAAG,MAAM;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,mBAAmB,EAAE,CAAC,CAAC;IACvB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { type Item } from '../payment-links.types';
|
|
1
|
+
import { type Item, type CreatePaymentLinkSettings } from '../payment-links.types';
|
|
2
2
|
export declare function validateItems(items: Item[] | undefined): never[] | undefined;
|
|
3
|
-
export declare function validateAuthUrl(authUrl: string): void;
|
|
4
3
|
export declare const validateType: (type: string) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Validates payment link creation flow params to ensure callbackUrl is provided
|
|
6
|
+
*/
|
|
7
|
+
export declare function validatePaymentLinkCreationFlowParams(paymentLinkSettings: CreatePaymentLinkSettings | undefined): string;
|
|
5
8
|
//# sourceMappingURL=payment-links.validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.validate.d.ts","sourceRoot":"","sources":["../../../src/payment-links/validation/payment-links.validate.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"payment-links.validate.d.ts","sourceRoot":"","sources":["../../../src/payment-links/validation/payment-links.validate.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAgBhC,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,uBAqCtD;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAOxC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,mBAAmB,EAAE,yBAAyB,GAAG,SAAS,GACzD,MAAM,CAaR"}
|
|
@@ -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,E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BAAqB,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;AA0B9C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAsDnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CA0B7D;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":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;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9D;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"}
|
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{encodeNetworkCall as r,decodeNetworkResponse as n}from"../common/network/network.js";import{prepareGetCardIframeUrl as a,getCardIframeURL as o,prepareGetCardCall as s,getCard as i,prepareGetCardsCall as c,getCards as d}from"./cards.api.js";import"./cards.types.js";import{validateDisplayCardParams as m,validateUnlockCardParams as g,validateOrderCardParams as u,validateGetCardParams as p}from"./cards.validate.js";import{buildIframeUrl as f,createIframe as k}from"../iframe/iframe-manager.js";import{serializeUnlockCardPayload as l,serializeCard as y,serializeOrderCardPayload as T}from"./cards.serializer.js";import{validateOperationSettingsParams as I}from"../validation/operation-settings-validation.js";import{InvalidParametersError as S}from"../errors/InvalidParametersError.js";import{createEmbedUI as h}from"./cards.helper.js";async function b(e){try{const a=e?.cardSettings?.membershipId;if(a&&"string"!=typeof a)throw new S("membershipId must be a string");const{proxyRequestFunction:o,stagingToken:s}=I(e?.operationSettings||{});if(o){const e=c({membershipId:a,stagingToken:s}),t=r(e),i=await o(t);return n(i).body.cards.map((e=>y(e)))}{const r=e?.operationSettings?.accessToken||t();return(await d({membershipId:a,accessToken:r,stagingToken:s})).map((e=>y(e)))}}catch(e){return Promise.reject(e)}}async function j({cardSettings:e,operationSettings:a}){try{p(e);const o=e.cardId,{proxyRequestFunction:c,stagingToken:d}=I(a||{});if(c){const e=s({cardId:o,stagingToken:d}),t=r(e),a=await c(t),i=n(a).body.cards;if(Array.isArray(i)&&i.length>0)return y(i[0]);throw new S("Unable to retrieve card data")}{const e=a?.accessToken||t(),r=await i({cardId:o,accessToken:e,stagingToken:d});return y(r)}}catch(e){return Promise.reject(e)}}async function w(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=I(r.operationSettings,{requiresUI:!0});u(r.cardSettings);const s=f({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await k({iframeUrl:s,parentElementId:a}),c=T(r.cardSettings),d=await i.postMessage(c);return i.destroy(),y(d)}catch(e){return Promise.reject(e)}}async function P(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=I(r.operationSettings,{requiresUI:!0});g(r.cardSettings);const s=f({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await k({iframeUrl:s,parentElementId:a}),c=l(r),d=await i.postMessage(c);return i.destroy(),y(d)}catch(e){return Promise.reject(e)}}async function M(e){try{const{uiParentElementId:s,accessToken:i,stagingToken:c,debugMode:d,mfaPreference:g,proxyRequestFunction:u}=I(e.operationSettings,{requiresUI:!0});if(m(e.cardSettings),u){const t=a({stagingToken:c}),o=r(t),i=await u(o),m=n(i).body;return h({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:s,debugMode:d},cardIframeUrl:m.url})}{const r=i||t(),n=await o({...e.cardSettings,accessToken:r,stagingToken:c});return h({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:s,debugMode:d,mfaPreference:g},cardIframeUrl:n.url})}}catch(e){return Promise.reject(e)}}export{M as displayCard,j as getCard,b as getCards,w as orderCard,P as unlockCard};
|
|
1
|
+
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../common/auth/auth.validate.js";import{encodeNetworkCall as r,decodeNetworkResponse as n}from"../common/network/network.js";import{prepareGetCardIframeUrl as a,getCardIframeURL as o,prepareGetCardCall as s,getCard as i,prepareGetCardsCall as c,getCards as d}from"./cards.api.js";import"./cards.types.js";import{validateDisplayCardParams as m,validateUnlockCardParams as g,validateOrderCardParams as u,validateGetCardParams as p}from"./cards.validate.js";import{buildIframeUrl as f,createIframe as k}from"../iframe/iframe-manager.js";import{serializeUnlockCardPayload as l,serializeCard as y,serializeOrderCardPayload as T}from"./cards.serializer.js";import{validateOperationSettingsParams as I}from"../validation/operation-settings-validation.js";import{InvalidParametersError as S}from"../errors/InvalidParametersError.js";import{createEmbedUI as h}from"./cards.helper.js";async function b(e){try{const a=e?.cardSettings?.membershipId;if(a&&"string"!=typeof a)throw new S("membershipId must be a string");const{proxyRequestFunction:o,stagingToken:s}=I(e?.operationSettings||{});if(o){const e=c({membershipId:a,stagingToken:s}),t=r(e),i=await o(t);return n(i).body.cards.map((e=>y(e)))}{const r=e?.operationSettings?.accessToken||t();return(await d({membershipId:a,accessToken:r,stagingToken:s})).map((e=>y(e)))}}catch(e){return Promise.reject(e)}}async function j({cardSettings:e,operationSettings:a}){try{p(e);const o=e.cardId,{proxyRequestFunction:c,stagingToken:d}=I(a||{});if(c){const e=s({cardId:o,stagingToken:d}),t=r(e),a=await c(t),i=n(a).body.cards;if(Array.isArray(i)&&i.length>0)return y(i[0]);throw new S("Unable to retrieve card data")}{const e=a?.accessToken||t(),r=await i({cardId:o,accessToken:e,stagingToken:d});return y(r)}}catch(e){return Promise.reject(e)}}async function w(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=I(r.operationSettings,{requiresUI:!0});u(r.cardSettings);const s=f({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await k({iframeUrl:s,parentElementId:a}),c=T(r.cardSettings),d=await i.postMessage(c);return i.destroy(),y(d)}catch(e){return Promise.reject(e)}}async function P(r){try{const n=t(),{uiParentElementId:a,debugMode:o}=I(r.operationSettings,{requiresUI:!0});g(r.cardSettings);const s=f({accessToken:n,stagingToken:e.getStagingToken()||void 0,debugMode:o}),i=await k({iframeUrl:s,parentElementId:a}),c=l(r),d=await i.postMessage(c);return i.destroy(),y(d)}catch(e){return Promise.reject(e)}}async function M(e){try{const{uiParentElementId:s,accessToken:i,stagingToken:c,debugMode:d,mfaPreference:g,proxyRequestFunction:u}=I(e.operationSettings,{requiresUI:!0});if(m(e.cardSettings),u){const t=a({stagingToken:c}),o=r(t),i=await u(o),m=n(i).body.embed_auth_link;return h({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:s,debugMode:d},cardIframeUrl:m.url})}{const r=i||t(),n=await o({...e.cardSettings,accessToken:r,stagingToken:c});return h({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:s,debugMode:d,mfaPreference:g},cardIframeUrl:n.url})}}catch(e){return Promise.reject(e)}}export{M as displayCard,j as getCard,b as getCards,w as orderCard,P 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{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{
|
|
1
|
+
import{validateItems as t,validatePaymentLinkCreationFlowParams as n}from"./validation/payment-links.validate.js";import{request as i}from"../auth-links/auth-links.js";import{AUTH_LINK_ACTIONS as o}from"../common/constants.js";const s=async({paymentLinkSettings:s,operationSettings:a})=>{const{items:r}=s;t(r);const e=n(s),m=await i({requestSettings:{action:o.PAYMENT_LINK_CREATE,callbackUrl:e},operationSettings:a}),c=new URLSearchParams({...r?{items:JSON.stringify(r)}:{}});return c.toString()?`${m.url}?${c.toString()}`:m.url};export{s as getPaymentLinkCreationFlowUrl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{validatePresenceOfRequiredParams as t,validateExpectedStringValues as e,validateExpectedNumericValues as r}from"../../validation/input-param-validation.js";import{InvalidParametersError as i}from"../../errors/InvalidParametersError.js";import{LINK_TYPES as a}from"../payment-links.types.js";import{validateCurrency as n}from"./currency.validation.js";import{validateUnit as c}from"./unit.validation.js";const l=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],o=[{name:"currency"},{name:"value"}];function m(a){if(!a||!Array.isArray(a))return[];a.forEach((a=>{t(a,l),t(a.unitPrice,o);const m=[...e({id:a.id,title:a.title,vatRate:a.vatRate,currency:a.unitPrice.currency,measureUnit:a.measureUnit,unitPrice:a.unitPrice.value,...a.description?{description:a.description}:{}}),...r({quantity:a.quantity})].flat();if(m.length>0)throw new i(m);u(a.type),n(a.unitPrice.currency),c(a.measureUnit)}))}const u=t=>{if(!Object.values(a).includes(t))throw new i(`type ${t} is not valid, valid types are ${Object.values(a).join(", ")}`)};function s(t){if(!t?.callbackUrl)throw new i("callbackUrl parameter is required for the payment link creation flow");if("string"!=typeof t.callbackUrl)throw new i("callbackUrl must be a string");if(""===t.callbackUrl.trim())throw new i("callbackUrl cannot be empty");return t.callbackUrl}export{m as validateItems,s as validatePaymentLinkCreationFlowParams,u as validateType};
|
|
@@ -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 a,prepareGetBulkTransferCall as o,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 g}from"./bulk-transfers.validate.js";import{isRunningInBrowser as d}from"../../common/runtime/runtime.validation.js";import{InvalidRuntimeError as k,RUNTIME_ENVIRONMENT as l}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{encodeNetworkCall as S,decodeNetworkResponse as v}from"../../common/network/network.js";import I from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function E(n){const{stagingToken:a,proxyRequestFunction:o,accessToken:r,paginationSettings:m}=f(n?.operationSettings||{});if(o){const n=s({paginationSettings:m}),e=S(n),a=await o(e),r=v(a),i=r.body.bulk_transfers.map(u),c=t(r.body.meta);return{bulkTransfers:i,...c?{meta:c}:{}}}{const n=r||e(),o=await i({accessToken:n,stagingToken:a,paginationSettings:m}),s=o.bulkTransfers?.map(u),c=t(o.meta);return{bulkTransfers:s,...c?{meta:c}:{}}}}async function R({sepaTransferSettings:n,operationSettings:t}){const a=g(n?.bulkTransferId),{proxyRequestFunction:s,accessToken:i,stagingToken:m}=f(t||{});if(s){const n=o({bulkTransferId:a}),e=S(n),t=await s(e),r=v(t);return u(r.body.bulk_transfer)}{const n=i||e(),t=await r({accessToken:n,stagingToken:m,bulkTransferId:a});return u(t)}}async function*h({bulkTransferSettings:t,operationSettings:o}){const r=o?.accessToken||e(),s=o?.stagingToken||n.getStagingToken(),i=o?.idempotencyKey||I();p(t);const{uiParentElementId:g,debugMode:S}=f(o,{requiresUI:!0});if(!d())throw new k(l.BROWSER);const v=new Map;for(const n of t.bulkTransfers){const e=n.beneficiary.iban;e&&!v.has(e)&&v.set(e,{name:n.beneficiary.name,iban:e})}const E=Array.from(v.values()),R=await a({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:g});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{h as createBulkTransfer,R as getBulkTransfer,E as getBulkTransfers};
|