schemaorg-kit 1.0.1 → 1.1.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/README.md +8 -4
- package/dist/index.d.mts +56571 -24690
- package/dist/index.d.ts +56571 -24690
- package/dist/index.js +1282 -931
- package/dist/index.mjs +1266 -931
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ function makeFactory(schema2) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// src/types/things/Person.ts
|
|
47
|
-
import { z as
|
|
47
|
+
import { z as z6 } from "zod";
|
|
48
48
|
|
|
49
49
|
// src/types/things/Thing.ts
|
|
50
50
|
import { z as z4 } from "zod";
|
|
@@ -123,71 +123,82 @@ function extendThing(type, shape) {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// src/types/shared/InteractionCounter.ts
|
|
127
|
+
import { z as z5 } from "zod";
|
|
128
|
+
var InteractionCounterSchema = z5.object({
|
|
129
|
+
"@type": z5.literal("InteractionCounter").default("InteractionCounter"),
|
|
130
|
+
interactionType: z5.string(),
|
|
131
|
+
// full URL, e.g. "https://schema.org/LikeAction"
|
|
132
|
+
userInteractionCount: z5.number().int().nonnegative()
|
|
133
|
+
});
|
|
134
|
+
|
|
126
135
|
// src/types/things/Person.ts
|
|
127
136
|
var PersonSchema = extendThing("Person", {
|
|
128
|
-
givenName:
|
|
129
|
-
familyName:
|
|
130
|
-
email:
|
|
131
|
-
telephone:
|
|
132
|
-
jobTitle:
|
|
133
|
-
worksFor:
|
|
134
|
-
birthDate:
|
|
137
|
+
givenName: z6.string().optional(),
|
|
138
|
+
familyName: z6.string().optional(),
|
|
139
|
+
email: z6.string().email().optional(),
|
|
140
|
+
telephone: z6.string().optional(),
|
|
141
|
+
jobTitle: z6.string().optional(),
|
|
142
|
+
worksFor: z6.lazy(() => z6.object({ "@type": z6.string(), name: z6.string() })).optional(),
|
|
143
|
+
birthDate: z6.string().optional(),
|
|
135
144
|
// ISO 8601
|
|
136
|
-
gender:
|
|
137
|
-
nationality:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
gender: z6.enum(["Male", "Female", "Unknown"]).optional(),
|
|
146
|
+
nationality: z6.string().optional(),
|
|
147
|
+
interactionStatistic: z6.union([InteractionCounterSchema, z6.array(InteractionCounterSchema)]).optional(),
|
|
148
|
+
agentInteractionStatistic: z6.union([InteractionCounterSchema, z6.array(InteractionCounterSchema)]).optional(),
|
|
149
|
+
address: z6.object({
|
|
150
|
+
"@type": z6.literal("PostalAddress"),
|
|
151
|
+
streetAddress: z6.string().optional(),
|
|
152
|
+
addressLocality: z6.string().optional(),
|
|
153
|
+
addressRegion: z6.string().optional(),
|
|
154
|
+
postalCode: z6.string().optional(),
|
|
155
|
+
addressCountry: z6.string().optional()
|
|
145
156
|
}).optional()
|
|
146
157
|
});
|
|
147
158
|
var createPerson = makeFactory(PersonSchema);
|
|
148
159
|
|
|
149
160
|
// src/types/things/Organization.ts
|
|
150
|
-
import { z as
|
|
161
|
+
import { z as z15 } from "zod";
|
|
151
162
|
|
|
152
163
|
// src/types/shared/PostalAddress.ts
|
|
153
|
-
import { z as
|
|
154
|
-
var PostalAddressSchema =
|
|
155
|
-
"@type":
|
|
156
|
-
streetAddress:
|
|
157
|
-
addressLocality:
|
|
164
|
+
import { z as z7 } from "zod";
|
|
165
|
+
var PostalAddressSchema = z7.object({
|
|
166
|
+
"@type": z7.literal("PostalAddress").default("PostalAddress"),
|
|
167
|
+
streetAddress: z7.string().optional(),
|
|
168
|
+
addressLocality: z7.string().optional(),
|
|
158
169
|
// city
|
|
159
|
-
addressRegion:
|
|
170
|
+
addressRegion: z7.string().optional(),
|
|
160
171
|
// state/province
|
|
161
|
-
postalCode:
|
|
162
|
-
addressCountry:
|
|
172
|
+
postalCode: z7.string().optional(),
|
|
173
|
+
addressCountry: z7.string().optional(),
|
|
163
174
|
// ISO 3166-1 alpha-2, e.g. "US"
|
|
164
|
-
postOfficeBoxNumber:
|
|
175
|
+
postOfficeBoxNumber: z7.string().optional()
|
|
165
176
|
});
|
|
166
177
|
|
|
167
178
|
// src/types/shared/ContactPoint.ts
|
|
168
|
-
import { z as
|
|
169
|
-
var ContactPointSchema =
|
|
170
|
-
"@type":
|
|
171
|
-
telephone:
|
|
172
|
-
contactType:
|
|
179
|
+
import { z as z8 } from "zod";
|
|
180
|
+
var ContactPointSchema = z8.object({
|
|
181
|
+
"@type": z8.literal("ContactPoint").default("ContactPoint"),
|
|
182
|
+
telephone: z8.string().optional(),
|
|
183
|
+
contactType: z8.string().optional(),
|
|
173
184
|
// e.g. "customer support", "sales"
|
|
174
|
-
email:
|
|
175
|
-
areaServed:
|
|
176
|
-
availableLanguage:
|
|
177
|
-
hoursAvailable:
|
|
178
|
-
contactOption:
|
|
185
|
+
email: z8.string().email().optional(),
|
|
186
|
+
areaServed: z8.union([z8.string(), z8.array(z8.string())]).optional(),
|
|
187
|
+
availableLanguage: z8.union([z8.string(), z8.array(z8.string())]).optional(),
|
|
188
|
+
hoursAvailable: z8.string().optional(),
|
|
189
|
+
contactOption: z8.string().optional()
|
|
179
190
|
// e.g. "TollFree", "HearingImpairedSupported"
|
|
180
191
|
});
|
|
181
192
|
|
|
182
193
|
// src/types/shared/Offer.ts
|
|
183
|
-
import { z as
|
|
194
|
+
import { z as z12 } from "zod";
|
|
184
195
|
|
|
185
196
|
// src/types/shared/ShippingDetails.ts
|
|
186
|
-
import { z as
|
|
197
|
+
import { z as z10 } from "zod";
|
|
187
198
|
|
|
188
199
|
// src/types/shared/OpeningHoursSpecification.ts
|
|
189
|
-
import { z as
|
|
190
|
-
var DayOfWeek =
|
|
200
|
+
import { z as z9 } from "zod";
|
|
201
|
+
var DayOfWeek = z9.enum([
|
|
191
202
|
"Monday",
|
|
192
203
|
"Tuesday",
|
|
193
204
|
"Wednesday",
|
|
@@ -196,79 +207,117 @@ var DayOfWeek = z8.enum([
|
|
|
196
207
|
"Saturday",
|
|
197
208
|
"Sunday"
|
|
198
209
|
]);
|
|
199
|
-
var OpeningHoursSpecificationSchema =
|
|
200
|
-
"@type":
|
|
201
|
-
dayOfWeek:
|
|
202
|
-
opens:
|
|
210
|
+
var OpeningHoursSpecificationSchema = z9.object({
|
|
211
|
+
"@type": z9.literal("OpeningHoursSpecification").default("OpeningHoursSpecification"),
|
|
212
|
+
dayOfWeek: z9.union([DayOfWeek, z9.array(DayOfWeek)]),
|
|
213
|
+
opens: z9.string().optional(),
|
|
203
214
|
// "HH:MM:SS" e.g. "09:00:00"
|
|
204
|
-
closes:
|
|
215
|
+
closes: z9.string().optional(),
|
|
205
216
|
// "HH:MM:SS" e.g. "17:00:00"
|
|
206
|
-
validFrom:
|
|
217
|
+
validFrom: z9.string().optional(),
|
|
207
218
|
// ISO 8601 date — for seasonal hours
|
|
208
|
-
validThrough:
|
|
219
|
+
validThrough: z9.string().optional()
|
|
209
220
|
// ISO 8601 date
|
|
210
221
|
});
|
|
211
222
|
|
|
212
223
|
// src/types/shared/ShippingDetails.ts
|
|
213
|
-
var DefinedRegionSchema =
|
|
214
|
-
"@type":
|
|
215
|
-
name:
|
|
224
|
+
var DefinedRegionSchema = z10.object({
|
|
225
|
+
"@type": z10.literal("DefinedRegion").default("DefinedRegion"),
|
|
226
|
+
name: z10.string().optional(),
|
|
216
227
|
/** ISO 3166-1 alpha-2 country code, e.g. "US", "GB" */
|
|
217
|
-
addressCountry:
|
|
228
|
+
addressCountry: z10.string().optional(),
|
|
218
229
|
/** State/province code(s) */
|
|
219
|
-
addressRegion:
|
|
230
|
+
addressRegion: z10.union([z10.string(), z10.array(z10.string())]).optional(),
|
|
220
231
|
/** Postal code prefix(es) */
|
|
221
|
-
postalCodePrefix:
|
|
232
|
+
postalCodePrefix: z10.union([z10.string(), z10.array(z10.string())]).optional(),
|
|
222
233
|
/** Postal code range */
|
|
223
|
-
postalCodeRange:
|
|
224
|
-
postalCodeBegin:
|
|
225
|
-
postalCodeEnd:
|
|
234
|
+
postalCodeRange: z10.object({
|
|
235
|
+
postalCodeBegin: z10.string(),
|
|
236
|
+
postalCodeEnd: z10.string()
|
|
226
237
|
}).optional()
|
|
227
238
|
});
|
|
228
|
-
var QuantitativeDaysSchema =
|
|
229
|
-
"@type":
|
|
230
|
-
minValue:
|
|
231
|
-
maxValue:
|
|
239
|
+
var QuantitativeDaysSchema = z10.object({
|
|
240
|
+
"@type": z10.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
241
|
+
minValue: z10.number().int().nonnegative().optional(),
|
|
242
|
+
maxValue: z10.number().int().nonnegative().optional(),
|
|
232
243
|
/** Unit code — always "DAY" for delivery times */
|
|
233
|
-
unitCode:
|
|
244
|
+
unitCode: z10.string().default("DAY")
|
|
234
245
|
});
|
|
235
|
-
var ShippingDeliveryTimeSchema =
|
|
236
|
-
"@type":
|
|
246
|
+
var ShippingDeliveryTimeSchema = z10.object({
|
|
247
|
+
"@type": z10.literal("ShippingDeliveryTime").default("ShippingDeliveryTime"),
|
|
237
248
|
/** Days the warehouse processes orders (e.g. Mon–Fri) */
|
|
238
|
-
businessDays:
|
|
239
|
-
"@type":
|
|
240
|
-
dayOfWeek:
|
|
249
|
+
businessDays: z10.object({
|
|
250
|
+
"@type": z10.literal("OpeningHoursSpecification").default("OpeningHoursSpecification"),
|
|
251
|
+
dayOfWeek: z10.union([DayOfWeek, z10.array(DayOfWeek)])
|
|
241
252
|
}).optional(),
|
|
242
253
|
/** Order processing/packing time in days */
|
|
243
254
|
handlingTime: QuantitativeDaysSchema.optional(),
|
|
244
255
|
/** Transit time in days after dispatch */
|
|
245
256
|
transitTime: QuantitativeDaysSchema.optional(),
|
|
246
257
|
/** Cutoff time for same-day processing, ISO 8601 time, e.g. "14:00:00" */
|
|
247
|
-
cutoffTime:
|
|
258
|
+
cutoffTime: z10.string().optional()
|
|
248
259
|
});
|
|
249
|
-
var OfferShippingDetailsSchema =
|
|
250
|
-
"@type":
|
|
260
|
+
var OfferShippingDetailsSchema = z10.object({
|
|
261
|
+
"@type": z10.literal("OfferShippingDetails").default("OfferShippingDetails"),
|
|
251
262
|
/** Shipping cost as a MonetaryAmount (use value: 0 for free shipping) */
|
|
252
|
-
shippingRate:
|
|
253
|
-
"@type":
|
|
254
|
-
value:
|
|
255
|
-
currency:
|
|
263
|
+
shippingRate: z10.object({
|
|
264
|
+
"@type": z10.literal("MonetaryAmount").default("MonetaryAmount"),
|
|
265
|
+
value: z10.number(),
|
|
266
|
+
currency: z10.string()
|
|
256
267
|
}).optional(),
|
|
257
268
|
/** Region(s) this shipping option applies to */
|
|
258
|
-
shippingDestination:
|
|
269
|
+
shippingDestination: z10.union([
|
|
259
270
|
DefinedRegionSchema,
|
|
260
|
-
|
|
271
|
+
z10.array(DefinedRegionSchema)
|
|
261
272
|
]).optional(),
|
|
262
273
|
/** Expected delivery time */
|
|
263
274
|
deliveryTime: ShippingDeliveryTimeSchema.optional(),
|
|
264
275
|
/** Set to true to indicate item cannot be shipped to a destination */
|
|
265
|
-
doesNotShip:
|
|
276
|
+
doesNotShip: z10.boolean().optional(),
|
|
266
277
|
/** Human-readable shipping label, e.g. "Free Shipping", "Express Delivery" */
|
|
267
|
-
shippingLabel:
|
|
278
|
+
shippingLabel: z10.string().optional()
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
// src/types/shared/MonetaryAmount.ts
|
|
282
|
+
import { z as z11 } from "zod";
|
|
283
|
+
var MonetaryAmountSchema = z11.object({
|
|
284
|
+
"@type": z11.literal("MonetaryAmount").default("MonetaryAmount"),
|
|
285
|
+
currency: z11.string().length(3),
|
|
286
|
+
// ISO 4217, e.g. "USD"
|
|
287
|
+
value: z11.union([
|
|
288
|
+
z11.number(),
|
|
289
|
+
z11.object({
|
|
290
|
+
"@type": z11.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
291
|
+
value: z11.number().optional(),
|
|
292
|
+
minValue: z11.number().optional(),
|
|
293
|
+
maxValue: z11.number().optional(),
|
|
294
|
+
unitText: z11.string().optional()
|
|
295
|
+
// e.g. "HOUR", "MONTH", "YEAR"
|
|
296
|
+
})
|
|
297
|
+
]).optional(),
|
|
298
|
+
minValue: z11.number().optional(),
|
|
299
|
+
maxValue: z11.number().optional()
|
|
300
|
+
});
|
|
301
|
+
var PriceSpecificationSchema = z11.object({
|
|
302
|
+
"@type": z11.literal("PriceSpecification").default("PriceSpecification"),
|
|
303
|
+
price: z11.union([z11.number(), z11.string()]),
|
|
304
|
+
priceCurrency: z11.string().length(3),
|
|
305
|
+
// ISO 4217
|
|
306
|
+
minPrice: z11.number().optional(),
|
|
307
|
+
maxPrice: z11.number().optional(),
|
|
308
|
+
validFrom: z11.string().optional(),
|
|
309
|
+
// ISO 8601
|
|
310
|
+
validThrough: z11.string().optional(),
|
|
311
|
+
eligibleQuantity: z11.object({
|
|
312
|
+
"@type": z11.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
313
|
+
value: z11.number().optional(),
|
|
314
|
+
minValue: z11.number().optional(),
|
|
315
|
+
maxValue: z11.number().optional()
|
|
316
|
+
}).optional()
|
|
268
317
|
});
|
|
269
318
|
|
|
270
319
|
// src/types/shared/Offer.ts
|
|
271
|
-
var ItemAvailability =
|
|
320
|
+
var ItemAvailability = z12.enum([
|
|
272
321
|
"InStock",
|
|
273
322
|
"OutOfStock",
|
|
274
323
|
"PreOrder",
|
|
@@ -279,677 +328,900 @@ var ItemAvailability = z10.enum([
|
|
|
279
328
|
"InStoreOnly",
|
|
280
329
|
"BackOrder"
|
|
281
330
|
]).transform((v) => `https://schema.org/${v}`);
|
|
282
|
-
var
|
|
283
|
-
"
|
|
284
|
-
|
|
285
|
-
|
|
331
|
+
var ItemCondition = z12.enum([
|
|
332
|
+
"NewCondition",
|
|
333
|
+
"UsedCondition",
|
|
334
|
+
"RefurbishedCondition",
|
|
335
|
+
"DamagedCondition"
|
|
336
|
+
]).transform((v) => `https://schema.org/${v}`);
|
|
337
|
+
var UnitPriceSpecificationSchema = z12.object({
|
|
338
|
+
"@type": z12.literal("UnitPriceSpecification").default("UnitPriceSpecification"),
|
|
339
|
+
price: z12.union([z12.number(), z12.string()]),
|
|
340
|
+
priceCurrency: z12.string().length(3),
|
|
341
|
+
// ISO 4217
|
|
342
|
+
/** "SRP", "ListPrice", "MinimumAdvertisedPrice", "SalePrice", "InvoicePrice" */
|
|
343
|
+
priceType: z12.string().optional(),
|
|
344
|
+
/** Member tier this price is valid for */
|
|
345
|
+
validForMemberTier: z12.union([z12.string(), z12.object({}).catchall(z12.unknown())]).optional(),
|
|
346
|
+
referenceQuantity: z12.object({
|
|
347
|
+
"@type": z12.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
348
|
+
value: z12.number().optional(),
|
|
349
|
+
unitCode: z12.string().optional(),
|
|
350
|
+
unitText: z12.string().optional()
|
|
351
|
+
}).optional(),
|
|
352
|
+
/** Loyalty points earned */
|
|
353
|
+
membershipPointsEarned: z12.object({
|
|
354
|
+
"@type": z12.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
355
|
+
value: z12.number().optional(),
|
|
356
|
+
unitText: z12.string().optional()
|
|
357
|
+
}).optional(),
|
|
358
|
+
validFrom: z12.string().optional(),
|
|
359
|
+
validThrough: z12.string().optional()
|
|
360
|
+
});
|
|
361
|
+
var MerchantReturnPolicySeasonalOverrideSchema = z12.object({
|
|
362
|
+
"@type": z12.literal("MerchantReturnPolicySeasonalOverride").default("MerchantReturnPolicySeasonalOverride"),
|
|
363
|
+
startDate: z12.string().optional(),
|
|
364
|
+
// ISO 8601
|
|
365
|
+
endDate: z12.string().optional(),
|
|
366
|
+
// ISO 8601
|
|
367
|
+
returnPolicyCategory: z12.string().optional(),
|
|
368
|
+
// schema.org enum URL
|
|
369
|
+
merchantReturnDays: z12.number().int().nonnegative().optional()
|
|
370
|
+
});
|
|
371
|
+
var OfferSchema = z12.object({
|
|
372
|
+
"@type": z12.literal("Offer").default("Offer"),
|
|
373
|
+
price: z12.union([z12.number(), z12.string()]),
|
|
374
|
+
priceCurrency: z12.string().length(3),
|
|
286
375
|
// ISO 4217, e.g. "USD"
|
|
287
376
|
availability: ItemAvailability.optional(),
|
|
288
|
-
|
|
377
|
+
itemCondition: ItemCondition.optional(),
|
|
378
|
+
validFrom: z12.string().optional(),
|
|
289
379
|
// ISO 8601
|
|
290
|
-
validThrough:
|
|
380
|
+
validThrough: z12.string().optional(),
|
|
291
381
|
// ISO 8601
|
|
292
|
-
url:
|
|
293
|
-
seller:
|
|
294
|
-
category:
|
|
295
|
-
inventoryLevel:
|
|
296
|
-
"@type":
|
|
297
|
-
value:
|
|
382
|
+
url: z12.string().url().optional(),
|
|
383
|
+
seller: z12.object({ "@type": z12.string(), name: z12.string() }).optional(),
|
|
384
|
+
category: z12.string().optional(),
|
|
385
|
+
inventoryLevel: z12.object({
|
|
386
|
+
"@type": z12.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
387
|
+
value: z12.number()
|
|
298
388
|
}).optional(),
|
|
299
|
-
priceValidUntil:
|
|
389
|
+
priceValidUntil: z12.string().optional(),
|
|
300
390
|
// ISO 8601 date — Google Product requirement
|
|
301
|
-
|
|
391
|
+
priceSpecification: z12.union([
|
|
392
|
+
UnitPriceSpecificationSchema,
|
|
393
|
+
z12.array(UnitPriceSpecificationSchema)
|
|
394
|
+
]).optional(),
|
|
395
|
+
shippingDetails: z12.union([
|
|
302
396
|
OfferShippingDetailsSchema,
|
|
303
|
-
|
|
397
|
+
z12.array(OfferShippingDetailsSchema)
|
|
304
398
|
]).optional(),
|
|
305
|
-
hasMerchantReturnPolicy:
|
|
306
|
-
() =>
|
|
399
|
+
hasMerchantReturnPolicy: z12.lazy(
|
|
400
|
+
() => z12.object({ "@type": z12.string() }).catchall(z12.unknown())
|
|
307
401
|
).optional()
|
|
308
402
|
});
|
|
309
|
-
var MerchantReturnPolicySchema =
|
|
310
|
-
"@type":
|
|
311
|
-
applicableCountry:
|
|
312
|
-
returnPolicyCategory:
|
|
403
|
+
var MerchantReturnPolicySchema = z12.object({
|
|
404
|
+
"@type": z12.literal("MerchantReturnPolicy").default("MerchantReturnPolicy"),
|
|
405
|
+
applicableCountry: z12.union([z12.string(), z12.array(z12.string())]).optional(),
|
|
406
|
+
returnPolicyCategory: z12.string().optional(),
|
|
407
|
+
// schema.org enum URL
|
|
408
|
+
merchantReturnDays: z12.number().int().nonnegative().optional(),
|
|
409
|
+
returnMethod: z12.string().optional(),
|
|
313
410
|
// schema.org enum URL
|
|
314
|
-
|
|
315
|
-
returnMethod: z10.string().optional(),
|
|
411
|
+
returnFees: z12.string().optional(),
|
|
316
412
|
// schema.org enum URL
|
|
317
|
-
|
|
413
|
+
refundType: z12.string().optional(),
|
|
318
414
|
// schema.org enum URL
|
|
319
|
-
|
|
415
|
+
// Additional Google Merchant Listing fields
|
|
416
|
+
merchantReturnLink: z12.string().url().optional(),
|
|
417
|
+
returnShippingFeesAmount: MonetaryAmountSchema.optional(),
|
|
418
|
+
itemCondition: z12.union([ItemCondition, z12.array(ItemCondition)]).optional(),
|
|
419
|
+
returnLabelSource: z12.string().optional(),
|
|
320
420
|
// schema.org enum URL
|
|
421
|
+
returnPolicyCountry: z12.string().optional(),
|
|
422
|
+
// ISO 3166-1 alpha-2
|
|
423
|
+
restockingFee: z12.union([MonetaryAmountSchema, z12.number()]).optional(),
|
|
424
|
+
returnPolicySeasonalOverride: z12.union([
|
|
425
|
+
MerchantReturnPolicySeasonalOverrideSchema,
|
|
426
|
+
z12.array(MerchantReturnPolicySeasonalOverrideSchema)
|
|
427
|
+
]).optional(),
|
|
428
|
+
// Customer remorse return fields
|
|
429
|
+
customerRemorseReturnFees: z12.string().optional(),
|
|
430
|
+
// schema.org enum URL
|
|
431
|
+
customerRemorseReturnLabelSource: z12.string().optional(),
|
|
432
|
+
// schema.org enum URL
|
|
433
|
+
customerRemorseReturnShippingFeesAmount: MonetaryAmountSchema.optional(),
|
|
434
|
+
// Item defect return fields
|
|
435
|
+
itemDefectReturnFees: z12.string().optional(),
|
|
436
|
+
// schema.org enum URL
|
|
437
|
+
itemDefectReturnLabelSource: z12.string().optional(),
|
|
438
|
+
// schema.org enum URL
|
|
439
|
+
itemDefectReturnShippingFeesAmount: MonetaryAmountSchema.optional()
|
|
321
440
|
});
|
|
322
441
|
var createOffer = makeFactory(OfferSchema);
|
|
323
|
-
var AggregateOfferSchema =
|
|
324
|
-
"@type":
|
|
325
|
-
lowPrice:
|
|
326
|
-
highPrice:
|
|
327
|
-
priceCurrency:
|
|
442
|
+
var AggregateOfferSchema = z12.object({
|
|
443
|
+
"@type": z12.literal("AggregateOffer").default("AggregateOffer"),
|
|
444
|
+
lowPrice: z12.number().optional(),
|
|
445
|
+
highPrice: z12.number().optional(),
|
|
446
|
+
priceCurrency: z12.string().length(3).optional(),
|
|
328
447
|
// ISO 4217
|
|
329
|
-
offerCount:
|
|
330
|
-
offers:
|
|
448
|
+
offerCount: z12.number().int().nonnegative().optional(),
|
|
449
|
+
offers: z12.union([OfferSchema, z12.array(OfferSchema)]).optional(),
|
|
331
450
|
availability: ItemAvailability.optional(),
|
|
332
|
-
url:
|
|
451
|
+
url: z12.string().url().optional()
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
// src/types/shared/MemberProgram.ts
|
|
455
|
+
import { z as z13 } from "zod";
|
|
456
|
+
var MemberProgramTierSchema = z13.object({
|
|
457
|
+
"@type": z13.literal("MemberProgramTier").default("MemberProgramTier"),
|
|
458
|
+
name: z13.string(),
|
|
459
|
+
hasTierBenefit: z13.union([z13.string(), z13.array(z13.string())]),
|
|
460
|
+
hasTierRequirement: z13.union([z13.string(), z13.object({}).catchall(z13.unknown())]).optional(),
|
|
461
|
+
membershipPointsEarned: z13.object({
|
|
462
|
+
"@type": z13.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
463
|
+
value: z13.number().optional(),
|
|
464
|
+
unitText: z13.string().optional()
|
|
465
|
+
}).optional(),
|
|
466
|
+
url: z13.string().url().optional()
|
|
467
|
+
});
|
|
468
|
+
var MemberProgramSchema = z13.object({
|
|
469
|
+
"@type": z13.literal("MemberProgram").default("MemberProgram"),
|
|
470
|
+
name: z13.string(),
|
|
471
|
+
description: z13.string().optional(),
|
|
472
|
+
hasTiers: z13.union([MemberProgramTierSchema, z13.array(MemberProgramTierSchema)]).optional(),
|
|
473
|
+
url: z13.string().url().optional()
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
// src/types/shared/ShippingService.ts
|
|
477
|
+
import { z as z14 } from "zod";
|
|
478
|
+
var ServicePeriodSchema = z14.object({
|
|
479
|
+
"@type": z14.literal("ServicePeriod").default("ServicePeriod"),
|
|
480
|
+
businessDays: z14.object({
|
|
481
|
+
"@type": z14.literal("OpeningHoursSpecification").default("OpeningHoursSpecification"),
|
|
482
|
+
dayOfWeek: z14.union([DayOfWeek, z14.array(DayOfWeek)])
|
|
483
|
+
}).optional(),
|
|
484
|
+
/** Order cutoff time (ISO 8601), e.g. "14:00:00-05:00" */
|
|
485
|
+
cutoffTime: z14.string().optional(),
|
|
486
|
+
/** ISO 8601 duration, e.g. "P3D" for 3 days */
|
|
487
|
+
duration: z14.string().optional()
|
|
488
|
+
});
|
|
489
|
+
var ShippingConditionsSchema = z14.object({
|
|
490
|
+
"@type": z14.literal("ShippingConditions").default("ShippingConditions"),
|
|
491
|
+
/** Shipping cost */
|
|
492
|
+
shippingRate: MonetaryAmountSchema.optional(),
|
|
493
|
+
/** Region(s) this condition applies to */
|
|
494
|
+
shippingDestination: z14.union([DefinedRegionSchema, z14.array(DefinedRegionSchema)]).optional(),
|
|
495
|
+
/** Region(s) shipment originates from */
|
|
496
|
+
shippingOrigin: z14.union([DefinedRegionSchema, z14.array(DefinedRegionSchema)]).optional(),
|
|
497
|
+
/** Delivery time details */
|
|
498
|
+
deliveryTime: z14.object({
|
|
499
|
+
"@type": z14.literal("ShippingDeliveryTime").default("ShippingDeliveryTime"),
|
|
500
|
+
handlingTime: z14.object({
|
|
501
|
+
"@type": z14.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
502
|
+
minValue: z14.number().int().nonnegative().optional(),
|
|
503
|
+
maxValue: z14.number().int().nonnegative().optional(),
|
|
504
|
+
unitCode: z14.string().default("DAY")
|
|
505
|
+
}).optional(),
|
|
506
|
+
transitTime: z14.object({
|
|
507
|
+
"@type": z14.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
508
|
+
minValue: z14.number().int().nonnegative().optional(),
|
|
509
|
+
maxValue: z14.number().int().nonnegative().optional(),
|
|
510
|
+
unitCode: z14.string().default("DAY")
|
|
511
|
+
}).optional()
|
|
512
|
+
}).optional(),
|
|
513
|
+
/** Set to true to indicate item cannot be shipped to destination */
|
|
514
|
+
doesNotShip: z14.boolean().optional(),
|
|
515
|
+
/** Minimum order value for this condition */
|
|
516
|
+
orderValue: MonetaryAmountSchema.optional(),
|
|
517
|
+
/** Number of items constraint */
|
|
518
|
+
numItems: z14.object({
|
|
519
|
+
"@type": z14.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
520
|
+
minValue: z14.number().optional(),
|
|
521
|
+
maxValue: z14.number().optional()
|
|
522
|
+
}).optional(),
|
|
523
|
+
/** Weight constraint */
|
|
524
|
+
weight: z14.object({
|
|
525
|
+
"@type": z14.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
526
|
+
value: z14.number().optional(),
|
|
527
|
+
maxValue: z14.number().optional(),
|
|
528
|
+
unitCode: z14.string().optional()
|
|
529
|
+
}).optional()
|
|
530
|
+
});
|
|
531
|
+
var ShippingServiceSchema = z14.object({
|
|
532
|
+
"@type": z14.literal("ShippingService").default("ShippingService"),
|
|
533
|
+
name: z14.string().optional(),
|
|
534
|
+
description: z14.string().optional(),
|
|
535
|
+
shippingConditions: z14.union([ShippingConditionsSchema, z14.array(ShippingConditionsSchema)]).optional(),
|
|
536
|
+
handlingTime: ServicePeriodSchema.optional(),
|
|
537
|
+
/** "Delivery" | "Pickup" | "DigitalDelivery" */
|
|
538
|
+
fulfillmentType: z14.string().optional(),
|
|
539
|
+
/** Member tier this service is valid for */
|
|
540
|
+
validForMemberTier: z14.union([z14.string(), z14.object({}).catchall(z14.unknown())]).optional()
|
|
333
541
|
});
|
|
334
542
|
|
|
335
543
|
// src/types/things/Organization.ts
|
|
336
|
-
var NestedOrgRef =
|
|
337
|
-
() =>
|
|
544
|
+
var NestedOrgRef = z15.lazy(
|
|
545
|
+
() => z15.object({ "@type": z15.string(), name: z15.string().optional() }).catchall(z15.unknown())
|
|
338
546
|
);
|
|
339
547
|
var OrganizationSchema = extendThing("Organization", {
|
|
340
|
-
legalName:
|
|
341
|
-
email:
|
|
342
|
-
telephone:
|
|
548
|
+
legalName: z15.string().optional(),
|
|
549
|
+
email: z15.email().optional(),
|
|
550
|
+
telephone: z15.string().optional(),
|
|
343
551
|
logo: ImageOrUrl.optional(),
|
|
344
|
-
foundingDate:
|
|
552
|
+
foundingDate: z15.string().optional(),
|
|
345
553
|
// ISO 8601 date
|
|
346
|
-
numberOfEmployees:
|
|
347
|
-
"@type":
|
|
348
|
-
value:
|
|
554
|
+
numberOfEmployees: z15.object({
|
|
555
|
+
"@type": z15.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
556
|
+
value: z15.number()
|
|
349
557
|
}).optional(),
|
|
350
|
-
address:
|
|
351
|
-
contactPoint:
|
|
558
|
+
address: z15.union([z15.string(), PostalAddressSchema]).optional(),
|
|
559
|
+
contactPoint: z15.union([ContactPointSchema, z15.array(ContactPointSchema)]).optional(),
|
|
352
560
|
// Google Organization requirements:
|
|
353
|
-
vatID:
|
|
354
|
-
iso6523Code:
|
|
561
|
+
vatID: z15.string().optional(),
|
|
562
|
+
iso6523Code: z15.string().optional(),
|
|
355
563
|
// e.g. "0060:123456789" (DUNS)
|
|
356
|
-
taxID:
|
|
357
|
-
leiCode:
|
|
358
|
-
duns:
|
|
564
|
+
taxID: z15.string().optional(),
|
|
565
|
+
leiCode: z15.string().optional(),
|
|
566
|
+
duns: z15.string().optional(),
|
|
567
|
+
globalLocationNumber: z15.string().optional(),
|
|
568
|
+
// GS1 GLN
|
|
569
|
+
naics: z15.string().optional(),
|
|
570
|
+
// NAICS industry code
|
|
359
571
|
// Merchant-related (Google seller identity signals):
|
|
360
572
|
hasMerchantReturnPolicy: MerchantReturnPolicySchema.optional(),
|
|
361
|
-
hasShippingService:
|
|
362
|
-
|
|
363
|
-
).optional(),
|
|
573
|
+
hasShippingService: z15.union([ShippingServiceSchema, z15.array(ShippingServiceSchema)]).optional(),
|
|
574
|
+
// Loyalty program:
|
|
575
|
+
hasMemberProgram: z15.union([MemberProgramSchema, z15.array(MemberProgramSchema)]).optional(),
|
|
576
|
+
// Interaction statistics:
|
|
577
|
+
interactionStatistic: z15.union([InteractionCounterSchema, z15.array(InteractionCounterSchema)]).optional(),
|
|
578
|
+
agentInteractionStatistic: z15.union([InteractionCounterSchema, z15.array(InteractionCounterSchema)]).optional(),
|
|
364
579
|
// Hierarchical organization (loose refs to avoid circular type inference):
|
|
365
580
|
subOrganization: NestedOrgRef.optional(),
|
|
366
581
|
parentOrganization: NestedOrgRef.optional(),
|
|
367
|
-
sameAs:
|
|
582
|
+
sameAs: z15.union([z15.string().url(), z15.array(z15.string().url())]).optional()
|
|
368
583
|
});
|
|
369
584
|
var createOrganization = makeFactory(OrganizationSchema);
|
|
370
585
|
var createNGO = makeFactory(
|
|
371
|
-
OrganizationSchema.extend({ "@type":
|
|
586
|
+
OrganizationSchema.extend({ "@type": z15.literal("NGO").default("NGO") })
|
|
372
587
|
);
|
|
373
588
|
var createCorporation = makeFactory(
|
|
374
|
-
OrganizationSchema.extend({ "@type":
|
|
589
|
+
OrganizationSchema.extend({ "@type": z15.literal("Corporation").default("Corporation") })
|
|
375
590
|
);
|
|
376
591
|
var createOnlineStore = makeFactory(
|
|
377
|
-
OrganizationSchema.extend({ "@type":
|
|
592
|
+
OrganizationSchema.extend({ "@type": z15.literal("OnlineStore").default("OnlineStore") })
|
|
378
593
|
);
|
|
379
594
|
var createOnlineBusiness = makeFactory(
|
|
380
|
-
OrganizationSchema.extend({ "@type":
|
|
595
|
+
OrganizationSchema.extend({ "@type": z15.literal("OnlineBusiness").default("OnlineBusiness") })
|
|
381
596
|
);
|
|
382
597
|
|
|
383
598
|
// src/types/things/Product.ts
|
|
384
|
-
import { z as
|
|
599
|
+
import { z as z17 } from "zod";
|
|
385
600
|
|
|
386
601
|
// src/types/shared/Rating.ts
|
|
387
|
-
import { z as
|
|
388
|
-
var RatingSchema =
|
|
389
|
-
"@type":
|
|
390
|
-
ratingValue:
|
|
391
|
-
bestRating:
|
|
392
|
-
worstRating:
|
|
393
|
-
ratingExplanation:
|
|
394
|
-
reviewAspect:
|
|
395
|
-
});
|
|
396
|
-
var AggregateRatingSchema =
|
|
397
|
-
"@type":
|
|
398
|
-
ratingValue:
|
|
399
|
-
reviewCount:
|
|
400
|
-
ratingCount:
|
|
401
|
-
bestRating:
|
|
402
|
-
worstRating:
|
|
403
|
-
});
|
|
404
|
-
var ReviewSchema =
|
|
405
|
-
"@type":
|
|
406
|
-
reviewBody:
|
|
602
|
+
import { z as z16 } from "zod";
|
|
603
|
+
var RatingSchema = z16.object({
|
|
604
|
+
"@type": z16.literal("Rating").default("Rating"),
|
|
605
|
+
ratingValue: z16.union([z16.number(), z16.string()]),
|
|
606
|
+
bestRating: z16.union([z16.number(), z16.string()]).default(5),
|
|
607
|
+
worstRating: z16.union([z16.number(), z16.string()]).default(1),
|
|
608
|
+
ratingExplanation: z16.string().optional(),
|
|
609
|
+
reviewAspect: z16.string().optional()
|
|
610
|
+
});
|
|
611
|
+
var AggregateRatingSchema = z16.object({
|
|
612
|
+
"@type": z16.literal("AggregateRating").default("AggregateRating"),
|
|
613
|
+
ratingValue: z16.union([z16.number(), z16.string()]),
|
|
614
|
+
reviewCount: z16.number().int().nonnegative().optional(),
|
|
615
|
+
ratingCount: z16.number().int().nonnegative().optional(),
|
|
616
|
+
bestRating: z16.union([z16.number(), z16.string()]).default(5),
|
|
617
|
+
worstRating: z16.union([z16.number(), z16.string()]).default(1)
|
|
618
|
+
});
|
|
619
|
+
var ReviewSchema = z16.object({
|
|
620
|
+
"@type": z16.literal("Review").default("Review"),
|
|
621
|
+
reviewBody: z16.string().optional(),
|
|
407
622
|
reviewRating: RatingSchema.optional(),
|
|
408
623
|
author: PersonOrOrgRef,
|
|
409
|
-
datePublished:
|
|
624
|
+
datePublished: z16.string().optional(),
|
|
410
625
|
// ISO 8601 date
|
|
411
626
|
publisher: PersonOrOrgRef.optional(),
|
|
412
627
|
// itemReviewed: any Thing — kept loose to avoid circular imports
|
|
413
|
-
itemReviewed:
|
|
414
|
-
() =>
|
|
628
|
+
itemReviewed: z16.lazy(
|
|
629
|
+
() => z16.object({ "@type": z16.string() }).passthrough()
|
|
415
630
|
).optional(),
|
|
416
|
-
name:
|
|
631
|
+
name: z16.string().optional(),
|
|
417
632
|
// Review headline
|
|
418
|
-
url:
|
|
633
|
+
url: z16.string().url().optional(),
|
|
634
|
+
/** ISO 8601 DateTime — required for French vacation rental reviews */
|
|
635
|
+
contentReferenceTime: z16.string().optional()
|
|
419
636
|
});
|
|
420
637
|
var EmployerAggregateRatingSchema = AggregateRatingSchema.extend({
|
|
421
|
-
"@type":
|
|
422
|
-
itemReviewed:
|
|
423
|
-
() =>
|
|
638
|
+
"@type": z16.literal("EmployerAggregateRating").default("EmployerAggregateRating"),
|
|
639
|
+
itemReviewed: z16.lazy(
|
|
640
|
+
() => z16.object({ "@type": z16.string(), name: z16.string() }).passthrough()
|
|
424
641
|
).optional()
|
|
425
642
|
});
|
|
426
643
|
|
|
427
644
|
// src/types/things/Product.ts
|
|
428
|
-
var CertificationSchema =
|
|
429
|
-
"@type":
|
|
430
|
-
name:
|
|
431
|
-
url:
|
|
432
|
-
issuedBy:
|
|
433
|
-
"@type":
|
|
434
|
-
name:
|
|
435
|
-
url:
|
|
645
|
+
var CertificationSchema = z17.object({
|
|
646
|
+
"@type": z17.literal("Certification").default("Certification"),
|
|
647
|
+
name: z17.string(),
|
|
648
|
+
url: z17.url().optional(),
|
|
649
|
+
issuedBy: z17.object({
|
|
650
|
+
"@type": z17.literal("Organization").default("Organization"),
|
|
651
|
+
name: z17.string(),
|
|
652
|
+
url: z17.url().optional()
|
|
436
653
|
}).optional(),
|
|
437
|
-
certificationRatingValue:
|
|
438
|
-
certificationStatus:
|
|
439
|
-
validFrom:
|
|
440
|
-
validThrough:
|
|
441
|
-
});
|
|
442
|
-
var ThreeDModelSchema =
|
|
443
|
-
"@type":
|
|
444
|
-
contentUrl:
|
|
654
|
+
certificationRatingValue: z17.string().optional(),
|
|
655
|
+
certificationStatus: z17.string().optional(),
|
|
656
|
+
validFrom: z17.string().optional(),
|
|
657
|
+
validThrough: z17.string().optional()
|
|
658
|
+
});
|
|
659
|
+
var ThreeDModelSchema = z17.object({
|
|
660
|
+
"@type": z17.literal("3DModel").default("3DModel"),
|
|
661
|
+
contentUrl: z17.url(),
|
|
445
662
|
/** MIME type, e.g. "model/gltf-binary", "model/gltf+json" */
|
|
446
|
-
encodingFormat:
|
|
447
|
-
name:
|
|
663
|
+
encodingFormat: z17.string().optional(),
|
|
664
|
+
name: z17.string().optional()
|
|
448
665
|
});
|
|
449
|
-
var LooseProductRef =
|
|
450
|
-
() =>
|
|
666
|
+
var LooseProductRef = z17.lazy(
|
|
667
|
+
() => z17.object({ "@type": z17.string() }).catchall(z17.unknown())
|
|
451
668
|
);
|
|
452
|
-
var LooseProductGroupRef =
|
|
453
|
-
() =>
|
|
669
|
+
var LooseProductGroupRef = z17.lazy(
|
|
670
|
+
() => z17.object({ "@type": z17.string() }).catchall(z17.unknown())
|
|
454
671
|
);
|
|
672
|
+
var SizeSpecificationSchema = z17.object({
|
|
673
|
+
"@type": z17.literal("SizeSpecification").default("SizeSpecification"),
|
|
674
|
+
name: z17.string().optional(),
|
|
675
|
+
/** Size system, e.g. "US", "EU", "UK", "JP" */
|
|
676
|
+
sizeSystem: z17.string().optional(),
|
|
677
|
+
/** Size group, e.g. "Petite", "Plus", "Maternity", "Regular", "Tall" */
|
|
678
|
+
sizeGroup: z17.union([z17.string(), z17.array(z17.string())]).optional()
|
|
679
|
+
});
|
|
680
|
+
var PeopleAudienceSchema = z17.object({
|
|
681
|
+
"@type": z17.literal("PeopleAudience").default("PeopleAudience"),
|
|
682
|
+
/** "Male", "Female", "Unknown" */
|
|
683
|
+
suggestedGender: z17.string().optional(),
|
|
684
|
+
suggestedMinAge: z17.number().optional(),
|
|
685
|
+
suggestedMaxAge: z17.number().optional()
|
|
686
|
+
});
|
|
455
687
|
var ProductSchema = extendThing("Product", {
|
|
456
|
-
sku:
|
|
688
|
+
sku: z17.string().optional(),
|
|
457
689
|
// GTIN identifiers (Google Product requirement):
|
|
458
|
-
gtin:
|
|
459
|
-
gtin8:
|
|
460
|
-
gtin12:
|
|
461
|
-
gtin13:
|
|
462
|
-
gtin14:
|
|
463
|
-
mpn:
|
|
690
|
+
gtin: z17.string().optional(),
|
|
691
|
+
gtin8: z17.string().optional(),
|
|
692
|
+
gtin12: z17.string().optional(),
|
|
693
|
+
gtin13: z17.string().optional(),
|
|
694
|
+
gtin14: z17.string().optional(),
|
|
695
|
+
mpn: z17.string().optional(),
|
|
464
696
|
// Manufacturer Part Number
|
|
465
|
-
brand:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
"@type":
|
|
469
|
-
name:
|
|
697
|
+
brand: z17.union([
|
|
698
|
+
z17.string(),
|
|
699
|
+
z17.object({
|
|
700
|
+
"@type": z17.union([z17.literal("Brand"), z17.literal("Organization")]),
|
|
701
|
+
name: z17.string()
|
|
470
702
|
})
|
|
471
703
|
]).optional(),
|
|
472
|
-
offers:
|
|
704
|
+
offers: z17.union([
|
|
473
705
|
OfferSchema,
|
|
474
706
|
AggregateOfferSchema,
|
|
475
|
-
|
|
707
|
+
z17.array(z17.union([OfferSchema, AggregateOfferSchema]))
|
|
476
708
|
]).optional(),
|
|
477
709
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
478
|
-
review:
|
|
479
|
-
category:
|
|
480
|
-
color:
|
|
481
|
-
material:
|
|
482
|
-
weight:
|
|
483
|
-
"@type":
|
|
484
|
-
value:
|
|
485
|
-
unitCode:
|
|
710
|
+
review: z17.union([ReviewSchema, z17.array(ReviewSchema)]).optional(),
|
|
711
|
+
category: z17.string().optional(),
|
|
712
|
+
color: z17.string().optional(),
|
|
713
|
+
material: z17.string().optional(),
|
|
714
|
+
weight: z17.object({
|
|
715
|
+
"@type": z17.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
716
|
+
value: z17.number(),
|
|
717
|
+
unitCode: z17.string()
|
|
486
718
|
}).optional(),
|
|
487
|
-
image:
|
|
719
|
+
image: z17.union([ImageOrUrl, z17.array(ImageOrUrl)]).optional(),
|
|
488
720
|
hasMerchantReturnPolicy: MerchantReturnPolicySchema.optional(),
|
|
489
721
|
isVariantOf: LooseProductGroupRef.optional(),
|
|
490
722
|
/** Certifications (CE, Energy Star, Fair Trade, etc.) */
|
|
491
|
-
hasCertification:
|
|
723
|
+
hasCertification: z17.union([CertificationSchema, z17.array(CertificationSchema)]).optional(),
|
|
492
724
|
/** 3D models for interactive product views in Google Search/Images */
|
|
493
|
-
subjectOf:
|
|
725
|
+
subjectOf: z17.union([ThreeDModelSchema, z17.array(ThreeDModelSchema)]).optional(),
|
|
726
|
+
/** Pattern design, e.g. "Polka dots", "Stripes" */
|
|
727
|
+
pattern: z17.string().optional(),
|
|
728
|
+
/** Size as a string or structured SizeSpecification */
|
|
729
|
+
size: z17.union([z17.string(), SizeSpecificationSchema]).optional(),
|
|
730
|
+
/** Target audience (gender, age range) */
|
|
731
|
+
audience: PeopleAudienceSchema.optional(),
|
|
732
|
+
/** Positive aspects as an ItemList */
|
|
733
|
+
positiveNotes: z17.object({
|
|
734
|
+
"@type": z17.literal("ItemList").default("ItemList"),
|
|
735
|
+
itemListElement: z17.array(
|
|
736
|
+
z17.object({
|
|
737
|
+
"@type": z17.literal("ListItem").default("ListItem"),
|
|
738
|
+
position: z17.number().int().positive(),
|
|
739
|
+
name: z17.string()
|
|
740
|
+
})
|
|
741
|
+
)
|
|
742
|
+
}).optional(),
|
|
743
|
+
/** Negative aspects as an ItemList */
|
|
744
|
+
negativeNotes: z17.object({
|
|
745
|
+
"@type": z17.literal("ItemList").default("ItemList"),
|
|
746
|
+
itemListElement: z17.array(
|
|
747
|
+
z17.object({
|
|
748
|
+
"@type": z17.literal("ListItem").default("ListItem"),
|
|
749
|
+
position: z17.number().int().positive(),
|
|
750
|
+
name: z17.string()
|
|
751
|
+
})
|
|
752
|
+
)
|
|
753
|
+
}).optional(),
|
|
754
|
+
/** ID of the ProductGroup this variant belongs to */
|
|
755
|
+
inProductGroupWithID: z17.string().optional()
|
|
494
756
|
});
|
|
495
757
|
var ProductGroupSchema = extendThing("ProductGroup", {
|
|
496
|
-
variesBy:
|
|
497
|
-
hasVariant:
|
|
498
|
-
productGroupID:
|
|
499
|
-
sku:
|
|
500
|
-
gtin:
|
|
501
|
-
brand:
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"@type":
|
|
505
|
-
name:
|
|
758
|
+
variesBy: z17.union([z17.string(), z17.array(z17.string())]).optional(),
|
|
759
|
+
hasVariant: z17.array(LooseProductRef).optional(),
|
|
760
|
+
productGroupID: z17.string().optional(),
|
|
761
|
+
sku: z17.string().optional(),
|
|
762
|
+
gtin: z17.string().optional(),
|
|
763
|
+
brand: z17.union([
|
|
764
|
+
z17.string(),
|
|
765
|
+
z17.object({
|
|
766
|
+
"@type": z17.union([z17.literal("Brand"), z17.literal("Organization")]),
|
|
767
|
+
name: z17.string()
|
|
506
768
|
})
|
|
507
769
|
]).optional(),
|
|
508
|
-
offers:
|
|
770
|
+
offers: z17.union([OfferSchema, z17.array(OfferSchema)]).optional(),
|
|
509
771
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
510
|
-
|
|
772
|
+
review: z17.union([ReviewSchema, z17.array(ReviewSchema)]).optional(),
|
|
773
|
+
audience: PeopleAudienceSchema.optional(),
|
|
774
|
+
image: z17.union([ImageOrUrl, z17.array(ImageOrUrl)]).optional()
|
|
511
775
|
});
|
|
512
776
|
var createProduct = makeFactory(ProductSchema);
|
|
513
777
|
var createProductGroup = makeFactory(ProductGroupSchema);
|
|
514
778
|
|
|
515
779
|
// src/types/things/Event.ts
|
|
516
|
-
import { z as
|
|
780
|
+
import { z as z19 } from "zod";
|
|
517
781
|
|
|
518
782
|
// src/types/shared/VideoObject.ts
|
|
519
|
-
import { z as
|
|
520
|
-
var ClipSchema =
|
|
521
|
-
"@type":
|
|
522
|
-
name:
|
|
523
|
-
startOffset:
|
|
783
|
+
import { z as z18 } from "zod";
|
|
784
|
+
var ClipSchema = z18.object({
|
|
785
|
+
"@type": z18.literal("Clip").default("Clip"),
|
|
786
|
+
name: z18.string(),
|
|
787
|
+
startOffset: z18.number(),
|
|
524
788
|
// seconds from start
|
|
525
|
-
endOffset:
|
|
789
|
+
endOffset: z18.number().optional(),
|
|
526
790
|
// seconds from start
|
|
527
|
-
url:
|
|
791
|
+
url: z18.string().url().optional()
|
|
528
792
|
// URL pointing to this clip
|
|
529
793
|
});
|
|
530
|
-
var BroadcastEventSchema =
|
|
531
|
-
"@type":
|
|
532
|
-
isLiveBroadcast:
|
|
533
|
-
startDate:
|
|
794
|
+
var BroadcastEventSchema = z18.object({
|
|
795
|
+
"@type": z18.literal("BroadcastEvent").default("BroadcastEvent"),
|
|
796
|
+
isLiveBroadcast: z18.boolean().optional(),
|
|
797
|
+
startDate: z18.string().optional(),
|
|
534
798
|
// ISO 8601
|
|
535
|
-
endDate:
|
|
799
|
+
endDate: z18.string().optional()
|
|
800
|
+
});
|
|
801
|
+
var SeekToActionSchema = z18.object({
|
|
802
|
+
"@type": z18.literal("SeekToAction").default("SeekToAction"),
|
|
803
|
+
/** URL template with {seek_to_second_number} placeholder */
|
|
804
|
+
target: z18.string(),
|
|
805
|
+
"startOffset-input": z18.string().default("required name=seek_to_second_number")
|
|
536
806
|
});
|
|
537
|
-
var VideoObjectSchema =
|
|
538
|
-
"@type":
|
|
807
|
+
var VideoObjectSchema = z18.object({
|
|
808
|
+
"@type": z18.literal("VideoObject").default("VideoObject"),
|
|
539
809
|
// Required by Google:
|
|
540
|
-
name:
|
|
541
|
-
thumbnailUrl:
|
|
542
|
-
uploadDate:
|
|
810
|
+
name: z18.string(),
|
|
811
|
+
thumbnailUrl: z18.union([z18.string().url(), z18.array(z18.string().url())]),
|
|
812
|
+
uploadDate: z18.string(),
|
|
543
813
|
// ISO 8601 date
|
|
544
814
|
// Recommended by Google:
|
|
545
|
-
description:
|
|
546
|
-
duration:
|
|
815
|
+
description: z18.string().optional(),
|
|
816
|
+
duration: z18.string().optional(),
|
|
547
817
|
// ISO 8601 duration, e.g. "PT1M54S"
|
|
548
|
-
contentUrl:
|
|
549
|
-
embedUrl:
|
|
818
|
+
contentUrl: z18.string().url().optional(),
|
|
819
|
+
embedUrl: z18.string().url().optional(),
|
|
550
820
|
// Optional:
|
|
551
|
-
expires:
|
|
821
|
+
expires: z18.string().optional(),
|
|
552
822
|
// ISO 8601 — when video is no longer available
|
|
553
|
-
hasPart:
|
|
554
|
-
interactionStatistic:
|
|
555
|
-
"@type":
|
|
556
|
-
interactionType:
|
|
557
|
-
userInteractionCount:
|
|
823
|
+
hasPart: z18.array(ClipSchema).optional(),
|
|
824
|
+
interactionStatistic: z18.object({
|
|
825
|
+
"@type": z18.literal("InteractionCounter").default("InteractionCounter"),
|
|
826
|
+
interactionType: z18.literal("https://schema.org/WatchAction").default("https://schema.org/WatchAction"),
|
|
827
|
+
userInteractionCount: z18.number().int().nonnegative()
|
|
558
828
|
}).optional(),
|
|
559
|
-
regionsAllowed:
|
|
560
|
-
ineligibleRegion:
|
|
561
|
-
requiresSubscription:
|
|
562
|
-
isLiveBroadcast:
|
|
829
|
+
regionsAllowed: z18.union([z18.string(), z18.array(z18.string())]).optional(),
|
|
830
|
+
ineligibleRegion: z18.union([z18.string(), z18.array(z18.string())]).optional(),
|
|
831
|
+
requiresSubscription: z18.boolean().optional(),
|
|
832
|
+
isLiveBroadcast: z18.boolean().optional(),
|
|
563
833
|
publication: BroadcastEventSchema.optional(),
|
|
564
|
-
thumbnail: ImageOrUrl.optional()
|
|
834
|
+
thumbnail: ImageOrUrl.optional(),
|
|
835
|
+
/** SeekToAction enables Video key moments via URL template */
|
|
836
|
+
potentialAction: z18.union([SeekToActionSchema, z18.array(SeekToActionSchema)]).optional()
|
|
565
837
|
});
|
|
566
838
|
var createVideoObject = makeFactory(VideoObjectSchema);
|
|
567
839
|
|
|
568
840
|
// src/types/things/Event.ts
|
|
569
|
-
var EventStatusType =
|
|
841
|
+
var EventStatusType = z19.enum([
|
|
570
842
|
"EventScheduled",
|
|
571
843
|
"EventCancelled",
|
|
572
844
|
"EventMovedOnline",
|
|
573
845
|
"EventPostponed",
|
|
574
846
|
"EventRescheduled"
|
|
575
847
|
]).transform((v) => `https://schema.org/${v}`);
|
|
576
|
-
var EventAttendanceMode =
|
|
848
|
+
var EventAttendanceMode = z19.enum([
|
|
577
849
|
"OfflineEventAttendanceMode",
|
|
578
850
|
"OnlineEventAttendanceMode",
|
|
579
851
|
"MixedEventAttendanceMode"
|
|
580
852
|
]).transform((v) => `https://schema.org/${v}`);
|
|
581
|
-
var PlaceRef =
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
"@type":
|
|
585
|
-
name:
|
|
586
|
-
address:
|
|
587
|
-
url:
|
|
853
|
+
var PlaceRef = z19.union([
|
|
854
|
+
z19.string(),
|
|
855
|
+
z19.object({
|
|
856
|
+
"@type": z19.literal("Place"),
|
|
857
|
+
name: z19.string().optional(),
|
|
858
|
+
address: z19.union([z19.string(), PostalAddressSchema]).optional(),
|
|
859
|
+
url: z19.url().optional()
|
|
588
860
|
}),
|
|
589
|
-
|
|
590
|
-
"@type":
|
|
591
|
-
url:
|
|
592
|
-
name:
|
|
861
|
+
z19.object({
|
|
862
|
+
"@type": z19.literal("VirtualLocation"),
|
|
863
|
+
url: z19.url(),
|
|
864
|
+
name: z19.string().optional()
|
|
593
865
|
}),
|
|
594
866
|
PostalAddressSchema
|
|
595
867
|
]);
|
|
596
868
|
var EventSchema = extendThing("Event", {
|
|
597
869
|
// Required by Google:
|
|
598
|
-
name:
|
|
599
|
-
startDate:
|
|
870
|
+
name: z19.string(),
|
|
871
|
+
startDate: z19.string(),
|
|
600
872
|
// ISO 8601
|
|
601
873
|
// Recommended by Google:
|
|
602
|
-
endDate:
|
|
874
|
+
endDate: z19.string().optional(),
|
|
603
875
|
// ISO 8601
|
|
604
876
|
location: PlaceRef.optional(),
|
|
605
877
|
eventStatus: EventStatusType.optional(),
|
|
606
878
|
eventAttendanceMode: EventAttendanceMode.optional(),
|
|
607
|
-
offers:
|
|
608
|
-
performer:
|
|
609
|
-
organizer:
|
|
610
|
-
image:
|
|
611
|
-
description:
|
|
612
|
-
previousStartDate:
|
|
879
|
+
offers: z19.union([OfferSchema, z19.array(OfferSchema)]).optional(),
|
|
880
|
+
performer: z19.union([PersonOrOrgRef, z19.array(PersonOrOrgRef)]).optional(),
|
|
881
|
+
organizer: z19.union([PersonOrOrgRef, z19.array(PersonOrOrgRef)]).optional(),
|
|
882
|
+
image: z19.union([ImageOrUrl, z19.array(ImageOrUrl)]).optional(),
|
|
883
|
+
description: z19.string().optional(),
|
|
884
|
+
previousStartDate: z19.string().optional(),
|
|
613
885
|
// ISO 8601 — for rescheduled events
|
|
614
886
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
615
887
|
// Sub-events:
|
|
616
|
-
subEvent:
|
|
617
|
-
() =>
|
|
888
|
+
subEvent: z19.lazy(
|
|
889
|
+
() => z19.array(z19.object({ "@type": z19.string() }).catchall(z19.unknown()))
|
|
618
890
|
).optional(),
|
|
619
|
-
superEvent:
|
|
620
|
-
() =>
|
|
891
|
+
superEvent: z19.lazy(
|
|
892
|
+
() => z19.object({ "@type": z19.string() }).catchall(z19.unknown())
|
|
621
893
|
).optional(),
|
|
622
894
|
// Additional:
|
|
623
|
-
inLanguage:
|
|
624
|
-
isAccessibleForFree:
|
|
625
|
-
maximumAttendeeCapacity:
|
|
626
|
-
remainingAttendeeCapacity:
|
|
627
|
-
typicalAgeRange:
|
|
895
|
+
inLanguage: z19.union([z19.string(), z19.object({ "@type": z19.literal("Language"), name: z19.string() })]).optional(),
|
|
896
|
+
isAccessibleForFree: z19.boolean().optional(),
|
|
897
|
+
maximumAttendeeCapacity: z19.number().int().nonnegative().optional(),
|
|
898
|
+
remainingAttendeeCapacity: z19.number().int().nonnegative().optional(),
|
|
899
|
+
typicalAgeRange: z19.string().optional(),
|
|
628
900
|
video: VideoObjectSchema.optional()
|
|
629
901
|
});
|
|
630
902
|
var createEvent = makeFactory(EventSchema);
|
|
631
903
|
|
|
632
904
|
// src/types/things/Place.ts
|
|
633
|
-
import { z as
|
|
905
|
+
import { z as z21 } from "zod";
|
|
634
906
|
|
|
635
907
|
// src/types/shared/GeoCoordinates.ts
|
|
636
|
-
import { z as
|
|
637
|
-
var GeoCoordinatesSchema =
|
|
638
|
-
"@type":
|
|
639
|
-
latitude:
|
|
640
|
-
longitude:
|
|
641
|
-
elevation:
|
|
908
|
+
import { z as z20 } from "zod";
|
|
909
|
+
var GeoCoordinatesSchema = z20.object({
|
|
910
|
+
"@type": z20.literal("GeoCoordinates").default("GeoCoordinates"),
|
|
911
|
+
latitude: z20.union([z20.number(), z20.string()]),
|
|
912
|
+
longitude: z20.union([z20.number(), z20.string()]),
|
|
913
|
+
elevation: z20.union([z20.number(), z20.string()]).optional()
|
|
642
914
|
});
|
|
643
915
|
|
|
644
916
|
// src/types/things/Place.ts
|
|
645
917
|
var PlaceSchema = extendThing("Place", {
|
|
646
|
-
address:
|
|
918
|
+
address: z21.union([z21.string(), PostalAddressSchema]).optional(),
|
|
647
919
|
geo: GeoCoordinatesSchema.optional(),
|
|
648
|
-
hasMap:
|
|
649
|
-
photo:
|
|
650
|
-
telephone:
|
|
651
|
-
faxNumber:
|
|
652
|
-
openingHoursSpecification:
|
|
920
|
+
hasMap: z21.url().optional(),
|
|
921
|
+
photo: z21.union([ImageOrUrl, z21.array(ImageOrUrl)]).optional(),
|
|
922
|
+
telephone: z21.string().optional(),
|
|
923
|
+
faxNumber: z21.string().optional(),
|
|
924
|
+
openingHoursSpecification: z21.union([
|
|
653
925
|
OpeningHoursSpecificationSchema,
|
|
654
|
-
|
|
926
|
+
z21.array(OpeningHoursSpecificationSchema)
|
|
655
927
|
]).optional(),
|
|
656
|
-
specialOpeningHoursSpecification:
|
|
928
|
+
specialOpeningHoursSpecification: z21.union([
|
|
657
929
|
OpeningHoursSpecificationSchema,
|
|
658
|
-
|
|
930
|
+
z21.array(OpeningHoursSpecificationSchema)
|
|
659
931
|
]).optional(),
|
|
660
|
-
maximumAttendeeCapacity:
|
|
661
|
-
isAccessibleForFree:
|
|
662
|
-
publicAccess:
|
|
663
|
-
amenityFeature:
|
|
664
|
-
"@type":
|
|
665
|
-
name:
|
|
666
|
-
value:
|
|
932
|
+
maximumAttendeeCapacity: z21.number().int().nonnegative().optional(),
|
|
933
|
+
isAccessibleForFree: z21.boolean().optional(),
|
|
934
|
+
publicAccess: z21.boolean().optional(),
|
|
935
|
+
amenityFeature: z21.array(z21.object({
|
|
936
|
+
"@type": z21.literal("LocationFeatureSpecification").default("LocationFeatureSpecification"),
|
|
937
|
+
name: z21.string(),
|
|
938
|
+
value: z21.union([z21.boolean(), z21.string(), z21.number()])
|
|
667
939
|
})).optional(),
|
|
668
|
-
containedInPlace:
|
|
669
|
-
() =>
|
|
940
|
+
containedInPlace: z21.lazy(
|
|
941
|
+
() => z21.object({ "@type": z21.string(), name: z21.string().optional() }).catchall(z21.unknown())
|
|
670
942
|
).optional()
|
|
671
943
|
});
|
|
672
944
|
var createPlace = makeFactory(PlaceSchema);
|
|
673
945
|
|
|
674
946
|
// src/types/things/LocalBusiness.ts
|
|
675
|
-
import { z as
|
|
947
|
+
import { z as z22 } from "zod";
|
|
676
948
|
var LocalBusinessSchema = PlaceSchema.extend({
|
|
677
|
-
"@type":
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
949
|
+
"@type": z22.union([
|
|
950
|
+
z22.literal("LocalBusiness"),
|
|
951
|
+
z22.literal("Restaurant"),
|
|
952
|
+
z22.literal("Store"),
|
|
953
|
+
z22.literal("FoodEstablishment"),
|
|
954
|
+
z22.literal("HealthAndBeautyBusiness"),
|
|
955
|
+
z22.literal("MedicalBusiness"),
|
|
956
|
+
z22.literal("FinancialService"),
|
|
957
|
+
z22.literal("LegalService"),
|
|
958
|
+
z22.literal("RealEstateAgent"),
|
|
959
|
+
z22.literal("AutoDealer"),
|
|
960
|
+
z22.literal("DaySpa"),
|
|
961
|
+
z22.literal("HairSalon"),
|
|
962
|
+
z22.literal("Hotel"),
|
|
963
|
+
z22.literal("LodgingBusiness"),
|
|
964
|
+
z22.literal("GroceryStore"),
|
|
965
|
+
z22.literal("ShoppingCenter"),
|
|
966
|
+
z22.literal("TravelAgency")
|
|
695
967
|
]).default("LocalBusiness"),
|
|
696
968
|
// Business identity:
|
|
697
|
-
legalName:
|
|
698
|
-
email:
|
|
969
|
+
legalName: z22.string().optional(),
|
|
970
|
+
email: z22.email().optional(),
|
|
699
971
|
logo: ImageOrUrl.optional(),
|
|
700
|
-
contactPoint:
|
|
972
|
+
contactPoint: z22.union([ContactPointSchema, z22.array(ContactPointSchema)]).optional(),
|
|
701
973
|
// Ratings & reviews:
|
|
702
|
-
aggregateRating:
|
|
703
|
-
review:
|
|
974
|
+
aggregateRating: z22.union([AggregateRatingSchema, EmployerAggregateRatingSchema]).optional(),
|
|
975
|
+
review: z22.union([ReviewSchema, z22.array(ReviewSchema)]).optional(),
|
|
704
976
|
// Pricing:
|
|
705
|
-
priceRange:
|
|
977
|
+
priceRange: z22.string().optional(),
|
|
706
978
|
// e.g. "$$$"
|
|
707
|
-
currenciesAccepted:
|
|
708
|
-
paymentAccepted:
|
|
979
|
+
currenciesAccepted: z22.string().optional(),
|
|
980
|
+
paymentAccepted: z22.string().optional(),
|
|
709
981
|
// Food establishment specific:
|
|
710
|
-
servesCuisine:
|
|
711
|
-
hasMenu:
|
|
712
|
-
acceptsReservations:
|
|
982
|
+
servesCuisine: z22.union([z22.string(), z22.array(z22.string())]).optional(),
|
|
983
|
+
hasMenu: z22.url().optional(),
|
|
984
|
+
acceptsReservations: z22.union([z22.boolean(), z22.url()]).optional(),
|
|
713
985
|
// Merchant signals:
|
|
714
|
-
vatID:
|
|
715
|
-
iso6523Code:
|
|
986
|
+
vatID: z22.string().optional(),
|
|
987
|
+
iso6523Code: z22.string().optional(),
|
|
716
988
|
hasMerchantReturnPolicy: MerchantReturnPolicySchema.optional(),
|
|
717
|
-
sameAs:
|
|
989
|
+
sameAs: z22.union([z22.url(), z22.array(z22.url())]).optional(),
|
|
718
990
|
// Departments (nested LocalBusiness):
|
|
719
|
-
department:
|
|
720
|
-
() =>
|
|
721
|
-
|
|
722
|
-
|
|
991
|
+
department: z22.lazy(
|
|
992
|
+
() => z22.union([
|
|
993
|
+
z22.object({ "@type": z22.string() }).catchall(z22.unknown()),
|
|
994
|
+
z22.array(z22.object({ "@type": z22.string() }).catchall(z22.unknown()))
|
|
723
995
|
])
|
|
724
996
|
).optional(),
|
|
725
997
|
// Opening hours in string format (alternative to openingHoursSpecification):
|
|
726
|
-
openingHours:
|
|
998
|
+
openingHours: z22.union([z22.string(), z22.array(z22.string())]).optional()
|
|
727
999
|
});
|
|
728
1000
|
var createLocalBusiness = makeFactory(LocalBusinessSchema);
|
|
729
1001
|
var createRestaurant = makeFactory(
|
|
730
|
-
LocalBusinessSchema.extend({ "@type":
|
|
1002
|
+
LocalBusinessSchema.extend({ "@type": z22.literal("Restaurant").default("Restaurant") })
|
|
731
1003
|
);
|
|
732
1004
|
var createHotel = makeFactory(
|
|
733
|
-
LocalBusinessSchema.extend({ "@type":
|
|
1005
|
+
LocalBusinessSchema.extend({ "@type": z22.literal("Hotel").default("Hotel") })
|
|
734
1006
|
);
|
|
735
1007
|
|
|
736
1008
|
// src/types/things/Movie.ts
|
|
737
|
-
import { z as
|
|
1009
|
+
import { z as z23 } from "zod";
|
|
738
1010
|
var MovieSchema = extendThing("Movie", {
|
|
739
1011
|
// Recommended by Google:
|
|
740
|
-
director:
|
|
741
|
-
actor:
|
|
742
|
-
author:
|
|
1012
|
+
director: z23.union([PersonOrOrgRef, z23.array(PersonOrOrgRef)]).optional(),
|
|
1013
|
+
actor: z23.union([PersonOrOrgRef, z23.array(PersonOrOrgRef)]).optional(),
|
|
1014
|
+
author: z23.union([PersonOrOrgRef, z23.array(PersonOrOrgRef)]).optional(),
|
|
743
1015
|
producer: PersonOrOrgRef.optional(),
|
|
744
1016
|
musicBy: PersonOrOrgRef.optional(),
|
|
745
|
-
duration:
|
|
1017
|
+
duration: z23.string().optional(),
|
|
746
1018
|
// ISO 8601, e.g. "PT2H15M"
|
|
747
|
-
dateCreated:
|
|
1019
|
+
dateCreated: z23.string().optional(),
|
|
748
1020
|
// ISO 8601
|
|
749
|
-
datePublished:
|
|
1021
|
+
datePublished: z23.string().optional(),
|
|
750
1022
|
// ISO 8601
|
|
751
|
-
countryOfOrigin:
|
|
1023
|
+
countryOfOrigin: z23.string().optional(),
|
|
752
1024
|
// ISO 3166
|
|
753
|
-
inLanguage:
|
|
754
|
-
|
|
755
|
-
|
|
1025
|
+
inLanguage: z23.union([
|
|
1026
|
+
z23.string(),
|
|
1027
|
+
z23.object({ "@type": z23.literal("Language"), name: z23.string() })
|
|
756
1028
|
]).optional(),
|
|
757
1029
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
758
|
-
review:
|
|
1030
|
+
review: z23.union([ReviewSchema, z23.array(ReviewSchema)]).optional(),
|
|
759
1031
|
trailer: VideoObjectSchema.optional(),
|
|
760
|
-
image:
|
|
1032
|
+
image: z23.union([ImageOrUrl, z23.array(ImageOrUrl)]).optional(),
|
|
761
1033
|
// Classification:
|
|
762
|
-
contentRating:
|
|
1034
|
+
contentRating: z23.string().optional(),
|
|
763
1035
|
// e.g. "MPAA PG-13"
|
|
764
|
-
genre:
|
|
1036
|
+
genre: z23.union([z23.string(), z23.array(z23.string())]).optional(),
|
|
765
1037
|
// For carousels: itemListElement links
|
|
766
|
-
sameAs:
|
|
1038
|
+
sameAs: z23.union([z23.url(), z23.array(z23.url())]).optional()
|
|
767
1039
|
});
|
|
768
1040
|
var createMovie = makeFactory(MovieSchema);
|
|
769
1041
|
|
|
770
1042
|
// src/types/creative-works/Book.ts
|
|
771
|
-
import { z as
|
|
772
|
-
var BookFormatType =
|
|
1043
|
+
import { z as z24 } from "zod";
|
|
1044
|
+
var BookFormatType = z24.enum([
|
|
773
1045
|
"EBook",
|
|
774
1046
|
"Hardcover",
|
|
775
1047
|
"Paperback",
|
|
776
1048
|
"AudioBook",
|
|
777
1049
|
"GraphicNovel"
|
|
778
1050
|
]);
|
|
779
|
-
var EntryPointSchema =
|
|
780
|
-
"@type":
|
|
1051
|
+
var EntryPointSchema = z24.object({
|
|
1052
|
+
"@type": z24.literal("EntryPoint").default("EntryPoint"),
|
|
781
1053
|
/** URL template with optional {isbn} / {id} placeholder, or a plain URL */
|
|
782
|
-
urlTemplate:
|
|
1054
|
+
urlTemplate: z24.string(),
|
|
783
1055
|
/** MIME type of the action target */
|
|
784
|
-
encodingType:
|
|
1056
|
+
encodingType: z24.string().optional(),
|
|
785
1057
|
/** HTTP method */
|
|
786
|
-
httpMethod:
|
|
1058
|
+
httpMethod: z24.string().optional()
|
|
787
1059
|
});
|
|
788
|
-
var ReadActionSchema =
|
|
789
|
-
"@type":
|
|
1060
|
+
var ReadActionSchema = z24.object({
|
|
1061
|
+
"@type": z24.literal("ReadAction").default("ReadAction"),
|
|
790
1062
|
/** Where the book can be read */
|
|
791
|
-
target:
|
|
1063
|
+
target: z24.union([EntryPointSchema, z24.string()]),
|
|
792
1064
|
/** Offer describing subscription / purchase required to read */
|
|
793
1065
|
expectsAcceptanceOf: OfferSchema.optional()
|
|
794
1066
|
});
|
|
795
|
-
var BorrowActionSchema =
|
|
796
|
-
"@type":
|
|
1067
|
+
var BorrowActionSchema = z24.object({
|
|
1068
|
+
"@type": z24.literal("BorrowAction").default("BorrowAction"),
|
|
797
1069
|
/** Library system or library lending this book */
|
|
798
|
-
lender:
|
|
799
|
-
"@type":
|
|
800
|
-
|
|
801
|
-
|
|
1070
|
+
lender: z24.object({
|
|
1071
|
+
"@type": z24.union([
|
|
1072
|
+
z24.literal("LibrarySystem"),
|
|
1073
|
+
z24.literal("Library")
|
|
802
1074
|
]),
|
|
803
|
-
name:
|
|
804
|
-
url:
|
|
1075
|
+
name: z24.string(),
|
|
1076
|
+
url: z24.url().optional(),
|
|
805
1077
|
/** Unique identifier for the library system */
|
|
806
|
-
"@id":
|
|
1078
|
+
"@id": z24.string().optional()
|
|
807
1079
|
}),
|
|
808
1080
|
/** Where the borrow action is performed */
|
|
809
|
-
target:
|
|
1081
|
+
target: z24.union([EntryPointSchema, z24.string()])
|
|
810
1082
|
});
|
|
811
|
-
var BookEditionSchema =
|
|
812
|
-
"@type":
|
|
1083
|
+
var BookEditionSchema = z24.object({
|
|
1084
|
+
"@type": z24.literal("Book").default("Book"),
|
|
813
1085
|
/** Unique stable URL identifying this edition */
|
|
814
|
-
"@id":
|
|
1086
|
+
"@id": z24.string().optional(),
|
|
815
1087
|
/** Edition title — may differ from the work title */
|
|
816
|
-
name:
|
|
1088
|
+
name: z24.string().optional(),
|
|
817
1089
|
/** Physical/digital format */
|
|
818
1090
|
bookFormat: BookFormatType.optional(),
|
|
819
1091
|
/** BCP 47 language tag, e.g. "en", "fr" */
|
|
820
|
-
inLanguage:
|
|
1092
|
+
inLanguage: z24.string().optional(),
|
|
821
1093
|
/** ISBN-13 preferred; ISBN-10 also accepted */
|
|
822
|
-
isbn:
|
|
1094
|
+
isbn: z24.string().optional(),
|
|
823
1095
|
/** OCLC number (for library systems) */
|
|
824
|
-
sameAs:
|
|
1096
|
+
sameAs: z24.union([z24.string(), z24.array(z24.string())]).optional(),
|
|
825
1097
|
/** Edition number, e.g. "2nd" */
|
|
826
|
-
bookEdition:
|
|
1098
|
+
bookEdition: z24.string().optional(),
|
|
827
1099
|
/** Publication date for this edition */
|
|
828
|
-
datePublished:
|
|
1100
|
+
datePublished: z24.string().optional(),
|
|
829
1101
|
/** Landing page for this edition */
|
|
830
|
-
url:
|
|
1102
|
+
url: z24.url().optional(),
|
|
831
1103
|
/** Authors of this edition (may differ from work author) */
|
|
832
|
-
author:
|
|
1104
|
+
author: z24.union([PersonOrOrgRef, z24.array(PersonOrOrgRef)]).optional(),
|
|
833
1105
|
/** ReadAction or BorrowAction for Google Book Actions */
|
|
834
|
-
potentialAction:
|
|
1106
|
+
potentialAction: z24.union([
|
|
835
1107
|
ReadActionSchema,
|
|
836
1108
|
BorrowActionSchema,
|
|
837
|
-
|
|
1109
|
+
z24.array(z24.union([ReadActionSchema, BorrowActionSchema]))
|
|
838
1110
|
]).optional(),
|
|
839
1111
|
/** Offer — purchase price */
|
|
840
|
-
offers:
|
|
1112
|
+
offers: z24.union([OfferSchema, z24.array(OfferSchema)]).optional()
|
|
841
1113
|
});
|
|
842
|
-
var BookSchema =
|
|
843
|
-
"@type":
|
|
1114
|
+
var BookSchema = z24.object({
|
|
1115
|
+
"@type": z24.literal("Book").default("Book"),
|
|
844
1116
|
/** Stable URL identifying this work */
|
|
845
|
-
"@id":
|
|
846
|
-
name:
|
|
1117
|
+
"@id": z24.string().optional(),
|
|
1118
|
+
name: z24.string(),
|
|
847
1119
|
/** Primary author(s) of the work */
|
|
848
|
-
author:
|
|
1120
|
+
author: z24.union([PersonOrOrgRef, z24.array(PersonOrOrgRef)]),
|
|
849
1121
|
/** Canonical URL for the book's landing page */
|
|
850
|
-
url:
|
|
1122
|
+
url: z24.url().optional(),
|
|
851
1123
|
/** Cover image */
|
|
852
|
-
image:
|
|
853
|
-
description:
|
|
1124
|
+
image: z24.union([ImageOrUrl, z24.array(ImageOrUrl)]).optional(),
|
|
1125
|
+
description: z24.string().optional(),
|
|
854
1126
|
/** ISBN of the primary edition */
|
|
855
|
-
isbn:
|
|
1127
|
+
isbn: z24.string().optional(),
|
|
856
1128
|
/** Same-as links (e.g., Open Library, WorldCat) */
|
|
857
|
-
sameAs:
|
|
1129
|
+
sameAs: z24.union([z24.string(), z24.array(z24.string())]).optional(),
|
|
858
1130
|
/** Specific editions — each may have ReadAction / BorrowAction */
|
|
859
|
-
workExample:
|
|
1131
|
+
workExample: z24.union([BookEditionSchema, z24.array(BookEditionSchema)]).optional(),
|
|
860
1132
|
/** Publisher of the primary edition */
|
|
861
|
-
publisher:
|
|
862
|
-
"@type":
|
|
863
|
-
name:
|
|
864
|
-
url:
|
|
1133
|
+
publisher: z24.object({
|
|
1134
|
+
"@type": z24.union([z24.literal("Organization"), z24.literal("Person")]),
|
|
1135
|
+
name: z24.string(),
|
|
1136
|
+
url: z24.url().optional()
|
|
865
1137
|
}).optional(),
|
|
866
1138
|
/** Number of pages */
|
|
867
|
-
numberOfPages:
|
|
1139
|
+
numberOfPages: z24.number().int().positive().optional(),
|
|
868
1140
|
/** Original publication year */
|
|
869
|
-
datePublished:
|
|
1141
|
+
datePublished: z24.string().optional(),
|
|
870
1142
|
/** Genres */
|
|
871
|
-
genre:
|
|
1143
|
+
genre: z24.union([z24.string(), z24.array(z24.string())]).optional(),
|
|
872
1144
|
/** BCP 47 language tag */
|
|
873
|
-
inLanguage:
|
|
1145
|
+
inLanguage: z24.string().optional(),
|
|
874
1146
|
/** Aggregate rating across editions */
|
|
875
|
-
aggregateRating:
|
|
876
|
-
() =>
|
|
1147
|
+
aggregateRating: z24.lazy(
|
|
1148
|
+
() => z24.object({ "@type": z24.string() }).catchall(z24.unknown())
|
|
877
1149
|
).optional()
|
|
878
1150
|
});
|
|
879
1151
|
var createBook = makeFactory(BookSchema);
|
|
880
1152
|
|
|
881
1153
|
// src/types/creative-works/Article.ts
|
|
882
|
-
import { z as
|
|
1154
|
+
import { z as z26 } from "zod";
|
|
883
1155
|
|
|
884
1156
|
// src/types/creative-works/CreativeWork.ts
|
|
885
|
-
import { z as
|
|
1157
|
+
import { z as z25 } from "zod";
|
|
886
1158
|
var CreativeWorkSchema = extendThing("CreativeWork", {
|
|
887
1159
|
author: PersonOrOrgRef.optional(),
|
|
888
1160
|
publisher: PersonOrOrgRef.optional(),
|
|
889
|
-
datePublished:
|
|
1161
|
+
datePublished: z25.string().optional(),
|
|
890
1162
|
// ISO 8601
|
|
891
|
-
dateModified:
|
|
1163
|
+
dateModified: z25.string().optional(),
|
|
892
1164
|
// ISO 8601
|
|
893
|
-
headline:
|
|
1165
|
+
headline: z25.string().max(110).optional(),
|
|
894
1166
|
// Google recommends max 110 chars
|
|
895
|
-
keywords:
|
|
896
|
-
inLanguage:
|
|
897
|
-
|
|
1167
|
+
keywords: z25.union([z25.string(), z25.array(z25.string())]).optional(),
|
|
1168
|
+
inLanguage: z25.union([
|
|
1169
|
+
z25.string(),
|
|
898
1170
|
// BCP 47, e.g. "en-US"
|
|
899
|
-
|
|
1171
|
+
z25.object({ "@type": z25.literal("Language"), name: z25.string() })
|
|
900
1172
|
]).optional(),
|
|
901
|
-
license:
|
|
902
|
-
thumbnailUrl:
|
|
903
|
-
isAccessibleForFree:
|
|
904
|
-
image:
|
|
1173
|
+
license: z25.url().optional(),
|
|
1174
|
+
thumbnailUrl: z25.url().optional(),
|
|
1175
|
+
isAccessibleForFree: z25.boolean().optional(),
|
|
1176
|
+
image: z25.union([ImageOrUrl, z25.array(ImageOrUrl)]).optional(),
|
|
905
1177
|
// Paywalled content support:
|
|
906
|
-
hasPart:
|
|
907
|
-
"@type":
|
|
908
|
-
isAccessibleForFree:
|
|
909
|
-
cssSelector:
|
|
1178
|
+
hasPart: z25.array(z25.object({
|
|
1179
|
+
"@type": z25.string(),
|
|
1180
|
+
isAccessibleForFree: z25.boolean().optional(),
|
|
1181
|
+
cssSelector: z25.string().optional()
|
|
910
1182
|
})).optional(),
|
|
911
1183
|
// For subscription / paywalled content
|
|
912
|
-
isPartOf:
|
|
913
|
-
"@type":
|
|
914
|
-
name:
|
|
1184
|
+
isPartOf: z25.object({
|
|
1185
|
+
"@type": z25.string(),
|
|
1186
|
+
name: z25.string().optional()
|
|
915
1187
|
}).optional(),
|
|
916
|
-
text:
|
|
917
|
-
abstract:
|
|
918
|
-
encodingFormat:
|
|
1188
|
+
text: z25.string().optional(),
|
|
1189
|
+
abstract: z25.string().optional(),
|
|
1190
|
+
encodingFormat: z25.string().optional(),
|
|
919
1191
|
// MIME type
|
|
920
|
-
contentUrl:
|
|
921
|
-
copyrightYear:
|
|
1192
|
+
contentUrl: z25.url().optional(),
|
|
1193
|
+
copyrightYear: z25.number().int().optional(),
|
|
922
1194
|
copyrightHolder: PersonOrOrgRef.optional()
|
|
923
1195
|
});
|
|
924
1196
|
|
|
925
1197
|
// src/types/creative-works/Article.ts
|
|
926
1198
|
var ArticleSchema = CreativeWorkSchema.extend({
|
|
927
|
-
"@type":
|
|
928
|
-
articleBody:
|
|
929
|
-
articleSection:
|
|
930
|
-
wordCount:
|
|
1199
|
+
"@type": z26.literal("Article").default("Article"),
|
|
1200
|
+
articleBody: z26.string().optional(),
|
|
1201
|
+
articleSection: z26.string().optional(),
|
|
1202
|
+
wordCount: z26.number().int().nonnegative().optional(),
|
|
931
1203
|
// Google Article requires image to be at least 1200px wide
|
|
932
|
-
image:
|
|
933
|
-
video:
|
|
1204
|
+
image: z26.union([ImageOrUrl, z26.array(ImageOrUrl)]).optional(),
|
|
1205
|
+
video: z26.union([VideoObjectSchema, z26.array(VideoObjectSchema)]).optional(),
|
|
934
1206
|
// Speakable for Article (Google Assistant)
|
|
935
|
-
speakable:
|
|
936
|
-
"@type":
|
|
937
|
-
cssSelector:
|
|
938
|
-
xpath:
|
|
1207
|
+
speakable: z26.object({
|
|
1208
|
+
"@type": z26.literal("SpeakableSpecification").default("SpeakableSpecification"),
|
|
1209
|
+
cssSelector: z26.union([z26.string(), z26.array(z26.string())]).optional(),
|
|
1210
|
+
xpath: z26.union([z26.string(), z26.array(z26.string())]).optional()
|
|
939
1211
|
}).optional()
|
|
940
1212
|
});
|
|
941
1213
|
var NewsArticleSchema = ArticleSchema.extend({
|
|
942
|
-
"@type":
|
|
943
|
-
dateline:
|
|
944
|
-
printColumn:
|
|
945
|
-
printEdition:
|
|
946
|
-
printPage:
|
|
947
|
-
printSection:
|
|
1214
|
+
"@type": z26.literal("NewsArticle").default("NewsArticle"),
|
|
1215
|
+
dateline: z26.string().optional(),
|
|
1216
|
+
printColumn: z26.string().optional(),
|
|
1217
|
+
printEdition: z26.string().optional(),
|
|
1218
|
+
printPage: z26.string().optional(),
|
|
1219
|
+
printSection: z26.string().optional()
|
|
948
1220
|
});
|
|
949
1221
|
var BlogPostingSchema = ArticleSchema.extend({
|
|
950
|
-
"@type":
|
|
951
|
-
sharedContent:
|
|
952
|
-
() =>
|
|
1222
|
+
"@type": z26.literal("BlogPosting").default("BlogPosting"),
|
|
1223
|
+
sharedContent: z26.lazy(
|
|
1224
|
+
() => z26.object({ "@type": z26.string() }).passthrough()
|
|
953
1225
|
).optional()
|
|
954
1226
|
});
|
|
955
1227
|
var createArticle = makeFactory(ArticleSchema);
|
|
@@ -957,32 +1229,32 @@ var createNewsArticle = makeFactory(NewsArticleSchema);
|
|
|
957
1229
|
var createBlogPosting = makeFactory(BlogPostingSchema);
|
|
958
1230
|
|
|
959
1231
|
// src/types/creative-works/WebPage.ts
|
|
960
|
-
import { z as
|
|
1232
|
+
import { z as z27 } from "zod";
|
|
961
1233
|
var WebPageSchema = CreativeWorkSchema.extend({
|
|
962
|
-
"@type":
|
|
963
|
-
breadcrumb:
|
|
964
|
-
() =>
|
|
1234
|
+
"@type": z27.literal("WebPage").default("WebPage"),
|
|
1235
|
+
breadcrumb: z27.lazy(
|
|
1236
|
+
() => z27.object({ "@type": z27.literal("BreadcrumbList") }).catchall(z27.unknown())
|
|
965
1237
|
).optional(),
|
|
966
|
-
lastReviewed:
|
|
1238
|
+
lastReviewed: z27.string().optional(),
|
|
967
1239
|
reviewedBy: PersonOrOrgRef.optional(),
|
|
968
|
-
speakable:
|
|
969
|
-
"@type":
|
|
970
|
-
cssSelector:
|
|
971
|
-
xpath:
|
|
1240
|
+
speakable: z27.object({
|
|
1241
|
+
"@type": z27.literal("SpeakableSpecification").default("SpeakableSpecification"),
|
|
1242
|
+
cssSelector: z27.union([z27.string(), z27.array(z27.string())]).optional(),
|
|
1243
|
+
xpath: z27.union([z27.string(), z27.array(z27.string())]).optional()
|
|
972
1244
|
}).optional(),
|
|
973
|
-
significantLink:
|
|
974
|
-
mainContentOfPage:
|
|
975
|
-
primaryImageOfPage:
|
|
976
|
-
relatedLink:
|
|
1245
|
+
significantLink: z27.union([z27.url(), z27.array(z27.url())]).optional(),
|
|
1246
|
+
mainContentOfPage: z27.object({ "@type": z27.string() }).catchall(z27.unknown()).optional(),
|
|
1247
|
+
primaryImageOfPage: z27.object({ "@type": z27.string() }).catchall(z27.unknown()).optional(),
|
|
1248
|
+
relatedLink: z27.union([z27.url(), z27.array(z27.url())]).optional()
|
|
977
1249
|
});
|
|
978
1250
|
var createWebPage = makeFactory(WebPageSchema);
|
|
979
1251
|
|
|
980
1252
|
// src/types/creative-works/WebSite.ts
|
|
981
|
-
import { z as
|
|
1253
|
+
import { z as z28 } from "zod";
|
|
982
1254
|
var WebSiteSchema = CreativeWorkSchema.extend({
|
|
983
|
-
"@type":
|
|
984
|
-
url:
|
|
985
|
-
name:
|
|
1255
|
+
"@type": z28.literal("WebSite").default("WebSite"),
|
|
1256
|
+
url: z28.url().optional(),
|
|
1257
|
+
name: z28.string().optional(),
|
|
986
1258
|
/**
|
|
987
1259
|
* Sitelinks Searchbox via SearchAction.
|
|
988
1260
|
* @deprecated Google removed the Sitelinks Searchbox feature in November 2024.
|
|
@@ -990,230 +1262,231 @@ var WebSiteSchema = CreativeWorkSchema.extend({
|
|
|
990
1262
|
* longer displays a search box in branded search results.
|
|
991
1263
|
* See: https://developers.google.com/search/blog/2024/11/retiring-sitelinks-searchbox
|
|
992
1264
|
*/
|
|
993
|
-
potentialAction:
|
|
994
|
-
"@type":
|
|
995
|
-
target:
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
"@type":
|
|
999
|
-
urlTemplate:
|
|
1265
|
+
potentialAction: z28.object({
|
|
1266
|
+
"@type": z28.literal("SearchAction"),
|
|
1267
|
+
target: z28.union([
|
|
1268
|
+
z28.string(),
|
|
1269
|
+
z28.object({
|
|
1270
|
+
"@type": z28.literal("EntryPoint"),
|
|
1271
|
+
urlTemplate: z28.string()
|
|
1000
1272
|
})
|
|
1001
1273
|
]),
|
|
1002
|
-
"query-input":
|
|
1274
|
+
"query-input": z28.string().optional()
|
|
1003
1275
|
}).optional(),
|
|
1004
1276
|
// Content language(s)
|
|
1005
|
-
inLanguage:
|
|
1277
|
+
inLanguage: z28.union([z28.string(), z28.array(z28.string())]).optional(),
|
|
1006
1278
|
// Authorship / ownership
|
|
1007
1279
|
publisher: PersonOrOrgRef.optional(),
|
|
1008
1280
|
// Site-level metadata
|
|
1009
|
-
copyrightYear:
|
|
1281
|
+
copyrightYear: z28.number().int().optional(),
|
|
1010
1282
|
// isPartOf — rarely used for WebSite itself but allowed
|
|
1011
|
-
isPartOf:
|
|
1012
|
-
() =>
|
|
1283
|
+
isPartOf: z28.lazy(
|
|
1284
|
+
() => z28.object({ "@type": z28.string() }).catchall(z28.unknown())
|
|
1013
1285
|
).optional()
|
|
1014
1286
|
});
|
|
1015
1287
|
var createWebSite = makeFactory(WebSiteSchema);
|
|
1016
1288
|
|
|
1017
1289
|
// src/types/creative-works/Dataset.ts
|
|
1018
|
-
import { z as
|
|
1019
|
-
var PropertyValueSchema =
|
|
1020
|
-
"@type":
|
|
1021
|
-
propertyID:
|
|
1290
|
+
import { z as z29 } from "zod";
|
|
1291
|
+
var PropertyValueSchema = z29.object({
|
|
1292
|
+
"@type": z29.literal("PropertyValue").default("PropertyValue"),
|
|
1293
|
+
propertyID: z29.string().optional(),
|
|
1022
1294
|
// e.g. "DOI", "SPDX"
|
|
1023
|
-
name:
|
|
1024
|
-
value:
|
|
1025
|
-
url:
|
|
1026
|
-
description:
|
|
1295
|
+
name: z29.string().optional(),
|
|
1296
|
+
value: z29.union([z29.string(), z29.number()]),
|
|
1297
|
+
url: z29.url().optional(),
|
|
1298
|
+
description: z29.string().optional()
|
|
1027
1299
|
});
|
|
1028
1300
|
var DatasetSchema = CreativeWorkSchema.extend({
|
|
1029
|
-
"@type":
|
|
1301
|
+
"@type": z29.literal("Dataset").default("Dataset"),
|
|
1030
1302
|
// Required by Google:
|
|
1031
|
-
name:
|
|
1032
|
-
description:
|
|
1303
|
+
name: z29.string(),
|
|
1304
|
+
description: z29.string(),
|
|
1033
1305
|
// Recommended by Google:
|
|
1034
|
-
url:
|
|
1035
|
-
sameAs:
|
|
1036
|
-
identifier:
|
|
1037
|
-
|
|
1306
|
+
url: z29.url().optional(),
|
|
1307
|
+
sameAs: z29.union([z29.url(), z29.array(z29.url())]).optional(),
|
|
1308
|
+
identifier: z29.union([
|
|
1309
|
+
z29.string(),
|
|
1038
1310
|
PropertyValueSchema,
|
|
1039
|
-
|
|
1311
|
+
z29.array(z29.union([z29.string(), PropertyValueSchema]))
|
|
1040
1312
|
]).optional(),
|
|
1041
|
-
keywords:
|
|
1042
|
-
license:
|
|
1043
|
-
isAccessibleForFree:
|
|
1044
|
-
creator:
|
|
1045
|
-
citation:
|
|
1046
|
-
variableMeasured:
|
|
1047
|
-
measurementTechnique:
|
|
1048
|
-
temporalCoverage:
|
|
1313
|
+
keywords: z29.union([z29.string(), z29.array(z29.string())]).optional(),
|
|
1314
|
+
license: z29.url().optional(),
|
|
1315
|
+
isAccessibleForFree: z29.boolean().optional(),
|
|
1316
|
+
creator: z29.union([PersonOrOrgRef, z29.array(PersonOrOrgRef)]).optional(),
|
|
1317
|
+
citation: z29.union([z29.string(), z29.array(z29.string())]).optional(),
|
|
1318
|
+
variableMeasured: z29.union([z29.string(), z29.array(z29.string())]).optional(),
|
|
1319
|
+
measurementTechnique: z29.union([z29.string(), z29.array(z29.string())]).optional(),
|
|
1320
|
+
temporalCoverage: z29.string().optional(),
|
|
1049
1321
|
// ISO 8601 or date range string
|
|
1050
|
-
spatialCoverage:
|
|
1051
|
-
|
|
1052
|
-
|
|
1322
|
+
spatialCoverage: z29.union([
|
|
1323
|
+
z29.string(),
|
|
1324
|
+
z29.object({ "@type": z29.literal("Place"), name: z29.string() })
|
|
1053
1325
|
]).optional(),
|
|
1054
|
-
distribution:
|
|
1055
|
-
"@type":
|
|
1056
|
-
encodingFormat:
|
|
1326
|
+
distribution: z29.array(z29.object({
|
|
1327
|
+
"@type": z29.literal("DataDownload").default("DataDownload"),
|
|
1328
|
+
encodingFormat: z29.string(),
|
|
1057
1329
|
// MIME type or format name
|
|
1058
|
-
contentUrl:
|
|
1059
|
-
name:
|
|
1060
|
-
description:
|
|
1330
|
+
contentUrl: z29.url(),
|
|
1331
|
+
name: z29.string().optional(),
|
|
1332
|
+
description: z29.string().optional()
|
|
1061
1333
|
})).optional(),
|
|
1062
|
-
includedInDataCatalog:
|
|
1063
|
-
"@type":
|
|
1064
|
-
name:
|
|
1065
|
-
url:
|
|
1334
|
+
includedInDataCatalog: z29.object({
|
|
1335
|
+
"@type": z29.literal("DataCatalog").default("DataCatalog"),
|
|
1336
|
+
name: z29.string(),
|
|
1337
|
+
url: z29.url().optional()
|
|
1066
1338
|
}).optional(),
|
|
1067
|
-
datePublished:
|
|
1339
|
+
datePublished: z29.string().optional(),
|
|
1068
1340
|
// ISO 8601
|
|
1069
|
-
dateModified:
|
|
1070
|
-
version:
|
|
1341
|
+
dateModified: z29.string().optional(),
|
|
1342
|
+
version: z29.union([z29.string(), z29.number()]).optional(),
|
|
1343
|
+
funder: z29.union([PersonOrOrgRef, z29.array(PersonOrOrgRef)]).optional()
|
|
1071
1344
|
});
|
|
1072
1345
|
var createDataset = makeFactory(DatasetSchema);
|
|
1073
1346
|
|
|
1074
1347
|
// src/types/creative-works/Recipe.ts
|
|
1075
|
-
import { z as
|
|
1348
|
+
import { z as z31 } from "zod";
|
|
1076
1349
|
|
|
1077
1350
|
// src/types/shared/HowToStep.ts
|
|
1078
|
-
import { z as
|
|
1079
|
-
var HowToStepSchema =
|
|
1080
|
-
"@type":
|
|
1081
|
-
name:
|
|
1351
|
+
import { z as z30 } from "zod";
|
|
1352
|
+
var HowToStepSchema = z30.object({
|
|
1353
|
+
"@type": z30.literal("HowToStep").default("HowToStep"),
|
|
1354
|
+
name: z30.string().optional(),
|
|
1082
1355
|
// Step title (avoid "Step 1" format per Google)
|
|
1083
|
-
text:
|
|
1356
|
+
text: z30.string(),
|
|
1084
1357
|
// Step description
|
|
1085
|
-
url:
|
|
1358
|
+
url: z30.string().url().optional(),
|
|
1086
1359
|
// Anchor link to step
|
|
1087
1360
|
image: ImageOrUrl.optional()
|
|
1088
1361
|
});
|
|
1089
|
-
var HowToSectionSchema =
|
|
1090
|
-
"@type":
|
|
1091
|
-
name:
|
|
1092
|
-
itemListElement:
|
|
1093
|
-
description:
|
|
1362
|
+
var HowToSectionSchema = z30.object({
|
|
1363
|
+
"@type": z30.literal("HowToSection").default("HowToSection"),
|
|
1364
|
+
name: z30.string(),
|
|
1365
|
+
itemListElement: z30.array(HowToStepSchema),
|
|
1366
|
+
description: z30.string().optional()
|
|
1094
1367
|
});
|
|
1095
1368
|
|
|
1096
1369
|
// src/types/creative-works/Recipe.ts
|
|
1097
|
-
var NutritionInformationSchema =
|
|
1098
|
-
"@type":
|
|
1099
|
-
calories:
|
|
1370
|
+
var NutritionInformationSchema = z31.object({
|
|
1371
|
+
"@type": z31.literal("NutritionInformation").default("NutritionInformation"),
|
|
1372
|
+
calories: z31.string().optional(),
|
|
1100
1373
|
// e.g. "270 calories"
|
|
1101
|
-
carbohydrateContent:
|
|
1374
|
+
carbohydrateContent: z31.string().optional(),
|
|
1102
1375
|
// e.g. "20 grams"
|
|
1103
|
-
cholesterolContent:
|
|
1104
|
-
fatContent:
|
|
1105
|
-
fiberContent:
|
|
1106
|
-
proteinContent:
|
|
1107
|
-
saturatedFatContent:
|
|
1108
|
-
servingSize:
|
|
1109
|
-
sodiumContent:
|
|
1110
|
-
sugarContent:
|
|
1111
|
-
transFatContent:
|
|
1112
|
-
unsaturatedFatContent:
|
|
1376
|
+
cholesterolContent: z31.string().optional(),
|
|
1377
|
+
fatContent: z31.string().optional(),
|
|
1378
|
+
fiberContent: z31.string().optional(),
|
|
1379
|
+
proteinContent: z31.string().optional(),
|
|
1380
|
+
saturatedFatContent: z31.string().optional(),
|
|
1381
|
+
servingSize: z31.string().optional(),
|
|
1382
|
+
sodiumContent: z31.string().optional(),
|
|
1383
|
+
sugarContent: z31.string().optional(),
|
|
1384
|
+
transFatContent: z31.string().optional(),
|
|
1385
|
+
unsaturatedFatContent: z31.string().optional()
|
|
1113
1386
|
});
|
|
1114
1387
|
var RecipeSchema = CreativeWorkSchema.extend({
|
|
1115
|
-
"@type":
|
|
1388
|
+
"@type": z31.literal("Recipe").default("Recipe"),
|
|
1116
1389
|
// Required by Google:
|
|
1117
|
-
name:
|
|
1118
|
-
image:
|
|
1390
|
+
name: z31.string(),
|
|
1391
|
+
image: z31.union([ImageOrUrl, z31.array(ImageOrUrl)]),
|
|
1119
1392
|
// Recommended by Google:
|
|
1120
|
-
author:
|
|
1121
|
-
datePublished:
|
|
1393
|
+
author: z31.union([PersonOrOrgRef, z31.array(PersonOrOrgRef)]).optional(),
|
|
1394
|
+
datePublished: z31.string().optional(),
|
|
1122
1395
|
// ISO 8601 date
|
|
1123
|
-
description:
|
|
1124
|
-
prepTime:
|
|
1396
|
+
description: z31.string().optional(),
|
|
1397
|
+
prepTime: z31.string().optional(),
|
|
1125
1398
|
// ISO 8601 duration, e.g. "PT15M"
|
|
1126
|
-
cookTime:
|
|
1399
|
+
cookTime: z31.string().optional(),
|
|
1127
1400
|
// ISO 8601 duration
|
|
1128
|
-
totalTime:
|
|
1401
|
+
totalTime: z31.string().optional(),
|
|
1129
1402
|
// ISO 8601 duration
|
|
1130
|
-
recipeYield:
|
|
1131
|
-
recipeCategory:
|
|
1403
|
+
recipeYield: z31.union([z31.string(), z31.number(), z31.array(z31.string())]).optional(),
|
|
1404
|
+
recipeCategory: z31.string().optional(),
|
|
1132
1405
|
// e.g. "Dessert", "Dinner"
|
|
1133
|
-
recipeCuisine:
|
|
1406
|
+
recipeCuisine: z31.string().optional(),
|
|
1134
1407
|
// e.g. "Italian", "French"
|
|
1135
|
-
recipeIngredient:
|
|
1136
|
-
recipeInstructions:
|
|
1137
|
-
|
|
1408
|
+
recipeIngredient: z31.array(z31.string()).optional(),
|
|
1409
|
+
recipeInstructions: z31.array(
|
|
1410
|
+
z31.union([z31.string(), HowToStepSchema, HowToSectionSchema])
|
|
1138
1411
|
).optional(),
|
|
1139
1412
|
nutrition: NutritionInformationSchema.optional(),
|
|
1140
|
-
video:
|
|
1413
|
+
video: z31.union([VideoObjectSchema, z31.array(VideoObjectSchema)]).optional(),
|
|
1141
1414
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
1142
|
-
review:
|
|
1143
|
-
keywords:
|
|
1144
|
-
cookingMethod:
|
|
1145
|
-
suitableForDiet:
|
|
1415
|
+
review: z31.union([ReviewSchema, z31.array(ReviewSchema)]).optional(),
|
|
1416
|
+
keywords: z31.union([z31.string(), z31.array(z31.string())]).optional(),
|
|
1417
|
+
cookingMethod: z31.string().optional(),
|
|
1418
|
+
suitableForDiet: z31.union([z31.string(), z31.array(z31.string())]).optional(),
|
|
1146
1419
|
// schema.org enum URL
|
|
1147
|
-
estimatedCost:
|
|
1420
|
+
estimatedCost: z31.string().optional()
|
|
1148
1421
|
});
|
|
1149
1422
|
var createRecipe = makeFactory(RecipeSchema);
|
|
1150
1423
|
|
|
1151
1424
|
// src/types/creative-works/Course.ts
|
|
1152
|
-
import { z as
|
|
1153
|
-
var CourseInstanceSchema =
|
|
1154
|
-
"@type":
|
|
1155
|
-
courseMode:
|
|
1425
|
+
import { z as z32 } from "zod";
|
|
1426
|
+
var CourseInstanceSchema = z32.object({
|
|
1427
|
+
"@type": z32.literal("CourseInstance").default("CourseInstance"),
|
|
1428
|
+
courseMode: z32.union([z32.string(), z32.array(z32.string())]),
|
|
1156
1429
|
// "online", "onsite", "blended"
|
|
1157
|
-
instructor:
|
|
1158
|
-
startDate:
|
|
1430
|
+
instructor: z32.union([PersonOrOrgRef, z32.array(PersonOrOrgRef)]).optional(),
|
|
1431
|
+
startDate: z32.string().optional(),
|
|
1159
1432
|
// ISO 8601
|
|
1160
|
-
endDate:
|
|
1433
|
+
endDate: z32.string().optional(),
|
|
1161
1434
|
// ISO 8601
|
|
1162
|
-
location:
|
|
1163
|
-
offers:
|
|
1164
|
-
courseWorkload:
|
|
1435
|
+
location: z32.union([z32.string(), PostalAddressSchema]).optional(),
|
|
1436
|
+
offers: z32.union([OfferSchema, z32.array(OfferSchema)]).optional(),
|
|
1437
|
+
courseWorkload: z32.string().optional(),
|
|
1165
1438
|
// ISO 8601 duration, e.g. "PT10H"
|
|
1166
|
-
courseSchedule:
|
|
1167
|
-
"@type":
|
|
1168
|
-
repeatFrequency:
|
|
1439
|
+
courseSchedule: z32.object({
|
|
1440
|
+
"@type": z32.literal("Schedule").default("Schedule"),
|
|
1441
|
+
repeatFrequency: z32.string().optional(),
|
|
1169
1442
|
// e.g. "P1W"
|
|
1170
|
-
repeatCount:
|
|
1171
|
-
startDate:
|
|
1172
|
-
endDate:
|
|
1443
|
+
repeatCount: z32.number().optional(),
|
|
1444
|
+
startDate: z32.string().optional(),
|
|
1445
|
+
endDate: z32.string().optional()
|
|
1173
1446
|
}).optional()
|
|
1174
1447
|
});
|
|
1175
1448
|
var CourseSchema = CreativeWorkSchema.extend({
|
|
1176
|
-
"@type":
|
|
1449
|
+
"@type": z32.literal("Course").default("Course"),
|
|
1177
1450
|
// Required by Google:
|
|
1178
|
-
name:
|
|
1179
|
-
description:
|
|
1451
|
+
name: z32.string(),
|
|
1452
|
+
description: z32.string(),
|
|
1180
1453
|
// Recommended by Google:
|
|
1181
|
-
provider:
|
|
1182
|
-
hasCourseInstance:
|
|
1454
|
+
provider: z32.union([PersonOrOrgRef, z32.array(PersonOrOrgRef)]).optional(),
|
|
1455
|
+
hasCourseInstance: z32.union([CourseInstanceSchema, z32.array(CourseInstanceSchema)]).optional(),
|
|
1183
1456
|
// Optional:
|
|
1184
|
-
coursePrerequisites:
|
|
1185
|
-
educationalCredentialAwarded:
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
"@type":
|
|
1189
|
-
name:
|
|
1190
|
-
url:
|
|
1457
|
+
coursePrerequisites: z32.union([z32.string(), z32.array(z32.string())]).optional(),
|
|
1458
|
+
educationalCredentialAwarded: z32.union([
|
|
1459
|
+
z32.string(),
|
|
1460
|
+
z32.object({
|
|
1461
|
+
"@type": z32.literal("EducationalOccupationalCredential").default("EducationalOccupationalCredential"),
|
|
1462
|
+
name: z32.string(),
|
|
1463
|
+
url: z32.url().optional()
|
|
1191
1464
|
})
|
|
1192
1465
|
]).optional(),
|
|
1193
|
-
occupationalCredentialAwarded:
|
|
1194
|
-
numberOfCredits:
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
"@type":
|
|
1198
|
-
value:
|
|
1466
|
+
occupationalCredentialAwarded: z32.union([z32.string(), z32.array(z32.string())]).optional(),
|
|
1467
|
+
numberOfCredits: z32.union([
|
|
1468
|
+
z32.number(),
|
|
1469
|
+
z32.object({
|
|
1470
|
+
"@type": z32.literal("StructuredValue").default("StructuredValue"),
|
|
1471
|
+
value: z32.number()
|
|
1199
1472
|
})
|
|
1200
1473
|
]).optional(),
|
|
1201
|
-
financialAidEligible:
|
|
1474
|
+
financialAidEligible: z32.union([z32.string(), z32.boolean()]).optional(),
|
|
1202
1475
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
1203
|
-
image:
|
|
1204
|
-
offers:
|
|
1205
|
-
inLanguage:
|
|
1206
|
-
syllabusSections:
|
|
1207
|
-
"@type":
|
|
1208
|
-
name:
|
|
1209
|
-
description:
|
|
1476
|
+
image: z32.union([ImageOrUrl, z32.array(ImageOrUrl)]).optional(),
|
|
1477
|
+
offers: z32.union([OfferSchema, z32.array(OfferSchema)]).optional(),
|
|
1478
|
+
inLanguage: z32.union([z32.string(), z32.array(z32.string())]).optional(),
|
|
1479
|
+
syllabusSections: z32.array(z32.object({
|
|
1480
|
+
"@type": z32.literal("Syllabus").default("Syllabus"),
|
|
1481
|
+
name: z32.string(),
|
|
1482
|
+
description: z32.string().optional()
|
|
1210
1483
|
})).optional()
|
|
1211
1484
|
});
|
|
1212
1485
|
var createCourse = makeFactory(CourseSchema);
|
|
1213
1486
|
|
|
1214
1487
|
// src/types/creative-works/SoftwareApplication.ts
|
|
1215
|
-
import { z as
|
|
1216
|
-
var ApplicationCategory =
|
|
1488
|
+
import { z as z33 } from "zod";
|
|
1489
|
+
var ApplicationCategory = z33.enum([
|
|
1217
1490
|
"GameApplication",
|
|
1218
1491
|
"SocialNetworkingApplication",
|
|
1219
1492
|
"TravelApplication",
|
|
@@ -1238,139 +1511,153 @@ var ApplicationCategory = z29.enum([
|
|
|
1238
1511
|
"ReferenceApplication"
|
|
1239
1512
|
]);
|
|
1240
1513
|
var SoftwareApplicationSchema = CreativeWorkSchema.extend({
|
|
1241
|
-
"@type":
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1514
|
+
"@type": z33.union([
|
|
1515
|
+
z33.literal("SoftwareApplication"),
|
|
1516
|
+
z33.literal("MobileApplication"),
|
|
1517
|
+
z33.literal("WebApplication"),
|
|
1518
|
+
z33.literal("VideoGame")
|
|
1246
1519
|
]).default("SoftwareApplication"),
|
|
1247
1520
|
// Required by Google:
|
|
1248
|
-
name:
|
|
1521
|
+
name: z33.string(),
|
|
1249
1522
|
// Recommended by Google:
|
|
1250
|
-
operatingSystem:
|
|
1251
|
-
applicationCategory:
|
|
1252
|
-
offers:
|
|
1523
|
+
operatingSystem: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1524
|
+
applicationCategory: z33.union([ApplicationCategory, z33.string()]).optional(),
|
|
1525
|
+
offers: z33.union([OfferSchema, z33.array(OfferSchema)]).optional(),
|
|
1253
1526
|
aggregateRating: AggregateRatingSchema.optional(),
|
|
1254
|
-
review:
|
|
1527
|
+
review: z33.union([ReviewSchema, z33.array(ReviewSchema)]).optional(),
|
|
1255
1528
|
// Optional:
|
|
1256
|
-
softwareVersion:
|
|
1257
|
-
fileSize:
|
|
1258
|
-
downloadUrl:
|
|
1259
|
-
screenshot:
|
|
1260
|
-
featureList:
|
|
1261
|
-
installUrl:
|
|
1262
|
-
softwareRequirements:
|
|
1263
|
-
permissions:
|
|
1529
|
+
softwareVersion: z33.string().optional(),
|
|
1530
|
+
fileSize: z33.string().optional(),
|
|
1531
|
+
downloadUrl: z33.url().optional(),
|
|
1532
|
+
screenshot: z33.union([ImageOrUrl, z33.array(ImageOrUrl)]).optional(),
|
|
1533
|
+
featureList: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1534
|
+
installUrl: z33.url().optional(),
|
|
1535
|
+
softwareRequirements: z33.string().optional(),
|
|
1536
|
+
permissions: z33.string().optional(),
|
|
1264
1537
|
// WebApplication specific:
|
|
1265
|
-
browserRequirements:
|
|
1538
|
+
browserRequirements: z33.string().optional(),
|
|
1266
1539
|
// MobileApplication specific:
|
|
1267
|
-
countriesSupported:
|
|
1268
|
-
countriesNotSupported:
|
|
1269
|
-
availableOnDevice:
|
|
1540
|
+
countriesSupported: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1541
|
+
countriesNotSupported: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1542
|
+
availableOnDevice: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1270
1543
|
// VideoGame specific:
|
|
1271
|
-
gamePlatform:
|
|
1272
|
-
playMode:
|
|
1273
|
-
genre:
|
|
1544
|
+
gamePlatform: z33.union([z33.string(), z33.array(z33.string())]).optional(),
|
|
1545
|
+
playMode: z33.string().optional(),
|
|
1546
|
+
genre: z33.union([z33.string(), z33.array(z33.string())]).optional()
|
|
1274
1547
|
});
|
|
1275
1548
|
var createSoftwareApplication = makeFactory(SoftwareApplicationSchema);
|
|
1276
1549
|
var createMobileApplication = makeFactory(
|
|
1277
1550
|
SoftwareApplicationSchema.extend({
|
|
1278
|
-
"@type":
|
|
1551
|
+
"@type": z33.literal("MobileApplication").default("MobileApplication")
|
|
1279
1552
|
})
|
|
1280
1553
|
);
|
|
1281
1554
|
var createWebApplication = makeFactory(
|
|
1282
1555
|
SoftwareApplicationSchema.extend({
|
|
1283
|
-
"@type":
|
|
1556
|
+
"@type": z33.literal("WebApplication").default("WebApplication")
|
|
1284
1557
|
})
|
|
1285
1558
|
);
|
|
1286
1559
|
|
|
1287
1560
|
// src/types/creative-works/MathSolver.ts
|
|
1288
|
-
import { z as
|
|
1289
|
-
var SolveMathActionSchema =
|
|
1290
|
-
"@type":
|
|
1291
|
-
eduQuestionType:
|
|
1561
|
+
import { z as z34 } from "zod";
|
|
1562
|
+
var SolveMathActionSchema = z34.object({
|
|
1563
|
+
"@type": z34.literal("SolveMathAction").default("SolveMathAction"),
|
|
1564
|
+
eduQuestionType: z34.string().optional(),
|
|
1292
1565
|
// e.g. "Algebra", "Calculus"
|
|
1293
|
-
mathExpression:
|
|
1294
|
-
target:
|
|
1295
|
-
"@type":
|
|
1296
|
-
urlTemplate:
|
|
1297
|
-
actionAccessibilityRequirement:
|
|
1298
|
-
"@type":
|
|
1299
|
-
requiresSubscription:
|
|
1566
|
+
mathExpression: z34.string().optional(),
|
|
1567
|
+
target: z34.object({
|
|
1568
|
+
"@type": z34.literal("EntryPoint").default("EntryPoint"),
|
|
1569
|
+
urlTemplate: z34.string().optional(),
|
|
1570
|
+
actionAccessibilityRequirement: z34.object({
|
|
1571
|
+
"@type": z34.literal("ActionAccessSpecification").default("ActionAccessSpecification"),
|
|
1572
|
+
requiresSubscription: z34.boolean().optional()
|
|
1300
1573
|
}).optional()
|
|
1301
1574
|
}).optional()
|
|
1302
1575
|
});
|
|
1303
1576
|
var MathSolverSchema = CreativeWorkSchema.extend({
|
|
1304
|
-
"@type":
|
|
1305
|
-
name:
|
|
1306
|
-
url:
|
|
1307
|
-
potentialAction:
|
|
1308
|
-
mathExpression:
|
|
1309
|
-
educationalLevel:
|
|
1310
|
-
teaches:
|
|
1577
|
+
"@type": z34.literal("MathSolver").default("MathSolver"),
|
|
1578
|
+
name: z34.string(),
|
|
1579
|
+
url: z34.url().optional(),
|
|
1580
|
+
potentialAction: z34.union([SolveMathActionSchema, z34.array(SolveMathActionSchema)]).optional(),
|
|
1581
|
+
mathExpression: z34.union([z34.string(), z34.array(z34.string())]).optional(),
|
|
1582
|
+
educationalLevel: z34.string().optional(),
|
|
1583
|
+
teaches: z34.union([z34.string(), z34.array(z34.string())]).optional(),
|
|
1584
|
+
/** URL of a page describing usage/terms for the solver — Google required field */
|
|
1585
|
+
usageInfo: z34.string().url().optional(),
|
|
1586
|
+
/** Learning resource type — defaults to "Math Solver" per Google spec */
|
|
1587
|
+
learningResourceType: z34.string().default("Math Solver"),
|
|
1588
|
+
/** Topics the solver assesses */
|
|
1589
|
+
assesses: z34.union([z34.string(), z34.array(z34.string())]).optional()
|
|
1311
1590
|
});
|
|
1312
1591
|
var createMathSolver = makeFactory(MathSolverSchema);
|
|
1313
1592
|
|
|
1593
|
+
// src/types/creative-works/ClaimReview.ts
|
|
1594
|
+
import { z as z35 } from "zod";
|
|
1595
|
+
var ClaimSchema = z35.object({
|
|
1596
|
+
"@type": z35.literal("Claim").default("Claim"),
|
|
1597
|
+
/** The author who made the claim */
|
|
1598
|
+
author: z35.union([PersonOrOrgRef, z35.array(PersonOrOrgRef)]).optional(),
|
|
1599
|
+
/** ISO 8601 date the claim was made */
|
|
1600
|
+
datePublished: z35.string().optional(),
|
|
1601
|
+
/** URL of the first appearance of the claim */
|
|
1602
|
+
firstAppearance: z35.string().url().optional(),
|
|
1603
|
+
/** URL(s) of other appearances of the claim */
|
|
1604
|
+
appearance: z35.union([z35.string().url(), z35.array(z35.string().url())]).optional()
|
|
1605
|
+
});
|
|
1606
|
+
var ClaimReviewSchema = z35.object({
|
|
1607
|
+
"@type": z35.literal("ClaimReview").default("ClaimReview"),
|
|
1608
|
+
/** Canonical URL of the fact-check article */
|
|
1609
|
+
url: z35.string().url(),
|
|
1610
|
+
/** The text of the claim being evaluated */
|
|
1611
|
+
claimReviewed: z35.string(),
|
|
1612
|
+
/** The rating given by the fact-checker */
|
|
1613
|
+
reviewRating: z35.object({
|
|
1614
|
+
"@type": z35.literal("Rating").default("Rating"),
|
|
1615
|
+
/** Human-readable label, e.g. "False", "Mostly True" */
|
|
1616
|
+
alternateName: z35.string(),
|
|
1617
|
+
/** Numeric rating value (optional for fact-check) */
|
|
1618
|
+
ratingValue: z35.union([z35.number(), z35.string()]).optional(),
|
|
1619
|
+
/** Maximum possible rating, e.g. 5 */
|
|
1620
|
+
bestRating: z35.union([z35.number(), z35.string()]).optional(),
|
|
1621
|
+
/** Minimum possible rating, e.g. 1 */
|
|
1622
|
+
worstRating: z35.union([z35.number(), z35.string()]).optional(),
|
|
1623
|
+
/** Name of the rating scale */
|
|
1624
|
+
name: z35.string().optional(),
|
|
1625
|
+
/** URL of the rating explanation page */
|
|
1626
|
+
image: z35.string().url().optional()
|
|
1627
|
+
}),
|
|
1628
|
+
/** The fact-checking author / organization */
|
|
1629
|
+
author: z35.union([PersonOrOrgRef, z35.array(PersonOrOrgRef)]).optional(),
|
|
1630
|
+
/** The claim being reviewed */
|
|
1631
|
+
itemReviewed: ClaimSchema.optional(),
|
|
1632
|
+
/** ISO 8601 date the review was published */
|
|
1633
|
+
datePublished: z35.string().optional(),
|
|
1634
|
+
/** ISO 8601 date the review was last modified */
|
|
1635
|
+
dateModified: z35.string().optional(),
|
|
1636
|
+
/** Language code of the review, e.g. "en" */
|
|
1637
|
+
inLanguage: z35.string().optional()
|
|
1638
|
+
});
|
|
1639
|
+
var createClaimReview = makeFactory(ClaimReviewSchema);
|
|
1640
|
+
|
|
1314
1641
|
// src/types/intangibles/Language.ts
|
|
1315
|
-
import { z as
|
|
1642
|
+
import { z as z36 } from "zod";
|
|
1316
1643
|
var LanguageSchema = extendThing("Language", {
|
|
1317
1644
|
// No additional properties beyond Thing for Language
|
|
1318
1645
|
// But you can attach any Thing props: name, alternateName, url, etc.
|
|
1319
1646
|
});
|
|
1320
1647
|
var createLanguage = makeFactory(LanguageSchema);
|
|
1321
|
-
var PronounceableTextSchema =
|
|
1322
|
-
"@type":
|
|
1323
|
-
textValue:
|
|
1648
|
+
var PronounceableTextSchema = z36.object({
|
|
1649
|
+
"@type": z36.literal("PronounceableText").default("PronounceableText"),
|
|
1650
|
+
textValue: z36.string(),
|
|
1324
1651
|
// Accepts either a BCP 47 string like "en-US" or a full Language object
|
|
1325
|
-
inLanguage:
|
|
1326
|
-
phoneticText:
|
|
1327
|
-
speechToTextMarkup:
|
|
1652
|
+
inLanguage: z36.union([z36.string(), LanguageSchema]).optional(),
|
|
1653
|
+
phoneticText: z36.string().optional(),
|
|
1654
|
+
speechToTextMarkup: z36.string().optional()
|
|
1328
1655
|
});
|
|
1329
1656
|
var createPronounceableText = makeFactory(PronounceableTextSchema);
|
|
1330
1657
|
|
|
1331
1658
|
// src/types/intangibles/JobPosting.ts
|
|
1332
|
-
import { z as
|
|
1333
|
-
|
|
1334
|
-
// src/types/shared/MonetaryAmount.ts
|
|
1335
|
-
import { z as z32 } from "zod";
|
|
1336
|
-
var MonetaryAmountSchema = z32.object({
|
|
1337
|
-
"@type": z32.literal("MonetaryAmount").default("MonetaryAmount"),
|
|
1338
|
-
currency: z32.string().length(3),
|
|
1339
|
-
// ISO 4217, e.g. "USD"
|
|
1340
|
-
value: z32.union([
|
|
1341
|
-
z32.number(),
|
|
1342
|
-
z32.object({
|
|
1343
|
-
"@type": z32.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1344
|
-
value: z32.number().optional(),
|
|
1345
|
-
minValue: z32.number().optional(),
|
|
1346
|
-
maxValue: z32.number().optional(),
|
|
1347
|
-
unitText: z32.string().optional()
|
|
1348
|
-
// e.g. "HOUR", "MONTH", "YEAR"
|
|
1349
|
-
})
|
|
1350
|
-
]).optional(),
|
|
1351
|
-
minValue: z32.number().optional(),
|
|
1352
|
-
maxValue: z32.number().optional()
|
|
1353
|
-
});
|
|
1354
|
-
var PriceSpecificationSchema = z32.object({
|
|
1355
|
-
"@type": z32.literal("PriceSpecification").default("PriceSpecification"),
|
|
1356
|
-
price: z32.union([z32.number(), z32.string()]),
|
|
1357
|
-
priceCurrency: z32.string().length(3),
|
|
1358
|
-
// ISO 4217
|
|
1359
|
-
minPrice: z32.number().optional(),
|
|
1360
|
-
maxPrice: z32.number().optional(),
|
|
1361
|
-
validFrom: z32.string().optional(),
|
|
1362
|
-
// ISO 8601
|
|
1363
|
-
validThrough: z32.string().optional(),
|
|
1364
|
-
eligibleQuantity: z32.object({
|
|
1365
|
-
"@type": z32.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1366
|
-
value: z32.number().optional(),
|
|
1367
|
-
minValue: z32.number().optional(),
|
|
1368
|
-
maxValue: z32.number().optional()
|
|
1369
|
-
}).optional()
|
|
1370
|
-
});
|
|
1371
|
-
|
|
1372
|
-
// src/types/intangibles/JobPosting.ts
|
|
1373
|
-
var EmploymentType = z33.enum([
|
|
1659
|
+
import { z as z37 } from "zod";
|
|
1660
|
+
var EmploymentType = z37.enum([
|
|
1374
1661
|
"FULL_TIME",
|
|
1375
1662
|
"PART_TIME",
|
|
1376
1663
|
"CONTRACTOR",
|
|
@@ -1380,120 +1667,139 @@ var EmploymentType = z33.enum([
|
|
|
1380
1667
|
"PER_DIEM",
|
|
1381
1668
|
"OTHER"
|
|
1382
1669
|
]);
|
|
1383
|
-
var HiringOrgRef =
|
|
1384
|
-
"@type":
|
|
1385
|
-
name:
|
|
1386
|
-
sameAs:
|
|
1670
|
+
var HiringOrgRef = z37.object({
|
|
1671
|
+
"@type": z37.union([z37.literal("Organization"), z37.literal("LocalBusiness")]).default("Organization"),
|
|
1672
|
+
name: z37.string(),
|
|
1673
|
+
sameAs: z37.url().optional(),
|
|
1387
1674
|
logo: ImageOrUrl.optional(),
|
|
1388
|
-
url:
|
|
1675
|
+
url: z37.url().optional()
|
|
1389
1676
|
});
|
|
1390
|
-
var JobLocationRef =
|
|
1391
|
-
"@type":
|
|
1392
|
-
address:
|
|
1677
|
+
var JobLocationRef = z37.object({
|
|
1678
|
+
"@type": z37.literal("Place").default("Place"),
|
|
1679
|
+
address: z37.union([z37.string(), PostalAddressSchema])
|
|
1393
1680
|
});
|
|
1394
|
-
var JobPostingSchema =
|
|
1395
|
-
"@type":
|
|
1681
|
+
var JobPostingSchema = z37.object({
|
|
1682
|
+
"@type": z37.literal("JobPosting").default("JobPosting"),
|
|
1396
1683
|
// Required by Google:
|
|
1397
|
-
title:
|
|
1398
|
-
description:
|
|
1684
|
+
title: z37.string(),
|
|
1685
|
+
description: z37.string(),
|
|
1399
1686
|
hiringOrganization: HiringOrgRef,
|
|
1400
|
-
jobLocation:
|
|
1401
|
-
datePosted:
|
|
1687
|
+
jobLocation: z37.union([JobLocationRef, z37.array(JobLocationRef)]).optional(),
|
|
1688
|
+
datePosted: z37.string(),
|
|
1402
1689
|
// ISO 8601 date
|
|
1403
1690
|
// Recommended by Google:
|
|
1404
|
-
validThrough:
|
|
1691
|
+
validThrough: z37.string().optional(),
|
|
1405
1692
|
// ISO 8601 datetime
|
|
1406
|
-
employmentType:
|
|
1693
|
+
employmentType: z37.union([EmploymentType, z37.array(EmploymentType)]).optional(),
|
|
1407
1694
|
baseSalary: MonetaryAmountSchema.optional(),
|
|
1408
|
-
jobLocationType:
|
|
1695
|
+
jobLocationType: z37.string().optional(),
|
|
1409
1696
|
// "TELECOMMUTE" for remote
|
|
1410
|
-
applicantLocationRequirements:
|
|
1411
|
-
|
|
1412
|
-
|
|
1697
|
+
applicantLocationRequirements: z37.union([
|
|
1698
|
+
z37.object({ "@type": z37.string(), name: z37.string() }),
|
|
1699
|
+
z37.array(z37.object({ "@type": z37.string(), name: z37.string() }))
|
|
1413
1700
|
]).optional(),
|
|
1414
|
-
directApply:
|
|
1701
|
+
directApply: z37.boolean().optional(),
|
|
1415
1702
|
// Optional:
|
|
1416
|
-
identifier:
|
|
1417
|
-
"@type":
|
|
1418
|
-
name:
|
|
1419
|
-
value:
|
|
1703
|
+
identifier: z37.object({
|
|
1704
|
+
"@type": z37.literal("PropertyValue").default("PropertyValue"),
|
|
1705
|
+
name: z37.string().optional(),
|
|
1706
|
+
value: z37.union([z37.string(), z37.number()])
|
|
1420
1707
|
}).optional(),
|
|
1421
|
-
experienceRequirements:
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
"@type":
|
|
1425
|
-
monthsOfExperience:
|
|
1708
|
+
experienceRequirements: z37.union([
|
|
1709
|
+
z37.string(),
|
|
1710
|
+
z37.object({
|
|
1711
|
+
"@type": z37.literal("OccupationalExperienceRequirements").default("OccupationalExperienceRequirements"),
|
|
1712
|
+
monthsOfExperience: z37.number()
|
|
1426
1713
|
})
|
|
1427
1714
|
]).optional(),
|
|
1428
|
-
educationRequirements:
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
"@type":
|
|
1432
|
-
credentialCategory:
|
|
1715
|
+
educationRequirements: z37.union([
|
|
1716
|
+
z37.string(),
|
|
1717
|
+
z37.object({
|
|
1718
|
+
"@type": z37.literal("EducationalOccupationalCredential").default("EducationalOccupationalCredential"),
|
|
1719
|
+
credentialCategory: z37.string()
|
|
1433
1720
|
// e.g. "bachelor degree", "high school"
|
|
1434
1721
|
})
|
|
1435
1722
|
]).optional(),
|
|
1436
|
-
experienceInPlaceOfEducation:
|
|
1437
|
-
qualifications:
|
|
1438
|
-
responsibilities:
|
|
1439
|
-
skills:
|
|
1440
|
-
industry:
|
|
1441
|
-
occupationalCategory:
|
|
1723
|
+
experienceInPlaceOfEducation: z37.boolean().optional(),
|
|
1724
|
+
qualifications: z37.string().optional(),
|
|
1725
|
+
responsibilities: z37.string().optional(),
|
|
1726
|
+
skills: z37.union([z37.string(), z37.array(z37.string())]).optional(),
|
|
1727
|
+
industry: z37.string().optional(),
|
|
1728
|
+
occupationalCategory: z37.string().optional(),
|
|
1442
1729
|
// O*NET-SOC codes
|
|
1443
|
-
workHours:
|
|
1444
|
-
url:
|
|
1445
|
-
sameAs:
|
|
1730
|
+
workHours: z37.string().optional(),
|
|
1731
|
+
url: z37.url().optional(),
|
|
1732
|
+
sameAs: z37.url().optional()
|
|
1446
1733
|
});
|
|
1447
1734
|
var createJobPosting = makeFactory(JobPostingSchema);
|
|
1448
1735
|
|
|
1449
1736
|
// src/types/intangibles/QAPage.ts
|
|
1450
|
-
import { z as
|
|
1451
|
-
var
|
|
1452
|
-
"@type":
|
|
1453
|
-
|
|
1454
|
-
|
|
1737
|
+
import { z as z38 } from "zod";
|
|
1738
|
+
var AlignmentObjectSchema = z38.object({
|
|
1739
|
+
"@type": z38.literal("AlignmentObject").default("AlignmentObject"),
|
|
1740
|
+
alignmentType: z38.string(),
|
|
1741
|
+
targetName: z38.string(),
|
|
1742
|
+
educationalFramework: z38.string().optional(),
|
|
1743
|
+
targetUrl: z38.string().url().optional(),
|
|
1744
|
+
targetDescription: z38.string().optional()
|
|
1745
|
+
});
|
|
1746
|
+
var AnswerSchema = z38.object({
|
|
1747
|
+
"@type": z38.literal("Answer").default("Answer"),
|
|
1748
|
+
text: z38.string(),
|
|
1749
|
+
dateCreated: z38.string().optional(),
|
|
1455
1750
|
// ISO 8601
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1751
|
+
dateModified: z38.string().optional(),
|
|
1752
|
+
// ISO 8601
|
|
1753
|
+
upvoteCount: z38.number().int().nonnegative().optional(),
|
|
1754
|
+
url: z38.string().url().optional(),
|
|
1755
|
+
author: PersonOrOrgRef.optional(),
|
|
1756
|
+
image: z38.union([ImageOrUrl, z38.array(ImageOrUrl)]).optional(),
|
|
1757
|
+
video: z38.union([VideoObjectSchema, z38.array(VideoObjectSchema)]).optional(),
|
|
1758
|
+
comment: z38.array(z38.object({
|
|
1759
|
+
"@type": z38.literal("Comment").default("Comment"),
|
|
1760
|
+
text: z38.string(),
|
|
1761
|
+
author: PersonOrOrgRef.optional(),
|
|
1762
|
+
datePublished: z38.string().optional()
|
|
1763
|
+
})).optional()
|
|
1459
1764
|
});
|
|
1460
|
-
var QuestionSchema =
|
|
1461
|
-
"@type":
|
|
1462
|
-
name:
|
|
1765
|
+
var QuestionSchema = z38.object({
|
|
1766
|
+
"@type": z38.literal("Question").default("Question"),
|
|
1767
|
+
name: z38.string(),
|
|
1463
1768
|
// The question text (also used as headline)
|
|
1464
|
-
text:
|
|
1769
|
+
text: z38.string().optional(),
|
|
1465
1770
|
// Extended question text
|
|
1466
|
-
acceptedAnswer:
|
|
1467
|
-
suggestedAnswer:
|
|
1468
|
-
answerCount:
|
|
1469
|
-
upvoteCount:
|
|
1771
|
+
acceptedAnswer: z38.union([AnswerSchema, z38.array(AnswerSchema)]).optional(),
|
|
1772
|
+
suggestedAnswer: z38.union([AnswerSchema, z38.array(AnswerSchema)]).optional(),
|
|
1773
|
+
answerCount: z38.number().int().nonnegative().optional(),
|
|
1774
|
+
upvoteCount: z38.number().int().nonnegative().optional(),
|
|
1470
1775
|
author: PersonOrOrgRef.optional(),
|
|
1471
|
-
dateCreated:
|
|
1472
|
-
datePublished:
|
|
1473
|
-
|
|
1776
|
+
dateCreated: z38.string().optional(),
|
|
1777
|
+
datePublished: z38.string().optional(),
|
|
1778
|
+
dateModified: z38.string().optional(),
|
|
1779
|
+
// ISO 8601
|
|
1780
|
+
url: z38.string().url().optional(),
|
|
1781
|
+
image: z38.union([ImageOrUrl, z38.array(ImageOrUrl)]).optional(),
|
|
1782
|
+
video: z38.union([VideoObjectSchema, z38.array(VideoObjectSchema)]).optional(),
|
|
1783
|
+
/** Education Q&A question type, e.g. "Flashcard", "Problem Set" */
|
|
1784
|
+
eduQuestionType: z38.string().optional()
|
|
1474
1785
|
});
|
|
1475
1786
|
var FAQPageSchema = WebPageSchema.extend({
|
|
1476
|
-
"@type":
|
|
1477
|
-
mainEntity:
|
|
1787
|
+
"@type": z38.literal("FAQPage").default("FAQPage"),
|
|
1788
|
+
mainEntity: z38.array(QuestionSchema)
|
|
1478
1789
|
});
|
|
1479
1790
|
var QAPageSchema = WebPageSchema.extend({
|
|
1480
|
-
"@type":
|
|
1791
|
+
"@type": z38.literal("QAPage").default("QAPage"),
|
|
1481
1792
|
mainEntity: QuestionSchema
|
|
1482
1793
|
});
|
|
1483
1794
|
var QuizSchema = CreativeWorkSchema.extend({
|
|
1484
|
-
"@type":
|
|
1485
|
-
name:
|
|
1486
|
-
educationalLevel:
|
|
1487
|
-
about:
|
|
1488
|
-
() =>
|
|
1795
|
+
"@type": z38.literal("Quiz").default("Quiz"),
|
|
1796
|
+
name: z38.string().optional(),
|
|
1797
|
+
educationalLevel: z38.string().optional(),
|
|
1798
|
+
about: z38.lazy(
|
|
1799
|
+
() => z38.object({ "@type": z38.string() }).catchall(z38.unknown())
|
|
1489
1800
|
).optional(),
|
|
1490
|
-
hasPart:
|
|
1491
|
-
educationalAlignment:
|
|
1492
|
-
"@type": z34.literal("AlignmentObject").default("AlignmentObject"),
|
|
1493
|
-
alignmentType: z34.string().optional(),
|
|
1494
|
-
targetName: z34.string().optional(),
|
|
1495
|
-
targetUrl: z34.url().optional()
|
|
1496
|
-
}).optional()
|
|
1801
|
+
hasPart: z38.array(QuestionSchema).optional(),
|
|
1802
|
+
educationalAlignment: z38.union([AlignmentObjectSchema, z38.array(AlignmentObjectSchema)]).optional()
|
|
1497
1803
|
});
|
|
1498
1804
|
var createFAQPage = makeFactory(FAQPageSchema);
|
|
1499
1805
|
var createQAPage = makeFactory(QAPageSchema);
|
|
@@ -1501,182 +1807,194 @@ var createQuiz = makeFactory(QuizSchema);
|
|
|
1501
1807
|
var createQuestion = makeFactory(QuestionSchema);
|
|
1502
1808
|
|
|
1503
1809
|
// src/types/intangibles/DiscussionForum.ts
|
|
1504
|
-
import { z as
|
|
1810
|
+
import { z as z39 } from "zod";
|
|
1505
1811
|
var DiscussionForumPostingSchema = CreativeWorkSchema.extend({
|
|
1506
|
-
"@type":
|
|
1812
|
+
"@type": z39.literal("DiscussionForumPosting").default("DiscussionForumPosting"),
|
|
1507
1813
|
// Required by Google:
|
|
1508
|
-
headline:
|
|
1814
|
+
headline: z39.string(),
|
|
1509
1815
|
author: PersonOrOrgRef,
|
|
1510
1816
|
// Recommended:
|
|
1511
|
-
text:
|
|
1512
|
-
datePublished:
|
|
1817
|
+
text: z39.string().optional(),
|
|
1818
|
+
datePublished: z39.string().optional(),
|
|
1819
|
+
// ISO 8601
|
|
1820
|
+
dateModified: z39.string().optional(),
|
|
1513
1821
|
// ISO 8601
|
|
1514
|
-
url:
|
|
1515
|
-
comment:
|
|
1516
|
-
"@type":
|
|
1517
|
-
text:
|
|
1822
|
+
url: z39.string().url().optional(),
|
|
1823
|
+
comment: z39.array(z39.object({
|
|
1824
|
+
"@type": z39.literal("Comment").default("Comment"),
|
|
1825
|
+
text: z39.string(),
|
|
1518
1826
|
author: PersonOrOrgRef.optional(),
|
|
1519
|
-
datePublished:
|
|
1520
|
-
upvoteCount:
|
|
1521
|
-
downvoteCount:
|
|
1522
|
-
url:
|
|
1827
|
+
datePublished: z39.string().optional(),
|
|
1828
|
+
upvoteCount: z39.number().int().nonnegative().optional(),
|
|
1829
|
+
downvoteCount: z39.number().int().nonnegative().optional(),
|
|
1830
|
+
url: z39.string().url().optional()
|
|
1523
1831
|
})).optional(),
|
|
1524
|
-
commentCount:
|
|
1525
|
-
upvoteCount:
|
|
1526
|
-
downvoteCount:
|
|
1832
|
+
commentCount: z39.number().int().nonnegative().optional(),
|
|
1833
|
+
upvoteCount: z39.number().int().nonnegative().optional(),
|
|
1834
|
+
downvoteCount: z39.number().int().nonnegative().optional(),
|
|
1527
1835
|
image: ImageOrUrl.optional(),
|
|
1836
|
+
/** "published", "draft", "deleted" — or a schema.org enum URL */
|
|
1837
|
+
creativeWorkStatus: z39.string().optional(),
|
|
1838
|
+
mainEntityOfPage: z39.union([z39.string().url(), z39.object({}).catchall(z39.unknown())]).optional(),
|
|
1528
1839
|
// For reposts:
|
|
1529
|
-
sharedContent:
|
|
1530
|
-
() =>
|
|
1840
|
+
sharedContent: z39.lazy(
|
|
1841
|
+
() => z39.object({ "@type": z39.string() }).catchall(z39.unknown())
|
|
1531
1842
|
).optional(),
|
|
1532
|
-
interactionStatistic:
|
|
1533
|
-
"@type": z35.literal("InteractionCounter").default("InteractionCounter"),
|
|
1534
|
-
interactionType: z35.string(),
|
|
1535
|
-
userInteractionCount: z35.number().int().nonnegative()
|
|
1536
|
-
})).optional()
|
|
1843
|
+
interactionStatistic: z39.union([InteractionCounterSchema, z39.array(InteractionCounterSchema)]).optional()
|
|
1537
1844
|
});
|
|
1538
1845
|
var createDiscussionForumPosting = makeFactory(DiscussionForumPostingSchema);
|
|
1539
1846
|
|
|
1540
1847
|
// src/types/intangibles/ItemList.ts
|
|
1541
|
-
import { z as
|
|
1542
|
-
var ListItemSchema =
|
|
1543
|
-
"@type":
|
|
1544
|
-
position:
|
|
1545
|
-
url:
|
|
1546
|
-
name:
|
|
1848
|
+
import { z as z40 } from "zod";
|
|
1849
|
+
var ListItemSchema = z40.object({
|
|
1850
|
+
"@type": z40.literal("ListItem").default("ListItem"),
|
|
1851
|
+
position: z40.number().int().positive(),
|
|
1852
|
+
url: z40.url().optional(),
|
|
1853
|
+
name: z40.string().optional(),
|
|
1547
1854
|
// item: the actual entity being listed (loose ref to any schema node)
|
|
1548
|
-
item:
|
|
1549
|
-
() =>
|
|
1855
|
+
item: z40.lazy(
|
|
1856
|
+
() => z40.object({ "@type": z40.string() }).catchall(z40.unknown())
|
|
1550
1857
|
).optional()
|
|
1551
1858
|
});
|
|
1552
|
-
var ItemListSchema =
|
|
1553
|
-
"@type":
|
|
1554
|
-
name:
|
|
1555
|
-
description:
|
|
1556
|
-
url:
|
|
1557
|
-
itemListOrder:
|
|
1558
|
-
numberOfItems:
|
|
1559
|
-
itemListElement:
|
|
1560
|
-
|
|
1859
|
+
var ItemListSchema = z40.object({
|
|
1860
|
+
"@type": z40.literal("ItemList").default("ItemList"),
|
|
1861
|
+
name: z40.string().optional(),
|
|
1862
|
+
description: z40.string().optional(),
|
|
1863
|
+
url: z40.url().optional(),
|
|
1864
|
+
itemListOrder: z40.enum(["Ascending", "Descending", "Unordered"]).transform((v) => `https://schema.org/ItemListOrder${v}`).optional(),
|
|
1865
|
+
numberOfItems: z40.number().int().nonnegative().optional(),
|
|
1866
|
+
itemListElement: z40.array(
|
|
1867
|
+
z40.union([
|
|
1561
1868
|
ListItemSchema,
|
|
1562
|
-
|
|
1869
|
+
z40.object({ "@type": z40.string() }).catchall(z40.unknown())
|
|
1563
1870
|
])
|
|
1564
1871
|
)
|
|
1565
1872
|
});
|
|
1566
1873
|
var createItemList = makeFactory(ItemListSchema);
|
|
1567
1874
|
|
|
1568
1875
|
// src/types/intangibles/ProfilePage.ts
|
|
1569
|
-
import { z as
|
|
1876
|
+
import { z as z41 } from "zod";
|
|
1570
1877
|
var ProfilePageSchema = WebPageSchema.extend({
|
|
1571
|
-
"@type":
|
|
1878
|
+
"@type": z41.literal("ProfilePage").default("ProfilePage"),
|
|
1572
1879
|
// mainEntity: the person or org this profile is about (loose ref to avoid circular imports)
|
|
1573
|
-
mainEntity:
|
|
1574
|
-
() =>
|
|
1880
|
+
mainEntity: z41.lazy(
|
|
1881
|
+
() => z41.object({ "@type": z41.string() }).catchall(z41.unknown())
|
|
1575
1882
|
).optional(),
|
|
1576
1883
|
// hasPart: content published by/about this profile subject
|
|
1577
|
-
hasPart:
|
|
1578
|
-
|
|
1884
|
+
hasPart: z41.array(
|
|
1885
|
+
z41.lazy(() => z41.object({ "@type": z41.string() }).catchall(z41.unknown()))
|
|
1579
1886
|
).optional(),
|
|
1580
|
-
dateCreated:
|
|
1581
|
-
dateModified:
|
|
1887
|
+
dateCreated: z41.string().optional(),
|
|
1888
|
+
dateModified: z41.string().optional()
|
|
1582
1889
|
});
|
|
1583
1890
|
var createProfilePage = makeFactory(ProfilePageSchema);
|
|
1584
1891
|
|
|
1585
1892
|
// src/types/lodging/VacationRental.ts
|
|
1586
|
-
import { z as
|
|
1587
|
-
var BedTypeEnum =
|
|
1588
|
-
"
|
|
1589
|
-
"
|
|
1590
|
-
"
|
|
1591
|
-
"
|
|
1592
|
-
"
|
|
1593
|
-
"
|
|
1594
|
-
"
|
|
1595
|
-
"Waterbed",
|
|
1596
|
-
"Toddler bed"
|
|
1893
|
+
import { z as z42 } from "zod";
|
|
1894
|
+
var BedTypeEnum = z42.enum([
|
|
1895
|
+
"CaliforniaKing",
|
|
1896
|
+
"King",
|
|
1897
|
+
"Queen",
|
|
1898
|
+
"Full",
|
|
1899
|
+
"Double",
|
|
1900
|
+
"SemiDouble",
|
|
1901
|
+
"Single"
|
|
1597
1902
|
]);
|
|
1598
|
-
var BedDetailsSchema =
|
|
1599
|
-
"@type":
|
|
1600
|
-
numberOfBeds:
|
|
1601
|
-
typeOfBed:
|
|
1602
|
-
});
|
|
1603
|
-
var LocationFeatureSpecificationSchema =
|
|
1604
|
-
"@type":
|
|
1605
|
-
name:
|
|
1606
|
-
value:
|
|
1607
|
-
});
|
|
1608
|
-
var AccommodationSchema =
|
|
1609
|
-
"@type":
|
|
1610
|
-
name:
|
|
1611
|
-
occupancy:
|
|
1612
|
-
"@type":
|
|
1613
|
-
value:
|
|
1614
|
-
maxValue:
|
|
1615
|
-
minValue:
|
|
1903
|
+
var BedDetailsSchema = z42.object({
|
|
1904
|
+
"@type": z42.literal("BedDetails").default("BedDetails"),
|
|
1905
|
+
numberOfBeds: z42.number().int().positive().optional(),
|
|
1906
|
+
typeOfBed: z42.union([BedTypeEnum, z42.string()]).optional()
|
|
1907
|
+
});
|
|
1908
|
+
var LocationFeatureSpecificationSchema = z42.object({
|
|
1909
|
+
"@type": z42.literal("LocationFeatureSpecification").default("LocationFeatureSpecification"),
|
|
1910
|
+
name: z42.string(),
|
|
1911
|
+
value: z42.union([z42.boolean(), z42.string(), z42.number()]).optional()
|
|
1912
|
+
});
|
|
1913
|
+
var AccommodationSchema = z42.object({
|
|
1914
|
+
"@type": z42.literal("Accommodation").default("Accommodation"),
|
|
1915
|
+
name: z42.string().optional(),
|
|
1916
|
+
occupancy: z42.object({
|
|
1917
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1918
|
+
value: z42.number().int().positive().optional(),
|
|
1919
|
+
maxValue: z42.number().int().positive().optional(),
|
|
1920
|
+
minValue: z42.number().int().positive().optional()
|
|
1616
1921
|
}).optional(),
|
|
1617
|
-
numberOfRooms:
|
|
1618
|
-
numberOfBedrooms:
|
|
1619
|
-
numberOfBathroomsTotal:
|
|
1620
|
-
floorSize:
|
|
1621
|
-
"@type":
|
|
1622
|
-
value:
|
|
1922
|
+
numberOfRooms: z42.number().int().nonnegative().optional(),
|
|
1923
|
+
numberOfBedrooms: z42.number().int().nonnegative().optional(),
|
|
1924
|
+
numberOfBathroomsTotal: z42.number().int().nonnegative().optional(),
|
|
1925
|
+
floorSize: z42.object({
|
|
1926
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1927
|
+
value: z42.number(),
|
|
1623
1928
|
/** "MTK" = sq metres, "FTK" = sq ft */
|
|
1624
|
-
unitCode:
|
|
1929
|
+
unitCode: z42.string().optional()
|
|
1625
1930
|
}).optional(),
|
|
1626
|
-
bed:
|
|
1627
|
-
amenityFeature:
|
|
1931
|
+
bed: z42.union([BedDetailsSchema, z42.array(BedDetailsSchema)]).optional(),
|
|
1932
|
+
amenityFeature: z42.union([
|
|
1628
1933
|
LocationFeatureSpecificationSchema,
|
|
1629
|
-
|
|
1934
|
+
z42.array(LocationFeatureSpecificationSchema)
|
|
1630
1935
|
]).optional(),
|
|
1631
|
-
petsAllowed:
|
|
1632
|
-
url:
|
|
1936
|
+
petsAllowed: z42.union([z42.boolean(), z42.string()]).optional(),
|
|
1937
|
+
url: z42.string().url().optional(),
|
|
1938
|
+
/** "EntirePlace", "PrivateRoom", or "SharedRoom" */
|
|
1939
|
+
additionalType: z42.string().optional()
|
|
1633
1940
|
});
|
|
1634
1941
|
var VacationRentalSchema = LocalBusinessSchema.extend({
|
|
1635
|
-
"@type":
|
|
1942
|
+
"@type": z42.literal("VacationRental").default("VacationRental"),
|
|
1636
1943
|
// Required by Google:
|
|
1637
|
-
name:
|
|
1944
|
+
name: z42.string(),
|
|
1638
1945
|
// Recommended by Google:
|
|
1639
|
-
description:
|
|
1640
|
-
image:
|
|
1946
|
+
description: z42.string().optional(),
|
|
1947
|
+
image: z42.union([ImageOrUrl, z42.array(ImageOrUrl)]).optional(),
|
|
1641
1948
|
// Lodging-specific:
|
|
1642
|
-
petsAllowed:
|
|
1643
|
-
checkinTime:
|
|
1949
|
+
petsAllowed: z42.union([z42.boolean(), z42.string()]).optional(),
|
|
1950
|
+
checkinTime: z42.string().optional(),
|
|
1644
1951
|
// e.g. "15:00"
|
|
1645
|
-
checkoutTime:
|
|
1952
|
+
checkoutTime: z42.string().optional(),
|
|
1646
1953
|
// e.g. "11:00"
|
|
1647
|
-
numberOfRooms:
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
"@type":
|
|
1651
|
-
value:
|
|
1954
|
+
numberOfRooms: z42.union([
|
|
1955
|
+
z42.number(),
|
|
1956
|
+
z42.object({
|
|
1957
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1958
|
+
value: z42.number()
|
|
1652
1959
|
})
|
|
1653
1960
|
]).optional(),
|
|
1654
|
-
occupancy:
|
|
1655
|
-
"@type":
|
|
1656
|
-
maxValue:
|
|
1657
|
-
minValue:
|
|
1961
|
+
occupancy: z42.object({
|
|
1962
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1963
|
+
maxValue: z42.number(),
|
|
1964
|
+
minValue: z42.number().optional()
|
|
1658
1965
|
}).optional(),
|
|
1659
|
-
starRating:
|
|
1660
|
-
"@type":
|
|
1661
|
-
ratingValue:
|
|
1966
|
+
starRating: z42.object({
|
|
1967
|
+
"@type": z42.literal("Rating").default("Rating"),
|
|
1968
|
+
ratingValue: z42.number().min(0).max(5)
|
|
1662
1969
|
}).optional(),
|
|
1663
|
-
offers:
|
|
1664
|
-
leaseLength:
|
|
1665
|
-
"@type":
|
|
1666
|
-
value:
|
|
1667
|
-
unitCode:
|
|
1970
|
+
offers: z42.union([OfferSchema, z42.array(OfferSchema)]).optional(),
|
|
1971
|
+
leaseLength: z42.union([z42.string(), z42.object({
|
|
1972
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1973
|
+
value: z42.number(),
|
|
1974
|
+
unitCode: z42.string().optional()
|
|
1668
1975
|
})]).optional(),
|
|
1669
|
-
floorSize:
|
|
1670
|
-
"@type":
|
|
1671
|
-
value:
|
|
1672
|
-
unitCode:
|
|
1976
|
+
floorSize: z42.object({
|
|
1977
|
+
"@type": z42.literal("QuantitativeValue").default("QuantitativeValue"),
|
|
1978
|
+
value: z42.number(),
|
|
1979
|
+
unitCode: z42.string().optional()
|
|
1673
1980
|
// e.g. "MTK" (square meters), "FTK" (sq ft)
|
|
1674
1981
|
}).optional(),
|
|
1675
|
-
numberOfBathroomsTotal:
|
|
1676
|
-
numberOfBedrooms:
|
|
1677
|
-
tourBookingPage:
|
|
1982
|
+
numberOfBathroomsTotal: z42.number().int().nonnegative().optional(),
|
|
1983
|
+
numberOfBedrooms: z42.number().int().nonnegative().optional(),
|
|
1984
|
+
tourBookingPage: z42.url().optional(),
|
|
1678
1985
|
/** Accommodation unit(s) within the rental property — required by Google */
|
|
1679
|
-
containsPlace:
|
|
1986
|
+
containsPlace: z42.union([AccommodationSchema, z42.array(AccommodationSchema)]).optional(),
|
|
1987
|
+
brand: z42.union([
|
|
1988
|
+
z42.string(),
|
|
1989
|
+
z42.object({
|
|
1990
|
+
"@type": z42.union([z42.literal("Brand"), z42.literal("Organization")]),
|
|
1991
|
+
name: z42.string()
|
|
1992
|
+
})
|
|
1993
|
+
]).optional(),
|
|
1994
|
+
/** Language(s) the host speaks — ISO 639-1 codes or language names */
|
|
1995
|
+
knowsLanguage: z42.union([z42.string(), z42.array(z42.string())]).optional(),
|
|
1996
|
+
/** "EntirePlace", "PrivateRoom", or "SharedRoom" */
|
|
1997
|
+
additionalType: z42.string().optional()
|
|
1680
1998
|
});
|
|
1681
1999
|
var createVacationRental = makeFactory(VacationRentalSchema);
|
|
1682
2000
|
|
|
@@ -1703,6 +2021,7 @@ var REGISTRY = {
|
|
|
1703
2021
|
Course: CourseSchema,
|
|
1704
2022
|
SoftwareApplication: SoftwareApplicationSchema,
|
|
1705
2023
|
MathSolver: MathSolverSchema,
|
|
2024
|
+
ClaimReview: ClaimReviewSchema,
|
|
1706
2025
|
// Intangibles
|
|
1707
2026
|
Language: LanguageSchema,
|
|
1708
2027
|
PronounceableText: PronounceableTextSchema,
|
|
@@ -1776,15 +2095,15 @@ function createGraph(nodes) {
|
|
|
1776
2095
|
}
|
|
1777
2096
|
|
|
1778
2097
|
// src/helpers/breadcrumb.ts
|
|
1779
|
-
import { z as
|
|
1780
|
-
var BreadcrumbListSchema =
|
|
1781
|
-
"@type":
|
|
1782
|
-
itemListElement:
|
|
1783
|
-
|
|
1784
|
-
"@type":
|
|
1785
|
-
position:
|
|
1786
|
-
name:
|
|
1787
|
-
item:
|
|
2098
|
+
import { z as z43 } from "zod";
|
|
2099
|
+
var BreadcrumbListSchema = z43.object({
|
|
2100
|
+
"@type": z43.literal("BreadcrumbList").default("BreadcrumbList"),
|
|
2101
|
+
itemListElement: z43.array(
|
|
2102
|
+
z43.object({
|
|
2103
|
+
"@type": z43.literal("ListItem").default("ListItem"),
|
|
2104
|
+
position: z43.number().int().positive(),
|
|
2105
|
+
name: z43.string(),
|
|
2106
|
+
item: z43.url().optional()
|
|
1788
2107
|
})
|
|
1789
2108
|
)
|
|
1790
2109
|
});
|
|
@@ -1863,6 +2182,7 @@ export {
|
|
|
1863
2182
|
AccommodationSchema,
|
|
1864
2183
|
AggregateOfferSchema,
|
|
1865
2184
|
AggregateRatingSchema,
|
|
2185
|
+
AlignmentObjectSchema,
|
|
1866
2186
|
AnswerSchema,
|
|
1867
2187
|
ApplicationCategory,
|
|
1868
2188
|
ArticleSchema,
|
|
@@ -1875,6 +2195,8 @@ export {
|
|
|
1875
2195
|
BorrowActionSchema,
|
|
1876
2196
|
BroadcastEventSchema,
|
|
1877
2197
|
CertificationSchema,
|
|
2198
|
+
ClaimReviewSchema,
|
|
2199
|
+
ClaimSchema,
|
|
1878
2200
|
ClipSchema,
|
|
1879
2201
|
ContactPointSchema,
|
|
1880
2202
|
CourseInstanceSchema,
|
|
@@ -1895,14 +2217,19 @@ export {
|
|
|
1895
2217
|
HowToStepSchema,
|
|
1896
2218
|
ImageObjectSchema,
|
|
1897
2219
|
ImageOrUrl,
|
|
2220
|
+
InteractionCounterSchema,
|
|
1898
2221
|
ItemAvailability,
|
|
2222
|
+
ItemCondition,
|
|
1899
2223
|
ItemListSchema,
|
|
1900
2224
|
JobPostingSchema,
|
|
1901
2225
|
LanguageSchema,
|
|
1902
2226
|
ListItemSchema,
|
|
1903
2227
|
LocalBusinessSchema,
|
|
1904
2228
|
MathSolverSchema,
|
|
2229
|
+
MemberProgramSchema,
|
|
2230
|
+
MemberProgramTierSchema,
|
|
1905
2231
|
MerchantReturnPolicySchema,
|
|
2232
|
+
MerchantReturnPolicySeasonalOverrideSchema,
|
|
1906
2233
|
MonetaryAmountSchema,
|
|
1907
2234
|
MovieSchema,
|
|
1908
2235
|
NewsArticleSchema,
|
|
@@ -1911,6 +2238,7 @@ export {
|
|
|
1911
2238
|
OfferShippingDetailsSchema,
|
|
1912
2239
|
OpeningHoursSpecificationSchema,
|
|
1913
2240
|
OrganizationSchema,
|
|
2241
|
+
PeopleAudienceSchema,
|
|
1914
2242
|
PersonOrOrgRef,
|
|
1915
2243
|
PersonSchema,
|
|
1916
2244
|
PlaceSchema,
|
|
@@ -1930,11 +2258,17 @@ export {
|
|
|
1930
2258
|
ReviewSchema,
|
|
1931
2259
|
SchemaGraph,
|
|
1932
2260
|
SchemaNode,
|
|
2261
|
+
SeekToActionSchema,
|
|
2262
|
+
ServicePeriodSchema,
|
|
2263
|
+
ShippingConditionsSchema,
|
|
1933
2264
|
ShippingDeliveryTimeSchema,
|
|
2265
|
+
ShippingServiceSchema,
|
|
2266
|
+
SizeSpecificationSchema,
|
|
1934
2267
|
SoftwareApplicationSchema,
|
|
1935
2268
|
SolveMathActionSchema,
|
|
1936
2269
|
ThingSchema,
|
|
1937
2270
|
ThreeDModelSchema,
|
|
2271
|
+
UnitPriceSpecificationSchema,
|
|
1938
2272
|
VacationRentalSchema,
|
|
1939
2273
|
VideoObjectSchema,
|
|
1940
2274
|
WebPageSchema,
|
|
@@ -1944,6 +2278,7 @@ export {
|
|
|
1944
2278
|
createBook,
|
|
1945
2279
|
createBreadcrumbList,
|
|
1946
2280
|
createCarousel,
|
|
2281
|
+
createClaimReview,
|
|
1947
2282
|
createCorporation,
|
|
1948
2283
|
createCourse,
|
|
1949
2284
|
createDataset,
|