@qonto/embed-sdk 0.44.0 → 0.46.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/index.umd.js +56 -56
- package/dist/mocks/handlers.d.ts +3 -0
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/organizations/index.d.ts +1 -0
- package/dist/organizations/index.d.ts.map +1 -1
- package/dist/organizations/organizations.api.d.ts +14 -2
- package/dist/organizations/organizations.api.d.ts.map +1 -1
- package/dist/organizations/organizations.d.ts +12 -1
- package/dist/organizations/organizations.d.ts.map +1 -1
- package/dist/organizations/organizations.public-api.d.ts +2 -2
- package/dist/organizations/organizations.public-api.d.ts.map +1 -1
- package/dist/organizations/organizations.serializer.d.ts +2 -1
- package/dist/organizations/organizations.serializer.d.ts.map +1 -1
- package/dist/organizations/organizations.types.d.ts +40 -10
- package/dist/organizations/organizations.types.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.d.ts +66 -4
- package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.types.d.ts +12 -1
- package/dist/sepa-transfers/sepa-transfers.types.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.utils.d.ts +2 -2
- package/dist/sepa-transfers/sepa-transfers.utils.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.validate.d.ts +2 -1
- package/dist/sepa-transfers/sepa-transfers.validate.d.ts.map +1 -1
- package/dist/src/organizations/organizations.api.js +1 -1
- package/dist/src/organizations/organizations.js +1 -1
- package/dist/src/organizations/organizations.public-api.js +1 -1
- package/dist/src/organizations/organizations.serializer.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.validate.js +1 -1
- package/dist/src/ui/ui-elements/transfer-list/create-transfer-list-element.js +1 -0
- package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.js +3 -3
- package/dist/src/ui/ui-elements/transfer-list/transfer-list.utils.js +1 -0
- package/dist/src/ui/ui-elements.js +1 -1
- package/dist/ui/ui-elements/localize/configure-localization.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locale-codes.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/de.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/es.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/fr.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/it.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/nl.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/pt.d.ts.map +1 -0
- package/dist/ui/ui-elements/{transfer-list.d.ts → transfer-list/create-transfer-list-element.d.ts} +2 -1
- package/dist/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts.map +1 -0
- package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.d.ts +2 -2
- package/dist/ui/ui-elements/transfer-list/transfer-list.d.ts.map +1 -0
- package/dist/ui/ui-elements/transfer-list/transfer-list.events.d.ts.map +1 -0
- package/dist/ui/ui-elements/transfer-list/transfer-list.styles.d.ts.map +1 -0
- package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.utils.d.ts +2 -2
- package/dist/ui/ui-elements/transfer-list/transfer-list.utils.d.ts.map +1 -0
- package/dist/ui/ui-elements.d.ts +0 -1
- package/dist/ui/ui-elements.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src/ui/customizable-components/transfer-list/transfer-list.utils.js +0 -1
- package/dist/src/ui/ui-elements/transfer-list.js +0 -1
- package/dist/ui/customizable-components/index.d.ts +0 -2
- package/dist/ui/customizable-components/index.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/configure-localization.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locale-codes.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/de.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/es.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/fr.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/it.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/nl.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/pt.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.events.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.styles.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.utils.d.ts.map +0 -1
- package/dist/ui/ui-elements/transfer-list.d.ts.map +0 -1
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/configure-localization.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locale-codes.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/de.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/es.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/fr.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/it.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/nl.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/pt.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.events.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.styles.js +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/configure-localization.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locale-codes.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/de.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/es.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/fr.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/it.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/nl.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/pt.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.events.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.styles.d.ts +0 -0
package/dist/mocks/handlers.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ import type { SepaTransferDataObject } from '@sepa-transfers/sepa-transfers.type
|
|
|
3
3
|
import type { BulkTransferDataObject, NewBulkTransfer, BulkTransferSettings, NewBulkTransferWithBeneficiary } from '@sepa-transfers/bulk-transfers/bulk-transfers.types';
|
|
4
4
|
import type { CardDataObject } from '@cards/cards.types';
|
|
5
5
|
import type { TransactionDataObject } from '@transactions/transactions.types';
|
|
6
|
+
import type { BankAccountDataObject, OrganizationDataObject } from '@organizations/organizations.types';
|
|
6
7
|
export declare const INVALID_ACCESS_TOKEN = "INVALID_ACCESS_TOKEN";
|
|
8
|
+
export declare const mockedBankAccountsList: BankAccountDataObject[];
|
|
9
|
+
export declare const mockedOrganization: OrganizationDataObject;
|
|
7
10
|
export declare const singleBeneficiary: BeneficiaryDataObject;
|
|
8
11
|
export declare const newBeneficiaryDbFields: {
|
|
9
12
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/mocks/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EACV,sBAAsB,EAGtB,eAAe,EACf,oBAAoB,EACpB,8BAA8B,EAC/B,MAAM,qDAAqD,C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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,WAAW,6BA8jBvB,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
9
|
export declare const organizations: {
|
|
10
|
+
getOrganization: (operationSettings: import("../validation/operation-settings-validation").OperationSettings) => Promise<import("./organizations.types").Organization>;
|
|
10
11
|
getBankAccounts: (operationSettings: import("../validation/operation-settings-validation").OperationSettings) => Promise<import("./organizations.types").BankAccount[]>;
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/organizations/index.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/organizations/index.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;CAAuC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type NetworkCallDescriptor } from '@common/network/network';
|
|
2
|
-
import type { OrganizationDataObject } from './organizations.types';
|
|
2
|
+
import type { BankAccountDataObject, OrganizationDataObject } from './organizations.types';
|
|
3
3
|
export declare const prepareGetOrganization: ({ accessToken, stagingToken, }: {
|
|
4
4
|
accessToken?: string;
|
|
5
5
|
stagingToken?: string;
|
|
@@ -7,5 +7,17 @@ export declare const prepareGetOrganization: ({ accessToken, stagingToken, }: {
|
|
|
7
7
|
export declare const getOrganization: ({ accessToken, stagingToken, }: {
|
|
8
8
|
accessToken: string;
|
|
9
9
|
stagingToken?: string;
|
|
10
|
-
}) => Promise<
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
organization: OrganizationDataObject;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const prepareGetBankAccounts: ({ accessToken, stagingToken, }: {
|
|
14
|
+
accessToken?: string;
|
|
15
|
+
stagingToken?: string;
|
|
16
|
+
}) => NetworkCallDescriptor;
|
|
17
|
+
export declare const getBankAccounts: ({ accessToken, stagingToken, }: {
|
|
18
|
+
accessToken: string;
|
|
19
|
+
stagingToken?: string;
|
|
20
|
+
}) => Promise<{
|
|
21
|
+
bank_accounts: BankAccountDataObject[];
|
|
22
|
+
}>;
|
|
11
23
|
//# sourceMappingURL=organizations.api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"organizations.api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAK/B,eAAO,MAAM,sBAAsB,GAAI,gCAGpC;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,qBAYH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,gCAGnC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,OAAO,CAAC;IAAE,YAAY,EAAE,sBAAsB,CAAA;CAAE,CASnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,gCAGpC;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,qBAYH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,gCAGnC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,OAAO,CAAC;IAAE,aAAa,EAAE,qBAAqB,EAAE,CAAA;CAAE,CASrD,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import type { BankAccount } from './organizations.types';
|
|
1
|
+
import type { BankAccount, Organization } from './organizations.types';
|
|
2
2
|
import { type OperationSettings } from '@validation/operation-settings-validation';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the organization information.
|
|
5
|
+
*
|
|
6
|
+
* @param operationSettings - An object with operation-level settings such as
|
|
7
|
+
* `accessToken`, `stagingToken`, `proxyRequestFunction`, and other optional
|
|
8
|
+
* parameters. See {@link OperationSettings} for more details.
|
|
9
|
+
* @returns A promise that resolves to the organization the current user belongs
|
|
10
|
+
* to.
|
|
11
|
+
* @throws `EmbedApiError` If the API request fails or returns an error.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getOrganization: (operationSettings: OperationSettings) => Promise<Organization>;
|
|
3
14
|
/**
|
|
4
15
|
* Retrieves the bank accounts for the organization.
|
|
5
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.ts"],"names":[],"mappings":"
|
|
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;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,CAC5B,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC,YAAY,CAyBxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,CAC5B,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC,WAAW,EAAE,CAuBzB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const organizations: {
|
|
1
|
+
export declare const organizations: {
|
|
2
|
+
getOrganization: (operationSettings: import("../validation/operation-settings-validation").OperationSettings) => Promise<import("./organizations.types").Organization>;
|
|
2
3
|
getBankAccounts: (operationSettings: import("../validation/operation-settings-validation").OperationSettings) => Promise<import("./organizations.types").BankAccount[]>;
|
|
3
4
|
};
|
|
4
|
-
export { organizations };
|
|
5
5
|
//# sourceMappingURL=organizations.public-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.public-api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.public-api.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"organizations.public-api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.public-api.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;CAGzB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { BankAccount, BankAccountDataObject } from './organizations.types';
|
|
1
|
+
import type { BankAccount, BankAccountDataObject, Organization, OrganizationDataObject } from './organizations.types';
|
|
2
|
+
export declare const serializeOrganization: (organization: OrganizationDataObject) => Organization;
|
|
2
3
|
export declare const serializeBankAccount: (bankAccount: BankAccountDataObject) => BankAccount;
|
|
3
4
|
//# sourceMappingURL=organizations.serializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.serializer.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.serializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"organizations.serializer.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.serializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,qBAAqB,GAChC,cAAc,sBAAsB,KACnC,YAgBF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,qBAAqB,KACjC,WAgBF,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface BankAccountDataObject {
|
|
2
|
+
id?: string;
|
|
2
3
|
slug: string;
|
|
3
4
|
iban: string;
|
|
4
5
|
bic: string;
|
|
5
6
|
currency: string;
|
|
6
|
-
balance:
|
|
7
|
+
balance: string;
|
|
7
8
|
balance_cents: number;
|
|
8
9
|
authorized_balance: number;
|
|
9
10
|
authorized_balance_cents: number;
|
|
@@ -11,8 +12,12 @@ export type BankAccountDataObject = {
|
|
|
11
12
|
updated_at: Date;
|
|
12
13
|
status: (typeof ACCOUNT_STATUS)[keyof typeof ACCOUNT_STATUS];
|
|
13
14
|
main: boolean;
|
|
14
|
-
}
|
|
15
|
-
export
|
|
15
|
+
}
|
|
16
|
+
export interface BankAccount {
|
|
17
|
+
/**
|
|
18
|
+
* The ID of the bank account is a string that uniquely identifies the bank account.
|
|
19
|
+
*/
|
|
20
|
+
id?: string;
|
|
16
21
|
/**
|
|
17
22
|
* The slug of the bank account is a string that uniquely identifies the bank account.
|
|
18
23
|
*/
|
|
@@ -61,16 +66,41 @@ export type BankAccount = {
|
|
|
61
66
|
* Whether the bank account is the main bank account of the organization.
|
|
62
67
|
*/
|
|
63
68
|
main: boolean;
|
|
64
|
-
}
|
|
69
|
+
}
|
|
65
70
|
export declare const ACCOUNT_STATUS: {
|
|
66
71
|
readonly ACTIVE: "active";
|
|
67
72
|
readonly WAITING: "waiting_for_funds";
|
|
68
73
|
readonly CLOSED: "closed";
|
|
69
74
|
readonly PENDING: "pending";
|
|
70
75
|
};
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
export interface OrganizationDataObject {
|
|
77
|
+
id: string;
|
|
78
|
+
slug: string;
|
|
79
|
+
legal_name: string;
|
|
80
|
+
legal_number: string;
|
|
81
|
+
legal_sector: string;
|
|
82
|
+
legal_registration_date: string;
|
|
83
|
+
legal_address: string;
|
|
84
|
+
legal_form: string;
|
|
85
|
+
legal_country: string;
|
|
86
|
+
legal_share_capital: number;
|
|
87
|
+
locale: string;
|
|
88
|
+
contract_signed_at: string;
|
|
89
|
+
bank_accounts: BankAccountDataObject[];
|
|
90
|
+
}
|
|
91
|
+
export interface Organization {
|
|
92
|
+
id: string;
|
|
93
|
+
slug: string;
|
|
94
|
+
legalName: string;
|
|
95
|
+
legalNumber: string;
|
|
96
|
+
legalSector: string;
|
|
97
|
+
legalRegistrationDate: string;
|
|
98
|
+
legalAddress: string;
|
|
99
|
+
legalForm: string;
|
|
100
|
+
legalCountry: string;
|
|
101
|
+
legalShareCapital: number;
|
|
102
|
+
locale: string;
|
|
103
|
+
contractSignedAt: string;
|
|
104
|
+
bankAccounts: BankAccount[];
|
|
105
|
+
}
|
|
76
106
|
//# sourceMappingURL=organizations.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.types.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.types.ts"],"names":[],"mappings":"AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"organizations.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AW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CancelSepaTransferParams, GetSepaTransfer, GetSepaTransfersResponse, NewSepaTransfer, SepaTransfer, SepaTransferCreationFlowRequest, SepaTransferParams, VopVerificationResult } from './sepa-transfers.types';
|
|
1
|
+
import type { BeneficiaryInformationForVop, CancelSepaTransferParams, GetSepaTransfer, GetSepaTransfersResponse, NewSepaTransfer, SepaTransfer, SepaTransferCreationFlowRequest, SepaTransferParams, VopVerificationResult } from './sepa-transfers.types';
|
|
2
2
|
import type { AuthLinkRequestResult } from '@auth-links/auth-links.types';
|
|
3
3
|
/**
|
|
4
4
|
* Fetches the list of SEPA transfers for the current user.
|
|
@@ -53,9 +53,20 @@ export declare function getSepaTransfer({ sepaTransferSettings, operationSetting
|
|
|
53
53
|
* Once the transfer creation process is completed, the generator will return
|
|
54
54
|
* the created SEPA transfer.
|
|
55
55
|
* @param createTransferParams - An object with the parameters to create the
|
|
56
|
-
* transfer.
|
|
56
|
+
* transfer. When making the call to create the generator, not all the transfer
|
|
57
|
+
* details are required but only the beneficiary related data (beneficiaryId or
|
|
58
|
+
* beneficiary object). The rest of the transfer details can be provided later,
|
|
59
|
+
* after the VoP check is completed, and the caller calls next(). That next()
|
|
60
|
+
* call must include the remaining information if it was not provided at the
|
|
61
|
+
* beginning. This allows the caller to get only beneficiary details to start
|
|
62
|
+
* the process and require the user to give the transfer data after the VoP
|
|
63
|
+
* result.
|
|
64
|
+
* If it was not provided when calling the SDK's `initialize`
|
|
57
65
|
* function, an `operationSettings` object has to be passed too with the
|
|
58
|
-
*
|
|
66
|
+
* authentication information, which should ideally be the `proxyRequestFunction`,
|
|
67
|
+
* or alternatively the `accessToken` (not recommended for security reasons). The
|
|
68
|
+
* `operationSettings` object can have other data, like the `stagingToken`.
|
|
69
|
+
* If the transfer needs to be created
|
|
59
70
|
* for an untrusted beneficiary, the `operationSettings` object must also include
|
|
60
71
|
* the `uiParentElementId` property. This has to specify the ID of the DOM element
|
|
61
72
|
* where the UI for MFA will be displayed. Note that this means that creating
|
|
@@ -80,8 +91,59 @@ export declare function getSepaTransfer({ sepaTransferSettings, operationSetting
|
|
|
80
91
|
* @throws `InvalidRuntimeError` If a transfer for an untrusted beneficiary is
|
|
81
92
|
* attempted to be created in the server. This scenario requires to be performed
|
|
82
93
|
* from a browser.
|
|
94
|
+
* @example Passing the transfer details after the VoP check:
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const transferCreationProcess = sepaTransfers.createSepaTransfer({
|
|
97
|
+
* sepaTransferSettings: {
|
|
98
|
+
* beneficiaryId: 'benef_12345',
|
|
99
|
+
* },
|
|
100
|
+
* operationSettings: {
|
|
101
|
+
* uiParentElementId: 'sepa-transfer-container',
|
|
102
|
+
* },
|
|
103
|
+
* });
|
|
104
|
+
* // First, we get the VoP verification result
|
|
105
|
+
* const vopCheckResult = await transferCreationProcess.next();
|
|
106
|
+
* // Here, you would typically show the result to the user and ask for confirmation
|
|
107
|
+
* // If the user accepts to proceed with the transfer creation
|
|
108
|
+
* const createdTransfer = await transferCreationProcess.next({
|
|
109
|
+
* vopDecision: VOP_DECISIONS.ACCEPT,
|
|
110
|
+
* sepaTransferSettings: {
|
|
111
|
+
* bankAccountId: 'ba_67890',
|
|
112
|
+
* amount: 1500,
|
|
113
|
+
* amountCurrency: 'EUR',
|
|
114
|
+
* reference: 'Invoice 12345',
|
|
115
|
+
* note: 'Payment for services',
|
|
116
|
+
* scheduledDate: new Date(),
|
|
117
|
+
* },
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example Providing all the transfer details at the beginning:
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const transferCreationProcess = sepaTransfers.createSepaTransfer({
|
|
124
|
+
* sepaTransferSettings: {
|
|
125
|
+
* beneficiaryId: 'benef_12345',
|
|
126
|
+
* bankAccountId: 'ba_67890',
|
|
127
|
+
* amount: 1500,
|
|
128
|
+
* amountCurrency: 'EUR',
|
|
129
|
+
* reference: 'Invoice 12345',
|
|
130
|
+
* note: 'Payment for services',
|
|
131
|
+
* scheduledDate: new Date(),
|
|
132
|
+
* },
|
|
133
|
+
* operationSettings: {
|
|
134
|
+
* uiParentElementId: 'sepa-transfer-container',
|
|
135
|
+
* },
|
|
136
|
+
* });
|
|
137
|
+
* // First, we get the VoP verification result
|
|
138
|
+
* const vopCheckResult = await transferCreationProcess.next();
|
|
139
|
+
* // Here, you would typically show the result to the user and ask for confirmation
|
|
140
|
+
* // If the user accepts to proceed with the transfer creation
|
|
141
|
+
* const createdTransfer = await transferCreationProcess.next({
|
|
142
|
+
* vopDecision: VOP_DECISIONS.ACCEPT,
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
83
145
|
*/
|
|
84
|
-
export declare function createSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<NewSepaTransfer>): AsyncGenerator<VopVerificationResult, SepaTransfer | undefined>;
|
|
146
|
+
export declare function createSepaTransfer({ sepaTransferSettings, operationSettings, }: SepaTransferParams<NewSepaTransfer | BeneficiaryInformationForVop>): AsyncGenerator<VopVerificationResult, SepaTransfer | undefined>;
|
|
85
147
|
/**
|
|
86
148
|
* Cancels an existing SEPA transfer identified by the provided `sepaTransferId`.
|
|
87
149
|
* @param cancelSepaTransferParams - An object with the parameters to cancel the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"sepa-transfers.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,+BAA+B,EAE/B,kBAAkB,EAGlB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAgChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GACjD,OAAO,CAAC,wBAAwB,CAAC,CAsDnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CA0B7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CACnB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAAC,qBAAqB,EAAE,YAAY,GAAG,SAAS,CAAC,CAsHlE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyBtF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PaginationSettings, PaginationState } from '@common/api-pagination/api-pagination.types';
|
|
2
|
-
import { TRANSFER_DECLINE_REASONS, TRANSFER_STATUSES, VOP_CHECK_RESULTS } from '@common/constants';
|
|
2
|
+
import { TRANSFER_DECLINE_REASONS, TRANSFER_STATUSES, VOP_CHECK_RESULTS, VOP_DECISIONS } from '@common/constants';
|
|
3
3
|
import type { Beneficiary } from '@beneficiaries/beneficiaries.types';
|
|
4
4
|
import type { OperationSettings } from '@validation/operation-settings-validation';
|
|
5
5
|
import type { AuthLinkRequestSettings } from '@auth-links/auth-links.types';
|
|
@@ -163,6 +163,12 @@ export interface NewSepaTransfer {
|
|
|
163
163
|
*/
|
|
164
164
|
attachmentIds?: string[];
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Used in the first step of creating a sepa transfer, moment in which the whole
|
|
168
|
+
* transfer object is not needed because the first step is the verification of
|
|
169
|
+
* payee, which only needs beneficiary information.
|
|
170
|
+
*/
|
|
171
|
+
export type BeneficiaryInformationForVop = Pick<NewSepaTransfer, 'beneficiaryId' | 'beneficiary'>;
|
|
166
172
|
/**
|
|
167
173
|
* Represents the parameters required to fetch a SEPA transfer.
|
|
168
174
|
* This interface is used to define the structure of the data needed to
|
|
@@ -231,6 +237,7 @@ export interface VopVerificationResult {
|
|
|
231
237
|
matchedName?: string;
|
|
232
238
|
}
|
|
233
239
|
export type VopCheckResult = (typeof VOP_CHECK_RESULTS)[keyof typeof VOP_CHECK_RESULTS];
|
|
240
|
+
export type VopDecision = (typeof VOP_DECISIONS)[keyof typeof VOP_DECISIONS];
|
|
234
241
|
/**
|
|
235
242
|
* Parameters for the `getSepaTransferCreationFlowLink` function. It must be an
|
|
236
243
|
* object with a single property `callbackUrl`, which is a string representing
|
|
@@ -238,5 +245,9 @@ export type VopCheckResult = (typeof VOP_CHECK_RESULTS)[keyof typeof VOP_CHECK_R
|
|
|
238
245
|
* creation flow.
|
|
239
246
|
*/
|
|
240
247
|
export type SepaTransferCreationFlowRequest = Omit<AuthLinkRequestSettings, 'action'>;
|
|
248
|
+
export interface VopDecisionWithExtraData {
|
|
249
|
+
vopDecision: VopDecision;
|
|
250
|
+
sepaTransferSettings?: NewSepaTransfer;
|
|
251
|
+
}
|
|
241
252
|
export {};
|
|
242
253
|
//# sourceMappingURL=sepa-transfers.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.types.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"sepa-transfers.types.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;GAEG;AACH,KAAK,0BAA0B,GAC7B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,cAAc,EAAE,0BAA0B,CAAC;IAC3C;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC;IACpB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS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,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,uBAAuB,EACvB,QAAQ,CACT,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,WAAW,CAAC;IACzB,oBAAoB,CAAC,EAAE,eAAe,CAAC;CACxC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BeneficiaryInformationForVop } from '@sepa-transfers/sepa-transfers.types';
|
|
2
2
|
import type { SepaTransferParams } from '@sepa-transfers/sepa-transfers.types';
|
|
3
3
|
import type { OperationSettings } from '@validation/operation-settings-validation';
|
|
4
4
|
/**
|
|
@@ -9,6 +9,6 @@ import type { OperationSettings } from '@validation/operation-settings-validatio
|
|
|
9
9
|
* details, including the beneficiary or the beneficiary ID.
|
|
10
10
|
* @returns A promise that resolves to a serialized beneficiary object.
|
|
11
11
|
*/
|
|
12
|
-
export declare function findBeneficiary({ sepaTransferSettings, operationSettings, }: SepaTransferParams<
|
|
12
|
+
export declare function findBeneficiary({ sepaTransferSettings, operationSettings, }: SepaTransferParams<BeneficiaryInformationForVop>): Promise<import("..").Beneficiary>;
|
|
13
13
|
export declare function decorateUrlWithExtraParams(url: string, operationSettings: OperationSettings | undefined): string;
|
|
14
14
|
//# sourceMappingURL=sepa-transfers.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.utils.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"sepa-transfers.utils.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAGnF;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,4BAA4B,CAAC,qCAWlD;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,UAoBjD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { NewSepaTransfer, SepaTransferCreationFlowRequest } from '@sepa-transfers/sepa-transfers.types';
|
|
1
|
+
import type { BeneficiaryInformationForVop, NewSepaTransfer, SepaTransferCreationFlowRequest } from '@sepa-transfers/sepa-transfers.types';
|
|
2
2
|
export declare function validateGetSepaTransferParams(sepaTransferId: string | undefined): string;
|
|
3
|
+
export declare function validateTransferBeneficiaryParams(sepaTransferSettings: BeneficiaryInformationForVop | undefined): BeneficiaryInformationForVop;
|
|
3
4
|
export declare function validateCreateSepaTransferParams(sepaTransferSettings: NewSepaTransfer | undefined): NewSepaTransfer;
|
|
4
5
|
export declare function validateCancelSepaTransferParams(sepaTransferId: string | undefined): string;
|
|
5
6
|
export declare function validateGetSepaTransferCreationFlowLinkParams(params?: SepaTransferCreationFlowRequest): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sepa-transfers.validate.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.validate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EACf,+BAA+B,EAChC,MAAM,sCAAsC,CAAC;AAS9C,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,MAAM,CAUR;AAED,wBAAgB,gCAAgC,CAC9C,oBAAoB,EAAE,eAAe,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"sepa-transfers.validate.d.ts","sourceRoot":"","sources":["../../src/sepa-transfers/sepa-transfers.validate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,4BAA4B,EAC5B,eAAe,EACf,+BAA+B,EAChC,MAAM,sCAAsC,CAAC;AAS9C,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,MAAM,CAUR;AAED,wBAAgB,iCAAiC,CAC/C,oBAAoB,EAAE,4BAA4B,GAAG,SAAS,GAC7D,4BAA4B,CA0B9B;AAED,wBAAgB,gCAAgC,CAC9C,oBAAoB,EAAE,eAAe,GAAG,SAAS,mBA4ClD;AAED,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,GAAG,SAAS,UAWnC;AAED,wBAAgB,6CAA6C,CAC3D,MAAM,CAAC,EAAE,+BAA+B,GACvC,MAAM,CAUR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeNetworkCall as n}from"../common/network/network.js";const
|
|
1
|
+
import{makeNetworkCall as n}from"../common/network/network.js";const e=({accessToken:n,stagingToken:e})=>({path:"/v2/organization/",options:{method:"GET",headers:{accessToken:n,stagingToken:e}}}),o=async({accessToken:o,stagingToken:s})=>{const a=e({accessToken:o,stagingToken:s});return await n(a)},s=({accessToken:n,stagingToken:e})=>({path:"/v2/bank_accounts/",options:{method:"GET",headers:{accessToken:n,stagingToken:e}}}),a=async({accessToken:e,stagingToken:o})=>{const a=s({accessToken:e,stagingToken:o});return await n(a)};export{a as getBankAccounts,o as getOrganization,s as prepareGetBankAccounts,e as prepareGetOrganization};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{
|
|
1
|
+
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{prepareGetBankAccounts as n,getBankAccounts as t,prepareGetOrganization as a,getOrganization as s}from"./organizations.api.js";import{serializeBankAccount as i,serializeOrganization as e}from"./organizations.serializer.js";import{validateOperationSettingsParams as r}from"../validation/operation-settings-validation.js";import{encodeNetworkCall as c,decodeNetworkResponse as g}from"../common/network/network.js";const m=async n=>{const{stagingToken:t,proxyRequestFunction:i}=r(n);if(i){const o=a({stagingToken:t}),n=await i(c(o)),{body:s}=g(n);return e(s.organization)}{const a=n.accessToken||o(),i=await s({accessToken:a,stagingToken:t});return e(i.organization)}},k=async a=>{const{stagingToken:s,proxyRequestFunction:e}=r(a);if(e){const o=n({stagingToken:s}),t=await e(c(o)),{body:a}=g(t);return a.bank_accounts.map(i)}{const n=a.accessToken||o();return(await t({accessToken:n,stagingToken:s})).bank_accounts.map(i)}};export{k as getBankAccounts,m as getOrganization};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getBankAccounts as o}from"./organizations.js";const
|
|
1
|
+
import{getBankAccounts as o,getOrganization as t}from"./organizations.js";const n={getOrganization:t,getBankAccounts:o};export{n as organizations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=a=>({slug:a.slug,iban:a.iban,bic:a.bic,currency:a.currency,balance:a.balance,balanceCents:a.balance_cents,authorizedBalance:a.authorized_balance,authorizedBalanceCents:a.authorized_balance_cents,name:a.name,updatedAt:new Date(a.updated_at),status:a.status,main:a.main});export{a as
|
|
1
|
+
const a=a=>({id:a.id,slug:a.slug,legalName:a.legal_name,legalNumber:a.legal_number,legalSector:a.legal_sector,legalRegistrationDate:a.legal_registration_date,legalAddress:a.legal_address,legalForm:a.legal_form,legalCountry:a.legal_country,legalShareCapital:a.legal_share_capital,locale:a.locale,contractSignedAt:a.contract_signed_at,bankAccounts:a.bank_accounts.map(e)}),e=a=>({id:a?.id,slug:a.slug,iban:a.iban,bic:a.bic,currency:a.currency,balance:parseFloat(a.balance),balanceCents:a.balance_cents,authorizedBalance:a.authorized_balance,authorizedBalanceCents:a.authorized_balance_cents,name:a.name,updatedAt:new Date(a.updated_at),status:a.status,main:a.main});export{e as serializeBankAccount,a as serializeOrganization};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../common/auth/auth.validate.js";import{serializePaginationResponse as t}from"../common/api-pagination/api-pagination.js";import{prepareGetSepaTransfersCall as
|
|
1
|
+
import{authManager as e}from"../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../common/auth/auth.validate.js";import{serializePaginationResponse as t}from"../common/api-pagination/api-pagination.js";import{prepareGetSepaTransfersCall as s,getSepaTransfers as a,prepareCancelSepaTransferCall as o,cancelSepaTransfer as r,verifySepaPayee as i,createSepaTransfer as c,prepareGetSepaTransferCall as p,getSepaTransfer as m}from"./sepa-transfers.api.js";import{serializeSepaTransfer as f,serializeToVopVerificationResult as g,serializeToNewSepaTransferDataObject as T}from"./sepa-transfers.serializer.js";import{validateGetSepaTransferCreationFlowLinkParams as u,validateCancelSepaTransferParams as d,validateTransferBeneficiaryParams as k,validateCreateSepaTransferParams as l,validateGetSepaTransferParams as y}from"./sepa-transfers.validate.js";import{validateOperationSettingsParams as S}from"../validation/operation-settings-validation.js";import{buildIframeUrl as w,createIframe as j}from"../iframe/iframe-manager.js";import{buildIframeMessage as E}from"../iframe/iframe-message-builder.js";import{AUTH_LINK_ACTIONS as R,VOP_DECISIONS as b,ACTIONS as v}from"../common/constants.js";import{decorateUrlWithExtraParams as I,findBeneficiary as q}from"./sepa-transfers.utils.js";import{isRunningInBrowser as x}from"../common/runtime/runtime.validation.js";import{InvalidRuntimeError as F,RUNTIME_ENVIRONMENT as _}from"../errors/InvalidRuntimeError.js";import{encodeNetworkCall as h,decodeNetworkResponse as A}from"../common/network/network.js";import{authLinks as C}from"../auth-links/index.js";import P from"../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function K(e){const{stagingToken:o,proxyRequestFunction:r,accessToken:i,paginationSettings:c}=S(e?.operationSettings||{});if(r){const e=s({paginationSettings:c}),n=h(e),a=await r(n),o=A(a),i=o.body.transfers.map(f),p=t(o.body.meta);return{transfers:i,...p?{meta:p}:{}}}{const e=i||n(),s=await a({accessToken:e,stagingToken:o,paginationSettings:c}),r=s.transfers.map(f),p=t(s.meta);return{transfers:r,...p?{meta:p}:{}}}}async function M({sepaTransferSettings:e,operationSettings:t}){const s=y(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:o,stagingToken:r}=S(t||{});if(a){const e=p({sepaTransferId:s}),n=h(e),t=await a(n),o=A(t);return f(o.body.transfer)}{const e=o||n(),t=await m({sepaTransferId:s,accessToken:e,stagingToken:r});return f(t)}}async function*N({sepaTransferSettings:t,operationSettings:s}){const a=s?.accessToken||n(),o=s?.stagingToken||e.getStagingToken(),r=s?.idempotencyKey||P();let p;k(t);const m=await q({sepaTransferSettings:t,operationSettings:{accessToken:a,stagingToken:o||void 0}}),u={name:m.name,iban:m.iban},d=await i({sepaPayee:u,accessToken:a,stagingToken:o||void 0}),y=yield g(d);let R;if("string"==typeof y){if(y===b.REJECT)return}else{if(y.vopDecision===b.REJECT)return;R=y.sepaTransferSettings}const I={...t,...R};l(I);const h={...I,beneficiary:m};if(h.beneficiary?.trusted)p=await c({transfer:h,vopProofToken:d.proof_token.token,accessToken:a,stagingToken:o||void 0,idempotencyKey:r});else{if(!x())throw new F(_.BROWSER);const{uiParentElementId:e,debugMode:n}=S(s,{requiresUI:!0});let t;try{const s=w({accessToken:a,stagingToken:o||void 0,debugMode:n});t=await j({iframeUrl:s,parentElementId:e});const i=T(h);p=await t.postMessage(E({actionId:v.TRANSFER_SINGLE_CREATE,actionData:{body:{transfer:{...i}},idempotencyKey:r}}))}finally{t?.destroy()}}return f(p)}async function U({sepaTransferSettings:e,operationSettings:t}){const s=d(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:i,stagingToken:c}=S(t||{});if(a){const e=o({sepaTransferId:s}),n=h(e),t=await a(n);A(t)}else{const e=i||n();await r({sepaTransferId:s,accessToken:e,stagingToken:c})}}async function D({sepaTransferSettings:e,operationSettings:t}){const s=u(e),{proxyRequestFunction:a,stagingToken:o,accessToken:r}=S(t||{}),i=a?{proxyRequestFunction:a}:{stagingToken:o,accessToken:r||n()},c=await C.request({requestSettings:{action:R.SEPA_TRANSFER_CREATE,callbackUrl:s},operationSettings:i});return{...c,url:I(c.url,t)}}export{U as cancelSepaTransfer,N as createSepaTransfer,M as getSepaTransfer,D as getSepaTransferCreationFlowLink,K as getSepaTransfers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{InvalidParametersError as e}from"../errors/InvalidParametersError.js";import{
|
|
1
|
+
import{InvalidParametersError as e}from"../errors/InvalidParametersError.js";import{validateExpectedStringValues as r,validatePresenceOfRequiredParams as t,validateExpectedNumericValues as n}from"../validation/input-param-validation.js";import{AMOUNT_REQUIRING_ATTACHMENTS as a}from"../common/constants.js";const i=[{name:"bankAccountId"},{name:"reference"},{name:"amount"}];function o(r){if(!r)throw new e("sepaTransferId parameter is required for the called function");if(r&&"string"!=typeof r)throw new e("sepaTransferId must be a string");return r}function f(t){if(!t)throw new e("sepaTransferSettings parameter is required for the called function");if("object"!=typeof t)throw new e("sepaTransferSettings must be an object");if(!t.beneficiaryId&&!t.beneficiary)throw new e("Either beneficiaryId or beneficiary must be provided");const n=r({beneficiaryId:t.beneficiaryId});if(n.length>0)throw new e(n);return t}function s(o){if(!o)throw new e("sepaTransferSettings parameter is required for the called function");if("object"!=typeof o)throw new e("sepaTransferSettings must be an object");t(o,i);const f=[...r({bankAccountId:o.bankAccountId,note:o.note,reference:o.reference}),...n({amount:o.amount})].flat();if(f.length>0)throw new e(f);if(o.amount>a&&(!o.attachmentIds||0===o.attachmentIds.length))throw new e("Attachments are required for transfers over €30,000");return o}function c(r){if(!r)throw new e("sepaTransferId parameter is required for the called function");if("string"!=typeof r)throw new e("sepaTransferId must be a string");return r}function u(r){if(!r||!r.callbackUrl)throw new e("callbackUrl parameter is required for the getSepaTransferCreationFlowLink function");if("string"!=typeof r.callbackUrl)throw new e("callbackUrl must be a string");return r.callbackUrl}export{c as validateCancelSepaTransferParams,s as validateCreateSepaTransferParams,u as validateGetSepaTransferCreationFlowLinkParams,o as validateGetSepaTransferParams,f as validateTransferBeneficiaryParams};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./transfer-list.js";import{localeManager as e}from"../../../common/locale/locale-manager.js";function t({containerElement:t,uiElementSettings:n,operationSettings:o}){const a=document.createElement("qonto-transfer-list");a.operationSettings=o,a.locale=o?.locale||e.getLocale(),a.addEventListener("transfer-selected",(e=>{n?.uiElementEventListener?.({eventName:"transfer-selected",eventDetail:e.detail})})),t.appendChild(a)}export{t as createTransferListElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{str as n}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as r}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as l}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{transferListStyles as d}from"./transfer-list.styles.js";import
|
|
1
|
+
import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{str as n}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as r}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as l}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{transferListStyles as d}from"./transfer-list.styles.js";import{formatDate as m}from"../../customizable-components/utils/format-date.js";import{formatMoney as p}from"../../customizable-components/utils/format-money.js";import{TransferSelectedEvent as c}from"./transfer-list.events.js";import{renderLoadingTableRowsMarkup as u,mapTransferStatusToBadgeLevel as h}from"./transfer-list.utils.js";import{getSepaTransfers as g}from"../../../sepa-transfers/sepa-transfers.js";import{setLocale as f,getLocale as v}from"../localize/configure-localization.js";import{TRANSFER_STATUSES as _}from"../../../common/constants.js";import"../../customizable-components/styles/styles.css.js";import"../../customizable-components/button/qonto-button.js";let y=class extends o{constructor(){super(...arguments),this.locale="en",this.isLoading=!1}connectedCallback(){super.connectedCallback(),f(this.locale),this.fetchTransfers()}updated(t){t.has("locale")&&f(this.locale)}async fetchTransfers(t){if(this.operationSettings){this.isLoading=!0,this.error=void 0;try{const{paginationSettings:e={}}=this.operationSettings,o=await g({operationSettings:{...this.operationSettings,paginationSettings:{page:t??e.page??1,itemsPerPage:e.itemsPerPage??20}}});this.transfers=o.transfers,this.paginationState=o.meta}catch(t){console.error("Failed to load SEPA transfers:",t),this.error="Failed to load transfers. Please try again."}finally{this.isLoading=!1}}else console.error("operationSettings is required to fetch transfers")}handleRowClick(t){this.dispatchEvent(new c({transfer:t}))}handlePreviousPage(){this.paginationState?.previousPage&&(this.transfers=void 0,this.fetchTransfers(this.paginationState.previousPage))}handleNextPage(){this.paginationState?.nextPage&&(this.transfers=void 0,this.fetchTransfers(this.paginationState.nextPage))}render(){return this.error?e`<div data-error>${this.error}</div>`:e`
|
|
2
2
|
<table>
|
|
3
3
|
<thead>
|
|
4
4
|
<tr>
|
|
@@ -10,7 +10,7 @@ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
|
|
|
10
10
|
</tr>
|
|
11
11
|
</thead>
|
|
12
12
|
<tbody>
|
|
13
|
-
${this.isLoading||!this.transfers?
|
|
13
|
+
${this.isLoading||!this.transfers?u(this.paginationState?.itemsPerPage):""}
|
|
14
14
|
${0===this.transfers?.length?"There are no transfers yet":this.transfers?.map((t=>e`
|
|
15
15
|
<tr @click=${()=>this.handleRowClick(t)}>
|
|
16
16
|
<td>
|
|
@@ -20,7 +20,7 @@ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
|
|
|
20
20
|
<td>${t.note}</td>
|
|
21
21
|
<td>
|
|
22
22
|
<qonto-badge-status
|
|
23
|
-
level="${
|
|
23
|
+
level="${h(t.status)}"
|
|
24
24
|
>${function(t){switch(t){case _.PENDING:return r("Pending");case _.PROCESSING:return r("Processing");case _.CANCELED:return r("Canceled");case _.DECLINED:return r("Declined");case _.SETTLED:return r("Settled");case _.FAILED:return r("Failed");case _.COMPLETED:return r("Completed");default:return t}}(t.status)}</qonto-badge-status
|
|
25
25
|
>
|
|
26
26
|
</td>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BADGE_LEVELS as e}from"../../customizable-components/badge-status/qonto-badge-status.js";import"../../customizable-components/skeleton-loader/qonto-skeleton-loader-line.js";import{TRANSFER_STATUSES as t}from"../../../common/constants.js";import{unsafeHTML as o}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";function n(o){switch(o){case t.SETTLED:return e.VALIDATED;case t.DECLINED:return e.DECLINED;case t.PENDING:return e.WAITING;case t.PROCESSING:return e.IN_PROGRESS;case t.CANCELED:return e.ERROR;default:return e.INACTIVE}}function l(e=3){const t=Array.from({length:e},(()=>'\n <tr>\n <td><qonto-skeleton-loader-line width="80px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="120px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="150px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="100px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="60px"></qonto-skeleton-loader-line></td>\n </tr>\n ')).join("");return o(t)}export{n as mapTransferStatusToBadgeLevel,l as renderLoadingTableRowsMarkup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{isRunningInServer as e}from"../common/runtime/runtime.validation.js";import{validateCreateUIElementParams as t}from"./ui-elements.validation.js";import{validateOperationSettingsParams as n}from"../validation/operation-settings-validation.js";import{UI_ELEMENT_NAMES as i}from"./ui-elements.constants.js";import{createTransferListElement as o}from"./ui-elements/transfer-list/create-transfer-list-element.js";import{EmbedUIElementError as r}from"../errors/EmbedUIElementError.js";const m=async m=>{if(e())return;const{uiElementSettings:s,operationSettings:a={}}=m,{uiElementName:l}=t(s),{uiParentElementId:d}=n(a,{requiresUI:!0}),u=document.getElementById(d);if(!u)throw new r(`Could not find container element with id: ${d}`);if(l===i.TRANSFER_LIST)return void o({containerElement:u,uiElementSettings:s,operationSettings:a});const c=document.createElement(`qonto-${l}`);u.appendChild(c)};export{m as createUIElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-localization.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/localize/configure-localization.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAQ,SAAS;;GAAE,SAAS;;CAMjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-codes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/ui-elements/localize/generated/locale-codes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,aAAa,+CAAgD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,UAAU,qDAAsD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/de.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/es.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/fr.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/it.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/nl.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/ui-elements/localize/generated/locales/pt.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
package/dist/ui/ui-elements/{transfer-list.d.ts → transfer-list/create-transfer-list-element.d.ts}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './transfer-list';
|
|
1
2
|
import type { UIElementCreatorParams } from '@ui/ui-elements.types';
|
|
2
3
|
/**
|
|
3
4
|
* Creates and renders a transfer list UI element.
|
|
@@ -9,4 +10,4 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
|
|
|
9
10
|
* - uiElementSettings: Optional settings including event listeners
|
|
10
11
|
*/
|
|
11
12
|
export declare function createTransferListElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<never>): void;
|
|
12
|
-
//# sourceMappingURL=transfer-list.d.ts.map
|
|
13
|
+
//# sourceMappingURL=create-transfer-list-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-transfer-list-element.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/transfer-list/create-transfer-list-element.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAIpE;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,IAAI,CAoBtC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import '../styles/styles.css';
|
|
3
2
|
import type { OperationSettings } from '@validation/operation-settings-validation';
|
|
4
|
-
import '
|
|
3
|
+
import '../../customizable-components/styles/styles.css';
|
|
4
|
+
import '../../customizable-components/button/qonto-button.ts';
|
|
5
5
|
export declare class TransferList extends LitElement {
|
|
6
6
|
static styles: import("lit").CSSResult;
|
|
7
7
|
operationSettings: OperationSettings | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer-list.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/transfer-list/transfer-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAevC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAQnF,OAAO,iDAAiD,CAAC;AACzD,OAAO,sDAAsD,CAAC;AA4B9D,qBAEa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,0BAAsB;IAGnC,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,MAAM,EAAE,MAAM,CAAQ;IAGtB,OAAO,CAAC,SAAS,CAA6B;IAG9C,OAAO,CAAC,eAAe,CAA8B;IAGrD,OAAO,CAAC,SAAS,CAAkB;IAGnC,OAAO,CAAC,KAAK,CAAqB;IAElC,iBAAiB;IAMjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;YAMjC,cAAc;IA8B5B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;IAOtB,MAAM;CA8EP"}
|