@shoppexio/storefront 1.0.97 → 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 +8 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -6
- package/dist/index.d.ts +35 -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
|
@@ -360,6 +360,16 @@ interface Product {
|
|
|
360
360
|
*/
|
|
361
361
|
addons_required?: boolean;
|
|
362
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
|
+
}>;
|
|
363
373
|
volume_discounts?: unknown;
|
|
364
374
|
custom_fields?: string | unknown[] | null;
|
|
365
375
|
categories?: ProductCategory[];
|
|
@@ -457,10 +467,14 @@ interface ProductVariant {
|
|
|
457
467
|
is_featured?: boolean;
|
|
458
468
|
isFeatured?: boolean;
|
|
459
469
|
/**
|
|
460
|
-
*
|
|
461
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
462
|
-
*
|
|
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.
|
|
463
475
|
*/
|
|
476
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
477
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
464
478
|
is_private?: boolean;
|
|
465
479
|
/** License validity in days for this option. Zero means lifetime. */
|
|
466
480
|
license_period?: number | null;
|
|
@@ -521,10 +535,14 @@ interface PriceVariant {
|
|
|
521
535
|
is_featured?: boolean;
|
|
522
536
|
isFeatured?: boolean;
|
|
523
537
|
/**
|
|
524
|
-
*
|
|
525
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
526
|
-
*
|
|
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.
|
|
527
543
|
*/
|
|
544
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
545
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
528
546
|
is_private?: boolean;
|
|
529
547
|
/** License validity in days for this option. Zero means lifetime. */
|
|
530
548
|
license_period?: number | null;
|
|
@@ -1153,6 +1171,17 @@ interface CartQuote {
|
|
|
1153
1171
|
eligible_bundle_deals: EligibleBundleDeal[];
|
|
1154
1172
|
/** Per-line effective bounds and sellability — see CartQuoteLine. Absent on older backends. */
|
|
1155
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
|
+
}>;
|
|
1156
1185
|
/**
|
|
1157
1186
|
* TRUE when this cart already exceeds the shop's configured checkout maximum.
|
|
1158
1187
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -360,6 +360,16 @@ interface Product {
|
|
|
360
360
|
*/
|
|
361
361
|
addons_required?: boolean;
|
|
362
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
|
+
}>;
|
|
363
373
|
volume_discounts?: unknown;
|
|
364
374
|
custom_fields?: string | unknown[] | null;
|
|
365
375
|
categories?: ProductCategory[];
|
|
@@ -457,10 +467,14 @@ interface ProductVariant {
|
|
|
457
467
|
is_featured?: boolean;
|
|
458
468
|
isFeatured?: boolean;
|
|
459
469
|
/**
|
|
460
|
-
*
|
|
461
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
462
|
-
*
|
|
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.
|
|
463
475
|
*/
|
|
476
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
477
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
464
478
|
is_private?: boolean;
|
|
465
479
|
/** License validity in days for this option. Zero means lifetime. */
|
|
466
480
|
license_period?: number | null;
|
|
@@ -521,10 +535,14 @@ interface PriceVariant {
|
|
|
521
535
|
is_featured?: boolean;
|
|
522
536
|
isFeatured?: boolean;
|
|
523
537
|
/**
|
|
524
|
-
*
|
|
525
|
-
* only on `getProduct(id, { variant })` naming it,
|
|
526
|
-
*
|
|
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.
|
|
527
543
|
*/
|
|
544
|
+
visibility?: 'public' | 'on_hold' | 'private';
|
|
545
|
+
/** @deprecated Read `visibility`; true when it is `private`. Removed in a later release. */
|
|
528
546
|
is_private?: boolean;
|
|
529
547
|
/** License validity in days for this option. Zero means lifetime. */
|
|
530
548
|
license_period?: number | null;
|
|
@@ -1153,6 +1171,17 @@ interface CartQuote {
|
|
|
1153
1171
|
eligible_bundle_deals: EligibleBundleDeal[];
|
|
1154
1172
|
/** Per-line effective bounds and sellability — see CartQuoteLine. Absent on older backends. */
|
|
1155
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
|
+
}>;
|
|
1156
1185
|
/**
|
|
1157
1186
|
* TRUE when this cart already exceeds the shop's configured checkout maximum.
|
|
1158
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
|
}
|