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