1 export const getFeature = (featureCode: string) => ({
2 url: `core/v4/features/${featureCode}`,
7 * Get all feature flags of featureCodes
8 * API route is a lot more powerfull with sorts, filters
9 * It's just not needed at this point
11 export const getFeatures = (featureCodes: string[]) => {
12 if (featureCodes?.length < 1) {
13 throw new Error(`Provide a list of feature code, getting them all at once is not recommended at this point`);
15 if (featureCodes.length > 150) {
16 throw new Error(`You can't ask for more than 150 features at a time, use pagination instead`);
20 url: `core/v4/features`,
23 Code: featureCodes.join(','),
24 Limit: featureCodes.length,
29 export const updateFeatureValue = (featureCode: string, Value: any) => ({
30 url: `core/v4/features/${featureCode}/value`,