@unidy.io/sdk 1.1.4 → 1.2.0-alpha2
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.
- package/dist/cjs/app-globals-DSKjcXX_.js.map +1 -1
- package/dist/cjs/{auth-store-BaxuIp4z.js → auth-store-DC9EVec8.js} +2 -3
- package/dist/cjs/auth-store-DC9EVec8.js.map +1 -0
- package/dist/cjs/{i18n-BoDZ8kd2.js → i18n-BAZB-eHh.js} +2 -8
- package/dist/cjs/{i18n-BoDZ8kd2.js.map → i18n-BAZB-eHh.js.map} +1 -1
- package/dist/cjs/{index-R2MKLaem.js → index-CvFbf5-D.js} +1477 -1105
- package/dist/cjs/index-CvFbf5-D.js.map +1 -0
- package/dist/cjs/index.cjs.js +6 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{newsletter-helpers-DR0vsegt.js → newsletter-helpers-Dj0yYHZf.js} +61 -74
- package/dist/cjs/newsletter-helpers-Dj0yYHZf.js.map +1 -0
- package/dist/cjs/{profile-helpers-B2h2III_.js → profile-helpers-D66Ycaft.js} +3 -3
- package/dist/cjs/{profile-helpers-B2h2III_.js.map → profile-helpers-D66Ycaft.js.map} +1 -1
- package/dist/cjs/u-conditional-render.cjs.entry.js +5 -6
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -1
- package/dist/cjs/u-config.cjs.entry.js +5 -6
- package/dist/cjs/u-config.entry.cjs.js.map +1 -1
- package/dist/cjs/u-email-field.cjs.entry.js +2 -2
- package/dist/cjs/u-error-message.cjs.entry.js +3 -3
- package/dist/cjs/u-error-message.entry.cjs.js.map +1 -1
- package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -1
- package/dist/cjs/u-field_2.cjs.entry.js +2 -2
- package/dist/cjs/u-full-profile.cjs.entry.js +1 -1
- package/dist/cjs/u-logout-button.cjs.entry.js +6 -7
- package/dist/cjs/u-logout-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-magic-code-field.cjs.entry.js +5 -6
- package/dist/cjs/u-magic-code-field.entry.cjs.js.map +1 -1
- package/dist/cjs/u-missing-field.cjs.entry.js +1 -1
- package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +9 -5
- package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +5 -6
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +6 -7
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +5 -6
- package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +4 -5
- package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-root.cjs.entry.js +5 -6
- package/dist/cjs/u-newsletter-root.entry.cjs.js.map +1 -1
- package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +4 -5
- package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-passkey.cjs.entry.js +5 -6
- package/dist/cjs/u-passkey.entry.cjs.js.map +1 -1
- package/dist/cjs/u-password-field.cjs.entry.js +2 -2
- package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-profile_2.cjs.entry.js +35 -55
- package/dist/cjs/u-registration-button.cjs.entry.js +2 -2
- package/dist/cjs/u-reset-password-button.cjs.entry.js +4 -5
- package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-send-magic-code-button.cjs.entry.js +5 -6
- package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +1 -1
- package/dist/cjs/u-signed-in.cjs.entry.js +1 -1
- package/dist/cjs/u-signin-root.cjs.entry.js +1 -1
- package/dist/cjs/u-signin-step.cjs.entry.js +5 -6
- package/dist/cjs/u-signin-step.entry.cjs.js.map +1 -1
- package/dist/cjs/u-signin-strategy.cjs.entry.js +1 -1
- package/dist/cjs/u-social-login-button.cjs.entry.js +2 -2
- package/dist/cjs/u-spinner.cjs.entry.js +1 -1
- package/dist/cjs/u-spinner.entry.cjs.js.map +1 -1
- package/dist/cjs/u-ticketable-list.cjs.entry.js +39 -29
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -1
- package/dist/collection/api/base-client.js +129 -0
- package/dist/collection/api/base-client.js.map +1 -0
- package/dist/collection/api/base-service.js +72 -0
- package/dist/collection/api/base-service.js.map +1 -0
- package/dist/collection/api/client.js +18 -139
- package/dist/collection/api/client.js.map +1 -1
- package/dist/collection/api/index.js +25 -5
- package/dist/collection/api/index.js.map +1 -1
- package/dist/collection/api/shared.js +11 -2
- package/dist/collection/api/shared.js.map +1 -1
- package/dist/collection/api/standalone.js +88 -0
- package/dist/collection/api/standalone.js.map +1 -0
- package/dist/collection/auth/api/auth.js +66 -124
- package/dist/collection/auth/api/auth.js.map +1 -1
- package/dist/collection/auth/api/schemas.js +78 -0
- package/dist/collection/auth/api/schemas.js.map +1 -0
- package/dist/collection/auth/auth-helpers.js +47 -36
- package/dist/collection/auth/auth-helpers.js.map +1 -1
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +4 -1
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +1 -1
- package/dist/collection/auth/components/password-field/password-field.js +1 -1
- package/dist/collection/auth/passkey-auth.js +8 -6
- package/dist/collection/auth/passkey-auth.js.map +1 -1
- package/dist/collection/auth/store/auth-store.js +0 -1
- package/dist/collection/auth/store/auth-store.js.map +1 -1
- package/dist/collection/locales/de.json +0 -1
- package/dist/collection/locales/en.json +0 -1
- package/dist/collection/locales/fr.json +0 -1
- package/dist/collection/locales/it.json +0 -1
- package/dist/collection/locales/nl_be.json +0 -1
- package/dist/collection/locales/ro.json +0 -1
- package/dist/collection/newsletter/api/newsletters.js +192 -167
- package/dist/collection/newsletter/api/newsletters.js.map +1 -1
- package/dist/collection/newsletter/api/schemas.js +112 -0
- package/dist/collection/newsletter/api/schemas.js.map +1 -0
- package/dist/collection/newsletter/newsletter-helpers.js +57 -70
- package/dist/collection/newsletter/newsletter-helpers.js.map +1 -1
- package/dist/collection/profile/api/profile.js +56 -155
- package/dist/collection/profile/api/profile.js.map +1 -1
- package/dist/collection/profile/api/schemas.js +120 -0
- package/dist/collection/profile/api/schemas.js.map +1 -0
- package/dist/collection/profile/components/field/field.css +1 -1
- package/dist/collection/profile/components/profile/profile.js +35 -101
- package/dist/collection/profile/components/profile/profile.js.map +1 -1
- package/dist/collection/shared/components/config/config.js +2 -2
- package/dist/collection/shared/components/error-message/error-message.js +3 -3
- package/dist/collection/shared/components/error-message/error-message.js.map +1 -1
- package/dist/collection/shared/components/spinner/spinner.css +1 -1
- package/dist/collection/shared/components/submit-button/submit-button.css +1 -1
- package/dist/collection/ticketable/api/schemas.js +58 -9
- package/dist/collection/ticketable/api/schemas.js.map +1 -1
- package/dist/collection/ticketable/api/subscriptions.js +13 -44
- package/dist/collection/ticketable/api/subscriptions.js.map +1 -1
- package/dist/collection/ticketable/api/ticketable-service.js +74 -0
- package/dist/collection/ticketable/api/ticketable-service.js.map +1 -0
- package/dist/collection/ticketable/api/tickets.js +13 -45
- package/dist/collection/ticketable/api/tickets.js.map +1 -1
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +37 -77
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +1 -1
- package/dist/components/auth-store.js +0 -1
- package/dist/components/auth-store.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/i18n.js +0 -6
- package/dist/components/i18n.js.map +1 -1
- package/dist/components/index.js +1 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +1475 -1106
- package/dist/components/index2.js.map +1 -1
- package/dist/components/newsletter-helpers.js +57 -70
- package/dist/components/newsletter-helpers.js.map +1 -1
- package/dist/components/profile.js +34 -54
- package/dist/components/profile.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/submit-button.js +1 -1
- package/dist/components/submit-button.js.map +1 -1
- package/dist/components/u-config.js +1 -2
- package/dist/components/u-config.js.map +1 -1
- package/dist/components/u-error-message.js +2 -2
- package/dist/components/u-error-message.js.map +1 -1
- package/dist/components/u-logout-button.js +1 -1
- package/dist/components/u-magic-code-field.js +1 -1
- package/dist/components/u-missing-fields-submit-button.js +4 -1
- package/dist/components/u-missing-fields-submit-button.js.map +1 -1
- package/dist/components/u-newsletter-root.js +1 -1
- package/dist/components/u-passkey.js +1 -1
- package/dist/components/u-reset-password-button.js +1 -1
- package/dist/components/u-send-magic-code-button.js +1 -1
- package/dist/components/u-signin-step.js +1 -1
- package/dist/components/u-ticketable-list.js +36 -29
- package/dist/components/u-ticketable-list.js.map +1 -1
- package/dist/esm/app-globals-CPU9ZcqZ.js.map +1 -1
- package/dist/esm/{auth-store-CVvBlKGv.js → auth-store-BMqUdTpC.js} +2 -3
- package/dist/esm/auth-store-BMqUdTpC.js.map +1 -0
- package/dist/esm/{i18n-CLdWzy5J.js → i18n-BANodpxG.js} +2 -8
- package/dist/esm/{i18n-CLdWzy5J.js.map → i18n-BANodpxG.js.map} +1 -1
- package/dist/esm/{index-DSDkaHWI.js → index-2p1QEJrx.js} +1477 -1108
- package/dist/esm/index-2p1QEJrx.js.map +1 -0
- package/dist/esm/index.js +3 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{newsletter-helpers-Dc_24im3.js → newsletter-helpers-D64LTcSM.js} +61 -74
- package/dist/esm/newsletter-helpers-D64LTcSM.js.map +1 -0
- package/dist/esm/{profile-helpers-CglNd6Nw.js → profile-helpers-DAvXZ9Uj.js} +3 -3
- package/dist/esm/{profile-helpers-CglNd6Nw.js.map → profile-helpers-DAvXZ9Uj.js.map} +1 -1
- package/dist/esm/u-conditional-render.entry.js +5 -6
- package/dist/esm/u-conditional-render.entry.js.map +1 -1
- package/dist/esm/u-config.entry.js +4 -5
- package/dist/esm/u-config.entry.js.map +1 -1
- package/dist/esm/u-email-field.entry.js +2 -2
- package/dist/esm/u-error-message.entry.js +3 -3
- package/dist/esm/u-error-message.entry.js.map +1 -1
- package/dist/esm/u-field.u-raw-field.entry.js.map +1 -1
- package/dist/esm/u-field_2.entry.js +2 -2
- package/dist/esm/u-full-profile.entry.js +1 -1
- package/dist/esm/u-logout-button.entry.js +5 -6
- package/dist/esm/u-logout-button.entry.js.map +1 -1
- package/dist/esm/u-magic-code-field.entry.js +4 -5
- package/dist/esm/u-magic-code-field.entry.js.map +1 -1
- package/dist/esm/u-missing-field.entry.js +1 -1
- package/dist/esm/u-missing-fields-submit-button.entry.js +9 -5
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -1
- package/dist/esm/u-newsletter-checkbox.entry.js +5 -6
- package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -1
- package/dist/esm/u-newsletter-logout-button.entry.js +6 -7
- package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -1
- package/dist/esm/u-newsletter-preference-checkbox.entry.js +5 -6
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -1
- package/dist/esm/u-newsletter-resend-doi-button.entry.js +4 -5
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -1
- package/dist/esm/u-newsletter-root.entry.js +4 -5
- package/dist/esm/u-newsletter-root.entry.js.map +1 -1
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js +4 -5
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -1
- package/dist/esm/u-passkey.entry.js +4 -5
- package/dist/esm/u-passkey.entry.js.map +1 -1
- package/dist/esm/u-password-field.entry.js +2 -2
- package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -1
- package/dist/esm/u-profile_2.entry.js +36 -56
- package/dist/esm/u-registration-button.entry.js +2 -2
- package/dist/esm/u-reset-password-button.entry.js +3 -4
- package/dist/esm/u-reset-password-button.entry.js.map +1 -1
- package/dist/esm/u-send-magic-code-button.entry.js +4 -5
- package/dist/esm/u-send-magic-code-button.entry.js.map +1 -1
- package/dist/esm/u-signed-in.entry.js +1 -1
- package/dist/esm/u-signin-root.entry.js +1 -1
- package/dist/esm/u-signin-step.entry.js +4 -5
- package/dist/esm/u-signin-step.entry.js.map +1 -1
- package/dist/esm/u-signin-strategy.entry.js +1 -1
- package/dist/esm/u-social-login-button.entry.js +2 -2
- package/dist/esm/u-spinner.entry.js +1 -1
- package/dist/esm/u-spinner.entry.js.map +1 -1
- package/dist/esm/u-ticketable-list.entry.js +40 -30
- package/dist/esm/u-ticketable-list.entry.js.map +1 -1
- package/dist/sdk/index.esm.js +1 -1
- package/dist/sdk/index.esm.js.map +1 -1
- package/dist/sdk/locales/de.json +0 -1
- package/dist/sdk/locales/en.json +0 -1
- package/dist/sdk/locales/fr.json +0 -1
- package/dist/sdk/locales/it.json +0 -1
- package/dist/sdk/locales/nl_be.json +0 -1
- package/dist/sdk/locales/ro.json +0 -1
- package/dist/sdk/{p-5babee6b.entry.js → p-098eef67.entry.js} +2 -2
- package/dist/sdk/p-0e74de96.entry.js +2 -0
- package/dist/sdk/p-0e74de96.entry.js.map +1 -0
- package/dist/sdk/p-0ed36cbb.entry.js +2 -0
- package/dist/sdk/p-0ed36cbb.entry.js.map +1 -0
- package/dist/sdk/p-1149e044.entry.js +2 -0
- package/dist/sdk/p-1149e044.entry.js.map +1 -0
- package/dist/sdk/p-16d763fd.entry.js +2 -0
- package/dist/sdk/p-16d763fd.entry.js.map +1 -0
- package/dist/sdk/p-1d404c36.entry.js +2 -0
- package/dist/sdk/p-1d404c36.entry.js.map +1 -0
- package/dist/sdk/p-32da9922.entry.js +2 -0
- package/dist/sdk/p-32da9922.entry.js.map +1 -0
- package/dist/sdk/p-3d3a9c90.entry.js +2 -0
- package/dist/sdk/p-3d3a9c90.entry.js.map +1 -0
- package/dist/sdk/p-43024bd6.entry.js +2 -0
- package/dist/sdk/p-43024bd6.entry.js.map +1 -0
- package/dist/sdk/{p-e2e7061b.entry.js → p-5da49d00.entry.js} +2 -2
- package/dist/sdk/{p-f961fbea.entry.js → p-67af762e.entry.js} +2 -2
- package/dist/sdk/{p-f961fbea.entry.js.map → p-67af762e.entry.js.map} +1 -1
- package/dist/sdk/p-7099bd56.entry.js +2 -0
- package/dist/sdk/p-7099bd56.entry.js.map +1 -0
- package/dist/sdk/p-745742f1.entry.js +2 -0
- package/dist/sdk/{p-9e71a36c.entry.js → p-74e6523f.entry.js} +2 -2
- package/dist/sdk/p-86d16818.entry.js +2 -0
- package/dist/sdk/{p-effaf86b.entry.js.map → p-86d16818.entry.js.map} +1 -1
- package/dist/sdk/{p-DA84OuuU.js → p-BasehRhW.js} +2 -2
- package/dist/sdk/{p-DA84OuuU.js.map → p-BasehRhW.js.map} +1 -1
- package/dist/sdk/p-C4aHo4nN.js +2 -0
- package/dist/sdk/p-C4aHo4nN.js.map +1 -0
- package/dist/sdk/p-CFiZLMAA.js.map +1 -1
- package/dist/sdk/p-DGDhaqCd.js +2 -0
- package/dist/sdk/p-DGDhaqCd.js.map +1 -0
- package/dist/sdk/{p-CbRhHGU5.js → p-DSq94RWc.js} +2 -2
- package/dist/sdk/{p-CbRhHGU5.js.map → p-DSq94RWc.js.map} +1 -1
- package/dist/sdk/p-DSwwVdp1.js +2 -0
- package/dist/sdk/p-DSwwVdp1.js.map +1 -0
- package/dist/sdk/p-a037bbe3.entry.js +2 -0
- package/dist/sdk/p-a037bbe3.entry.js.map +1 -0
- package/dist/sdk/p-adcb7911.entry.js +2 -0
- package/dist/sdk/p-adcb7911.entry.js.map +1 -0
- package/dist/sdk/{p-39b61f33.entry.js → p-bbbec3d4.entry.js} +2 -2
- package/dist/sdk/{p-f232929b.entry.js → p-c2fba7c8.entry.js} +2 -2
- package/dist/sdk/p-c4618822.entry.js +2 -0
- package/dist/sdk/p-c4618822.entry.js.map +1 -0
- package/dist/sdk/p-ca4e57f2.entry.js +2 -0
- package/dist/sdk/p-ca4e57f2.entry.js.map +1 -0
- package/dist/sdk/p-ce4ab77c.entry.js +2 -0
- package/dist/sdk/p-ce4ab77c.entry.js.map +1 -0
- package/dist/sdk/p-d143e097.entry.js +2 -0
- package/dist/sdk/p-d143e097.entry.js.map +1 -0
- package/dist/sdk/{p-a69b83ec.entry.js → p-e0d2397c.entry.js} +2 -2
- package/dist/sdk/{p-80034205.entry.js → p-e6beb9d7.entry.js} +2 -2
- package/dist/sdk/p-ecc7fcff.entry.js +2 -0
- package/dist/sdk/p-ecc7fcff.entry.js.map +1 -0
- package/dist/sdk/{p-2cb6a2d0.entry.js → p-f1788e52.entry.js} +2 -2
- package/dist/sdk/p-fb665a5c.entry.js +2 -0
- package/dist/sdk/p-fb665a5c.entry.js.map +1 -0
- package/dist/sdk/p-fc67cf07.entry.js +2 -0
- package/dist/sdk/p-fc67cf07.entry.js.map +1 -0
- package/dist/sdk/sdk.esm.js +1 -1
- package/dist/sdk/u-conditional-render.entry.esm.js.map +1 -1
- package/dist/sdk/u-config.entry.esm.js.map +1 -1
- package/dist/sdk/u-error-message.entry.esm.js.map +1 -1
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-logout-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-missing-fields-submit-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-checkbox.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-logout-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-preference-checkbox.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-resend-doi-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-root.entry.esm.js.map +1 -1
- package/dist/sdk/u-newsletter-toggle-subscription-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-passkey.entry.esm.js.map +1 -1
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-reset-password-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-send-magic-code-button.entry.esm.js.map +1 -1
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
- package/dist/types/api/base-client.d.ts +54 -0
- package/dist/types/api/base-service.d.ts +62 -0
- package/dist/types/api/client.d.ts +9 -31
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/shared.d.ts +11 -0
- package/dist/types/api/standalone.d.ts +105 -0
- package/dist/types/auth/api/auth.d.ts +71 -287
- package/dist/types/auth/api/schemas.d.ts +572 -0
- package/dist/types/auth/auth-helpers.d.ts +65 -66
- package/dist/types/auth/store/auth-store.d.ts +3 -3
- package/dist/types/components.d.ts +0 -72
- package/dist/types/newsletter/api/newsletters.d.ts +73 -196
- package/dist/types/newsletter/api/schemas.d.ts +192 -0
- package/dist/types/profile/api/profile.d.ts +12 -237
- package/dist/types/profile/api/schemas.d.ts +336 -0
- package/dist/types/profile/components/profile/profile.d.ts +1 -17
- package/dist/types/shared/components/error-message/error-message.d.ts +1 -1
- package/dist/types/ticketable/api/schemas.d.ts +108 -15
- package/dist/types/ticketable/api/subscriptions.d.ts +16 -83
- package/dist/types/ticketable/api/ticketable-service.d.ts +39 -0
- package/dist/types/ticketable/api/tickets.d.ts +16 -85
- package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +2 -12
- package/package.json +5 -1
- package/dist/cjs/auth-NU3DBc-6.js +0 -581
- package/dist/cjs/auth-NU3DBc-6.js.map +0 -1
- package/dist/cjs/auth-store-BaxuIp4z.js.map +0 -1
- package/dist/cjs/index-R2MKLaem.js.map +0 -1
- package/dist/cjs/newsletter-helpers-DR0vsegt.js.map +0 -1
- package/dist/collection/ticketable/api/get-with-schema.js +0 -35
- package/dist/collection/ticketable/api/get-with-schema.js.map +0 -1
- package/dist/components/auth.js +0 -580
- package/dist/components/auth.js.map +0 -1
- package/dist/esm/auth-nsjRdpvS.js +0 -579
- package/dist/esm/auth-nsjRdpvS.js.map +0 -1
- package/dist/esm/auth-store-CVvBlKGv.js.map +0 -1
- package/dist/esm/index-DSDkaHWI.js.map +0 -1
- package/dist/esm/newsletter-helpers-Dc_24im3.js.map +0 -1
- package/dist/sdk/p-0ab98e7a.entry.js +0 -2
- package/dist/sdk/p-0ab98e7a.entry.js.map +0 -1
- package/dist/sdk/p-0d324822.entry.js +0 -2
- package/dist/sdk/p-0d324822.entry.js.map +0 -1
- package/dist/sdk/p-0fb37ee9.entry.js +0 -2
- package/dist/sdk/p-0fb37ee9.entry.js.map +0 -1
- package/dist/sdk/p-3049e73f.entry.js +0 -2
- package/dist/sdk/p-3049e73f.entry.js.map +0 -1
- package/dist/sdk/p-312b919e.entry.js +0 -2
- package/dist/sdk/p-312b919e.entry.js.map +0 -1
- package/dist/sdk/p-319c5d3b.entry.js +0 -2
- package/dist/sdk/p-319c5d3b.entry.js.map +0 -1
- package/dist/sdk/p-34b98f55.entry.js +0 -2
- package/dist/sdk/p-34b98f55.entry.js.map +0 -1
- package/dist/sdk/p-4ec3302d.entry.js +0 -2
- package/dist/sdk/p-4ec3302d.entry.js.map +0 -1
- package/dist/sdk/p-568eabbc.entry.js +0 -2
- package/dist/sdk/p-568eabbc.entry.js.map +0 -1
- package/dist/sdk/p-5b40a68b.entry.js +0 -2
- package/dist/sdk/p-5b40a68b.entry.js.map +0 -1
- package/dist/sdk/p-66587fdd.entry.js +0 -2
- package/dist/sdk/p-66587fdd.entry.js.map +0 -1
- package/dist/sdk/p-88d93d64.entry.js +0 -2
- package/dist/sdk/p-90e2253e.entry.js +0 -2
- package/dist/sdk/p-90e2253e.entry.js.map +0 -1
- package/dist/sdk/p-BiILQPdb.js +0 -2
- package/dist/sdk/p-BiILQPdb.js.map +0 -1
- package/dist/sdk/p-DdUvQelg.js +0 -2
- package/dist/sdk/p-DdUvQelg.js.map +0 -1
- package/dist/sdk/p-PKvQIsOt.js +0 -2
- package/dist/sdk/p-PKvQIsOt.js.map +0 -1
- package/dist/sdk/p-a4f5940f.entry.js +0 -2
- package/dist/sdk/p-a4f5940f.entry.js.map +0 -1
- package/dist/sdk/p-aMrLKr2m.js +0 -2
- package/dist/sdk/p-aMrLKr2m.js.map +0 -1
- package/dist/sdk/p-bfb04b17.entry.js +0 -2
- package/dist/sdk/p-bfb04b17.entry.js.map +0 -1
- package/dist/sdk/p-c6816542.entry.js +0 -2
- package/dist/sdk/p-c6816542.entry.js.map +0 -1
- package/dist/sdk/p-da363474.entry.js +0 -2
- package/dist/sdk/p-da363474.entry.js.map +0 -1
- package/dist/sdk/p-e54d5d38.entry.js +0 -2
- package/dist/sdk/p-e54d5d38.entry.js.map +0 -1
- package/dist/sdk/p-e81bbd62.entry.js +0 -2
- package/dist/sdk/p-e81bbd62.entry.js.map +0 -1
- package/dist/sdk/p-effaf86b.entry.js +0 -2
- package/dist/types/ticketable/api/get-with-schema.d.ts +0 -3
- /package/dist/sdk/{p-5babee6b.entry.js.map → p-098eef67.entry.js.map} +0 -0
- /package/dist/sdk/{p-e2e7061b.entry.js.map → p-5da49d00.entry.js.map} +0 -0
- /package/dist/sdk/{p-88d93d64.entry.js.map → p-745742f1.entry.js.map} +0 -0
- /package/dist/sdk/{p-9e71a36c.entry.js.map → p-74e6523f.entry.js.map} +0 -0
- /package/dist/sdk/{p-39b61f33.entry.js.map → p-bbbec3d4.entry.js.map} +0 -0
- /package/dist/sdk/{p-f232929b.entry.js.map → p-c2fba7c8.entry.js.map} +0 -0
- /package/dist/sdk/{p-a69b83ec.entry.js.map → p-e0d2397c.entry.js.map} +0 -0
- /package/dist/sdk/{p-80034205.entry.js.map → p-e6beb9d7.entry.js.map} +0 -0
- /package/dist/sdk/{p-2cb6a2d0.entry.js.map → p-f1788e52.entry.js.map} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base API client with shared functionality for both browser and standalone environments.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiResponse<T> {
|
|
5
|
+
data?: T;
|
|
6
|
+
success: boolean;
|
|
7
|
+
status: number;
|
|
8
|
+
headers: Headers;
|
|
9
|
+
error?: Error | string;
|
|
10
|
+
connectionError?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ApiClientConfig {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
apiKey: string;
|
|
15
|
+
onConnectionChange?: (isConnected: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
/** Query parameters that can be passed to GET requests */
|
|
18
|
+
export type QueryParams = Record<string, string | number | boolean | undefined | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Abstract base class for API clients.
|
|
21
|
+
* Provides shared functionality for making HTTP requests.
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class BaseApiClient {
|
|
24
|
+
/**
|
|
25
|
+
* Error messages that indicate a connection failure rather than a server error.
|
|
26
|
+
* Grouped by source/environment.
|
|
27
|
+
*/
|
|
28
|
+
protected static readonly CONNECTION_ERROR_MESSAGES: string[];
|
|
29
|
+
protected onConnectionChange?: (isConnected: boolean) => void;
|
|
30
|
+
baseUrl: string;
|
|
31
|
+
api_key: string;
|
|
32
|
+
constructor(config: ApiClientConfig);
|
|
33
|
+
protected isConnectionError(error: unknown): boolean;
|
|
34
|
+
protected setConnectionStatus(isConnected: boolean): void;
|
|
35
|
+
protected baseHeaders(): Headers;
|
|
36
|
+
protected mergeHeaders(base: Headers, extra?: HeadersInit): Headers;
|
|
37
|
+
/**
|
|
38
|
+
* Builds a query string from params, filtering out undefined/null values.
|
|
39
|
+
*/
|
|
40
|
+
protected buildQueryString(params?: QueryParams): string;
|
|
41
|
+
/**
|
|
42
|
+
* Override this in subclasses to add environment-specific request options.
|
|
43
|
+
*/
|
|
44
|
+
protected abstract getRequestOptions(): RequestInit;
|
|
45
|
+
/**
|
|
46
|
+
* Override this in subclasses to handle connection errors (e.g., Sentry reporting).
|
|
47
|
+
*/
|
|
48
|
+
protected abstract handleConnectionError(error: unknown, endpoint: string, method: string): void;
|
|
49
|
+
protected request<T>(method: string, endpoint: string, body?: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
50
|
+
get<T>(endpoint: string, headers?: HeadersInit, params?: QueryParams): Promise<ApiResponse<T>>;
|
|
51
|
+
post<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
52
|
+
patch<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
53
|
+
delete<T>(endpoint: string, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ApiResponse, QueryParams } from "./base-client";
|
|
2
|
+
import { type SchemaValidationError } from "./shared";
|
|
3
|
+
/**
|
|
4
|
+
* Minimal logger interface that services depend on
|
|
5
|
+
*/
|
|
6
|
+
export interface Logger {
|
|
7
|
+
error: (...args: any[]) => void;
|
|
8
|
+
warn: (...args: any[]) => void;
|
|
9
|
+
info: (...args: any[]) => void;
|
|
10
|
+
debug: (...args: any[]) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Error reporter interface for capturing exceptions
|
|
14
|
+
*/
|
|
15
|
+
export interface ErrorReporter {
|
|
16
|
+
captureException: (error: unknown, context?: Record<string, unknown>) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Dependencies that can be injected into services
|
|
20
|
+
*/
|
|
21
|
+
export interface ServiceDependencies {
|
|
22
|
+
/** Logger instance - defaults to console */
|
|
23
|
+
logger?: Logger;
|
|
24
|
+
/** Error reporter (e.g., Sentry) - defaults to no-op */
|
|
25
|
+
errorReporter?: ErrorReporter;
|
|
26
|
+
/** Get the current ID token for authenticated requests */
|
|
27
|
+
getIdToken?: () => Promise<string | null>;
|
|
28
|
+
/** Get the current locale for i18n */
|
|
29
|
+
getLocale?: () => string;
|
|
30
|
+
}
|
|
31
|
+
export type Payload<T> = {
|
|
32
|
+
payload: T;
|
|
33
|
+
};
|
|
34
|
+
export type Options<T> = {
|
|
35
|
+
options?: Partial<T>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* API Client interface that services depend on
|
|
39
|
+
*/
|
|
40
|
+
export interface ApiClientInterface {
|
|
41
|
+
baseUrl: string;
|
|
42
|
+
api_key: string;
|
|
43
|
+
get<T>(endpoint: string, headers?: HeadersInit, params?: QueryParams): Promise<ApiResponse<T>>;
|
|
44
|
+
post<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
45
|
+
patch<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
46
|
+
delete<T>(endpoint: string, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
47
|
+
}
|
|
48
|
+
export type CommonErrors = ["connection_failed", null] | ["schema_validation_error", SchemaValidationError];
|
|
49
|
+
export type ServiceResult<TSuccess, TError extends string = never> = CommonErrors | (TError extends never ? never : [TError, {
|
|
50
|
+
error_identifier: string;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}]) | [null, TSuccess];
|
|
53
|
+
export declare abstract class BaseService {
|
|
54
|
+
protected client: ApiClientInterface;
|
|
55
|
+
protected logger: Logger;
|
|
56
|
+
protected errorReporter: ErrorReporter;
|
|
57
|
+
protected getIdToken: () => Promise<string | null>;
|
|
58
|
+
protected getLocale: () => string;
|
|
59
|
+
constructor(client: ApiClientInterface, serviceName: string, deps?: ServiceDependencies);
|
|
60
|
+
protected handleResponse<T>(response: ApiResponse<unknown>, handler: () => T): T | ["connection_failed", null] | ["schema_validation_error", SchemaValidationError];
|
|
61
|
+
protected buildAuthHeaders(headers: Record<string, string | undefined>): HeadersInit | undefined;
|
|
62
|
+
}
|
|
@@ -1,32 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type ApiConfig = {
|
|
11
|
-
baseUrl: string;
|
|
12
|
-
apiKey: string;
|
|
13
|
-
onConnectionChange?: (isConnected: boolean) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare class ApiClient {
|
|
16
|
-
baseUrl: string;
|
|
17
|
-
api_key: string;
|
|
18
|
-
private static readonly CONNECTION_ERROR_MESSAGES;
|
|
19
|
-
private onConnectionChange?;
|
|
20
|
-
private logger;
|
|
21
|
-
constructor(baseUrl: string, api_key: string, onConnectionChange?: (isConnected: boolean) => void);
|
|
22
|
-
private isConnectionError;
|
|
23
|
-
private setConnectionStatus;
|
|
24
|
-
private baseHeaders;
|
|
25
|
-
private mergeHeaders;
|
|
26
|
-
private request;
|
|
27
|
-
get<T>(endpoint: string, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
28
|
-
post<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
29
|
-
patch<T>(endpoint: string, body: object, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
30
|
-
delete<T>(endpoint: string, headers?: HeadersInit): Promise<ApiResponse<T>>;
|
|
31
|
-
getWithSchema<TReturn, TArgs extends object, TParams = undefined>(returnSchema: z.ZodSchema<TReturn>, urlBuilder: (args: TArgs) => string, paramSchema?: z.ZodSchema<TParams>): TParams extends undefined ? (args: TArgs) => Promise<ApiResponse<TReturn>> : (args: TArgs, params?: TParams) => Promise<ApiResponse<TReturn>>;
|
|
1
|
+
import { BaseApiClient } from "./base-client";
|
|
2
|
+
export type { ApiResponse, ApiClientConfig, QueryParams } from "./base-client";
|
|
3
|
+
/**
|
|
4
|
+
* Browser-specific API client with CORS mode and Sentry error reporting.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ApiClient extends BaseApiClient {
|
|
7
|
+
constructor(baseUrl: string, apiKey: string, onConnectionChange?: (isConnected: boolean) => void);
|
|
8
|
+
protected getRequestOptions(): RequestInit;
|
|
9
|
+
protected handleConnectionError(error: unknown, endpoint: string, method: string): void;
|
|
32
10
|
}
|
|
@@ -7,6 +7,7 @@ export * from "../auth/api/auth";
|
|
|
7
7
|
export * from "../newsletter/api/newsletters";
|
|
8
8
|
export * from "../profile/api/profile";
|
|
9
9
|
export * from "./shared";
|
|
10
|
+
export * from "./base-service";
|
|
10
11
|
export * from "../ticketable/api/subscriptions";
|
|
11
12
|
export * from "../ticketable/api/tickets";
|
|
12
13
|
export declare class UnidyClient {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Base error schema that all API errors extend from.
|
|
4
|
+
* Contains the common error_identifier field.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BaseErrorSchema: z.ZodObject<{
|
|
7
|
+
error_identifier: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type BaseError = z.infer<typeof BaseErrorSchema>;
|
|
10
|
+
/**
|
|
11
|
+
* Schema validation error extends base error with an array of error messages.
|
|
12
|
+
*/
|
|
2
13
|
export declare const SchemaValidationErrorSchema: z.ZodObject<{
|
|
3
14
|
error_identifier: z.ZodString;
|
|
4
15
|
errors: z.ZodArray<z.ZodString>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { AuthService } from "../auth/api/auth";
|
|
2
|
+
import { NewsletterService } from "../newsletter/api/newsletters";
|
|
3
|
+
import { ProfileService } from "../profile/api/profile";
|
|
4
|
+
import { TicketsService } from "../ticketable/api/tickets";
|
|
5
|
+
import { SubscriptionsService } from "../ticketable/api/subscriptions";
|
|
6
|
+
import { BaseApiClient } from "./base-client";
|
|
7
|
+
import type { ServiceDependencies } from "./base-service";
|
|
8
|
+
/**
|
|
9
|
+
* Standalone API client and services for use outside of Stencil components.
|
|
10
|
+
* This module can be used in Node.js or any other JavaScript environment.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import {
|
|
15
|
+
* StandaloneApiClient,
|
|
16
|
+
* AuthService,
|
|
17
|
+
* NewsletterService,
|
|
18
|
+
* } from '@unidy.io/sdk/standalone';
|
|
19
|
+
*
|
|
20
|
+
* // Create the API client
|
|
21
|
+
* const client = new StandaloneApiClient({
|
|
22
|
+
* baseUrl: 'https://api.unidy.io',
|
|
23
|
+
* apiKey: 'your-api-key',
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // Create services with optional custom logger/error reporter
|
|
27
|
+
* const auth = new AuthService(client, {
|
|
28
|
+
* logger: console,
|
|
29
|
+
* errorReporter: { captureException: (e) => myErrorTracker.capture(e) },
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // Use the services
|
|
33
|
+
* const result = await auth.createSignIn({ payload: { email: 'user@example.com' } });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export { AuthService } from "../auth/api/auth";
|
|
37
|
+
export { NewsletterService } from "../newsletter/api/newsletters";
|
|
38
|
+
export { ProfileService } from "../profile/api/profile";
|
|
39
|
+
export { TicketsService } from "../ticketable/api/tickets";
|
|
40
|
+
export { SubscriptionsService } from "../ticketable/api/subscriptions";
|
|
41
|
+
export type * from "../auth/api/auth";
|
|
42
|
+
export type * from "../newsletter/api/newsletters";
|
|
43
|
+
export type * from "../profile/api/profile";
|
|
44
|
+
export type * from "../ticketable/api/tickets";
|
|
45
|
+
export type * from "../ticketable/api/subscriptions";
|
|
46
|
+
export type { SchemaValidationError, PaginationMeta, PaginationParams } from "./shared";
|
|
47
|
+
export type { CommonErrors, ServiceResult, Logger, ErrorReporter, ServiceDependencies, ApiClientInterface, } from "./base-service";
|
|
48
|
+
export type { ApiResponse, ApiClientConfig, QueryParams } from "./base-client";
|
|
49
|
+
/**
|
|
50
|
+
* Standalone API client without browser-specific dependencies.
|
|
51
|
+
*
|
|
52
|
+
* This client provides the same interface as the browser ApiClient but without
|
|
53
|
+
* dependencies on Sentry, i18n, localStorage, or other browser APIs.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import { StandaloneApiClient, AuthService } from '@unidy.io/sdk/standalone';
|
|
58
|
+
*
|
|
59
|
+
* const client = new StandaloneApiClient({
|
|
60
|
+
* baseUrl: 'https://api.unidy.io',
|
|
61
|
+
* apiKey: 'your-api-key',
|
|
62
|
+
* });
|
|
63
|
+
*
|
|
64
|
+
* const auth = new AuthService(client);
|
|
65
|
+
* const result = await auth.createSignIn({ payload: { email: 'user@example.com' } });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare class StandaloneApiClient extends BaseApiClient {
|
|
69
|
+
protected getRequestOptions(): RequestInit;
|
|
70
|
+
protected handleConnectionError(_error: unknown, _endpoint: string, _method: string): void;
|
|
71
|
+
}
|
|
72
|
+
import type { ApiClientConfig } from "./base-client";
|
|
73
|
+
/**
|
|
74
|
+
* Creates a standalone Unidy client with all services for use outside of Stencil.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* import { createStandaloneClient } from '@unidy.io/sdk/standalone';
|
|
79
|
+
*
|
|
80
|
+
* const client = createStandaloneClient({
|
|
81
|
+
* baseUrl: 'https://api.unidy.io',
|
|
82
|
+
* apiKey: 'your-api-key',
|
|
83
|
+
* // Optional: inject custom dependencies
|
|
84
|
+
* deps: {
|
|
85
|
+
* logger: myLogger,
|
|
86
|
+
* errorReporter: { captureException: (e) => Sentry.captureException(e) },
|
|
87
|
+
* },
|
|
88
|
+
* });
|
|
89
|
+
*
|
|
90
|
+
* const signIn = await client.auth.createSignIn({ payload: { email: 'user@example.com' } });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export interface StandaloneUnidyClientConfig extends ApiClientConfig {
|
|
94
|
+
/** Optional dependencies to inject into all services */
|
|
95
|
+
deps?: ServiceDependencies;
|
|
96
|
+
}
|
|
97
|
+
export declare class StandaloneUnidyClient {
|
|
98
|
+
auth: AuthService;
|
|
99
|
+
newsletters: NewsletterService;
|
|
100
|
+
profile: ProfileService;
|
|
101
|
+
tickets: TicketsService;
|
|
102
|
+
subscriptions: SubscriptionsService;
|
|
103
|
+
constructor(config: StandaloneUnidyClientConfig);
|
|
104
|
+
}
|
|
105
|
+
export declare function createStandaloneClient(config: StandaloneUnidyClientConfig): StandaloneUnidyClient;
|
|
@@ -1,253 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
required: z.ZodBoolean;
|
|
57
|
-
label: z.ZodString;
|
|
58
|
-
attr_name: z.ZodString;
|
|
59
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
61
|
-
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"_NOT_SET_">, z.ZodBoolean]>>;
|
|
62
|
-
type: z.ZodEnum<{
|
|
63
|
-
radio: "radio";
|
|
64
|
-
}>;
|
|
65
|
-
radio_options: z.ZodArray<z.ZodObject<{
|
|
66
|
-
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"_NOT_SET_">, z.ZodBoolean]>>;
|
|
67
|
-
label: z.ZodString;
|
|
68
|
-
checked: z.ZodBoolean;
|
|
69
|
-
}, z.core.$strict>>;
|
|
70
|
-
}, z.core.$strict>>;
|
|
71
|
-
first_name: z.ZodOptional<z.ZodObject<{
|
|
72
|
-
required: z.ZodBoolean;
|
|
73
|
-
label: z.ZodString;
|
|
74
|
-
attr_name: z.ZodString;
|
|
75
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
77
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
78
|
-
type: z.ZodEnum<{
|
|
79
|
-
text: "text";
|
|
80
|
-
textarea: "textarea";
|
|
81
|
-
}>;
|
|
82
|
-
}, z.core.$strict>>;
|
|
83
|
-
last_name: z.ZodOptional<z.ZodObject<{
|
|
84
|
-
required: z.ZodBoolean;
|
|
85
|
-
label: z.ZodString;
|
|
86
|
-
attr_name: z.ZodString;
|
|
87
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
89
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
90
|
-
type: z.ZodEnum<{
|
|
91
|
-
text: "text";
|
|
92
|
-
textarea: "textarea";
|
|
93
|
-
}>;
|
|
94
|
-
}, z.core.$strict>>;
|
|
95
|
-
phone_number: z.ZodOptional<z.ZodObject<{
|
|
96
|
-
required: z.ZodBoolean;
|
|
97
|
-
label: z.ZodString;
|
|
98
|
-
attr_name: z.ZodString;
|
|
99
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
101
|
-
value: z.ZodUnion<readonly [z.ZodNullable<z.ZodString>]>;
|
|
102
|
-
type: z.ZodEnum<{
|
|
103
|
-
tel: "tel";
|
|
104
|
-
}>;
|
|
105
|
-
}, z.core.$strict>>;
|
|
106
|
-
company_name: z.ZodOptional<z.ZodObject<{
|
|
107
|
-
required: z.ZodBoolean;
|
|
108
|
-
label: z.ZodString;
|
|
109
|
-
attr_name: z.ZodString;
|
|
110
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
112
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
113
|
-
type: z.ZodEnum<{
|
|
114
|
-
text: "text";
|
|
115
|
-
textarea: "textarea";
|
|
116
|
-
}>;
|
|
117
|
-
}, z.core.$strict>>;
|
|
118
|
-
address_line_1: z.ZodOptional<z.ZodObject<{
|
|
119
|
-
required: z.ZodBoolean;
|
|
120
|
-
label: z.ZodString;
|
|
121
|
-
attr_name: z.ZodString;
|
|
122
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
124
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
125
|
-
type: z.ZodEnum<{
|
|
126
|
-
text: "text";
|
|
127
|
-
textarea: "textarea";
|
|
128
|
-
}>;
|
|
129
|
-
}, z.core.$strict>>;
|
|
130
|
-
address_line_2: z.ZodOptional<z.ZodObject<{
|
|
131
|
-
required: z.ZodBoolean;
|
|
132
|
-
label: z.ZodString;
|
|
133
|
-
attr_name: z.ZodString;
|
|
134
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
136
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
137
|
-
type: z.ZodEnum<{
|
|
138
|
-
text: "text";
|
|
139
|
-
textarea: "textarea";
|
|
140
|
-
}>;
|
|
141
|
-
}, z.core.$strict>>;
|
|
142
|
-
city: z.ZodOptional<z.ZodObject<{
|
|
143
|
-
required: z.ZodBoolean;
|
|
144
|
-
label: z.ZodString;
|
|
145
|
-
attr_name: z.ZodString;
|
|
146
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
148
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
149
|
-
type: z.ZodEnum<{
|
|
150
|
-
text: "text";
|
|
151
|
-
textarea: "textarea";
|
|
152
|
-
}>;
|
|
153
|
-
}, z.core.$strict>>;
|
|
154
|
-
postal_code: z.ZodOptional<z.ZodObject<{
|
|
155
|
-
required: z.ZodBoolean;
|
|
156
|
-
label: z.ZodString;
|
|
157
|
-
attr_name: z.ZodString;
|
|
158
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
160
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
161
|
-
type: z.ZodEnum<{
|
|
162
|
-
text: "text";
|
|
163
|
-
textarea: "textarea";
|
|
164
|
-
}>;
|
|
165
|
-
}, z.core.$strict>>;
|
|
166
|
-
country_code: z.ZodOptional<z.ZodObject<{
|
|
167
|
-
required: z.ZodBoolean;
|
|
168
|
-
label: z.ZodString;
|
|
169
|
-
attr_name: z.ZodString;
|
|
170
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
172
|
-
value: z.ZodNullable<z.ZodString>;
|
|
173
|
-
type: z.ZodEnum<{
|
|
174
|
-
select: "select";
|
|
175
|
-
}>;
|
|
176
|
-
options: z.ZodArray<z.ZodObject<{
|
|
177
|
-
value: z.ZodString;
|
|
178
|
-
label: z.ZodString;
|
|
179
|
-
}, z.core.$strict>>;
|
|
180
|
-
}, z.core.$strict>>;
|
|
181
|
-
date_of_birth: z.ZodOptional<z.ZodObject<{
|
|
182
|
-
required: z.ZodBoolean;
|
|
183
|
-
label: z.ZodString;
|
|
184
|
-
attr_name: z.ZodString;
|
|
185
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
187
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
188
|
-
type: z.ZodEnum<{
|
|
189
|
-
date: "date";
|
|
190
|
-
"datetime-local": "datetime-local";
|
|
191
|
-
}>;
|
|
192
|
-
}, z.core.$strict>>;
|
|
193
|
-
preferred_language: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
194
|
-
required: z.ZodBoolean;
|
|
195
|
-
label: z.ZodString;
|
|
196
|
-
attr_name: z.ZodString;
|
|
197
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
199
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
200
|
-
type: z.ZodEnum<{
|
|
201
|
-
text: "text";
|
|
202
|
-
textarea: "textarea";
|
|
203
|
-
}>;
|
|
204
|
-
}, z.core.$strict>>>;
|
|
205
|
-
custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
206
|
-
required: z.ZodBoolean;
|
|
207
|
-
label: z.ZodString;
|
|
208
|
-
attr_name: z.ZodString;
|
|
209
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
-
locked_text: z.ZodOptional<z.ZodString>;
|
|
211
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
212
|
-
type: z.ZodEnum<{
|
|
213
|
-
number: "number";
|
|
214
|
-
boolean: "boolean";
|
|
215
|
-
date: "date";
|
|
216
|
-
radio: "radio";
|
|
217
|
-
text: "text";
|
|
218
|
-
textarea: "textarea";
|
|
219
|
-
tel: "tel";
|
|
220
|
-
select: "select";
|
|
221
|
-
"datetime-local": "datetime-local";
|
|
222
|
-
checkbox: "checkbox";
|
|
223
|
-
}>;
|
|
224
|
-
readonly: z.ZodBoolean;
|
|
225
|
-
radio_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
226
|
-
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"_NOT_SET_">, z.ZodBoolean]>>;
|
|
227
|
-
label: z.ZodString;
|
|
228
|
-
checked: z.ZodBoolean;
|
|
229
|
-
}, z.core.$strict>>>;
|
|
230
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
231
|
-
value: z.ZodString;
|
|
232
|
-
label: z.ZodString;
|
|
233
|
-
}, z.core.$strict>>>;
|
|
234
|
-
}, z.core.$strict>>>;
|
|
235
|
-
}, z.core.$strip>;
|
|
236
|
-
sid: z.ZodOptional<z.ZodString>;
|
|
237
|
-
}, z.core.$strip>;
|
|
238
|
-
declare const InvalidPasswordResponseSchema: z.ZodObject<{
|
|
239
|
-
error_details: z.ZodObject<{
|
|
240
|
-
password: z.ZodArray<z.ZodString>;
|
|
241
|
-
}, z.core.$strip>;
|
|
242
|
-
}, z.core.$strip>;
|
|
243
|
-
export type ErrorResponse = z.infer<typeof ErrorSchema>;
|
|
244
|
-
export type LoginOptions = z.infer<typeof LoginOptionsSchema>;
|
|
245
|
-
export type CreateSignInResponse = z.infer<typeof CreateSignInResponseSchema>;
|
|
246
|
-
export type TokenResponse = z.infer<typeof TokenResponseSchema>;
|
|
247
|
-
export type SendMagicCodeResponse = z.infer<typeof SendMagicCodeResponseSchema>;
|
|
248
|
-
export type RequiredFieldsResponse = z.infer<typeof RequiredFieldsResponseSchema>;
|
|
249
|
-
export type SendMagicCodeError = z.infer<typeof SendMagicCodeErrorSchema>;
|
|
250
|
-
type CommonErrors = ["connection_failed", null] | ["schema_validation_error", SchemaValidationError];
|
|
1
|
+
import { type ApiClientInterface, BaseService, type CommonErrors, type ServiceDependencies, type Payload } from "../../api";
|
|
2
|
+
import { type CreateSignInResponse, type ErrorResponse, type InvalidPasswordResponse, type PasskeyCredential, type PasskeyOptionsResponse, type RequiredFieldsResponse, type SendMagicCodeError, type SendMagicCodeResponse, type TokenResponse } from "./schemas";
|
|
3
|
+
export type { ErrorResponse, CreateSignInResponse, TokenResponse, SendMagicCodeResponse, RequiredFieldsResponse, SendMagicCodeError, InvalidPasswordResponse, PasskeyOptionsResponse, PasskeyCredential, } from "./schemas";
|
|
4
|
+
export type { LoginOptions } from "./schemas";
|
|
5
|
+
export type CreateSignInArgs = Payload<{
|
|
6
|
+
email: string;
|
|
7
|
+
password?: string;
|
|
8
|
+
sendMagicCode?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export type SendMagicCodeArgs = {
|
|
11
|
+
signInId: string;
|
|
12
|
+
};
|
|
13
|
+
export type AuthenticateWithPasswordArgs = {
|
|
14
|
+
signInId: string;
|
|
15
|
+
} & Payload<{
|
|
16
|
+
password: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type AuthenticateWithMagicCodeArgs = {
|
|
19
|
+
signInId: string;
|
|
20
|
+
} & Payload<{
|
|
21
|
+
code: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type UpdateMissingFieldsArgs = {
|
|
24
|
+
signInId: string;
|
|
25
|
+
} & Payload<{
|
|
26
|
+
user: Record<string, any>;
|
|
27
|
+
}>;
|
|
28
|
+
export type RefreshTokenArgs = {
|
|
29
|
+
signInId: string;
|
|
30
|
+
};
|
|
31
|
+
export type SendResetPasswordEmailArgs = {
|
|
32
|
+
signInId: string;
|
|
33
|
+
} & Payload<{
|
|
34
|
+
returnTo: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type ResetPasswordArgs = {
|
|
37
|
+
signInId: string;
|
|
38
|
+
token: string;
|
|
39
|
+
} & Payload<{
|
|
40
|
+
password: string;
|
|
41
|
+
passwordConfirmation: string;
|
|
42
|
+
}>;
|
|
43
|
+
export type ValidateResetPasswordTokenArgs = {
|
|
44
|
+
signInId: string;
|
|
45
|
+
token: string;
|
|
46
|
+
};
|
|
47
|
+
export type SignOutArgs = {
|
|
48
|
+
signInId: string;
|
|
49
|
+
};
|
|
50
|
+
export type GetPasskeyOptionsArgs = {
|
|
51
|
+
signInId?: string;
|
|
52
|
+
};
|
|
53
|
+
export type AuthenticateWithPasskeyArgs = Payload<{
|
|
54
|
+
credential: PasskeyCredential;
|
|
55
|
+
}>;
|
|
251
56
|
export type CreateSignInResult = CommonErrors | ["account_not_found", ErrorResponse] | [null, CreateSignInResponse] | AuthenticateWithPasswordResult | SendMagicCodeResult;
|
|
252
57
|
export type AuthenticateResultShared = CommonErrors | ["sign_in_not_found", ErrorResponse] | ["sign_in_expired", ErrorResponse] | ["account_locked", ErrorResponse] | ["missing_required_fields", RequiredFieldsResponse] | [null, TokenResponse];
|
|
253
58
|
export type SendMagicCodeResult = CommonErrors | ["magic_code_recently_created", SendMagicCodeError] | ["sign_in_not_found", ErrorResponse] | ["sign_in_expired", ErrorResponse] | ["account_locked", ErrorResponse] | [null, SendMagicCodeResponse];
|
|
@@ -255,46 +60,25 @@ export type AuthenticateWithPasswordResult = ["invalid_password", ErrorResponse]
|
|
|
255
60
|
export type AuthenticateWithMagicCodeResult = ["not_valid", ErrorResponse] | ["used", ErrorResponse] | ["expired", ErrorResponse] | AuthenticateResultShared;
|
|
256
61
|
export type RefreshTokenResult = CommonErrors | ["invalid_refresh_token", ErrorResponse] | ["refresh_token_revoked", ErrorResponse] | ["sign_in_not_found", ErrorResponse] | [null, TokenResponse];
|
|
257
62
|
export type SendResetPasswordEmailResult = CommonErrors | ["password_not_set", ErrorResponse] | ["reset_password_already_sent", ErrorResponse] | ["sign_in_not_found", ErrorResponse] | ["invalid_return_to", ErrorResponse] | ["return_to_required", ErrorResponse] | [null, null];
|
|
258
|
-
export type InvalidPasswordResponse = z.infer<typeof InvalidPasswordResponseSchema>;
|
|
259
63
|
export type ResetPasswordResult = CommonErrors | ["reset_token_missing", ErrorResponse] | ["invalid_reset_token", ErrorResponse] | ["reset_token_expired", ErrorResponse] | ["invalid_password", InvalidPasswordResponse] | [null, null];
|
|
260
64
|
export type ValidateResetPasswordTokenResult = CommonErrors | ["reset_token_missing", ErrorResponse] | ["invalid_reset_token", ErrorResponse] | ["reset_token_expired", ErrorResponse] | [null, null];
|
|
261
65
|
export type SignOutResult = CommonErrors | ["sign_in_not_found", ErrorResponse] | ["missing_id_token", ErrorResponse] | ["invalid_id_token", ErrorResponse] | [null, null];
|
|
262
|
-
declare const PasskeyOptionsResponseSchema: z.ZodObject<{
|
|
263
|
-
challenge: z.ZodString;
|
|
264
|
-
timeout: z.ZodNumber;
|
|
265
|
-
rpId: z.ZodString;
|
|
266
|
-
userVerification: z.ZodString;
|
|
267
|
-
allowCredentials: z.ZodArray<z.ZodAny>;
|
|
268
|
-
}, z.core.$strip>;
|
|
269
|
-
declare const PasskeyCredentialSchema: z.ZodObject<{
|
|
270
|
-
id: z.ZodString;
|
|
271
|
-
rawId: z.ZodString;
|
|
272
|
-
response: z.ZodObject<{
|
|
273
|
-
authenticatorData: z.ZodString;
|
|
274
|
-
clientDataJSON: z.ZodString;
|
|
275
|
-
signature: z.ZodString;
|
|
276
|
-
}, z.core.$strip>;
|
|
277
|
-
type: z.ZodString;
|
|
278
|
-
}, z.core.$strip>;
|
|
279
|
-
export type PasskeyOptionsResponse = z.infer<typeof PasskeyOptionsResponseSchema>;
|
|
280
|
-
export type PasskeyCredential = z.infer<typeof PasskeyCredentialSchema>;
|
|
281
66
|
export type GetPasskeyOptionsResult = CommonErrors | ["bad_request", ErrorResponse] | [null, PasskeyOptionsResponse];
|
|
282
67
|
export type AuthenticateWithPasskeyResult = CommonErrors | ["invalid_passkey", ErrorResponse] | ["verification_failed", ErrorResponse] | ["authentication_failed", ErrorResponse] | ["bad_request", ErrorResponse] | [null, TokenResponse];
|
|
283
|
-
export declare class AuthService {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
68
|
+
export declare class AuthService extends BaseService {
|
|
69
|
+
constructor(client: ApiClientInterface, deps?: ServiceDependencies);
|
|
70
|
+
/** Safely parse error response, returning a fallback if parsing fails */
|
|
71
|
+
private parseErrorResponse;
|
|
72
|
+
createSignIn(args: CreateSignInArgs): Promise<CreateSignInResult>;
|
|
73
|
+
sendMagicCode(args: SendMagicCodeArgs): Promise<SendMagicCodeResult>;
|
|
74
|
+
authenticateWithPassword(args: AuthenticateWithPasswordArgs): Promise<AuthenticateWithPasswordResult>;
|
|
75
|
+
updateMissingFields(args: UpdateMissingFieldsArgs): Promise<AuthenticateResultShared>;
|
|
76
|
+
authenticateWithMagicCode(args: AuthenticateWithMagicCodeArgs): Promise<AuthenticateWithMagicCodeResult>;
|
|
77
|
+
refreshToken(args: RefreshTokenArgs): Promise<RefreshTokenResult>;
|
|
78
|
+
sendResetPasswordEmail(args: SendResetPasswordEmailArgs): Promise<SendResetPasswordEmailResult>;
|
|
79
|
+
resetPassword(args: ResetPasswordArgs): Promise<ResetPasswordResult>;
|
|
80
|
+
validateResetPasswordToken(args: ValidateResetPasswordTokenArgs): Promise<ValidateResetPasswordTokenResult>;
|
|
81
|
+
signOut(args: SignOutArgs): Promise<SignOutResult>;
|
|
82
|
+
getPasskeyOptions(args?: GetPasskeyOptionsArgs): Promise<GetPasskeyOptionsResult>;
|
|
83
|
+
authenticateWithPasskey(args: AuthenticateWithPasskeyArgs): Promise<AuthenticateWithPasskeyResult>;
|
|
299
84
|
}
|
|
300
|
-
export {};
|