@wix/calendar 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/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.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/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +46 -0
- package/type-bundles/context.bundle.d.ts +1519 -0
- package/type-bundles/index.bundle.d.ts +1557 -0
- package/type-bundles/meta.bundle.d.ts +901 -0
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
interface Schedule$1 {
|
|
2
|
+
/**
|
|
3
|
+
* The schedule ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Optional external ID. Cannot change.
|
|
9
|
+
*
|
|
10
|
+
* For instance, might be the ID of the Bookings Resource or Service.
|
|
11
|
+
*/
|
|
12
|
+
externalId?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the schedule.
|
|
15
|
+
*
|
|
16
|
+
* For instance, might be the name of the Bookings Resource or Service.
|
|
17
|
+
*/
|
|
18
|
+
name?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The schedule status.
|
|
21
|
+
*
|
|
22
|
+
* The possible values are:
|
|
23
|
+
* - `"ACTIVE"` Schedule is active. Default value.
|
|
24
|
+
* - `"CANCELLED"` Schedule has been cancelled.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
status?: Status$1;
|
|
28
|
+
/**
|
|
29
|
+
* The schedule time zone, formatted according to the IANA time zone format.
|
|
30
|
+
* Must be a regional time zone (Area/Location) or UTC.
|
|
31
|
+
*
|
|
32
|
+
* By default the time zone is derived from the Wix Business, and can be overridden by setting `businessTimeZoneEnabled` to false.
|
|
33
|
+
*/
|
|
34
|
+
timeZone?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to use the time zone of the Wix Business.
|
|
37
|
+
* Default is true.
|
|
38
|
+
*/
|
|
39
|
+
businessTimeZoneEnabled?: boolean | null;
|
|
40
|
+
/** Default title for the schedule's events. */
|
|
41
|
+
defaultTitle?: string | null;
|
|
42
|
+
/** Default location for the schedule's events. */
|
|
43
|
+
defaultLocation?: Location$1;
|
|
44
|
+
/**
|
|
45
|
+
* Default capacity for the schedule's events.
|
|
46
|
+
*
|
|
47
|
+
* The capacity of an event is the max number of participants that can participate in an event.
|
|
48
|
+
*/
|
|
49
|
+
defaultCapacity?: number | null;
|
|
50
|
+
/** Default conferencing details for the schedule's events. */
|
|
51
|
+
defaultConferencingDetails?: ConferencingDetails$1;
|
|
52
|
+
/**
|
|
53
|
+
* Optional ID of the Wix app owning the schedule.
|
|
54
|
+
* Cannot change once set.
|
|
55
|
+
*
|
|
56
|
+
* For example, to create a schedule in the Wix Bookings App Calendar, provide `13d21c63-b5ec-5912-8397-c3a5ddb27a97`.
|
|
57
|
+
*/
|
|
58
|
+
appId?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* List of granted permissions for this schedule.
|
|
61
|
+
*
|
|
62
|
+
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
63
|
+
*/
|
|
64
|
+
permissions?: Permission$1[];
|
|
65
|
+
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
66
|
+
extendedFields?: ExtendedFields$1;
|
|
67
|
+
/**
|
|
68
|
+
* The schedule revision number, which incremented on updates.
|
|
69
|
+
*
|
|
70
|
+
* The current revision should be provided on updates to prevent conflicting changes.
|
|
71
|
+
* @readonly
|
|
72
|
+
*/
|
|
73
|
+
revision?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Date the schedule was created.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
createdDate?: Date;
|
|
79
|
+
/**
|
|
80
|
+
* Date the schedule was last updated.
|
|
81
|
+
* @readonly
|
|
82
|
+
*/
|
|
83
|
+
updatedDate?: Date;
|
|
84
|
+
}
|
|
85
|
+
declare enum Status$1 {
|
|
86
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
87
|
+
/** Schedule is active. Default value. */
|
|
88
|
+
ACTIVE = "ACTIVE",
|
|
89
|
+
/** Schedule has been cancelled. */
|
|
90
|
+
CANCELLED = "CANCELLED"
|
|
91
|
+
}
|
|
92
|
+
interface Location$1 {
|
|
93
|
+
/**
|
|
94
|
+
* The location ID. Optional.
|
|
95
|
+
* Currently only supported for locations of type `BUSINESS`, and used to reference the Wix Business Location.
|
|
96
|
+
*/
|
|
97
|
+
id?: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* The location type.
|
|
100
|
+
* The possible values are:
|
|
101
|
+
* - `"BUSINESS"` event takes place at the business location.
|
|
102
|
+
* - `"CUSTOM"` event takes place at the custom location.
|
|
103
|
+
*/
|
|
104
|
+
type?: LocationType$1;
|
|
105
|
+
/**
|
|
106
|
+
* The location name. Optional.
|
|
107
|
+
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
108
|
+
*/
|
|
109
|
+
name?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* The location address. Optional.
|
|
112
|
+
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
113
|
+
*/
|
|
114
|
+
address?: string | null;
|
|
115
|
+
}
|
|
116
|
+
declare enum LocationType$1 {
|
|
117
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
118
|
+
/** The event takes place at the business location. */
|
|
119
|
+
BUSINESS = "BUSINESS",
|
|
120
|
+
/** The event takes place at the customer location. */
|
|
121
|
+
CUSTOMER = "CUSTOMER",
|
|
122
|
+
/** The event takes place at the custom location. */
|
|
123
|
+
CUSTOM = "CUSTOM"
|
|
124
|
+
}
|
|
125
|
+
interface ConferencingDetails$1 {
|
|
126
|
+
/** World known conference type, such as Zoom. */
|
|
127
|
+
type?: Type$1;
|
|
128
|
+
/** URL used by the host to start the conference. */
|
|
129
|
+
hostUrl?: string | null;
|
|
130
|
+
/** URL used by a guest to join the conference. */
|
|
131
|
+
guestUrl?: string | null;
|
|
132
|
+
/** Optional conference password. */
|
|
133
|
+
password?: string | null;
|
|
134
|
+
/** Optional conference ID in an external system. */
|
|
135
|
+
externalId?: string | null;
|
|
136
|
+
}
|
|
137
|
+
declare enum Type$1 {
|
|
138
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
139
|
+
ZOOM = "ZOOM",
|
|
140
|
+
CUSTOM = "CUSTOM"
|
|
141
|
+
}
|
|
142
|
+
interface Permission$1 {
|
|
143
|
+
/** The identity granted the permission. */
|
|
144
|
+
identity?: CommonIdentificationData$1;
|
|
145
|
+
/**
|
|
146
|
+
* The permission role.
|
|
147
|
+
*
|
|
148
|
+
* The possible values are:
|
|
149
|
+
* - `"WRITER"` Role grants full write and read access.
|
|
150
|
+
* - `"COMMENTER"` Role grants full read access and permission to edit notes.
|
|
151
|
+
*/
|
|
152
|
+
role?: Role$1;
|
|
153
|
+
}
|
|
154
|
+
interface CommonIdentificationData$1 extends CommonIdentificationDataIdOneOf$1 {
|
|
155
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
156
|
+
wixUserId?: string;
|
|
157
|
+
}
|
|
158
|
+
/** @oneof */
|
|
159
|
+
interface CommonIdentificationDataIdOneOf$1 {
|
|
160
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
161
|
+
wixUserId?: string;
|
|
162
|
+
}
|
|
163
|
+
declare enum IdentityType {
|
|
164
|
+
UNKNOWN = "UNKNOWN",
|
|
165
|
+
WIX_USER = "WIX_USER"
|
|
166
|
+
}
|
|
167
|
+
declare enum Role$1 {
|
|
168
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
169
|
+
/** Role grants full write and read access. */
|
|
170
|
+
WRITER = "WRITER",
|
|
171
|
+
/** Role grants full read access and permission to edit notes. */
|
|
172
|
+
COMMENTER = "COMMENTER"
|
|
173
|
+
}
|
|
174
|
+
interface ExtendedFields$1 {
|
|
175
|
+
/**
|
|
176
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
177
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
178
|
+
*
|
|
179
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
180
|
+
*
|
|
181
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
182
|
+
*/
|
|
183
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
184
|
+
}
|
|
185
|
+
interface GetScheduleRequest$1 {
|
|
186
|
+
/** The ID of the schedule to retrieve. */
|
|
187
|
+
scheduleId: string | null;
|
|
188
|
+
/** List of additional fields to be included in the response. */
|
|
189
|
+
fields?: RequestedFields$1[];
|
|
190
|
+
}
|
|
191
|
+
declare enum RequestedFields$1 {
|
|
192
|
+
UNKNOWN_REQUESTED_FIELDS = "UNKNOWN_REQUESTED_FIELDS",
|
|
193
|
+
/**
|
|
194
|
+
* Include fields containing personal information.
|
|
195
|
+
* Requires the `CALENDAR.SCHEDULE_READ_PI` additional permission.
|
|
196
|
+
*/
|
|
197
|
+
PI_FIELDS = "PI_FIELDS",
|
|
198
|
+
/**
|
|
199
|
+
* Include fields containing personal information for schedules the current caller has access to.
|
|
200
|
+
* See `schedule.permissions` for more details.
|
|
201
|
+
*/
|
|
202
|
+
OWN_PI_FIELDS = "OWN_PI_FIELDS"
|
|
203
|
+
}
|
|
204
|
+
interface GetScheduleResponse$1 {
|
|
205
|
+
/** The schedule. */
|
|
206
|
+
schedule?: Schedule$1;
|
|
207
|
+
}
|
|
208
|
+
interface QuerySchedulesRequest$1 {
|
|
209
|
+
/** Query containing filters and paging. */
|
|
210
|
+
query?: CursorQuery$1;
|
|
211
|
+
/** List of additional fields to be included in the response. */
|
|
212
|
+
fields?: RequestedFields$1[];
|
|
213
|
+
}
|
|
214
|
+
/** TODO Diverge */
|
|
215
|
+
interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
|
|
216
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */
|
|
217
|
+
cursorPaging?: CursorPaging$1;
|
|
218
|
+
/**
|
|
219
|
+
* Filter object.
|
|
220
|
+
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
221
|
+
* for more information.
|
|
222
|
+
*
|
|
223
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
224
|
+
*
|
|
225
|
+
* For a detailed list of supported filters, see Supported Filters.
|
|
226
|
+
*/
|
|
227
|
+
filter?: Record<string, any> | null;
|
|
228
|
+
}
|
|
229
|
+
/** @oneof */
|
|
230
|
+
interface CursorQueryPagingMethodOneOf$1 {
|
|
231
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */
|
|
232
|
+
cursorPaging?: CursorPaging$1;
|
|
233
|
+
}
|
|
234
|
+
/** TODO Diverge */
|
|
235
|
+
interface CursorPaging$1 {
|
|
236
|
+
/**
|
|
237
|
+
* Number of events to return.
|
|
238
|
+
* Defaults to `50`. Maximum `1000`.
|
|
239
|
+
*/
|
|
240
|
+
limit?: number | null;
|
|
241
|
+
/**
|
|
242
|
+
* Pointer to the next or previous page in the list of results.
|
|
243
|
+
*
|
|
244
|
+
* You can get the relevant cursor token
|
|
245
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
246
|
+
* Not relevant for the first request.
|
|
247
|
+
*/
|
|
248
|
+
cursor?: string | null;
|
|
249
|
+
}
|
|
250
|
+
interface QuerySchedulesResponse$1 {
|
|
251
|
+
/** The schedules matching the provided query. */
|
|
252
|
+
schedules?: Schedule$1[];
|
|
253
|
+
/** Paging metadata. */
|
|
254
|
+
pagingMetadata?: CursorPagingMetadata$1;
|
|
255
|
+
}
|
|
256
|
+
/** TODO Diverge */
|
|
257
|
+
interface CursorPagingMetadata$1 {
|
|
258
|
+
/** Number of items returned in the response. */
|
|
259
|
+
count?: number | null;
|
|
260
|
+
/** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
261
|
+
cursors?: Cursors$1;
|
|
262
|
+
/**
|
|
263
|
+
* Indicates if there are more results after the current page.
|
|
264
|
+
* If `true`, another page of results can be retrieved.
|
|
265
|
+
* If `false`, this is the last page.
|
|
266
|
+
*/
|
|
267
|
+
hasNext?: boolean | null;
|
|
268
|
+
}
|
|
269
|
+
interface Cursors$1 {
|
|
270
|
+
/** Cursor pointing to next page in the list of results. */
|
|
271
|
+
next?: string | null;
|
|
272
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
273
|
+
prev?: string | null;
|
|
274
|
+
}
|
|
275
|
+
interface CreateScheduleRequest$1 {
|
|
276
|
+
/** The schedule to create. */
|
|
277
|
+
schedule: Schedule$1;
|
|
278
|
+
/** Optional Idempotency key. */
|
|
279
|
+
idempotencyKey?: string | null;
|
|
280
|
+
}
|
|
281
|
+
interface CreateScheduleResponse$1 {
|
|
282
|
+
/** The created schedule. */
|
|
283
|
+
schedule?: Schedule$1;
|
|
284
|
+
}
|
|
285
|
+
interface UpdateScheduleRequest$1 {
|
|
286
|
+
/** The schedule to update. */
|
|
287
|
+
schedule: Schedule$1;
|
|
288
|
+
/** Whether to notify participants regarding the changes. */
|
|
289
|
+
participantNotification?: ParticipantNotification$1;
|
|
290
|
+
}
|
|
291
|
+
interface ParticipantNotification$1 {
|
|
292
|
+
/**
|
|
293
|
+
* Whether to notify the participant/s about changes made to the schedule or event.
|
|
294
|
+
* Default is false.
|
|
295
|
+
*/
|
|
296
|
+
notifyParticipants?: boolean | null;
|
|
297
|
+
/** Optional custom message to send. */
|
|
298
|
+
message?: string | null;
|
|
299
|
+
}
|
|
300
|
+
interface UpdateScheduleResponse$1 {
|
|
301
|
+
/** The updated schedule. */
|
|
302
|
+
schedule?: Schedule$1;
|
|
303
|
+
}
|
|
304
|
+
interface CloneScheduleRequest$1 {
|
|
305
|
+
/** The ID of the schedule to clone. */
|
|
306
|
+
scheduleId: string | null;
|
|
307
|
+
/** Optional values to override. */
|
|
308
|
+
schedule?: Schedule$1;
|
|
309
|
+
}
|
|
310
|
+
interface CloneScheduleResponse$1 {
|
|
311
|
+
/** The new cloned schedule. */
|
|
312
|
+
schedule?: Schedule$1;
|
|
313
|
+
}
|
|
314
|
+
interface CancelScheduleRequest$1 {
|
|
315
|
+
/** The ID of the schedule to cancel. */
|
|
316
|
+
scheduleId: string | null;
|
|
317
|
+
/**
|
|
318
|
+
* Whether to preserve future events with participants.
|
|
319
|
+
* Default is false.
|
|
320
|
+
*/
|
|
321
|
+
preserveFutureEventsWithParticipants?: boolean | null;
|
|
322
|
+
/** Whether to notify participants regarding the changes. */
|
|
323
|
+
participantNotification?: ParticipantNotification$1;
|
|
324
|
+
}
|
|
325
|
+
interface CancelScheduleResponse$1 {
|
|
326
|
+
/** The cancelled schedule. */
|
|
327
|
+
schedule?: Schedule$1;
|
|
328
|
+
}
|
|
329
|
+
interface GetScheduleResponseNonNullableFields$1 {
|
|
330
|
+
schedule?: {
|
|
331
|
+
status: Status$1;
|
|
332
|
+
defaultLocation?: {
|
|
333
|
+
type: LocationType$1;
|
|
334
|
+
};
|
|
335
|
+
defaultConferencingDetails?: {
|
|
336
|
+
type: Type$1;
|
|
337
|
+
};
|
|
338
|
+
permissions: {
|
|
339
|
+
identity?: {
|
|
340
|
+
wixUserId: string;
|
|
341
|
+
identityType: IdentityType;
|
|
342
|
+
};
|
|
343
|
+
role: Role$1;
|
|
344
|
+
}[];
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
interface QuerySchedulesResponseNonNullableFields$1 {
|
|
348
|
+
schedules: {
|
|
349
|
+
status: Status$1;
|
|
350
|
+
defaultLocation?: {
|
|
351
|
+
type: LocationType$1;
|
|
352
|
+
};
|
|
353
|
+
defaultConferencingDetails?: {
|
|
354
|
+
type: Type$1;
|
|
355
|
+
};
|
|
356
|
+
permissions: {
|
|
357
|
+
identity?: {
|
|
358
|
+
wixUserId: string;
|
|
359
|
+
identityType: IdentityType;
|
|
360
|
+
};
|
|
361
|
+
role: Role$1;
|
|
362
|
+
}[];
|
|
363
|
+
}[];
|
|
364
|
+
}
|
|
365
|
+
interface CreateScheduleResponseNonNullableFields$1 {
|
|
366
|
+
schedule?: {
|
|
367
|
+
status: Status$1;
|
|
368
|
+
defaultLocation?: {
|
|
369
|
+
type: LocationType$1;
|
|
370
|
+
};
|
|
371
|
+
defaultConferencingDetails?: {
|
|
372
|
+
type: Type$1;
|
|
373
|
+
};
|
|
374
|
+
permissions: {
|
|
375
|
+
identity?: {
|
|
376
|
+
wixUserId: string;
|
|
377
|
+
identityType: IdentityType;
|
|
378
|
+
};
|
|
379
|
+
role: Role$1;
|
|
380
|
+
}[];
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
interface UpdateScheduleResponseNonNullableFields$1 {
|
|
384
|
+
schedule?: {
|
|
385
|
+
status: Status$1;
|
|
386
|
+
defaultLocation?: {
|
|
387
|
+
type: LocationType$1;
|
|
388
|
+
};
|
|
389
|
+
defaultConferencingDetails?: {
|
|
390
|
+
type: Type$1;
|
|
391
|
+
};
|
|
392
|
+
permissions: {
|
|
393
|
+
identity?: {
|
|
394
|
+
wixUserId: string;
|
|
395
|
+
identityType: IdentityType;
|
|
396
|
+
};
|
|
397
|
+
role: Role$1;
|
|
398
|
+
}[];
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
interface CloneScheduleResponseNonNullableFields$1 {
|
|
402
|
+
schedule?: {
|
|
403
|
+
status: Status$1;
|
|
404
|
+
defaultLocation?: {
|
|
405
|
+
type: LocationType$1;
|
|
406
|
+
};
|
|
407
|
+
defaultConferencingDetails?: {
|
|
408
|
+
type: Type$1;
|
|
409
|
+
};
|
|
410
|
+
permissions: {
|
|
411
|
+
identity?: {
|
|
412
|
+
wixUserId: string;
|
|
413
|
+
identityType: IdentityType;
|
|
414
|
+
};
|
|
415
|
+
role: Role$1;
|
|
416
|
+
}[];
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
interface CancelScheduleResponseNonNullableFields$1 {
|
|
420
|
+
schedule?: {
|
|
421
|
+
status: Status$1;
|
|
422
|
+
defaultLocation?: {
|
|
423
|
+
type: LocationType$1;
|
|
424
|
+
};
|
|
425
|
+
defaultConferencingDetails?: {
|
|
426
|
+
type: Type$1;
|
|
427
|
+
};
|
|
428
|
+
permissions: {
|
|
429
|
+
identity?: {
|
|
430
|
+
wixUserId: string;
|
|
431
|
+
identityType: IdentityType;
|
|
432
|
+
};
|
|
433
|
+
role: Role$1;
|
|
434
|
+
}[];
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
interface Schedule {
|
|
439
|
+
/**
|
|
440
|
+
* The schedule ID.
|
|
441
|
+
* @readonly
|
|
442
|
+
*/
|
|
443
|
+
_id?: string | null;
|
|
444
|
+
/**
|
|
445
|
+
* Optional external ID. Cannot change.
|
|
446
|
+
*
|
|
447
|
+
* For instance, might be the ID of the Bookings Resource or Service.
|
|
448
|
+
*/
|
|
449
|
+
externalId?: string | null;
|
|
450
|
+
/**
|
|
451
|
+
* The name of the schedule.
|
|
452
|
+
*
|
|
453
|
+
* For instance, might be the name of the Bookings Resource or Service.
|
|
454
|
+
*/
|
|
455
|
+
name?: string | null;
|
|
456
|
+
/**
|
|
457
|
+
* The schedule status.
|
|
458
|
+
*
|
|
459
|
+
* The possible values are:
|
|
460
|
+
* - `"ACTIVE"` Schedule is active. Default value.
|
|
461
|
+
* - `"CANCELLED"` Schedule has been cancelled.
|
|
462
|
+
* @readonly
|
|
463
|
+
*/
|
|
464
|
+
status?: Status;
|
|
465
|
+
/**
|
|
466
|
+
* The schedule time zone, formatted according to the IANA time zone format.
|
|
467
|
+
* Must be a regional time zone (Area/Location) or UTC.
|
|
468
|
+
*
|
|
469
|
+
* By default the time zone is derived from the Wix Business, and can be overridden by setting `businessTimeZoneEnabled` to false.
|
|
470
|
+
*/
|
|
471
|
+
timeZone?: string | null;
|
|
472
|
+
/**
|
|
473
|
+
* Whether to use the time zone of the Wix Business.
|
|
474
|
+
* Default is true.
|
|
475
|
+
*/
|
|
476
|
+
businessTimeZoneEnabled?: boolean | null;
|
|
477
|
+
/** Default title for the schedule's events. */
|
|
478
|
+
defaultTitle?: string | null;
|
|
479
|
+
/** Default location for the schedule's events. */
|
|
480
|
+
defaultLocation?: Location;
|
|
481
|
+
/**
|
|
482
|
+
* Default capacity for the schedule's events.
|
|
483
|
+
*
|
|
484
|
+
* The capacity of an event is the max number of participants that can participate in an event.
|
|
485
|
+
*/
|
|
486
|
+
defaultCapacity?: number | null;
|
|
487
|
+
/** Default conferencing details for the schedule's events. */
|
|
488
|
+
defaultConferencingDetails?: ConferencingDetails;
|
|
489
|
+
/**
|
|
490
|
+
* Optional ID of the Wix app owning the schedule.
|
|
491
|
+
* Cannot change once set.
|
|
492
|
+
*
|
|
493
|
+
* For example, to create a schedule in the Wix Bookings App Calendar, provide `13d21c63-b5ec-5912-8397-c3a5ddb27a97`.
|
|
494
|
+
*/
|
|
495
|
+
appId?: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* List of granted permissions for this schedule.
|
|
498
|
+
*
|
|
499
|
+
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
500
|
+
*/
|
|
501
|
+
permissions?: Permission[];
|
|
502
|
+
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
503
|
+
extendedFields?: ExtendedFields;
|
|
504
|
+
/**
|
|
505
|
+
* The schedule revision number, which incremented on updates.
|
|
506
|
+
*
|
|
507
|
+
* The current revision should be provided on updates to prevent conflicting changes.
|
|
508
|
+
* @readonly
|
|
509
|
+
*/
|
|
510
|
+
revision?: string | null;
|
|
511
|
+
/**
|
|
512
|
+
* Date the schedule was created.
|
|
513
|
+
* @readonly
|
|
514
|
+
*/
|
|
515
|
+
_createdDate?: Date;
|
|
516
|
+
/**
|
|
517
|
+
* Date the schedule was last updated.
|
|
518
|
+
* @readonly
|
|
519
|
+
*/
|
|
520
|
+
_updatedDate?: Date;
|
|
521
|
+
}
|
|
522
|
+
declare enum Status {
|
|
523
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
524
|
+
/** Schedule is active. Default value. */
|
|
525
|
+
ACTIVE = "ACTIVE",
|
|
526
|
+
/** Schedule has been cancelled. */
|
|
527
|
+
CANCELLED = "CANCELLED"
|
|
528
|
+
}
|
|
529
|
+
interface Location {
|
|
530
|
+
/**
|
|
531
|
+
* The location ID. Optional.
|
|
532
|
+
* Currently only supported for locations of type `BUSINESS`, and used to reference the Wix Business Location.
|
|
533
|
+
*/
|
|
534
|
+
_id?: string | null;
|
|
535
|
+
/**
|
|
536
|
+
* The location type.
|
|
537
|
+
* The possible values are:
|
|
538
|
+
* - `"BUSINESS"` event takes place at the business location.
|
|
539
|
+
* - `"CUSTOM"` event takes place at the custom location.
|
|
540
|
+
*/
|
|
541
|
+
type?: LocationType;
|
|
542
|
+
/**
|
|
543
|
+
* The location name. Optional.
|
|
544
|
+
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
545
|
+
*/
|
|
546
|
+
name?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* The location address. Optional.
|
|
549
|
+
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
550
|
+
*/
|
|
551
|
+
address?: string | null;
|
|
552
|
+
}
|
|
553
|
+
declare enum LocationType {
|
|
554
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
555
|
+
/** The event takes place at the business location. */
|
|
556
|
+
BUSINESS = "BUSINESS",
|
|
557
|
+
/** The event takes place at the customer location. */
|
|
558
|
+
CUSTOMER = "CUSTOMER",
|
|
559
|
+
/** The event takes place at the custom location. */
|
|
560
|
+
CUSTOM = "CUSTOM"
|
|
561
|
+
}
|
|
562
|
+
interface ConferencingDetails {
|
|
563
|
+
/** World known conference type, such as Zoom. */
|
|
564
|
+
type?: Type;
|
|
565
|
+
/** URL used by the host to start the conference. */
|
|
566
|
+
hostUrl?: string | null;
|
|
567
|
+
/** URL used by a guest to join the conference. */
|
|
568
|
+
guestUrl?: string | null;
|
|
569
|
+
/** Optional conference password. */
|
|
570
|
+
password?: string | null;
|
|
571
|
+
/** Optional conference ID in an external system. */
|
|
572
|
+
externalId?: string | null;
|
|
573
|
+
}
|
|
574
|
+
declare enum Type {
|
|
575
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
576
|
+
ZOOM = "ZOOM",
|
|
577
|
+
CUSTOM = "CUSTOM"
|
|
578
|
+
}
|
|
579
|
+
interface Permission {
|
|
580
|
+
/** The identity granted the permission. */
|
|
581
|
+
identity?: CommonIdentificationData;
|
|
582
|
+
/**
|
|
583
|
+
* The permission role.
|
|
584
|
+
*
|
|
585
|
+
* The possible values are:
|
|
586
|
+
* - `"WRITER"` Role grants full write and read access.
|
|
587
|
+
* - `"COMMENTER"` Role grants full read access and permission to edit notes.
|
|
588
|
+
*/
|
|
589
|
+
role?: Role;
|
|
590
|
+
}
|
|
591
|
+
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
592
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
593
|
+
wixUserId?: string;
|
|
594
|
+
}
|
|
595
|
+
/** @oneof */
|
|
596
|
+
interface CommonIdentificationDataIdOneOf {
|
|
597
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
598
|
+
wixUserId?: string;
|
|
599
|
+
}
|
|
600
|
+
declare enum Role {
|
|
601
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
602
|
+
/** Role grants full write and read access. */
|
|
603
|
+
WRITER = "WRITER",
|
|
604
|
+
/** Role grants full read access and permission to edit notes. */
|
|
605
|
+
COMMENTER = "COMMENTER"
|
|
606
|
+
}
|
|
607
|
+
interface ExtendedFields {
|
|
608
|
+
/**
|
|
609
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
610
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
611
|
+
*
|
|
612
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
613
|
+
*
|
|
614
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
615
|
+
*/
|
|
616
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
617
|
+
}
|
|
618
|
+
interface GetScheduleRequest {
|
|
619
|
+
/** The ID of the schedule to retrieve. */
|
|
620
|
+
scheduleId: string | null;
|
|
621
|
+
/** List of additional fields to be included in the response. */
|
|
622
|
+
fields?: RequestedFields[];
|
|
623
|
+
}
|
|
624
|
+
declare enum RequestedFields {
|
|
625
|
+
UNKNOWN_REQUESTED_FIELDS = "UNKNOWN_REQUESTED_FIELDS",
|
|
626
|
+
/**
|
|
627
|
+
* Include fields containing personal information.
|
|
628
|
+
* Requires the `CALENDAR.SCHEDULE_READ_PI` additional permission.
|
|
629
|
+
*/
|
|
630
|
+
PI_FIELDS = "PI_FIELDS",
|
|
631
|
+
/**
|
|
632
|
+
* Include fields containing personal information for schedules the current caller has access to.
|
|
633
|
+
* See `schedule.permissions` for more details.
|
|
634
|
+
*/
|
|
635
|
+
OWN_PI_FIELDS = "OWN_PI_FIELDS"
|
|
636
|
+
}
|
|
637
|
+
interface GetScheduleResponse {
|
|
638
|
+
/** The schedule. */
|
|
639
|
+
schedule?: Schedule;
|
|
640
|
+
}
|
|
641
|
+
interface QuerySchedulesRequest {
|
|
642
|
+
/** Query containing filters and paging. */
|
|
643
|
+
query?: CursorQuery;
|
|
644
|
+
/** List of additional fields to be included in the response. */
|
|
645
|
+
fields?: RequestedFields[];
|
|
646
|
+
}
|
|
647
|
+
/** TODO Diverge */
|
|
648
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
649
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */
|
|
650
|
+
cursorPaging?: CursorPaging;
|
|
651
|
+
/**
|
|
652
|
+
* Filter object.
|
|
653
|
+
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
654
|
+
* for more information.
|
|
655
|
+
*
|
|
656
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
657
|
+
*
|
|
658
|
+
* For a detailed list of supported filters, see Supported Filters.
|
|
659
|
+
*/
|
|
660
|
+
filter?: Record<string, any> | null;
|
|
661
|
+
}
|
|
662
|
+
/** @oneof */
|
|
663
|
+
interface CursorQueryPagingMethodOneOf {
|
|
664
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */
|
|
665
|
+
cursorPaging?: CursorPaging;
|
|
666
|
+
}
|
|
667
|
+
/** TODO Diverge */
|
|
668
|
+
interface CursorPaging {
|
|
669
|
+
/**
|
|
670
|
+
* Number of events to return.
|
|
671
|
+
* Defaults to `50`. Maximum `1000`.
|
|
672
|
+
*/
|
|
673
|
+
limit?: number | null;
|
|
674
|
+
/**
|
|
675
|
+
* Pointer to the next or previous page in the list of results.
|
|
676
|
+
*
|
|
677
|
+
* You can get the relevant cursor token
|
|
678
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
679
|
+
* Not relevant for the first request.
|
|
680
|
+
*/
|
|
681
|
+
cursor?: string | null;
|
|
682
|
+
}
|
|
683
|
+
interface QuerySchedulesResponse {
|
|
684
|
+
/** The schedules matching the provided query. */
|
|
685
|
+
schedules?: Schedule[];
|
|
686
|
+
/** Paging metadata. */
|
|
687
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
688
|
+
}
|
|
689
|
+
/** TODO Diverge */
|
|
690
|
+
interface CursorPagingMetadata {
|
|
691
|
+
/** Number of items returned in the response. */
|
|
692
|
+
count?: number | null;
|
|
693
|
+
/** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
|
|
694
|
+
cursors?: Cursors;
|
|
695
|
+
/**
|
|
696
|
+
* Indicates if there are more results after the current page.
|
|
697
|
+
* If `true`, another page of results can be retrieved.
|
|
698
|
+
* If `false`, this is the last page.
|
|
699
|
+
*/
|
|
700
|
+
hasNext?: boolean | null;
|
|
701
|
+
}
|
|
702
|
+
interface Cursors {
|
|
703
|
+
/** Cursor pointing to next page in the list of results. */
|
|
704
|
+
next?: string | null;
|
|
705
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
706
|
+
prev?: string | null;
|
|
707
|
+
}
|
|
708
|
+
interface CreateScheduleRequest {
|
|
709
|
+
/** The schedule to create. */
|
|
710
|
+
schedule: Schedule;
|
|
711
|
+
/** Optional Idempotency key. */
|
|
712
|
+
idempotencyKey?: string | null;
|
|
713
|
+
}
|
|
714
|
+
interface CreateScheduleResponse {
|
|
715
|
+
/** The created schedule. */
|
|
716
|
+
schedule?: Schedule;
|
|
717
|
+
}
|
|
718
|
+
interface UpdateScheduleRequest {
|
|
719
|
+
/** The schedule to update. */
|
|
720
|
+
schedule: Schedule;
|
|
721
|
+
/** Whether to notify participants regarding the changes. */
|
|
722
|
+
participantNotification?: ParticipantNotification;
|
|
723
|
+
}
|
|
724
|
+
interface ParticipantNotification {
|
|
725
|
+
/**
|
|
726
|
+
* Whether to notify the participant/s about changes made to the schedule or event.
|
|
727
|
+
* Default is false.
|
|
728
|
+
*/
|
|
729
|
+
notifyParticipants?: boolean | null;
|
|
730
|
+
/** Optional custom message to send. */
|
|
731
|
+
message?: string | null;
|
|
732
|
+
}
|
|
733
|
+
interface UpdateScheduleResponse {
|
|
734
|
+
/** The updated schedule. */
|
|
735
|
+
schedule?: Schedule;
|
|
736
|
+
}
|
|
737
|
+
interface CloneScheduleRequest {
|
|
738
|
+
/** The ID of the schedule to clone. */
|
|
739
|
+
scheduleId: string | null;
|
|
740
|
+
/** Optional values to override. */
|
|
741
|
+
schedule?: Schedule;
|
|
742
|
+
}
|
|
743
|
+
interface CloneScheduleResponse {
|
|
744
|
+
/** The new cloned schedule. */
|
|
745
|
+
schedule?: Schedule;
|
|
746
|
+
}
|
|
747
|
+
interface CancelScheduleRequest {
|
|
748
|
+
/** The ID of the schedule to cancel. */
|
|
749
|
+
scheduleId: string | null;
|
|
750
|
+
/**
|
|
751
|
+
* Whether to preserve future events with participants.
|
|
752
|
+
* Default is false.
|
|
753
|
+
*/
|
|
754
|
+
preserveFutureEventsWithParticipants?: boolean | null;
|
|
755
|
+
/** Whether to notify participants regarding the changes. */
|
|
756
|
+
participantNotification?: ParticipantNotification;
|
|
757
|
+
}
|
|
758
|
+
interface CancelScheduleResponse {
|
|
759
|
+
/** The cancelled schedule. */
|
|
760
|
+
schedule?: Schedule;
|
|
761
|
+
}
|
|
762
|
+
interface GetScheduleResponseNonNullableFields {
|
|
763
|
+
schedule?: {
|
|
764
|
+
status: Status;
|
|
765
|
+
defaultLocation?: {
|
|
766
|
+
type: LocationType;
|
|
767
|
+
};
|
|
768
|
+
defaultConferencingDetails?: {
|
|
769
|
+
type: Type;
|
|
770
|
+
};
|
|
771
|
+
permissions: {
|
|
772
|
+
identity?: {
|
|
773
|
+
wixUserId: string;
|
|
774
|
+
};
|
|
775
|
+
role: Role;
|
|
776
|
+
}[];
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
interface QuerySchedulesResponseNonNullableFields {
|
|
780
|
+
schedules: {
|
|
781
|
+
status: Status;
|
|
782
|
+
defaultLocation?: {
|
|
783
|
+
type: LocationType;
|
|
784
|
+
};
|
|
785
|
+
defaultConferencingDetails?: {
|
|
786
|
+
type: Type;
|
|
787
|
+
};
|
|
788
|
+
permissions: {
|
|
789
|
+
identity?: {
|
|
790
|
+
wixUserId: string;
|
|
791
|
+
};
|
|
792
|
+
role: Role;
|
|
793
|
+
}[];
|
|
794
|
+
}[];
|
|
795
|
+
}
|
|
796
|
+
interface CreateScheduleResponseNonNullableFields {
|
|
797
|
+
schedule?: {
|
|
798
|
+
status: Status;
|
|
799
|
+
defaultLocation?: {
|
|
800
|
+
type: LocationType;
|
|
801
|
+
};
|
|
802
|
+
defaultConferencingDetails?: {
|
|
803
|
+
type: Type;
|
|
804
|
+
};
|
|
805
|
+
permissions: {
|
|
806
|
+
identity?: {
|
|
807
|
+
wixUserId: string;
|
|
808
|
+
};
|
|
809
|
+
role: Role;
|
|
810
|
+
}[];
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
interface UpdateScheduleResponseNonNullableFields {
|
|
814
|
+
schedule?: {
|
|
815
|
+
status: Status;
|
|
816
|
+
defaultLocation?: {
|
|
817
|
+
type: LocationType;
|
|
818
|
+
};
|
|
819
|
+
defaultConferencingDetails?: {
|
|
820
|
+
type: Type;
|
|
821
|
+
};
|
|
822
|
+
permissions: {
|
|
823
|
+
identity?: {
|
|
824
|
+
wixUserId: string;
|
|
825
|
+
};
|
|
826
|
+
role: Role;
|
|
827
|
+
}[];
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
interface CloneScheduleResponseNonNullableFields {
|
|
831
|
+
schedule?: {
|
|
832
|
+
status: Status;
|
|
833
|
+
defaultLocation?: {
|
|
834
|
+
type: LocationType;
|
|
835
|
+
};
|
|
836
|
+
defaultConferencingDetails?: {
|
|
837
|
+
type: Type;
|
|
838
|
+
};
|
|
839
|
+
permissions: {
|
|
840
|
+
identity?: {
|
|
841
|
+
wixUserId: string;
|
|
842
|
+
};
|
|
843
|
+
role: Role;
|
|
844
|
+
}[];
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
interface CancelScheduleResponseNonNullableFields {
|
|
848
|
+
schedule?: {
|
|
849
|
+
status: Status;
|
|
850
|
+
defaultLocation?: {
|
|
851
|
+
type: LocationType;
|
|
852
|
+
};
|
|
853
|
+
defaultConferencingDetails?: {
|
|
854
|
+
type: Type;
|
|
855
|
+
};
|
|
856
|
+
permissions: {
|
|
857
|
+
identity?: {
|
|
858
|
+
wixUserId: string;
|
|
859
|
+
};
|
|
860
|
+
role: Role;
|
|
861
|
+
}[];
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
866
|
+
getUrl: (context: any) => string;
|
|
867
|
+
httpMethod: K;
|
|
868
|
+
path: string;
|
|
869
|
+
pathParams: M;
|
|
870
|
+
__requestType: T;
|
|
871
|
+
__originalRequestType: S;
|
|
872
|
+
__responseType: Q;
|
|
873
|
+
__originalResponseType: R;
|
|
874
|
+
};
|
|
875
|
+
declare function getSchedule(): __PublicMethodMetaInfo<'GET', {
|
|
876
|
+
scheduleId: string;
|
|
877
|
+
}, GetScheduleRequest, GetScheduleRequest$1, GetScheduleResponse & GetScheduleResponseNonNullableFields, GetScheduleResponse$1 & GetScheduleResponseNonNullableFields$1>;
|
|
878
|
+
declare function querySchedules(): __PublicMethodMetaInfo<'POST', {}, QuerySchedulesRequest, QuerySchedulesRequest$1, QuerySchedulesResponse & QuerySchedulesResponseNonNullableFields, QuerySchedulesResponse$1 & QuerySchedulesResponseNonNullableFields$1>;
|
|
879
|
+
declare function createSchedule(): __PublicMethodMetaInfo<'POST', {}, CreateScheduleRequest, CreateScheduleRequest$1, CreateScheduleResponse & CreateScheduleResponseNonNullableFields, CreateScheduleResponse$1 & CreateScheduleResponseNonNullableFields$1>;
|
|
880
|
+
declare function updateSchedule(): __PublicMethodMetaInfo<'PATCH', {
|
|
881
|
+
scheduleId: string;
|
|
882
|
+
}, UpdateScheduleRequest, UpdateScheduleRequest$1, UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields, UpdateScheduleResponse$1 & UpdateScheduleResponseNonNullableFields$1>;
|
|
883
|
+
declare function cloneSchedule(): __PublicMethodMetaInfo<'POST', {
|
|
884
|
+
scheduleId: string;
|
|
885
|
+
}, CloneScheduleRequest, CloneScheduleRequest$1, CloneScheduleResponse & CloneScheduleResponseNonNullableFields, CloneScheduleResponse$1 & CloneScheduleResponseNonNullableFields$1>;
|
|
886
|
+
declare function cancelSchedule(): __PublicMethodMetaInfo<'POST', {
|
|
887
|
+
scheduleId: string;
|
|
888
|
+
}, CancelScheduleRequest, CancelScheduleRequest$1, CancelScheduleResponse & CancelScheduleResponseNonNullableFields, CancelScheduleResponse$1 & CancelScheduleResponseNonNullableFields$1>;
|
|
889
|
+
|
|
890
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
891
|
+
declare const meta_cancelSchedule: typeof cancelSchedule;
|
|
892
|
+
declare const meta_cloneSchedule: typeof cloneSchedule;
|
|
893
|
+
declare const meta_createSchedule: typeof createSchedule;
|
|
894
|
+
declare const meta_getSchedule: typeof getSchedule;
|
|
895
|
+
declare const meta_querySchedules: typeof querySchedules;
|
|
896
|
+
declare const meta_updateSchedule: typeof updateSchedule;
|
|
897
|
+
declare namespace meta {
|
|
898
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_cancelSchedule as cancelSchedule, meta_cloneSchedule as cloneSchedule, meta_createSchedule as createSchedule, meta_getSchedule as getSchedule, meta_querySchedules as querySchedules, meta_updateSchedule as updateSchedule };
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export { meta as schedules };
|