/** Schedule item describes the schedule within an event. Each event may contain multiple schedule items. */ export interface ScheduleItem { /** * Schedule item ID. * @readonly */ _id?: string; /** Whether a schedule item is hidden from guests. */ hidden?: boolean; /** Schedule item name. */ name?: string; /** Time slot of a schedule item. */ timeSlot?: TimeInterval; /** Rich text schedule item description. */ description?: string; /** Stage or room name in which the session takes place. */ stageName?: string; /** Schedule item tags. They're used to organize the items to a theme. */ tags?: string[]; /** * Schedule item status. Possible values: * - `SCHEDULED`: An item is scheduled. * - `CANCELED`: An item is canceled. */ status?: ScheduleStatus; /** * Date and time when the schedule item was created. * @readonly */ _createdDate?: Date | null; /** * Date and time when the schedule item was updated. * @readonly */ _updatedDate?: Date | null; /** * Event ID to which the schedule belongs. * @readonly */ eventId?: string; /** * Whether the schedule item is draft. * @readonly */ draft?: boolean; } /** Time interval on the timeline between two points in time. */ export interface TimeInterval { /** Start of the interval. Inclusive. */ start?: Date | null; /** End of the interval. Non-inclusive. */ end?: Date | null; /** * Time zone ID in the [TZ database](https://www.iana.org/time-zones) format. For example, `EST`, `America/Los_Angeles`. * Default: `Etc/UTC`. */ timeZoneId?: string | null; } export declare enum ScheduleStatus { /** Item is scheduled for a future date. */ SCHEDULED = "SCHEDULED", /** Item is canceled. */ CANCELED = "CANCELED" } export interface ListScheduleItemsRequest { /** Event ID to which the schedule belongs. */ eventId?: string[]; /** * Schedule item state filter. Possible values: * - `PUBLISHED`: The schedule item is published. * - `DRAFT`: The schedule item is in the draft. You need the "WIX_EVENTS.MANAGE_AGENDA" permissions to change this state. * - `VISIBLE`: The schedule item is visible to guests. * - `HIDDEN`: The schedule item is hidden from guests. You need the "WIX_EVENTS.MANAGE_AGENDA" permissions to change this state. * Default: Filters by the `PUBLISHED` and `VISIBLE` states. */ state?: StateFilter[]; /** 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`. * Number of items to skip. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). * @deprecated */ offset?: number; /** * Deprecated, use `paging`. * Number of items to load per page. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). * @deprecated */ limit?: number; /** * Filter facets. * See [supported facets](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-schedule-items). */ facet?: string[]; /** Schedule item ID. */ itemId?: string[]; /** Schedule item tags. They're used to organize the items to a theme. */ tag?: string[]; /** Stage or room name in which the session takes place. */ stageName?: string[]; /** * Pointer to page of results using offset. * See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; } export declare enum StateFilter { /** Schedule item is published. */ PUBLISHED = "PUBLISHED", /** Opposite of `PUBLISHED`. Requires `WIX_EVENTS.READ_HIDDEN_AGENDA` permission. */ DRAFT = "DRAFT", /** Schedule item is visible to the public. */ VISIBLE = "VISIBLE", /** Opposite of `VISIBLE`. Requires `WIX_EVENTS.READ_HIDDEN_AGENDA` permission. */ HIDDEN = "HIDDEN" } export interface Paging { /** Number of items to load per page. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface ListScheduleItemsResponse { /** * Deprecated, use `paging_metadata.total`. * Total schedule items matching the given filters. * @readonly * @deprecated */ total?: number; /** * Deprecated. * Limit. * @deprecated */ limit?: number; /** * Deprecated, use `paging_metadata.offset`. * Offset. * @deprecated */ offset?: number; /** Schedule items. */ items?: ScheduleItem[]; /** * Facets. * @readonly */ facets?: Record; /** * Whether there are draft changes which have not been published yet. * Returned only when filtering by single `event_id` with `WIX_EVENTS.MANAGE_AGENDA` permission. * @readonly */ draftNotPublished?: boolean | null; /** Paging metadata. */ pagingMetadata?: PagingMetadataV2; } export interface FacetCounts { /** Facet counts aggregated per value. */ counts?: Record; } export 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; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface QueryScheduleItemsRequest { query?: QueryV2; } export 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). */ sort?: Sorting[]; } /** @oneof */ export interface QueryV2PagingMethodOneOf { /** * Pointer to page of results using offset. * See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; } export interface Sorting { /** Name of the field to sort by */ fieldName?: string; /** Sort order (ASC/DESC). Defaults to ASC */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface QueryScheduleItemsResponse { pagingMetadata?: PagingMetadataV2; /** Schedule items. */ items?: ScheduleItem[]; } export interface GetScheduleItemRequest { /** Event ID to which the schedule belongs. */ eventId?: string; /** Schedule item ID. */ itemId: string; /** Whether to include draft schedules in the response. */ includeDraft?: boolean; } export interface GetScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; /** Draft of the Schedule item. */ draft?: ScheduleItem; } export interface AddScheduleItemRequest { /** Event ID to which the schedule belongs. */ eventId: string; /** Schedule item. */ item?: ScheduleItemData; } /** Schedule item describes the schedule within an event. Each event may contain multiple schedule items. */ export interface ScheduleItemData { /** Whether a schedule item is hidden from guests. */ hidden?: boolean; /** Schedule item name. */ name?: string; /** Time slot of a schedule item. */ timeSlot?: TimeInterval; /** Rich text schedule item description. */ description?: string; /** Stage or room name in which the session takes place. */ stageName?: string; /** Schedule item tags. They're used to organize the items to a theme. */ tags?: string[]; /** * Schedule item status. Possible values: * - `SCHEDULED`: An item is scheduled. * - `CANCELED`: An item is canceled. */ status?: ScheduleStatus; } export interface AddScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; } export interface UpdateScheduleItemRequest { /** Event ID to which the schedule belongs. */ eventId: string; /** Schedule item ID. */ itemId: string; /** Schedule item. */ 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[]; } export interface UpdateScheduleItemResponse { /** Schedule item. */ item?: ScheduleItem; } export interface DeleteScheduleItemRequest { /** Event ID to which the schedule belongs. */ eventId: string; /** Schedule items to delete. */ itemIds?: string[]; } export interface DeleteScheduleItemResponse { } export interface DiscardDraftRequest { /** Event ID to which the schedule belongs. */ eventId: string; } export interface DiscardDraftResponse { } export interface PublishDraftRequest { /** Event ID to which the schedule belongs. */ eventId: string; } export interface PublishDraftResponse { } export interface RescheduleDraftRequest { /** Event ID to which the schedule belongs. */ eventId: string; /** * Time zone ID in the [TZ database](https://www.iana.org/time-zones) format. For example, `EST`, `America/Los_Angeles`. * Default: `Etc/UTC`. */ timeZoneId: string; /** Offset added or subtracted from the start and end times of schedule items. */ timeSlotOffset?: GoogleProtoDuration; } export interface RescheduleDraftResponse { } export interface ListBookmarksRequest { /** Event ID to which the schedule belongs. */ eventId?: string; } export interface ListBookmarksResponse { /** Schedule items. */ items?: ScheduleItem[]; } export interface CreateBookmarkRequest { /** Event ID to which the schedule belongs. */ eventId?: string; /** Schedule item ID. */ itemId?: string; } export interface CreateBookmarkResponse { } export interface DeleteBookmarkRequest { /** Event ID to which the schedule belongs. */ eventId?: string; /** Schedule item ID. */ itemId?: string; } export interface DeleteBookmarkResponse { } export interface ScheduleItemNonNullableFields { _id: string; hidden: boolean; name: string; description: string; stageName: string; tags: string[]; status: ScheduleStatus; eventId: string; draft: boolean; } export interface ListScheduleItemsResponseNonNullableFields { total: number; limit: number; offset: number; items: ScheduleItemNonNullableFields[]; } export interface QueryScheduleItemsResponseNonNullableFields { items: ScheduleItemNonNullableFields[]; } export interface GetScheduleItemResponseNonNullableFields { item?: ScheduleItemNonNullableFields; draft?: ScheduleItemNonNullableFields; } export interface AddScheduleItemResponseNonNullableFields { item?: ScheduleItemNonNullableFields; } export interface UpdateScheduleItemResponseNonNullableFields { item?: ScheduleItemNonNullableFields; } type GoogleProtoDuration = any; /** * Retrieves a list of up to 100 schedule items * @public * @param options - Optional fields. * @permissionId WIX_EVENTS.READ_AGENDA * @applicableIdentity VISITOR * @fqn wix.events.schedule.ScheduleManagement.ListScheduleItems */ export declare function listScheduleItems(options?: ListScheduleItemsOptions): Promise; export interface ListScheduleItemsOptions { /** Event ID to which the schedule belongs. */ eventId?: string[]; /** * Schedule item state filter. Possible values: * - `PUBLISHED`: The schedule item is published. * - `DRAFT`: The schedule item is in the draft. You need the "WIX_EVENTS.MANAGE_AGENDA" permissions to change this state. * - `VISIBLE`: The schedule item is visible to guests. * - `HIDDEN`: The schedule item is hidden from guests. You need the "WIX_EVENTS.MANAGE_AGENDA" permissions to change this state. * Default: Filters by the `PUBLISHED` and `VISIBLE` states. */ state?: StateFilter[]; /** 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`. * Number of items to skip. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). * @deprecated */ offset?: number; /** * Deprecated, use `paging`. * Number of items to load per page. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). * @deprecated */ limit?: number; /** * Filter facets. * See [supported facets](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-schedule-items). */ facet?: string[]; /** Schedule item ID. */ itemId?: string[]; /** Schedule item tags. They're used to organize the items to a theme. */ tag?: string[]; /** Stage or room name in which the session takes place. */ stageName?: string[]; /** * Pointer to page of results using offset. * See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; } /** * Creates a query to retrieve a list of schedule items. * * The `queryScheduleItems( )` function 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://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/find) function. * * You can refine the query by chaining `ItemsQueryBuilder` functions onto the query. `ItemsQueryBuilder` functions enable you to sort, filter, and control the results `queryScheduleItems( )` returns. * * `queryScheduleItems( )` runs with these `ItemsQueryBuilder` defaults, which you can override: * * - [`limit(50)`](https://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/limit) * - [`descending("_createdDate")`](https://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/descending) * * The functions 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 VISITOR * @fqn wix.events.schedule.ScheduleManagement.QueryScheduleItems */ export declare function queryScheduleItems(): ItemsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface ItemsQueryResult extends QueryCursorResult { items: ScheduleItem[]; query: ItemsQueryBuilder; next: () => Promise; prev: () => Promise; } export 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: '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_createdDate' | '_updatedDate', 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; } /** * Retrieves schedule item by ID. * @param itemId - Schedule item ID. * @public * @requiredField itemId * @param options - Optional fields. * @permissionId WIX_EVENTS.READ_AGENDA * @applicableIdentity VISITOR * @returns Schedule item. * @fqn wix.events.schedule.ScheduleManagement.GetScheduleItem */ export declare function getScheduleItem(itemId: string, options?: GetScheduleItemOptions): Promise; export interface GetScheduleItemOptions { /** Event ID to which the schedule belongs. */ eventId?: string; /** Whether to include draft schedules in the response. */ includeDraft?: boolean; } /** * Adds a schedule item to the draft schedule. * @public * @requiredField eventId * @requiredField options.item.name * @requiredField options.item.timeSlot * @requiredField options.item.timeSlot.end * @requiredField options.item.timeSlot.start * @param eventId - Event ID to which the schedule belongs. * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.AddScheduleItem */ export declare function addScheduleItem(eventId: string, options?: AddScheduleItemOptions): Promise; export interface AddScheduleItemOptions { /** Schedule item. */ item?: ScheduleItemData; } /** * Updates a schedule item in a draft schedule. * @param itemId - Schedule item ID. * @public * @requiredField eventId * @requiredField itemId * @param eventId - Event ID to which the schedule belongs. * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.UpdateScheduleItem */ export declare function updateScheduleItem(itemId: string, eventId: string, options?: UpdateScheduleItemOptions): Promise; export interface UpdateScheduleItemOptions { /** Schedule item. */ 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 schedule items from the draft schedule. * @public * @requiredField eventId * @param eventId - Event ID to which the schedule belongs. * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.DeleteScheduleItem */ export declare function deleteScheduleItem(eventId: string, options?: DeleteScheduleItemOptions): Promise; export interface DeleteScheduleItemOptions { /** Schedule items to delete. */ itemIds?: string[]; } /** * Clears all changes to the draft schedule. * @public * @requiredField eventId * @param eventId - Event ID to which the schedule belongs. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.DiscardDraft */ export declare function discardDraft(eventId: string): Promise; /** * Publishes the draft schedule. * @public * @requiredField eventId * @param eventId - Event ID to which the schedule belongs. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.PublishDraft */ export declare function publishDraft(eventId: string): Promise; /** * Adjusts the time of all draft schedule items at once per event. * @public * @requiredField eventId * @requiredField options.timeZoneId * @param eventId - Event ID to which the schedule belongs. * @param options - Optional fields. * @permissionId WIX_EVENTS.MANAGE_AGENDA * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @applicableIdentity APP * @fqn wix.events.schedule.ScheduleManagement.RescheduleDraft */ export declare function rescheduleDraft(eventId: string, options?: RescheduleDraftOptions): Promise; export interface RescheduleDraftOptions { /** * Time zone ID in the [TZ database](https://www.iana.org/time-zones) format. For example, `EST`, `America/Los_Angeles`. * Default: `Etc/UTC`. */ timeZoneId: string; /** Offset added or subtracted from the start and end times of schedule items. */ timeSlotOffset?: GoogleProtoDuration; } export {};