@voyant-travel/max-sdk 0.2.1 → 0.3.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/dist/cards.d.ts +17 -0
- package/dist/cards.d.ts.map +1 -1
- package/dist/cards.js +27 -0
- package/package.json +1 -1
package/dist/cards.d.ts
CHANGED
|
@@ -690,6 +690,8 @@ export declare const AgentCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
690
690
|
rating: z.ZodOptional<z.ZodNumber>;
|
|
691
691
|
ratingCount: z.ZodOptional<z.ZodNumber>;
|
|
692
692
|
location: z.ZodOptional<z.ZodString>;
|
|
693
|
+
address: z.ZodOptional<z.ZodString>;
|
|
694
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
693
695
|
priceDisplay: z.ZodOptional<z.ZodString>;
|
|
694
696
|
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
695
697
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -718,6 +720,21 @@ export declare const AgentCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
718
720
|
brand: "brand";
|
|
719
721
|
}>>;
|
|
720
722
|
}, z.core.$strip>], "kind">>>;
|
|
723
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
724
|
+
kind: z.ZodLiteral<"restaurantList">;
|
|
725
|
+
title: z.ZodOptional<z.ZodString>;
|
|
726
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
727
|
+
items: z.ZodArray<z.ZodObject<{
|
|
728
|
+
name: z.ZodString;
|
|
729
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
730
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
731
|
+
ratingCount: z.ZodOptional<z.ZodNumber>;
|
|
732
|
+
priceLevel: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
cuisine: z.ZodOptional<z.ZodString>;
|
|
734
|
+
address: z.ZodOptional<z.ZodString>;
|
|
735
|
+
openNow: z.ZodOptional<z.ZodBoolean>;
|
|
736
|
+
bookUrl: z.ZodOptional<z.ZodString>;
|
|
737
|
+
}, z.core.$strip>>;
|
|
721
738
|
}, z.core.$strip>, z.ZodObject<{
|
|
722
739
|
kind: z.ZodLiteral<"itinerary">;
|
|
723
740
|
title: z.ZodString;
|
package/dist/cards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,UAAU;;;;;;;EAAuE,CAAA;AAC9F,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7C,eAAO,MAAM,WAAW;;;;;;;;;;iBAGtB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;2BAY3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,UAAU;;;;;;;EAAuE,CAAA;AAC9F,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7C,eAAO,MAAM,WAAW;;;;;;;;;;iBAGtB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAA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Card = z.object({
|
|
175
175
|
kind: z.literal("hotel"),
|
|
176
176
|
name: z.string().min(1).max(240),
|
|
177
|
+
/** Hotel class, 0–5 (a "4-star hotel" — distinct from the review rating). */
|
|
177
178
|
stars: z.number().min(0).max(5).optional(),
|
|
178
179
|
rating: z.number().min(0).max(5).optional(),
|
|
179
180
|
ratingCount: z.number().int().nonnegative().optional(),
|
|
181
|
+
/** Neighborhood / short locality. */
|
|
180
182
|
location: z.string().max(200).optional(),
|
|
183
|
+
/** Full street address. */
|
|
184
|
+
address: z.string().max(300).optional(),
|
|
185
|
+
phone: z.string().max(60).optional(),
|
|
181
186
|
priceDisplay: z.string().max(80).optional(),
|
|
182
187
|
/** Gallery for the image carousel. */
|
|
183
188
|
images: z.array(z.string().min(1).max(2000)).max(24).optional(),
|
|
@@ -186,6 +191,27 @@ const HotelCard = z.object({
|
|
|
186
191
|
rooms: z.array(HotelRoom).max(12).optional(),
|
|
187
192
|
actions: z.array(CardActionSchema).max(4).optional(),
|
|
188
193
|
});
|
|
194
|
+
// Restaurants — Google Maps search results.
|
|
195
|
+
const RestaurantListItem = z.object({
|
|
196
|
+
name: z.string().min(1).max(240),
|
|
197
|
+
imageUrl: z.string().max(2000).optional(),
|
|
198
|
+
/** Guest review score, 0–5. */
|
|
199
|
+
rating: z.number().min(0).max(5).optional(),
|
|
200
|
+
ratingCount: z.number().int().nonnegative().optional(),
|
|
201
|
+
/** Price tier, 1–4 ("$"–"$$$$"). */
|
|
202
|
+
priceLevel: z.number().int().min(1).max(4).optional(),
|
|
203
|
+
cuisine: z.string().max(80).optional(),
|
|
204
|
+
address: z.string().max(200).optional(),
|
|
205
|
+
openNow: z.boolean().optional(),
|
|
206
|
+
/** Reserve-a-table deep link (opens in a new tab). */
|
|
207
|
+
bookUrl: z.string().max(2000).optional(),
|
|
208
|
+
});
|
|
209
|
+
const RestaurantListCard = z.object({
|
|
210
|
+
kind: z.literal("restaurantList"),
|
|
211
|
+
title: z.string().max(160).optional(),
|
|
212
|
+
total: z.number().int().nonnegative().optional(),
|
|
213
|
+
items: z.array(RestaurantListItem).max(50),
|
|
214
|
+
});
|
|
189
215
|
const ItineraryDay = z.object({
|
|
190
216
|
number: z.number().int().min(0).max(366).optional(),
|
|
191
217
|
title: z.string().min(1).max(240),
|
|
@@ -473,6 +499,7 @@ export const AgentCardSchema = z.discriminatedUnion("kind", [
|
|
|
473
499
|
ProductListCard,
|
|
474
500
|
HotelListCard,
|
|
475
501
|
HotelCard,
|
|
502
|
+
RestaurantListCard,
|
|
476
503
|
ItineraryCard,
|
|
477
504
|
OfferCard,
|
|
478
505
|
DepartureListCard,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/max-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Write custom tools for Max, Voyant's AI travel agent. Define tools with Zod, generate the manifest Voyant registers, and serve calls with a framework-agnostic request handler.",
|
|
6
6
|
"type": "module",
|