khansama-api 1.70.0 → 1.72.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.70.0
5
+ * OpenAPI spec version: 1.72.0
6
6
  */
7
7
  import { useMutation, useQuery } from '@tanstack/react-query';
8
8
  import axios from 'axios';
@@ -783,6 +783,9 @@ export const createPantryItemPantryItemsPost = (bodyCreatePantryItemPantryItemsP
783
783
  if (bodyCreatePantryItemPantryItemsPost.ingredient_id !== undefined && bodyCreatePantryItemPantryItemsPost.ingredient_id !== null) {
784
784
  formData.append(`ingredient_id`, bodyCreatePantryItemPantryItemsPost.ingredient_id.toString());
785
785
  }
786
+ if (bodyCreatePantryItemPantryItemsPost.is_staple !== undefined) {
787
+ formData.append(`is_staple`, bodyCreatePantryItemPantryItemsPost.is_staple.toString());
788
+ }
786
789
  if (bodyCreatePantryItemPantryItemsPost.image !== undefined && bodyCreatePantryItemPantryItemsPost.image !== null) {
787
790
  formData.append(`image`, bodyCreatePantryItemPantryItemsPost.image);
788
791
  }
@@ -971,6 +974,35 @@ export function useGetQuickCheckItemsPantryItemsQuickCheckGet(options) {
971
974
  query.queryKey = queryOptions.queryKey;
972
975
  return query;
973
976
  }
977
+ /**
978
+ * The household's staples that need restocking (PAN-565): used up,
979
+ marked finished (low/gone level), or under the household's per-item
980
+ minimum. Each one offers a one-tap add to the shopping list.
981
+ * @summary Get Running Low Staples
982
+ */
983
+ export const getRunningLowStaplesPantryItemsStaplesRunningLowGet = (options) => {
984
+ return axios.get(`/pantry-items/staples/running-low`, options);
985
+ };
986
+ export const getGetRunningLowStaplesPantryItemsStaplesRunningLowGetQueryKey = () => {
987
+ return [
988
+ `/pantry-items/staples/running-low`
989
+ ];
990
+ };
991
+ export const getGetRunningLowStaplesPantryItemsStaplesRunningLowGetQueryOptions = (options) => {
992
+ const { query: queryOptions, axios: axiosOptions } = options ?? {};
993
+ const queryKey = queryOptions?.queryKey ?? getGetRunningLowStaplesPantryItemsStaplesRunningLowGetQueryKey();
994
+ const queryFn = ({ signal }) => getRunningLowStaplesPantryItemsStaplesRunningLowGet({ signal, ...axiosOptions });
995
+ return { queryKey, queryFn, ...queryOptions };
996
+ };
997
+ /**
998
+ * @summary Get Running Low Staples
999
+ */
1000
+ export function useGetRunningLowStaplesPantryItemsStaplesRunningLowGet(options) {
1001
+ const queryOptions = getGetRunningLowStaplesPantryItemsStaplesRunningLowGetQueryOptions(options);
1002
+ const query = useQuery(queryOptions);
1003
+ query.queryKey = queryOptions.queryKey;
1004
+ return query;
1005
+ }
974
1006
  /**
975
1007
  * @summary Get Inventory Events
976
1008
  */
@@ -1067,6 +1099,9 @@ export const updatePantryItemPantryItemsItemIdPut = (itemId, bodyUpdatePantryIte
1067
1099
  if (bodyUpdatePantryItemPantryItemsItemIdPut.clear_icon_tint !== undefined && bodyUpdatePantryItemPantryItemsItemIdPut.clear_icon_tint !== null) {
1068
1100
  formData.append(`clear_icon_tint`, bodyUpdatePantryItemPantryItemsItemIdPut.clear_icon_tint);
1069
1101
  }
1102
+ if (bodyUpdatePantryItemPantryItemsItemIdPut.is_staple !== undefined && bodyUpdatePantryItemPantryItemsItemIdPut.is_staple !== null) {
1103
+ formData.append(`is_staple`, bodyUpdatePantryItemPantryItemsItemIdPut.is_staple.toString());
1104
+ }
1070
1105
  if (bodyUpdatePantryItemPantryItemsItemIdPut.image !== undefined && bodyUpdatePantryItemPantryItemsItemIdPut.image !== null) {
1071
1106
  formData.append(`image`, bodyUpdatePantryItemPantryItemsItemIdPut.image);
1072
1107
  }
@@ -1231,6 +1266,36 @@ export const useUndoLevelLowStockPantryItemsItemIdLevelUndoPost = (options) => {
1231
1266
  const mutationOptions = getUndoLevelLowStockPantryItemsItemIdLevelUndoPostMutationOptions(options);
1232
1267
  return useMutation(mutationOptions);
1233
1268
  };
1269
+ /**
1270
+ * The Running low strip's one tap (PAN-565): put the staple on the
1271
+ household's shopping list, deduplicated — a tap never duplicates what is
1272
+ already waiting there. Deliberately not automatic: staples are excluded
1273
+ from the level change's auto-add.
1274
+ * @summary Add Running Low Staple
1275
+ */
1276
+ export const addRunningLowStaplePantryItemsItemIdAddToShoppingListPost = (itemId, options) => {
1277
+ return axios.post(`/pantry-items/${itemId}/add-to-shopping-list`, undefined, options);
1278
+ };
1279
+ export const getAddRunningLowStaplePantryItemsItemIdAddToShoppingListPostMutationOptions = (options) => {
1280
+ const mutationKey = ['addRunningLowStaplePantryItemsItemIdAddToShoppingListPost'];
1281
+ const { mutation: mutationOptions, axios: axiosOptions } = options ?
1282
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
1283
+ options
1284
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
1285
+ : { mutation: { mutationKey, }, axios: undefined };
1286
+ const mutationFn = (props) => {
1287
+ const { itemId } = props ?? {};
1288
+ return addRunningLowStaplePantryItemsItemIdAddToShoppingListPost(itemId, axiosOptions);
1289
+ };
1290
+ return { mutationFn, ...mutationOptions };
1291
+ };
1292
+ /**
1293
+ * @summary Add Running Low Staple
1294
+ */
1295
+ export const useAddRunningLowStaplePantryItemsItemIdAddToShoppingListPost = (options) => {
1296
+ const mutationOptions = getAddRunningLowStaplePantryItemsItemIdAddToShoppingListPostMutationOptions(options);
1297
+ return useMutation(mutationOptions);
1298
+ };
1234
1299
  /**
1235
1300
  * Confirm an item is still there; optionally correct its expiry and level.
1236
1301
  * @summary Verify Pantry Item
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "khansama-api",
3
- "version": "1.70.0",
3
+ "version": "1.72.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",