khansama-api 1.68.0 → 1.69.1
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.d.ts +127 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -1
- package/package.json +1 -1
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.
|
|
5
|
+
* OpenAPI spec version: 1.69.1
|
|
6
6
|
*/
|
|
7
7
|
import { useMutation, useQuery } from '@tanstack/react-query';
|
|
8
8
|
import axios from 'axios';
|
|
@@ -302,6 +302,12 @@ export const OrderEnum = {
|
|
|
302
302
|
desc: 'desc',
|
|
303
303
|
};
|
|
304
304
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
305
|
+
export const PlanCopyDayResultAction = {
|
|
306
|
+
copied: 'copied',
|
|
307
|
+
skipped: 'skipped',
|
|
308
|
+
overwritten: 'overwritten',
|
|
309
|
+
};
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
305
311
|
export const ProfileFitStatus = {
|
|
306
312
|
safe: 'safe',
|
|
307
313
|
conflict: 'conflict',
|
|
@@ -3934,6 +3940,65 @@ export const useAdoptPresetPlansPresetsPresetIdAdoptPost = (options) => {
|
|
|
3934
3940
|
const mutationOptions = getAdoptPresetPlansPresetsPresetIdAdoptPostMutationOptions(options);
|
|
3935
3941
|
return useMutation(mutationOptions);
|
|
3936
3942
|
};
|
|
3943
|
+
/**
|
|
3944
|
+
* Copy this plan's week (or one day) into another week (PAN-545): the
|
|
3945
|
+
copy lands on the plan already at the target week, or creates a draft
|
|
3946
|
+
plan for it. Filled target days are never replaced without
|
|
3947
|
+
``overwrite=true`` — the app asks before sending it.
|
|
3948
|
+
* @summary Copy Plan Week
|
|
3949
|
+
*/
|
|
3950
|
+
export const copyPlanWeekPlansPlanIdCopyPost = (planId, planCopyRequest, options) => {
|
|
3951
|
+
return axios.post(`/plans/${planId}/copy`, planCopyRequest, options);
|
|
3952
|
+
};
|
|
3953
|
+
export const getCopyPlanWeekPlansPlanIdCopyPostMutationOptions = (options) => {
|
|
3954
|
+
const mutationKey = ['copyPlanWeekPlansPlanIdCopyPost'];
|
|
3955
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ?
|
|
3956
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
3957
|
+
options
|
|
3958
|
+
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
3959
|
+
: { mutation: { mutationKey, }, axios: undefined };
|
|
3960
|
+
const mutationFn = (props) => {
|
|
3961
|
+
const { planId, data } = props ?? {};
|
|
3962
|
+
return copyPlanWeekPlansPlanIdCopyPost(planId, data, axiosOptions);
|
|
3963
|
+
};
|
|
3964
|
+
return { mutationFn, ...mutationOptions };
|
|
3965
|
+
};
|
|
3966
|
+
/**
|
|
3967
|
+
* @summary Copy Plan Week
|
|
3968
|
+
*/
|
|
3969
|
+
export const useCopyPlanWeekPlansPlanIdCopyPost = (options) => {
|
|
3970
|
+
const mutationOptions = getCopyPlanWeekPlansPlanIdCopyPostMutationOptions(options);
|
|
3971
|
+
return useMutation(mutationOptions);
|
|
3972
|
+
};
|
|
3973
|
+
/**
|
|
3974
|
+
* Save this plan as a named template (PAN-545) any future week can be
|
|
3975
|
+
created from. Plus-only where the plan limits apply — a capped Free
|
|
3976
|
+
household gets the 402 the app renders as the upgrade card.
|
|
3977
|
+
* @summary Save Plan As Template
|
|
3978
|
+
*/
|
|
3979
|
+
export const savePlanAsTemplatePlansPlanIdSaveAsTemplatePost = (planId, planTemplateCreate, options) => {
|
|
3980
|
+
return axios.post(`/plans/${planId}/save-as-template`, planTemplateCreate, options);
|
|
3981
|
+
};
|
|
3982
|
+
export const getSavePlanAsTemplatePlansPlanIdSaveAsTemplatePostMutationOptions = (options) => {
|
|
3983
|
+
const mutationKey = ['savePlanAsTemplatePlansPlanIdSaveAsTemplatePost'];
|
|
3984
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ?
|
|
3985
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
3986
|
+
options
|
|
3987
|
+
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
3988
|
+
: { mutation: { mutationKey, }, axios: undefined };
|
|
3989
|
+
const mutationFn = (props) => {
|
|
3990
|
+
const { planId, data } = props ?? {};
|
|
3991
|
+
return savePlanAsTemplatePlansPlanIdSaveAsTemplatePost(planId, data, axiosOptions);
|
|
3992
|
+
};
|
|
3993
|
+
return { mutationFn, ...mutationOptions };
|
|
3994
|
+
};
|
|
3995
|
+
/**
|
|
3996
|
+
* @summary Save Plan As Template
|
|
3997
|
+
*/
|
|
3998
|
+
export const useSavePlanAsTemplatePlansPlanIdSaveAsTemplatePost = (options) => {
|
|
3999
|
+
const mutationOptions = getSavePlanAsTemplatePlansPlanIdSaveAsTemplatePostMutationOptions(options);
|
|
4000
|
+
return useMutation(mutationOptions);
|
|
4001
|
+
};
|
|
3937
4002
|
/**
|
|
3938
4003
|
* One plan with its slots (eager-loaded).
|
|
3939
4004
|
* @summary Get Plan
|