@qonto/embed-sdk 0.9.0 → 0.10.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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The organizations namespace contains all the functions related to organizations
3
+ * operations. It can be accessed like this:
4
+ * ```ts
5
+ * import { organizations } from '@qonto/embed-sdk/organizations';
6
+ * ```
7
+ *
8
+ * Then, the organizations object contains the functions to perform organizations
9
+ * operations:
10
+ * ```ts
11
+ * await organizations.getBankAccounts({accessToken, stagingToken});
12
+ * ```
13
+ */
14
+ export declare const organizations: {
15
+ getBankAccounts: (params: {
16
+ accessToken?: string;
17
+ stagingToken?: string;
18
+ }) => Promise<import("./organizations.types").BankAccount[]>;
19
+ };
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/organizations/index.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa;;mBAhBrB,CAAC;oBAAwB,CAAC;;CAgBkC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { OrganizationDataObject } from './organizations.types';
2
+ export declare const getOrganization: ({ accessToken, stagingToken, }: {
3
+ accessToken: string;
4
+ stagingToken?: string;
5
+ }) => Promise<OrganizationDataObject>;
6
+ //# sourceMappingURL=organizations.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAMpE,eAAO,MAAM,eAAe,GAAU,gCAGnC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,OAAO,CAAC,sBAAsB,CAyBjC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { BankAccount } from './organizations.types';
2
+ export declare const getBankAccounts: (params: {
3
+ accessToken?: string;
4
+ stagingToken?: string;
5
+ }) => Promise<BankAccount[]>;
6
+ //# sourceMappingURL=organizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,eAAO,MAAM,eAAe,EAAE,CAAC,MAAM,EAAE;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAK,OAAO,CAAC,WAAW,EAAE,CAa1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const organizations: {
2
+ getBankAccounts: (params: {
3
+ accessToken?: string;
4
+ stagingToken?: string;
5
+ }) => Promise<import("./organizations.types").BankAccount[]>;
6
+ };
7
+ export { organizations };
8
+ //# sourceMappingURL=organizations.public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.public-api.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.public-api.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,aAAa;;mBAKuJ,CAAC;oBAAwB,CAAC;;CAHnM,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BankAccount, BankAccountDataObject } from './organizations.types';
2
+ export declare const serializeBankAccount: (bankAccount: BankAccountDataObject) => BankAccount;
3
+ //# sourceMappingURL=organizations.serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.serializer.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.serializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,qBAAqB,KACjC,WAeF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=organizations.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.test.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ export type BankAccountDataObject = {
2
+ slug: string;
3
+ iban: string;
4
+ bic: string;
5
+ currency: string;
6
+ balance: number;
7
+ balance_cents: number;
8
+ authorized_balance: number;
9
+ authorized_balance_cents: number;
10
+ name: string;
11
+ updated_at: Date;
12
+ status: (typeof ACCOUNT_STATUS)[keyof typeof ACCOUNT_STATUS];
13
+ main: boolean;
14
+ };
15
+ export type BankAccount = {
16
+ slug: string;
17
+ iban: string;
18
+ bic: string;
19
+ currency: string;
20
+ balance: number;
21
+ balanceCents: number;
22
+ authorizedBalance: number;
23
+ authorizedBalanceCents: number;
24
+ name: string;
25
+ updatedAt: Date;
26
+ status: (typeof ACCOUNT_STATUS)[keyof typeof ACCOUNT_STATUS];
27
+ main: boolean;
28
+ };
29
+ export declare const ACCOUNT_STATUS: {
30
+ readonly ACTIVE: "active";
31
+ readonly WAITING: "waiting_for_funds";
32
+ readonly CLOSED: "closed";
33
+ readonly PENDING: "pending";
34
+ };
35
+ export type OrganizationDataObject = {
36
+ bank_accounts: BankAccountDataObject[];
37
+ };
38
+ //# sourceMappingURL=organizations.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.types.d.ts","sourceRoot":"","sources":["../../src/organizations/organizations.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,EAAE,MAAM,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;IAC7D,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;IAC7D,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE,qBAAqB,EAAE,CAAC;CACxC,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, SepaTransfer, GetSepaTransfersResponse, GetBeneficiariesResponse, PaginationState } from './types.public-api';
2
- export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, GetSepaTransfersResponse, PaginationState, };
1
+ import type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, SepaTransfer, GetSepaTransfersResponse, GetBeneficiariesResponse, PaginationState, BankAccount, ACCOUNT_STATUS } from './types.public-api';
2
+ export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, GetSepaTransfersResponse, PaginationState, BankAccount, ACCOUNT_STATUS, };
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,eAAe,GAChB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,EACf,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,GACf,CAAC"}
@@ -2,5 +2,6 @@ import type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrd
2
2
  import type { Beneficiary, GetBeneficiariesResponse } from '@beneficiaries/beneficiaries.types';
3
3
  import type { SepaTransfer, GetSepaTransfersResponse } from '@sepa-transfers/sepa-transfers.types';
4
4
  import type { PaginationState } from '@common/api-pagination/api-pagination.types';
5
- export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, GetSepaTransfersResponse, PaginationState, };
5
+ import type { BankAccount, ACCOUNT_STATUS } from '@organizations/organizations.types';
6
+ export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, GetSepaTransfersResponse, PaginationState, BankAccount, ACCOUNT_STATUS, };
6
7
  //# sourceMappingURL=types.public-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,eAAe,GAChB,CAAC"}
1
+ {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACf,MAAM,oCAAoC,CAAC;AAE5C,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,GACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qonto/embed-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Library to embed Qonto features in your application",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/common/index.d.ts",
26
26
  "import": "./dist/src/common/index.js"
27
27
  },
28
+ "./organizations": {
29
+ "types": "./dist/organizations/index.d.ts",
30
+ "import": "./dist/src/organizations/index.js"
31
+ },
28
32
  "./types": {
29
33
  "types": "./dist/types/index.d.ts",
30
34
  "import": "./dist/src/types/index.js"