@thorprovider/types 7.8.0 → 7.10.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.
- package/.turbo/turbo-build.log +18 -18
- package/.turbo/turbo-type-check.log +0 -0
- package/CHANGELOG.md +25 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.mts +644 -12
- package/dist/index.d.ts +644 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/publish.log +60 -0
- package/src/auth.ts +35 -1
- package/src/cart.ts +9 -2
- package/src/checkout.ts +13 -0
- package/src/commerce-provider.ts +69 -10
- package/src/customer.ts +50 -0
- package/src/index.ts +78 -0
- package/src/order.ts +672 -0
- package/src/product.ts +53 -0
package/src/product.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface ProductVariant {
|
|
|
50
50
|
|
|
51
51
|
// Media
|
|
52
52
|
image?: Image; // Variant-specific image
|
|
53
|
+
|
|
54
|
+
// Specifications that differ per variant (e.g. a size chart); absent means
|
|
55
|
+
// the product-level groups apply.
|
|
56
|
+
attributes?: ProductAttributeGroup[];
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
/**
|
|
@@ -60,6 +64,45 @@ export interface PriceRange {
|
|
|
60
64
|
maxVariantPrice: Money;
|
|
61
65
|
}
|
|
62
66
|
|
|
67
|
+
/**
|
|
68
|
+
* One merchandising highlight, rendered as a label/value pair (e.g.
|
|
69
|
+
* "Pantalla" / "14 pulgadas") above the description.
|
|
70
|
+
*/
|
|
71
|
+
export interface ProductHighlight {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** One row inside an attribute group. */
|
|
77
|
+
export interface ProductAttribute {
|
|
78
|
+
id?: string;
|
|
79
|
+
label: string;
|
|
80
|
+
value: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A titled block of specifications (e.g. "Peso y medidas"). Grouped rather than
|
|
85
|
+
* flat so the product detail can render several tables without inventing titles.
|
|
86
|
+
*/
|
|
87
|
+
export interface ProductAttributeGroup {
|
|
88
|
+
id?: string;
|
|
89
|
+
title: string;
|
|
90
|
+
items: ProductAttribute[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** A document attached to the product (datasheet, manual, care guide). */
|
|
94
|
+
export interface ProductAttachment {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
kind?: string;
|
|
98
|
+
language?: string;
|
|
99
|
+
size?: string;
|
|
100
|
+
version?: string;
|
|
101
|
+
url?: string;
|
|
102
|
+
/** Empty or absent means the attachment applies to every variant. */
|
|
103
|
+
variantIds?: string[];
|
|
104
|
+
}
|
|
105
|
+
|
|
63
106
|
/**
|
|
64
107
|
* Main product type - normalized across all providers
|
|
65
108
|
*
|
|
@@ -96,6 +139,16 @@ export interface Product {
|
|
|
96
139
|
productType?: string; // Shopify: productType, Medusa: type, WooCommerce: type (simple/variable)
|
|
97
140
|
vendor?: string; // Shopify-specific, stored in metadata for others
|
|
98
141
|
tags?: string[];
|
|
142
|
+
|
|
143
|
+
// Merchandising detail (optional, provider-dependent). A provider without a
|
|
144
|
+
// source for one of these omits it; the product detail renders the module off
|
|
145
|
+
// instead of showing an empty shell.
|
|
146
|
+
brand?: string;
|
|
147
|
+
model?: string;
|
|
148
|
+
shortDescription?: string;
|
|
149
|
+
highlights?: ProductHighlight[];
|
|
150
|
+
attributes?: ProductAttributeGroup[];
|
|
151
|
+
attachments?: ProductAttachment[];
|
|
99
152
|
|
|
100
153
|
// SEO
|
|
101
154
|
seo?: SEO;
|