@qonto/embed-sdk 0.1.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.
Files changed (120) hide show
  1. package/README.md +50 -0
  2. package/dist/cards/cards.api.d.ts +8 -0
  3. package/dist/cards/cards.api.d.ts.map +1 -0
  4. package/dist/cards/cards.d.ts +126 -0
  5. package/dist/cards/cards.d.ts.map +1 -0
  6. package/dist/cards/cards.helper.d.ts +3 -0
  7. package/dist/cards/cards.helper.d.ts.map +1 -0
  8. package/dist/cards/cards.public-api.d.ts +9 -0
  9. package/dist/cards/cards.public-api.d.ts.map +1 -0
  10. package/dist/cards/cards.serializer.d.ts +70 -0
  11. package/dist/cards/cards.serializer.d.ts.map +1 -0
  12. package/dist/cards/cards.test.d.ts +2 -0
  13. package/dist/cards/cards.test.d.ts.map +1 -0
  14. package/dist/cards/cards.types.d.ts +238 -0
  15. package/dist/cards/cards.types.d.ts.map +1 -0
  16. package/dist/cards/cards.validate.d.ts +5 -0
  17. package/dist/cards/cards.validate.d.ts.map +1 -0
  18. package/dist/cards/index.d.ts +7 -0
  19. package/dist/cards/index.d.ts.map +1 -0
  20. package/dist/common/auth/auth.d.ts +33 -0
  21. package/dist/common/auth/auth.d.ts.map +1 -0
  22. package/dist/common/auth/auth.test.d.ts +2 -0
  23. package/dist/common/auth/auth.test.d.ts.map +1 -0
  24. package/dist/common/auth/auth.validate.d.ts +2 -0
  25. package/dist/common/auth/auth.validate.d.ts.map +1 -0
  26. package/dist/common/auth/index.d.ts +3 -0
  27. package/dist/common/auth/index.d.ts.map +1 -0
  28. package/dist/common/common.public-api.d.ts +9 -0
  29. package/dist/common/common.public-api.d.ts.map +1 -0
  30. package/dist/common/constants.d.ts +23 -0
  31. package/dist/common/constants.d.ts.map +1 -0
  32. package/dist/common/environment/environment-manager.d.ts +53 -0
  33. package/dist/common/environment/environment-manager.d.ts.map +1 -0
  34. package/dist/common/environment/environment-manager.test.d.ts +2 -0
  35. package/dist/common/environment/environment-manager.test.d.ts.map +1 -0
  36. package/dist/common/index.d.ts +3 -0
  37. package/dist/common/index.d.ts.map +1 -0
  38. package/dist/common/initialize/index.d.ts +2 -0
  39. package/dist/common/initialize/index.d.ts.map +1 -0
  40. package/dist/common/initialize/initialize.d.ts +40 -0
  41. package/dist/common/initialize/initialize.d.ts.map +1 -0
  42. package/dist/common/initialize/initialize.test.d.ts +2 -0
  43. package/dist/common/initialize/initialize.test.d.ts.map +1 -0
  44. package/dist/common/initialize/initialize.types.d.ts +9 -0
  45. package/dist/common/initialize/initialize.types.d.ts.map +1 -0
  46. package/dist/common/initialize/initialize.validate.d.ts +9 -0
  47. package/dist/common/initialize/initialize.validate.d.ts.map +1 -0
  48. package/dist/common/locale/index.d.ts +2 -0
  49. package/dist/common/locale/index.d.ts.map +1 -0
  50. package/dist/common/operation-settings/operation-settings.d.ts +35 -0
  51. package/dist/common/operation-settings/operation-settings.d.ts.map +1 -0
  52. package/dist/errors/AuthenticationError.d.ts +11 -0
  53. package/dist/errors/AuthenticationError.d.ts.map +1 -0
  54. package/dist/errors/EmbedApiError.d.ts +8 -0
  55. package/dist/errors/EmbedApiError.d.ts.map +1 -0
  56. package/dist/errors/EmbedOperationError.d.ts +11 -0
  57. package/dist/errors/EmbedOperationError.d.ts.map +1 -0
  58. package/dist/errors/InvalidParametersError.d.ts +14 -0
  59. package/dist/errors/InvalidParametersError.d.ts.map +1 -0
  60. package/dist/errors/QontoEmbedSdkError.d.ts +8 -0
  61. package/dist/errors/QontoEmbedSdkError.d.ts.map +1 -0
  62. package/dist/iframe/embed-iframe.d.ts +22 -0
  63. package/dist/iframe/embed-iframe.d.ts.map +1 -0
  64. package/dist/iframe/iframe-manager.d.ts +14 -0
  65. package/dist/iframe/iframe-manager.d.ts.map +1 -0
  66. package/dist/iframe/iframe-manager.test.d.ts +2 -0
  67. package/dist/iframe/iframe-manager.test.d.ts.map +1 -0
  68. package/dist/iframe/iframe.test.d.ts +2 -0
  69. package/dist/iframe/iframe.test.d.ts.map +1 -0
  70. package/dist/iframe/iframe.types.d.ts +6 -0
  71. package/dist/iframe/iframe.types.d.ts.map +1 -0
  72. package/dist/index.d.ts +4 -0
  73. package/dist/index.d.ts.map +1 -0
  74. package/dist/index.umd.js +1 -0
  75. package/dist/mocks/handlers.d.ts +3 -0
  76. package/dist/mocks/handlers.d.ts.map +1 -0
  77. package/dist/mocks/node.d.ts +2 -0
  78. package/dist/mocks/node.d.ts.map +1 -0
  79. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +1 -0
  80. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +1 -0
  81. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +1 -0
  82. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +1 -0
  83. package/dist/public-api.test.d.ts +2 -0
  84. package/dist/public-api.test.d.ts.map +1 -0
  85. package/dist/setup-test.d.ts +2 -0
  86. package/dist/setup-test.d.ts.map +1 -0
  87. package/dist/src/cards/cards.api.js +1 -0
  88. package/dist/src/cards/cards.helper.js +1 -0
  89. package/dist/src/cards/cards.js +1 -0
  90. package/dist/src/cards/cards.public-api.js +1 -0
  91. package/dist/src/cards/cards.serializer.js +1 -0
  92. package/dist/src/cards/cards.types.js +1 -0
  93. package/dist/src/cards/cards.validate.js +1 -0
  94. package/dist/src/cards/index.js +1 -0
  95. package/dist/src/common/auth/auth.js +1 -0
  96. package/dist/src/common/auth/auth.validate.js +1 -0
  97. package/dist/src/common/common.public-api.js +1 -0
  98. package/dist/src/common/constants.js +1 -0
  99. package/dist/src/common/environment/environment-manager.js +1 -0
  100. package/dist/src/common/index.js +1 -0
  101. package/dist/src/common/initialize/initialize.js +1 -0
  102. package/dist/src/common/initialize/initialize.validate.js +1 -0
  103. package/dist/src/common/operation-settings/operation-settings.js +1 -0
  104. package/dist/src/errors/AuthenticationError.js +1 -0
  105. package/dist/src/errors/EmbedApiError.js +1 -0
  106. package/dist/src/errors/EmbedOperationError.js +1 -0
  107. package/dist/src/errors/InvalidParametersError.js +1 -0
  108. package/dist/src/errors/QontoEmbedSdkError.js +1 -0
  109. package/dist/src/iframe/embed-iframe.js +1 -0
  110. package/dist/src/iframe/iframe-manager.js +1 -0
  111. package/dist/src/index.js +1 -0
  112. package/dist/src/validation/input-param-validation.js +1 -0
  113. package/dist/src/validation/operation-settings-validation.js +1 -0
  114. package/dist/validation/index.d.ts +2 -0
  115. package/dist/validation/index.d.ts.map +1 -0
  116. package/dist/validation/input-param-validation.d.ts +43 -0
  117. package/dist/validation/input-param-validation.d.ts.map +1 -0
  118. package/dist/validation/operation-settings-validation.d.ts +6 -0
  119. package/dist/validation/operation-settings-validation.d.ts.map +1 -0
  120. package/package.json +94 -0
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # qonto-embed-sdk
2
+
3
+ Use Qonto Embed in your website with a high level abstraction that will make your integration easy and fast.
4
+
5
+ ## Getting started
6
+
7
+ 1. Install the SDK with your package manager of choice:
8
+
9
+ ```bash
10
+ npm install @qonto/qonto-embed-sdk
11
+ ```
12
+
13
+ or
14
+
15
+ ```bash
16
+ pnpm install @qonto/qonto-embed-sdk
17
+ ```
18
+
19
+ or
20
+
21
+ ```bash
22
+ yarn add @qonto/qonto-embed-sdk
23
+ ```
24
+
25
+ 2. Then, initialize the SDK in your code:
26
+
27
+ ```ts
28
+ import { initialize } from '@qonto/qonto-embed-sdk/common';
29
+
30
+ const accessToken =
31
+ 'An access token you have previously generated from your app';
32
+ initialize({ accessToken });
33
+ ```
34
+
35
+ Read more about how your users are onboarded and an access token is generated for them in
36
+ [the docs](https://docs.qonto.com/api-reference/onboarding-api/flows/existing-company#the-onboarding-flow).
37
+
38
+ 3. From that moment on, you can access the different namespaces of the SDK:
39
+
40
+ ```ts
41
+ import { cards } from '@qonto/qonto-embed-sdk/cards';
42
+
43
+ const newCard = cards.orderCard(cardConfig);
44
+ ```
45
+
46
+ ## Next steps
47
+
48
+ Now that you have the SDK installed and initialized, you can start using it. Check
49
+ [the documentation](https://docs.qonto.com/home/use-cases/Qonto-embed) for each namespace to get up to speed with the
50
+ different features available.
@@ -0,0 +1,8 @@
1
+ import type { CardDataObject, DisplayCardSettings } from './cards.types';
2
+ interface GetCardsParams {
3
+ accessToken: string;
4
+ }
5
+ export declare function getCards({ accessToken, }: GetCardsParams): Promise<CardDataObject[]>;
6
+ export declare function getCardIframeURL(cardSettings: DisplayCardSettings, accessToken: string): Promise<string>;
7
+ export {};
8
+ //# sourceMappingURL=cards.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.api.d.ts","sourceRoot":"","sources":["../../src/cards/cards.api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKzE,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAOD,wBAAsB,QAAQ,CAAC,EAC7B,WAAW,GACZ,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAiB5C;AAED,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,mBAAmB,EACjC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
@@ -0,0 +1,126 @@
1
+ import { type Card, type CardOrderSettings, type DisplayCardReturnObject, type DisplayCardSettings, type UnlockCardSettings } from './cards.types';
2
+ import { type OperationSettings } from '@validation/operation-settings-validation';
3
+ export interface CardParams<T> {
4
+ cardSettings: T;
5
+ operationSettings?: OperationSettings;
6
+ }
7
+ /**
8
+ * Fetches the list of cards for the current user.
9
+ * @returns \{Promise\<Card[]\>\} A promise that resolves to an array of cards.
10
+ * @throws \{AuthenticationError\} If the access token is invalid or missing.
11
+ * Ensure initialize has been called before using this function.
12
+ */
13
+ export declare function getCards(): Promise<Card[]>;
14
+ /**
15
+ * Requests the creation of a card by showing the user the UI to perform SCA in the calling page.
16
+ * It will show an element on the screen where users will be able to go through the SCA
17
+ * authentication process and upon successful authentication, will perform the ordering operation.
18
+ * @param cardConfig - An object with the parameters to order the card.
19
+ * @throws InvalidParametersError If the cardId is not provided or if the cardId is not a string.
20
+ * @throws InvalidParametersError If the uiParentElementId or operationSettings are not provided.
21
+ * @example Ordering a physical card to be shipped to the org's business address
22
+ * ```
23
+ * const cardConfig = {
24
+ * cardSettings: {
25
+ * categories: [
26
+ * 'transport,
27
+ * 'restaurant_and_bar',
28
+ * 'food_and_grocery',
29
+ * 'it_and_electronics',
30
+ * 'utility',
31
+ * 'tax',
32
+ * 'legal_and_accounting',
33
+ * 'atm', 'office_supply',
34
+ * 'hardware_and_equipment',
35
+ * 'finance'
36
+ * ],
37
+ * membershipId: 'membership-id',
38
+ * cardLevel: 'standard', // Other options are 'plus' or 'metal'
39
+ * cardDesign: 'standard.recycled.plastic.2023',
40
+ * typeOfPrint: 'print',
41
+ * hasAtmOption: true,
42
+ * hasNfcOption: true,
43
+ * onlineOption: true,
44
+ * foreignOption: true,
45
+ * monthlyLimit: 1300,
46
+ * atmMonthlyLimit: 1000,
47
+ * hasAtmDailyLimit: true,
48
+ * atmDailyLimit: 100,
49
+ * hasDailyLimit: true,
50
+ * dailyLimit: 100,
51
+ * paymentTransactionLimit: 1000,
52
+ * hasTransactionLimit: true,
53
+ * activeDays: [1, 2, 3, 4, 5], // From Monday to Friday
54
+ * shipToBusiness: true,
55
+ * },
56
+ * operationSettings: {
57
+ * uiParentElementId: 'dom-element-id',
58
+ * },
59
+ * };
60
+ * orderCard(cardConfig);
61
+ * ```
62
+ *
63
+ * @example Ordering a virtual card
64
+ * ```
65
+ * const cardConfig = {
66
+ * cardSettings: {
67
+ * categories: [
68
+ * 'transport,
69
+ * 'restaurant_and_bar',
70
+ * 'food_and_grocery',
71
+ * 'it_and_electronics',
72
+ * 'utility',
73
+ * 'tax',
74
+ * 'legal_and_accounting',
75
+ * 'atm', 'office_supply',
76
+ * 'hardware_and_equipment',
77
+ * 'finance'
78
+ * ],
79
+ * membershipId: 'membership-id',
80
+ * cardLevel: 'virtual',
81
+ * monthlyLimit: 1300,
82
+ * dailyLimit: 100,
83
+ * paymentTransactionLimit: 1000,
84
+ * hasTransactionLimit: true,
85
+ * activeDays: [1, 2, 3, 4, 5], // From Monday to Friday
86
+ * },
87
+ * operationSettings: {
88
+ * uiParentElementId: 'dom-element-id',
89
+ * },
90
+ * };
91
+ * orderCard(cardConfig);
92
+ * ```
93
+ */
94
+ export declare function orderCard(cardConfig: CardParams<CardOrderSettings>): Promise<Card>;
95
+ /**
96
+ * Unlocks a locked card by showing the user the UI to perform SCA in the calling page.
97
+ * It will show an element on the screen where users will be able to go through the SCA
98
+ * authentication process and upon successful authentication, will perform the unlock operation.
99
+ * @param cardConfig - An object with the parameters to unlock the card.
100
+ * It requires a cardSettings object with the cardId property and an operationSettings object with the uiParentElementId property.
101
+ * @throws InvalidParametersError If the cardId is not provided or if the cardId is not a string.
102
+ * @throws InvalidParametersError If the uiParentElementId or operationSettings are not provided.
103
+ * @example
104
+ * ```
105
+ * const cardConfig = {
106
+ * cardSettings: {
107
+ * cardId: 'card-id',
108
+ * },
109
+ * operationSettings: {
110
+ * uiParentElementId: 'dom-element-id',
111
+ * },
112
+ * };
113
+ * unlockCard(cardConfig);
114
+ * ```
115
+ */
116
+ export declare function unlockCard(cardConfig: CardParams<UnlockCardSettings>): Promise<Card>;
117
+ /**
118
+ * Displays the UI in the calling page which allows the user to see card details.
119
+ * @param cardConfig - An object with the parameters to display the card.
120
+ * It requires a cardSettings object with the cardId property and an operationSettings object with the uiParentElementId property.
121
+ * @returns `{Promise<{ destroyEmbedUI: () => void }>}` A promise that resolves to an object with a destroyEmbedUI function.
122
+ * @throws InvalidParametersError If the cardId is not provided or if the cardId is not a string.
123
+ * @throws InvalidParametersError If the uiParentElementId or operationSettings are not provided.
124
+ */
125
+ export declare function displayCard(cardConfig: CardParams<DisplayCardSettings>): Promise<DisplayCardReturnObject>;
126
+ //# sourceMappingURL=cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/cards/cards.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAYvB,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,CAAC;IAChB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAQhD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,UAAU,CAAC,iBAAiB,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,UAAU,CAAC,kBAAkB,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAC1C,OAAO,CAAC,uBAAuB,CAAC,CAsBlC"}
@@ -0,0 +1,3 @@
1
+ import type { DisplayCardSettings } from './cards.types';
2
+ export declare function getPopulatedIframeURL(iframeURL: string, params: DisplayCardSettings): string;
3
+ //# sourceMappingURL=cards.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.helper.d.ts","sourceRoot":"","sources":["../../src/cards/cards.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,GAC1B,MAAM,CASR"}
@@ -0,0 +1,9 @@
1
+ import { getCards, orderCard, unlockCard, displayCard } from './cards';
2
+ declare const cards: {
3
+ getCards: typeof getCards;
4
+ orderCard: typeof orderCard;
5
+ unlockCard: typeof unlockCard;
6
+ displayCard: typeof displayCard;
7
+ };
8
+ export { cards };
9
+ //# sourceMappingURL=cards.public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.public-api.d.ts","sourceRoot":"","sources":["../../src/cards/cards.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEvE,QAAA,MAAM,KAAK;;;;;CAKV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,70 @@
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" | "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
+ cardId: string;
68
+ };
69
+ };
70
+ //# sourceMappingURL=cards.serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.serializer.d.ts","sourceRoot":"","sources":["../../src/cards/cards.serializer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAE5B,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;;;;;EAQxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cards.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.test.d.ts","sourceRoot":"","sources":["../../src/cards/cards.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,238 @@
1
+ export declare enum CardStatus {
2
+ PENDING = "pending",
3
+ ONHOLD = "onhold",
4
+ ORDER_CANCELED = "order_canceled",
5
+ LIVE = "live",
6
+ PAUSED = "paused",
7
+ STOLEN = "stolen",
8
+ LOST = "lost",
9
+ PIN_BLOCKED = "pin_blocked",
10
+ DELETED = "deleted",
11
+ PRE_EXPIRED = "pre_expired",
12
+ EXPIRED = "expired",
13
+ DISCARDED = "discarded",
14
+ SHIPPED_LOST = "shipped_lost",
15
+ ABUSIVE = "abusive"
16
+ }
17
+ export declare const CardCategories: {
18
+ TRANSPORT: string;
19
+ RESTAURANT_AND_BAR: string;
20
+ FOOD_AND_GROCERY: string;
21
+ IT_AND_ELECTRONICS: string;
22
+ UTILITY: string;
23
+ TAX: string;
24
+ LEGAL_AND_ACCOUNTING: string;
25
+ ATM: string;
26
+ OFFICE_SUPPLY: string;
27
+ HARDWARE_AND_EQUIPMENT: string;
28
+ FINANCE: string;
29
+ };
30
+ type CardCategory = (typeof CardCategories)[keyof typeof CardCategories];
31
+ type CardDesign = 'standard.recycled.plastic.2023' | 'plus.black.2023' | 'plus.recycled.plastic.silver.2023' | 'plus.recycled.plastic.black.2023' | 'plus.recycled.plastic.lilac.2023' | 'metal.graphite.black.2019' | 'metal.mineral.gray.2024' | 'metal.sand.gold.2024' | 'virtual.default.2017' | 'flash.default.2021' | 'advertising.default.2023';
32
+ export declare enum VirtualCardLevel {
33
+ VIRTUAL = "virtual"
34
+ }
35
+ export declare enum PhysicalCardLevel {
36
+ METAL = "metal",
37
+ PLUS = "plus",
38
+ STANDARD = "standard"
39
+ }
40
+ type CardType = 'debit' | 'prepaid';
41
+ type TypeOfPrint = 'embossed' | 'print' | null;
42
+ export interface Card {
43
+ id: string;
44
+ nickname: string;
45
+ embossedName: string;
46
+ status: CardStatus;
47
+ maskPan: string;
48
+ expMonth: number;
49
+ expYear: number;
50
+ lastActivityAt: Date;
51
+ lastDigits: string;
52
+ shipToBusiness: boolean;
53
+ atmOption: boolean;
54
+ atmDailyLimitOption: boolean;
55
+ nfcOption: boolean;
56
+ onlineOption: boolean;
57
+ foreignOption: boolean;
58
+ atmMonthlyLimit: number;
59
+ atmMonthlySpent: number;
60
+ atmDailyLimit: number;
61
+ atmDailySpent: number;
62
+ paymentMonthlyLimit: number;
63
+ paymentMonthlySpent: number;
64
+ paymentDailyLimit: number;
65
+ paymentDailySpent: number;
66
+ paymentDailyLimitOption: boolean;
67
+ paymentTransactionLimit: number;
68
+ paymentTransactionLimitOption: boolean;
69
+ activeDays: number[];
70
+ holderId: string;
71
+ bankAccountId: string;
72
+ organizationId: string;
73
+ updatedAt: Date;
74
+ createdAt: Date;
75
+ shippedAt: Date;
76
+ cardType: CardType;
77
+ cardLevel: VirtualCardLevel | PhysicalCardLevel;
78
+ paymentLifespanLimit: number;
79
+ paymentLifespanSpent: number;
80
+ preExpiresAt: Date;
81
+ categories: CardCategory[];
82
+ renewed: boolean;
83
+ renewal: boolean;
84
+ parentCardSummary: {
85
+ id: string;
86
+ lastDigits: string;
87
+ };
88
+ hadOperation: boolean;
89
+ hadPinOperation: boolean;
90
+ cardDesign: CardDesign;
91
+ typeOfPrint: TypeOfPrint;
92
+ upsold: boolean;
93
+ upsell: boolean;
94
+ discardOn: Date;
95
+ reordered: boolean;
96
+ }
97
+ export interface VirtualCardOrderSettings {
98
+ monthlyLimit: number;
99
+ membershipId: string;
100
+ organizationId: string;
101
+ bankAccountId: string;
102
+ cardLevel: VirtualCardLevel;
103
+ hasDailyLimit?: boolean;
104
+ dailyLimit?: number;
105
+ hasTransactionLimit?: boolean;
106
+ transactionLimit?: number;
107
+ activeDays?: number[];
108
+ categories?: CardCategory[];
109
+ }
110
+ export interface Address {
111
+ contactName: string;
112
+ firstLine: string;
113
+ secondLine: string;
114
+ thirdLine: string;
115
+ zipCode: string;
116
+ city: string;
117
+ country: string;
118
+ }
119
+ export interface PhysicalCardOrderSettings extends Omit<VirtualCardOrderSettings, 'cardLevel'> {
120
+ shipToBusiness: boolean;
121
+ cardLevel: PhysicalCardLevel;
122
+ hasAtmOption?: boolean;
123
+ hasAtmDailyLimit?: boolean;
124
+ atmDailyLimit?: number;
125
+ atmMonthlyLimit?: number;
126
+ hasNfcOption?: boolean;
127
+ hasForeignPaymentOption?: boolean;
128
+ hasOnlinePaymentOption?: boolean;
129
+ address?: Address;
130
+ cardDesign?: CardDesign;
131
+ typeOfPrint?: TypeOfPrint;
132
+ }
133
+ export type CardOrderSettings = VirtualCardOrderSettings | PhysicalCardOrderSettings;
134
+ export interface CardDataObject {
135
+ id: string;
136
+ nickname: string;
137
+ embossed_name: string;
138
+ status: CardStatus;
139
+ pin_set: boolean;
140
+ mask_pan: string;
141
+ exp_month: string;
142
+ exp_year: string;
143
+ last_activity_at: string;
144
+ last_digits: string;
145
+ ship_to_business: boolean;
146
+ atm_option: boolean;
147
+ nfc_option: boolean;
148
+ online_option: boolean;
149
+ foreign_option: boolean;
150
+ atm_monthly_limit: number;
151
+ atm_monthly_spent: number;
152
+ atm_daily_limit: number;
153
+ atm_daily_spent: number;
154
+ atm_daily_limit_option: boolean;
155
+ payment_monthly_limit: number;
156
+ payment_monthly_spent: number;
157
+ payment_daily_limit: number;
158
+ payment_daily_spent: number;
159
+ payment_daily_limit_option: boolean;
160
+ payment_transaction_limit: number;
161
+ payment_transaction_limit_option: boolean;
162
+ active_days: number[];
163
+ holder_id: string;
164
+ bank_account_id: string;
165
+ organization_id: string;
166
+ updated_at: string;
167
+ created_at: string;
168
+ shipped_at: string;
169
+ card_type: CardType;
170
+ card_level: PhysicalCardLevel;
171
+ payment_lifespan_limit: number;
172
+ payment_lifespan_spent: number;
173
+ pre_expires_at: string;
174
+ categories: CardCategory[];
175
+ renewed: boolean;
176
+ renewal: boolean;
177
+ parent_card_summary: {
178
+ id: string;
179
+ last_digits: string;
180
+ };
181
+ had_operation: boolean;
182
+ had_pin_operation: boolean;
183
+ card_design: CardDesign;
184
+ type_of_print: TypeOfPrint;
185
+ upsold: boolean;
186
+ upsell: boolean;
187
+ discard_on: string;
188
+ reordered: boolean;
189
+ }
190
+ export interface UnlockCardSettings {
191
+ cardId: string;
192
+ }
193
+ /**
194
+ * Object passed to `displayCard`. It allows operating
195
+ * with the UI the function injects in the calling page.
196
+ *
197
+ * @example
198
+ * ```ts
199
+ * displayCard({
200
+ * cardId: '123',
201
+ * allowPinReveal: true,
202
+ * allowBlocking: false,
203
+ * });
204
+ * ```
205
+ **/
206
+ export interface DisplayCardSettings {
207
+ /**
208
+ * The ID of the card to display.
209
+ **/
210
+ cardId: string;
211
+ /**
212
+ * Whether to show the `Show PIN` button in the UI.
213
+ *
214
+ * If nothing is passed, defaults to `false`.
215
+ **/
216
+ allowPinReveal?: boolean;
217
+ /**
218
+ * Whether to show the `Block Card` button in the UI.
219
+ *
220
+ * If the card is already blocked, the button will be hidden even if the value is `true`.
221
+ *
222
+ * If nothing is passed, defaults to `false`.
223
+ **/
224
+ allowBlocking?: boolean;
225
+ }
226
+ /**
227
+ * Object returned from calls to `displayCard`. It allows operating
228
+ * with the UI the function injects in the calling page.
229
+ **/
230
+ export interface DisplayCardReturnObject {
231
+ /**
232
+ * A function that will destroy the Embed UI injected when
233
+ * `displayCard` was called and will remove it from the page.
234
+ **/
235
+ destroyEmbedUI: () => void;
236
+ }
237
+ export {};
238
+ //# sourceMappingURL=cards.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.types.d.ts","sourceRoot":"","sources":["../../src/cards/cards.types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;CACpB;AAGD,eAAO,MAAM,cAAc;;;;;;;;;;;;CAY1B,CAAC;AAEF,KAAK,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEzE,KAAK,UAAU,GACX,gCAAgC,GAChC,iBAAiB,GACjB,mCAAmC,GACnC,kCAAkC,GAClC,kCAAkC,GAClC,2BAA2B,GAC3B,yBAAyB,GACzB,sBAAsB,GACtB,sBAAsB,GACtB,oBAAoB,GACpB,0BAA0B,CAAC;AAE/B,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpC,KAAK,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/C,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,C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;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,mBAAmB,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;IAYI;AACJ,MAAM,WAAW,mBAAmB;IAClC;;QAEI;IACJ,MAAM,EAAE,MAAM,CAAC;IACf;;;;QAII;IACJ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;QAMI;IACJ,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;IAGI;AACJ,MAAM,WAAW,uBAAuB;IACtC;;;QAGI;IACJ,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,5 @@
1
+ import { type CardOrderSettings, type DisplayCardSettings, type UnlockCardSettings, type VirtualCardOrderSettings } from '@cards/cards.types';
2
+ export declare function validateOrderCardParams(params: CardOrderSettings): void | VirtualCardOrderSettings;
3
+ export declare function validateUnlockCardParams(params: UnlockCardSettings): void;
4
+ export declare function validateDisplayCardParams(params: DisplayCardSettings): DisplayCardSettings;
5
+ //# sourceMappingURL=cards.validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.validate.d.ts","sourceRoot":"","sources":["../../src/cards/cards.validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAC;AAyB5B,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,mCAWhE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,QAelE;AAqND,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,uBAkCpE"}
@@ -0,0 +1,7 @@
1
+ export declare const cards: {
2
+ getCards: typeof import("./cards").getCards;
3
+ orderCard: typeof import("./cards").orderCard;
4
+ unlockCard: typeof import("./cards").unlockCard;
5
+ displayCard: typeof import("./cards").displayCard;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cards/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK;;;;;CAAuB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A singleton class to manage authentication tokens
3
+ */
4
+ export declare class AuthManager {
5
+ private static instance;
6
+ private accessToken;
7
+ private constructor();
8
+ /**
9
+ * Gets the singleton instance of AuthManager
10
+ */
11
+ static getInstance(): AuthManager;
12
+ /**
13
+ * Sets the access token
14
+ * @param token - The access token to store
15
+ */
16
+ setAccessToken(token: string): void;
17
+ /**
18
+ * Gets the current access token
19
+ * @returns The current access token or null if not set
20
+ */
21
+ getAccessToken(): string | null;
22
+ /**
23
+ * Checks if an access token is present
24
+ * @returns True if an access token exists, false otherwise
25
+ */
26
+ hasAccessToken(): boolean;
27
+ /**
28
+ * Clears the current access token
29
+ */
30
+ clearAccessToken(): void;
31
+ }
32
+ export declare const authManager: AuthManager;
33
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/common/auth/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IACrC,OAAO,CAAC,WAAW,CAAuB;IAE1C,OAAO;IAIP;;OAEG;WACW,WAAW,IAAI,WAAW;IAOxC;;;OAGG;IACI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI1C;;;OAGG;IACI,cAAc,IAAI,MAAM,GAAG,IAAI;IAItC;;;OAGG;IACI,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACI,gBAAgB,IAAI,IAAI;CAGhC;AAGD,eAAO,MAAM,WAAW,aAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auth.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.test.d.ts","sourceRoot":"","sources":["../../../src/common/auth/auth.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function validatePresenceOfAuthToken(): string | null;
2
+ //# sourceMappingURL=auth.validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.validate.d.ts","sourceRoot":"","sources":["../../../src/common/auth/auth.validate.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,kBAK1C"}
@@ -0,0 +1,3 @@
1
+ export { authManager } from './auth';
2
+ export { validatePresenceOfAuthToken } from './auth.validate';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { initialize, logout } from './initialize';
2
+ import * as constants from './constants';
3
+ declare const common: {
4
+ initialize: typeof initialize;
5
+ logout: typeof logout;
6
+ constants: typeof constants;
7
+ };
8
+ export { common };
9
+ //# sourceMappingURL=common.public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.public-api.d.ts","sourceRoot":"","sources":["../../src/common/common.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,QAAA,MAAM,MAAM;;;;CAAoC,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,CAAC"}