@wix/auto_sdk_restaurants_item-modifier-groups 1.0.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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.d.ts +24 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js +29 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.d.ts +75 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js +437 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.d.ts +28 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js +218 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.d.ts +123 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js +103 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.d.ts +513 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js +17 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js.map +1 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.d.ts +903 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js +490 -0
- package/build/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.d.ts +24 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js +24 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js.map +1 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.d.ts +75 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js +424 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js.map +1 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.d.ts +28 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js +182 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js.map +1 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.d.ts +123 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js +88 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js.map +1 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.d.ts +513 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js +14 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js.map +1 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.d.ts +903 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js +454 -0
- package/build/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.d.ts +24 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js +29 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.d.ts +75 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js +437 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.d.ts +28 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js +218 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.d.ts +123 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js +103 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.d.ts +513 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js +17 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js.map +1 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.d.ts +903 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js +490 -0
- package/build/internal/cjs/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.d.ts +24 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js +24 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.context.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.d.ts +75 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js +424 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.http.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.d.ts +28 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js +182 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.meta.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.d.ts +123 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js +88 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.public.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.d.ts +513 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js +14 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.types.js.map +1 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.d.ts +903 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js +454 -0
- package/build/internal/es/src/restaurants-menus-v1-item-modifier-group-item-modifier-groups.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,903 @@
|
|
|
1
|
+
export interface ModifierGroup {
|
|
2
|
+
/**
|
|
3
|
+
* Modifier group ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group.
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
revision?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Date and time the modifier group was created.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
_createdDate?: Date | null;
|
|
17
|
+
/**
|
|
18
|
+
* Date and time the modifier group was updated.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
_updatedDate?: Date | null;
|
|
22
|
+
/** Modifier group name. */
|
|
23
|
+
name?: string | null;
|
|
24
|
+
/** Group of item modifiers. */
|
|
25
|
+
modifiers?: Modifier[];
|
|
26
|
+
/** Modifier group details. */
|
|
27
|
+
rule?: Rule;
|
|
28
|
+
/** Extended fields. */
|
|
29
|
+
extendedFields?: ExtendedFields;
|
|
30
|
+
}
|
|
31
|
+
export interface Modifier {
|
|
32
|
+
/** Item modifier ID. */
|
|
33
|
+
_id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the item modifier is pre-selected.
|
|
36
|
+
* Default: `false`.
|
|
37
|
+
*/
|
|
38
|
+
preSelected?: boolean | null;
|
|
39
|
+
/** Item modifier price details. */
|
|
40
|
+
additionalChargeInfo?: AdditionalChargeInfo;
|
|
41
|
+
}
|
|
42
|
+
export interface AdditionalChargeInfo {
|
|
43
|
+
/** Additional charge for the item modifier. A value of `0` means the item modifier is free. */
|
|
44
|
+
additionalCharge?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface Rule {
|
|
47
|
+
/** Whether the items from the modifier group must be selected. */
|
|
48
|
+
required?: boolean | null;
|
|
49
|
+
/**
|
|
50
|
+
* Minimum number of item modifiers a site visitor must select. The value must be lower or equal to the available item modifiers in the group.
|
|
51
|
+
* Default: `0`.
|
|
52
|
+
*/
|
|
53
|
+
minSelections?: number | null;
|
|
54
|
+
/** Maximum number of item modifiers a site visitor may select. Must be greater than or equal to the value of `minSelections`. */
|
|
55
|
+
maxSelections?: number | null;
|
|
56
|
+
}
|
|
57
|
+
export interface ExtendedFields {
|
|
58
|
+
/**
|
|
59
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
60
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
61
|
+
*
|
|
62
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
63
|
+
*
|
|
64
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
65
|
+
*/
|
|
66
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
67
|
+
}
|
|
68
|
+
export interface InvalidateCache extends InvalidateCacheGetByOneOf {
|
|
69
|
+
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
|
|
70
|
+
metaSiteId?: string;
|
|
71
|
+
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
|
|
72
|
+
siteId?: string;
|
|
73
|
+
/** Invalidate by App */
|
|
74
|
+
app?: App;
|
|
75
|
+
/** Invalidate by page id */
|
|
76
|
+
page?: Page;
|
|
77
|
+
/** Invalidate by URI path */
|
|
78
|
+
uri?: URI;
|
|
79
|
+
/** Invalidate by file (for media files such as PDFs) */
|
|
80
|
+
file?: File;
|
|
81
|
+
/** tell us why you're invalidating the cache. You don't need to add your app name */
|
|
82
|
+
reason?: string | null;
|
|
83
|
+
/** Is local DS */
|
|
84
|
+
localDc?: boolean;
|
|
85
|
+
hardPurge?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** @oneof */
|
|
88
|
+
export interface InvalidateCacheGetByOneOf {
|
|
89
|
+
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
|
|
90
|
+
metaSiteId?: string;
|
|
91
|
+
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
|
|
92
|
+
siteId?: string;
|
|
93
|
+
/** Invalidate by App */
|
|
94
|
+
app?: App;
|
|
95
|
+
/** Invalidate by page id */
|
|
96
|
+
page?: Page;
|
|
97
|
+
/** Invalidate by URI path */
|
|
98
|
+
uri?: URI;
|
|
99
|
+
/** Invalidate by file (for media files such as PDFs) */
|
|
100
|
+
file?: File;
|
|
101
|
+
}
|
|
102
|
+
export interface App {
|
|
103
|
+
/** The AppDefId */
|
|
104
|
+
appDefId?: string;
|
|
105
|
+
/** The instance Id */
|
|
106
|
+
instanceId?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface Page {
|
|
109
|
+
/** the msid the page is on */
|
|
110
|
+
metaSiteId?: string;
|
|
111
|
+
/** Invalidate by Page ID */
|
|
112
|
+
pageId?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface URI {
|
|
115
|
+
/** the msid the URI is on */
|
|
116
|
+
metaSiteId?: string;
|
|
117
|
+
/** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
|
|
118
|
+
uriPath?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface File {
|
|
121
|
+
/** the msid the file is related to */
|
|
122
|
+
metaSiteId?: string;
|
|
123
|
+
/** Invalidate by filename (for media files such as PDFs) */
|
|
124
|
+
fileName?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface CreateModifierGroupRequest {
|
|
127
|
+
/** Modifier group details. */
|
|
128
|
+
modifierGroup: ModifierGroup;
|
|
129
|
+
}
|
|
130
|
+
export interface CreateModifierGroupResponse {
|
|
131
|
+
/** Modifier group. */
|
|
132
|
+
modifierGroup?: ModifierGroup;
|
|
133
|
+
}
|
|
134
|
+
export interface GetModifierGroupRequest {
|
|
135
|
+
/** Modifier group ID. */
|
|
136
|
+
modifierGroupId: string;
|
|
137
|
+
}
|
|
138
|
+
export interface GetModifierGroupResponse {
|
|
139
|
+
/** Modifier group. */
|
|
140
|
+
modifierGroup?: ModifierGroup;
|
|
141
|
+
}
|
|
142
|
+
export interface ListModifierGroupRequest {
|
|
143
|
+
/** Modifier group IDs. */
|
|
144
|
+
modifierGroupIds?: string[];
|
|
145
|
+
/** The metadata of the paginated results. */
|
|
146
|
+
paging?: CursorPaging;
|
|
147
|
+
}
|
|
148
|
+
export interface CursorPaging {
|
|
149
|
+
/** Number of items to load. */
|
|
150
|
+
limit?: number | null;
|
|
151
|
+
/**
|
|
152
|
+
* Pointer to the next or previous page in the list of results.
|
|
153
|
+
*
|
|
154
|
+
* You can get the relevant cursor token
|
|
155
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
156
|
+
* Not relevant for the first request.
|
|
157
|
+
*/
|
|
158
|
+
cursor?: string | null;
|
|
159
|
+
}
|
|
160
|
+
export interface ListModifierGroupResponse {
|
|
161
|
+
/** Retrieved modifier groups. */
|
|
162
|
+
modifierGroups?: ModifierGroup[];
|
|
163
|
+
/** The metadata of the paginated results. */
|
|
164
|
+
metadata?: CursorPagingMetadata;
|
|
165
|
+
}
|
|
166
|
+
export interface CursorPagingMetadata {
|
|
167
|
+
/** Number of items returned in the response. */
|
|
168
|
+
count?: number | null;
|
|
169
|
+
/** Offset that was requested. */
|
|
170
|
+
cursors?: Cursors;
|
|
171
|
+
/**
|
|
172
|
+
* Indicates if there are more results after the current page.
|
|
173
|
+
* If `true`, another page of results can be retrieved.
|
|
174
|
+
* If `false`, this is the last page.
|
|
175
|
+
*/
|
|
176
|
+
hasNext?: boolean | null;
|
|
177
|
+
}
|
|
178
|
+
export interface Cursors {
|
|
179
|
+
/** Cursor pointing to next page in the list of results. */
|
|
180
|
+
next?: string | null;
|
|
181
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
182
|
+
prev?: string | null;
|
|
183
|
+
}
|
|
184
|
+
export interface QueryModifierGroupsRequest {
|
|
185
|
+
/** Query options. */
|
|
186
|
+
query?: CursorQuery;
|
|
187
|
+
}
|
|
188
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
189
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
190
|
+
cursorPaging?: CursorPaging;
|
|
191
|
+
/**
|
|
192
|
+
* Filter object in the following format:
|
|
193
|
+
* `"filter" : {
|
|
194
|
+
* "fieldName1": "value1",
|
|
195
|
+
* "fieldName2":{"$operator":"value2"}
|
|
196
|
+
* }`
|
|
197
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
198
|
+
*/
|
|
199
|
+
filter?: Record<string, any> | null;
|
|
200
|
+
/**
|
|
201
|
+
* Sort object in the following format:
|
|
202
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
203
|
+
*/
|
|
204
|
+
sort?: Sorting[];
|
|
205
|
+
}
|
|
206
|
+
/** @oneof */
|
|
207
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
208
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
209
|
+
cursorPaging?: CursorPaging;
|
|
210
|
+
}
|
|
211
|
+
export interface Sorting {
|
|
212
|
+
/** Name of the field to sort by. */
|
|
213
|
+
fieldName?: string;
|
|
214
|
+
/** Sort order. */
|
|
215
|
+
order?: SortOrder;
|
|
216
|
+
}
|
|
217
|
+
export declare enum SortOrder {
|
|
218
|
+
ASC = "ASC",
|
|
219
|
+
DESC = "DESC"
|
|
220
|
+
}
|
|
221
|
+
export interface QueryModifierGroupsResponse {
|
|
222
|
+
/** Retrieved modifier groups. */
|
|
223
|
+
modifierGroups?: ModifierGroup[];
|
|
224
|
+
/** Metadata of the paginated results. */
|
|
225
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
226
|
+
}
|
|
227
|
+
export interface CountModifierGroupsRequest {
|
|
228
|
+
/** Filter for counting modifier groups. */
|
|
229
|
+
filter?: Record<string, any> | null;
|
|
230
|
+
}
|
|
231
|
+
export interface CountModifierGroupsResponse {
|
|
232
|
+
/** Counted modifier groups. */
|
|
233
|
+
count?: number;
|
|
234
|
+
}
|
|
235
|
+
export interface UpdateModifierGroupRequest {
|
|
236
|
+
/** Modifier group to update. */
|
|
237
|
+
modifierGroup: ModifierGroup;
|
|
238
|
+
}
|
|
239
|
+
export interface UpdateModifierGroupResponse {
|
|
240
|
+
/** Updated modifier group. */
|
|
241
|
+
modifierGroup?: ModifierGroup;
|
|
242
|
+
}
|
|
243
|
+
export interface DeleteModifierGroupRequest {
|
|
244
|
+
/** Modifier group ID. */
|
|
245
|
+
modifierGroupId: string;
|
|
246
|
+
}
|
|
247
|
+
export interface DeleteModifierGroupResponse {
|
|
248
|
+
}
|
|
249
|
+
export interface BulkCreateModifierGroupsRequest {
|
|
250
|
+
/** Modifier groups details. */
|
|
251
|
+
modifierGroups: ModifierGroup[];
|
|
252
|
+
/** Whether to receive the created modifier groups in the response. */
|
|
253
|
+
returnEntity?: boolean;
|
|
254
|
+
}
|
|
255
|
+
export interface BulkCreateModifierGroupsResponse {
|
|
256
|
+
/** Information about the created modifier groups. */
|
|
257
|
+
results?: BulkCreateModifierGroupsResult[];
|
|
258
|
+
/** Metadata for the API call. */
|
|
259
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
260
|
+
}
|
|
261
|
+
export interface BulkCreateModifierGroupsResult {
|
|
262
|
+
/** Metadata for group modifier creation. */
|
|
263
|
+
itemMetadata?: ItemMetadata;
|
|
264
|
+
/** Created modifier group. */
|
|
265
|
+
modifierGroup?: ModifierGroup;
|
|
266
|
+
}
|
|
267
|
+
export interface ItemMetadata {
|
|
268
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
269
|
+
_id?: string | null;
|
|
270
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
271
|
+
originalIndex?: number;
|
|
272
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
273
|
+
success?: boolean;
|
|
274
|
+
/** Details about the error in case of failure. */
|
|
275
|
+
error?: ApplicationError;
|
|
276
|
+
}
|
|
277
|
+
export interface ApplicationError {
|
|
278
|
+
/** Error code. */
|
|
279
|
+
code?: string;
|
|
280
|
+
/** Description of the error. */
|
|
281
|
+
description?: string;
|
|
282
|
+
/** Data related to the error. */
|
|
283
|
+
data?: Record<string, any> | null;
|
|
284
|
+
}
|
|
285
|
+
export interface BulkActionMetadata {
|
|
286
|
+
/** Number of items that were successfully processed. */
|
|
287
|
+
totalSuccesses?: number;
|
|
288
|
+
/** Number of items that couldn't be processed. */
|
|
289
|
+
totalFailures?: number;
|
|
290
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
291
|
+
undetailedFailures?: number;
|
|
292
|
+
}
|
|
293
|
+
export interface BulkUpdateModifierGroupsRequest {
|
|
294
|
+
/** Modifier groups to update. */
|
|
295
|
+
modifierGroups: MaskedModifierGroup[];
|
|
296
|
+
/** Whether to receive the updated modifier groups in the response. */
|
|
297
|
+
returnEntity?: boolean;
|
|
298
|
+
}
|
|
299
|
+
export interface MaskedModifierGroup {
|
|
300
|
+
/** Modifier group to update. */
|
|
301
|
+
modifierGroup?: ModifierGroup;
|
|
302
|
+
/** Explicit list of fields to update. */
|
|
303
|
+
mask?: string[];
|
|
304
|
+
}
|
|
305
|
+
export interface BulkUpdateModifierGroupsResponse {
|
|
306
|
+
/** Information about the updated modifier groups. */
|
|
307
|
+
results?: BulkUpdateModifierGroupsResult[];
|
|
308
|
+
/** Metadata for the API call. */
|
|
309
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
310
|
+
}
|
|
311
|
+
export interface BulkUpdateModifierGroupsResult {
|
|
312
|
+
/** Metadata for group modifier update. */
|
|
313
|
+
itemMetadata?: ItemMetadata;
|
|
314
|
+
/** Updated modifier group. Only returned if `returnEntity` is set to `true`. */
|
|
315
|
+
modifierGroup?: ModifierGroup;
|
|
316
|
+
}
|
|
317
|
+
export interface BulkDeleteModifierGroupsRequest {
|
|
318
|
+
/** Modifier Group IDs. */
|
|
319
|
+
ids: string[];
|
|
320
|
+
}
|
|
321
|
+
export interface BulkDeleteModifierGroupsResponse {
|
|
322
|
+
/** Information about the deleted modifier group. */
|
|
323
|
+
results?: BulkDeleteModifierGroupsResult[];
|
|
324
|
+
/** Metadata for the API call. */
|
|
325
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
326
|
+
}
|
|
327
|
+
export interface BulkDeleteModifierGroupsResult {
|
|
328
|
+
/** Metadata for group modifier deletion. */
|
|
329
|
+
itemMetadata?: ItemMetadata;
|
|
330
|
+
}
|
|
331
|
+
export interface CloneModifierGroupsRequest {
|
|
332
|
+
/** The MetaSiteId to clone from. */
|
|
333
|
+
metaSiteId?: string;
|
|
334
|
+
}
|
|
335
|
+
export interface CloneModifierGroupsResponse {
|
|
336
|
+
}
|
|
337
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
338
|
+
createdEvent?: EntityCreatedEvent;
|
|
339
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
340
|
+
deletedEvent?: EntityDeletedEvent;
|
|
341
|
+
actionEvent?: ActionEvent;
|
|
342
|
+
/**
|
|
343
|
+
* Unique event ID.
|
|
344
|
+
* Allows clients to ignore duplicate webhooks.
|
|
345
|
+
*/
|
|
346
|
+
_id?: string;
|
|
347
|
+
/**
|
|
348
|
+
* Assumes actions are also always typed to an entity_type
|
|
349
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
350
|
+
*/
|
|
351
|
+
entityFqdn?: string;
|
|
352
|
+
/**
|
|
353
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
354
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
355
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
356
|
+
*/
|
|
357
|
+
slug?: string;
|
|
358
|
+
/** ID of the entity associated with the event. */
|
|
359
|
+
entityId?: string;
|
|
360
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
361
|
+
eventTime?: Date | null;
|
|
362
|
+
/**
|
|
363
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
364
|
+
* (for example, GDPR).
|
|
365
|
+
*/
|
|
366
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
367
|
+
/** If present, indicates the action that triggered the event. */
|
|
368
|
+
originatedFrom?: string | null;
|
|
369
|
+
/**
|
|
370
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
371
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
372
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
373
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
374
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
375
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
376
|
+
*/
|
|
377
|
+
entityEventSequence?: string | null;
|
|
378
|
+
}
|
|
379
|
+
/** @oneof */
|
|
380
|
+
export interface DomainEventBodyOneOf {
|
|
381
|
+
createdEvent?: EntityCreatedEvent;
|
|
382
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
383
|
+
deletedEvent?: EntityDeletedEvent;
|
|
384
|
+
actionEvent?: ActionEvent;
|
|
385
|
+
}
|
|
386
|
+
export interface EntityCreatedEvent {
|
|
387
|
+
entity?: string;
|
|
388
|
+
}
|
|
389
|
+
export interface RestoreInfo {
|
|
390
|
+
deletedDate?: Date | null;
|
|
391
|
+
}
|
|
392
|
+
export interface EntityUpdatedEvent {
|
|
393
|
+
/**
|
|
394
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
395
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
396
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
397
|
+
*/
|
|
398
|
+
currentEntity?: string;
|
|
399
|
+
}
|
|
400
|
+
export interface EntityDeletedEvent {
|
|
401
|
+
/** Entity that was deleted */
|
|
402
|
+
deletedEntity?: string | null;
|
|
403
|
+
}
|
|
404
|
+
export interface ActionEvent {
|
|
405
|
+
body?: string;
|
|
406
|
+
}
|
|
407
|
+
export interface Empty {
|
|
408
|
+
}
|
|
409
|
+
export interface MessageEnvelope {
|
|
410
|
+
/** App instance ID. */
|
|
411
|
+
instanceId?: string | null;
|
|
412
|
+
/** Event type. */
|
|
413
|
+
eventType?: string;
|
|
414
|
+
/** The identification type and identity data. */
|
|
415
|
+
identity?: IdentificationData;
|
|
416
|
+
/** Stringify payload. */
|
|
417
|
+
data?: string;
|
|
418
|
+
}
|
|
419
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
420
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
421
|
+
anonymousVisitorId?: string;
|
|
422
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
423
|
+
memberId?: string;
|
|
424
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
425
|
+
wixUserId?: string;
|
|
426
|
+
/** ID of an app. */
|
|
427
|
+
appId?: string;
|
|
428
|
+
/** @readonly */
|
|
429
|
+
identityType?: WebhookIdentityType;
|
|
430
|
+
}
|
|
431
|
+
/** @oneof */
|
|
432
|
+
export interface IdentificationDataIdOneOf {
|
|
433
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
434
|
+
anonymousVisitorId?: string;
|
|
435
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
436
|
+
memberId?: string;
|
|
437
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
438
|
+
wixUserId?: string;
|
|
439
|
+
/** ID of an app. */
|
|
440
|
+
appId?: string;
|
|
441
|
+
}
|
|
442
|
+
export declare enum WebhookIdentityType {
|
|
443
|
+
UNKNOWN = "UNKNOWN",
|
|
444
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
445
|
+
MEMBER = "MEMBER",
|
|
446
|
+
WIX_USER = "WIX_USER",
|
|
447
|
+
APP = "APP"
|
|
448
|
+
}
|
|
449
|
+
interface ModifierNonNullableFields {
|
|
450
|
+
_id: string;
|
|
451
|
+
}
|
|
452
|
+
export interface ModifierGroupNonNullableFields {
|
|
453
|
+
modifiers: ModifierNonNullableFields[];
|
|
454
|
+
businessLocationIds: string[];
|
|
455
|
+
}
|
|
456
|
+
export interface CreateModifierGroupResponseNonNullableFields {
|
|
457
|
+
modifierGroup?: ModifierGroupNonNullableFields;
|
|
458
|
+
}
|
|
459
|
+
export interface GetModifierGroupResponseNonNullableFields {
|
|
460
|
+
modifierGroup?: ModifierGroupNonNullableFields;
|
|
461
|
+
}
|
|
462
|
+
export interface ListModifierGroupResponseNonNullableFields {
|
|
463
|
+
modifierGroups: ModifierGroupNonNullableFields[];
|
|
464
|
+
}
|
|
465
|
+
export interface QueryModifierGroupsResponseNonNullableFields {
|
|
466
|
+
modifierGroups: ModifierGroupNonNullableFields[];
|
|
467
|
+
}
|
|
468
|
+
export interface CountModifierGroupsResponseNonNullableFields {
|
|
469
|
+
count: number;
|
|
470
|
+
}
|
|
471
|
+
export interface UpdateModifierGroupResponseNonNullableFields {
|
|
472
|
+
modifierGroup?: ModifierGroupNonNullableFields;
|
|
473
|
+
}
|
|
474
|
+
interface ApplicationErrorNonNullableFields {
|
|
475
|
+
code: string;
|
|
476
|
+
description: string;
|
|
477
|
+
}
|
|
478
|
+
interface ItemMetadataNonNullableFields {
|
|
479
|
+
originalIndex: number;
|
|
480
|
+
success: boolean;
|
|
481
|
+
error?: ApplicationErrorNonNullableFields;
|
|
482
|
+
}
|
|
483
|
+
interface BulkCreateModifierGroupsResultNonNullableFields {
|
|
484
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
485
|
+
modifierGroup?: ModifierGroupNonNullableFields;
|
|
486
|
+
}
|
|
487
|
+
interface BulkActionMetadataNonNullableFields {
|
|
488
|
+
totalSuccesses: number;
|
|
489
|
+
totalFailures: number;
|
|
490
|
+
undetailedFailures: number;
|
|
491
|
+
}
|
|
492
|
+
export interface BulkCreateModifierGroupsResponseNonNullableFields {
|
|
493
|
+
results: BulkCreateModifierGroupsResultNonNullableFields[];
|
|
494
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
495
|
+
}
|
|
496
|
+
interface BulkUpdateModifierGroupsResultNonNullableFields {
|
|
497
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
498
|
+
modifierGroup?: ModifierGroupNonNullableFields;
|
|
499
|
+
}
|
|
500
|
+
export interface BulkUpdateModifierGroupsResponseNonNullableFields {
|
|
501
|
+
results: BulkUpdateModifierGroupsResultNonNullableFields[];
|
|
502
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
503
|
+
}
|
|
504
|
+
interface BulkDeleteModifierGroupsResultNonNullableFields {
|
|
505
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
506
|
+
}
|
|
507
|
+
export interface BulkDeleteModifierGroupsResponseNonNullableFields {
|
|
508
|
+
results: BulkDeleteModifierGroupsResultNonNullableFields[];
|
|
509
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
510
|
+
}
|
|
511
|
+
export interface BaseEventMetadata {
|
|
512
|
+
/** App instance ID. */
|
|
513
|
+
instanceId?: string | null;
|
|
514
|
+
/** Event type. */
|
|
515
|
+
eventType?: string;
|
|
516
|
+
/** The identification type and identity data. */
|
|
517
|
+
identity?: IdentificationData;
|
|
518
|
+
}
|
|
519
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
520
|
+
/**
|
|
521
|
+
* Unique event ID.
|
|
522
|
+
* Allows clients to ignore duplicate webhooks.
|
|
523
|
+
*/
|
|
524
|
+
_id?: string;
|
|
525
|
+
/**
|
|
526
|
+
* Assumes actions are also always typed to an entity_type
|
|
527
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
528
|
+
*/
|
|
529
|
+
entityFqdn?: string;
|
|
530
|
+
/**
|
|
531
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
532
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
533
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
534
|
+
*/
|
|
535
|
+
slug?: string;
|
|
536
|
+
/** ID of the entity associated with the event. */
|
|
537
|
+
entityId?: string;
|
|
538
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
539
|
+
eventTime?: Date | null;
|
|
540
|
+
/**
|
|
541
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
542
|
+
* (for example, GDPR).
|
|
543
|
+
*/
|
|
544
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
545
|
+
/** If present, indicates the action that triggered the event. */
|
|
546
|
+
originatedFrom?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
549
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
550
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
551
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
552
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
553
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
554
|
+
*/
|
|
555
|
+
entityEventSequence?: string | null;
|
|
556
|
+
}
|
|
557
|
+
export interface ItemModifierGroupCreatedEnvelope {
|
|
558
|
+
entity: ModifierGroup;
|
|
559
|
+
metadata: EventMetadata;
|
|
560
|
+
}
|
|
561
|
+
/** @permissionScope Manage Bookings Services and Settings
|
|
562
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
563
|
+
* @permissionScope Manage Portfolio
|
|
564
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
565
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
566
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
567
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
568
|
+
* @webhook
|
|
569
|
+
* @eventType wix.restaurants.menus.v1.item_modifier_group_created
|
|
570
|
+
* @documentationMaturity preview
|
|
571
|
+
*/
|
|
572
|
+
export declare function onItemModifierGroupCreated(handler: (event: ItemModifierGroupCreatedEnvelope) => void | Promise<void>): void;
|
|
573
|
+
export interface ItemModifierGroupDeletedEnvelope {
|
|
574
|
+
metadata: EventMetadata;
|
|
575
|
+
}
|
|
576
|
+
/** @permissionScope Manage Bookings Services and Settings
|
|
577
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
578
|
+
* @permissionScope Manage Portfolio
|
|
579
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
580
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
581
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
582
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
583
|
+
* @webhook
|
|
584
|
+
* @eventType wix.restaurants.menus.v1.item_modifier_group_deleted
|
|
585
|
+
* @documentationMaturity preview
|
|
586
|
+
*/
|
|
587
|
+
export declare function onItemModifierGroupDeleted(handler: (event: ItemModifierGroupDeletedEnvelope) => void | Promise<void>): void;
|
|
588
|
+
export interface ItemModifierGroupUpdatedEnvelope {
|
|
589
|
+
entity: ModifierGroup;
|
|
590
|
+
metadata: EventMetadata;
|
|
591
|
+
}
|
|
592
|
+
/** @permissionScope Manage Bookings Services and Settings
|
|
593
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
594
|
+
* @permissionScope Manage Portfolio
|
|
595
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
596
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
597
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
598
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
599
|
+
* @webhook
|
|
600
|
+
* @eventType wix.restaurants.menus.v1.item_modifier_group_updated
|
|
601
|
+
* @documentationMaturity preview
|
|
602
|
+
*/
|
|
603
|
+
export declare function onItemModifierGroupUpdated(handler: (event: ItemModifierGroupUpdatedEnvelope) => void | Promise<void>): void;
|
|
604
|
+
/**
|
|
605
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
606
|
+
*
|
|
607
|
+
* Creates a modifier group.
|
|
608
|
+
*
|
|
609
|
+
* To create multiple modifier groups at once, use [Bulk Create Modifiers](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/item-modifier-groups/bulk-create-modifier-groups).
|
|
610
|
+
* @param modifierGroup - Modifier group details.
|
|
611
|
+
* @public
|
|
612
|
+
* @documentationMaturity preview
|
|
613
|
+
* @requiredField modifierGroup
|
|
614
|
+
* @requiredField modifierGroup.name
|
|
615
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_CREATE
|
|
616
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
617
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
618
|
+
* @applicableIdentity APP
|
|
619
|
+
* @returns Modifier group.
|
|
620
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.CreateModifierGroup
|
|
621
|
+
*/
|
|
622
|
+
export declare function createModifierGroup(modifierGroup: ModifierGroup): Promise<ModifierGroup & ModifierGroupNonNullableFields>;
|
|
623
|
+
/**
|
|
624
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
625
|
+
*
|
|
626
|
+
* Retrieves a modifier group by the ID.
|
|
627
|
+
* @param modifierGroupId - Modifier group ID.
|
|
628
|
+
* @public
|
|
629
|
+
* @documentationMaturity preview
|
|
630
|
+
* @requiredField modifierGroupId
|
|
631
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
632
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
633
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
634
|
+
* @permissionScope Manage Portfolio
|
|
635
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
636
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
637
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
638
|
+
* @applicableIdentity APP
|
|
639
|
+
* @applicableIdentity VISITOR
|
|
640
|
+
* @returns Modifier group.
|
|
641
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.GetModifierGroup
|
|
642
|
+
*/
|
|
643
|
+
export declare function getModifierGroup(modifierGroupId: string): Promise<ModifierGroup & ModifierGroupNonNullableFields>;
|
|
644
|
+
/**
|
|
645
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
646
|
+
*
|
|
647
|
+
* Retrieves a list of up to 100 modifier groups.
|
|
648
|
+
* @public
|
|
649
|
+
* @documentationMaturity preview
|
|
650
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
651
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
652
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
653
|
+
* @permissionScope Manage Portfolio
|
|
654
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
655
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
656
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
657
|
+
* @applicableIdentity APP
|
|
658
|
+
* @applicableIdentity VISITOR
|
|
659
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.ListModifierGroups
|
|
660
|
+
*/
|
|
661
|
+
export declare function listModifierGroups(options?: ListModifierGroupsOptions): Promise<ListModifierGroupResponse & ListModifierGroupResponseNonNullableFields>;
|
|
662
|
+
export interface ListModifierGroupsOptions {
|
|
663
|
+
/** Modifier group IDs. */
|
|
664
|
+
modifierGroupIds?: string[];
|
|
665
|
+
/** The metadata of the paginated results. */
|
|
666
|
+
paging?: CursorPaging;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Creates a query to retrieve a list of item modifier groups.
|
|
670
|
+
*
|
|
671
|
+
* The `queryModifierGroups()` function builds a query to retrieve a list of item modifier groups and returns a `ModifierGroupsQueryBuilder` object.
|
|
672
|
+
*
|
|
673
|
+
* The returned object contains the query definition, which is used to run the query using the [`find()`](/item-modifier-groups/modifier-groups-query-builder/find) function.
|
|
674
|
+
*
|
|
675
|
+
* You can refine the query by chaining `ModifierGroupsQueryBuilder` functions onto the query. `ModifierGroupsQueryBuilder` functions enable you to filter, sort, and control the results that `queryModifierGroups()` returns.
|
|
676
|
+
*
|
|
677
|
+
* `queryModifierGroups()` runs with the following `ModifierGroupsQueryBuilder` defaults, which you can override:
|
|
678
|
+
*
|
|
679
|
+
* * [`limit(100)`](/item-modifier-groups/modifier-groups-query-builder/limit)
|
|
680
|
+
* * [`ascending('entityId')`](/item-modifier-groups/modifier-groups-query-builder/ascending)
|
|
681
|
+
*
|
|
682
|
+
* The following `ModifierGroupsQueryBuilder` functions are supported for `queryModifierGroups()`. For a full description of the item modifier group object, see the object returned for the [`items`](/item-modifier-groups/modifier-groups-query-builder/items) property in `ModifierGroupsQueryResult`.
|
|
683
|
+
* @public
|
|
684
|
+
* @documentationMaturity preview
|
|
685
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
686
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
687
|
+
* @permissionScope Manage Portfolio
|
|
688
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
689
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
690
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
691
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
692
|
+
* @applicableIdentity APP
|
|
693
|
+
* @applicableIdentity VISITOR
|
|
694
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.QueryModifierGroups
|
|
695
|
+
*/
|
|
696
|
+
export declare function queryModifierGroups(): ModifierGroupsQueryBuilder;
|
|
697
|
+
interface QueryCursorResult {
|
|
698
|
+
cursors: Cursors;
|
|
699
|
+
hasNext: () => boolean;
|
|
700
|
+
hasPrev: () => boolean;
|
|
701
|
+
length: number;
|
|
702
|
+
pageSize: number;
|
|
703
|
+
}
|
|
704
|
+
export interface ModifierGroupsQueryResult extends QueryCursorResult {
|
|
705
|
+
items: ModifierGroup[];
|
|
706
|
+
query: ModifierGroupsQueryBuilder;
|
|
707
|
+
next: () => Promise<ModifierGroupsQueryResult>;
|
|
708
|
+
prev: () => Promise<ModifierGroupsQueryResult>;
|
|
709
|
+
}
|
|
710
|
+
export interface ModifierGroupsQueryBuilder {
|
|
711
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
712
|
+
* @param value - Value to compare against.
|
|
713
|
+
* @documentationMaturity preview
|
|
714
|
+
*/
|
|
715
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'modifiers.preSelected' | 'rule.required' | 'rule.minSelections' | 'rule.maxSelections', value: any) => ModifierGroupsQueryBuilder;
|
|
716
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
717
|
+
* @param value - Value to compare against.
|
|
718
|
+
* @documentationMaturity preview
|
|
719
|
+
*/
|
|
720
|
+
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'modifiers.preSelected' | 'rule.required' | 'rule.minSelections' | 'rule.maxSelections', value: any) => ModifierGroupsQueryBuilder;
|
|
721
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
722
|
+
* @param value - Value to compare against.
|
|
723
|
+
* @documentationMaturity preview
|
|
724
|
+
*/
|
|
725
|
+
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifierGroupsQueryBuilder;
|
|
726
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
727
|
+
* @param value - Value to compare against.
|
|
728
|
+
* @documentationMaturity preview
|
|
729
|
+
*/
|
|
730
|
+
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifierGroupsQueryBuilder;
|
|
731
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
732
|
+
* @param value - Value to compare against.
|
|
733
|
+
* @documentationMaturity preview
|
|
734
|
+
*/
|
|
735
|
+
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifierGroupsQueryBuilder;
|
|
736
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
737
|
+
* @param value - Value to compare against.
|
|
738
|
+
* @documentationMaturity preview
|
|
739
|
+
*/
|
|
740
|
+
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifierGroupsQueryBuilder;
|
|
741
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
742
|
+
* @param string - String to compare against. Case-insensitive.
|
|
743
|
+
* @documentationMaturity preview
|
|
744
|
+
*/
|
|
745
|
+
startsWith: (propertyName: 'name', value: string) => ModifierGroupsQueryBuilder;
|
|
746
|
+
/** @documentationMaturity preview */
|
|
747
|
+
in: (propertyName: '_id' | 'name' | 'modifiers.id' | 'modifiers.preSelected' | 'rule.required', value: any) => ModifierGroupsQueryBuilder;
|
|
748
|
+
/** @documentationMaturity preview */
|
|
749
|
+
exists: (propertyName: 'modifiers' | 'rule', value: boolean) => ModifierGroupsQueryBuilder;
|
|
750
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
751
|
+
* @documentationMaturity preview
|
|
752
|
+
*/
|
|
753
|
+
limit: (limit: number) => ModifierGroupsQueryBuilder;
|
|
754
|
+
/** @param cursor - A pointer to specific record
|
|
755
|
+
* @documentationMaturity preview
|
|
756
|
+
*/
|
|
757
|
+
skipTo: (cursor: string) => ModifierGroupsQueryBuilder;
|
|
758
|
+
/** @documentationMaturity preview */
|
|
759
|
+
find: () => Promise<ModifierGroupsQueryResult>;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* > **Note:** The Item API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
763
|
+
*
|
|
764
|
+
* Retrieves the number of modifier groups that match a specified filter.
|
|
765
|
+
*
|
|
766
|
+
* If a filter isn't passed in the request, the endpoint returns the count of all modifier groups.
|
|
767
|
+
* @public
|
|
768
|
+
* @documentationMaturity preview
|
|
769
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_READ
|
|
770
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
771
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
772
|
+
* @permissionScope Manage Portfolio
|
|
773
|
+
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
774
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
775
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
776
|
+
* @applicableIdentity APP
|
|
777
|
+
* @applicableIdentity VISITOR
|
|
778
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.CountModifierGroups
|
|
779
|
+
*/
|
|
780
|
+
export declare function countModifierGroups(options?: CountModifierGroupsOptions): Promise<CountModifierGroupsResponse & CountModifierGroupsResponseNonNullableFields>;
|
|
781
|
+
export interface CountModifierGroupsOptions {
|
|
782
|
+
/** Filter for counting modifier groups. */
|
|
783
|
+
filter?: Record<string, any> | null;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
787
|
+
*
|
|
788
|
+
* Updates a modifier group.
|
|
789
|
+
*
|
|
790
|
+
* Each time a modifier group is updated, its revision increments by 1. The existing revision must be included when updating the modifier group. This ensures you're working with the latest modifier group information, and it prevents unintended overwrites.
|
|
791
|
+
* @param _id - Modifier group ID.
|
|
792
|
+
* @public
|
|
793
|
+
* @documentationMaturity preview
|
|
794
|
+
* @requiredField _id
|
|
795
|
+
* @requiredField modifierGroup
|
|
796
|
+
* @requiredField modifierGroup.revision
|
|
797
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_UPDATE
|
|
798
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
799
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
800
|
+
* @applicableIdentity APP
|
|
801
|
+
* @returns Updated modifier group.
|
|
802
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.UpdateModifierGroup
|
|
803
|
+
*/
|
|
804
|
+
export declare function updateModifierGroup(_id: string | null, modifierGroup: UpdateModifierGroup): Promise<ModifierGroup & ModifierGroupNonNullableFields>;
|
|
805
|
+
export interface UpdateModifierGroup {
|
|
806
|
+
/**
|
|
807
|
+
* Modifier group ID.
|
|
808
|
+
* @readonly
|
|
809
|
+
*/
|
|
810
|
+
_id?: string | null;
|
|
811
|
+
/**
|
|
812
|
+
* Revision number, which increments by 1 each time the modifier group is updated. To prevent conflicting changes, the current revision must be passed when updating the modifier group. Ignored when creating a modifier group.
|
|
813
|
+
* @readonly
|
|
814
|
+
*/
|
|
815
|
+
revision?: string | null;
|
|
816
|
+
/**
|
|
817
|
+
* Date and time the modifier group was created.
|
|
818
|
+
* @readonly
|
|
819
|
+
*/
|
|
820
|
+
_createdDate?: Date | null;
|
|
821
|
+
/**
|
|
822
|
+
* Date and time the modifier group was updated.
|
|
823
|
+
* @readonly
|
|
824
|
+
*/
|
|
825
|
+
_updatedDate?: Date | null;
|
|
826
|
+
/** Modifier group name. */
|
|
827
|
+
name?: string | null;
|
|
828
|
+
/** Group of item modifiers. */
|
|
829
|
+
modifiers?: Modifier[];
|
|
830
|
+
/** Modifier group details. */
|
|
831
|
+
rule?: Rule;
|
|
832
|
+
/** Extended fields. */
|
|
833
|
+
extendedFields?: ExtendedFields;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
837
|
+
*
|
|
838
|
+
* Deletes a modifier group.
|
|
839
|
+
* @param modifierGroupId - Modifier group ID.
|
|
840
|
+
* @public
|
|
841
|
+
* @documentationMaturity preview
|
|
842
|
+
* @requiredField modifierGroupId
|
|
843
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_DELETE
|
|
844
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
845
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
846
|
+
* @applicableIdentity APP
|
|
847
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.DeleteModifierGroup
|
|
848
|
+
*/
|
|
849
|
+
export declare function deleteModifierGroup(modifierGroupId: string): Promise<void>;
|
|
850
|
+
/**
|
|
851
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
852
|
+
*
|
|
853
|
+
* Creates multiple modifier groups.
|
|
854
|
+
* @param modifierGroups - Modifier groups details.
|
|
855
|
+
* @public
|
|
856
|
+
* @documentationMaturity preview
|
|
857
|
+
* @requiredField modifierGroups
|
|
858
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_CREATE
|
|
859
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
860
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
861
|
+
* @applicableIdentity APP
|
|
862
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.BulkCreateModifierGroups
|
|
863
|
+
*/
|
|
864
|
+
export declare function bulkCreateModifierGroups(modifierGroups: ModifierGroup[], options?: BulkCreateModifierGroupsOptions): Promise<BulkCreateModifierGroupsResponse & BulkCreateModifierGroupsResponseNonNullableFields>;
|
|
865
|
+
export interface BulkCreateModifierGroupsOptions {
|
|
866
|
+
/** Whether to receive the created modifier groups in the response. */
|
|
867
|
+
returnEntity?: boolean;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* > **Note:** The Item Modifier Groups API only works with the Wix Restaurants Menus (New) app. Make sure you downloaded this app from [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
|
|
871
|
+
*
|
|
872
|
+
* Updates multiple item modifier groups at once. This function supports partial updates.
|
|
873
|
+
* Each time a modifier group is updated, its revision increments by 1. The existing revision must be included when updating an item modifier group. This ensures you're working with the latest item information, and prevents unintended overwrites.
|
|
874
|
+
* Up to 100 modifier groups can be returned per request.
|
|
875
|
+
* @param modifierGroups - Modifier groups to update.
|
|
876
|
+
* @public
|
|
877
|
+
* @documentationMaturity preview
|
|
878
|
+
* @requiredField modifierGroups
|
|
879
|
+
* @requiredField modifierGroups.modifierGroup._id
|
|
880
|
+
* @requiredField modifierGroups.modifierGroup.revision
|
|
881
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_UPDATE
|
|
882
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
883
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
884
|
+
* @applicableIdentity APP
|
|
885
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.BulkUpdateModifierGroups
|
|
886
|
+
*/
|
|
887
|
+
export declare function bulkUpdateModifierGroups(modifierGroups: MaskedModifierGroup[], options?: BulkUpdateModifierGroupsOptions): Promise<BulkUpdateModifierGroupsResponse & BulkUpdateModifierGroupsResponseNonNullableFields>;
|
|
888
|
+
export interface BulkUpdateModifierGroupsOptions {
|
|
889
|
+
/** Whether to receive the updated modifier groups in the response. */
|
|
890
|
+
returnEntity?: boolean;
|
|
891
|
+
}
|
|
892
|
+
/** @param ids - Modifier Group IDs.
|
|
893
|
+
* @public
|
|
894
|
+
* @documentationMaturity preview
|
|
895
|
+
* @requiredField ids
|
|
896
|
+
* @permissionId RESTAURANTS.MODIFIER_GROUP_DELETE
|
|
897
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
898
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
899
|
+
* @applicableIdentity APP
|
|
900
|
+
* @fqn wix.restaurants.menus.v1.ModifierGroupsService.BulkDeleteModifierGroups
|
|
901
|
+
*/
|
|
902
|
+
export declare function bulkDeleteModifierGroups(ids: string[]): Promise<BulkDeleteModifierGroupsResponse & BulkDeleteModifierGroupsResponseNonNullableFields>;
|
|
903
|
+
export {};
|