@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,72 +0,0 @@
|
|
|
1
|
-
import { type Card, type CardDataObject, type CardOrderSettings, type UnlockCardSettings } from '@cards/cards.types';
|
|
2
|
-
import type { CardParams } from './cards';
|
|
3
|
-
export declare function serializeOrderCardPayload(payload: CardOrderSettings): {
|
|
4
|
-
actionId: string;
|
|
5
|
-
actionData: {
|
|
6
|
-
idempotencyKey: string;
|
|
7
|
-
body: {
|
|
8
|
-
card: {
|
|
9
|
-
payment_monthly_limit: number;
|
|
10
|
-
payment_daily_limit: number | undefined;
|
|
11
|
-
payment_daily_limit_option: boolean | undefined;
|
|
12
|
-
payment_transaction_limit: number | undefined;
|
|
13
|
-
payment_transaction_limit_option: boolean | undefined;
|
|
14
|
-
active_days: number[];
|
|
15
|
-
holder_id: string;
|
|
16
|
-
organization_id: string;
|
|
17
|
-
bank_account_id: string;
|
|
18
|
-
categories: string[];
|
|
19
|
-
card_level: import("@cards/cards.types").VirtualCardLevel;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
} | {
|
|
24
|
-
actionId: string;
|
|
25
|
-
actionData: {
|
|
26
|
-
idempotencyKey: string;
|
|
27
|
-
body: {
|
|
28
|
-
card: {
|
|
29
|
-
address?: {
|
|
30
|
-
contact_name: string | undefined;
|
|
31
|
-
first_line: string | undefined;
|
|
32
|
-
second_line: string | undefined;
|
|
33
|
-
third_line: string | undefined;
|
|
34
|
-
zipcode: string | undefined;
|
|
35
|
-
city: string | undefined;
|
|
36
|
-
country: string | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
ship_to_business_address: boolean;
|
|
39
|
-
atm_option: boolean | undefined;
|
|
40
|
-
nfc_option: boolean | undefined;
|
|
41
|
-
foreign_option: boolean | undefined;
|
|
42
|
-
online_option: boolean | undefined;
|
|
43
|
-
atm_daily_limit: number | undefined;
|
|
44
|
-
atm_monthly_limit: number | undefined;
|
|
45
|
-
type_of_print?: ("embossed" | "print" | null) | undefined;
|
|
46
|
-
payment_monthly_limit: number;
|
|
47
|
-
payment_daily_limit: number | undefined;
|
|
48
|
-
payment_daily_limit_option: boolean | undefined;
|
|
49
|
-
payment_transaction_limit: number | undefined;
|
|
50
|
-
payment_transaction_limit_option: boolean | undefined;
|
|
51
|
-
active_days: number[];
|
|
52
|
-
holder_id: string;
|
|
53
|
-
organization_id: string;
|
|
54
|
-
bank_account_id: string;
|
|
55
|
-
categories: string[];
|
|
56
|
-
card_level: import("@cards/cards.types").PhysicalCardLevel;
|
|
57
|
-
card_design: ("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") | undefined;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export declare function serializeCard(cardDataObject: CardDataObject): Card;
|
|
63
|
-
export declare function filterValidCategories(categories: string[] | undefined): string[];
|
|
64
|
-
export declare function serializeUnlockCardPayload(payload: CardParams<UnlockCardSettings>): {
|
|
65
|
-
actionId: string;
|
|
66
|
-
actionData: {
|
|
67
|
-
body: {
|
|
68
|
-
cardId: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=cards.serializer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cards.serializer.d.ts","sourceRoot":"","sources":["../../../src/cards/cards.serializer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,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,CACxC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC;;;;;;;EAUxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cards.test.d.ts","sourceRoot":"","sources":["../../../src/cards/cards.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cards.types.d.ts","sourceRoot":"","sources":["../../../src/cards/cards.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,MAAM,WAAW;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,mBAAmB,EAGxB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAC;AA2B5B,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,mCAWhE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,QAelE;AA2ND,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,58 +0,0 @@
|
|
|
1
|
-
import type { CreatePaymentLinkSettings, PaymentLinkParams } from './payment-links.types';
|
|
2
|
-
/**
|
|
3
|
-
* Generates the URL for initiating a payment link creation flow with specified items.
|
|
4
|
-
*
|
|
5
|
-
* @param params - An object containing:
|
|
6
|
-
* - paymentLinkSettings: An object containing:
|
|
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.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const url = await getPaymentLinkCreationFlowUrl({
|
|
14
|
-
* paymentLinkSettings: {
|
|
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
|
-
* },
|
|
21
|
-
* }
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
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.
|
|
25
|
-
*
|
|
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).
|
|
28
|
-
*/
|
|
29
|
-
export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<string>;
|
|
30
|
-
/**
|
|
31
|
-
* Redirects to the payment link creation flow with specified items.
|
|
32
|
-
*
|
|
33
|
-
* @param params - An object containing:
|
|
34
|
-
* - paymentLinkSettings: An object containing:
|
|
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.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* await redirectToPaymentLinkCreationFlow({
|
|
42
|
-
* paymentLinkSettings: {
|
|
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
|
-
* },
|
|
49
|
-
* }
|
|
50
|
-
* });
|
|
51
|
-
* ```
|
|
52
|
-
* @returns This function redirects the browser to the payment link creation flow. Due to the redirect, the returned promise will not resolve.
|
|
53
|
-
*
|
|
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).
|
|
56
|
-
*/
|
|
57
|
-
export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<void>;
|
|
58
|
-
//# sourceMappingURL=payment-links.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAM/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 +0,0 @@
|
|
|
1
|
-
declare const paymentLinks: {
|
|
2
|
-
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => Promise<string>;
|
|
3
|
-
};
|
|
4
|
-
export { paymentLinks };
|
|
5
|
-
//# sourceMappingURL=payment-links.public-api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.public-api.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.public-api.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.test.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"currency.validation.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/currency.validation.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,SAMhD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.validate.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/payment-links.validate.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,IAAI,EAEV,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unit.validation.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/unit.validation.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAMxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{callProxyFunction as t}from"../common/common.utils.js";import{validateOperationSettingsParams as a}from"../validation/operation-settings-validation.js";import{prepareAuthLinkRequest as i,requestAuthLink as n}from"./shared/auth-links.api.js";import{serializeAuthLink as r}from"./shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as s}from"./shared/auth-links.validate.js";async function c({requestSettings:c,operationSettings:e}){s(c);const{proxyRequestFunction:l,proxyEndpointDescriptor:m,stagingToken:p}=a(e||{});if(l||m){const o=i({stagingToken:p,action:c.action,callbackUrl:c.callbackUrl}),a=await t({proxyFunction:l,proxyEndpointDescriptor:m,networkCallDescriptor:o});return r(a.body)}{const t=e?.accessToken||o(),a=await n({accessToken:t,stagingToken:p,action:c.action,callbackUrl:c.callbackUrl});return r(a)}}export{c as request};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{prepareAuthLinkRequest as n}from"../auth-links/shared/auth-links.api.js";import{AUTH_LINK_ACTIONS as s}from"../common/constants.js";import{makeNetworkCall as e}from"../common/network/network.js";function o({membershipId:n,accessToken:s,stagingToken:e}){return{path:n?`/v2/cards?holder_ids[]=${n}`:"/v2/cards",options:{method:"GET",headers:{accessToken:s,stagingToken:e}}}}async function a({membershipId:n,accessToken:s,stagingToken:a}){const t=o({membershipId:n,accessToken:s,stagingToken:a}),{cards:c}=await e(t);return c}function t({cardId:n,accessToken:s,stagingToken:e}){return{path:`/v2/cards?ids[]=${n}`,options:{method:"GET",headers:{accessToken:s,stagingToken:e}}}}async function c({cardId:n,accessToken:s,stagingToken:o}){const a=t({cardId:n,accessToken:s,stagingToken:o}),{cards:c}=await e(a);return c[0]}function r({accessToken:e,stagingToken:o}){return n({accessToken:e,stagingToken:o,action:s.CARD_DISPLAY})}async function i(n){const s=r(n),{embed_auth_link:o}=await e(s);return o}export{c as getCard,i as getCardIframeURL,a as getCards,t as prepareGetCardCall,r as prepareGetCardIframeUrl,o as prepareGetCardsCall};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gatherQontoEmbedCssVariables as a}from"../customization/customization.js";import{CUSTOM_PROP_PREFIX as e}from"../customization/customization.constants.js";import{createIframe as o}from"../iframe/iframe-manager.js";function t(o,t){const n=new URL(o);n.searchParams.set("cardId",t.cardId),"boolean"==typeof t.allowPinReveal&&n.searchParams.set("canSeePin",t.allowPinReveal.toString()),"boolean"==typeof t.allowBlocking&&n.searchParams.set("canBlock",t.allowBlocking.toString()),!0===t.debugMode&&n.searchParams.set("debug",t.debugMode.toString());const r=a(e);return Object.keys(r).length>0&&n.searchParams.set("customization",JSON.stringify(r)),n.toString()}async function n({decorationParams:a,operationSettings:e,cardIframeUrl:n}){const{cardId:r,allowPinReveal:i,allowBlocking:s}=a,{uiParentElementId:l,debugMode:c}=e,m=t(n,{cardId:r,allowPinReveal:i,allowBlocking:s,debugMode:c}),d=await o({iframeUrl:m,parentElementId:l});return{destroyEmbedUI:()=>{d.destroy()}}}export{n as createEmbedUI,t as getPopulatedIframeURL};
|
package/dist/src/cards/cards.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createEmbedUI as t}from"./cards.helper.js";import{serializeUnlockCardPayload as e,serializeCard as r,serializeOrderCardPayload as n}from"./cards.serializer.js";import{validateDisplayCardParams as o,validateUnlockCardParams as a,validateOrderCardParams as i,validateGetCardParams as s}from"./cards.validate.js";import{tracker as c}from"../common/analytics/analytics-tracker.js";import{authManager as d}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as m}from"../common/auth/auth.validate.js";import{callProxyFunction as p}from"../common/common.utils.js";import{validateOperationSettingsParams as g}from"../validation/operation-settings-validation.js";import{prepareGetCardIframeUrl as u,getCardIframeURL as l,prepareGetCardCall as y,getCard as f,prepareGetCardsCall as k,getCards as T}from"./cards.api.js";import"./cards.types.js";import{InvalidParametersError as I}from"../errors/InvalidParametersError.js";import{buildIframeUrl as S,createIframe as h}from"../iframe/iframe-manager.js";async function b(t){try{const e=t?.cardSettings?.membershipId;if(e&&"string"!=typeof e)throw new I("membershipId must be a string");const{proxyRequestFunction:n,proxyEndpointDescriptor:o,stagingToken:a}=g(t?.operationSettings||{});let i;if(n||o){const t=k({membershipId:e,stagingToken:a});i=(await p({proxyFunction:n,proxyEndpointDescriptor:o,networkCallDescriptor:t})).body.cards.map((t=>r(t)))}else{const n=t?.operationSettings?.accessToken||m();i=(await T({membershipId:e,accessToken:n,stagingToken:a})).map((t=>r(t)))}return c.cardsList(),i}catch(t){return Promise.reject(t)}}async function j({cardSettings:t,operationSettings:e}){try{s(t);const n=t.cardId,{proxyRequestFunction:o,proxyEndpointDescriptor:a,stagingToken:i}=g(e||{});if(o||a){const t=y({cardId:n,stagingToken:i}),e=(await p({proxyFunction:o,proxyEndpointDescriptor:a,networkCallDescriptor:t})).body.cards;if(Array.isArray(e)&&e.length>0)return r(e[0]);throw new I("Unable to retrieve card data")}{const t=e?.accessToken||m(),o=await f({cardId:n,accessToken:t,stagingToken:i});return r(o)}}catch(t){return Promise.reject(t)}}async function w(t){try{const e=m(),{uiParentElementId:o,debugMode:a}=g(t.operationSettings,{requiresUI:!0});i(t.cardSettings);const s="virtual"===t.cardSettings.cardLevel,p=S({accessToken:e,stagingToken:d.getStagingToken()||void 0,debugMode:a}),u=await h({iframeUrl:p,parentElementId:o}),l=n(t.cardSettings),y=await u.postMessage(l);return u.destroy(),s?c.cardsOrderVirtual():c.cardsOrderPhysical(),r(y)}catch(t){return Promise.reject(t)}}async function P(t){try{const n=m(),{uiParentElementId:o,debugMode:i}=g(t.operationSettings,{requiresUI:!0});a(t.cardSettings);const s=S({accessToken:n,stagingToken:d.getStagingToken()||void 0,debugMode:i}),c=await h({iframeUrl:s,parentElementId:o}),p=e(t),u=await c.postMessage(p);return c.destroy(),r(u)}catch(t){return Promise.reject(t)}}async function E(e){try{const{uiParentElementId:r,accessToken:n,stagingToken:a,debugMode:i,mfaPreference:s,proxyRequestFunction:c,proxyEndpointDescriptor:d}=g(e.operationSettings,{requiresUI:!0});if(o(e.cardSettings),c||d){const n=u({stagingToken:a}),o=(await p({proxyFunction:c,proxyEndpointDescriptor:d,networkCallDescriptor:n})).body.embed_auth_link;return t({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:i},cardIframeUrl:o.url})}{const o=n||m(),c=await l({...e.cardSettings,accessToken:o,stagingToken:a});return t({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:i,mfaPreference:s},cardIframeUrl:c.url})}}catch(t){return Promise.reject(t)}}export{E as displayCard,j as getCard,b as getCards,w as orderCard,P as unlockCard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{displayCard as r,unlockCard as d,orderCard as a,getCard as o,getCards as s}from"./cards.js";const t={getCards:s,getCard:o,orderCard:a,unlockCard:d,displayCard:r};export{t as cards};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{CardCategories as t}from"./cards.types.js";import{ACTIONS as i}from"../common/constants.js";import a from"../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";function n(t){return"virtual"===t.cardLevel?function(t){const n=o(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:a(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:n,card_level:t.cardLevel}}}}}(t):function(t){const n=o(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:a(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:n,card_level:t.cardLevel,card_design:t.cardDesign,..."plus"===t.cardLevel&&{type_of_print:t.typeOfPrint},ship_to_business_address:t.shipToBusiness,atm_option:t.hasAtmOption,nfc_option:t.hasNfcOption,foreign_option:t.hasForeignPaymentOption,online_option:t.hasOnlinePaymentOption,atm_daily_limit:t.atmDailyLimit,atm_monthly_limit:t.atmMonthlyLimit,...!t.shipToBusiness&&{address:{contact_name:t.address?.contactName,first_line:t.address?.firstLine,second_line:t.address?.secondLine,third_line:t.address?.thirdLine,zipcode:t.address?.zipCode,city:t.address?.city,country:t.address?.country}}}}}}}(t)}function e(t){return{id:t.id,nickname:t.nickname,embossedName:t.embossed_name,status:t.status,maskPan:t.mask_pan,expMonth:parseInt(t.exp_month,10),expYear:parseInt(t.exp_year,10),lastActivityAt:new Date(t.last_activity_at),lastDigits:t.last_digits,shipToBusiness:t.ship_to_business,atmOption:t.atm_option,atmDailyLimitOption:t.atm_daily_limit_option,nfcOption:t.nfc_option,onlineOption:t.online_option,foreignOption:t.foreign_option,atmMonthlyLimit:t.atm_monthly_limit,atmMonthlySpent:t.atm_monthly_spent,atmDailyLimit:t.atm_daily_limit,atmDailySpent:t.atm_daily_spent,paymentMonthlyLimit:t.payment_monthly_limit,paymentMonthlySpent:t.payment_monthly_spent,paymentDailyLimit:t.payment_daily_limit,paymentDailySpent:t.payment_daily_spent,paymentDailyLimitOption:t.payment_daily_limit_option,paymentTransactionLimit:t.payment_transaction_limit,paymentTransactionLimitOption:t.payment_transaction_limit_option,activeDays:t.active_days,holderId:t.holder_id,bankAccountId:t.bank_account_id,organizationId:t.organization_id,updatedAt:new Date(t.updated_at),createdAt:new Date(t.created_at),shippedAt:new Date(t.shipped_at),cardType:t.card_type,cardLevel:t.card_level,paymentLifespanLimit:t.payment_lifespan_limit,paymentLifespanSpent:t.payment_lifespan_spent,preExpiresAt:new Date(t.pre_expires_at),categories:t.categories,renewed:t.renewed,renewal:t.renewal,...t.parent_card_summary&&{parentCardSummary:{id:t.parent_card_summary.id,lastDigits:t.parent_card_summary.last_digits}},hadOperation:t.had_operation,hadPinOperation:t.had_pin_operation,cardDesign:t.card_design,typeOfPrint:t.type_of_print,upsold:t.upsold,upsell:t.upsell,discardOn:new Date(t.discard_on),reordered:t.reordered}}function o(i){const a=Object.values(t);return(i||[]).filter((t=>a.includes(t)))}function s(t){return{actionId:i.CARD_UNLOCK,actionData:{body:{cardId:t.cardSettings.cardId}}}}export{o as filterValidCategories,e as serializeCard,n as serializeOrderCardPayload,s as serializeUnlockCardPayload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{PhysicalCardLevel as i}from"./cards.types.js";import{validateExpectedStringValues as t,validateExpectedBooleanValues as n,validatePresenceOfRequiredParams as e,validateExpectedNumericValues as a}from"../validation/input-param-validation.js";import{InvalidParametersError as r}from"../errors/InvalidParametersError.js";const o=[{name:"organizationId"},{name:"membershipId"},{name:"bankAccountId"},{name:"monthlyLimit"},{name:"cardLevel"}],s=[...o,{name:"atmDailyLimit",requiredIfPresent:"hasAtmDailyLimit"},{name:"hasAtmDailyLimit",requiredIfPresent:"hasAtmOption"},{name:"atmMonthlyLimit",requiredIfPresent:"hasAtmOption"},{name:"shipToBusiness"},{name:"cardLevel"}];function c(c){if(!c)throw new r("cardSettings parameter is required for the called function");return"virtual"===c.cardLevel?function(i){return e(i,o),function(i){const{membershipId:e,organizationId:o,bankAccountId:s,hasDailyLimit:c,hasTransactionLimit:m,monthlyLimit:u,dailyLimit:h,transactionLimit:f,activeDays:y,categories:p,cardLevel:L}=i,w=function(i){return"virtual"!==i?['cardLevel must be "virtual"']:[]}(L),g=t({membershipId:e,organizationId:o,bankAccountId:s}),I=n({hasDailyLimit:c,hasTransactionLimit:m}),v=a({monthlyLimit:u,dailyLimit:h,transactionLimit:f}),b=d(y),A=l(p),D=[...w,...g,...I,...v,...b,...A];if(D.length>0)throw new r(D)}(i),i}(c):function(o){e(o,s),function(e){const{membershipId:o,organizationId:s,bankAccountId:c,hasDailyLimit:m,hasTransactionLimit:u,monthlyLimit:h,dailyLimit:f,transactionLimit:y,activeDays:p,categories:L,cardLevel:w,hasNfcOption:g,hasForeignPaymentOption:I,hasOnlinePaymentOption:v,shipToBusiness:b,hasAtmOption:A,hasAtmDailyLimit:D,atmDailyLimit:O,atmMonthlyLimit:P,address:q,cardDesign:k,typeOfPrint:z}=e,T=function(t){return Object.values(i).includes(t)?[]:['cardLevel must be one of "standard", "plus", "metal"']}(w),B=function(i){const t=null!=i&&"string"!=typeof i,n=!["print","embossed",void 0,null].includes(i);return t||n?['typeOfPrint must be one of "print", "embossed" or null']:[]}(z),N=t({membershipId:o,organizationId:s,bankAccountId:c}),j=n({hasDailyLimit:m,hasTransactionLimit:u,hasAtmOption:A,hasNfcOption:g,hasForeignPaymentOption:I,hasOnlinePaymentOption:v,hasAtmDailyLimit:D,shipToBusiness:b}),S=a({monthlyLimit:h,dailyLimit:f,transactionLimit:y,atmDailyLimit:O,atmMonthlyLimit:P}),M=d(p),R=l(L),C=function(i){return["undefined","string"].includes(typeof i)?[]:["cardDesign must be a string"]}(k),F=function(i,t){if(t)return[];return!i||i.contactName&&i.firstLine&&i.zipCode&&i.city&&i.country?[]:["address must contain at least contactName, firstLine, zipCode, city and country properties"]}(q,b),x=[...T,...N,...j,...S,...M,...R,...B,...C,...F];if(x.length>0)throw new r(x)}(o)}(c)}function m(i){if(!i)throw new r("cardSettings parameter is required for the called function");if(!i.cardId)throw new r("cardId is required for the called function");const n=t({cardId:i.cardId});if(n.length>0)throw new r(n)}function d(i){const t=!Array.isArray(i)||!i.every((i=>Number.isInteger(i)&&i>0&&i<8));return void 0!==i&&t?["activeDays must be an array of integers between 1 and 7"]:[]}function l(i){const t=!Array.isArray(i)||i.some((i=>"string"!=typeof i));return void 0!==i&&t?["categories must be an array of strings"]:[]}function u(i){if(!i)throw new r("cardSettings parameter is required for the called function");if(!i.cardId)throw new r("cardId is required for the called function");const e=t({cardId:i.cardId});if(e.length>0)throw new r(e);let a={};void 0!==i.allowPinReveal&&(a={allowPinReveal:i.allowPinReveal}),void 0!==i.allowBlocking&&(a={...a,allowBlocking:i.allowBlocking});const o=n(a);if(o.length>0)throw new r(o);return i}function h(i){if(!i)throw new r("cardSettings parameter is required for the called function");if(!i.cardId)throw new r("cardId parameter is required for the called function");const n=t({cardId:i.cardId});if(n.length>0)throw new r(n);return i}export{u as validateDisplayCardParams,h as validateGetCardParams,c as validateOrderCardParams,m as validateUnlockCardParams};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{request as t}from"../auth-links/auth-links.js";import{AUTH_LINK_ACTIONS as n}from"../common/constants.js";import{validateItems as i,validatePaymentLinkCreationFlowParams as o}from"./validation/payment-links.validate.js";const s=async({paymentLinkSettings:s,operationSettings:a})=>{const{items:r}=s;i(r);const e=o(s),m=await t({requestSettings:{action:n.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 +0,0 @@
|
|
|
1
|
-
import{getPaymentLinkCreationFlowUrl as t}from"./payment-links.js";const n={getPaymentLinkCreationFlowUrl:t};export{n as paymentLinks};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|