khansama-api 1.65.0 โ†’ 1.67.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.65.0
5
+ * OpenAPI spec version: 1.67.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',
@@ -4041,6 +4046,35 @@ export function useGetPlanWeekViewPlansPlanIdWeekViewGet(planId, options) {
4041
4046
  query.queryKey = queryOptions.queryKey;
4042
4047
  return query;
4043
4048
  }
4049
+ /**
4050
+ * Read-only per-day macros for a plan (PAN-537), recomputed from its
4051
+ persisted slots โ€” the week-view numbers without the shopping-list
4052
+ refresh, so viewing the plan never writes list rows.
4053
+ * @summary Get Plan Macros
4054
+ */
4055
+ export const getPlanMacrosPlansPlanIdMacrosGet = (planId, options) => {
4056
+ return axios.get(`/plans/${planId}/macros`, options);
4057
+ };
4058
+ export const getGetPlanMacrosPlansPlanIdMacrosGetQueryKey = (planId) => {
4059
+ return [
4060
+ `/plans/${planId}/macros`
4061
+ ];
4062
+ };
4063
+ export const getGetPlanMacrosPlansPlanIdMacrosGetQueryOptions = (planId, options) => {
4064
+ const { query: queryOptions, axios: axiosOptions } = options ?? {};
4065
+ const queryKey = queryOptions?.queryKey ?? getGetPlanMacrosPlansPlanIdMacrosGetQueryKey(planId);
4066
+ const queryFn = ({ signal }) => getPlanMacrosPlansPlanIdMacrosGet(planId, { signal, ...axiosOptions });
4067
+ return { queryKey, queryFn, enabled: !!(planId), ...queryOptions };
4068
+ };
4069
+ /**
4070
+ * @summary Get Plan Macros
4071
+ */
4072
+ export function useGetPlanMacrosPlansPlanIdMacrosGet(planId, options) {
4073
+ const queryOptions = getGetPlanMacrosPlansPlanIdMacrosGetQueryOptions(planId, options);
4074
+ const query = useQuery(queryOptions);
4075
+ query.queryKey = queryOptions.queryKey;
4076
+ return query;
4077
+ }
4044
4078
  /**
4045
4079
  * The plan editor's workhorse (ยง5.5): create/update/delete slot cells
4046
4080
  with per-item results. Items without id create; with id update (or delete
@@ -5735,6 +5769,36 @@ export function useGetPantryAgentV1PantryGet(options) {
5735
5769
  query.queryKey = queryOptions.queryKey;
5736
5770
  return query;
5737
5771
  }
5772
+ /**
5773
+ * Add one pantry item to the token's household (write scope required).
5774
+
5775
+ It goes through the same service the app uses, so catalog linking, the
5776
+ expiry heuristic and the ``added`` inventory event all happen as usual.
5777
+ * @summary Add Pantry Item
5778
+ */
5779
+ export const addPantryItemAgentV1PantryPost = (agentPantryItemCreate, options) => {
5780
+ return axios.post(`/agent/v1/pantry`, agentPantryItemCreate, options);
5781
+ };
5782
+ export const getAddPantryItemAgentV1PantryPostMutationOptions = (options) => {
5783
+ const mutationKey = ['addPantryItemAgentV1PantryPost'];
5784
+ const { mutation: mutationOptions, axios: axiosOptions } = options ?
5785
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
5786
+ options
5787
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
5788
+ : { mutation: { mutationKey, }, axios: undefined };
5789
+ const mutationFn = (props) => {
5790
+ const { data } = props ?? {};
5791
+ return addPantryItemAgentV1PantryPost(data, axiosOptions);
5792
+ };
5793
+ return { mutationFn, ...mutationOptions };
5794
+ };
5795
+ /**
5796
+ * @summary Add Pantry Item
5797
+ */
5798
+ export const useAddPantryItemAgentV1PantryPost = (options) => {
5799
+ const mutationOptions = getAddPantryItemAgentV1PantryPostMutationOptions(options);
5800
+ return useMutation(mutationOptions);
5801
+ };
5738
5802
  /**
5739
5803
  * Items that expire today or within ``days`` days, soonest first. Already-expired items are not included.
5740
5804
  * @summary Get Expiring
@@ -5765,6 +5829,36 @@ export function useGetExpiringAgentV1ExpiringGet(params, options) {
5765
5829
  query.queryKey = queryOptions.queryKey;
5766
5830
  return query;
5767
5831
  }
5832
+ /**
5833
+ * Add one meal to the plan that covers today (write scope required).
5834
+
5835
+ ``day_index`` is 0-6 from the plan's ``week_start``; ``meal_type`` defaults
5836
+ to dinner. No active plan covering today is a 409.
5837
+ * @summary Add To Plan
5838
+ */
5839
+ export const addToPlanAgentV1PlanPost = (agentPlanSlotCreate, options) => {
5840
+ return axios.post(`/agent/v1/plan`, agentPlanSlotCreate, options);
5841
+ };
5842
+ export const getAddToPlanAgentV1PlanPostMutationOptions = (options) => {
5843
+ const mutationKey = ['addToPlanAgentV1PlanPost'];
5844
+ const { mutation: mutationOptions, axios: axiosOptions } = options ?
5845
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
5846
+ options
5847
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
5848
+ : { mutation: { mutationKey, }, axios: undefined };
5849
+ const mutationFn = (props) => {
5850
+ const { data } = props ?? {};
5851
+ return addToPlanAgentV1PlanPost(data, axiosOptions);
5852
+ };
5853
+ return { mutationFn, ...mutationOptions };
5854
+ };
5855
+ /**
5856
+ * @summary Add To Plan
5857
+ */
5858
+ export const useAddToPlanAgentV1PlanPost = (options) => {
5859
+ const mutationOptions = getAddToPlanAgentV1PlanPostMutationOptions(options);
5860
+ return useMutation(mutationOptions);
5861
+ };
5768
5862
  /**
5769
5863
  * @summary Read Root
5770
5864
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "khansama-api",
3
- "version": "1.65.0",
3
+ "version": "1.67.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",