@unhead/schema-org 1.8.9 → 1.8.11

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.
@@ -1,29 +1,136 @@
1
1
  import * as _unhead_schema from '@unhead/schema';
2
2
 
3
+ type DayOfWeek = 'Friday' | 'Monday' | 'PublicHolidays' | 'Saturday' | 'Sunday' | 'Thursday' | 'Tuesday' | 'Wednesday';
4
+ type Time = `${number}${number}:${number}${number}`;
5
+ interface OpeningHoursSimple extends Thing {
6
+ '@type'?: 'OpeningHoursSpecification';
7
+ /**
8
+ * The day of the week for which these opening hours are valid.
9
+ */
10
+ 'dayOfWeek': Arrayable<DayOfWeek>;
11
+ /**
12
+ * The opening hour of the place or service on the given day(s) of the week.
13
+ */
14
+ 'opens'?: Time;
15
+ /**
16
+ * The closing hour of the place or service on the given day(s) of the week.
17
+ */
18
+ 'closes'?: Time;
19
+ /**
20
+ * The date when the item becomes valid.
21
+ */
22
+ 'validFrom'?: ResolvableDate;
23
+ /**
24
+ * The date after when the item is not valid. For example, the end of an offer, salary period, or a period of opening hours.
25
+ */
26
+ 'validThrough'?: ResolvableDate;
27
+ }
28
+ interface OpeningHoursSpecification extends OpeningHoursSimple {
29
+ }
30
+ declare const openingHoursResolver: SchemaOrgNodeDefinition<OpeningHoursSpecification>;
31
+
32
+ interface MonetaryAmountSimple extends Thing {
33
+ /**
34
+ * The currency in which the monetary amount is expressed.
35
+ */
36
+ currency: string;
37
+ /**
38
+ * The value of the quantitative value or property value node.
39
+ */
40
+ value: number | QuantitativeValue;
41
+ }
42
+ interface MonetaryAmount extends MonetaryAmountSimple {
43
+ }
44
+ interface QuantitativeSimple extends Thing {
45
+ value?: number;
46
+ minValue?: number;
47
+ maxValue?: number;
48
+ unitCode?: string;
49
+ unitText?: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
50
+ }
51
+ interface QuantitativeValue extends QuantitativeSimple {
52
+ }
53
+
54
+ interface ShippingDeliveryTime extends Thing {
55
+ /**
56
+ * The typical delay between the receipt of the order and the goods leaving the warehouse.
57
+ */
58
+ handlingTime?: QuantitativeValue;
59
+ /**
60
+ * The typical delay between when the order has been sent for delivery and when the goods reach the final customer.
61
+ */
62
+ transitTime?: QuantitativeValue;
63
+ }
64
+
65
+ interface DefinedRegion extends Thing {
66
+ /**
67
+ * The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1) format.
68
+ */
69
+ addressCountry: string;
70
+ /**
71
+ * If you include this property, the region must be a 2- or 3-digit ISO 3166-2 subdivision code, without country prefix. Currently, Google Search only supports the US, Australia, and Japan. Examples: "NY" (for US, state of New York), "NSW" (for Australia, state of New South Wales), or "03" (for Japan, Iwate prefecture).
72
+ *
73
+ * Do not provide both a region and postal code information.
74
+ */
75
+ addressRegion?: string;
76
+ /**
77
+ * The postal code. For example, 94043. Currently postal codes are supported for Australia, Canada, and the US.
78
+ */
79
+ postalCode?: string;
80
+ }
81
+
82
+ interface OfferShippingDetails extends Thing {
83
+ '@type'?: 'OfferShippingDetails';
84
+ /**
85
+ * The total delay between the receipt of the order and the goods reaching the final customer.
86
+ */
87
+ 'deliveryTime': ShippingDeliveryTime;
88
+ 'shippingDestination': DefinedRegion;
89
+ /**
90
+ * Information about the cost of shipping to the specified destination. At least one of shippingRate.value or shippingRate.maxValue must be specified, along with shippingRate.currency.
91
+ *
92
+ * You can only specify one shippingRate per OfferShippingDetails property. To indicate multiple rates for your product, specify multiple OfferShippingDetail properties.
93
+ */
94
+ 'shippingRate': MonetaryAmount;
95
+ }
96
+
3
97
  type ItemAvailability = 'BackOrder' | 'Discontinued' | 'InStock' | 'InStoreOnly' | 'LimitedAvailability' | 'OnlineOnly' | 'OutOfStock' | 'PreOrder' | 'PreSale' | 'SoldOut';
98
+ type OfferItemCondition = 'NewCondition' | 'RefurbishedCondition' | 'UsedCondition';
4
99
  interface OfferSimple extends Thing {
5
100
  '@type'?: 'Offer';
101
+ /**
102
+ * Condition of the item offered for sale.
103
+ */
104
+ 'itemCondition'?: OptionalSchemaOrgPrefix<OfferItemCondition>;
6
105
  /**
7
106
  * A schema.org URL representing a schema itemAvailability value (e.g., https://schema.org/OutOfStock).
8
107
  */
9
- availability?: OptionalSchemaOrgPrefix<ItemAvailability>;
108
+ 'availability'?: OptionalSchemaOrgPrefix<ItemAvailability>;
10
109
  /**
11
110
  * The price, omitting any currency symbols, and using '.' to indicate a decimal place.
12
111
  */
13
- price: number | string;
112
+ 'price': number | string;
14
113
  /**
15
114
  * The currency used to describe the product price, in three-letter ISO 4217 format.
16
115
  */
17
- priceCurrency?: string;
116
+ 'priceCurrency'?: string;
18
117
  /**
19
118
  * @todo A PriceSpecification object, including a valueAddedTaxIncluded property (of either true or false).
20
119
  */
21
- priceSpecification?: unknown;
120
+ 'priceSpecification'?: unknown;
22
121
  /**
23
122
  * The date after which the price is no longer available.
24
123
  */
25
- priceValidUntil?: ResolvableDate;
26
- url?: string;
124
+ 'priceValidUntil'?: ResolvableDate;
125
+ 'url'?: string;
126
+ /**
127
+ * Nested information about the return policies associated with an Offer. If you decide to add hasMerchantReturnPolicy, add the required and recommended MerchantReturnPolicy properties.
128
+ */
129
+ 'hasMerchantReturnPolicy'?: NodeRelation<OpeningHoursSpecification>;
130
+ /**
131
+ * Nested information about the shipping policies and options associated with an Offer. If you decide to add shippingDetails, add the required and recommended OfferShippingDetails properties.
132
+ */
133
+ 'shippingDetails'?: OfferShippingDetails;
27
134
  }
28
135
  interface Offer extends OfferSimple {
29
136
  }
@@ -60,11 +167,11 @@ interface AggregateRatingSimple extends Thing {
60
167
  /**
61
168
  * The total number of ratings for the item on your site. At least one of ratingCount or reviewCount is required.
62
169
  */
63
- ratingCount?: number | string;
170
+ 'ratingCount'?: number | string;
64
171
  /**
65
172
  * Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required.
66
173
  */
67
- reviewCount?: number | string;
174
+ 'reviewCount'?: number | string;
68
175
  /**
69
176
  * A numerical quality rating for the item, either a number, fraction, or percentage
70
177
  * (for example, "4", "60%", or "6 / 10").
@@ -73,15 +180,15 @@ interface AggregateRatingSimple extends Thing {
73
180
  * The default scale for numbers is a 5-point scale, where 1 is the lowest value and 5 is the highest value.
74
181
  * If another scale is intended, use bestRating and worstRating.
75
182
  */
76
- ratingValue: number | string;
183
+ 'ratingValue': number | string;
77
184
  /**
78
185
  * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.
79
186
  */
80
- bestRating?: number | string;
187
+ 'bestRating'?: number | string;
81
188
  /**
82
189
  * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.
83
190
  */
84
- worstRating?: number | string;
191
+ 'worstRating'?: number | string;
85
192
  }
86
193
  interface AggregateRating extends AggregateRatingSimple {
87
194
  }
@@ -303,7 +410,7 @@ interface SearchAction {
303
410
  * An object of type EntryPoint, with a relative URL which describes the URL pattern of the internal search function
304
411
  * (e.g., /search?query={search_term_string}).
305
412
  */
306
- target: SearchTarget | {
413
+ 'target': SearchTarget | {
307
414
  '@type'?: 'EntryPoint';
308
415
  'urlTemplate'?: SearchTarget;
309
416
  };
@@ -438,17 +545,17 @@ interface ListItemSimple extends Thing {
438
545
  /**
439
546
  * The name of the page in question, as it appears in the breadcrumb navigation.
440
547
  */
441
- name?: string;
548
+ 'name'?: string;
442
549
  /**
443
550
  * The unmodified canonical URL of the page in question.
444
551
  * - If a relative path is provided, it will be resolved to absolute.
445
552
  * - Item is not required for the last entry
446
553
  */
447
- item?: string | Thing;
554
+ 'item'?: string | Thing;
448
555
  /**
449
556
  * An integer (starting at 1), counting the 'depth' of the page from (including) the homepage.
450
557
  */
451
- position?: number;
558
+ 'position'?: number;
452
559
  }
453
560
  interface ListItem extends ListItemSimple {
454
561
  }
@@ -536,7 +643,7 @@ interface ReadAction {
536
643
  * An object of type EntryPoint, with a relative URL which describes the URL pattern of the internal search function
537
644
  * (e.g., /search?query={search_term_string}).
538
645
  */
539
- target: string[];
646
+ 'target': string[];
540
647
  }
541
648
  declare const readActionResolver: SchemaOrgNodeDefinition<ReadAction>;
542
649
 
@@ -740,10 +847,10 @@ declare const courseResolver: SchemaOrgNodeDefinition<Course>;
740
847
 
741
848
  interface PlaceSimple extends Thing {
742
849
  '@type'?: 'Place';
743
- name: string;
744
- address: NodeRelation<PostalAddress | string>;
745
- latitude?: number | string;
746
- longitude?: number | string;
850
+ 'name': string;
851
+ 'address': NodeRelation<PostalAddress | string>;
852
+ 'latitude'?: number | string;
853
+ 'longitude'?: number | string;
747
854
  }
748
855
  interface Place extends PlaceSimple {
749
856
  }
@@ -754,7 +861,7 @@ declare const placeResolver: SchemaOrgNodeDefinition<Place>;
754
861
 
755
862
  interface VirtualLocationSimple extends Thing {
756
863
  '@type'?: 'VirtualLocation';
757
- url: string;
864
+ 'url': string;
758
865
  }
759
866
  interface VirtualLocation extends VirtualLocationSimple {
760
867
  }
@@ -833,78 +940,49 @@ declare const PrimaryEventId = "#event";
833
940
  */
834
941
  declare const eventResolver: SchemaOrgNodeDefinition<Event>;
835
942
 
836
- type DayOfWeek = 'Friday' | 'Monday' | 'PublicHolidays' | 'Saturday' | 'Sunday' | 'Thursday' | 'Tuesday' | 'Wednesday';
837
- type Time = `${number}${number}:${number}${number}`;
838
- interface OpeningHoursSimple extends Thing {
839
- '@type'?: 'OpeningHoursSpecification';
840
- /**
841
- * The day of the week for which these opening hours are valid.
842
- */
843
- dayOfWeek: Arrayable<DayOfWeek>;
844
- /**
845
- * The opening hour of the place or service on the given day(s) of the week.
846
- */
847
- opens?: Time;
848
- /**
849
- * The closing hour of the place or service on the given day(s) of the week.
850
- */
851
- closes?: Time;
852
- /**
853
- * The date when the item becomes valid.
854
- */
855
- validFrom?: ResolvableDate;
856
- /**
857
- * The date after when the item is not valid. For example, the end of an offer, salary period, or a period of opening hours.
858
- */
859
- validThrough?: ResolvableDate;
860
- }
861
- interface OpeningHoursSpecification extends OpeningHoursSimple {
862
- }
863
- declare const openingHoursResolver: SchemaOrgNodeDefinition<OpeningHoursSpecification>;
864
-
865
943
  type ValidLocalBusinessSubTypes = 'AnimalShelter' | 'ArchiveOrganization' | 'AutomotiveBusiness' | 'ChildCare' | 'Dentist' | 'DryCleaningOrLaundry' | 'EmergencyService' | 'EmploymentAgency' | 'EntertainmentBusiness' | 'FinancialService' | 'FoodEstablishment' | 'GovernmentOffice' | 'HealthAndBeautyBusiness' | 'HomeAndConstructionBusiness' | 'InternetCafe' | 'LegalService' | 'Library' | 'LodgingBusiness' | 'MedicalBusiness' | 'ProfessionalService' | 'RadioStation' | 'RealEstateAgent' | 'RecyclingCenter' | 'SelfStorage' | 'ShoppingCenter' | 'SportsActivityLocation' | 'Store' | 'TelevisionStation' | 'TouristInformationCenter' | 'TravelAgency';
866
944
  interface LocalBusinessSimple extends Organization {
867
945
  '@type'?: ['Organization', 'LocalBusiness'] | ['Organization', 'LocalBusiness', ValidLocalBusinessSubTypes] | ValidLocalBusinessSubTypes;
868
946
  /**
869
947
  * The primary public telephone number of the business.
870
948
  */
871
- telephone?: string;
949
+ 'telephone'?: string;
872
950
  /**
873
951
  * The primary public email address of the business.
874
952
  */
875
- email?: string;
953
+ 'email'?: string;
876
954
  /**
877
955
  * The primary public fax number of the business.
878
956
  */
879
- faxNumber?: string;
957
+ 'faxNumber'?: string;
880
958
  /**
881
959
  * The price range of the business, represented by a string of dollar symbols (e.g., $, $$, or $$$ ).
882
960
  */
883
- priceRange?: string;
961
+ 'priceRange'?: string;
884
962
  /**
885
963
  * An array of GeoShape, Place or string definitions.
886
964
  */
887
- areaServed?: unknown;
965
+ 'areaServed'?: unknown;
888
966
  /**
889
967
  * A GeoCoordinates object.
890
968
  */
891
- geo?: unknown;
969
+ 'geo'?: unknown;
892
970
  /**
893
971
  * The VAT ID of the business.
894
972
  */
895
- vatID?: string;
973
+ 'vatID'?: string;
896
974
  /**
897
975
  * The tax ID of the business.
898
976
  */
899
- taxID?: string;
977
+ 'taxID'?: string;
900
978
  /**
901
979
  * The currency accepted.
902
980
  */
903
- currenciesAccepted?: string;
981
+ 'currenciesAccepted'?: string;
904
982
  /**
905
983
  * The operating hours of the business.
906
984
  */
907
- openingHoursSpecification?: NodeRelations<OpeningHoursSpecification>;
985
+ 'openingHoursSpecification'?: NodeRelations<OpeningHoursSpecification>;
908
986
  }
909
987
  interface LocalBusiness extends LocalBusinessSimple {
910
988
  }
@@ -924,15 +1002,15 @@ interface RatingSimple extends Thing {
924
1002
  * The default scale for numbers is a 5-point scale, where 1 is the lowest value and 5 is the highest value.
925
1003
  * If another scale is intended, use bestRating and worstRating.
926
1004
  */
927
- ratingValue: number | string;
1005
+ 'ratingValue': number | string;
928
1006
  /**
929
1007
  * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.
930
1008
  */
931
- bestRating?: number;
1009
+ 'bestRating'?: number;
932
1010
  /**
933
1011
  * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.
934
1012
  */
935
- worstRating?: number;
1013
+ 'worstRating'?: number;
936
1014
  }
937
1015
  interface Rating extends RatingSimple {
938
1016
  }
@@ -944,19 +1022,19 @@ interface FoodEstablishmentSimple extends Omit<LocalBusiness, '@type'> {
944
1022
  /**
945
1023
  * Indicates whether a FoodEstablishment accepts reservations.
946
1024
  */
947
- acceptsReservations?: string | boolean;
1025
+ 'acceptsReservations'?: string | boolean;
948
1026
  /**
949
1027
  * URL of the menu.
950
1028
  */
951
- hasMenu?: string;
1029
+ 'hasMenu'?: string;
952
1030
  /**
953
1031
  * The cuisine of the restaurant.
954
1032
  */
955
- servesCuisine?: string;
1033
+ 'servesCuisine'?: string;
956
1034
  /**
957
1035
  * An official rating for a lodging business or food establishment
958
1036
  */
959
- starRating?: NodeRelations<Rating>;
1037
+ 'starRating'?: NodeRelations<Rating>;
960
1038
  }
961
1039
  interface FoodEstablishment extends FoodEstablishmentSimple {
962
1040
  }
@@ -1068,27 +1146,6 @@ declare const HowToId = "#howto";
1068
1146
  */
1069
1147
  declare const howToResolver: SchemaOrgNodeDefinition<HowTo>;
1070
1148
 
1071
- interface MonetaryAmountSimple extends Thing {
1072
- /**
1073
- * The currency in which the monetary amount is expressed.
1074
- */
1075
- currency: string;
1076
- /**
1077
- * The value of the quantitative value or property value node.
1078
- */
1079
- value: QuantitativeValue;
1080
- }
1081
- interface MonetaryAmount extends MonetaryAmountSimple {
1082
- }
1083
- interface QuantitativeSimple extends Thing {
1084
- value?: number;
1085
- minValue?: number;
1086
- maxValue?: number;
1087
- unitText: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
1088
- }
1089
- interface QuantitativeValue extends QuantitativeSimple {
1090
- }
1091
-
1092
1149
  /**
1093
1150
  * A listing that describes a job opening in a certain organization.
1094
1151
  */
@@ -1397,7 +1454,7 @@ interface NutritionInformation extends Thing {
1397
1454
  /**
1398
1455
  * A calorie count as a string (e.g., "270 calories").
1399
1456
  */
1400
- calories: string;
1457
+ 'calories': string;
1401
1458
  }
1402
1459
  declare const RecipeId = "#recipe";
1403
1460
  declare const recipeResolver: SchemaOrgNodeDefinition<Recipe>;
@@ -1408,29 +1465,29 @@ interface SoftwareAppSimple extends Thing {
1408
1465
  /**
1409
1466
  * The name of the app.
1410
1467
  */
1411
- name?: string;
1468
+ 'name'?: string;
1412
1469
  /**
1413
1470
  * An offer to sell the app.
1414
1471
  * For developers, offers can indicate the marketplaces that carry the application.
1415
1472
  * For marketplaces, use offers to indicate the price of the app for a specific app instance.
1416
1473
  */
1417
- offers: NodeRelations<Offer>;
1474
+ 'offers': NodeRelations<Offer>;
1418
1475
  /**
1419
1476
  * The average review score of the app.
1420
1477
  */
1421
- aggregateRating?: NodeRelation<AggregateRating>;
1478
+ 'aggregateRating'?: NodeRelation<AggregateRating>;
1422
1479
  /**
1423
1480
  * A single review of the app.
1424
1481
  */
1425
- review?: NodeRelation<Review>;
1482
+ 'review'?: NodeRelation<Review>;
1426
1483
  /**
1427
1484
  * The type of app (for example, BusinessApplication or GameApplication). The value must be a supported app type.
1428
1485
  */
1429
- applicationCategory?: ApplicationCategory;
1486
+ 'applicationCategory'?: ApplicationCategory;
1430
1487
  /**
1431
1488
  * The operating system(s) required to use the app (for example, Windows 7, OSX 10.6, Android 1.6)
1432
1489
  */
1433
- operatingSystem?: string;
1490
+ 'operatingSystem'?: string;
1434
1491
  }
1435
1492
  interface SoftwareApp extends SoftwareAppSimple {
1436
1493
  }
@@ -1516,17 +1573,17 @@ interface Thing {
1516
1573
  /**
1517
1574
  * A reference-by-ID to the WebPage node.
1518
1575
  */
1519
- mainEntityOfPage?: Arrayable<IdReference>;
1576
+ 'mainEntityOfPage'?: Arrayable<IdReference>;
1520
1577
  /**
1521
1578
  * A reference-by-ID to the WebPage node.
1522
1579
  */
1523
- mainEntity?: Arrayable<IdReference>;
1580
+ 'mainEntity'?: Arrayable<IdReference>;
1524
1581
  /**
1525
1582
  * An image object or referenced by ID.
1526
1583
  * - Must be at least 696 pixels wide.
1527
1584
  * - Must be of the following formats+file extensions: .jpg, .png, .gif ,or .webp.
1528
1585
  */
1529
- image?: NodeRelations<ImageObject | string>;
1586
+ 'image'?: NodeRelations<ImageObject | string>;
1530
1587
  /**
1531
1588
  * Allow any arbitrary keys
1532
1589
  */