@wix/auto_sdk_bookings_resources 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/build/cjs/index.js.map +1 -0
  2. package/build/es/index.mjs.map +1 -0
  3. package/build/es/package.json +3 -0
  4. package/build/internal/cjs/index.js.map +1 -0
  5. package/build/internal/cjs/meta.js.map +1 -0
  6. package/build/internal/es/index.mjs.map +1 -0
  7. package/build/internal/es/meta.mjs.map +1 -0
  8. package/package.json +10 -10
  9. package/build/index.js.map +0 -1
  10. package/build/index.mjs.map +0 -1
  11. package/build/internal/index.js.map +0 -1
  12. package/build/internal/index.mjs.map +0 -1
  13. package/build/meta.js.map +0 -1
  14. package/build/meta.mjs.map +0 -1
  15. /package/build/{bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts → cjs/bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts} +0 -0
  16. /package/build/{index.d.ts → cjs/index.d.ts} +0 -0
  17. /package/build/{index.js → cjs/index.js} +0 -0
  18. /package/build/{internal → cjs}/meta.d.ts +0 -0
  19. /package/build/{internal → cjs}/meta.js +0 -0
  20. /package/build/{internal → cjs}/meta.js.map +0 -0
  21. /package/build/{bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts → es/bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts} +0 -0
  22. /package/build/{index.d.mts → es/index.d.mts} +0 -0
  23. /package/build/{index.mjs → es/index.mjs} +0 -0
  24. /package/build/{internal → es}/meta.d.mts +0 -0
  25. /package/build/{internal → es}/meta.mjs +0 -0
  26. /package/build/{internal → es}/meta.mjs.map +0 -0
  27. /package/build/internal/{bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts → cjs/bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.ts} +0 -0
  28. /package/build/internal/{index.d.ts → cjs/index.d.ts} +0 -0
  29. /package/build/internal/{index.js → cjs/index.js} +0 -0
  30. /package/build/{meta.d.ts → internal/cjs/meta.d.ts} +0 -0
  31. /package/build/{meta.js → internal/cjs/meta.js} +0 -0
  32. /package/build/internal/{bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts → es/bookings-resources-v2-resource-resources.universal-D9QXPtmj.d.mts} +0 -0
  33. /package/build/internal/{index.d.mts → es/index.d.mts} +0 -0
  34. /package/build/internal/{index.mjs → es/index.mjs} +0 -0
  35. /package/build/{meta.d.mts → internal/es/meta.d.mts} +0 -0
  36. /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/bookings-resources-v2-resource-resources.public.ts","../../src/bookings-resources-v2-resource-resources.universal.ts","../../src/bookings-resources-v2-resource-resources.http.ts","../../src/bookings-resources-v2-resource-resources.context.ts"],"sourcesContent":["export * from './src/bookings-resources-v2-resource-resources.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateResourcesOptions,\n BulkCreateResourcesResponse,\n BulkDeleteResourcesResponse,\n BulkUpdateResourcesOptions,\n BulkUpdateResourcesResponse,\n CountResourcesOptions,\n CountResourcesResponse,\n MaskedResource,\n Resource,\n ResourceCreatedEnvelope,\n ResourceDeletedEnvelope,\n ResourceSearch,\n ResourceUpdatedEnvelope,\n ResourcesQueryBuilder,\n SearchResourcesResponse,\n UpdateResource,\n bulkCreateResources as universalBulkCreateResources,\n bulkDeleteResources as universalBulkDeleteResources,\n bulkUpdateResources as universalBulkUpdateResources,\n countResources as universalCountResources,\n createResource as universalCreateResource,\n deleteResource as universalDeleteResource,\n getResource as universalGetResource,\n queryResources as universalQueryResources,\n searchResources as universalSearchResources,\n updateResource as universalUpdateResource,\n} from './bookings-resources-v2-resource-resources.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createResource(\n httpClient: HttpClient\n): CreateResourceSignature {\n return (resource: NonNullablePaths<Resource, `name`>) =>\n universalCreateResource(\n resource,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateResourceSignature {\n /**\n * Creates a new resource.\n *\n *\n * ## Connected schedules\n *\n * A new event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))\n * is automatically created for the resource.\n *\n * ## Locations\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `locationOptions.availableInAllLocations` to `true`.\n *\n * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,\n * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`\n * as `true`. Currently, you can specify only a single business location.\n * @param - Resource to create.\n * @returns Created resource.\n */\n (resource: Resource): Promise<Resource>;\n}\n\nexport function bulkCreateResources(\n httpClient: HttpClient\n): BulkCreateResourcesSignature {\n return (\n resources: NonNullablePaths<Resource, `name`>[],\n options?: BulkCreateResourcesOptions\n ) =>\n universalBulkCreateResources(\n resources,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateResourcesSignature {\n /**\n * Creates up to 50 resources.\n *\n *\n * Refer to *Create Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))\n * for more details.\n * @param - Resources to create.\n */\n (\n resources: Resource[],\n options?: BulkCreateResourcesOptions | undefined\n ): Promise<BulkCreateResourcesResponse>;\n}\n\nexport function getResource(httpClient: HttpClient): GetResourceSignature {\n return (resourceId: string) =>\n universalGetResource(\n resourceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetResourceSignature {\n /**\n * Retrieves a resource.\n * @param - ID of the resource to retrieve.\n * @returns Retrieved resource.\n */\n (resourceId: string): Promise<Resource>;\n}\n\nexport function updateResource(\n httpClient: HttpClient\n): UpdateResourceSignature {\n return (\n _id: string,\n resource: NonNullablePaths<UpdateResource, `revision`>\n ) =>\n universalUpdateResource(\n _id,\n resource,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateResourceSignature {\n /**\n * Updates a resource.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param - Resource ID.\n * @returns Updated resource.\n */\n (_id: string, resource: UpdateResource): Promise<Resource>;\n}\n\nexport function bulkUpdateResources(\n httpClient: HttpClient\n): BulkUpdateResourcesSignature {\n return (\n resources: NonNullablePaths<\n MaskedResource,\n `resource._id` | `resource.revision`\n >[],\n options?: BulkUpdateResourcesOptions\n ) =>\n universalBulkUpdateResources(\n resources,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateResourcesSignature {\n /**\n * Updates multiple resources.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param - Resources to update.\n */\n (\n resources: MaskedResource[],\n options?: BulkUpdateResourcesOptions | undefined\n ): Promise<BulkUpdateResourcesResponse>;\n}\n\nexport function deleteResource(\n httpClient: HttpClient\n): DeleteResourceSignature {\n return (resourceId: string) =>\n universalDeleteResource(\n resourceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteResourceSignature {\n /**\n * Deletes a resource.\n *\n *\n * Deleting a resource cancels its event schedule and all its working hour\n * schedules that aren't shared with another resource. Learn more about\n * _how Bookings uses the Calendar APIs_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).\n * @param - ID of the resource to delete.\n */\n (resourceId: string): Promise<void>;\n}\n\nexport function bulkDeleteResources(\n httpClient: HttpClient\n): BulkDeleteResourcesSignature {\n return (ids: string[]) =>\n universalBulkDeleteResources(\n ids,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteResourcesSignature {\n /**\n * Deletes multiple resources.\n *\n *\n * Refer to *Delete Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))\n * for more details.\n * @param - IDs of the resources to delete.\n */\n (ids: string[]): Promise<BulkDeleteResourcesResponse>;\n}\n\nexport function searchResources(\n httpClient: HttpClient\n): SearchResourcesSignature {\n return (search: ResourceSearch) =>\n universalSearchResources(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchResourcesSignature {\n /**\n * Retrieves a list of resources matching the provided search criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n * @param - Search condition. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\n (search: ResourceSearch): Promise<SearchResourcesResponse>;\n}\n\nexport function queryResources(\n httpClient: HttpClient\n): QueryResourcesSignature {\n return () =>\n universalQueryResources(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryResourcesSignature {\n /**\n * Creates a query to retrieve a list of resources.\n *\n * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.\n *\n * 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.\n *\n * 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.\n *\n * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * 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(\"name\")`, the results are sorted first by the `\"typeId\"`, and then, if there are multiple results with the same `\"typeId\"`, the items are sorted by `\"name\"`.\n *\n * 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`.\n */\n (): ResourcesQueryBuilder;\n}\n\nexport function countResources(\n httpClient: HttpClient\n): CountResourcesSignature {\n return (options?: CountResourcesOptions) =>\n universalCountResources(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountResourcesSignature {\n /**\n * Counts resources according to given criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n * @param - Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options.\n */\n (\n options?: CountResourcesOptions | undefined\n ): Promise<CountResourcesResponse>;\n}\n\nexport const onResourceCreated = EventDefinition(\n 'wix.bookings.resources.v2.resource_created',\n true,\n (event: ResourceCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ResourceCreatedEnvelope>();\nexport const onResourceDeleted = EventDefinition(\n 'wix.bookings.resources.v2.resource_deleted',\n true,\n (event: ResourceDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ResourceDeletedEnvelope>();\nexport const onResourceUpdated = EventDefinition(\n 'wix.bookings.resources.v2.resource_updated',\n true,\n (event: ResourceUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ResourceUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateResourcesOptions,\n BulkCreateResourcesRequest,\n BulkCreateResourcesResponse,\n BulkDeleteResourcesRequest,\n BulkDeleteResourcesResponse,\n BulkResourceResult,\n BulkUpdateResourcesOptions,\n BulkUpdateResourcesRequest,\n BulkUpdateResourcesResponse,\n BusinessLocation,\n CountResourcesOptions,\n CountResourcesRequest,\n CountResourcesResponse,\n CreateResourceRequest,\n CreateResourceResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n DeleteResourceRequest,\n DeleteResourceResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n EventsSchedule,\n ExtendedFields,\n FixResourceSchedulesRequest,\n FixResourceSchedulesResponse,\n GetDeletedResourceRequest,\n GetDeletedResourceResponse,\n GetResourceRequest,\n GetResourceResponse,\n GroupByAggregation,\n GroupByAggregationKindOneOf,\n GroupByValueResults,\n IdentificationData,\n IdentificationDataIdOneOf,\n IncludeMissingValuesOptions,\n Interval,\n ItemMetadata,\n ListDeletedResourcesRequest,\n ListDeletedResourcesResponse,\n LocationOptions,\n ManagementType,\n MaskedResource,\n MessageEnvelope,\n MissingValues,\n Mode,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NestedValueAggregationResult,\n QueryResourcesRequest,\n QueryResourcesResponse,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n ReindexTenantRequest,\n ReindexTenantResponse,\n RemoveResourceFromTrashBinRequest,\n RemoveResourceFromTrashBinResponse,\n Resource,\n ResourceCompositionDetailsOneOf,\n ResourceCreatedEnvelope,\n ResourceDeletedEnvelope,\n ResourceSearchSpec,\n ResourceUpdatedEnvelope,\n ResourcesQueryBuilder,\n ResourcesQueryResult,\n RestoreInfo,\n RestoreResourceFromTrashBinRequest,\n RestoreResourceFromTrashBinResponse,\n Results,\n ScalarAggregation,\n ScalarResult,\n ScalarType,\n Schedule,\n SearchDetails,\n SearchResourcesRequest,\n SearchResourcesResponse,\n SingleResource,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n SpecificLocation,\n UpdateResource,\n UpdateResourceRequest,\n UpdateResourceResponse,\n V2WorkingHoursSchedules,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n WebhookIdentityType,\n WorkingHoursSchedule,\n WorkingHoursSchedules,\n} from './bookings-resources-v2-resource-resources.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n Search as SearchSdkType,\n NonNullablePaths,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBookingsResourcesV2Resource from './bookings-resources-v2-resource-resources.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A resource represents an entity, such as a room or a staff member, that can be\n * scheduled for use in a *booking*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/about-the-bookings-apis)).\n * The availability of a resource is tracked to ensure that it\n * can be allocated at a requested time slot and to prevent double bookings.\n */\nexport interface Resource extends ResourceCompositionDetailsOneOf {\n /**\n * Resource ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the resource is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the resource.\n * @readonly\n */\n revision?: string | null;\n /**\n * Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Name of the resource.\n * @maxLength 40\n * @minLength 1\n */\n name?: string | null;\n /**\n * ID of the *resource type*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).\n *\n * Once a type has been set it can't be modified. You can create a resource\n * without specifying a type. However, customers can't book such resources.\n * @format GUID\n * @immutable\n */\n typeId?: string | null;\n /**\n * Information about the *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))\n * specifying the working hours and locations of the resource.\n *\n * Resources without a working hour schedule are available 24/7 at the locations\n * specified in the field `locationOptions`.\n * When both `workingHoursSchedules` and `locationOptions` are set,\n * `workingHoursSchedules` takes precedence.\n */\n workingHoursSchedules?: WorkingHoursSchedules;\n /** Information about the location where the resource is available. */\n locationOptions?: LocationOptions;\n /**\n * Schedule containing the *events*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))\n * for which the resource has been booked.\n * @readonly\n */\n eventsSchedule?: EventsSchedule;\n /** Extensions enabling users to save custom data related to the resource. */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface ResourceCompositionDetailsOneOf {}\n\nexport interface WorkingHoursSchedule {\n /**\n * ID of the working hour *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).\n * @format GUID\n */\n scheduleId?: string | null;\n /**\n * Whether the schedule is shared by multiple resources or unique for this resource.\n *\n * Default: `false`\n * @readonly\n */\n shared?: boolean | null;\n}\n\nexport interface SingleResource {\n /**\n * Schedule details that specify the working hours and locations of this resource.\n *\n * When this field is missing or empty, the resource is assumed to be available\n * around the clock (24/7) at the locations specified in `locationOptions`. When\n * both `workingHoursSchedules` and `locationOptions` are set,\n * `workingHoursSchedules` takes precedence.\n */\n workingHoursSchedules?: V2WorkingHoursSchedules;\n /**\n * Information about the location where the resource is available.\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `{\"availableInAllLocations\": true}`.\n */\n locationOptions?: LocationOptions;\n /**\n * Schedule containing the *events*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))\n * for which the resource has been booked.\n * @readonly\n */\n eventsSchedule?: Schedule;\n}\n\nexport interface V2WorkingHoursSchedules {\n /**\n * Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.\n * @maxSize 1\n */\n values?: Schedule[];\n}\n\n/** Deprecated and subject to removal */\nexport interface Schedule {\n /**\n * Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.\n * @format GUID\n */\n scheduleId?: string | null;\n /**\n * Whether this schedule is used by multiple resources or unique for this resource.\n *\n * `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource.\n * Default: `false`.\n */\n shared?: boolean | null;\n}\n\nexport interface LocationOptions {\n /**\n * Whether the resource is available in all *business locations*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).\n *\n * - `true`: The resource is available in all business locations.\n * - `false`: The resource is available only in specific locations.\n *\n * Default: `false`\n */\n availableInAllLocations?: boolean | null;\n /** Details of resource availability in specific locations. */\n specificLocationOptions?: SpecificLocation;\n}\n\nexport interface SpecificLocation {\n /**\n * Whether the resource is available in *business locations*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).\n *\n * - `true`: The resource is available in business locations.\n * - `false`: The resource isn't available in business locations.\n *\n * Default: `false`\n */\n availableInBusinessLocations?: boolean | null;\n /**\n * Information about the business locations where the resource is available.\n * Not returned, if the resource is available in either all business locations\n * or in no business location.\n * You can specify up to 100 business locations.\n * @maxSize 100\n */\n businessLocations?: BusinessLocation[];\n}\n\nexport interface BusinessLocation {\n /**\n * ID of the business *location*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).\n * @format GUID\n */\n locationId?: string | null;\n}\n\nexport interface WorkingHoursSchedules {\n /**\n * Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.\n * @maxSize 1\n */\n values?: WorkingHoursSchedule[];\n}\n\nexport interface EventsSchedule {\n /**\n * ID of the event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).\n * @format GUID\n */\n scheduleId?: string | null;\n}\n\nexport enum ManagementType {\n /** The resource is managed by a Wix user. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type ManagementTypeWithLiterals = ManagementType | 'WIX_USER';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateResourceRequest {\n /** Resource to create. */\n resource: Resource;\n}\n\nexport interface CreateResourceResponse {\n /** Created resource. */\n resource?: Resource;\n}\n\nexport interface BulkCreateResourcesRequest {\n /**\n * Resources to create.\n * @maxSize 50\n */\n resources: Resource[];\n /**\n * Whether to include the created resources in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateResourcesResponse {\n /** The result of each resource creation. */\n results?: BulkResourceResult[];\n /** Create statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkResourceResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** The resulting resource after the bulk operation. */\n item?: Resource;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface GetResourceRequest {\n /**\n * ID of the resource to retrieve.\n * @format GUID\n */\n resourceId: string;\n}\n\nexport interface GetResourceResponse {\n /** Retrieved resource. */\n resource?: Resource;\n}\n\nexport interface GetDeletedResourceRequest {\n /**\n * ID of the deleted resource to retrieve from the trash bin.\n * @format GUID\n */\n resourceId?: string;\n}\n\nexport interface GetDeletedResourceResponse {\n /** Retrieved resource. */\n resource?: Resource;\n}\n\nexport interface ListDeletedResourcesRequest {\n /**\n * IDs of the resources to retrieve.\n * @format GUID\n * @maxSize 100\n */\n resourceIds?: string[];\n /** Paging details, allowing you specify a limit and a cursor. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListDeletedResourcesResponse {\n /** Retrieved resources. */\n resources?: Resource[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface RemoveResourceFromTrashBinRequest {\n /**\n * ID of the resource to permanently delete from the trash bin.\n * @format GUID\n */\n resourceId?: string;\n}\n\nexport interface RemoveResourceFromTrashBinResponse {}\n\nexport interface RestoreResourceFromTrashBinRequest {\n /**\n * ID of the resource to restore from the trash bin.\n * @format GUID\n */\n resourceId?: string;\n}\n\nexport interface RestoreResourceFromTrashBinResponse {\n /** Restored resource. */\n resource?: Resource;\n}\n\nexport interface UpdateResourceRequest {\n /** Resource to update. */\n resource: Resource;\n}\n\nexport interface UpdateResourceResponse {\n /** Updated resource. */\n resource?: Resource;\n}\n\nexport interface BulkUpdateResourcesRequest {\n /**\n * Resources to update.\n * @minSize 1\n * @maxSize 100\n */\n resources: MaskedResource[];\n /**\n * Whether to include the updated resources in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedResource {\n /** Resource to update. */\n resource?: Resource;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateResourcesResponse {\n /** The result of each resource update. */\n results?: BulkResourceResult[];\n /** Update statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface DeleteResourceRequest {\n /**\n * ID of the resource to delete.\n * @format GUID\n */\n resourceId: string;\n}\n\nexport interface DeleteResourceResponse {}\n\nexport interface BulkDeleteResourcesRequest {\n /**\n * IDs of the resources to delete.\n * @format GUID\n * @maxSize 50\n */\n ids: string[];\n}\n\nexport interface BulkDeleteResourcesResponse {\n /** The result of each resource removal. */\n results?: BulkResourceResult[];\n /** Delete statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface SearchResourcesRequest {\n /**\n * Search condition. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\n search?: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor pointing to page of results.\n * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.\n */\n cursorPaging?: CursorPaging;\n /** 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) */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * 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.\n * @maxSize 10\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome\n *\n * Affects all filters and aggregations returned values.\n * You may override this behavior in a specific filter by providing\n * timestamps including time zone. e.g. `\"2023-12-20T10:52:34.795Z\"`\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor pointing to page of results.\n * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** Value aggregation */\n value?: ValueAggregation;\n /** Range aggregation */\n range?: RangeAggregation;\n /** Scalar aggregation */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation */\n nested?: NestedAggregation;\n /**\n * User-defined name of aggregation, should be unique, will appear in aggregation results\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dot notation to specify json path\n * @maxLength 200\n */\n fieldPath?: string;\n /**\n * deprecated, use `nested` instead\n * @deprecated deprecated, use `nested` instead\n * @replacedBy kind.nested\n * @targetRemovalDate 2024-03-30\n */\n groupBy?: GroupByAggregation;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** Value aggregation */\n value?: ValueAggregation;\n /** Range aggregation */\n range?: RangeAggregation;\n /** Scalar aggregation */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if to is not given */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if from is not given */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Should sort by number of matches */\n COUNT = 'COUNT',\n /** Should sort by value of the field alphabetically */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Should sort in descending order */\n DESC = 'DESC',\n /** Should sort in ascending order */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Should missing values be excluded from the aggregation results */\n EXCLUDE = 'EXCLUDE',\n /** Should missing values be included in the aggregation results */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ...\n * @maxLength 20\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n /** Count of distinct values */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value */\n MIN = 'MIN',\n /** Maximum value */\n MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'UNKNOWN_SCALAR_TYPE'\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values */\n includeOptions?: IncludeMissingValuesOptions;\n /** Should sort by number of matches or value of the field */\n sortType?: SortTypeWithLiterals;\n /** Should sort in ascending or descending order */\n sortDirection?: SortDirectionWithLiterals;\n /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */\n limit?: number | null;\n /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport enum NestedAggregationType {\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - e.g. min, max, sum, avg */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface RangeAggregation {\n /**\n * 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\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Define the operator for the scalar aggregation */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for date histogram aggregation */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n UNKNOWN_INTERVAL = 'UNKNOWN_INTERVAL',\n /** Yearly interval */\n YEAR = 'YEAR',\n /** Monthly interval */\n MONTH = 'MONTH',\n /** Weekly interval */\n WEEK = 'WEEK',\n /** Daily interval */\n DAY = 'DAY',\n /** Hourly interval */\n HOUR = 'HOUR',\n /** Minute interval */\n MINUTE = 'MINUTE',\n /** Second interval */\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'UNKNOWN_INTERVAL'\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** Value aggregation */\n value?: ValueAggregation;\n /** Range aggregation */\n range?: RangeAggregation;\n /** Scalar aggregation */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation */\n dateHistogram?: DateHistogramAggregation;\n /**\n * User-defined name of aggregation, should be unique, will appear in aggregation results\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dont notation to specify json path\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** Value aggregation */\n value?: ValueAggregation;\n /** Range aggregation */\n range?: RangeAggregation;\n /** Scalar aggregation */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - e.g. min, max, sum, avg */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within previous one */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\n/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each next aggregation is nested within previous one\n * @minSize 2\n * @maxSize 3\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface GroupByAggregation extends GroupByAggregationKindOneOf {\n /** Value aggregation configuration */\n value?: ValueAggregation;\n /**\n * User-defined name of aggregation, should be unique, will appear in aggregation results\n * @maxLength 100\n */\n name?: string | null;\n /**\n * Field to aggregate by\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface GroupByAggregationKindOneOf {\n /** Value aggregation configuration */\n value?: ValueAggregation;\n}\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present */\n OR = 'OR',\n /** All search terms must be present */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface SearchResourcesResponse {\n /** Retrieved resources. */\n resources?: Resource[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation results. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * key = aggregation name (as derived from search request)\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range */\n from?: number | null;\n /** Exclusive upper bound of the range */\n to?: number | null;\n /** Count of entities in this range */\n count?: number;\n}\n\nexport interface NestedAggregationResults\n extends NestedAggregationResultsResultOneOf {\n /** Value aggregation results */\n values?: ValueResults;\n /** Range aggregation results */\n ranges?: RangeResults;\n /** Scalar aggregation results */\n scalar?: AggregationResultsScalarResult;\n /**\n * User-defined name of aggregation, matches the one provided in request\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that matches result */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, matches the one provided in request\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationResultsResultOneOf {\n /** Value aggregation results */\n values?: ValueResults;\n /** Range aggregation results */\n ranges?: RangeResults;\n /** Scalar aggregation results */\n scalar?: AggregationResultsScalarResult;\n}\n\nexport interface ValueResults {\n /**\n * List of value aggregations\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation */\n value?: number;\n}\n\nexport interface NestedValueAggregationResult {\n /**\n * Value of the field\n * @maxLength 1000\n */\n value?: string;\n /** Nested aggregations */\n nestedResults?: NestedAggregationResults;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range */\n from?: number | null;\n /** Exclusive upper bound of the range */\n to?: number | null;\n /** Count of entities in this range */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result */\n value?: ValueResult;\n /** Range aggregation result */\n range?: RangeResult;\n /** Scalar aggregation result */\n scalar?: ScalarResult;\n /** Date histogram aggregation result */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result */\n value?: ValueResult;\n /** Range aggregation result */\n range?: RangeResult;\n /** Scalar aggregation result */\n scalar?: ScalarResult;\n /** Date histogram aggregation result */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** List of nested aggregations */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket */\n count?: number;\n}\n\nexport interface GroupByValueResults {\n /**\n * List of value aggregations\n * @maxSize 1000\n */\n results?: NestedValueAggregationResult[];\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form\n * aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregations\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results */\n values?: ValueResults;\n /** Range aggregation results */\n ranges?: RangeResults;\n /** Scalar aggregation results */\n scalar?: AggregationResultsScalarResult;\n /** Group by value aggregation results */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results */\n nested?: NestedResults;\n /**\n * User-defined name of aggregation as derived from search request\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that must match provided kind as derived from search request */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by as derived from search request\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results */\n values?: ValueResults;\n /** Range aggregation results */\n ranges?: RangeResults;\n /** Scalar aggregation results */\n scalar?: AggregationResultsScalarResult;\n /** Group by value aggregation results */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results */\n nested?: NestedResults;\n}\n\nexport interface QueryResourcesRequest {\n /**\n * Query for retrieving resources. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters.\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface QueryResourcesResponse {\n /** Retrieved resources. */\n resources?: Resource[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CountResourcesRequest {\n /**\n * Filter to base the count on. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters.\n */\n filter?: Record<string, any> | null;\n /**\n * Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.\n * @deprecated Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.\n * @targetRemovalDate 2024-05-01\n */\n search?: SearchDetails;\n}\n\nexport interface CountResourcesResponse {\n /** Total number of resources matching the filter. */\n count?: number;\n}\n\nexport interface FixResourceSchedulesRequest {\n /**\n * ID of the resource to fix schedules for.\n * @format GUID\n */\n resourceId?: string;\n /** Working hour schedule that must be set for this resource. */\n workingHoursSchedule?: Schedule;\n}\n\nexport interface FixResourceSchedulesResponse {\n /** Updated resource. */\n resource?: Resource;\n}\n\nexport interface ReindexTenantRequest {}\n\nexport interface ReindexTenantResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface ResourceCreatedEnvelope {\n entity: Resource;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a resource is created.\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.RESOURCE_READ\n * @webhook\n * @eventType wix.bookings.resources.v2.resource_created\n * @serviceIdentifier wix.bookings.resources.v2.ResourcesService\n * @slug created\n */\nexport declare function onResourceCreated(\n handler: (event: ResourceCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ResourceDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a resource is deleted.\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.RESOURCE_READ\n * @webhook\n * @eventType wix.bookings.resources.v2.resource_deleted\n * @serviceIdentifier wix.bookings.resources.v2.ResourcesService\n * @slug deleted\n */\nexport declare function onResourceDeleted(\n handler: (event: ResourceDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ResourceUpdatedEnvelope {\n entity: Resource;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an resource is updated.\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId BOOKINGS.RESOURCE_READ\n * @webhook\n * @eventType wix.bookings.resources.v2.resource_updated\n * @slug updated\n */\nexport declare function onResourceUpdated(\n handler: (event: ResourceUpdatedEnvelope) => void | Promise<void>\n): void;\n\ntype ResourceNonNullablePaths =\n | `workingHoursSchedules.values`\n | `locationOptions.specificLocationOptions.businessLocations`;\n\n/**\n * Creates a new resource.\n *\n *\n * ## Connected schedules\n *\n * A new event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))\n * is automatically created for the resource.\n *\n * ## Locations\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `locationOptions.availableInAllLocations` to `true`.\n *\n * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,\n * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`\n * as `true`. Currently, you can specify only a single business location.\n * @param resource - Resource to create.\n * @public\n * @requiredField resource\n * @requiredField resource.name\n * @permissionId BOOKINGS.RESOURCE_CREATE\n * @applicableIdentity APP\n * @returns Created resource.\n * @fqn wix.bookings.resources.v2.ResourcesService.CreateResource\n */\nexport async function createResource(\n resource: NonNullablePaths<Resource, `name`>\n): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ resource: resource });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.createResource(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { resource: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['resource']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates up to 50 resources.\n *\n *\n * Refer to *Create Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))\n * for more details.\n * @param resources - Resources to create.\n * @public\n * @requiredField resources\n * @requiredField resources.name\n * @permissionId BOOKINGS.RESOURCE_CREATE\n * @applicableIdentity APP\n * @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources\n */\nexport async function bulkCreateResources(\n resources: NonNullablePaths<Resource, `name`>[],\n options?: BulkCreateResourcesOptions\n): Promise<\n NonNullablePaths<\n BulkCreateResourcesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | {\n [P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;\n }[ResourceNonNullablePaths]\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resources: resources,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.bulkCreateResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n resources: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['resources', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateResourcesOptions {\n /**\n * Whether to include the created resources in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a resource.\n * @param resourceId - ID of the resource to retrieve.\n * @public\n * @requiredField resourceId\n * @permissionId BOOKINGS.RESOURCE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Retrieved resource.\n * @fqn wix.bookings.resources.v2.ResourcesService.GetResource\n */\nexport async function getResource(\n resourceId: string\n): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceId: resourceId,\n });\n\n const reqOpts = ambassadorWixBookingsResourcesV2Resource.getResource(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { resourceId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['resourceId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a resource.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param _id - Resource ID.\n * @public\n * @requiredField _id\n * @requiredField resource\n * @requiredField resource.revision\n * @permissionId BOOKINGS.RESOURCE_UPDATE\n * @applicableIdentity APP\n * @returns Updated resource.\n * @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource\n */\nexport async function updateResource(\n _id: string,\n resource: NonNullablePaths<UpdateResource, `revision`>\n): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resource: { ...resource, id: _id },\n });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.updateResource(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.resource!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { resource: '$[1]' },\n explicitPathsToArguments: { 'resource.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'resource']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateResource {\n /**\n * Resource ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the resource is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the resource.\n * @readonly\n */\n revision?: string | null;\n /**\n * Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Name of the resource.\n * @maxLength 40\n * @minLength 1\n */\n name?: string | null;\n /**\n * ID of the *resource type*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).\n *\n * Once a type has been set it can't be modified. You can create a resource\n * without specifying a type. However, customers can't book such resources.\n * @format GUID\n * @immutable\n */\n typeId?: string | null;\n /**\n * Information about the *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))\n * specifying the working hours and locations of the resource.\n *\n * Resources without a working hour schedule are available 24/7 at the locations\n * specified in the field `locationOptions`.\n * When both `workingHoursSchedules` and `locationOptions` are set,\n * `workingHoursSchedules` takes precedence.\n */\n workingHoursSchedules?: WorkingHoursSchedules;\n /** Information about the location where the resource is available. */\n locationOptions?: LocationOptions;\n /**\n * Schedule containing the *events*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))\n * for which the resource has been booked.\n * @readonly\n */\n eventsSchedule?: EventsSchedule;\n /** Extensions enabling users to save custom data related to the resource. */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Updates multiple resources.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param resources - Resources to update.\n * @public\n * @documentationMaturity preview\n * @requiredField resources\n * @requiredField resources.resource._id\n * @requiredField resources.resource.revision\n * @permissionId BOOKINGS.RESOURCE_UPDATE\n * @applicableIdentity APP\n * @fqn wix.bookings.resources.v2.ResourcesService.BulkUpdateResources\n */\nexport async function bulkUpdateResources(\n resources: NonNullablePaths<\n MaskedResource,\n `resource._id` | `resource.revision`\n >[],\n options?: BulkUpdateResourcesOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateResourcesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | {\n [P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;\n }[ResourceNonNullablePaths]\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resources: resources,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.bulkUpdateResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n resources: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['resources', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateResourcesOptions {\n /**\n * Whether to include the updated resources in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes a resource.\n *\n *\n * Deleting a resource cancels its event schedule and all its working hour\n * schedules that aren't shared with another resource. Learn more about\n * _how Bookings uses the Calendar APIs_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).\n * @param resourceId - ID of the resource to delete.\n * @public\n * @requiredField resourceId\n * @permissionId BOOKINGS.RESOURCE_DELETE\n * @applicableIdentity APP\n * @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource\n */\nexport async function deleteResource(resourceId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceId: resourceId,\n });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.deleteResource(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { resourceId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['resourceId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes multiple resources.\n *\n *\n * Refer to *Delete Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))\n * for more details.\n * @param ids - IDs of the resources to delete.\n * @public\n * @requiredField ids\n * @permissionId BOOKINGS.RESOURCE_DELETE\n * @applicableIdentity APP\n * @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources\n */\nexport async function bulkDeleteResources(\n ids: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteResourcesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | {\n [P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;\n }[ResourceNonNullablePaths]\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.bulkDeleteResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of resources matching the provided search criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n * @param search - Search condition. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n * @public\n * @requiredField search\n * @permissionId BOOKINGS.RESOURCE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources\n */\nexport async function searchResources(\n search: ResourceSearch\n): Promise<\n NonNullablePaths<\n SearchResourcesResponse,\n | {\n [P in ResourceNonNullablePaths]: `resources.${number}.${P}`;\n }[ResourceNonNullablePaths]\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.searchResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { search: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['search']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ResourceSearchSpec extends SearchSpec {\n aggregatable: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'appId',\n 'managementType',\n 'singleResource.locationOptions.availableInAllLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',\n 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId',\n 'type'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$hasAll', '$hasSome'];\n fields: [\n 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n ];\n sort: 'BOTH';\n },\n {\n operators: '*';\n fields: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'appId',\n 'managementType',\n 'name',\n 'singleResource.locationOptions.availableInAllLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',\n 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',\n 'type'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Resource,\n ResourceSearchSpec\n>;\nexport type ResourceSearch = {\n /** \n Cursor pointing to page of results.\n When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n 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) \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}] \n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n 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. \n @maxSize: 10 \n */\n aggregations?: {\n /** \n Value aggregation \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n Range aggregation \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n Scalar aggregation \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n Date histogram aggregation \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n Nested aggregation \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n /** \n User-defined name of aggregation, should be unique, will appear in aggregation results \n @maxLength: 100 \n */\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n /** \n Type of aggregation, client must provide matching aggregation field below \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Field to aggregate by, use dot notation to specify json path \n @maxLength: 200 \n */\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n /** \n deprecated, use `nested` instead \n @deprecated: deprecated, use `nested` instead,\n @replacedBy: kind.nested,\n @targetRemovalDate: 2024-03-30 \n */\n groupBy?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['groupBy'];\n }[];\n /** \n Free text to match in searchable fields \n */\n search?: {\n /** \n Defines how separate search terms in `expression` are combined \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path \n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome\n\n Affects all filters and aggregations returned values.\n You may override this behavior in a specific filter by providing\n timestamps including time zone. e.g. `\"2023-12-20T10:52:34.795Z\"` \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Creates a query to retrieve a list of resources.\n *\n * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.\n *\n * 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.\n *\n * 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.\n *\n * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * 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(\"name\")`, the results are sorted first by the `\"typeId\"`, and then, if there are multiple results with the same `\"typeId\"`, the items are sorted by `\"name\"`.\n *\n * 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`.\n * @public\n * @permissionId BOOKINGS.RESOURCE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.bookings.resources.v2.ResourcesService.QueryResources\n */\nexport function queryResources(): ResourcesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Resource,\n 'CURSOR',\n QueryResourcesRequest,\n QueryResourcesResponse\n >({\n func: async (payload: QueryResourcesRequest) => {\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.queryResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryResourcesRequest['query']) => {\n const args = [query, {}] as [QueryResourcesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryResourcesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.resources,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ResourcesQueryResult extends QueryCursorResult {\n items: Resource[];\n query: ResourcesQueryBuilder;\n next: () => Promise<ResourcesQueryResult>;\n prev: () => Promise<ResourcesQueryResult>;\n}\n\nexport interface ResourcesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | 'name'\n | 'typeId'\n | 'eventsSchedule.scheduleId',\n value: string\n ) => ResourcesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId',\n value: any[]\n ) => ResourcesQueryBuilder;\n in: (\n propertyName:\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId',\n value: any\n ) => ResourcesQueryBuilder;\n exists: (\n propertyName:\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'name'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId',\n value: boolean\n ) => ResourcesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'type'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId'\n | 'appId'\n | 'managementType'\n >\n ) => ResourcesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | 'singleResource.locationOptions.availableInAllLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations'\n | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations'\n | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'type'\n | 'typeId'\n | 'locationOptions.availableInAllLocations'\n | 'eventsSchedule.scheduleId'\n | 'appId'\n | 'managementType'\n >\n ) => ResourcesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ResourcesQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ResourcesQueryBuilder;\n find: () => Promise<ResourcesQueryResult>;\n}\n\n/**\n * Counts resources according to given criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n * @public\n * @param options - Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options.\n * @permissionId BOOKINGS.RESOURCE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.bookings.resources.v2.ResourcesService.CountResources\n */\nexport async function countResources(\n options?: CountResourcesOptions\n): Promise<NonNullablePaths<CountResourcesResponse, `count`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n search: options?.search,\n });\n\n const reqOpts =\n ambassadorWixBookingsResourcesV2Resource.countResources(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n search: '$[0].search',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountResourcesOptions {\n /**\n * Filter to base the count on. Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters.\n */\n filter?: Record<string, any> | null;\n /**\n * Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.\n * @deprecated Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.\n * @targetRemovalDate 2024-05-01\n */\n search?: SearchDetails;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsResourcesV2ResourcesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/_api/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/resources-2',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v2/resources',\n destPath: '/v2/resources',\n },\n {\n srcPath: '/bookings/v2/bulk/resources',\n destPath: '/v2/bulk/resources',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/resources-2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_resources';\n\n/**\n * Creates a new resource.\n *\n *\n * ## Connected schedules\n *\n * A new event *schedule*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))\n * is automatically created for the resource.\n *\n * ## Locations\n *\n * If you don't specify `locationOptions`, Wix Bookings automatically sets\n * `locationOptions.availableInAllLocations` to `true`.\n *\n * If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,\n * you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`\n * as `true`. Currently, you can specify only a single business location.\n */\nexport function createResource(payload: object): RequestOptionsFactory<any> {\n function __createResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CreateResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createResource;\n}\n\n/**\n * Creates up to 50 resources.\n *\n *\n * Refer to *Create Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))\n * for more details.\n */\nexport function bulkCreateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkCreateResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateResources;\n}\n\n/** Retrieves a resource. */\nexport function getResource(payload: object): RequestOptionsFactory<any> {\n function __getResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.GetResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getResource;\n}\n\n/**\n * Updates a resource.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n */\nexport function updateResource(payload: object): RequestOptionsFactory<any> {\n function __updateResource({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.UpdateResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resource.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resource.createdDate' },\n { path: 'resource.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateResource;\n}\n\n/**\n * Updates multiple resources.\n *\n *\n * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n */\nexport function bulkUpdateResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'resources.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'resources.resource.createdDate' },\n { path: 'resources.resource.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkUpdateResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateResources;\n}\n\n/**\n * Deletes a resource.\n *\n *\n * Deleting a resource cancels its event schedule and all its working hour\n * schedules that aren't shared with another resource. Learn more about\n * _how Bookings uses the Calendar APIs_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).\n */\nexport function deleteResource(payload: object): RequestOptionsFactory<any> {\n function __deleteResource({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.DeleteResource',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/{resourceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteResource;\n}\n\n/**\n * Deletes multiple resources.\n *\n *\n * Refer to *Delete Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))\n * for more details.\n */\nexport function bulkDeleteResources(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.resources.v2.ResourcesService.BulkDeleteResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/bulk/resources/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteResources;\n}\n\n/**\n * Retrieves a list of resources matching the provided search criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\nexport function searchResources(payload: object): RequestOptionsFactory<any> {\n function __searchResources({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.SearchResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchResources;\n}\n\n/**\n * Creates a query to retrieve a list of resources.\n *\n * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.\n *\n * 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.\n *\n * 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.\n *\n * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * 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(\"name\")`, the results are sorted first by the `\"typeId\"`, and then, if there are multiple results with the same `\"typeId\"`, the items are sorted by `\"name\"`.\n *\n * 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`.\n */\nexport function queryResources(payload: object): RequestOptionsFactory<any> {\n function __queryResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.QueryResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'resources.createdDate' },\n { path: 'resources.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryResources;\n}\n\n/**\n * Counts resources according to given criteria.\n *\n *\n * Refer to the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n */\nexport function countResources(payload: object): RequestOptionsFactory<any> {\n function __countResources({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.resources.v2.resource',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.resources.v2.ResourcesService.CountResources',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsResourcesV2ResourcesServiceUrl({\n protoPath: '/v2/resources/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countResources;\n}\n","import {\n createResource as publicCreateResource,\n bulkCreateResources as publicBulkCreateResources,\n getResource as publicGetResource,\n updateResource as publicUpdateResource,\n bulkUpdateResources as publicBulkUpdateResources,\n deleteResource as publicDeleteResource,\n bulkDeleteResources as publicBulkDeleteResources,\n searchResources as publicSearchResources,\n queryResources as publicQueryResources,\n countResources as publicCountResources,\n} from './bookings-resources-v2-resource-resources.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onResourceCreated as publicOnResourceCreated } from './bookings-resources-v2-resource-resources.public.js';\nimport { onResourceDeleted as publicOnResourceDeleted } from './bookings-resources-v2-resource-resources.public.js';\nimport { onResourceUpdated as publicOnResourceUpdated } from './bookings-resources-v2-resource-resources.public.js';\n\nexport const createResource: MaybeContext<\n BuildRESTFunction<typeof publicCreateResource> & typeof publicCreateResource\n> = /*#__PURE__*/ createRESTModule(publicCreateResource);\nexport const bulkCreateResources: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateResources> &\n typeof publicBulkCreateResources\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateResources);\nexport const getResource: MaybeContext<\n BuildRESTFunction<typeof publicGetResource> & typeof publicGetResource\n> = /*#__PURE__*/ createRESTModule(publicGetResource);\nexport const updateResource: MaybeContext<\n BuildRESTFunction<typeof publicUpdateResource> & typeof publicUpdateResource\n> = /*#__PURE__*/ createRESTModule(publicUpdateResource);\nexport const bulkUpdateResources: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateResources> &\n typeof publicBulkUpdateResources\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateResources);\nexport const deleteResource: MaybeContext<\n BuildRESTFunction<typeof publicDeleteResource> & typeof publicDeleteResource\n> = /*#__PURE__*/ createRESTModule(publicDeleteResource);\nexport const bulkDeleteResources: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteResources> &\n typeof publicBulkDeleteResources\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteResources);\nexport const searchResources: MaybeContext<\n BuildRESTFunction<typeof publicSearchResources> & typeof publicSearchResources\n> = /*#__PURE__*/ createRESTModule(publicSearchResources);\nexport const queryResources: MaybeContext<\n BuildRESTFunction<typeof publicQueryResources> & typeof publicQueryResources\n> = /*#__PURE__*/ createRESTModule(publicQueryResources);\nexport const countResources: MaybeContext<\n BuildRESTFunction<typeof publicCountResources> & typeof publicCountResources\n> = /*#__PURE__*/ createRESTModule(publicCountResources);\n/**\n * Triggered when a resource is created.\n */\nexport const onResourceCreated: BuildEventDefinition<\n typeof publicOnResourceCreated\n> = createEventModule(publicOnResourceCreated);\n/**\n * Triggered when a resource is deleted.\n */\nexport const onResourceDeleted: BuildEventDefinition<\n typeof publicOnResourceDeleted\n> = createEventModule(publicOnResourceDeleted);\n/**\n * Triggered when an resource is updated.\n */\nexport const onResourceUpdated: BuildEventDefinition<\n typeof publicOnResourceUpdated\n> = createEventModule(publicOnResourceUpdated);\n\nexport {\n ManagementType,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n Mode,\n WebhookIdentityType,\n} from './bookings-resources-v2-resource-resources.universal.js';\nexport {\n Resource,\n ResourceCompositionDetailsOneOf,\n WorkingHoursSchedule,\n SingleResource,\n V2WorkingHoursSchedules,\n Schedule,\n LocationOptions,\n SpecificLocation,\n BusinessLocation,\n WorkingHoursSchedules,\n EventsSchedule,\n ExtendedFields,\n CreateResourceRequest,\n CreateResourceResponse,\n BulkCreateResourcesRequest,\n BulkCreateResourcesResponse,\n BulkResourceResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n GetResourceRequest,\n GetResourceResponse,\n GetDeletedResourceRequest,\n GetDeletedResourceResponse,\n ListDeletedResourcesRequest,\n CursorPaging,\n ListDeletedResourcesResponse,\n CursorPagingMetadata,\n Cursors,\n RemoveResourceFromTrashBinRequest,\n RemoveResourceFromTrashBinResponse,\n RestoreResourceFromTrashBinRequest,\n RestoreResourceFromTrashBinResponse,\n UpdateResourceRequest,\n UpdateResourceResponse,\n BulkUpdateResourcesRequest,\n MaskedResource,\n BulkUpdateResourcesResponse,\n DeleteResourceRequest,\n DeleteResourceResponse,\n BulkDeleteResourcesRequest,\n BulkDeleteResourcesResponse,\n SearchResourcesRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Sorting,\n Aggregation,\n AggregationKindOneOf,\n RangeBucket,\n IncludeMissingValuesOptions,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n RangeAggregation,\n ScalarAggregation,\n DateHistogramAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregation,\n GroupByAggregation,\n GroupByAggregationKindOneOf,\n SearchDetails,\n SearchResourcesResponse,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n NestedValueAggregationResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n GroupByValueResults,\n DateHistogramResults,\n NestedResults,\n AggregationResults,\n AggregationResultsResultOneOf,\n QueryResourcesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n QueryResourcesResponse,\n CountResourcesRequest,\n CountResourcesResponse,\n FixResourceSchedulesRequest,\n FixResourceSchedulesResponse,\n ReindexTenantRequest,\n ReindexTenantResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ResourceCreatedEnvelope,\n ResourceDeletedEnvelope,\n ResourceUpdatedEnvelope,\n BulkCreateResourcesOptions,\n UpdateResource,\n BulkUpdateResourcesOptions,\n ResourceSearchSpec,\n ResourcesQueryResult,\n ResourcesQueryBuilder,\n CountResourcesOptions,\n} from './bookings-resources-v2-resource-resources.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7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;AACrD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAIhD,IAAMC,yBAET,mDAAkB,iBAAuB;AAItC,IAAMC,yBAET,mDAAkB,iBAAuB;AAItC,IAAMC,yBAET,mDAAkB,iBAAuB;","names":["bulkCreateResources","bulkDeleteResources","bulkUpdateResources","countResources","createResource","deleteResource","getResource","onResourceCreated","onResourceDeleted","onResourceUpdated","queryResources","searchResources","updateResource","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","ManagementType","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","WebhookIdentityType","createResource","sdkTransformError","bulkCreateResources","getResource","updateResource","bulkUpdateResources","deleteResource","bulkDeleteResources","searchResources","queryResources","countResources","createResource","bulkCreateResources","getResource","updateResource","bulkUpdateResources","deleteResource","bulkDeleteResources","searchResources","queryResources","countResources","import_rest_modules","createResource","bulkCreateResources","getResource","updateResource","bulkUpdateResources","deleteResource","bulkDeleteResources","searchResources","queryResources","countResources","onResourceCreated","onResourceDeleted","onResourceUpdated"]}