@qonto/embed-sdk 0.62.0 → 0.64.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/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
- package/dist/cards/{cards.d.ts → client/cards.client.d.ts} +64 -89
- package/dist/cards/client/cards.client.d.ts.map +1 -0
- package/dist/cards/client/cards.client.test.d.ts +2 -0
- package/dist/cards/client/cards.client.test.d.ts.map +1 -0
- package/dist/cards/index.d.ts +40 -10
- package/dist/cards/index.d.ts.map +1 -1
- package/dist/cards/index.server.d.ts +41 -0
- package/dist/cards/index.server.d.ts.map +1 -0
- package/dist/cards/server/cards.server.d.ts +60 -0
- package/dist/cards/server/cards.server.d.ts.map +1 -0
- package/dist/cards/server/cards.server.test.d.ts +2 -0
- package/dist/cards/server/cards.server.test.d.ts.map +1 -0
- package/dist/cards/shared/cards.api.d.ts.map +1 -0
- package/dist/cards/shared/cards.constants.d.ts +11 -0
- package/dist/cards/shared/cards.constants.d.ts.map +1 -0
- package/dist/{server/cards → cards/shared}/cards.helper.d.ts +2 -0
- package/dist/cards/shared/cards.helper.d.ts.map +1 -0
- package/dist/cards/shared/cards.serializer.d.ts +35 -0
- package/dist/cards/shared/cards.serializer.d.ts.map +1 -0
- package/dist/cards/shared/cards.shared.test.d.ts +2 -0
- package/dist/cards/shared/cards.shared.test.d.ts.map +1 -0
- package/dist/cards/{cards.types.d.ts → shared/cards.types.d.ts} +3 -8
- package/dist/cards/shared/cards.types.d.ts.map +1 -0
- package/dist/cards/{cards.validate.d.ts → shared/cards.validate.d.ts} +1 -1
- package/dist/cards/shared/cards.validate.d.ts.map +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/mocks/handlers.d.ts +1 -1
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/payment-links/client/payment-links.client.d.ts +95 -0
- package/dist/payment-links/client/payment-links.client.d.ts.map +1 -0
- package/dist/payment-links/client/payment-links.client.test.d.ts +2 -0
- package/dist/payment-links/client/payment-links.client.test.d.ts.map +1 -0
- package/dist/payment-links/index.d.ts +27 -6
- package/dist/payment-links/index.d.ts.map +1 -1
- package/dist/payment-links/index.server.d.ts +35 -0
- package/dist/payment-links/index.server.d.ts.map +1 -0
- package/dist/payment-links/server/payment-links.server.d.ts +50 -0
- package/dist/payment-links/server/payment-links.server.d.ts.map +1 -0
- package/dist/payment-links/server/payment-links.server.test.d.ts +2 -0
- package/dist/payment-links/server/payment-links.server.test.d.ts.map +1 -0
- package/dist/payment-links/shared/currency.validation.d.ts.map +1 -0
- package/dist/payment-links/shared/payment-links.shared.test.d.ts +2 -0
- package/dist/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
- package/dist/{server/payment-links → payment-links/shared}/payment-links.types.d.ts +2 -2
- package/dist/payment-links/shared/payment-links.types.d.ts.map +1 -0
- package/dist/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
- package/dist/payment-links/shared/payment-links.validate.d.ts.map +1 -0
- package/dist/payment-links/shared/unit.validation.d.ts.map +1 -0
- package/dist/server/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
- package/dist/server/cards/{cards.d.ts → client/cards.client.d.ts} +64 -89
- package/dist/server/cards/client/cards.client.d.ts.map +1 -0
- package/dist/server/cards/client/cards.client.test.d.ts +2 -0
- package/dist/server/cards/client/cards.client.test.d.ts.map +1 -0
- package/dist/server/cards/index.d.ts +40 -10
- package/dist/server/cards/index.d.ts.map +1 -1
- package/dist/server/cards/index.server.d.ts +41 -0
- package/dist/server/cards/index.server.d.ts.map +1 -0
- package/dist/server/cards/server/cards.server.d.ts +60 -0
- package/dist/server/cards/server/cards.server.d.ts.map +1 -0
- package/dist/server/cards/server/cards.server.test.d.ts +2 -0
- package/dist/server/cards/server/cards.server.test.d.ts.map +1 -0
- package/dist/server/cards/shared/cards.api.d.ts.map +1 -0
- package/dist/server/cards/shared/cards.constants.d.ts +11 -0
- package/dist/server/cards/shared/cards.constants.d.ts.map +1 -0
- package/dist/{cards → server/cards/shared}/cards.helper.d.ts +2 -0
- package/dist/server/cards/shared/cards.helper.d.ts.map +1 -0
- package/dist/server/cards/shared/cards.serializer.d.ts +35 -0
- package/dist/server/cards/shared/cards.serializer.d.ts.map +1 -0
- package/dist/server/cards/shared/cards.shared.test.d.ts +2 -0
- package/dist/server/cards/shared/cards.shared.test.d.ts.map +1 -0
- package/dist/server/cards/{cards.types.d.ts → shared/cards.types.d.ts} +3 -8
- package/dist/{cards → server/cards/shared}/cards.types.d.ts.map +1 -1
- package/dist/server/cards/{cards.validate.d.ts → shared/cards.validate.d.ts} +1 -1
- package/dist/server/cards/shared/cards.validate.d.ts.map +1 -0
- package/dist/server/mocks/handlers.d.ts +1 -1
- package/dist/server/mocks/handlers.d.ts.map +1 -1
- package/dist/server/payment-links/client/payment-links.client.d.ts +95 -0
- package/dist/server/payment-links/client/payment-links.client.d.ts.map +1 -0
- package/dist/server/payment-links/client/payment-links.client.test.d.ts +2 -0
- package/dist/server/payment-links/client/payment-links.client.test.d.ts.map +1 -0
- package/dist/server/payment-links/index.d.ts +27 -6
- package/dist/server/payment-links/index.d.ts.map +1 -1
- package/dist/server/payment-links/index.server.d.ts +35 -0
- package/dist/server/payment-links/index.server.d.ts.map +1 -0
- package/dist/server/payment-links/server/payment-links.server.d.ts +50 -0
- package/dist/server/payment-links/server/payment-links.server.d.ts.map +1 -0
- package/dist/server/payment-links/server/payment-links.server.test.d.ts +2 -0
- package/dist/server/payment-links/server/payment-links.server.test.d.ts.map +1 -0
- package/dist/server/payment-links/shared/currency.validation.d.ts.map +1 -0
- package/dist/server/payment-links/shared/payment-links.shared.test.d.ts +2 -0
- package/dist/server/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
- package/dist/{payment-links → server/payment-links/shared}/payment-links.types.d.ts +2 -2
- package/dist/server/payment-links/shared/payment-links.types.d.ts.map +1 -0
- package/dist/server/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
- package/dist/server/payment-links/shared/payment-links.validate.d.ts.map +1 -0
- package/dist/server/payment-links/shared/unit.validation.d.ts.map +1 -0
- package/dist/server/types/types.public-api.d.ts +2 -2
- package/dist/server/types/types.public-api.d.ts.map +1 -1
- package/dist/server/validation/operation-settings-validation.d.ts +2 -1
- package/dist/server/validation/operation-settings-validation.d.ts.map +1 -1
- package/dist/src/auth-links/shared/auth-links.api.js +1 -1
- package/dist/src/beneficiaries/client/beneficiaries.client.js +1 -1
- package/dist/src/cards/client/cards.client.js +1 -0
- package/dist/src/cards/index.js +1 -1
- package/dist/src/cards/shared/cards.api.js +1 -0
- package/dist/src/cards/shared/cards.constants.js +1 -0
- package/dist/src/cards/shared/cards.helper.js +1 -0
- package/dist/src/cards/shared/cards.serializer.js +1 -0
- package/dist/src/cards/{cards.types.js → shared/cards.types.js} +1 -1
- package/dist/src/cards/shared/cards.validate.js +1 -0
- package/dist/src/payment-links/client/payment-links.client.js +1 -0
- package/dist/src/payment-links/index.js +1 -1
- package/dist/src/payment-links/shared/payment-links.validate.js +1 -0
- package/dist/types/types.public-api.d.ts +2 -2
- package/dist/types/types.public-api.d.ts.map +1 -1
- package/dist/validation/operation-settings-validation.d.ts +2 -1
- package/dist/validation/operation-settings-validation.d.ts.map +1 -1
- package/package.json +9 -1
- package/dist/cards/cards.api.d.ts.map +0 -1
- package/dist/cards/cards.d.ts.map +0 -1
- package/dist/cards/cards.helper.d.ts.map +0 -1
- package/dist/cards/cards.public-api.d.ts +0 -10
- package/dist/cards/cards.public-api.d.ts.map +0 -1
- package/dist/cards/cards.serializer.d.ts +0 -72
- package/dist/cards/cards.serializer.d.ts.map +0 -1
- package/dist/cards/cards.test.d.ts +0 -2
- package/dist/cards/cards.test.d.ts.map +0 -1
- package/dist/cards/cards.validate.d.ts.map +0 -1
- package/dist/payment-links/payment-links.d.ts +0 -58
- package/dist/payment-links/payment-links.d.ts.map +0 -1
- package/dist/payment-links/payment-links.public-api.d.ts +0 -5
- package/dist/payment-links/payment-links.public-api.d.ts.map +0 -1
- package/dist/payment-links/payment-links.test.d.ts +0 -2
- package/dist/payment-links/payment-links.test.d.ts.map +0 -1
- package/dist/payment-links/payment-links.types.d.ts.map +0 -1
- package/dist/payment-links/validation/currency.validation.d.ts.map +0 -1
- package/dist/payment-links/validation/payment-links.validate.d.ts.map +0 -1
- package/dist/payment-links/validation/unit.validation.d.ts.map +0 -1
- package/dist/server/cards/cards.api.d.ts.map +0 -1
- package/dist/server/cards/cards.d.ts.map +0 -1
- package/dist/server/cards/cards.helper.d.ts.map +0 -1
- package/dist/server/cards/cards.public-api.d.ts +0 -10
- package/dist/server/cards/cards.public-api.d.ts.map +0 -1
- package/dist/server/cards/cards.serializer.d.ts +0 -72
- package/dist/server/cards/cards.serializer.d.ts.map +0 -1
- package/dist/server/cards/cards.test.d.ts +0 -2
- package/dist/server/cards/cards.test.d.ts.map +0 -1
- package/dist/server/cards/cards.types.d.ts.map +0 -1
- package/dist/server/cards/cards.validate.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.d.ts +0 -58
- package/dist/server/payment-links/payment-links.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.public-api.d.ts +0 -5
- package/dist/server/payment-links/payment-links.public-api.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.test.d.ts +0 -2
- package/dist/server/payment-links/payment-links.test.d.ts.map +0 -1
- package/dist/server/payment-links/payment-links.types.d.ts.map +0 -1
- package/dist/server/payment-links/validation/currency.validation.d.ts.map +0 -1
- package/dist/server/payment-links/validation/payment-links.validate.d.ts.map +0 -1
- package/dist/server/payment-links/validation/unit.validation.d.ts.map +0 -1
- package/dist/src/auth-links/auth-links.js +0 -1
- package/dist/src/cards/cards.api.js +0 -1
- package/dist/src/cards/cards.helper.js +0 -1
- package/dist/src/cards/cards.js +0 -1
- package/dist/src/cards/cards.public-api.js +0 -1
- package/dist/src/cards/cards.serializer.js +0 -1
- package/dist/src/cards/cards.validate.js +0 -1
- package/dist/src/payment-links/payment-links.js +0 -1
- package/dist/src/payment-links/payment-links.public-api.js +0 -1
- package/dist/src/payment-links/validation/payment-links.validate.js +0 -1
- /package/dist/cards/{cards.api.d.ts → shared/cards.api.d.ts} +0 -0
- /package/dist/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
- /package/dist/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
- /package/dist/server/cards/{cards.api.d.ts → shared/cards.api.d.ts} +0 -0
- /package/dist/server/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
- /package/dist/server/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
- /package/dist/src/payment-links/{validation → shared}/currency.validation.js +0 -0
- /package/dist/src/payment-links/{payment-links.types.js → shared/payment-links.types.js} +0 -0
- /package/dist/src/payment-links/{validation → shared}/unit.validation.js +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { displayCard, getCard, getCards, orderCard, unlockCard } from './client/cards.client';
|
|
1
2
|
/**
|
|
2
|
-
* The cards namespace contains all the functions related to card operations.
|
|
3
|
+
* The cards namespace contains all the client-side functions related to card operations.
|
|
4
|
+
* This version uses proxy-based authentication (proxyEndpointDescriptor or proxyRequestFunction)
|
|
5
|
+
* and is designed for browser environments.
|
|
6
|
+
*
|
|
7
|
+
* For server-side operations using access tokens, import from `'@qonto/embed-sdk/cards/server'`.
|
|
8
|
+
*
|
|
3
9
|
* It can be accessed like this:
|
|
4
10
|
* ```ts
|
|
5
11
|
* import { cards } from '@qonto/embed-sdk/cards';
|
|
@@ -7,17 +13,41 @@
|
|
|
7
13
|
*
|
|
8
14
|
* Then, the cards object contains the functions to perform card operations:
|
|
9
15
|
* ```ts
|
|
10
|
-
*
|
|
11
|
-
* await cards.getCards(
|
|
12
|
-
*
|
|
13
|
-
*
|
|
16
|
+
* // Fetch cards (requires proxyEndpointDescriptor or proxyRequestFunction)
|
|
17
|
+
* await cards.getCards({
|
|
18
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // Get a specific card
|
|
22
|
+
* await cards.getCard({
|
|
23
|
+
* cardSettings: { cardId: '...' },
|
|
24
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // UI operations (client-only)
|
|
28
|
+
* await cards.displayCard({
|
|
29
|
+
* cardSettings: { cardId: '...' },
|
|
30
|
+
* operationSettings: { proxyEndpointDescriptor, uiParentElementId: 'element-id' }
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* await cards.orderCard({
|
|
34
|
+
* cardSettings: { ... },
|
|
35
|
+
* operationSettings: { proxyEndpointDescriptor, uiParentElementId: 'element-id' }
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* await cards.unlockCard({
|
|
39
|
+
* cardSettings: { cardId: '...' },
|
|
40
|
+
* operationSettings: { proxyEndpointDescriptor, uiParentElementId: 'element-id' }
|
|
41
|
+
* });
|
|
14
42
|
* ```
|
|
15
43
|
*/
|
|
16
44
|
export declare const cards: {
|
|
17
|
-
getCards: typeof
|
|
18
|
-
getCard: typeof
|
|
19
|
-
orderCard: typeof
|
|
20
|
-
unlockCard: typeof
|
|
21
|
-
displayCard: typeof
|
|
45
|
+
getCards: typeof getCards;
|
|
46
|
+
getCard: typeof getCard;
|
|
47
|
+
orderCard: typeof orderCard;
|
|
48
|
+
unlockCard: typeof unlockCard;
|
|
49
|
+
displayCard: typeof displayCard;
|
|
22
50
|
};
|
|
51
|
+
export type * from './shared/cards.types';
|
|
52
|
+
export type { ClientOperationSettings, ClientOperationSettingsWithUI, } from '@validation/operation-settings-validation';
|
|
23
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACX,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;AAGF,mBAAmB,sBAAsB,CAAC;AAC1C,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getCard, getCards } from './server/cards.server';
|
|
2
|
+
/**
|
|
3
|
+
* The cards namespace contains all the server-side functions related to card operations.
|
|
4
|
+
* This version uses access token-based authentication and is designed for server environments.
|
|
5
|
+
*
|
|
6
|
+
* For client-side operations using proxy functions, import from `'@qonto/embed-sdk/cards'`.
|
|
7
|
+
*
|
|
8
|
+
* It can be accessed like this:
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { cards } from '@qonto/embed-sdk/cards/server';
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Then, the cards object contains the functions to perform card operations:
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Fetch cards (uses accessToken or global auth)
|
|
16
|
+
* await cards.getCards({
|
|
17
|
+
* operationSettings: { accessToken: 'your-token' }
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Get a specific card
|
|
21
|
+
* await cards.getCard({
|
|
22
|
+
* cardSettings: { cardId: '...' },
|
|
23
|
+
* operationSettings: { accessToken: 'your-token' }
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* **Note:** The following functions are NOT available in the server-side API as they require
|
|
28
|
+
* browser-specific UI rendering:
|
|
29
|
+
* - orderCard
|
|
30
|
+
* - unlockCard
|
|
31
|
+
* - displayCard
|
|
32
|
+
*
|
|
33
|
+
* These functions are only available in the client-side import.
|
|
34
|
+
*/
|
|
35
|
+
export declare const cards: {
|
|
36
|
+
getCards: typeof getCards;
|
|
37
|
+
getCard: typeof getCard;
|
|
38
|
+
};
|
|
39
|
+
export type * from './shared/cards.types';
|
|
40
|
+
export type { ServerOperationSettings } from '@validation/operation-settings-validation';
|
|
41
|
+
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../src/cards/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAGF,mBAAmB,sBAAsB,CAAC;AAC1C,YAAY,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ServerOperationSettings } from '@validation/operation-settings-validation';
|
|
2
|
+
import type { Card } from '../shared/cards.types';
|
|
3
|
+
/**
|
|
4
|
+
* Generic parameter type for server-side card operations
|
|
5
|
+
*/
|
|
6
|
+
export interface CardServerParams<T> {
|
|
7
|
+
cardSettings?: T;
|
|
8
|
+
operationSettings?: ServerOperationSettings;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fetches the list of cards for the current user (server-side version).
|
|
12
|
+
*
|
|
13
|
+
* This function uses access token-based authentication and is designed for server environments.
|
|
14
|
+
* It requires `accessToken` in operationSettings.
|
|
15
|
+
*
|
|
16
|
+
* @param getCardsParams - An object with optional parameters:
|
|
17
|
+
* - `cardSettings`: An object that can contain the optional `membershipId` property.
|
|
18
|
+
* - `operationSettings`: An object with `accessToken`,
|
|
19
|
+
* `stagingToken`, and other optional parameters.
|
|
20
|
+
* @returns A promise that resolves to an array of cards.
|
|
21
|
+
* @throws `InvalidParametersError` If membershipId is invalid.
|
|
22
|
+
* @throws `AuthenticationError` If the `accessToken` is invalid or missing.
|
|
23
|
+
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getCards(getCardsParams?: CardServerParams<{
|
|
26
|
+
membershipId?: string;
|
|
27
|
+
}>): Promise<Card[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Fetches a card by its id (server-side version).
|
|
30
|
+
*
|
|
31
|
+
* This function uses access token-based authentication and is designed for server environments.
|
|
32
|
+
* It requires `accessToken` in operationSettings or relies on the globally configured token.
|
|
33
|
+
*
|
|
34
|
+
* @param getCardParams - An object containing:
|
|
35
|
+
* - `cardSettings`: An object with the `cardId` property (string).
|
|
36
|
+
* - `operationSettings`: An object with `accessToken` (optional, falls back to global auth),
|
|
37
|
+
* `stagingToken`, and other optional parameters.
|
|
38
|
+
* @returns A promise that resolves to a card.
|
|
39
|
+
* @throws `InvalidParametersError` If the cardId is not provided or not a string.
|
|
40
|
+
* @throws `AuthenticationError` If the `accessToken` is invalid or missing.
|
|
41
|
+
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getCard({ cardSettings, operationSettings, }: {
|
|
44
|
+
cardSettings: {
|
|
45
|
+
cardId: string;
|
|
46
|
+
};
|
|
47
|
+
operationSettings?: ServerOperationSettings;
|
|
48
|
+
}): Promise<Card>;
|
|
49
|
+
/**
|
|
50
|
+
* Note: The following functions are NOT available in the server-side API as they require
|
|
51
|
+
* browser-specific UI rendering capabilities:
|
|
52
|
+
*
|
|
53
|
+
* - orderCard: Requires UI rendering for MFA (iframe)
|
|
54
|
+
* - unlockCard: Requires UI rendering for MFA (iframe)
|
|
55
|
+
* - displayCard: Requires UI rendering for card display
|
|
56
|
+
*
|
|
57
|
+
* These functions are only available in the client-side import:
|
|
58
|
+
* `import { cards } from '@qonto/embed-sdk/cards'`
|
|
59
|
+
*/
|
|
60
|
+
//# sourceMappingURL=cards.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.server.d.ts","sourceRoot":"","sources":["../../../../src/cards/server/cards.server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAQzF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC,IAAI,EAAE,CAAC,CAoBjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,GAAG,OAAO,CAAC,IAAI,CAAC,CAchB;AAED;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.server.test.d.ts","sourceRoot":"","sources":["../../../../src/cards/server/cards.server.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.api.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAInF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzE,UAAU,cAAc;IACtB,YAAY,CAAC,EAAE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,CAAC,CAQlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const VIRTUAL_CARD_LEVEL: {
|
|
2
|
+
ADVERTISING: string;
|
|
3
|
+
FLASH: string;
|
|
4
|
+
VIRTUAL: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const PHYSICAL_CARD_LEVEL: {
|
|
7
|
+
METAL: string;
|
|
8
|
+
PLUS: string;
|
|
9
|
+
STANDARD: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=cards.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.constants.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CardOrderSettings, VirtualCardOrderSettings } from '@cards';
|
|
1
2
|
import type { OperationSettings } from '@validation/operation-settings-validation';
|
|
2
3
|
interface IframeUrlDecorationParams {
|
|
3
4
|
cardId: string;
|
|
@@ -13,5 +14,6 @@ export declare function createEmbedUI({ decorationParams, operationSettings, car
|
|
|
13
14
|
}): Promise<{
|
|
14
15
|
destroyEmbedUI: () => void;
|
|
15
16
|
}>;
|
|
17
|
+
export declare function isVirtualCardOrderSettings(params: CardOrderSettings): params is VirtualCardOrderSettings;
|
|
16
18
|
export {};
|
|
17
19
|
//# sourceMappingURL=cards.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.helper.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAI1E,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,2CAA2C,CAAC;AAMnD,UAAU,yBAAyB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,yBAAyB,GAChC,MAAM,CAkBR;AAED,wBAAsB,aAAa,CAAC,EAClC,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,GACd,EAAE;IACD,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;CACvB;;GAmBA;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,iBAAiB,GACxB,MAAM,IAAI,wBAAwB,CAEpC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Card, type CardDataObject, type CardOrderSettings, type UnlockCardSettings } from './cards.types';
|
|
2
|
+
export declare function serializeOrderCardPayload(payload: CardOrderSettings): {
|
|
3
|
+
actionId: string;
|
|
4
|
+
actionData: {
|
|
5
|
+
idempotencyKey: string;
|
|
6
|
+
body: {
|
|
7
|
+
card: {
|
|
8
|
+
payment_monthly_limit: number;
|
|
9
|
+
payment_daily_limit: number | undefined;
|
|
10
|
+
payment_daily_limit_option: boolean | undefined;
|
|
11
|
+
payment_transaction_limit: number | undefined;
|
|
12
|
+
payment_transaction_limit_option: boolean | undefined;
|
|
13
|
+
active_days: number[];
|
|
14
|
+
holder_id: string;
|
|
15
|
+
organization_id: string;
|
|
16
|
+
bank_account_id: string;
|
|
17
|
+
categories: string[];
|
|
18
|
+
card_level: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare function serializeCard(cardDataObject: CardDataObject): Card;
|
|
24
|
+
export declare function filterValidCategories(categories: string[] | undefined): string[];
|
|
25
|
+
export declare function serializeUnlockCardPayload(payload: {
|
|
26
|
+
cardSettings: UnlockCardSettings;
|
|
27
|
+
}): {
|
|
28
|
+
actionId: string;
|
|
29
|
+
actionData: {
|
|
30
|
+
body: {
|
|
31
|
+
cardId: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=cards.serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.serializer.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.serializer.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAExB,MAAM,eAAe,CAAC;AAEvB,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;EAMnE;AA8ED,wBAAgB,aAAa,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CA2DlE;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,YAKrE;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAClD,YAAY,EAAE,kBAAkB,CAAC;CAClC;;;;;;;EASA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.shared.test.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.shared.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PHYSICAL_CARD_LEVEL, VIRTUAL_CARD_LEVEL } from '@cards/shared/cards.constants.ts';
|
|
1
2
|
/**
|
|
2
3
|
* The possible statuses a card can be in.
|
|
3
4
|
*/
|
|
@@ -40,18 +41,12 @@ type CardCategory = (typeof CardCategories)[keyof typeof CardCategories];
|
|
|
40
41
|
* to customize the appearance of the card.
|
|
41
42
|
*/
|
|
42
43
|
type CardDesign = 'standard.recycled.plastic.2023' | 'plus.black.2023' | 'plus.recycled.plastic.silver.2023' | 'plus.recycled.plastic.black.2023' | 'plus.recycled.plastic.lilac.2023' | 'metal.graphite.black.2019' | 'metal.mineral.gray.2024' | 'metal.sand.gold.2024' | 'virtual.default.2017' | 'virtual.blueberry.2025' | 'virtual.sakura.2025' | 'virtual.plum.2025' | 'virtual.dawn.2025' | 'virtual.together.or.nothing.2025' | 'virtual.gus.gus.2025' | 'virtual.forever.bound.2025' | 'virtual.puzzle.2025' | 'flash.default.2021' | 'advertising.default.2023';
|
|
43
|
-
export
|
|
44
|
-
VIRTUAL = "virtual"
|
|
45
|
-
}
|
|
44
|
+
export type VirtualCardLevel = (typeof VIRTUAL_CARD_LEVEL)[keyof typeof VIRTUAL_CARD_LEVEL];
|
|
46
45
|
/**
|
|
47
46
|
* The possible levels of a physical card. These levels are used to determine
|
|
48
47
|
* the features and benefits associated with the card.
|
|
49
48
|
*/
|
|
50
|
-
export
|
|
51
|
-
METAL = "metal",
|
|
52
|
-
PLUS = "plus",
|
|
53
|
-
STANDARD = "standard"
|
|
54
|
-
}
|
|
49
|
+
export type PhysicalCardLevel = (typeof PHYSICAL_CARD_LEVEL)[keyof typeof PHYSICAL_CARD_LEVEL];
|
|
55
50
|
type CardType = 'debit' | 'prepaid';
|
|
56
51
|
type TypeOfPrint = 'embossed' | 'print' | null;
|
|
57
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"cards.types.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,OAAO,YAAY;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xB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,mBAAmB,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;IAYI;AACJ,MAAM,WAAW,mBAAmB;IAClC;;QAEI;IACJ,MAAM,EAAE,MAAM,CAAC;IACf;;;QAGI;IACJ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;QAII;IACJ,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;IAGI;AACJ,MAAM,WAAW,uBAAuB;IACtC;;;QAGI;IACJ,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CardOrderSettings, DisplayCardSettings, UnlockCardSettings, VirtualCardOrderSettings } from './cards.types';
|
|
2
2
|
export declare function validateOrderCardParams(params: CardOrderSettings): void | VirtualCardOrderSettings;
|
|
3
3
|
export declare function validateUnlockCardParams(params: UnlockCardSettings): void;
|
|
4
4
|
export declare function validateDisplayCardParams(params: DisplayCardSettings): DisplayCardSettings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.validate.d.ts","sourceRoot":"","sources":["../../../../src/cards/shared/cards.validate.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,iBAAiB,EACjB,mBAAmB,EAEnB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAmBvB,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,mCAWhE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,QAelE;AA6ND,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,uBAkCpE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;YAAR,MAAM;EAiB7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Beneficiary, BeneficiaryDataObject } from '@beneficiaries/shared/beneficiaries.types';
|
|
2
|
-
import type { CardDataObject } from '@cards/cards.types';
|
|
2
|
+
import type { CardDataObject } from '@cards/shared/cards.types';
|
|
3
3
|
import type { BankAccountDataObject, OrganizationDataObject } from '@organizations/shared/organizations.types';
|
|
4
4
|
import type { BulkTransferDataObject, BulkTransferSettings, NewBulkTransfer, NewBulkTransferWithBeneficiary } from '@sepa-transfers/bulk-transfers/shared/bulk-transfers.types';
|
|
5
5
|
import type { SepaTransferDataObject } from '@sepa-transfers/shared/sepa-transfers.types';
|
|
@@ -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,2CAA2C,CAAC;
|
|
1
|
+
{"version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AM,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,6BA26BvB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ClientOperationSettings } from '@validation/operation-settings-validation';
|
|
2
|
+
import type { CreatePaymentLinkSettings, PaymentLinkParams } from '../shared/payment-links.types';
|
|
3
|
+
/**
|
|
4
|
+
* Generates the URL for initiating a payment link creation flow with specified items.
|
|
5
|
+
*
|
|
6
|
+
* **Client-side only** - Uses proxy-based authentication.
|
|
7
|
+
* For server-side operations, import from `'@qonto/embed-sdk/server/payment-links'`.
|
|
8
|
+
*
|
|
9
|
+
* @param params - An object containing:
|
|
10
|
+
* - `paymentLinkSettings`: An object containing:
|
|
11
|
+
* - `items`: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
|
|
12
|
+
* - `callbackUrl`: Required callback URL to redirect to after payment link creation.
|
|
13
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
14
|
+
* `proxyEndpointDescriptor` (preferred) or `proxyRequestFunction` (at least one required).
|
|
15
|
+
* @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.
|
|
16
|
+
* @throws `InvalidParametersError` If neither `proxyEndpointDescriptor` nor
|
|
17
|
+
* `proxyRequestFunction` is provided, or if the provided items array is invalid, or if callbackUrl is missing or invalid.
|
|
18
|
+
* @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```
|
|
22
|
+
* // Preferred: Using proxyEndpointDescriptor
|
|
23
|
+
* const url = await paymentLinks.getPaymentLinkCreationFlowUrl({
|
|
24
|
+
* paymentLinkSettings: {
|
|
25
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
26
|
+
* callbackUrl: 'https://example.com/callback',
|
|
27
|
+
* },
|
|
28
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```
|
|
34
|
+
* // Alternative: Using proxyRequestFunction
|
|
35
|
+
* const url = await paymentLinks.getPaymentLinkCreationFlowUrl({
|
|
36
|
+
* paymentLinkSettings: {
|
|
37
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
38
|
+
* callbackUrl: 'https://example.com/callback',
|
|
39
|
+
* },
|
|
40
|
+
* operationSettings: {
|
|
41
|
+
* proxyRequestFunction: async (encodedCall) => {
|
|
42
|
+
* // Implement your proxy logic here
|
|
43
|
+
* },
|
|
44
|
+
* }
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings, ClientOperationSettings>) => Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Redirects to the payment link creation flow with specified items.
|
|
51
|
+
*
|
|
52
|
+
* **Client-side only** - Uses proxy-based authentication and browser redirect.
|
|
53
|
+
* This function is not available in server-side imports.
|
|
54
|
+
*
|
|
55
|
+
* @param params - An object containing:
|
|
56
|
+
* - `paymentLinkSettings`: An object containing:
|
|
57
|
+
* - `items`: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
|
|
58
|
+
* - `callbackUrl`: Required callback URL to redirect to after payment link creation.
|
|
59
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
60
|
+
* `proxyEndpointDescriptor` (preferred) or `proxyRequestFunction` (at least one required).
|
|
61
|
+
* @returns This function redirects the browser to the payment link creation flow. Due to the redirect, the returned promise will not resolve.
|
|
62
|
+
* @throws `InvalidParametersError` If neither `proxyEndpointDescriptor` nor
|
|
63
|
+
* `proxyRequestFunction` is provided, or if the provided items array is invalid, or if callbackUrl is missing or invalid.
|
|
64
|
+
* @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```
|
|
68
|
+
* // Preferred: Using proxyEndpointDescriptor
|
|
69
|
+
* await paymentLinks.redirectToPaymentLinkCreationFlow({
|
|
70
|
+
* paymentLinkSettings: {
|
|
71
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
72
|
+
* callbackUrl: 'https://example.com/callback',
|
|
73
|
+
* },
|
|
74
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```
|
|
80
|
+
* // Alternative: Using proxyRequestFunction
|
|
81
|
+
* await paymentLinks.redirectToPaymentLinkCreationFlow({
|
|
82
|
+
* paymentLinkSettings: {
|
|
83
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
84
|
+
* callbackUrl: 'https://example.com/callback',
|
|
85
|
+
* },
|
|
86
|
+
* operationSettings: {
|
|
87
|
+
* proxyRequestFunction: async (encodedCall) => {
|
|
88
|
+
* // Implement your proxy logic here
|
|
89
|
+
* },
|
|
90
|
+
* }
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings, ClientOperationSettings>) => Promise<void>;
|
|
95
|
+
//# sourceMappingURL=payment-links.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-links.client.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/client/payment-links.client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CA6BjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,IAAI,CAMf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-links.client.test.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/client/payment-links.client.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The paymentLinks namespace contains all the functions related to
|
|
3
|
-
* operations such as starting the payment link creation flow.
|
|
2
|
+
* The paymentLinks namespace contains all the client-side functions related to payment link
|
|
3
|
+
* operations such as starting the payment link creation flow.
|
|
4
|
+
*
|
|
5
|
+
* **Client-side only** - This namespace uses proxy-based authentication
|
|
6
|
+
* (`proxyEndpointDescriptor` (preferred), or `proxyRequestFunction`).
|
|
7
|
+
*
|
|
8
|
+
* For server-side operations using access token, import from
|
|
9
|
+
* `'@qonto/embed-sdk/server/payment-links'`.
|
|
10
|
+
*
|
|
11
|
+
* It can be accessed like this:
|
|
4
12
|
* ```ts
|
|
5
|
-
* import { paymentLinks } from '@qonto/embed-sdk/
|
|
6
|
-
*
|
|
7
|
-
*
|
|
13
|
+
* import { paymentLinks } from '@qonto/embed-sdk/payment-links';
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Then, the paymentLinks object contains the functions to perform payment link operations:
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Preferred: Using proxyEndpointDescriptor
|
|
19
|
+
* const url = await paymentLinks.getPaymentLinkCreationFlowUrl({
|
|
20
|
+
* paymentLinkSettings: {
|
|
21
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
22
|
+
* callbackUrl: 'https://example.com/callback',
|
|
23
|
+
* },
|
|
24
|
+
* operationSettings: { proxyEndpointDescriptor }
|
|
25
|
+
* });
|
|
8
26
|
* ```
|
|
9
27
|
*/
|
|
10
28
|
export declare const paymentLinks: {
|
|
11
|
-
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("
|
|
29
|
+
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<string>;
|
|
30
|
+
redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<void>;
|
|
12
31
|
};
|
|
32
|
+
export type * from './shared/payment-links.types';
|
|
33
|
+
export type { ClientOperationSettings, ClientOperationSettingsWithUI, } from '@validation/operation-settings-validation';
|
|
13
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/payment-links/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/payment-links/index.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAGF,mBAAmB,8BAA8B,CAAC;AAClD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paymentLinks namespace contains all the server-side functions related to payment link operations.
|
|
3
|
+
* This version uses access token-based authentication and is designed for server environments.
|
|
4
|
+
*
|
|
5
|
+
* **Server-side only** - This namespace uses access token-based authentication.
|
|
6
|
+
*
|
|
7
|
+
* For client-side operations using proxy functions, import from `'@qonto/embed-sdk/payment-links'`.
|
|
8
|
+
*
|
|
9
|
+
* **Note:** The `redirectToPaymentLinkCreationFlow` function is not available in the server-side
|
|
10
|
+
* implementation as it requires browser-specific APIs (`window.location.href`).
|
|
11
|
+
*
|
|
12
|
+
* It can be accessed like this:
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { paymentLinks } from '@qonto/embed-sdk/server/payment-links';
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Then, the paymentLinks object contains the functions to perform payment link operations:
|
|
18
|
+
* ```ts
|
|
19
|
+
* const url = await paymentLinks.getPaymentLinkCreationFlowUrl({
|
|
20
|
+
* paymentLinkSettings: {
|
|
21
|
+
* items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
|
|
22
|
+
* callbackUrl: 'https://example.com/callback',
|
|
23
|
+
* },
|
|
24
|
+
* operationSettings: {
|
|
25
|
+
* accessToken: 'your-access-token',
|
|
26
|
+
* }
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const paymentLinks: {
|
|
31
|
+
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ServerOperationSettings>) => Promise<string>;
|
|
32
|
+
};
|
|
33
|
+
export type * from './shared/payment-links.types';
|
|
34
|
+
export type { ServerOperationSettings } from '@validation/operation-settings-validation';
|
|
35
|
+
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../src/payment-links/index.server.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY;;CAExB,CAAC;AAGF,mBAAmB,8BAA8B,CAAC;AAClD,YAAY,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ServerOperationSettings } from '@validation/operation-settings-validation';
|
|
2
|
+
import type { CreatePaymentLinkSettings, PaymentLinkParams } from '../shared/payment-links.types';
|
|
3
|
+
/**
|
|
4
|
+
* Generates the URL for initiating a payment link creation flow with specified items.
|
|
5
|
+
*
|
|
6
|
+
* **Server-side implementation** - Uses access token-based authentication.
|
|
7
|
+
* This implementation is designed for server environments where access tokens can be safely managed.
|
|
8
|
+
*
|
|
9
|
+
* For client-side operations using proxy functions, import from `'@qonto/embed-sdk/payment-links'`.
|
|
10
|
+
*
|
|
11
|
+
* @param params - An object containing:
|
|
12
|
+
* - `paymentLinkSettings`: An object containing:
|
|
13
|
+
* - `items`: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
|
|
14
|
+
* - `callbackUrl`: Required callback URL to redirect to after payment link creation.
|
|
15
|
+
* - `operationSettings`: An object with operation-level settings such as
|
|
16
|
+
* `accessToken`, `stagingToken`, and other optional parameters.
|
|
17
|
+
* See {@link ServerOperationSettings}.
|
|
18
|
+
* @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.
|
|
19
|
+
* @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
|
|
20
|
+
* @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import { paymentLinks } from '@qonto/embed-sdk/server/payment-links';
|
|
25
|
+
*
|
|
26
|
+
* const url = await paymentLinks.getPaymentLinkCreationFlowUrl({
|
|
27
|
+
* paymentLinkSettings: {
|
|
28
|
+
* items: [
|
|
29
|
+
* {
|
|
30
|
+
* id: '1',
|
|
31
|
+
* title: 'Item 1',
|
|
32
|
+
* type: 'service',
|
|
33
|
+
* quantity: 1,
|
|
34
|
+
* measureUnit: 'unit',
|
|
35
|
+
* unitPrice: { currency: 'EUR', value: '10' },
|
|
36
|
+
* vatRate: '20'
|
|
37
|
+
* }
|
|
38
|
+
* ],
|
|
39
|
+
* callbackUrl: 'https://example.com/callback',
|
|
40
|
+
* },
|
|
41
|
+
* operationSettings: {
|
|
42
|
+
* accessToken: 'your-access-token',
|
|
43
|
+
* }
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @see For client-side implementation using proxyEndpointDescriptor, import from `@qonto/embed-sdk/payment-links`
|
|
48
|
+
*/
|
|
49
|
+
export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings, ServerOperationSettings>) => Promise<string>;
|
|
50
|
+
//# sourceMappingURL=payment-links.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-links.server.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/server/payment-links.server.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CAsBjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-links.server.test.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/server/payment-links.server.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.validation.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/shared/currency.validation.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,SAMhD,CAAC"}
|