@growupsell/commerce 0.0.0-stage → 1.0.0-alpha.2

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.
@@ -0,0 +1,32 @@
1
+ export { A as AddCartItemInput, c as AddressesApi, d as AnyFetch, e as AuthApi, g as BinaryResponse, h as BlogApi, o as BusinessApi, C as CancelCodItemsInput, r as CartAddressesInput, s as CartApi, t as CatalogApi, u as ChangePasswordInput, v as CheckoutApi, w as Client, x as ClientOptions, y as ConfirmEmailChangeInput, z as ConfirmPhoneChangeInput, E as ContentImageUpload, J as CreateAdvanceOrderInput, K as CreateExchangeInput, L as CreateReturnInput, M as CreateReviewInput, N as CreateSubscriptionInput, O as Credentials, Q as CustomManufacturingApi, T as CustomPageContentInput, W as CustomPagesApi, X as CustomerApi, _ as DocumentOptions, a4 as ExchangesApi, a6 as FaqApi, a7 as FaqInput, a8 as FetchInitLike, a9 as FetchLike, aa as FetchResponseLike, ab as FormDataLike, ah as FormsApi, aj as HelpdeskApi, ak as HttpMethod, al as InquiryInput, ap as LiveSupportApi, ar as LoginInput, as as LookupApi, at as MoveDirection, au as NewsletterApi, az as OrderListOptions, aD as OrdersApi, aG as PaymentsApi, aH as PlaceOrderOptions, aI as PoliciesApi, aK as PolicyInput, aM as ProductPageApi, aN as ProductSectionItemTargetInput, aO as ProductsApi, aP as PromotionsApi, aR as PushApi, aT as Query, aU as QueryValue, aV as RazorpayResult, aW as RegisterInput, aX as RequestFn, aY as RequestOptions, aZ as ResetPasswordInput, b1 as ReturnsApi, b2 as ReviewPhoto, b3 as ReviewsApi, b4 as SessionApi, bf as SubscriptionsApi, bh as ThemeContentApi, bl as UnauthorizedEvent, bm as UpdateProfileInput, bn as UpdateReviewInput, bo as UploadFile, bq as VerifyOtpInput, bs as WishlistApi, bu as createClient } from '../client-D4JNDM6j.js';
2
+ export { w as ProductSearchOptions, H as ProductSort } from '../checkout-CwpFl6qt.js';
3
+
4
+ type ApiErrorKind = 'http' | 'network' | 'timeout' | 'parse';
5
+ /**
6
+ * The single error type every request rejects with, so every app can show the same messages.
7
+ */
8
+ declare class GrowupsellApiError extends Error {
9
+ readonly kind: ApiErrorKind;
10
+ /** HTTP status; undefined when no response arrived (network, timeout). */
11
+ readonly status: number | undefined;
12
+ /** Validation messages per field, as returned by the backend (`non_field_errors` included). */
13
+ readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
14
+ /** The parsed response body, for anything the fields above don't cover. */
15
+ readonly body: unknown;
16
+ /**
17
+ * For a 429 (throttled OTP checks and sends, backend S14): the seconds from `Retry-After`.
18
+ * Null otherwise, and when the header is missing or not a whole number of seconds.
19
+ */
20
+ readonly retryAfterSeconds: number | null;
21
+ constructor(init: {
22
+ kind: ApiErrorKind;
23
+ message: string;
24
+ status?: number;
25
+ fieldErrors?: Record<string, string[]>;
26
+ body?: unknown;
27
+ retryAfterSeconds?: number | null;
28
+ });
29
+ }
30
+
31
+ export { GrowupsellApiError };
32
+ export type { ApiErrorKind };
@@ -0,0 +1,10 @@
1
+ import "../chunk-NNKXIBK4.js";
2
+ import {
3
+ GrowupsellApiError,
4
+ createClient
5
+ } from "../chunk-AI2CWQ22.js";
6
+ export {
7
+ GrowupsellApiError,
8
+ createClient
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,6 @@
1
+ export { A as AddCartItemInput, a as Address, b as AddressInput, c as AddressesApi, d as AnyFetch, e as AuthApi, f as AuthResult, B as BankTransferOption, g as BinaryResponse, h as BlogApi, i as BlogAuthor, j as BlogCategory, k as BlogEditor, l as BlogPost, m as BlogPostSummary, n as Business, o as BusinessApi, p as BusinessMedia, q as BusinessSettings, C as CancelCodItemsInput, r as CartAddressesInput, s as CartApi, t as CatalogApi, u as ChangePasswordInput, v as CheckoutApi, w as Client, x as ClientOptions, y as ConfirmEmailChangeInput, z as ConfirmPhoneChangeInput, D as ContentImage, E as ContentImageUpload, F as ContentImageUsage, G as ContentPlatform, H as Country, I as CountryState, J as CreateAdvanceOrderInput, K as CreateExchangeInput, L as CreateReturnInput, M as CreateReviewInput, N as CreateSubscriptionInput, O as Credentials, P as Currency, Q as CustomManufacturingApi, R as CustomPage, S as CustomPageContent, T as CustomPageContentInput, U as CustomPageHero, V as CustomPageSection, W as CustomPagesApi, X as CustomerApi, Y as CustomerSettings, Z as DeliveryStatus, _ as DocumentOptions, $ as ExchangeDetail, a0 as ExchangeListItem, a1 as ExchangeResult, a2 as ExchangeTargetSku, a3 as ExchangeType, a4 as ExchangesApi, a5 as Faq, a6 as FaqApi, a7 as FaqInput, a8 as FetchInitLike, a9 as FetchLike, aa as FetchResponseLike, ab as FormDataLike, ac as FormField, ad as FormFieldOption, ae as FormFieldType, af as FormSummary, ag as FormValue, ah as FormsApi, ai as GuestSession, aj as HelpdeskApi, ak as HttpMethod, al as InquiryInput, am as InvoiceFormat, an as InvoicePayment, ao as InvoicePaymentStatus, ap as LiveSupportApi, aq as LiveSupportWidget, ar as LoginInput, as as LookupApi, at as MoveDirection, au as NewsletterApi, av as OrderAddress, aw as OrderDetail, ax as OrderLine, ay as OrderListItem, az as OrderListOptions, aA as OrderPaymentEntry, aB as OrderStatus, aC as OrderSummary, aD as OrdersApi, aE as PaymentConfirmation, aF as PaymentStatus, aG as PaymentsApi, aH as PlaceOrderOptions, aI as PoliciesApi, aJ as Policy, aK as PolicyInput, aL as PolicyType, aM as ProductPageApi, aN as ProductSectionItemTargetInput, aO as ProductsApi, aP as PromotionsApi, aQ as PublicForm, aR as PushApi, aS as PushSubscriptionJson, aT as Query, aU as QueryValue, aV as RazorpayResult, aW as RegisterInput, aX as RequestFn, aY as RequestOptions, aZ as ResetPasswordInput, a_ as ReturnRequest, a$ as ReturnStatus, b0 as ReturnableItem, b1 as ReturnsApi, b2 as ReviewPhoto, b3 as ReviewsApi, b4 as SessionApi, b5 as Shipment, b6 as SignedInCustomer, b7 as SocialLinks, b8 as Subscription, b9 as SubscriptionDelivery, ba as SubscriptionDeliveryItem, bb as SubscriptionHold, bc as SubscriptionInterval, bd as SubscriptionInvoice, be as SubscriptionStatus, bf as SubscriptionsApi, bg as ThemeContent, bh as ThemeContentApi, bi as ThemeSettings, bj as ThemeSettingsUpdate, bk as TrackingInfo, bl as UnauthorizedEvent, bm as UpdateProfileInput, bn as UpdateReviewInput, bo as UploadFile, bp as UploadedFile, bq as VerifyOtpInput, br as Weekday, bs as WishlistApi, bt as WishlistItem, bu as createClient } from './client-D4JNDM6j.js';
2
+ export { ApiErrorKind, GrowupsellApiError } from './http/index.js';
3
+ export { DEFAULT_LISTING_CRITERIA, JsonLd, LISTING_PAGE_SIZE, PageMetadata, ProductPricing, ProductPurchase, ProductPurchaseInput, PurchaseLimit, PurchaseLimitInput, PurchaseMode, RatingBreakdownRow, VariantSelection, absoluteUrl, articleJsonLd, breadcrumbJsonLd, categoryAndDescendants, discountPercent, faqJsonLd, faqsFromSections, formatSelectedVariants, htmlToText, imagesFor, instagramEmbedUrl, isEmail, isOtp, isPhone, isVideoFileUrl, listingQuery, listingSearchOptions, organizationJsonLd, pageMetadata, parseListingQuery, parseSelectedVariants, productJsonLd, productPricing, productPurchase, promoCodeStatus, purchaseLimit, purchaseMode, quantityLimitFor, ratingBreakdown, roundToHalfStar, sectionItemsFor, serializeJsonLd, siteOrigin, slugify, specificationsFor, toE164, truncateText, videoEmbed, webSiteJsonLd, withCategory, youtubeEmbedUrl, youtubeThumbnailUrl, youtubeVideoId, youtubeWatchUrl } from './rules/index.js';
4
+ export { C as CheckoutPreview, a as CheckoutPreviewInput, L as ListingCriteria, b as ListingQuery, P as PaymentOptions, c as PaymentOptionsInput, V as VariantChoice, d as checkoutPreview, e as defaultSelection, g as giftCardBalance, i as isSelectionComplete, p as paymentOptions, r as requiresShippingAddress, f as resolveSku, s as selectOption, h as sellableSkus, v as variantChoices } from './sku-C3SGyRqT.js';
5
+ export { ActionResult, AuthOutcome, AuthState, AuthStore, BusinessSection, BusinessState, BusinessStore, CartDeliveryState, CartLinePending, CartPending, CartState, CartStore, CatalogState, CatalogStore, CheckoutOrder, CheckoutPhase, CheckoutState, CheckoutStore, EventBus, GrowupsellEvent, GrowupsellStores, GrowupsellStoresOptions, Identity, ListingFacets, ListingInput, ListingQueryInput, ListingState, ListingStore, LoadStatus, ProductDetailInput, ProductDetailState, ProductDetailStore, REFERRAL_TTL_MS, ReferralState, ReferralStore, SearchSuggestionsOptions, SearchSuggestionsState, SearchSuggestionsStore, SessionState, SessionStore, StorageAdapter, Store, StoreError, StoreErrorKind, StoreSeeds, ThemeConfigState, ThemeConfigStore, ThemeSectionState, WishlistState, WishlistStore, cartItemCount, cartLineForSku, checkoutPreviewFor, createGrowupsellStores, createMemoryStorage, isInWishlist, paymentOptionsFor } from './stores/index.js';
6
+ export { A as AdvanceOrder, a as AppliedOffer, b as AppliedPromoCode, B as Brand, C as Cart, c as CartLine, d as CartTotals, e as CatalogSettings, f as Category, g as CategoryTree, h as CheckoutSettings, i as CustomerProfile, D as DeliveryChargeType, j as DeliveryEstimate, F as FulfillmentMode, G as GiftCard, O as Offer, k as OfferScope, l as OrderType, P as Page, m as PaymentMethodType, n as PendingPayment, o as PlaceOrderResult, p as ProductBlock, q as ProductDetail, r as ProductFilterConfig, s as ProductImage, t as ProductListItem, u as ProductOverview, v as ProductPolicies, w as ProductSearchOptions, x as ProductSection, y as ProductSectionItem, z as ProductSectionItemTarget, E as ProductSku, H as ProductSort, I as ProductSpecificationGroup, J as PromoCode, R as Review, K as ReviewEligibility, L as ReviewListItem, M as ReviewReply, N as ReviewSummary, Q as RewardPointSettings, S as SearchSuggestion, T as SpecificationScope, U as TaxDetails, V as VariantGroup, W as VariantOption } from './checkout-CwpFl6qt.js';
package/dist/index.js ADDED
@@ -0,0 +1,144 @@
1
+ import "./chunk-NNKXIBK4.js";
2
+ import {
3
+ absoluteUrl,
4
+ articleJsonLd,
5
+ breadcrumbJsonLd,
6
+ faqJsonLd,
7
+ faqsFromSections,
8
+ htmlToText,
9
+ instagramEmbedUrl,
10
+ isEmail,
11
+ isOtp,
12
+ isPhone,
13
+ isVideoFileUrl,
14
+ organizationJsonLd,
15
+ pageMetadata,
16
+ productJsonLd,
17
+ productPurchase,
18
+ promoCodeStatus,
19
+ purchaseLimit,
20
+ purchaseMode,
21
+ quantityLimitFor,
22
+ ratingBreakdown,
23
+ roundToHalfStar,
24
+ serializeJsonLd,
25
+ siteOrigin,
26
+ slugify,
27
+ toE164,
28
+ truncateText,
29
+ videoEmbed,
30
+ webSiteJsonLd,
31
+ youtubeEmbedUrl,
32
+ youtubeThumbnailUrl,
33
+ youtubeVideoId,
34
+ youtubeWatchUrl
35
+ } from "./chunk-JBOZQJ4X.js";
36
+ import {
37
+ REFERRAL_TTL_MS,
38
+ cartItemCount,
39
+ cartLineForSku,
40
+ checkoutPreviewFor,
41
+ createGrowupsellStores,
42
+ createMemoryStorage,
43
+ isInWishlist,
44
+ paymentOptionsFor
45
+ } from "./chunk-DHBRITDW.js";
46
+ import {
47
+ GrowupsellApiError,
48
+ createClient
49
+ } from "./chunk-AI2CWQ22.js";
50
+ import {
51
+ DEFAULT_LISTING_CRITERIA,
52
+ LISTING_PAGE_SIZE,
53
+ categoryAndDescendants,
54
+ checkoutPreview,
55
+ defaultSelection,
56
+ discountPercent,
57
+ formatSelectedVariants,
58
+ giftCardBalance,
59
+ imagesFor,
60
+ isSelectionComplete,
61
+ listingQuery,
62
+ listingSearchOptions,
63
+ parseListingQuery,
64
+ parseSelectedVariants,
65
+ paymentOptions,
66
+ productPricing,
67
+ requiresShippingAddress,
68
+ resolveSku,
69
+ sectionItemsFor,
70
+ selectOption,
71
+ sellableSkus,
72
+ specificationsFor,
73
+ variantChoices,
74
+ withCategory
75
+ } from "./chunk-W2CJSBV4.js";
76
+ export {
77
+ DEFAULT_LISTING_CRITERIA,
78
+ GrowupsellApiError,
79
+ LISTING_PAGE_SIZE,
80
+ REFERRAL_TTL_MS,
81
+ absoluteUrl,
82
+ articleJsonLd,
83
+ breadcrumbJsonLd,
84
+ cartItemCount,
85
+ cartLineForSku,
86
+ categoryAndDescendants,
87
+ checkoutPreview,
88
+ checkoutPreviewFor,
89
+ createClient,
90
+ createGrowupsellStores,
91
+ createMemoryStorage,
92
+ defaultSelection,
93
+ discountPercent,
94
+ faqJsonLd,
95
+ faqsFromSections,
96
+ formatSelectedVariants,
97
+ giftCardBalance,
98
+ htmlToText,
99
+ imagesFor,
100
+ instagramEmbedUrl,
101
+ isEmail,
102
+ isInWishlist,
103
+ isOtp,
104
+ isPhone,
105
+ isSelectionComplete,
106
+ isVideoFileUrl,
107
+ listingQuery,
108
+ listingSearchOptions,
109
+ organizationJsonLd,
110
+ pageMetadata,
111
+ parseListingQuery,
112
+ parseSelectedVariants,
113
+ paymentOptions,
114
+ paymentOptionsFor,
115
+ productJsonLd,
116
+ productPricing,
117
+ productPurchase,
118
+ promoCodeStatus,
119
+ purchaseLimit,
120
+ purchaseMode,
121
+ quantityLimitFor,
122
+ ratingBreakdown,
123
+ requiresShippingAddress,
124
+ resolveSku,
125
+ roundToHalfStar,
126
+ sectionItemsFor,
127
+ selectOption,
128
+ sellableSkus,
129
+ serializeJsonLd,
130
+ siteOrigin,
131
+ slugify,
132
+ specificationsFor,
133
+ toE164,
134
+ truncateText,
135
+ variantChoices,
136
+ videoEmbed,
137
+ webSiteJsonLd,
138
+ withCategory,
139
+ youtubeEmbedUrl,
140
+ youtubeThumbnailUrl,
141
+ youtubeVideoId,
142
+ youtubeWatchUrl
143
+ };
144
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}