@shoppexio/storefront 1.0.57 → 1.0.59
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/CHANGELOG.md +99 -0
- package/LICENSE +21 -0
- package/README.md +96 -180
- package/dist/chunk-ZVOFFURI.js +15364 -0
- package/dist/chunk-ZVOFFURI.js.map +1 -0
- package/dist/customer.cjs +16013 -1
- package/dist/customer.cjs.map +1 -1
- package/dist/{headless-customer.d.ts → customer.d.cts} +74 -61
- package/dist/customer.d.ts +336 -10
- package/dist/customer.js +726 -2
- package/dist/customer.js.map +1 -1
- package/dist/index.cjs +21533 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1979 -0
- package/dist/index.d.ts +1859 -49
- package/dist/index.js +6139 -0
- package/dist/index.js.map +1 -0
- package/package.json +18 -37
- package/dist/core/attribution.d.ts +0 -26
- package/dist/core/attribution.d.ts.map +0 -1
- package/dist/core/cache.d.ts +0 -26
- package/dist/core/cache.d.ts.map +0 -1
- package/dist/core/client.d.ts +0 -18
- package/dist/core/client.d.ts.map +0 -1
- package/dist/core/config.d.ts +0 -10
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/endpoint.d.ts +0 -2
- package/dist/core/endpoint.d.ts.map +0 -1
- package/dist/core/errors.d.ts +0 -34
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/telemetry.d.ts +0 -20
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/typed-client.d.ts +0 -15
- package/dist/core/typed-client.d.ts.map +0 -1
- package/dist/customer.d.ts.map +0 -1
- package/dist/headless-customer.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/modules/affiliates.d.ts +0 -15
- package/dist/modules/affiliates.d.ts.map +0 -1
- package/dist/modules/analytics.d.ts +0 -2
- package/dist/modules/analytics.d.ts.map +0 -1
- package/dist/modules/cart.d.ts +0 -62
- package/dist/modules/cart.d.ts.map +0 -1
- package/dist/modules/checkout.d.ts +0 -133
- package/dist/modules/checkout.d.ts.map +0 -1
- package/dist/modules/coupons.d.ts +0 -3
- package/dist/modules/coupons.d.ts.map +0 -1
- package/dist/modules/customer.d.ts +0 -147
- package/dist/modules/customer.d.ts.map +0 -1
- package/dist/modules/invoices.d.ts +0 -6
- package/dist/modules/invoices.d.ts.map +0 -1
- package/dist/modules/navigation.d.ts +0 -20
- package/dist/modules/navigation.d.ts.map +0 -1
- package/dist/modules/pages.d.ts +0 -10
- package/dist/modules/pages.d.ts.map +0 -1
- package/dist/modules/presence.d.ts +0 -12
- package/dist/modules/presence.d.ts.map +0 -1
- package/dist/modules/products.d.ts +0 -16
- package/dist/modules/products.d.ts.map +0 -1
- package/dist/modules/reviews.d.ts +0 -4
- package/dist/modules/reviews.d.ts.map +0 -1
- package/dist/modules/search.d.ts +0 -10
- package/dist/modules/search.d.ts.map +0 -1
- package/dist/modules/store.d.ts +0 -11
- package/dist/modules/store.d.ts.map +0 -1
- package/dist/modules/theme.d.ts +0 -27
- package/dist/modules/theme.d.ts.map +0 -1
- package/dist/shoppex.esm.js +0 -3
- package/dist/shoppex.esm.js.map +0 -1
- package/dist/shoppex.umd.js +0 -2
- package/dist/shoppex.umd.js.map +0 -1
- package/dist/types/api.d.ts +0 -757
- package/dist/types/api.d.ts.map +0 -1
- package/dist/types/cart.d.ts +0 -239
- package/dist/types/cart.d.ts.map +0 -1
- package/dist/types/config.d.ts +0 -18
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/theme-config.d.ts +0 -109
- package/dist/types/theme-config.d.ts.map +0 -1
- package/dist/utils/cart-line-id.d.ts +0 -5
- package/dist/utils/cart-line-id.d.ts.map +0 -1
- package/dist/utils/format.d.ts +0 -6
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/requested-currency.d.ts +0 -3
- package/dist/utils/requested-currency.d.ts.map +0 -1
- package/dist/utils/storage.d.ts +0 -10
- package/dist/utils/storage.d.ts.map +0 -1
- package/dist/utils/storefront-catalog.d.ts +0 -5
- package/dist/utils/storefront-catalog.d.ts.map +0 -1
- package/dist/utils/storefront-contact.d.ts +0 -32
- package/dist/utils/storefront-contact.d.ts.map +0 -1
- package/dist/utils/storefront-custom-fields.d.ts +0 -13
- package/dist/utils/storefront-custom-fields.d.ts.map +0 -1
- package/dist/utils/storefront-search.d.ts +0 -22
- package/dist/utils/storefront-search.d.ts.map +0 -1
- package/dist/utils/storefront-stock.d.ts +0 -14
- package/dist/utils/storefront-stock.d.ts.map +0 -1
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { CustomerLoyaltyRedeemWire, CustomerLoyaltyWire, CustomerPortalDashboardWire, CustomerPortalInvoiceDetailWire, CustomerPortalPaginatedInvoicesWire, CustomerWarrantyClaimWire, CustomerWarrantyListWire } from '@shoppex/contracts';
|
|
2
|
-
import { SDKResponse } from '../types';
|
|
3
|
-
export interface CustomerOrdersQuery {
|
|
4
|
-
page?: number;
|
|
5
|
-
limit?: number;
|
|
6
|
-
/**
|
|
7
|
-
* Invoice status filter, verbatim from the producer's enum. Anything else is
|
|
8
|
-
* answered with a 400 rather than quietly ignored, so pass what the buyer
|
|
9
|
-
* actually chose.
|
|
10
|
-
*/
|
|
11
|
-
status?: string;
|
|
12
|
-
/** Partial invoice-id search. The producer trims it to 64 characters. */
|
|
13
|
-
search?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface CustomerTicketPayload {
|
|
16
|
-
title?: string;
|
|
17
|
-
message: string;
|
|
18
|
-
invoice_id?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface CustomerProfilePatch {
|
|
21
|
-
name: string;
|
|
22
|
-
}
|
|
23
|
-
export interface CustomerSubscriptionCancelOptions {
|
|
24
|
-
cancel_at_period_end?: boolean;
|
|
25
|
-
reason?: string | null;
|
|
26
|
-
}
|
|
27
|
-
export interface CustomerEmailPreferencesPatch {
|
|
28
|
-
global_unsubscribed?: boolean;
|
|
29
|
-
list_subscriptions?: Array<{
|
|
30
|
-
list_id: string;
|
|
31
|
-
subscribed: boolean;
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
|
-
/** One basket line for a QUOTE. `variant_id` is omitted, never null, when a product has no variants. */
|
|
35
|
-
export interface ResellerOrderItem {
|
|
36
|
-
product_id: string;
|
|
37
|
-
variant_id?: string;
|
|
38
|
-
quantity: number;
|
|
39
|
-
}
|
|
40
|
-
export interface ResellerCatalogQuery {
|
|
41
|
-
search?: string;
|
|
42
|
-
page?: number;
|
|
43
|
-
per_page?: number;
|
|
44
|
-
}
|
|
45
|
-
export interface ResellerOrdersQuery {
|
|
46
|
-
page?: number;
|
|
47
|
-
per_page?: number;
|
|
48
|
-
}
|
|
49
|
-
export declare function requestOtp(email: string): Promise<SDKResponse<unknown>>;
|
|
50
|
-
/**
|
|
51
|
-
* The wire field is `otp`, not `code` — `CustomerOtpVerifyBodySchema` in
|
|
52
|
-
* `apps/backend-elysia/src/routes/v1/customer/schemas.ts` requires it under that
|
|
53
|
-
* name, and a `code` body is rejected with 400.
|
|
54
|
-
*/
|
|
55
|
-
export declare function verifyOtp(email: string, otp: string): Promise<SDKResponse<unknown>>;
|
|
56
|
-
export declare function logout(): Promise<SDKResponse<unknown>>;
|
|
57
|
-
export declare function me(): Promise<SDKResponse<unknown>>;
|
|
58
|
-
export declare function dashboard(): Promise<SDKResponse<CustomerPortalDashboardWire>>;
|
|
59
|
-
/**
|
|
60
|
-
* Paginated order history.
|
|
61
|
-
*
|
|
62
|
-
* Page-based, matching the producer: `invoices.routes.ts` reads `page` and
|
|
63
|
-
* `limit` and answers with a `has_more` envelope. A cursor parameter would be
|
|
64
|
-
* ignored upstream and silently return page one forever.
|
|
65
|
-
*
|
|
66
|
-
* `status` and `search` are filtered SERVER-side, which is why they belong
|
|
67
|
-
* here rather than in the caller: `/invoices` is paged, and a filter applied
|
|
68
|
-
* to the page in hand would filter only the rows that page happens to hold.
|
|
69
|
-
* The producer spells the search `q`.
|
|
70
|
-
*/
|
|
71
|
-
export declare function orders(options?: CustomerOrdersQuery): Promise<SDKResponse<CustomerPortalPaginatedInvoicesWire>>;
|
|
72
|
-
export declare function order(id: string): Promise<SDKResponse<CustomerPortalInvoiceDetailWire>>;
|
|
73
|
-
export declare function loyalty(): Promise<SDKResponse<CustomerLoyaltyWire>>;
|
|
74
|
-
export declare function redeemLoyaltyPoints(input: {
|
|
75
|
-
points: number;
|
|
76
|
-
idempotencyKey: string;
|
|
77
|
-
}): Promise<SDKResponse<CustomerLoyaltyRedeemWire>>;
|
|
78
|
-
/**
|
|
79
|
-
* The warranties this buyer holds — all of them, or the ones on one order.
|
|
80
|
-
*
|
|
81
|
-
* `invoiceUniqid` becomes the producer's own `invoice=` filter, which matches
|
|
82
|
-
* `invoices.uniqid`: the id an order carries everywhere a storefront shows one.
|
|
83
|
-
* So an order detail asks for its own cover rather than reading every warranty
|
|
84
|
-
* the buyer owns and discarding most of them.
|
|
85
|
-
*/
|
|
86
|
-
export declare function warranties(invoiceUniqid?: string): Promise<SDKResponse<CustomerWarrantyListWire>>;
|
|
87
|
-
export declare function claimWarranty(uniqid: string, message?: string): Promise<SDKResponse<CustomerWarrantyClaimWire>>;
|
|
88
|
-
export declare function resetLicenseHwid(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
89
|
-
export declare function subscriptionBillingHistory(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
90
|
-
export declare function cancelSubscription(uniqid: string, options?: CustomerSubscriptionCancelOptions): Promise<SDKResponse<unknown>>;
|
|
91
|
-
export declare function pauseSubscription(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
92
|
-
export declare function resumeSubscription(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
93
|
-
export declare function favorites(): Promise<SDKResponse<unknown>>;
|
|
94
|
-
/** Idempotent upstream, and a PUT — `customer-favorites.ts` has no POST route. */
|
|
95
|
-
export declare function addFavorite(productUniqid: string): Promise<SDKResponse<unknown>>;
|
|
96
|
-
export declare function removeFavorite(productUniqid: string): Promise<SDKResponse<unknown>>;
|
|
97
|
-
export declare function affiliate(): Promise<SDKResponse<unknown>>;
|
|
98
|
-
export declare function createTicket(payload: CustomerTicketPayload): Promise<SDKResponse<unknown>>;
|
|
99
|
-
export declare function ticket(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
100
|
-
export declare function replyToTicket(uniqid: string, message: string): Promise<SDKResponse<unknown>>;
|
|
101
|
-
/**
|
|
102
|
-
* The producer is `POST /v1/customer/profile`, not PATCH.
|
|
103
|
-
*
|
|
104
|
-
* There is no `GET /profile` to pair with it — the buyer's own record comes from
|
|
105
|
-
* `/me` and `/dashboard`.
|
|
106
|
-
*/
|
|
107
|
-
export declare function updateProfile(patch: CustomerProfilePatch): Promise<SDKResponse<unknown>>;
|
|
108
|
-
export declare function updateAvatar(file: File): Promise<SDKResponse<unknown>>;
|
|
109
|
-
export declare function removeAvatar(): Promise<SDKResponse<unknown>>;
|
|
110
|
-
export declare function emailPreferences(): Promise<SDKResponse<unknown>>;
|
|
111
|
-
export declare function updateEmailPreferences(patch: CustomerEmailPreferencesPatch): Promise<SDKResponse<unknown>>;
|
|
112
|
-
export declare function sessions(): Promise<SDKResponse<unknown>>;
|
|
113
|
-
export declare function revokeSession(id: string): Promise<SDKResponse<unknown>>;
|
|
114
|
-
/**
|
|
115
|
-
* Ends every session except this one.
|
|
116
|
-
*
|
|
117
|
-
* `others=true` is required, not decorative: `RevokeOtherSessionsQuerySchema`
|
|
118
|
-
* declares it as a literal, so the route answers 400 without it. The selector
|
|
119
|
-
* is explicit on purpose — "revoke sessions" with no qualifier is one typo away
|
|
120
|
-
* from signing the buyer out of the device they are holding.
|
|
121
|
-
*/
|
|
122
|
-
export declare function revokeAllSessions(): Promise<SDKResponse<unknown>>;
|
|
123
|
-
/** The program's state and this buyer's place in it. Null reseller means not enrolled. */
|
|
124
|
-
export declare function reseller(): Promise<SDKResponse<unknown>>;
|
|
125
|
-
/** `APPLICATION` mode. The note is optional unless the shop requires one. */
|
|
126
|
-
export declare function applyForReseller(note?: string): Promise<SDKResponse<unknown>>;
|
|
127
|
-
/** `OPEN` mode: no application, the buyer is a reseller when they say so. */
|
|
128
|
-
export declare function enrollAsReseller(): Promise<SDKResponse<unknown>>;
|
|
129
|
-
/** `MANUAL` mode: the merchant invited this buyer and gave them a token. */
|
|
130
|
-
export declare function acceptResellerInvite(token: string): Promise<SDKResponse<unknown>>;
|
|
131
|
-
/** The buyer's own tier prices. Page-based, like the order history. */
|
|
132
|
-
export declare function resellerCatalog(options?: ResellerCatalogQuery): Promise<SDKResponse<unknown>>;
|
|
133
|
-
/**
|
|
134
|
-
* Prices a basket and writes nothing.
|
|
135
|
-
*
|
|
136
|
-
* The volume discount cannot be derived from the catalog — it only reports that
|
|
137
|
-
* one exists — so a storefront that adds up unit prices itself shows a total
|
|
138
|
-
* the shop will not charge. This is the number to display.
|
|
139
|
-
*/
|
|
140
|
-
export declare function quoteResellerOrder(items: ResellerOrderItem[]): Promise<SDKResponse<unknown>>;
|
|
141
|
-
export declare function resellerOrders(options?: ResellerOrdersQuery): Promise<SDKResponse<unknown>>;
|
|
142
|
-
/** One order with its lines, delivery state and delivered serials. */
|
|
143
|
-
export declare function resellerOrder(uniqid: string): Promise<SDKResponse<unknown>>;
|
|
144
|
-
/** The prepaid balance the wholesale orders are paid from. */
|
|
145
|
-
export declare function resellerWallet(): Promise<SDKResponse<unknown>>;
|
|
146
|
-
export declare function resellerApiKeys(): Promise<SDKResponse<unknown>>;
|
|
147
|
-
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/modules/customer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK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AE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAE5F;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAO/F;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAE3E;AAED,8DAA8D;AAC9D,wBAAgB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAE9D;AAED,wBAAgB,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAE/D"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Invoice } from '../types';
|
|
2
|
-
export declare function getInvoice(invoiceId: string): Promise<SDKResponse<Invoice>>;
|
|
3
|
-
export declare function getInvoiceStatus(invoiceId: string): Promise<SDKResponse<{
|
|
4
|
-
status: string;
|
|
5
|
-
}>>;
|
|
6
|
-
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/modules/invoices.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAUrD,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAgC/B;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAgC1C"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Menu } from '../types';
|
|
2
|
-
import { NavigationMenuSlot } from '@shoppex/contracts/navigation';
|
|
3
|
-
/**
|
|
4
|
-
* Get all menus for the store
|
|
5
|
-
*/
|
|
6
|
-
export declare function getMenus(): Promise<SDKResponse<Menu[]>>;
|
|
7
|
-
/**
|
|
8
|
-
* Get a menu by its exact title.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getMenuByTitle(title: string): Promise<SDKResponse<Menu>>;
|
|
11
|
-
/**
|
|
12
|
-
* Get a menu by its exact title.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getMenu(title: string): Promise<SDKResponse<Menu>>;
|
|
15
|
-
/**
|
|
16
|
-
* Get a menu by canonical slot. The backend resolves legacy menu titles too.
|
|
17
|
-
*/
|
|
18
|
-
export declare function getMenuBySlot(slot: NavigationMenuSlot): Promise<SDKResponse<Menu>>;
|
|
19
|
-
export declare function getMenuSlotTitles(slot: NavigationMenuSlot): string[];
|
|
20
|
-
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/modules/navigation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAaxE;;GAEG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CA0B7D;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CA2B9E;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAEvE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CA2BxF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAEpE"}
|
package/dist/modules/pages.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Page } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Get all public pages for the store
|
|
4
|
-
*/
|
|
5
|
-
export declare function getPages(): Promise<SDKResponse<Page[]>>;
|
|
6
|
-
/**
|
|
7
|
-
* Get a public page by slug
|
|
8
|
-
*/
|
|
9
|
-
export declare function getPage(slug: string): Promise<SDKResponse<Page>>;
|
|
10
|
-
//# sourceMappingURL=pages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/modules/pages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAYlD;;GAEG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CA0B7D;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CA2BtE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, StorefrontOnlineUsers, StorefrontRecentSales } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Anonymized recent-sales feed for storefront social proof (product title +
|
|
4
|
-
* relative age only — never buyer identity). Empty items when the shop has no
|
|
5
|
-
* recent completed orders.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getStorefrontRecentSales(): Promise<SDKResponse<StorefrontRecentSales>>;
|
|
8
|
-
export declare function getStorefrontOnlineUsers(): Promise<SDKResponse<StorefrontOnlineUsers>>;
|
|
9
|
-
export declare function touchStorefrontPresence(): Promise<SDKResponse<{
|
|
10
|
-
pong: string;
|
|
11
|
-
}>>;
|
|
12
|
-
//# sourceMappingURL=presence.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/modules/presence.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE1F;;;;GAIG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,WAAW,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA4BtF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Product, CursorPagination } from '../types';
|
|
2
|
-
export interface GetStorefrontProductsPageOptions {
|
|
3
|
-
cursor?: string | null;
|
|
4
|
-
limit?: number;
|
|
5
|
-
sort?: 'featured' | 'newest' | 'price-asc' | 'price-desc' | string | null;
|
|
6
|
-
category?: string | null;
|
|
7
|
-
hideOutOfStock?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function getProducts(): Promise<SDKResponse<Product[]>>;
|
|
10
|
-
export declare function getStorefrontProductsPage(options?: GetStorefrontProductsPageOptions): Promise<SDKResponse<{
|
|
11
|
-
products: Product[];
|
|
12
|
-
pagination: CursorPagination | null;
|
|
13
|
-
}>>;
|
|
14
|
-
export declare function getProduct(idOrSlug: string): Promise<SDKResponse<Product>>;
|
|
15
|
-
export declare function getCategories(): Promise<SDKResponse<string[]>>;
|
|
16
|
-
//# sourceMappingURL=products.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/modules/products.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EAKP,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAgBlB,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAoDD,wBAAsB,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CA+BnE;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,WAAW,CAAC;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAE,CAAC,CAAC,CA+CpF;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAiC/B;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CA2BpE"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Feedback, ShopReviewsPage } from '../types';
|
|
2
|
-
export declare function getShopReviewsPage(cursor?: string | null): Promise<SDKResponse<ShopReviewsPage>>;
|
|
3
|
-
export declare function getShopReviews(): Promise<SDKResponse<Feedback[]>>;
|
|
4
|
-
//# sourceMappingURL=reviews.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../src/modules/reviews.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkDvE,wBAAsB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAoCtG;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAkCvE"}
|
package/dist/modules/search.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StorefrontCatalogSearchItem } from '../utils/storefront-search.js';
|
|
2
|
-
import { SDKResponse, Product } from '../types/index.js';
|
|
3
|
-
export interface SearchOptions {
|
|
4
|
-
hideOutOfStock?: boolean;
|
|
5
|
-
maxResults?: number;
|
|
6
|
-
}
|
|
7
|
-
export type { StorefrontCatalogSearchItem };
|
|
8
|
-
export declare function searchCatalogItems(query: string, options?: SearchOptions): Promise<SDKResponse<StorefrontCatalogSearchItem[]>>;
|
|
9
|
-
export declare function searchProducts(query: string, options?: SearchOptions): Promise<SDKResponse<Product[]>>;
|
|
10
|
-
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/modules/search.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,YAAY,EAAE,2BAA2B,EAAE,CAAC;AAE5C,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,CAAC,CA6BrD;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CA6BjC"}
|
package/dist/modules/store.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SDKResponse, Shop, StorefrontData } from '../types';
|
|
2
|
-
export interface GetStorefrontOptions {
|
|
3
|
-
productsLimit?: number;
|
|
4
|
-
productsCursor?: string | null;
|
|
5
|
-
}
|
|
6
|
-
export declare function getStore(): Promise<SDKResponse<Shop>>;
|
|
7
|
-
export declare function resolveStoreByDomain(domain?: string, apiBaseUrl?: string): Promise<SDKResponse<Shop>>;
|
|
8
|
-
export declare function getStorefront(options?: GetStorefrontOptions): Promise<SDKResponse<StorefrontData>>;
|
|
9
|
-
export declare function getStoreLogoUrl(): Promise<string | null>;
|
|
10
|
-
export declare function getStoreBannerUrl(): Promise<string | null>;
|
|
11
|
-
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/modules/store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACV,WAAW,EACX,IAAI,EAEJ,cAAc,EAKf,MAAM,UAAU,CAAC;AAgBlB,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAID,wBAAsB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CA8B3D;AAED,wBAAsB,oBAAoB,CACxC,MAAM,CAAC,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAiD5B;AAED,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CA8CxG;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ9D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQhE"}
|
package/dist/modules/theme.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ThemeConfig, ResolvedThemeSettings } from '../types/theme-config';
|
|
2
|
-
type JsonRecord = Record<string, unknown>;
|
|
3
|
-
export interface PublishedBuilderSettings {
|
|
4
|
-
version: number;
|
|
5
|
-
revision: number;
|
|
6
|
-
theme: {
|
|
7
|
-
content: JsonRecord;
|
|
8
|
-
layout: JsonRecord;
|
|
9
|
-
style_slots: JsonRecord;
|
|
10
|
-
pages?: unknown[];
|
|
11
|
-
terms?: JsonRecord;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface PublishedThemeSettingsPayload {
|
|
17
|
-
settings: ResolvedThemeSettings;
|
|
18
|
-
builder_settings: PublishedBuilderSettings | null;
|
|
19
|
-
content: JsonRecord;
|
|
20
|
-
style_slots: JsonRecord;
|
|
21
|
-
}
|
|
22
|
-
export declare function fetchPublishedBuilderSettings(shopSlug: string): Promise<PublishedThemeSettingsPayload | null>;
|
|
23
|
-
export declare function fetchPublishedThemeSettings(shopSlug: string): Promise<ResolvedThemeSettings | null>;
|
|
24
|
-
export declare function resolveDefaults(config: ThemeConfig): ResolvedThemeSettings;
|
|
25
|
-
export declare function mergeSettings(defaults: ResolvedThemeSettings, overrides: Partial<ResolvedThemeSettings>): ResolvedThemeSettings;
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/modules/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,E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