khansama-api 1.64.1 → 1.66.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/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Generated by orval v7.13.2 🍺
3
3
  * Do not edit manually.
4
4
  * Recipe Management API
5
- * OpenAPI spec version: 1.64.1
5
+ * OpenAPI spec version: 1.66.0
6
6
  */
7
7
  import { useMutation, useQuery } from '@tanstack/react-query';
8
8
  import axios from 'axios';
@@ -41,6 +41,11 @@ export const AIWeekPlanRequestStructure = {
41
41
  south_asian: 'south_asian',
42
42
  };
43
43
  // eslint-disable-next-line @typescript-eslint/no-redeclare
44
+ export const AgentTokenScopeEnum = {
45
+ read: 'read',
46
+ write: 'write',
47
+ };
48
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
44
49
  export const BulkMode = {
45
50
  best_effort: 'best_effort',
46
51
  atomic: 'atomic',
@@ -5735,6 +5740,36 @@ export function useGetPantryAgentV1PantryGet(options) {
5735
5740
  query.queryKey = queryOptions.queryKey;
5736
5741
  return query;
5737
5742
  }
5743
+ /**
5744
+ * Add one pantry item to the token's household (write scope required).
5745
+
5746
+ It goes through the same service the app uses, so catalog linking, the
5747
+ expiry heuristic and the ``added`` inventory event all happen as usual.
5748
+ * @summary Add Pantry Item
5749
+ */
5750
+ export const addPantryItemAgentV1PantryPost = (agentPantryItemCreate, options) => {
5751
+ return axios.post(`/agent/v1/pantry`, agentPantryItemCreate, options);
5752
+ };
5753
+ export const getAddPantryItemAgentV1PantryPostMutationOptions = (options) => {
5754
+ const mutationKey = ['addPantryItemAgentV1PantryPost'];
5755
+ const { mutation: mutationOptions, axios: axiosOptions } = options ?
5756
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
5757
+ options
5758
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
5759
+ : { mutation: { mutationKey, }, axios: undefined };
5760
+ const mutationFn = (props) => {
5761
+ const { data } = props ?? {};
5762
+ return addPantryItemAgentV1PantryPost(data, axiosOptions);
5763
+ };
5764
+ return { mutationFn, ...mutationOptions };
5765
+ };
5766
+ /**
5767
+ * @summary Add Pantry Item
5768
+ */
5769
+ export const useAddPantryItemAgentV1PantryPost = (options) => {
5770
+ const mutationOptions = getAddPantryItemAgentV1PantryPostMutationOptions(options);
5771
+ return useMutation(mutationOptions);
5772
+ };
5738
5773
  /**
5739
5774
  * Items that expire today or within ``days`` days, soonest first. Already-expired items are not included.
5740
5775
  * @summary Get Expiring
@@ -5765,6 +5800,36 @@ export function useGetExpiringAgentV1ExpiringGet(params, options) {
5765
5800
  query.queryKey = queryOptions.queryKey;
5766
5801
  return query;
5767
5802
  }
5803
+ /**
5804
+ * Add one meal to the plan that covers today (write scope required).
5805
+
5806
+ ``day_index`` is 0-6 from the plan's ``week_start``; ``meal_type`` defaults
5807
+ to dinner. No active plan covering today is a 409.
5808
+ * @summary Add To Plan
5809
+ */
5810
+ export const addToPlanAgentV1PlanPost = (agentPlanSlotCreate, options) => {
5811
+ return axios.post(`/agent/v1/plan`, agentPlanSlotCreate, options);
5812
+ };
5813
+ export const getAddToPlanAgentV1PlanPostMutationOptions = (options) => {
5814
+ const mutationKey = ['addToPlanAgentV1PlanPost'];
5815
+ const { mutation: mutationOptions, axios: axiosOptions } = options ?
5816
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
5817
+ options
5818
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
5819
+ : { mutation: { mutationKey, }, axios: undefined };
5820
+ const mutationFn = (props) => {
5821
+ const { data } = props ?? {};
5822
+ return addToPlanAgentV1PlanPost(data, axiosOptions);
5823
+ };
5824
+ return { mutationFn, ...mutationOptions };
5825
+ };
5826
+ /**
5827
+ * @summary Add To Plan
5828
+ */
5829
+ export const useAddToPlanAgentV1PlanPost = (options) => {
5830
+ const mutationOptions = getAddToPlanAgentV1PlanPostMutationOptions(options);
5831
+ return useMutation(mutationOptions);
5832
+ };
5768
5833
  /**
5769
5834
  * @summary Read Root
5770
5835
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "khansama-api",
3
- "version": "1.64.1",
3
+ "version": "1.66.0",
4
4
  "description": "Auto-generated TypeScript client for Khansama API — TanStack Query hooks + Axios",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",