@tagadapay/headless-sdk 1.7.0 → 1.8.0-rc.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 (129) hide show
  1. package/README.md +1 -216
  2. package/package.json +6 -11
  3. package/dist/core/client.d.ts +0 -61
  4. package/dist/core/client.d.ts.map +0 -1
  5. package/dist/core/client.js +0 -69
  6. package/dist/core/client.js.map +0 -1
  7. package/dist/core/errors.d.ts +0 -46
  8. package/dist/core/errors.d.ts.map +0 -1
  9. package/dist/core/errors.js +0 -57
  10. package/dist/core/errors.js.map +0 -1
  11. package/dist/core/helpers/autocomplete.d.ts +0 -89
  12. package/dist/core/helpers/autocomplete.d.ts.map +0 -1
  13. package/dist/core/helpers/autocomplete.js +0 -186
  14. package/dist/core/helpers/autocomplete.js.map +0 -1
  15. package/dist/core/helpers/countries.d.ts +0 -45
  16. package/dist/core/helpers/countries.d.ts.map +0 -1
  17. package/dist/core/helpers/countries.js +0 -65
  18. package/dist/core/helpers/countries.js.map +0 -1
  19. package/dist/core/helpers/currency.d.ts +0 -26
  20. package/dist/core/helpers/currency.d.ts.map +0 -1
  21. package/dist/core/helpers/currency.js +0 -72
  22. package/dist/core/helpers/currency.js.map +0 -1
  23. package/dist/core/helpers/index.d.ts +0 -5
  24. package/dist/core/helpers/index.d.ts.map +0 -1
  25. package/dist/core/helpers/index.js +0 -5
  26. package/dist/core/helpers/index.js.map +0 -1
  27. package/dist/core/helpers/iso3166.d.ts +0 -28
  28. package/dist/core/helpers/iso3166.d.ts.map +0 -1
  29. package/dist/core/helpers/iso3166.js +0 -84
  30. package/dist/core/helpers/iso3166.js.map +0 -1
  31. package/dist/core/http.d.ts +0 -27
  32. package/dist/core/http.d.ts.map +0 -1
  33. package/dist/core/http.js +0 -116
  34. package/dist/core/http.js.map +0 -1
  35. package/dist/core/index.d.ts +0 -13
  36. package/dist/core/index.d.ts.map +0 -1
  37. package/dist/core/index.js +0 -12
  38. package/dist/core/index.js.map +0 -1
  39. package/dist/core/modules/catalog.d.ts +0 -27
  40. package/dist/core/modules/catalog.d.ts.map +0 -1
  41. package/dist/core/modules/catalog.js +0 -38
  42. package/dist/core/modules/catalog.js.map +0 -1
  43. package/dist/core/modules/checkout.d.ts +0 -262
  44. package/dist/core/modules/checkout.d.ts.map +0 -1
  45. package/dist/core/modules/checkout.js +0 -459
  46. package/dist/core/modules/checkout.js.map +0 -1
  47. package/dist/core/modules/customer.d.ts +0 -33
  48. package/dist/core/modules/customer.d.ts.map +0 -1
  49. package/dist/core/modules/customer.js +0 -53
  50. package/dist/core/modules/customer.js.map +0 -1
  51. package/dist/core/modules/funnel.d.ts +0 -38
  52. package/dist/core/modules/funnel.d.ts.map +0 -1
  53. package/dist/core/modules/funnel.js +0 -138
  54. package/dist/core/modules/funnel.js.map +0 -1
  55. package/dist/core/modules/offers.d.ts +0 -137
  56. package/dist/core/modules/offers.d.ts.map +0 -1
  57. package/dist/core/modules/offers.js +0 -141
  58. package/dist/core/modules/offers.js.map +0 -1
  59. package/dist/core/modules/payment.d.ts +0 -298
  60. package/dist/core/modules/payment.d.ts.map +0 -1
  61. package/dist/core/modules/payment.js +0 -701
  62. package/dist/core/modules/payment.js.map +0 -1
  63. package/dist/core/types.d.ts +0 -505
  64. package/dist/core/types.d.ts.map +0 -1
  65. package/dist/core/types.js +0 -5
  66. package/dist/core/types.js.map +0 -1
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/index.js.map +0 -1
  69. package/dist/react/hooks/useCatalog.d.ts +0 -25
  70. package/dist/react/hooks/useCatalog.d.ts.map +0 -1
  71. package/dist/react/hooks/useCatalog.js +0 -58
  72. package/dist/react/hooks/useCatalog.js.map +0 -1
  73. package/dist/react/hooks/useCheckout.d.ts +0 -58
  74. package/dist/react/hooks/useCheckout.d.ts.map +0 -1
  75. package/dist/react/hooks/useCheckout.js +0 -168
  76. package/dist/react/hooks/useCheckout.js.map +0 -1
  77. package/dist/react/hooks/useCustomer.d.ts +0 -28
  78. package/dist/react/hooks/useCustomer.d.ts.map +0 -1
  79. package/dist/react/hooks/useCustomer.js +0 -77
  80. package/dist/react/hooks/useCustomer.js.map +0 -1
  81. package/dist/react/hooks/useGoogleAutocomplete.d.ts +0 -26
  82. package/dist/react/hooks/useGoogleAutocomplete.d.ts.map +0 -1
  83. package/dist/react/hooks/useGoogleAutocomplete.js +0 -70
  84. package/dist/react/hooks/useGoogleAutocomplete.js.map +0 -1
  85. package/dist/react/hooks/useISOData.d.ts +0 -23
  86. package/dist/react/hooks/useISOData.d.ts.map +0 -1
  87. package/dist/react/hooks/useISOData.js +0 -63
  88. package/dist/react/hooks/useISOData.js.map +0 -1
  89. package/dist/react/hooks/useOffers.d.ts +0 -134
  90. package/dist/react/hooks/useOffers.d.ts.map +0 -1
  91. package/dist/react/hooks/useOffers.js +0 -171
  92. package/dist/react/hooks/useOffers.js.map +0 -1
  93. package/dist/react/hooks/usePayment.d.ts +0 -108
  94. package/dist/react/hooks/usePayment.d.ts.map +0 -1
  95. package/dist/react/hooks/usePayment.js +0 -233
  96. package/dist/react/hooks/usePayment.js.map +0 -1
  97. package/dist/react/index.d.ts +0 -20
  98. package/dist/react/index.d.ts.map +0 -1
  99. package/dist/react/index.js +0 -11
  100. package/dist/react/index.js.map +0 -1
  101. package/dist/react/internal/redirectGuard.d.ts +0 -9
  102. package/dist/react/internal/redirectGuard.d.ts.map +0 -1
  103. package/dist/react/internal/redirectGuard.js +0 -25
  104. package/dist/react/internal/redirectGuard.js.map +0 -1
  105. package/dist/react/provider.d.ts +0 -31
  106. package/dist/react/provider.d.ts.map +0 -1
  107. package/dist/react/provider.js +0 -32
  108. package/dist/react/provider.js.map +0 -1
  109. package/dist/stripe/StripeExpressButton.d.ts +0 -30
  110. package/dist/stripe/StripeExpressButton.d.ts.map +0 -1
  111. package/dist/stripe/StripeExpressButton.js +0 -32
  112. package/dist/stripe/StripeExpressButton.js.map +0 -1
  113. package/dist/stripe/StripeExpressCheckout.d.ts +0 -98
  114. package/dist/stripe/StripeExpressCheckout.d.ts.map +0 -1
  115. package/dist/stripe/StripeExpressCheckout.js +0 -198
  116. package/dist/stripe/StripeExpressCheckout.js.map +0 -1
  117. package/dist/stripe/index.d.ts +0 -8
  118. package/dist/stripe/index.d.ts.map +0 -1
  119. package/dist/stripe/index.js +0 -15
  120. package/dist/stripe/index.js.map +0 -1
  121. package/dist/stripe/useStripeExpress.d.ts +0 -54
  122. package/dist/stripe/useStripeExpress.d.ts.map +0 -1
  123. package/dist/stripe/useStripeExpress.js +0 -126
  124. package/dist/stripe/useStripeExpress.js.map +0 -1
  125. package/dist/tagada-headless-react.min.js +0 -8
  126. package/dist/tagada-headless-react.min.js.map +0 -7
  127. package/dist/tagada-headless.js +0 -2229
  128. package/dist/tagada-headless.min.js +0 -8
  129. package/dist/tagada-headless.min.js.map +0 -7
package/dist/core/http.js DELETED
@@ -1,116 +0,0 @@
1
- import { TagadaError, TagadaAuthError, TagadaValidationError, TagadaNotFoundError, TagadaRateLimitError, TagadaNetworkError, } from './errors.js';
2
- const BASE_URLS = {
3
- production: 'https://api.tagada.io',
4
- development: 'https://api.tagada.dev',
5
- local: 'http://localhost:3000',
6
- };
7
- /**
8
- * Lightweight HTTP client built on native fetch.
9
- * Zero dependencies -- works in browser, edge runtimes, and Node 18+.
10
- */
11
- export class HttpClient {
12
- constructor(config) {
13
- this.baseUrl = config.baseUrl.replace(/\/$/, '');
14
- this.timeout = config.timeout;
15
- this.apiKey = config.apiKey;
16
- this.getToken = config.getToken;
17
- }
18
- static resolveBaseUrl(environment, override) {
19
- return override ?? BASE_URLS[environment] ?? BASE_URLS.production;
20
- }
21
- async request(path, options = {}) {
22
- const { method = 'GET', body, headers = {}, params, token, signal } = options;
23
- let url = `${this.baseUrl}${path}`;
24
- if (params) {
25
- const qs = new URLSearchParams();
26
- for (const [k, v] of Object.entries(params)) {
27
- if (v !== undefined)
28
- qs.set(k, String(v));
29
- }
30
- const str = qs.toString();
31
- if (str)
32
- url += `?${str}`;
33
- }
34
- const reqHeaders = {
35
- 'Content-Type': 'application/json',
36
- ...headers,
37
- };
38
- const authToken = token ?? this.apiKey ?? this.getToken?.();
39
- if (authToken) {
40
- reqHeaders['x-cms-token'] = authToken;
41
- }
42
- const controller = new AbortController();
43
- const timeoutId = setTimeout(() => controller.abort(), this.timeout);
44
- try {
45
- const res = await fetch(url, {
46
- method,
47
- headers: reqHeaders,
48
- body: body != null ? JSON.stringify(body) : undefined,
49
- signal: signal ?? controller.signal,
50
- });
51
- clearTimeout(timeoutId);
52
- if (res.ok) {
53
- const text = await res.text();
54
- return text ? JSON.parse(text) : {};
55
- }
56
- await this.handleErrorResponse(res, path);
57
- throw new TagadaError('Unexpected error', 'unknown', res.status);
58
- }
59
- catch (err) {
60
- clearTimeout(timeoutId);
61
- if (err instanceof TagadaError)
62
- throw err;
63
- if (err instanceof DOMException && err.name === 'AbortError') {
64
- throw new TagadaNetworkError(`Request to ${path} timed out after ${this.timeout}ms.`);
65
- }
66
- throw new TagadaNetworkError(err instanceof Error ? err.message : 'Network request failed.');
67
- }
68
- }
69
- get(path, options) {
70
- return this.request(path, { ...options, method: 'GET' });
71
- }
72
- post(path, body, options) {
73
- return this.request(path, { ...options, method: 'POST', body });
74
- }
75
- patch(path, body, options) {
76
- return this.request(path, { ...options, method: 'PATCH', body });
77
- }
78
- put(path, body, options) {
79
- return this.request(path, { ...options, method: 'PUT', body });
80
- }
81
- delete(path, options) {
82
- return this.request(path, { ...options, method: 'DELETE' });
83
- }
84
- async handleErrorResponse(res, path) {
85
- let parsed = {};
86
- try {
87
- parsed = (await res.json());
88
- }
89
- catch {
90
- // response isn't JSON
91
- }
92
- const msg = parsed.message ??
93
- parsed.error ??
94
- `Request failed: ${res.status} ${res.statusText} on ${path}`;
95
- switch (res.status) {
96
- case 401:
97
- case 403:
98
- throw new TagadaAuthError(msg);
99
- case 404:
100
- throw new TagadaNotFoundError(path, '');
101
- case 422: {
102
- const fieldErrors = Array.isArray(parsed.errors)
103
- ? parsed.errors
104
- : [];
105
- throw new TagadaValidationError(msg, fieldErrors);
106
- }
107
- case 429: {
108
- const retryAfter = Number(res.headers.get('Retry-After') ?? '1') * 1000;
109
- throw new TagadaRateLimitError(retryAfter);
110
- }
111
- default:
112
- throw new TagadaError(msg, 'api_error', res.status, parsed);
113
- }
114
- }
115
- }
116
- //# sourceMappingURL=http.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/core/http.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,MAAM,SAAS,GAAgC;IAC7C,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,wBAAwB;IACrC,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AASF;;;GAGG;AACH,MAAM,OAAO,UAAU;IAMrB,YAAY,MAAwB;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,WAAwB,EAAE,QAAiB;QAC/D,OAAO,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,OAAO,CAAc,IAAY,EAAE,UAA8B,EAAE;QACvE,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAE9E,IAAI,GAAG,GA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CAAC,EAAE,CAAC;gBACP,MAAM,IAAI,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YACpD,CAAC;YACD,KAAK,GAAG,CAAC,CAAC,CAAC;gBACT,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC;gBACxE,MAAM,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC;YAC7C,CAAC;YACD;gBACE,MAAM,IAAI,WAAW,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;CACF"}
@@ -1,13 +0,0 @@
1
- export { HeadlessClient, createHeadlessClient } from './client.js';
2
- export { CheckoutModule } from './modules/checkout.js';
3
- export { PaymentModule } from './modules/payment.js';
4
- export { OffersModule } from './modules/offers.js';
5
- export { CustomerModule } from './modules/customer.js';
6
- export { CatalogModule } from './modules/catalog.js';
7
- export { FunnelModule } from './modules/funnel.js';
8
- export { HttpClient } from './http.js';
9
- export { TagadaError, TagadaAuthError, TagadaValidationError, TagadaNotFoundError, TagadaRateLimitError, TagadaPaymentError, TagadaNetworkError, } from './errors.js';
10
- export { GoogleAutocompleteCore, loadGoogleMapsScript, ISODataCore, AVAILABLE_LANGUAGES, CurrencyUtils, formatMoney, ensureGeoDataLoaded, getCountries, getStatesForCountry, isLanguageLoaded, } from './helpers/index.js';
11
- export type { GooglePrediction, GooglePlaceDetails, ExtractedAddress, FormattedAddress, SupportedLanguage, ISOCountry, ISORegion, Country, State, Currency, } from './helpers/index.js';
12
- export type { Environment, HeadlessConfig, HttpRequestOptions, LineItem, CheckoutSession, CheckoutLineItem, CheckoutTotals, CheckoutCustomer, Address, ShippingRate, PaymentMethodConfig, PaymentSetupConfig, ExpressMethod, ExpressMethods, StoreConfig, PayResult, PayOptions, PayDirectOptions, ProcessPaymentOptions, ProcessPaymentResult, CreateInstrumentOptions, PaymentInstrument, ThreedsSession, PaymentStatus, Offer, OfferLineItem, OfferPreview, OfferPreviewItem, OfferPayResult, Customer, Order, OrderItem, Subscription, CatalogProduct, CatalogVariant, CatalogPrice, CurrencyOption, FunnelNavigateInput, FunnelNavigateResult, } from './types.js';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,OAAO,EACP,KAAK,EACL,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,YAAY,CAAC"}
@@ -1,12 +0,0 @@
1
- export { HeadlessClient, createHeadlessClient } from './client.js';
2
- export { CheckoutModule } from './modules/checkout.js';
3
- export { PaymentModule } from './modules/payment.js';
4
- export { OffersModule } from './modules/offers.js';
5
- export { CustomerModule } from './modules/customer.js';
6
- export { CatalogModule } from './modules/catalog.js';
7
- export { FunnelModule } from './modules/funnel.js';
8
- export { HttpClient } from './http.js';
9
- export { TagadaError, TagadaAuthError, TagadaValidationError, TagadaNotFoundError, TagadaRateLimitError, TagadaPaymentError, TagadaNetworkError, } from './errors.js';
10
- // Helpers: Google Autocomplete, ISO countries/regions, currency formatting
11
- export { GoogleAutocompleteCore, loadGoogleMapsScript, ISODataCore, AVAILABLE_LANGUAGES, CurrencyUtils, formatMoney, ensureGeoDataLoaded, getCountries, getStatesForCountry, isLanguageLoaded, } from './helpers/index.js';
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,2EAA2E;AAC3E,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { HttpClient } from '../http.js';
2
- import type { CatalogProduct } from '../types.js';
3
- /**
4
- * Fetches the product catalog for a store.
5
- *
6
- * Uses the public `/api/v1/products` endpoint (no auth required).
7
- */
8
- export declare class CatalogModule {
9
- private readonly http;
10
- private readonly storeId;
11
- constructor(http: HttpClient, storeId: string);
12
- /**
13
- * List all active products for the store, including variants and prices.
14
- *
15
- * @param opts.productIds Optional filter to specific product IDs.
16
- * @param opts.variantIds Optional filter to products containing these variant IDs.
17
- */
18
- getProducts(opts?: {
19
- productIds?: string[];
20
- variantIds?: string[];
21
- }): Promise<CatalogProduct[]>;
22
- /**
23
- * Get a single product by ID.
24
- */
25
- getProduct(productId: string): Promise<CatalogProduct | null>;
26
- }
27
- //# sourceMappingURL=catalog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/core/modules/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;GAIG;AACH,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM;IAGlC;;;;;OAKG;IACG,WAAW,CAAC,IAAI,CAAC,EAAE;QACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAiB7B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;CAIpE"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Fetches the product catalog for a store.
3
- *
4
- * Uses the public `/api/v1/products` endpoint (no auth required).
5
- */
6
- export class CatalogModule {
7
- constructor(http, storeId) {
8
- this.http = http;
9
- this.storeId = storeId;
10
- }
11
- /**
12
- * List all active products for the store, including variants and prices.
13
- *
14
- * @param opts.productIds Optional filter to specific product IDs.
15
- * @param opts.variantIds Optional filter to products containing these variant IDs.
16
- */
17
- async getProducts(opts) {
18
- const body = {
19
- storeId: this.storeId,
20
- includeVariants: true,
21
- includePrices: true,
22
- };
23
- if (opts?.productIds?.length)
24
- body.productIds = opts.productIds;
25
- if (opts?.variantIds?.length)
26
- body.variantIds = opts.variantIds;
27
- const res = await this.http.post('/api/v1/products', body);
28
- return res.items ?? [];
29
- }
30
- /**
31
- * Get a single product by ID.
32
- */
33
- async getProduct(productId) {
34
- const items = await this.getProducts({ productIds: [productId] });
35
- return items[0] ?? null;
36
- }
37
- }
38
- //# sourceMappingURL=catalog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/core/modules/catalog.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,OAAO,aAAa;IACxB,YACmB,IAAgB,EAChB,OAAe;QADf,SAAI,GAAJ,IAAI,CAAY;QAChB,YAAO,GAAP,OAAO,CAAQ;IAC/B,CAAC;IAEJ;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CAAC,IAGjB;QACC,MAAM,IAAI,GAA4B;YACpC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;SACpB,CAAC;QACF,IAAI,IAAI,EAAE,UAAU,EAAE,MAAM;YAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAChE,IAAI,IAAI,EAAE,UAAU,EAAE,MAAM;YAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAEhE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAC9B,kBAAkB,EAClB,IAAI,CACL,CAAC;QAEF,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,SAAiB;QAChC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAClE,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IAC1B,CAAC;CACF"}
@@ -1,262 +0,0 @@
1
- import type { HttpClient } from '../http.js';
2
- import type { CheckoutSession, LineItem, ShippingRate, Address, CheckoutCustomer } from '../types.js';
3
- /**
4
- * Result returned by `updateCart()`. Mirrors the
5
- * `POST /checkout-sessions/:id/line-items` payload (mutation stats, NOT
6
- * a refreshed session). Call `loadSession()` to get an updated session.
7
- */
8
- export interface UpdateCartResult {
9
- success: boolean;
10
- /** Number of existing line items updated. */
11
- updated: number;
12
- /** Number of new line items created. */
13
- created: number;
14
- /** Total number of line items in the cart after the mutation. */
15
- total: number;
16
- }
17
- /**
18
- * Manages checkout sessions — load, update cart, apply promo codes, handle shipping.
19
- *
20
- * Works for both **shipped** and **digital** products:
21
- *
22
- * **Shipped products** (physical goods):
23
- * ```
24
- * updateCustomer(id, { email, firstName, lastName })
25
- * updateAddress(id, { shippingAddress: { line1, city, ... } })
26
- * getShippingRates(id)
27
- * selectShippingRate(id, rateId)
28
- * ```
29
- *
30
- * **Digital products** (no shipping needed):
31
- * ```
32
- * updateCustomer(id, { email, firstName, lastName })
33
- * updateAddress(id, { billingAddress: { line1, city, country } })
34
- * // Skip shipping rates — go straight to payment
35
- * ```
36
- */
37
- export declare class CheckoutModule {
38
- private readonly http;
39
- private readonly storeId;
40
- private readonly onTokenChange?;
41
- private sessionToken;
42
- private customerEmail;
43
- private customerFirstName;
44
- private customerLastName;
45
- private customerPhone;
46
- /**
47
- * Last session returned by `loadSession()`. Cached so sibling modules
48
- * (e.g. `FunnelModule`) can read the cart without re-fetching. Cleared
49
- * intentionally on no events — call `loadSession()` again to refresh.
50
- */
51
- private _currentSession;
52
- constructor(http: HttpClient, storeId: string, onTokenChange?: ((token: string) => void) | undefined);
53
- /**
54
- * Returns the most recently loaded `CheckoutSession`, if any.
55
- *
56
- * Populated by `loadSession()`. Returns `undefined` if the SDK has not
57
- * loaded a session yet. Used by `funnel.navigate()` to source the cart.
58
- */
59
- getCurrentSession(): CheckoutSession | undefined;
60
- /**
61
- * Load an existing checkout session by its checkout token.
62
- *
63
- * @param checkoutToken The checkout token (from URL param `checkoutToken`).
64
- * @param sessionToken The JWT session token (from URL param `token`). Required for auth.
65
- * @param opts.currency Optional presentment currency override (e.g. 'EUR').
66
- * Only applied when the session has no currency set yet (first load).
67
- * Once set, currency is locked to the session and this param is ignored.
68
- *
69
- * Both `checkoutToken` and `sessionToken` come from the redirect URL returned by `createSession()`.
70
- * Example URL: `/checkout?checkoutToken=abc123&token=eyJ...`
71
- */
72
- loadSession(checkoutToken: string, sessionToken?: string, opts?: {
73
- currency?: string;
74
- }): Promise<CheckoutSession>;
75
- /**
76
- * Create a new checkout session.
77
- *
78
- * Returns a `checkoutToken` and `sessionToken` (JWT) needed for all subsequent calls.
79
- * Also returns a `checkoutUrl` (the full Tagada-hosted checkout URL, for reference).
80
- */
81
- createSession(opts: {
82
- items: LineItem[];
83
- currency?: string;
84
- returnUrl?: string;
85
- customerEmail?: string;
86
- customerFirstName?: string;
87
- customerLastName?: string;
88
- }): Promise<{
89
- checkoutUrl: string;
90
- checkoutToken: string;
91
- sessionToken: string;
92
- customerId: string;
93
- }>;
94
- /**
95
- * Create a session and produce a self-hosted redirect URL.
96
- *
97
- * Convenience wrapper around `createSession()`. Builds a URL of the
98
- * form `${origin}${checkoutPath}?checkoutToken=...&sessionToken=...`
99
- * that you can navigate to from a Cart page. The receiving page reads
100
- * the params via {@link CheckoutModule.parseTokensFromUrl} and calls
101
- * {@link CheckoutModule.loadSession}.
102
- *
103
- * For Tagada-hosted checkouts use the `checkoutUrl` returned by
104
- * `createSession()` directly — this helper is for **self-hosted**
105
- * checkout pages.
106
- *
107
- * @example
108
- * ```ts
109
- * const { url } = await tagada.checkout.createSessionUrl({
110
- * items: [{ variantId, quantity: 1 }],
111
- * checkoutPath: '/checkout',
112
- * });
113
- * window.location.href = url;
114
- * ```
115
- */
116
- createSessionUrl(opts: {
117
- items: LineItem[];
118
- currency?: string;
119
- returnUrl?: string;
120
- customerEmail?: string;
121
- customerFirstName?: string;
122
- customerLastName?: string;
123
- /** Path on the current origin for the self-hosted checkout. Default: `/checkout`. */
124
- checkoutPath?: string;
125
- /** Origin to use. Defaults to `window.location.origin`. */
126
- origin?: string;
127
- }): Promise<{
128
- url: string;
129
- checkoutUrl: string;
130
- checkoutToken: string;
131
- sessionToken: string;
132
- customerId: string;
133
- }>;
134
- /**
135
- * Read `checkoutToken` and session token from a URL.
136
- *
137
- * Recognizes both the SDK convention (`?sessionToken=`) and the
138
- * Tagada-hosted convention (`?token=`), so the same checkout page
139
- * works whether the user came from `createSessionUrl()` or directly
140
- * from a Tagada-hosted redirect.
141
- *
142
- * Returns `null` if `checkoutToken` is missing.
143
- *
144
- * @example
145
- * ```ts
146
- * const tokens = CheckoutModule.parseTokensFromUrl();
147
- * if (!tokens) {
148
- * window.location.href = '/cart';
149
- * return;
150
- * }
151
- * const session = await tagada.checkout.loadSession(
152
- * tokens.checkoutToken,
153
- * tokens.sessionToken,
154
- * );
155
- * ```
156
- */
157
- static parseTokensFromUrl(url?: string): {
158
- checkoutToken: string;
159
- sessionToken: string;
160
- } | null;
161
- /**
162
- * Replace the cart items for an existing session.
163
- *
164
- * Returns a server-side mutation summary (counts of created/updated rows).
165
- * It does NOT return the updated `CheckoutSession` — the underlying
166
- * `POST /checkout-sessions/:id/line-items` endpoint never has and the
167
- * previous typing was a lie that quietly assigned `{ success, updated, ... }`
168
- * into a `CheckoutSession` slot in `useCheckout`.
169
- *
170
- * Call `loadSession()` after this if you need the refreshed session
171
- * (the React `useCheckout` hook does this for you).
172
- */
173
- updateCart(sessionId: string, items: LineItem[]): Promise<UpdateCartResult>;
174
- /**
175
- * Update customer identity (email, name, phone).
176
- *
177
- * Call this before `updateAddress()` — the SDK remembers the values and
178
- * includes them automatically when addresses are submitted.
179
- *
180
- * If you prefer a single call, use `updateCustomerAndAddress()` instead.
181
- */
182
- updateCustomer(sessionId: string, customer: Partial<CheckoutCustomer>): Promise<void>;
183
- /**
184
- * Update shipping and/or billing address on the session.
185
- *
186
- * Automatically includes customer name/phone stored from `updateCustomer()`.
187
- * Uses the same atomic API call as the production checkout, so email,
188
- * customer name, and addresses are all persisted together.
189
- *
190
- * **Shipped products**: pass `shippingAddress`. If `billingAddress` is omitted,
191
- * the shipping address is automatically used as billing.
192
- *
193
- * **Digital products**: pass only `billingAddress` (no shipping needed).
194
- *
195
- * @example
196
- * // Shipped product — billing = shipping automatically
197
- * await checkout.updateAddress(sessionId, {
198
- * shippingAddress: { line1: '10 Rue de la Paix', city: 'Paris', postalCode: '75002', country: 'FR' },
199
- * });
200
- *
201
- * @example
202
- * // Digital product — billing only
203
- * await checkout.updateAddress(sessionId, {
204
- * billingAddress: { country: 'FR' },
205
- * });
206
- */
207
- updateAddress(sessionId: string, addresses: {
208
- shippingAddress?: Address;
209
- billingAddress?: Address;
210
- }): Promise<void>;
211
- /**
212
- * Set customer info + addresses in one call (mirrors production checkout).
213
- *
214
- * Equivalent to calling `updateCustomer()` then `updateAddress()`, but
215
- * in a single network request.
216
- */
217
- updateCustomerAndAddress(sessionId: string, data: {
218
- customer: Partial<CheckoutCustomer>;
219
- shippingAddress?: Address;
220
- billingAddress?: Address;
221
- }): Promise<void>;
222
- /** Map an SDK Address to the API shape, injecting stored customer fields. */
223
- private mapAddress;
224
- /** Apply a promotion code to the session. */
225
- applyPromoCode(sessionId: string, code: string): Promise<void>;
226
- /** Remove a promotion from the session by promotion ID. */
227
- removePromoCode(sessionId: string, promotionId?: string): Promise<void>;
228
- /**
229
- * Fetch available shipping rates for the session's address.
230
- * Only relevant for **shipped products** — digital products can skip this step.
231
- *
232
- * Requires a shipping address to be set first via `updateAddress()`.
233
- * Returns an empty array if no rates are configured or address is missing.
234
- */
235
- getShippingRates(sessionId: string): Promise<ShippingRate[]>;
236
- /**
237
- * Normalize the v1 rates payload (`shippingRateName`, `estimatedDeliveryTime`)
238
- * to the SDK's `ShippingRate` shape (`name`, `estimatedDays`). Without
239
- * this the consumer's UI shows blank rate names — the demo's "Delivery"
240
- * radios were rendering only the price, no label.
241
- */
242
- private normalizeShippingRate;
243
- /**
244
- * Select a shipping rate for the session.
245
- * Only relevant for **shipped products** — digital products can skip this step.
246
- */
247
- selectShippingRate(sessionId: string, rateId: string): Promise<void>;
248
- /**
249
- * Normalize the raw v2 API response into a cleaner CheckoutSession shape.
250
- * The raw response has nested `checkoutSession` + `summary` -- we flatten it.
251
- */
252
- private normalizeSession;
253
- /**
254
- * Map the raw API address shape (`address1`, `address2`, `postal`) onto
255
- * the SDK's `Address` shape (`line1`, `line2`, `postalCode`). Without
256
- * this, `session.shippingAddress.line1` is silently undefined after a
257
- * reload — the type was lying about the actual key names — which is
258
- * what makes the demo lose form state on refresh.
259
- */
260
- private normalizeAddress;
261
- }
262
- //# sourceMappingURL=checkout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../src/core/modules/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,cAAc;IAcvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;IAfjC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,aAAa,CAAqB;IAC1C;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAA8B;gBAGlC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,aAAA;IAG1D;;;;;OAKG;IACH,iBAAiB,IAAI,eAAe,GAAG,SAAS;IAIhD;;;;;;;;;;;OAWG;IACG,WAAW,CACf,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,EACr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