/** * A resource represents an entity that can be scheduled for use, such as a room or a staff member. * The availability of a resource is tracked to ensure that it can be allocated at a requested time slot and to prevent double bookings. * Read more about resources in this [article](https://support.wix.com/en/article/wix-bookings-managing-your-resources). */ export interface Resource extends ResourceCompositionDetailsOneOf { /** * Resource ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the resource is updated. * To prevent conflicting changes, * the current revision must be passed when updating the resource. * @readonly */ revision?: string | null; /** * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was created. * @readonly */ _createdDate?: Date | null; /** * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was last updated. * @readonly */ _updatedDate?: Date | null; /** Name of the resource. */ name?: string | null; /** * ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-type-v2/introduction). * * Once a type has been set it can't be modified. You can create a resource * without specifying a type. However, such resources cannot be booked. */ typeId?: string | null; /** * Schedule details that specify the working hours and locations of this resource. * * Resources without this field are available 24/7 at the locations specified in the field `locationOptions`. * When both `workingHoursSchedules` and `locationOptions` are set then `workingHoursSchedules` takes precedence. */ workingHoursSchedules?: WorkingHoursSchedules; /** Location details that specify where this resource is available. */ locationOptions?: LocationOptions; /** * This schedule contains the sessions in which this resource has been booked. * @readonly */ eventsSchedule?: EventsSchedule; /** Extensions enabling users to save custom data related to the resource. */ extendedFields?: ExtendedFields; } /** @oneof */ export interface ResourceCompositionDetailsOneOf { } export interface WorkingHoursSchedule { /** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */ scheduleId?: string | null; /** * Whether this schedule is used by multiple resources or unique for this resource. * * `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource. * Default: `false`. * @readonly */ shared?: boolean | null; } export interface SingleResource { /** * Schedule details that specify the working hours and locations of this resource. * * When this field is not set the resource is assumed to be available full time (7 x 24) at the locations specified * in the field `location_options`. When both `working_hours_schedules` and `location_options` are set then * `working_hours_schedules` takes precedence. */ workingHoursSchedules?: V2WorkingHoursSchedules; /** * Location details that specify where this resource is available. * * If this field is not supplied then `location_options.available_in_all_locations` is set to `true`. */ locationOptions?: LocationOptions; /** * This schedule contains the sessions in which this resource has been booked. * @readonly */ eventsSchedule?: Schedule; } export interface V2WorkingHoursSchedules { /** schedules specifying all the working hours of the resource. Currently a single schedule is supported. */ values?: Schedule[]; } /** Deprecated and subject to removal */ export interface Schedule { /** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */ scheduleId?: string | null; /** * Whether this schedule is used by multiple resources or unique for this resource. * * `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource. * Default: `false`. */ shared?: boolean | null; } export interface LocationOptions { /** * `true` if the resource is available in all locations, `false` if the resource is available only in specific locations. * Default: `false` */ availableInAllLocations?: boolean | null; /** * Details of specific locations. It must be left empty if `availableInAllLocations` is `true`. * If supplied then the field `specificLocationOptions.availableInBusinessLocations` must be set to `true`. */ specificLocationOptions?: SpecificLocation; } export interface SpecificLocation { /** * `true` if the resource is available in some business locations, `false` otherwise. * * Default: `false` */ availableInBusinessLocations?: boolean | null; /** * Information about business locations. Should be empty if `availableInBusinessLocations` is `false` or if no business location exists in Locations. * Read more about business locations in this [article](https://dev.wix.com/docs/rest/business-management/locations/introduction). */ businessLocations?: BusinessLocation[]; } export interface BusinessLocation { /** The ID of the business location. Must not be empty. */ locationId?: string | null; } export interface WorkingHoursSchedules { /** Schedules specifying all the working hours of the resource. Currently a single schedule is supported. */ values?: WorkingHoursSchedule[]; } export interface EventsSchedule { /** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */ scheduleId?: string | null; } export declare enum ManagementType { /** The resource is managed by a Wix user. */ WIX_USER = "WIX_USER" } export interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } export interface CreateResourceRequest { /** Resource to create. */ resource: Resource; } export interface CreateResourceResponse { /** The created resource. */ resource?: Resource; } export interface BulkCreateResourcesRequest { /** Resources to create. */ resources: Resource[]; /** Whether to include the created resources in the response. Default: `false` */ returnEntity?: boolean; } export interface BulkCreateResourcesResponse { /** The result of each resource creation. */ results?: BulkResourceResult[]; /** Create statistics. */ bulkActionMetadata?: BulkActionMetadata; } export interface BulkResourceResult { /** Item metadata */ itemMetadata?: ItemMetadata; /** The resulting resource after the bulk operation. */ item?: Resource; } export interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } export interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } export interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } export interface GetResourceRequest { /** ID of the resource to retrieve. */ resourceId: string; } export interface GetResourceResponse { /** The retrieved resource. */ resource?: Resource; } export interface GetDeletedResourceRequest { /** ID of the resource to retrieve. */ resourceId?: string; } export interface GetDeletedResourceResponse { /** The retrieved resource. */ resource?: Resource; } export interface ListDeletedResourcesRequest { /** The ids of the resources to retrieve. */ resourceIds?: string[]; /** Paging parameter, enabling to pass a limit and a cursor. */ paging?: CursorPaging; } export interface CursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface ListDeletedResourcesResponse { /** The retrieved Resources */ resources?: Resource[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } export interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } 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 RemoveResourceFromTrashBinRequest { /** ID of the resource to remove from the trash bin. */ resourceId?: string; } export interface RemoveResourceFromTrashBinResponse { } export interface RestoreResourceFromTrashBinRequest { /** ID of the resource to restore from the trash bin. */ resourceId?: string; } export interface RestoreResourceFromTrashBinResponse { /** The restored resource. */ resource?: Resource; } export interface UpdateResourceRequest { /** Resource to be updated, may be partial. */ resource: Resource; } export interface UpdateResourceResponse { /** The updated resource. */ resource?: Resource; } export interface DeleteResourceRequest { /** ID of the resource to delete. */ resourceId: string; } export interface DeleteResourceResponse { } export interface BulkDeleteResourcesRequest { /** The IDs of the resources to delete. */ ids: string[]; } export interface BulkDeleteResourcesResponse { /** The result of each resource removal. */ results?: BulkResourceResult[]; /** Delete statistics. */ bulkActionMetadata?: BulkActionMetadata; } export interface SearchResourcesRequest { /** Search condition */ search?: CursorSearch; } export interface CursorSearch extends CursorSearchPagingMethodOneOf { /** * Cursor pointing to page of results. * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. */ cursorPaging?: CursorPaging; /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */ filter?: Record | null; /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */ sort?: Sorting[]; /** Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. */ aggregations?: Aggregation[]; /** Free text to match in searchable fields */ search?: SearchDetails; /** * UTC offset or IANA time zone. Valid values are * ISO 8601 UTC offsets, such as +02:00 or -06:00, * and IANA time zone IDs, such as Europe/Rome * * Affects all filters and aggregations returned values. * You may override this behavior in a specific filter by providing * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` */ timeZone?: string | null; } /** @oneof */ export interface CursorSearchPagingMethodOneOf { /** * Cursor pointing to page of results. * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. */ cursorPaging?: CursorPaging; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface Aggregation extends AggregationKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** Nested aggregation */ nested?: NestedAggregation; /** User-defined name of aggregation, should be unique, will appear in aggregation results */ name?: string | null; /** Type of aggregation, client must provide matching aggregation field below */ type?: AggregationType; /** Field to aggregate by, use dot notation to specify json path */ fieldPath?: string; /** * deprecated, use `nested` instead * @deprecated deprecated, use `nested` instead * @replacedBy kind.nested * @targetRemovalDate 2024-03-30 */ groupBy?: GroupByAggregation; } /** @oneof */ export interface AggregationKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** Nested aggregation */ nested?: NestedAggregation; } export interface RangeBucket { /** Inclusive lower bound of the range. Required if to is not given */ from?: number | null; /** Exclusive upper bound of the range. Required if from is not given */ to?: number | null; } export declare enum SortType { /** Should sort by number of matches */ COUNT = "COUNT", /** Should sort by value of the field alphabetically */ VALUE = "VALUE" } export declare enum SortDirection { /** Should sort in descending order */ DESC = "DESC", /** Should sort in ascending order */ ASC = "ASC" } export declare enum MissingValues { /** Should missing values be excluded from the aggregation results */ EXCLUDE = "EXCLUDE", /** Should missing values be included in the aggregation results */ INCLUDE = "INCLUDE" } export interface IncludeMissingValuesOptions { /** Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */ addToBucket?: string; } export declare enum ScalarType { UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE", /** Count of distinct values */ COUNT_DISTINCT = "COUNT_DISTINCT", /** Minimum value */ MIN = "MIN", /** Maximum value */ MAX = "MAX" } export interface ValueAggregation extends ValueAggregationOptionsOneOf { /** Options for including missing values */ includeOptions?: IncludeMissingValuesOptions; /** Should sort by number of matches or value of the field */ sortType?: SortType; /** Should sort in ascending or descending order */ sortDirection?: SortDirection; /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */ limit?: number | null; /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */ missingValues?: MissingValues; } /** @oneof */ export interface ValueAggregationOptionsOneOf { /** Options for including missing values */ includeOptions?: IncludeMissingValuesOptions; } export declare enum NestedAggregationType { UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE", /** An aggregation where result buckets are dynamically built - one per unique value */ VALUE = "VALUE", /** An aggregation, where user can define set of ranges - each representing a bucket */ RANGE = "RANGE", /** A single-value metric aggregation - e.g. min, max, sum, avg */ SCALAR = "SCALAR", /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */ DATE_HISTOGRAM = "DATE_HISTOGRAM" } export interface RangeAggregation { /** List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds */ buckets?: RangeBucket[]; } export interface ScalarAggregation { /** Define the operator for the scalar aggregation */ type?: ScalarType; } export interface DateHistogramAggregation { /** Interval for date histogram aggregation */ interval?: Interval; } export declare enum Interval { UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL", /** Yearly interval */ YEAR = "YEAR", /** Monthly interval */ MONTH = "MONTH", /** Weekly interval */ WEEK = "WEEK", /** Daily interval */ DAY = "DAY", /** Hourly interval */ HOUR = "HOUR", /** Minute interval */ MINUTE = "MINUTE", /** Second interval */ SECOND = "SECOND" } export interface NestedAggregationItem extends NestedAggregationItemKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** User-defined name of aggregation, should be unique, will appear in aggregation results */ name?: string | null; /** Type of aggregation, client must provide matching aggregation field below */ type?: NestedAggregationType; /** Field to aggregate by, use dont notation to specify json path */ fieldPath?: string; } /** @oneof */ export interface NestedAggregationItemKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; } export declare enum AggregationType { UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE", /** An aggregation where result buckets are dynamically built - one per unique value */ VALUE = "VALUE", /** An aggregation, where user can define set of ranges - each representing a bucket */ RANGE = "RANGE", /** A single-value metric aggregation - e.g. min, max, sum, avg */ SCALAR = "SCALAR", /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */ DATE_HISTOGRAM = "DATE_HISTOGRAM", /** Multi-level aggregation, where each next aggregation is nested within previous one */ NESTED = "NESTED" } /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */ export interface NestedAggregation { /** Flattened list of aggregations, where each next aggregation is nested within previous one */ nestedAggregations?: NestedAggregationItem[]; } export interface GroupByAggregation extends GroupByAggregationKindOneOf { /** Value aggregation configuration */ value?: ValueAggregation; /** User-defined name of aggregation, should be unique, will appear in aggregation results */ name?: string | null; /** Field to aggregate by */ fieldPath?: string; } /** @oneof */ export interface GroupByAggregationKindOneOf { /** Value aggregation configuration */ value?: ValueAggregation; } export interface SearchDetails { /** Defines how separate search terms in `expression` are combined */ mode?: Mode; /** Search term or expression */ expression?: string | null; /** Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path */ fields?: string[]; /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */ fuzzy?: boolean; } export declare enum Mode { /** Any of the search terms must be present */ OR = "OR", /** All search terms must be present */ AND = "AND" } export interface SearchResourcesResponse { /** The retrieved resources */ resources?: Resource[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; /** Aggregation results */ aggregationData?: AggregationData; } export interface AggregationData { /** key = aggregation name (as derived from search request) */ results?: AggregationResults[]; } export interface ValueAggregationResult { /** Value of the field */ value?: string; /** Count of entities with this value */ count?: number; } export interface RangeAggregationResult { /** Inclusive lower bound of the range */ from?: number | null; /** Exclusive upper bound of the range */ to?: number | null; /** Count of entities in this range */ count?: number; } export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** User-defined name of aggregation, matches the one provided in request */ name?: string; /** Type of aggregation that matches result */ type?: AggregationType; /** Field to aggregate by, matches the one provided in request */ fieldPath?: string; } /** @oneof */ export interface NestedAggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; } export interface ValueResults { /** List of value aggregations */ results?: ValueAggregationResult[]; } export interface RangeResults { /** List of ranges returned in same order as requested */ results?: RangeAggregationResult[]; } export interface AggregationResultsScalarResult { /** Type of scalar aggregation */ type?: ScalarType; /** Value of the scalar aggregation */ value?: number; } export interface NestedValueAggregationResult { /** Value of the field */ value?: string; /** Nested aggregations */ nestedResults?: NestedAggregationResults; } export interface ValueResult { /** Value of the field */ value?: string; /** Count of entities with this value */ count?: number | null; } export interface RangeResult { /** Inclusive lower bound of the range */ from?: number | null; /** Exclusive upper bound of the range */ to?: number | null; /** Count of entities in this range */ count?: number | null; } export interface ScalarResult { /** Value of the scalar aggregation */ value?: number; } export interface NestedResultValue extends NestedResultValueResultOneOf { /** Value aggregation result */ value?: ValueResult; /** Range aggregation result */ range?: RangeResult; /** Scalar aggregation result */ scalar?: ScalarResult; /** Date histogram aggregation result */ dateHistogram?: ValueResult; } /** @oneof */ export interface NestedResultValueResultOneOf { /** Value aggregation result */ value?: ValueResult; /** Range aggregation result */ range?: RangeResult; /** Scalar aggregation result */ scalar?: ScalarResult; /** Date histogram aggregation result */ dateHistogram?: ValueResult; } export interface Results { /** List of nested aggregations */ results?: Record; } export interface DateHistogramResult { /** Date in ISO 8601 format */ value?: string; /** Count of documents in the bucket */ count?: number; } export interface GroupByValueResults { /** List of value aggregations */ results?: NestedValueAggregationResult[]; } export interface DateHistogramResults { /** List of date histogram aggregations */ results?: DateHistogramResult[]; } /** * Results of `NESTED` aggregation type in a flattened form * aggregations in resulting array are keyed by requested aggregation `name`. */ export interface NestedResults { /** List of nested aggregations */ results?: Results[]; } export interface AggregationResults extends AggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results */ dateHistogram?: DateHistogramResults; /** Nested aggregation results */ nested?: NestedResults; /** User-defined name of aggregation as derived from search request */ name?: string; /** Type of aggregation that must match provided kind as derived from search request */ type?: AggregationType; /** Field to aggregate by as derived from search request */ fieldPath?: string; } /** @oneof */ export interface AggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results */ dateHistogram?: DateHistogramResults; /** Nested aggregation results */ nested?: NestedResults; } export interface QueryResourcesRequest { /** WQL expression. */ query?: CursorQuery; } export interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; } /** @oneof */ export interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } export interface QueryResourcesResponse { /** The retrieved Resources. */ resources?: Resource[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } export interface CountResourcesRequest { /** Filter to apply on resources to count. */ filter?: Record | null; /** * @deprecated * @targetRemovalDate 2024-05-01 */ search?: SearchDetails; } export interface CountResourcesResponse { /** The number of resources matching the given filter. */ count?: number; } export interface ImportResourceRequest { /** Resource to be imported. */ resource?: Resource; } export interface ImportResourceResponse { /** The imported resource. */ resource?: Resource; } export interface FixResourceSchedulesRequest { /** Id of the resource of which the schedules must be fixed */ resourceId?: string; /** the working hours schedule that must be set for this resource. */ workingHoursSchedule?: Schedule; } export interface FixResourceSchedulesResponse { /** The resource with the fixed schedule IDs. */ resource?: Resource; } export interface ReindexTenantRequest { } export interface ReindexTenantResponse { } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } export interface ResourceNonNullableFields { managementType: ManagementType; } export interface CreateResourceResponseNonNullableFields { resource?: ResourceNonNullableFields; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface ItemMetadataNonNullableFields { originalIndex: number; success: boolean; error?: ApplicationErrorNonNullableFields; } interface BulkResourceResultNonNullableFields { itemMetadata?: ItemMetadataNonNullableFields; item?: ResourceNonNullableFields; } interface BulkActionMetadataNonNullableFields { totalSuccesses: number; totalFailures: number; undetailedFailures: number; } export interface BulkCreateResourcesResponseNonNullableFields { results: BulkResourceResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface GetResourceResponseNonNullableFields { resource?: ResourceNonNullableFields; } export interface UpdateResourceResponseNonNullableFields { resource?: ResourceNonNullableFields; } export interface BulkDeleteResourcesResponseNonNullableFields { results: BulkResourceResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } interface ValueAggregationResultNonNullableFields { value: string; count: number; } interface ValueResultsNonNullableFields { results: ValueAggregationResultNonNullableFields[]; } interface RangeAggregationResultNonNullableFields { count: number; } interface RangeResultsNonNullableFields { results: RangeAggregationResultNonNullableFields[]; } interface AggregationResultsScalarResultNonNullableFields { type: ScalarType; value: number; } interface NestedAggregationResultsNonNullableFields { values?: ValueResultsNonNullableFields; ranges?: RangeResultsNonNullableFields; scalar?: AggregationResultsScalarResultNonNullableFields; name: string; type: AggregationType; fieldPath: string; } interface NestedValueAggregationResultNonNullableFields { value: string; nestedResults?: NestedAggregationResultsNonNullableFields; } interface GroupByValueResultsNonNullableFields { results: NestedValueAggregationResultNonNullableFields[]; } interface DateHistogramResultNonNullableFields { value: string; count: number; } interface DateHistogramResultsNonNullableFields { results: DateHistogramResultNonNullableFields[]; } interface AggregationResultsNonNullableFields { values?: ValueResultsNonNullableFields; ranges?: RangeResultsNonNullableFields; scalar?: AggregationResultsScalarResultNonNullableFields; groupedByValue?: GroupByValueResultsNonNullableFields; dateHistogram?: DateHistogramResultsNonNullableFields; name: string; type: AggregationType; fieldPath: string; } interface AggregationDataNonNullableFields { results: AggregationResultsNonNullableFields[]; } export interface SearchResourcesResponseNonNullableFields { resources: ResourceNonNullableFields[]; aggregationData?: AggregationDataNonNullableFields; } export interface QueryResourcesResponseNonNullableFields { resources: ResourceNonNullableFields[]; } export interface CountResourcesResponseNonNullableFields { count: number; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface ResourceCreatedEnvelope { entity: Resource; metadata: EventMetadata; } /** * Triggered for each resource that is created. * * This event has the same structure as [Resource Created](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/create-resource#resource-created). * @webhook * @eventType wix.bookings.resources.v2.resource_created * @documentationMaturity preview */ export declare function onResourceCreated(handler: (event: ResourceCreatedEnvelope) => void | Promise): void; export interface ResourceDeletedEnvelope { metadata: EventMetadata; } /** * Triggered for each resource that is deleted. * * This event has the same structure as [Resource Deleted](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/bulk-delete-resources#resource-deleted). * @webhook * @eventType wix.bookings.resources.v2.resource_deleted * @documentationMaturity preview */ export declare function onResourceDeleted(handler: (event: ResourceDeletedEnvelope) => void | Promise): void; export interface ResourceUpdatedEnvelope { entity: Resource; metadata: EventMetadata; } /** * Triggered when a resource is updated. * @webhook * @eventType wix.bookings.resources.v2.resource_updated * @documentationMaturity preview */ export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelope) => void | Promise): void; /** * Creates a new resource. * * A new events schedule is automatically created specific to this resource. This schedule will contain information * on when the resource is booked in order to prevent double bookings. * See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. * * - If the request does not include the field `locationOptions`, then the service will create this field and set * `availableInAllLocations` in this structure to `true`. * - If the request includes one or more business location IDs in the `locationOptions.specificLocationOptions.businessLocations` * field, then the field `locationOptions.specificLocationOptions.availableInBusinessLocations` must be set * to `true`. * @param resource - Resource to create. * @public * @documentationMaturity preview * @requiredField resource * @requiredField resource.name * @permissionId BOOKINGS.RESOURCE_CREATE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @returns The created resource. * @fqn wix.bookings.resources.v2.ResourcesService.CreateResource */ export declare function createResource(resource: Resource): Promise; /** * Creates multiple resources. * @param resources - Resources to create. * @public * @documentationMaturity preview * @requiredField resources * @requiredField resources.name * @permissionId BOOKINGS.RESOURCE_CREATE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources */ export declare function bulkCreateResources(resources: Resource[], options?: BulkCreateResourcesOptions): Promise; export interface BulkCreateResourcesOptions { /** Whether to include the created resources in the response. Default: `false` */ returnEntity?: boolean; } /** * Retrieves a resource by ID. * @param resourceId - ID of the resource to retrieve. * @public * @documentationMaturity preview * @requiredField resourceId * @permissionId BOOKINGS.RESOURCE_READ * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @applicableIdentity VISITOR * @returns The retrieved resource. * @fqn wix.bookings.resources.v2.ResourcesService.GetResource */ export declare function getResource(resourceId: string): Promise; /** * Updates a resource. * * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it. * This ensures you're working with the latest service information and prevents unintended overwrites. * @param _id - Resource ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField resource * @requiredField resource.revision * @permissionId BOOKINGS.RESOURCE_UPDATE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @returns The updated resource. * @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource */ export declare function updateResource(_id: string | null, resource: UpdateResource): Promise; export interface UpdateResource { /** * Resource ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the resource is updated. * To prevent conflicting changes, * the current revision must be passed when updating the resource. * @readonly */ revision?: string | null; /** * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was created. * @readonly */ _createdDate?: Date | null; /** * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was last updated. * @readonly */ _updatedDate?: Date | null; /** Name of the resource. */ name?: string | null; /** * ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-type-v2/introduction). * * Once a type has been set it can't be modified. You can create a resource * without specifying a type. However, such resources cannot be booked. */ typeId?: string | null; /** * Schedule details that specify the working hours and locations of this resource. * * Resources without this field are available 24/7 at the locations specified in the field `locationOptions`. * When both `workingHoursSchedules` and `locationOptions` are set then `workingHoursSchedules` takes precedence. */ workingHoursSchedules?: WorkingHoursSchedules; /** Location details that specify where this resource is available. */ locationOptions?: LocationOptions; /** * This schedule contains the sessions in which this resource has been booked. * @readonly */ eventsSchedule?: EventsSchedule; /** Extensions enabling users to save custom data related to the resource. */ extendedFields?: ExtendedFields; } /** * Deletes a resource. * * Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources. * @param resourceId - ID of the resource to delete. * @public * @documentationMaturity preview * @requiredField resourceId * @permissionId BOOKINGS.RESOURCE_DELETE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource */ export declare function deleteResource(resourceId: string): Promise; /** * Deletes multiple resources. * @param ids - The IDs of the resources to delete. * @public * @documentationMaturity preview * @requiredField ids * @permissionId BOOKINGS.RESOURCE_DELETE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources */ export declare function bulkDeleteResources(ids: string[]): Promise; /** * Retrieves a list of resources matching the provided search criteria. * * The search endpoints allow to perform advanced search including partial text search, exact match, and more. * The endpoint also allows to aggregate resources by type, name, app id, management type, management type and location options. * @public * @documentationMaturity preview * @permissionId BOOKINGS.RESOURCE_READ * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources */ export declare function searchResources(options?: SearchResourcesOptions): Promise; export interface SearchResourcesOptions { /** Search condition */ search?: CursorSearch; } /** * Creates a query to retrieve a list of resources. * * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` 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/bookings/resources/resources-query-builder/find) function. * * You can refine the query by chaining `ResourcesQueryBuilder` functions onto the query. `ResourcesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResources()` returns. * * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override: * * + `limit` is `50`. * + Sorted by `id` in ascending order. * * The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending("typeId")` and then `ascending("id")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"id"`. * * The following `ResourcesQueryBuilder` functions are supported for the `queryResources()` function. For a full description of the resource object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-result/items) property in `ResourcesQueryResult`. * @public * @documentationMaturity preview * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionId BOOKINGS.RESOURCE_READ * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.bookings.resources.v2.ResourcesService.QueryResources */ export declare function queryResources(): ResourcesQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface ResourcesQueryResult extends QueryCursorResult { items: Resource[]; query: ResourcesQueryBuilder; next: () => Promise; prev: () => Promise; } export interface ResourcesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: string) => ResourcesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any[]) => ResourcesQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: boolean) => ResourcesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'type' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId' | 'appId' | 'managementType'>) => ResourcesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'type' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId' | 'appId' | 'managementType'>) => ResourcesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => ResourcesQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => ResourcesQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Counts resources according to given criteria. * * Use [WQL filter](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) to define the criteria. * @public * @documentationMaturity preview * @param options - Filter to base the count on. See * [queryResources()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/query-resources) * for supported filters. * @permissionId BOOKINGS.RESOURCE_READ * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.bookings.resources.v2.ResourcesService.CountResources */ export declare function countResources(options?: CountResourcesOptions): Promise; export interface CountResourcesOptions { /** Filter to apply on resources to count. */ filter?: Record | null; /** * @deprecated * @targetRemovalDate 2024-05-01 */ search?: SearchDetails; } export {};