import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** Schedule item describes the schedule within an event. Each event may contain multiple schedule items. */ interface ScheduleItem { /** * Schedule item ID. * @format GUID * @readonly */ _id?: string; /** Whether a schedule item is hidden from guests. */ hidden?: boolean; /** * Schedule item name. * @maxLength 120 */ name?: string; /** Time slot of a schedule item. */ timeSlot?: TimeInterval; /** * Rich text schedule item description. * @maxLength 10000 */ description?: string; /** * Stage or room name in which a session takes place. * @maxLength 30 */ stageName?: string; /** * Schedule item tags. Used to organize the items by a theme. * @maxSize 5 * @minLength 1 * @maxLength 30 */ tags?: string[]; /** Schedule item status. */ status?: ScheduleStatusWithLiterals; /** * Date and time the schedule item was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the schedule item was updated. * @readonly */ _updatedDate?: Date | null; /** * Event ID to which the schedule item belongs. * @format GUID * @readonly */ eventId?: string; /** * Whether the schedule item is a draft. * @readonly */ draft?: boolean; } /** Time interval on the timeline between two points in time. */ interface TimeInterval { /** Start of the time slot interval, inclusive. */ start?: Date | null; /** End of the time slot interval, exclusive. */ end?: Date | null; /** * Time zone ID in TZ database format, e.g., `"EST"`, `"America/Los_Angeles"`. * Defaults to `"Etc/UTC"` when not set. * @minLength 1 * @maxLength 100 */ timeZoneId?: string | null; } declare enum ScheduleStatus { /** Item is scheduled for a future date. */ SCHEDULED = "SCHEDULED", /** Item is canceled. */ CANCELED = "CANCELED" } /** @enumType */ type ScheduleStatusWithLiterals = ScheduleStatus | 'SCHEDULED' | 'CANCELED'; interface ListScheduleItemsRequest { /** * Event ID to which the schedule items belong. * @format GUID * @maxSize 100 */ eventId?: string[]; /** * Schedule item state filter. * * Defaults to `["PUBLISHED", "VISIBLE"]` when no filters are specified.
* If neither `"PUBLISHED"` nor `"DRAFT"` are specified, assumes `"PUBLISHED"`, for example: [`"HIDDEN"`] becomes [`"HIDDEN"`, `"PUBLISHED"`]. * If neither `"VISIBLE"` nor `"HIDDEN"` are specified, assumes `"VISIBLE"`, for example: [`"DRAFT"`] becomes [`"DRAFT"`, `"VISIBLE"`]. * @maxSize 20 */ state?: StateFilterWithLiterals[]; /** Filters schedule items starting on or after specified point in time. Inclusive. */ startingFrom?: Date | null; /** Filters schedule items starting before specified point in time. Non-inclusive. */ startingBefore?: Date | null; /** * *Deprecated:** Use `paging` instead. * @max 1000 * @deprecated */ offset?: number; /** * *Deprecated:** Use `paging` instead. * @max 100 * @deprecated */ limit?: number; /** * Filter facets. * @minLength 1 * @maxLength 100 * @maxSize 20 */ facet?: string[]; /** * Item IDs filter. * @format GUID * @maxSize 100 */ itemId?: string[]; /** * Tags filter. * @minLength 1 * @maxLength 30 * @maxSize 50 */ tag?: string[]; /** * Stage names filter. * @maxLength 30 * @maxSize 50 */ stageName?: string[]; /** * Pointer to page of results using offset. * See [Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging#paging). */ paging?: Paging; } declare enum StateFilter { /** Schedule item is published. */ PUBLISHED = "PUBLISHED", /** Schedule item is in draft. */ DRAFT = "DRAFT", /** Schedule item is visible to the event's guests. */ VISIBLE = "VISIBLE", /** Schedule item is hidden to the event's guests. */ HIDDEN = "HIDDEN" } /** @enumType */ type StateFilterWithLiterals = StateFilter | 'PUBLISHED' | 'DRAFT' | 'VISIBLE' | 'HIDDEN'; interface Paging { /** * Number of items to load per page. * @max 1000 */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface ListScheduleItemsResponse { /** * *Deprecated:** Use `pagingMetadata.total` instead. * @readonly * @deprecated */ total?: number; /** * *Deprecated.** * @deprecated */ limit?: number; /** * *Deprecated:** Use `pagingMetadata.offset` instead. * @deprecated */ offset?: number; /** Schedule items. */ items?: ScheduleItem[]; /** * Facets. * @readonly */ facets?: Record; /** * Whether there are draft changes which have not been published. * @readonly */ draftNotPublished?: boolean | null; /** Paging metadata. */ pagingMetadata?: PagingMetadataV2; } interface FacetCounts { /** Facet counts aggregated per value. */ counts?: Record; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface QueryScheduleItemsRequest { query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** * Pointer to page of results using offset. * See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; /** Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). */ filter?: Record | null; /** * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] * See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). * @maxSize 20 */ sort?: Sorting[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** * Pointer to page of results using offset. * See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; } interface Sorting { /** * Name of the field to sort by * @maxLength 100 */ fieldName?: string; /** Sort order (ASC/DESC). Defaults to ASC */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface QueryScheduleItemsResponse { pagingMetadata?: PagingMetadataV2; /** Schedule items. */ items?: ScheduleItem[]; } interface GetScheduleItemRequest { /** Event ID to which the schedule item belongs. */ eventId?: string; /** * Schedule item ID. * @format GUID */ itemId: string; /** Whether to include draft schedule items in the response. */ includeDraft?: boolean; } interface GetScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; /** Draft of the schedule item. */ draft?: ScheduleItem; } interface AddScheduleItemRequest { /** * Event ID to add the schedule item to. * @format GUID */ eventId: string; /** Schedule item. */ item?: ScheduleItemData; } /** Schedule item describes the schedule within an event. Each event may contain multiple schedule items. */ interface ScheduleItemData { /** Whether the schedule item is hidden from guests. */ hidden?: boolean; /** * Schedule item name. * @maxLength 120 */ name?: string; /** Time slot of a schedule item. */ timeSlot?: TimeInterval; /** * Rich text schedule item description. * @maxLength 10000 */ description?: string; /** * Stage or room name in which a session takes place. * @maxLength 30 */ stageName?: string; /** * Schedule item tags. Used to organize the items by a theme. * @maxSize 5 * @minLength 1 * @maxLength 30 */ tags?: string[]; /** Schedule item status. */ status?: ScheduleStatusWithLiterals; } interface AddScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; } interface UpdateScheduleItemRequest { /** * Event ID to which the schedule item belongs. * @format GUID */ eventId: string; /** * Schedule item ID to update. * @format GUID */ itemId: string; /** Schedule item info. */ item?: ScheduleItemData; /** * Set of field paths to update. * When fields are empty, request is interpreted as full update. * Behavior follows [google.protobuf.FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask) semantics. */ fields?: string[]; } interface UpdateScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; } interface DeleteScheduleItemRequest { /** * Event ID to which the schedule item belongs. * @format GUID */ eventId: string; /** * Schedule items to delete. * @format GUID * @minSize 1 * @maxSize 100 */ itemIds?: string[]; } interface DeleteScheduleItemResponse { } interface DiscardDraftRequest { /** * Event ID to which the draft schedule item belongs. * @format GUID */ eventId: string; } interface DiscardDraftResponse { } interface PublishDraftRequest { /** * Event ID to which the draft schedule item belongs. * @format GUID */ eventId: string; } interface PublishDraftResponse { } interface RescheduleDraftRequest { /** * Event ID to which the draft schedule item belongs. * @format GUID */ eventId: string; /** * Time zone ID in TZ database format, e.g., `"EST"`, `"America/Los_Angeles"`. * @maxLength 100 */ timeZoneId: string; /** Offset added or subtracted from schedule item start & end times. */ timeSlotOffset?: GoogleProtoDuration; } interface RescheduleDraftResponse { } interface ListBookmarksRequest { /** * Event ID to which the schedule item belongs. * @format GUID */ eventId?: string; } interface ListBookmarksResponse { /** Schedule items. */ items?: ScheduleItem[]; } interface CreateBookmarkRequest { /** * Event ID to which the schedule item belongs. * @format GUID */ eventId?: string; /** * Schedule item ID. * @format GUID */ itemId?: string; } interface CreateBookmarkResponse { } interface DeleteBookmarkRequest { /** * Event ID to which the schedule item belongs. * @format GUID */ eventId?: string; /** * Schedule item ID. * @format GUID */ itemId?: string; } interface DeleteBookmarkResponse { } /** @docsIgnore */ type QueryScheduleItemsApplicationErrors = { code?: 'FILTER_PARSER_ERROR'; description?: string; data?: Record; }; type GoogleProtoDuration = any; /** * Retrieves a list of up to 100 schedule items, with basic filter support. * * Default filters to schedule items with a `state` of `PUBLISHED` and `VISIBLE`. * @public * @param options - Optional fields. * @permissionId WIX_EVENTS.READ_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.ListScheduleItems */ declare function listScheduleItems(options?: ListScheduleItemsOptions): Promise>; interface ListScheduleItemsOptions { /** * Event ID to which the schedule items belong. * @format GUID * @maxSize 100 */ eventId?: string[]; /** * Schedule item state filter. * * Defaults to `["PUBLISHED", "VISIBLE"]` when no filters are specified.
* If neither `"PUBLISHED"` nor `"DRAFT"` are specified, assumes `"PUBLISHED"`, for example: [`"HIDDEN"`] becomes [`"HIDDEN"`, `"PUBLISHED"`]. * If neither `"VISIBLE"` nor `"HIDDEN"` are specified, assumes `"VISIBLE"`, for example: [`"DRAFT"`] becomes [`"DRAFT"`, `"VISIBLE"`]. * @maxSize 20 */ state?: StateFilterWithLiterals[]; /** Filters schedule items starting on or after specified point in time. Inclusive. */ startingFrom?: Date | null; /** Filters schedule items starting before specified point in time. Non-inclusive. */ startingBefore?: Date | null; /** * *Deprecated:** Use `paging` instead. * @max 1000 * @deprecated */ offset?: number; /** * *Deprecated:** Use `paging` instead. * @max 100 * @deprecated */ limit?: number; /** * Filter facets. * @minLength 1 * @maxLength 100 * @maxSize 20 */ facet?: string[]; /** * Item IDs filter. * @format GUID * @maxSize 100 */ itemId?: string[]; /** * Tags filter. * @minLength 1 * @maxLength 30 * @maxSize 50 */ tag?: string[]; /** * Stage names filter. * @maxLength 30 * @maxSize 50 */ stageName?: string[]; /** * Pointer to page of results using offset. * See [Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging#paging). */ paging?: Paging; } /** * Creates a query to retrieve a list of schedule items. * * The `queryScheduleItems( )` method builds a query to retrieve a list of schedule items and returns a `ItemsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/events/schedule/items-query-builder/find) method. * * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to sort, filter, and control the results `queryScheduleItems( )` returns. * * `queryScheduleItems( )` runs with these `ItemsQueryBuilder` defaults, which you can override: * * - [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/events/schedule/items-query-builder/limit) * - [`descending("_createdDate")`](https://dev.wix.com/docs/sdk/backend-modules/events/schedule/items-query-builder/descending) * * The methods that are chained to `queryScheduleItems( )` are applied in the order they're called. For example, if you apply `ascending('name')` and then `descending('stageName')`, the results are sorted first by the `name`, and then, if there are multiple results with the same `name`, the items are sorted by `stageName`. * @public * @permissionId WIX_EVENTS.READ_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.QueryScheduleItems */ declare function queryScheduleItems(): ItemsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface ItemsQueryResult extends QueryCursorResult { items: ScheduleItem[]; query: ItemsQueryBuilder; next: () => Promise; prev: () => Promise; } interface ItemsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId', value: any) => ItemsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId'>) => ItemsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | 'name' | 'description' | 'stageName' | '_createdDate' | '_updatedDate' | 'eventId'>) => ItemsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => ItemsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => ItemsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn wix.events.schedule.ScheduleManagement.QueryScheduleItems * @requiredField query */ declare function typedQueryScheduleItems(query: ScheduleItemQuery): Promise & { __applicationErrorsType?: QueryScheduleItemsApplicationErrors; }>; interface ScheduleItemQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ '_createdDate', '_id', '_updatedDate', 'description', 'eventId', 'name', 'stageName' ]; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type ScheduleItemQuery = { /** Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). @maxSize: 20 */ sort?: { /** Name of the field to sort by @maxLength: 100 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order (ASC/DESC). Defaults to ASC */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Retrieves a schedule item. * @param itemId - Schedule item ID. * @public * @requiredField itemId * @param options - Optional fields. * @permissionId WIX_EVENTS.READ_AGENDA * @applicableIdentity APP * @returns Schedule item. * @fqn wix.events.schedule.ScheduleManagement.GetScheduleItem */ declare function getScheduleItem(itemId: string, options?: GetScheduleItemOptions): Promise>; interface GetScheduleItemOptions { /** Event ID to which the schedule item belongs. */ eventId?: string; /** Whether to include draft schedule items in the response. */ includeDraft?: boolean; } /** * Adds a schedule item to a draft schedule. For the same date and time you can have multiple items. * * Note that draft items are not publicly available unless published. * @param eventId - Event ID to add the schedule item to. * @public * @requiredField eventId * @requiredField options.item.name * @requiredField options.item.timeSlot * @requiredField options.item.timeSlot.end * @requiredField options.item.timeSlot.start * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.AddScheduleItem */ declare function addScheduleItem(eventId: string, options?: NonNullablePaths): Promise>; interface AddScheduleItemOptions { /** Schedule item. */ item?: ScheduleItemData; } /** * Updates an existing schedule item. * * The changes are performed on a draft schedule item, even if the schedule item has already been published. * @param itemId - Schedule item ID to update. * @param eventId - Event ID to which the schedule item belongs. * @public * @requiredField eventId * @requiredField itemId * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.UpdateScheduleItem */ declare function updateScheduleItem(itemId: string, eventId: string, options?: UpdateScheduleItemOptions): Promise>; interface UpdateScheduleItemOptions { /** Schedule item info. */ item?: ScheduleItemData; /** * Set of field paths to update. * When fields are empty, request is interpreted as full update. * Behavior follows [google.protobuf.FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask) semantics. */ fields?: string[]; } /** * Deletes a schedule item from a draft schedule. * @param eventId - Event ID to which the schedule item belongs. * @public * @requiredField eventId * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.DeleteScheduleItem */ declare function deleteScheduleItem(eventId: string, options?: DeleteScheduleItemOptions): Promise; interface DeleteScheduleItemOptions { /** * Schedule items to delete. * @format GUID * @minSize 1 * @maxSize 100 */ itemIds?: string[]; } /** * Clears all changes to a draft schedule. * @param eventId - Event ID to which the draft schedule item belongs. * @public * @requiredField eventId * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.DiscardDraft */ declare function discardDraft(eventId: string): Promise; /** * Publishes a draft schedule. * @param eventId - Event ID to which the draft schedule item belongs. * @public * @requiredField eventId * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.PublishDraft */ declare function publishDraft(eventId: string): Promise; /** * Adjusts the time of all draft schedule items for an event at once. * @param eventId - Event ID to which the draft schedule item belongs. * @public * @requiredField eventId * @requiredField options.timeZoneId * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.RescheduleDraft */ declare function rescheduleDraft(eventId: string, options?: NonNullablePaths): Promise; interface RescheduleDraftOptions { /** * Time zone ID in TZ database format, e.g., `"EST"`, `"America/Los_Angeles"`. * @maxLength 100 */ timeZoneId: string; /** Offset added or subtracted from schedule item start & end times. */ timeSlotOffset?: GoogleProtoDuration; } export { type AddScheduleItemOptions, type AddScheduleItemRequest, type AddScheduleItemResponse, type CommonQueryWithEntityContext, type CreateBookmarkRequest, type CreateBookmarkResponse, type Cursors, type DeleteBookmarkRequest, type DeleteBookmarkResponse, type DeleteScheduleItemOptions, type DeleteScheduleItemRequest, type DeleteScheduleItemResponse, type DiscardDraftRequest, type DiscardDraftResponse, type FacetCounts, type GetScheduleItemOptions, type GetScheduleItemRequest, type GetScheduleItemResponse, type ItemsQueryBuilder, type ItemsQueryResult, type ListBookmarksRequest, type ListBookmarksResponse, type ListScheduleItemsOptions, type ListScheduleItemsRequest, type ListScheduleItemsResponse, type Paging, type PagingMetadataV2, type PublishDraftRequest, type PublishDraftResponse, type QueryScheduleItemsApplicationErrors, type QueryScheduleItemsRequest, type QueryScheduleItemsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RescheduleDraftOptions, type RescheduleDraftRequest, type RescheduleDraftResponse, type ScheduleItem, type ScheduleItemData, type ScheduleItemQuery, type ScheduleItemQuerySpec, ScheduleStatus, type ScheduleStatusWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, StateFilter, type StateFilterWithLiterals, type TimeInterval, type UpdateScheduleItemOptions, type UpdateScheduleItemRequest, type UpdateScheduleItemResponse, addScheduleItem, deleteScheduleItem, discardDraft, getScheduleItem, listScheduleItems, publishDraft, queryScheduleItems, rescheduleDraft, typedQueryScheduleItems, updateScheduleItem, utils };