@decocms/apps 0.20.1

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.
Files changed (113) hide show
  1. package/.github/workflows/release.yml +34 -0
  2. package/.releaserc.json +25 -0
  3. package/commerce/components/Image.tsx +209 -0
  4. package/commerce/components/JsonLd.tsx +285 -0
  5. package/commerce/sdk/analytics.ts +24 -0
  6. package/commerce/sdk/formatPrice.ts +23 -0
  7. package/commerce/sdk/url.ts +9 -0
  8. package/commerce/sdk/useOffer.ts +75 -0
  9. package/commerce/sdk/useVariantPossibilities.ts +43 -0
  10. package/commerce/types/commerce.ts +1105 -0
  11. package/commerce/utils/canonical.ts +11 -0
  12. package/commerce/utils/constants.ts +9 -0
  13. package/commerce/utils/filters.ts +10 -0
  14. package/commerce/utils/productToAnalyticsItem.ts +67 -0
  15. package/commerce/utils/stateByZip.ts +50 -0
  16. package/knip.json +19 -0
  17. package/package.json +77 -0
  18. package/shopify/actions/cart/addItems.ts +37 -0
  19. package/shopify/actions/cart/updateCoupons.ts +32 -0
  20. package/shopify/actions/cart/updateItems.ts +32 -0
  21. package/shopify/actions/user/signIn.ts +45 -0
  22. package/shopify/actions/user/signUp.ts +36 -0
  23. package/shopify/client.ts +58 -0
  24. package/shopify/index.ts +32 -0
  25. package/shopify/init.ts +40 -0
  26. package/shopify/loaders/ProductDetailsPage.ts +35 -0
  27. package/shopify/loaders/ProductList.ts +101 -0
  28. package/shopify/loaders/ProductListingPage.ts +180 -0
  29. package/shopify/loaders/RelatedProducts.ts +45 -0
  30. package/shopify/loaders/cart.ts +73 -0
  31. package/shopify/loaders/shop.ts +40 -0
  32. package/shopify/loaders/user.ts +44 -0
  33. package/shopify/utils/admin/admin.ts +57 -0
  34. package/shopify/utils/admin/queries.ts +29 -0
  35. package/shopify/utils/cart.ts +28 -0
  36. package/shopify/utils/cookies.ts +85 -0
  37. package/shopify/utils/enums.ts +438 -0
  38. package/shopify/utils/graphql.ts +69 -0
  39. package/shopify/utils/storefront/queries.ts +530 -0
  40. package/shopify/utils/storefront/storefront.graphql.gen.ts +113 -0
  41. package/shopify/utils/transform.ts +436 -0
  42. package/shopify/utils/types.ts +191 -0
  43. package/shopify/utils/user.ts +23 -0
  44. package/shopify/utils/utils.ts +164 -0
  45. package/tsconfig.json +11 -0
  46. package/vtex/README.md +6 -0
  47. package/vtex/actions/address.ts +211 -0
  48. package/vtex/actions/auth.ts +337 -0
  49. package/vtex/actions/checkout.ts +497 -0
  50. package/vtex/actions/index.ts +11 -0
  51. package/vtex/actions/masterData.ts +170 -0
  52. package/vtex/actions/misc.ts +196 -0
  53. package/vtex/actions/newsletter.ts +108 -0
  54. package/vtex/actions/orders.ts +37 -0
  55. package/vtex/actions/profile.ts +119 -0
  56. package/vtex/actions/session.ts +87 -0
  57. package/vtex/actions/trigger.ts +43 -0
  58. package/vtex/actions/wishlist.ts +116 -0
  59. package/vtex/client.ts +423 -0
  60. package/vtex/hooks/index.ts +4 -0
  61. package/vtex/hooks/useAutocomplete.ts +89 -0
  62. package/vtex/hooks/useCart.ts +219 -0
  63. package/vtex/hooks/useUser.ts +78 -0
  64. package/vtex/hooks/useWishlist.ts +119 -0
  65. package/vtex/index.ts +14 -0
  66. package/vtex/inline-loaders/productDetailsPage.ts +75 -0
  67. package/vtex/inline-loaders/productList.ts +163 -0
  68. package/vtex/inline-loaders/productListingPage.ts +447 -0
  69. package/vtex/inline-loaders/relatedProducts.ts +83 -0
  70. package/vtex/inline-loaders/suggestions.ts +49 -0
  71. package/vtex/inline-loaders/workflowProducts.ts +68 -0
  72. package/vtex/invoke.ts +202 -0
  73. package/vtex/loaders/address.ts +120 -0
  74. package/vtex/loaders/brands.ts +51 -0
  75. package/vtex/loaders/cart.ts +49 -0
  76. package/vtex/loaders/catalog.ts +165 -0
  77. package/vtex/loaders/collections.ts +57 -0
  78. package/vtex/loaders/index.ts +19 -0
  79. package/vtex/loaders/legacy.ts +671 -0
  80. package/vtex/loaders/logistics.ts +115 -0
  81. package/vtex/loaders/navbar.ts +29 -0
  82. package/vtex/loaders/orders.ts +103 -0
  83. package/vtex/loaders/pageType.ts +62 -0
  84. package/vtex/loaders/payment.ts +107 -0
  85. package/vtex/loaders/profile.ts +138 -0
  86. package/vtex/loaders/promotion.ts +33 -0
  87. package/vtex/loaders/search.ts +127 -0
  88. package/vtex/loaders/session.ts +91 -0
  89. package/vtex/loaders/user.ts +89 -0
  90. package/vtex/loaders/wishlist.ts +89 -0
  91. package/vtex/loaders/wishlistProducts.ts +81 -0
  92. package/vtex/loaders/workflow.ts +323 -0
  93. package/vtex/logo.png +0 -0
  94. package/vtex/middleware.ts +229 -0
  95. package/vtex/types.ts +248 -0
  96. package/vtex/utils/batch.ts +21 -0
  97. package/vtex/utils/cookies.ts +76 -0
  98. package/vtex/utils/enrichment.ts +540 -0
  99. package/vtex/utils/fetchCache.ts +150 -0
  100. package/vtex/utils/index.ts +17 -0
  101. package/vtex/utils/intelligentSearch.ts +84 -0
  102. package/vtex/utils/legacy.ts +155 -0
  103. package/vtex/utils/pickAndOmit.ts +30 -0
  104. package/vtex/utils/proxy.ts +196 -0
  105. package/vtex/utils/resourceRange.ts +10 -0
  106. package/vtex/utils/segment.ts +163 -0
  107. package/vtex/utils/similars.ts +38 -0
  108. package/vtex/utils/sitemap.ts +133 -0
  109. package/vtex/utils/slugCache.ts +32 -0
  110. package/vtex/utils/slugify.ts +13 -0
  111. package/vtex/utils/transform.ts +1331 -0
  112. package/vtex/utils/types.ts +1884 -0
  113. package/vtex/utils/vtexId.ts +103 -0
@@ -0,0 +1,1105 @@
1
+ type Flag = { name: string; value: boolean; };
2
+ /** Used at the top-level node to indicate the context for the JSON-LD objects used. The context provided in this type is compatible with the keys and URLs in the rest of this generated file. */
3
+ export declare type WithContext<T extends Things> = T & {
4
+ "@context": "https://schema.org";
5
+ };
6
+ /**
7
+ * An store category
8
+ */
9
+ export interface Category {
10
+ /**
11
+ * @title The Category Name
12
+ */
13
+ name: string;
14
+ /**
15
+ * @title The Category Url
16
+ */
17
+ url: string;
18
+ /**
19
+ * @title Sub categories
20
+ * @description Store's sub categories
21
+ */
22
+ children?: Category[];
23
+ }
24
+ export declare type Things = Thing | Product | BreadcrumbList;
25
+ export interface Thing {
26
+ "@type": "Thing";
27
+ /** IRI identifying the canonical address of this object. */
28
+ "@id"?: string;
29
+ /** An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */
30
+ additionalType?: string;
31
+ /** An alias for the item. */
32
+ alternateName?: string;
33
+ /** A description of the item. */
34
+ description?: string;
35
+ /** A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation. */
36
+ disambiguatingDescription?: string;
37
+ /** The identifier property represents any kind of identifier for any kind of {@link https://schema.org/Thing Thing}, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See {@link /docs/datamodel.html#identifierBg background notes} for more details. */
38
+ identifier?: string;
39
+ /** An image of the item. This can be a {@link https://schema.org/URL URL} or a fully described {@link https://schema.org/ImageObject ImageObject}. */
40
+ image?: ImageObject[] | null;
41
+ video?: VideoObject[] | null;
42
+ /** The name of the item. */
43
+ name?: string;
44
+ /** URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website. */
45
+ sameAs?: string;
46
+ /** A CreativeWork or Event about this Thing. */
47
+ subjectOf?: string;
48
+ /** URL of the item. */
49
+ url?: string;
50
+ }
51
+ export interface MediaObject {
52
+ /** Media type typically expressed using a MIME format (see IANA site and MDN reference) */
53
+ encodingFormat?: string;
54
+ /** A URL pointing to a player for a specific video. */
55
+ embedUrl?: string;
56
+ /** Actual bytes of the media object, for example the image file or video file. */
57
+ contentUrl?: string;
58
+ }
59
+ export interface CreativeWork {
60
+ /** A thumbnail image relevant to the Thing */
61
+ thumbnailUrl?: string;
62
+ }
63
+ export interface VideoObject
64
+ extends MediaObject, CreativeWork, Omit<Thing, "@type" | "url"> {
65
+ /**
66
+ * @ignore
67
+ */
68
+ "@type": "VideoObject";
69
+ /**
70
+ * @description date when video was published first time, format ISO 8601: https://en.wikipedia.org/wiki/ISO_8601
71
+ */
72
+ uploadDate?: string;
73
+ /**
74
+ * @description video duration, format ISO 8601: https://en.wikipedia.org/wiki/ISO_8601,
75
+ * PT00H30M5S means 30 minutes and 5 seconds
76
+ */
77
+ duration?: string;
78
+ }
79
+ export interface ImageObject
80
+ extends MediaObject, CreativeWork, Omit<Thing, "@type" | "url"> {
81
+ /**
82
+ * @ignore
83
+ */
84
+ "@type": "ImageObject";
85
+ /**
86
+ * @format image-uri
87
+ */
88
+ url?: string;
89
+ }
90
+ export interface PropertyValue extends Omit<Thing, "@type"> {
91
+ "@type": "PropertyValue";
92
+ /** The upper value of some characteristic or property. */
93
+ maxValue?: number;
94
+ /** The lower value of some characteristic or property. */
95
+ minValue?: number;
96
+ /** A commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific id of the property), or (3) a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry). Standards bodies should promote a standard prefix for the identifiers of properties from their standards. */
97
+ propertyID?: string;
98
+ /** The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon. */
99
+ unitCode?: string;
100
+ /** A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for {@link unitCode unitCode}. */
101
+ unitText?: string;
102
+ /**
103
+ * The value of the quantitative value or property value node.
104
+ * - For {@link https://schema.org/QuantitativeValue QuantitativeValue} and {@link https://schema.org/MonetaryAmount MonetaryAmount}, the recommended type for values is 'Number'.
105
+ * - For {@link https://schema.org/PropertyValue PropertyValue}, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.
106
+ * - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
107
+ * - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
108
+ */
109
+ value?: string;
110
+ /** A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement. */
111
+ valueReference?: string;
112
+ }
113
+ export interface AggregateRating {
114
+ "@type": "AggregateRating";
115
+ /** The count of total number of ratings. */
116
+ ratingCount?: number;
117
+ /** The count of total number of reviews. */
118
+ reviewCount?: number;
119
+ /** The rating for the content. */
120
+ ratingValue?: number;
121
+ /** The highest value allowed in this rating system. */
122
+ bestRating?: number;
123
+ /** The lowest value allowed in this rating system. */
124
+ worstRating?: number;
125
+ /** A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using ClaimReview. */
126
+ ratingExplanation?: string;
127
+ }
128
+ export declare type ItemAvailability =
129
+ | "https://schema.org/BackOrder"
130
+ | "https://schema.org/Discontinued"
131
+ | "https://schema.org/InStock"
132
+ | "https://schema.org/InStoreOnly"
133
+ | "https://schema.org/LimitedAvailability"
134
+ | "https://schema.org/OnlineOnly"
135
+ | "https://schema.org/OutOfStock"
136
+ | "https://schema.org/PreOrder"
137
+ | "https://schema.org/PreSale"
138
+ | "https://schema.org/SoldOut";
139
+ export declare type OfferItemCondition =
140
+ | "https://schema.org/DamagedCondition"
141
+ | "https://schema.org/NewCondition"
142
+ | "https://schema.org/RefurbishedCondition"
143
+ | "https://schema.org/UsedCondition";
144
+ export interface QuantitativeValue {
145
+ value?: number;
146
+ }
147
+ export declare type PriceTypeEnumeration =
148
+ | "https://schema.org/InvoicePrice"
149
+ | "https://schema.org/ListPrice"
150
+ | "https://schema.org/MinimumAdvertisedPrice"
151
+ | "https://schema.org/MSRP"
152
+ | "https://schema.org/SalePrice"
153
+ | "https://schema.org/SRP";
154
+ export declare type PriceComponentTypeEnumeration =
155
+ | "https://schema.org/ActivationFee"
156
+ | "https://schema.org/CleaningFee"
157
+ | "https://schema.org/DistanceFee"
158
+ | "https://schema.org/Downpayment"
159
+ | "https://schema.org/Installment"
160
+ | "https://schema.org/Subscription";
161
+ export declare type ReturnFeesEnumeration =
162
+ | "https://schema.org/FreeReturn"
163
+ | "https://schema.org/OriginalShippingFees"
164
+ | "https://schema.org/RestockingFees"
165
+ | "https://schema.org/ReturnFeesCustomerResponsibility"
166
+ | "https://schema.org/ReturnShippingFees";
167
+ export declare type ReturnMethodEnumeration =
168
+ | "https://schema.org/KeepProduct"
169
+ | "https://schema.org/ReturnAtKiosk"
170
+ | "https://schema.org/ReturnByMail"
171
+ | "https://schema.org/ReturnInStore";
172
+ export declare type MerchantReturnEnumeration =
173
+ | "https://schema.org/MerchantReturnFiniteReturnWindow"
174
+ | "https://schema.org/MerchantReturnNotPermitted"
175
+ | "https://schema.org/MerchantReturnUnlimitedWindow"
176
+ | "https://schema.org/MerchantReturnUnspecified";
177
+ export interface PriceSpecification extends Omit<Thing, "@type"> {
178
+ "@type": "PriceSpecification";
179
+ /** The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */
180
+ eligibleQuantity?: QuantitativeValue;
181
+ /**
182
+ * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.
183
+ *
184
+ * Usage guidelines:
185
+ * - Use the {@link https://schema.org/priceCurrency priceCurrency} property (with standard formats: {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217 currency format} e.g. "USD"; {@link https://en.wikipedia.org/wiki/List_of_cryptocurrencies Ticker symbol} for cryptocurrencies e.g. "BTC"; well known names for {@link https://en.wikipedia.org/wiki/Local_exchange_trading_system Local Exchange Tradings Systems} (LETS) and other currency types e.g. "Ithaca HOUR") instead of including {@link http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign ambiguous symbols} such as '$' in the value.
186
+ * - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
187
+ * - Note that both {@link http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute RDFa} and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
188
+ * - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
189
+ */
190
+ price: number;
191
+ /**
192
+ * The currency of the price, or a price component when attached to {@link https://schema.org/PriceSpecification PriceSpecification} and its subtypes.
193
+ *
194
+ * Use standard formats: {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217 currency format} e.g. "USD"; {@link https://en.wikipedia.org/wiki/List_of_cryptocurrencies Ticker symbol} for cryptocurrencies e.g. "BTC"; well known names for {@link https://en.wikipedia.org/wiki/Local_exchange_trading_system Local Exchange Tradings Systems} (LETS) and other currency types e.g. "Ithaca HOUR".
195
+ */
196
+ priceCurrency?: string;
197
+ }
198
+ export interface UnitPriceSpecification
199
+ extends Omit<PriceSpecification, "@type"> {
200
+ "@type": "UnitPriceSpecification";
201
+ /** Identifies a price component (for example, a line item on an invoice), part of the total price for an offer. */
202
+ priceComponentType?: PriceComponentTypeEnumeration;
203
+ /** Defines the type of a price specified for an offered product, for example a list price, a (temporary) sale price or a manufacturer suggested retail price. If multiple prices are specified for an offer the {@link https://schema.org/priceType priceType} property can be used to identify the type of each such specified price. The value of priceType can be specified as a value from enumeration PriceTypeEnumeration or as a free form text string for price types that are not already predefined in PriceTypeEnumeration. */
204
+ priceType: PriceTypeEnumeration;
205
+ /** Specifies for how long this price (or price component) will be billed. Can be used, for example, to model the contractual duration of a subscription or payment plan. Type can be either a Duration or a Number (in which case the unit of measurement, for example month, is specified by the unitCode property). */
206
+ billingDuration?: number;
207
+ /** This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */
208
+ billingIncrement?: number;
209
+ }
210
+ export interface TeasersParameters {
211
+ name: string;
212
+ value: string;
213
+ }
214
+ export interface TeasersConditions {
215
+ minimumQuantity: number;
216
+ parameters: TeasersParameters[];
217
+ }
218
+ export interface TeasersEffect {
219
+ parameters: TeasersParameters[];
220
+ }
221
+ export interface Teasers {
222
+ name: string;
223
+ generalValues?: unknown;
224
+ conditions: TeasersConditions;
225
+ effects: TeasersEffect;
226
+ }
227
+ export interface MonetaryAmount extends Omit<Thing, "@type"> {
228
+ /**
229
+ * The currency in which the monetary amount is expressed.
230
+ *
231
+ * Use standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR".
232
+ */
233
+ currency: string;
234
+ /**
235
+ * The upper value of some characteristic or property.
236
+ */
237
+ maxValue: number;
238
+ /** The lower value of some characteristic or property. */
239
+ minValue: number;
240
+ /** The date when the item becomes valid. */
241
+ validFrom: string;
242
+ /** The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours. */
243
+ validThrough: string;
244
+ /** The value of a QuantitativeValue (including Observation) or property value node. */
245
+ value: boolean | number | string;
246
+ }
247
+ export interface MerchantReturnPolicy extends Omit<Thing, "@type"> {
248
+ "@type": "MerchantReturnPolicy";
249
+ /** Specifies either a fixed return date or the number of days (from the delivery date) that a product can be returned. Used when the returnPolicyCategory property is specified as MerchantReturnFiniteReturnWindow. Supersedes productReturnDays */
250
+ merchantReturnDays?: number;
251
+ /** A country where a particular merchant return policy applies to, for example the two-letter ISO 3166-1 alpha-2 country code. */
252
+ applicableCountry: string;
253
+ /** The type of return fees for purchased products (for any return reason). */
254
+ returnFees?: ReturnFeesEnumeration;
255
+ /** The type of return method offered, specified from an enumeration. */
256
+ returnMethod?: ReturnMethodEnumeration;
257
+ /** Specifies an applicable return policy (from an enumeration). */
258
+ returnPolicyCategory: MerchantReturnEnumeration;
259
+ /** Amount of shipping costs for product returns (for any reason). Applicable when property returnFees equals ReturnShippingFees. */
260
+ returnShippingFeesAmount?: MonetaryAmount;
261
+ }
262
+ export interface Offer extends Omit<Thing, "@type"> {
263
+ "@type": "Offer";
264
+ /** The availability of this item—for example In stock, Out of stock, Pre-order, etc. */
265
+ availability: ItemAvailability;
266
+ /** A Global Trade Item Number ({@link https://www.gs1.org/standards/id-keys/gtin GTIN}). GTINs identify trade items, including products and services, using numeric identification codes. The {@link https://schema.org/gtin gtin} property generalizes the earlier {@link https://schema.org/gtin8 gtin8}, {@link https://schema.org/gtin12 gtin12}, {@link https://schema.org/gtin13 gtin13}, and {@link https://schema.org/gtin14 gtin14} properties. The GS1 {@link https://www.gs1.org/standards/Digital-Link/ digital link specifications} express GTINs as URLs. A correct {@link https://schema.org/gtin gtin} value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a {@link https://www.gs1.org/services/check-digit-calculator valid GS1 check digit} and meet the other rules for valid GTINs. See also {@link http://www.gs1.org/barcodes/technical/idkeys/gtin GS1's GTIN Summary} and {@link https://en.wikipedia.org/wiki/Global_Trade_Item_Number Wikipedia} for more details. Left-padding of the gtin values is not required or encouraged. */
267
+ gtin?: string;
268
+ /** The current approximate inventory level for the item or items. */
269
+ inventoryLevel: QuantitativeValue;
270
+ /** A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer. Also used for product return policies to specify the condition of products accepted for returns. */
271
+ itemCondition?: OfferItemCondition;
272
+ /**
273
+ * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.
274
+ *
275
+ * Usage guidelines:
276
+ * - Use the {@link https://schema.org/priceCurrency priceCurrency} property (with standard formats: {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217 currency format} e.g. "USD"; {@link https://en.wikipedia.org/wiki/List_of_cryptocurrencies Ticker symbol} for cryptocurrencies e.g. "BTC"; well known names for {@link https://en.wikipedia.org/wiki/Local_exchange_trading_system Local Exchange Tradings Systems} (LETS) and other currency types e.g. "Ithaca HOUR") instead of including {@link http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign ambiguous symbols} such as '$' in the value.
277
+ * - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
278
+ * - Note that both {@link http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute RDFa} and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
279
+ * - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
280
+ */
281
+ price: number;
282
+ /**
283
+ * The currency of the price, or a price component when attached to {@link https://schema.org/PriceSpecification PriceSpecification} and its subtypes.
284
+ *
285
+ * Use standard formats: {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217 currency format} e.g. "USD"; {@link https://en.wikipedia.org/wiki/List_of_cryptocurrencies Ticker symbol} for cryptocurrencies e.g. "BTC"; well known names for {@link https://en.wikipedia.org/wiki/Local_exchange_trading_system Local Exchange Tradings Systems} (LETS) and other currency types e.g. "Ithaca HOUR".
286
+ */
287
+ priceCurrency?: string;
288
+ /** One or more detailed price specifications, indicating the unit price and delivery or payment charges. */
289
+ priceSpecification: UnitPriceSpecification[];
290
+ /** The date after which the price is no longer available. */
291
+ priceValidUntil?: string;
292
+ /** An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */
293
+ seller?: string;
294
+ /** Name of the seller */
295
+ sellerName?: string;
296
+ /** The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */
297
+ sku?: string;
298
+ /** Used by some ecommerce sites to retrieve the sku of products that are part of the BuyAndWin promotion */
299
+ giftSkuIds?: string[];
300
+ /** Used by some ecommerce providers (e.g: VTEX) to describe special promotions that depend on some conditions */
301
+ teasers?: Teasers[];
302
+ /** Specifies a MerchantReturnPolicy that may be applicable. */
303
+ hasMerchantReturnPolicy?: MerchantReturnPolicy;
304
+ }
305
+ export interface AggregateOffer {
306
+ "@type": "AggregateOffer";
307
+ /**
308
+ * The highest price of all offers available.
309
+ *
310
+ * Usage guidelines:
311
+ * - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
312
+ * - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
313
+ */
314
+ highPrice: number;
315
+ /**
316
+ * The lowest price of all offers available.
317
+ *
318
+ * Usage guidelines:
319
+ * - Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
320
+ * - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
321
+ */
322
+ lowPrice: number;
323
+ /** The number of offers for the product. */
324
+ offerCount: number;
325
+ /** An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use {@link https://schema.org/businessFunction businessFunction} to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a {@link https://schema.org/Demand Demand}. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. */
326
+ offers: Offer[];
327
+ /**
328
+ * The currency of the price, or a price component when attached to {@link https://schema.org/PriceSpecification PriceSpecification} and its subtypes.
329
+ *
330
+ * Use standard formats: {@link http://en.wikipedia.org/wiki/ISO_4217 ISO 4217 currency format} e.g. "USD"; {@link https://en.wikipedia.org/wiki/List_of_cryptocurrencies Ticker symbol} for cryptocurrencies e.g. "BTC"; well known names for {@link https://en.wikipedia.org/wiki/Local_exchange_trading_system Local Exchange Tradings Systems} (LETS) and other currency types e.g. "Ithaca HOUR".
331
+ */
332
+ priceCurrency?: string;
333
+ /** Specifies a MerchantReturnPolicy that may be applicable. */
334
+ hasMerchantReturnPolicy?: MerchantReturnPolicy;
335
+ }
336
+ export interface ReviewPageResults {
337
+ currentPageNumber?: number;
338
+ nextPageUrl?: string;
339
+ pageSize?: number;
340
+ pagesTotal?: number;
341
+ totalResults?: number;
342
+ }
343
+ export interface ReviewPage {
344
+ page: ReviewPageResults;
345
+ id: string;
346
+ review?: Review[];
347
+ aggregateRating?: AggregateRating;
348
+ }
349
+ export interface Review extends Omit<Thing, "@type"> {
350
+ "@type": "Review";
351
+ id?: string;
352
+ /** Author of the */
353
+ author?: Author[];
354
+ /** The date that the order was created, in ISO 8601 date format.*/
355
+ dateCreated?: string;
356
+ /** The date that the review was published, in ISO 8601 date format.*/
357
+ datePublished?: string;
358
+ /** The item that is being reviewed/rated. */
359
+ itemReviewed?: string;
360
+ /** Indicates, in the context of a {@link https://schema.org/Review Review} (e.g. framed as 'pro' vs 'con' considerations), negative considerations - either as unstructured text, or a list. */
361
+ negativeNotes?: string[];
362
+ /** Indicates, in the context of a {@link https://schema.org/Review Review} (e.g. framed as 'pro' vs 'con' considerations), positive considerations - either as unstructured text, or a list. */
363
+ positiveNotes?: string[];
364
+ /** This Review or Rating is relevant to this part or facet of the itemReviewed. */
365
+ reviewAspect?: string;
366
+ /** Emphasis part of the review */
367
+ reviewHeadline?: string;
368
+ /** The actual body of the review. */
369
+ reviewBody?: string;
370
+ /** The rating given in this review. Note that reviews can themselves be rated. The `reviewRating` applies to rating given by the review. The {@link https://schema.org/aggregateRating aggregateRating} property applies to the review itself, as a creative work. */
371
+ reviewRating?: AggregateRating;
372
+ /** Extra review informations */
373
+ tags?: ReviewTag[];
374
+ /** BrandReviewed */
375
+ brand?: ReviewBrand;
376
+ /** Medias */
377
+ media?: ReviewMedia[];
378
+ }
379
+ export interface ReviewMedia {
380
+ type: "image" | "video";
381
+ url?: string;
382
+ alt?: string;
383
+ likes?: number;
384
+ unlikes?: number;
385
+ }
386
+ export interface ReviewBrand {
387
+ /** Brand Name */
388
+ name: string;
389
+ /** Brand Logo */
390
+ logo: string;
391
+ /** Brand website url */
392
+ url: string;
393
+ }
394
+ export interface ReviewTag {
395
+ /** Label of specific topic */
396
+ label?: string;
397
+ /** Caracteristics about the topic */
398
+ value?: string[];
399
+ }
400
+ /** https://schema.org/Person */
401
+ export interface Person extends Omit<Thing, "@type"> {
402
+ /** Email address. */
403
+ email?: string;
404
+ /** Given name. In the U.S., the first name of a Person. */
405
+ givenName?: string;
406
+ /** Family name. In the U.S., the last name of a Person. */
407
+ familyName?: string;
408
+ /** Gender of something, typically a Person, but possibly also fictional characters, animals, etc */
409
+ gender?: "https://schema.org/Male" | "https://schema.org/Female";
410
+ /** An image of the item. This can be a URL or a fully described ImageObject. **/
411
+ image?: ImageObject[] | null;
412
+ /** The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */
413
+ taxID?: string;
414
+ /** The telephone number. */
415
+ telephone?: string;
416
+ }
417
+ // NON SCHEMA.ORG Compliant. Should be removed ASAP
418
+ export interface Author extends Omit<Thing, "@type"> {
419
+ "@type": "Author";
420
+ /** The name of the author. */
421
+ name?: string;
422
+ /** A link to a web page that uniquely identifies the author of the article. For example, the author's social media page, an about me page, or a bio page. */
423
+ url?: string;
424
+ /** Indicates that the author is a real buyer */
425
+ verifiedBuyer?: boolean;
426
+ /** Author location */
427
+ location?: string;
428
+ }
429
+ // TODO: fix this hack and use Product directly where it appears
430
+ // Hack to prevent type self referencing and we end up with an infinite loop
431
+ export interface ProductLeaf extends Omit<Product, "isVariantOf"> {
432
+ }
433
+ export interface ProductGroup extends Omit<Thing, "@type"> {
434
+ "@type": "ProductGroup";
435
+ /** Indicates a {@link https://schema.org/Product Product} that is a member of this {@link https://schema.org/ProductGroup ProductGroup} (or {@link https://schema.org/ProductModel ProductModel}). */
436
+ hasVariant: ProductLeaf[];
437
+ /** Indicates a textual identifier for a ProductGroup. */
438
+ productGroupID: string;
439
+ /**
440
+ * A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.
441
+ *
442
+ * Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
443
+ */
444
+ additionalProperty: PropertyValue[];
445
+ /** docs https://schema.org/gtin */
446
+ model?: string;
447
+ }
448
+ export interface Brand extends Omit<Thing, "@type"> {
449
+ "@type": "Brand";
450
+ /** Brand's image url */
451
+ logo?: string;
452
+ }
453
+ export interface Answer extends Omit<Thing, "@type"> {
454
+ text: string;
455
+ /** The date that the anwser was published, in ISO 8601 date format.*/
456
+ dateModified?: string;
457
+ /** The date that the anwser was published, in ISO 8601 date format.*/
458
+ datePublished?: string;
459
+ /** Author of the */
460
+ author?: Author[];
461
+ }
462
+ export interface Question extends Omit<Thing, "@type" | "name"> {
463
+ "@type": "Question";
464
+ answerCount: number;
465
+ /** The answer(s) that has been accepted as best */
466
+ acceptedAnswer?: Answer;
467
+ /** List of answer(s) */
468
+ suggestedAnswer?: Answer[];
469
+ name: string;
470
+ text: string;
471
+ /** The date that the question was published, in ISO 8601 date format.*/
472
+ dateModified?: string;
473
+ /** The date that the question was published, in ISO 8601 date format.*/
474
+ datePublished?: string;
475
+ /** Author of the */
476
+ author?: Author[];
477
+ }
478
+ export interface Product extends Omit<Thing, "@type"> {
479
+ "@type": "Product";
480
+ /**
481
+ * A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.
482
+ *
483
+ * Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
484
+ */
485
+ additionalProperty?: PropertyValue[];
486
+ /** The overall rating, based on a collection of reviews or ratings, of the item. */
487
+ aggregateRating?: AggregateRating;
488
+ /** An award won by or for this item. */
489
+ award?: string;
490
+ /** The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */
491
+ brand?: Brand;
492
+ /** A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */
493
+ category?: string;
494
+ /** A Global Trade Item Number ({@link https://www.gs1.org/standards/id-keys/gtin GTIN}). GTINs identify trade items, including products and services, using numeric identification codes. The {@link https://schema.org/gtin gtin} property generalizes the earlier {@link https://schema.org/gtin8 gtin8}, {@link https://schema.org/gtin12 gtin12}, {@link https://schema.org/gtin13 gtin13}, and {@link https://schema.org/gtin14 gtin14} properties. The GS1 {@link https://www.gs1.org/standards/Digital-Link/ digital link specifications} express GTINs as URLs. A correct {@link https://schema.org/gtin gtin} value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a {@link https://www.gs1.org/services/check-digit-calculator valid GS1 check digit} and meet the other rules for valid GTINs. See also {@link http://www.gs1.org/barcodes/technical/idkeys/gtin GS1's GTIN Summary} and {@link https://en.wikipedia.org/wiki/Global_Trade_Item_Number Wikipedia} for more details. Left-padding of the gtin values is not required or encouraged. */
495
+ gtin?: string;
496
+ /** Indicates the {@link https://schema.org/productGroupID productGroupID} for a {@link https://schema.org/ProductGroup ProductGroup} that this product {@link https://schema.org/isVariantOf isVariantOf}. */
497
+ inProductGroupWithID?: string;
498
+ // TODO: Make json schema generator support self-referencing types
499
+ // /** A pointer to another, somehow related product (or multiple products). */
500
+ isRelatedTo?: Product[] | null;
501
+ /** A pointer to another, functionally similar product (or multiple products). */
502
+ isSimilarTo?: Product[] | null;
503
+ /** Indicates the kind of product that this is a variant of. In the case of {@link https://schema.org/ProductModel ProductModel}, this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a {@link https://schema.org/ProductGroup ProductGroup}, the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with {@link https://schema.org/ProductGroup ProductGroup}, this property can apply to any {@link https://schema.org/Product Product} included in the group. */
504
+ isVariantOf?: ProductGroup;
505
+ /** An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use {@link https://schema.org/businessFunction businessFunction} to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a {@link https://schema.org/Demand Demand}. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. */
506
+ offers?: AggregateOffer;
507
+ /** The product identifier, such as ISBN. For example: `meta itemprop="productID" content="isbn:123-456-789"`. */
508
+ productID: string;
509
+ /** The date of production of the item, e.g. vehicle. */
510
+ productionDate?: string;
511
+ /** The release date of a product or product model. This can be used to distinguish the exact variant of a product. */
512
+ releaseDate?: string;
513
+ /** A review of the item. */
514
+ review?: Review[];
515
+ /** The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */
516
+ sku: string;
517
+ /** A pointer to another product (or multiple products) for which this product is an accessory or spare part. */
518
+ isAccessoryOrSparePartFor?: Product[] | null;
519
+ questions?: Question[];
520
+ }
521
+ export interface ListItem<T = string> extends Omit<Thing, "@type"> {
522
+ "@type": "ListItem";
523
+ /** An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists')’. */
524
+ item: T;
525
+ /** The position of an item in a series or sequence of items. */
526
+ position: number;
527
+ }
528
+ export interface ItemList<T = string> extends Omit<Thing, "@type"> {
529
+ "@type": "ItemList";
530
+ /**
531
+ * For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.
532
+ *
533
+ * Text values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.
534
+ *
535
+ * Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.
536
+ */
537
+ itemListElement: ListItem<T>[];
538
+ /** The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list. */
539
+ numberOfItems: number;
540
+ }
541
+ export interface BreadcrumbList extends Omit<ItemList, "@type"> {
542
+ "@type": "BreadcrumbList";
543
+ }
544
+ export type DayOfWeek =
545
+ | "Monday"
546
+ | "Tuesday"
547
+ | "Wednesday"
548
+ | "Thursday"
549
+ | "Friday"
550
+ | "Saturday"
551
+ | "Sunday"
552
+ | "PublicHolidays";
553
+ export interface OpeningHoursSpecification extends Omit<Thing, "@type"> {
554
+ "@type": "OpeningHoursSpecification";
555
+ /** The closing hour of the place or service on the given day(s) of the week. */
556
+ closes?: string;
557
+ /** The day of the week for which these opening hours are valid. */
558
+ dayOfWeek?: DayOfWeek;
559
+ /** The opening hour of the place or service on the given day(s) of the week. */
560
+ opens?: string;
561
+ /** The date when the item becomes valid. */
562
+ validFrom?: string;
563
+ /** The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours. */
564
+ validThrough?: string;
565
+ }
566
+ export interface ContactPoint extends Omit<Thing, "@type"> {
567
+ "@type": "ContactPoint";
568
+ /** The geographic area where a service or offered item is provided. */
569
+ areaServed?: string;
570
+ /** The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. See also availableLanguage. */
571
+ availableLanguage?: string;
572
+ /** An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). */
573
+ contactOption?: "TollFree" | "HearingImpairedSupported";
574
+ /** A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point. */
575
+ contactType?: string;
576
+ /** Email address. */
577
+ email?: string;
578
+ /** The fax number. */
579
+ faxNumber?: string;
580
+ /** The hours during which this service or contact is available. */
581
+ hoursAvailable?: OpeningHoursSpecification;
582
+ /** The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */
583
+ productSupported?: string;
584
+ /** The telephone number. */
585
+ telephone?: string;
586
+ }
587
+ export interface PostalAddress extends Omit<ContactPoint, "@type"> {
588
+ "@type": "PostalAddress";
589
+ /** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */
590
+ addressCountry?: string;
591
+ /** The locality in which the street address is, and which is in the region. For example, Mountain View. */
592
+ addressLocality?: string;
593
+ /** The region in which the locality is, and which is in the country. For example, California. */
594
+ addressRegion?: string;
595
+ /** The postal code. For example, 94043. */
596
+ postalCode?: string;
597
+ /** The street address. For example, 1600 Amphitheatre Pkwy. */
598
+ streetAddress?: string;
599
+ /** The latitude of a location. For example 37.42242 (WGS 84). */
600
+ latitude?: number;
601
+ /** The longitude of a location. For example -122.08585 (WGS 84). */
602
+ longitude?: number;
603
+ }
604
+ export interface LocationFeatureSpecification
605
+ extends Omit<PropertyValue, "@type"> {
606
+ "@type": "LocationFeatureSpecification";
607
+ /** The hours during which this service or contact is available. */
608
+ hoursAvailable?: OpeningHoursSpecification;
609
+ /** The date when the item becomes valid. */
610
+ validFrom?: string;
611
+ /** The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours. */
612
+ validThrough?: string;
613
+ }
614
+ export interface GeoCoordinates extends Omit<Thing, "@type"> {
615
+ "@type": "GeoCoordinates";
616
+ /** The geographic area where a service or offered item is provided. */
617
+ address?: PostalAddress;
618
+ /** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */
619
+ addressCountry?: string;
620
+ /** The elevation of a location (WGS 84). Values may be of the form 'NUMBER UNIT_OF_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters. */
621
+ elevation?: number;
622
+ /** The latitude of a location. For example 37.42242 (WGS 84). */
623
+ latitude?: number;
624
+ /** The longitude of a location. For example -122.08585 (WGS 84). */
625
+ longitude?: number;
626
+ /** The postal code. For example, 94043. */
627
+ postalCode?: string;
628
+ }
629
+ export interface GeoShape extends Omit<Thing, "@type"> {
630
+ "@type": "GeoShape";
631
+ /** The GeoShape for the GeoCoordinates or GeoCircle. */
632
+ box?: string;
633
+ /** The GeoShape for the GeoCoordinates or GeoCircle. */
634
+ circle?: string;
635
+ /** The elevation of a location (WGS 84). Values may be of the form 'NUMBER UNIT_OF_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters. */
636
+ elevation?: number;
637
+ /** A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space. */
638
+ line?: string;
639
+ /** The GeoShape for the GeoCoordinates or GeoCircle. */
640
+ polygon?: string;
641
+ /** The postal code. For example, 94043. */
642
+ postalCode?: string;
643
+ }
644
+ export interface About extends Omit<Thing, "@type"> {
645
+ "@type": "About";
646
+ }
647
+ export interface Rating extends Omit<Thing, "@type"> {
648
+ "@type": "Rating";
649
+ /** The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */
650
+ author?: Person;
651
+ /** The highest value allowed in this rating system. */
652
+ bestRating?: number;
653
+ /** A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using ClaimReview. */
654
+ ratingExplanation?: string;
655
+ /**
656
+ * The rating for the content.
657
+ * Usage guidelines:
658
+ *
659
+ * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
660
+ *
661
+ * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
662
+ */
663
+ ratingValue?: number;
664
+ /** This Review or Rating is relevant to this part or facet of the itemReviewed. */
665
+ reviewAspect?: string;
666
+ /** The lowest value allowed in this rating system. */
667
+ worstRating?: number;
668
+ }
669
+ export interface Organization extends Omit<Thing, "@type"> {
670
+ "@type": "Organization";
671
+ }
672
+ export interface AdministrativeArea extends Omit<Thing, "@type"> {
673
+ "@type": "AdministrativeArea";
674
+ }
675
+ export type CertificationStatus =
676
+ | "CertificationActive"
677
+ | "CertificationInactive";
678
+ export interface Certification extends Omit<CreativeWork, "@type"> {
679
+ "@type": "Certification";
680
+ /** The subject matter of the content. */
681
+ about?: About;
682
+ /** Date when a certification was last audited. */
683
+ auditData?: string;
684
+ /** Identifier of a certification instance (as registered with an independent certification body). Typically this identifier can be used to consult and verify the certification instance. */
685
+ certificationIdentification?: string;
686
+ /** Rating of a certification instance (as defined by an independent certification body). Typically this rating can be used to rate the level to which the requirements of the certification instance are fulfilled. */
687
+ certificationRating?: Rating;
688
+ /** Indicates the current status of a certification: active or inactive. */
689
+ certificationStatus?: CertificationStatus;
690
+ /** Date of first publication or broadcast. For example the date a CreativeWork was broadcast or a Certification was issued. */
691
+ datePublished?: string;
692
+ /** Date the content expires and is no longer useful or available. For example a VideoObject or NewsArticle whose availability or relevance is time-limited, a ClaimReview fact check whose publisher wants to indicate that it may no longer be relevant (or helpful to highlight) after some date, or a Certification the validity has expired. */
693
+ expires?: string;
694
+ /** A measurement of an item, For example, the inseam of pants, the wheel size of a bicycle, the gauge of a screw, or the carbon footprint measured for certification by an authority. Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings. */
695
+ hasMeasurement?: QuantitativeValue;
696
+ /** The organization issuing the item, for example a Permit, Ticket, or Certification. */
697
+ issuedBy?: Organization;
698
+ /** An associated logo. */
699
+ logo?: ImageObject;
700
+ /** The date when the item becomes valid. */
701
+ validFrom?: string;
702
+ /** The geographic area where the item is valid. Applies for example to a Permit, a Certification, or an EducationalOccupationalCredential. */
703
+ validIn?: AdministrativeArea;
704
+ }
705
+ export interface PlaceLeaf extends Omit<Thing, "@type"> {
706
+ "@type": "Place";
707
+ /** A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. */
708
+ additionalProperty?: PropertyValue[];
709
+ /** Physical address of the item. */
710
+ address?: PostalAddress;
711
+ /** The overall rating, based on a collection of reviews or ratings, of the item. */
712
+ aggregateRating?: AggregateRating;
713
+ /** An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs. */
714
+ amenityFeature?: LocationFeatureSpecification;
715
+ /** A short textual code (also called "store code") that uniquely identifies a place of business. The code is typically assigned by the parentOrganization and used in structured URLs. */
716
+ branchCode?: string;
717
+ /** Upcoming or past event associated with this place, organization, or action. */
718
+ faxNumber?: string;
719
+ /** The geo coordinates of the place. */
720
+ geo?: GeoCoordinates | GeoShape;
721
+ /** The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */
722
+ globalLocationNumber?: string;
723
+ /** Certification information about a product, organization, service, place or person. */
724
+ hasCertification?: Certification;
725
+ /** Indicates whether some facility offers the service that can be used by driving through in a car */
726
+ hasDriveThroughService?: boolean;
727
+ /** The GS1 digital link associated with the object. This URL should conform to the particular requirements of digital links. The link should only contain the Application Identifiers (AIs) that are relevant for the entity being annotated, for instance a Product or an Organization, and for the correct granularity. */
728
+ hasDigitalLink?: string;
729
+ /** A URL to a map of the place. Supersedes maps, map. */
730
+ hasMap?: string;
731
+ /** A flag to signal that the item, event, or place is accessible for free. Supersedes free. */
732
+ isAccessibleForFree?: boolean;
733
+ /** The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */
734
+ isicV4?: string;
735
+ /** Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property. */
736
+ keywords?: string;
737
+ /** The latitude of a location. For example 37.42242 (WGS 84). */
738
+ latitude?: number;
739
+ /** An associated logo. */
740
+ logo?: ImageObject;
741
+ /** The longitude of a location. For example -122.08585 (WGS 84). */
742
+ longitude?: number;
743
+ /** The total number of individuals that may attend an event or venue. */
744
+ maximumAttendeeCapacity?: number;
745
+ /** The opening hours of a certain place. */
746
+ openingHoursSpecification?: OpeningHoursSpecification[];
747
+ /** A photograph of this place. */
748
+ photo?: ImageObject;
749
+ /** A flag to signal that the Place is open to public visitors. If this property is omitted there is no assumed default boolean value. */
750
+ publicAccess?: boolean;
751
+ /** A review of the item. */
752
+ review?: Review;
753
+ /** A slogan or motto associated with the item. */
754
+ slogan?: string;
755
+ /** Indicates whether it is allowed to smoke in the place, e.g. in the restaurant, hotel or hotel room. */
756
+ smokingAllowed?: boolean;
757
+ /** The special opening hours of a certain place. */
758
+ specialOpeningHoursSpecification?: OpeningHoursSpecification[];
759
+ /** The telephone number. */
760
+ telephone?: string;
761
+ /** A page providing information on how to book a tour of some Place, such as an Accommodation or ApartmentComplex in a real estate setting, as well as other kinds of tours as appropriate. */
762
+ tourBookingPage?: string;
763
+ }
764
+ /** Entities that have a somewhat fixed, physical extension. */
765
+ export interface Place extends PlaceLeaf {
766
+ /** The basic containment relation between a place and one that contains it. Supersedes containedIn. Inverse property: containsPlace. */
767
+ containedIn?: PlaceLeaf;
768
+ /** The basic containment relation between a place and another that it contains. Inverse property: containedInPlace. */
769
+ containedInPlace?: PlaceLeaf;
770
+ /** Represents a relationship between two geometries (or the places they represent), relating a containing geometry to a contained geometry. "a contains b iff no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a". As defined in DE-9IM. */
771
+ geoContains?: PlaceLeaf;
772
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in DE-9IM. */
773
+ geoCoveredBy?: PlaceLeaf;
774
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that crosses it: for example, the union of two geometries. As defined in DE-9IM. */
775
+ geoCrosses?: PlaceLeaf;
776
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that disjoints it: for example, a spit or cut in two geometries. As defined in DE-9IM. */
777
+ geoDisjoint?: PlaceLeaf;
778
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that equals it: for example, a point marked by a sign or a symbol. As defined in DE-9IM. */
779
+ geoEquals?: PlaceLeaf;
780
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that has as part(s) that overlap the subject geometry. As defined in DE-9IM. */
781
+ geoIntersects?: PlaceLeaf;
782
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that is within it: for example, the region of spread out of a given geographical area. As defined in DE-9IM. */
783
+ geoOverlaps?: PlaceLeaf;
784
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in DE-9IM. */
785
+ geoTouches?: PlaceLeaf;
786
+ /** Represents a relationship between two geometries (or the places they represent), relating a geometry to another that lies on it. As defined in DE-9IM. */
787
+ geoWithin?: PlaceLeaf;
788
+ }
789
+ export interface FilterToggleValue {
790
+ quantity: number;
791
+ label: string;
792
+ value: string;
793
+ selected: boolean;
794
+ url: string;
795
+ children?: Filter | null;
796
+ }
797
+ export interface FilterRangeValue {
798
+ min: number;
799
+ max: number;
800
+ }
801
+ export interface FilterBase {
802
+ label: string;
803
+ key: string;
804
+ }
805
+ export interface FilterToggle extends FilterBase {
806
+ "@type": "FilterToggle";
807
+ values: FilterToggleValue[];
808
+ quantity: number;
809
+ }
810
+ export interface FilterRange extends FilterBase {
811
+ "@type": "FilterRange";
812
+ values: FilterRangeValue;
813
+ }
814
+ export type Filter = FilterToggle | FilterRange;
815
+ export type SortOption = {
816
+ value: string;
817
+ label: string;
818
+ };
819
+ export interface ProductDetailsPage {
820
+ "@type": "ProductDetailsPage";
821
+ breadcrumbList: BreadcrumbList;
822
+ product: Product;
823
+ seo?: Seo | null;
824
+ }
825
+ export type PageType =
826
+ | "Brand"
827
+ | "Category"
828
+ | "Department"
829
+ | "SubCategory"
830
+ | "Product"
831
+ | "Collection"
832
+ | "Cluster"
833
+ | "Search"
834
+ | "Unknown";
835
+ export interface PageInfo {
836
+ currentPage: number;
837
+ nextPage: string | undefined;
838
+ previousPage: string | undefined;
839
+ records?: number | undefined;
840
+ recordPerPage?: number | undefined;
841
+ pageTypes?: PageType[];
842
+ }
843
+ export interface ProductListingPage {
844
+ "@type": "ProductListingPage";
845
+ breadcrumb: BreadcrumbList;
846
+ filters: Filter[];
847
+ products: Product[];
848
+ pageInfo: PageInfo;
849
+ sortOptions: SortOption[];
850
+ seo?: Seo | null;
851
+ }
852
+ export interface Seo {
853
+ title: string;
854
+ description: string;
855
+ canonical: string;
856
+ noIndexing?: boolean;
857
+ }
858
+ export interface Search {
859
+ term: string;
860
+ href?: string;
861
+ hits?: number;
862
+ facets?: Array<{
863
+ key: string;
864
+ values: string[];
865
+ }>;
866
+ }
867
+ export interface Suggestion {
868
+ searches?: Search[];
869
+ products?: Product[] | null;
870
+ hits?: number;
871
+ }
872
+ /** @titleBy url */
873
+ export interface SiteNavigationElementLeaf {
874
+ /**
875
+ * @ignore
876
+ */
877
+ "@type": "SiteNavigationElement";
878
+ /** An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */
879
+ additionalType?: string;
880
+ /** The identifier property represents any kind of identifier for any kind of {@link https://schema.org/Thing Thing}, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See {@link /docs/datamodel.html#identifierBg background notes} for more details. */
881
+ identifier?: string;
882
+ /** An image of the item. This can be a {@link https://schema.org/URL URL} or a fully described {@link https://schema.org/ImageObject ImageObject}. */
883
+ image?: ImageObject[] | null;
884
+ /** The name of the item. */
885
+ name?: string;
886
+ /** URL of the item. */
887
+ url?: string;
888
+ }
889
+ export interface SiteNavigationElement extends SiteNavigationElementLeaf {
890
+ // TODO: The schema generator is not handling recursive types leading to an infinite loop
891
+ // Lets circunvent this issue by enumerating the max allowed depth
892
+ children?: Array<
893
+ SiteNavigationElementLeaf & {
894
+ children?: Array<
895
+ SiteNavigationElementLeaf & {
896
+ children?: Array<
897
+ SiteNavigationElementLeaf & {
898
+ children?: Array<
899
+ SiteNavigationElementLeaf & {
900
+ children?: SiteNavigationElementLeaf[];
901
+ }
902
+ >;
903
+ }
904
+ >;
905
+ }
906
+ >;
907
+ }
908
+ >;
909
+ }
910
+ /** @deprecated Use SiteNavigationElement instead */
911
+ export interface NavItem {
912
+ label: string;
913
+ href: string;
914
+ image?: {
915
+ src?: string;
916
+ alt?: string;
917
+ };
918
+ }
919
+ /** @deprecated Use SiteNavigationElement instead */
920
+ export interface Navbar extends NavItem {
921
+ // TODO: The schema generator is not handling recursive types leading in a infinite recursion loop
922
+ // deno-lint-ignore no-explicit-any
923
+ children?: any[];
924
+ }
925
+ // deno-lint-ignore no-explicit-any
926
+ export interface IEvent<Params = any> {
927
+ name: string;
928
+ params: Params;
929
+ }
930
+ // 3 letter ISO 4217 - Doc: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
931
+ type Currency = string;
932
+ type Value = number;
933
+ interface WithItemId {
934
+ item_id: string;
935
+ }
936
+ interface WithItemName {
937
+ item_name: string;
938
+ }
939
+ type ItemIdentifier = WithItemId | WithItemName;
940
+ interface AnalyticsItemWithoutIdentifier {
941
+ affiliation?: string;
942
+ coupon?: string;
943
+ discount?: number;
944
+ index?: number;
945
+ item_group_id?: string;
946
+ item_url?: string;
947
+ item_brand?: string;
948
+ item_category?: string;
949
+ item_category2?: string;
950
+ item_category3?: string;
951
+ item_category4?: string;
952
+ item_category5?: string;
953
+ item_list_id?: string;
954
+ item_list_name?: string;
955
+ item_variant?: string;
956
+ location_id?: string;
957
+ price?: Value;
958
+ quantity: number;
959
+ }
960
+ export type AnalyticsItem = AnalyticsItemWithoutIdentifier & ItemIdentifier;
961
+ export interface AddShippingInfoParams {
962
+ currency?: Currency;
963
+ value?: Value;
964
+ coupon?: string;
965
+ shipping_tier?: string;
966
+ items: AnalyticsItem[];
967
+ }
968
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#add_shipping_info */
969
+ export interface AddShippingInfoEvent extends IEvent<AddShippingInfoParams> {
970
+ name: "add_shipping_info";
971
+ }
972
+ export interface AddToCartParams {
973
+ currency?: Currency;
974
+ value?: Value;
975
+ items: AnalyticsItem[];
976
+ }
977
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#add_to_cart */
978
+ export interface AddToCartEvent extends IEvent<AddToCartParams> {
979
+ name: "add_to_cart";
980
+ }
981
+ export interface AddToWishlistParams {
982
+ currency?: Currency;
983
+ value?: Value;
984
+ items: AnalyticsItem[];
985
+ }
986
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#add_to_wishlist */
987
+ export interface AddToWishlistEvent extends IEvent<AddToWishlistParams> {
988
+ name: "add_to_wishlist";
989
+ }
990
+ export interface BeginCheckoutParams {
991
+ currency: Currency;
992
+ value: Value;
993
+ items: AnalyticsItem[];
994
+ coupon?: string;
995
+ }
996
+ /** docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#begin_checkout */
997
+ export interface BeginCheckoutEvent extends IEvent<BeginCheckoutParams> {
998
+ name: "begin_checkout";
999
+ }
1000
+ export interface LoginParams {
1001
+ method?: string;
1002
+ }
1003
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#login */
1004
+ export interface LoginEvent extends IEvent<LoginParams> {
1005
+ name: "login";
1006
+ }
1007
+ export interface RemoveFromCartParams {
1008
+ currency?: Currency;
1009
+ value?: Value;
1010
+ items: AnalyticsItem[];
1011
+ }
1012
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#remove_from_cart */
1013
+ export interface RemoveFromCartEvent extends IEvent<RemoveFromCartParams> {
1014
+ name: "remove_from_cart";
1015
+ }
1016
+ export interface SearchParams {
1017
+ search_term: string;
1018
+ }
1019
+ export interface SearchEvent extends IEvent<SearchParams> {
1020
+ name: "search";
1021
+ }
1022
+ export interface SelectItemParams {
1023
+ item_list_id?: string;
1024
+ item_list_name?: string;
1025
+ items: AnalyticsItem[];
1026
+ }
1027
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#select_item */
1028
+ export interface SelectItemEvent extends IEvent<SelectItemParams> {
1029
+ name: "select_item";
1030
+ }
1031
+ export interface SelectPromotionParams {
1032
+ creative_name?: string;
1033
+ creative_slot?: string;
1034
+ promotion_id?: string;
1035
+ promotion_name?: string;
1036
+ items?: AnalyticsItem[];
1037
+ }
1038
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#select_promotion */
1039
+ export interface SelectPromotionEvent extends IEvent<SelectPromotionParams> {
1040
+ name: "select_promotion";
1041
+ }
1042
+ export interface ViewCartParams {
1043
+ currency: Currency;
1044
+ value: Value;
1045
+ items: AnalyticsItem[];
1046
+ }
1047
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#view_cart */
1048
+ export interface ViewCartEvent extends IEvent<ViewCartParams> {
1049
+ name: "view_cart";
1050
+ }
1051
+ export interface ViewItemParams {
1052
+ currency?: Currency;
1053
+ value?: Value;
1054
+ items: AnalyticsItem[];
1055
+ }
1056
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#view_item */
1057
+ export interface ViewItemEvent extends IEvent<ViewItemParams> {
1058
+ name: "view_item";
1059
+ }
1060
+ export interface ViewItemListParams {
1061
+ item_list_id?: string;
1062
+ item_list_name?: string;
1063
+ items: AnalyticsItem[];
1064
+ }
1065
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#view_item_list */
1066
+ export interface ViewItemListEvent extends IEvent<ViewItemListParams> {
1067
+ name: "view_item_list";
1068
+ }
1069
+ export interface ViewPromotionParams {
1070
+ creative_name?: string;
1071
+ creative_slot?: string;
1072
+ promotion_id?: string;
1073
+ promotion_name?: string;
1074
+ items?: AnalyticsItem[];
1075
+ }
1076
+ /** @docs https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtm#view_promotion */
1077
+ export interface ViewPromotionEvent extends IEvent<ViewPromotionParams> {
1078
+ name: "view_promotion";
1079
+ }
1080
+ export interface Page {
1081
+ id: string | number;
1082
+ pathTemplate?: string;
1083
+ }
1084
+ export interface Deco {
1085
+ flags: Flag[];
1086
+ page: Page;
1087
+ }
1088
+ export interface DecoEvent extends IEvent<Deco> {
1089
+ name: "deco";
1090
+ }
1091
+ export type AnalyticsEvent =
1092
+ | AddShippingInfoEvent
1093
+ | AddToCartEvent
1094
+ | AddToWishlistEvent
1095
+ | BeginCheckoutEvent
1096
+ | LoginEvent
1097
+ | RemoveFromCartEvent
1098
+ | SearchEvent
1099
+ | SelectItemEvent
1100
+ | SelectPromotionEvent
1101
+ | ViewCartEvent
1102
+ | ViewItemEvent
1103
+ | ViewItemListEvent
1104
+ | ViewPromotionEvent
1105
+ | DecoEvent;