@qonto/embed-sdk 0.63.0 → 0.64.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 (89) hide show
  1. package/dist/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
  2. package/dist/index.umd.js +1 -1
  3. package/dist/payment-links/client/payment-links.client.d.ts +95 -0
  4. package/dist/payment-links/client/payment-links.client.d.ts.map +1 -0
  5. package/dist/payment-links/client/payment-links.client.test.d.ts +2 -0
  6. package/dist/payment-links/client/payment-links.client.test.d.ts.map +1 -0
  7. package/dist/payment-links/index.d.ts +27 -6
  8. package/dist/payment-links/index.d.ts.map +1 -1
  9. package/dist/payment-links/index.server.d.ts +35 -0
  10. package/dist/payment-links/index.server.d.ts.map +1 -0
  11. package/dist/payment-links/server/payment-links.server.d.ts +50 -0
  12. package/dist/payment-links/server/payment-links.server.d.ts.map +1 -0
  13. package/dist/payment-links/server/payment-links.server.test.d.ts +2 -0
  14. package/dist/payment-links/server/payment-links.server.test.d.ts.map +1 -0
  15. package/dist/payment-links/shared/currency.validation.d.ts.map +1 -0
  16. package/dist/payment-links/shared/payment-links.shared.test.d.ts +2 -0
  17. package/dist/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
  18. package/dist/payment-links/{payment-links.types.d.ts → shared/payment-links.types.d.ts} +2 -2
  19. package/dist/payment-links/shared/payment-links.types.d.ts.map +1 -0
  20. package/dist/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
  21. package/dist/payment-links/shared/payment-links.validate.d.ts.map +1 -0
  22. package/dist/payment-links/shared/unit.validation.d.ts.map +1 -0
  23. package/dist/server/beneficiaries/client/beneficiaries.client.d.ts.map +1 -1
  24. package/dist/server/payment-links/client/payment-links.client.d.ts +95 -0
  25. package/dist/server/payment-links/client/payment-links.client.d.ts.map +1 -0
  26. package/dist/server/payment-links/client/payment-links.client.test.d.ts +2 -0
  27. package/dist/server/payment-links/client/payment-links.client.test.d.ts.map +1 -0
  28. package/dist/server/payment-links/index.d.ts +27 -6
  29. package/dist/server/payment-links/index.d.ts.map +1 -1
  30. package/dist/server/payment-links/index.server.d.ts +35 -0
  31. package/dist/server/payment-links/index.server.d.ts.map +1 -0
  32. package/dist/server/payment-links/server/payment-links.server.d.ts +50 -0
  33. package/dist/server/payment-links/server/payment-links.server.d.ts.map +1 -0
  34. package/dist/server/payment-links/server/payment-links.server.test.d.ts +2 -0
  35. package/dist/server/payment-links/server/payment-links.server.test.d.ts.map +1 -0
  36. package/dist/server/payment-links/shared/currency.validation.d.ts.map +1 -0
  37. package/dist/server/payment-links/shared/payment-links.shared.test.d.ts +2 -0
  38. package/dist/server/payment-links/shared/payment-links.shared.test.d.ts.map +1 -0
  39. package/dist/server/payment-links/{payment-links.types.d.ts → shared/payment-links.types.d.ts} +2 -2
  40. package/dist/server/payment-links/shared/payment-links.types.d.ts.map +1 -0
  41. package/dist/server/payment-links/{validation → shared}/payment-links.validate.d.ts +1 -1
  42. package/dist/server/payment-links/shared/payment-links.validate.d.ts.map +1 -0
  43. package/dist/server/payment-links/shared/unit.validation.d.ts.map +1 -0
  44. package/dist/server/types/types.public-api.d.ts +1 -1
  45. package/dist/server/types/types.public-api.d.ts.map +1 -1
  46. package/dist/server/validation/operation-settings-validation.d.ts +2 -1
  47. package/dist/server/validation/operation-settings-validation.d.ts.map +1 -1
  48. package/dist/src/auth-links/shared/auth-links.api.js +1 -1
  49. package/dist/src/beneficiaries/client/beneficiaries.client.js +1 -1
  50. package/dist/src/cards/client/cards.client.js +1 -1
  51. package/dist/src/payment-links/client/payment-links.client.js +1 -0
  52. package/dist/src/payment-links/index.js +1 -1
  53. package/dist/src/payment-links/shared/payment-links.validate.js +1 -0
  54. package/dist/types/types.public-api.d.ts +1 -1
  55. package/dist/types/types.public-api.d.ts.map +1 -1
  56. package/dist/validation/operation-settings-validation.d.ts +2 -1
  57. package/dist/validation/operation-settings-validation.d.ts.map +1 -1
  58. package/package.json +5 -1
  59. package/dist/payment-links/payment-links.d.ts +0 -58
  60. package/dist/payment-links/payment-links.d.ts.map +0 -1
  61. package/dist/payment-links/payment-links.public-api.d.ts +0 -5
  62. package/dist/payment-links/payment-links.public-api.d.ts.map +0 -1
  63. package/dist/payment-links/payment-links.test.d.ts +0 -2
  64. package/dist/payment-links/payment-links.test.d.ts.map +0 -1
  65. package/dist/payment-links/payment-links.types.d.ts.map +0 -1
  66. package/dist/payment-links/validation/currency.validation.d.ts.map +0 -1
  67. package/dist/payment-links/validation/payment-links.validate.d.ts.map +0 -1
  68. package/dist/payment-links/validation/unit.validation.d.ts.map +0 -1
  69. package/dist/server/payment-links/payment-links.d.ts +0 -58
  70. package/dist/server/payment-links/payment-links.d.ts.map +0 -1
  71. package/dist/server/payment-links/payment-links.public-api.d.ts +0 -5
  72. package/dist/server/payment-links/payment-links.public-api.d.ts.map +0 -1
  73. package/dist/server/payment-links/payment-links.test.d.ts +0 -2
  74. package/dist/server/payment-links/payment-links.test.d.ts.map +0 -1
  75. package/dist/server/payment-links/payment-links.types.d.ts.map +0 -1
  76. package/dist/server/payment-links/validation/currency.validation.d.ts.map +0 -1
  77. package/dist/server/payment-links/validation/payment-links.validate.d.ts.map +0 -1
  78. package/dist/server/payment-links/validation/unit.validation.d.ts.map +0 -1
  79. package/dist/src/auth-links/auth-links.js +0 -1
  80. package/dist/src/payment-links/payment-links.js +0 -1
  81. package/dist/src/payment-links/payment-links.public-api.js +0 -1
  82. package/dist/src/payment-links/validation/payment-links.validate.js +0 -1
  83. /package/dist/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
  84. /package/dist/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
  85. /package/dist/server/payment-links/{validation → shared}/currency.validation.d.ts +0 -0
  86. /package/dist/server/payment-links/{validation → shared}/unit.validation.d.ts +0 -0
  87. /package/dist/src/payment-links/{validation → shared}/currency.validation.js +0 -0
  88. /package/dist/src/payment-links/{payment-links.types.js → shared/payment-links.types.js} +0 -0
  89. /package/dist/src/payment-links/{validation → shared}/unit.validation.js +0 -0
@@ -4,7 +4,7 @@ import type { Card, CardOrderSettings, PhysicalCardOrderSettings, VirtualCardOrd
4
4
  import type { PaginationState } from '@common/api-pagination/api-pagination.types';
5
5
  import type { Locale } from '@common/locale/locale.types';
6
6
  import type { ACCOUNT_STATUS, BankAccount } from '@organizations/shared/organizations.types';
7
- import type { CreatePaymentLinkSettings, Item, PaymentLinkParams } from '@payment-links/payment-links.types';
7
+ import type { CreatePaymentLinkSettings, Item, PaymentLinkParams } from '@payment-links/shared/payment-links.types';
8
8
  import type { CreateSepaTransferResponse, GetSepaTransfersResponse, NewSepaTransfer, SepaTransfer, SepaTransferStatus, VopCheckResult, VopVerificationResult } from '@sepa-transfers/shared/sepa-transfers.types';
9
9
  import type { GetTransactionSettings, GetTransactionsResponse, GetTransactionsSettings, Transaction, TransactionDataObject } from '@transactions/shared/transactions.types';
10
10
  export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, SepaTransferStatus, NewSepaTransfer, GetSepaTransfersResponse, CreateSepaTransferResponse, Transaction, TransactionDataObject, GetTransactionsResponse, GetTransactionsSettings, GetTransactionSettings, VopVerificationResult, VopCheckResult, PaginationState, Locale, BankAccount, ACCOUNT_STATUS, Item, CreatePaymentLinkSettings, PaymentLinkParams, AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, PostAuthAction, };
@@ -1 +1 @@
1
- {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAEjD,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,MAAM,EACN,WAAW,EACX,cAAc,EACd,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
1
+ {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAEjD,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,MAAM,EACN,WAAW,EACX,cAAc,EACd,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
@@ -267,7 +267,8 @@ export declare function validateOperationSettingsParams(params: OperationSetting
267
267
  * const settings = validateClientOperationSettings(
268
268
  * params?.operationSettings,
269
269
  * 'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. ' +
270
- * 'If you need to use accessToken, import from "@qonto/embed-sdk/{namespace}/server".'
270
+ * 'For security, never expose access tokens in the browser. ' +
271
+ * 'Use "@qonto/embed-sdk/{namespace}/server" only in server-side/backend environments.'
271
272
  * );
272
273
  * ```
273
274
  */
@@ -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;IAC5C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCAAwC;IACvD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,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E,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;;;;;;;;;;;;;;;;;GAiBG;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,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;;;;;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AiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,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 +1 @@
1
- import{makeNetworkCall as a}from"../../common/network/network.js";function n({accessToken:a,stagingToken:n,action:t,callbackUrl:c}){const e={post_authn_action:t};return c&&(e.callback_url=c),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:a,stagingToken:n},body:{embed_auth_link:e}}}}async function t(t){const c=n({accessToken:t.accessToken,stagingToken:t.stagingToken,action:t.action,callbackUrl:t.callbackUrl}),{embed_auth_link:e}=await a(c);return{url:e.url,post_authn_action:e.post_authn_action,callback_url:e.callback_url,expired_at:e.expired_at,used_at:e.used_at}}export{n as prepareAuthLinkRequest,t as requestAuthLink};
1
+ import"../../common/auth/auth.js";import"../../common/environment/environment-manager.js";import"../../common/locale/locale-manager.js";import"../../common/operation-settings/operation-settings.js";function o({accessToken:o,stagingToken:n,action:t,callbackUrl:e}){const a={post_authn_action:t};return e&&(a.callback_url=e),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:o,stagingToken:n},body:{embed_auth_link:a}}}}export{o as prepareAuthLinkRequest};
@@ -1 +1 @@
1
- import{serializePaginationResponse as e}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as i}from"../../common/auth/auth.validate.js";import{callProxyFunction as o}from"../../common/common.utils.js";import{ACTIONS as r}from"../../common/constants.js";import{buildRequestHeaders as n}from"../../common/network/network.js";import{validateClientOperationSettings as t,validateOperationSettingsParams as s}from"../../validation/operation-settings-validation.js";import{buildIframeUrl as a,createIframe as c}from"../../iframe/iframe-manager.js";import{prepareUntrustBeneficiaryCall as p,prepareUpdateBeneficiaryCall as y,prepareAddBeneficiaryCall as d,prepareGetBeneficiaryCall as f,prepareGetBeneficiariesCall as m}from"../shared/beneficiaries.api.js";import{serializeBeneficiary as u}from"../shared/beneficiaries.serializer.js";import{validateTrustBeneficiariesParams as b,validateUpdateBeneficiaryParams as x,validateAddBeneficiaryParams as l,validateGetBeneficiaryParams as g}from"../shared/beneficiaries.validate.js";async function q(i){const{proxyRequestFunction:r,proxyEndpointDescriptor:n,paginationSettings:s}=t(i?.operationSettings,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. accessToken based auth is only available for server, available for import from "@qonto/embed-sdk/server/beneficiaries".'),a=m({paginationSettings:s}),c=await o({proxyFunction:r,proxyEndpointDescriptor:n,networkCallDescriptor:a}),p=c.body.beneficiaries.map((e=>u(e))),y=e(c.body.meta);return{beneficiaries:p,...y?{meta:y}:{}}}async function D({beneficiarySettings:e,operationSettings:i}){const r=g(e?.beneficiaryId),{proxyRequestFunction:n,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. If you need to use accessToken, import from "@qonto/embed-sdk/server/beneficiaries".'),a=f({beneficiaryId:r}),c=await o({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:a});return u(c.body.beneficiary)}async function E({beneficiarySettings:e,operationSettings:i}){const r=l(e),{proxyRequestFunction:s,proxyEndpointDescriptor:a,idempotencyKey:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. If you need to use accessToken, import from "@qonto/embed-sdk/server/beneficiaries".'),p=d({beneficiary:r,idempotencyKey:c});p.options.headers=n({...p.options.headers});const y=await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return u(y.body.beneficiary)}async function k({beneficiarySettings:e,operationSettings:i}){const r=x(e),{proxyRequestFunction:n,proxyEndpointDescriptor:s,idempotencyKey:a,mfaPreference:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. If you need to use accessToken, import from "@qonto/embed-sdk/server/beneficiaries".'),p=y({beneficiaryParamsBeingEdited:r,idempotencyKey:a,mfaPreference:c}),d=await o({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:p});return u(d.body.beneficiary)}async function I({beneficiarySettings:e,operationSettings:o}){const{accessToken:n,uiParentElementId:t,debugMode:p}=s(o,{requiresUI:!0}),y=n||i(),d=b(e?.beneficiaryIds),f=a({accessToken:y,debugMode:p}),m=await c({parentElementId:t,iframeUrl:f});return(await m.postMessage({actionId:r.BENEFICIARIES_TRUST,actionData:{body:{beneficiaryIds:d}}})).beneficiaries}async function F({beneficiarySettings:e,operationSettings:i}){const r=b(e?.beneficiaryIds),{proxyRequestFunction:n,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. If you need to use accessToken, import from "@qonto/embed-sdk/server/beneficiaries".'),a=p({beneficiaryIds:r});return(await o({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:a})).body.beneficiaries.map(u)}export{E as addBeneficiary,q as getBeneficiaries,D as getBeneficiary,I as trustBeneficiaries,F as untrustBeneficiaries,k as updateBeneficiary};
1
+ import{serializePaginationResponse as e}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as i}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{ACTIONS as r}from"../../common/constants.js";import{buildRequestHeaders as o}from"../../common/network/network.js";import{validateClientOperationSettings as t,validateOperationSettingsParams as s}from"../../validation/operation-settings-validation.js";import{buildIframeUrl as a,createIframe as c}from"../../iframe/iframe-manager.js";import{prepareUntrustBeneficiaryCall as p,prepareUpdateBeneficiaryCall as y,prepareAddBeneficiaryCall as d,prepareGetBeneficiaryCall as m,prepareGetBeneficiariesCall as b}from"../shared/beneficiaries.api.js";import{serializeBeneficiary as f}from"../shared/beneficiaries.serializer.js";import{validateTrustBeneficiariesParams as u,validateUpdateBeneficiaryParams as x,validateAddBeneficiaryParams as l,validateGetBeneficiaryParams as k}from"../shared/beneficiaries.validate.js";async function v(i){const{proxyRequestFunction:r,proxyEndpointDescriptor:o,paginationSettings:s}=t(i?.operationSettings,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=b({paginationSettings:s}),c=await n({proxyFunction:r,proxyEndpointDescriptor:o,networkCallDescriptor:a}),p=c.body.beneficiaries.map((e=>f(e))),y=e(c.body.meta);return{beneficiaries:p,...y?{meta:y}:{}}}async function g({beneficiarySettings:e,operationSettings:i}){const r=k(e?.beneficiaryId),{proxyRequestFunction:o,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=m({beneficiaryId:r}),c=await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:a});return f(c.body.beneficiary)}async function q({beneficiarySettings:e,operationSettings:i}){const r=l(e),{proxyRequestFunction:s,proxyEndpointDescriptor:a,idempotencyKey:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),p=d({beneficiary:r,idempotencyKey:c});p.options.headers=o({...p.options.headers});const y=await n({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return f(y.body.beneficiary)}async function D({beneficiarySettings:e,operationSettings:i}){const r=x(e),{proxyRequestFunction:o,proxyEndpointDescriptor:s,idempotencyKey:a,mfaPreference:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),p=y({beneficiaryParamsBeingEdited:r,idempotencyKey:a,mfaPreference:c}),d=await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:p});return f(d.body.beneficiary)}async function E({beneficiarySettings:e,operationSettings:n}){const{accessToken:o,uiParentElementId:t,debugMode:p}=s(n,{requiresUI:!0}),y=o||i(),d=u(e?.beneficiaryIds),m=a({accessToken:y,debugMode:p}),b=await c({parentElementId:t,iframeUrl:m});return(await b.postMessage({actionId:r.BENEFICIARIES_TRUST,actionData:{body:{beneficiaryIds:d}}})).beneficiaries}async function F({beneficiarySettings:e,operationSettings:i}){const r=u(e?.beneficiaryIds),{proxyRequestFunction:o,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=p({beneficiaryIds:r});return(await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:a})).body.beneficiaries.map(f)}export{q as addBeneficiary,v as getBeneficiaries,g as getBeneficiary,E as trustBeneficiaries,F as untrustBeneficiaries,D as updateBeneficiary};
@@ -1 +1 @@
1
- import{VIRTUAL_CARD_LEVEL as e}from"../shared/cards.constants.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{authManager as t}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../../common/auth/auth.validate.js";import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as s}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as a,createIframe as d}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as c,prepareGetCardCall as p,prepareGetCardsCall as m}from"../shared/cards.api.js";import{createEmbedUI as g}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as u,serializeCard as l,serializeOrderCardPayload as y}from"../shared/cards.serializer.js";import{validateDisplayCardParams as f,validateUnlockCardParams as h,validateOrderCardParams as k,validateGetCardParams as w}from"../shared/cards.validate.js";async function b(e){r.cardsList();const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new s("membershipId must be a string");const{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(e?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),c=m({membershipId:t,stagingToken:d});return(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>l(e)))}async function I({cardSettings:e,operationSettings:r}){w(e);const t=e.cardId,{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(r,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),c=p({cardId:t,stagingToken:d}),m=(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards;if(Array.isArray(m)&&m.length>0)return l(m[0]);throw new s("Unable to retrieve card data")}async function x(o){const i=n(),{uiParentElementId:c,debugMode:p}=o.operationSettings;if(!c)throw new s("uiParentElementId is required");k(o.cardSettings);const m=o.cardSettings.cardLevel===e.VIRTUAL,g=a({accessToken:i,stagingToken:t.getStagingToken()||void 0,debugMode:p}),u=await d({iframeUrl:g,parentElementId:c}),f=y(o.cardSettings),h=await u.postMessage(f);return u.destroy(),m?r.cardsOrderVirtual():r.cardsOrderPhysical(),l(h)}async function E(e){const r=n(),{uiParentElementId:o,debugMode:i}=e.operationSettings;if(!o)throw new s("uiParentElementId is required");h(e.cardSettings);const c=a({accessToken:r,stagingToken:t.getStagingToken()||void 0,debugMode:i}),p=await d({iframeUrl:c,parentElementId:o}),m=u(e),g=await p.postMessage(m);return p.destroy(),l(g)}async function S(e){const{uiParentElementId:r,accessToken:t,stagingToken:i,debugMode:a,mfaPreference:d,proxyRequestFunction:p,proxyEndpointDescriptor:m}=e.operationSettings;if(!r)throw new s("uiParentElementId is required");if(f(e.cardSettings),p||m){const t=c({stagingToken:i}),n=(await o({proxyFunction:p,proxyEndpointDescriptor:m,networkCallDescriptor:t})).body.embed_auth_link;return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:n.url})}{const o=t||n(),{getCardIframeURL:s}=await import("../shared/cards.api.js"),d=await s({...e.cardSettings,accessToken:o,stagingToken:i});return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:d.url})}}export{S as displayCard,I as getCard,b as getCards,x as orderCard,E as unlockCard};
1
+ import{VIRTUAL_CARD_LEVEL as e}from"../shared/cards.constants.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{authManager as t}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../../common/auth/auth.validate.js";import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as s}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as a,createIframe as d}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as c,prepareGetCardCall as p,prepareGetCardsCall as m}from"../shared/cards.api.js";import{createEmbedUI as g}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as u,serializeCard as l,serializeOrderCardPayload as y}from"../shared/cards.serializer.js";import{validateDisplayCardParams as f,validateUnlockCardParams as h,validateOrderCardParams as k,validateGetCardParams as w}from"../shared/cards.validate.js";async function b(e){r.cardsList();const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new s("membershipId must be a string");const{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(e?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=m({membershipId:t,stagingToken:d});return(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>l(e)))}async function I({cardSettings:e,operationSettings:r}){w(e);const t=e.cardId,{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(r,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=p({cardId:t,stagingToken:d}),m=(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards;if(Array.isArray(m)&&m.length>0)return l(m[0]);throw new s("Unable to retrieve card data")}async function x(o){const i=n(),{uiParentElementId:c,debugMode:p}=o.operationSettings;if(!c)throw new s("uiParentElementId is required");k(o.cardSettings);const m=o.cardSettings.cardLevel===e.VIRTUAL,g=a({accessToken:i,stagingToken:t.getStagingToken()||void 0,debugMode:p}),u=await d({iframeUrl:g,parentElementId:c}),f=y(o.cardSettings),h=await u.postMessage(f);return u.destroy(),m?r.cardsOrderVirtual():r.cardsOrderPhysical(),l(h)}async function E(e){const r=n(),{uiParentElementId:o,debugMode:i}=e.operationSettings;if(!o)throw new s("uiParentElementId is required");h(e.cardSettings);const c=a({accessToken:r,stagingToken:t.getStagingToken()||void 0,debugMode:i}),p=await d({iframeUrl:c,parentElementId:o}),m=u(e),g=await p.postMessage(m);return p.destroy(),l(g)}async function S(e){const{uiParentElementId:r,accessToken:t,stagingToken:i,debugMode:a,mfaPreference:d,proxyRequestFunction:p,proxyEndpointDescriptor:m}=e.operationSettings;if(!r)throw new s("uiParentElementId is required");if(f(e.cardSettings),p||m){const t=c({stagingToken:i}),n=(await o({proxyFunction:p,proxyEndpointDescriptor:m,networkCallDescriptor:t})).body.embed_auth_link;return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:n.url})}{const o=t||n(),{getCardIframeURL:s}=await import("../shared/cards.api.js"),d=await s({...e.cardSettings,accessToken:o,stagingToken:i});return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:d.url})}}export{S as displayCard,I as getCard,b as getCards,x as orderCard,E as unlockCard};
@@ -0,0 +1 @@
1
+ import{authLinks as t}from"../../auth-links/index.js";import{AUTH_LINK_ACTIONS as e}from"../../common/constants.js";import{validateClientOperationSettings as n}from"../../validation/operation-settings-validation.js";import{validateItems as i,validatePaymentLinkCreationFlowParams as o}from"../shared/payment-links.validate.js";const s=async({paymentLinkSettings:s,operationSettings:r})=>{n(r,'Client-side payment link operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/payment-links/server" only in server-side/backend environments.');const{items:a}=s;i(a);const p=o(s),m=await t.request({requestSettings:{action:e.PAYMENT_LINK_CREATE,callbackUrl:p},operationSettings:r}),c=new URLSearchParams({...a?{items:JSON.stringify(a)}:{}});return c.toString()?`${m.url}?${c.toString()}`:m.url},r=async({paymentLinkSettings:t,operationSettings:e})=>{const n=await s({paymentLinkSettings:t,operationSettings:e});window.location.href=n};export{s as getPaymentLinkCreationFlowUrl,r as redirectToPaymentLinkCreationFlow};
@@ -1 +1 @@
1
- import{paymentLinks as p}from"./payment-links.public-api.js";const i=p;export{i as paymentLinks};
1
+ import{redirectToPaymentLinkCreationFlow as t,getPaymentLinkCreationFlowUrl as e}from"./client/payment-links.client.js";const n={getPaymentLinkCreationFlowUrl:e,redirectToPaymentLinkCreationFlow:t};export{n as paymentLinks};
@@ -0,0 +1 @@
1
+ import{validatePresenceOfRequiredParams as t,validateExpectedStringValues as e,validateExpectedNumericValues as r}from"../../validation/input-param-validation.js";import{validateCurrency as i}from"./currency.validation.js";import{LINK_TYPES as a}from"./payment-links.types.js";import{validateUnit as n}from"./unit.validation.js";import{InvalidParametersError as c}from"../../errors/InvalidParametersError.js";const l=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],o=[{name:"currency"},{name:"value"}];function m(a){if(!a||!Array.isArray(a))return[];a.forEach((a=>{t(a,l),t(a.unitPrice,o);const m=[...e({id:a.id,title:a.title,vatRate:a.vatRate,currency:a.unitPrice.currency,measureUnit:a.measureUnit,unitPrice:a.unitPrice.value,...a.description?{description:a.description}:{}}),...r({quantity:a.quantity})].flat();if(m.length>0)throw new c(m);u(a.type),i(a.unitPrice.currency),n(a.measureUnit)}))}const u=t=>{if(!Object.values(a).includes(t))throw new c(`type ${t} is not valid, valid types are ${Object.values(a).join(", ")}`)};function s(t){if(!t?.callbackUrl)throw new c("callbackUrl parameter is required for the payment link creation flow");if("string"!=typeof t.callbackUrl)throw new c("callbackUrl must be a string");if(""===t.callbackUrl.trim())throw new c("callbackUrl cannot be empty");return t.callbackUrl}export{m as validateItems,s as validatePaymentLinkCreationFlowParams,u as validateType};
@@ -4,7 +4,7 @@ import type { Card, CardOrderSettings, PhysicalCardOrderSettings, VirtualCardOrd
4
4
  import type { PaginationState } from '@common/api-pagination/api-pagination.types';
5
5
  import type { Locale } from '@common/locale/locale.types';
6
6
  import type { ACCOUNT_STATUS, BankAccount } from '@organizations/shared/organizations.types';
7
- import type { CreatePaymentLinkSettings, Item, PaymentLinkParams } from '@payment-links/payment-links.types';
7
+ import type { CreatePaymentLinkSettings, Item, PaymentLinkParams } from '@payment-links/shared/payment-links.types';
8
8
  import type { CreateSepaTransferResponse, GetSepaTransfersResponse, NewSepaTransfer, SepaTransfer, SepaTransferStatus, VopCheckResult, VopVerificationResult } from '@sepa-transfers/shared/sepa-transfers.types';
9
9
  import type { GetTransactionSettings, GetTransactionsResponse, GetTransactionsSettings, Transaction, TransactionDataObject } from '@transactions/shared/transactions.types';
10
10
  export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, GetBeneficiariesResponse, SepaTransfer, SepaTransferStatus, NewSepaTransfer, GetSepaTransfersResponse, CreateSepaTransferResponse, Transaction, TransactionDataObject, GetTransactionsResponse, GetTransactionsSettings, GetTransactionSettings, VopVerificationResult, VopCheckResult, PaginationState, Locale, BankAccount, ACCOUNT_STATUS, Item, CreatePaymentLinkSettings, PaymentLinkParams, AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, PostAuthAction, };
@@ -1 +1 @@
1
- {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAEjD,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,MAAM,EACN,WAAW,EACX,cAAc,EACd,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
1
+ {"version":3,"file":"types.public-api.d.ts","sourceRoot":"","sources":["../../src/types/types.public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAEjD,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,MAAM,EACN,WAAW,EACX,cAAc,EACd,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
@@ -267,7 +267,8 @@ export declare function validateOperationSettingsParams(params: OperationSetting
267
267
  * const settings = validateClientOperationSettings(
268
268
  * params?.operationSettings,
269
269
  * 'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. ' +
270
- * 'If you need to use accessToken, import from "@qonto/embed-sdk/{namespace}/server".'
270
+ * 'For security, never expose access tokens in the browser. ' +
271
+ * 'Use "@qonto/embed-sdk/{namespace}/server" only in server-side/backend environments.'
271
272
  * );
272
273
  * ```
273
274
  */
@@ -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;IAC5C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wCAAwC;IACvD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG;IACxD,iBAAiB,EAAE,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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;;;;;;;;;;;;;;;;;GAiBG;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,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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tC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qonto/embed-sdk",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "description": "Library to embed Qonto features in your application",
5
5
  "type": "module",
6
6
  "exports": {
@@ -70,6 +70,10 @@
70
70
  "types": "./dist/payment-links/index.d.ts",
71
71
  "import": "./dist/src/payment-links/index.js"
72
72
  },
73
+ "./server/payment-links": {
74
+ "types": "./dist/server/payment-links/index.server.d.ts",
75
+ "import": "./dist/server/src/payment-links/index.server.js"
76
+ },
73
77
  "./types": {
74
78
  "types": "./dist/types/index.d.ts",
75
79
  "import": "./dist/src/types/index.js"
@@ -1,58 +0,0 @@
1
- import type { CreatePaymentLinkSettings, PaymentLinkParams } from './payment-links.types';
2
- /**
3
- * Generates the URL for initiating a payment link creation flow with specified items.
4
- *
5
- * @param params - An object containing:
6
- * - paymentLinkSettings: An object containing:
7
- * - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
8
- * - callbackUrl: Required callback URL to redirect to after payment link creation.
9
- * - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
10
- *
11
- * @example
12
- * ```ts
13
- * const url = await getPaymentLinkCreationFlowUrl({
14
- * paymentLinkSettings: {
15
- * items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
16
- * },
17
- * operationSettings: {
18
- * proxyRequestFunction: async (encodedCall) => {
19
- * // Implement your proxy logic here
20
- * },
21
- * }
22
- * });
23
- * ```
24
- * @returns Promise resolving to the full URL as a string, which can be used to launch the payment link creation flow in an iframe or browser.
25
- *
26
- * @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
27
- * @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
28
- */
29
- export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<string>;
30
- /**
31
- * Redirects to the payment link creation flow with specified items.
32
- *
33
- * @param params - An object containing:
34
- * - paymentLinkSettings: An object containing:
35
- * - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
36
- * - callbackUrl: Required callback URL to redirect to after payment link creation.
37
- * - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
38
- *
39
- * @example
40
- * ```ts
41
- * await redirectToPaymentLinkCreationFlow({
42
- * paymentLinkSettings: {
43
- * items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
44
- * },
45
- * operationSettings: {
46
- * proxyRequestFunction: async (encodedCall) => {
47
- * // Implement your proxy logic here
48
- * },
49
- * }
50
- * });
51
- * ```
52
- * @returns This function redirects the browser to the payment link creation flow. Due to the redirect, the returned promise will not resolve.
53
- *
54
- * @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
55
- * @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
56
- */
57
- export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<void>;
58
- //# sourceMappingURL=payment-links.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAM/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,MAAM,CAsB/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,IAAI,CAM7D,CAAC"}
@@ -1,5 +0,0 @@
1
- declare const paymentLinks: {
2
- getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => Promise<string>;
3
- };
4
- export { paymentLinks };
5
- //# sourceMappingURL=payment-links.public-api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.public-api.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.public-api.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=payment-links.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.test.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.types.d.ts","sourceRoot":"","sources":["../../src/payment-links/payment-links.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,MAAM,CAAC,CAAC,GAAG,MAAM;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,mBAAmB,EAAE,CAAC,CAAC;IACvB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.validation.d.ts","sourceRoot":"","sources":["../../../src/payment-links/validation/currency.validation.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,SAMhD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.validate.d.ts","sourceRoot":"","sources":["../../../src/payment-links/validation/payment-links.validate.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,IAAI,EAEV,MAAM,wBAAwB,CAAC;AAgBhC,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,uBAqCtD;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAOxC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,mBAAmB,EAAE,yBAAyB,GAAG,SAAS,GACzD,MAAM,CAaR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unit.validation.d.ts","sourceRoot":"","sources":["../../../src/payment-links/validation/unit.validation.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAMxC,CAAC"}
@@ -1,58 +0,0 @@
1
- import type { CreatePaymentLinkSettings, PaymentLinkParams } from './payment-links.types';
2
- /**
3
- * Generates the URL for initiating a payment link creation flow with specified items.
4
- *
5
- * @param params - An object containing:
6
- * - paymentLinkSettings: An object containing:
7
- * - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
8
- * - callbackUrl: Required callback URL to redirect to after payment link creation.
9
- * - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
10
- *
11
- * @example
12
- * ```ts
13
- * const url = await getPaymentLinkCreationFlowUrl({
14
- * paymentLinkSettings: {
15
- * items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
16
- * },
17
- * operationSettings: {
18
- * proxyRequestFunction: async (encodedCall) => {
19
- * // Implement your proxy logic here
20
- * },
21
- * }
22
- * });
23
- * ```
24
- * @returns Promise resolving to the full URL as a string, which can be used to launch the payment link creation flow in an iframe or browser.
25
- *
26
- * @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
27
- * @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
28
- */
29
- export declare const getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<string>;
30
- /**
31
- * Redirects to the payment link creation flow with specified items.
32
- *
33
- * @param params - An object containing:
34
- * - paymentLinkSettings: An object containing:
35
- * - items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
36
- * - callbackUrl: Required callback URL to redirect to after payment link creation.
37
- * - operationSettings: An object with operation-level settings such as `proxyRequestFunction`, `accessToken`, `stagingToken`, etc.
38
- *
39
- * @example
40
- * ```ts
41
- * await redirectToPaymentLinkCreationFlow({
42
- * paymentLinkSettings: {
43
- * items: [{ id: '1', title: 'Item 1', type: 'service', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: '10' }, vatRate: '20' }],
44
- * },
45
- * operationSettings: {
46
- * proxyRequestFunction: async (encodedCall) => {
47
- * // Implement your proxy logic here
48
- * },
49
- * }
50
- * });
51
- * ```
52
- * @returns This function redirects the browser to the payment link creation flow. Due to the redirect, the returned promise will not resolve.
53
- *
54
- * @throws `InvalidParametersError` If the provided items array is invalid or if callbackUrl is missing or invalid.
55
- * @throws `AuthenticationError` If authentication fails (e.g., invalid or missing access token).
56
- */
57
- export declare const redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: PaymentLinkParams<CreatePaymentLinkSettings>) => Promise<void>;
58
- //# sourceMappingURL=payment-links.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAM/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,MAAM,CAsB/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAAC,yBAAyB,CAAC,KAAG,OAAO,CAAC,IAAI,CAM7D,CAAC"}
@@ -1,5 +0,0 @@
1
- declare const paymentLinks: {
2
- getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./payment-links.types").PaymentLinkParams<import("./payment-links.types").CreatePaymentLinkSettings>) => Promise<string>;
3
- };
4
- export { paymentLinks };
5
- //# sourceMappingURL=payment-links.public-api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.public-api.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.public-api.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=payment-links.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.test.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.types.d.ts","sourceRoot":"","sources":["../../../src/payment-links/payment-links.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,MAAM,CAAC,CAAC,GAAG,MAAM;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,mBAAmB,EAAE,CAAC,CAAC;IACvB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,eAAO,MAAM,UAAU;;;CAGtB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.validation.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/currency.validation.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,SAMhD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-links.validate.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/payment-links.validate.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,IAAI,EAEV,MAAM,wBAAwB,CAAC;AAgBhC,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,uBAqCtD;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAOxC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,mBAAmB,EAAE,yBAAyB,GAAG,SAAS,GACzD,MAAM,CAaR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unit.validation.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/validation/unit.validation.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,SAMxC,CAAC"}
@@ -1 +0,0 @@
1
- import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{callProxyFunction as t}from"../common/common.utils.js";import{validateOperationSettingsParams as a}from"../validation/operation-settings-validation.js";import{prepareAuthLinkRequest as i,requestAuthLink as n}from"./shared/auth-links.api.js";import{serializeAuthLink as r}from"./shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as s}from"./shared/auth-links.validate.js";async function c({requestSettings:c,operationSettings:e}){s(c);const{proxyRequestFunction:l,proxyEndpointDescriptor:m,stagingToken:p}=a(e||{});if(l||m){const o=i({stagingToken:p,action:c.action,callbackUrl:c.callbackUrl}),a=await t({proxyFunction:l,proxyEndpointDescriptor:m,networkCallDescriptor:o});return r(a.body)}{const t=e?.accessToken||o(),a=await n({accessToken:t,stagingToken:p,action:c.action,callbackUrl:c.callbackUrl});return r(a)}}export{c as request};
@@ -1 +0,0 @@
1
- import{request as t}from"../auth-links/auth-links.js";import{AUTH_LINK_ACTIONS as n}from"../common/constants.js";import{validateItems as i,validatePaymentLinkCreationFlowParams as o}from"./validation/payment-links.validate.js";const s=async({paymentLinkSettings:s,operationSettings:a})=>{const{items:r}=s;i(r);const e=o(s),m=await t({requestSettings:{action:n.PAYMENT_LINK_CREATE,callbackUrl:e},operationSettings:a}),c=new URLSearchParams({...r?{items:JSON.stringify(r)}:{}});return c.toString()?`${m.url}?${c.toString()}`:m.url};export{s as getPaymentLinkCreationFlowUrl};
@@ -1 +0,0 @@
1
- import{getPaymentLinkCreationFlowUrl as t}from"./payment-links.js";const n={getPaymentLinkCreationFlowUrl:t};export{n as paymentLinks};
@@ -1 +0,0 @@
1
- import{validatePresenceOfRequiredParams as t,validateExpectedStringValues as e,validateExpectedNumericValues as r}from"../../validation/input-param-validation.js";import{InvalidParametersError as i}from"../../errors/InvalidParametersError.js";import{LINK_TYPES as a}from"../payment-links.types.js";import{validateCurrency as n}from"./currency.validation.js";import{validateUnit as c}from"./unit.validation.js";const l=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],o=[{name:"currency"},{name:"value"}];function m(a){if(!a||!Array.isArray(a))return[];a.forEach((a=>{t(a,l),t(a.unitPrice,o);const m=[...e({id:a.id,title:a.title,vatRate:a.vatRate,currency:a.unitPrice.currency,measureUnit:a.measureUnit,unitPrice:a.unitPrice.value,...a.description?{description:a.description}:{}}),...r({quantity:a.quantity})].flat();if(m.length>0)throw new i(m);u(a.type),n(a.unitPrice.currency),c(a.measureUnit)}))}const u=t=>{if(!Object.values(a).includes(t))throw new i(`type ${t} is not valid, valid types are ${Object.values(a).join(", ")}`)};function s(t){if(!t?.callbackUrl)throw new i("callbackUrl parameter is required for the payment link creation flow");if("string"!=typeof t.callbackUrl)throw new i("callbackUrl must be a string");if(""===t.callbackUrl.trim())throw new i("callbackUrl cannot be empty");return t.callbackUrl}export{m as validateItems,s as validatePaymentLinkCreationFlowParams,u as validateType};