@voyant-travel/max-sdk 0.2.0 → 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 +18 -0
- package/dist/cards.d.ts.map +1 -1
- package/dist/cards.js +29 -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>;
|
|
@@ -699,6 +701,7 @@ export declare const AgentCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
699
701
|
provider: z.ZodOptional<z.ZodString>;
|
|
700
702
|
priceDisplay: z.ZodOptional<z.ZodString>;
|
|
701
703
|
capacity: z.ZodOptional<z.ZodString>;
|
|
704
|
+
bookUrl: z.ZodOptional<z.ZodString>;
|
|
702
705
|
}, z.core.$strip>>>;
|
|
703
706
|
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
704
707
|
kind: z.ZodLiteral<"open">;
|
|
@@ -717,6 +720,21 @@ export declare const AgentCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
717
720
|
brand: "brand";
|
|
718
721
|
}>>;
|
|
719
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>>;
|
|
720
738
|
}, z.core.$strip>, z.ZodObject<{
|
|
721
739
|
kind: z.ZodLiteral<"itinerary">;
|
|
722
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":"","s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CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;AAE7C,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAKjE"}
|
package/dist/cards.js
CHANGED
|
@@ -168,14 +168,21 @@ const HotelRoom = z.object({
|
|
|
168
168
|
provider: z.string().max(80).optional(),
|
|
169
169
|
priceDisplay: z.string().max(80).optional(),
|
|
170
170
|
capacity: z.string().max(80).optional(),
|
|
171
|
+
/** Deep link to book this room/rate (opens in a new tab). */
|
|
172
|
+
bookUrl: z.string().max(2000).optional(),
|
|
171
173
|
});
|
|
172
174
|
const HotelCard = z.object({
|
|
173
175
|
kind: z.literal("hotel"),
|
|
174
176
|
name: z.string().min(1).max(240),
|
|
177
|
+
/** Hotel class, 0–5 (a "4-star hotel" — distinct from the review rating). */
|
|
175
178
|
stars: z.number().min(0).max(5).optional(),
|
|
176
179
|
rating: z.number().min(0).max(5).optional(),
|
|
177
180
|
ratingCount: z.number().int().nonnegative().optional(),
|
|
181
|
+
/** Neighborhood / short locality. */
|
|
178
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(),
|
|
179
186
|
priceDisplay: z.string().max(80).optional(),
|
|
180
187
|
/** Gallery for the image carousel. */
|
|
181
188
|
images: z.array(z.string().min(1).max(2000)).max(24).optional(),
|
|
@@ -184,6 +191,27 @@ const HotelCard = z.object({
|
|
|
184
191
|
rooms: z.array(HotelRoom).max(12).optional(),
|
|
185
192
|
actions: z.array(CardActionSchema).max(4).optional(),
|
|
186
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
|
+
});
|
|
187
215
|
const ItineraryDay = z.object({
|
|
188
216
|
number: z.number().int().min(0).max(366).optional(),
|
|
189
217
|
title: z.string().min(1).max(240),
|
|
@@ -471,6 +499,7 @@ export const AgentCardSchema = z.discriminatedUnion("kind", [
|
|
|
471
499
|
ProductListCard,
|
|
472
500
|
HotelListCard,
|
|
473
501
|
HotelCard,
|
|
502
|
+
RestaurantListCard,
|
|
474
503
|
ItineraryCard,
|
|
475
504
|
OfferCard,
|
|
476
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",
|