@qonto/embed-sdk 0.68.0 → 0.70.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 (86) hide show
  1. package/dist/auth-links/client/auth-links.client.d.ts +1 -1
  2. package/dist/beneficiaries/beneficiaries.d.ts +1 -1
  3. package/dist/beneficiaries/beneficiaries.d.ts.map +1 -1
  4. package/dist/beneficiaries/client/beneficiaries.client.d.ts +1 -1
  5. package/dist/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
  6. package/dist/beneficiaries/index.server.d.ts +1 -1
  7. package/dist/cards/client/cards.client.d.ts +1 -1
  8. package/dist/cards/index.d.ts +2 -2
  9. package/dist/cards/server/cards.server.d.ts +1 -1
  10. package/dist/common/constants.d.ts +18 -0
  11. package/dist/common/constants.d.ts.map +1 -1
  12. package/dist/common/initialize/initialize.d.ts +22 -14
  13. package/dist/common/initialize/initialize.d.ts.map +1 -1
  14. package/dist/iframe/embed-iframe.d.ts +9 -0
  15. package/dist/iframe/embed-iframe.d.ts.map +1 -1
  16. package/dist/index.umd.js +1 -1
  17. package/dist/mocks/handlers.d.ts +2 -1
  18. package/dist/mocks/handlers.d.ts.map +1 -1
  19. package/dist/organizations/client/organizations.client.d.ts +33 -1
  20. package/dist/organizations/client/organizations.client.d.ts.map +1 -1
  21. package/dist/organizations/index.d.ts +3 -0
  22. package/dist/organizations/index.d.ts.map +1 -1
  23. package/dist/organizations/index.server.d.ts +3 -0
  24. package/dist/organizations/index.server.d.ts.map +1 -1
  25. package/dist/organizations/server/organizations.server.d.ts +24 -1
  26. package/dist/organizations/server/organizations.server.d.ts.map +1 -1
  27. package/dist/organizations/shared/organizations.api.d.ts +11 -1
  28. package/dist/organizations/shared/organizations.api.d.ts.map +1 -1
  29. package/dist/organizations/shared/organizations.serializer.d.ts +2 -1
  30. package/dist/organizations/shared/organizations.serializer.d.ts.map +1 -1
  31. package/dist/organizations/shared/organizations.types.d.ts +54 -0
  32. package/dist/organizations/shared/organizations.types.d.ts.map +1 -1
  33. package/dist/payment-links/client/payment-links.client.d.ts +2 -2
  34. package/dist/server/_virtual/index.js +1 -1
  35. package/dist/server/_virtual/index2.js +1 -1
  36. package/dist/server/auth-links/client/auth-links.client.d.ts +1 -1
  37. package/dist/server/beneficiaries/beneficiaries.d.ts +1 -1
  38. package/dist/server/beneficiaries/beneficiaries.d.ts.map +1 -1
  39. package/dist/server/beneficiaries/client/beneficiaries.client.d.ts +1 -1
  40. package/dist/server/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
  41. package/dist/server/beneficiaries/index.server.d.ts +1 -1
  42. package/dist/server/cards/client/cards.client.d.ts +1 -1
  43. package/dist/server/cards/index.d.ts +2 -2
  44. package/dist/server/cards/server/cards.server.d.ts +1 -1
  45. package/dist/server/common/constants.d.ts +18 -0
  46. package/dist/server/common/constants.d.ts.map +1 -1
  47. package/dist/server/common/initialize/initialize.d.ts +22 -14
  48. package/dist/server/common/initialize/initialize.d.ts.map +1 -1
  49. package/dist/server/iframe/embed-iframe.d.ts +9 -0
  50. package/dist/server/iframe/embed-iframe.d.ts.map +1 -1
  51. package/dist/server/index.server.umd.js +1 -1
  52. package/dist/server/mocks/handlers.d.ts +2 -1
  53. package/dist/server/mocks/handlers.d.ts.map +1 -1
  54. package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.43.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js +1 -1
  55. package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.43.1/node_modules/@amplitude/analytics-core/lib/esm/utils/safe-stringify.js +1 -1
  56. package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.24.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture/track-thrashed-cursor.js +1 -1
  57. package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.24.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture-plugin.js +1 -1
  58. package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.24.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/frustration-plugin.js +1 -1
  59. package/dist/server/node_modules/.pnpm/@amplitude_plugin-autocapture-browser@1.24.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/observables.js +1 -1
  60. package/dist/server/node_modules/.pnpm/@amplitude_plugin-network-capture-browser@1.9.10/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/network-capture-plugin.js +1 -1
  61. package/dist/server/organizations/client/organizations.client.d.ts +33 -1
  62. package/dist/server/organizations/client/organizations.client.d.ts.map +1 -1
  63. package/dist/server/organizations/index.d.ts +3 -0
  64. package/dist/server/organizations/index.d.ts.map +1 -1
  65. package/dist/server/organizations/index.server.d.ts +3 -0
  66. package/dist/server/organizations/index.server.d.ts.map +1 -1
  67. package/dist/server/organizations/server/organizations.server.d.ts +24 -1
  68. package/dist/server/organizations/server/organizations.server.d.ts.map +1 -1
  69. package/dist/server/organizations/shared/organizations.api.d.ts +11 -1
  70. package/dist/server/organizations/shared/organizations.api.d.ts.map +1 -1
  71. package/dist/server/organizations/shared/organizations.serializer.d.ts +2 -1
  72. package/dist/server/organizations/shared/organizations.serializer.d.ts.map +1 -1
  73. package/dist/server/organizations/shared/organizations.types.d.ts +54 -0
  74. package/dist/server/organizations/shared/organizations.types.d.ts.map +1 -1
  75. package/dist/server/payment-links/client/payment-links.client.d.ts +2 -2
  76. package/dist/server/src/organizations/index.server.js +1 -1
  77. package/dist/server/src/organizations/server/organizations.server.js +1 -1
  78. package/dist/server/src/organizations/shared/organizations.api.js +1 -1
  79. package/dist/server/src/organizations/shared/organizations.serializer.js +1 -1
  80. package/dist/src/common/constants.js +1 -1
  81. package/dist/src/iframe/embed-iframe.js +1 -1
  82. package/dist/src/organizations/client/organizations.client.js +1 -1
  83. package/dist/src/organizations/index.js +1 -1
  84. package/dist/src/organizations/shared/organizations.api.js +1 -1
  85. package/dist/src/organizations/shared/organizations.serializer.js +1 -1
  86. package/package.json +1 -1
@@ -40,7 +40,7 @@ export interface AuthLinkClientParams {
40
40
  * },
41
41
  * operationSettings: {
42
42
  * proxyEndpointDescriptor: {
43
- * url: '/api/qonto-proxy',
43
+ * path: '/api/qonto-proxy',
44
44
  * method: 'POST',
45
45
  * },
46
46
  * }
@@ -94,7 +94,7 @@ export declare function updateBeneficiary({ beneficiarySettings, operationSettin
94
94
  * - `beneficiarySettings`: An object with the list of beneficiary IDs to
95
95
  * trust (e.g., `{ beneficiaryIds: string[] }`).
96
96
  * - `operationSettings`: An object with operation-level settings such as
97
- * `accessToken`, `stagingToken`, `parentElementId`, and other optional
97
+ * `accessToken`, `stagingToken`, `uiParentElementId`, and other optional
98
98
  * parameters. See {@link BeneficiaryParams}.
99
99
  *
100
100
  * @returns A promise that resolves to an array of trusted beneficiaries.
@@ -1 +1 @@
1
- {"version":3,"file":"beneficiaries.d.ts","sourceRoot":"","sources":["../../src/beneficiaries/beneficiaries.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,2CAA2C,CAAC;AAenD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,8BAA8B,CAAC;AAStC;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,CAuDnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WA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E,iBAAiB,CAAC,KAAK,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,CAuDnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA2BrE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA8B1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAsCzE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAwB1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CA2B1E"}
@@ -99,7 +99,7 @@ export declare function updateBeneficiary({ beneficiarySettings, operationSettin
99
99
  * - `beneficiarySettings`: An object with the list of beneficiary IDs to
100
100
  * trust (e.g., `{ beneficiaryIds: string[] }`).
101
101
  * - `operationSettings`: An object with operation-level settings such as
102
- * `accessToken`, `stagingToken`, `parentElementId`, and other optional
102
+ * `accessToken`, `stagingToken`, `uiParentElementId`, and other optional
103
103
  * parameters.
104
104
  *
105
105
  * @returns A promise that resolves to an array of trusted beneficiaries.
@@ -1 +1 @@
1
- {"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAuB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA6B/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyB1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAuBA"}
1
+ {"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAsB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA0B/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyB1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAsBA"}
@@ -7,7 +7,7 @@ import { addBeneficiary, getBeneficiaries, getBeneficiary, untrustBeneficiaries,
7
7
  *
8
8
  * It can be accessed like this:
9
9
  * ```ts
10
- * import { beneficiaries } from `'@qonto/embed-sdk/server/beneficiaries'`;
10
+ * import { beneficiaries } from '@qonto/embed-sdk/server/beneficiaries';
11
11
  * ```
12
12
  *
13
13
  * Then, the beneficiaries object contains the functions to perform beneficiary operations:
@@ -43,7 +43,7 @@ export declare function getCards(getCardsParams?: CardClientParams<{
43
43
  * - `operationSettings`: An object with `proxyEndpointDescriptor` (required), `stagingToken`,
44
44
  * and other optional parameters.
45
45
  * @returns A promise that resolves to a card.
46
- * @throws `InvalidParametersError` If the cardId is not provided, not a string, or
46
+ * @throws `InvalidParametersError` If the `cardId` is not provided, not a string, or
47
47
  * if proxyEndpointDescriptor is not provided.
48
48
  * @throws `EmbedApiError` If the API request fails or returns an error.
49
49
  */
@@ -35,12 +35,12 @@ import { displayCard, getCard, getCards, orderCard, unlockCard } from './client/
35
35
  *
36
36
  * await cards.orderCard({
37
37
  * cardSettings: { ... },
38
- * operationSettings: { proxyEndpointDescriptor, uiParentElementId: 'element-id' }
38
+ * operationSettings: { accessToken, uiParentElementId: 'element-id' }
39
39
  * });
40
40
  *
41
41
  * await cards.unlockCard({
42
42
  * cardSettings: { cardId: '...' },
43
- * operationSettings: { proxyEndpointDescriptor, uiParentElementId: 'element-id' }
43
+ * operationSettings: { accessToken, uiParentElementId: 'element-id' }
44
44
  * });
45
45
  * ```
46
46
  */
@@ -36,7 +36,7 @@ export declare function getCards(getCardsParams?: CardServerParams<{
36
36
  * - `operationSettings`: An object with `accessToken` (optional, falls back to global auth),
37
37
  * `stagingToken`, and other optional parameters.
38
38
  * @returns A promise that resolves to a card.
39
- * @throws `InvalidParametersError` If the cardId is not provided or not a string.
39
+ * @throws `InvalidParametersError` If the `cardId` is not provided or not a string.
40
40
  * @throws `AuthenticationError` If the `accessToken` is invalid or missing.
41
41
  * @throws `EmbedApiError` If the API request fails or returns an error.
42
42
  */
@@ -6,6 +6,23 @@ export declare const IFRAME_EVENTS: {
6
6
  * Emitted when the iframe is ready to be used.
7
7
  */
8
8
  READY: string;
9
+ /**
10
+ * Emitted when the mandate invitation link has loaded and the form is shown.
11
+ */
12
+ MANDATE_LOADED: string;
13
+ /**
14
+ * Emitted when the mandate has been signed.
15
+ */
16
+ MANDATE_SIGNED: string;
17
+ /**
18
+ * Emitted when the mandate could not be loaded or signed.
19
+ */
20
+ MANDATE_ERROR: string;
21
+ /**
22
+ * Emitted when the content height changes. The SDK also uses it to resize
23
+ * the iframe.
24
+ */
25
+ RESIZE: string;
9
26
  };
10
27
  /**
11
28
  * List of possible actions that can be performed in the iframe.
@@ -197,5 +214,6 @@ export declare const AUTH_LINK_ACTIONS: {
197
214
  };
198
215
  export declare const HTTP_CODES: {
199
216
  PRECONDITION_REQUIRED: number;
217
+ UNAUTHORIZED: number;
200
218
  };
201
219
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;;CAEJ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;CAUnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CAQpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;CAQ7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;IACtB;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;;OAKG;;CAEJ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;CAGzB,CA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 -1,19 +1,23 @@
1
1
  import type { InitializeParams } from './initialize.types';
2
2
  /**
3
- * Initializes the SDK with the provided parameters. Despite the SDK can be used
4
- * without calling this function beforehand, in stateful environments like in a
5
- * single page application running in a browser, it is recommended. This is true
6
- * because the `initialize` function accepts some parameters that in case of not
7
- * being passed to it, they would have to be passed in every function call made
8
- * to the SDK.
9
- * In order to easier call functions afterwards, this function has to be called
10
- * before using any other SDK functions, and as the bare minimum, it requires an
11
- * access token.
12
- * It's useful to rely on the exposed SDK constants to pass some of the parameters.
3
+ * Initializes the SDK with the provided parameters. Calling this function is
4
+ * not mandatory, but in stateful environments like in a single page application
5
+ * running in a browser, it is recommended. The `initialize` function is useful
6
+ * to pass data to the SDK that otherwise would have to be passed in every
7
+ * function call.
8
+ * In order to call functions afterward without having to pass repetitive
9
+ * parameters to them, it is helpful to call this function before using any
10
+ * other SDK functions. In client side environments, it expects at least the
11
+ * `operationSettings.proxyEndpointDescriptor` param, while in server side
12
+ * environments it expects at least an `accessToken`.
13
+ * It's also useful to rely on the exposed SDK constants to pass some of the
14
+ * parameters.
13
15
  * @param initializeParams - An object with the parameters to initialize the SDK.
14
- * The only required parameter is the `accessToken`.
15
- * - `accessToken`: The access token to authenticate the user. This has to be previously
16
- * generated using the OAuth authentication flow.
16
+ * The only required parameter is the `proxyEndpointDescriptor` in client
17
+ * environments or `accessToken` in server environments.
18
+ * - `accessToken`: The access token to authenticate the user. This has to be
19
+ * previously generated using the OAuth authentication flow. Only needed in
20
+ * server side usage, and not recommended in client side.
17
21
  * - `environment`: Optional parameter to set the SDK's environment. If not provided,
18
22
  * the SDK will default to `ENVIRONMENTS.PRODUCTION`. Use `ENVIRONMENTS.STAGING` to set
19
23
  * the SDK to staging.
@@ -24,7 +28,11 @@ import type { InitializeParams } from './initialize.types';
24
28
  * - `operationSettings`: Optional settings to configure the SDK's operations that will
25
29
  * be performed after the initialization. This can be also provided when calling the
26
30
  * operation functions themselves.
27
- * - `uiParentElementId`: The id of the DOM element where the SDK will be rendered.
31
+ * - `uiParentElementId`: The id of the DOM element where the SDK will render UI
32
+ * in those functions that involve rendering UI in the caller website. Normally,
33
+ * it will make more sense to add this param when calling functions that require
34
+ * rendering UI, because each function call will likely render the UI under a
35
+ * different parent.
28
36
  * - `mfaPreference`: The MFA preference to use for the operations. This can be either
29
37
  * `MFA_METHODS.PASSKEY`, `MFA_METHODS.PAIRED_DEVICE` or `MFA_METHODS.SMS_OTP`. If not
30
38
  * provided, the SDK will default to `MFA_METHODS.PASSKEY`.
@@ -1 +1 @@
1
- {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../src/common/initialize/initialize.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,QAqC5D;AAED;;;;GAIG;AACH,wBAAgB,MAAM,SAMrB"}
1
+ {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../src/common/initialize/initialize.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,wBAAgB,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,QAqC5D;AAED;;;;GAIG;AACH,wBAAgB,MAAM,SAMrB"}
@@ -1,5 +1,10 @@
1
1
  import type { UIParentElementId } from '@validation/operation-settings-validation.ts';
2
2
  import type { IframeMessage } from './iframe.types';
3
+ export interface IframeFrameEvent {
4
+ eventId: string;
5
+ payload?: Record<string, unknown>;
6
+ }
7
+ type FrameEventHandler = (event: IframeFrameEvent) => void;
3
8
  interface IframeOptions {
4
9
  parentElementId: UIParentElementId;
5
10
  iframeUrl: string;
@@ -10,11 +15,15 @@ export declare class EmbedIframe {
10
15
  private iframe;
11
16
  private parentElement;
12
17
  private messageListeners;
18
+ private frameEventHandlers;
13
19
  private readonly defaultTimeout;
14
20
  private targetOrigin;
15
21
  constructor(options: IframeOptions);
16
22
  initialize(): Promise<EmbedIframe>;
17
23
  postMessage(message: IframeMessage): Promise<unknown>;
24
+ onFrameEvent(handler: FrameEventHandler): () => void;
25
+ private frameEventListener;
26
+ private resize;
18
27
  private addMessageListener;
19
28
  private removeMessageListener;
20
29
  destroy(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"embed-iframe.d.ts","sourceRoot":"","sources":["../../src/iframe/embed-iframe.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,UAAU,aAAa;IACrB,eAAe,EAAE,iBAAiB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,WAAW;IAQV,OAAO,CAAC,OAAO;IAP3B,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,gBAAgB,CACZ;IACZ,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,YAAY,CAAS;gBAET,OAAO,EAAE,aAAa;IAKpC,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC;IA0CxC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IA+BrD,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,qBAAqB;IAc7B,OAAO,IAAI,IAAI;CAehB"}
1
+ {"version":3,"file":"embed-iframe.d.ts","sourceRoot":"","sources":["../../src/iframe/embed-iframe.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,E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