@tagadapay/headless-sdk 1.6.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 (125) hide show
  1. package/README.md +1 -186
  2. package/package.json +6 -11
  3. package/dist/core/client.d.ts +0 -54
  4. package/dist/core/client.d.ts.map +0 -1
  5. package/dist/core/client.js +0 -67
  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 -12
  36. package/dist/core/index.d.ts.map +0 -1
  37. package/dist/core/index.js +0 -11
  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 -249
  44. package/dist/core/modules/checkout.d.ts.map +0 -1
  45. package/dist/core/modules/checkout.js +0 -448
  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/offers.d.ts +0 -137
  52. package/dist/core/modules/offers.d.ts.map +0 -1
  53. package/dist/core/modules/offers.js +0 -141
  54. package/dist/core/modules/offers.js.map +0 -1
  55. package/dist/core/modules/payment.d.ts +0 -298
  56. package/dist/core/modules/payment.d.ts.map +0 -1
  57. package/dist/core/modules/payment.js +0 -701
  58. package/dist/core/modules/payment.js.map +0 -1
  59. package/dist/core/types.d.ts +0 -460
  60. package/dist/core/types.d.ts.map +0 -1
  61. package/dist/core/types.js +0 -5
  62. package/dist/core/types.js.map +0 -1
  63. package/dist/index.d.ts.map +0 -1
  64. package/dist/index.js.map +0 -1
  65. package/dist/react/hooks/useCatalog.d.ts +0 -25
  66. package/dist/react/hooks/useCatalog.d.ts.map +0 -1
  67. package/dist/react/hooks/useCatalog.js +0 -58
  68. package/dist/react/hooks/useCatalog.js.map +0 -1
  69. package/dist/react/hooks/useCheckout.d.ts +0 -58
  70. package/dist/react/hooks/useCheckout.d.ts.map +0 -1
  71. package/dist/react/hooks/useCheckout.js +0 -168
  72. package/dist/react/hooks/useCheckout.js.map +0 -1
  73. package/dist/react/hooks/useCustomer.d.ts +0 -28
  74. package/dist/react/hooks/useCustomer.d.ts.map +0 -1
  75. package/dist/react/hooks/useCustomer.js +0 -77
  76. package/dist/react/hooks/useCustomer.js.map +0 -1
  77. package/dist/react/hooks/useGoogleAutocomplete.d.ts +0 -26
  78. package/dist/react/hooks/useGoogleAutocomplete.d.ts.map +0 -1
  79. package/dist/react/hooks/useGoogleAutocomplete.js +0 -70
  80. package/dist/react/hooks/useGoogleAutocomplete.js.map +0 -1
  81. package/dist/react/hooks/useISOData.d.ts +0 -23
  82. package/dist/react/hooks/useISOData.d.ts.map +0 -1
  83. package/dist/react/hooks/useISOData.js +0 -63
  84. package/dist/react/hooks/useISOData.js.map +0 -1
  85. package/dist/react/hooks/useOffers.d.ts +0 -134
  86. package/dist/react/hooks/useOffers.d.ts.map +0 -1
  87. package/dist/react/hooks/useOffers.js +0 -171
  88. package/dist/react/hooks/useOffers.js.map +0 -1
  89. package/dist/react/hooks/usePayment.d.ts +0 -108
  90. package/dist/react/hooks/usePayment.d.ts.map +0 -1
  91. package/dist/react/hooks/usePayment.js +0 -233
  92. package/dist/react/hooks/usePayment.js.map +0 -1
  93. package/dist/react/index.d.ts +0 -20
  94. package/dist/react/index.d.ts.map +0 -1
  95. package/dist/react/index.js +0 -11
  96. package/dist/react/index.js.map +0 -1
  97. package/dist/react/internal/redirectGuard.d.ts +0 -9
  98. package/dist/react/internal/redirectGuard.d.ts.map +0 -1
  99. package/dist/react/internal/redirectGuard.js +0 -25
  100. package/dist/react/internal/redirectGuard.js.map +0 -1
  101. package/dist/react/provider.d.ts +0 -31
  102. package/dist/react/provider.d.ts.map +0 -1
  103. package/dist/react/provider.js +0 -32
  104. package/dist/react/provider.js.map +0 -1
  105. package/dist/stripe/StripeExpressButton.d.ts +0 -30
  106. package/dist/stripe/StripeExpressButton.d.ts.map +0 -1
  107. package/dist/stripe/StripeExpressButton.js +0 -32
  108. package/dist/stripe/StripeExpressButton.js.map +0 -1
  109. package/dist/stripe/StripeExpressCheckout.d.ts +0 -98
  110. package/dist/stripe/StripeExpressCheckout.d.ts.map +0 -1
  111. package/dist/stripe/StripeExpressCheckout.js +0 -198
  112. package/dist/stripe/StripeExpressCheckout.js.map +0 -1
  113. package/dist/stripe/index.d.ts +0 -8
  114. package/dist/stripe/index.d.ts.map +0 -1
  115. package/dist/stripe/index.js +0 -15
  116. package/dist/stripe/index.js.map +0 -1
  117. package/dist/stripe/useStripeExpress.d.ts +0 -54
  118. package/dist/stripe/useStripeExpress.d.ts.map +0 -1
  119. package/dist/stripe/useStripeExpress.js +0 -126
  120. package/dist/stripe/useStripeExpress.js.map +0 -1
  121. package/dist/tagada-headless-react.min.js +0 -8
  122. package/dist/tagada-headless-react.min.js.map +0 -7
  123. package/dist/tagada-headless.js +0 -2070
  124. package/dist/tagada-headless.min.js +0 -8
  125. 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,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QACnC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,EAAE,GAAG,IAAI,eAAe,EAAE,CAAC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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,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 { HttpClient } from './http.js';
8
- export { TagadaError, TagadaAuthError, TagadaValidationError, TagadaNotFoundError, TagadaRateLimitError, TagadaPaymentError, TagadaNetworkError, } from './errors.js';
9
- export { GoogleAutocompleteCore, loadGoogleMapsScript, ISODataCore, AVAILABLE_LANGUAGES, CurrencyUtils, formatMoney, ensureGeoDataLoaded, getCountries, getStatesForCountry, isLanguageLoaded, } from './helpers/index.js';
10
- export type { GooglePrediction, GooglePlaceDetails, ExtractedAddress, FormattedAddress, SupportedLanguage, ISOCountry, ISORegion, Country, State, Currency, } from './helpers/index.js';
11
- 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, } from './types.js';
12
- //# 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;AAErD,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,GACf,MAAM,YAAY,CAAC"}
@@ -1,11 +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 { HttpClient } from './http.js';
8
- export { TagadaError, TagadaAuthError, TagadaValidationError, TagadaNotFoundError, TagadaRateLimitError, TagadaPaymentError, TagadaNetworkError, } from './errors.js';
9
- // Helpers: Google Autocomplete, ISO countries/regions, currency formatting
10
- export { GoogleAutocompleteCore, loadGoogleMapsScript, ISODataCore, AVAILABLE_LANGUAGES, CurrencyUtils, formatMoney, ensureGeoDataLoaded, getCountries, getStatesForCountry, isLanguageLoaded, } from './helpers/index.js';
11
- //# 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;AAErD,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,249 +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
- constructor(http: HttpClient, storeId: string, onTokenChange?: ((token: string) => void) | undefined);
47
- /**
48
- * Load an existing checkout session by its checkout token.
49
- *
50
- * @param checkoutToken The checkout token (from URL param `checkoutToken`).
51
- * @param sessionToken The JWT session token (from URL param `token`). Required for auth.
52
- * @param opts.currency Optional presentment currency override (e.g. 'EUR').
53
- * Only applied when the session has no currency set yet (first load).
54
- * Once set, currency is locked to the session and this param is ignored.
55
- *
56
- * Both `checkoutToken` and `sessionToken` come from the redirect URL returned by `createSession()`.
57
- * Example URL: `/checkout?checkoutToken=abc123&token=eyJ...`
58
- */
59
- loadSession(checkoutToken: string, sessionToken?: string, opts?: {
60
- currency?: string;
61
- }): Promise<CheckoutSession>;
62
- /**
63
- * Create a new checkout session.
64
- *
65
- * Returns a `checkoutToken` and `sessionToken` (JWT) needed for all subsequent calls.
66
- * Also returns a `checkoutUrl` (the full Tagada-hosted checkout URL, for reference).
67
- */
68
- createSession(opts: {
69
- items: LineItem[];
70
- currency?: string;
71
- returnUrl?: string;
72
- customerEmail?: string;
73
- customerFirstName?: string;
74
- customerLastName?: string;
75
- }): Promise<{
76
- checkoutUrl: string;
77
- checkoutToken: string;
78
- sessionToken: string;
79
- customerId: string;
80
- }>;
81
- /**
82
- * Create a session and produce a self-hosted redirect URL.
83
- *
84
- * Convenience wrapper around `createSession()`. Builds a URL of the
85
- * form `${origin}${checkoutPath}?checkoutToken=...&sessionToken=...`
86
- * that you can navigate to from a Cart page. The receiving page reads
87
- * the params via {@link CheckoutModule.parseTokensFromUrl} and calls
88
- * {@link CheckoutModule.loadSession}.
89
- *
90
- * For Tagada-hosted checkouts use the `checkoutUrl` returned by
91
- * `createSession()` directly — this helper is for **self-hosted**
92
- * checkout pages.
93
- *
94
- * @example
95
- * ```ts
96
- * const { url } = await tagada.checkout.createSessionUrl({
97
- * items: [{ variantId, quantity: 1 }],
98
- * checkoutPath: '/checkout',
99
- * });
100
- * window.location.href = url;
101
- * ```
102
- */
103
- createSessionUrl(opts: {
104
- items: LineItem[];
105
- currency?: string;
106
- returnUrl?: string;
107
- customerEmail?: string;
108
- customerFirstName?: string;
109
- customerLastName?: string;
110
- /** Path on the current origin for the self-hosted checkout. Default: `/checkout`. */
111
- checkoutPath?: string;
112
- /** Origin to use. Defaults to `window.location.origin`. */
113
- origin?: string;
114
- }): Promise<{
115
- url: string;
116
- checkoutUrl: string;
117
- checkoutToken: string;
118
- sessionToken: string;
119
- customerId: string;
120
- }>;
121
- /**
122
- * Read `checkoutToken` and session token from a URL.
123
- *
124
- * Recognizes both the SDK convention (`?sessionToken=`) and the
125
- * Tagada-hosted convention (`?token=`), so the same checkout page
126
- * works whether the user came from `createSessionUrl()` or directly
127
- * from a Tagada-hosted redirect.
128
- *
129
- * Returns `null` if `checkoutToken` is missing.
130
- *
131
- * @example
132
- * ```ts
133
- * const tokens = CheckoutModule.parseTokensFromUrl();
134
- * if (!tokens) {
135
- * window.location.href = '/cart';
136
- * return;
137
- * }
138
- * const session = await tagada.checkout.loadSession(
139
- * tokens.checkoutToken,
140
- * tokens.sessionToken,
141
- * );
142
- * ```
143
- */
144
- static parseTokensFromUrl(url?: string): {
145
- checkoutToken: string;
146
- sessionToken: string;
147
- } | null;
148
- /**
149
- * Replace the cart items for an existing session.
150
- *
151
- * Returns a server-side mutation summary (counts of created/updated rows).
152
- * It does NOT return the updated `CheckoutSession` — the underlying
153
- * `POST /checkout-sessions/:id/line-items` endpoint never has and the
154
- * previous typing was a lie that quietly assigned `{ success, updated, ... }`
155
- * into a `CheckoutSession` slot in `useCheckout`.
156
- *
157
- * Call `loadSession()` after this if you need the refreshed session
158
- * (the React `useCheckout` hook does this for you).
159
- */
160
- updateCart(sessionId: string, items: LineItem[]): Promise<UpdateCartResult>;
161
- /**
162
- * Update customer identity (email, name, phone).
163
- *
164
- * Call this before `updateAddress()` — the SDK remembers the values and
165
- * includes them automatically when addresses are submitted.
166
- *
167
- * If you prefer a single call, use `updateCustomerAndAddress()` instead.
168
- */
169
- updateCustomer(sessionId: string, customer: Partial<CheckoutCustomer>): Promise<void>;
170
- /**
171
- * Update shipping and/or billing address on the session.
172
- *
173
- * Automatically includes customer name/phone stored from `updateCustomer()`.
174
- * Uses the same atomic API call as the production checkout, so email,
175
- * customer name, and addresses are all persisted together.
176
- *
177
- * **Shipped products**: pass `shippingAddress`. If `billingAddress` is omitted,
178
- * the shipping address is automatically used as billing.
179
- *
180
- * **Digital products**: pass only `billingAddress` (no shipping needed).
181
- *
182
- * @example
183
- * // Shipped product — billing = shipping automatically
184
- * await checkout.updateAddress(sessionId, {
185
- * shippingAddress: { line1: '10 Rue de la Paix', city: 'Paris', postalCode: '75002', country: 'FR' },
186
- * });
187
- *
188
- * @example
189
- * // Digital product — billing only
190
- * await checkout.updateAddress(sessionId, {
191
- * billingAddress: { country: 'FR' },
192
- * });
193
- */
194
- updateAddress(sessionId: string, addresses: {
195
- shippingAddress?: Address;
196
- billingAddress?: Address;
197
- }): Promise<void>;
198
- /**
199
- * Set customer info + addresses in one call (mirrors production checkout).
200
- *
201
- * Equivalent to calling `updateCustomer()` then `updateAddress()`, but
202
- * in a single network request.
203
- */
204
- updateCustomerAndAddress(sessionId: string, data: {
205
- customer: Partial<CheckoutCustomer>;
206
- shippingAddress?: Address;
207
- billingAddress?: Address;
208
- }): Promise<void>;
209
- /** Map an SDK Address to the API shape, injecting stored customer fields. */
210
- private mapAddress;
211
- /** Apply a promotion code to the session. */
212
- applyPromoCode(sessionId: string, code: string): Promise<void>;
213
- /** Remove a promotion from the session by promotion ID. */
214
- removePromoCode(sessionId: string, promotionId?: string): Promise<void>;
215
- /**
216
- * Fetch available shipping rates for the session's address.
217
- * Only relevant for **shipped products** — digital products can skip this step.
218
- *
219
- * Requires a shipping address to be set first via `updateAddress()`.
220
- * Returns an empty array if no rates are configured or address is missing.
221
- */
222
- getShippingRates(sessionId: string): Promise<ShippingRate[]>;
223
- /**
224
- * Normalize the v1 rates payload (`shippingRateName`, `estimatedDeliveryTime`)
225
- * to the SDK's `ShippingRate` shape (`name`, `estimatedDays`). Without
226
- * this the consumer's UI shows blank rate names — the demo's "Delivery"
227
- * radios were rendering only the price, no label.
228
- */
229
- private normalizeShippingRate;
230
- /**
231
- * Select a shipping rate for the session.
232
- * Only relevant for **shipped products** — digital products can skip this step.
233
- */
234
- selectShippingRate(sessionId: string, rateId: string): Promise<void>;
235
- /**
236
- * Normalize the raw v2 API response into a cleaner CheckoutSession shape.
237
- * The raw response has nested `checkoutSession` + `summary` -- we flatten it.
238
- */
239
- private normalizeSession;
240
- /**
241
- * Map the raw API address shape (`address1`, `address2`, `postal`) onto
242
- * the SDK's `Address` shape (`line1`, `line2`, `postalCode`). Without
243
- * this, `session.shippingAddress.line1` is silently undefined after a
244
- * reload — the type was lying about the actual key names — which is
245
- * what makes the demo lose form state on refresh.
246
- */
247
- private normalizeAddress;
248
- }
249
- //# 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;IA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