migros-mcp 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.
Files changed (56) hide show
  1. package/README.md +108 -24
  2. package/dist/auth/api.d.ts +19 -0
  3. package/dist/auth/api.js +63 -0
  4. package/dist/auth/api.js.map +1 -0
  5. package/dist/auth/cookies.d.ts +25 -0
  6. package/dist/auth/cookies.js +66 -0
  7. package/dist/auth/cookies.js.map +1 -0
  8. package/dist/auth/index.d.ts +17 -0
  9. package/dist/auth/index.js +36 -0
  10. package/dist/auth/index.js.map +1 -0
  11. package/dist/auth/login.d.ts +20 -0
  12. package/dist/auth/login.js +138 -0
  13. package/dist/auth/login.js.map +1 -0
  14. package/dist/auth/oauth.d.ts +20 -0
  15. package/dist/auth/oauth.js +116 -0
  16. package/dist/auth/oauth.js.map +1 -0
  17. package/dist/auth/paths.d.ts +11 -0
  18. package/dist/auth/paths.js +26 -0
  19. package/dist/auth/paths.js.map +1 -0
  20. package/dist/auth-tools/_shared.d.ts +6 -0
  21. package/dist/auth-tools/_shared.js +12 -0
  22. package/dist/auth-tools/_shared.js.map +1 -0
  23. package/dist/auth-tools/account.d.ts +9 -0
  24. package/dist/auth-tools/account.js +35 -0
  25. package/dist/auth-tools/account.js.map +1 -0
  26. package/dist/auth-tools/cart.d.ts +37 -0
  27. package/dist/auth-tools/cart.js +118 -0
  28. package/dist/auth-tools/cart.js.map +1 -0
  29. package/dist/auth-tools/cumulus.d.ts +31 -0
  30. package/dist/auth-tools/cumulus.js +83 -0
  31. package/dist/auth-tools/cumulus.js.map +1 -0
  32. package/dist/auth-tools/orders.d.ts +15 -0
  33. package/dist/auth-tools/orders.js +32 -0
  34. package/dist/auth-tools/orders.js.map +1 -0
  35. package/dist/auth-tools.d.ts +9 -0
  36. package/dist/auth-tools.js +10 -0
  37. package/dist/auth-tools.js.map +1 -0
  38. package/dist/index.d.ts +0 -0
  39. package/dist/index.js +37 -80
  40. package/dist/index.js.map +1 -1
  41. package/dist/migros.d.ts +17 -0
  42. package/dist/migros.js +42 -1
  43. package/dist/migros.js.map +1 -1
  44. package/dist/register.d.ts +11 -0
  45. package/dist/register.js +23 -0
  46. package/dist/register.js.map +1 -0
  47. package/dist/schemas.d.ts +125 -0
  48. package/dist/schemas.js +82 -12
  49. package/dist/schemas.js.map +1 -1
  50. package/dist/tools.d.ts +17 -0
  51. package/dist/tools.js +48 -1
  52. package/dist/tools.js.map +1 -1
  53. package/dist/types.d.ts +0 -0
  54. package/dist/types.js +0 -0
  55. package/dist/types.js.map +0 -0
  56. package/package.json +3 -2
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
@@ -1,86 +1,43 @@
1
1
  #!/usr/bin/env node
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
- import { SearchProductsSchema, GetProductDetailsSchema, GetStockSchema, SearchStoresSchema, GetPromotionsSchema, } from "./schemas.js";
5
- import { searchProducts, getProductDetails, getStock, getCategories, searchStores, getPromotions, } from "./tools.js";
6
- const server = new McpServer({
7
- name: "migros-mcp",
8
- version: "0.1.0",
9
- });
10
- // --- Tools ---
11
- server.tool("search_products", "Search Migros products by name or keyword. Returns product IDs that can be used with get_product_details.", SearchProductsSchema.shape, async ({ query, language }) => {
12
- try {
13
- const result = await searchProducts(query, language ?? "de");
14
- return { content: [{ type: "text", text: result }] };
15
- }
16
- catch (error) {
17
- return {
18
- content: [{ type: "text", text: `Error: ${error.message}` }],
19
- isError: true,
20
- };
21
- }
22
- });
23
- server.tool("get_product_details", "Get full product details including nutrition facts, ingredients, allergens, price, and ratings. Use search_products first to get product IDs.", GetProductDetailsSchema.shape, async ({ productIds }) => {
24
- try {
25
- const result = await getProductDetails(productIds);
26
- return { content: [{ type: "text", text: result }] };
27
- }
28
- catch (error) {
29
- return {
30
- content: [{ type: "text", text: `Error: ${error.message}` }],
31
- isError: true,
32
- };
33
- }
34
- });
35
- server.tool("get_stock", "Check product stock at a specific Migros store. Use search_products and search_stores first to get the IDs. Stock is approximate and updated once a day.", GetStockSchema.shape, async ({ productId, storeId }) => {
36
- try {
37
- const result = await getStock(productId, storeId);
38
- return { content: [{ type: "text", text: result }] };
39
- }
40
- catch (error) {
41
- return {
42
- content: [{ type: "text", text: `Error: ${error.message}` }],
43
- isError: true,
44
- };
45
- }
46
- });
47
- server.tool("get_categories", "List all Migros product categories", {}, async () => {
48
- try {
49
- const result = await getCategories();
50
- return { content: [{ type: "text", text: result }] };
51
- }
52
- catch (error) {
53
- return {
54
- content: [{ type: "text", text: `Error: ${error.message}` }],
55
- isError: true,
56
- };
57
- }
58
- });
59
- server.tool("search_stores", "Find Migros stores by location (city name, zip code, etc.). Returns store details including address and opening hours.", SearchStoresSchema.shape, async ({ query }) => {
60
- try {
61
- const result = await searchStores(query);
62
- return { content: [{ type: "text", text: result }] };
63
- }
64
- catch (error) {
65
- return {
66
- content: [{ type: "text", text: `Error: ${error.message}` }],
67
- isError: true,
68
- };
69
- }
70
- });
71
- server.tool("get_promotions", "Search current Migros promotions and deals. Optionally filter by search query.", GetPromotionsSchema.shape, async ({ query }) => {
72
- try {
73
- const result = await getPromotions(query ?? "");
74
- return { content: [{ type: "text", text: result }] };
75
- }
76
- catch (error) {
77
- return {
78
- content: [{ type: "text", text: `Error: ${error.message}` }],
79
- isError: true,
80
- };
81
- }
82
- });
83
- // --- Start ---
4
+ import { register } from "./register.js";
5
+ import { SearchProductsSchema, GetProductDetailsSchema, GetStockSchema, SearchStoresSchema, GetPromotionsSchema, SearchRecipesSchema, GetRecipeDetailsSchema, GetRecipeProductsSchema, GetBasketSchema, AddToBasketSchema, UpdateBasketQuantitySchema, RemoveFromBasketSchema, GetOrdersSchema, GetOrderDetailsSchema, GetInStoreReceiptsSchema, GetReceiptDetailsSchema, } from "./schemas.js";
6
+ import { searchProducts, getProductDetails, getStock, getCategories, searchStores, getPromotions, searchRecipes, getRecipeDetails, getRecipeProducts, } from "./tools.js";
7
+ import { getProfile, getBasket, addToBasket, updateBasketQuantity, removeFromBasket, getAddresses, getOrders, getOrderDetails, getCheckoutLink, getCumulusStatus, getInStoreReceipts, getReceiptDetails, getCumulusCoupons, } from "./auth-tools.js";
8
+ // ---------------------------------------------------------------------------
9
+ // Server + tool registrations
10
+ // ---------------------------------------------------------------------------
11
+ const server = new McpServer({ name: "migros-mcp", version: "0.3.0" });
12
+ // --- Anonymous: search & browse ---
13
+ register(server, "search_products", "Search Migros products by name or keyword. Returns product IDs that can be used with get_product_details.", SearchProductsSchema.shape, ({ query, language }) => searchProducts(query, language ?? "de"));
14
+ register(server, "get_product_details", "Get full product details including nutrition facts, ingredients, allergens, price, and ratings. Use search_products first to get product IDs.", GetProductDetailsSchema.shape, ({ productIds }) => getProductDetails(productIds));
15
+ register(server, "get_stock", "Check product stock at a specific Migros store. Use search_products and search_stores first to get the IDs. Stock is approximate and updated once a day.", GetStockSchema.shape, ({ productId, storeId }) => getStock(productId, storeId));
16
+ register(server, "get_categories", "List all Migros product categories", {}, () => getCategories());
17
+ register(server, "search_stores", "Find Migros stores by location (city name, zip code, etc.). Returns store details including address and opening hours.", SearchStoresSchema.shape, ({ query }) => searchStores(query));
18
+ register(server, "get_promotions", "Search current Migros promotions and deals. Optionally filter by search query.", GetPromotionsSchema.shape, ({ query }) => getPromotions(query ?? ""));
19
+ // --- Anonymous: recipes (Migusto) ---
20
+ register(server, "search_recipes", "Search Migusto (Migros' recipe site) by free-text query and/or ingredients. Returns recipe id, slug, title, cooking time, rating. Use get_recipe_details for full info or get_recipe_products to get Migros product UIDs to add to the basket.", SearchRecipesSchema.shape, (args) => searchRecipes(args));
21
+ register(server, "get_recipe_details", "Fetch a full Migusto recipe by slug: ingredients with quantities, step-by-step instructions, photos, nutrition. Use search_recipes first to find the slug. (Migusto is Migros' recipe site at migusto.migros.ch.)", GetRecipeDetailsSchema.shape, (args) => getRecipeDetails(args));
22
+ register(server, "get_recipe_products", "Fetch the Migros products needed for a Migusto recipe — returns product UIDs you can pass directly to add_to_basket. Bridges recipes to shopping. Use the recipe ID from search_recipes (NOT the slug).", GetRecipeProductsSchema.shape, (args) => getRecipeProducts(args));
23
+ // --- Authenticated: account ---
24
+ register(server, "get_profile", "Get the logged-in customer's basic profile (name, email, language, cooperative). Requires authentication.", {}, () => getProfile());
25
+ register(server, "get_addresses", "Get the user's saved delivery and billing addresses. Requires authentication.", {}, () => getAddresses());
26
+ // --- Authenticated: cart ---
27
+ register(server, "get_basket", "Fetch the items currently in the user's shopping basket (Migros calls this a shopping list). Returns product IDs and quantities; use get_product_details to enrich. Requires authentication.", GetBasketSchema.shape, (args) => getBasket(args));
28
+ register(server, "add_to_basket", "Add a product to the user's basket (or set its quantity if already present). The underlying API is upsert-to-target, not increment. Returns the updated basket. Requires authentication.", AddToBasketSchema.shape, (args) => addToBasket(args));
29
+ register(server, "update_basket_quantity", "Set an item's exact quantity in the basket. quantity=0 removes the item. Returns the updated basket. Requires authentication.", UpdateBasketQuantitySchema.shape, (args) => updateBasketQuantity(args));
30
+ register(server, "remove_from_basket", "Remove a product from the user's basket. Returns the updated basket. Requires authentication.", RemoveFromBasketSchema.shape, (args) => removeFromBasket(args));
31
+ // --- Authenticated: orders ---
32
+ register(server, "get_orders", "List the user's online orders, paginated, filtered by status. Use to find an order id, then call get_order_details. Requires authentication.", GetOrdersSchema.shape, (args) => getOrders(args));
33
+ register(server, "get_order_details", "Fetch the full details of a single order by id. Requires authentication.", GetOrderDetailsSchema.shape, (args) => getOrderDetails(args));
34
+ register(server, "get_checkout_link", "Return the URL the user should open in their browser to complete checkout (review basket, confirm address/slot, pay). Order placement requires payment confirmation in a real browser, so this tool hands off rather than firing the order automatically. Returns a basket summary alongside the URL. Requires authentication.", {}, () => getCheckoutLink());
35
+ // --- Authenticated: Cumulus / in-store ---
36
+ register(server, "get_cumulus_status", "Get the user's Cumulus loyalty card status: points balance, level, cardholder, lifetime stats. Requires authentication.", {}, () => getCumulusStatus());
37
+ register(server, "get_in_store_receipts", "List the user's in-store Migros receipts (Kassenbons) over a date range. Default: last 30 days. Use get_receipt_details with an id for line items. Requires authentication.", GetInStoreReceiptsSchema.shape, (args) => getInStoreReceipts(args));
38
+ register(server, "get_receipt_details", "Get the URL to view a single in-store receipt's line items in the browser. Line items aren't accessible via the API — get_in_store_receipts gives store/date/amount/points which is enough for most queries. Requires authentication.", GetReceiptDetailsSchema.shape, (args) => getReceiptDetails(args));
39
+ register(server, "get_cumulus_coupons", "List active Cumulus coupons targeted at the user (personalized offers based on shopping history). Requires authentication.", {}, () => getCumulusCoupons());
40
+ // ---------------------------------------------------------------------------
84
41
  async function main() {
85
42
  const transport = new StdioServerTransport();
86
43
  await server.connect(transport);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,gBAAgB;AAEhB,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,2GAA2G,EAC3G,oBAAoB,CAAC,KAAK,EAC1B,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,KAAK,EAAE,QAAQ,IAAI,IAAI,C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BAAwB,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEtE,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EACpC,uOAAuO,EACvO,uBAAuB,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEpE,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EACpC,4HAA4H,EAC5H,EAAE,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAEjC,8EAA8E;AAE9E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/dist/migros.d.ts CHANGED
@@ -10,3 +10,20 @@ export declare function getStock(productId: string, storeId: string): Promise<{
10
10
  export declare function getCategories(): Promise<unknown>;
11
11
  export declare function searchStores(query: string): Promise<unknown[]>;
12
12
  export declare function getPromotions(query: string): Promise<unknown>;
13
+ export declare function searchRecipes(args: {
14
+ searchTerm?: string;
15
+ ingredients?: string[];
16
+ language?: string;
17
+ limit?: number;
18
+ offset?: number;
19
+ }): Promise<unknown>;
20
+ export declare function getRecipeDetails(args: {
21
+ slug: string;
22
+ language?: string;
23
+ }): Promise<unknown>;
24
+ export declare function getRecipeProducts(args: {
25
+ id: string;
26
+ language?: string;
27
+ limit?: number;
28
+ offset?: number;
29
+ }): Promise<unknown>;
package/dist/migros.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { MigrosAPI } from "migros-api-wrapper";
2
2
  const migros = new MigrosAPI();
3
+ // Migusto (recipes) is exposed as a static on MigrosAPI, not on the instance.
4
+ const migusto = MigrosAPI.migusto;
3
5
  let cachedToken = null;
4
6
  async function getToken() {
5
7
  if (cachedToken) {
@@ -42,7 +44,12 @@ export async function searchProducts(query, language) {
42
44
  }
43
45
  export async function getProductDetails(productIds) {
44
46
  return withToken(async (token) => {
45
- const result = await migros.products.productDisplay.getProductDetails({ uids: productIds }, token);
47
+ // Detect if IDs are migrosIds (long numeric, 12+ digits) or uids (shorter numeric)
48
+ const isMigrosId = productIds.every((id) => id.length >= 12 && /^\d+$/.test(id));
49
+ const params = isMigrosId
50
+ ? { migrosIds: productIds.join(",") }
51
+ : { uids: productIds };
52
+ const result = await migros.products.productDisplay.getProductDetails(params, token);
46
53
  return result ?? [];
47
54
  });
48
55
  }
@@ -75,4 +82,38 @@ export async function getPromotions(query) {
75
82
  return result?.items ?? [];
76
83
  });
77
84
  }
85
+ // ---------------------------------------------------------------------------
86
+ // Migusto (recipes) — public, no auth required
87
+ // ---------------------------------------------------------------------------
88
+ export async function searchRecipes(args) {
89
+ // Only include fields that are actually set; the underlying wrapper
90
+ // mis-encodes the request when given explicit `undefined` values.
91
+ const opts = {
92
+ limit: args.limit ?? 20,
93
+ offset: args.offset ?? 0,
94
+ };
95
+ if (args.searchTerm)
96
+ opts.searchTerm = args.searchTerm;
97
+ if (args.ingredients?.length)
98
+ opts.ingredients = args.ingredients;
99
+ if (args.language)
100
+ opts.language = args.language;
101
+ return await migusto.recipeSearch(opts);
102
+ }
103
+ export async function getRecipeDetails(args) {
104
+ const opts = { slug: args.slug };
105
+ if (args.language)
106
+ opts.language = args.language;
107
+ return await migusto.recipeDetails(opts);
108
+ }
109
+ export async function getRecipeProducts(args) {
110
+ const opts = {
111
+ id: args.id,
112
+ limit: args.limit ?? 50,
113
+ offset: args.offset ?? 0,
114
+ };
115
+ if (args.language)
116
+ opts.language = args.language;
117
+ return await migusto.recipeProducts(opts);
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AE,CAAC;IAC1D,IAAI,IAAI,CAAC,QAAQ;QAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IACjD,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,IAAW,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAKvC;IACC,MAAM,IAAI,GAA4B;QACpC,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC;KACzB,CAAC;IACF,IAAI,IAAI,CAAC,QAAQ;QAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IACjD,OAAO,MAAM,OAAO,CAAC,cAAc,CAAC,IAAW,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { ZodRawShape } from "zod";
3
+ /**
4
+ * Register an MCP tool with uniform error handling. Saves the boilerplate
5
+ * try/catch wrapper that every tool would otherwise duplicate.
6
+ *
7
+ * The handler returns a plain string (typically formatted JSON); this wraps
8
+ * it in the SDK's content/text envelope and surfaces thrown errors as
9
+ * `isError` responses so the LLM sees a useful message instead of a hang.
10
+ */
11
+ export declare function register(server: McpServer, name: string, description: string, shape: ZodRawShape, handler: (args: any) => Promise<string>): void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Register an MCP tool with uniform error handling. Saves the boilerplate
3
+ * try/catch wrapper that every tool would otherwise duplicate.
4
+ *
5
+ * The handler returns a plain string (typically formatted JSON); this wraps
6
+ * it in the SDK's content/text envelope and surfaces thrown errors as
7
+ * `isError` responses so the LLM sees a useful message instead of a hang.
8
+ */
9
+ export function register(server, name, description, shape, handler) {
10
+ server.tool(name, description, shape, async (args) => {
11
+ try {
12
+ const text = await handler(args);
13
+ return { content: [{ type: "text", text }] };
14
+ }
15
+ catch (error) {
16
+ return {
17
+ content: [{ type: "text", text: `Error: ${error.message}` }],
18
+ isError: true,
19
+ };
20
+ }
21
+ });
22
+ }
23
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAiB,EACjB,IAAY,EACZ,WAAmB,EACnB,KAAkB,EAClB,OAAuC;IAEvC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC5D,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAW,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC;gBACvE,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/schemas.d.ts CHANGED
@@ -40,3 +40,128 @@ export declare const GetPromotionsSchema: z.ZodObject<{
40
40
  }, {
41
41
  query?: string | undefined;
42
42
  }>;
43
+ export declare const SearchRecipesSchema: z.ZodObject<{
44
+ query: z.ZodOptional<z.ZodString>;
45
+ ingredients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
46
+ language: z.ZodOptional<z.ZodString>;
47
+ limit: z.ZodOptional<z.ZodNumber>;
48
+ offset: z.ZodOptional<z.ZodNumber>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ query?: string | undefined;
51
+ language?: string | undefined;
52
+ ingredients?: string[] | undefined;
53
+ limit?: number | undefined;
54
+ offset?: number | undefined;
55
+ }, {
56
+ query?: string | undefined;
57
+ language?: string | undefined;
58
+ ingredients?: string[] | undefined;
59
+ limit?: number | undefined;
60
+ offset?: number | undefined;
61
+ }>;
62
+ export declare const GetRecipeDetailsSchema: z.ZodObject<{
63
+ slug: z.ZodString;
64
+ language: z.ZodOptional<z.ZodString>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ slug: string;
67
+ language?: string | undefined;
68
+ }, {
69
+ slug: string;
70
+ language?: string | undefined;
71
+ }>;
72
+ export declare const GetRecipeProductsSchema: z.ZodObject<{
73
+ recipeId: z.ZodString;
74
+ language: z.ZodOptional<z.ZodString>;
75
+ limit: z.ZodOptional<z.ZodNumber>;
76
+ offset: z.ZodOptional<z.ZodNumber>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ recipeId: string;
79
+ language?: string | undefined;
80
+ limit?: number | undefined;
81
+ offset?: number | undefined;
82
+ }, {
83
+ recipeId: string;
84
+ language?: string | undefined;
85
+ limit?: number | undefined;
86
+ offset?: number | undefined;
87
+ }>;
88
+ export declare const GetBasketSchema: z.ZodObject<{
89
+ shoppingListId: z.ZodOptional<z.ZodNumber>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ shoppingListId?: number | undefined;
92
+ }, {
93
+ shoppingListId?: number | undefined;
94
+ }>;
95
+ export declare const AddToBasketSchema: z.ZodObject<{
96
+ productId: z.ZodString;
97
+ quantity: z.ZodOptional<z.ZodNumber>;
98
+ shoppingListId: z.ZodOptional<z.ZodNumber>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ productId: string;
101
+ shoppingListId?: number | undefined;
102
+ quantity?: number | undefined;
103
+ }, {
104
+ productId: string;
105
+ shoppingListId?: number | undefined;
106
+ quantity?: number | undefined;
107
+ }>;
108
+ export declare const UpdateBasketQuantitySchema: z.ZodObject<{
109
+ productId: z.ZodString;
110
+ quantity: z.ZodNumber;
111
+ shoppingListId: z.ZodOptional<z.ZodNumber>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ productId: string;
114
+ quantity: number;
115
+ shoppingListId?: number | undefined;
116
+ }, {
117
+ productId: string;
118
+ quantity: number;
119
+ shoppingListId?: number | undefined;
120
+ }>;
121
+ export declare const RemoveFromBasketSchema: z.ZodObject<{
122
+ productId: z.ZodString;
123
+ shoppingListId: z.ZodOptional<z.ZodNumber>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ productId: string;
126
+ shoppingListId?: number | undefined;
127
+ }, {
128
+ productId: string;
129
+ shoppingListId?: number | undefined;
130
+ }>;
131
+ export declare const GetOrdersSchema: z.ZodObject<{
132
+ status: z.ZodOptional<z.ZodEnum<["PENDING", "DELIVERED", "CANCELLED", "ALL"]>>;
133
+ page: z.ZodOptional<z.ZodNumber>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ status?: "PENDING" | "DELIVERED" | "CANCELLED" | "ALL" | undefined;
136
+ page?: number | undefined;
137
+ }, {
138
+ status?: "PENDING" | "DELIVERED" | "CANCELLED" | "ALL" | undefined;
139
+ page?: number | undefined;
140
+ }>;
141
+ export declare const GetOrderDetailsSchema: z.ZodObject<{
142
+ orderId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ orderId: string | number;
145
+ }, {
146
+ orderId: string | number;
147
+ }>;
148
+ export declare const GetInStoreReceiptsSchema: z.ZodObject<{
149
+ startDate: z.ZodOptional<z.ZodString>;
150
+ endDate: z.ZodOptional<z.ZodString>;
151
+ limit: z.ZodOptional<z.ZodNumber>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ limit?: number | undefined;
154
+ startDate?: string | undefined;
155
+ endDate?: string | undefined;
156
+ }, {
157
+ limit?: number | undefined;
158
+ startDate?: string | undefined;
159
+ endDate?: string | undefined;
160
+ }>;
161
+ export declare const GetReceiptDetailsSchema: z.ZodObject<{
162
+ receiptId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ receiptId: string | number;
165
+ }, {
166
+ receiptId: string | number;
167
+ }>;
package/dist/schemas.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import { z } from "zod";
2
+ // ---------------------------------------------------------------------------
3
+ // Anonymous: products, stores, promotions
4
+ // ---------------------------------------------------------------------------
2
5
  export const SearchProductsSchema = z.object({
3
6
  query: z.string().describe("Search query for Migros products"),
4
7
  language: z
@@ -13,23 +16,90 @@ export const GetProductDetailsSchema = z.object({
13
16
  .describe("Array of product IDs (UIDs) to get details for. Get these from search_products first."),
14
17
  });
15
18
  export const SearchStoresSchema = z.object({
16
- query: z
17
- .string()
18
- .describe("Search query for Migros stores (city name, zip code, etc.)"),
19
+ query: z.string().describe("Search query for Migros stores (city name, zip code, etc.)"),
19
20
  });
20
21
  export const GetStockSchema = z.object({
21
- productId: z
22
- .string()
23
- .describe("Product UID to check stock for. Get this from search_products."),
24
- storeId: z
25
- .string()
26
- .describe("Store ID (costCenterId) to check stock at. Get this from search_stores."),
22
+ productId: z.string().describe("Product UID to check stock for. Get this from search_products."),
23
+ storeId: z.string().describe("Store ID (costCenterId) to check stock at. Get this from search_stores."),
27
24
  });
28
25
  export const GetPromotionsSchema = z.object({
29
- query: z
26
+ query: z.string().optional().default("").describe("Optional search query to filter promotions"),
27
+ });
28
+ // ---------------------------------------------------------------------------
29
+ // Anonymous: recipes (Migusto)
30
+ // ---------------------------------------------------------------------------
31
+ export const SearchRecipesSchema = z.object({
32
+ query: z.string().optional().describe("Free-text search term, e.g. 'pasta carbonara'."),
33
+ ingredients: z.array(z.string()).optional().describe("Filter to recipes that use these ingredients."),
34
+ language: z.string().optional().describe("Language code: de, fr, it. Default: de."),
35
+ limit: z.number().int().min(1).max(50).optional().describe("Max recipes to return. Default: 20."),
36
+ offset: z.number().int().min(0).optional().describe("0-based offset for pagination."),
37
+ });
38
+ export const GetRecipeDetailsSchema = z.object({
39
+ slug: z.string().describe("Recipe slug from search_recipes (the URL-safe id)."),
40
+ language: z.string().optional().describe("Language code. Default: de."),
41
+ });
42
+ export const GetRecipeProductsSchema = z.object({
43
+ recipeId: z.string().describe("Recipe id (UUID) from search_recipes. NOT the slug."),
44
+ language: z.string().optional().describe("Language code. Default: de."),
45
+ limit: z.number().int().min(1).max(100).optional(),
46
+ offset: z.number().int().min(0).optional(),
47
+ });
48
+ // ---------------------------------------------------------------------------
49
+ // Authenticated: cart
50
+ // ---------------------------------------------------------------------------
51
+ export const GetBasketSchema = z.object({
52
+ shoppingListId: z.number().optional().describe("Optional shopping list ID. Omit to fetch the user's primary list."),
53
+ });
54
+ export const AddToBasketSchema = z.object({
55
+ productId: z.string().describe("Product UID from search_products (e.g. '100049709')."),
56
+ quantity: z
57
+ .number()
58
+ .int()
59
+ .min(1)
60
+ .optional()
61
+ .describe("Target quantity. Defaults to 1. REPLACES existing quantity, not increment."),
62
+ shoppingListId: z.number().optional().describe("Optional list ID; omit to use the primary list."),
63
+ });
64
+ export const UpdateBasketQuantitySchema = z.object({
65
+ productId: z.string().describe("Product UID."),
66
+ quantity: z.number().int().min(0).describe("Exact target quantity. 0 removes the item."),
67
+ shoppingListId: z.number().optional(),
68
+ });
69
+ export const RemoveFromBasketSchema = z.object({
70
+ productId: z.string().describe("Product UID to remove from the basket."),
71
+ shoppingListId: z.number().optional(),
72
+ });
73
+ // ---------------------------------------------------------------------------
74
+ // Authenticated: orders
75
+ // ---------------------------------------------------------------------------
76
+ export const GetOrdersSchema = z.object({
77
+ status: z
78
+ .enum(["PENDING", "DELIVERED", "CANCELLED", "ALL"])
79
+ .optional()
80
+ .describe("Filter by order status. Default: ALL."),
81
+ page: z.number().int().min(0).optional().describe("0-based page number. Default: 0."),
82
+ });
83
+ export const GetOrderDetailsSchema = z.object({
84
+ orderId: z.union([z.string(), z.number()]).describe("Order id (numeric). Get from get_orders."),
85
+ });
86
+ // ---------------------------------------------------------------------------
87
+ // Authenticated: Cumulus / in-store
88
+ // ---------------------------------------------------------------------------
89
+ export const GetInStoreReceiptsSchema = z.object({
90
+ startDate: z
91
+ .string()
92
+ .regex(/^\d{4}-\d{2}-\d{2}$/)
93
+ .optional()
94
+ .describe("Start date YYYY-MM-DD. Default: 30 days ago."),
95
+ endDate: z
30
96
  .string()
97
+ .regex(/^\d{4}-\d{2}-\d{2}$/)
31
98
  .optional()
32
- .default("")
33
- .describe("Optional search query to filter promotions"),
99
+ .describe("End date YYYY-MM-DD. Default: today."),
100
+ limit: z.number().int().min(1).max(500).optional().describe("Max receipts to return. Default: 50."),
101
+ });
102
+ export const GetReceiptDetailsSchema = z.object({
103
+ receiptId: z.union([z.string(), z.number()]).describe("Receipt id from get_in_store_receipts."),
34
104
  });
35
105
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC9D,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC;SACV,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CACP,uFAAuF,CACxF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CAAC,4DAA4D,CAAC;CAC1E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,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CAChG,CAAC,CAAC;AAEH,8EAA8E;AAC9E,oCAAoC;AACpC,8EAA8E;AAE9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,KAAK,CAAC,qBAAqB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CAAC,8CAA8C,CAAC;IAC3D,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,KAAK,CAAC,qBAAqB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;CACpG,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;CAChG,CAAC,CAAC"}
package/dist/tools.d.ts CHANGED
@@ -4,3 +4,20 @@ export declare function getStock(productId: string, storeId: string): Promise<st
4
4
  export declare function getCategories(): Promise<string>;
5
5
  export declare function searchStores(query: string): Promise<string>;
6
6
  export declare function getPromotions(query: string): Promise<string>;
7
+ export declare function searchRecipes(args: {
8
+ query?: string;
9
+ ingredients?: string[];
10
+ language?: string;
11
+ limit?: number;
12
+ offset?: number;
13
+ }): Promise<string>;
14
+ export declare function getRecipeDetails(args: {
15
+ slug: string;
16
+ language?: string;
17
+ }): Promise<string>;
18
+ export declare function getRecipeProducts(args: {
19
+ recipeId: string;
20
+ language?: string;
21
+ limit?: number;
22
+ offset?: number;
23
+ }): Promise<string>;