@qonto/embed-sdk 0.67.0 → 0.68.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 (70) hide show
  1. package/dist/cards/client/cards.client.d.ts.map +1 -1
  2. package/dist/common/common.types.d.ts +0 -1
  3. package/dist/common/common.types.d.ts.map +1 -1
  4. package/dist/common/common.utils.d.ts +3 -4
  5. package/dist/common/common.utils.d.ts.map +1 -1
  6. package/dist/common/initialize/initialize.validate.d.ts.map +1 -1
  7. package/dist/common/operation-settings/operation-settings.d.ts +0 -2
  8. package/dist/common/operation-settings/operation-settings.d.ts.map +1 -1
  9. package/dist/index.umd.js +5 -5
  10. package/dist/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
  11. package/dist/sepa-transfers/bulk-transfers/index.d.ts +1 -1
  12. package/dist/sepa-transfers/shared/sepa-transfers.api.d.ts +3 -3
  13. package/dist/server/_virtual/index.js +1 -1
  14. package/dist/server/_virtual/index2.js +1 -1
  15. package/dist/server/cards/client/cards.client.d.ts.map +1 -1
  16. package/dist/server/common/common.types.d.ts +0 -1
  17. package/dist/server/common/common.types.d.ts.map +1 -1
  18. package/dist/server/common/common.utils.d.ts +3 -4
  19. package/dist/server/common/common.utils.d.ts.map +1 -1
  20. package/dist/server/common/initialize/initialize.validate.d.ts.map +1 -1
  21. package/dist/server/common/operation-settings/operation-settings.d.ts +0 -2
  22. package/dist/server/common/operation-settings/operation-settings.d.ts.map +1 -1
  23. package/dist/server/index.server.umd.js +1 -1
  24. package/dist/server/node_modules/.pnpm/@amplitude_analytics-core@2.43.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js +1 -1
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. package/dist/server/sepa-transfers/bulk-transfers/client/bulk-transfers.client.d.ts.map +1 -1
  32. package/dist/server/sepa-transfers/bulk-transfers/index.d.ts +1 -1
  33. package/dist/server/sepa-transfers/shared/sepa-transfers.api.d.ts +3 -3
  34. package/dist/server/src/common/common.utils.js +1 -1
  35. package/dist/server/src/common/operation-settings/operation-settings.js +1 -1
  36. package/dist/server/src/errors/AuthenticationError.js +1 -1
  37. package/dist/server/src/validation/operation-settings-validation.js +1 -1
  38. package/dist/server/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
  39. package/dist/server/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.d.ts +1 -1
  40. package/dist/server/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.d.ts.map +1 -1
  41. package/dist/server/ui/ui-elements/transaction-list/create-transaction-list-element.d.ts +1 -1
  42. package/dist/server/ui/ui-elements/transaction-list/transaction-list.d.ts.map +1 -1
  43. package/dist/server/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts +1 -1
  44. package/dist/server/ui/ui-elements.types.d.ts +2 -3
  45. package/dist/server/ui/ui-elements.types.d.ts.map +1 -1
  46. package/dist/server/validation/operation-settings-validation.d.ts +8 -45
  47. package/dist/server/validation/operation-settings-validation.d.ts.map +1 -1
  48. package/dist/src/cards/client/cards.client.js +1 -1
  49. package/dist/src/common/common.utils.js +1 -1
  50. package/dist/src/common/initialize/initialize.validate.js +1 -1
  51. package/dist/src/common/operation-settings/operation-settings.js +1 -1
  52. package/dist/src/errors/AuthenticationError.js +1 -1
  53. package/dist/src/sepa-transfers/client/sepa-transfers.client.js +1 -1
  54. package/dist/src/sepa-transfers/shared/sepa-transfers.utils.js +1 -1
  55. package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +1 -1
  56. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +7 -7
  57. package/dist/src/ui/ui-elements/transaction-list/transaction-list.js +4 -4
  58. package/dist/src/validation/operation-settings-validation.js +1 -1
  59. package/dist/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
  60. package/dist/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.d.ts +1 -1
  61. package/dist/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.d.ts.map +1 -1
  62. package/dist/ui/ui-elements/transaction-list/create-transaction-list-element.d.ts +1 -1
  63. package/dist/ui/ui-elements/transaction-list/transaction-list.d.ts.map +1 -1
  64. package/dist/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts +1 -1
  65. package/dist/ui/ui-elements.types.d.ts +2 -3
  66. package/dist/ui/ui-elements.types.d.ts.map +1 -1
  67. package/dist/validation/operation-settings-validation.d.ts +8 -45
  68. package/dist/validation/operation-settings-validation.d.ts.map +1 -1
  69. package/package.json +1 -1
  70. package/dist/server/src/errors/EmbedOperationError.js +0 -1
@@ -1,10 +1,10 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js";import{localized as t}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{sepaTransfers as r}from"../../../sepa-transfers/index.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as s}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{VOP_DECISIONS as c}from"../../../common/constants.js";import{setLocale as l}from"../localize/configure-localization.js";import{sepaTransferCreationStyles as p}from"./sepa-transfer-creation.styles.js";import"./pages/beneficiary-selection-page.js";import"./pages/transfer-details-page.js";import"./pages/transfer-summary-page.js";import"./pages/transfer-success-page.js";import"./pages/transfer-error-page.js";import"../../customizable-components/styles/styles.css.js";const m={BENEFICIARY_SELECTION:"beneficiary-selection",TRANSFER_DETAILS:"transfer-details",TRANSFER_SUMMARY:"transfer-summary",TRANSFER_SUCCESS:"transfer-success",TRANSFER_ERROR:"transfer-error"};let d=class extends o{constructor(){super(...arguments),this.locale="en",this.currentPage=m.BENEFICIARY_SELECTION,this.formData={beneficiary:void 0,accountToDebit:void 0,amount:"",reference:""},this.isCreatingTransfer=!1,this.handleRecipientInfoSubmitted=async e=>{const t=e.detail;if(this.formData={...this.formData,beneficiary:t.beneficiary},!this.operationSettings)return console.error("operationSettings is required to create transfer"),void(this.transferError="Missing configuration. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{this.currentPage=m.TRANSFER_DETAILS,this.transferCreationProcess=r.createSepaTransfer({sepaTransferSettings:{beneficiary:t.beneficiary},operationSettings:{...this.operationSettings?{proxyRequestFunction:this.operationSettings.proxyRequestFunction,proxyEndpointDescriptor:this.operationSettings.proxyEndpointDescriptor,mfaPreference:this.operationSettings.mfaPreference,debugMode:this.operationSettings.debugMode,locale:this.operationSettings.locale}:{},uiParentElementId:()=>{const e=document.querySelector("qonto-sepa-transfer-creation");return e?.shadowRoot?.getElementById("sca-container")}}});const e=await this.transferCreationProcess.next();this.vopResult=e.value}catch(e){console.error("Failed to start transfer creation:",e),this.transferError=e instanceof Error?e.message:"Failed to verify beneficiary. Please try again."}finally{this.isCreatingTransfer=!1}},this.handleTransferDetailsSubmitted=e=>{const t=e.detail;this.formData={...this.formData,accountToDebit:t.accountToDebit,amount:t.amount,reference:t.reference},this.currentPage=m.TRANSFER_SUMMARY},this.handleGoToStep=e=>{this.currentPage=e.detail.step},this.handleTransferConfirmed=async e=>{const t=e.detail;if(!this.transferCreationProcess||!this.formData.accountToDebit)return console.error("Transfer creation process not initialized"),void(this.transferError="Transfer process not initialized. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{const e=parseFloat(t.amount);if(isNaN(e)||e<=0)throw new Error("Invalid transfer amount");const r=await this.transferCreationProcess.next({vopDecision:c.ACCEPT,sepaTransferSettings:{bankAccountId:this.formData.accountToDebit.id,amount:e,reference:t.reference}});r.value&&"transfer"in r.value&&(this.dispatchEvent(new CustomEvent("sepa-transfer-created",{detail:r.value.transfer,bubbles:!0,composed:!0})),this.currentPage=m.TRANSFER_SUCCESS)}catch(e){this.transferError=e instanceof Error?e.message:"Failed to create transfer. Please try again.",this.currentPage=m.TRANSFER_ERROR}finally{this.isCreatingTransfer=!1}}}connectedCallback(){super.connectedCallback(),l(this.locale),this.addEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.addEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.addEventListener("go-to-step",this.handleGoToStep),this.addEventListener("transfer-confirmed",this.handleTransferConfirmed)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.removeEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.removeEventListener("go-to-step",this.handleGoToStep),this.removeEventListener("transfer-confirmed",this.handleTransferConfirmed)}updated(e){e.has("locale")&&l(this.locale)}render(){return s`
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js";import{localized as t}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{sepaTransfers as r}from"../../../sepa-transfers/index.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as s}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as i}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{VOP_DECISIONS as l}from"../../../common/constants.js";import{setLocale as c}from"../localize/configure-localization.js";import{sepaTransferCreationStyles as m}from"./sepa-transfer-creation.styles.js";import"./pages/beneficiary-selection-page.js";import"./pages/transfer-details-page.js";import"./pages/transfer-summary-page.js";import"./pages/transfer-success-page.js";import"./pages/transfer-error-page.js";import"../../customizable-components/styles/styles.css.js";const p={BENEFICIARY_SELECTION:"beneficiary-selection",TRANSFER_DETAILS:"transfer-details",TRANSFER_SUMMARY:"transfer-summary",TRANSFER_SUCCESS:"transfer-success",TRANSFER_ERROR:"transfer-error"};let d=class extends i{constructor(){super(...arguments),this.locale="en",this.currentPage=p.BENEFICIARY_SELECTION,this.formData={beneficiary:void 0,accountToDebit:void 0,amount:"",reference:""},this.isCreatingTransfer=!1,this.handleRecipientInfoSubmitted=async e=>{const t=e.detail;if(this.formData={...this.formData,beneficiary:t.beneficiary},!this.operationSettings)return console.error("operationSettings is required to create transfer"),void(this.transferError="Missing configuration. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{this.currentPage=p.TRANSFER_DETAILS,this.transferCreationProcess=r.createSepaTransfer({sepaTransferSettings:{beneficiary:t.beneficiary},operationSettings:{...this.operationSettings?{proxyEndpointDescriptor:this.operationSettings.proxyEndpointDescriptor,mfaPreference:this.operationSettings.mfaPreference,debugMode:this.operationSettings.debugMode,locale:this.operationSettings.locale}:{},uiParentElementId:()=>{const e=document.querySelector("qonto-sepa-transfer-creation");return e?.shadowRoot?.getElementById("sca-container")}}});const e=await this.transferCreationProcess.next();this.vopResult=e.value}catch(e){console.error("Failed to start transfer creation:",e),this.transferError=e instanceof Error?e.message:"Failed to verify beneficiary. Please try again."}finally{this.isCreatingTransfer=!1}},this.handleTransferDetailsSubmitted=e=>{const t=e.detail;this.formData={...this.formData,accountToDebit:t.accountToDebit,amount:t.amount,reference:t.reference},this.currentPage=p.TRANSFER_SUMMARY},this.handleGoToStep=e=>{this.currentPage=e.detail.step},this.handleTransferConfirmed=async e=>{const t=e.detail;if(!this.transferCreationProcess||!this.formData.accountToDebit)return console.error("Transfer creation process not initialized"),void(this.transferError="Transfer process not initialized. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{const e=parseFloat(t.amount);if(isNaN(e)||e<=0)throw new Error("Invalid transfer amount");const r=await this.transferCreationProcess.next({vopDecision:l.ACCEPT,sepaTransferSettings:{bankAccountId:this.formData.accountToDebit.id,amount:e,reference:t.reference}});r.value&&"transfer"in r.value&&(this.dispatchEvent(new CustomEvent("sepa-transfer-created",{detail:r.value.transfer,bubbles:!0,composed:!0})),this.currentPage=p.TRANSFER_SUCCESS)}catch(e){this.transferError=e instanceof Error?e.message:"Failed to create transfer. Please try again.",this.currentPage=p.TRANSFER_ERROR}finally{this.isCreatingTransfer=!1}}}connectedCallback(){super.connectedCallback(),c(this.locale),this.addEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.addEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.addEventListener("go-to-step",this.handleGoToStep),this.addEventListener("transfer-confirmed",this.handleTransferConfirmed)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.removeEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.removeEventListener("go-to-step",this.handleGoToStep),this.removeEventListener("transfer-confirmed",this.handleTransferConfirmed)}updated(e){e.has("locale")&&c(this.locale)}render(){return s`
2
2
  <div data-router-outlet>
3
3
  <div id="sca-container" data-sca-modal></div>
4
- ${(()=>{switch(this.currentPage){case m.BENEFICIARY_SELECTION:return s`<qonto-beneficiary-selection-page
4
+ ${(()=>{switch(this.currentPage){case p.BENEFICIARY_SELECTION:return s`<qonto-beneficiary-selection-page
5
5
  .operationSettings=${this.operationSettings}
6
6
  .locale=${this.locale}
7
- ></qonto-beneficiary-selection-page>`;case m.TRANSFER_DETAILS:return s`<qonto-transfer-details-page
7
+ ></qonto-beneficiary-selection-page>`;case p.TRANSFER_DETAILS:return s`<qonto-transfer-details-page
8
8
  .locale=${this.locale}
9
9
  .operationSettings=${this.operationSettings}
10
10
  .beneficiary=${this.formData.beneficiary}
@@ -13,7 +13,7 @@ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
13
13
  .transferReference=${this.formData.reference}
14
14
  .vopResult=${this.vopResult}
15
15
  .isLoadingVop=${this.isCreatingTransfer}
16
- ></qonto-transfer-details-page>`;case m.TRANSFER_SUMMARY:return s`<qonto-transfer-summary-page
16
+ ></qonto-transfer-details-page>`;case p.TRANSFER_SUMMARY:return s`<qonto-transfer-summary-page
17
17
  .locale=${this.locale}
18
18
  .operationSettings=${this.operationSettings}
19
19
  .beneficiary=${this.formData.beneficiary}
@@ -23,10 +23,10 @@ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
23
23
  .vopResult=${this.vopResult}
24
24
  .isConfirming=${this.isCreatingTransfer}
25
25
  .error=${this.transferError}
26
- ></qonto-transfer-summary-page>`;case m.TRANSFER_SUCCESS:return s`<qonto-transfer-success-page
26
+ ></qonto-transfer-summary-page>`;case p.TRANSFER_SUCCESS:return s`<qonto-transfer-success-page
27
27
  .locale=${this.locale}
28
- ></qonto-transfer-success-page>`;case m.TRANSFER_ERROR:return s`<qonto-transfer-error-page
28
+ ></qonto-transfer-success-page>`;case p.TRANSFER_ERROR:return s`<qonto-transfer-error-page
29
29
  .locale=${this.locale}
30
30
  ></qonto-transfer-error-page>`}})()}
31
31
  </div>
32
- `}};d.styles=p,e([n({type:Object})],d.prototype,"operationSettings",void 0),e([n({type:String})],d.prototype,"locale",void 0),e([a()],d.prototype,"currentPage",void 0),e([a()],d.prototype,"formData",void 0),e([a()],d.prototype,"transferCreationProcess",void 0),e([a()],d.prototype,"vopResult",void 0),e([a()],d.prototype,"isCreatingTransfer",void 0),e([a()],d.prototype,"transferError",void 0),d=e([t(),i("qonto-sepa-transfer-creation")],d);export{m as SEPA_TRANSFER_PAGES,d as SepaTransferCreation};
32
+ `}};d.styles=m,e([n({type:Object})],d.prototype,"operationSettings",void 0),e([n({type:String})],d.prototype,"locale",void 0),e([a()],d.prototype,"currentPage",void 0),e([a()],d.prototype,"formData",void 0),e([a()],d.prototype,"transferCreationProcess",void 0),e([a()],d.prototype,"vopResult",void 0),e([a()],d.prototype,"isCreatingTransfer",void 0),e([a()],d.prototype,"transferError",void 0),d=e([t(),o("qonto-sepa-transfer-creation")],d);export{p as SEPA_TRANSFER_PAGES,d as SepaTransferCreation};
@@ -1,8 +1,8 @@
1
- import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js";import{str as e}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as o}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as i}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{transactions as n}from"../../../transactions/index.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as d}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{formatDate as p}from"../../customizable-components/utils/format-date.js";import{TransactionSelectedEvent as m}from"./transaction-list.events.js";import{tableStyles as c}from"../../customizable-components/styles/component-styles/table-styles.js";import{renderLoadingTableRowsMarkup as h}from"../list-utils/list.utils.js";import{setLocale as u,getLocale as g}from"../localize/configure-localization.js";import"../../customizable-components/styles/styles.css.js";import"../../customizable-components/button/qonto-button.js";import"../../customizable-components/text/qonto-text-body.js";let y=class extends s{constructor(){super(...arguments),this.isLoading=!1}connectedCallback(){super.connectedCallback(),u(this.operationSettings?.locale||"en"),this.fetchTransactions()}updated(t){t.has("locale")&&u(this.operationSettings?.locale||"en")}async fetchTransactions(t){if(this.operationSettings){this.isLoading=!0,this.error=void 0;try{const{paginationSettings:e={}}=this.operationSettings,o=await n.getTransactions({transactionSettings:this.transactionSettings,operationSettings:{proxyRequestFunction:this.operationSettings.proxyRequestFunction,proxyEndpointDescriptor:this.operationSettings.proxyEndpointDescriptor,locale:this.operationSettings.locale,paginationSettings:{page:t??e.page??1,itemsPerPage:e.itemsPerPage??20}}});this.transactions=o.transactions,this.paginationState=o.meta}catch(t){console.error("Failed to load transactions:",t),this.error=o("Failed to load transactions. Please try again.")}finally{this.isLoading=!1}}else console.error("operationSettings is required to fetch transfers")}handleRowClick(t){this.dispatchEvent(new m({transaction:t}))}handlePreviousPage(){this.paginationState?.previousPage&&(this.transactions=void 0,this.fetchTransactions(this.paginationState.previousPage))}handleNextPage(){this.paginationState?.nextPage&&(this.transactions=void 0,this.fetchTransactions(this.paginationState.nextPage))}render(){return this.error?a`<qonto-text-body
1
+ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js";import{str as e}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as o}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as i}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{transactions as a}from"../../../transactions/index.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as n}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as d}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{formatDate as p}from"../../customizable-components/utils/format-date.js";import{TransactionSelectedEvent as m}from"./transaction-list.events.js";import{tableStyles as c}from"../../customizable-components/styles/component-styles/table-styles.js";import{renderLoadingTableRowsMarkup as h}from"../list-utils/list.utils.js";import{setLocale as u,getLocale as g}from"../localize/configure-localization.js";import"../../customizable-components/styles/styles.css.js";import"../../customizable-components/button/qonto-button.js";import"../../customizable-components/text/qonto-text-body.js";let y=class extends s{constructor(){super(...arguments),this.isLoading=!1}connectedCallback(){super.connectedCallback(),u(this.operationSettings?.locale||"en"),this.fetchTransactions()}updated(t){t.has("locale")&&u(this.operationSettings?.locale||"en")}async fetchTransactions(t){if(this.operationSettings){this.isLoading=!0,this.error=void 0;try{const{paginationSettings:e={}}=this.operationSettings,o=await a.getTransactions({transactionSettings:this.transactionSettings,operationSettings:{proxyEndpointDescriptor:this.operationSettings.proxyEndpointDescriptor,locale:this.operationSettings.locale,paginationSettings:{page:t??e.page??1,itemsPerPage:e.itemsPerPage??20}}});this.transactions=o.transactions,this.paginationState=o.meta}catch(t){console.error("Failed to load transactions:",t),this.error=o("Failed to load transactions. Please try again.")}finally{this.isLoading=!1}}else console.error("operationSettings is required to fetch transfers")}handleRowClick(t){this.dispatchEvent(new m({transaction:t}))}handlePreviousPage(){this.paginationState?.previousPage&&(this.transactions=void 0,this.fetchTransactions(this.paginationState.previousPage))}handleNextPage(){this.paginationState?.nextPage&&(this.transactions=void 0,this.fetchTransactions(this.paginationState.nextPage))}render(){return this.error?n`<qonto-text-body
2
2
  data-variant="error"
3
3
  data-display-level="body"
4
4
  >${this.error}</qonto-text-body
5
- >`:this.isLoading?h(this.paginationState?.itemsPerPage):a`
5
+ >`:this.isLoading?h(this.paginationState?.itemsPerPage):n`
6
6
  <table>
7
7
  <thead>
8
8
  <tr>
@@ -14,7 +14,7 @@ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
14
14
  </tr>
15
15
  </thead>
16
16
  <tbody>
17
- ${this.transactions?.map((t=>a`
17
+ ${this.transactions?.map((t=>n`
18
18
  <tr @click=${()=>this.handleRowClick(t)}>
19
19
  <td>${t.label}</td>
20
20
  <td>
@@ -30,7 +30,7 @@ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typesc
30
30
  `))}
31
31
  </tbody>
32
32
  </table>
33
- ${this.paginationState?a`<div data-pagination>
33
+ ${this.paginationState?n`<div data-pagination>
34
34
  <qonto-text-body data-variant="secondary" data-display-level="caption">
35
35
  ${o(e`Showing page ${this.paginationState.currentPage} of ${this.paginationState.totalPages} (${this.paginationState.totalItems} total items)`)}
36
36
  </qonto-text-body>
@@ -1 +1 @@
1
- import{MFA_METHODS as e}from"../common/constants.js";import{environmentManager as t}from"../common/environment/environment-manager.js";import{operationSettingsManager as n}from"../common/operation-settings/operation-settings.js";import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";const r={requiresUI:!1};function i(i,{requiresUI:s}=r){const p=i?.uiParentElementId||n.getUIParentElementId();if(s){if(!p)throw new o("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");if(!["string","function"].includes(typeof p))throw new o("operationSettings.uiParentElementId must be a string or a function returning an HTMLElement")}const u=i?.mfaPreference||n.getMFAPreference();if(u){const n=(c=Object.values(e),t.isProductionEnvironment()?c.filter((t=>t!==e.MOCK)):c);if(!n.includes(u))throw new o(`operationSettings.mfaPreference must be one of ${n.join(", ")}`);if(t.isProductionEnvironment()&&u===e.MOCK)throw new o("operationSettings.mfaPreference cannot be set to mock in production environment.")}var c;const a=i?.debugMode||n.getDebugMode();if(void 0!==a&&"boolean"!=typeof a)throw new o("operationSettings.debugMode must be a boolean.");const m=i?.proxyRequestFunction||n.getProxyRequestFunction();if(m&&"function"!=typeof m)throw new o("operationSettings.proxyRequestFunction must be a function.");const f=i?.proxyEndpointDescriptor||n.getProxyEndpointDescriptor();if(f&&!f.path)throw new o("operationSettings.proxyEndpointDescriptor must have at least a string-formatted path property.");return{...i,uiParentElementId:p,mfaPreference:u,debugMode:a,proxyRequestFunction:m,proxyEndpointDescriptor:f}}function s(e,t){const r=e?.proxyRequestFunction||n.getProxyRequestFunction(),i=e?.proxyEndpointDescriptor||n.getProxyEndpointDescriptor();if(!r&&!i)throw new o(t||"Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. If you need to use accessToken, import the server version of this module.");return{...e,proxyRequestFunction:r,proxyEndpointDescriptor:i}}export{s as validateClientOperationSettings,i as validateOperationSettingsParams};
1
+ import{MFA_METHODS as e}from"../common/constants.js";import{environmentManager as t}from"../common/environment/environment-manager.js";import{operationSettingsManager as n}from"../common/operation-settings/operation-settings.js";import{InvalidParametersError as o}from"../errors/InvalidParametersError.js";const r={requiresUI:!1};function i(i,{requiresUI:s}=r){const a=i?.uiParentElementId||n.getUIParentElementId();if(s){if(!a)throw new o("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");if(!["string","function"].includes(typeof a))throw new o("operationSettings.uiParentElementId must be a string or a function returning an HTMLElement")}const p=i?.mfaPreference||n.getMFAPreference();if(p){const n=(c=Object.values(e),t.isProductionEnvironment()?c.filter((t=>t!==e.MOCK)):c);if(!n.includes(p))throw new o(`operationSettings.mfaPreference must be one of ${n.join(", ")}`);if(t.isProductionEnvironment()&&p===e.MOCK)throw new o("operationSettings.mfaPreference cannot be set to mock in production environment.")}var c;const m=i?.debugMode||n.getDebugMode();if(void 0!==m&&"boolean"!=typeof m)throw new o("operationSettings.debugMode must be a boolean.");const f=i?.proxyEndpointDescriptor||n.getProxyEndpointDescriptor();if(f&&!f.path)throw new o("operationSettings.proxyEndpointDescriptor must have at least a string-formatted path property.");return{...i,uiParentElementId:a,mfaPreference:p,debugMode:m,proxyEndpointDescriptor:f}}function s(e,t){const r=e?.proxyEndpointDescriptor||n.getProxyEndpointDescriptor();if(!r)throw new o(t||"Client-side operations require proxyEndpointDescriptor. If you need to use accessToken, import the server version of this module.");return{...e,proxyEndpointDescriptor:r}}export{s as validateClientOperationSettings,i as validateOperationSettingsParams};
@@ -1 +1 @@
1
- {"version":3,"file":"qonto-sca-passkey-waiting.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,oEAAoE,CAAC;AAC5E,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAClE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AAMzD,qBAEa,sBAAuB,SAAQ,UAAU;IACpD,MAAM,CAAC,MAAM,0BAAgC;IAG7C,gBAAgB,EAAE,MAAM,CAAM;IAG9B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAG9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,OAAO,CAAC,WAAW,CAAkB;IAGrC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAO,CAAC,gBAAgB,CAEV;IAEd,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;YAKd,YAAY;IAkC1B,OAAO,CAAC,WAAW;YAOL,kBAAkB;YAwClB,iBAAiB;IAsB/B,OAAO,CAAC,gBAAgB;IAWxB,MAAM;CA4CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
1
+ {"version":3,"file":"qonto-sca-passkey-waiting.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,oEAAoE,CAAC;AAC5E,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAClE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AAMzD,qBAEa,sBAAuB,SAAQ,UAAU;IACpD,MAAM,CAAC,MAAM,0BAAgC;IAG7C,gBAAgB,EAAE,MAAM,CAAM;IAG9B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAG9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,OAAO,CAAC,WAAW,CAAkB;IAGrC,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAO,CAAC,gBAAgB,CAEV;IAEd,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;YAKd,YAAY;IAkC1B,OAAO,CAAC,WAAW;YAOL,kBAAkB;YAmClB,iBAAiB;IAsB/B,OAAO,CAAC,gBAAgB;IAWxB,MAAM;CA4CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
@@ -6,7 +6,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
6
6
  *
7
7
  * @param params - Object containing:
8
8
  * - containerElement: The DOM element where the component will be appended
9
- * - operationSettings: Settings passed to the component (accessToken, proxyRequestFunction, locale, etc.)
9
+ * - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, locale, etc.)
10
10
  * - uiElementSettings: Optional settings including event listeners
11
11
  */
12
12
  export declare function createSepaTransferCreationElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<never>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"sepa-transfer-creation.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAgBvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AASnF,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,iDAAiD,CAAC;AASzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,qBAEa,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAC,MAAM,0BAA8B;IAG3C,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,MAAM,EAAE,MAAM,CAAQ;IAGtB,OAAO,CAAC,WAAW,CACyB;IAG5C,OAAO,CAAC,QAAQ,CAKd;IAGF,OAAO,CAAC,uBAAuB,CAKjB;IAGd,OAAO,CAAC,SAAS,CAAoC;IAGrD,OAAO,CAAC,kBAAkB,CAAkB;IAG5C,OAAO,CAAC,aAAa,CAAqB;IAE1C,iBAAiB;IAkBjB,oBAAoB;IAoBpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,OAAO,CAAC,4BAA4B,CA8DlC;IAEF,OAAO,CAAC,8BAA8B,CAYpC;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,uBAAuB,CAkD7B;IAEF,MAAM;CA+CP"}
1
+ {"version":3,"file":"sepa-transfer-creation.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAgBvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AASnF,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,iDAAiD,CAAC;AASzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,qBAEa,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAC,MAAM,0BAA8B;IAG3C,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,MAAM,EAAE,MAAM,CAAQ;IAGtB,OAAO,CAAC,WAAW,CACyB;IAG5C,OAAO,CAAC,QAAQ,CAKd;IAGF,OAAO,CAAC,uBAAuB,CAKjB;IAGd,OAAO,CAAC,SAAS,CAAoC;IAGrD,OAAO,CAAC,kBAAkB,CAAkB;IAG5C,OAAO,CAAC,aAAa,CAAqB;IAE1C,iBAAiB;IAkBjB,oBAAoB;IAoBpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,OAAO,CAAC,4BAA4B,CA4DlC;IAEF,OAAO,CAAC,8BAA8B,CAYpC;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,uBAAuB,CAkD7B;IAEF,MAAM;CA+CP"}
@@ -7,7 +7,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
7
7
  *
8
8
  * @param params - Object containing:
9
9
  * - containerElement: The DOM element where the component will be appended
10
- * - operationSettings: Settings passed to the component (accessToken, proxyRequestFunction, paginationSettings, etc.)
10
+ * - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, paginationSettings, etc.)
11
11
  * - uiElementSettings: Optional settings including event listeners
12
12
  */
13
13
  export declare function createTransactionListElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<GetTransactionsSettings>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-list.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/transaction-list/transaction-list.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAMnF,OAAO,iDAAiD,CAAC;AACzD,OAAO,sDAAsD,CAAC;AAC9D,OAAO,uDAAuD,CAAC;AAE/D,qBAEa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAe;IAG5B,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAGzD,OAAO,CAAC,YAAY,CAA4B;IAGhD,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,iBAAiB;IAkC/B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;IAOtB,MAAM;CAsEP"}
1
+ {"version":3,"file":"transaction-list.d.ts","sourceRoot":"","sources":["../../../../src/ui/ui-elements/transaction-list/transaction-list.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAMnF,OAAO,iDAAiD,CAAC;AACzD,OAAO,sDAAsD,CAAC;AAC9D,OAAO,uDAAuD,CAAC;AAE/D,qBAEa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAe;IAG5B,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAGjD,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAGzD,OAAO,CAAC,YAAY,CAA4B;IAGhD,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,iBAAiB;IAiC/B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;IAOtB,MAAM;CAsEP"}
@@ -6,7 +6,7 @@ import type { UIElementCreatorParams } from '@ui/ui-elements.types';
6
6
  *
7
7
  * @param params - Object containing:
8
8
  * - containerElement: The DOM element where the component will be appended
9
- * - operationSettings: Settings passed to the component (accessToken, proxyRequestFunction, paginationSettings, etc.)
9
+ * - operationSettings: Settings passed to the component (accessToken, proxyEndpointDescriptor, paginationSettings, etc.)
10
10
  * - uiElementSettings: Optional settings including event listeners
11
11
  */
12
12
  export declare function createTransferListElement({ containerElement, uiElementSettings, operationSettings, }: UIElementCreatorParams<never>): void;
@@ -44,8 +44,7 @@ export interface UIElementSettings<T> {
44
44
  * initialize function previously) and contains settings related
45
45
  * to the overall operation. For UI elements, it has to include at least the
46
46
  * `uiParentElementId`, which specifies the DOM element where the UI element
47
- * will be appended. In addition, it may include authentication details, in which
48
- * the preferred method is to provide a `proxyRequestFunction`.
47
+ * will be appended. In addition, it may include authentication details via `proxyEndpointDescriptor`.
49
48
  */
50
49
  export interface UIElementParams<T> {
51
50
  uiElementSettings: UIElementSettings<T>;
@@ -66,7 +65,7 @@ export interface UIElementCreatorParams<T> {
66
65
  */
67
66
  uiElementSettings?: UIElementSettings<T>;
68
67
  /**
69
- * Operation-level settings such as accessToken, stagingToken, proxyRequestFunction, etc.
68
+ * Operation-level settings such as accessToken, stagingToken, proxyEndpointDescriptor, etc.
70
69
  * These settings are passed directly to SDK API functions.
71
70
  */
72
71
  operationSettings?: OperationSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"ui-elements.types.d.ts","sourceRoot":"","sources":["../../src/ui/ui-elements.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE/E;;;;;;;;GAQG;AACH,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,aAAa,EAAE,cAAc,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC;IACpB,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;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AE,iBAAiB,CAAC;CACvC"}
@@ -1,5 +1,5 @@
1
1
  import type { PaginationSettings } from '@common/api-pagination/api-pagination.types';
2
- import type { ProxyEndpointDescriptor, ProxyRequestFunction } from '@common/common.types.ts';
2
+ import type { ProxyEndpointDescriptor } from '@common/common.types.ts';
3
3
  import type { Locale } from '@common/locale/locale.types';
4
4
  import type { MfaMethod } from '@common/operation-settings/operation-settings.types';
5
5
  export type UIParentElementId = string | (() => HTMLElement);
@@ -49,26 +49,6 @@ export interface OperationSettings {
49
49
  * is not subject to pagination, this parameter will be ignored.
50
50
  */
51
51
  paginationSettings?: PaginationSettings;
52
- /**
53
- * `proxyRequestFunction` is a mechanism to avoid operating with sensitive
54
- * information, like the access token and the staging token, in client side
55
- * environments. Using them in client side could lead to data leak.It works as
56
- * follows:
57
- *
58
- * Qonto Embed exposes a proxy endpoint in its API that is capable of getting
59
- * requests prepared by the SDK. In your web application, you must implement a
60
- * backend endpoint that receives a string value in the body,
61
- * adds the access token in the `Authentication` header and calls the Qonto
62
- * Embed proxy endpoint with the string payload you received. The `proxyRequestFunction`
63
- * the SDK expects is a function in which you will implement the call to your
64
- * backend endpoint. It receives a string parameter, it must perform a call to
65
- * your endpoint and return the data the endpoint sends you back.
66
- *
67
- * The SDK will then decode the received data and return the appropriate return
68
- * value to the called function. Read more about implementing the whole flow in
69
- * [the Proxy Endpoint Implementation guide](https://docs.qonto.com/api-reference/embed-sdk-api/variables/overview-common).
70
- */
71
- proxyRequestFunction?: ProxyRequestFunction;
72
52
  /**
73
53
  * `proxyEndpointDescriptor` is a mechanism to avoid operating with sensitive
74
54
  * information, like the access token and the staging token, in client side
@@ -120,24 +100,6 @@ export type OperationSettingsWithUI = OperationSettings & {
120
100
  * to authentication tokens should be avoided for security reasons.
121
101
  */
122
102
  export interface ClientOperationSettings {
123
- /**
124
- * Required for client-side operations: either proxyRequestFunction or proxyEndpointDescriptor.
125
- *
126
- * `proxyRequestFunction` is a mechanism to avoid operating with sensitive
127
- * information, like the access token and the staging token, in client side
128
- * environments. Using them in client side could lead to data leak. It works as
129
- * follows:
130
- *
131
- * Qonto Embed exposes a proxy endpoint in its API that is capable of getting
132
- * requests prepared by the SDK. In your web application, you must implement a
133
- * backend endpoint that receives a string value in the body,
134
- * adds the access token in the `Authentication` header and calls the Qonto
135
- * Embed proxy endpoint with the string payload you received. The `proxyRequestFunction`
136
- * the SDK expects is a function in which you will implement the call to your
137
- * backend endpoint. It receives a string parameter, it must perform a call to
138
- * your endpoint and return the data the endpoint sends you back.
139
- */
140
- proxyRequestFunction?: ProxyRequestFunction;
141
103
  /**
142
104
  * `proxyEndpointDescriptor` is a mechanism to avoid operating with sensitive
143
105
  * information, like the access token and the staging token, in client side
@@ -240,7 +202,6 @@ export interface ServerOperationSettings {
240
202
  * Client-only properties are explicitly excluded from server settings.
241
203
  * Use `@qonto/embed-sdk/{namespace}` for client-side operations.
242
204
  */
243
- proxyRequestFunction?: never;
244
205
  proxyEndpointDescriptor?: never;
245
206
  uiParentElementId?: never;
246
207
  mfaPreference?: never;
@@ -254,23 +215,25 @@ export declare function validateOperationSettingsParams(params: OperationSetting
254
215
  requiresUI?: false;
255
216
  }): OperationSettings;
256
217
  /**
257
- * Validates client operation settings and ensures either proxyRequestFunction
258
- * or proxyEndpointDescriptor is provided (either in params or from global settings).
218
+ * Validates client operation settings and ensures proxyEndpointDescriptor is provided
219
+ * (either in params or from global settings).
259
220
  *
260
221
  * @param params - Client operation settings to validate
261
222
  * @param errorMessage - Custom error message to throw if validation fails
262
223
  * @returns Validated client operation settings with proxy configuration
263
- * @throws InvalidParametersError if neither proxyRequestFunction nor proxyEndpointDescriptor is provided
224
+ * @throws InvalidParametersError if proxyEndpointDescriptor is not provided
264
225
  *
265
226
  * @example
266
227
  * ```typescript
267
228
  * const settings = validateClientOperationSettings(
268
229
  * params?.operationSettings,
269
- * 'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. ' +
230
+ * 'Client-side operations require proxyEndpointDescriptor. ' +
270
231
  * 'For security, never expose access tokens in the browser. ' +
271
232
  * 'Use "@qonto/embed-sdk/server/{namespace}" only in server-side/backend environments.'
272
233
  * );
273
234
  * ```
274
235
  */
275
- export declare function validateClientOperationSettings(params: ClientOperationSettings | undefined, errorMessage?: string): ClientOperationSettings;
236
+ export declare function validateClientOperationSettings(params: ClientOperationSettings | undefined, errorMessage?: string): ClientOperationSettings & {
237
+ proxyEndpointDescriptor: ProxyEndpointDescriptor;
238
+ };
276
239
  //# sourceMappingURL=operation-settings-validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operation-settings-validation.d.ts","sourceRoot":"","sources":["../../src/validation/operation-settings-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAIrF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IAEH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IA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M,CAAC;IAExB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,uBAAuB,CAAC,EAAE,KAAK,CAAC;IAChC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAC1B,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAMD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,MAAM,EAAE,wCAAwC,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE,GACtE,uBAAuB,CAAC;AAC3B,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,MAAM,CAAC,EAAE,wCAAwC,GAAG;IAAE,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GACzE,iBAAiB,CAAC;AA+ErB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,uBAAuB,GAAG,SAAS,EAC3C,YAAY,CAAC,EAAE,MAAM,GACpB,uBAAuB,CAqBzB"}
1
+ {"version":3,"file":"operation-settings-validation.d.ts","sourceRoot":"","sources":["../../src/validation/operation-settings-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAIrF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;AAE7D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3
- "version": "0.67.0",
3
+ "version": "0.68.0",
4
4
  "description": "Library to embed Qonto features in your application",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1 +0,0 @@
1
- import{QontoEmbedSdkError as r}from"./QontoEmbedSdkError.js";class e extends r{constructor(r){super(),this.name="EmbedOperationError",this.message=r}}export{e as EmbedOperationError};