@shoppexio/storefront 1.0.96 → 1.0.99
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 +12 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -188,6 +188,7 @@ interface Shop {
|
|
|
188
188
|
kind: 'card' | 'wallet' | 'crypto';
|
|
189
189
|
}>;
|
|
190
190
|
stock_alerts_enabled?: boolean;
|
|
191
|
+
stock_display?: 'low_stock' | 'exact';
|
|
191
192
|
payment_gateways_fees?: unknown[];
|
|
192
193
|
reward_program_summary?: RewardProgramSummary | null;
|
|
193
194
|
}
|
|
@@ -359,6 +360,16 @@ interface Product {
|
|
|
359
360
|
*/
|
|
360
361
|
addons_required?: boolean;
|
|
361
362
|
price_variants?: PriceVariant[];
|
|
363
|
+
/**
|
|
364
|
+
* The methods every option of this product can be paid with (shop methods
|
|
365
|
+
* narrowed by the product's and its variants' restriction), same shape as
|
|
366
|
+
* `shop.payment_methods`. Only the shop catalog payload carries it.
|
|
367
|
+
*/
|
|
368
|
+
payment_methods?: Array<{
|
|
369
|
+
id: string;
|
|
370
|
+
label: string;
|
|
371
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
372
|
+
}>;
|
|
362
373
|
volume_discounts?: unknown;
|
|
363
374
|
custom_fields?: string | unknown[] | null;
|
|
364
375
|
categories?: ProductCategory[];
|
|
@@ -456,10 +467,14 @@ interface ProductVariant {
|
|
|
456
467
|
is_featured?: boolean;
|
|
457
468
|
isFeatured?: boolean;
|
|
458
469
|
/**
|
|
459
|
-
*
|
|
460
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
461
|
-
*
|
|
470
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
471
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
472
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
473
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
474
|
+
* Absent on servers older than variant visibility.
|
|
462
475
|
*/
|
|
476
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
477
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
463
478
|
is_private?: boolean;
|
|
464
479
|
/** License validity in days for this option. Zero means lifetime. */
|
|
465
480
|
license_period?: number | null;
|
|
@@ -520,10 +535,14 @@ interface PriceVariant {
|
|
|
520
535
|
is_featured?: boolean;
|
|
521
536
|
isFeatured?: boolean;
|
|
522
537
|
/**
|
|
523
|
-
*
|
|
524
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
525
|
-
*
|
|
538
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
539
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
540
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
541
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
542
|
+
* Absent on servers older than variant visibility.
|
|
526
543
|
*/
|
|
544
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
545
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
527
546
|
is_private?: boolean;
|
|
528
547
|
/** License validity in days for this option. Zero means lifetime. */
|
|
529
548
|
license_period?: number | null;
|
|
@@ -1152,6 +1171,17 @@ interface CartQuote {
|
|
|
1152
1171
|
eligible_bundle_deals: EligibleBundleDeal[];
|
|
1153
1172
|
/** Per-line effective bounds and sellability — see CartQuoteLine. Absent on older backends. */
|
|
1154
1173
|
lines?: CartQuoteLine[];
|
|
1174
|
+
/**
|
|
1175
|
+
* The methods this cart can be paid with, in `shop.payment_methods` shape:
|
|
1176
|
+
* the shop's methods narrowed by every line's product restriction, the same
|
|
1177
|
+
* rule checkout applies. Draw the cart's "Pay with" row from this, not from
|
|
1178
|
+
* the shop list. Absent on older backends.
|
|
1179
|
+
*/
|
|
1180
|
+
payment_methods?: Array<{
|
|
1181
|
+
id: string;
|
|
1182
|
+
label: string;
|
|
1183
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
1184
|
+
}>;
|
|
1155
1185
|
/**
|
|
1156
1186
|
* TRUE when this cart already exceeds the shop's configured checkout maximum.
|
|
1157
1187
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ interface Shop {
|
|
|
188
188
|
kind: 'card' | 'wallet' | 'crypto';
|
|
189
189
|
}>;
|
|
190
190
|
stock_alerts_enabled?: boolean;
|
|
191
|
+
stock_display?: 'low_stock' | 'exact';
|
|
191
192
|
payment_gateways_fees?: unknown[];
|
|
192
193
|
reward_program_summary?: RewardProgramSummary | null;
|
|
193
194
|
}
|
|
@@ -359,6 +360,16 @@ interface Product {
|
|
|
359
360
|
*/
|
|
360
361
|
addons_required?: boolean;
|
|
361
362
|
price_variants?: PriceVariant[];
|
|
363
|
+
/**
|
|
364
|
+
* The methods every option of this product can be paid with (shop methods
|
|
365
|
+
* narrowed by the product's and its variants' restriction), same shape as
|
|
366
|
+
* `shop.payment_methods`. Only the shop catalog payload carries it.
|
|
367
|
+
*/
|
|
368
|
+
payment_methods?: Array<{
|
|
369
|
+
id: string;
|
|
370
|
+
label: string;
|
|
371
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
372
|
+
}>;
|
|
362
373
|
volume_discounts?: unknown;
|
|
363
374
|
custom_fields?: string | unknown[] | null;
|
|
364
375
|
categories?: ProductCategory[];
|
|
@@ -456,10 +467,14 @@ interface ProductVariant {
|
|
|
456
467
|
is_featured?: boolean;
|
|
457
468
|
isFeatured?: boolean;
|
|
458
469
|
/**
|
|
459
|
-
*
|
|
460
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
461
|
-
*
|
|
470
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
471
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
472
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
473
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
474
|
+
* Absent on servers older than variant visibility.
|
|
462
475
|
*/
|
|
476
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
477
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
463
478
|
is_private?: boolean;
|
|
464
479
|
/** License validity in days for this option. Zero means lifetime. */
|
|
465
480
|
license_period?: number | null;
|
|
@@ -520,10 +535,14 @@ interface PriceVariant {
|
|
|
520
535
|
is_featured?: boolean;
|
|
521
536
|
isFeatured?: boolean;
|
|
522
537
|
/**
|
|
523
|
-
*
|
|
524
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
525
|
-
*
|
|
538
|
+
* Who may see and buy this option. `private` is sold only through its direct
|
|
539
|
+
* link: the server lists it only on `getProduct(id, { variant })` naming it,
|
|
540
|
+
* never in product lists. `on_hold` is listed but cannot be bought (show it
|
|
541
|
+
* as unavailable, not sold out); the server refuses it in carts and checkout.
|
|
542
|
+
* Absent on servers older than variant visibility.
|
|
526
543
|
*/
|
|
544
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
545
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
527
546
|
is_private?: boolean;
|
|
528
547
|
/** License validity in days for this option. Zero means lifetime. */
|
|
529
548
|
license_period?: number | null;
|
|
@@ -1152,6 +1171,17 @@ interface CartQuote {
|
|
|
1152
1171
|
eligible_bundle_deals: EligibleBundleDeal[];
|
|
1153
1172
|
/** Per-line effective bounds and sellability — see CartQuoteLine. Absent on older backends. */
|
|
1154
1173
|
lines?: CartQuoteLine[];
|
|
1174
|
+
/**
|
|
1175
|
+
* The methods this cart can be paid with, in `shop.payment_methods` shape:
|
|
1176
|
+
* the shop's methods narrowed by every line's product restriction, the same
|
|
1177
|
+
* rule checkout applies. Draw the cart's "Pay with" row from this, not from
|
|
1178
|
+
* the shop list. Absent on older backends.
|
|
1179
|
+
*/
|
|
1180
|
+
payment_methods?: Array<{
|
|
1181
|
+
id: string;
|
|
1182
|
+
label: string;
|
|
1183
|
+
kind: 'card' | 'wallet' | 'crypto';
|
|
1184
|
+
}>;
|
|
1155
1185
|
/**
|
|
1156
1186
|
* TRUE when this cart already exceeds the shop's configured checkout maximum.
|
|
1157
1187
|
*
|
package/dist/index.js
CHANGED
|
@@ -1246,6 +1246,7 @@ function priceVariantToProductVariant(variant) {
|
|
|
1246
1246
|
cloudflareImageId: variant.cloudflareImageId,
|
|
1247
1247
|
image_url: variant.image_url,
|
|
1248
1248
|
imageUrl: variant.imageUrl,
|
|
1249
|
+
visibility: variant.visibility,
|
|
1249
1250
|
is_private: variant.is_private
|
|
1250
1251
|
};
|
|
1251
1252
|
}
|