@wix/vibe-bookings-plugin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/adm-zip/util/constants.js","../../../../node_modules/adm-zip/util/errors.js","../../../../node_modules/adm-zip/util/utils.js","../../../../node_modules/adm-zip/util/fattr.js","../../../../node_modules/adm-zip/util/decoder.js","../../../../node_modules/adm-zip/util/index.js","../../../../node_modules/adm-zip/headers/entryHeader.js","../../../../node_modules/adm-zip/headers/mainHeader.js","../../../../node_modules/adm-zip/headers/index.js","../../../../node_modules/adm-zip/methods/deflater.js","../../../../node_modules/adm-zip/methods/inflater.js","../../../../node_modules/adm-zip/methods/zipcrypto.js","../../../../node_modules/adm-zip/methods/index.js","../../../../node_modules/adm-zip/zipEntry.js","../../../../node_modules/adm-zip/zipFile.js","../../../../node_modules/adm-zip/adm-zip.js","../src/utils.ts","../../../../node_modules/dedent/dist/dedent.mjs","../src/constants.ts","../../../../node_modules/@wix/sdk-runtime/build/constants.js","../../../../node_modules/@wix/sdk-runtime/build/utils.js","../../../../node_modules/@wix/sdk-runtime/build/transform-error.js","../../../../node_modules/@wix/sdk-runtime/build/rename-all-nested-keys.js","../../../../node_modules/@wix/sdk-types/build/index.mjs","../../../../node_modules/@wix/sdk-context/build/index.mjs","../../../../node_modules/@wix/sdk-runtime/build/context.js","../../../../node_modules/@wix/sdk-runtime/build/context-v2.js","../../../../node_modules/@wix/sdk-runtime/build/rest-modules.js","../../../../node_modules/@wix/sdk-runtime/build/transformations/timestamp.js","../../../../node_modules/@wix/sdk-runtime/build/transformations/transform-paths.js","../../../../node_modules/@wix/sdk-runtime/build/transformations/field-mask.js","../../../../node_modules/@wix/sdk-runtime/build/query-filter.js","../../../../node_modules/@wix/sdk-runtime/build/query-iterators.js","../../../../node_modules/@wix/sdk-runtime/build/query-builder.js","../../../../node_modules/@wix/sdk-runtime/build/event-definition-modules.js","../../../../node_modules/@wix/auto_sdk_bookings_service-options-and-variants/src/bookings-catalog-v1-service-options-and-variants-service-options-and-variants.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_service-options-and-variants/src/bookings-catalog-v1-service-options-and-variants-service-options-and-variants.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_categories-v-2/src/bookings-categories-v2-category-categories-v-2.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_categories-v-2/src/bookings-categories-v2-category-categories-v-2.context.ts","../../../../node_modules/@wix/sdk-runtime/build/transformations/float.js","../../../../node_modules/@wix/auto_sdk_bookings_resources/src/bookings-resources-v2-resource-resources.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_resources/src/bookings-resources-v2-resource-resources.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_resource-types/src/bookings-resources-v2-resource-type-resource-types.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_resource-types/src/bookings-resources-v2-resource-type-resource-types.context.ts","../../../../node_modules/@wix/sdk-runtime/build/transformations/address.js","../../../../node_modules/@wix/sdk-runtime/build/transformations/image.js","../../../../node_modules/@wix/sdk-runtime/build/transformations/page-url-v2.js","../../../../node_modules/@wix/auto_sdk_bookings_services/src/bookings-services-v2-service-services.http.ts","../../../../node_modules/@wix/auto_sdk_bookings_services/src/bookings-services-v2-service-services.universal.ts","../../../../node_modules/@wix/auto_sdk_bookings_services/src/bookings-services-v2-service-services.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_services/src/bookings-services-v2-service-services.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_staff-members/src/bookings-staff-v1-staff-member-staff-members.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_staff-members/src/bookings-staff-v1-staff-member-staff-members.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_booking-policies/src/bookings-v1-booking-policy-booking-policies.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_booking-policies/src/bookings-v1-booking-policy-booking-policies.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_categories/src/bookings-v1-category-categories.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_categories/src/bookings-v1-category-categories.context.ts","../../../../node_modules/@wix/auto_sdk_bookings_bookings/src/bookings-v2-booking-bookings.public.ts","../../../../node_modules/@wix/auto_sdk_bookings_bookings/src/bookings-v2-booking-bookings.context.ts","../../../../node_modules/@wix/sdk/build/ambassador-modules.js","../../../../node_modules/@wix/sdk/build/common.js","../../../../node_modules/@wix/sdk/build/fetch-error.js","../../../../node_modules/@wix/sdk/build/helpers.js","../../../../node_modules/@wix/sdk/build/host-modules.js","../../../../node_modules/@wix/sdk/build/bi/biHeaderGenerator.js","../../../../node_modules/@wix/sdk/build/rest-modules.js","../../../../node_modules/@wix/sdk/build/nanoevents.js","../../../../node_modules/@wix/sdk/build/event-handlers-modules.js","../../../../node_modules/@wix/sdk/build/service-plugin-modules.js","../../../../node_modules/@wix/sdk/build/wixClient.js","../src/wix-bookings-api.ts","../src/bookings-instructions.ts","../src/index.ts"],"names":["mkdirSync","path","err","fd","fs","join","localPath","options","content","fileAttr","dedent","isObject","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","payload","ServiceType","RateType","AddOnPaymentOptions","LocationType","RankingOrder","SortingMethodType","WebhookIdentityType","V2RequestedFields","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","RequestedFields","Action","InvalidSlugError","CloneErrors","Status","CategoryNotificationEvent","BenefitType","Event","CrudType","PlacementType","DayOfWeek","ResolutionMethod","createAddOnGroup","deleteAddOnGroup","updateAddOnGroup","listAddOnGroupsByServiceId","setAddOnsForGroup","createService","bulkCreateServices","getService","updateService","bulkUpdateServices","bulkUpdateServicesByFilter","deleteService","bulkDeleteServices","bulkDeleteServicesByFilter","queryServices","searchServices","queryPolicies","queryBookingForms","countServices","queryLocations","queryCategories","setServiceLocations","enablePricingPlansForService","disablePricingPlansForService","setCustomSlug","validateSlug","cloneService","transformRESTImageToSDKImage","transformRESTAddressToSDKAddress","transformRESTPageURLV2ToSDKPageURLV2","onServiceCreated","onServiceDeleted","onServiceUpdated","transformRESTFloatToSDKFloat","errorBuilder","https","AdmZip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,iBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,iDAAA,CAAA,OAAA,EAAA,MAAA,EAAA;AAAA,IAAA,MAAA,CAAO,OAAA,GAAU;AAAA;AAAA,MAEb,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,QAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA;AAAA,MAGnB,MAAA,EAAmB,SAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA;AAAA,MAGnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,QAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,CAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,EAAmB,EAAA;AAAA;AAAA,MACnB,MAAA,E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a,CAAA,6CAAA,CAAA,EAAiD;AAAA,IAC5E,QAAQ,MAAA,CAAO,MAAA;AAAA,IACf,sBAAsB,MAAA,CAAO,oBAAA;AAAA,IAC7B;AAAA,GACD,CAAA;AAED,EAAA,OAAO,kBAAA;AACT,CAAA;AAGO,IAAM,kBAAA,GAAmC;AAAA,EAC9C,OAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF;AAEA,IAAO,aAAA,GAAQ","file":"index.cjs","sourcesContent":["module.exports = {\n /* The local file header */\n LOCHDR : 30, // LOC header size\n LOCSIG : 0x04034b50, // \"PK\\003\\004\"\n LOCVER : 4,\t// version needed to extract\n LOCFLG : 6, // general purpose bit flag\n LOCHOW : 8, // compression method\n LOCTIM : 10, // modification time (2 bytes time, 2 bytes date)\n LOCCRC : 14, // uncompressed file crc-32 value\n LOCSIZ : 18, // compressed size\n LOCLEN : 22, // uncompressed size\n LOCNAM : 26, // filename length\n LOCEXT : 28, // extra field length\n\n /* The Data descriptor */\n EXTSIG : 0x08074b50, // \"PK\\007\\008\"\n EXTHDR : 16, // EXT header size\n EXTCRC : 4, // uncompressed file crc-32 value\n EXTSIZ : 8, // compressed size\n EXTLEN : 12, // uncompressed size\n\n /* The central directory file header */\n CENHDR : 46, // CEN header size\n CENSIG : 0x02014b50, // \"PK\\001\\002\"\n CENVEM : 4, // version made by\n CENVER : 6, // version needed to extract\n CENFLG : 8, // encrypt, decrypt flags\n CENHOW : 10, // compression method\n CENTIM : 12, // modification time (2 bytes time, 2 bytes date)\n CENCRC : 16, // uncompressed file crc-32 value\n CENSIZ : 20, // compressed size\n CENLEN : 24, // uncompressed size\n CENNAM : 28, // filename length\n CENEXT : 30, // extra field length\n CENCOM : 32, // file comment length\n CENDSK : 34, // volume number start\n CENATT : 36, // internal file attributes\n CENATX : 38, // external file attributes (host system dependent)\n CENOFF : 42, // LOC header offset\n\n /* The entries in the end of central directory */\n ENDHDR : 22, // END header size\n ENDSIG : 0x06054b50, // \"PK\\005\\006\"\n ENDSUB : 8, // number of entries on this disk\n ENDTOT : 10, // total number of entries\n ENDSIZ : 12, // central directory size in bytes\n ENDOFF : 16, // offset of first CEN header\n ENDCOM : 20, // zip file comment length\n\n END64HDR : 20, // zip64 END header size\n END64SIG : 0x07064b50, // zip64 Locator signature, \"PK\\006\\007\"\n END64START : 4, // number of the disk with the start of the zip64\n END64OFF : 8, // relative offset of the zip64 end of central directory\n END64NUMDISKS : 16, // total number of disks\n\n ZIP64SIG : 0x06064b50, // zip64 signature, \"PK\\006\\006\"\n ZIP64HDR : 56, // zip64 record minimum size\n ZIP64LEAD : 12, // leading bytes at the start of the record, not counted by the value stored in ZIP64SIZE\n ZIP64SIZE : 4, // zip64 size of the central directory record\n ZIP64VEM : 12, // zip64 version made by\n ZIP64VER : 14, // zip64 version needed to extract\n ZIP64DSK : 16, // zip64 number of this disk\n ZIP64DSKDIR : 20, // number of the disk with the start of the record directory\n ZIP64SUB : 24, // number of entries on this disk\n ZIP64TOT : 32, // total number of entries\n ZIP64SIZB : 40, // zip64 central directory size in bytes\n ZIP64OFF : 48, // offset of start of central directory with respect to the starting disk number\n ZIP64EXTRA : 56, // extensible data sector\n\n /* Compression methods */\n STORED : 0, // no compression\n SHRUNK : 1, // shrunk\n REDUCED1 : 2, // reduced with compression factor 1\n REDUCED2 : 3, // reduced with compression factor 2\n REDUCED3 : 4, // reduced with compression factor 3\n REDUCED4 : 5, // reduced with compression factor 4\n IMPLODED : 6, // imploded\n // 7 reserved for Tokenizing compression algorithm\n DEFLATED : 8, // deflated\n ENHANCED_DEFLATED: 9, // enhanced deflated\n PKWARE : 10,// PKWare DCL imploded\n // 11 reserved by PKWARE\n BZIP2 : 12, // compressed using BZIP2\n // 13 reserved by PKWARE\n LZMA : 14, // LZMA\n // 15-17 reserved by PKWARE\n IBM_TERSE : 18, // compressed using IBM TERSE\n IBM_LZ77 : 19, // IBM LZ77 z\n AES_ENCRYPT : 99, // WinZIP AES encryption method\n\n /* General purpose bit flag */\n // values can obtained with expression 2**bitnr\n FLG_ENC : 1, // Bit 0: encrypted file\n FLG_COMP1 : 2, // Bit 1, compression option\n FLG_COMP2 : 4, // Bit 2, compression option\n FLG_DESC : 8, // Bit 3, data descriptor\n FLG_ENH : 16, // Bit 4, enhanced deflating\n FLG_PATCH : 32, // Bit 5, indicates that the file is compressed patched data.\n FLG_STR : 64, // Bit 6, strong encryption (patented)\n // Bits 7-10: Currently unused.\n FLG_EFS : 2048, // Bit 11: Language encoding flag (EFS)\n // Bit 12: Reserved by PKWARE for enhanced compression.\n // Bit 13: encrypted the Central Directory (patented).\n // Bits 14-15: Reserved by PKWARE.\n FLG_MSK : 4096, // mask header values\n\n /* Load type */\n FILE : 2,\n BUFFER : 1,\n NONE : 0,\n\n /* 4.5 Extensible data fields */\n EF_ID : 0,\n EF_SIZE : 2,\n\n /* Header IDs */\n ID_ZIP64 : 0x0001,\n ID_AVINFO : 0x0007,\n ID_PFS : 0x0008,\n ID_OS2 : 0x0009,\n ID_NTFS : 0x000a,\n ID_OPENVMS : 0x000c,\n ID_UNIX : 0x000d,\n ID_FORK : 0x000e,\n ID_PATCH : 0x000f,\n ID_X509_PKCS7 : 0x0014,\n ID_X509_CERTID_F : 0x0015,\n ID_X509_CERTID_C : 0x0016,\n ID_STRONGENC : 0x0017,\n ID_RECORD_MGT : 0x0018,\n ID_X509_PKCS7_RL : 0x0019,\n ID_IBM1 : 0x0065,\n ID_IBM2 : 0x0066,\n ID_POSZIP : 0x4690,\n\n EF_ZIP64_OR_32 : 0xffffffff,\n EF_ZIP64_OR_16 : 0xffff,\n EF_ZIP64_SUNCOMP : 0,\n EF_ZIP64_SCOMP : 8,\n EF_ZIP64_RHO : 16,\n EF_ZIP64_DSN : 24\n};\n","const errors = {\n /* Header error messages */\n INVALID_LOC: \"Invalid LOC header (bad signature)\",\n INVALID_CEN: \"Invalid CEN header (bad signature)\",\n INVALID_END: \"Invalid END header (bad signature)\",\n\n /* Descriptor */\n DESCRIPTOR_NOT_EXIST: \"No descriptor present\",\n DESCRIPTOR_UNKNOWN: \"Unknown descriptor format\",\n DESCRIPTOR_FAULTY: \"Descriptor data is malformed\",\n\n /* ZipEntry error messages*/\n NO_DATA: \"Nothing to decompress\",\n BAD_CRC: \"CRC32 checksum failed {0}\",\n FILE_IN_THE_WAY: \"There is a file in the way: {0}\",\n UNKNOWN_METHOD: \"Invalid/unsupported compression method\",\n\n /* Inflater error messages */\n AVAIL_DATA: \"inflate::Available inflate data did not terminate\",\n INVALID_DISTANCE: \"inflate::Invalid literal/length or distance code in fixed or dynamic block\",\n TO_MANY_CODES: \"inflate::Dynamic block code description: too many length or distance codes\",\n INVALID_REPEAT_LEN: \"inflate::Dynamic block code description: repeat more than specified lengths\",\n INVALID_REPEAT_FIRST: \"inflate::Dynamic block code description: repeat lengths with no first length\",\n INCOMPLETE_CODES: \"inflate::Dynamic block code description: code lengths codes incomplete\",\n INVALID_DYN_DISTANCE: \"inflate::Dynamic block code description: invalid distance code lengths\",\n INVALID_CODES_LEN: \"inflate::Dynamic block code description: invalid literal/length code lengths\",\n INVALID_STORE_BLOCK: \"inflate::Stored block length did not match one's complement\",\n INVALID_BLOCK_TYPE: \"inflate::Invalid block type (type == 3)\",\n\n /* ADM-ZIP error messages */\n CANT_EXTRACT_FILE: \"Could not extract the file\",\n CANT_OVERRIDE: \"Target file already exists\",\n DISK_ENTRY_TOO_LARGE: \"Number of disk entries is too large\",\n NO_ZIP: \"No zip file was loaded\",\n NO_ENTRY: \"Entry doesn't exist\",\n DIRECTORY_CONTENT_ERROR: \"A directory cannot have content\",\n FILE_NOT_FOUND: 'File not found: \"{0}\"',\n NOT_IMPLEMENTED: \"Not implemented\",\n INVALID_FILENAME: \"Invalid filename\",\n INVALID_FORMAT: \"Invalid or unsupported zip format. No END header found\",\n INVALID_PASS_PARAM: \"Incompatible password parameter\",\n WRONG_PASSWORD: \"Wrong Password\",\n\n /* ADM-ZIP */\n COMMENT_TOO_LONG: \"Comment is too long\", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space)\n EXTRA_FIELD_PARSE_ERROR: \"Extra field parsing error\"\n};\n\n// template\nfunction E(message) {\n return function (...args) {\n if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number\n message = message.replace(/\\{(\\d)\\}/g, (_, n) => args[n] || '');\n }\n\n return new Error('ADM-ZIP: ' + message);\n };\n}\n\n// Init errors with template\nfor (const msg of Object.keys(errors)) {\n exports[msg] = E(errors[msg]);\n}\n","const fsystem = require(\"fs\");\nconst pth = require(\"path\");\nconst Constants = require(\"./constants\");\nconst Errors = require(\"./errors\");\nconst isWin = typeof process === \"object\" && \"win32\" === process.platform;\n\nconst is_Obj = (obj) => typeof obj === \"object\" && obj !== null;\n\n// generate CRC32 lookup table\nconst crcTable = new Uint32Array(256).map((t, c) => {\n for (let k = 0; k < 8; k++) {\n if ((c & 1) !== 0) {\n c = 0xedb88320 ^ (c >>> 1);\n } else {\n c >>>= 1;\n }\n }\n return c >>> 0;\n});\n\n// UTILS functions\n\nfunction Utils(opts) {\n this.sep = pth.sep;\n this.fs = fsystem;\n\n if (is_Obj(opts)) {\n // custom filesystem\n if (is_Obj(opts.fs) && typeof opts.fs.statSync === \"function\") {\n this.fs = opts.fs;\n }\n }\n}\n\nmodule.exports = Utils;\n\n// INSTANTIABLE functions\n\nUtils.prototype.makeDir = function (/*String*/ folder) {\n const self = this;\n\n // Sync - make directories tree\n function mkdirSync(/*String*/ fpath) {\n let resolvedPath = fpath.split(self.sep)[0];\n fpath.split(self.sep).forEach(function (name) {\n if (!name || name.substr(-1, 1) === \":\") return;\n resolvedPath += self.sep + name;\n var stat;\n try {\n stat = self.fs.statSync(resolvedPath);\n } catch (e) {\n self.fs.mkdirSync(resolvedPath);\n }\n if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY(`\"${resolvedPath}\"`);\n });\n }\n\n mkdirSync(folder);\n};\n\nUtils.prototype.writeFileTo = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr) {\n const self = this;\n if (self.fs.existsSync(path)) {\n if (!overwrite) return false; // cannot overwrite\n\n var stat = self.fs.statSync(path);\n if (stat.isDirectory()) {\n return false;\n }\n }\n var folder = pth.dirname(path);\n if (!self.fs.existsSync(folder)) {\n self.makeDir(folder);\n }\n\n var fd;\n try {\n fd = self.fs.openSync(path, \"w\", 0o666); // 0666\n } catch (e) {\n self.fs.chmodSync(path, 0o666);\n fd = self.fs.openSync(path, \"w\", 0o666);\n }\n if (fd) {\n try {\n self.fs.writeSync(fd, content, 0, content.length, 0);\n } finally {\n self.fs.closeSync(fd);\n }\n }\n self.fs.chmodSync(path, attr || 0o666);\n return true;\n};\n\nUtils.prototype.writeFileToAsync = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr, /*Function*/ callback) {\n if (typeof attr === \"function\") {\n callback = attr;\n attr = undefined;\n }\n\n const self = this;\n\n self.fs.exists(path, function (exist) {\n if (exist && !overwrite) return callback(false);\n\n self.fs.stat(path, function (err, stat) {\n if (exist && stat.isDirectory()) {\n return callback(false);\n }\n\n var folder = pth.dirname(path);\n self.fs.exists(folder, function (exists) {\n if (!exists) self.makeDir(folder);\n\n self.fs.open(path, \"w\", 0o666, function (err, fd) {\n if (err) {\n self.fs.chmod(path, 0o666, function () {\n self.fs.open(path, \"w\", 0o666, function (err, fd) {\n self.fs.write(fd, content, 0, content.length, 0, function () {\n self.fs.close(fd, function () {\n self.fs.chmod(path, attr || 0o666, function () {\n callback(true);\n });\n });\n });\n });\n });\n } else if (fd) {\n self.fs.write(fd, content, 0, content.length, 0, function () {\n self.fs.close(fd, function () {\n self.fs.chmod(path, attr || 0o666, function () {\n callback(true);\n });\n });\n });\n } else {\n self.fs.chmod(path, attr || 0o666, function () {\n callback(true);\n });\n }\n });\n });\n });\n });\n};\n\nUtils.prototype.findFiles = function (/*String*/ path) {\n const self = this;\n\n function findSync(/*String*/ dir, /*RegExp*/ pattern, /*Boolean*/ recursive) {\n if (typeof pattern === \"boolean\") {\n recursive = pattern;\n pattern = undefined;\n }\n let files = [];\n self.fs.readdirSync(dir).forEach(function (file) {\n const path = pth.join(dir, file);\n const stat = self.fs.statSync(path);\n\n if (!pattern || pattern.test(path)) {\n files.push(pth.normalize(path) + (stat.isDirectory() ? self.sep : \"\"));\n }\n\n if (stat.isDirectory() && recursive) files = files.concat(findSync(path, pattern, recursive));\n });\n return files;\n }\n\n return findSync(path, undefined, true);\n};\n\n/**\n * Callback for showing if everything was done.\n *\n * @callback filelistCallback\n * @param {Error} err - Error object\n * @param {string[]} list - was request fully completed\n */\n\n/**\n *\n * @param {string} dir\n * @param {filelistCallback} cb\n */\nUtils.prototype.findFilesAsync = function (dir, cb) {\n const self = this;\n let results = [];\n self.fs.readdir(dir, function (err, list) {\n if (err) return cb(err);\n let list_length = list.length;\n if (!list_length) return cb(null, results);\n list.forEach(function (file) {\n file = pth.join(dir, file);\n self.fs.stat(file, function (err, stat) {\n if (err) return cb(err);\n if (stat) {\n results.push(pth.normalize(file) + (stat.isDirectory() ? self.sep : \"\"));\n if (stat.isDirectory()) {\n self.findFilesAsync(file, function (err, res) {\n if (err) return cb(err);\n results = results.concat(res);\n if (!--list_length) cb(null, results);\n });\n } else {\n if (!--list_length) cb(null, results);\n }\n }\n });\n });\n });\n};\n\nUtils.prototype.getAttributes = function () {};\n\nUtils.prototype.setAttributes = function () {};\n\n// STATIC functions\n\n// crc32 single update (it is part of crc32)\nUtils.crc32update = function (crc, byte) {\n return crcTable[(crc ^ byte) & 0xff] ^ (crc >>> 8);\n};\n\nUtils.crc32 = function (buf) {\n if (typeof buf === \"string\") {\n buf = Buffer.from(buf, \"utf8\");\n }\n\n let len = buf.length;\n let crc = ~0;\n for (let off = 0; off < len; ) crc = Utils.crc32update(crc, buf[off++]);\n // xor and cast as uint32 number\n return ~crc >>> 0;\n};\n\nUtils.methodToString = function (/*Number*/ method) {\n switch (method) {\n case Constants.STORED:\n return \"STORED (\" + method + \")\";\n case Constants.DEFLATED:\n return \"DEFLATED (\" + method + \")\";\n default:\n return \"UNSUPPORTED (\" + method + \")\";\n }\n};\n\n/**\n * removes \"..\" style path elements\n * @param {string} path - fixable path\n * @returns string - fixed filepath\n */\nUtils.canonical = function (/*string*/ path) {\n if (!path) return \"\";\n // trick normalize think path is absolute\n const safeSuffix = pth.posix.normalize(\"/\" + path.split(\"\\\\\").join(\"/\"));\n return pth.join(\".\", safeSuffix);\n};\n\n/**\n * fix file names in achive\n * @param {string} path - fixable path\n * @returns string - fixed filepath\n */\n\nUtils.zipnamefix = function (path) {\n if (!path) return \"\";\n // trick normalize think path is absolute\n const safeSuffix = pth.posix.normalize(\"/\" + path.split(\"\\\\\").join(\"/\"));\n return pth.posix.join(\".\", safeSuffix);\n};\n\n/**\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns\n */\nUtils.findLast = function (arr, callback) {\n if (!Array.isArray(arr)) throw new TypeError(\"arr is not array\");\n\n const len = arr.length >>> 0;\n for (let i = len - 1; i >= 0; i--) {\n if (callback(arr[i], i, arr)) {\n return arr[i];\n }\n }\n return void 0;\n};\n\n// make abolute paths taking prefix as root folder\nUtils.sanitize = function (/*string*/ prefix, /*string*/ name) {\n prefix = pth.resolve(pth.normalize(prefix));\n var parts = name.split(\"/\");\n for (var i = 0, l = parts.length; i < l; i++) {\n var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));\n if (path.indexOf(prefix) === 0) {\n return path;\n }\n }\n return pth.normalize(pth.join(prefix, pth.basename(name)));\n};\n\n// converts buffer, Uint8Array, string types to buffer\nUtils.toBuffer = function toBuffer(/*buffer, Uint8Array, string*/ input, /* function */ encoder) {\n if (Buffer.isBuffer(input)) {\n return input;\n } else if (input instanceof Uint8Array) {\n return Buffer.from(input);\n } else {\n // expect string all other values are invalid and return empty buffer\n return typeof input === \"string\" ? encoder(input) : Buffer.alloc(0);\n }\n};\n\nUtils.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) {\n var slice = Buffer.from(buffer.slice(index, index + 8));\n slice.swap64();\n\n return parseInt(`0x${slice.toString(\"hex\")}`);\n};\n\nUtils.fromDOS2Date = function (val) {\n return new Date(((val >> 25) & 0x7f) + 1980, Math.max(((val >> 21) & 0x0f) - 1, 0), Math.max((val >> 16) & 0x1f, 1), (val >> 11) & 0x1f, (val >> 5) & 0x3f, (val & 0x1f) << 1);\n};\n\nUtils.fromDate2DOS = function (val) {\n let date = 0;\n let time = 0;\n if (val.getFullYear() > 1979) {\n date = (((val.getFullYear() - 1980) & 0x7f) << 9) | ((val.getMonth() + 1) << 5) | val.getDate();\n time = (val.getHours() << 11) | (val.getMinutes() << 5) | (val.getSeconds() >> 1);\n }\n return (date << 16) | time;\n};\n\nUtils.isWin = isWin; // Do we have windows system\nUtils.crcTable = crcTable;\n","const pth = require(\"path\");\n\nmodule.exports = function (/*String*/ path, /*Utils object*/ { fs }) {\n var _path = path || \"\",\n _obj = newAttr(),\n _stat = null;\n\n function newAttr() {\n return {\n directory: false,\n readonly: false,\n hidden: false,\n executable: false,\n mtime: 0,\n atime: 0\n };\n }\n\n if (_path && fs.existsSync(_path)) {\n _stat = fs.statSync(_path);\n _obj.directory = _stat.isDirectory();\n _obj.mtime = _stat.mtime;\n _obj.atime = _stat.atime;\n _obj.executable = (0o111 & _stat.mode) !== 0; // file is executable who ever har right not just owner\n _obj.readonly = (0o200 & _stat.mode) === 0; // readonly if owner has no write right\n _obj.hidden = pth.basename(_path)[0] === \".\";\n } else {\n console.warn(\"Invalid path: \" + _path);\n }\n\n return {\n get directory() {\n return _obj.directory;\n },\n\n get readOnly() {\n return _obj.readonly;\n },\n\n get hidden() {\n return _obj.hidden;\n },\n\n get mtime() {\n return _obj.mtime;\n },\n\n get atime() {\n return _obj.atime;\n },\n\n get executable() {\n return _obj.executable;\n },\n\n decodeAttributes: function () {},\n\n encodeAttributes: function () {},\n\n toJSON: function () {\n return {\n path: _path,\n isDirectory: _obj.directory,\n isReadOnly: _obj.readonly,\n isHidden: _obj.hidden,\n isExecutable: _obj.executable,\n mTime: _obj.mtime,\n aTime: _obj.atime\n };\n },\n\n toString: function () {\n return JSON.stringify(this.toJSON(), null, \"\\t\");\n }\n };\n};\n","module.exports = {\n efs: true,\n encode: (data) => Buffer.from(data, \"utf8\"),\n decode: (data) => data.toString(\"utf8\")\n};\n","module.exports = require(\"./utils\");\nmodule.exports.Constants = require(\"./constants\");\nmodule.exports.Errors = require(\"./errors\");\nmodule.exports.FileAttr = require(\"./fattr\");\nmodule.exports.decoder = require(\"./decoder\");\n","var Utils = require(\"../util\"),\n Constants = Utils.Constants;\n\n/* The central directory file header */\nmodule.exports = function () {\n var _verMade = 20, // v2.0\n _version = 10, // v1.0\n _flags = 0,\n _method = 0,\n _time = 0,\n _crc = 0,\n _compressedSize = 0,\n _size = 0,\n _fnameLen = 0,\n _extraLen = 0,\n _comLen = 0,\n _diskStart = 0,\n _inattr = 0,\n _attr = 0,\n _offset = 0;\n\n _verMade |= Utils.isWin ? 0x0a00 : 0x0300;\n\n // Set EFS flag since filename and comment fields are all by default encoded using UTF-8.\n // Without it file names may be corrupted for other apps when file names use unicode chars\n _flags |= Constants.FLG_EFS;\n\n const _localHeader = {\n extraLen: 0\n };\n\n // casting\n const uint32 = (val) => Math.max(0, val) >>> 0;\n const uint16 = (val) => Math.max(0, val) & 0xffff;\n const uint8 = (val) => Math.max(0, val) & 0xff;\n\n _time = Utils.fromDate2DOS(new Date());\n\n return {\n get made() {\n return _verMade;\n },\n set made(val) {\n _verMade = val;\n },\n\n get version() {\n return _version;\n },\n set version(val) {\n _version = val;\n },\n\n get flags() {\n return _flags;\n },\n set flags(val) {\n _flags = val;\n },\n\n get flags_efs() {\n return (_flags & Constants.FLG_EFS) > 0;\n },\n set flags_efs(val) {\n if (val) {\n _flags |= Constants.FLG_EFS;\n } else {\n _flags &= ~Constants.FLG_EFS;\n }\n },\n\n get flags_desc() {\n return (_flags & Constants.FLG_DESC) > 0;\n },\n set flags_desc(val) {\n if (val) {\n _flags |= Constants.FLG_DESC;\n } else {\n _flags &= ~Constants.FLG_DESC;\n }\n },\n\n get method() {\n return _method;\n },\n set method(val) {\n switch (val) {\n case Constants.STORED:\n this.version = 10;\n case Constants.DEFLATED:\n default:\n this.version = 20;\n }\n _method = val;\n },\n\n get time() {\n return Utils.fromDOS2Date(this.timeval);\n },\n set time(val) {\n this.timeval = Utils.fromDate2DOS(val);\n },\n\n get timeval() {\n return _time;\n },\n set timeval(val) {\n _time = uint32(val);\n },\n\n get timeHighByte() {\n return uint8(_time >>> 8);\n },\n get crc() {\n return _crc;\n },\n set crc(val) {\n _crc = uint32(val);\n },\n\n get compressedSize() {\n return _compressedSize;\n },\n set compressedSize(val) {\n _compressedSize = uint32(val);\n },\n\n get size() {\n return _size;\n },\n set size(val) {\n _size = uint32(val);\n },\n\n get fileNameLength() {\n return _fnameLen;\n },\n set fileNameLength(val) {\n _fnameLen = val;\n },\n\n get extraLength() {\n return _extraLen;\n },\n set extraLength(val) {\n _extraLen = val;\n },\n\n get extraLocalLength() {\n return _localHeader.extraLen;\n },\n set extraLocalLength(val) {\n _localHeader.extraLen = val;\n },\n\n get commentLength() {\n return _comLen;\n },\n set commentLength(val) {\n _comLen = val;\n },\n\n get diskNumStart() {\n return _diskStart;\n },\n set diskNumStart(val) {\n _diskStart = uint32(val);\n },\n\n get inAttr() {\n return _inattr;\n },\n set inAttr(val) {\n _inattr = uint32(val);\n },\n\n get attr() {\n return _attr;\n },\n set attr(val) {\n _attr = uint32(val);\n },\n\n // get Unix file permissions\n get fileAttr() {\n return (_attr || 0) >> 16 & 0xfff;\n },\n\n get offset() {\n return _offset;\n },\n set offset(val) {\n _offset = uint32(val);\n },\n\n get encrypted() {\n return (_flags & Constants.FLG_ENC) === Constants.FLG_ENC;\n },\n\n get centralHeaderSize() {\n return Constants.CENHDR + _fnameLen + _extraLen + _comLen;\n },\n\n get realDataOffset() {\n return _offset + Constants.LOCHDR + _localHeader.fnameLen + _localHeader.extraLen;\n },\n\n get localHeader() {\n return _localHeader;\n },\n\n loadLocalHeaderFromBinary: function (/*Buffer*/ input) {\n var data = input.slice(_offset, _offset + Constants.LOCHDR);\n // 30 bytes and should start with \"PK\\003\\004\"\n if (data.readUInt32LE(0) !== Constants.LOCSIG) {\n throw Utils.Errors.INVALID_LOC();\n }\n\n // version needed to extract\n _localHeader.version = data.readUInt16LE(Constants.LOCVER);\n // general purpose bit flag\n _localHeader.flags = data.readUInt16LE(Constants.LOCFLG);\n // compression method\n _localHeader.method = data.readUInt16LE(Constants.LOCHOW);\n // modification time (2 bytes time, 2 bytes date)\n _localHeader.time = data.readUInt32LE(Constants.LOCTIM);\n // uncompressed file crc-32 valu\n _localHeader.crc = data.readUInt32LE(Constants.LOCCRC);\n // compressed size\n _localHeader.compressedSize = data.readUInt32LE(Constants.LOCSIZ);\n // uncompressed size\n _localHeader.size = data.readUInt32LE(Constants.LOCLEN);\n // filename length\n _localHeader.fnameLen = data.readUInt16LE(Constants.LOCNAM);\n // extra field length\n _localHeader.extraLen = data.readUInt16LE(Constants.LOCEXT);\n\n // read extra data\n const extraStart = _offset + Constants.LOCHDR + _localHeader.fnameLen;\n const extraEnd = extraStart + _localHeader.extraLen;\n return input.slice(extraStart, extraEnd);\n },\n\n loadFromBinary: function (/*Buffer*/ data) {\n // data should be 46 bytes and start with \"PK 01 02\"\n if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) {\n throw Utils.Errors.INVALID_CEN();\n }\n // version made by\n _verMade = data.readUInt16LE(Constants.CENVEM);\n // version needed to extract\n _version = data.readUInt16LE(Constants.CENVER);\n // encrypt, decrypt flags\n _flags = data.readUInt16LE(Constants.CENFLG);\n // compression method\n _method = data.readUInt16LE(Constants.CENHOW);\n // modification time (2 bytes time, 2 bytes date)\n _time = data.readUInt32LE(Constants.CENTIM);\n // uncompressed file crc-32 value\n _crc = data.readUInt32LE(Constants.CENCRC);\n // compressed size\n _compressedSize = data.readUInt32LE(Constants.CENSIZ);\n // uncompressed size\n _size = data.readUInt32LE(Constants.CENLEN);\n // filename length\n _fnameLen = data.readUInt16LE(Constants.CENNAM);\n // extra field length\n _extraLen = data.readUInt16LE(Constants.CENEXT);\n // file comment length\n _comLen = data.readUInt16LE(Constants.CENCOM);\n // volume number start\n _diskStart = data.readUInt16LE(Constants.CENDSK);\n // internal file attributes\n _inattr = data.readUInt16LE(Constants.CENATT);\n // external file attributes\n _attr = data.readUInt32LE(Constants.CENATX);\n // LOC header offset\n _offset = data.readUInt32LE(Constants.CENOFF);\n },\n\n localHeaderToBinary: function () {\n // LOC header size (30 bytes)\n var data = Buffer.alloc(Constants.LOCHDR);\n // \"PK\\003\\004\"\n data.writeUInt32LE(Constants.LOCSIG, 0);\n // version needed to extract\n data.writeUInt16LE(_version, Constants.LOCVER);\n // general purpose bit flag\n data.writeUInt16LE(_flags, Constants.LOCFLG);\n // compression method\n data.writeUInt16LE(_method, Constants.LOCHOW);\n // modification time (2 bytes time, 2 bytes date)\n data.writeUInt32LE(_time, Constants.LOCTIM);\n // uncompressed file crc-32 value\n data.writeUInt32LE(_crc, Constants.LOCCRC);\n // compressed size\n data.writeUInt32LE(_compressedSize, Constants.LOCSIZ);\n // uncompressed size\n data.writeUInt32LE(_size, Constants.LOCLEN);\n // filename length\n data.writeUInt16LE(_fnameLen, Constants.LOCNAM);\n // extra field length\n data.writeUInt16LE(_localHeader.extraLen, Constants.LOCEXT);\n return data;\n },\n\n centralHeaderToBinary: function () {\n // CEN header size (46 bytes)\n var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen);\n // \"PK\\001\\002\"\n data.writeUInt32LE(Constants.CENSIG, 0);\n // version made by\n data.writeUInt16LE(_verMade, Constants.CENVEM);\n // version needed to extract\n data.writeUInt16LE(_version, Constants.CENVER);\n // encrypt, decrypt flags\n data.writeUInt16LE(_flags, Constants.CENFLG);\n // compression method\n data.writeUInt16LE(_method, Constants.CENHOW);\n // modification time (2 bytes time, 2 bytes date)\n data.writeUInt32LE(_time, Constants.CENTIM);\n // uncompressed file crc-32 value\n data.writeUInt32LE(_crc, Constants.CENCRC);\n // compressed size\n data.writeUInt32LE(_compressedSize, Constants.CENSIZ);\n // uncompressed size\n data.writeUInt32LE(_size, Constants.CENLEN);\n // filename length\n data.writeUInt16LE(_fnameLen, Constants.CENNAM);\n // extra field length\n data.writeUInt16LE(_extraLen, Constants.CENEXT);\n // file comment length\n data.writeUInt16LE(_comLen, Constants.CENCOM);\n // volume number start\n data.writeUInt16LE(_diskStart, Constants.CENDSK);\n // internal file attributes\n data.writeUInt16LE(_inattr, Constants.CENATT);\n // external file attributes\n data.writeUInt32LE(_attr, Constants.CENATX);\n // LOC header offset\n data.writeUInt32LE(_offset, Constants.CENOFF);\n return data;\n },\n\n toJSON: function () {\n const bytes = function (nr) {\n return nr + \" bytes\";\n };\n\n return {\n made: _verMade,\n version: _version,\n flags: _flags,\n method: Utils.methodToString(_method),\n time: this.time,\n crc: \"0x\" + _crc.toString(16).toUpperCase(),\n compressedSize: bytes(_compressedSize),\n size: bytes(_size),\n fileNameLength: bytes(_fnameLen),\n extraLength: bytes(_extraLen),\n commentLength: bytes(_comLen),\n diskNumStart: _diskStart,\n inAttr: _inattr,\n attr: _attr,\n offset: _offset,\n centralHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen)\n };\n },\n\n toString: function () {\n return JSON.stringify(this.toJSON(), null, \"\\t\");\n }\n };\n};\n","var Utils = require(\"../util\"),\n Constants = Utils.Constants;\n\n/* The entries in the end of central directory */\nmodule.exports = function () {\n var _volumeEntries = 0,\n _totalEntries = 0,\n _size = 0,\n _offset = 0,\n _commentLength = 0;\n\n return {\n get diskEntries() {\n return _volumeEntries;\n },\n set diskEntries(/*Number*/ val) {\n _volumeEntries = _totalEntries = val;\n },\n\n get totalEntries() {\n return _totalEntries;\n },\n set totalEntries(/*Number*/ val) {\n _totalEntries = _volumeEntries = val;\n },\n\n get size() {\n return _size;\n },\n set size(/*Number*/ val) {\n _size = val;\n },\n\n get offset() {\n return _offset;\n },\n set offset(/*Number*/ val) {\n _offset = val;\n },\n\n get commentLength() {\n return _commentLength;\n },\n set commentLength(/*Number*/ val) {\n _commentLength = val;\n },\n\n get mainHeaderSize() {\n return Constants.ENDHDR + _commentLength;\n },\n\n loadFromBinary: function (/*Buffer*/ data) {\n // data should be 22 bytes and start with \"PK 05 06\"\n // or be 56+ bytes and start with \"PK 06 06\" for Zip64\n if (\n (data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) &&\n (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG)\n ) {\n throw Utils.Errors.INVALID_END();\n }\n\n if (data.readUInt32LE(0) === Constants.ENDSIG) {\n // number of entries on this volume\n _volumeEntries = data.readUInt16LE(Constants.ENDSUB);\n // total number of entries\n _totalEntries = data.readUInt16LE(Constants.ENDTOT);\n // central directory size in bytes\n _size = data.readUInt32LE(Constants.ENDSIZ);\n // offset of first CEN header\n _offset = data.readUInt32LE(Constants.ENDOFF);\n // zip file comment length\n _commentLength = data.readUInt16LE(Constants.ENDCOM);\n } else {\n // number of entries on this volume\n _volumeEntries = Utils.readBigUInt64LE(data, Constants.ZIP64SUB);\n // total number of entries\n _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT);\n // central directory size in bytes\n _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE);\n // offset of first CEN header\n _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF);\n\n _commentLength = 0;\n }\n },\n\n toBinary: function () {\n var b = Buffer.alloc(Constants.ENDHDR + _commentLength);\n // \"PK 05 06\" signature\n b.writeUInt32LE(Constants.ENDSIG, 0);\n b.writeUInt32LE(0, 4);\n // number of entries on this volume\n b.writeUInt16LE(_volumeEntries, Constants.ENDSUB);\n // total number of entries\n b.writeUInt16LE(_totalEntries, Constants.ENDTOT);\n // central directory size in bytes\n b.writeUInt32LE(_size, Constants.ENDSIZ);\n // offset of first CEN header\n b.writeUInt32LE(_offset, Constants.ENDOFF);\n // zip file comment length\n b.writeUInt16LE(_commentLength, Constants.ENDCOM);\n // fill comment memory with spaces so no garbage is left there\n b.fill(\" \", Constants.ENDHDR);\n\n return b;\n },\n\n toJSON: function () {\n // creates 0x0000 style output\n const offset = function (nr, len) {\n let offs = nr.toString(16).toUpperCase();\n while (offs.length < len) offs = \"0\" + offs;\n return \"0x\" + offs;\n };\n\n return {\n diskEntries: _volumeEntries,\n totalEntries: _totalEntries,\n size: _size + \" bytes\",\n offset: offset(_offset, 4),\n commentLength: _commentLength\n };\n },\n\n toString: function () {\n return JSON.stringify(this.toJSON(), null, \"\\t\");\n }\n };\n};\n// Misspelled\n","exports.EntryHeader = require(\"./entryHeader\");\nexports.MainHeader = require(\"./mainHeader\");\n","module.exports = function (/*Buffer*/ inbuf) {\n var zlib = require(\"zlib\");\n\n var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 };\n\n return {\n deflate: function () {\n return zlib.deflateRawSync(inbuf, opts);\n },\n\n deflateAsync: function (/*Function*/ callback) {\n var tmp = zlib.createDeflateRaw(opts),\n parts = [],\n total = 0;\n tmp.on(\"data\", function (data) {\n parts.push(data);\n total += data.length;\n });\n tmp.on(\"end\", function () {\n var buf = Buffer.alloc(total),\n written = 0;\n buf.fill(0);\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n part.copy(buf, written);\n written += part.length;\n }\n callback && callback(buf);\n });\n tmp.end(inbuf);\n }\n };\n};\n","const version = +(process.versions ? process.versions.node : \"\").split(\".\")[0] || 0;\n\nmodule.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) {\n var zlib = require(\"zlib\");\n const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {};\n\n return {\n inflate: function () {\n return zlib.inflateRawSync(inbuf, option);\n },\n\n inflateAsync: function (/*Function*/ callback) {\n var tmp = zlib.createInflateRaw(option),\n parts = [],\n total = 0;\n tmp.on(\"data\", function (data) {\n parts.push(data);\n total += data.length;\n });\n tmp.on(\"end\", function () {\n var buf = Buffer.alloc(total),\n written = 0;\n buf.fill(0);\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n part.copy(buf, written);\n written += part.length;\n }\n callback && callback(buf);\n });\n tmp.end(inbuf);\n }\n };\n};\n","\"use strict\";\n\n// node crypt, we use it for generate salt\n// eslint-disable-next-line node/no-unsupported-features/node-builtins\nconst { randomFillSync } = require(\"crypto\");\nconst Errors = require(\"../util/errors\");\n\n// generate CRC32 lookup table\nconst crctable = new Uint32Array(256).map((t, crc) => {\n for (let j = 0; j < 8; j++) {\n if (0 !== (crc & 1)) {\n crc = (crc >>> 1) ^ 0xedb88320;\n } else {\n crc >>>= 1;\n }\n }\n return crc >>> 0;\n});\n\n// C-style uInt32 Multiply (discards higher bits, when JS multiply discards lower bits)\nconst uMul = (a, b) => Math.imul(a, b) >>> 0;\n\n// crc32 byte single update (actually same function is part of utils.crc32 function :) )\nconst crc32update = (pCrc32, bval) => {\n return crctable[(pCrc32 ^ bval) & 0xff] ^ (pCrc32 >>> 8);\n};\n\n// function for generating salt for encrytion header\nconst genSalt = () => {\n if (\"function\" === typeof randomFillSync) {\n return randomFillSync(Buffer.alloc(12));\n } else {\n // fallback if function is not defined\n return genSalt.node();\n }\n};\n\n// salt generation with node random function (mainly as fallback)\ngenSalt.node = () => {\n const salt = Buffer.alloc(12);\n const len = salt.length;\n for (let i = 0; i < len; i++) salt[i] = (Math.random() * 256) & 0xff;\n return salt;\n};\n\n// general config\nconst config = {\n genSalt\n};\n\n// Class Initkeys handles same basic ops with keys\nfunction Initkeys(pw) {\n const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw);\n this.keys = new Uint32Array([0x12345678, 0x23456789, 0x34567890]);\n for (let i = 0; i < pass.length; i++) {\n this.updateKeys(pass[i]);\n }\n}\n\nInitkeys.prototype.updateKeys = function (byteValue) {\n const keys = this.keys;\n keys[0] = crc32update(keys[0], byteValue);\n keys[1] += keys[0] & 0xff;\n keys[1] = uMul(keys[1], 134775813) + 1;\n keys[2] = crc32update(keys[2], keys[1] >>> 24);\n return byteValue;\n};\n\nInitkeys.prototype.next = function () {\n const k = (this.keys[2] | 2) >>> 0; // key\n return (uMul(k, k ^ 1) >> 8) & 0xff; // decode\n};\n\nfunction make_decrypter(/*Buffer*/ pwd) {\n // 1. Stage initialize key\n const keys = new Initkeys(pwd);\n\n // return decrypter function\n return function (/*Buffer*/ data) {\n // result - we create new Buffer for results\n const result = Buffer.alloc(data.length);\n let pos = 0;\n // process input data\n for (let c of data) {\n //c ^= keys.next();\n //result[pos++] = c; // decode & Save Value\n result[pos++] = keys.updateKeys(c ^ keys.next()); // update keys with decoded byte\n }\n return result;\n };\n}\n\nfunction make_encrypter(/*Buffer*/ pwd) {\n // 1. Stage initialize key\n const keys = new Initkeys(pwd);\n\n // return encrypting function, result and pos is here so we dont have to merge buffers later\n return function (/*Buffer*/ data, /*Buffer*/ result, /* Number */ pos = 0) {\n // result - we create new Buffer for results\n if (!result) result = Buffer.alloc(data.length);\n // process input data\n for (let c of data) {\n const k = keys.next(); // save key byte\n result[pos++] = c ^ k; // save val\n keys.updateKeys(c); // update keys with decoded byte\n }\n return result;\n };\n}\n\nfunction decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) {\n if (!data || !Buffer.isBuffer(data) || data.length < 12) {\n return Buffer.alloc(0);\n }\n\n // 1. We Initialize and generate decrypting function\n const decrypter = make_decrypter(pwd);\n\n // 2. decrypt salt what is always 12 bytes and is a part of file content\n const salt = decrypter(data.slice(0, 12));\n\n // if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time\n // 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry\n const verifyByte = (header.flags & 0x8) === 0x8 ? header.timeHighByte : header.crc >>> 24;\n\n //3. does password meet expectations\n if (salt[11] !== verifyByte) {\n throw Errors.WRONG_PASSWORD();\n }\n\n // 4. decode content\n return decrypter(data.slice(12));\n}\n\n// lets add way to populate salt, NOT RECOMMENDED for production but maybe useful for testing general functionality\nfunction _salter(data) {\n if (Buffer.isBuffer(data) && data.length >= 12) {\n // be aware - currently salting buffer data is modified\n config.genSalt = function () {\n return data.slice(0, 12);\n };\n } else if (data === \"node\") {\n // test salt generation with node random function\n config.genSalt = genSalt.node;\n } else {\n // if value is not acceptable config gets reset.\n config.genSalt = genSalt;\n }\n}\n\nfunction encrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd, /*Boolean*/ oldlike = false) {\n // 1. test data if data is not Buffer we make buffer from it\n if (data == null) data = Buffer.alloc(0);\n // if data is not buffer be make buffer from it\n if (!Buffer.isBuffer(data)) data = Buffer.from(data.toString());\n\n // 2. We Initialize and generate encrypting function\n const encrypter = make_encrypter(pwd);\n\n // 3. generate salt (12-bytes of random data)\n const salt = config.genSalt();\n salt[11] = (header.crc >>> 24) & 0xff;\n\n // old implementations (before PKZip 2.04g) used two byte check\n if (oldlike) salt[10] = (header.crc >>> 16) & 0xff;\n\n // 4. create output\n const result = Buffer.alloc(data.length + 12);\n encrypter(salt, result);\n\n // finally encode content\n return encrypter(data, result, 12);\n}\n\nmodule.exports = { decrypt, encrypt, _salter };\n","exports.Deflater = require(\"./deflater\");\nexports.Inflater = require(\"./inflater\");\nexports.ZipCrypto = require(\"./zipcrypto\");\n","var Utils = require(\"./util\"),\n Headers = require(\"./headers\"),\n Constants = Utils.Constants,\n Methods = require(\"./methods\");\n\nmodule.exports = function (/** object */ options, /*Buffer*/ input) {\n var _centralHeader = new Headers.EntryHeader(),\n _entryName = Buffer.alloc(0),\n _comment = Buffer.alloc(0),\n _isDirectory = false,\n uncompressedData = null,\n _extra = Buffer.alloc(0),\n _extralocal = Buffer.alloc(0),\n _efs = true;\n\n // assign options\n const opts = options;\n\n const decoder = typeof opts.decoder === \"object\" ? opts.decoder : Utils.decoder;\n _efs = decoder.hasOwnProperty(\"efs\") ? decoder.efs : false;\n\n function getCompressedDataFromZip() {\n //if (!input || !Buffer.isBuffer(input)) {\n if (!input || !(input instanceof Uint8Array)) {\n return Buffer.alloc(0);\n }\n _extralocal = _centralHeader.loadLocalHeaderFromBinary(input);\n return input.slice(_centralHeader.realDataOffset, _centralHeader.realDataOffset + _centralHeader.compressedSize);\n }\n\n function crc32OK(data) {\n // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the local header is written\n if (!_centralHeader.flags_desc) {\n if (Utils.crc32(data) !== _centralHeader.localHeader.crc) {\n return false;\n }\n } else {\n const descriptor = {};\n const dataEndOffset = _centralHeader.realDataOffset + _centralHeader.compressedSize;\n // no descriptor after compressed data, instead new local header\n if (input.readUInt32LE(dataEndOffset) == Constants.LOCSIG || input.readUInt32LE(dataEndOffset) == Constants.CENSIG) {\n throw Utils.Errors.DESCRIPTOR_NOT_EXIST();\n }\n\n // get decriptor data\n if (input.readUInt32LE(dataEndOffset) == Constants.EXTSIG) {\n // descriptor with signature\n descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC);\n descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ);\n descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN);\n } else if (input.readUInt16LE(dataEndOffset + 12) === 0x4b50) {\n // descriptor without signature (we check is new header starting where we expect)\n descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC - 4);\n descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ - 4);\n descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN - 4);\n } else {\n throw Utils.Errors.DESCRIPTOR_UNKNOWN();\n }\n\n // check data integrity\n if (descriptor.compressedSize !== _centralHeader.compressedSize || descriptor.size !== _centralHeader.size || descriptor.crc !== _centralHeader.crc) {\n throw Utils.Errors.DESCRIPTOR_FAULTY();\n }\n if (Utils.crc32(data) !== descriptor.crc) {\n return false;\n }\n\n // @TODO: zip64 bit descriptor fields\n // if bit 3 is set and any value in local header \"zip64 Extended information\" extra field are set 0 (place holder)\n // then 64-bit descriptor format is used instead of 32-bit\n // central header - \"zip64 Extended information\" extra field should store real values and not place holders\n }\n return true;\n }\n\n function decompress(/*Boolean*/ async, /*Function*/ callback, /*String, Buffer*/ pass) {\n if (typeof callback === \"undefined\" && typeof async === \"string\") {\n pass = async;\n async = void 0;\n }\n if (_isDirectory) {\n if (async && callback) {\n callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR()); //si added error.\n }\n return Buffer.alloc(0);\n }\n\n var compressedData = getCompressedDataFromZip();\n\n if (compressedData.length === 0) {\n // File is empty, nothing to decompress.\n if (async && callback) callback(compressedData);\n return compressedData;\n }\n\n if (_centralHeader.encrypted) {\n if (\"string\" !== typeof pass && !Buffer.isBuffer(pass)) {\n throw Utils.Errors.INVALID_PASS_PARAM();\n }\n compressedData = Methods.ZipCrypto.decrypt(compressedData, _centralHeader, pass);\n }\n\n var data = Buffer.alloc(_centralHeader.size);\n\n switch (_centralHeader.method) {\n case Utils.Constants.STORED:\n compressedData.copy(data);\n if (!crc32OK(data)) {\n if (async && callback) callback(data, Utils.Errors.BAD_CRC()); //si added error\n throw Utils.Errors.BAD_CRC();\n } else {\n //si added otherwise did not seem to return data.\n if (async && callback) callback(data);\n return data;\n }\n case Utils.Constants.DEFLATED:\n var inflater = new Methods.Inflater(compressedData, _centralHeader.size);\n if (!async) {\n const result = inflater.inflate(data);\n result.copy(data, 0);\n if (!crc32OK(data)) {\n throw Utils.Errors.BAD_CRC(`\"${decoder.decode(_entryName)}\"`);\n }\n return data;\n } else {\n inflater.inflateAsync(function (result) {\n result.copy(result, 0);\n if (callback) {\n if (!crc32OK(result)) {\n callback(result, Utils.Errors.BAD_CRC()); //si added error\n } else {\n callback(result);\n }\n }\n });\n }\n break;\n default:\n if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD());\n throw Utils.Errors.UNKNOWN_METHOD();\n }\n }\n\n function compress(/*Boolean*/ async, /*Function*/ callback) {\n if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) {\n // no data set or the data wasn't changed to require recompression\n if (async && callback) callback(getCompressedDataFromZip());\n return getCompressedDataFromZip();\n }\n\n if (uncompressedData.length && !_isDirectory) {\n var compressedData;\n // Local file header\n switch (_centralHeader.method) {\n case Utils.Constants.STORED:\n _centralHeader.compressedSize = _centralHeader.size;\n\n compressedData = Buffer.alloc(uncompressedData.length);\n uncompressedData.copy(compressedData);\n\n if (async && callback) callback(compressedData);\n return compressedData;\n default:\n case Utils.Constants.DEFLATED:\n var deflater = new Methods.Deflater(uncompressedData);\n if (!async) {\n var deflated = deflater.deflate();\n _centralHeader.compressedSize = deflated.length;\n return deflated;\n } else {\n deflater.deflateAsync(function (data) {\n compressedData = Buffer.alloc(data.length);\n _centralHeader.compressedSize = data.length;\n data.copy(compressedData);\n callback && callback(compressedData);\n });\n }\n deflater = null;\n break;\n }\n } else if (async && callback) {\n callback(Buffer.alloc(0));\n } else {\n return Buffer.alloc(0);\n }\n }\n\n function readUInt64LE(buffer, offset) {\n return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset);\n }\n\n function parseExtra(data) {\n try {\n var offset = 0;\n var signature, size, part;\n while (offset + 4 < data.length) {\n signature = data.readUInt16LE(offset);\n offset += 2;\n size = data.readUInt16LE(offset);\n offset += 2;\n part = data.slice(offset, offset + size);\n offset += size;\n if (Constants.ID_ZIP64 === signature) {\n parseZip64ExtendedInformation(part);\n }\n }\n } catch (error) {\n throw Utils.Errors.EXTRA_FIELD_PARSE_ERROR();\n }\n }\n\n //Override header field values with values from the ZIP64 extra field\n function parseZip64ExtendedInformation(data) {\n var size, compressedSize, offset, diskNumStart;\n\n if (data.length >= Constants.EF_ZIP64_SCOMP) {\n size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP);\n if (_centralHeader.size === Constants.EF_ZIP64_OR_32) {\n _centralHeader.size = size;\n }\n }\n if (data.length >= Constants.EF_ZIP64_RHO) {\n compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP);\n if (_centralHeader.compressedSize === Constants.EF_ZIP64_OR_32) {\n _centralHeader.compressedSize = compressedSize;\n }\n }\n if (data.length >= Constants.EF_ZIP64_DSN) {\n offset = readUInt64LE(data, Constants.EF_ZIP64_RHO);\n if (_centralHeader.offset === Constants.EF_ZIP64_OR_32) {\n _centralHeader.offset = offset;\n }\n }\n if (data.length >= Constants.EF_ZIP64_DSN + 4) {\n diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN);\n if (_centralHeader.diskNumStart === Constants.EF_ZIP64_OR_16) {\n _centralHeader.diskNumStart = diskNumStart;\n }\n }\n }\n\n return {\n get entryName() {\n return decoder.decode(_entryName);\n },\n get rawEntryName() {\n return _entryName;\n },\n set entryName(val) {\n _entryName = Utils.toBuffer(val, decoder.encode);\n var lastChar = _entryName[_entryName.length - 1];\n _isDirectory = lastChar === 47 || lastChar === 92;\n _centralHeader.fileNameLength = _entryName.length;\n },\n\n get efs() {\n if (typeof _efs === \"function\") {\n return _efs(this.entryName);\n } else {\n return _efs;\n }\n },\n\n get extra() {\n return _extra;\n },\n set extra(val) {\n _extra = val;\n _centralHeader.extraLength = val.length;\n parseExtra(val);\n },\n\n get comment() {\n return decoder.decode(_comment);\n },\n set comment(val) {\n _comment = Utils.toBuffer(val, decoder.encode);\n _centralHeader.commentLength = _comment.length;\n if (_comment.length > 0xffff) throw Utils.Errors.COMMENT_TOO_LONG();\n },\n\n get name() {\n var n = decoder.decode(_entryName);\n return _isDirectory\n ? n\n .substr(n.length - 1)\n .split(\"/\")\n .pop()\n : n.split(\"/\").pop();\n },\n get isDirectory() {\n return _isDirectory;\n },\n\n getCompressedData: function () {\n return compress(false, null);\n },\n\n getCompressedDataAsync: function (/*Function*/ callback) {\n compress(true, callback);\n },\n\n setData: function (value) {\n uncompressedData = Utils.toBuffer(value, Utils.decoder.encode);\n if (!_isDirectory && uncompressedData.length) {\n _centralHeader.size = uncompressedData.length;\n _centralHeader.method = Utils.Constants.DEFLATED;\n _centralHeader.crc = Utils.crc32(value);\n _centralHeader.changed = true;\n } else {\n // folders and blank files should be stored\n _centralHeader.method = Utils.Constants.STORED;\n }\n },\n\n getData: function (pass) {\n if (_centralHeader.changed) {\n return uncompressedData;\n } else {\n return decompress(false, null, pass);\n }\n },\n\n getDataAsync: function (/*Function*/ callback, pass) {\n if (_centralHeader.changed) {\n callback(uncompressedData);\n } else {\n decompress(true, callback, pass);\n }\n },\n\n set attr(attr) {\n _centralHeader.attr = attr;\n },\n get attr() {\n return _centralHeader.attr;\n },\n\n set header(/*Buffer*/ data) {\n _centralHeader.loadFromBinary(data);\n },\n\n get header() {\n return _centralHeader;\n },\n\n packCentralHeader: function () {\n _centralHeader.flags_efs = this.efs;\n _centralHeader.extraLength = _extra.length;\n // 1. create header (buffer)\n var header = _centralHeader.centralHeaderToBinary();\n var addpos = Utils.Constants.CENHDR;\n // 2. add file name\n _entryName.copy(header, addpos);\n addpos += _entryName.length;\n // 3. add extra data\n _extra.copy(header, addpos);\n addpos += _centralHeader.extraLength;\n // 4. add file comment\n _comment.copy(header, addpos);\n return header;\n },\n\n packLocalHeader: function () {\n let addpos = 0;\n _centralHeader.flags_efs = this.efs;\n _centralHeader.extraLocalLength = _extralocal.length;\n // 1. construct local header Buffer\n const localHeaderBuf = _centralHeader.localHeaderToBinary();\n // 2. localHeader - crate header buffer\n const localHeader = Buffer.alloc(localHeaderBuf.length + _entryName.length + _centralHeader.extraLocalLength);\n // 2.1 add localheader\n localHeaderBuf.copy(localHeader, addpos);\n addpos += localHeaderBuf.length;\n // 2.2 add file name\n _entryName.copy(localHeader, addpos);\n addpos += _entryName.length;\n // 2.3 add extra field\n _extralocal.copy(localHeader, addpos);\n addpos += _extralocal.length;\n\n return localHeader;\n },\n\n toJSON: function () {\n const bytes = function (nr) {\n return \"<\" + ((nr && nr.length + \" bytes buffer\") || \"null\") + \">\";\n };\n\n return {\n entryName: this.entryName,\n name: this.name,\n comment: this.comment,\n isDirectory: this.isDirectory,\n header: _centralHeader.toJSON(),\n compressedData: bytes(input),\n data: bytes(uncompressedData)\n };\n },\n\n toString: function () {\n return JSON.stringify(this.toJSON(), null, \"\\t\");\n }\n };\n};\n","const ZipEntry = require(\"./zipEntry\");\nconst Headers = require(\"./headers\");\nconst Utils = require(\"./util\");\n\nmodule.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) {\n var entryList = [],\n entryTable = {},\n _comment = Buffer.alloc(0),\n mainHeader = new Headers.MainHeader(),\n loadedEntries = false;\n var password = null;\n const temporary = new Set();\n\n // assign options\n const opts = options;\n\n const { noSort, decoder } = opts;\n\n if (inBuffer) {\n // is a memory buffer\n readMainHeader(opts.readEntries);\n } else {\n // none. is a new file\n loadedEntries = true;\n }\n\n function makeTemporaryFolders() {\n const foldersList = new Set();\n\n // Make list of all folders in file\n for (const elem of Object.keys(entryTable)) {\n const elements = elem.split(\"/\");\n elements.pop(); // filename\n if (!elements.length) continue; // no folders\n for (let i = 0; i < elements.length; i++) {\n const sub = elements.slice(0, i + 1).join(\"/\") + \"/\";\n foldersList.add(sub);\n }\n }\n\n // create missing folders as temporary\n for (const elem of foldersList) {\n if (!(elem in entryTable)) {\n const tempfolder = new ZipEntry(opts);\n tempfolder.entryName = elem;\n tempfolder.attr = 0x10;\n tempfolder.temporary = true;\n entryList.push(tempfolder);\n entryTable[tempfolder.entryName] = tempfolder;\n temporary.add(tempfolder);\n }\n }\n }\n\n function readEntries() {\n loadedEntries = true;\n entryTable = {};\n if (mainHeader.diskEntries > (inBuffer.length - mainHeader.offset) / Utils.Constants.CENHDR) {\n throw Utils.Errors.DISK_ENTRY_TOO_LARGE();\n }\n entryList = new Array(mainHeader.diskEntries); // total number of entries\n var index = mainHeader.offset; // offset of first CEN header\n for (var i = 0; i < entryList.length; i++) {\n var tmp = index,\n entry = new ZipEntry(opts, inBuffer);\n entry.header = inBuffer.slice(tmp, (tmp += Utils.Constants.CENHDR));\n\n entry.entryName = inBuffer.slice(tmp, (tmp += entry.header.fileNameLength));\n\n if (entry.header.extraLength) {\n entry.extra = inBuffer.slice(tmp, (tmp += entry.header.extraLength));\n }\n\n if (entry.header.commentLength) entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength);\n\n index += entry.header.centralHeaderSize;\n\n entryList[i] = entry;\n entryTable[entry.entryName] = entry;\n }\n temporary.clear();\n makeTemporaryFolders();\n }\n\n function readMainHeader(/*Boolean*/ readNow) {\n var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size\n max = Math.max(0, i - 0xffff), // 0xFFFF is the max zip file comment length\n n = max,\n endStart = inBuffer.length,\n endOffset = -1, // Start offset of the END header\n commentEnd = 0;\n\n // option to search header form entire file\n const trailingSpace = typeof opts.trailingSpace === \"boolean\" ? opts.trailingSpace : false;\n if (trailingSpace) max = 0;\n\n for (i; i >= n; i--) {\n if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P'\n if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) {\n // \"PK\\005\\006\"\n endOffset = i;\n commentEnd = i;\n endStart = i + Utils.Constants.ENDHDR;\n // We already found a regular signature, let's look just a bit further to check if there's any zip64 signature\n n = i - Utils.Constants.END64HDR;\n continue;\n }\n\n if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) {\n // Found a zip64 signature, let's continue reading the whole zip64 record\n n = max;\n continue;\n }\n\n if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) {\n // Found the zip64 record, let's determine it's size\n endOffset = i;\n endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD;\n break;\n }\n }\n\n if (endOffset == -1) throw Utils.Errors.INVALID_FORMAT();\n\n mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart));\n if (mainHeader.commentLength) {\n _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR);\n }\n if (readNow) readEntries();\n }\n\n function sortEntries() {\n if (entryList.length > 1 && !noSort) {\n entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase()));\n }\n }\n\n return {\n /**\n * Returns an array of ZipEntry objects existent in the current opened archive\n * @return Array\n */\n get entries() {\n if (!loadedEntries) {\n readEntries();\n }\n return entryList.filter((e) => !temporary.has(e));\n },\n\n /**\n * Archive comment\n * @return {String}\n */\n get comment() {\n return decoder.decode(_comment);\n },\n set comment(val) {\n _comment = Utils.toBuffer(val, decoder.encode);\n mainHeader.commentLength = _comment.length;\n },\n\n getEntryCount: function () {\n if (!loadedEntries) {\n return mainHeader.diskEntries;\n }\n\n return entryList.length;\n },\n\n forEach: function (callback) {\n this.entries.forEach(callback);\n },\n\n /**\n * Returns a reference to the entry with the given name or null if entry is inexistent\n *\n * @param entryName\n * @return ZipEntry\n */\n getEntry: function (/*String*/ entryName) {\n if (!loadedEntries) {\n readEntries();\n }\n return entryTable[entryName] || null;\n },\n\n /**\n * Adds the given entry to the entry list\n *\n * @param entry\n */\n setEntry: function (/*ZipEntry*/ entry) {\n if (!loadedEntries) {\n readEntries();\n }\n entryList.push(entry);\n entryTable[entry.entryName] = entry;\n mainHeader.totalEntries = entryList.length;\n },\n\n /**\n * Removes the file with the given name from the entry list.\n *\n * If the entry is a directory, then all nested files and directories will be removed\n * @param entryName\n * @returns {void}\n */\n deleteFile: function (/*String*/ entryName, withsubfolders = true) {\n if (!loadedEntries) {\n readEntries();\n }\n const entry = entryTable[entryName];\n const list = this.getEntryChildren(entry, withsubfolders).map((child) => child.entryName);\n\n list.forEach(this.deleteEntry);\n },\n\n /**\n * Removes the entry with the given name from the entry list.\n *\n * @param {string} entryName\n * @returns {void}\n */\n deleteEntry: function (/*String*/ entryName) {\n if (!loadedEntries) {\n readEntries();\n }\n const entry = entryTable[entryName];\n const index = entryList.indexOf(entry);\n if (index >= 0) {\n entryList.splice(index, 1);\n delete entryTable[entryName];\n mainHeader.totalEntries = entryList.length;\n }\n },\n\n /**\n * Iterates and returns all nested files and directories of the given entry\n *\n * @param entry\n * @return Array\n */\n getEntryChildren: function (/*ZipEntry*/ entry, subfolders = true) {\n if (!loadedEntries) {\n readEntries();\n }\n if (typeof entry === \"object\") {\n if (entry.isDirectory && subfolders) {\n const list = [];\n const name = entry.entryName;\n\n for (const zipEntry of entryList) {\n if (zipEntry.entryName.startsWith(name)) {\n list.push(zipEntry);\n }\n }\n return list;\n } else {\n return [entry];\n }\n }\n return [];\n },\n\n /**\n * How many child elements entry has\n *\n * @param {ZipEntry} entry\n * @return {integer}\n */\n getChildCount: function (entry) {\n if (entry && entry.isDirectory) {\n const list = this.getEntryChildren(entry);\n return list.includes(entry) ? list.length - 1 : list.length;\n }\n return 0;\n },\n\n /**\n * Returns the zip file\n *\n * @return Buffer\n */\n compressToBuffer: function () {\n if (!loadedEntries) {\n readEntries();\n }\n sortEntries();\n\n const dataBlock = [];\n const headerBlocks = [];\n let totalSize = 0;\n let dindex = 0;\n\n mainHeader.size = 0;\n mainHeader.offset = 0;\n let totalEntries = 0;\n\n for (const entry of this.entries) {\n // compress data and set local and entry header accordingly. Reason why is called first\n const compressedData = entry.getCompressedData();\n entry.header.offset = dindex;\n\n // 1. construct local header\n const localHeader = entry.packLocalHeader();\n\n // 2. offsets\n const dataLength = localHeader.length + compressedData.length;\n dindex += dataLength;\n\n // 3. store values in sequence\n dataBlock.push(localHeader);\n dataBlock.push(compressedData);\n\n // 4. construct central header\n const centralHeader = entry.packCentralHeader();\n headerBlocks.push(centralHeader);\n // 5. update main header\n mainHeader.size += centralHeader.length;\n totalSize += dataLength + centralHeader.length;\n totalEntries++;\n }\n\n totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length\n // point to end of data and beginning of central directory first record\n mainHeader.offset = dindex;\n mainHeader.totalEntries = totalEntries;\n\n dindex = 0;\n const outBuffer = Buffer.alloc(totalSize);\n // write data blocks\n for (const content of dataBlock) {\n content.copy(outBuffer, dindex);\n dindex += content.length;\n }\n\n // write central directory entries\n for (const content of headerBlocks) {\n content.copy(outBuffer, dindex);\n dindex += content.length;\n }\n\n // write main header\n const mh = mainHeader.toBinary();\n if (_comment) {\n _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment\n }\n mh.copy(outBuffer, dindex);\n\n // Since we update entry and main header offsets,\n // they are no longer valid and we have to reset content\n // (Issue 64)\n\n inBuffer = outBuffer;\n loadedEntries = false;\n\n return outBuffer;\n },\n\n toAsyncBuffer: function (/*Function*/ onSuccess, /*Function*/ onFail, /*Function*/ onItemStart, /*Function*/ onItemEnd) {\n try {\n if (!loadedEntries) {\n readEntries();\n }\n sortEntries();\n\n const dataBlock = [];\n const centralHeaders = [];\n let totalSize = 0;\n let dindex = 0;\n let totalEntries = 0;\n\n mainHeader.size = 0;\n mainHeader.offset = 0;\n\n const compress2Buffer = function (entryLists) {\n if (entryLists.length > 0) {\n const entry = entryLists.shift();\n const name = entry.entryName + entry.extra.toString();\n if (onItemStart) onItemStart(name);\n entry.getCompressedDataAsync(function (compressedData) {\n if (onItemEnd) onItemEnd(name);\n entry.header.offset = dindex;\n\n // 1. construct local header\n const localHeader = entry.packLocalHeader();\n\n // 2. offsets\n const dataLength = localHeader.length + compressedData.length;\n dindex += dataLength;\n\n // 3. store values in sequence\n dataBlock.push(localHeader);\n dataBlock.push(compressedData);\n\n // central header\n const centalHeader = entry.packCentralHeader();\n centralHeaders.push(centalHeader);\n mainHeader.size += centalHeader.length;\n totalSize += dataLength + centalHeader.length;\n totalEntries++;\n\n compress2Buffer(entryLists);\n });\n } else {\n totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length\n // point to end of data and beginning of central directory first record\n mainHeader.offset = dindex;\n mainHeader.totalEntries = totalEntries;\n\n dindex = 0;\n const outBuffer = Buffer.alloc(totalSize);\n dataBlock.forEach(function (content) {\n content.copy(outBuffer, dindex); // write data blocks\n dindex += content.length;\n });\n centralHeaders.forEach(function (content) {\n content.copy(outBuffer, dindex); // write central directory entries\n dindex += content.length;\n });\n\n const mh = mainHeader.toBinary();\n if (_comment) {\n _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment\n }\n\n mh.copy(outBuffer, dindex); // write main header\n\n // Since we update entry and main header offsets, they are no\n // longer valid and we have to reset content using our new buffer\n // (Issue 64)\n\n inBuffer = outBuffer;\n loadedEntries = false;\n\n onSuccess(outBuffer);\n }\n };\n\n compress2Buffer(Array.from(this.entries));\n } catch (e) {\n onFail(e);\n }\n }\n };\n};\n","const Utils = require(\"./util\");\nconst pth = require(\"path\");\nconst ZipEntry = require(\"./zipEntry\");\nconst ZipFile = require(\"./zipFile\");\n\nconst get_Bool = (...val) => Utils.findLast(val, (c) => typeof c === \"boolean\");\nconst get_Str = (...val) => Utils.findLast(val, (c) => typeof c === \"string\");\nconst get_Fun = (...val) => Utils.findLast(val, (c) => typeof c === \"function\");\n\nconst defaultOptions = {\n // option \"noSort\" : if true it disables files sorting\n noSort: false,\n // read entries during load (initial loading may be slower)\n readEntries: false,\n // default method is none\n method: Utils.Constants.NONE,\n // file system\n fs: null\n};\n\nmodule.exports = function (/**String*/ input, /** object */ options) {\n let inBuffer = null;\n\n // create object based default options, allowing them to be overwritten\n const opts = Object.assign(Object.create(null), defaultOptions);\n\n // test input variable\n if (input && \"object\" === typeof input) {\n // if value is not buffer we accept it to be object with options\n if (!(input instanceof Uint8Array)) {\n Object.assign(opts, input);\n input = opts.input ? opts.input : undefined;\n if (opts.input) delete opts.input;\n }\n\n // if input is buffer\n if (Buffer.isBuffer(input)) {\n inBuffer = input;\n opts.method = Utils.Constants.BUFFER;\n input = undefined;\n }\n }\n\n // assign options\n Object.assign(opts, options);\n\n // instanciate utils filesystem\n const filetools = new Utils(opts);\n\n if (typeof opts.decoder !== \"object\" || typeof opts.decoder.encode !== \"function\" || typeof opts.decoder.decode !== \"function\") {\n opts.decoder = Utils.decoder;\n }\n\n // if input is file name we retrieve its content\n if (input && \"string\" === typeof input) {\n // load zip file\n if (filetools.fs.existsSync(input)) {\n opts.method = Utils.Constants.FILE;\n opts.filename = input;\n inBuffer = filetools.fs.readFileSync(input);\n } else {\n throw Utils.Errors.INVALID_FILENAME();\n }\n }\n\n // create variable\n const _zip = new ZipFile(inBuffer, opts);\n\n const { canonical, sanitize, zipnamefix } = Utils;\n\n function getEntry(/**Object*/ entry) {\n if (entry && _zip) {\n var item;\n // If entry was given as a file name\n if (typeof entry === \"string\") item = _zip.getEntry(pth.posix.normalize(entry));\n // if entry was given as a ZipEntry object\n if (typeof entry === \"object\" && typeof entry.entryName !== \"undefined\" && typeof entry.header !== \"undefined\") item = _zip.getEntry(entry.entryName);\n\n if (item) {\n return item;\n }\n }\n return null;\n }\n\n function fixPath(zipPath) {\n const { join, normalize, sep } = pth.posix;\n // convert windows file separators and normalize\n return join(\".\", normalize(sep + zipPath.split(\"\\\\\").join(sep) + sep));\n }\n\n function filenameFilter(filterfn) {\n if (filterfn instanceof RegExp) {\n // if filter is RegExp wrap it\n return (function (rx) {\n return function (filename) {\n return rx.test(filename);\n };\n })(filterfn);\n } else if (\"function\" !== typeof filterfn) {\n // if filter is not function we will replace it\n return () => true;\n }\n return filterfn;\n }\n\n // keep last character on folders\n const relativePath = (local, entry) => {\n let lastChar = entry.slice(-1);\n lastChar = lastChar === filetools.sep ? filetools.sep : \"\";\n return pth.relative(local, entry) + lastChar;\n };\n\n return {\n /**\n * Extracts the given entry from the archive and returns the content as a Buffer object\n * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry\n * @param {Buffer|string} [pass] - password\n * @return Buffer or Null in case of error\n */\n readFile: function (entry, pass) {\n var item = getEntry(entry);\n return (item && item.getData(pass)) || null;\n },\n\n /**\n * Returns how many child elements has on entry (directories) on files it is always 0\n * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry\n * @returns {integer}\n */\n childCount: function (entry) {\n const item = getEntry(entry);\n if (item) {\n return _zip.getChildCount(item);\n }\n },\n\n /**\n * Asynchronous readFile\n * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry\n * @param {callback} callback\n *\n * @return Buffer or Null in case of error\n */\n readFileAsync: function (entry, callback) {\n var item = getEntry(entry);\n if (item) {\n item.getDataAsync(callback);\n } else {\n callback(null, \"getEntry failed for:\" + entry);\n }\n },\n\n /**\n * Extracts the given entry from the archive and returns the content as plain text in the given encoding\n * @param {ZipEntry|string} entry - ZipEntry object or String with the full path of the entry\n * @param {string} encoding - Optional. If no encoding is specified utf8 is used\n *\n * @return String\n */\n readAsText: function (entry, encoding) {\n var item = getEntry(entry);\n if (item) {\n var data = item.getData();\n if (data && data.length) {\n return data.toString(encoding || \"utf8\");\n }\n }\n return \"\";\n },\n\n /**\n * Asynchronous readAsText\n * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry\n * @param {callback} callback\n * @param {string} [encoding] - Optional. If no encoding is specified utf8 is used\n *\n * @return String\n */\n readAsTextAsync: function (entry, callback, encoding) {\n var item = getEntry(entry);\n if (item) {\n item.getDataAsync(function (data, err) {\n if (err) {\n callback(data, err);\n return;\n }\n\n if (data && data.length) {\n callback(data.toString(encoding || \"utf8\"));\n } else {\n callback(\"\");\n }\n });\n } else {\n callback(\"\");\n }\n },\n\n /**\n * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory\n *\n * @param {ZipEntry|string} entry\n * @returns {void}\n */\n deleteFile: function (entry, withsubfolders = true) {\n // @TODO: test deleteFile\n var item = getEntry(entry);\n if (item) {\n _zip.deleteFile(item.entryName, withsubfolders);\n }\n },\n\n /**\n * Remove the entry from the file or directory without affecting any nested entries\n *\n * @param {ZipEntry|string} entry\n * @returns {void}\n */\n deleteEntry: function (entry) {\n // @TODO: test deleteEntry\n var item = getEntry(entry);\n if (item) {\n _zip.deleteEntry(item.entryName);\n }\n },\n\n /**\n * Adds a comment to the zip. The zip must be rewritten after adding the comment.\n *\n * @param {string} comment\n */\n addZipComment: function (comment) {\n // @TODO: test addZipComment\n _zip.comment = comment;\n },\n\n /**\n * Returns the zip comment\n *\n * @return String\n */\n getZipComment: function () {\n return _zip.comment || \"\";\n },\n\n /**\n * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment\n * The comment cannot exceed 65535 characters in length\n *\n * @param {ZipEntry} entry\n * @param {string} comment\n */\n addZipEntryComment: function (entry, comment) {\n var item = getEntry(entry);\n if (item) {\n item.comment = comment;\n }\n },\n\n /**\n * Returns the comment of the specified entry\n *\n * @param {ZipEntry} entry\n * @return String\n */\n getZipEntryComment: function (entry) {\n var item = getEntry(entry);\n if (item) {\n return item.comment || \"\";\n }\n return \"\";\n },\n\n /**\n * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content\n *\n * @param {ZipEntry} entry\n * @param {Buffer} content\n */\n updateFile: function (entry, content) {\n var item = getEntry(entry);\n if (item) {\n item.setData(content);\n }\n },\n\n /**\n * Adds a file from the disk to the archive\n *\n * @param {string} localPath File to add to zip\n * @param {string} [zipPath] Optional path inside the zip\n * @param {string} [zipName] Optional name for the file\n * @param {string} [comment] Optional file comment\n */\n addLocalFile: function (localPath, zipPath, zipName, comment) {\n if (filetools.fs.existsSync(localPath)) {\n // fix ZipPath\n zipPath = zipPath ? fixPath(zipPath) : \"\";\n\n // p - local file name\n const p = pth.win32.basename(pth.win32.normalize(localPath));\n\n // add file name into zippath\n zipPath += zipName ? zipName : p;\n\n // read file attributes\n const _attr = filetools.fs.statSync(localPath);\n\n // get file content\n const data = _attr.isFile() ? filetools.fs.readFileSync(localPath) : Buffer.alloc(0);\n\n // if folder\n if (_attr.isDirectory()) zipPath += filetools.sep;\n\n // add file into zip file\n this.addFile(zipPath, data, comment, _attr);\n } else {\n throw Utils.Errors.FILE_NOT_FOUND(localPath);\n }\n },\n\n /**\n * Callback for showing if everything was done.\n *\n * @callback doneCallback\n * @param {Error} err - Error object\n * @param {boolean} done - was request fully completed\n */\n\n /**\n * Adds a file from the disk to the archive\n *\n * @param {(object|string)} options - options object, if it is string it us used as localPath.\n * @param {string} options.localPath - Local path to the file.\n * @param {string} [options.comment] - Optional file comment.\n * @param {string} [options.zipPath] - Optional path inside the zip\n * @param {string} [options.zipName] - Optional name for the file\n * @param {doneCallback} callback - The callback that handles the response.\n */\n addLocalFileAsync: function (options, callback) {\n options = typeof options === \"object\" ? options : { localPath: options };\n const localPath = pth.resolve(options.localPath);\n const { comment } = options;\n let { zipPath, zipName } = options;\n const self = this;\n\n filetools.fs.stat(localPath, function (err, stats) {\n if (err) return callback(err, false);\n // fix ZipPath\n zipPath = zipPath ? fixPath(zipPath) : \"\";\n // p - local file name\n const p = pth.win32.basename(pth.win32.normalize(localPath));\n // add file name into zippath\n zipPath += zipName ? zipName : p;\n\n if (stats.isFile()) {\n filetools.fs.readFile(localPath, function (err, data) {\n if (err) return callback(err, false);\n self.addFile(zipPath, data, comment, stats);\n return setImmediate(callback, undefined, true);\n });\n } else if (stats.isDirectory()) {\n zipPath += filetools.sep;\n self.addFile(zipPath, Buffer.alloc(0), comment, stats);\n return setImmediate(callback, undefined, true);\n }\n });\n },\n\n /**\n * Adds a local directory and all its nested files and directories to the archive\n *\n * @param {string} localPath - local path to the folder\n * @param {string} [zipPath] - optional path inside zip\n * @param {(RegExp|function)} [filter] - optional RegExp or Function if files match will be included.\n */\n addLocalFolder: function (localPath, zipPath, filter) {\n // Prepare filter\n filter = filenameFilter(filter);\n\n // fix ZipPath\n zipPath = zipPath ? fixPath(zipPath) : \"\";\n\n // normalize the path first\n localPath = pth.normalize(localPath);\n\n if (filetools.fs.existsSync(localPath)) {\n const items = filetools.findFiles(localPath);\n const self = this;\n\n if (items.length) {\n for (const filepath of items) {\n const p = pth.join(zipPath, relativePath(localPath, filepath));\n if (filter(p)) {\n self.addLocalFile(filepath, pth.dirname(p));\n }\n }\n }\n } else {\n throw Utils.Errors.FILE_NOT_FOUND(localPath);\n }\n },\n\n /**\n * Asynchronous addLocalFolder\n * @param {string} localPath\n * @param {callback} callback\n * @param {string} [zipPath] optional path inside zip\n * @param {RegExp|function} [filter] optional RegExp or Function if files match will\n * be included.\n */\n addLocalFolderAsync: function (localPath, callback, zipPath, filter) {\n // Prepare filter\n filter = filenameFilter(filter);\n\n // fix ZipPath\n zipPath = zipPath ? fixPath(zipPath) : \"\";\n\n // normalize the path first\n localPath = pth.normalize(localPath);\n\n var self = this;\n filetools.fs.open(localPath, \"r\", function (err) {\n if (err && err.code === \"ENOENT\") {\n callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath));\n } else if (err) {\n callback(undefined, err);\n } else {\n var items = filetools.findFiles(localPath);\n var i = -1;\n\n var next = function () {\n i += 1;\n if (i < items.length) {\n var filepath = items[i];\n var p = relativePath(localPath, filepath).split(\"\\\\\").join(\"/\"); //windows fix\n p = p\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/[^\\x20-\\x7E]/g, \"\"); // accent fix\n if (filter(p)) {\n filetools.fs.stat(filepath, function (er0, stats) {\n if (er0) callback(undefined, er0);\n if (stats.isFile()) {\n filetools.fs.readFile(filepath, function (er1, data) {\n if (er1) {\n callback(undefined, er1);\n } else {\n self.addFile(zipPath + p, data, \"\", stats);\n next();\n }\n });\n } else {\n self.addFile(zipPath + p + \"/\", Buffer.alloc(0), \"\", stats);\n next();\n }\n });\n } else {\n process.nextTick(() => {\n next();\n });\n }\n } else {\n callback(true, undefined);\n }\n };\n\n next();\n }\n });\n },\n\n /**\n * Adds a local directory and all its nested files and directories to the archive\n *\n * @param {object | string} options - options object, if it is string it us used as localPath.\n * @param {string} options.localPath - Local path to the folder.\n * @param {string} [options.zipPath] - optional path inside zip.\n * @param {RegExp|function} [options.filter] - optional RegExp or Function if files match will be included.\n * @param {function|string} [options.namefix] - optional function to help fix filename\n * @param {doneCallback} callback - The callback that handles the response.\n *\n */\n addLocalFolderAsync2: function (options, callback) {\n const self = this;\n options = typeof options === \"object\" ? options : { localPath: options };\n localPath = pth.resolve(fixPath(options.localPath));\n let { zipPath, filter, namefix } = options;\n\n if (filter instanceof RegExp) {\n filter = (function (rx) {\n return function (filename) {\n return rx.test(filename);\n };\n })(filter);\n } else if (\"function\" !== typeof filter) {\n filter = function () {\n return true;\n };\n }\n\n // fix ZipPath\n zipPath = zipPath ? fixPath(zipPath) : \"\";\n\n // Check Namefix function\n if (namefix == \"latin1\") {\n namefix = (str) =>\n str\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/[^\\x20-\\x7E]/g, \"\"); // accent fix (latin1 characers only)\n }\n\n if (typeof namefix !== \"function\") namefix = (str) => str;\n\n // internal, create relative path + fix the name\n const relPathFix = (entry) => pth.join(zipPath, namefix(relativePath(localPath, entry)));\n const fileNameFix = (entry) => pth.win32.basename(pth.win32.normalize(namefix(entry)));\n\n filetools.fs.open(localPath, \"r\", function (err) {\n if (err && err.code === \"ENOENT\") {\n callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath));\n } else if (err) {\n callback(undefined, err);\n } else {\n filetools.findFilesAsync(localPath, function (err, fileEntries) {\n if (err) return callback(err);\n fileEntries = fileEntries.filter((dir) => filter(relPathFix(dir)));\n if (!fileEntries.length) callback(undefined, false);\n\n setImmediate(\n fileEntries.reverse().reduce(function (next, entry) {\n return function (err, done) {\n if (err || done === false) return setImmediate(next, err, false);\n\n self.addLocalFileAsync(\n {\n localPath: entry,\n zipPath: pth.dirname(relPathFix(entry)),\n zipName: fileNameFix(entry)\n },\n next\n );\n };\n }, callback)\n );\n });\n }\n });\n },\n\n /**\n * Adds a local directory and all its nested files and directories to the archive\n *\n * @param {string} localPath - path where files will be extracted\n * @param {object} props - optional properties\n * @param {string} [props.zipPath] - optional path inside zip\n * @param {RegExp|function} [props.filter] - optional RegExp or Function if files match will be included.\n * @param {function|string} [props.namefix] - optional function to help fix filename\n */\n addLocalFolderPromise: function (localPath, props) {\n return new Promise((resolve, reject) => {\n this.addLocalFolderAsync2(Object.assign({ localPath }, props), (err, done) => {\n if (err) reject(err);\n if (done) resolve(this);\n });\n });\n },\n\n /**\n * Allows you to create a entry (file or directory) in the zip file.\n * If you want to create a directory the entryName must end in / and a null buffer should be provided.\n * Comment and attributes are optional\n *\n * @param {string} entryName\n * @param {Buffer | string} content - file content as buffer or utf8 coded string\n * @param {string} [comment] - file comment\n * @param {number | object} [attr] - number as unix file permissions, object as filesystem Stats object\n */\n addFile: function (entryName, content, comment, attr) {\n entryName = zipnamefix(entryName);\n let entry = getEntry(entryName);\n const update = entry != null;\n\n // prepare new entry\n if (!update) {\n entry = new ZipEntry(opts);\n entry.entryName = entryName;\n }\n entry.comment = comment || \"\";\n\n const isStat = \"object\" === typeof attr && attr instanceof filetools.fs.Stats;\n\n // last modification time from file stats\n if (isStat) {\n entry.header.time = attr.mtime;\n }\n\n // Set file attribute\n var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag)\n\n // extended attributes field for Unix\n // set file type either S_IFDIR / S_IFREG\n let unix = entry.isDirectory ? 0x4000 : 0x8000;\n\n if (isStat) {\n // File attributes from file stats\n unix |= 0xfff & attr.mode;\n } else if (\"number\" === typeof attr) {\n // attr from given attr values\n unix |= 0xfff & attr;\n } else {\n // Default values:\n unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--)\n }\n\n fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes\n\n entry.attr = fileattr;\n\n entry.setData(content);\n if (!update) _zip.setEntry(entry);\n\n return entry;\n },\n\n /**\n * Returns an array of ZipEntry objects representing the files and folders inside the archive\n *\n * @param {string} [password]\n * @returns Array\n */\n getEntries: function (password) {\n _zip.password = password;\n return _zip ? _zip.entries : [];\n },\n\n /**\n * Returns a ZipEntry object representing the file or folder specified by ``name``.\n *\n * @param {string} name\n * @return ZipEntry\n */\n getEntry: function (/**String*/ name) {\n return getEntry(name);\n },\n\n getEntryCount: function () {\n return _zip.getEntryCount();\n },\n\n forEach: function (callback) {\n return _zip.forEach(callback);\n },\n\n /**\n * Extracts the given entry to the given targetPath\n * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted\n *\n * @param {string|ZipEntry} entry - ZipEntry object or String with the full path of the entry\n * @param {string} targetPath - Target folder where to write the file\n * @param {boolean} [maintainEntryPath=true] - If maintainEntryPath is true and the entry is inside a folder, the entry folder will be created in targetPath as well. Default is TRUE\n * @param {boolean} [overwrite=false] - If the file already exists at the target path, the file will be overwriten if this is true.\n * @param {boolean} [keepOriginalPermission=false] - The file will be set as the permission from the entry if this is true.\n * @param {string} [outFileName] - String If set will override the filename of the extracted file (Only works if the entry is a file)\n *\n * @return Boolean\n */\n extractEntryTo: function (entry, targetPath, maintainEntryPath, overwrite, keepOriginalPermission, outFileName) {\n overwrite = get_Bool(false, overwrite);\n keepOriginalPermission = get_Bool(false, keepOriginalPermission);\n maintainEntryPath = get_Bool(true, maintainEntryPath);\n outFileName = get_Str(keepOriginalPermission, outFileName);\n\n var item = getEntry(entry);\n if (!item) {\n throw Utils.Errors.NO_ENTRY();\n }\n\n var entryName = canonical(item.entryName);\n\n var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName));\n\n if (item.isDirectory) {\n var children = _zip.getEntryChildren(item);\n children.forEach(function (child) {\n if (child.isDirectory) return;\n var content = child.getData();\n if (!content) {\n throw Utils.Errors.CANT_EXTRACT_FILE();\n }\n var name = canonical(child.entryName);\n var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name));\n // The reverse operation for attr depend on method addFile()\n const fileAttr = keepOriginalPermission ? child.header.fileAttr : undefined;\n filetools.writeFileTo(childName, content, overwrite, fileAttr);\n });\n return true;\n }\n\n var content = item.getData(_zip.password);\n if (!content) throw Utils.Errors.CANT_EXTRACT_FILE();\n\n if (filetools.fs.existsSync(target) && !overwrite) {\n throw Utils.Errors.CANT_OVERRIDE();\n }\n // The reverse operation for attr depend on method addFile()\n const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;\n filetools.writeFileTo(target, content, overwrite, fileAttr);\n\n return true;\n },\n\n /**\n * Test the archive\n * @param {string} [pass]\n */\n test: function (pass) {\n if (!_zip) {\n return false;\n }\n\n for (var entry in _zip.entries) {\n try {\n if (entry.isDirectory) {\n continue;\n }\n var content = _zip.entries[entry].getData(pass);\n if (!content) {\n return false;\n }\n } catch (err) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Extracts the entire archive to the given location\n *\n * @param {string} targetPath Target location\n * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true.\n * Default is FALSE\n * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true.\n * Default is FALSE\n * @param {string|Buffer} [pass] password\n */\n extractAllTo: function (targetPath, overwrite, keepOriginalPermission, pass) {\n keepOriginalPermission = get_Bool(false, keepOriginalPermission);\n pass = get_Str(keepOriginalPermission, pass);\n overwrite = get_Bool(false, overwrite);\n if (!_zip) throw Utils.Errors.NO_ZIP();\n\n _zip.entries.forEach(function (entry) {\n var entryName = sanitize(targetPath, canonical(entry.entryName));\n if (entry.isDirectory) {\n filetools.makeDir(entryName);\n return;\n }\n var content = entry.getData(pass);\n if (!content) {\n throw Utils.Errors.CANT_EXTRACT_FILE();\n }\n // The reverse operation for attr depend on method addFile()\n const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;\n filetools.writeFileTo(entryName, content, overwrite, fileAttr);\n try {\n filetools.fs.utimesSync(entryName, entry.header.time, entry.header.time);\n } catch (err) {\n throw Utils.Errors.CANT_EXTRACT_FILE();\n }\n });\n },\n\n /**\n * Asynchronous extractAllTo\n *\n * @param {string} targetPath Target location\n * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true.\n * Default is FALSE\n * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true.\n * Default is FALSE\n * @param {function} callback The callback will be executed when all entries are extracted successfully or any error is thrown.\n */\n extractAllToAsync: function (targetPath, overwrite, keepOriginalPermission, callback) {\n callback = get_Fun(overwrite, keepOriginalPermission, callback);\n keepOriginalPermission = get_Bool(false, keepOriginalPermission);\n overwrite = get_Bool(false, overwrite);\n if (!callback) {\n return new Promise((resolve, reject) => {\n this.extractAllToAsync(targetPath, overwrite, keepOriginalPermission, function (err) {\n if (err) {\n reject(err);\n } else {\n resolve(this);\n }\n });\n });\n }\n if (!_zip) {\n callback(Utils.Errors.NO_ZIP());\n return;\n }\n\n targetPath = pth.resolve(targetPath);\n // convert entryName to\n const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName)));\n const getError = (msg, file) => new Error(msg + ': \"' + file + '\"');\n\n // separate directories from files\n const dirEntries = [];\n const fileEntries = [];\n _zip.entries.forEach((e) => {\n if (e.isDirectory) {\n dirEntries.push(e);\n } else {\n fileEntries.push(e);\n }\n });\n\n // Create directory entries first synchronously\n // this prevents race condition and assures folders are there before writing files\n for (const entry of dirEntries) {\n const dirPath = getPath(entry);\n // The reverse operation for attr depend on method addFile()\n const dirAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;\n try {\n filetools.makeDir(dirPath);\n if (dirAttr) filetools.fs.chmodSync(dirPath, dirAttr);\n // in unix timestamp will change if files are later added to folder, but still\n filetools.fs.utimesSync(dirPath, entry.header.time, entry.header.time);\n } catch (er) {\n callback(getError(\"Unable to create folder\", dirPath));\n }\n }\n\n fileEntries.reverse().reduce(function (next, entry) {\n return function (err) {\n if (err) {\n next(err);\n } else {\n const entryName = pth.normalize(canonical(entry.entryName));\n const filePath = sanitize(targetPath, entryName);\n entry.getDataAsync(function (content, err_1) {\n if (err_1) {\n next(err_1);\n } else if (!content) {\n next(Utils.Errors.CANT_EXTRACT_FILE());\n } else {\n // The reverse operation for attr depend on method addFile()\n const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;\n filetools.writeFileToAsync(filePath, content, overwrite, fileAttr, function (succ) {\n if (!succ) {\n next(getError(\"Unable to write file\", filePath));\n }\n filetools.fs.utimes(filePath, entry.header.time, entry.header.time, function (err_2) {\n if (err_2) {\n next(getError(\"Unable to set times\", filePath));\n } else {\n next();\n }\n });\n });\n }\n });\n }\n };\n }, callback)();\n },\n\n /**\n * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip\n *\n * @param {string} targetFileName\n * @param {function} callback\n */\n writeZip: function (targetFileName, callback) {\n if (arguments.length === 1) {\n if (typeof targetFileName === \"function\") {\n callback = targetFileName;\n targetFileName = \"\";\n }\n }\n\n if (!targetFileName && opts.filename) {\n targetFileName = opts.filename;\n }\n if (!targetFileName) return;\n\n var zipData = _zip.compressToBuffer();\n if (zipData) {\n var ok = filetools.writeFileTo(targetFileName, zipData, true);\n if (typeof callback === \"function\") callback(!ok ? new Error(\"failed\") : null, \"\");\n }\n },\n\n /**\n *\n * @param {string} targetFileName\n * @param {object} [props]\n * @param {boolean} [props.overwrite=true] If the file already exists at the target path, the file will be overwriten if this is true.\n * @param {boolean} [props.perm] The file will be set as the permission from the entry if this is true.\n\n * @returns {Promise<void>}\n */\n writeZipPromise: function (/**String*/ targetFileName, /* object */ props) {\n const { overwrite, perm } = Object.assign({ overwrite: true }, props);\n\n return new Promise((resolve, reject) => {\n // find file name\n if (!targetFileName && opts.filename) targetFileName = opts.filename;\n if (!targetFileName) reject(\"ADM-ZIP: ZIP File Name Missing\");\n\n this.toBufferPromise().then((zipData) => {\n const ret = (done) => (done ? resolve(done) : reject(\"ADM-ZIP: Wasn't able to write zip file\"));\n filetools.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret);\n }, reject);\n });\n },\n\n /**\n * @returns {Promise<Buffer>} A promise to the Buffer.\n */\n toBufferPromise: function () {\n return new Promise((resolve, reject) => {\n _zip.toAsyncBuffer(resolve, reject);\n });\n },\n\n /**\n * Returns the content of the entire zip file as a Buffer object\n *\n * @prop {function} [onSuccess]\n * @prop {function} [onFail]\n * @prop {function} [onItemStart]\n * @prop {function} [onItemEnd]\n * @returns {Buffer}\n */\n toBuffer: function (onSuccess, onFail, onItemStart, onItemEnd) {\n if (typeof onSuccess === \"function\") {\n _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd);\n return null;\n }\n return _zip.compressToBuffer();\n }\n };\n};\n","import { PluginEnv } from \"./types\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport AdmZip from \"adm-zip\";\nimport dedent from \"dedent\";\nimport https from \"https\";\nimport { VERTICAL_NAME } from \"./constants\";\nimport { createServicesMediaAndAddToPayload, createInquireService, getWixClient } from \"./wix-bookings-api\";\n\n\nconst timeFn = <A extends unknown[], R>(\n fn: (...args: A) => Promise<R> | R,\n): ((...args: A) => Promise<R>) => {\n return async (...args: A): Promise<R> => {\n const startTime = Date.now();\n try {\n const result = await fn(...args);\n return result as R;\n } finally {\n const endTime = Date.now();\n const duration = endTime - startTime;\n const durationInSeconds = duration / 1000;\n console.log(\n `[stores-plugin-setup] ${fn.name} took ${durationInSeconds}s`,\n );\n }\n };\n};\n\n/**\n * Install your vertical-specific functionality\n * This is where you would install Wix apps, configure settings, etc.\n */\nexport const installVertical = async (env: PluginEnv) => {\n console.log(`[${VERTICAL_NAME}-plugin-install] Installing vertical functionality...`, env);\n \n // TODO: Add your vertical-specific installation logic here\n // Examples:\n // - Install Wix apps via API calls\n // - Configure vertical-specific settings\n // - Set up initial data structures\n \n console.log(`[${VERTICAL_NAME}-plugin-install] Vertical installation completed`);\n};\n\nconst getSetupPrompt = () => {\n return dedent`\n You are a helpful assistant that generates mock data for a vertical.\n You will be given a user request and you will need to generate mock data for the vertical.\n\n # Output example:\n User request: Example of a user request\n\n # Output:\n \\`\\`\\`json\n {\n \"message\": \"Replace this with your actual mock data\",\n \"userRequest\": \"Example of a user request\",\n // Add your generated data here\n }\n \\`\\`\\`\n `;\n};\n\n/**\n * Generate mock data for your vertical\n * This is where you would create sample data for development/testing\n */\nexport const generateMockServices = async (env: PluginEnv) => {\n console.log(`[${VERTICAL_NAME}-plugin-generateData] Generating mock services...`);\n\n // you can replace all the code below with your own vertical-specific data generation logic\n // env.providers is a util for you to use the Wix Vibe LLM providers\n // besides generating the data payload,you can (and should) use env.generateImage to generate images for your data (according to the user request)\n \n const model = await (env.providers as any).getOpenAIProvider({\n model: \"O3_MINI_2025_01_31\" as any,\n tag: \"Bookings Setup Agent\",\n responseFormat: { type: \"json_object\" },\n });\n\n const userMessage = env.userRequest;\n\n const response = await model.doGenerate({\n prompt: [\n { role: \"system\", content: getSetupPrompt() },\n { role: \"user\", content: userMessage },\n ],\n inputFormat: \"messages\",\n mode: { type: \"regular\" },\n });\n\n if (!response?.text) {\n console.error(\n \"[bookings-plugin-setup] generateMockServices Error: No result text, skipping bookings setup\",\n { response, userMessage },\n );\n return {};\n }\n\n let parsedResult;\n try {\n parsedResult = JSON.parse(response.text!);\n } catch (error) {\n console.error(`[${VERTICAL_NAME}-plugin-generateData] Error parsing result:`, error);\n parsedResult = response.text;\n }\n\n console.log(\n `[${VERTICAL_NAME}-plugin-generateData] parsedResult`,\n parsedResult,\n );\n\n return parsedResult;\n};\n\nexport const createMockServicesInSite = timeFn(\n async (parsedResult: any, userRequest: string, env: PluginEnv) => {\n\n const client = await getWixClient(env);\n // create all mock products in the store:\n const apiCallResultsPromises = parsedResult.services.map(\n async (service: any) => {\n await createServicesMediaAndAddToPayload(\n service,\n userRequest as string,\n env.WIX_SITE_ID,\n env.generateImage,\n env.PHOTO_THEME,\n );\n return createInquireService(service, client);\n },\n );\n\n\n\n const apiCallResults = await Promise.all(apiCallResultsPromises);\n console.log(\n \"[bookings-plugin-setup] create services API call results\\n\\n\",\n \"==============================================\\n\\n\",\n JSON.stringify(apiCallResults, null, 2),\n \"\\n\\n======\\n\\n\",\n );\n },\n);\n\nasync function downloadZipFile(url: string, filePath: string): Promise<void> {\n return new Promise((resolve, reject) => {\n const file = fs.createWriteStream(filePath);\n\n const makeRequest = (requestUrl: string) => {\n https\n .get(requestUrl, (response) => {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Handle redirects\n const location = response.headers.location;\n if (location) {\n console.log(\n `[${VERTICAL_NAME}-plugin-setup] following redirect to: ${location}`,\n );\n makeRequest(location);\n return;\n }\n }\n\n if (response.statusCode !== 200) {\n reject(\n new Error(\n `Failed to download: ${response.statusCode} ${response.statusMessage}`,\n ),\n );\n return;\n }\n\n response.pipe(file);\n\n file.on(\"finish\", () => {\n file.close();\n resolve();\n });\n\n file.on(\"error\", (err) => {\n fs.unlink(filePath, () => {}); // Delete the file if there was an error\n reject(err);\n });\n })\n .on(\"error\", (err) => {\n reject(err);\n });\n };\n\n makeRequest(url);\n });\n}\n\n/**\n * Unzip and merge plugin files from the plugin-files package\n */\nexport const unzipAndMergePluginFiles = async (env: PluginEnv, zipUrl: string) => {\n console.log(`[${VERTICAL_NAME}-plugin-install] Unzipping plugin files from dependency...`);\n\n // Get zip path from the dependency\n //const { zipPath } = require(\"@wix/vibe-vertical-name-plugin-files\");\n \n const zipPath = path.join(process.cwd(), 'picasso-bookings-plugin-files.zip');\n const targetDir = path.join(env.CODEGEN_APP_ROOT, \"src\");\n\n try {\n console.log(`[${VERTICAL_NAME}-plugin-install] downloading zip file to:`, zipPath);\n await downloadZipFile(zipUrl, zipPath);\n // Unzip the file\n const zip = new AdmZip(zipPath);\n console.log(`[${VERTICAL_NAME}-plugin-install] Unzipping files...`);\n\n // Extract and merge files\n zip.getEntries().forEach((entry) => {\n if (!entry.isDirectory) {\n const entryPath = entry.entryName;\n const targetPath = path.join(targetDir, entryPath.replace(\"picasso-bookings-plugin-files/\", \"\"));\n\n // Create directory structure if needed\n const targetDirPath = path.dirname(targetPath);\n if (!fs.existsSync(targetDirPath)) {\n fs.mkdirSync(targetDirPath, { recursive: true });\n }\n\n // Write the file\n fs.writeFileSync(targetPath, entry.getData());\n console.log(`[${VERTICAL_NAME}-plugin-install] Extracted: ${targetPath}`);\n }\n });\n\n console.log(`[${VERTICAL_NAME}-plugin-install] Plugin files unzipped and merged successfully`);\n } catch (error) {\n console.error(`[${VERTICAL_NAME}-plugin-install] Error downloading or unzipping plugin files:`, error);\n throw error;\n }\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nconst dedent = createDedent({});\nexport default dedent;\nfunction createDedent(options) {\n dedent.withOptions = newOptions => createDedent(_objectSpread(_objectSpread({}, options), newOptions));\n return dedent;\n function dedent(strings, ...values) {\n const raw = typeof strings === \"string\" ? [strings] : strings.raw;\n const {\n escapeSpecialCharacters = Array.isArray(strings),\n trimWhitespace = true\n } = options;\n\n // first, perform interpolation\n let result = \"\";\n for (let i = 0; i < raw.length; i++) {\n let next = raw[i];\n if (escapeSpecialCharacters) {\n // handle escaped newlines, backticks, and interpolation characters\n next = next.replace(/\\\\\\n[ \\t]*/g, \"\").replace(/\\\\`/g, \"`\").replace(/\\\\\\$/g, \"$\").replace(/\\\\\\{/g, \"{\");\n }\n result += next;\n if (i < values.length) {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n result += values[i];\n }\n }\n\n // now strip indentation\n const lines = result.split(\"\\n\");\n let mindent = null;\n for (const l of lines) {\n const m = l.match(/^(\\s+)\\S+/);\n if (m) {\n const indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n }\n if (mindent !== null) {\n const m = mindent; // appease TypeScript\n result = lines\n // https://github.com/typescript-eslint/typescript-eslint/issues/7140\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n .map(l => l[0] === \" \" || l[0] === \"\\t\" ? l.slice(m) : l).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n if (trimWhitespace) {\n result = result.trim();\n }\n\n // handle escaped newlines at the end to ensure they don't get stripped too\n if (escapeSpecialCharacters) {\n result = result.replace(/\\\\n/g, \"\\n\");\n }\n return result;\n }\n}\n","// Add your vertical-specific constants here\n// Example:\nexport const PLUGIN_FILES_ZIP_URL = \"https://static.parastorage.com/services/vibe-bookings-plugin-files/d51711c5b9d8da7d8fc8a94b6a3294bfdebb9163b2472b61c0a91641/vibe-bookings-plugin-files-files.zip\";\nexport const VERTICAL_NAME = \"bookings\";","export const WIX_PROTOCOL = 'wix:';\nexport const SDKRequestToRESTRequestRenameMap = {\n _id: 'id',\n _createdDate: 'createdDate',\n _updatedDate: 'updatedDate',\n};\nexport const RESTResponseToSDKResponseRenameMap = {\n id: '_id',\n createdDate: '_createdDate',\n updatedDate: '_updatedDate',\n};\nexport const ITEMS_RESULT_PROPERTY_NAME = 'items';\nexport const PAGING_METADATA_RESULT_PROPERTY_NAME = 'pagingMetadata';\nexport const DEFAULT_LIMIT = 50;\n","import { WIX_PROTOCOL } from './constants.js';\nexport function alignIfLegacy(url, type) {\n const { protocol } = new URL(url);\n return protocol === `${type}:` ? `${WIX_PROTOCOL}${url}` : url;\n}\nexport function removeUndefinedKeys(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\n}\nexport function constantCase(input) {\n return split(input)\n .map((part) => part.toLocaleUpperCase())\n .join('_');\n}\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\nconst SPLIT_REPLACE_VALUE = '$1\\0$2';\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, '\\0');\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === '\\0') {\n start++;\n }\n if (start === end) {\n return [];\n }\n while (result.charAt(end - 1) === '\\0') {\n end--;\n }\n return result.slice(start, end).split(/\\0/g);\n}\n","import { constantCase } from './utils.js';\nconst isValidationError = (httpClientError) => 'validationError' in (httpClientError.response?.data?.details ?? {});\nconst isApplicationError = (httpClientError) => 'applicationError' in\n (httpClientError.response?.data?.details ?? {});\nconst isClientError = (httpClientError) => (httpClientError.response?.status ?? -1) >= 400 &&\n (httpClientError.response?.status ?? -1) < 500;\nexport function transformError(httpClientError, pathsToArguments = {\n explicitPathsToArguments: {},\n spreadPathsToArguments: {},\n singleArgumentUnchanged: false,\n}, argumentNames = []) {\n if (typeof httpClientError !== 'object' || httpClientError === null) {\n throw httpClientError;\n }\n if (isValidationError(httpClientError)) {\n return buildValidationError(httpClientError, pathsToArguments, argumentNames);\n }\n if (isApplicationError(httpClientError)) {\n return buildApplicationError(httpClientError);\n }\n if (isClientError(httpClientError)) {\n const status = httpClientError.response?.status;\n const statusText = httpClientError.response?.statusText ?? 'UNKNOWN';\n const message = httpClientError.response?.data?.message ?? statusText;\n const details = {\n applicationError: {\n description: statusText,\n code: constantCase(statusText),\n data: {},\n },\n requestId: httpClientError.requestId,\n };\n return wrapError(httpClientError, {\n message: JSON.stringify({\n message,\n details,\n }, null, 2),\n extraProperties: {\n details,\n status,\n },\n });\n }\n return buildSystemError(httpClientError);\n}\nconst buildValidationError = (httpClientError, pathsToArguments, argumentNames) => {\n const validationErrorResponse = httpClientError.response\n ?.data;\n const requestId = httpClientError.requestId;\n const { fieldViolations } = validationErrorResponse.details.validationError;\n const transformedFieldViolations = violationsWithRenamedFields(pathsToArguments, fieldViolations, argumentNames)?.sort((a, b) => (a.field < b.field ? -1 : 1));\n const message = `INVALID_ARGUMENT: ${transformedFieldViolations\n ?.map(({ field, description }) => `\"${field}\" ${description}`)\n ?.join(', ')}`;\n const details = {\n validationError: { fieldViolations: transformedFieldViolations },\n requestId,\n };\n return wrapError(httpClientError, {\n message: JSON.stringify({ message, details }, null, 2),\n extraProperties: {\n details,\n status: httpClientError.response?.status,\n requestId,\n },\n });\n};\nconst wrapError = (baseError, { message, extraProperties, }) => {\n return Object.assign(baseError, {\n ...extraProperties,\n message,\n });\n};\nconst buildApplicationError = (httpClientError) => {\n const status = httpClientError.response?.status;\n const statusText = httpClientError.response?.statusText ?? 'UNKNOWN';\n const message = httpClientError.response?.data?.message ?? statusText;\n const description = httpClientError.response?.data?.details?.applicationError?.description ??\n statusText;\n const code = httpClientError.response?.data?.details?.applicationError?.code ??\n constantCase(statusText);\n const data = httpClientError.response?.data?.details?.applicationError?.data ?? {};\n const combinedMessage = message === description ? message : `${message}: ${description}`;\n const details = {\n applicationError: {\n description,\n code,\n data,\n },\n requestId: httpClientError.requestId,\n };\n return wrapError(httpClientError, {\n message: JSON.stringify({ message: combinedMessage, details }, null, 2),\n extraProperties: {\n details,\n status,\n requestId: httpClientError.requestId,\n },\n });\n};\nconst buildSystemError = (httpClientError) => {\n const message = httpClientError.requestId\n ? `System error occurred, request-id: ${httpClientError.requestId}`\n : `System error occurred: ${JSON.stringify(httpClientError)}`;\n return wrapError(httpClientError, {\n message,\n extraProperties: {\n requestId: httpClientError.requestId,\n status: httpClientError.response?.status,\n code: constantCase(httpClientError.response?.statusText ?? 'UNKNOWN'),\n ...(!httpClientError.response && {\n runtimeError: httpClientError,\n }),\n },\n });\n};\nconst violationsWithRenamedFields = ({ spreadPathsToArguments, explicitPathsToArguments, singleArgumentUnchanged, }, fieldViolations, argumentNames) => {\n const allPathsToArguments = {\n ...spreadPathsToArguments,\n ...explicitPathsToArguments,\n };\n const allPathsToArgumentsKeys = Object.keys(allPathsToArguments);\n return fieldViolations\n ?.filter((fieldViolation) => {\n // In some cases, the violations error will include both some.nested and some.nested.path,\n // so we'll pick the more specific one if it's covered by the paths in the transformation.\n const containedInAMoreSpecificViolationField = fieldViolations.some((anotherViolation) => anotherViolation.field.length > fieldViolation.field.length &&\n anotherViolation.field.startsWith(fieldViolation.field) &&\n allPathsToArgumentsKeys.includes(anotherViolation.field));\n return !containedInAMoreSpecificViolationField;\n })\n .map((fieldViolation) => {\n // This means we've got some.nested.field in the violation,\n // matched against { some: { nested: { field: $[0].a.b.c } } } in the transformation.\n // some.nested.field is replaced entirely with $[0].a.b.c, with $[0] replaced with the name of argument 0\n const exactMatchArgumentExpression = explicitPathsToArguments[fieldViolation.field];\n if (exactMatchArgumentExpression) {\n return {\n ...fieldViolation,\n field: withRenamedArgument(exactMatchArgumentExpression, argumentNames),\n };\n }\n const longestPartialPathMatch = allPathsToArgumentsKeys\n ?.sort((a, b) => b.length - a.length)\n ?.find((path) => fieldViolation.field.startsWith(path));\n if (longestPartialPathMatch) {\n // This means we've got some.nested.field in the violation,\n // matched against { some: { nested: { *: $[0].a.b.c } } } in the transformation.\n // Only the prefix some.nested is replaced with $[0].a.b.c, with $[0] replaced with the name of argument 0\n // This can also happen in the case where the #wrap function is used.\n const partialMatchArgumentExpression = allPathsToArguments[longestPartialPathMatch];\n if (partialMatchArgumentExpression) {\n return {\n ...fieldViolation,\n field: fieldViolation.field.replace(longestPartialPathMatch, withRenamedArgument(partialMatchArgumentExpression, argumentNames)),\n };\n }\n }\n if (singleArgumentUnchanged) {\n return {\n ...fieldViolation,\n field: `${argumentNames[0]}.${fieldViolation.field}`,\n };\n }\n return fieldViolation;\n });\n};\nconst withRenamedArgument = (fieldValue, argumentNames) => {\n const argIndex = getArgumentIndex(fieldValue);\n if (argIndex !== null && typeof argIndex !== 'undefined') {\n return fieldValue.replace(`$[${argIndex}]`, argumentNames[argIndex]);\n }\n return fieldValue;\n};\nconst getArgumentIndex = (s) => {\n const match = s.match(/\\$\\[(?<argIndex>\\d+)\\]/);\n return match && match.groups && Number(match.groups.argIndex);\n};\n","import { RESTResponseToSDKResponseRenameMap, SDKRequestToRESTRequestRenameMap, } from './constants.js';\n/**\n * Recursively rename nested keys provided in `renameMap` in the given object.\n * Providing a list of paths to ignore will prevent renaming of keys in nested objects.\n *\n * Paths are provided in the format of 'path.to.nested.field'\n * @param payload The object to rename keys for\n * @param renameMap A map of keys to rename, where the key is the original key and the value is the new key\n * @param ignorePaths Paths of nested fields to ignore while traversing the object\n * @returns The object with renamed keys\n */\nexport function renameAllNestedKeys(payload, renameMap, ignorePaths) {\n const isIgnored = (path) => ignorePaths.includes(path);\n const traverse = (obj, path) => {\n if (Array.isArray(obj)) {\n obj.forEach((item) => {\n traverse(item, path);\n });\n }\n else if (typeof obj === 'object' && obj !== null) {\n const objAsRecord = obj;\n Object.keys(objAsRecord).forEach((key) => {\n const newPath = path === '' ? key : `${path}.${key}`;\n if (isIgnored(newPath)) {\n return;\n }\n if (key in renameMap && !(renameMap[key] in objAsRecord)) {\n objAsRecord[renameMap[key]] = objAsRecord[key];\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete objAsRecord[key];\n }\n traverse(objAsRecord[key], newPath);\n });\n }\n };\n traverse(payload, '');\n return payload;\n}\nexport function renameKeysFromSDKRequestToRESTRequest(payload, ignorePaths = []) {\n return renameAllNestedKeys(payload, SDKRequestToRESTRequestRenameMap, ignorePaths);\n}\nexport function renameKeysFromRESTResponseToSDKResponse(payload, ignorePaths = []) {\n return renameAllNestedKeys(payload, RESTResponseToSDKResponseRenameMap, ignorePaths);\n}\n","// src/event-handlers-modules.ts\nfunction EventDefinition(type, isDomainEvent = false, transformations = (x) => x) {\n return () => ({\n __type: \"event-definition\",\n type,\n isDomainEvent,\n transformations\n });\n}\n\n// src/service-plugins.ts\nfunction ServicePluginDefinition(componentType, methods) {\n return {\n __type: \"service-plugin-definition\",\n componentType,\n methods\n };\n}\nvar SERVICE_PLUGIN_ERROR_TYPE = \"wix_spi_error\";\nexport {\n EventDefinition,\n SERVICE_PLUGIN_ERROR_TYPE,\n ServicePluginDefinition\n};\n","// src/index.ts\nvar wixContext = {};\nexport {\n wixContext\n};\n","import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n getAuth() {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.auth;\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function getContextualAuth() {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.getAuth();\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n","import { contextualizeRESTModuleV2 } from './context-v2.js';\nexport function createRESTModule(descriptor, elevated = false) {\n return contextualizeRESTModuleV2(descriptor, elevated);\n}\nexport function toURLSearchParams(params, isComplexRequest) {\n const flatten = flattenParams(params);\n // payloads with deep arrays or complex arrays are not serializable as URLSearchParams\n const isPayloadNonSerializableAsUrlSearchParams = Object.entries(flatten).some(([key, value]) => key.includes('.') ||\n (Array.isArray(value) && value.some((v) => typeof v === 'object')));\n const shouldSerializeToRParam = isComplexRequest && isPayloadNonSerializableAsUrlSearchParams;\n if (shouldSerializeToRParam) {\n return new URLSearchParams({ '.r': base64Encode(JSON.stringify(params)) });\n }\n else {\n return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {\n // inorder to make `foo: [1,2]` turn into `foo=1&foo=2` and not `foo[]=1&foo[]=2`\n const keyParams = Array.isArray(value) ? value : [value];\n keyParams.forEach((param) => {\n if (param === undefined ||\n param === null ||\n (Array.isArray(value) && typeof param === 'object')) {\n return;\n }\n urlSearchParams.append(key, param);\n });\n return urlSearchParams;\n }, new URLSearchParams());\n }\n}\nexport function resolveUrl(opts) {\n const domain = resolveDomain(opts.host);\n const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);\n const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});\n return resolvePathFromMappings(path, mappings);\n}\nfunction flattenParams(data, path = '') {\n const params = {};\n Object.entries(data).forEach(([key, value]) => {\n const isObject = value !== null && typeof value === 'object' && !Array.isArray(value);\n const fieldPath = resolvePath(path, key);\n if (isObject) {\n const serializedObject = flattenParams(value, fieldPath);\n Object.assign(params, serializedObject);\n }\n else {\n params[fieldPath] = value;\n }\n });\n return params;\n}\nfunction resolvePath(path, key) {\n return `${path}${path ? '.' : ''}${key}`;\n}\nconst base64Encode = (value) => {\n const base64 = typeof btoa !== 'undefined'\n ? btoa(value)\n : Buffer.from(value, 'utf-8').toString('base64');\n return base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nconst DOMAINS = ['wix.com', 'editorx.com'];\nconst USER_DOMAIN = '_';\nconst REGEX_CAPTURE_DOMAINS = new RegExp(`\\\\.(${DOMAINS.join('|')})$`);\nconst WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net'];\nconst DEV_WIX_CODE_DOMAIN = 'dev.wix-code.com';\nconst REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;\nconst REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\\\.(${WIX_API_DOMAINS.join('|')})$`);\nconst REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\\\.${DEV_WIX_CODE_DOMAIN}$`);\nfunction resolveDomain(host) {\n const resolvedHost = fixHostExceptions(host);\n return resolvedHost\n .replace(REGEX_CAPTURE_DOMAINS, '._base_domain_')\n .replace(REGEX_CAPTURE_API_DOMAINS, '._api_base_domain_')\n .replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, '*.dev.wix-code.com');\n}\n// hosts which standard string replacing doesn't apply to them, will be fixed here.\nfunction fixHostExceptions(host) {\n // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom\n return host.replace('create.editorx.com', 'editor.editorx.com');\n}\nfunction resolveMappingsByDomain(domain, domainToMappings) {\n const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];\n if (!mappings) {\n if (isBaseDomain(domain)) {\n // fallback <lang>.wix.com sub domains to www.wix.com\n // since all of the languages subdomain are not mapped automatically in FP and we want to support those kind of calls\n // for example: fr.wix.com\n return domainToMappings[wwwBaseDomain];\n }\n }\n return mappings;\n}\nfunction isBaseDomain(domain) {\n return !!domain.match(/\\._base_domain_$/);\n}\nconst wwwBaseDomain = 'www._base_domain_';\nfunction injectDataIntoProtoPath(protoPath, data) {\n return protoPath\n .split('/')\n .map((path) => maybeProtoPathToData(path, data))\n .join('/');\n}\nfunction maybeProtoPathToData(protoPath, data) {\n const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];\n const field = protoRegExpMatch[1];\n if (field) {\n const suffix = protoPath.replace(protoRegExpMatch[0], '');\n return findByPath(data, field, protoPath, suffix);\n }\n return protoPath;\n}\nfunction findByPath(obj, path, defaultValue, suffix) {\n let result = obj;\n for (const field of path.split('.')) {\n if (!result) {\n return defaultValue;\n }\n result = result[field];\n }\n return `${result}${suffix}`;\n}\nfunction resolvePathFromMappings(protoPath, mappings) {\n const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));\n if (!mapping) {\n // todo: should we return the path? if no - what should we do in case of testings?\n return protoPath;\n }\n return mapping.srcPath + protoPath.slice(mapping.destPath.length);\n}\n","export function transformSDKTimestampToRESTTimestamp(val) {\n return val?.toISOString();\n}\nexport function transformRESTTimestampToSDKTimestamp(val) {\n return val ? new Date(val) : undefined;\n}\n","function transformPath(obj, { path, isRepeated, isMap, }, transformFn) {\n const pathParts = path.split('.');\n if (pathParts.length === 1 && path in obj) {\n obj[path] = isRepeated\n ? obj[path].map(transformFn)\n : isMap\n ? Object.fromEntries(Object.entries(obj[path]).map(([key, value]) => [key, transformFn(value)]))\n : transformFn(obj[path]);\n return obj;\n }\n const [first, ...rest] = pathParts;\n if (first.endsWith('{}')) {\n const cleanPath = first.slice(0, -2);\n obj[cleanPath] = Object.fromEntries(Object.entries(obj[cleanPath]).map(([key, value]) => [\n key,\n transformPath(value, { path: rest.join('.'), isRepeated, isMap }, transformFn),\n ]));\n }\n else if (Array.isArray(obj[first])) {\n obj[first] = obj[first].map((item) => transformPath(item, { path: rest.join('.'), isRepeated, isMap }, transformFn));\n }\n else if (first in obj &&\n typeof obj[first] === 'object' &&\n obj[first] !== null) {\n obj[first] = transformPath(obj[first], { path: rest.join('.'), isRepeated, isMap }, transformFn);\n }\n else if (first === '*') {\n Object.keys(obj).reduce((acc, curr) => {\n acc[curr] = transformPath(obj[curr], { path: rest.join('.'), isRepeated, isMap }, transformFn);\n return acc;\n }, obj);\n }\n return obj;\n}\nexport function transformPaths(obj, transformations) {\n return transformations.reduce((acc, { paths, transformFn }) => paths.reduce((transformerAcc, path) => transformPath(transformerAcc, path, transformFn), acc), obj);\n}\n","export function transformSDKFieldMaskToRESTFieldMask(val) {\n if (!val) {\n return val;\n }\n return val.join(',');\n}\nexport function transformRESTFieldMaskToSDKFieldMask(val) {\n if (!val) {\n return val;\n }\n /**\n * Support Scala FW JSON mapping bug, for more details see:\n *\n * https://github.com/wix-private/server-infra/issues/17953\n */\n if (typeof val === 'object') {\n return val.paths;\n }\n return val.split(',');\n}\n","export function isLogicalOperator(filter) {\n return isAndOperator(filter) || isOrOperator(filter) || isNotOperator(filter);\n}\nexport function isAndOperator(filter) {\n return (Object.keys(filter).length === 1 &&\n '$and' in filter &&\n Array.isArray(filter.$and));\n}\nexport function isOrOperator(filter) {\n return (Object.keys(filter).length === 1 &&\n '$or' in filter &&\n Array.isArray(filter.$or));\n}\nexport function isNotOperator(filter) {\n return (Object.keys(filter).length === 1 &&\n '$not' in filter &&\n typeof filter.$not === 'object');\n}\nexport function and(a, b) {\n if (typeof a === 'undefined' || Object.keys(a).length === 0) {\n return b;\n }\n else if (typeof b === 'undefined' || Object.keys(b).length === 0) {\n return a;\n }\n else {\n return {\n $and: [\n ...(isAndOperator(a) ? a.$and : [a]),\n ...(isAndOperator(b) ? b.$and : [b]),\n ],\n };\n }\n}\nexport function or(a, b) {\n if (typeof a === 'undefined' || Object.keys(a).length === 0) {\n return b;\n }\n else if (typeof b === 'undefined' || Object.keys(b).length === 0) {\n return a;\n }\n else {\n return {\n $or: [\n ...(isOrOperator(a) ? a.$or : [a]),\n ...(isOrOperator(b) ? b.$or : [b]),\n ],\n };\n }\n}\nexport function not(a) {\n if (typeof a === 'undefined' || Object.keys(a).length === 0) {\n return undefined;\n }\n else if (isNotOperator(a)) {\n return a.$not;\n }\n else {\n return { $not: a };\n }\n}\n","export class Iterator {\n _items;\n _fetchNextPage;\n _fetchPrevPage;\n _originQuery;\n _limit;\n constructor({ items, originQuery, fetchNextPage, fetchPrevPage, limit, }) {\n this._items = items;\n this._fetchNextPage = fetchNextPage;\n this._fetchPrevPage = fetchPrevPage;\n this._originQuery = originQuery;\n this._limit = limit;\n }\n get items() {\n return this._items;\n }\n get length() {\n return this._items.length;\n }\n get pageSize() {\n return this._limit;\n }\n get query() {\n return this._originQuery;\n }\n async next() {\n if (!this.hasNext()) {\n throw new Error('No next page to fetch');\n }\n const nextPageIterator = await this._fetchNextPage();\n return nextPageIterator;\n }\n async prev() {\n if (!this.hasPrev()) {\n throw new Error('No previous page to fetch');\n }\n const previousPageIterator = await this._fetchPrevPage();\n return previousPageIterator;\n }\n}\nexport class CursorBasedIterator extends Iterator {\n _nextCursor;\n _prevCursor;\n cursors;\n constructor({ items, originQuery, fetchNextPage, fetchPrevPage, limit, nextCursor, prevCursor, }) {\n super({ items, originQuery, fetchNextPage, fetchPrevPage, limit });\n this._nextCursor = nextCursor;\n this._prevCursor = prevCursor;\n this.cursors = {\n next: nextCursor,\n prev: prevCursor,\n };\n }\n hasNext() {\n return !!this._nextCursor;\n }\n hasPrev() {\n return !!this._prevCursor;\n }\n}\nexport class OffsetBasedIterator extends Iterator {\n _totalCount;\n _offset;\n _tooManyToCount;\n constructor({ items, fetchNextPage, fetchPrevPage, offset, originQuery, limit, totalCount, tooManyToCount, }) {\n super({ items, fetchNextPage, fetchPrevPage, originQuery, limit });\n this._totalCount = totalCount;\n this._offset = offset;\n this._tooManyToCount = tooManyToCount;\n }\n get currentPage() {\n return this._limit === 0\n ? undefined\n : Math.floor(this._offset / this._limit);\n }\n get totalPages() {\n return this._tooManyToCount || this._limit === 0\n ? undefined\n : Math.ceil(this._totalCount / this._limit);\n }\n get totalCount() {\n return this._tooManyToCount ? undefined : this._totalCount;\n }\n hasNext() {\n return Boolean(this._limit !== 0 &&\n this.currentPage !== undefined && // currentPage 0 is the first page\n this.totalPages !== undefined &&\n this.currentPage < this.totalPages - 1);\n }\n hasPrev() {\n return Boolean(this._limit !== 0 && this.currentPage && this.currentPage > 0);\n }\n}\n","import { DEFAULT_LIMIT, ITEMS_RESULT_PROPERTY_NAME, PAGING_METADATA_RESULT_PROPERTY_NAME, SDKRequestToRESTRequestRenameMap, } from './constants.js';\nimport { and, not, or } from './query-filter.js';\nimport { CursorBasedIterator, OffsetBasedIterator } from './query-iterators.js';\nexport function queryBuilder(opts) {\n const createQueryBuilder = (query) => {\n return {\n query,\n async find() {\n try {\n const request = opts.requestTransformer(opts.pagingMethod === 'CURSOR' &&\n query.cursorPaging.cursor\n ? {\n cursorPaging: query.cursorPaging,\n }\n : query);\n const response = await opts.func(request);\n const { [ITEMS_RESULT_PROPERTY_NAME]: items, [PAGING_METADATA_RESULT_PROPERTY_NAME]: pagingMetadata, } = opts.responseTransformer(response);\n if (opts.pagingMethod === 'OFFSET') {\n const offsetQuery = query;\n return new OffsetBasedIterator({\n items: items ?? [],\n fetchNextPage: () => {\n return createQueryBuilder({\n ...offsetQuery,\n paging: {\n offset: offsetQuery.paging.offset + offsetQuery.paging.limit,\n limit: offsetQuery.paging.limit,\n },\n }).find();\n },\n fetchPrevPage: () => {\n return createQueryBuilder({\n ...query,\n paging: {\n offset: Math.max(offsetQuery.paging.offset - offsetQuery.paging.limit, 0),\n limit: offsetQuery.paging.limit,\n },\n }).find();\n },\n offset: offsetQuery.paging.offset,\n limit: offsetQuery.paging.limit,\n totalCount: pagingMetadata?.total,\n tooManyToCount: pagingMetadata?.tooManyToCount,\n originQuery: this,\n });\n }\n const paging = query.cursorPaging;\n return new CursorBasedIterator({\n items: items ?? [],\n limit: paging.limit,\n originQuery: this,\n fetchNextPage: () => {\n return createQueryBuilder({\n ...query,\n cursorPaging: {\n cursor: pagingMetadata?.cursors?.next ?? undefined,\n limit: paging.limit,\n },\n }).find();\n },\n fetchPrevPage: () => {\n return createQueryBuilder({\n ...query,\n cursorPaging: {\n cursor: pagingMetadata?.cursors?.prev ?? undefined,\n limit: paging.limit,\n },\n }).find();\n },\n prevCursor: pagingMetadata?.cursors?.prev ?? undefined,\n nextCursor: pagingMetadata?.cursors?.next ?? undefined,\n });\n }\n catch (err) {\n throw opts.errorTransformer(err);\n }\n },\n skipTo(cursor) {\n return createQueryBuilder({\n ...query,\n cursorPaging: {\n cursor,\n limit: query.cursorPaging.limit,\n },\n });\n },\n eq(field, value) {\n const serializableValue = typeof value === 'undefined' ? null : value;\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: serializableValue,\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n ne(field, value) {\n const serializableValue = typeof value === 'undefined' ? null : value;\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $ne: serializableValue,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n ge(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $gte: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n gt(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: { $gt: value },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n le(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $lte: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n lt(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: { $lt: value },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n isNotEmpty(field) {\n return this.ne(field, null);\n },\n isEmpty(field) {\n return this.eq(field, null);\n },\n startsWith(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $startsWith: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n endsWith(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $endsWith: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n contains(field, value) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $contains: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n hasSome(field, ...values) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $hasSome: Array.isArray(values[0]) ? values[0] : values,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n hasAll(field, ...values) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $hasAll: Array.isArray(values[0]) ? values[0] : values,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n between(field, from, to) {\n return this.ge(field, from).lt(field, to);\n },\n in(field, values) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $in: values,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n exists(field, value = true) {\n const newFilter = {\n [renameFieldByPaths(opts.transformationPaths, field)]: {\n $exists: value,\n },\n };\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, newFilter),\n });\n },\n or(orQuery) {\n return createQueryBuilder({\n ...query,\n filter: or(query.filter, orQuery.query.filter),\n });\n },\n and(andQuery) {\n return createQueryBuilder({\n ...query,\n filter: and(query.filter, andQuery.query.filter),\n });\n },\n not(notQuery) {\n return createQueryBuilder({\n ...query,\n filter: not(notQuery.query.filter),\n });\n },\n ascending(...fieldNames) {\n return createQueryBuilder({\n ...query,\n sort: [\n ...(query.sort ?? []),\n ...fieldNames.map((fieldName) => ({\n fieldName: renameFieldByPaths(opts.transformationPaths, fieldName),\n order: 'ASC',\n })),\n ],\n });\n },\n descending(...fieldNames) {\n return createQueryBuilder({\n ...query,\n sort: [\n ...(query.sort ?? []),\n ...fieldNames.map((fieldName) => ({\n fieldName: renameFieldByPaths(opts.transformationPaths, fieldName),\n order: 'DESC',\n })),\n ],\n });\n },\n skip(offset) {\n return createQueryBuilder({\n ...query,\n paging: {\n offset,\n limit: 'limit' in query.paging\n ? query.paging.limit\n : DEFAULT_LIMIT,\n },\n });\n },\n limit(limit) {\n if (opts.pagingMethod === 'CURSOR') {\n const cursorQuery = query;\n return createQueryBuilder({\n ...query,\n cursorPaging: {\n limit,\n cursor: 'cursor' in cursorQuery.cursorPaging\n ? cursorQuery.cursorPaging.cursor\n : undefined,\n },\n });\n }\n const offsetQuery = query;\n return createQueryBuilder({\n ...query,\n paging: {\n limit,\n offset: 'offset' in offsetQuery.paging ? offsetQuery.paging.offset : 0,\n },\n });\n },\n };\n };\n return createQueryBuilder({\n filter: {},\n ...(opts.pagingMethod === 'OFFSET'\n ? { paging: { offset: 0, limit: DEFAULT_LIMIT } }\n : { cursorPaging: { limit: DEFAULT_LIMIT } }),\n });\n}\nfunction renameFieldByPaths(transformationPaths, fieldPath) {\n const transformationPath = Object.entries(transformationPaths).find(([path]) => path === fieldPath || fieldPath.startsWith(`${path}.`))?.[0];\n if (transformationPath) {\n return fieldPath.replace(transformationPath, transformationPaths[transformationPath]);\n }\n return fieldPath\n .split('.')\n .map((segment) => transformationPaths[segment] ??\n SDKRequestToRESTRequestRenameMap[segment] ??\n segment)\n .join('.');\n}\n","import { contextualizeEventDefinitionModuleV2 } from './context-v2.js';\nexport function createEventModule(eventDefinition) {\n return contextualizeEventDefinitionModuleV2(eventDefinition);\n}\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 CloneServiceOptionsAndVariantsResponse,\n CreateServiceOptionsAndVariantsApplicationErrors,\n DeleteServiceOptionsAndVariantsOptions,\n GetServiceOptionsAndVariantsByServiceIdResponse,\n ServiceOptionsAndVariants,\n ServiceOptionsAndVariantsCreatedEnvelope,\n ServiceOptionsAndVariantsDeletedEnvelope,\n ServiceOptionsAndVariantsListQueryBuilder,\n ServiceOptionsAndVariantsUpdatedEnvelope,\n UpdateServiceOptionsAndVariants,\n UpdateServiceOptionsAndVariantsApplicationErrors,\n cloneServiceOptionsAndVariants as universalCloneServiceOptionsAndVariants,\n createServiceOptionsAndVariants as universalCreateServiceOptionsAndVariants,\n deleteServiceOptionsAndVariants as universalDeleteServiceOptionsAndVariants,\n getServiceOptionsAndVariants as universalGetServiceOptionsAndVariants,\n getServiceOptionsAndVariantsByServiceId as universalGetServiceOptionsAndVariantsByServiceId,\n queryServiceOptionsAndVariants as universalQueryServiceOptionsAndVariants,\n updateServiceOptionsAndVariants as universalUpdateServiceOptionsAndVariants,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createServiceOptionsAndVariants(\n httpClient: HttpClient\n): CreateServiceOptionsAndVariantsSignature {\n return (\n serviceOptionsAndVariants: NonNullablePaths<\n ServiceOptionsAndVariants,\n `options` | `serviceId` | `variants`,\n 2\n >\n ) =>\n universalCreateServiceOptionsAndVariants(\n serviceOptionsAndVariants,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateServiceOptionsAndVariantsSignature {\n /**\n * Creates a `serviceOptionsAndVariants` object and for a service.\n *\n *\n * ### Calculate variants\n *\n * Before creating a `serviceOptionsAndVariants` object, you need to\n * anticipate and manually define all its variants, since Wix Bookings doesn't\n * automatically calculate them. For the actual\n * Create Service Options And Variants* call, specify both the `options` and\n * `variants` arrays.\n *\n * ### Limitations\n *\n * Wix Bookings allows you to connect only a single `serviceOptionsAndVariants`\n * object to a service. *Create Service Options And Variants* fails, if the\n * service already has a connected `serviceOptionsAndVariants` object.\n *\n * Currently, you can include only a single option per\n * `serviceOptionsAndVariants` object. Taken together, this means that services\n * are limited to a single option.\n *\n * ### Option ID\n *\n * When creating a`serviceOptionsAndVariants` object, you must specify an ID in\n * [UUID format](https://en.wikipedia.org/wiki/Universally_unique_identifier)\n * for its only option. You must reference this option ID for each variant as\n * `variants.values.choices.optionId`.\n *\n * ### Staff member option\n *\n * To creating an option based on the *staff member*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))\n * providing the service, you need to specify `STAFF_MEMBER` as `options.values.type`.\n * Also, specify all staff member IDs as `variants.values.choices.staffMemberId`.\n * You could follow this *sample flow*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-staff-member-based-service-variants) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-staff-member-based-service-variants)).\n *\n * ### Custom option\n *\n * To create an option based on a custom parameter, specify `CUSTOM` as\n * `options.values.type`. Provide descriptive names for all custom choices as\n * `variants.values.choices.custom`. These names are displayed to customers\n * during the book flow. You could follow this *sample flow*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment)).\n *\n * ### Duration option\n *\n * To create an option based on appointment duration, specify `DURATION` as\n * `options.values.type` and set a descriptive name in `options.values.durationData.name`.\n * Also, indicate the appointment length in `minutes` and provide a descriptive\n * `name` for each duration choice in `variants.values.choices.duration`.\n * @param - Service options and variants to create.\n * @returns Information about the created service options and variants.\n */\n (\n serviceOptionsAndVariants: NonNullablePaths<\n ServiceOptionsAndVariants,\n `options` | `serviceId` | `variants`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n ServiceOptionsAndVariants,\n | `options.values`\n | `options.values.${number}.customData.name`\n | `options.values.${number}._id`\n | `options.values.${number}.type`\n | `variants.values`\n | `variants.values.${number}.price.value`\n | `variants.values.${number}.price.currency`,\n 6\n > & {\n __applicationErrorsType?: CreateServiceOptionsAndVariantsApplicationErrors;\n }\n >;\n}\n\nexport function cloneServiceOptionsAndVariants(\n httpClient: HttpClient\n): CloneServiceOptionsAndVariantsSignature {\n return (cloneFromId: string, targetServiceId: string) =>\n universalCloneServiceOptionsAndVariants(\n cloneFromId,\n targetServiceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CloneServiceOptionsAndVariantsSignature {\n /**\n * Clones a `serviceOptionsAndVariants` object and connects it to a *service*\n * ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)).\n *\n *\n * The call fails if the service already has a connected\n * `serviceOptionsAndVariants` object.\n *\n * The cloned `serviceOptionsAndVariants` object gets a new, unique option ID.\n * The option ID of the existing `serviceOptionsAndVariants` object isn't reused.\n *\n * For example, you may call this method after *cloning a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/clone-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/clone-service)).\n * @param - ID of the `serviceOptionsAndVariants` object to clone.\n * @param - ID of the service to which the cloned `serviceOptionsAndVariants` are\n * connected.\n */\n (cloneFromId: string, targetServiceId: string): Promise<\n NonNullablePaths<\n CloneServiceOptionsAndVariantsResponse,\n | `serviceOptionsAndVariants.options.values`\n | `serviceOptionsAndVariants.options.values.${number}.customData.name`\n | `serviceOptionsAndVariants.options.values.${number}._id`\n | `serviceOptionsAndVariants.options.values.${number}.type`\n | `serviceOptionsAndVariants.variants.values`\n | `serviceOptionsAndVariants.variants.values.${number}.price.value`\n | `serviceOptionsAndVariants.variants.values.${number}.price.currency`,\n 7\n >\n >;\n}\n\nexport function getServiceOptionsAndVariants(\n httpClient: HttpClient\n): GetServiceOptionsAndVariantsSignature {\n return (serviceOptionsAndVariantsId: string) =>\n universalGetServiceOptionsAndVariants(\n serviceOptionsAndVariantsId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetServiceOptionsAndVariantsSignature {\n /**\n * Retrieves a `serviceOptionsAndVariants` object by its ID.\n * @param - ID of the `serviceOptionsAndVariants` object to retrieve.\n * @returns Retrieved `serviceOptionsAndVariants` object.\n */\n (serviceOptionsAndVariantsId: string): Promise<\n NonNullablePaths<\n ServiceOptionsAndVariants,\n | `options.values`\n | `options.values.${number}.customData.name`\n | `options.values.${number}._id`\n | `options.values.${number}.type`\n | `variants.values`\n | `variants.values.${number}.price.value`\n | `variants.values.${number}.price.currency`,\n 6\n >\n >;\n}\n\nexport function getServiceOptionsAndVariantsByServiceId(\n httpClient: HttpClient\n): GetServiceOptionsAndVariantsByServiceIdSignature {\n return (serviceId: string) =>\n universalGetServiceOptionsAndVariantsByServiceId(\n serviceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetServiceOptionsAndVariantsByServiceIdSignature {\n /**\n * Retrieves a `serviceOptionsAndVariants` object by *service ID*\n * ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)).\n * @param - ID of the service to retrieve options and variants for.\n */\n (serviceId: string): Promise<\n NonNullablePaths<\n GetServiceOptionsAndVariantsByServiceIdResponse,\n | `serviceVariants.options.values`\n | `serviceVariants.options.values.${number}.customData.name`\n | `serviceVariants.options.values.${number}._id`\n | `serviceVariants.options.values.${number}.type`\n | `serviceVariants.variants.values`\n | `serviceVariants.variants.values.${number}.price.value`\n | `serviceVariants.variants.values.${number}.price.currency`,\n 7\n >\n >;\n}\n\nexport function updateServiceOptionsAndVariants(\n httpClient: HttpClient\n): UpdateServiceOptionsAndVariantsSignature {\n return (\n _id: string,\n serviceOptionsAndVariants: NonNullablePaths<\n UpdateServiceOptionsAndVariants,\n `revision`,\n 2\n >\n ) =>\n universalUpdateServiceOptionsAndVariants(\n _id,\n serviceOptionsAndVariants,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateServiceOptionsAndVariantsSignature {\n /**\n * Updates a `serviceOptionsAndVariants` object.\n *\n *\n * Currently, only a single option is supported per `serviceOptionsAndVariants` object.\n *\n * If you want to update `variants`, you must pass the entire list of supported\n * variants, not only newly added variants.\n *\n * If you want to update `options`, you must pass the entire list of supported\n * options, not only newly added options.\n * @param - ID of the `serviceOptionsAndVariants` object.\n * @param - Service options and variants to update.\n * @param - Options for updating the service options and variants.\n * @returns Updated `serviceOptionsAndVariants` object.\n */\n (\n _id: string,\n serviceOptionsAndVariants: NonNullablePaths<\n UpdateServiceOptionsAndVariants,\n `revision`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n ServiceOptionsAndVariants,\n | `options.values`\n | `options.values.${number}.customData.name`\n | `options.values.${number}._id`\n | `options.values.${number}.type`\n | `variants.values`\n | `variants.values.${number}.price.value`\n | `variants.values.${number}.price.currency`,\n 6\n > & {\n __applicationErrorsType?: UpdateServiceOptionsAndVariantsApplicationErrors;\n }\n >;\n}\n\nexport function deleteServiceOptionsAndVariants(\n httpClient: HttpClient\n): DeleteServiceOptionsAndVariantsSignature {\n return (\n serviceOptionsAndVariantsId: string,\n options?: DeleteServiceOptionsAndVariantsOptions\n ) =>\n universalDeleteServiceOptionsAndVariants(\n serviceOptionsAndVariantsId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteServiceOptionsAndVariantsSignature {\n /**\n * Deletes a `serviceOptionsAndVariants` object.\n *\n *\n * Because each service can be connected to only a single `serviceOptionsAndVariants`\n * object, the service doesn't support *varied pricing*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments#service-rates))\n * after deleting a `serviceOptionsAndVariants` object. Instead, Wix Bookings\n * uses its standard price calculation.\n * @param - ID of the `serviceOptionsAndVariants` object to delete.\n * @param - Options for deleting the service options and variants.\n */\n (\n serviceOptionsAndVariantsId: string,\n options?: DeleteServiceOptionsAndVariantsOptions\n ): Promise<void>;\n}\n\nexport function queryServiceOptionsAndVariants(\n httpClient: HttpClient\n): QueryServiceOptionsAndVariantsSignature {\n return () =>\n universalQueryServiceOptionsAndVariants(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryServiceOptionsAndVariantsSignature {\n /**\n * Creates a query to retrieve a list of `serviceOptionsAndVariants` objects.\n *\n * The `queryServiceOptionsAndVariants()` function builds a query to retrieve a list of `serviceOptionsAndVariants` objects and returns a `ServiceOptionsAndVariantsQueryBuilder` 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/service-options-and-variants/service-options-and-variants-list-query-builder/find) function.\n *\n * You can refine the query by chaining `ServiceOptionsAndVariantsQueryBuilder` functions onto the query. `ServiceOptionsAndVariantsQueryBuilder` functions enable you to sort, filter, and control the results that `queryServiceOptionsAndVariants()` returns.\n *\n * `queryServiceOptionsAndVariants()` runs with the following `ServiceOptionsAndVariantsQueryBuilder` 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 `queryServiceOptionsAndVariants()` are applied in the order they are called. For example, if you apply `ascending(\"options.values.type\")` and then `ascending(\"variants.values.price\")`, the results are sorted first by the `\"type\"`, and then, if there are multiple results with the same `\"type\"`, the items are sorted by `\"price\"`.\n *\n * The following `ServiceOptionsAndVariantsQueryBuilder` functions are supported for the `queryServiceOptionsAndVariants()` function. For a full description of the `serviceOptionsAndVariants` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/service-options-and-variants-list-query-result/items) property in `ServiceOptionsAndVariantsQueryResult`.\n */\n (): ServiceOptionsAndVariantsListQueryBuilder;\n}\n\nexport const onServiceOptionsAndVariantsCreated = EventDefinition(\n 'wix.bookings.catalog.v1.service_options_and_variants_created',\n true,\n (event: ServiceOptionsAndVariantsCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<ServiceOptionsAndVariantsCreatedEnvelope>();\nexport const onServiceOptionsAndVariantsDeleted = EventDefinition(\n 'wix.bookings.catalog.v1.service_options_and_variants_deleted',\n true,\n (event: ServiceOptionsAndVariantsDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<ServiceOptionsAndVariantsDeletedEnvelope>();\nexport const onServiceOptionsAndVariantsUpdated = EventDefinition(\n 'wix.bookings.catalog.v1.service_options_and_variants_updated',\n true,\n (event: ServiceOptionsAndVariantsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<ServiceOptionsAndVariantsUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n Address,\n AddressHint,\n BaseEventMetadata,\n BusinessSchedule,\n Categories,\n ChangeContext,\n ChangeContextPayloadOneOf,\n CloneServiceOptionsAndVariantsRequest,\n CloneServiceOptionsAndVariantsResponse,\n ConsentPolicy,\n CreateServiceOptionsAndVariantsRequest,\n CreateServiceOptionsAndVariantsResponse,\n CursorPaging,\n Cursors,\n CustomServiceOption,\n DayOfWeek,\n DeleteServiceOptionsAndVariantsOptions,\n DeleteServiceOptionsAndVariantsRequest,\n DeleteServiceOptionsAndVariantsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Duration,\n DurationServiceOption,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GeoCoordinates,\n GetServiceOptionsAndVariantsByServiceIdRequest,\n GetServiceOptionsAndVariantsByServiceIdResponse,\n GetServiceOptionsAndVariantsRequest,\n GetServiceOptionsAndVariantsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Locale,\n MessageEnvelope,\n Money,\n Multilingual,\n Paging,\n PagingMetadataV2,\n PlacementType,\n Properties,\n PropertiesChange,\n QueryServiceOptionsAndVariantsRequest,\n QueryServiceOptionsAndVariantsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n ResolutionMethod,\n RestoreInfo,\n ServiceChoice,\n ServiceChoiceChoiceOneOf,\n ServiceOption,\n ServiceOptionOptionSpecificDataOneOf,\n ServiceOptionType,\n ServiceOptions,\n ServiceOptionsAndVariants,\n ServiceOptionsAndVariantsCreatedEnvelope,\n ServiceOptionsAndVariantsDeletedEnvelope,\n ServiceOptionsAndVariantsListQueryBuilder,\n ServiceOptionsAndVariantsListQueryResult,\n ServiceOptionsAndVariantsUpdatedEnvelope,\n ServiceVariant,\n ServiceVariants,\n SiteCloned,\n SiteCreated,\n SitePropertiesEvent,\n SitePropertiesNotification,\n SortOrder,\n Sorting,\n SpecialHourPeriod,\n SupportedLanguage,\n TimePeriod,\n Translation,\n UpdateServiceOptionsAndVariants,\n UpdateServiceOptionsAndVariantsRequest,\n UpdateServiceOptionsAndVariantsResponse,\n WebhookIdentityType,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js';\n","import {\n createServiceOptionsAndVariants as publicCreateServiceOptionsAndVariants,\n cloneServiceOptionsAndVariants as publicCloneServiceOptionsAndVariants,\n getServiceOptionsAndVariants as publicGetServiceOptionsAndVariants,\n getServiceOptionsAndVariantsByServiceId as publicGetServiceOptionsAndVariantsByServiceId,\n updateServiceOptionsAndVariants as publicUpdateServiceOptionsAndVariants,\n deleteServiceOptionsAndVariants as publicDeleteServiceOptionsAndVariants,\n queryServiceOptionsAndVariants as publicQueryServiceOptionsAndVariants,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.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 { onServiceOptionsAndVariantsCreated as publicOnServiceOptionsAndVariantsCreated } from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.public.js';\nimport { onServiceOptionsAndVariantsDeleted as publicOnServiceOptionsAndVariantsDeleted } from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.public.js';\nimport { onServiceOptionsAndVariantsUpdated as publicOnServiceOptionsAndVariantsUpdated } from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.public.js';\n\nexport const createServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicCreateServiceOptionsAndVariants> &\n typeof publicCreateServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicCreateServiceOptionsAndVariants);\nexport const cloneServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicCloneServiceOptionsAndVariants> &\n typeof publicCloneServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicCloneServiceOptionsAndVariants);\nexport const getServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicGetServiceOptionsAndVariants> &\n typeof publicGetServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicGetServiceOptionsAndVariants);\nexport const getServiceOptionsAndVariantsByServiceId: MaybeContext<\n BuildRESTFunction<typeof publicGetServiceOptionsAndVariantsByServiceId> &\n typeof publicGetServiceOptionsAndVariantsByServiceId\n> = /*#__PURE__*/ createRESTModule(\n publicGetServiceOptionsAndVariantsByServiceId\n);\nexport const updateServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicUpdateServiceOptionsAndVariants> &\n typeof publicUpdateServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicUpdateServiceOptionsAndVariants);\nexport const deleteServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicDeleteServiceOptionsAndVariants> &\n typeof publicDeleteServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicDeleteServiceOptionsAndVariants);\nexport const queryServiceOptionsAndVariants: MaybeContext<\n BuildRESTFunction<typeof publicQueryServiceOptionsAndVariants> &\n typeof publicQueryServiceOptionsAndVariants\n> = /*#__PURE__*/ createRESTModule(publicQueryServiceOptionsAndVariants);\n/** */\nexport const onServiceOptionsAndVariantsCreated: BuildEventDefinition<\n typeof publicOnServiceOptionsAndVariantsCreated\n> &\n typeof publicOnServiceOptionsAndVariantsCreated = createEventModule(\n publicOnServiceOptionsAndVariantsCreated\n);\n/** */\nexport const onServiceOptionsAndVariantsDeleted: BuildEventDefinition<\n typeof publicOnServiceOptionsAndVariantsDeleted\n> &\n typeof publicOnServiceOptionsAndVariantsDeleted = createEventModule(\n publicOnServiceOptionsAndVariantsDeleted\n);\n/** */\nexport const onServiceOptionsAndVariantsUpdated: BuildEventDefinition<\n typeof publicOnServiceOptionsAndVariantsUpdated\n> &\n typeof publicOnServiceOptionsAndVariantsUpdated = createEventModule(\n publicOnServiceOptionsAndVariantsUpdated\n);\n\nexport {\n ServiceOptionType,\n SortOrder,\n PlacementType,\n DayOfWeek,\n ResolutionMethod,\n WebhookIdentityType,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js';\nexport {\n ServiceOptionsAndVariants,\n ServiceOption,\n ServiceOptionOptionSpecificDataOneOf,\n CustomServiceOption,\n DurationServiceOption,\n ServiceVariant,\n ServiceChoice,\n ServiceChoiceChoiceOneOf,\n Duration,\n Money,\n ServiceOptions,\n ServiceVariants,\n ExtendedFields,\n CreateServiceOptionsAndVariantsRequest,\n CreateServiceOptionsAndVariantsResponse,\n CloneServiceOptionsAndVariantsRequest,\n CloneServiceOptionsAndVariantsResponse,\n GetServiceOptionsAndVariantsRequest,\n GetServiceOptionsAndVariantsResponse,\n GetServiceOptionsAndVariantsByServiceIdRequest,\n GetServiceOptionsAndVariantsByServiceIdResponse,\n UpdateServiceOptionsAndVariantsRequest,\n UpdateServiceOptionsAndVariantsResponse,\n DeleteServiceOptionsAndVariantsRequest,\n DeleteServiceOptionsAndVariantsResponse,\n QueryServiceOptionsAndVariantsRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryServiceOptionsAndVariantsResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n SitePropertiesNotification,\n SitePropertiesEvent,\n Properties,\n Categories,\n Locale,\n Address,\n AddressHint,\n GeoCoordinates,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Multilingual,\n SupportedLanguage,\n ConsentPolicy,\n Translation,\n ChangeContext,\n ChangeContextPayloadOneOf,\n PropertiesChange,\n SiteCreated,\n SiteCloned,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ServiceOptionsAndVariantsCreatedEnvelope,\n ServiceOptionsAndVariantsDeletedEnvelope,\n ServiceOptionsAndVariantsUpdatedEnvelope,\n UpdateServiceOptionsAndVariants,\n DeleteServiceOptionsAndVariantsOptions,\n ServiceOptionsAndVariantsListQueryResult,\n ServiceOptionsAndVariantsListQueryBuilder,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.js';\nexport {\n ServiceOptionTypeWithLiterals,\n SortOrderWithLiterals,\n PlacementTypeWithLiterals,\n DayOfWeekWithLiterals,\n ResolutionMethodWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateServiceOptionsAndVariantsApplicationErrors,\n UpdateServiceOptionsAndVariantsApplicationErrors,\n} from './bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal.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 CategoriesQueryBuilder,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n CountCategoriesOptions,\n CountCategoriesResponse,\n CreateCategoryApplicationErrors,\n MoveCategoryOptions,\n MoveCategoryResponse,\n UpdateCategory,\n countCategories as universalCountCategories,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n getCategory as universalGetCategory,\n moveCategory as universalMoveCategory,\n queryCategories as universalQueryCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-categories-v2-category-categories-v-2.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`, 2>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n */\n (category: NonNullablePaths<Category, `name`, 2>): Promise<\n Category & {\n __applicationErrorsType?: CreateCategoryApplicationErrors;\n }\n >;\n}\n\nexport function getCategory(httpClient: HttpClient): GetCategorySignature {\n return (categoryId: string) =>\n universalGetCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCategorySignature {\n /**\n * Retrieves a category.\n * @param - ID of the category to retrieve.\n * @returns Retrieved category.\n */\n (categoryId: string): Promise<Category>;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`, 2>\n ) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, `revision` increments by 1.\n * You must specify the current `revision` to prevent unintended overwrites.\n *\n * You can't adjust a categories `sortOrder` with this method, call Move Category ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/move-category) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/move-category)) instead.\n * @param - Category ID.\n * @returns Updated category.\n */\n (\n _id: string,\n category: NonNullablePaths<UpdateCategory, `revision`, 2>\n ): Promise<Category>;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (categoryId: string) =>\n universalDeleteCategory(\n categoryId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * ### Impact on connected services\n *\n * When you delete a category, any services linked to it remain associated with the now-deleted category. Wix Bookings still displays these services to business owners in the dashboard, but they aren't visible to customers on the live site.\n * Attempting to call Update Service ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service)) for a service that's linked to a deleted category fails, unless you specify a different, existing category ID in `service.category.id`.\n * @param - ID of the category to delete.\n */\n (categoryId: string): Promise<void>;\n}\n\nexport function queryCategories(\n httpClient: HttpClient\n): QueryCategoriesSignature {\n return () =>\n universalQueryCategories(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryCategoriesSignature {\n /**\n * Creates a query to retrieve a list of `category` objects.\n *\n * The `queryCategories()` function builds a query to retrieve a list of `category` objects and returns a `categoriesQueryBuilder` 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/categories-v2/categories-query-builder/find) function.\n *\n * You can refine the query by chaining `CategoriesQueryBuilder` functions onto the query. `CategoriesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCategories()` returns.\n *\n * `queryCategories()` runs with the following `CategoriesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryCategories()` are applied in the order they are called. For example, if you apply `ascending(\"name\")` and then `ascending(\"id\")`, the results are sorted first by `name`, and then, if there are multiple results with the same `name`, the items are sorted by `id`.\n *\n * The following `CategoriesQueryBuilder` functions are supported for the `queryCategories()` function. For a full description of the `category` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/categories-query-result/items) property in `CategoriesQueryResult`.\n */\n (): CategoriesQueryBuilder;\n}\n\nexport function countCategories(\n httpClient: HttpClient\n): CountCategoriesSignature {\n return (options?: CountCategoriesOptions) =>\n universalCountCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountCategoriesSignature {\n /**\n * Counts categories, given the specified filtering.\n *\n *\n * Refer to the Supported Filters article ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/filtering-and-sorting)) for a complete list of supported filters.\n */\n (options?: CountCategoriesOptions): Promise<\n NonNullablePaths<CountCategoriesResponse, `count`, 2>\n >;\n}\n\nexport function moveCategory(httpClient: HttpClient): MoveCategorySignature {\n return (categoryId: string, options?: MoveCategoryOptions) =>\n universalMoveCategory(\n categoryId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MoveCategorySignature {\n /**\n * Moves a category to the start, end, or immediately after a specified category by updating its `sortOrder` field.\n *\n * Wix Bookings assigns `sortOrder` values with large gaps between categories, allowing efficient reordering without updating the entire list. When gaps become too small, the system automatically reassigns new values to restore larger gaps.\n * @param - ID of the category to move.\n */\n (\n categoryId: string,\n options?: MoveCategoryOptions\n ): Promise<MoveCategoryResponse>;\n}\n\nexport const onCategoryCreated = EventDefinition(\n 'wix.bookings.categories.v2.category_created',\n true,\n (event: CategoryCreatedEnvelope) =>\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)<CategoryCreatedEnvelope>();\nexport const onCategoryDeleted = EventDefinition(\n 'wix.bookings.categories.v2.category_deleted',\n true,\n (event: CategoryDeletedEnvelope) =>\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)<CategoryDeletedEnvelope>();\nexport const onCategoryUpdated = EventDefinition(\n 'wix.bookings.categories.v2.category_updated',\n true,\n (event: CategoryUpdatedEnvelope) =>\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)<CategoryUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CategoriesQueryBuilder,\n CategoriesQueryResult,\n Category,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n CountCategoriesOptions,\n CountCategoriesRequest,\n CountCategoriesResponse,\n CreateCategoryRequest,\n CreateCategoryResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetCategoryRequest,\n GetCategoryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImportCategoriesRequest,\n ImportCategoriesResponse,\n MessageEnvelope,\n MoveCategoryOptions,\n MoveCategoryRequest,\n MoveCategoryResponse,\n Position,\n PublishCategoriesUpdatedRequest,\n PublishCategoriesUpdatedResponse,\n QueryCategoriesRequest,\n QueryCategoriesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-categories-v2-category-categories-v-2.universal.js';\n","import {\n createCategory as publicCreateCategory,\n getCategory as publicGetCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n queryCategories as publicQueryCategories,\n countCategories as publicCountCategories,\n moveCategory as publicMoveCategory,\n} from './bookings-categories-v2-category-categories-v-2.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 { onCategoryCreated as publicOnCategoryCreated } from './bookings-categories-v2-category-categories-v-2.public.js';\nimport { onCategoryDeleted as publicOnCategoryDeleted } from './bookings-categories-v2-category-categories-v-2.public.js';\nimport { onCategoryUpdated as publicOnCategoryUpdated } from './bookings-categories-v2-category-categories-v-2.public.js';\n\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const getCategory: MaybeContext<\n BuildRESTFunction<typeof publicGetCategory> & typeof publicGetCategory\n> = /*#__PURE__*/ createRESTModule(publicGetCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\nexport const queryCategories: MaybeContext<\n BuildRESTFunction<typeof publicQueryCategories> & typeof publicQueryCategories\n> = /*#__PURE__*/ createRESTModule(publicQueryCategories);\nexport const countCategories: MaybeContext<\n BuildRESTFunction<typeof publicCountCategories> & typeof publicCountCategories\n> = /*#__PURE__*/ createRESTModule(publicCountCategories);\nexport const moveCategory: MaybeContext<\n BuildRESTFunction<typeof publicMoveCategory> & typeof publicMoveCategory\n> = /*#__PURE__*/ createRESTModule(publicMoveCategory);\n/**\n * Triggered when a category is created.\n */\nexport const onCategoryCreated: BuildEventDefinition<\n typeof publicOnCategoryCreated\n> &\n typeof publicOnCategoryCreated = createEventModule(publicOnCategoryCreated);\n/**\n * Triggered when a category is deleted.\n */\nexport const onCategoryDeleted: BuildEventDefinition<\n typeof publicOnCategoryDeleted\n> &\n typeof publicOnCategoryDeleted = createEventModule(publicOnCategoryDeleted);\n/**\n * Triggered when a category is updated.\n */\nexport const onCategoryUpdated: BuildEventDefinition<\n typeof publicOnCategoryUpdated\n> &\n typeof publicOnCategoryUpdated = createEventModule(publicOnCategoryUpdated);\n\nexport {\n SortOrder,\n Position,\n WebhookIdentityType,\n} from './bookings-categories-v2-category-categories-v-2.universal.js';\nexport {\n Category,\n ExtendedFields,\n CreateCategoryRequest,\n CreateCategoryResponse,\n GetCategoryRequest,\n GetCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n QueryCategoriesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryCategoriesResponse,\n CursorPagingMetadata,\n Cursors,\n CountCategoriesRequest,\n CountCategoriesResponse,\n MoveCategoryRequest,\n MoveCategoryResponse,\n ImportCategoriesRequest,\n ImportCategoriesResponse,\n PublishCategoriesUpdatedRequest,\n PublishCategoriesUpdatedResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n CategoryCreatedEnvelope,\n CategoryDeletedEnvelope,\n CategoryUpdatedEnvelope,\n UpdateCategory,\n CategoriesQueryResult,\n CategoriesQueryBuilder,\n CountCategoriesOptions,\n MoveCategoryOptions,\n} from './bookings-categories-v2-category-categories-v-2.universal.js';\nexport {\n SortOrderWithLiterals,\n PositionWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateCategoryApplicationErrors,\n} from './bookings-categories-v2-category-categories-v-2.universal.js';\n","export function transformSDKFloatToRESTFloat(val) {\n return isFinite(val) ? val : val.toString();\n}\nexport function transformRESTFloatToSDKFloat(val) {\n if (val === 'NaN') {\n return NaN;\n }\n if (val === 'Infinity') {\n return Infinity;\n }\n if (val === '-Infinity') {\n return -Infinity;\n }\n return val;\n}\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 BulkCreateResourcesValidationErrors,\n BulkDeleteResourcesResponse,\n BulkUpdateResourcesOptions,\n BulkUpdateResourcesResponse,\n BulkUpdateResourcesValidationErrors,\n CountResourcesOptions,\n CountResourcesResponse,\n CreateResourceValidationErrors,\n MaskedResource,\n Resource,\n ResourceCreatedEnvelope,\n ResourceDeletedEnvelope,\n ResourceSearch,\n ResourceUpdatedEnvelope,\n ResourcesQueryBuilder,\n SearchResourcesResponse,\n UpdateResource,\n UpdateResourceValidationErrors,\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`, 2>) =>\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: NonNullablePaths<Resource, `name`, 2>): Promise<\n NonNullablePaths<\n Resource,\n | `workingHoursSchedules.values`\n | `locationOptions.specificLocationOptions.businessLocations`,\n 4\n > & {\n __validationErrorsType?: CreateResourceValidationErrors;\n }\n >;\n}\n\nexport function bulkCreateResources(\n httpClient: HttpClient\n): BulkCreateResourcesSignature {\n return (\n resources: NonNullablePaths<Resource, `name`, 2>[],\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: NonNullablePaths<Resource, `name`, 2>[],\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 | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __validationErrorsType?: BulkCreateResourcesValidationErrors;\n }\n >;\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<\n NonNullablePaths<\n Resource,\n | `workingHoursSchedules.values`\n | `locationOptions.specificLocationOptions.businessLocations`,\n 4\n >\n >;\n}\n\nexport function updateResource(\n httpClient: HttpClient\n): UpdateResourceSignature {\n return (\n _id: string,\n resource: NonNullablePaths<UpdateResource, `revision`, 2>\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 (\n _id: string,\n resource: NonNullablePaths<UpdateResource, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n Resource,\n | `workingHoursSchedules.values`\n | `locationOptions.specificLocationOptions.businessLocations`,\n 4\n > & {\n __validationErrorsType?: UpdateResourceValidationErrors;\n }\n >;\n}\n\nexport function bulkUpdateResources(\n httpClient: HttpClient\n): BulkUpdateResourcesSignature {\n return (\n resources: NonNullablePaths<\n MaskedResource,\n `resource._id` | `resource.revision`,\n 3\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 * Refer to *Update Resource*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/update-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/update-resource))\n * for more details.\n * @param - Resources to update.\n */\n (\n resources: NonNullablePaths<\n MaskedResource,\n `resource._id` | `resource.revision`,\n 3\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 | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __validationErrorsType?: BulkUpdateResourcesValidationErrors;\n }\n >;\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<\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 | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\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 ([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 complete filter and sorting options.\n * @param - Search criteria including filter, sort, aggregations, and paging options.\n *\n * Refer to 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 complete filter and sorting options.\n */\n (search: ResourceSearch): Promise<\n NonNullablePaths<\n SearchResourcesResponse,\n | `resources`\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 6\n >\n >;\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 (options?: CountResourcesOptions): Promise<\n NonNullablePaths<CountResourcesResponse, `count`, 2>\n >;\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 {\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> &\n typeof publicOnResourceCreated = createEventModule(publicOnResourceCreated);\n/**\n * Triggered when a resource is deleted.\n */\nexport const onResourceDeleted: BuildEventDefinition<\n typeof publicOnResourceDeleted\n> &\n typeof publicOnResourceDeleted = createEventModule(publicOnResourceDeleted);\n/**\n * Triggered when an resource is updated.\n */\nexport const onResourceUpdated: BuildEventDefinition<\n typeof publicOnResourceUpdated\n> &\n typeof publicOnResourceUpdated = 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';\nexport {\n ManagementTypeWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n ModeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateResourceValidationErrors,\n BulkCreateResourcesValidationErrors,\n UpdateResourceValidationErrors,\n BulkUpdateResourcesValidationErrors,\n CommonSearchWithEntityContext,\n ResourceSearch,\n} from './bookings-resources-v2-resource-resources.universal.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 CountResourceTypesOptions,\n CountResourceTypesResponse,\n CreateResourceTypeApplicationErrors,\n ResourceType,\n ResourceTypeCreatedEnvelope,\n ResourceTypeDeletedEnvelope,\n ResourceTypeUpdatedEnvelope,\n ResourceTypesQueryBuilder,\n UpdateResourceType,\n UpdateResourceTypeApplicationErrors,\n countResourceTypes as universalCountResourceTypes,\n createResourceType as universalCreateResourceType,\n deleteResourceType as universalDeleteResourceType,\n getResourceType as universalGetResourceType,\n queryResourceTypes as universalQueryResourceTypes,\n updateResourceType as universalUpdateResourceType,\n} from './bookings-resources-v2-resource-type-resource-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createResourceType(\n httpClient: HttpClient\n): CreateResourceTypeSignature {\n return (resourceType: NonNullablePaths<ResourceType, `name`, 2>) =>\n universalCreateResourceType(\n resourceType,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateResourceTypeSignature {\n /**\n * Creates a new resource type.\n * @param - Resource type to create.\n * @returns Created resource type.\n */\n (resourceType: NonNullablePaths<ResourceType, `name`, 2>): Promise<\n ResourceType & {\n __applicationErrorsType?: CreateResourceTypeApplicationErrors;\n }\n >;\n}\n\nexport function getResourceType(\n httpClient: HttpClient\n): GetResourceTypeSignature {\n return (resourceTypeId: string) =>\n universalGetResourceType(\n resourceTypeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetResourceTypeSignature {\n /**\n * Retrieves a resource type.\n * @param - ID of the resource type to retrieve.\n * @returns Retrieved resource type.\n */\n (resourceTypeId: string): Promise<ResourceType>;\n}\n\nexport function updateResourceType(\n httpClient: HttpClient\n): UpdateResourceTypeSignature {\n return (\n _id: string,\n resourceType: NonNullablePaths<UpdateResourceType, `revision`, 2>\n ) =>\n universalUpdateResourceType(\n _id,\n resourceType,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateResourceTypeSignature {\n /**\n * Updates a resource type.\n *\n *\n * Each time the resource type is updated, `revision` increments by 1.\n * You must include current revision of the resource type when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param - Resource type ID.\n * @returns Updated resource type.\n */\n (\n _id: string,\n resourceType: NonNullablePaths<UpdateResourceType, `revision`, 2>\n ): Promise<\n ResourceType & {\n __applicationErrorsType?: UpdateResourceTypeApplicationErrors;\n }\n >;\n}\n\nexport function deleteResourceType(\n httpClient: HttpClient\n): DeleteResourceTypeSignature {\n return (resourceTypeId: string) =>\n universalDeleteResourceType(\n resourceTypeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteResourceTypeSignature {\n /**\n * Deletes a resource type.\n *\n *\n * Deleting a resource type also automatically deletes all resources connected to it.\n * @param - ID of the resource type to delete.\n */\n (resourceTypeId: string): Promise<void>;\n}\n\nexport function queryResourceTypes(\n httpClient: HttpClient\n): QueryResourceTypesSignature {\n return () =>\n universalQueryResourceTypes(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryResourceTypesSignature {\n /**\n * Creates a query to retrieve a list of resource types.\n *\n * The `queryResourceTypes()` function builds a query to retrieve a list of resource types and returns a `ResourceTypesQueryBuilder` 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/resource-types/resource-types-query-builder/find) function.\n *\n * You can refine the query by chaining `ResourceTypesQueryBuilder` functions onto the query. `ResourceTypesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResourceTypes()` returns.\n *\n * `queryResourceTypes()` runs with the following `ResourceTypesQueryBuilder` 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 `queryResourceTypes()` are applied in the order they are called.\n *\n * The following `ResourceTypesQueryBuilder` functions are supported for the `queryResourceTypes()` 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/resource-types/resource-types-query-result/items) property in `ResourceTypesQueryResult`.\n */\n (): ResourceTypesQueryBuilder;\n}\n\nexport function countResourceTypes(\n httpClient: HttpClient\n): CountResourceTypesSignature {\n return (options?: CountResourceTypesOptions) =>\n universalCountResourceTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountResourceTypesSignature {\n /**\n * Counts resource types, given the provided filtering.\n *\n *\n * Refer to 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 supported filters.\n * @param - Filter to base the count on. See\n * [queryResourceTypes()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/query-resource-types)\n * for supported filters.\n */\n (options?: CountResourceTypesOptions): Promise<\n NonNullablePaths<CountResourceTypesResponse, `count`, 2>\n >;\n}\n\nexport const onResourceTypeCreated = EventDefinition(\n 'wix.bookings.resources.v2.resource_type_created',\n true,\n (event: ResourceTypeCreatedEnvelope) =>\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)<ResourceTypeCreatedEnvelope>();\nexport const onResourceTypeDeleted = EventDefinition(\n 'wix.bookings.resources.v2.resource_type_deleted',\n true,\n (event: ResourceTypeDeletedEnvelope) =>\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)<ResourceTypeDeletedEnvelope>();\nexport const onResourceTypeUpdated = EventDefinition(\n 'wix.bookings.resources.v2.resource_type_updated',\n true,\n (event: ResourceTypeUpdatedEnvelope) =>\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)<ResourceTypeUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n BusinessLocation,\n CountResourceTypesOptions,\n CountResourceTypesRequest,\n CountResourceTypesResponse,\n CreateResourceTypeErrors,\n CreateResourceTypeRequest,\n CreateResourceTypeResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteResourceTypeRequest,\n DeleteResourceTypeResponse,\n DistinctLocationIds,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetResourceTypeRequest,\n GetResourceTypeResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n LocationOptions,\n MessageEnvelope,\n QueryResourceTypesRequest,\n QueryResourceTypesResponse,\n RequestedFields,\n ResourceCounts,\n ResourceType,\n ResourceTypeCreatedEnvelope,\n ResourceTypeDeletedEnvelope,\n ResourceTypeUpdatedEnvelope,\n ResourceTypesQueryBuilder,\n ResourceTypesQueryResult,\n RestoreInfo,\n SortOrder,\n Sorting,\n SpecificLocation,\n UpdateResourceType,\n UpdateResourceTypeRequest,\n UpdateResourceTypeResponse,\n WebhookIdentityType,\n} from './bookings-resources-v2-resource-type-resource-types.universal.js';\n","import {\n createResourceType as publicCreateResourceType,\n getResourceType as publicGetResourceType,\n updateResourceType as publicUpdateResourceType,\n deleteResourceType as publicDeleteResourceType,\n queryResourceTypes as publicQueryResourceTypes,\n countResourceTypes as publicCountResourceTypes,\n} from './bookings-resources-v2-resource-type-resource-types.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 { onResourceTypeCreated as publicOnResourceTypeCreated } from './bookings-resources-v2-resource-type-resource-types.public.js';\nimport { onResourceTypeDeleted as publicOnResourceTypeDeleted } from './bookings-resources-v2-resource-type-resource-types.public.js';\nimport { onResourceTypeUpdated as publicOnResourceTypeUpdated } from './bookings-resources-v2-resource-type-resource-types.public.js';\n\nexport const createResourceType: MaybeContext<\n BuildRESTFunction<typeof publicCreateResourceType> &\n typeof publicCreateResourceType\n> = /*#__PURE__*/ createRESTModule(publicCreateResourceType);\nexport const getResourceType: MaybeContext<\n BuildRESTFunction<typeof publicGetResourceType> & typeof publicGetResourceType\n> = /*#__PURE__*/ createRESTModule(publicGetResourceType);\nexport const updateResourceType: MaybeContext<\n BuildRESTFunction<typeof publicUpdateResourceType> &\n typeof publicUpdateResourceType\n> = /*#__PURE__*/ createRESTModule(publicUpdateResourceType);\nexport const deleteResourceType: MaybeContext<\n BuildRESTFunction<typeof publicDeleteResourceType> &\n typeof publicDeleteResourceType\n> = /*#__PURE__*/ createRESTModule(publicDeleteResourceType);\nexport const queryResourceTypes: MaybeContext<\n BuildRESTFunction<typeof publicQueryResourceTypes> &\n typeof publicQueryResourceTypes\n> = /*#__PURE__*/ createRESTModule(publicQueryResourceTypes);\nexport const countResourceTypes: MaybeContext<\n BuildRESTFunction<typeof publicCountResourceTypes> &\n typeof publicCountResourceTypes\n> = /*#__PURE__*/ createRESTModule(publicCountResourceTypes);\n/**\n * Triggered when a resource type is created.\n */\nexport const onResourceTypeCreated: BuildEventDefinition<\n typeof publicOnResourceTypeCreated\n> &\n typeof publicOnResourceTypeCreated = createEventModule(\n publicOnResourceTypeCreated\n);\n/**\n * Triggered when a resource type is deleted.\n */\nexport const onResourceTypeDeleted: BuildEventDefinition<\n typeof publicOnResourceTypeDeleted\n> &\n typeof publicOnResourceTypeDeleted = createEventModule(\n publicOnResourceTypeDeleted\n);\n/**\n * Triggered when a resource type is updated.\n */\nexport const onResourceTypeUpdated: BuildEventDefinition<\n typeof publicOnResourceTypeUpdated\n> &\n typeof publicOnResourceTypeUpdated = createEventModule(\n publicOnResourceTypeUpdated\n);\n\nexport {\n RequestedFields,\n CreateResourceTypeErrors,\n SortOrder,\n WebhookIdentityType,\n} from './bookings-resources-v2-resource-type-resource-types.universal.js';\nexport {\n ResourceType,\n ResourceCounts,\n DistinctLocationIds,\n ExtendedFields,\n CreateResourceTypeRequest,\n LocationOptions,\n SpecificLocation,\n BusinessLocation,\n CreateResourceTypeResponse,\n GetResourceTypeRequest,\n GetResourceTypeResponse,\n UpdateResourceTypeRequest,\n UpdateResourceTypeResponse,\n DeleteResourceTypeRequest,\n DeleteResourceTypeResponse,\n QueryResourceTypesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryResourceTypesResponse,\n CursorPagingMetadata,\n Cursors,\n CountResourceTypesRequest,\n CountResourceTypesResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ResourceTypeCreatedEnvelope,\n ResourceTypeDeletedEnvelope,\n ResourceTypeUpdatedEnvelope,\n UpdateResourceType,\n ResourceTypesQueryResult,\n ResourceTypesQueryBuilder,\n CountResourceTypesOptions,\n} from './bookings-resources-v2-resource-type-resource-types.universal.js';\nexport {\n RequestedFieldsWithLiterals,\n CreateResourceTypeErrorsWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateResourceTypeApplicationErrors,\n UpdateResourceTypeApplicationErrors,\n} from './bookings-resources-v2-resource-type-resource-types.universal.js';\n","import { removeUndefinedKeys } from '../utils.js';\nexport function transformSDKAddressToRESTAddress(payload) {\n return (payload &&\n removeUndefinedKeys({\n city: payload.city,\n subdivision: payload.subdivision,\n country: payload.country,\n postalCode: payload.postalCode,\n formattedAddress: payload.formatted,\n geocode: payload.location,\n addressLine: payload.addressLine1,\n addressLine2: payload.addressLine2,\n streetAddress: payload.streetAddress && {\n name: payload.streetAddress.name,\n number: payload.streetAddress.number,\n apt: payload.streetAddress.apt,\n },\n }));\n}\nexport function transformRESTAddressToSDKAddress(payload) {\n return (payload &&\n removeUndefinedKeys({\n formatted: payload.formattedAddress,\n location: payload.geocode,\n addressLine1: payload.addressLine,\n addressLine2: payload.addressLine2,\n streetAddress: payload.streetAddress && {\n name: payload.streetAddress.name,\n number: payload.streetAddress.number,\n apt: payload.streetAddress.apt,\n },\n city: payload.city,\n subdivision: payload.subdivision,\n country: payload.country,\n postalCode: payload.postalCode,\n countryFullname: payload.countryFullname,\n subdivisionFullname: payload.subdivisionFullname,\n }));\n}\n","import { alignIfLegacy } from '../utils.js';\nimport { WIX_PROTOCOL } from '../constants.js';\nexport function transformSDKImageToRESTImage(val) {\n if (!val) {\n return;\n }\n const alignedImage = alignIfLegacy(val, 'image');\n const { protocol, hash, pathname } = new URL(alignedImage);\n const params = new URLSearchParams(hash.replace('#', ''));\n const height = params.get('originHeight');\n const width = params.get('originWidth');\n const [id, filenameOrAltText] = pathname\n .replace(`image://v1/`, '')\n .split('/');\n const decodedFilenameOrAltText = decodeURIComponent(filenameOrAltText);\n if (protocol === WIX_PROTOCOL) {\n const res = { id, height: Number(height), width: Number(width) };\n if (!decodedFilenameOrAltText) {\n return res;\n }\n return {\n ...res,\n altText: decodedFilenameOrAltText,\n filename: decodedFilenameOrAltText,\n url: val,\n };\n }\n return { url: val };\n}\nexport function transformRESTImageToSDKImage(payload) {\n if (!payload) {\n return;\n }\n let fileNameOrAltText = '';\n if (payload.filename || payload.altText) {\n fileNameOrAltText = `/${encodeURIComponent((payload.filename || payload.altText))}`;\n }\n return payload.id\n ? `wix:image://v1/${payload.id}${fileNameOrAltText}#originWidth=${payload.width}&originHeight=${payload.height}`\n : payload.url;\n}\n","export function transformSDKPageURLV2ToRESTPageURLV2(val) {\n if (!val) {\n return;\n }\n const { pathname } = new URL(val);\n return {\n relativePath: pathname, // (e.g /product-page/a-product)\n url: val, // (e.g https://mysite.com/product-page/a-product)\n };\n}\nexport function transformRESTPageURLV2ToSDKPageURLV2(val) {\n if (!val) {\n return;\n }\n return val.url;\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 resolveWixBookingsServicesV2ServicesServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-2',\n destPath: '',\n },\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n {\n srcPath: '/bookings/services/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n _: [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/services-2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixBookingsServicesV2AddOnGroupsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/services-2',\n destPath: '',\n },\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n {\n srcPath: '/bookings/services/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n {\n srcPath: '/_api/bookings/v2/bulk/services',\n destPath: '/v2/bulk/services',\n },\n ],\n _: [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/bookings/v2/services',\n destPath: '/v2/services',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/services-2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_services';\n\n/**\n * Create a new AddOns group.\n * An AddOns group defines a collection of AddOns that can be linked to a Service,\n * with constraints such as minimum and maximum selections.\n */\nexport function createAddOnGroup(payload: object): RequestOptionsFactory<any> {\n function __createAddOnGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.AddOnGroupsService.CreateAddOnGroup',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2AddOnGroupsServiceUrl({\n protoPath: '/v2/services/add-on-groups/create',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createAddOnGroup;\n}\n\n/**\n * Delete an existing AddOns group.\n * This will remove the group and unlink all associated AddOns.\n */\nexport function deleteAddOnGroup(payload: object): RequestOptionsFactory<any> {\n function __deleteAddOnGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.AddOnGroupsService.DeleteAddOnGroup',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2AddOnGroupsServiceUrl({\n protoPath: '/v2/services/add-on-groups/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deleteAddOnGroup;\n}\n\n/**\n * Update an existing AddOns group.\n * This allows modifying group settings such as its name, prompt, constraints, or associated AddOns.\n */\nexport function updateAddOnGroup(payload: object): RequestOptionsFactory<any> {\n function __updateAddOnGroup({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.AddOnGroupsService.UpdateAddOnGroup',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2AddOnGroupsServiceUrl({\n protoPath: '/v2/services/add-on-groups/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __updateAddOnGroup;\n}\n\n/**\n * Retrieves a list of AddOnGroups including enriched AddOn details in the correct order.\n * If the group_id is specified, only the AddOns for the specified group will be returned,\n * otherwise all groups will be returned.\n */\nexport function listAddOnGroupsByServiceId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAddOnGroupsByServiceId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2AddOnGroupsServiceUrl({\n protoPath:\n '/v2/services/add-on-groups/list-add-on-groups-by-service-id',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __listAddOnGroupsByServiceId;\n}\n\n/**\n * Sets the AddOns for a specific group.\n * The order of the AddOns in the list will be used to determine their display order.\n */\nexport function setAddOnsForGroup(payload: object): RequestOptionsFactory<any> {\n function __setAddOnsForGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.AddOnGroupsService.SetAddOnsForGroup',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2AddOnGroupsServiceUrl({\n protoPath: '/v2/services/add-on-groups/set-add-ons-for-group',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __setAddOnsForGroup;\n}\n\n/**\n * Creates a service.\n *\n *\n * ### Required fields\n *\n * When creating a service you must specify the following fields:\n * - `type`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)):\n * Whether it's an appointment-based service, class, or course.\n * - `name`: Service name that's displayed to customers.\n * - `onlineBooking`:\n * Settings determining whether customers can book online, whether the business\n * must manually confirm bookings, and whether customers can request to book an\n * appointment time slot that already has a booking request awaiting business\n * confirmation.\n * - `payment`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)):\n * How customers can pay when signing up for the service.\n * - `defaultCapacity`: The maximum number of customers that can book the service. Required for all service types. For appointment-based services, it must be `1`.\n *\n * #### Session durations\n *\n * Depending on which type of service you're creating, you may also need to specify\n * supported session durations.\n *\n * __Classes and courses__\n *\n * Don't specify `schedule.availabilityConstraints.sessionDurations`.\n *\n * __Appointment-based services without varied pricing based on session length__\n *\n * Specify the single supported session duration in the\n * `schedule.availabilityConstraints.sessionDurations` array.\n *\n * __Appointment-based services with varied pricing based on session length__\n *\n * - Specify all supported session durations in `schedule.availabilityConstraints.sessionDurations`.\n * - Note that Wix Bookings doesn't display these values to customers and\n * ignores them in pricing and availability calculations. Instead session\n * durations are retrieved from the relevant service variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n * - It is mandatory to specify `schedule.availabilityConstraints.sessionDurations`,\n * even though these values are ignored.\n */\nexport function createService(payload: object): RequestOptionsFactory<any> {\n function __createService({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n { path: 'service.staffMembers.mainMedia.image.urlExpirationDate' },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.CreateService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createService;\n}\n\n/**\n * Creates multiple services.\n *\n *\n * See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service))\n * for more details.\n */\nexport function bulkCreateServices(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateServices({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'services.createdDate' },\n { path: 'services.updatedDate' },\n { path: 'services.media.items.image.urlExpirationDate' },\n { path: 'services.media.mainMedia.image.urlExpirationDate' },\n { path: 'services.media.coverMedia.image.urlExpirationDate' },\n { path: 'services.bookingPolicy.createdDate' },\n { path: 'services.bookingPolicy.updatedDate' },\n { path: 'services.schedule.firstSessionStart' },\n { path: 'services.schedule.lastSessionEnd' },\n { path: 'services.staffMembers.mainMedia.image.urlExpirationDate' },\n {\n path: 'services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'services.supportedSlugs.createdDate' },\n { path: 'services.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'services.locations.business.address.geocode.latitude' },\n { path: 'services.locations.business.address.geocode.longitude' },\n { path: 'services.locations.custom.address.geocode.latitude' },\n { path: 'services.locations.custom.address.geocode.longitude' },\n { path: 'services.locations.calculatedAddress.geocode.latitude' },\n { path: 'services.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.BulkCreateServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/bulk/services/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 { path: 'results.item.media.items.image.urlExpirationDate' },\n { path: 'results.item.media.mainMedia.image.urlExpirationDate' },\n { path: 'results.item.media.coverMedia.image.urlExpirationDate' },\n { path: 'results.item.bookingPolicy.createdDate' },\n { path: 'results.item.bookingPolicy.updatedDate' },\n { path: 'results.item.schedule.firstSessionStart' },\n { path: 'results.item.schedule.lastSessionEnd' },\n {\n path: 'results.item.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'results.item.supportedSlugs.createdDate' },\n { path: 'results.item.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'results.item.locations.business.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.business.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateServices;\n}\n\n/** Retrieves a service. */\nexport function getService(payload: object): RequestOptionsFactory<any> {\n function __getService({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'GET' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.GetService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}',\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: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getService;\n}\n\n/**\n * Updates a service.\n *\n *\n * Each time the service is updated, `revision` increments by 1. You must\n * include the number of the existing revision when updating the service.\n * This ensures you're working with the latest service information and\n * prevents unintended overwrites.\n *\n * ### Session durations\n *\n * Specify `schedule.availabilityConstraints.sessionDurations`\n * only if you want to update it for appointment-based services without varied\n * pricing based on session length. Don't specify `schedule.availabilityConstraints.sessionDurations`\n * for all other appointment-based services, classes, or courses. See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service#session-durations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service#session-durations))\n * for more details.\n *\n * ## Service locations\n *\n * Don't call Update Service to adjust service locations, call Set Service Locations ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/set-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-service-locations)) instead.\n */\nexport function updateService(payload: object): RequestOptionsFactory<any> {\n function __updateService({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n { path: 'service.staffMembers.mainMedia.image.urlExpirationDate' },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'PATCH' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.UpdateService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{service.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: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateService;\n}\n\n/**\n * Updates up to 100 services.\n *\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n */\nexport function bulkUpdateServices(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateServices({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'services.mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'services.service.createdDate' },\n { path: 'services.service.updatedDate' },\n { path: 'services.service.media.items.image.urlExpirationDate' },\n { path: 'services.service.media.mainMedia.image.urlExpirationDate' },\n { path: 'services.service.media.coverMedia.image.urlExpirationDate' },\n { path: 'services.service.bookingPolicy.createdDate' },\n { path: 'services.service.bookingPolicy.updatedDate' },\n { path: 'services.service.schedule.firstSessionStart' },\n { path: 'services.service.schedule.lastSessionEnd' },\n {\n path: 'services.service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'services.service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'services.service.supportedSlugs.createdDate' },\n { path: 'services.service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'services.service.locations.business.address.geocode.latitude',\n },\n {\n path: 'services.service.locations.business.address.geocode.longitude',\n },\n {\n path: 'services.service.locations.custom.address.geocode.latitude',\n },\n {\n path: 'services.service.locations.custom.address.geocode.longitude',\n },\n {\n path: 'services.service.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'services.service.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.BulkUpdateServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/bulk/services/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 { path: 'results.item.media.items.image.urlExpirationDate' },\n { path: 'results.item.media.mainMedia.image.urlExpirationDate' },\n { path: 'results.item.media.coverMedia.image.urlExpirationDate' },\n { path: 'results.item.bookingPolicy.createdDate' },\n { path: 'results.item.bookingPolicy.updatedDate' },\n { path: 'results.item.schedule.firstSessionStart' },\n { path: 'results.item.schedule.lastSessionEnd' },\n {\n path: 'results.item.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'results.item.supportedSlugs.createdDate' },\n { path: 'results.item.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'results.item.locations.business.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.business.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateServices;\n}\n\n/**\n * Updates multiple services by filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details about updating a service.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n */\nexport function bulkUpdateServicesByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateServicesByFilter({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n { path: 'service.staffMembers.mainMedia.image.urlExpirationDate' },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.ServicesService.BulkUpdateServicesByFilter',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/bulk/services/update-by-filter',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __bulkUpdateServicesByFilter;\n}\n\n/**\n * Deletes a service.\n *\n *\n * Specify `{\"preserveFutureSessionsWithParticipants\": true}` to retain all\n * future sessions for the service. By default, all future sessions are canceled.\n */\nexport function deleteService(payload: object): RequestOptionsFactory<any> {\n function __deleteService({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'DELETE' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.DeleteService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteService;\n}\n\n/**\n * Deletes multiple services.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n */\nexport function bulkDeleteServices(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteServices({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.BulkDeleteServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/bulk/services/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 { path: 'results.item.media.items.image.urlExpirationDate' },\n { path: 'results.item.media.mainMedia.image.urlExpirationDate' },\n { path: 'results.item.media.coverMedia.image.urlExpirationDate' },\n { path: 'results.item.bookingPolicy.createdDate' },\n { path: 'results.item.bookingPolicy.updatedDate' },\n { path: 'results.item.schedule.firstSessionStart' },\n { path: 'results.item.schedule.lastSessionEnd' },\n {\n path: 'results.item.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'results.item.supportedSlugs.createdDate' },\n { path: 'results.item.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'results.item.locations.business.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.business.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.latitude',\n },\n {\n path: 'results.item.locations.custom.address.geocode.longitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'results.item.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteServices;\n}\n\n/**\n * Deletes multiple services by filter.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\nexport function bulkDeleteServicesByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteServicesByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.ServicesService.BulkDeleteServicesByFilter',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/bulk/services/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteServicesByFilter;\n}\n\n/**\n * Creates a query to retrieve a list of `service` objects.\n *\n * The `queryServices()` function builds a query to retrieve a list of `service` objects and returns a `ServicesQueryBuilder` 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/services/services-query-builder/find) function.\n *\n * You can refine the query by chaining `ServicesQueryBuilder` functions onto the query. `ServicesQueryBuilder` functions enable you to sort, filter, and control the results that `queryServices()` returns.\n *\n * `queryServices()` runs with the following `ServicesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryServices()` are applied in the order they are called. For example, if you apply `ascending(\"category.name\")` and then `ascending(\"name\")`, the results are sorted first by `category.name`, and then, if there are multiple results with the same `category.name`, the items are sorted by `name`.\n *\n * The following `ServicesQueryBuilder` functions are supported for the `queryServices()` function. For a full description of the `service` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/services-query-result/items) property in `ServicesQueryResult`.\n */\nexport function queryServices(payload: object): RequestOptionsFactory<any> {\n function __queryServices({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.QueryServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/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: 'services.createdDate' },\n { path: 'services.updatedDate' },\n { path: 'services.media.items.image.urlExpirationDate' },\n { path: 'services.media.mainMedia.image.urlExpirationDate' },\n { path: 'services.media.coverMedia.image.urlExpirationDate' },\n { path: 'services.bookingPolicy.createdDate' },\n { path: 'services.bookingPolicy.updatedDate' },\n { path: 'services.schedule.firstSessionStart' },\n { path: 'services.schedule.lastSessionEnd' },\n {\n path: 'services.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'services.supportedSlugs.createdDate' },\n { path: 'services.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'services.locations.business.address.geocode.latitude' },\n { path: 'services.locations.business.address.geocode.longitude' },\n { path: 'services.locations.custom.address.geocode.latitude' },\n { path: 'services.locations.custom.address.geocode.longitude' },\n { path: 'services.locations.calculatedAddress.geocode.latitude' },\n {\n path: 'services.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryServices;\n}\n\n/**\n * Retrieves a list of up to 100 services, given the provided filtering, paging,\n * and sorting.\n *\n *\n * ### Defaults\n *\n * Search Services has the following default settings, which you can override:\n * + Sorted by `createdDate` in ascending order.\n * + `paging.limit` set to `100`.\n * + `paging.offset` set to `0`.\n *\n * ### Filters\n *\n * When using filters for dates, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n *\n * ### See also\n *\n * To learn about working with Search methods, see API Query Language\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language))\n * and Sorting and Paging\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)).\n */\nexport function searchServices(payload: object): RequestOptionsFactory<any> {\n function __searchServices({ 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.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.SearchServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/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: 'services.createdDate' },\n { path: 'services.updatedDate' },\n { path: 'services.media.items.image.urlExpirationDate' },\n { path: 'services.media.mainMedia.image.urlExpirationDate' },\n { path: 'services.media.coverMedia.image.urlExpirationDate' },\n { path: 'services.bookingPolicy.createdDate' },\n { path: 'services.bookingPolicy.updatedDate' },\n { path: 'services.schedule.firstSessionStart' },\n { path: 'services.schedule.lastSessionEnd' },\n {\n path: 'services.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'services.supportedSlugs.createdDate' },\n { path: 'services.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'services.locations.business.address.geocode.latitude' },\n { path: 'services.locations.business.address.geocode.longitude' },\n { path: 'services.locations.custom.address.geocode.latitude' },\n { path: 'services.locations.custom.address.geocode.longitude' },\n { path: 'services.locations.calculatedAddress.geocode.latitude' },\n {\n path: 'services.locations.calculatedAddress.geocode.longitude',\n },\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 __searchServices;\n}\n\n/**\n * Retrieves a list of up to 100 booking policies\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n * ### Defaults\n *\n * Query Policies has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Booking Policies API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * those services is returned. The `bookingPolicies.totalServiceCount` values\n * indicate the total number of services linked to each policy. You can call Search Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))\n * and specify the relevant policy ID in the filter to retrieve all services\n * connected to the booking policy.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\nexport function queryPolicies(payload: object): RequestOptionsFactory<any> {\n function __queryPolicies({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.QueryPolicies',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/policies/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: 'bookingPolicies.bookingPolicy.createdDate' },\n { path: 'bookingPolicies.bookingPolicy.updatedDate' },\n { path: 'bookingPolicies.services.createdDate' },\n { path: 'bookingPolicies.services.updatedDate' },\n {\n path: 'bookingPolicies.services.media.items.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.services.media.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.services.media.coverMedia.image.urlExpirationDate',\n },\n { path: 'bookingPolicies.services.bookingPolicy.createdDate' },\n { path: 'bookingPolicies.services.bookingPolicy.updatedDate' },\n { path: 'bookingPolicies.services.schedule.firstSessionStart' },\n { path: 'bookingPolicies.services.schedule.lastSessionEnd' },\n {\n path: 'bookingPolicies.services.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'bookingPolicies.services.supportedSlugs.createdDate' },\n { path: 'bookingPolicies.services.mainSlug.createdDate' },\n { path: 'bookingPolicies.connectedServices.createdDate' },\n { path: 'bookingPolicies.connectedServices.updatedDate' },\n {\n path: 'bookingPolicies.connectedServices.media.items.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.connectedServices.media.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.connectedServices.media.coverMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.connectedServices.bookingPolicy.createdDate',\n },\n {\n path: 'bookingPolicies.connectedServices.bookingPolicy.updatedDate',\n },\n {\n path: 'bookingPolicies.connectedServices.schedule.firstSessionStart',\n },\n {\n path: 'bookingPolicies.connectedServices.schedule.lastSessionEnd',\n },\n {\n path: 'bookingPolicies.connectedServices.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.connectedServices.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'bookingPolicies.connectedServices.supportedSlugs.createdDate',\n },\n {\n path: 'bookingPolicies.connectedServices.mainSlug.createdDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'bookingPolicies.services.locations.business.address.geocode.latitude',\n },\n {\n path: 'bookingPolicies.services.locations.business.address.geocode.longitude',\n },\n {\n path: 'bookingPolicies.services.locations.custom.address.geocode.latitude',\n },\n {\n path: 'bookingPolicies.services.locations.custom.address.geocode.longitude',\n },\n {\n path: 'bookingPolicies.services.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'bookingPolicies.services.locations.calculatedAddress.geocode.longitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.business.address.geocode.latitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.business.address.geocode.longitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.custom.address.geocode.latitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.custom.address.geocode.longitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPolicies;\n}\n\n/**\n * Retrieves a list of up to 100 booking forms\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n *\n * ### Defaults\n *\n * Query Booking Forms has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Forms API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * these service IDs and names is returned. The `bookingForms.totalServiceCount`\n * values indicate the total number of services linked to each form. You can call Query Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/query-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/query-services))\n * and specify the relevant form ID in the filter to retrieve all services\n * connected to the booking form.\n *\n * ### Default booking forms\n *\n * By default, all Wix Bookings services use a standard booking form. To retrieve\n * a site's default booking form with Query Booking Forms, specify\n * `{\"conditionalFields\": [\"DEFAULT_BOOKING_FORM\"]}`.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\nexport function queryBookingForms(payload: object): RequestOptionsFactory<any> {\n function __queryBookingForms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.QueryBookingForms',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/booking-forms/query',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __queryBookingForms;\n}\n\n/**\n * Counts how many services match the given filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)\n */\nexport function countServices(payload: object): RequestOptionsFactory<any> {\n function __countServices({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.CountServices',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countServices;\n}\n\n/**\n * Retrieves 3 separate lists of business, custom, and customer locations\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 * given the provided filtering, and whether each location is connected to at\n * least one of the site's services.\n *\n *\n * ### Defaults\n *\n * Query Locations has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the `location` object\n * ([REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\nexport function queryLocations(payload: object): RequestOptionsFactory<any> {\n function __queryLocations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.QueryLocations',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/locations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'businessLocations.locations.business.address.geocode.latitude',\n },\n {\n path: 'businessLocations.locations.business.address.geocode.longitude',\n },\n {\n path: 'businessLocations.locations.custom.address.geocode.latitude',\n },\n {\n path: 'businessLocations.locations.custom.address.geocode.longitude',\n },\n {\n path: 'businessLocations.locations.calculatedAddress.geocode.latitude',\n },\n {\n path: 'businessLocations.locations.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLocations;\n}\n\n/**\n * Retrieves a list of service categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)), given the provided filtering.\n *\n *\n * ### Defaults\n *\n * Query Categories has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\nexport function queryCategories(payload: object): RequestOptionsFactory<any> {\n function __queryCategories({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.QueryCategories',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/categories/query',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __queryCategories;\n}\n\n/**\n * Replaces the list of the locations\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 * where the business offers the service.\n *\n *\n * ### Consequences for customers\n *\n * Removing a service location may impact existing sessions and their\n * participants. If you remove at least one service location, you must\n * specify `removedLocationSessionsAction` to indicate what happens to all\n * future sessions scheduled at this location.\n *\n * - **Keep existing location**: If you want to retain future sessions at their\n * originally scheduled location, specify\n * `{\"removedLocationSessionsAction.action\": \"KEEP_AT_CURRENT_LOCATION\"}`.\n * This ensures nothing changes for the customer, but the business must be\n * able to provide access to the removed location in the future.\n * - **Update location**: If you want to update the location for future sessions\n * scheduled at the removed location, specify\n * `{\"removedLocationSessionsAction.action\": \"MOVE_TO_LOCATION\"}` and\n * `moveToLocationOptions.newLocation`.\n *\n * You can't mix and match to keep some sessions at the previous location while\n * moving other sessions to an updated location.\n *\n * Past session details aren't changed, no matter which option you choose for\n * future sessions.\n *\n * Future sessions scheduled for a location defined by the customer are also not\n * updated.\n *\n * ### Specify location details\n *\n * Depending on whether the new or updated location is a business or custom location,\n * you need to specify different fields.\n *\n * - **Business location**: Specify the relevant location ID\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 * in `locations.business.id`.\n * - **Custom location**: Specify the complete address object as\n * `locations.custom.address`.\n *\n * ### Participant notifications\n *\n * You can specify a `participantNotification.message` that's immediately send\n * to all customers who had booked at a changed location. Ensure\n * `participantNotification.notifyParticipants` is set to `true` to send the\n * message.\n */\nexport function setServiceLocations(\n payload: object\n): RequestOptionsFactory<any> {\n function __setServiceLocations({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'locations.business.address.geocode.latitude' },\n { path: 'locations.business.address.geocode.longitude' },\n { path: 'locations.custom.address.geocode.latitude' },\n { path: 'locations.custom.address.geocode.longitude' },\n { path: 'locations.calculatedAddress.geocode.latitude' },\n { path: 'locations.calculatedAddress.geocode.longitude' },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address.geocode.latitude',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address.geocode.longitude',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address.geocode.latitude',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address.geocode.longitude',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress.geocode.latitude',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress.geocode.longitude',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.SetServiceLocations',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}/locations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setServiceLocations;\n}\n\n/**\n * Adds a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to a service's `payment.pricingPlanIds` array.\n *\n *\n * The call doesn't validate whether the service's `payment.options.pricingPlan`\n * is set to `true`. If it's set to `false`, customers aren't able to pay\n * for their bookings using pricing plans. You can call Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * to change a service's supported payment methods.\n */\nexport function enablePricingPlansForService(\n payload: object\n): RequestOptionsFactory<any> {\n function __enablePricingPlansForService({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.ServicesService.EnablePricingPlansForService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}/pricing-plans/add',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __enablePricingPlansForService;\n}\n\n/**\n * Removes a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * from a service's `payment.pricingPlanIds` array.\n *\n *\n * If you remove all pricing plan IDs from `payment.pricingPlanIds` and the\n * service supports only payments by pricing plan, customers will no longer be\n * able to book the service, as they will have no payment options available.\n */\nexport function disablePricingPlansForService(\n payload: object\n): RequestOptionsFactory<any> {\n function __disablePricingPlansForService({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn:\n 'wix.bookings.services.v2.ServicesService.DisablePricingPlansForService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}/pricing-plans/remove',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __disablePricingPlansForService;\n}\n\n/**\n * Sets a new active slug for the service.\n *\n *\n * The call fails if at least one of these conditions is met:\n * - The slug doesn't adheres to the supported format.\n * - Another service is currently using the slug.\n * - Another service has used the slug in the past.\n */\nexport function setCustomSlug(payload: object): RequestOptionsFactory<any> {\n function __setCustomSlug({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.SetCustomSlug',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/{serviceId}/slugs/custom',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'slug.createdDate' },\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setCustomSlug;\n}\n\n/**\n * Checks whether a custom slug is validate for the service.\n *\n *\n * The checks include:\n * - The slug adheres to the supported format.\n * - No other service is currently using the slug.\n * - No other service has used the slug in the past.\n *\n * The call fails if at least one of the checks fails.\n */\nexport function validateSlug(payload: object): RequestOptionsFactory<any> {\n function __validateSlug({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.ValidateSlug',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/slugs/validate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __validateSlug;\n}\n\n/**\n * Clones a service.\n *\n *\n * ### Connected entities\n *\n * By default, not all entities connected to the service are cloned.\n *\n * #### Schedule\n *\n * Wix Bookings automatically creates a new active 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 * for the cloned service. If Wix Bookings can't create this schedule, the\n * Clone Service call fails.\n *\n * - __For appointment-based services__: Future appointments aren't added to the\n * cloned service's schedule. Use the Events API\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 * to add them as needed.\n * - __For classes and courses__: Future one-time events aren't added to the\n * cloned service's schedule, while future recurring events are added\n * asynchronously. The Clone Service call always succeeds, whether or not\n * recurring events are added.\n * If the response includes `RECURRING_EVENTS` in the `errors` array, it means the\n * cloned service doesn't have future recurring events, even though the original\n * service does. You can either delete the cloned service and try again or use\n * the Events API\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 * to add missing events to the schedule.\n *\n * Wix Bookings never adds past events to the cloned service's schedule.\n *\n * #### Service options and variants\n *\n * If the original service has variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),\n * they're cloned asynchronously. The Clone Service call always succeeds,\n * regardless of whether variants were cloned.\n *\n * If the response includes `OPTIONS_AND_VARIANTS` in the `errors` array, the cloned\n * service doesn't have variants, even though the original service does. You can\n * delete the cloned service and call Clone Service again, or use the\n * _Service Options And Variants API_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction))\n * to add variants.\n *\n * #### Booking form\n *\n * The original service's booking form isn't cloned, whether it's\n * the default or a custom booking form.\n *\n * #### Pricing plans\n *\n * If the original service's accepts payments via pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/introduction)),\n * the cloned service's `payment.options.pricingPlan` is also set to `true`. To\n * accept specific pricing plans, call Enable Pricing Plans For Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/enable-pricing-plans-for-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service)),\n * after cloning the service. If the original service accepts only\n * pricing plan payments and you don't call Enable Pricing Plans For Service\n * after cloning the service, customers will be unable to book the service.\n */\nexport function cloneService(payload: object): RequestOptionsFactory<any> {\n function __cloneService({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.services.v2.service',\n method: 'POST' as any,\n methodFqn: 'wix.bookings.services.v2.ServicesService.CloneService',\n packageName: PACKAGE_NAME,\n url: resolveWixBookingsServicesV2ServicesServiceUrl({\n protoPath: '/v2/services/clone',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'service.createdDate' },\n { path: 'service.updatedDate' },\n { path: 'service.media.items.image.urlExpirationDate' },\n { path: 'service.media.mainMedia.image.urlExpirationDate' },\n { path: 'service.media.coverMedia.image.urlExpirationDate' },\n { path: 'service.bookingPolicy.createdDate' },\n { path: 'service.bookingPolicy.updatedDate' },\n { path: 'service.schedule.firstSessionStart' },\n { path: 'service.schedule.lastSessionEnd' },\n {\n path: 'service.staffMembers.mainMedia.image.urlExpirationDate',\n },\n {\n path: 'service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate',\n },\n { path: 'service.supportedSlugs.createdDate' },\n { path: 'service.mainSlug.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'service.locations.business.address.geocode.latitude' },\n { path: 'service.locations.business.address.geocode.longitude' },\n { path: 'service.locations.custom.address.geocode.latitude' },\n { path: 'service.locations.custom.address.geocode.longitude' },\n { path: 'service.locations.calculatedAddress.geocode.latitude' },\n { path: 'service.locations.calculatedAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cloneService;\n}\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 ambassadorWixBookingsServicesV2Service from './bookings-services-v2-service-services.http.js';\n// @ts-ignore\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKPageURLV2ToRESTPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformRESTPageURLV2ToSDKPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** The `service` object represents an offering that a business provides to its customers. */\nexport interface Service {\n /**\n * Service ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Service type.\n * Learn more about *service types*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)).\n */\n type?: ServiceTypeWithLiterals;\n /**\n * Order of the service within a *category*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object)).\n */\n sortOrder?: number | null;\n /**\n * Service name.\n * @maxLength 400\n * @minLength 1\n */\n name?: string | null;\n /**\n * Service description. For example, `High-class hair styling, cuts, straightening and color`.\n * @maxLength 7000\n */\n description?: string | null;\n /**\n * Short service description, such as `Hair styling`.\n * @maxLength 6000\n */\n tagLine?: string | null;\n /**\n * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.\n * @min 1\n * @max 1000\n */\n defaultCapacity?: number | null;\n /** Media associated with the service. */\n media?: Media;\n /** Whether the service is hidden from Wix Bookings pages and widgets. */\n hidden?: boolean | null;\n /**\n * _Category_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object))\n * the service is associated with.\n */\n category?: V2Category;\n /** Form the customer filled out when booking the service. */\n form?: Form;\n /**\n * Payment options for booking the service.\n * Learn more about *service payments*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)).\n */\n payment?: Payment;\n /** Online booking settings. */\n onlineBooking?: OnlineBooking;\n /** Conferencing options for the service. */\n conferencing?: Conferencing;\n /**\n * The locations this service is offered at. Read more about *service locations*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations)).\n * @immutable\n * @maxSize 500\n */\n locations?: Location[];\n /**\n * _Policy_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction))\n * determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.\n */\n bookingPolicy?: BookingPolicy;\n /**\n * The service's *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 * which can be used to manage the service's *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 */\n schedule?: Schedule;\n /**\n * IDs of the *staff members*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))\n * providing the service. Available only for appointment-based services.\n * @maxSize 220\n * @format GUID\n */\n staffMemberIds?: string[];\n /**\n * Information about which resources must be available so customers can book the service.\n * For example, a meeting room or equipment.\n * @maxSize 3\n */\n serviceResources?: ServiceResource[];\n /**\n * A slug is the last part of the URL address that serves as a unique identifier of the service.\n * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.\n * @readonly\n * @maxSize 100\n */\n supportedSlugs?: Slug[];\n /**\n * Active slug for the service.\n * Learn more about *service slugs*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-slugs) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs)).\n * @readonly\n */\n mainSlug?: Slug;\n /**\n * URLs to various service-related pages, such as the calendar page and the booking page.\n * @readonly\n */\n urls?: URLs;\n /** Extensions enabling users to save custom data related to the service. */\n extendedFields?: ExtendedFields;\n /** Custom SEO data for the service. */\n seoData?: SeoSchema;\n /**\n * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the service is updated. To\n * prevent conflicting changes, the existing revision must be used when updating\n * a service.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport enum ServiceType {\n /** Appointment-based service. */\n APPOINTMENT = 'APPOINTMENT',\n /** Class service. */\n CLASS = 'CLASS',\n /** Course service. */\n COURSE = 'COURSE',\n}\n\n/** @enumType */\nexport type ServiceTypeWithLiterals =\n | ServiceType\n | 'APPOINTMENT'\n | 'CLASS'\n | 'COURSE';\n\nexport interface Media {\n /**\n * Media items associated with the service.\n * @maxSize 100\n */\n items?: MediaItem[];\n /** Primary media associated with the service. */\n mainMedia?: MediaItem;\n /** Cover media associated with the service. */\n coverMedia?: MediaItem;\n}\n\nexport interface MediaItem extends MediaItemItemOneOf {\n /** Details of the image associated with the service, such as URL and size. */\n image?: string;\n}\n\n/** @oneof */\nexport interface MediaItemItemOneOf {\n /** Details of the image associated with the service, such as URL and size. */\n image?: string;\n}\n\nexport interface V2Category {\n /**\n * Category ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Category name.\n * @maxLength 500\n * @readonly\n */\n name?: string | null;\n /**\n * Order of a category within a category list.\n * @readonly\n */\n sortOrder?: number | null;\n}\n\nexport interface Form {\n /**\n * ID of the form associated with the service.\n * The form information that you submit when booking includes contact details, participants, and other form fields set up for the service.\n * You can manage the service booking form fields using the Bookings Forms API.\n * @format GUID\n */\n _id?: string;\n}\n\nexport interface FormSettings {\n /** Whether the service booking form should be hidden from the site. */\n hidden?: boolean | null;\n}\n\nexport interface Payment extends PaymentRateOneOf {\n /**\n * The details for the fixed price of the service.\n *\n * Required when: `rateType` is `FIXED`\n */\n fixed?: FixedPayment;\n /**\n * The details for the custom price of the service.\n *\n * Required when: `rateType` is `CUSTOM`\n */\n custom?: CustomPayment;\n /**\n * The details for the varied pricing of the service.\n * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n *\n * Required when: `rateType` is `VARIED`\n */\n varied?: VariedPayment;\n /** The rate the customer is expected to pay for the service. */\n rateType?: RateTypeWithLiterals;\n /** The payment options a customer can use to pay for the service. */\n options?: PaymentOptions;\n /**\n * IDs of pricing plans that can be used as payment for the service.\n * @readonly\n * @maxSize 75\n * @format GUID\n */\n pricingPlanIds?: string[];\n /**\n * How customers can pay for add-ons when paying for the related booking with a pricing plan ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/introduction)).\n * If customers pay for the booking using any method other than a pricing plan, the value of this field is ignored.\n */\n addOnOption?: AddOnPaymentOptionsWithLiterals;\n}\n\n/** @oneof */\nexport interface PaymentRateOneOf {\n /**\n * The details for the fixed price of the service.\n *\n * Required when: `rateType` is `FIXED`\n */\n fixed?: FixedPayment;\n /**\n * The details for the custom price of the service.\n *\n * Required when: `rateType` is `CUSTOM`\n */\n custom?: CustomPayment;\n /**\n * The details for the varied pricing of the service.\n * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n *\n * Required when: `rateType` is `VARIED`\n */\n varied?: VariedPayment;\n}\n\nexport enum RateType {\n /** Unknown rate type. */\n UNKNOWN_RATE_TYPE = 'UNKNOWN_RATE_TYPE',\n /** The service has a fixed price. */\n FIXED = 'FIXED',\n /** The service has a custom price, expressed as a price description. */\n CUSTOM = 'CUSTOM',\n /** This service is offered with a set of different prices based on different terms. */\n VARIED = 'VARIED',\n /** This service is offered free of charge. */\n NO_FEE = 'NO_FEE',\n}\n\n/** @enumType */\nexport type RateTypeWithLiterals =\n | RateType\n | 'UNKNOWN_RATE_TYPE'\n | 'FIXED'\n | 'CUSTOM'\n | 'VARIED'\n | 'NO_FEE';\n\nexport interface FixedPayment {\n /**\n * The fixed price required to book the service.\n *\n * Required when: `rateType` is `FIXED`\n */\n price?: Money;\n /**\n * The deposit price required to book the service.\n *\n * Required when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`\n */\n deposit?: Money;\n}\n\n/**\n * Money.\n * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.\n */\nexport interface Money {\n /**\n * Monetary amount. Decimal string with a period as a decimal separator. For example `25.05`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, maxScale:2 }\n */\n value?: string;\n /**\n * Currency code. Must be valid ISO 4217 currency code (e.g., USD).\n * @format CURRENCY\n * @readonly\n */\n currency?: string;\n /**\n * Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.\n * @maxLength 50\n */\n formattedValue?: string | null;\n}\n\nexport interface CustomPayment {\n /**\n * A custom description explaining to the customer how to pay for the service.\n * @maxLength 50\n */\n description?: string | null;\n}\n\nexport interface VariedPayment {\n /** The default price for the service without any variants. It will also be used as the default price for any new variant. */\n defaultPrice?: Money;\n /**\n * The deposit price required to book the service.\n *\n * Required when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`\n */\n deposit?: Money;\n /**\n * The minimal price a customer may pay for this service, based on its variants.\n * @readonly\n */\n minPrice?: Money;\n /**\n * The maximum price a customer may pay for this service, based on its variants.\n * @readonly\n */\n maxPrice?: Money;\n}\n\nexport interface PaymentOptions {\n /**\n * Customers can pay for the service online.\n * When `true`:\n * + `rateType` must be either `FIXED` or `VARIED`.\n * + `fixed.price` or `varied.default_price` must be specified respectively. Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online).\n */\n online?: boolean | null;\n /** Customers can pay for the service in person. */\n inPerson?: boolean | null;\n /**\n * This service requires a deposit to be made online in order to book it.\n * When `true`:\n * + `rateType` must be `VARIED` or `FIXED`.\n * + A `deposit` must be specified.\n */\n deposit?: boolean | null;\n /** Customers can pay for the service using a pricing plan. */\n pricingPlan?: boolean | null;\n}\n\nexport enum AddOnPaymentOptions {\n /** There is no information about how customers are required to pay for add-ons when the booking is paid for with a pricing plan. */\n UNKNOWN_ADD_ON_PAYMENT_OPTIONS = 'UNKNOWN_ADD_ON_PAYMENT_OPTIONS',\n /** Customers are required to pay online for add-ons when the booking is paid for with a pricing plan. */\n ONLINE = 'ONLINE',\n /** Customers are required to pay in person for add-ons when the booking is paid for with a pricing plan. */\n IN_PERSON = 'IN_PERSON',\n}\n\n/** @enumType */\nexport type AddOnPaymentOptionsWithLiterals =\n | AddOnPaymentOptions\n | 'UNKNOWN_ADD_ON_PAYMENT_OPTIONS'\n | 'ONLINE'\n | 'IN_PERSON';\n\nexport interface OnlineBooking {\n /**\n * Whether the service can be booked online.\n * When set to `true`, customers can book the service online. Configure the payment options via the `service.payment` property.\n * When set to `false`, customers cannot book the service online, and the service can only be paid for in person.\n */\n enabled?: boolean | null;\n /** Booking the service requires approval by the Wix user. */\n requireManualApproval?: boolean | null;\n /** Multiple customers can request to book the same time slot. This is relevant when `requireManualApproval` is `true`. */\n allowMultipleRequests?: boolean | null;\n}\n\nexport interface Conferencing {\n /** Whether a conference link is generated for the service's sessions. */\n enabled?: boolean | null;\n}\n\nexport interface Location extends LocationOptionsOneOf {\n /** Information about business locations. */\n business?: BusinessLocationOptions;\n /** Information about custom locations. */\n custom?: CustomLocationOptions;\n /**\n * Location ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Location type.\n *\n * Default: `CUSTOM`\n */\n type?: LocationTypeWithLiterals;\n /**\n * Location address. Empty for `{\"type\": \"CUSTOMER\"}`.\n * @readonly\n */\n calculatedAddress?: CommonAddress;\n}\n\n/** @oneof */\nexport interface LocationOptionsOneOf {\n /** Information about business locations. */\n business?: BusinessLocationOptions;\n /** Information about custom locations. */\n custom?: CustomLocationOptions;\n}\n\nexport enum LocationType {\n UNKNOWN_LOCATION_TYPE = 'UNKNOWN_LOCATION_TYPE',\n /**\n * Location set by the business that is not a standard 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 */\n CUSTOM = 'CUSTOM',\n /**\n * 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 */\n BUSINESS = 'BUSINESS',\n /**\n * The customer specifies any address when booking. Available only for\n * appointment-based services.\n */\n CUSTOMER = 'CUSTOMER',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n | LocationType\n | 'UNKNOWN_LOCATION_TYPE'\n | 'CUSTOM'\n | 'BUSINESS'\n | 'CUSTOMER';\n\nexport interface CommonAddress extends CommonAddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** @maxLength 255 */\n addressLine1?: string | null;\n /**\n * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 255\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 255\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 255\n */\n postalCode?: string | null;\n /**\n * Full address of the location.\n * @maxLength 512\n */\n formatted?: string | null;\n}\n\n/** @oneof */\nexport interface CommonAddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** @maxLength 255 */\n addressLine?: string | null;\n}\n\n/** Street address. Includes street name, number, and apartment number in separate fields. */\nexport interface StreetAddress {\n /**\n * Street number.\n * @maxLength 255\n */\n number?: string;\n /**\n * Street name.\n * @maxLength 255\n */\n name?: string;\n /**\n * Apartment number.\n * @maxLength 255\n */\n apt?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface BusinessLocationOptions {\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 * When setting a business location, specify only the location ID. Other location details are overwritten.\n * @format GUID\n */\n _id?: string;\n /**\n * Business location name.\n * @readonly\n * @maxLength 150\n */\n name?: string;\n /**\n * Whether this is the default location. There can only be a single default location per site.\n * @readonly\n */\n default?: boolean | null;\n /**\n * Business location address.\n * @readonly\n */\n address?: CommonAddress;\n /**\n * Business location email.\n * @format EMAIL\n * @readonly\n */\n email?: string | null;\n /**\n * Business location phone.\n * @format PHONE\n * @readonly\n */\n phone?: string | null;\n}\n\nexport interface CustomLocationOptions {\n /**\n * ID of the custom location.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Address of the custom location. */\n address?: CommonAddress;\n}\n\n/**\n * `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service\n * by visitors and members.\n *\n * Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a\n * default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request\n * is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided.\n *\n * Sub-policies are defined in separate objects as specified below.\n *\n * - The `LimitEarlyBookingPolicy` object defines the policy for limiting early bookings.\n * - The `LimitLateBookingPolicy` object defines the policy for limiting late bookings.\n * - The `BookAfterStartPolicy` object defines the policy for booking after the start of the schedule.\n * - The `CancellationPolicy` object defines the policy for canceling a booked entity.\n * - The `ReschedulePolicy` object defines the policy for rescheduling booked entity.\n * - The `WaitlistPolicy` object defines the policy for a waitlist.\n * - The `ParticipantsPolicy` object defines the policy regarding the participants per booking.\n * - The `ResourcesPolicy` object defines the policy regarding the resources per booking.\n * - The `CancellationFeePolicy` object defines the policy regarding cancellation fees.\n * - The `SaveCreditCardPolicy` object defines the policy for saving credit card details.\n *\n * By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy\n * can be found in the description of the corresponding object.\n *\n * Partial updates are supported on the main entity level, however in order to update a sub-policy the client needs to provide the whole sub-policy object.\n */\nexport interface BookingPolicy {\n /**\n * The ID to the policy for the booking.\n * @format GUID\n */\n _id?: string;\n /**\n * Date and time the policy was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the policy was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Name of the policy.\n * @maxLength 400\n * @readonly\n */\n name?: string | null;\n /**\n * Custom description for the policy. This policy is displayed to the participant.\n * @readonly\n */\n customPolicyDescription?: PolicyDescription;\n /**\n * Whether the policy is the default for the meta site.\n * @readonly\n */\n default?: boolean | null;\n /**\n * Policy for limiting early bookings.\n * @readonly\n */\n limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;\n /**\n * Policy for limiting late bookings.\n * @readonly\n */\n limitLateBookingPolicy?: LimitLateBookingPolicy;\n /**\n * Policy on booking an entity after the start of the schedule.\n * @readonly\n */\n bookAfterStartPolicy?: BookAfterStartPolicy;\n /**\n * Policy for canceling a booked entity.\n * @readonly\n */\n cancellationPolicy?: CancellationPolicy;\n /**\n * Policy for rescheduling a booked entity.\n * @readonly\n */\n reschedulePolicy?: ReschedulePolicy;\n /**\n * Waitlist policy for the service.\n * @readonly\n */\n waitlistPolicy?: WaitlistPolicy;\n /**\n * Policy regarding the participants per booking.\n * @readonly\n */\n participantsPolicy?: ParticipantsPolicy;\n /**\n * Policy for allocating resources.\n * @readonly\n */\n resourcesPolicy?: ResourcesPolicy;\n /**\n * Rules for cancellation fees.\n * @readonly\n */\n cancellationFeePolicy?: CancellationFeePolicy;\n /**\n * Rule for saving credit card.\n * @readonly\n */\n saveCreditCardPolicy?: SaveCreditCardPolicy;\n}\n\n/** A description of the policy to display to participants. */\nexport interface PolicyDescription {\n /**\n * Whether the description should be displayed. If `true`, the description is displayed.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * The description to display.\n *\n * Default: Empty\n * Max length: 2500 characters\n * @maxLength 2500\n */\n description?: string;\n}\n\n/** The policy for limiting early bookings. */\nexport interface LimitEarlyBookingPolicy {\n /**\n * Whether there is a limit on how early a customer\n * can book. When `false`, there is no limit on the earliest\n * booking time and customers can book in advance, as early as they like.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Maximum number of minutes before the start of the session that a booking can be made. This value must be greater\n * than `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.\n *\n * Default: 10080 minutes (7 days)\n * Min: 1 minute\n * @min 1\n */\n earliestBookingInMinutes?: number;\n}\n\n/**\n * The policy for limiting late bookings.\n *\n * This policy and the `BookAfterStartPolicy` policy cannot be enabled at the same time. So if this policy\n * is enabled, `BookAfterStartPolicy` must be disabled.\n */\nexport interface LimitLateBookingPolicy {\n /**\n * Whether there is a limit on how late a customer\n * can book. When `false`, there is no limit on the latest\n * booking time and customers can book up to the last minute.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Minimum number of minutes before the start of the session that a booking can be made.\n * For a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.\n * This value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.\n *\n * Default: 1440 minutes (1 day)\n * Min: 1 minute\n * @min 1\n */\n latestBookingInMinutes?: number;\n}\n\n/**\n * The policy for whether a session can be booked after the start of the schedule.\n * This policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy\n * is enabled, the `LimitLateBookingPolicy` policy must be disabled.\n */\nexport interface BookAfterStartPolicy {\n /**\n * Whether booking is allowed after the start of the schedule. When `true`,\n * customers can book after the start of the schedule.\n *\n * Default: `false`\n */\n enabled?: boolean;\n}\n\n/** The policy for canceling a booked session. */\nexport interface CancellationPolicy {\n /**\n * Whether canceling a booking is allowed. When `true`, customers\n * can cancel the booking.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Whether there is a limit on the latest cancellation time. When `true`,\n * a time limit is enforced.\n *\n * Default: `false`\n */\n limitLatestCancellation?: boolean;\n /**\n * Minimum number of minutes before the start of the booked session that the booking can be canceled.\n *\n * Default: 1440 minutes (1 day)\n * Min: 1 minute\n * @min 1\n */\n latestCancellationInMinutes?: number;\n}\n\n/** The policy for rescheduling a booked session. */\nexport interface ReschedulePolicy {\n /**\n * Whether rescheduling a booking is allowed. When `true`, customers\n * can reschedule the booking.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Whether there is a limit on the latest reschedule time. When `true`,\n * a time limit is enforced.\n *\n * Default: `false`\n */\n limitLatestReschedule?: boolean;\n /**\n * Minimum number of minutes before the start of the booked session that the booking can be rescheduled.\n *\n * Default: 1440 minutes (1 day)\n * Min: 1 minute\n * @min 1\n */\n latestRescheduleInMinutes?: number;\n}\n\n/** The policy for the waitlist. */\nexport interface WaitlistPolicy {\n /**\n * Whether the session has a waitlist. If `true`, there is a waitlist.\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Number of spots available in the waitlist.\n *\n * Default: 10 spots\n * Min: 1 spot\n * @min 1\n */\n capacity?: number;\n /**\n * Amount of time a participant is given to book, once notified that a spot is available.\n *\n * Default: 10 minutes\n * Min: 1 spot\n * @min 1\n */\n reservationTimeInMinutes?: number;\n}\n\n/** The policy for the maximum number of participants per booking. */\nexport interface ParticipantsPolicy {\n /**\n * Maximum number of participants allowed.\n *\n * Default: 1 participant\n * Min: 1 participant\n * @min 1\n */\n maxParticipantsPerBooking?: number;\n}\n\n/** The policy regarding the allocation of resources (e.g. staff members). */\nexport interface ResourcesPolicy {\n /**\n * `true` if this policy is enabled, `false` otherwise.\n * When `false` then the client must always select a resource when booking an appointment.\n */\n enabled?: boolean;\n /**\n * `true`, if it is allowed to automatically assign a resource when booking an appointment,\n * `false`, if the client must always select a resource.\n *\n * Default: `false`\n */\n autoAssignAllowed?: boolean;\n}\n\nexport interface CancellationFeePolicy {\n /**\n * Whether canceling a booking will result in a cancellation fee\n *\n * Default: `false`\n */\n enabled?: boolean;\n /**\n * Cancellation windows describing the time of cancellation and the fee to charge.\n * @maxSize 2\n */\n cancellationWindows?: CancellationWindow[];\n /**\n * Whether the cancellation fee should not be automatically collected when customer cancels the booking.\n *\n * Default: `true`\n */\n autoCollectFeeEnabled?: boolean | null;\n}\n\nexport interface CancellationWindow extends CancellationWindowFeeOneOf {\n /** Amount to be charged as a cancellation fee. */\n amount?: Money;\n /**\n * Percentage of the original price to be charged as a cancellation fee.\n * @decimalValue options { gt:0, lte:100, maxScale:2 }\n */\n percentage?: string;\n /**\n * The fee will be applied if the booked session starts within this start time in minutes.\n * @min 1\n */\n startInMinutes?: number | null;\n}\n\n/** @oneof */\nexport interface CancellationWindowFeeOneOf {\n /** Amount to be charged as a cancellation fee. */\n amount?: Money;\n /**\n * Percentage of the original price to be charged as a cancellation fee.\n * @decimalValue options { gt:0, lte:100, maxScale:2 }\n */\n percentage?: string;\n}\n\nexport interface SaveCreditCardPolicy {\n /** Default: `false` */\n enabled?: boolean;\n}\n\n/**\n * Policy for determining how staff members are sorted and selected during the booking process.\n * This affects which staff member is chosen when multiple staff members are available for a service.\n */\nexport interface StaffSortingPolicy extends StaffSortingPolicyOptionsOneOf {\n rankingOptions?: RankingOptions;\n customOptions?: CustomOptions;\n /**\n * Method used for sorting and selecting staff members.\n *\n * Default: `RANDOM`\n */\n sortingMethodType?: SortingMethodTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface StaffSortingPolicyOptionsOneOf {\n rankingOptions?: RankingOptions;\n customOptions?: CustomOptions;\n}\n\n/** Order for ranking-based staff selection. */\nexport enum RankingOrder {\n UNKNOWN_RANKING_ORDER = 'UNKNOWN_RANKING_ORDER',\n /** Staff members with lower priority values are selected first. */\n LOWEST_TO_HIGHEST = 'LOWEST_TO_HIGHEST',\n /** Staff members with higher priority values are selected first. */\n HIGHEST_TO_LOWEST = 'HIGHEST_TO_LOWEST',\n}\n\n/** @enumType */\nexport type RankingOrderWithLiterals =\n | RankingOrder\n | 'UNKNOWN_RANKING_ORDER'\n | 'LOWEST_TO_HIGHEST'\n | 'HIGHEST_TO_LOWEST';\n\n/** Method used to sort and select staff members. */\nexport enum SortingMethodType {\n UNKNOWN_SORTING_METHOD_TYPE = 'UNKNOWN_SORTING_METHOD_TYPE',\n /** Staff members are selected randomly from available options. */\n RANDOM = 'RANDOM',\n /** Staff members are selected based on their priority ranking. */\n RANKING = 'RANKING',\n /**\n * Staff members are selected using a custom method provided by StaffSelectionSPI.\n * This allows third-party apps to implement custom staff selection logic.\n */\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type SortingMethodTypeWithLiterals =\n | SortingMethodType\n | 'UNKNOWN_SORTING_METHOD_TYPE'\n | 'RANDOM'\n | 'RANKING'\n | 'CUSTOM';\n\n/**\n * Configuration options for ranking-based staff selection.\n * Used when `sorting_method_type` is set to `RANKING`.\n */\nexport interface RankingOptions {\n /**\n * Order in which staff members are sorted by their priority ranking.\n *\n * Default: `LOWEST_TO_HIGHEST`\n */\n order?: RankingOrderWithLiterals;\n}\n\n/**\n * Configuration options for custom staff selection methods.\n * Used when `sorting_method_type` is set to `CUSTOM`.\n */\nexport interface CustomOptions {\n /**\n * ID of the custom selection method implemented in StaffSelectionSPI.\n * This identifies which custom sorting algorithm to use.\n * @format GUID\n */\n methodId?: string;\n /**\n * ID of the app that provides the custom selection method.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface Schedule {\n /**\n * ID of 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 * to which the service's events belong.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Start time of the first session in the schedule. For courses only.\n * @readonly\n */\n firstSessionStart?: Date | null;\n /**\n * End time of the last session in the schedule. For courses only.\n * @readonly\n */\n lastSessionEnd?: Date | null;\n /** Limitations affecting the service availability. */\n availabilityConstraints?: AvailabilityConstraints;\n}\n\nexport interface AvailabilityConstraints {\n /**\n * Calculated list of all supported session durations for the service. For\n * appointment-based services without varied pricing based on session length, it\n * matches the single value in the `sessionDurations` array. For appointment-based\n * services with varied pricing based on session length, it includes session\n * durations for all *variants*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),\n * while ignoring `sessionDurations`.\n * For courses and classes, it includes durations for all future\n * recurring sessions but excludes durations for one-off or past recurring sessions.\n * @readonly\n * @maxSize 50\n */\n durations?: Duration[];\n /**\n * List of supported session durations in minutes.\n *\n * - For appointment-based services, specify `sessionDurations` when creating a service.\n * - For appointment-based services with varied pricing by session length, you must still specify `sessionDurations`, but the values are ignored. Actual durations are taken from the service variants ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n * - For classes or courses, don't specify `sessionDurations` when creating a service.\n *\n * Min: `1` minute\n * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n * @maxSize 50\n */\n sessionDurations?: number[];\n /**\n * The number of minutes between the end of a session and the start of the next.\n *\n *\n * Min: `0` minutes\n * Max: `720` minutes\n * @max 720\n */\n timeBetweenSessions?: number;\n}\n\nexport interface Duration {\n /**\n * The duration of the service in minutes.\n *\n * Min: `1` minute\n * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)\n * @min 1\n * @max 44639\n */\n minutes?: number;\n}\n\nexport interface StaffMember {\n /**\n * ID of the staff member providing the service, can be used to retrieve resource information using wix-bookings-backend resources API.\n * @format GUID\n * @readonly\n */\n staffMemberId?: string;\n /**\n * Name of the staff member\n * @maxLength 40\n * @readonly\n */\n name?: string | null;\n /**\n * Main media associated with the service.\n * @readonly\n */\n mainMedia?: StaffMediaItem;\n}\n\nexport interface StaffMediaItem extends StaffMediaItemItemOneOf {\n /** Details of the image associated with the staff, such as URL and size. */\n image?: string;\n}\n\n/** @oneof */\nexport interface StaffMediaItemItemOneOf {\n /** Details of the image associated with the staff, such as URL and size. */\n image?: string;\n}\n\nexport interface StaffMemberDetails {\n /**\n * Staff members providing the service. For appointments only.\n * @maxSize 220\n */\n staffMembers?: StaffMember[];\n}\n\nexport interface ResourceGroup {\n /**\n * An optional resource group ID. If specified, it references a resource group in the resource groups API.\n * TODO - referenced_entity annotation\n * @format GUID\n */\n resourceGroupId?: string | null;\n /**\n * Resource IDs. Each ID references a resource in the resources API and may be a subset of resources within a resource group.\n * TODO - referenced_entity annotation\n */\n resourceIds?: ResourceIds;\n /**\n * Specifies how many resources in the group / resource IDs are required to book the service.\n * Defaults to 1.\n * @min 1\n */\n requiredResourcesNumber?: number | null;\n /**\n * If set to `true`, the customer can select the specific resources while booking the service.\n * If set to `false`, the resources required to book the service will be auto-selected at the time of the booking.\n * Defaults to false.\n * @readonly\n */\n selectableResource?: boolean | null;\n}\n\nexport interface ResourceIds {\n /**\n * Values of the resource IDs.\n * @maxSize 100\n * @format GUID\n */\n values?: string[];\n}\n\nexport interface ServiceResource extends ServiceResourceSelectionOneOf {\n /**\n * Details about the required *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 resourceType?: ResourceType;\n}\n\n/** @oneof */\nexport interface ServiceResourceSelectionOneOf {}\n\nexport interface ResourceType {\n /**\n * The type of the resource.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The name of the resource type.\n * @readonly\n * @maxLength 40\n * @minLength 1\n */\n name?: string | null;\n}\n\nexport interface Slug {\n /**\n * The unique part of service's URL that identifies the service's information page. For example, `service-1` in `https:/example.com/services/service-1`.\n * @maxLength 500\n */\n name?: string;\n /**\n * Whether the slug was generated or customized. If `true`, the slug was customized manually by the business owner. Otherwise, the slug was automatically generated from the service name.\n * @readonly\n */\n custom?: boolean | null;\n /**\n * Date and time the slug was created. This is a system field.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport interface URLs {\n /**\n * The URL for the service page.\n * @readonly\n */\n servicePage?: string;\n /**\n * The URL for the booking entry point. It can be either to the calendar or to the service page.\n * @readonly\n */\n bookingPage?: string;\n /**\n * The URL for the calendar. Can be empty if no calendar exists.\n * @readonly\n */\n calendarPage?: string;\n}\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\n/**\n * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\n * The search engines use this information for ranking purposes, or to display snippets in the search results.\n * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.\n */\nexport interface SeoSchema {\n /** SEO tag information. */\n tags?: Tag[];\n /** SEO general settings. */\n settings?: Settings;\n}\n\nexport interface Keyword {\n /** Keyword value. */\n term?: string;\n /** Whether the keyword is the main focus keyword. */\n isMain?: boolean;\n /**\n * The source that added the keyword terms to the SEO settings.\n * @maxLength 1000\n */\n origin?: string | null;\n}\n\nexport interface Tag {\n /**\n * SEO tag type.\n *\n *\n * Supported values: `title`, `meta`, `script`, `link`.\n */\n type?: string;\n /**\n * A `{\"key\": \"value\"}` pair object where each SEO tag property (`\"name\"`, `\"content\"`, `\"rel\"`, `\"href\"`) contains a value.\n * For example: `{\"name\": \"description\", \"content\": \"the description itself\"}`.\n */\n props?: Record<string, any> | null;\n /** SEO tag metadata. For example, `{\"height\": 300, \"width\": 240}`. */\n meta?: Record<string, any> | null;\n /** SEO tag inner content. For example, `<title> inner content </title>`. */\n children?: string;\n /** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */\n custom?: boolean;\n /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */\n disabled?: boolean;\n}\n\nexport interface Settings {\n /**\n * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n *\n *\n * Default: `false` (automatical redirect is enabled).\n */\n preventAutoRedirect?: boolean;\n /**\n * User-selected keyword terms for a specific page.\n * @maxSize 5\n */\n keywords?: Keyword[];\n}\n\nexport interface AddOnGroup {\n /**\n * ID of the group.\n * @readonly\n * @format GUID\n */\n _id?: string | null;\n /**\n * The name of the group.\n * @maxLength 100\n */\n name?: string | null;\n /**\n * The maximum number of AddOns that can be selected from this group.\n * If not set, there is no upper limit.\n */\n maxNumberOfAddOns?: number | null;\n /**\n * List of AddOn IDs that are part of this group.\n * @format GUID\n * @maxSize 7\n */\n addOnIds?: string[] | null;\n /**\n * The group prompt.\n * @maxLength 200\n */\n prompt?: string | null;\n}\n\nexport interface AddOnDetails {\n /**\n * ID of the AddOn.\n * @format GUID\n */\n addOnId?: string | null;\n /**\n * The duration of the AddOn in minutes.\n * This field can be empty if the AddOn has no specific duration.\n */\n durationInMinutes?: number | null;\n}\n\n/**\n * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as\n * performs context manipulation with adding tenant, provided in message to callscope.\n */\nexport interface ReindexMessage extends ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: Delete;\n entityFqdn?: string;\n tenantId?: string;\n eventTime?: Date | null;\n entityEventSequence?: string | null;\n schema?: Schema;\n}\n\n/** @oneof */\nexport interface ReindexMessageActionOneOf {\n upsert?: Upsert;\n delete?: Delete;\n}\n\nexport interface Upsert {\n entityId?: string;\n entityAsJson?: string;\n}\n\nexport interface Delete {\n entityId?: string;\n}\n\nexport interface Schema {\n label?: string;\n clusterName?: string;\n}\n\nexport interface SetCustomSlugEvent {\n /** The main slug for the service after the update */\n mainSlug?: Slug;\n}\n\nexport interface ServicesUrlsChanged {}\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 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 CreateAddOnGroupRequest {\n /** AddOnGroup to create. */\n addOnGroup: AddOnGroup;\n /**\n * ID of the service to create the AddOnGroup for.\n * @format GUID\n */\n serviceId?: string | null;\n}\n\nexport interface CreateAddOnGroupResponse {\n /** Created AddOnGroup. */\n addOnGroup?: AddOnGroup;\n}\n\nexport interface DeleteAddOnGroupRequest {\n /**\n * ID of the AddOnGroup to delete.\n * @format GUID\n */\n addOnGroupId: string | null;\n /**\n * ID of the service from which to delete the AddOnGroup.\n * @format GUID\n */\n serviceId: string | null;\n}\n\nexport interface DeleteAddOnGroupResponse {}\n\nexport interface UpdateAddOnGroupRequest {\n /** AddOnGroup to update. */\n addOnGroup: AddOnGroup;\n /**\n * ID of the service that contains the AddOnGroup.\n * @format GUID\n */\n serviceId: string | null;\n}\n\nexport interface UpdateAddOnGroupResponse {\n /** Updated AddOnGroup */\n addOnGroup?: AddOnGroup;\n}\n\nexport interface ListAddOnGroupsByServiceIdRequest {\n /**\n * ID of the service to retrieve AddOnGroups for.\n * @format GUID\n */\n serviceId: string | null;\n /**\n * List of group ids to return. If not provided, all groups are returned.\n * @format GUID\n * @maxSize 3\n */\n groupIds?: string[] | null;\n}\n\nexport interface ListAddOnGroupsByServiceIdResponse {\n /**\n * List of group IDs and their linked AddOns.\n * @maxSize 3\n */\n addOnGroupsDetails?: AddOnGroupDetail[];\n}\n\nexport interface AddOn extends AddOnAddOnInfoOneOf {\n /** The AddOn description. */\n durationInMinutes?: number;\n /** The AddOn max quantity. */\n maxQuantity?: number;\n /**\n * The AddOn ID.\n * @format GUID\n */\n addOnId?: string | null;\n /**\n * The AddOn name.\n * @maxLength 100\n */\n name?: string | null;\n /** The AddOn price. */\n price?: Money;\n}\n\n/** @oneof */\nexport interface AddOnAddOnInfoOneOf {\n /** The AddOn description. */\n durationInMinutes?: number;\n /** The AddOn max quantity. */\n maxQuantity?: number;\n}\n\nexport interface AddOnGroupDetail {\n /**\n * The group ID.\n * @format GUID\n */\n groupId?: string | null;\n /** The group max number of AddOns. */\n maxNumberOfAddOns?: number | null;\n /**\n * The group name.\n * @maxLength 100\n */\n groupName?: string | null;\n /**\n * The AddOns information linked to the group.\n * @maxSize 7\n */\n addOns?: AddOn[];\n /**\n * The group prompt.\n * @maxLength 200\n */\n prompt?: string | null;\n}\n\nexport interface SetAddOnsForGroupRequest {\n /**\n * The service ID to set AddOns for.\n * @format GUID\n */\n serviceId: string | null;\n /**\n * The group ID to set AddOns for.\n * @format GUID\n */\n groupId: string | null;\n /**\n * The IDs of AddOns to set.\n * @format GUID\n * @minSize 1\n * @maxSize 7\n */\n addOnIds: string[] | null;\n}\n\nexport interface SetAddOnsForGroupResponse {\n /** The updated AddOnGroup. */\n addOnGroup?: AddOnGroup;\n}\n\nexport interface CreateServiceRequest {\n /** Service to create. */\n service: Service;\n}\n\nexport interface CreateServiceResponse {\n /** Created service. */\n service?: Service;\n}\n\nexport interface ValidateServiceRequest {\n /** Service to validate. */\n service?: Service;\n}\n\nexport interface ValidateServiceResponse {\n /** Whether the service is valid. */\n valid?: boolean;\n /** Field violations. */\n fieldViolations?: FieldViolation[];\n}\n\nexport interface FieldViolation {\n /**\n * Path to the invalid field.\n * @maxLength 2000\n */\n fieldName?: string;\n /**\n * Description of the error.\n * @maxLength 2000\n */\n description?: string;\n /**\n * Rule name of the violation\n * @maxLength 2000\n */\n ruleName?: string;\n}\n\nexport interface BulkCreateServicesRequest {\n /**\n * Services to create.\n * @maxSize 100\n */\n services: Service[];\n /** Whether to return the created service objects. */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateServicesResponse {\n /** The result of each service creation. */\n results?: BulkServiceResult[];\n /** Create statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkServiceResult {\n /** Update metadata. */\n itemMetadata?: ItemMetadata;\n /** Updated service. */\n item?: Service;\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 GetServiceRequest {\n /**\n * ID of the service to retrieve.\n * @format GUID\n */\n serviceId: string;\n}\n\nexport enum V2RequestedFields {\n /** Unknown requested field. */\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** When passed, `service.staff_members` is returned. */\n STAFF_MEMBER_DETAILS = 'STAFF_MEMBER_DETAILS',\n /** When passed, `service.service_resources.resource_type.name` is returned. */\n RESOURCE_TYPE_DETAILS = 'RESOURCE_TYPE_DETAILS',\n}\n\n/** @enumType */\nexport type V2RequestedFieldsWithLiterals =\n | V2RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'STAFF_MEMBER_DETAILS'\n | 'RESOURCE_TYPE_DETAILS';\n\nexport interface GetServiceResponse {\n /** Retrieved service. */\n service?: Service;\n}\n\nexport interface GetServiceAvailabilityConstraintsRequest {\n /**\n * ID of the service to retrieve.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface GetServiceAvailabilityConstraintsResponse {\n /** The retrieved availability constraints of the service. */\n constraints?: ServiceAvailabilityConstraints;\n}\n\nexport interface ServiceAvailabilityConstraints {\n /**\n * The booking policy.\n * @readonly\n */\n bookingPolicy?: BookingPolicy;\n /**\n * The service schedule, including the schedule ID and availability constraints.\n * @readonly\n */\n schedule?: Schedule;\n /**\n * The locations this service is offered at.\n * Only multiple locations of type `BUSINESS` are supported. Multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.\n * For courses only: Currently, only one location is supported for all location types.\n * Use the `Set Service Locations` method to change the locations this service is offered at.\n * @readonly\n * @maxSize 100\n */\n locations?: Location[];\n /**\n * Resource groups required to book the service. For backward compatibility only. Use `Service Resources` instead.\n * @maxSize 3\n * @readonly\n * @deprecated Resource groups required to book the service. For backward compatibility only. Use `Service Resources` instead.\n * @replacedBy service_resources\n * @targetRemovalDate 2024-08-19\n */\n resourceGroups?: ResourceGroup[];\n /**\n * Resource groups required to book the service.\n * @maxSize 3\n * @readonly\n */\n serviceResources?: ServiceResource[];\n /**\n * The time between available slots' start times.\n * For example, for 5-minute slots: 3:00, 3:05, 3:10 etc. For 1-hour slots: 3:00, 4:00, 5:00 etc.\n * Applied to all schedules of the site.\n * For appointments only.\n * @readonly\n */\n slotsSplitInterval?: SplitInterval;\n /**\n * Online booking settings.\n * @readonly\n */\n onlineBooking?: OnlineBooking;\n}\n\n/** The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc. */\nexport interface SplitInterval {\n /**\n * Whether the slot duration is used as the split interval value.\n * If `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n * `schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field.\n */\n sameAsDuration?: boolean | null;\n /** Number of minutes between available slots' start times when `same_as_duration` is `false`. */\n valueInMinutes?: number | null;\n}\n\nexport interface UpdateServiceRequest {\n /** Service to update. */\n service: Service;\n}\n\nexport interface UpdateServiceResponse {\n /** Updated service. */\n service?: Service;\n}\n\nexport interface BulkUpdateServicesRequest {\n /**\n * Services to update.\n * @maxSize 100\n */\n services?: MaskedService[];\n /** Whether to include the updated services in the response. Default: `false` */\n returnEntity?: boolean;\n}\n\nexport interface MaskedService {\n /** Service to update. */\n service?: Service;\n /** Explicit list of fields to update. */\n mask?: string[];\n}\n\nexport interface BulkUpdateServicesResponse {\n /** The result of each service update. */\n results?: BulkServiceResult[];\n /** Update statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateServicesByFilterRequest {\n /** Filter to identify the services to update. */\n filter: Record<string, any> | null;\n /** Service to update. */\n service: Service;\n}\n\nexport interface BulkUpdateServicesByFilterResponse {\n /**\n * ID of the service update job.\n *\n * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteServiceRequest {\n /**\n * ID of the service to delete.\n * @format GUID\n */\n serviceId: string;\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /**\n * Whether to notify participants about the change and an optional\n * custom message.\n */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface ParticipantNotification {\n /**\n * Whether to send a message about the changes to the customer.\n *\n * Default: `false`\n */\n notifyParticipants?: boolean | null;\n /**\n * Custom message to send to the participants about the changes to the booking.\n * @maxLength 2000\n */\n message?: string | null;\n}\n\nexport interface DeleteServiceResponse {}\n\nexport interface BulkDeleteServicesRequest {\n /**\n * IDs of the services to delete.\n * @format GUID\n * @maxSize 100\n */\n ids: string[];\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`.\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /**\n * Whether to notify participants about the change and an optional\n * custom message.\n */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface BulkDeleteServicesResponse {\n /** The result of each service removal. */\n results?: BulkServiceResult[];\n /** Delete statistics. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteServicesByFilterRequest {\n /** Filter to identify the services that need to be deleted. */\n filter: Record<string, any> | null;\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`.\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /** Whether to notify participants about the change and an optional custom message. */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface BulkDeleteServicesByFilterResponse {\n /**\n * ID of the service deletion job.\n *\n * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface QueryServicesRequest {\n /** WQL expression. */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`\n *\n * Read more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[ {\"fieldName\":\"sortField1\",\"order\":\"ASC\"},\n * {\"fieldName\":\"sortField2\",\"order\":\"DESC\"} ]`\n *\n * Read more about [sorting](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting#wix-bookings_services-v2_filtering-and-sorting_sorting).\n * @maxSize 50\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\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 Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * 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 QueryServicesResponse {\n /** The retrieved services. */\n services?: Service[];\n /** Paging metadata, including offset and count. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor token for retrieving the next page of results.\n *\n * Use this token in subsequent requests to continue pagination forward.\n * Value is `null` when on the last page of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor token for retrieving the previous page of results.\n *\n * Use this token to navigate backwards through result pages.\n * Value is `null` when on the first page of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface SearchServicesRequest {\n /**\n * Search criteria including filter, sort, aggregations, and paging options.\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)) for complete filter and sorting options.\n */\n search: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,\n * `filter`, `sort`, or `search` can't be specified.\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object for narrowing search results. For example, to return only services with specific payment options: `\"filter\": {\"payment.options.online\": true, \"payment.options.in_person\": false}`.\n *\n * Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).\n */\n filter?: Record<string, any> | null;\n /**\n * Array of sort objects specifying result order. For example, to sort by creation date in descending order: `\"sort\": [{\"fieldName\": \"createdDate\", \"order\": \"DESC\"}]`.\n *\n * Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)).\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * Aggregations for grouping data into categories (facets) and providing summaries for each category.\n * For example, use aggregations to categorize search results by service type, payment options, or locations.\n * @maxSize 10\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) or [ISO 8601 UTC offset format](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) for adjusting time fields in the specified filters and returned aggregation data. For example, `America/New_York`, `UTC`, or `+02:00`.\n *\n * Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,\n * `filter`, `sort`, or `search` can't be specified.\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** Value aggregation configuration. */\n value?: ValueAggregation;\n /** Range aggregation configuration. */\n range?: RangeAggregation;\n /** Scalar aggregation configuration. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation configuration. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation configuration. */\n nested?: NestedAggregation;\n /**\n * User-defined name of aggregation. Must be unique and will appear in aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Client must specify matching aggregation field below. */\n type?: AggregationTypeWithLiterals;\n /**\n * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.\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 2025-01-01\n */\n groupBy?: GroupByAggregation;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** Value aggregation configuration. */\n value?: ValueAggregation;\n /** Range aggregation configuration. */\n range?: RangeAggregation;\n /** Scalar aggregation configuration. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation configuration. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation configuration. */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` isn't specified. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` isn't specified. */\n to?: number | null;\n}\n\nexport enum SortType {\n COUNT = 'COUNT',\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n DESC = 'DESC',\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n EXCLUDE = 'EXCLUDE',\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Custom bucket name for missing values.\n *\n * Default values:\n * - string: `N/A`\n * - int: `0`\n * - bool: `false`\n * @maxLength 20\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n /** Total number 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 in the aggregation results. */\n includeOptions?: IncludeMissingValuesOptions;\n /** Whether to sort by number of matches or value of the field. */\n sortType?: SortTypeWithLiterals;\n /** Whether to sort in ascending or descending order. */\n sortDirection?: SortDirectionWithLiterals;\n /**\n * Number of aggregations to return.\n *\n * Min: `1`\n * Max: `250`\n * Default: `10`\n */\n limit?: number | null;\n /**\n * Whether missing values should be included or excluded from the aggregation results.\n *\n * Default: `EXCLUDE`\n */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values in the aggregation results. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport enum NestedAggregationType {\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */\n VALUE = 'VALUE',\n /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */\n RANGE = 'RANGE',\n /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */\n SCALAR = 'SCALAR',\n /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (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 defining the ranges for aggregation. During aggregation, each entity is placed in the first bucket where its value falls within the specified range bounds.\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Operator for the scalar aggregation, for example `COUNT_DISTINCT`, `MIN`, `MAX`. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Time interval for date histogram aggregation, for example `DAY`, `HOUR`, `MONTH`. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n /** Unknown 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 configuration. Calculates the distribution of field values within the dataset. */\n value?: ValueAggregation;\n /** Range aggregation configuration. Calculates counts within user-defined value ranges. */\n range?: RangeAggregation;\n /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation configuration. Calculates counts within time intervals. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * User-defined name of aggregation. Must be unique and will appear in aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation. Client must specify matching aggregation field below. */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** Value aggregation configuration. Calculates the distribution of field values within the dataset. */\n value?: ValueAggregation;\n /** Range aggregation configuration. Calculates counts within user-defined value ranges. */\n range?: RangeAggregation;\n /** Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation configuration. Calculates counts within time intervals. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */\n VALUE = 'VALUE',\n /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */\n RANGE = 'RANGE',\n /** Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */\n SCALAR = 'SCALAR',\n /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Flattened list of aggregations, where each aggregation is nested within previous 1. */\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 for multi-level faceted search. Allows exploring large amounts of data through multiple levels of categorization, where each subsequent aggregation is nested within the previous aggregation to create hierarchical data summaries. */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations where each next aggregation is nested within the previous 1.\n * @minSize 2\n * @maxSize 10\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. Must be unique and will appear in aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /**\n * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.\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 /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 200\n */\n expression?: string | null;\n /**\n * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`.\n * @maxSize 10\n * @maxLength 200\n */\n fields?: string[];\n /** Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** At least 1 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 SearchServicesResponse {\n /**\n * Retrieved services that match the search criteria specified in the request.\n *\n * Each service includes all standard service information including name, description,\n * pricing details, location options, schedule information, and payment configuration.\n */\n services?: Service[];\n /**\n * Cursor-based paging metadata for navigating search results.\n *\n * Contains the current page's cursor information, whether there are more results available,\n * and count details. Use the `next` cursor to retrieve subsequent pages of results.\n */\n pagingMetadata?: CursorPagingMetadata;\n /**\n * Aggregation results based on the aggregations specified in the search request.\n *\n * Provides categorized data summaries such as service counts by type, location distribution,\n * payment method statistics, or custom aggregations. Available only when aggregations\n * are requested in the search criteria.\n */\n aggregationData?: AggregationData;\n}\n\nexport interface CursorPagingMetadata {\n /**\n * Number of items returned in the current response page.\n *\n * This count reflects the actual number of items in the current result set,\n * which may be less than the requested limit if fewer items are available.\n */\n count?: number | null;\n /**\n * Navigation cursors for moving between result pages.\n *\n * Contains `next` and `prev` cursor tokens for pagination. Use the `next` cursor\n * to retrieve subsequent pages and `prev` cursor to go back to previous pages.\n * Learn more about cursor paging in the [API Query Language guide](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging).\n */\n cursors?: Cursors;\n /**\n * Indicates whether additional results are available beyond the current page.\n *\n * - `true`: More results exist and can be retrieved using the `next` cursor.\n * - `false`: This is the final page of results.\n */\n hasNext?: boolean | null;\n}\n\nexport interface AggregationData {\n /**\n * Array of aggregation results, each containing the aggregation metadata and its calculated values for the specified search criteria.\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 specified in request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that matches result. */\n type?: AggregationTypeWithLiterals;\n /**\n * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.\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 * Array of value aggregation results, each containing a field value and the count of entities with that value.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * Array of range aggregation results returned in the same order as requested, each containing range bounds and count of entities within that range.\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 /** Map of nested aggregation results, keyed by aggregation name. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601).\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport interface GroupByValueResults {\n /**\n * Array of nested value aggregation results, each containing a field value and the associated nested aggregation data.\n * @maxSize 1000\n */\n results?: NestedValueAggregationResult[];\n}\n\nexport interface DateHistogramResults {\n /**\n * Array of date histogram aggregation results, each containing a date bucket and its count.\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 * Array of nested aggregation result groups, each containing multiple aggregation results.\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 specified kind as derived from search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`.\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 QueryPoliciesRequest {\n /**\n * Information about filters, paging, and sorting. See the article about\n * booking policy filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))\n * for all supported filters and sorting options.\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`\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 50\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 QueryPoliciesResponse {\n /** Retrieved booking policies and information about the services using them. */\n bookingPolicies?: BookingPolicyWithServices[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface BookingPolicyWithServices {\n /** Retrieved booking policy. */\n bookingPolicy?: BookingPolicy;\n /**\n * Up to 5 services connected to the booking policy. If `totalServiceCount` is\n * greater than 5, there are additional services connected to the policy.\n * You can call Search Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))\n * specifying the relevant policy ID in the filter, to retrieve all services that are\n * connected to a booking policy.\n * @maxSize 5\n */\n connectedServices?: Service[];\n /** Total number of services connected to the booking policy. */\n totalServiceCount?: number;\n}\n\nexport interface QueryBookingFormsRequest {\n /**\n * Information about filters, paging, and sorting. See the article about\n * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))\n * for all supported filters and sorting options.\n */\n query: CursorQuery;\n /**\n * Conditional fields to return.\n * @maxSize 1\n */\n conditionalFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n /** Unknown requested conditional field. */\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** Whether to return the site's default booking form. */\n DEFAULT_BOOKING_FORM = 'DEFAULT_BOOKING_FORM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'DEFAULT_BOOKING_FORM';\n\nexport interface QueryBookingFormsResponse {\n /** Retrieved booking forms and information about connected services. */\n bookingForms?: BookingForm[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** The site's default booking form and information about connected services. */\n defaultBookingForm?: BookingForm;\n}\n\nexport interface BookingForm {\n /** Information about the retrieved booking form. */\n formDetails?: FormDetails;\n /**\n * Up to 5 services connected to the booking form. If `totalServiceCount` is\n * greater than 5, there are additional services connected to the policy.\n * You can call Search Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))\n * specifying the relevant policy ID in the filter, to retrieve all services that are\n * connected to a booking policy.\n * @maxSize 5\n */\n connectedServices?: ConnectedService[];\n /** Total number of services connected to the booking form. */\n totalServiceCount?: number;\n}\n\nexport interface FormDetails {\n /**\n * Form ID.\n * @format GUID\n */\n formId?: string;\n /**\n * Form name.\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Revision number, which increments by 1 each time the form is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the form.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport interface ConnectedService {\n /**\n * ID of the service connected to the booking form.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Name of the service connected to the booking form.\n * @maxLength 400\n * @minLength 1\n */\n name?: string | null;\n}\n\nexport interface CountServicesRequest {\n /**\n * Query filter to base the count on. See supported filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountServicesResponse {\n /** Number of services matching the specified filter. */\n count?: number;\n}\n\nexport interface QueryLocationsRequest {\n /** Filter. */\n filter?: QueryLocationsFilter;\n}\n\nexport interface QueryLocationsFilter {\n /**\n * Service filter. See supported filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n */\n services?: Record<string, any> | null;\n /**\n * List of business IDs to filter by.\n * @format GUID\n * @maxSize 100\n */\n businessLocationIds?: string[];\n}\n\nexport interface QueryLocationsResponse {\n /**\n * Retrieved business locations and whether each location is connected to at\n * least one service.\n */\n businessLocations?: BusinessLocations;\n /**\n * Retrieved custom locations and whether each location is connected to at\n * least one service.\n */\n customLocations?: CustomLocations;\n /**\n * Retrieved customer locations and whether each location is connected to at\n * least one service.\n */\n customerLocations?: CustomerLocations;\n}\n\nexport interface BusinessLocations {\n /**\n * Whether at least one service matching the filter is connected to any of the\n * retrieved business locations.\n */\n exists?: boolean;\n /**\n * Retrieved business locations.\n * @maxSize 100\n */\n locations?: Location[];\n}\n\nexport interface CustomLocations {\n /**\n * Whether at least one service matching the filter is connected to any of the\n * retrieved custom locations.\n */\n exists?: boolean;\n}\n\nexport interface CustomerLocations {\n /**\n * Whether at least one service matching the filter is connected to any of the\n * retrieved customer locations.\n */\n exists?: boolean;\n}\n\nexport interface QueryCategoriesRequest {\n /** Filter. */\n filter?: QueryCategoriesFilter;\n}\n\nexport interface QueryCategoriesFilter {\n /**\n * Service filter. See supported filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n */\n services?: Record<string, any> | null;\n /**\n * List of category IDs to filter by.\n * @format GUID\n * @maxSize 100\n */\n categoryIds?: string[];\n}\n\nexport interface QueryCategoriesResponse {\n /** Retrieved categories. */\n categories?: V2Category[];\n}\n\nexport interface QueryServicesMultiLanguageRequest {\n /** WQL expression. */\n query?: QueryV2;\n}\n\nexport interface QueryServicesMultiLanguageResponse {\n /** The retrieved services in the main language */\n services?: Service[];\n /**\n * the retrieved services in the requested language according to the\n * provided linguist aspect\n */\n translatedServices?: Service[];\n /** Paging metadata, including offset and count. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface SetServiceLocationsRequest {\n /**\n * ID of the service.\n * @format GUID\n */\n serviceId: string;\n /**\n * List of locations replacing existing service locations. Omitting an existing location removes it from the service. Specify `removedLocationSessionsAction` to determine the handling of future sessions scheduled at that location.\n * @maxSize 100\n */\n locations: Location[];\n /**\n * The action to perform on sessions currently set to a removed location. For\n * example, move existing sessions to a new specified location.\n * If not specified, sessions will not be moved to a new location.\n */\n removedLocationSessionsAction?: RemovedLocationSessionsAction;\n /**\n * Whether to notify participants about the change of location, and an\n * Optional custom message. The notification is sent only to participants of sessions that are affected by the change.\n */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface RemovedLocationSessionsAction\n extends RemovedLocationSessionsActionActionOptionsOneOf {\n /**\n * Details about the new location of future events that were scheduled to take\n * place at a removed location.\n */\n moveToLocationOptions?: MoveToNewLocationsOptions;\n /** Information about what to do with future events at the removed location. */\n action?: ActionWithLiterals;\n}\n\n/** @oneof */\nexport interface RemovedLocationSessionsActionActionOptionsOneOf {\n /**\n * Details about the new location of future events that were scheduled to take\n * place at a removed location.\n */\n moveToLocationOptions?: MoveToNewLocationsOptions;\n}\n\nexport enum Action {\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Retain all future sessions at their current location. This is the default. */\n KEEP_AT_CURRENT_LOCATION = 'KEEP_AT_CURRENT_LOCATION',\n /** Move future events to a new location. */\n MOVE_TO_LOCATION = 'MOVE_TO_LOCATION',\n /**\n * Cancel all future events at the removed location.\n * Currently not supported.\n */\n DELETE = 'DELETE',\n}\n\n/** @enumType */\nexport type ActionWithLiterals =\n | Action\n | 'UNKNOWN_ACTION_TYPE'\n | 'KEEP_AT_CURRENT_LOCATION'\n | 'MOVE_TO_LOCATION'\n | 'DELETE';\n\nexport interface MoveToNewLocationsOptions {\n /** The new location to move existing sessions currently set to a removed location, used when `action` is `MOVE_TO_LOCATION`. */\n newLocation?: Location;\n}\n\nexport interface SetServiceLocationsResponse {\n /** The updated service with the newly set locations. */\n service?: Service;\n}\n\nexport interface EnablePricingPlansForServiceRequest {\n /**\n * ID of the service to update.\n * @format GUID\n */\n serviceId: string;\n /**\n * IDs of the pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to add to the service's `payment.pricingPlanIds` array.\n * @format GUID\n * @maxSize 100\n */\n pricingPlanIds: string[];\n}\n\nexport interface EnablePricingPlansForServiceResponse {\n /** Updated service. */\n service?: Service;\n}\n\nexport interface InvalidPricingPlan {\n /**\n * ID of the invalid pricing plan.\n * @format GUID\n */\n _id?: string;\n /**\n * Explanation why the pricing plan is considered invalid.\n * @maxLength 2000\n */\n message?: string;\n}\n\nexport interface DisablePricingPlansForServiceRequest {\n /**\n * ID of the service to update.\n * @format GUID\n */\n serviceId: string;\n /**\n * IDs of the pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to remove from the service's `payment.pricingPlanIds` array.\n * @format GUID\n * @maxSize 75\n */\n pricingPlanIds?: string[];\n}\n\nexport interface DisablePricingPlansForServiceResponse {\n /** Updated service. */\n service?: Service;\n}\n\nexport interface SetCustomSlugRequest {\n /**\n * ID of the service for which to update the active slug.\n * @format GUID\n */\n serviceId: string;\n /**\n * Slug to set as the active service slug.\n * @maxLength 500\n */\n slug?: string;\n}\n\nexport interface SetCustomSlugResponse {\n /** Updated active service slug. */\n slug?: Slug;\n /** Updated service. */\n service?: Service;\n}\n\nexport interface ValidateSlugRequest {\n /**\n * IO of the service to check custom slug validity for.\n * @format GUID\n */\n serviceId: string;\n /**\n * Custom slug to validate.\n * @maxLength 500\n */\n slug?: string;\n}\n\nexport interface ValidateSlugResponse {\n /** Whether the slug is valid. */\n valid?: boolean;\n /**\n * Valid slug. Available only if `{\"valid\": true}`.\n * @maxLength 500\n */\n slug?: string | null;\n /**\n * Reasons why the slug is invalid. Available only if `{\"valid\": false}`.\n * @maxSize 3\n */\n errors?: InvalidSlugErrorWithLiterals[];\n}\n\nexport enum InvalidSlugError {\n /** Unknown slug error. */\n UNKNOWN_SLUG_ERROR = 'UNKNOWN_SLUG_ERROR',\n /** Slug contains illegal characters. */\n SLUG_CONTAINS_ILLEGAL_CHARACTERS = 'SLUG_CONTAINS_ILLEGAL_CHARACTERS',\n /** Slug is already associated with another service. */\n SLUG_ALREADY_EXISTS = 'SLUG_ALREADY_EXISTS',\n}\n\n/** @enumType */\nexport type InvalidSlugErrorWithLiterals =\n | InvalidSlugError\n | 'UNKNOWN_SLUG_ERROR'\n | 'SLUG_CONTAINS_ILLEGAL_CHARACTERS'\n | 'SLUG_ALREADY_EXISTS';\n\nexport interface CloneServiceRequest {\n /**\n * ID of the service to clone.\n * @format GUID\n */\n sourceServiceId: string;\n}\n\nexport interface CloneServiceResponse {\n /** Cloned service. */\n service?: Service;\n /**\n * Information about connected entities that couldn't be cloned. For example,\n * future recurring events, the booking form, service variants, and connected\n * pricing plans.\n */\n errors?: CloneErrorsWithLiterals[];\n}\n\nexport enum CloneErrors {\n /**\n * Failed to clone the original service's *options and variants*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n */\n OPTIONS_AND_VARIANTS = 'OPTIONS_AND_VARIANTS',\n /** Failed to clone the original service's *booking form*. */\n FORM = 'FORM',\n}\n\n/** @enumType */\nexport type CloneErrorsWithLiterals =\n | CloneErrors\n | 'OPTIONS_AND_VARIANTS'\n | 'FORM';\n\n/** An event sent every time a category entity is changed. */\nexport interface CategoryNotification {\n category?: Category;\n event?: CategoryNotificationEventWithLiterals;\n}\n\n/** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */\nexport interface Category {\n /**\n * Category ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Category name.\n * @maxLength 500\n */\n name?: string | null;\n /**\n * Category status.\n *\n * Default: `CREATED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /** Sort order of the category in the live site and dashboard. */\n sortOrder?: number | null;\n}\n\nexport enum Status {\n /** The category was created. */\n CREATED = 'CREATED',\n /** The category was deleted. */\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CREATED' | 'DELETED';\n\nexport enum CategoryNotificationEvent {\n /** Category was updated. */\n Updated = 'Updated',\n /** Category was deleted. */\n Deleted = 'Deleted',\n /** Category was created. */\n Created = 'Created',\n}\n\n/** @enumType */\nexport type CategoryNotificationEventWithLiterals =\n | CategoryNotificationEvent\n | 'Updated'\n | 'Deleted'\n | 'Created';\n\nexport interface Empty {}\n\nexport interface BenefitNotification {\n /**\n * Plan unique ID\n * @format GUID\n */\n planId?: string;\n /**\n * App def ID\n * @format GUID\n */\n appDefId?: string;\n /** Current benefit details */\n benefit?: Benefit;\n /** Previous benefit */\n prevBenefit?: Benefit;\n /** Notification event */\n event?: EventWithLiterals;\n}\n\nexport interface Benefit {\n /**\n * Benefit unique ID\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Benefit Type */\n benefitType?: BenefitTypeWithLiterals;\n /**\n * Resource IDs that serves by this benefit\n * @format GUID\n */\n resourceIds?: string[];\n /** Amount of credits that provided by this benefit */\n creditAmount?: number | null;\n /**\n * additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value\n * @maxSize 20\n */\n customFields?: Record<string, string>;\n /** return value only in case it required in the ListRequest, true means that benefit's type could be updated */\n editable?: boolean | null;\n /** Benefit behavior */\n behavior?: Behavior;\n /**\n * Id of the app associated with this benefit\n * @format GUID\n * @readonly\n */\n appDefId?: string | null;\n}\n\nexport interface EntryPass {}\n\nexport interface Discount extends DiscountDiscountOneOf {\n /**\n * Fixed-rate percent off discount\n * @decimalValue options { gt:0, lte:100, maxScale:2 }\n */\n percentOffRate?: string;\n /**\n * Absolute amount discount\n * @decimalValue options { gt:0, maxScale:2 }\n */\n moneyOffAmount?: string;\n}\n\n/** @oneof */\nexport interface DiscountDiscountOneOf {\n /**\n * Fixed-rate percent off discount\n * @decimalValue options { gt:0, lte:100, maxScale:2 }\n */\n percentOffRate?: string;\n /**\n * Absolute amount discount\n * @decimalValue options { gt:0, maxScale:2 }\n */\n moneyOffAmount?: string;\n}\n\nexport enum BenefitType {\n /** Should never be used */\n UNDEFINED = 'UNDEFINED',\n /** Limited benefit type */\n LIMITED = 'LIMITED',\n /** Unlimited benefit type */\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type BenefitTypeWithLiterals =\n | BenefitType\n | 'UNDEFINED'\n | 'LIMITED'\n | 'UNLIMITED';\n\nexport interface Behavior extends BehaviorBehaviorOneOf {\n /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */\n defaultBehavior?: EntryPass;\n /** Discount applied to paid resources */\n discount?: Discount;\n}\n\n/** @oneof */\nexport interface BehaviorBehaviorOneOf {\n /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */\n defaultBehavior?: EntryPass;\n /** Discount applied to paid resources */\n discount?: Discount;\n}\n\nexport enum Event {\n Updated = 'Updated',\n Deleted = 'Deleted',\n Created = 'Created',\n}\n\n/** @enumType */\nexport type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';\n\nexport interface UserDomainInfoChangedEvent {\n domainName?: string;\n crudType?: CrudTypeWithLiterals;\n /** @format GUID */\n metaSiteId?: string | null;\n changeTime?: Date | null;\n}\n\nexport enum CrudType {\n INVALID_CRUD_TYPE = 'INVALID_CRUD_TYPE',\n CREATE = 'CREATE',\n UPDATE = 'UPDATE',\n DELETE = 'DELETE',\n /** Unfortunately this action is used by hibernate save in wix-war */\n CREATE_OR_UPDATE = 'CREATE_OR_UPDATE',\n}\n\n/** @enumType */\nexport type CrudTypeWithLiterals =\n | CrudType\n | 'INVALID_CRUD_TYPE'\n | 'CREATE'\n | 'UPDATE'\n | 'DELETE'\n | 'CREATE_OR_UPDATE';\n\nexport interface HtmlSitePublished {\n /**\n * Application instance ID\n * @maxLength 50\n */\n appInstanceId?: string;\n /**\n * Application type\n * @maxLength 100\n */\n appType?: string;\n /** Revision */\n revision?: string;\n /**\n * MSID\n * @maxLength 100\n */\n metaSiteId?: string | null;\n /**\n * optional branch id if publish is done from branch\n * @format GUID\n */\n branchId?: string | null;\n /** The site's last transactionId */\n lastTransactionId?: string | null;\n /** A list of the site's pages */\n pages?: Page[];\n /** Site's publish date */\n publishDate?: string;\n}\n\nexport interface Page {\n /**\n * Page's Id\n * @maxLength 100\n */\n _id?: string;\n}\n\n/** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */\nexport interface SitePropertiesNotification {\n /** The site ID for which this update notification applies. */\n metasiteId?: string;\n /** The actual update event. */\n event?: SitePropertiesEvent;\n /**\n * A convenience set of mappings from the MetaSite ID to its constituent services.\n * @maxSize 500\n */\n translations?: Translation[];\n /** Context of the notification */\n changeContext?: ChangeContext;\n}\n\n/** The actual update event for a particular notification. */\nexport interface SitePropertiesEvent {\n /** Version of the site's properties represented by this update. */\n version?: number;\n /** Set of properties that were updated - corresponds to the fields in \"properties\". */\n fields?: string[];\n /** Updated properties. */\n properties?: Properties;\n}\n\nexport interface Properties {\n /** Site categories. */\n categories?: Categories;\n /** Site locale. */\n locale?: Locale;\n /**\n * Site language.\n *\n * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n */\n language?: string | null;\n /**\n * Site currency format used to bill customers.\n *\n * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n paymentCurrency?: string | null;\n /** Timezone in `America/New_York` format. */\n timeZone?: string | null;\n /** Email address. */\n email?: string | null;\n /** Phone number. */\n phone?: string | null;\n /** Fax number. */\n fax?: string | null;\n /** Address. */\n address?: Address;\n /** Site display name. */\n siteDisplayName?: string | null;\n /** Business name. */\n businessName?: string | null;\n /** Path to the site's logo in Wix Media (without Wix Media base URL). */\n logo?: string | null;\n /** Site description. */\n description?: string | null;\n /**\n * Business schedule. Regular and exceptional time periods when the business is open or the service is available.\n *\n * __Note:__ Not supported by Wix Bookings.\n */\n businessSchedule?: BusinessSchedule;\n /** Supported languages of a site and the primary language. */\n multilingual?: Multilingual;\n /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */\n consentPolicy?: ConsentPolicy;\n /**\n * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.\n *\n * Site business type.\n */\n businessConfig?: string | null;\n /** External site URL that uses Wix as its headless business solution. */\n externalSiteUrl?: string | null;\n /** Track clicks analytics. */\n trackClicksAnalytics?: boolean;\n}\n\nexport interface Categories {\n /** Primary site category. */\n primary?: string;\n /**\n * Secondary site category.\n * @maxSize 50\n */\n secondary?: string[];\n /** Business Term Id */\n businessTermId?: string | null;\n}\n\nexport interface Locale {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */\n country?: string;\n}\n\nexport interface Address {\n /** Street name. */\n street?: string;\n /** City name. */\n city?: string;\n /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */\n country?: string;\n /** State. */\n state?: string;\n /**\n * Zip or postal code.\n * @maxLength 20\n */\n zip?: string;\n /** Extra information to be displayed in the address. */\n hint?: AddressHint;\n /** Whether this address represents a physical location. */\n isPhysical?: boolean;\n /** Google-formatted version of this address. */\n googleFormattedAddress?: string;\n /** Street number. */\n streetNumber?: string;\n /** Apartment number. */\n apartmentNumber?: string;\n /** Geographic coordinates of location. */\n coordinates?: GeoCoordinates;\n}\n\n/**\n * Extra information on displayed addresses.\n * This is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\n * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.\n */\nexport interface AddressHint {\n /** Extra text displayed next to, or instead of, the actual address. */\n text?: string;\n /** Where the extra text should be displayed. */\n placement?: PlacementTypeWithLiterals;\n}\n\n/** Where the extra text should be displayed: before, after or instead of the actual address. */\nexport enum PlacementType {\n BEFORE = 'BEFORE',\n AFTER = 'AFTER',\n REPLACE = 'REPLACE',\n}\n\n/** @enumType */\nexport type PlacementTypeWithLiterals =\n | PlacementType\n | 'BEFORE'\n | 'AFTER'\n | 'REPLACE';\n\n/** Geocoordinates for a particular address. */\nexport interface GeoCoordinates {\n /** Latitude of the location. Must be between -90 and 90. */\n latitude?: number;\n /** Longitude of the location. Must be between -180 and 180. */\n longitude?: number;\n}\n\n/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */\nexport interface BusinessSchedule {\n /**\n * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.\n * @maxSize 100\n */\n periods?: TimePeriod[];\n /**\n * Exceptions to the business's regular hours. The business can be open or closed during the exception.\n * @maxSize 100\n */\n specialHourPeriod?: SpecialHourPeriod[];\n}\n\n/** Weekly recurring time periods when the business is regularly open or the service is available. */\nexport interface TimePeriod {\n /** Day of the week the period starts on. */\n openDay?: DayOfWeekWithLiterals;\n /**\n * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n */\n openTime?: string;\n /** Day of the week the period ends on. */\n closeDay?: DayOfWeekWithLiterals;\n /**\n * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n *\n * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n */\n closeTime?: string;\n}\n\n/** Enumerates the days of the week. */\nexport enum DayOfWeek {\n MONDAY = 'MONDAY',\n TUESDAY = 'TUESDAY',\n WEDNESDAY = 'WEDNESDAY',\n THURSDAY = 'THURSDAY',\n FRIDAY = 'FRIDAY',\n SATURDAY = 'SATURDAY',\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n | DayOfWeek\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\n/** Exception to the business's regular hours. The business can be open or closed during the exception. */\nexport interface SpecialHourPeriod {\n /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n startDate?: string;\n /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n endDate?: string;\n /**\n * Whether the business is closed (or the service is not available) during the exception.\n *\n * Default: `true`.\n */\n isClosed?: boolean;\n /** Additional info about the exception. For example, \"We close earlier on New Year's Eve.\" */\n comment?: string;\n}\n\nexport interface Multilingual {\n /**\n * Supported languages list.\n * @maxSize 200\n */\n supportedLanguages?: SupportedLanguage[];\n /** Whether to redirect to user language. */\n autoRedirect?: boolean;\n}\n\nexport interface SupportedLanguage {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Locale. */\n locale?: Locale;\n /** Whether the supported language is the primary language for the site. */\n isPrimary?: boolean;\n /** Language icon. */\n countryCode?: string;\n /** How the language will be resolved. For internal use. */\n resolutionMethod?: ResolutionMethodWithLiterals;\n /** Whether the supported language is the primary language for site visitors. */\n isVisitorPrimary?: boolean | null;\n}\n\nexport enum ResolutionMethod {\n QUERY_PARAM = 'QUERY_PARAM',\n SUBDOMAIN = 'SUBDOMAIN',\n SUBDIRECTORY = 'SUBDIRECTORY',\n}\n\n/** @enumType */\nexport type ResolutionMethodWithLiterals =\n | ResolutionMethod\n | 'QUERY_PARAM'\n | 'SUBDOMAIN'\n | 'SUBDIRECTORY';\n\nexport interface ConsentPolicy {\n /** Whether the site uses cookies that are essential to site operation. Always `true`. */\n essential?: boolean | null;\n /** Whether the site uses cookies that affect site performance and other functional measurements. */\n functional?: boolean | null;\n /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */\n analytics?: boolean | null;\n /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */\n advertising?: boolean | null;\n /** CCPA compliance flag. */\n dataToThirdParty?: boolean | null;\n}\n\n/** A single mapping from the MetaSite ID to a particular service. */\nexport interface Translation {\n /** The service type. */\n serviceType?: string;\n /** The application definition ID; this only applies to services of type ThirdPartyApps. */\n appDefId?: string;\n /** The instance ID of the service. */\n instanceId?: string;\n}\n\nexport interface ChangeContext extends ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\n/** @oneof */\nexport interface ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\nexport interface PropertiesChange {}\n\nexport interface SiteCreated {\n /** Origin template site id. */\n originTemplateId?: string | null;\n}\n\nexport interface SiteCloned {\n /** Origin site id. */\n originMetaSiteId?: string;\n}\n\n/** @docsIgnore */\nexport type DeleteAddOnGroupApplicationErrors = {\n code?: 'GROUP_NOT_ON_SERVICE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateAddOnGroupApplicationErrors = {\n code?: 'GROUP_NOT_ON_SERVICE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type SetAddOnsForGroupApplicationErrors = {\n code?: 'ADD_ON_GROUP_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateServiceValidationErrors =\n | {\n ruleName?: 'INVALID_FORM';\n }\n | {\n ruleName?: 'INVALID_CATEGORY';\n }\n | {\n ruleName?: 'INVALID_BOOKING_POLICY';\n }\n | {\n ruleName?: 'INVALID_SERVICE_TYPE';\n }\n | {\n ruleName?: 'INVALID_SERVICE_NAME';\n }\n | {\n ruleName?: 'INVALID_ONLINE_BOOKING';\n }\n | {\n ruleName?: 'INVALID_STAFF_MEMBER_IDS';\n }\n | {\n ruleName?: 'PAYMENT_REQUIRED';\n }\n | {\n ruleName?: 'INVALID_PAYMENT_TYPE';\n }\n | {\n ruleName?: 'INVALID_RATE';\n }\n | {\n ruleName?: 'INVALID_PAYMENT_OPTIONS';\n }\n | {\n ruleName?: 'INVALID_BUSINESS_LOCATIONS';\n }\n | {\n ruleName?: 'INVALID_LOCATIONS';\n }\n | {\n ruleName?: 'INVALID_BUSINESS_LOCATION';\n }\n | {\n ruleName?: 'INVALID_CUSTOM_LOCATION';\n }\n | {\n ruleName?: 'INVALID_CUSTOMER_LOCATION';\n }\n | {\n ruleName?: 'INVALID_UNKNOWN_LOCATION';\n }\n | {\n ruleName?: 'INVALID_MANUAL_APPROVAL_WITH_PRICING_PLANS';\n }\n | {\n ruleName?: 'INVALID_DEFAULT_CAPACITY';\n }\n | {\n ruleName?: 'INVALID_APPOINTMENT_CAPACITY';\n }\n | {\n ruleName?: 'INVALID_SESSION_DURATION';\n };\n/** @docsIgnore */\nexport type UpdateServiceValidationErrors =\n | {\n ruleName?: 'INVALID_FORM';\n }\n | {\n ruleName?: 'INVALID_CATEGORY';\n }\n | {\n ruleName?: 'INVALID_BOOKING_POLICY';\n }\n | {\n ruleName?: 'INVALID_SERVICE_TYPE';\n }\n | {\n ruleName?: 'INVALID_SERVICE_NAME';\n }\n | {\n ruleName?: 'INVALID_ONLINE_BOOKING';\n }\n | {\n ruleName?: 'INVALID_STAFF_MEMBER_IDS';\n }\n | {\n ruleName?: 'PAYMENT_REQUIRED';\n }\n | {\n ruleName?: 'INVALID_PAYMENT_TYPE';\n }\n | {\n ruleName?: 'INVALID_RATE';\n }\n | {\n ruleName?: 'INVALID_PAYMENT_OPTIONS';\n }\n | {\n ruleName?: 'INVALID_BUSINESS_LOCATIONS';\n }\n | {\n ruleName?: 'INVALID_LOCATIONS';\n }\n | {\n ruleName?: 'INVALID_BUSINESS_LOCATION';\n }\n | {\n ruleName?: 'INVALID_CUSTOM_LOCATION';\n }\n | {\n ruleName?: 'INVALID_CUSTOMER_LOCATION';\n }\n | {\n ruleName?: 'INVALID_UNKNOWN_LOCATION';\n }\n | {\n ruleName?: 'INVALID_MANUAL_APPROVAL_WITH_PRICING_PLANS';\n }\n | {\n ruleName?: 'INVALID_DEFAULT_CAPACITY';\n }\n | {\n ruleName?: 'INVALID_APPOINTMENT_CAPACITY';\n }\n | {\n ruleName?: 'INVALID_SESSION_DURATION';\n };\n/** @docsIgnore */\nexport type QueryBookingFormsApplicationErrors = {\n code?: 'DEFAULT_BOOKING_FORM_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type EnablePricingPlansForServiceApplicationErrors =\n | {\n code?: 'INVALID_PRICING_PLAN';\n description?: string;\n data?: InvalidPricingPlan;\n }\n | {\n code?: 'SERVICE_DOES_NOT_SUPPORT_PRICING_PLANS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DisablePricingPlansForServiceApplicationErrors = {\n code?: 'INVALID_PRICING_PLAN';\n description?: string;\n data?: InvalidPricingPlan;\n};\n/** @docsIgnore */\nexport type SetCustomSlugApplicationErrors = {\n code?: 'SLUG_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type SetCustomSlugValidationErrors = {\n ruleName?: 'SLUG_CONTAINS_ILLEGAL_CHARACTERS';\n};\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 ServiceCreatedEnvelope {\n entity: Service;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a service is created.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\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.SERVICES_READ\n * @webhook\n * @eventType wix.bookings.services.v2.service_created\n * @slug created\n */\nexport declare function onServiceCreated(\n handler: (event: ServiceCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ServiceDeletedEnvelope {\n entity: Service;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a service is deleted.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\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.SERVICES_READ\n * @webhook\n * @eventType wix.bookings.services.v2.service_deleted\n * @slug deleted\n */\nexport declare function onServiceDeleted(\n handler: (event: ServiceDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ServiceUpdatedEnvelope {\n entity: Service;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a service is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read Bookings - Public Data\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC\n * @permissionScope Manage Bookings Services and Settings\n * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION\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.SERVICES_READ\n * @webhook\n * @eventType wix.bookings.services.v2.service_updated\n * @slug updated\n */\nexport declare function onServiceUpdated(\n handler: (event: ServiceUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Create a new AddOns group.\n * An AddOns group defines a collection of AddOns that can be linked to a Service,\n * with constraints such as minimum and maximum selections.\n * @param addOnGroup - AddOnGroup to create.\n * @public\n * @documentationMaturity preview\n * @requiredField addOnGroup\n * @requiredField addOnGroup.name\n * @permissionId BOOKINGS.SERVICES_ADD_ON_GROUP_CREATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.AddOnGroupsService.CreateAddOnGroup\n */\nexport async function createAddOnGroup(\n addOnGroup: NonNullablePaths<AddOnGroup, `name`, 2>,\n options?: CreateAddOnGroupOptions\n): Promise<\n NonNullablePaths<CreateAddOnGroupResponse, `addOnGroup.addOnIds`, 3>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n addOnGroup: addOnGroup,\n serviceId: options?.serviceId,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.createAddOnGroup(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 addOnGroup: '$[0]',\n serviceId: '$[1].serviceId',\n },\n singleArgumentUnchanged: false,\n },\n ['addOnGroup', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateAddOnGroupOptions {\n /**\n * ID of the service to create the AddOnGroup for.\n * @format GUID\n */\n serviceId?: string | null;\n}\n\n/**\n * Delete an existing AddOns group.\n * This will remove the group and unlink all associated AddOns.\n * @param addOnGroupId - ID of the AddOnGroup to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField addOnGroupId\n * @requiredField options\n * @requiredField options.serviceId\n * @permissionId BOOKINGS.SERVICES_ADD_ON_GROUP_CREATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.AddOnGroupsService.DeleteAddOnGroup\n */\nexport async function deleteAddOnGroup(\n addOnGroupId: string,\n options: NonNullablePaths<DeleteAddOnGroupOptions, `serviceId`, 2>\n): Promise<\n void & {\n __applicationErrorsType?: DeleteAddOnGroupApplicationErrors;\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 addOnGroupId: addOnGroupId,\n serviceId: options?.serviceId,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.deleteAddOnGroup(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 addOnGroupId: '$[0]',\n serviceId: '$[1].serviceId',\n },\n singleArgumentUnchanged: false,\n },\n ['addOnGroupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteAddOnGroupOptions {\n /**\n * ID of the service from which to delete the AddOnGroup.\n * @format GUID\n */\n serviceId: string | null;\n}\n\n/**\n * Update an existing AddOns group.\n * This allows modifying group settings such as its name, prompt, constraints, or associated AddOns.\n * @param addOnGroup - AddOnGroup to update.\n * @public\n * @documentationMaturity preview\n * @requiredField addOnGroup\n * @requiredField addOnGroup._id\n * @requiredField options\n * @requiredField options.serviceId\n * @permissionId BOOKINGS.SERVICES_ADD_ON_GROUP_UPDATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.AddOnGroupsService.UpdateAddOnGroup\n */\nexport async function updateAddOnGroup(\n addOnGroup: NonNullablePaths<AddOnGroup, `_id`, 2>,\n options: NonNullablePaths<UpdateAddOnGroupOptions, `serviceId`, 2>\n): Promise<\n NonNullablePaths<UpdateAddOnGroupResponse, `addOnGroup.addOnIds`, 3> & {\n __applicationErrorsType?: UpdateAddOnGroupApplicationErrors;\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 addOnGroup: addOnGroup,\n serviceId: options?.serviceId,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.updateAddOnGroup(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 addOnGroup: '$[0]',\n serviceId: '$[1].serviceId',\n },\n singleArgumentUnchanged: false,\n },\n ['addOnGroup', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateAddOnGroupOptions {\n /**\n * ID of the service that contains the AddOnGroup.\n * @format GUID\n */\n serviceId: string | null;\n}\n\n/**\n * Retrieves a list of AddOnGroups including enriched AddOn details in the correct order.\n * If the group_id is specified, only the AddOns for the specified group will be returned,\n * otherwise all groups will be returned.\n * @param serviceId - ID of the service to retrieve AddOnGroups for.\n * @public\n * @documentationMaturity preview\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_ADD_ON_GROUPS_LIST\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId\n */\nexport async function listAddOnGroupsByServiceId(\n serviceId: string,\n options?: ListAddOnGroupsByServiceIdOptions\n): Promise<\n NonNullablePaths<ListAddOnGroupsByServiceIdResponse, `addOnGroupsDetails`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n serviceId: serviceId,\n groupIds: options?.groupIds,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.listAddOnGroupsByServiceId(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 serviceId: '$[0]',\n groupIds: '$[1].groupIds',\n },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAddOnGroupsByServiceIdOptions {\n /**\n * List of group ids to return. If not provided, all groups are returned.\n * @format GUID\n * @maxSize 3\n */\n groupIds?: string[] | null;\n}\n\n/**\n * Sets the AddOns for a specific group.\n * The order of the AddOns in the list will be used to determine their display order.\n * @param serviceId - The service ID to set AddOns for.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.addOnIds\n * @requiredField options.groupId\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_ADD_ON_GROUPS_SET_ADD_ONS\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.AddOnGroupsService.SetAddOnsForGroup\n */\nexport async function setAddOnsForGroup(\n serviceId: string,\n options: NonNullablePaths<SetAddOnsForGroupOptions, `addOnIds` | `groupId`, 2>\n): Promise<\n NonNullablePaths<SetAddOnsForGroupResponse, `addOnGroup.addOnIds`, 3> & {\n __applicationErrorsType?: SetAddOnsForGroupApplicationErrors;\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 serviceId: serviceId,\n groupId: options?.groupId,\n addOnIds: options?.addOnIds,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.setAddOnsForGroup(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 serviceId: '$[0]',\n groupId: '$[1].groupId',\n addOnIds: '$[1].addOnIds',\n },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SetAddOnsForGroupOptions {\n /**\n * The group ID to set AddOns for.\n * @format GUID\n */\n groupId: string | null;\n /**\n * The IDs of AddOns to set.\n * @format GUID\n * @minSize 1\n * @maxSize 7\n */\n addOnIds: string[] | null;\n}\n\n/**\n * Creates a service.\n *\n *\n * ### Required fields\n *\n * When creating a service you must specify the following fields:\n * - `type`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)):\n * Whether it's an appointment-based service, class, or course.\n * - `name`: Service name that's displayed to customers.\n * - `onlineBooking`:\n * Settings determining whether customers can book online, whether the business\n * must manually confirm bookings, and whether customers can request to book an\n * appointment time slot that already has a booking request awaiting business\n * confirmation.\n * - `payment`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)):\n * How customers can pay when signing up for the service.\n * - `defaultCapacity`: The maximum number of customers that can book the service. Required for all service types. For appointment-based services, it must be `1`.\n *\n * #### Session durations\n *\n * Depending on which type of service you're creating, you may also need to specify\n * supported session durations.\n *\n * __Classes and courses__\n *\n * Don't specify `schedule.availabilityConstraints.sessionDurations`.\n *\n * __Appointment-based services without varied pricing based on session length__\n *\n * Specify the single supported session duration in the\n * `schedule.availabilityConstraints.sessionDurations` array.\n *\n * __Appointment-based services with varied pricing based on session length__\n *\n * - Specify all supported session durations in `schedule.availabilityConstraints.sessionDurations`.\n * - Note that Wix Bookings doesn't display these values to customers and\n * ignores them in pricing and availability calculations. Instead session\n * durations are retrieved from the relevant service variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n * - It is mandatory to specify `schedule.availabilityConstraints.sessionDurations`,\n * even though these values are ignored.\n * @param service - Service to create.\n * @public\n * @requiredField service\n * @permissionId BOOKINGS.SERVICES_CREATE\n * @applicableIdentity APP\n * @returns Created service.\n * @fqn wix.bookings.services.v2.ServicesService.CreateService\n */\nexport async function createService(service: Service): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n > & {\n __validationErrorsType?: CreateServiceValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ service: service }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.createService(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )?.service!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { service: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['service']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple services.\n *\n *\n * See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service))\n * for more details.\n * @param services - Services to create.\n * @public\n * @requiredField services\n * @permissionId BOOKINGS.SERVICES_CREATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.BulkCreateServices\n */\nexport async function bulkCreateServices(\n services: Service[],\n options?: BulkCreateServicesOptions\n): Promise<\n NonNullablePaths<\n BulkCreateServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n services: services,\n returnEntity: options?.returnEntity,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'services.media.items.image' },\n { path: 'services.media.mainMedia.image' },\n { path: 'services.media.coverMedia.image' },\n { path: 'services.staffMembers.mainMedia.image' },\n { path: 'services.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'services.locations.calculatedAddress' },\n { path: 'services.locations.business.address' },\n { path: 'services.locations.custom.address' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'services.urls.servicePage' },\n { path: 'services.urls.bookingPage' },\n { path: 'services.urls.calendarPage' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.bulkCreateServices(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.media.items.image' },\n { path: 'results.item.media.mainMedia.image' },\n { path: 'results.item.media.coverMedia.image' },\n { path: 'results.item.staffMembers.mainMedia.image' },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'results.item.locations.calculatedAddress' },\n { path: 'results.item.locations.business.address' },\n { path: 'results.item.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'results.item.urls.servicePage' },\n { path: 'results.item.urls.bookingPage' },\n { path: 'results.item.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n services: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['services', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateServicesOptions {\n /** Whether to return the created service objects. */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a service.\n * @param serviceId - ID of the service to retrieve.\n * @public\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @returns Retrieved service.\n * @fqn wix.bookings.services.v2.ServicesService.GetService\n */\nexport async function getService(\n serviceId: string\n): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n serviceId: serviceId,\n });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.getService(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )?.service!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { serviceId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['serviceId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a service.\n *\n *\n * Each time the service is updated, `revision` increments by 1. You must\n * include the number of the existing revision when updating the service.\n * This ensures you're working with the latest service information and\n * prevents unintended overwrites.\n *\n * ### Session durations\n *\n * Specify `schedule.availabilityConstraints.sessionDurations`\n * only if you want to update it for appointment-based services without varied\n * pricing based on session length. Don't specify `schedule.availabilityConstraints.sessionDurations`\n * for all other appointment-based services, classes, or courses. See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service#session-durations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service#session-durations))\n * for more details.\n *\n * ## Service locations\n *\n * Don't call Update Service to adjust service locations, call Set Service Locations ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/set-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-service-locations)) instead.\n * @param _id - Service ID.\n * @public\n * @requiredField _id\n * @requiredField service\n * @requiredField service.revision\n * @permissionId BOOKINGS.SERVICES_UPDATE\n * @applicableIdentity APP\n * @returns Updated service.\n * @fqn wix.bookings.services.v2.ServicesService.UpdateService\n */\nexport async function updateService(\n _id: string,\n service: NonNullablePaths<UpdateService, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n > & {\n __validationErrorsType?: UpdateServiceValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ service: { ...service, id: _id } }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.updateService(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )?.service!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { service: '$[1]' },\n explicitPathsToArguments: { 'service.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'service']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateService {\n /**\n * Service ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Service type.\n * Learn more about *service types*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)).\n */\n type?: ServiceTypeWithLiterals;\n /**\n * Order of the service within a *category*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object)).\n */\n sortOrder?: number | null;\n /**\n * Service name.\n * @maxLength 400\n * @minLength 1\n */\n name?: string | null;\n /**\n * Service description. For example, `High-class hair styling, cuts, straightening and color`.\n * @maxLength 7000\n */\n description?: string | null;\n /**\n * Short service description, such as `Hair styling`.\n * @maxLength 6000\n */\n tagLine?: string | null;\n /**\n * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.\n * @min 1\n * @max 1000\n */\n defaultCapacity?: number | null;\n /** Media associated with the service. */\n media?: Media;\n /** Whether the service is hidden from Wix Bookings pages and widgets. */\n hidden?: boolean | null;\n /**\n * _Category_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object))\n * the service is associated with.\n */\n category?: V2Category;\n /** Form the customer filled out when booking the service. */\n form?: Form;\n /**\n * Payment options for booking the service.\n * Learn more about *service payments*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)).\n */\n payment?: Payment;\n /** Online booking settings. */\n onlineBooking?: OnlineBooking;\n /** Conferencing options for the service. */\n conferencing?: Conferencing;\n /**\n * The locations this service is offered at. Read more about *service locations*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations)).\n * @immutable\n * @maxSize 500\n */\n locations?: Location[];\n /**\n * _Policy_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction))\n * determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.\n */\n bookingPolicy?: BookingPolicy;\n /**\n * The service's *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 * which can be used to manage the service's *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 */\n schedule?: Schedule;\n /**\n * IDs of the *staff members*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))\n * providing the service. Available only for appointment-based services.\n * @maxSize 220\n * @format GUID\n */\n staffMemberIds?: string[];\n /**\n * Information about which resources must be available so customers can book the service.\n * For example, a meeting room or equipment.\n * @maxSize 3\n */\n serviceResources?: ServiceResource[];\n /**\n * A slug is the last part of the URL address that serves as a unique identifier of the service.\n * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.\n * @readonly\n * @maxSize 100\n */\n supportedSlugs?: Slug[];\n /**\n * Active slug for the service.\n * Learn more about *service slugs*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-slugs) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs)).\n * @readonly\n */\n mainSlug?: Slug;\n /**\n * URLs to various service-related pages, such as the calendar page and the booking page.\n * @readonly\n */\n urls?: URLs;\n /** Extensions enabling users to save custom data related to the service. */\n extendedFields?: ExtendedFields;\n /** Custom SEO data for the service. */\n seoData?: SeoSchema;\n /**\n * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the service is updated. To\n * prevent conflicting changes, the existing revision must be used when updating\n * a service.\n * @readonly\n */\n revision?: string | null;\n}\n\n/**\n * Updates up to 100 services.\n *\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n * @public\n * @requiredField options.services.service\n * @requiredField options.services.service._id\n * @requiredField options.services.service.revision\n * @permissionId BOOKINGS.SERVICES_UPDATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.BulkUpdateServices\n */\nexport async function bulkUpdateServices(\n options?: NonNullablePaths<\n BulkUpdateServicesOptions,\n | `services.${number}.service`\n | `services.${number}.service._id`\n | `services.${number}.service.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdateServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n services: options?.services,\n returnEntity: options?.returnEntity,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'services.service.media.items.image' },\n { path: 'services.service.media.mainMedia.image' },\n { path: 'services.service.media.coverMedia.image' },\n { path: 'services.service.staffMembers.mainMedia.image' },\n {\n path: 'services.service.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'services.service.locations.calculatedAddress' },\n { path: 'services.service.locations.business.address' },\n { path: 'services.service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'services.service.urls.servicePage' },\n { path: 'services.service.urls.bookingPage' },\n { path: 'services.service.urls.calendarPage' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.bulkUpdateServices(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.media.items.image' },\n { path: 'results.item.media.mainMedia.image' },\n { path: 'results.item.media.coverMedia.image' },\n { path: 'results.item.staffMembers.mainMedia.image' },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'results.item.locations.calculatedAddress' },\n { path: 'results.item.locations.business.address' },\n { path: 'results.item.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'results.item.urls.servicePage' },\n { path: 'results.item.urls.bookingPage' },\n { path: 'results.item.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n services: '$[0].services',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateServicesOptions {\n /**\n * Services to update.\n * @maxSize 100\n */\n services?: MaskedService[];\n /** Whether to include the updated services in the response. Default: `false` */\n returnEntity?: boolean;\n}\n\n/**\n * Updates multiple services by filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details about updating a service.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n * @param filter - Filter to identify the services to update.\n * @public\n * @requiredField filter\n * @requiredField options\n * @requiredField options.service\n * @permissionId BOOKINGS.SERVICES_UPDATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.BulkUpdateServicesByFilter\n */\nexport async function bulkUpdateServicesByFilter(\n filter: Record<string, any>,\n options: NonNullablePaths<BulkUpdateServicesByFilterOptions, `service`, 2>\n): Promise<NonNullablePaths<BulkUpdateServicesByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n service: options?.service,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.bulkUpdateServicesByFilter(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: { filter: '$[0]', service: '$[1].service' },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateServicesByFilterOptions {\n /** Service to update. */\n service: Service;\n}\n\n/**\n * Deletes a service.\n *\n *\n * Specify `{\"preserveFutureSessionsWithParticipants\": true}` to retain all\n * future sessions for the service. By default, all future sessions are canceled.\n * @param serviceId - ID of the service to delete.\n * @public\n * @requiredField serviceId\n * @param options - Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.\n * @permissionId BOOKINGS.SERVICES_DELETE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.DeleteService\n */\nexport async function deleteService(\n serviceId: string,\n options?: DeleteServiceOptions\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n serviceId: serviceId,\n preserveFutureSessionsWithParticipants:\n options?.preserveFutureSessionsWithParticipants,\n participantNotification: options?.participantNotification,\n });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.deleteService(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: {\n serviceId: '$[0]',\n preserveFutureSessionsWithParticipants:\n '$[1].preserveFutureSessionsWithParticipants',\n participantNotification: '$[1].participantNotification',\n },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteServiceOptions {\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /**\n * Whether to notify participants about the change and an optional\n * custom message.\n */\n participantNotification?: ParticipantNotification;\n}\n\n/**\n * Deletes multiple services.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n * @param ids - IDs of the services to delete.\n * @public\n * @requiredField ids\n * @permissionId BOOKINGS.SERVICES_DELETE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.BulkDeleteServices\n */\nexport async function bulkDeleteServices(\n ids: string[],\n options?: BulkDeleteServicesOptions\n): Promise<\n NonNullablePaths<\n BulkDeleteServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 ids: ids,\n preserveFutureSessionsWithParticipants:\n options?.preserveFutureSessionsWithParticipants,\n participantNotification: options?.participantNotification,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.bulkDeleteServices(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.item.media.items.image' },\n { path: 'results.item.media.mainMedia.image' },\n { path: 'results.item.media.coverMedia.image' },\n { path: 'results.item.staffMembers.mainMedia.image' },\n {\n path: 'results.item.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'results.item.locations.calculatedAddress' },\n { path: 'results.item.locations.business.address' },\n { path: 'results.item.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'results.item.urls.servicePage' },\n { path: 'results.item.urls.bookingPage' },\n { path: 'results.item.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0]',\n preserveFutureSessionsWithParticipants:\n '$[1].preserveFutureSessionsWithParticipants',\n participantNotification: '$[1].participantNotification',\n },\n singleArgumentUnchanged: false,\n },\n ['ids', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteServicesOptions {\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`.\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /**\n * Whether to notify participants about the change and an optional\n * custom message.\n */\n participantNotification?: ParticipantNotification;\n}\n\n/**\n * Deletes multiple services by filter.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n * @param filter - Filter to identify the services that need to be deleted.\n * @public\n * @requiredField filter\n * @permissionId BOOKINGS.SERVICES_DELETE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.BulkDeleteServicesByFilter\n */\nexport async function bulkDeleteServicesByFilter(\n filter: Record<string, any>,\n options?: BulkDeleteServicesByFilterOptions\n): Promise<NonNullablePaths<BulkDeleteServicesByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n preserveFutureSessionsWithParticipants:\n options?.preserveFutureSessionsWithParticipants,\n participantNotification: options?.participantNotification,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.bulkDeleteServicesByFilter(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]',\n preserveFutureSessionsWithParticipants:\n '$[1].preserveFutureSessionsWithParticipants',\n participantNotification: '$[1].participantNotification',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteServicesByFilterOptions {\n /**\n * Whether to preserve future sessions with participants.\n *\n * Default: `false`.\n */\n preserveFutureSessionsWithParticipants?: boolean;\n /** Whether to notify participants about the change and an optional custom message. */\n participantNotification?: ParticipantNotification;\n}\n\n/**\n * Creates a query to retrieve a list of `service` objects.\n *\n * The `queryServices()` function builds a query to retrieve a list of `service` objects and returns a `ServicesQueryBuilder` 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/services/services-query-builder/find) function.\n *\n * You can refine the query by chaining `ServicesQueryBuilder` functions onto the query. `ServicesQueryBuilder` functions enable you to sort, filter, and control the results that `queryServices()` returns.\n *\n * `queryServices()` runs with the following `ServicesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryServices()` are applied in the order they are called. For example, if you apply `ascending(\"category.name\")` and then `ascending(\"name\")`, the results are sorted first by `category.name`, and then, if there are multiple results with the same `category.name`, the items are sorted by `name`.\n *\n * The following `ServicesQueryBuilder` functions are supported for the `queryServices()` function. For a full description of the `service` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/services-query-result/items) property in `ServicesQueryResult`.\n * @public\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.QueryServices\n */\nexport function queryServices(): ServicesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Service,\n 'OFFSET',\n QueryServicesRequest,\n QueryServicesResponse\n >({\n func: async (payload: QueryServicesRequest) => {\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.queryServices(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: QueryServicesRequest['query']) => {\n const args = [query, {}] as [QueryServicesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryServicesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'services.media.items.image' },\n { path: 'services.media.mainMedia.image' },\n { path: 'services.media.coverMedia.image' },\n { path: 'services.staffMembers.mainMedia.image' },\n {\n path: 'services.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'services.locations.calculatedAddress' },\n { path: 'services.locations.business.address' },\n { path: 'services.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'services.urls.servicePage' },\n { path: 'services.urls.bookingPage' },\n { path: 'services.urls.calendarPage' },\n ],\n },\n ])\n );\n\n return {\n items: transformedData?.services,\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: 'OFFSET',\n transformationPaths: {},\n });\n}\n\ninterface QueryOffsetResult {\n currentPage: number | undefined;\n totalPages: number | undefined;\n totalCount: number | undefined;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ServicesQueryResult extends QueryOffsetResult {\n items: Service[];\n query: ServicesQueryBuilder;\n next: () => Promise<ServicesQueryResult>;\n prev: () => Promise<ServicesQueryResult>;\n}\n\nexport interface ServicesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\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 | '_id'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'locations.business.id'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: string\n ) => ServicesQueryBuilder;\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 | '_id'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any[]\n ) => ServicesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasAll: (\n propertyName: 'staffMemberIds',\n value: any[]\n ) => ServicesQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: any\n ) => ServicesQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name',\n value: boolean\n ) => ServicesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | 'appId'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name'\n >\n ) => ServicesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | 'appId'\n | 'type'\n | 'name'\n | 'description'\n | 'tagLine'\n | 'hidden'\n | 'category.id'\n | 'category.name'\n | 'form.id'\n | 'payment.options.online'\n | 'payment.options.inPerson'\n | 'payment.options.pricingPlan'\n | 'onlineBooking.enabled'\n | 'locations.business.id'\n | 'schedule.firstSessionStart'\n | 'schedule.lastSessionEnd'\n | 'staffMemberIds'\n | 'supportedSlugs.name'\n | 'mainSlug.name'\n >\n ) => ServicesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ServicesQueryBuilder;\n /** @param skip - Number of items to skip in the query results before returning the results. */\n skip: (skip: number) => ServicesQueryBuilder;\n find: () => Promise<ServicesQueryResult>;\n}\n\n/**\n * Retrieves a list of up to 100 services, given the provided filtering, paging,\n * and sorting.\n *\n *\n * ### Defaults\n *\n * Search Services has the following default settings, which you can override:\n * + Sorted by `createdDate` in ascending order.\n * + `paging.limit` set to `100`.\n * + `paging.offset` set to `0`.\n *\n * ### Filters\n *\n * When using filters for dates, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n *\n * ### See also\n *\n * To learn about working with Search methods, see API Query Language\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language))\n * and Sorting and Paging\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)).\n * @param search - Search criteria including filter, sort, aggregations, and paging options.\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)) for complete filter and sorting options.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.SearchServices\n */\nexport async function searchServices(\n search: ServiceSearch\n): Promise<\n NonNullablePaths<\n SearchServicesResponse,\n | `services`\n | `services.${number}.type`\n | `services.${number}.category._id`\n | `services.${number}.form._id`\n | `services.${number}.payment.rateType`\n | `services.${number}.payment.addOnOption`\n | `services.${number}.bookingPolicy._id`\n | `services.${number}.bookingPolicy.customPolicyDescription.enabled`\n | `services.${number}.bookingPolicy.customPolicyDescription.description`\n | `services.${number}.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `services.${number}.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `services.${number}.bookingPolicy.limitLateBookingPolicy.enabled`\n | `services.${number}.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `services.${number}.bookingPolicy.bookAfterStartPolicy.enabled`\n | `services.${number}.bookingPolicy.cancellationPolicy.enabled`\n | `services.${number}.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `services.${number}.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `services.${number}.bookingPolicy.reschedulePolicy.enabled`\n | `services.${number}.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `services.${number}.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `services.${number}.bookingPolicy.waitlistPolicy.enabled`\n | `services.${number}.bookingPolicy.waitlistPolicy.capacity`\n | `services.${number}.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `services.${number}.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `services.${number}.bookingPolicy.resourcesPolicy.enabled`\n | `services.${number}.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `services.${number}.bookingPolicy.cancellationFeePolicy.enabled`\n | `services.${number}.bookingPolicy.saveCreditCardPolicy.enabled`\n | `services.${number}.schedule.availabilityConstraints.timeBetweenSessions`\n | `services.${number}.seoData.settings.preventAutoRedirect`\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 6\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 ambassadorWixBookingsServicesV2Service.searchServices(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'services.media.items.image' },\n { path: 'services.media.mainMedia.image' },\n { path: 'services.media.coverMedia.image' },\n { path: 'services.staffMembers.mainMedia.image' },\n {\n path: 'services.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'services.locations.calculatedAddress' },\n { path: 'services.locations.business.address' },\n { path: 'services.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'services.urls.servicePage' },\n { path: 'services.urls.bookingPage' },\n { path: 'services.urls.calendarPage' },\n ],\n },\n ])\n )!;\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 ServiceSearchSpec extends SearchSpec {\n searchable: ['name'];\n aggregatable: [\n '_id',\n 'addOnDetails.addOnId',\n 'addOnDetails.durationInMinutes',\n 'appId',\n 'category._id',\n 'category.name',\n 'category.sortOrder',\n 'description',\n 'form._id',\n 'hidden',\n 'locations.business._id',\n 'locations.business.name',\n 'locations.type',\n 'mainSlug.name',\n 'name',\n 'onlineBooking.enabled',\n 'payment.options.inPerson',\n 'payment.options.online',\n 'payment.options.pricingPlan',\n 'staffMemberIds',\n 'supportedSlugs.name',\n 'tagLine',\n 'type'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$hasAll', '$hasSome'];\n fields: [\n 'locations.business._id',\n 'locations.business.name',\n 'locations.calculatedAddress.formattedAddress',\n 'locations.type',\n 'staffMemberIds',\n 'supportedSlugs.name'\n ];\n sort: 'BOTH';\n },\n {\n operators: '*';\n fields: [\n '_id',\n 'addOnDetails.addOnId',\n 'addOnDetails.durationInMinutes',\n 'appId',\n 'category._id',\n 'category.name',\n 'category.sortOrder',\n 'description',\n 'form._id',\n 'hidden',\n 'mainSlug.name',\n 'name',\n 'onlineBooking.enabled',\n 'payment.options.inPerson',\n 'payment.options.online',\n 'payment.options.pricingPlan',\n 'tagLine',\n 'type'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Service,\n ServiceSearchSpec\n>;\nexport type ServiceSearch = {\n /** \n Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`,\n `filter`, `sort`, or `search` can't be specified. \n */\n cursorPaging?: {\n /** \n Number of items to load. \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 You can get the relevant cursor token\n 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 Filter object for narrowing search results. For example, to return only services with specific payment options: `\"filter\": {\"payment.options.online\": true, \"payment.options.in_person\": false}`.\n\n Learn more about the filter format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Array of sort objects specifying result order. For example, to sort by creation date in descending order: `\"sort\": [{\"fieldName\": \"createdDate\", \"order\": \"DESC\"}]`.\n\n Learn more about the sort format in the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)). \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 for grouping data into categories (facets) and providing summaries for each category.\n For example, use aggregations to categorize search results by service type, payment options, or locations. \n @maxSize: 10 \n */\n aggregations?: {\n /** \n Value aggregation configuration. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n Range aggregation configuration. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n Scalar aggregation configuration. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n Date histogram aggregation configuration. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n Nested aggregation configuration. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n /** \n User-defined name of aggregation. Must be unique and 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 specify matching aggregation field below. \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`. \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: 2025-01-01 \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 Search mode. Defines the search logic for combining multiple terms in the `expression`. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 200 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`. \n @maxSize: 10,\n @maxLength: 200 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) or [ISO 8601 UTC offset format](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) for adjusting time fields in the specified filters and returned aggregation data. For example, `America/New_York`, `UTC`, or `+02:00`.\n\n Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Retrieves a list of up to 100 booking policies\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n * ### Defaults\n *\n * Query Policies has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Booking Policies API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * those services is returned. The `bookingPolicies.totalServiceCount` values\n * indicate the total number of services linked to each policy. You can call Search Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))\n * and specify the relevant policy ID in the filter to retrieve all services\n * connected to the booking policy.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @param query - Information about filters, paging, and sorting. See the article about\n * booking policy filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))\n * for all supported filters and sorting options.\n * @public\n * @documentationMaturity preview\n * @requiredField query\n * @permissionId BOOKINGS.BOOKING_POLICY_READ\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.QueryPolicies\n */\nexport async function queryPolicies(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryPoliciesResponse,\n | `bookingPolicies`\n | `bookingPolicies.${number}.bookingPolicy._id`\n | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.description`\n | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicies.${number}.bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.saveCreditCardPolicy.enabled`\n | `bookingPolicies.${number}.totalServiceCount`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.queryPolicies(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'bookingPolicies.services.media.items.image' },\n { path: 'bookingPolicies.services.media.mainMedia.image' },\n { path: 'bookingPolicies.services.media.coverMedia.image' },\n { path: 'bookingPolicies.services.staffMembers.mainMedia.image' },\n {\n path: 'bookingPolicies.services.staffMemberDetails.staffMembers.mainMedia.image',\n },\n { path: 'bookingPolicies.connectedServices.media.items.image' },\n { path: 'bookingPolicies.connectedServices.media.mainMedia.image' },\n {\n path: 'bookingPolicies.connectedServices.media.coverMedia.image',\n },\n {\n path: 'bookingPolicies.connectedServices.staffMembers.mainMedia.image',\n },\n {\n path: 'bookingPolicies.connectedServices.staffMemberDetails.staffMembers.mainMedia.image',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'bookingPolicies.services.locations.calculatedAddress' },\n { path: 'bookingPolicies.services.locations.business.address' },\n { path: 'bookingPolicies.services.locations.custom.address' },\n {\n path: 'bookingPolicies.connectedServices.locations.calculatedAddress',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.business.address',\n },\n {\n path: 'bookingPolicies.connectedServices.locations.custom.address',\n },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'bookingPolicies.services.urls.servicePage' },\n { path: 'bookingPolicies.services.urls.bookingPage' },\n { path: 'bookingPolicies.services.urls.calendarPage' },\n { path: 'bookingPolicies.connectedServices.urls.servicePage' },\n { path: 'bookingPolicies.connectedServices.urls.bookingPage' },\n { path: 'bookingPolicies.connectedServices.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 booking forms\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n *\n * ### Defaults\n *\n * Query Booking Forms has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Forms API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * these service IDs and names is returned. The `bookingForms.totalServiceCount`\n * values indicate the total number of services linked to each form. You can call Query Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/query-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/query-services))\n * and specify the relevant form ID in the filter to retrieve all services\n * connected to the booking form.\n *\n * ### Default booking forms\n *\n * By default, all Wix Bookings services use a standard booking form. To retrieve\n * a site's default booking form with Query Booking Forms, specify\n * `{\"conditionalFields\": [\"DEFAULT_BOOKING_FORM\"]}`.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @param query - Information about filters, paging, and sorting. See the article about\n * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))\n * for all supported filters and sorting options.\n * @public\n * @requiredField query\n * @permissionId BOOKINGS.SERVICE_BOOKING_FORMS_READ\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.QueryBookingForms\n */\nexport async function queryBookingForms(\n query: CursorQuery,\n options?: QueryBookingFormsOptions\n): Promise<\n NonNullablePaths<\n QueryBookingFormsResponse,\n | `bookingForms`\n | `bookingForms.${number}.formDetails.formId`\n | `bookingForms.${number}.totalServiceCount`\n | `defaultBookingForm.formDetails.formId`\n | `defaultBookingForm.connectedServices`\n | `defaultBookingForm.totalServiceCount`,\n 5\n > & {\n __applicationErrorsType?: QueryBookingFormsApplicationErrors;\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 query: query,\n conditionalFields: options?.conditionalFields,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.queryBookingForms(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 query: '$[0]',\n conditionalFields: '$[1].conditionalFields',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryBookingFormsOptions {\n /**\n * Conditional fields to return.\n * @maxSize 1\n */\n conditionalFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Counts how many services match the given filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)\n * @public\n * @permissionId BOOKINGS.SERVICES_COUNT\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.CountServices\n */\nexport async function countServices(\n options?: CountServicesOptions\n): Promise<NonNullablePaths<CountServicesResponse, `count`, 2>> {\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 });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.countServices(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountServicesOptions {\n /**\n * Query filter to base the count on. See supported filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Retrieves 3 separate lists of business, custom, and customer locations\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 * given the provided filtering, and whether each location is connected to at\n * least one of the site's services.\n *\n *\n * ### Defaults\n *\n * Query Locations has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the `location` object\n * ([REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @public\n * @documentationMaturity preview\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.QueryLocations\n */\nexport async function queryLocations(\n options?: QueryLocationsOptions\n): Promise<\n NonNullablePaths<\n QueryLocationsResponse,\n | `businessLocations.exists`\n | `businessLocations.locations`\n | `businessLocations.locations.${number}.business._id`\n | `businessLocations.locations.${number}.business.name`\n | `businessLocations.locations.${number}.custom._id`\n | `businessLocations.locations.${number}._id`\n | `businessLocations.locations.${number}.type`\n | `customLocations.exists`\n | `customerLocations.exists`,\n 6\n >\n> {\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 });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.queryLocations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'businessLocations.locations.calculatedAddress' },\n { path: 'businessLocations.locations.business.address' },\n { path: 'businessLocations.locations.custom.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryLocationsOptions {\n /** Filter. */\n filter?: QueryLocationsFilter;\n}\n\n/**\n * Retrieves a list of service categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)), given the provided filtering.\n *\n *\n * ### Defaults\n *\n * Query Categories has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @public\n * @documentationMaturity preview\n * @permissionId BOOKINGS.SERVICES_READ\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.QueryCategories\n */\nexport async function queryCategories(\n options?: QueryCategoriesOptions\n): Promise<\n NonNullablePaths<\n QueryCategoriesResponse,\n `categories` | `categories.${number}._id`,\n 4\n >\n> {\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 });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.queryCategories(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryCategoriesOptions {\n /** Filter. */\n filter?: QueryCategoriesFilter;\n}\n\n/**\n * Replaces the list of the locations\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 * where the business offers the service.\n *\n *\n * ### Consequences for customers\n *\n * Removing a service location may impact existing sessions and their\n * participants. If you remove at least one service location, you must\n * specify `removedLocationSessionsAction` to indicate what happens to all\n * future sessions scheduled at this location.\n *\n * - **Keep existing location**: If you want to retain future sessions at their\n * originally scheduled location, specify\n * `{\"removedLocationSessionsAction.action\": \"KEEP_AT_CURRENT_LOCATION\"}`.\n * This ensures nothing changes for the customer, but the business must be\n * able to provide access to the removed location in the future.\n * - **Update location**: If you want to update the location for future sessions\n * scheduled at the removed location, specify\n * `{\"removedLocationSessionsAction.action\": \"MOVE_TO_LOCATION\"}` and\n * `moveToLocationOptions.newLocation`.\n *\n * You can't mix and match to keep some sessions at the previous location while\n * moving other sessions to an updated location.\n *\n * Past session details aren't changed, no matter which option you choose for\n * future sessions.\n *\n * Future sessions scheduled for a location defined by the customer are also not\n * updated.\n *\n * ### Specify location details\n *\n * Depending on whether the new or updated location is a business or custom location,\n * you need to specify different fields.\n *\n * - **Business location**: Specify the relevant location ID\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 * in `locations.business.id`.\n * - **Custom location**: Specify the complete address object as\n * `locations.custom.address`.\n *\n * ### Participant notifications\n *\n * You can specify a `participantNotification.message` that's immediately send\n * to all customers who had booked at a changed location. Ensure\n * `participantNotification.notifyParticipants` is set to `true` to send the\n * message.\n * @param serviceId - ID of the service.\n * @param locations - List of locations replacing existing service locations. Omitting an existing location removes it from the service. Specify `removedLocationSessionsAction` to determine the handling of future sessions scheduled at that location.\n * @public\n * @documentationMaturity preview\n * @requiredField locations\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_LOCATIONS_SET\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.SetServiceLocations\n */\nexport async function setServiceLocations(\n serviceId: string,\n locations: Location[],\n options?: SetServiceLocationsOptions\n): Promise<\n NonNullablePaths<\n SetServiceLocationsResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n serviceId: serviceId,\n locations: locations,\n removedLocationSessionsAction: options?.removedLocationSessionsAction,\n participantNotification: options?.participantNotification,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'locations.calculatedAddress' },\n { path: 'locations.business.address' },\n { path: 'locations.custom.address' },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address',\n },\n {\n path: 'removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address',\n },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.setServiceLocations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n serviceId: '$[0]',\n locations: '$[1]',\n removedLocationSessionsAction: '$[2].removedLocationSessionsAction',\n participantNotification: '$[2].participantNotification',\n },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'locations', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SetServiceLocationsOptions {\n /**\n * The action to perform on sessions currently set to a removed location. For\n * example, move existing sessions to a new specified location.\n * If not specified, sessions will not be moved to a new location.\n */\n removedLocationSessionsAction?: RemovedLocationSessionsAction;\n /**\n * Whether to notify participants about the change of location, and an\n * Optional custom message. The notification is sent only to participants of sessions that are affected by the change.\n */\n participantNotification?: ParticipantNotification;\n}\n\n/**\n * Adds a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to a service's `payment.pricingPlanIds` array.\n *\n *\n * The call doesn't validate whether the service's `payment.options.pricingPlan`\n * is set to `true`. If it's set to `false`, customers aren't able to pay\n * for their bookings using pricing plans. You can call Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * to change a service's supported payment methods.\n * @param serviceId - ID of the service to update.\n * @param pricingPlanIds - IDs of the pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to add to the service's `payment.pricingPlanIds` array.\n * @public\n * @requiredField pricingPlanIds\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_PRICING_PLANS_ADD\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.EnablePricingPlansForService\n */\nexport async function enablePricingPlansForService(\n serviceId: string,\n pricingPlanIds: string[]\n): Promise<\n NonNullablePaths<\n EnablePricingPlansForServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: EnablePricingPlansForServiceApplicationErrors;\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 serviceId: serviceId,\n pricingPlanIds: pricingPlanIds,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.enablePricingPlansForService(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { serviceId: '$[0]', pricingPlanIds: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'pricingPlanIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * from a service's `payment.pricingPlanIds` array.\n *\n *\n * If you remove all pricing plan IDs from `payment.pricingPlanIds` and the\n * service supports only payments by pricing plan, customers will no longer be\n * able to book the service, as they will have no payment options available.\n * @param serviceId - ID of the service to update.\n * @public\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_PRICING_PLANS_REMOVE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.DisablePricingPlansForService\n */\nexport async function disablePricingPlansForService(\n serviceId: string,\n options?: DisablePricingPlansForServiceOptions\n): Promise<\n NonNullablePaths<\n DisablePricingPlansForServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: DisablePricingPlansForServiceApplicationErrors;\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 serviceId: serviceId,\n pricingPlanIds: options?.pricingPlanIds,\n });\n\n const reqOpts =\n ambassadorWixBookingsServicesV2Service.disablePricingPlansForService(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n serviceId: '$[0]',\n pricingPlanIds: '$[1].pricingPlanIds',\n },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DisablePricingPlansForServiceOptions {\n /**\n * IDs of the pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to remove from the service's `payment.pricingPlanIds` array.\n * @format GUID\n * @maxSize 75\n */\n pricingPlanIds?: string[];\n}\n\n/**\n * Sets a new active slug for the service.\n *\n *\n * The call fails if at least one of these conditions is met:\n * - The slug doesn't adheres to the supported format.\n * - Another service is currently using the slug.\n * - Another service has used the slug in the past.\n * @param serviceId - ID of the service for which to update the active slug.\n * @public\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_CUSTOM_SLUGS_SET\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.SetCustomSlug\n */\nexport async function setCustomSlug(\n serviceId: string,\n options?: SetCustomSlugOptions\n): Promise<\n NonNullablePaths<\n SetCustomSlugResponse,\n | `slug.name`\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: SetCustomSlugApplicationErrors;\n __validationErrorsType?: SetCustomSlugValidationErrors;\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 serviceId: serviceId,\n slug: options?.slug,\n });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.setCustomSlug(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { serviceId: '$[0]', slug: '$[1].slug' },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SetCustomSlugOptions {\n /**\n * Slug to set as the active service slug.\n * @maxLength 500\n */\n slug?: string;\n}\n\n/**\n * Checks whether a custom slug is validate for the service.\n *\n *\n * The checks include:\n * - The slug adheres to the supported format.\n * - No other service is currently using the slug.\n * - No other service has used the slug in the past.\n *\n * The call fails if at least one of the checks fails.\n * @param serviceId - IO of the service to check custom slug validity for.\n * @public\n * @requiredField serviceId\n * @permissionId BOOKINGS.SERVICES_CUSTOM_SLUGS_SET\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.ValidateSlug\n */\nexport async function validateSlug(\n serviceId: string,\n options?: ValidateSlugOptions\n): Promise<NonNullablePaths<ValidateSlugResponse, `valid` | `errors`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n serviceId: serviceId,\n slug: options?.slug,\n });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.validateSlug(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: { serviceId: '$[0]', slug: '$[1].slug' },\n singleArgumentUnchanged: false,\n },\n ['serviceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ValidateSlugOptions {\n /**\n * Custom slug to validate.\n * @maxLength 500\n */\n slug?: string;\n}\n\n/**\n * Clones a service.\n *\n *\n * ### Connected entities\n *\n * By default, not all entities connected to the service are cloned.\n *\n * #### Schedule\n *\n * Wix Bookings automatically creates a new active 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 * for the cloned service. If Wix Bookings can't create this schedule, the\n * Clone Service call fails.\n *\n * - __For appointment-based services__: Future appointments aren't added to the\n * cloned service's schedule. Use the Events API\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 * to add them as needed.\n * - __For classes and courses__: Future one-time events aren't added to the\n * cloned service's schedule, while future recurring events are added\n * asynchronously. The Clone Service call always succeeds, whether or not\n * recurring events are added.\n * If the response includes `RECURRING_EVENTS` in the `errors` array, it means the\n * cloned service doesn't have future recurring events, even though the original\n * service does. You can either delete the cloned service and try again or use\n * the Events API\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 * to add missing events to the schedule.\n *\n * Wix Bookings never adds past events to the cloned service's schedule.\n *\n * #### Service options and variants\n *\n * If the original service has variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),\n * they're cloned asynchronously. The Clone Service call always succeeds,\n * regardless of whether variants were cloned.\n *\n * If the response includes `OPTIONS_AND_VARIANTS` in the `errors` array, the cloned\n * service doesn't have variants, even though the original service does. You can\n * delete the cloned service and call Clone Service again, or use the\n * _Service Options And Variants API_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction))\n * to add variants.\n *\n * #### Booking form\n *\n * The original service's booking form isn't cloned, whether it's\n * the default or a custom booking form.\n *\n * #### Pricing plans\n *\n * If the original service's accepts payments via pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/introduction)),\n * the cloned service's `payment.options.pricingPlan` is also set to `true`. To\n * accept specific pricing plans, call Enable Pricing Plans For Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/enable-pricing-plans-for-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service)),\n * after cloning the service. If the original service accepts only\n * pricing plan payments and you don't call Enable Pricing Plans For Service\n * after cloning the service, customers will be unable to book the service.\n * @param sourceServiceId - ID of the service to clone.\n * @public\n * @requiredField sourceServiceId\n * @permissionId BOOKINGS.SERVICES_CREATE\n * @applicableIdentity APP\n * @fqn wix.bookings.services.v2.ServicesService.CloneService\n */\nexport async function cloneService(\n sourceServiceId: string\n): Promise<\n NonNullablePaths<\n CloneServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`\n | `errors`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sourceServiceId: sourceServiceId,\n });\n\n const reqOpts = ambassadorWixBookingsServicesV2Service.cloneService(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'service.media.items.image' },\n { path: 'service.media.mainMedia.image' },\n { path: 'service.media.coverMedia.image' },\n { path: 'service.staffMembers.mainMedia.image' },\n { path: 'service.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'service.locations.calculatedAddress' },\n { path: 'service.locations.business.address' },\n { path: 'service.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'service.urls.servicePage' },\n { path: 'service.urls.bookingPage' },\n { path: 'service.urls.calendarPage' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { sourceServiceId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['sourceServiceId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTPageURLV2ToSDKPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\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 AddOnGroup,\n BulkCreateServicesOptions,\n BulkCreateServicesResponse,\n BulkDeleteServicesByFilterOptions,\n BulkDeleteServicesByFilterResponse,\n BulkDeleteServicesOptions,\n BulkDeleteServicesResponse,\n BulkUpdateServicesByFilterOptions,\n BulkUpdateServicesByFilterResponse,\n BulkUpdateServicesOptions,\n BulkUpdateServicesResponse,\n CloneServiceResponse,\n CountServicesOptions,\n CountServicesResponse,\n CreateAddOnGroupOptions,\n CreateAddOnGroupResponse,\n CreateServiceValidationErrors,\n CursorQuery,\n DeleteAddOnGroupApplicationErrors,\n DeleteAddOnGroupOptions,\n DeleteServiceOptions,\n DisablePricingPlansForServiceApplicationErrors,\n DisablePricingPlansForServiceOptions,\n DisablePricingPlansForServiceResponse,\n EnablePricingPlansForServiceApplicationErrors,\n EnablePricingPlansForServiceResponse,\n ListAddOnGroupsByServiceIdOptions,\n ListAddOnGroupsByServiceIdResponse,\n Location,\n QueryBookingFormsApplicationErrors,\n QueryBookingFormsOptions,\n QueryBookingFormsResponse,\n QueryCategoriesOptions,\n QueryCategoriesResponse,\n QueryLocationsOptions,\n QueryLocationsResponse,\n QueryPoliciesResponse,\n SearchServicesResponse,\n Service,\n ServiceCreatedEnvelope,\n ServiceDeletedEnvelope,\n ServiceSearch,\n ServiceUpdatedEnvelope,\n ServicesQueryBuilder,\n SetAddOnsForGroupApplicationErrors,\n SetAddOnsForGroupOptions,\n SetAddOnsForGroupResponse,\n SetCustomSlugApplicationErrors,\n SetCustomSlugOptions,\n SetCustomSlugResponse,\n SetCustomSlugValidationErrors,\n SetServiceLocationsOptions,\n SetServiceLocationsResponse,\n UpdateAddOnGroupApplicationErrors,\n UpdateAddOnGroupOptions,\n UpdateAddOnGroupResponse,\n UpdateService,\n UpdateServiceValidationErrors,\n ValidateSlugOptions,\n ValidateSlugResponse,\n bulkCreateServices as universalBulkCreateServices,\n bulkDeleteServices as universalBulkDeleteServices,\n bulkDeleteServicesByFilter as universalBulkDeleteServicesByFilter,\n bulkUpdateServices as universalBulkUpdateServices,\n bulkUpdateServicesByFilter as universalBulkUpdateServicesByFilter,\n cloneService as universalCloneService,\n countServices as universalCountServices,\n createAddOnGroup as universalCreateAddOnGroup,\n createService as universalCreateService,\n deleteAddOnGroup as universalDeleteAddOnGroup,\n deleteService as universalDeleteService,\n disablePricingPlansForService as universalDisablePricingPlansForService,\n enablePricingPlansForService as universalEnablePricingPlansForService,\n getService as universalGetService,\n listAddOnGroupsByServiceId as universalListAddOnGroupsByServiceId,\n queryBookingForms as universalQueryBookingForms,\n queryCategories as universalQueryCategories,\n queryLocations as universalQueryLocations,\n queryPolicies as universalQueryPolicies,\n queryServices as universalQueryServices,\n searchServices as universalSearchServices,\n setAddOnsForGroup as universalSetAddOnsForGroup,\n setCustomSlug as universalSetCustomSlug,\n setServiceLocations as universalSetServiceLocations,\n updateAddOnGroup as universalUpdateAddOnGroup,\n updateService as universalUpdateService,\n validateSlug as universalValidateSlug,\n} from './bookings-services-v2-service-services.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createAddOnGroup(\n httpClient: HttpClient\n): CreateAddOnGroupSignature {\n return (\n addOnGroup: NonNullablePaths<AddOnGroup, `name`, 2>,\n options?: CreateAddOnGroupOptions\n ) =>\n universalCreateAddOnGroup(\n addOnGroup,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateAddOnGroupSignature {\n /**\n * Create a new AddOns group.\n * An AddOns group defines a collection of AddOns that can be linked to a Service,\n * with constraints such as minimum and maximum selections.\n * @param - AddOnGroup to create.\n */\n (\n addOnGroup: NonNullablePaths<AddOnGroup, `name`, 2>,\n options?: CreateAddOnGroupOptions\n ): Promise<\n NonNullablePaths<CreateAddOnGroupResponse, `addOnGroup.addOnIds`, 3>\n >;\n}\n\nexport function deleteAddOnGroup(\n httpClient: HttpClient\n): DeleteAddOnGroupSignature {\n return (\n addOnGroupId: string,\n options: NonNullablePaths<DeleteAddOnGroupOptions, `serviceId`, 2>\n ) =>\n universalDeleteAddOnGroup(\n addOnGroupId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteAddOnGroupSignature {\n /**\n * Delete an existing AddOns group.\n * This will remove the group and unlink all associated AddOns.\n * @param - ID of the AddOnGroup to delete.\n */\n (\n addOnGroupId: string,\n options: NonNullablePaths<DeleteAddOnGroupOptions, `serviceId`, 2>\n ): Promise<\n void & {\n __applicationErrorsType?: DeleteAddOnGroupApplicationErrors;\n }\n >;\n}\n\nexport function updateAddOnGroup(\n httpClient: HttpClient\n): UpdateAddOnGroupSignature {\n return (\n addOnGroup: NonNullablePaths<AddOnGroup, `_id`, 2>,\n options: NonNullablePaths<UpdateAddOnGroupOptions, `serviceId`, 2>\n ) =>\n universalUpdateAddOnGroup(\n addOnGroup,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateAddOnGroupSignature {\n /**\n * Update an existing AddOns group.\n * This allows modifying group settings such as its name, prompt, constraints, or associated AddOns.\n * @param - AddOnGroup to update.\n */\n (\n addOnGroup: NonNullablePaths<AddOnGroup, `_id`, 2>,\n options: NonNullablePaths<UpdateAddOnGroupOptions, `serviceId`, 2>\n ): Promise<\n NonNullablePaths<UpdateAddOnGroupResponse, `addOnGroup.addOnIds`, 3> & {\n __applicationErrorsType?: UpdateAddOnGroupApplicationErrors;\n }\n >;\n}\n\nexport function listAddOnGroupsByServiceId(\n httpClient: HttpClient\n): ListAddOnGroupsByServiceIdSignature {\n return (serviceId: string, options?: ListAddOnGroupsByServiceIdOptions) =>\n universalListAddOnGroupsByServiceId(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAddOnGroupsByServiceIdSignature {\n /**\n * Retrieves a list of AddOnGroups including enriched AddOn details in the correct order.\n * If the group_id is specified, only the AddOns for the specified group will be returned,\n * otherwise all groups will be returned.\n * @param - ID of the service to retrieve AddOnGroups for.\n */\n (serviceId: string, options?: ListAddOnGroupsByServiceIdOptions): Promise<\n NonNullablePaths<\n ListAddOnGroupsByServiceIdResponse,\n `addOnGroupsDetails`,\n 2\n >\n >;\n}\n\nexport function setAddOnsForGroup(\n httpClient: HttpClient\n): SetAddOnsForGroupSignature {\n return (\n serviceId: string,\n options: NonNullablePaths<\n SetAddOnsForGroupOptions,\n `addOnIds` | `groupId`,\n 2\n >\n ) =>\n universalSetAddOnsForGroup(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetAddOnsForGroupSignature {\n /**\n * Sets the AddOns for a specific group.\n * The order of the AddOns in the list will be used to determine their display order.\n * @param - The service ID to set AddOns for.\n */\n (\n serviceId: string,\n options: NonNullablePaths<\n SetAddOnsForGroupOptions,\n `addOnIds` | `groupId`,\n 2\n >\n ): Promise<\n NonNullablePaths<SetAddOnsForGroupResponse, `addOnGroup.addOnIds`, 3> & {\n __applicationErrorsType?: SetAddOnsForGroupApplicationErrors;\n }\n >;\n}\n\nexport function createService(httpClient: HttpClient): CreateServiceSignature {\n return (service: Service) =>\n universalCreateService(\n service,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateServiceSignature {\n /**\n * Creates a service.\n *\n *\n * ### Required fields\n *\n * When creating a service you must specify the following fields:\n * - `type`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)):\n * Whether it's an appointment-based service, class, or course.\n * - `name`: Service name that's displayed to customers.\n * - `onlineBooking`:\n * Settings determining whether customers can book online, whether the business\n * must manually confirm bookings, and whether customers can request to book an\n * appointment time slot that already has a booking request awaiting business\n * confirmation.\n * - `payment`\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)):\n * How customers can pay when signing up for the service.\n * - `defaultCapacity`: The maximum number of customers that can book the service. Required for all service types. For appointment-based services, it must be `1`.\n *\n * #### Session durations\n *\n * Depending on which type of service you're creating, you may also need to specify\n * supported session durations.\n *\n * __Classes and courses__\n *\n * Don't specify `schedule.availabilityConstraints.sessionDurations`.\n *\n * __Appointment-based services without varied pricing based on session length__\n *\n * Specify the single supported session duration in the\n * `schedule.availabilityConstraints.sessionDurations` array.\n *\n * __Appointment-based services with varied pricing based on session length__\n *\n * - Specify all supported session durations in `schedule.availabilityConstraints.sessionDurations`.\n * - Note that Wix Bookings doesn't display these values to customers and\n * ignores them in pricing and availability calculations. Instead session\n * durations are retrieved from the relevant service variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n * - It is mandatory to specify `schedule.availabilityConstraints.sessionDurations`,\n * even though these values are ignored.\n * @param - Service to create.\n * @returns Created service.\n */\n (service: Service): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n > & {\n __validationErrorsType?: CreateServiceValidationErrors;\n }\n >;\n}\n\nexport function bulkCreateServices(\n httpClient: HttpClient\n): BulkCreateServicesSignature {\n return (services: Service[], options?: BulkCreateServicesOptions) =>\n universalBulkCreateServices(\n services,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateServicesSignature {\n /**\n * Creates multiple services.\n *\n *\n * See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service))\n * for more details.\n * @param - Services to create.\n */\n (services: Service[], options?: BulkCreateServicesOptions): Promise<\n NonNullablePaths<\n BulkCreateServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function getService(httpClient: HttpClient): GetServiceSignature {\n return (serviceId: string) =>\n universalGetService(\n serviceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetServiceSignature {\n /**\n * Retrieves a service.\n * @param - ID of the service to retrieve.\n * @returns Retrieved service.\n */\n (serviceId: string): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n >\n >;\n}\n\nexport function updateService(httpClient: HttpClient): UpdateServiceSignature {\n return (\n _id: string,\n service: NonNullablePaths<UpdateService, `revision`, 2>\n ) =>\n universalUpdateService(\n _id,\n service,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateServiceSignature {\n /**\n * Updates a service.\n *\n *\n * Each time the service is updated, `revision` increments by 1. You must\n * include the number of the existing revision when updating the service.\n * This ensures you're working with the latest service information and\n * prevents unintended overwrites.\n *\n * ### Session durations\n *\n * Specify `schedule.availabilityConstraints.sessionDurations`\n * only if you want to update it for appointment-based services without varied\n * pricing based on session length. Don't specify `schedule.availabilityConstraints.sessionDurations`\n * for all other appointment-based services, classes, or courses. See Create Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service#session-durations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service#session-durations))\n * for more details.\n *\n * ## Service locations\n *\n * Don't call Update Service to adjust service locations, call Set Service Locations ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/set-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-service-locations)) instead.\n * @param - Service ID.\n * @returns Updated service.\n */\n (\n _id: string,\n service: NonNullablePaths<UpdateService, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n Service,\n | `type`\n | `media.items`\n | `category._id`\n | `form._id`\n | `payment.fixed.price.value`\n | `payment.fixed.price.currency`\n | `payment.rateType`\n | `payment.pricingPlanIds`\n | `payment.addOnOption`\n | `locations`\n | `locations.${number}.business._id`\n | `locations.${number}.business.name`\n | `locations.${number}.custom._id`\n | `locations.${number}._id`\n | `locations.${number}.type`\n | `bookingPolicy._id`\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`\n | `schedule.availabilityConstraints.durations`\n | `schedule.availabilityConstraints.durations.${number}.minutes`\n | `schedule.availabilityConstraints.sessionDurations`\n | `schedule.availabilityConstraints.timeBetweenSessions`\n | `staffMemberIds`\n | `serviceResources`\n | `supportedSlugs`\n | `supportedSlugs.${number}.name`\n | `seoData.tags`\n | `seoData.tags.${number}.type`\n | `seoData.tags.${number}.children`\n | `seoData.tags.${number}.custom`\n | `seoData.tags.${number}.disabled`\n | `seoData.settings.preventAutoRedirect`\n | `seoData.settings.keywords`\n | `seoData.settings.keywords.${number}.term`\n | `seoData.settings.keywords.${number}.isMain`,\n 6\n > & {\n __validationErrorsType?: UpdateServiceValidationErrors;\n }\n >;\n}\n\nexport function bulkUpdateServices(\n httpClient: HttpClient\n): BulkUpdateServicesSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdateServicesOptions,\n | `services.${number}.service`\n | `services.${number}.service._id`\n | `services.${number}.service.revision`,\n 5\n >\n ) =>\n universalBulkUpdateServices(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateServicesSignature {\n /**\n * Updates up to 100 services.\n *\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n */\n (\n options?: NonNullablePaths<\n BulkUpdateServicesOptions,\n | `services.${number}.service`\n | `services.${number}.service._id`\n | `services.${number}.service.revision`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkUpdateServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkUpdateServicesByFilter(\n httpClient: HttpClient\n): BulkUpdateServicesByFilterSignature {\n return (\n filter: Record<string, any>,\n options: NonNullablePaths<BulkUpdateServicesByFilterOptions, `service`, 2>\n ) =>\n universalBulkUpdateServicesByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateServicesByFilterSignature {\n /**\n * Updates multiple services by filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * See Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * for more details about updating a service.\n *\n * The call succeeds even if one or more individual services can't be updated.\n * Information about failures is returned in `bulkActionMetadata`.\n * @param - Filter to identify the services to update.\n */\n (\n filter: Record<string, any>,\n options: NonNullablePaths<BulkUpdateServicesByFilterOptions, `service`, 2>\n ): Promise<NonNullablePaths<BulkUpdateServicesByFilterResponse, `jobId`, 2>>;\n}\n\nexport function deleteService(httpClient: HttpClient): DeleteServiceSignature {\n return (serviceId: string, options?: DeleteServiceOptions) =>\n universalDeleteService(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteServiceSignature {\n /**\n * Deletes a service.\n *\n *\n * Specify `{\"preserveFutureSessionsWithParticipants\": true}` to retain all\n * future sessions for the service. By default, all future sessions are canceled.\n * @param - ID of the service to delete.\n * @param - Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.\n */\n (serviceId: string, options?: DeleteServiceOptions): Promise<void>;\n}\n\nexport function bulkDeleteServices(\n httpClient: HttpClient\n): BulkDeleteServicesSignature {\n return (ids: string[], options?: BulkDeleteServicesOptions) =>\n universalBulkDeleteServices(\n ids,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteServicesSignature {\n /**\n * Deletes multiple services.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n * @param - IDs of the services to delete.\n */\n (ids: string[], options?: BulkDeleteServicesOptions): Promise<\n NonNullablePaths<\n BulkDeleteServicesResponse,\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 | `results.${number}.item.type`\n | `results.${number}.item.category._id`\n | `results.${number}.item.form._id`\n | `results.${number}.item.payment.rateType`\n | `results.${number}.item.payment.addOnOption`\n | `results.${number}.item.bookingPolicy._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkDeleteServicesByFilter(\n httpClient: HttpClient\n): BulkDeleteServicesByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkDeleteServicesByFilterOptions\n ) =>\n universalBulkDeleteServicesByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteServicesByFilterSignature {\n /**\n * Deletes multiple services by filter.\n *\n *\n * See Delete Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))\n * for more details about deleting a service.\n *\n * The call succeeds even if one or more individual services can't be deleted.\n * Information about failures is returned in `bulkActionMetadata`.\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n * @param - Filter to identify the services that need to be deleted.\n */\n (\n filter: Record<string, any>,\n options?: BulkDeleteServicesByFilterOptions\n ): Promise<NonNullablePaths<BulkDeleteServicesByFilterResponse, `jobId`, 2>>;\n}\n\nexport function queryServices(httpClient: HttpClient): QueryServicesSignature {\n return () =>\n universalQueryServices(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryServicesSignature {\n /**\n * Creates a query to retrieve a list of `service` objects.\n *\n * The `queryServices()` function builds a query to retrieve a list of `service` objects and returns a `ServicesQueryBuilder` 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/services/services-query-builder/find) function.\n *\n * You can refine the query by chaining `ServicesQueryBuilder` functions onto the query. `ServicesQueryBuilder` functions enable you to sort, filter, and control the results that `queryServices()` returns.\n *\n * `queryServices()` runs with the following `ServicesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `100`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryServices()` are applied in the order they are called. For example, if you apply `ascending(\"category.name\")` and then `ascending(\"name\")`, the results are sorted first by `category.name`, and then, if there are multiple results with the same `category.name`, the items are sorted by `name`.\n *\n * The following `ServicesQueryBuilder` functions are supported for the `queryServices()` function. For a full description of the `service` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/services-query-result/items) property in `ServicesQueryResult`.\n */\n (): ServicesQueryBuilder;\n}\n\nexport function searchServices(\n httpClient: HttpClient\n): SearchServicesSignature {\n return (search: ServiceSearch) =>\n universalSearchServices(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchServicesSignature {\n /**\n * Retrieves a list of up to 100 services, given the provided filtering, paging,\n * and sorting.\n *\n *\n * ### Defaults\n *\n * Search Services has the following default settings, which you can override:\n * + Sorted by `createdDate` in ascending order.\n * + `paging.limit` set to `100`.\n * + `paging.offset` set to `0`.\n *\n * ### Filters\n *\n * When using filters for dates, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting))\n * for a complete list of supported filters and sorting options.\n *\n * ### See also\n *\n * To learn about working with Search methods, see API Query Language\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language))\n * and Sorting and Paging\n * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)).\n * @param - Search criteria including filter, sort, aggregations, and paging options.\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting)) for complete filter and sorting options.\n */\n (search: ServiceSearch): Promise<\n NonNullablePaths<\n SearchServicesResponse,\n | `services`\n | `services.${number}.type`\n | `services.${number}.category._id`\n | `services.${number}.form._id`\n | `services.${number}.payment.rateType`\n | `services.${number}.payment.addOnOption`\n | `services.${number}.bookingPolicy._id`\n | `services.${number}.bookingPolicy.customPolicyDescription.enabled`\n | `services.${number}.bookingPolicy.customPolicyDescription.description`\n | `services.${number}.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `services.${number}.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `services.${number}.bookingPolicy.limitLateBookingPolicy.enabled`\n | `services.${number}.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `services.${number}.bookingPolicy.bookAfterStartPolicy.enabled`\n | `services.${number}.bookingPolicy.cancellationPolicy.enabled`\n | `services.${number}.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `services.${number}.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `services.${number}.bookingPolicy.reschedulePolicy.enabled`\n | `services.${number}.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `services.${number}.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `services.${number}.bookingPolicy.waitlistPolicy.enabled`\n | `services.${number}.bookingPolicy.waitlistPolicy.capacity`\n | `services.${number}.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `services.${number}.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `services.${number}.bookingPolicy.resourcesPolicy.enabled`\n | `services.${number}.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `services.${number}.bookingPolicy.cancellationFeePolicy.enabled`\n | `services.${number}.bookingPolicy.saveCreditCardPolicy.enabled`\n | `services.${number}.schedule.availabilityConstraints.timeBetweenSessions`\n | `services.${number}.seoData.settings.preventAutoRedirect`\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 6\n >\n >;\n}\n\nexport function queryPolicies(httpClient: HttpClient): QueryPoliciesSignature {\n return (query: CursorQuery) =>\n universalQueryPolicies(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoliciesSignature {\n /**\n * Retrieves a list of up to 100 booking policies\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n * ### Defaults\n *\n * Query Policies has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Booking Policies API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * those services is returned. The `bookingPolicies.totalServiceCount` values\n * indicate the total number of services linked to each policy. You can call Search Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))\n * and specify the relevant policy ID in the filter to retrieve all services\n * connected to the booking policy.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @param - Information about filters, paging, and sorting. See the article about\n * booking policy filters\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))\n * for all supported filters and sorting options.\n */\n (query: CursorQuery): Promise<\n NonNullablePaths<\n QueryPoliciesResponse,\n | `bookingPolicies`\n | `bookingPolicies.${number}.bookingPolicy._id`\n | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.description`\n | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicies.${number}.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `bookingPolicies.${number}.bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicies.${number}.bookingPolicy.saveCreditCardPolicy.enabled`\n | `bookingPolicies.${number}.totalServiceCount`,\n 6\n >\n >;\n}\n\nexport function queryBookingForms(\n httpClient: HttpClient\n): QueryBookingFormsSignature {\n return (query: CursorQuery, options?: QueryBookingFormsOptions) =>\n universalQueryBookingForms(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryBookingFormsSignature {\n /**\n * Retrieves a list of up to 100 booking forms\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)),\n * and information about the services that are connected to them,\n * given the provided filtering, paging, and sorting.\n *\n *\n * ### Defaults\n *\n * Query Booking Forms has the following default settings, which you can override:\n *\n * + Sorted by `id` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to Forms API: Supported Filters\n * ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### Returned services\n *\n * If a booking policy is connected to more than 5 services, only a subset of\n * these service IDs and names is returned. The `bookingForms.totalServiceCount`\n * values indicate the total number of services linked to each form. You can call Query Services\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/query-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/query-services))\n * and specify the relevant form ID in the filter to retrieve all services\n * connected to the booking form.\n *\n * ### Default booking forms\n *\n * By default, all Wix Bookings services use a standard booking form. To retrieve\n * a site's default booking form with Query Booking Forms, specify\n * `{\"conditionalFields\": [\"DEFAULT_BOOKING_FORM\"]}`.\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n * @param - Information about filters, paging, and sorting. See the article about\n * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))\n * for all supported filters and sorting options.\n */\n (query: CursorQuery, options?: QueryBookingFormsOptions): Promise<\n NonNullablePaths<\n QueryBookingFormsResponse,\n | `bookingForms`\n | `bookingForms.${number}.formDetails.formId`\n | `bookingForms.${number}.totalServiceCount`\n | `defaultBookingForm.formDetails.formId`\n | `defaultBookingForm.connectedServices`\n | `defaultBookingForm.totalServiceCount`,\n 5\n > & {\n __applicationErrorsType?: QueryBookingFormsApplicationErrors;\n }\n >;\n}\n\nexport function countServices(httpClient: HttpClient): CountServicesSignature {\n return (options?: CountServicesOptions) =>\n universalCountServices(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountServicesSignature {\n /**\n * Counts how many services match the given filter.\n *\n *\n * Refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))\n * for more details.\n *\n * To learn about working with filters in general, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)\n */\n (options?: CountServicesOptions): Promise<\n NonNullablePaths<CountServicesResponse, `count`, 2>\n >;\n}\n\nexport function queryLocations(\n httpClient: HttpClient\n): QueryLocationsSignature {\n return (options?: QueryLocationsOptions) =>\n universalQueryLocations(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLocationsSignature {\n /**\n * Retrieves 3 separate lists of business, custom, and customer locations\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 * given the provided filtering, and whether each location is connected to at\n * least one of the site's services.\n *\n *\n * ### Defaults\n *\n * Query Locations has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the `location` object\n * ([REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\n (options?: QueryLocationsOptions): Promise<\n NonNullablePaths<\n QueryLocationsResponse,\n | `businessLocations.exists`\n | `businessLocations.locations`\n | `businessLocations.locations.${number}.business._id`\n | `businessLocations.locations.${number}.business.name`\n | `businessLocations.locations.${number}.custom._id`\n | `businessLocations.locations.${number}._id`\n | `businessLocations.locations.${number}.type`\n | `customLocations.exists`\n | `customerLocations.exists`,\n 6\n >\n >;\n}\n\nexport function queryCategories(\n httpClient: HttpClient\n): QueryCategoriesSignature {\n return (options?: QueryCategoriesOptions) =>\n universalQueryCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryCategoriesSignature {\n /**\n * Retrieves a list of service categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)), given the provided filtering.\n *\n *\n * ### Defaults\n *\n * Query Categories has the following default setting, which you can't override:\n * Sorted by `id` in ascending order.\n *\n * ### Filters\n *\n * For a complete list of supported filters, refer to the supported filters article\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)).\n *\n * When using date filters, you must use\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n *\n * ### See also\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).\n */\n (options?: QueryCategoriesOptions): Promise<\n NonNullablePaths<\n QueryCategoriesResponse,\n `categories` | `categories.${number}._id`,\n 4\n >\n >;\n}\n\nexport function setServiceLocations(\n httpClient: HttpClient\n): SetServiceLocationsSignature {\n return (\n serviceId: string,\n locations: Location[],\n options?: SetServiceLocationsOptions\n ) =>\n universalSetServiceLocations(\n serviceId,\n locations,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetServiceLocationsSignature {\n /**\n * Replaces the list of the locations\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 * where the business offers the service.\n *\n *\n * ### Consequences for customers\n *\n * Removing a service location may impact existing sessions and their\n * participants. If you remove at least one service location, you must\n * specify `removedLocationSessionsAction` to indicate what happens to all\n * future sessions scheduled at this location.\n *\n * - **Keep existing location**: If you want to retain future sessions at their\n * originally scheduled location, specify\n * `{\"removedLocationSessionsAction.action\": \"KEEP_AT_CURRENT_LOCATION\"}`.\n * This ensures nothing changes for the customer, but the business must be\n * able to provide access to the removed location in the future.\n * - **Update location**: If you want to update the location for future sessions\n * scheduled at the removed location, specify\n * `{\"removedLocationSessionsAction.action\": \"MOVE_TO_LOCATION\"}` and\n * `moveToLocationOptions.newLocation`.\n *\n * You can't mix and match to keep some sessions at the previous location while\n * moving other sessions to an updated location.\n *\n * Past session details aren't changed, no matter which option you choose for\n * future sessions.\n *\n * Future sessions scheduled for a location defined by the customer are also not\n * updated.\n *\n * ### Specify location details\n *\n * Depending on whether the new or updated location is a business or custom location,\n * you need to specify different fields.\n *\n * - **Business location**: Specify the relevant location ID\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 * in `locations.business.id`.\n * - **Custom location**: Specify the complete address object as\n * `locations.custom.address`.\n *\n * ### Participant notifications\n *\n * You can specify a `participantNotification.message` that's immediately send\n * to all customers who had booked at a changed location. Ensure\n * `participantNotification.notifyParticipants` is set to `true` to send the\n * message.\n * @param - ID of the service.\n * @param - List of locations replacing existing service locations. Omitting an existing location removes it from the service. Specify `removedLocationSessionsAction` to determine the handling of future sessions scheduled at that location.\n */\n (\n serviceId: string,\n locations: Location[],\n options?: SetServiceLocationsOptions\n ): Promise<\n NonNullablePaths<\n SetServiceLocationsResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n >\n >;\n}\n\nexport function enablePricingPlansForService(\n httpClient: HttpClient\n): EnablePricingPlansForServiceSignature {\n return (serviceId: string, pricingPlanIds: string[]) =>\n universalEnablePricingPlansForService(\n serviceId,\n pricingPlanIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EnablePricingPlansForServiceSignature {\n /**\n * Adds a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to a service's `payment.pricingPlanIds` array.\n *\n *\n * The call doesn't validate whether the service's `payment.options.pricingPlan`\n * is set to `true`. If it's set to `false`, customers aren't able to pay\n * for their bookings using pricing plans. You can call Update Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))\n * to change a service's supported payment methods.\n * @param - ID of the service to update.\n * @param - IDs of the pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * to add to the service's `payment.pricingPlanIds` array.\n */\n (serviceId: string, pricingPlanIds: string[]): Promise<\n NonNullablePaths<\n EnablePricingPlansForServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: EnablePricingPlansForServiceApplicationErrors;\n }\n >;\n}\n\nexport function disablePricingPlansForService(\n httpClient: HttpClient\n): DisablePricingPlansForServiceSignature {\n return (serviceId: string, options?: DisablePricingPlansForServiceOptions) =>\n universalDisablePricingPlansForService(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DisablePricingPlansForServiceSignature {\n /**\n * Removes a list of pricing plan IDs\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))\n * from a service's `payment.pricingPlanIds` array.\n *\n *\n * If you remove all pricing plan IDs from `payment.pricingPlanIds` and the\n * service supports only payments by pricing plan, customers will no longer be\n * able to book the service, as they will have no payment options available.\n * @param - ID of the service to update.\n */\n (serviceId: string, options?: DisablePricingPlansForServiceOptions): Promise<\n NonNullablePaths<\n DisablePricingPlansForServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: DisablePricingPlansForServiceApplicationErrors;\n }\n >;\n}\n\nexport function setCustomSlug(httpClient: HttpClient): SetCustomSlugSignature {\n return (serviceId: string, options?: SetCustomSlugOptions) =>\n universalSetCustomSlug(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetCustomSlugSignature {\n /**\n * Sets a new active slug for the service.\n *\n *\n * The call fails if at least one of these conditions is met:\n * - The slug doesn't adheres to the supported format.\n * - Another service is currently using the slug.\n * - Another service has used the slug in the past.\n * @param - ID of the service for which to update the active slug.\n */\n (serviceId: string, options?: SetCustomSlugOptions): Promise<\n NonNullablePaths<\n SetCustomSlugResponse,\n | `slug.name`\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`,\n 7\n > & {\n __applicationErrorsType?: SetCustomSlugApplicationErrors;\n __validationErrorsType?: SetCustomSlugValidationErrors;\n }\n >;\n}\n\nexport function validateSlug(httpClient: HttpClient): ValidateSlugSignature {\n return (serviceId: string, options?: ValidateSlugOptions) =>\n universalValidateSlug(\n serviceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ValidateSlugSignature {\n /**\n * Checks whether a custom slug is validate for the service.\n *\n *\n * The checks include:\n * - The slug adheres to the supported format.\n * - No other service is currently using the slug.\n * - No other service has used the slug in the past.\n *\n * The call fails if at least one of the checks fails.\n * @param - IO of the service to check custom slug validity for.\n */\n (serviceId: string, options?: ValidateSlugOptions): Promise<\n NonNullablePaths<ValidateSlugResponse, `valid` | `errors`, 2>\n >;\n}\n\nexport function cloneService(httpClient: HttpClient): CloneServiceSignature {\n return (sourceServiceId: string) =>\n universalCloneService(\n sourceServiceId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CloneServiceSignature {\n /**\n * Clones a service.\n *\n *\n * ### Connected entities\n *\n * By default, not all entities connected to the service are cloned.\n *\n * #### Schedule\n *\n * Wix Bookings automatically creates a new active 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 * for the cloned service. If Wix Bookings can't create this schedule, the\n * Clone Service call fails.\n *\n * - __For appointment-based services__: Future appointments aren't added to the\n * cloned service's schedule. Use the Events API\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 * to add them as needed.\n * - __For classes and courses__: Future one-time events aren't added to the\n * cloned service's schedule, while future recurring events are added\n * asynchronously. The Clone Service call always succeeds, whether or not\n * recurring events are added.\n * If the response includes `RECURRING_EVENTS` in the `errors` array, it means the\n * cloned service doesn't have future recurring events, even though the original\n * service does. You can either delete the cloned service and try again or use\n * the Events API\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 * to add missing events to the schedule.\n *\n * Wix Bookings never adds past events to the cloned service's schedule.\n *\n * #### Service options and variants\n *\n * If the original service has variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),\n * they're cloned asynchronously. The Clone Service call always succeeds,\n * regardless of whether variants were cloned.\n *\n * If the response includes `OPTIONS_AND_VARIANTS` in the `errors` array, the cloned\n * service doesn't have variants, even though the original service does. You can\n * delete the cloned service and call Clone Service again, or use the\n * _Service Options And Variants API_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction))\n * to add variants.\n *\n * #### Booking form\n *\n * The original service's booking form isn't cloned, whether it's\n * the default or a custom booking form.\n *\n * #### Pricing plans\n *\n * If the original service's accepts payments via pricing plans\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/introduction)),\n * the cloned service's `payment.options.pricingPlan` is also set to `true`. To\n * accept specific pricing plans, call Enable Pricing Plans For Service\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/enable-pricing-plans-for-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service)),\n * after cloning the service. If the original service accepts only\n * pricing plan payments and you don't call Enable Pricing Plans For Service\n * after cloning the service, customers will be unable to book the service.\n * @param - ID of the service to clone.\n */\n (sourceServiceId: string): Promise<\n NonNullablePaths<\n CloneServiceResponse,\n | `service.type`\n | `service.media.items`\n | `service.category._id`\n | `service.form._id`\n | `service.payment.fixed.price.value`\n | `service.payment.fixed.price.currency`\n | `service.payment.rateType`\n | `service.payment.pricingPlanIds`\n | `service.payment.addOnOption`\n | `service.locations`\n | `service.locations.${number}.business._id`\n | `service.locations.${number}.business.name`\n | `service.locations.${number}.custom._id`\n | `service.locations.${number}._id`\n | `service.locations.${number}.type`\n | `service.bookingPolicy._id`\n | `service.bookingPolicy.customPolicyDescription.enabled`\n | `service.bookingPolicy.customPolicyDescription.description`\n | `service.bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `service.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `service.bookingPolicy.limitLateBookingPolicy.enabled`\n | `service.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `service.bookingPolicy.bookAfterStartPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.enabled`\n | `service.bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `service.bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `service.bookingPolicy.reschedulePolicy.enabled`\n | `service.bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `service.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `service.bookingPolicy.waitlistPolicy.enabled`\n | `service.bookingPolicy.waitlistPolicy.capacity`\n | `service.bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `service.bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `service.bookingPolicy.resourcesPolicy.enabled`\n | `service.bookingPolicy.resourcesPolicy.autoAssignAllowed`\n | `service.bookingPolicy.cancellationFeePolicy.enabled`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `service.bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `service.bookingPolicy.saveCreditCardPolicy.enabled`\n | `service.schedule.availabilityConstraints.durations`\n | `service.schedule.availabilityConstraints.durations.${number}.minutes`\n | `service.schedule.availabilityConstraints.sessionDurations`\n | `service.schedule.availabilityConstraints.timeBetweenSessions`\n | `service.staffMemberIds`\n | `service.serviceResources`\n | `service.supportedSlugs`\n | `service.supportedSlugs.${number}.name`\n | `service.seoData.tags`\n | `service.seoData.tags.${number}.type`\n | `service.seoData.tags.${number}.children`\n | `service.seoData.tags.${number}.custom`\n | `service.seoData.tags.${number}.disabled`\n | `service.seoData.settings.preventAutoRedirect`\n | `service.seoData.settings.keywords`\n | `service.seoData.settings.keywords.${number}.term`\n | `service.seoData.settings.keywords.${number}.isMain`\n | `errors`,\n 7\n >\n >;\n}\n\nexport const onServiceCreated = EventDefinition(\n 'wix.bookings.services.v2.service_created',\n true,\n (event: ServiceCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.bookingPolicy.createdDate' },\n { path: 'entity.bookingPolicy.updatedDate' },\n { path: 'entity.schedule.firstSessionStart' },\n { path: 'entity.schedule.lastSessionEnd' },\n { path: 'entity.supportedSlugs.createdDate' },\n { path: 'entity.mainSlug.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'entity.media.items.image' },\n { path: 'entity.media.mainMedia.image' },\n { path: 'entity.media.coverMedia.image' },\n { path: 'entity.staffMembers.mainMedia.image' },\n { path: 'entity.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.locations.calculatedAddress' },\n { path: 'entity.locations.business.address' },\n { path: 'entity.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'entity.urls.servicePage' },\n { path: 'entity.urls.bookingPage' },\n { path: 'entity.urls.calendarPage' },\n ],\n },\n ])\n )\n)<ServiceCreatedEnvelope>();\nexport const onServiceDeleted = EventDefinition(\n 'wix.bookings.services.v2.service_deleted',\n true,\n (event: ServiceDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.bookingPolicy.createdDate' },\n { path: 'entity.bookingPolicy.updatedDate' },\n { path: 'entity.schedule.firstSessionStart' },\n { path: 'entity.schedule.lastSessionEnd' },\n { path: 'entity.supportedSlugs.createdDate' },\n { path: 'entity.mainSlug.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'entity.media.items.image' },\n { path: 'entity.media.mainMedia.image' },\n { path: 'entity.media.coverMedia.image' },\n { path: 'entity.staffMembers.mainMedia.image' },\n { path: 'entity.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.locations.calculatedAddress' },\n { path: 'entity.locations.business.address' },\n { path: 'entity.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'entity.urls.servicePage' },\n { path: 'entity.urls.bookingPage' },\n { path: 'entity.urls.calendarPage' },\n ],\n },\n ])\n )\n)<ServiceDeletedEnvelope>();\nexport const onServiceUpdated = EventDefinition(\n 'wix.bookings.services.v2.service_updated',\n true,\n (event: ServiceUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.bookingPolicy.createdDate' },\n { path: 'entity.bookingPolicy.updatedDate' },\n { path: 'entity.schedule.firstSessionStart' },\n { path: 'entity.schedule.lastSessionEnd' },\n { path: 'entity.supportedSlugs.createdDate' },\n { path: 'entity.mainSlug.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'entity.media.items.image' },\n { path: 'entity.media.mainMedia.image' },\n { path: 'entity.media.coverMedia.image' },\n { path: 'entity.staffMembers.mainMedia.image' },\n { path: 'entity.staffMemberDetails.staffMembers.mainMedia.image' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.locations.calculatedAddress' },\n { path: 'entity.locations.business.address' },\n { path: 'entity.locations.custom.address' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [\n { path: 'entity.urls.servicePage' },\n { path: 'entity.urls.bookingPage' },\n { path: 'entity.urls.calendarPage' },\n ],\n },\n ])\n )\n)<ServiceUpdatedEnvelope>();\n\nexport {\n Action,\n ActionEvent,\n AddOn,\n AddOnAddOnInfoOneOf,\n AddOnDetails,\n AddOnGroup,\n AddOnGroupDetail,\n AddOnPaymentOptions,\n Address,\n AddressHint,\n AddressLocation,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n AvailabilityConstraints,\n BaseEventMetadata,\n Behavior,\n BehaviorBehaviorOneOf,\n Benefit,\n BenefitNotification,\n BenefitType,\n BookAfterStartPolicy,\n BookingForm,\n BookingPolicy,\n BookingPolicyWithServices,\n BulkActionMetadata,\n BulkCreateServicesOptions,\n BulkCreateServicesRequest,\n BulkCreateServicesResponse,\n BulkDeleteServicesByFilterOptions,\n BulkDeleteServicesByFilterRequest,\n BulkDeleteServicesByFilterResponse,\n BulkDeleteServicesOptions,\n BulkDeleteServicesRequest,\n BulkDeleteServicesResponse,\n BulkServiceResult,\n BulkUpdateServicesByFilterOptions,\n BulkUpdateServicesByFilterRequest,\n BulkUpdateServicesByFilterResponse,\n BulkUpdateServicesOptions,\n BulkUpdateServicesRequest,\n BulkUpdateServicesResponse,\n BusinessLocationOptions,\n BusinessLocations,\n BusinessSchedule,\n CancellationFeePolicy,\n CancellationPolicy,\n CancellationWindow,\n CancellationWindowFeeOneOf,\n Categories,\n Category,\n CategoryNotification,\n CategoryNotificationEvent,\n ChangeContext,\n ChangeContextPayloadOneOf,\n CloneErrors,\n CloneServiceRequest,\n CloneServiceResponse,\n CommonAddress,\n CommonAddressStreetOneOf,\n Conferencing,\n ConnectedService,\n ConsentPolicy,\n CountServicesOptions,\n CountServicesRequest,\n CountServicesResponse,\n CreateAddOnGroupOptions,\n CreateAddOnGroupRequest,\n CreateAddOnGroupResponse,\n CreateServiceRequest,\n CreateServiceResponse,\n CrudType,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n CustomLocationOptions,\n CustomLocations,\n CustomOptions,\n CustomPayment,\n CustomerLocations,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n DayOfWeek,\n Delete,\n DeleteAddOnGroupOptions,\n DeleteAddOnGroupRequest,\n DeleteAddOnGroupResponse,\n DeleteServiceOptions,\n DeleteServiceRequest,\n DeleteServiceResponse,\n DisablePricingPlansForServiceOptions,\n DisablePricingPlansForServiceRequest,\n DisablePricingPlansForServiceResponse,\n Discount,\n DiscountDiscountOneOf,\n DomainEvent,\n DomainEventBodyOneOf,\n Duration,\n Empty,\n EnablePricingPlansForServiceRequest,\n EnablePricingPlansForServiceResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EntryPass,\n Event,\n EventMetadata,\n ExtendedFields,\n FieldViolation,\n FixedPayment,\n Form,\n FormDetails,\n FormSettings,\n GeoCoordinates,\n GetServiceAvailabilityConstraintsRequest,\n GetServiceAvailabilityConstraintsResponse,\n GetServiceRequest,\n GetServiceResponse,\n GroupByAggregation,\n GroupByAggregationKindOneOf,\n GroupByValueResults,\n HtmlSitePublished,\n IdentificationData,\n IdentificationDataIdOneOf,\n IncludeMissingValuesOptions,\n Interval,\n InvalidPricingPlan,\n InvalidSlugError,\n ItemMetadata,\n Keyword,\n LimitEarlyBookingPolicy,\n LimitLateBookingPolicy,\n ListAddOnGroupsByServiceIdOptions,\n ListAddOnGroupsByServiceIdRequest,\n ListAddOnGroupsByServiceIdResponse,\n Locale,\n Location,\n LocationOptionsOneOf,\n LocationType,\n MaskedService,\n Media,\n MediaItem,\n MediaItemItemOneOf,\n MessageEnvelope,\n MissingValues,\n Mode,\n Money,\n MoveToNewLocationsOptions,\n Multilingual,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NestedValueAggregationResult,\n OnlineBooking,\n Page,\n Paging,\n PagingMetadataV2,\n ParticipantNotification,\n ParticipantsPolicy,\n Payment,\n PaymentOptions,\n PaymentRateOneOf,\n PlacementType,\n PolicyDescription,\n Properties,\n PropertiesChange,\n QueryBookingFormsOptions,\n QueryBookingFormsRequest,\n QueryBookingFormsResponse,\n QueryCategoriesFilter,\n QueryCategoriesOptions,\n QueryCategoriesRequest,\n QueryCategoriesResponse,\n QueryLocationsFilter,\n QueryLocationsOptions,\n QueryLocationsRequest,\n QueryLocationsResponse,\n QueryPoliciesRequest,\n QueryPoliciesResponse,\n QueryServicesMultiLanguageRequest,\n QueryServicesMultiLanguageResponse,\n QueryServicesRequest,\n QueryServicesResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n RankingOptions,\n RankingOrder,\n RateType,\n ReindexMessage,\n ReindexMessageActionOneOf,\n RemovedLocationSessionsAction,\n RemovedLocationSessionsActionActionOptionsOneOf,\n RequestedFields,\n ReschedulePolicy,\n ResolutionMethod,\n ResourceGroup,\n ResourceIds,\n ResourceType,\n ResourcesPolicy,\n RestoreInfo,\n Results,\n SaveCreditCardPolicy,\n ScalarAggregation,\n ScalarResult,\n ScalarType,\n Schedule,\n Schema,\n SearchDetails,\n SearchServicesRequest,\n SearchServicesResponse,\n SeoSchema,\n Service,\n ServiceAvailabilityConstraints,\n ServiceCreatedEnvelope,\n ServiceDeletedEnvelope,\n ServiceResource,\n ServiceResourceSelectionOneOf,\n ServiceSearchSpec,\n ServiceType,\n ServiceUpdatedEnvelope,\n ServicesQueryBuilder,\n ServicesQueryResult,\n ServicesUrlsChanged,\n SetAddOnsForGroupOptions,\n SetAddOnsForGroupRequest,\n SetAddOnsForGroupResponse,\n SetCustomSlugEvent,\n SetCustomSlugOptions,\n SetCustomSlugRequest,\n SetCustomSlugResponse,\n SetServiceLocationsOptions,\n SetServiceLocationsRequest,\n SetServiceLocationsResponse,\n Settings,\n SiteCloned,\n SiteCreated,\n SitePropertiesEvent,\n SitePropertiesNotification,\n Slug,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n SortingMethodType,\n SpecialHourPeriod,\n SplitInterval,\n StaffMediaItem,\n StaffMediaItemItemOneOf,\n StaffMember,\n StaffMemberDetails,\n StaffSortingPolicy,\n StaffSortingPolicyOptionsOneOf,\n Status,\n StreetAddress,\n SupportedLanguage,\n Tag,\n TimePeriod,\n Translation,\n URLs,\n UpdateAddOnGroupOptions,\n UpdateAddOnGroupRequest,\n UpdateAddOnGroupResponse,\n UpdateService,\n UpdateServiceRequest,\n UpdateServiceResponse,\n Upsert,\n UserDomainInfoChangedEvent,\n V2Category,\n V2RequestedFields,\n ValidateServiceRequest,\n ValidateServiceResponse,\n ValidateSlugOptions,\n ValidateSlugRequest,\n ValidateSlugResponse,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n VariedPayment,\n WaitlistPolicy,\n WebhookIdentityType,\n} from './bookings-services-v2-service-services.universal.js';\n","import {\n createAddOnGroup as publicCreateAddOnGroup,\n deleteAddOnGroup as publicDeleteAddOnGroup,\n updateAddOnGroup as publicUpdateAddOnGroup,\n listAddOnGroupsByServiceId as publicListAddOnGroupsByServiceId,\n setAddOnsForGroup as publicSetAddOnsForGroup,\n createService as publicCreateService,\n bulkCreateServices as publicBulkCreateServices,\n getService as publicGetService,\n updateService as publicUpdateService,\n bulkUpdateServices as publicBulkUpdateServices,\n bulkUpdateServicesByFilter as publicBulkUpdateServicesByFilter,\n deleteService as publicDeleteService,\n bulkDeleteServices as publicBulkDeleteServices,\n bulkDeleteServicesByFilter as publicBulkDeleteServicesByFilter,\n queryServices as publicQueryServices,\n searchServices as publicSearchServices,\n queryPolicies as publicQueryPolicies,\n queryBookingForms as publicQueryBookingForms,\n countServices as publicCountServices,\n queryLocations as publicQueryLocations,\n queryCategories as publicQueryCategories,\n setServiceLocations as publicSetServiceLocations,\n enablePricingPlansForService as publicEnablePricingPlansForService,\n disablePricingPlansForService as publicDisablePricingPlansForService,\n setCustomSlug as publicSetCustomSlug,\n validateSlug as publicValidateSlug,\n cloneService as publicCloneService,\n} from './bookings-services-v2-service-services.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 { onServiceCreated as publicOnServiceCreated } from './bookings-services-v2-service-services.public.js';\nimport { onServiceDeleted as publicOnServiceDeleted } from './bookings-services-v2-service-services.public.js';\nimport { onServiceUpdated as publicOnServiceUpdated } from './bookings-services-v2-service-services.public.js';\n\nexport const createAddOnGroup: MaybeContext<\n BuildRESTFunction<typeof publicCreateAddOnGroup> &\n typeof publicCreateAddOnGroup\n> = /*#__PURE__*/ createRESTModule(publicCreateAddOnGroup);\nexport const deleteAddOnGroup: MaybeContext<\n BuildRESTFunction<typeof publicDeleteAddOnGroup> &\n typeof publicDeleteAddOnGroup\n> = /*#__PURE__*/ createRESTModule(publicDeleteAddOnGroup);\nexport const updateAddOnGroup: MaybeContext<\n BuildRESTFunction<typeof publicUpdateAddOnGroup> &\n typeof publicUpdateAddOnGroup\n> = /*#__PURE__*/ createRESTModule(publicUpdateAddOnGroup);\nexport const listAddOnGroupsByServiceId: MaybeContext<\n BuildRESTFunction<typeof publicListAddOnGroupsByServiceId> &\n typeof publicListAddOnGroupsByServiceId\n> = /*#__PURE__*/ createRESTModule(publicListAddOnGroupsByServiceId);\nexport const setAddOnsForGroup: MaybeContext<\n BuildRESTFunction<typeof publicSetAddOnsForGroup> &\n typeof publicSetAddOnsForGroup\n> = /*#__PURE__*/ createRESTModule(publicSetAddOnsForGroup);\nexport const createService: MaybeContext<\n BuildRESTFunction<typeof publicCreateService> & typeof publicCreateService\n> = /*#__PURE__*/ createRESTModule(publicCreateService);\nexport const bulkCreateServices: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateServices> &\n typeof publicBulkCreateServices\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateServices);\nexport const getService: MaybeContext<\n BuildRESTFunction<typeof publicGetService> & typeof publicGetService\n> = /*#__PURE__*/ createRESTModule(publicGetService);\nexport const updateService: MaybeContext<\n BuildRESTFunction<typeof publicUpdateService> & typeof publicUpdateService\n> = /*#__PURE__*/ createRESTModule(publicUpdateService);\nexport const bulkUpdateServices: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateServices> &\n typeof publicBulkUpdateServices\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateServices);\nexport const bulkUpdateServicesByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateServicesByFilter> &\n typeof publicBulkUpdateServicesByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateServicesByFilter);\nexport const deleteService: MaybeContext<\n BuildRESTFunction<typeof publicDeleteService> & typeof publicDeleteService\n> = /*#__PURE__*/ createRESTModule(publicDeleteService);\nexport const bulkDeleteServices: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteServices> &\n typeof publicBulkDeleteServices\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteServices);\nexport const bulkDeleteServicesByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteServicesByFilter> &\n typeof publicBulkDeleteServicesByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteServicesByFilter);\nexport const queryServices: MaybeContext<\n BuildRESTFunction<typeof publicQueryServices> & typeof publicQueryServices\n> = /*#__PURE__*/ createRESTModule(publicQueryServices);\nexport const searchServices: MaybeContext<\n BuildRESTFunction<typeof publicSearchServices> & typeof publicSearchServices\n> = /*#__PURE__*/ createRESTModule(publicSearchServices);\nexport const queryPolicies: MaybeContext<\n BuildRESTFunction<typeof publicQueryPolicies> & typeof publicQueryPolicies\n> = /*#__PURE__*/ createRESTModule(publicQueryPolicies);\nexport const queryBookingForms: MaybeContext<\n BuildRESTFunction<typeof publicQueryBookingForms> &\n typeof publicQueryBookingForms\n> = /*#__PURE__*/ createRESTModule(publicQueryBookingForms);\nexport const countServices: MaybeContext<\n BuildRESTFunction<typeof publicCountServices> & typeof publicCountServices\n> = /*#__PURE__*/ createRESTModule(publicCountServices);\nexport const queryLocations: MaybeContext<\n BuildRESTFunction<typeof publicQueryLocations> & typeof publicQueryLocations\n> = /*#__PURE__*/ createRESTModule(publicQueryLocations);\nexport const queryCategories: MaybeContext<\n BuildRESTFunction<typeof publicQueryCategories> & typeof publicQueryCategories\n> = /*#__PURE__*/ createRESTModule(publicQueryCategories);\nexport const setServiceLocations: MaybeContext<\n BuildRESTFunction<typeof publicSetServiceLocations> &\n typeof publicSetServiceLocations\n> = /*#__PURE__*/ createRESTModule(publicSetServiceLocations);\nexport const enablePricingPlansForService: MaybeContext<\n BuildRESTFunction<typeof publicEnablePricingPlansForService> &\n typeof publicEnablePricingPlansForService\n> = /*#__PURE__*/ createRESTModule(publicEnablePricingPlansForService);\nexport const disablePricingPlansForService: MaybeContext<\n BuildRESTFunction<typeof publicDisablePricingPlansForService> &\n typeof publicDisablePricingPlansForService\n> = /*#__PURE__*/ createRESTModule(publicDisablePricingPlansForService);\nexport const setCustomSlug: MaybeContext<\n BuildRESTFunction<typeof publicSetCustomSlug> & typeof publicSetCustomSlug\n> = /*#__PURE__*/ createRESTModule(publicSetCustomSlug);\nexport const validateSlug: MaybeContext<\n BuildRESTFunction<typeof publicValidateSlug> & typeof publicValidateSlug\n> = /*#__PURE__*/ createRESTModule(publicValidateSlug);\nexport const cloneService: MaybeContext<\n BuildRESTFunction<typeof publicCloneService> & typeof publicCloneService\n> = /*#__PURE__*/ createRESTModule(publicCloneService);\n/**\n * Triggered when a service is created.\n */\nexport const onServiceCreated: BuildEventDefinition<\n typeof publicOnServiceCreated\n> &\n typeof publicOnServiceCreated = createEventModule(publicOnServiceCreated);\n/**\n * Triggered when a service is deleted.\n */\nexport const onServiceDeleted: BuildEventDefinition<\n typeof publicOnServiceDeleted\n> &\n typeof publicOnServiceDeleted = createEventModule(publicOnServiceDeleted);\n/**\n * Triggered when a service is updated.\n */\nexport const onServiceUpdated: BuildEventDefinition<\n typeof publicOnServiceUpdated\n> &\n typeof publicOnServiceUpdated = createEventModule(publicOnServiceUpdated);\n\nexport {\n ServiceType,\n RateType,\n AddOnPaymentOptions,\n LocationType,\n RankingOrder,\n SortingMethodType,\n WebhookIdentityType,\n V2RequestedFields,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n Mode,\n RequestedFields,\n Action,\n InvalidSlugError,\n CloneErrors,\n Status,\n CategoryNotificationEvent,\n BenefitType,\n Event,\n CrudType,\n PlacementType,\n DayOfWeek,\n ResolutionMethod,\n} from './bookings-services-v2-service-services.universal.js';\nexport {\n Service,\n Media,\n MediaItem,\n MediaItemItemOneOf,\n V2Category,\n Form,\n FormSettings,\n Payment,\n PaymentRateOneOf,\n FixedPayment,\n Money,\n CustomPayment,\n VariedPayment,\n PaymentOptions,\n OnlineBooking,\n Conferencing,\n Location,\n LocationOptionsOneOf,\n CommonAddress,\n CommonAddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n BusinessLocationOptions,\n CustomLocationOptions,\n BookingPolicy,\n PolicyDescription,\n LimitEarlyBookingPolicy,\n LimitLateBookingPolicy,\n BookAfterStartPolicy,\n CancellationPolicy,\n ReschedulePolicy,\n WaitlistPolicy,\n ParticipantsPolicy,\n ResourcesPolicy,\n CancellationFeePolicy,\n CancellationWindow,\n CancellationWindowFeeOneOf,\n SaveCreditCardPolicy,\n StaffSortingPolicy,\n StaffSortingPolicyOptionsOneOf,\n RankingOptions,\n CustomOptions,\n Schedule,\n AvailabilityConstraints,\n Duration,\n StaffMember,\n StaffMediaItem,\n StaffMediaItemItemOneOf,\n StaffMemberDetails,\n ResourceGroup,\n ResourceIds,\n ServiceResource,\n ServiceResourceSelectionOneOf,\n ResourceType,\n Slug,\n URLs,\n ExtendedFields,\n SeoSchema,\n Keyword,\n Tag,\n Settings,\n AddOnGroup,\n AddOnDetails,\n ReindexMessage,\n ReindexMessageActionOneOf,\n Upsert,\n Delete,\n Schema,\n SetCustomSlugEvent,\n ServicesUrlsChanged,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n CreateAddOnGroupRequest,\n CreateAddOnGroupResponse,\n DeleteAddOnGroupRequest,\n DeleteAddOnGroupResponse,\n UpdateAddOnGroupRequest,\n UpdateAddOnGroupResponse,\n ListAddOnGroupsByServiceIdRequest,\n ListAddOnGroupsByServiceIdResponse,\n AddOn,\n AddOnAddOnInfoOneOf,\n AddOnGroupDetail,\n SetAddOnsForGroupRequest,\n SetAddOnsForGroupResponse,\n CreateServiceRequest,\n CreateServiceResponse,\n ValidateServiceRequest,\n ValidateServiceResponse,\n FieldViolation,\n BulkCreateServicesRequest,\n BulkCreateServicesResponse,\n BulkServiceResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n GetServiceRequest,\n GetServiceResponse,\n GetServiceAvailabilityConstraintsRequest,\n GetServiceAvailabilityConstraintsResponse,\n ServiceAvailabilityConstraints,\n SplitInterval,\n UpdateServiceRequest,\n UpdateServiceResponse,\n BulkUpdateServicesRequest,\n MaskedService,\n BulkUpdateServicesResponse,\n BulkUpdateServicesByFilterRequest,\n BulkUpdateServicesByFilterResponse,\n DeleteServiceRequest,\n ParticipantNotification,\n DeleteServiceResponse,\n BulkDeleteServicesRequest,\n BulkDeleteServicesResponse,\n BulkDeleteServicesByFilterRequest,\n BulkDeleteServicesByFilterResponse,\n QueryServicesRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryServicesResponse,\n PagingMetadataV2,\n Cursors,\n SearchServicesRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\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 SearchServicesResponse,\n CursorPagingMetadata,\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 QueryPoliciesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n QueryPoliciesResponse,\n BookingPolicyWithServices,\n QueryBookingFormsRequest,\n QueryBookingFormsResponse,\n BookingForm,\n FormDetails,\n ConnectedService,\n CountServicesRequest,\n CountServicesResponse,\n QueryLocationsRequest,\n QueryLocationsFilter,\n QueryLocationsResponse,\n BusinessLocations,\n CustomLocations,\n CustomerLocations,\n QueryCategoriesRequest,\n QueryCategoriesFilter,\n QueryCategoriesResponse,\n QueryServicesMultiLanguageRequest,\n QueryServicesMultiLanguageResponse,\n SetServiceLocationsRequest,\n RemovedLocationSessionsAction,\n RemovedLocationSessionsActionActionOptionsOneOf,\n MoveToNewLocationsOptions,\n SetServiceLocationsResponse,\n EnablePricingPlansForServiceRequest,\n EnablePricingPlansForServiceResponse,\n InvalidPricingPlan,\n DisablePricingPlansForServiceRequest,\n DisablePricingPlansForServiceResponse,\n SetCustomSlugRequest,\n SetCustomSlugResponse,\n ValidateSlugRequest,\n ValidateSlugResponse,\n CloneServiceRequest,\n CloneServiceResponse,\n CategoryNotification,\n Category,\n Empty,\n BenefitNotification,\n Benefit,\n EntryPass,\n Discount,\n DiscountDiscountOneOf,\n Behavior,\n BehaviorBehaviorOneOf,\n UserDomainInfoChangedEvent,\n HtmlSitePublished,\n Page,\n SitePropertiesNotification,\n SitePropertiesEvent,\n Properties,\n Categories,\n Locale,\n Address,\n AddressHint,\n GeoCoordinates,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Multilingual,\n SupportedLanguage,\n ConsentPolicy,\n Translation,\n ChangeContext,\n ChangeContextPayloadOneOf,\n PropertiesChange,\n SiteCreated,\n SiteCloned,\n BaseEventMetadata,\n EventMetadata,\n ServiceCreatedEnvelope,\n ServiceDeletedEnvelope,\n ServiceUpdatedEnvelope,\n CreateAddOnGroupOptions,\n DeleteAddOnGroupOptions,\n UpdateAddOnGroupOptions,\n ListAddOnGroupsByServiceIdOptions,\n SetAddOnsForGroupOptions,\n BulkCreateServicesOptions,\n UpdateService,\n BulkUpdateServicesOptions,\n BulkUpdateServicesByFilterOptions,\n DeleteServiceOptions,\n BulkDeleteServicesOptions,\n BulkDeleteServicesByFilterOptions,\n ServicesQueryResult,\n ServicesQueryBuilder,\n ServiceSearchSpec,\n QueryBookingFormsOptions,\n CountServicesOptions,\n QueryLocationsOptions,\n QueryCategoriesOptions,\n SetServiceLocationsOptions,\n DisablePricingPlansForServiceOptions,\n SetCustomSlugOptions,\n ValidateSlugOptions,\n} from './bookings-services-v2-service-services.universal.js';\nexport {\n ServiceTypeWithLiterals,\n RateTypeWithLiterals,\n AddOnPaymentOptionsWithLiterals,\n LocationTypeWithLiterals,\n RankingOrderWithLiterals,\n SortingMethodTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n V2RequestedFieldsWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n ModeWithLiterals,\n RequestedFieldsWithLiterals,\n ActionWithLiterals,\n InvalidSlugErrorWithLiterals,\n CloneErrorsWithLiterals,\n StatusWithLiterals,\n CategoryNotificationEventWithLiterals,\n BenefitTypeWithLiterals,\n EventWithLiterals,\n CrudTypeWithLiterals,\n PlacementTypeWithLiterals,\n DayOfWeekWithLiterals,\n ResolutionMethodWithLiterals,\n DeleteAddOnGroupApplicationErrors,\n UpdateAddOnGroupApplicationErrors,\n SetAddOnsForGroupApplicationErrors,\n CreateServiceValidationErrors,\n UpdateServiceValidationErrors,\n QueryBookingFormsApplicationErrors,\n EnablePricingPlansForServiceApplicationErrors,\n DisablePricingPlansForServiceApplicationErrors,\n SetCustomSlugApplicationErrors,\n SetCustomSlugValidationErrors,\n CommonSearchWithEntityContext,\n ServiceSearch,\n} from './bookings-services-v2-service-services.universal.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\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 AssignCustomScheduleOptions,\n AssignCustomScheduleResponse,\n AssignWorkingHoursScheduleOptions,\n AssignWorkingHoursScheduleResponse,\n BulkUpdateStaffMemberTagsByFilterOptions,\n BulkUpdateStaffMemberTagsByFilterResponse,\n BulkUpdateStaffMemberTagsOptions,\n BulkUpdateStaffMemberTagsResponse,\n ConnectStaffMemberToUserOptions,\n ConnectStaffMemberToUserResponse,\n CountStaffMembersOptions,\n CountStaffMembersResponse,\n CreateStaffMemberOptions,\n DisconnectStaffMemberFromUserOptions,\n DisconnectStaffMemberFromUserResponse,\n GetDeletedStaffMemberOptions,\n GetDeletedStaffMemberResponse,\n GetStaffMemberOptions,\n ListDeletedStaffMembersOptions,\n ListDeletedStaffMembersResponse,\n QueryStaffMembersOptions,\n SearchStaffMembersOptions,\n SearchStaffMembersResponse,\n StaffMember,\n StaffMemberConnectedToUserEnvelope,\n StaffMemberCreatedEnvelope,\n StaffMemberDeletedEnvelope,\n StaffMemberDisconnectedFromUserEnvelope,\n StaffMemberFullyCreatedEnvelope,\n StaffMemberSearch,\n StaffMemberUpdatedEnvelope,\n StaffMembersQueryBuilder,\n UpdateStaffMember,\n UpdateStaffMemberOptions,\n assignCustomSchedule as universalAssignCustomSchedule,\n assignWorkingHoursSchedule as universalAssignWorkingHoursSchedule,\n bulkUpdateStaffMemberTags as universalBulkUpdateStaffMemberTags,\n bulkUpdateStaffMemberTagsByFilter as universalBulkUpdateStaffMemberTagsByFilter,\n connectStaffMemberToUser as universalConnectStaffMemberToUser,\n countStaffMembers as universalCountStaffMembers,\n createStaffMember as universalCreateStaffMember,\n deleteStaffMember as universalDeleteStaffMember,\n disconnectStaffMemberFromUser as universalDisconnectStaffMemberFromUser,\n getDeletedStaffMember as universalGetDeletedStaffMember,\n getStaffMember as universalGetStaffMember,\n listDeletedStaffMembers as universalListDeletedStaffMembers,\n queryStaffMembers as universalQueryStaffMembers,\n removeStaffMemberFromTrashBin as universalRemoveStaffMemberFromTrashBin,\n searchStaffMembers as universalSearchStaffMembers,\n updateStaffMember as universalUpdateStaffMember,\n} from './bookings-staff-v1-staff-member-staff-members.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createStaffMember(\n httpClient: HttpClient\n): CreateStaffMemberSignature {\n return (\n staffMember: NonNullablePaths<StaffMember, `name`, 2>,\n options?: CreateStaffMemberOptions\n ) =>\n universalCreateStaffMember(\n staffMember,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateStaffMemberSignature {\n /**\n * Creates a staff member.\n *\n *\n * By default, the staff member works during the business working hours.\n * You could follow this sample flow ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/sample-flows#backend-modules_bookings_staff-members_assign-a-staff-working-hour-schedule) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/sample-flows#assign-a-staff-working-hour-schedule)) to set custom working hours.\n * @param - Staff member to create.\n * @param - Options for creating the staff member.\n * @returns Created staff member.\n */\n (\n staffMember: NonNullablePaths<StaffMember, `name`, 2>,\n options?: CreateStaffMemberOptions\n ): Promise<\n NonNullablePaths<\n StaffMember,\n | `resource.workingHoursSchedules`\n | `resource.workingHoursSchedules.${number}.shared`\n | `resource.usesDefaultWorkingHours`\n | `associatedWixIdentity.identificationData.anonymousVisitorId`\n | `associatedWixIdentity.identificationData.memberId`\n | `associatedWixIdentity.identificationData.wixUserId`\n | `associatedWixIdentity.identificationData.appId`\n | `associatedWixIdentity.connectionStatus`\n | `associatedWixIdentity.connection.status`\n | `tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function getStaffMember(\n httpClient: HttpClient\n): GetStaffMemberSignature {\n return (staffMemberId: string, options?: GetStaffMemberOptions) =>\n universalGetStaffMember(\n staffMemberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetStaffMemberSignature {\n /**\n * Retrieves a staff member.\n * @param - ID of the staff member to retrieve.\n * @param - Option for retrieving the staff member.\n * @returns Retrieved staff member.\n */\n (staffMemberId: string, options?: GetStaffMemberOptions): Promise<\n NonNullablePaths<\n StaffMember,\n | `resource.workingHoursSchedules`\n | `resource.workingHoursSchedules.${number}.shared`\n | `resource.usesDefaultWorkingHours`\n | `associatedWixIdentity.identificationData.anonymousVisitorId`\n | `associatedWixIdentity.identificationData.memberId`\n | `associatedWixIdentity.identificationData.wixUserId`\n | `associatedWixIdentity.identificationData.appId`\n | `associatedWixIdentity.connectionStatus`\n | `associatedWixIdentity.connection.status`\n | `tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function getDeletedStaffMember(\n httpClient: HttpClient\n): GetDeletedStaffMemberSignature {\n return (staffMemberId: string, options?: GetDeletedStaffMemberOptions) =>\n universalGetDeletedStaffMember(\n staffMemberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDeletedStaffMemberSignature {\n /**\n * Retrieves a deleted staff member from the trash bin.\n * @param - ID of the deleted staff member to retrieve.\n * @param - Options for getting the deleted staff member.\n */\n (staffMemberId: string, options?: GetDeletedStaffMemberOptions): Promise<\n NonNullablePaths<\n GetDeletedStaffMemberResponse,\n | `staffMember.resource.workingHoursSchedules`\n | `staffMember.resource.workingHoursSchedules.${number}.shared`\n | `staffMember.resource.usesDefaultWorkingHours`\n | `staffMember.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMember.associatedWixIdentity.identificationData.memberId`\n | `staffMember.associatedWixIdentity.identificationData.wixUserId`\n | `staffMember.associatedWixIdentity.identificationData.appId`\n | `staffMember.associatedWixIdentity.connectionStatus`\n | `staffMember.associatedWixIdentity.connection.status`\n | `staffMember.tags.privateTags.tagIds`,\n 6\n >\n >;\n}\n\nexport function listDeletedStaffMembers(\n httpClient: HttpClient\n): ListDeletedStaffMembersSignature {\n return (options?: ListDeletedStaffMembersOptions) =>\n universalListDeletedStaffMembers(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListDeletedStaffMembersSignature {\n /**\n * Retrieves a list of deleted staff members from the trash bin.\n *\n *\n * List Deleted Staff Members uses these defaults, which you can override:\n * - `paging.limit` set to `100`.\n * - Only staff member fields are returned. Specify the `fields` parameter to include additional data about the staff member's associated resource.\n * @param - Options for listing deleted staff members.\n */\n (options?: ListDeletedStaffMembersOptions): Promise<\n NonNullablePaths<\n ListDeletedStaffMembersResponse,\n | `staffMembers`\n | `staffMembers.${number}.resource.usesDefaultWorkingHours`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.memberId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.wixUserId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.appId`\n | `staffMembers.${number}.associatedWixIdentity.connectionStatus`\n | `staffMembers.${number}.associatedWixIdentity.connection.status`,\n 6\n >\n >;\n}\n\nexport function removeStaffMemberFromTrashBin(\n httpClient: HttpClient\n): RemoveStaffMemberFromTrashBinSignature {\n return (staffMemberId: string) =>\n universalRemoveStaffMemberFromTrashBin(\n staffMemberId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveStaffMemberFromTrashBinSignature {\n /**\n * Removes a staff member from the trash bin, permanently deleting it.\n * @param - ID of the staff member to delete permanently.\n */\n (staffMemberId: string): Promise<void>;\n}\n\nexport function updateStaffMember(\n httpClient: HttpClient\n): UpdateStaffMemberSignature {\n return (\n _id: string,\n staffMember: NonNullablePaths<UpdateStaffMember, `revision`, 2>,\n options?: UpdateStaffMemberOptions\n ) =>\n universalUpdateStaffMember(\n _id,\n staffMember,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateStaffMemberSignature {\n /**\n * Updates a staff member.\n *\n *\n * Each time the staff member is updated, `revision` increments by 1.\n * You must include current revision of the staff member when updating it.\n * This ensures you're working with the latest service information and prevents unintended overwrites.\n * @param - Staff member ID.\n * @param - The staff member to update\n * @param - Options for updating the staff member.\n * @returns Updated staff member.\n */\n (\n _id: string,\n staffMember: NonNullablePaths<UpdateStaffMember, `revision`, 2>,\n options?: UpdateStaffMemberOptions\n ): Promise<\n NonNullablePaths<\n StaffMember,\n | `resource.workingHoursSchedules`\n | `resource.workingHoursSchedules.${number}.shared`\n | `resource.usesDefaultWorkingHours`\n | `associatedWixIdentity.identificationData.anonymousVisitorId`\n | `associatedWixIdentity.identificationData.memberId`\n | `associatedWixIdentity.identificationData.wixUserId`\n | `associatedWixIdentity.identificationData.appId`\n | `associatedWixIdentity.connectionStatus`\n | `associatedWixIdentity.connection.status`\n | `tags.privateTags.tagIds`,\n 5\n >\n >;\n}\n\nexport function deleteStaffMember(\n httpClient: HttpClient\n): DeleteStaffMemberSignature {\n return (staffMemberId: string) =>\n universalDeleteStaffMember(\n staffMemberId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteStaffMemberSignature {\n /**\n * Deletes a staff member.\n *\n *\n * Also deletes the resource ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) associated with the staff member.\n * @param - ID of the staff member to delete.\n */\n (staffMemberId: string): Promise<void>;\n}\n\nexport function queryStaffMembers(\n httpClient: HttpClient\n): QueryStaffMembersSignature {\n return (options?: QueryStaffMembersOptions) =>\n universalQueryStaffMembers(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryStaffMembersSignature {\n /**\n * Creates a query to retrieve a list of staff members.\n *\n * The `queryStaffMembers()` function builds a query to retrieve a list of staff members and returns a `StaffMembersQueryBuilder` 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/staff-members/staff-members-query-builder/find) function.\n *\n * You can refine the query by chaining `StaffMembersQueryBuilder` functions onto the query. `StaffMembersQueryBuilder` functions enable you to sort, filter, and control the results that `queryStaffMembers()` returns.\n *\n * `queryStaffMembers()` runs with the following `StaffMembersQueryBuilder` 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 `staffMembersTypes()` are applied in the order they are called.\n *\n * The following `StaffMembersQueryBuilder` functions are supported for the `queryStaffMembers()` 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/staff-members/staff-members-query-result/items) property in `StaffMembersQueryResult`.\n */\n (options?: QueryStaffMembersOptions): StaffMembersQueryBuilder;\n}\n\nexport function countStaffMembers(\n httpClient: HttpClient\n): CountStaffMembersSignature {\n return (options?: CountStaffMembersOptions) =>\n universalCountStaffMembers(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountStaffMembersSignature {\n /**\n * Counts how many staff members match the given filter.\n *\n *\n * ### Filter\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/filtering-and-sorting)) for a complete list of supported filters and sorting options.\n *\n * ### See also\n *\n * To learn about working with filters in general, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n (options?: CountStaffMembersOptions): Promise<\n NonNullablePaths<CountStaffMembersResponse, `count`, 2>\n >;\n}\n\nexport function connectStaffMemberToUser(\n httpClient: HttpClient\n): ConnectStaffMemberToUserSignature {\n return (staffMemberId: string, options?: ConnectStaffMemberToUserOptions) =>\n universalConnectStaffMemberToUser(\n staffMemberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConnectStaffMemberToUserSignature {\n /**\n * Connects a Wix user to a staff member, enabling them to manage their own working hour schedule in the dashboard.\n *\n *\n * By default, Wix Bookings uses the staff member's `email`.\n * However, you can specify an alternative email address. If no existing Wix user is associated with that email, Wix sends them an invitation to become a Wix user.\n * If an existing user is found but not linked to the site, Wix Bookings sends an invitation to join the site.\n *\n * To check the connection status, call Get Staff Member ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/get-staff-member) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/get-staff-member)), and specify `ASSOCIATED_IDENTITY_STATUS` in the `fields` parameter.\n *\n * You must call Disconnect Staff Member From User ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/disconnect-staff-member-from-user) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/disconnect-staff-member-from-user)) before connecting a different Wix user to the staff member.\n * @param - ID of the staff member to connect to the Wix user.\n * @param - Options for connecting the staff member to a Wix user.\n */\n (staffMemberId: string, options?: ConnectStaffMemberToUserOptions): Promise<\n NonNullablePaths<\n ConnectStaffMemberToUserResponse,\n | `staffMember.resource.workingHoursSchedules`\n | `staffMember.resource.workingHoursSchedules.${number}.shared`\n | `staffMember.resource.usesDefaultWorkingHours`\n | `staffMember.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMember.associatedWixIdentity.identificationData.memberId`\n | `staffMember.associatedWixIdentity.identificationData.wixUserId`\n | `staffMember.associatedWixIdentity.identificationData.appId`\n | `staffMember.associatedWixIdentity.connectionStatus`\n | `staffMember.associatedWixIdentity.connection.status`\n | `staffMember.tags.privateTags.tagIds`,\n 6\n >\n >;\n}\n\nexport function searchStaffMembers(\n httpClient: HttpClient\n): SearchStaffMembersSignature {\n return (search: StaffMemberSearch, options?: SearchStaffMembersOptions) =>\n universalSearchStaffMembers(\n search,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchStaffMembersSignature {\n /**\n * Retrieves a list of up to 100 staff members, given the provided filtering, paging, and sorting.\n *\n *\n * ### Defaults\n *\n * Search Staff Members has the following default settings, which you can override:\n * + Sorted by `createdDate` in ascending order.\n * + `cursorPaging.limit` set to `100`.\n *\n * ### Filter\n *\n * Refer to the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/filtering-and-sorting)) for a complete list of supported filters and sorting options.\n *\n * ### See also\n *\n * To learn about working with Search methods, see API Query Language ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)) and Sorting and Paging ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)).\n * @param - Search criteria including filter, sort, and paging options.\n *\n * See the supported filters article ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/filtering-and-sorting)) for complete filter and sorting options.\n */\n (search: StaffMemberSearch, options?: SearchStaffMembersOptions): Promise<\n NonNullablePaths<\n SearchStaffMembersResponse,\n | `staffMembers`\n | `staffMembers.${number}.resource.usesDefaultWorkingHours`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.memberId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.wixUserId`\n | `staffMembers.${number}.associatedWixIdentity.identificationData.appId`\n | `staffMembers.${number}.associatedWixIdentity.connectionStatus`\n | `staffMembers.${number}.associatedWixIdentity.connection.status`\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 6\n >\n >;\n}\n\nexport function disconnectStaffMemberFromUser(\n httpClient: HttpClient\n): DisconnectStaffMemberFromUserSignature {\n return (\n staffMemberId: string,\n options?: DisconnectStaffMemberFromUserOptions\n ) =>\n universalDisconnectStaffMemberFromUser(\n staffMemberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DisconnectStaffMemberFromUserSignature {\n /**\n * Disconnects a staff member from a Wix user, clearing the `associatedWixIdentity` field.\n *\n *\n * Consequently, the user can no longer manage the staff member's working hour schedule in the dashboard.\n *\n * You must call Disconnect Staff Member From User before connecting a different Wix user to the staff member.\n * @param - ID of the staff member to disconnect from its Wix user.\n * @param - Options to disconnect the staff member from a Wix user.\n */\n (\n staffMemberId: string,\n options?: DisconnectStaffMemberFromUserOptions\n ): Promise<\n NonNullablePaths<\n DisconnectStaffMemberFromUserResponse,\n | `staffMember.resource.workingHoursSchedules`\n | `staffMember.resource.workingHoursSchedules.${number}.shared`\n | `staffMember.resource.usesDefaultWorkingHours`\n | `staffMember.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMember.associatedWixIdentity.identificationData.memberId`\n | `staffMember.associatedWixIdentity.identificationData.wixUserId`\n | `staffMember.associatedWixIdentity.identificationData.appId`\n | `staffMember.associatedWixIdentity.connectionStatus`\n | `staffMember.associatedWixIdentity.connection.status`\n | `staffMember.tags.privateTags.tagIds`,\n 6\n >\n >;\n}\n\nexport function assignWorkingHoursSchedule(\n httpClient: HttpClient\n): AssignWorkingHoursScheduleSignature {\n return (\n staffMemberId: string,\n scheduleId: string,\n options?: AssignWorkingHoursScheduleOptions\n ) =>\n universalAssignWorkingHoursSchedule(\n staffMemberId,\n scheduleId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AssignWorkingHoursScheduleSignature {\n /**\n * Updates a staff member's working hours based on the specified schedule ID ([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 *\n *\n * ### Default working hours\n *\n * By default, staff members work during the opening hours of the business's default location ([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 *\n * ### Schedule ID\n *\n * You can specify either the ID of the business's working hour schedule or the staff member's event schedule.\n * The call fails if you specify a different schedule ID.\n *\n * #### Staff event schedule\n *\n * To customize a staff member's working hours, specify their event schedule ID as `scheduleId`.\n * Refer to this sample flow ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/sample-flows#backend-modules_bookings_staff-members_assign-a-staff-working-hour-schedule) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/sample-flows#assign-a-staff-working-hour-schedule)) for more details.\n *\n * #### Business working hour schedule\n *\n * To reset a staff member's working hours to the default business hours, specify the ID of the business working hour schedule as `scheduleId`.\n * @param - ID of the staff member to assign the schedule to.\n * @param - ID of 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 * to assign to the staff member.\n *\n * Must be either the staff member's event schedule ID or the working hour\n * schedule ID for a business location.\n * @param - Options for setting the staff member's working hours schedule.\n */\n (\n staffMemberId: string,\n scheduleId: string,\n options?: AssignWorkingHoursScheduleOptions\n ): Promise<\n NonNullablePaths<\n AssignWorkingHoursScheduleResponse,\n | `staffMember.resource.workingHoursSchedules`\n | `staffMember.resource.workingHoursSchedules.${number}.shared`\n | `staffMember.resource.usesDefaultWorkingHours`\n | `staffMember.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMember.associatedWixIdentity.identificationData.memberId`\n | `staffMember.associatedWixIdentity.identificationData.wixUserId`\n | `staffMember.associatedWixIdentity.identificationData.appId`\n | `staffMember.associatedWixIdentity.connectionStatus`\n | `staffMember.associatedWixIdentity.connection.status`\n | `staffMember.tags.privateTags.tagIds`,\n 6\n >\n >;\n}\n\nexport function assignCustomSchedule(\n httpClient: HttpClient\n): AssignCustomScheduleSignature {\n return (\n staffMemberId: string,\n scheduleId: string,\n options?: AssignCustomScheduleOptions\n ) =>\n universalAssignCustomSchedule(\n staffMemberId,\n scheduleId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AssignCustomScheduleSignature {\n /**\n * Assigns a custom working hours schedule to the staff member\n *\n *\n * The working hours schedule is a schedule that defines the working hours of a staff member, and dictate when the staff member is available for bookings.\n *\n * By default staff members use the shared business working hours schedule.\n * By assigning a custom working hours schedule to a staff member, you can define specific working hours for that staff member.\n *\n * To create and manage schedules and working hours sessions, use the Events API ([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 * @param - ID of the staff member for which to assign a working hour schedule.\n * @param - ID of 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 * to assign to the staff member.\n * @deprecated\n */\n (\n staffMemberId: string,\n scheduleId: string,\n options?: AssignCustomScheduleOptions\n ): Promise<\n NonNullablePaths<\n AssignCustomScheduleResponse,\n | `staffMember.resource.workingHoursSchedules`\n | `staffMember.resource.workingHoursSchedules.${number}.shared`\n | `staffMember.resource.usesDefaultWorkingHours`\n | `staffMember.associatedWixIdentity.identificationData.anonymousVisitorId`\n | `staffMember.associatedWixIdentity.identificationData.memberId`\n | `staffMember.associatedWixIdentity.identificationData.wixUserId`\n | `staffMember.associatedWixIdentity.identificationData.appId`\n | `staffMember.associatedWixIdentity.connectionStatus`\n | `staffMember.associatedWixIdentity.connection.status`\n | `staffMember.tags.privateTags.tagIds`,\n 6\n >\n >;\n}\n\nexport function bulkUpdateStaffMemberTags(\n httpClient: HttpClient\n): BulkUpdateStaffMemberTagsSignature {\n return (ids: string[], options?: BulkUpdateStaffMemberTagsOptions) =>\n universalBulkUpdateStaffMemberTags(\n ids,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateStaffMemberTagsSignature {\n /**\n * Synchronously updates tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) for up to 100 staff members.\n *\n *\n * If you specify a tag both in `assignTags` and `unassignTags`, the call succeeds and the tag is assigned.\n * @param - IDs of staff members to update tags for.\n */\n (ids: string[], options?: BulkUpdateStaffMemberTagsOptions): Promise<\n NonNullablePaths<\n BulkUpdateStaffMemberTagsResponse,\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 | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkUpdateStaffMemberTagsByFilter(\n httpClient: HttpClient\n): BulkUpdateStaffMemberTagsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdateStaffMemberTagsByFilterOptions\n ) =>\n universalBulkUpdateStaffMemberTagsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateStaffMemberTagsByFilterSignature {\n /**\n * Asynchronously updates tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) for staff members, given the provided filtering.\n *\n *\n * If you specify a tag both in `assignTags` and `unassignTags`, the call succeeds and the tag is assigned.\n *\n * ### Filter\n *\n * Refer to the supported filters article ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/filtering-and-sorting)) for a complete list of supported filters and sorting options.\n * @param - Filter to base the update upon. See the *supported filters article*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/filtering-and-sorting))\n * for a complete list of supported filters.\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdateStaffMemberTagsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkUpdateStaffMemberTagsByFilterResponse, `jobId`, 2>\n >;\n}\n\nexport const onStaffMemberConnectedToUser = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_connected_to_user',\n true,\n (event: StaffMemberConnectedToUserEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.staffMember.createdDate' },\n { path: 'data.staffMember.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'data.staffMember.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberConnectedToUserEnvelope>();\nexport const onStaffMemberCreated = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_created',\n true,\n (event: StaffMemberCreatedEnvelope) =>\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 transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'entity.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberCreatedEnvelope>();\nexport const onStaffMemberDeleted = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_deleted',\n true,\n (event: StaffMemberDeletedEnvelope) =>\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 transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'entity.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberDeletedEnvelope>();\nexport const onStaffMemberDisconnectedFromUser = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_disconnected_from_user',\n true,\n (event: StaffMemberDisconnectedFromUserEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.staffMember.createdDate' },\n { path: 'data.staffMember.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'data.staffMember.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberDisconnectedFromUserEnvelope>();\nexport const onStaffMemberFullyCreated = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_fully_created',\n true,\n (event: StaffMemberFullyCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.staffMember.createdDate' },\n { path: 'data.staffMember.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'data.staffMember.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberFullyCreatedEnvelope>();\nexport const onStaffMemberUpdated = EventDefinition(\n 'wix.bookings.staff.v1.staff_member_updated',\n true,\n (event: StaffMemberUpdatedEnvelope) =>\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 transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'entity.mainMedia.image' }],\n },\n ])\n )\n)<StaffMemberUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AggregationData,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n ApprovalStatus,\n AssignCustomScheduleOptions,\n AssignCustomScheduleRequest,\n AssignCustomScheduleResponse,\n AssignWorkingHoursScheduleOptions,\n AssignWorkingHoursScheduleRequest,\n AssignWorkingHoursScheduleResponse,\n AssociatedConferencingAccount,\n AssociatedConferencingAccountAccountOneOf,\n AssociatedConferencingAccounts,\n AssociatedConferencingProvider,\n AssociatedConferencingProviders,\n AssociatedWixIdentity,\n AssociatedWixIdentityConnectionStatusEnumConnectionStatus,\n Availability,\n AvailabilityConstraints,\n AvailabilityPolicy,\n AvailabilityPolicyUpdated,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkUpdateStaffMemberTagsByFilterOptions,\n BulkUpdateStaffMemberTagsByFilterRequest,\n BulkUpdateStaffMemberTagsByFilterResponse,\n BulkUpdateStaffMemberTagsOptions,\n BulkUpdateStaffMemberTagsRequest,\n BulkUpdateStaffMemberTagsResponse,\n BulkUpdateStaffMemberTagsResult,\n BusinessLocation,\n BusinessSchedule,\n CalendarConference,\n CalendarDateTime,\n CalendarType,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ConferenceProvider,\n ConferenceType,\n ConnectStaffMemberToUserOptions,\n ConnectStaffMemberToUserRequest,\n ConnectStaffMemberToUserResponse,\n Connection,\n ConnectionStatus,\n CountStaffMembersOptions,\n CountStaffMembersRequest,\n CountStaffMembersResponse,\n CreateStaffMemberOptions,\n CreateStaffMemberRequest,\n CreateStaffMemberResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n CustomConferenceAccount,\n DateHistogramResult,\n DateHistogramResults,\n Day,\n DayOfWeek,\n DeleteStaffMemberRequest,\n DeleteStaffMemberResponse,\n DisconnectStaffMemberFromUserOptions,\n DisconnectStaffMemberFromUserRequest,\n DisconnectStaffMemberFromUserResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n EventSchedule,\n ExtendedFields,\n ExternalCalendarInfo,\n ExternalCalendarOverrides,\n Frequency,\n GetDeletedStaffMemberOptions,\n GetDeletedStaffMemberRequest,\n GetDeletedStaffMemberResponse,\n GetStaffMemberOptions,\n GetStaffMemberRequest,\n GetStaffMemberResponse,\n GroupByValueResults,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n Interval,\n IntervalSplit,\n ItemMetadata,\n LinkedSchedule,\n ListDeletedStaffMembersOptions,\n ListDeletedStaffMembersRequest,\n ListDeletedStaffMembersResponse,\n LocalDateTime,\n Location,\n LocationOptions,\n LocationStatus,\n LocationType,\n LocationsAddress,\n LocationsAddressLocation,\n LocationsLocation,\n LocationsLocationType,\n LocationsStreetAddress,\n MediaItem,\n MediaItemMediaOneOf,\n MessageEnvelope,\n MigrationData,\n MigrationEvent,\n Mode,\n MultipleSessionsCreated,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NestedValueAggregationResult,\n Participant,\n ParticipantNotification,\n PolicyRemovedFromContributor,\n PolicyUpdatedForContributor,\n Price,\n QueryStaffMembersMultiLanguageRequest,\n QueryStaffMembersMultiLanguageResponse,\n QueryStaffMembersOptions,\n QueryStaffMembersRequest,\n QueryStaffMembersResponse,\n RangeAggregationResult,\n RangeResult,\n RangeResults,\n Rate,\n RecurringInterval,\n RecurringIntervalType,\n RecurringSessionSplit,\n RecurringSessionsUpdated,\n RemoveStaffMemberFromTrashBinRequest,\n RemoveStaffMemberFromTrashBinResponse,\n RequestedFields,\n Resource,\n RestoreInfo,\n RestoreStaffMemberFromTrashBinRequest,\n RestoreStaffMemberFromTrashBinResponse,\n RestoreStaffRequest,\n RestoreStaffResponse,\n Results,\n ScalarResult,\n ScalarType,\n Schedule,\n ScheduleCancelled,\n ScheduleCreated,\n ScheduleNotification,\n ScheduleNotificationEventOneOf,\n ScheduleStatus,\n ScheduleUnassignedFromUser,\n ScheduleUpdated,\n ScheduleWithSessions,\n SearchDetails,\n SearchStaffMembersOptions,\n SearchStaffMembersRequest,\n SearchStaffMembersResponse,\n Session,\n SessionCancelled,\n SessionCreated,\n SessionType,\n SessionUpdated,\n SessionVersion,\n SitePropertiesOnScheduleCreation,\n SortOrder,\n Sorting,\n SpecialHourPeriod,\n SpecificLocation,\n SplitInterval,\n StaffData,\n StaffMember,\n StaffMemberConnectedToUser,\n StaffMemberConnectedToUserEnvelope,\n StaffMemberCreatedEnvelope,\n StaffMemberDeletedEnvelope,\n StaffMemberDisconnectedFromUser,\n StaffMemberDisconnectedFromUserEnvelope,\n StaffMemberFullyCreated,\n StaffMemberFullyCreatedEnvelope,\n StaffMemberSearchSpec,\n StaffMemberUpdatedEnvelope,\n StaffMembersQueryBuilder,\n StaffMembersQueryResult,\n Status,\n StreetAddress,\n Subdivision,\n TagList,\n Tags,\n TimePeriod,\n Transparency,\n UpdateStaffMember,\n UpdateStaffMemberOptions,\n UpdateStaffMemberRequest,\n UpdateStaffMemberResponse,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n Version,\n WebhookIdentityType,\n WorkingHoursSchedule,\n} from './bookings-staff-v1-staff-member-staff-members.universal.js';\n","import {\n createStaffMember as publicCreateStaffMember,\n getStaffMember as publicGetStaffMember,\n getDeletedStaffMember as publicGetDeletedStaffMember,\n listDeletedStaffMembers as publicListDeletedStaffMembers,\n removeStaffMemberFromTrashBin as publicRemoveStaffMemberFromTrashBin,\n updateStaffMember as publicUpdateStaffMember,\n deleteStaffMember as publicDeleteStaffMember,\n queryStaffMembers as publicQueryStaffMembers,\n countStaffMembers as publicCountStaffMembers,\n connectStaffMemberToUser as publicConnectStaffMemberToUser,\n searchStaffMembers as publicSearchStaffMembers,\n disconnectStaffMemberFromUser as publicDisconnectStaffMemberFromUser,\n assignWorkingHoursSchedule as publicAssignWorkingHoursSchedule,\n assignCustomSchedule as publicAssignCustomSchedule,\n bulkUpdateStaffMemberTags as publicBulkUpdateStaffMemberTags,\n bulkUpdateStaffMemberTagsByFilter as publicBulkUpdateStaffMemberTagsByFilter,\n} from './bookings-staff-v1-staff-member-staff-members.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 { onStaffMemberConnectedToUser as publicOnStaffMemberConnectedToUser } from './bookings-staff-v1-staff-member-staff-members.public.js';\nimport { onStaffMemberCreated as publicOnStaffMemberCreated } from './bookings-staff-v1-staff-member-staff-members.public.js';\nimport { onStaffMemberDeleted as publicOnStaffMemberDeleted } from './bookings-staff-v1-staff-member-staff-members.public.js';\nimport { onStaffMemberDisconnectedFromUser as publicOnStaffMemberDisconnectedFromUser } from './bookings-staff-v1-staff-member-staff-members.public.js';\nimport { onStaffMemberFullyCreated as publicOnStaffMemberFullyCreated } from './bookings-staff-v1-staff-member-staff-members.public.js';\nimport { onStaffMemberUpdated as publicOnStaffMemberUpdated } from './bookings-staff-v1-staff-member-staff-members.public.js';\n\nexport const createStaffMember: MaybeContext<\n BuildRESTFunction<typeof publicCreateStaffMember> &\n typeof publicCreateStaffMember\n> = /*#__PURE__*/ createRESTModule(publicCreateStaffMember);\nexport const getStaffMember: MaybeContext<\n BuildRESTFunction<typeof publicGetStaffMember> & typeof publicGetStaffMember\n> = /*#__PURE__*/ createRESTModule(publicGetStaffMember);\nexport const getDeletedStaffMember: MaybeContext<\n BuildRESTFunction<typeof publicGetDeletedStaffMember> &\n typeof publicGetDeletedStaffMember\n> = /*#__PURE__*/ createRESTModule(publicGetDeletedStaffMember);\nexport const listDeletedStaffMembers: MaybeContext<\n BuildRESTFunction<typeof publicListDeletedStaffMembers> &\n typeof publicListDeletedStaffMembers\n> = /*#__PURE__*/ createRESTModule(publicListDeletedStaffMembers);\nexport const removeStaffMemberFromTrashBin: MaybeContext<\n BuildRESTFunction<typeof publicRemoveStaffMemberFromTrashBin> &\n typeof publicRemoveStaffMemberFromTrashBin\n> = /*#__PURE__*/ createRESTModule(publicRemoveStaffMemberFromTrashBin);\nexport const updateStaffMember: MaybeContext<\n BuildRESTFunction<typeof publicUpdateStaffMember> &\n typeof publicUpdateStaffMember\n> = /*#__PURE__*/ createRESTModule(publicUpdateStaffMember);\nexport const deleteStaffMember: MaybeContext<\n BuildRESTFunction<typeof publicDeleteStaffMember> &\n typeof publicDeleteStaffMember\n> = /*#__PURE__*/ createRESTModule(publicDeleteStaffMember);\nexport const queryStaffMembers: MaybeContext<\n BuildRESTFunction<typeof publicQueryStaffMembers> &\n typeof publicQueryStaffMembers\n> = /*#__PURE__*/ createRESTModule(publicQueryStaffMembers);\nexport const countStaffMembers: MaybeContext<\n BuildRESTFunction<typeof publicCountStaffMembers> &\n typeof publicCountStaffMembers\n> = /*#__PURE__*/ createRESTModule(publicCountStaffMembers);\nexport const connectStaffMemberToUser: MaybeContext<\n BuildRESTFunction<typeof publicConnectStaffMemberToUser> &\n typeof publicConnectStaffMemberToUser\n> = /*#__PURE__*/ createRESTModule(publicConnectStaffMemberToUser);\nexport const searchStaffMembers: MaybeContext<\n BuildRESTFunction<typeof publicSearchStaffMembers> &\n typeof publicSearchStaffMembers\n> = /*#__PURE__*/ createRESTModule(publicSearchStaffMembers);\nexport const disconnectStaffMemberFromUser: MaybeContext<\n BuildRESTFunction<typeof publicDisconnectStaffMemberFromUser> &\n typeof publicDisconnectStaffMemberFromUser\n> = /*#__PURE__*/ createRESTModule(publicDisconnectStaffMemberFromUser);\nexport const assignWorkingHoursSchedule: MaybeContext<\n BuildRESTFunction<typeof publicAssignWorkingHoursSchedule> &\n typeof publicAssignWorkingHoursSchedule\n> = /*#__PURE__*/ createRESTModule(publicAssignWorkingHoursSchedule);\nexport const assignCustomSchedule: MaybeContext<\n BuildRESTFunction<typeof publicAssignCustomSchedule> &\n typeof publicAssignCustomSchedule\n> = /*#__PURE__*/ createRESTModule(publicAssignCustomSchedule);\nexport const bulkUpdateStaffMemberTags: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateStaffMemberTags> &\n typeof publicBulkUpdateStaffMemberTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateStaffMemberTags);\nexport const bulkUpdateStaffMemberTagsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateStaffMemberTagsByFilter> &\n typeof publicBulkUpdateStaffMemberTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateStaffMemberTagsByFilter);\n/**\n * Triggered when a Wix user is connected to a staff member.\n *\n *\n * The event is triggered when the connection status changes to `CONNECTED`. It\n * isn't triggered when Wix Bookings sends an invitation to become a Wix user or\n * join a site.\n */\nexport const onStaffMemberConnectedToUser: BuildEventDefinition<\n typeof publicOnStaffMemberConnectedToUser\n> &\n typeof publicOnStaffMemberConnectedToUser = createEventModule(\n publicOnStaffMemberConnectedToUser\n);\n/**\n * Triggered when a staff member is created.\n */\nexport const onStaffMemberCreated: BuildEventDefinition<\n typeof publicOnStaffMemberCreated\n> &\n typeof publicOnStaffMemberCreated = createEventModule(\n publicOnStaffMemberCreated\n);\n/**\n * Triggered when a staff member is deleted.\n */\nexport const onStaffMemberDeleted: BuildEventDefinition<\n typeof publicOnStaffMemberDeleted\n> &\n typeof publicOnStaffMemberDeleted = createEventModule(\n publicOnStaffMemberDeleted\n);\n/**\n * Triggered when a Wix user is disconnected from a staff member.\n */\nexport const onStaffMemberDisconnectedFromUser: BuildEventDefinition<\n typeof publicOnStaffMemberDisconnectedFromUser\n> &\n typeof publicOnStaffMemberDisconnectedFromUser = createEventModule(\n publicOnStaffMemberDisconnectedFromUser\n);\n/**\n * Triggered when a staff member is created.\n */\nexport const onStaffMemberFullyCreated: BuildEventDefinition<\n typeof publicOnStaffMemberFullyCreated\n> &\n typeof publicOnStaffMemberFullyCreated = createEventModule(\n publicOnStaffMemberFullyCreated\n);\n/**\n * Triggered when a staff member is updated.\n */\nexport const onStaffMemberUpdated: BuildEventDefinition<\n typeof publicOnStaffMemberUpdated\n> &\n typeof publicOnStaffMemberUpdated = createEventModule(\n publicOnStaffMemberUpdated\n);\n\nexport {\n IdentityType,\n AssociatedWixIdentityConnectionStatusEnumConnectionStatus,\n ConnectionStatus,\n RequestedFields,\n SortOrder,\n Mode,\n ScalarType,\n AggregationType,\n Day,\n Transparency,\n RecurringIntervalType,\n LocationType,\n LocationStatus,\n LocationsLocationType,\n DayOfWeek,\n ApprovalStatus,\n ScheduleStatus,\n ConferenceType,\n CalendarType,\n Status,\n SessionType,\n WebhookIdentityType,\n} from './bookings-staff-v1-staff-member-staff-members.universal.js';\nexport {\n StaffMember,\n MediaItem,\n MediaItemMediaOneOf,\n Resource,\n WorkingHoursSchedule,\n EventSchedule,\n LocationOptions,\n SpecificLocation,\n BusinessLocation,\n AssociatedWixIdentity,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n Connection,\n AssociatedConferencingProviders,\n AssociatedConferencingProvider,\n AssociatedConferencingAccounts,\n AssociatedConferencingAccount,\n AssociatedConferencingAccountAccountOneOf,\n CustomConferenceAccount,\n ExtendedFields,\n Tags,\n TagList,\n StaffMemberDisconnectedFromUser,\n StaffMemberConnectedToUser,\n StaffMemberFullyCreated,\n CreateStaffMemberRequest,\n CreateStaffMemberResponse,\n GetStaffMemberRequest,\n GetStaffMemberResponse,\n GetDeletedStaffMemberRequest,\n GetDeletedStaffMemberResponse,\n ListDeletedStaffMembersRequest,\n CursorPaging,\n ListDeletedStaffMembersResponse,\n CursorPagingMetadata,\n Cursors,\n RemoveStaffMemberFromTrashBinRequest,\n RemoveStaffMemberFromTrashBinResponse,\n RestoreStaffMemberFromTrashBinRequest,\n RestoreStaffMemberFromTrashBinResponse,\n UpdateStaffMemberRequest,\n UpdateStaffMemberResponse,\n DeleteStaffMemberRequest,\n DeleteStaffMemberResponse,\n QueryStaffMembersRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n QueryStaffMembersResponse,\n QueryStaffMembersMultiLanguageRequest,\n QueryStaffMembersMultiLanguageResponse,\n CountStaffMembersRequest,\n CountStaffMembersResponse,\n ConnectStaffMemberToUserRequest,\n ConnectStaffMemberToUserResponse,\n SearchStaffMembersRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n SearchDetails,\n SearchStaffMembersResponse,\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 DisconnectStaffMemberFromUserRequest,\n DisconnectStaffMemberFromUserResponse,\n AssignWorkingHoursScheduleRequest,\n AssignWorkingHoursScheduleResponse,\n AssignCustomScheduleRequest,\n AssignCustomScheduleResponse,\n BulkUpdateStaffMemberTagsRequest,\n BulkUpdateStaffMemberTagsResponse,\n ItemMetadata,\n ApplicationError,\n BulkUpdateStaffMemberTagsResult,\n BulkActionMetadata,\n BulkUpdateStaffMemberTagsByFilterRequest,\n BulkUpdateStaffMemberTagsByFilterResponse,\n RestoreStaffRequest,\n RestoreStaffResponse,\n Empty,\n PolicyRemovedFromContributor,\n PolicyUpdatedForContributor,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n ScheduleNotification,\n ScheduleNotificationEventOneOf,\n ScheduleCreated,\n Schedule,\n RecurringInterval,\n Interval,\n Frequency,\n LinkedSchedule,\n Location,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n LocationsLocation,\n LocationsAddress,\n LocationsStreetAddress,\n LocationsAddressLocation,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Rate,\n Price,\n Availability,\n AvailabilityConstraints,\n SplitInterval,\n Participant,\n ExternalCalendarOverrides,\n Version,\n ConferenceProvider,\n CalendarConference,\n ScheduleUpdated,\n RecurringSessionsUpdated,\n Session,\n CalendarDateTime,\n LocalDateTime,\n ExternalCalendarInfo,\n SessionVersion,\n ParticipantNotification,\n ScheduleCancelled,\n SessionCreated,\n SessionUpdated,\n SessionCancelled,\n AvailabilityPolicyUpdated,\n AvailabilityPolicy,\n IntervalSplit,\n RecurringSessionSplit,\n ScheduleUnassignedFromUser,\n MultipleSessionsCreated,\n ScheduleWithSessions,\n SitePropertiesOnScheduleCreation,\n MigrationEvent,\n MigrationData,\n StaffData,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n StaffMemberConnectedToUserEnvelope,\n StaffMemberCreatedEnvelope,\n StaffMemberDeletedEnvelope,\n StaffMemberDisconnectedFromUserEnvelope,\n StaffMemberFullyCreatedEnvelope,\n StaffMemberUpdatedEnvelope,\n CreateStaffMemberOptions,\n GetStaffMemberOptions,\n GetDeletedStaffMemberOptions,\n ListDeletedStaffMembersOptions,\n UpdateStaffMember,\n UpdateStaffMemberOptions,\n QueryStaffMembersOptions,\n StaffMembersQueryResult,\n StaffMembersQueryBuilder,\n CountStaffMembersOptions,\n ConnectStaffMemberToUserOptions,\n SearchStaffMembersOptions,\n StaffMemberSearchSpec,\n DisconnectStaffMemberFromUserOptions,\n AssignWorkingHoursScheduleOptions,\n AssignCustomScheduleOptions,\n BulkUpdateStaffMemberTagsOptions,\n BulkUpdateStaffMemberTagsByFilterOptions,\n} from './bookings-staff-v1-staff-member-staff-members.universal.js';\nexport {\n IdentityTypeWithLiterals,\n AssociatedWixIdentityConnectionStatusEnumConnectionStatusWithLiterals,\n ConnectionStatusWithLiterals,\n RequestedFieldsWithLiterals,\n SortOrderWithLiterals,\n ModeWithLiterals,\n ScalarTypeWithLiterals,\n AggregationTypeWithLiterals,\n DayWithLiterals,\n TransparencyWithLiterals,\n RecurringIntervalTypeWithLiterals,\n LocationTypeWithLiterals,\n LocationStatusWithLiterals,\n LocationsLocationTypeWithLiterals,\n DayOfWeekWithLiterals,\n ApprovalStatusWithLiterals,\n ScheduleStatusWithLiterals,\n ConferenceTypeWithLiterals,\n CalendarTypeWithLiterals,\n StatusWithLiterals,\n SessionTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonSearchWithEntityContext,\n StaffMemberSearch,\n} from './bookings-staff-v1-staff-member-staff-members.universal.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 BookingPoliciesQueryBuilder,\n BookingPolicy,\n BookingPolicyCreatedEnvelope,\n BookingPolicyDefaultBookingPolicySetEnvelope,\n BookingPolicyDeletedEnvelope,\n BookingPolicyUpdatedEnvelope,\n CountBookingPoliciesOptions,\n CountBookingPoliciesResponse,\n CreateBookingPolicyValidationErrors,\n DeleteBookingPolicyApplicationErrors,\n GetStrictestBookingPolicyResponse,\n SetDefaultBookingPolicyResponse,\n UpdateBookingPolicy,\n UpdateBookingPolicyValidationErrors,\n countBookingPolicies as universalCountBookingPolicies,\n createBookingPolicy as universalCreateBookingPolicy,\n deleteBookingPolicy as universalDeleteBookingPolicy,\n getBookingPolicy as universalGetBookingPolicy,\n getStrictestBookingPolicy as universalGetStrictestBookingPolicy,\n queryBookingPolicies as universalQueryBookingPolicies,\n setDefaultBookingPolicy as universalSetDefaultBookingPolicy,\n updateBookingPolicy as universalUpdateBookingPolicy,\n} from './bookings-v1-booking-policy-booking-policies.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function createBookingPolicy(\n httpClient: HttpClient\n): CreateBookingPolicySignature {\n return (bookingPolicy: BookingPolicy) =>\n universalCreateBookingPolicy(\n bookingPolicy,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateBookingPolicySignature {\n /**\n * Creates a booking policy.\n * @param - Booking policy to create.\n * @returns Created booking policy.\n */\n (bookingPolicy: BookingPolicy): Promise<\n NonNullablePaths<\n BookingPolicy,\n | `customPolicyDescription.enabled`\n | `customPolicyDescription.description`\n | `limitEarlyBookingPolicy.enabled`\n | `limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `limitLateBookingPolicy.enabled`\n | `limitLateBookingPolicy.latestBookingInMinutes`\n | `bookAfterStartPolicy.enabled`\n | `cancellationPolicy.enabled`\n | `cancellationPolicy.limitLatestCancellation`\n | `cancellationPolicy.latestCancellationInMinutes`\n | `reschedulePolicy.enabled`\n | `reschedulePolicy.limitLatestReschedule`\n | `reschedulePolicy.latestRescheduleInMinutes`\n | `waitlistPolicy.enabled`\n | `waitlistPolicy.capacity`\n | `waitlistPolicy.reservationTimeInMinutes`\n | `participantsPolicy.maxParticipantsPerBooking`\n | `cancellationFeePolicy.enabled`\n | `cancellationFeePolicy.cancellationWindows`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `saveCreditCardPolicy.enabled`,\n 6\n > & {\n __validationErrorsType?: CreateBookingPolicyValidationErrors;\n }\n >;\n}\n\nexport function getBookingPolicy(\n httpClient: HttpClient\n): GetBookingPolicySignature {\n return (bookingPolicyId: string) =>\n universalGetBookingPolicy(\n bookingPolicyId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetBookingPolicySignature {\n /**\n * Retrieves a booking policy.\n * @param - ID of the booking policy to retrieve.\n * @returns Retrieved booking policy.\n */\n (bookingPolicyId: string): Promise<\n NonNullablePaths<\n BookingPolicy,\n | `customPolicyDescription.enabled`\n | `customPolicyDescription.description`\n | `limitEarlyBookingPolicy.enabled`\n | `limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `limitLateBookingPolicy.enabled`\n | `limitLateBookingPolicy.latestBookingInMinutes`\n | `bookAfterStartPolicy.enabled`\n | `cancellationPolicy.enabled`\n | `cancellationPolicy.limitLatestCancellation`\n | `cancellationPolicy.latestCancellationInMinutes`\n | `reschedulePolicy.enabled`\n | `reschedulePolicy.limitLatestReschedule`\n | `reschedulePolicy.latestRescheduleInMinutes`\n | `waitlistPolicy.enabled`\n | `waitlistPolicy.capacity`\n | `waitlistPolicy.reservationTimeInMinutes`\n | `participantsPolicy.maxParticipantsPerBooking`\n | `cancellationFeePolicy.enabled`\n | `cancellationFeePolicy.cancellationWindows`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `saveCreditCardPolicy.enabled`,\n 6\n >\n >;\n}\n\nexport function getStrictestBookingPolicy(\n httpClient: HttpClient\n): GetStrictestBookingPolicySignature {\n return (bookingPolicyIds: string[]) =>\n universalGetStrictestBookingPolicy(\n bookingPolicyIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetStrictestBookingPolicySignature {\n /**\n * Retrieves the strictest version of each policy rule from a list of booking\n * policies.\n *\n *\n * Returns a hypothetical `bookingPolicy` object that combines the strictest\n * version of each rule. The `id` of the returned policy is `null` and no\n * corresponding `bookingPolicy` object is created. To create a new policy, you\n * can call *Create Booking Policy*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/create-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/create-booking-policy)).\n * @param - IDs of the booking policies for which to retrieve the strictest rules for.\n */\n (bookingPolicyIds: string[]): Promise<\n NonNullablePaths<\n GetStrictestBookingPolicyResponse,\n | `bookingPolicy.customPolicyDescription.enabled`\n | `bookingPolicy.customPolicyDescription.description`\n | `bookingPolicy.limitEarlyBookingPolicy.enabled`\n | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `bookingPolicy.limitLateBookingPolicy.enabled`\n | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `bookingPolicy.bookAfterStartPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.enabled`\n | `bookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `bookingPolicy.reschedulePolicy.enabled`\n | `bookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `bookingPolicy.waitlistPolicy.enabled`\n | `bookingPolicy.waitlistPolicy.capacity`\n | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `bookingPolicy.cancellationFeePolicy.enabled`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `bookingPolicy.saveCreditCardPolicy.enabled`,\n 7\n >\n >;\n}\n\nexport function updateBookingPolicy(\n httpClient: HttpClient\n): UpdateBookingPolicySignature {\n return (\n _id: string,\n bookingPolicy: NonNullablePaths<UpdateBookingPolicy, `revision`, 2>\n ) =>\n universalUpdateBookingPolicy(\n _id,\n bookingPolicy,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateBookingPolicySignature {\n /**\n * Updates a booking policy.\n *\n *\n * Each time the booking policy is updated, `revision` increments by 1.\n * The current `revision` must be specified when updating the booking policy.\n * This ensures you're working with the latest booking policy and prevents unintended overwrites.\n * @param - ID of the booking policy.\n * @returns Updated booking policy.\n */\n (\n _id: string,\n bookingPolicy: NonNullablePaths<UpdateBookingPolicy, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n BookingPolicy,\n | `customPolicyDescription.enabled`\n | `customPolicyDescription.description`\n | `limitEarlyBookingPolicy.enabled`\n | `limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `limitLateBookingPolicy.enabled`\n | `limitLateBookingPolicy.latestBookingInMinutes`\n | `bookAfterStartPolicy.enabled`\n | `cancellationPolicy.enabled`\n | `cancellationPolicy.limitLatestCancellation`\n | `cancellationPolicy.latestCancellationInMinutes`\n | `reschedulePolicy.enabled`\n | `reschedulePolicy.limitLatestReschedule`\n | `reschedulePolicy.latestRescheduleInMinutes`\n | `waitlistPolicy.enabled`\n | `waitlistPolicy.capacity`\n | `waitlistPolicy.reservationTimeInMinutes`\n | `participantsPolicy.maxParticipantsPerBooking`\n | `cancellationFeePolicy.enabled`\n | `cancellationFeePolicy.cancellationWindows`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `saveCreditCardPolicy.enabled`,\n 6\n > & {\n __validationErrorsType?: UpdateBookingPolicyValidationErrors;\n }\n >;\n}\n\nexport function setDefaultBookingPolicy(\n httpClient: HttpClient\n): SetDefaultBookingPolicySignature {\n return (bookingPolicyId: string) =>\n universalSetDefaultBookingPolicy(\n bookingPolicyId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetDefaultBookingPolicySignature {\n /**\n * Sets a booking policy as the default.\n *\n *\n * Also updates the site's current default policy by setting its `default`\n * attribute to `false`. If the provided policy is already the site's\n * default, the call succeeds without changing any `bookingPolicy` object.\n * @param - ID of the booking policy that's set as default.\n */\n (bookingPolicyId: string): Promise<\n NonNullablePaths<\n SetDefaultBookingPolicyResponse,\n | `currentDefaultBookingPolicy.customPolicyDescription.enabled`\n | `currentDefaultBookingPolicy.customPolicyDescription.description`\n | `currentDefaultBookingPolicy.limitEarlyBookingPolicy.enabled`\n | `currentDefaultBookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `currentDefaultBookingPolicy.limitLateBookingPolicy.enabled`\n | `currentDefaultBookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `currentDefaultBookingPolicy.bookAfterStartPolicy.enabled`\n | `currentDefaultBookingPolicy.cancellationPolicy.enabled`\n | `currentDefaultBookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `currentDefaultBookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `currentDefaultBookingPolicy.reschedulePolicy.enabled`\n | `currentDefaultBookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `currentDefaultBookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `currentDefaultBookingPolicy.waitlistPolicy.enabled`\n | `currentDefaultBookingPolicy.waitlistPolicy.capacity`\n | `currentDefaultBookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `currentDefaultBookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `currentDefaultBookingPolicy.cancellationFeePolicy.enabled`\n | `currentDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `currentDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `currentDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `currentDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `currentDefaultBookingPolicy.saveCreditCardPolicy.enabled`\n | `previousDefaultBookingPolicy.customPolicyDescription.enabled`\n | `previousDefaultBookingPolicy.customPolicyDescription.description`\n | `previousDefaultBookingPolicy.limitEarlyBookingPolicy.enabled`\n | `previousDefaultBookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes`\n | `previousDefaultBookingPolicy.limitLateBookingPolicy.enabled`\n | `previousDefaultBookingPolicy.limitLateBookingPolicy.latestBookingInMinutes`\n | `previousDefaultBookingPolicy.bookAfterStartPolicy.enabled`\n | `previousDefaultBookingPolicy.cancellationPolicy.enabled`\n | `previousDefaultBookingPolicy.cancellationPolicy.limitLatestCancellation`\n | `previousDefaultBookingPolicy.cancellationPolicy.latestCancellationInMinutes`\n | `previousDefaultBookingPolicy.reschedulePolicy.enabled`\n | `previousDefaultBookingPolicy.reschedulePolicy.limitLatestReschedule`\n | `previousDefaultBookingPolicy.reschedulePolicy.latestRescheduleInMinutes`\n | `previousDefaultBookingPolicy.waitlistPolicy.enabled`\n | `previousDefaultBookingPolicy.waitlistPolicy.capacity`\n | `previousDefaultBookingPolicy.waitlistPolicy.reservationTimeInMinutes`\n | `previousDefaultBookingPolicy.participantsPolicy.maxParticipantsPerBooking`\n | `previousDefaultBookingPolicy.cancellationFeePolicy.enabled`\n | `previousDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows`\n | `previousDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.value`\n | `previousDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.currency`\n | `previousDefaultBookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage`\n | `previousDefaultBookingPolicy.saveCreditCardPolicy.enabled`,\n 7\n >\n >;\n}\n\nexport function deleteBookingPolicy(\n httpClient: HttpClient\n): DeleteBookingPolicySignature {\n return (bookingPolicyId: string) =>\n universalDeleteBookingPolicy(\n bookingPolicyId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteBookingPolicySignature {\n /**\n * Deletes a booking policy.\n *\n *\n * You can't delete the default policy without first *setting a different policy as default*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/set-default-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/set-default-booking-policy)).\n * @param - ID of the booking policy to delete.\n */\n (bookingPolicyId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteBookingPolicyApplicationErrors;\n }\n >;\n}\n\nexport function queryBookingPolicies(\n httpClient: HttpClient\n): QueryBookingPoliciesSignature {\n return () =>\n universalQueryBookingPolicies(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryBookingPoliciesSignature {\n /**\n * Creates a query to retrieve a list of `bookingPolicy` objects.\n *\n * The `queryBookingPolicies()` function builds a query to retrieve a list of `bookingPolicy` objects and returns a `BookingPoliciesQueryBuilder` 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/booking-policies/booking-policies-query-builder/find) function.\n *\n * You can refine the query by chaining `BookingPoliciesQueryBuilder` functions onto the query. `BookingPoliciesQueryBuilder` functions enable you to sort, filter, and control the results that `queryBookingPolicies()` returns.\n *\n * `queryBookingPolicies()` runs with the following `BookingPoliciesQueryBuilder` defaults that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryBookingPolicies()` are applied in the order they are called. For example, if you apply `ascending(\"waitlistPolicy.capacity\")` and then `ascending(\"name\")`, the results are sorted first by `waitlistPolicy.capacity`, and then, if there are multiple results with the same `waitlistPolicy.capacity`, the items are sorted by `name`.\n *\n * The following `BookingPoliciesQueryBuilder` functions are supported for the `queryBookingPolicies()` function. For a full description of the `bookingPolicy` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/booking-policies-query-result/items) property in `BookingPoliciesQueryResult`.\n */\n (): BookingPoliciesQueryBuilder;\n}\n\nexport function countBookingPolicies(\n httpClient: HttpClient\n): CountBookingPoliciesSignature {\n return (options?: CountBookingPoliciesOptions) =>\n universalCountBookingPolicies(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountBookingPoliciesSignature {\n /**\n * Counts booking policies, given the provided filtering.\n *\n *\n * See *supported filters*\n * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))\n * for a complete list of supported filters.\n */\n (options?: CountBookingPoliciesOptions): Promise<\n NonNullablePaths<CountBookingPoliciesResponse, `count`, 2>\n >;\n}\n\nexport const onBookingPolicyCreated = EventDefinition(\n 'wix.bookings.v1.booking_policy_created',\n true,\n (event: BookingPolicyCreatedEnvelope) =>\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)<BookingPolicyCreatedEnvelope>();\nexport const onBookingPolicyDefaultBookingPolicySet = EventDefinition(\n 'wix.bookings.v1.booking_policy_default_booking_policy_set',\n true,\n (event: BookingPolicyDefaultBookingPolicySetEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.currentDefaultBookingPolicy.createdDate' },\n { path: 'data.currentDefaultBookingPolicy.updatedDate' },\n { path: 'data.previousDefaultBookingPolicy.createdDate' },\n { path: 'data.previousDefaultBookingPolicy.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<BookingPolicyDefaultBookingPolicySetEnvelope>();\nexport const onBookingPolicyDeleted = EventDefinition(\n 'wix.bookings.v1.booking_policy_deleted',\n true,\n (event: BookingPolicyDeletedEnvelope) =>\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)<BookingPolicyDeletedEnvelope>();\nexport const onBookingPolicyUpdated = EventDefinition(\n 'wix.bookings.v1.booking_policy_updated',\n true,\n (event: BookingPolicyUpdatedEnvelope) =>\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)<BookingPolicyUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n Address,\n AddressHint,\n Asset,\n BaseEventMetadata,\n BookAfterStartPolicy,\n BookingPoliciesQueryBuilder,\n BookingPoliciesQueryResult,\n BookingPolicy,\n BookingPolicyCreatedEnvelope,\n BookingPolicyDefaultBookingPolicySetEnvelope,\n BookingPolicyDeletedEnvelope,\n BookingPolicyUpdatedEnvelope,\n BusinessSchedule,\n CancellationFeePolicy,\n CancellationPolicy,\n CancellationWindow,\n CancellationWindowFeeOneOf,\n Categories,\n ChangeContext,\n ChangeContextPayloadOneOf,\n ConsentPolicy,\n CountBookingPoliciesOptions,\n CountBookingPoliciesRequest,\n CountBookingPoliciesResponse,\n CreateBookingPolicyRequest,\n CreateBookingPolicyResponse,\n CreateMissingDefaultPolicyRequest,\n CreateMissingDefaultPolicyResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomOptions,\n DayOfWeek,\n DefaultBookingPolicySet,\n DeleteBookingPolicyRequest,\n DeleteBookingPolicyResponse,\n DeleteContext,\n DeleteStatus,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GeoCoordinates,\n GetBookingPolicyRequest,\n GetBookingPolicyResponse,\n GetStrictestBookingPolicyRequest,\n GetStrictestBookingPolicyResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n LimitEarlyBookingPolicy,\n LimitLateBookingPolicy,\n Locale,\n MessageEnvelope,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n Money,\n Multilingual,\n Namespace,\n NamespaceChanged,\n OdeditorAssigned,\n OdeditorUnassigned,\n ParticipantsPolicy,\n PicassoAssigned,\n PicassoUnassigned,\n PlacementType,\n PolicyDescription,\n Properties,\n PropertiesChange,\n QueryBookingPoliciesRequest,\n QueryBookingPoliciesResponse,\n RankingOptions,\n RankingOrder,\n ReschedulePolicy,\n ResolutionMethod,\n ResourcesPolicy,\n RestoreInfo,\n SaveCreditCardPolicy,\n ServiceProvisioned,\n ServiceRemoved,\n SetDefaultBookingPolicyRequest,\n SetDefaultBookingPolicyResponse,\n SiteCloned,\n SiteCreated,\n SiteCreatedContext,\n SiteDeleted,\n SiteHardDeleted,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n SitePropertiesEvent,\n SitePropertiesNotification,\n SitePublished,\n SitePurgedExternally,\n SiteRenamed,\n SiteTransferred,\n SiteUndeleted,\n SiteUnpublished,\n SiteUrlChanged,\n SortOrder,\n Sorting,\n SortingMethodType,\n SpecialHourPeriod,\n StaffSortingPolicy,\n StaffSortingPolicyOptionsOneOf,\n State,\n StudioAssigned,\n StudioUnassigned,\n SupportedLanguage,\n TimePeriod,\n Translation,\n UpdateAllPoliciesRequest,\n UpdateAllPoliciesResponse,\n UpdateBookingPolicy,\n UpdateBookingPolicyRequest,\n UpdateBookingPolicyResponse,\n V4SiteCreated,\n WaitlistPolicy,\n WebhookIdentityType,\n} from './bookings-v1-booking-policy-booking-policies.universal.js';\n","import {\n createBookingPolicy as publicCreateBookingPolicy,\n getBookingPolicy as publicGetBookingPolicy,\n getStrictestBookingPolicy as publicGetStrictestBookingPolicy,\n updateBookingPolicy as publicUpdateBookingPolicy,\n setDefaultBookingPolicy as publicSetDefaultBookingPolicy,\n deleteBookingPolicy as publicDeleteBookingPolicy,\n queryBookingPolicies as publicQueryBookingPolicies,\n countBookingPolicies as publicCountBookingPolicies,\n} from './bookings-v1-booking-policy-booking-policies.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 { onBookingPolicyCreated as publicOnBookingPolicyCreated } from './bookings-v1-booking-policy-booking-policies.public.js';\nimport { onBookingPolicyDefaultBookingPolicySet as publicOnBookingPolicyDefaultBookingPolicySet } from './bookings-v1-booking-policy-booking-policies.public.js';\nimport { onBookingPolicyDeleted as publicOnBookingPolicyDeleted } from './bookings-v1-booking-policy-booking-policies.public.js';\nimport { onBookingPolicyUpdated as publicOnBookingPolicyUpdated } from './bookings-v1-booking-policy-booking-policies.public.js';\n\nexport const createBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicCreateBookingPolicy> &\n typeof publicCreateBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicCreateBookingPolicy);\nexport const getBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicGetBookingPolicy> &\n typeof publicGetBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicGetBookingPolicy);\nexport const getStrictestBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicGetStrictestBookingPolicy> &\n typeof publicGetStrictestBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicGetStrictestBookingPolicy);\nexport const updateBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicUpdateBookingPolicy> &\n typeof publicUpdateBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicUpdateBookingPolicy);\nexport const setDefaultBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicSetDefaultBookingPolicy> &\n typeof publicSetDefaultBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicSetDefaultBookingPolicy);\nexport const deleteBookingPolicy: MaybeContext<\n BuildRESTFunction<typeof publicDeleteBookingPolicy> &\n typeof publicDeleteBookingPolicy\n> = /*#__PURE__*/ createRESTModule(publicDeleteBookingPolicy);\nexport const queryBookingPolicies: MaybeContext<\n BuildRESTFunction<typeof publicQueryBookingPolicies> &\n typeof publicQueryBookingPolicies\n> = /*#__PURE__*/ createRESTModule(publicQueryBookingPolicies);\nexport const countBookingPolicies: MaybeContext<\n BuildRESTFunction<typeof publicCountBookingPolicies> &\n typeof publicCountBookingPolicies\n> = /*#__PURE__*/ createRESTModule(publicCountBookingPolicies);\n/**\n * Triggered when a booking policy is created.\n */\nexport const onBookingPolicyCreated: BuildEventDefinition<\n typeof publicOnBookingPolicyCreated\n> &\n typeof publicOnBookingPolicyCreated = createEventModule(\n publicOnBookingPolicyCreated\n);\n/**\n * Triggered when the site's default policy changes. Then,\n * _Booking Policy Updated_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/on-booking-policy-updated) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/booking-policy-updated))\n * is also triggered both for the new and the previous default policy.\n */\nexport const onBookingPolicyDefaultBookingPolicySet: BuildEventDefinition<\n typeof publicOnBookingPolicyDefaultBookingPolicySet\n> &\n typeof publicOnBookingPolicyDefaultBookingPolicySet = createEventModule(\n publicOnBookingPolicyDefaultBookingPolicySet\n);\n/**\n * Triggered when a booking policy is deleted.\n */\nexport const onBookingPolicyDeleted: BuildEventDefinition<\n typeof publicOnBookingPolicyDeleted\n> &\n typeof publicOnBookingPolicyDeleted = createEventModule(\n publicOnBookingPolicyDeleted\n);\n/**\n * Triggered when a booking policy is updated, including when a policy's\n * `default` attribute changes.\n */\nexport const onBookingPolicyUpdated: BuildEventDefinition<\n typeof publicOnBookingPolicyUpdated\n> &\n typeof publicOnBookingPolicyUpdated = createEventModule(\n publicOnBookingPolicyUpdated\n);\n\nexport {\n RankingOrder,\n SortingMethodType,\n SortOrder,\n PlacementType,\n DayOfWeek,\n ResolutionMethod,\n State,\n SiteCreatedContext,\n Namespace,\n DeleteStatus,\n WebhookIdentityType,\n} from './bookings-v1-booking-policy-booking-policies.universal.js';\nexport {\n BookingPolicy,\n PolicyDescription,\n LimitEarlyBookingPolicy,\n LimitLateBookingPolicy,\n BookAfterStartPolicy,\n CancellationPolicy,\n ReschedulePolicy,\n WaitlistPolicy,\n ParticipantsPolicy,\n ResourcesPolicy,\n CancellationFeePolicy,\n Money,\n CancellationWindow,\n CancellationWindowFeeOneOf,\n SaveCreditCardPolicy,\n StaffSortingPolicy,\n StaffSortingPolicyOptionsOneOf,\n RankingOptions,\n CustomOptions,\n ExtendedFields,\n DefaultBookingPolicySet,\n CreateBookingPolicyRequest,\n CreateBookingPolicyResponse,\n GetBookingPolicyRequest,\n GetBookingPolicyResponse,\n GetStrictestBookingPolicyRequest,\n GetStrictestBookingPolicyResponse,\n UpdateBookingPolicyRequest,\n UpdateBookingPolicyResponse,\n SetDefaultBookingPolicyRequest,\n SetDefaultBookingPolicyResponse,\n DeleteBookingPolicyRequest,\n DeleteBookingPolicyResponse,\n QueryBookingPoliciesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryBookingPoliciesResponse,\n CursorPagingMetadata,\n Cursors,\n CountBookingPoliciesRequest,\n CountBookingPoliciesResponse,\n UpdateAllPoliciesRequest,\n UpdateAllPoliciesResponse,\n CreateMissingDefaultPolicyRequest,\n CreateMissingDefaultPolicyResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n SitePropertiesNotification,\n SitePropertiesEvent,\n Properties,\n Categories,\n Locale,\n Address,\n AddressHint,\n GeoCoordinates,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Multilingual,\n SupportedLanguage,\n ConsentPolicy,\n Translation,\n ChangeContext,\n ChangeContextPayloadOneOf,\n PropertiesChange,\n V4SiteCreated,\n SiteCloned,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n Asset,\n SiteCreated,\n SiteTransferred,\n SiteDeleted,\n DeleteContext,\n SiteUndeleted,\n SitePublished,\n SiteUnpublished,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n ServiceProvisioned,\n ServiceRemoved,\n SiteRenamed,\n SiteHardDeleted,\n NamespaceChanged,\n StudioAssigned,\n StudioUnassigned,\n SiteUrlChanged,\n SitePurgedExternally,\n OdeditorAssigned,\n OdeditorUnassigned,\n PicassoAssigned,\n PicassoUnassigned,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n BookingPolicyCreatedEnvelope,\n BookingPolicyDefaultBookingPolicySetEnvelope,\n BookingPolicyDeletedEnvelope,\n BookingPolicyUpdatedEnvelope,\n UpdateBookingPolicy,\n BookingPoliciesQueryResult,\n BookingPoliciesQueryBuilder,\n CountBookingPoliciesOptions,\n} from './bookings-v1-booking-policy-booking-policies.universal.js';\nexport {\n RankingOrderWithLiterals,\n SortingMethodTypeWithLiterals,\n SortOrderWithLiterals,\n PlacementTypeWithLiterals,\n DayOfWeekWithLiterals,\n ResolutionMethodWithLiterals,\n StateWithLiterals,\n SiteCreatedContextWithLiterals,\n NamespaceWithLiterals,\n DeleteStatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateBookingPolicyValidationErrors,\n UpdateBookingPolicyValidationErrors,\n DeleteBookingPolicyApplicationErrors,\n} from './bookings-v1-booking-policy-booking-policies.universal.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Category,\n CategoryNotificationEnvelope,\n DeleteCategoryOptions,\n DeleteCategoryResponse,\n ListCategoriesOptions,\n ListCategoryResponse,\n UpdateCategory,\n UpdateCategoryApplicationErrors,\n UpdateCategoryResponse,\n createCategory as universalCreateCategory,\n deleteCategory as universalDeleteCategory,\n listCategories as universalListCategories,\n updateCategory as universalUpdateCategory,\n} from './bookings-v1-category-categories.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function listCategories(\n httpClient: HttpClient\n): ListCategoriesSignature {\n return (options?: ListCategoriesOptions) =>\n universalListCategories(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCategoriesSignature {\n /**\n * Retrieves all categories.\n * @param - Options to use when listing categories.\n * @deprecated\n */\n (options?: ListCategoriesOptions): Promise<\n NonNullablePaths<\n ListCategoryResponse,\n `categories` | `categories.${number}.status`,\n 4\n >\n >;\n}\n\nexport function createCategory(\n httpClient: HttpClient\n): CreateCategorySignature {\n return (category: NonNullablePaths<Category, `name`, 2>) =>\n universalCreateCategory(\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCategorySignature {\n /**\n * Creates a category.\n * @param - Category to create.\n * @returns Created category.\n * @deprecated\n */\n (category: NonNullablePaths<Category, `name`, 2>): Promise<\n NonNullablePaths<Category, `status`, 2>\n >;\n}\n\nexport function updateCategory(\n httpClient: HttpClient\n): UpdateCategorySignature {\n return (_id: string, category: NonNullablePaths<UpdateCategory, `name`, 2>) =>\n universalUpdateCategory(\n _id,\n category,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCategorySignature {\n /**\n * Updates a category.\n *\n *\n * Each time the category is updated, revision increments by 1. You must include\n * the number of the existing revision when updating the category. This ensures\n * you're working with the latest service information and prevents unintended\n * overwrites.\n * @param - Category ID.\n * @deprecated\n */\n (_id: string, category: NonNullablePaths<UpdateCategory, `name`, 2>): Promise<\n NonNullablePaths<UpdateCategoryResponse, `category.status`, 3> & {\n __applicationErrorsType?: UpdateCategoryApplicationErrors;\n }\n >;\n}\n\nexport function deleteCategory(\n httpClient: HttpClient\n): DeleteCategorySignature {\n return (_id: string, options?: DeleteCategoryOptions) =>\n universalDeleteCategory(\n _id,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteCategorySignature {\n /**\n * Deletes a category.\n *\n *\n * You can specify `{\"deleteServices\": true}` to also delete all associated\n * services. Learn more about *deleting a service*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service)).\n * @param - ID of the category to delete.\n * @deprecated\n */\n (\n _id: string,\n options?: DeleteCategoryOptions\n ): Promise<DeleteCategoryResponse>;\n}\n\nexport const onCategoryNotification = EventDefinition(\n 'com.wixpress.bookings.services.api.v1.CategoryNotification',\n false,\n (event: CategoryNotificationEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(event)\n)<CategoryNotificationEnvelope>();\n\nexport {\n BaseEventMetadata,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n Category,\n CategoryNotification,\n CategoryNotificationEnvelope,\n CreateCategoryRequest,\n CreateCategoryResponse,\n DeleteCategoryOptions,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n Event,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCategoriesOptions,\n ListCategoryRequest,\n ListCategoryResponse,\n MessageEnvelope,\n Status,\n UpdateCategory,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\n","import {\n listCategories as publicListCategories,\n createCategory as publicCreateCategory,\n updateCategory as publicUpdateCategory,\n deleteCategory as publicDeleteCategory,\n} from './bookings-v1-category-categories.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 { onCategoryNotification as publicOnCategoryNotification } from './bookings-v1-category-categories.public.js';\n\nexport const listCategories: MaybeContext<\n BuildRESTFunction<typeof publicListCategories> & typeof publicListCategories\n> = /*#__PURE__*/ createRESTModule(publicListCategories);\nexport const createCategory: MaybeContext<\n BuildRESTFunction<typeof publicCreateCategory> & typeof publicCreateCategory\n> = /*#__PURE__*/ createRESTModule(publicCreateCategory);\nexport const updateCategory: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCategory> & typeof publicUpdateCategory\n> = /*#__PURE__*/ createRESTModule(publicUpdateCategory);\nexport const deleteCategory: MaybeContext<\n BuildRESTFunction<typeof publicDeleteCategory> & typeof publicDeleteCategory\n> = /*#__PURE__*/ createRESTModule(publicDeleteCategory);\n/** @deprecated */\nexport const onCategoryNotification: BuildEventDefinition<\n typeof publicOnCategoryNotification\n> &\n typeof publicOnCategoryNotification = createEventModule(\n publicOnCategoryNotification\n);\n\nexport {\n Status,\n Event,\n WebhookIdentityType,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n Category,\n ListCategoryRequest,\n ListCategoryResponse,\n CategoryNotification,\n CreateCategoryRequest,\n CreateCategoryResponse,\n BatchCreateCategoryRequest,\n BatchCreateCategoryResponse,\n UpdateCategoryRequest,\n UpdateCategoryResponse,\n DeleteCategoryRequest,\n DeleteCategoryResponse,\n BatchDeleteCategoryRequest,\n BatchDeleteCategoryResponse,\n BatchUpdateCategoryRequest,\n BatchUpdateCategoryResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n CategoryNotificationEnvelope,\n ListCategoriesOptions,\n UpdateCategory,\n DeleteCategoryOptions,\n} from './bookings-v1-category-categories.universal.js';\nexport {\n StatusWithLiterals,\n EventWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateCategoryApplicationErrors,\n} from './bookings-v1-category-categories.universal.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 AddBookingsToMultiServiceBookingApplicationErrors,\n AddBookingsToMultiServiceBookingOptions,\n AddBookingsToMultiServiceBookingResponse,\n Booking,\n BookingCanceledEnvelope,\n BookingConfirmedEnvelope,\n BookingCreatedEnvelope,\n BookingDeclinedEnvelope,\n BookingNumberOfParticipantsUpdatedEnvelope,\n BookingRescheduledEnvelope,\n BookingUpdatedEnvelope,\n BulkConfirmOrDeclineBookingApplicationErrors,\n BulkConfirmOrDeclineBookingOptions,\n BulkConfirmOrDeclineBookingRequestBookingDetails,\n BulkConfirmOrDeclineBookingResponse,\n BulkCreateBookingApplicationErrors,\n BulkCreateBookingOptions,\n BulkCreateBookingResponse,\n BulkGetMultiServiceBookingAllowedActionsResponse,\n CancelBookingApplicationErrors,\n CancelBookingOptions,\n CancelBookingResponse,\n CancelMultiServiceBookingApplicationErrors,\n CancelMultiServiceBookingOptions,\n CancelMultiServiceBookingResponse,\n ConfirmBookingApplicationErrors,\n ConfirmBookingOptions,\n ConfirmBookingResponse,\n ConfirmMultiServiceBookingApplicationErrors,\n ConfirmMultiServiceBookingOptions,\n ConfirmMultiServiceBookingResponse,\n ConfirmOrDeclineBookingApplicationErrors,\n ConfirmOrDeclineBookingOptions,\n ConfirmOrDeclineBookingResponse,\n CreateBookingApplicationErrors,\n CreateBookingInfo,\n CreateBookingOptions,\n CreateBookingResponse,\n CreateMultiServiceBookingApplicationErrors,\n CreateMultiServiceBookingOptions,\n CreateMultiServiceBookingResponse,\n DeclineBookingApplicationErrors,\n DeclineBookingOptions,\n DeclineBookingResponse,\n DeclineMultiServiceBookingApplicationErrors,\n DeclineMultiServiceBookingOptions,\n DeclineMultiServiceBookingResponse,\n GetMultiServiceBookingAvailabilityApplicationErrors,\n GetMultiServiceBookingAvailabilityResponse,\n MarkBookingAsPendingApplicationErrors,\n MarkBookingAsPendingOptions,\n MarkBookingAsPendingResponse,\n MarkMultiServiceBookingAsPendingApplicationErrors,\n MarkMultiServiceBookingAsPendingOptions,\n MarkMultiServiceBookingAsPendingResponse,\n MultiServiceBooking,\n RemoveBookingsFromMultiServiceBookingApplicationErrors,\n RemoveBookingsFromMultiServiceBookingOptions,\n RemoveBookingsFromMultiServiceBookingResponse,\n RescheduleBookingApplicationErrors,\n RescheduleBookingInfo,\n RescheduleBookingOptions,\n RescheduleBookingResponse,\n RescheduleMultiServiceBookingApplicationErrors,\n RescheduleMultiServiceBookingOptions,\n RescheduleMultiServiceBookingResponse,\n SetBookingSubmissionIdApplicationErrors,\n SetBookingSubmissionIdResponse,\n UpdateExtendedFieldsApplicationErrors,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsResponse,\n UpdateNumberOfParticipantsApplicationErrors,\n UpdateNumberOfParticipantsOptions,\n UpdateNumberOfParticipantsResponse,\n V2Slot,\n addBookingsToMultiServiceBooking as universalAddBookingsToMultiServiceBooking,\n bulkConfirmOrDeclineBooking as universalBulkConfirmOrDeclineBooking,\n bulkCreateBooking as universalBulkCreateBooking,\n bulkGetMultiServiceBookingAllowedActions as universalBulkGetMultiServiceBookingAllowedActions,\n cancelBooking as universalCancelBooking,\n cancelMultiServiceBooking as universalCancelMultiServiceBooking,\n confirmBooking as universalConfirmBooking,\n confirmMultiServiceBooking as universalConfirmMultiServiceBooking,\n confirmOrDeclineBooking as universalConfirmOrDeclineBooking,\n createBooking as universalCreateBooking,\n createMultiServiceBooking as universalCreateMultiServiceBooking,\n declineBooking as universalDeclineBooking,\n declineMultiServiceBooking as universalDeclineMultiServiceBooking,\n getMultiServiceBooking as universalGetMultiServiceBooking,\n getMultiServiceBookingAvailability as universalGetMultiServiceBookingAvailability,\n markBookingAsPending as universalMarkBookingAsPending,\n markMultiServiceBookingAsPending as universalMarkMultiServiceBookingAsPending,\n removeBookingsFromMultiServiceBooking as universalRemoveBookingsFromMultiServiceBooking,\n rescheduleBooking as universalRescheduleBooking,\n rescheduleMultiServiceBooking as universalRescheduleMultiServiceBooking,\n setBookingSubmissionId as universalSetBookingSubmissionId,\n updateExtendedFields as universalUpdateExtendedFields,\n updateNumberOfParticipants as universalUpdateNumberOfParticipants,\n} from './bookings-v2-booking-bookings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function confirmOrDeclineBooking(\n httpClient: HttpClient\n): ConfirmOrDeclineBookingSignature {\n return (bookingId: string, options?: ConfirmOrDeclineBookingOptions) =>\n universalConfirmOrDeclineBooking(\n bookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConfirmOrDeclineBookingSignature {\n /**\n * Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based\n * on the `paymentStatus` you provide, double booking conflicts, and whether\n * the service requires business approval.\n *\n * ### eCommerce checkout restriction\n *\n * Call this method only when using a custom checkout page. Don't\n * call it when using a *Wix eCommerce checkout*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).\n * In such cases, Wix automatically updates the booking status based on\n * the `paymentStatus` of the corresponding *Wix eCommerce order*\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).\n *\n * ### New booking status\n *\n * The booking `status` is set to `DECLINED` if both of the following conditions\n * are met:\n * + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.\n * + There is a double booking conflict.\n *\n * If only one or none of these conditions is met, `status` is set to `PENDING`\n * or `CONFIRMED` depending on whether the service requires business approval.\n *\n * ### Double bookings\n *\n * If there is a double booking conflict, but the booking has already been at least\n * partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.\n * Then, it also sets `doubleBooked` to `true`.\n *\n * ### Admin overwrites\n *\n * There are small but important differences in confirmation behavior if the\n * booking was created with special `flowControlSettings`:\n * + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to\n * `true`, the booking is never declined regardless of double booking conflicts.\n * Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the\n * service requires business approval.\n * + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to\n * `true`, the booking skips `PENDING` status and is marked `CONFIRMED`\n * immediately.\n * @param - ID of the booking to confirm or decline.\n */\n (bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<\n NonNullablePaths<\n ConfirmOrDeclineBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;\n }\n >;\n}\n\nexport function bulkConfirmOrDeclineBooking(\n httpClient: HttpClient\n): BulkConfirmOrDeclineBookingSignature {\n return (\n details: NonNullablePaths<\n BulkConfirmOrDeclineBookingRequestBookingDetails,\n `bookingId`,\n 2\n >[],\n options?: BulkConfirmOrDeclineBookingOptions\n ) =>\n universalBulkConfirmOrDeclineBooking(\n details,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkConfirmOrDeclineBookingSignature {\n /**\n * Confirms or declines up to 300 bookings.\n *\n *\n * See *Confirm Or Decline Booking*\n * ([SDK](https://dev.wix.com/docs/velo/api-reference/wix-bookings-v2/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking))\n * for details about when a booking is confirmed or declined.\n * @param - Bookings to confirm or decline.\n */\n (\n details: NonNullablePaths<\n BulkConfirmOrDeclineBookingRequestBookingDetails,\n `bookingId`,\n 2\n >[],\n options?: BulkConfirmOrDeclineBookingOptions\n ): Promise<\n NonNullablePaths<\n BulkConfirmOrDeclineBookingResponse,\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 | `results.${number}.item.totalParticipants`\n | `results.${number}.item.status`\n | `results.${number}.item.paymentStatus`\n | `results.${number}.item.selectedPaymentOption`\n | `results.${number}.item.createdBy.anonymousVisitorId`\n | `results.${number}.item.createdBy.memberId`\n | `results.${number}.item.createdBy.wixUserId`\n | `results.${number}.item.createdBy.appId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;\n }\n >;\n}\n\nexport function createBooking(httpClient: HttpClient): CreateBookingSignature {\n return (\n booking: NonNullablePaths<\n Booking,\n `additionalFields.${number}._id` | `bookedEntity`,\n 4\n >,\n options?: CreateBookingOptions\n ) =>\n universalCreateBooking(\n booking,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateBookingSignature {\n /**\n * Creates a booking.\n *\n *\n * ### Appointment booking\n *\n * For appointment-based services, specify the relevant `slot` in\n * `bookedEntity.slot`. We recommend specifying the complete\n * `availabilityEntries.slot` returned in Query Availability\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))\n * in your call's request to avoid failed calls due to unavailability.\n *\n * ### Class session booking\n *\n * For class services, specify the relevant event ID\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 * as `bookedEntity.slot.eventId`.\n * We recommend retrieving the event ID from Query Availability's\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))\n * `availabilityEntries.slot.eventId` to avoid failed calls due to unavailability.\n * Specifying an event ID leads to automatic calculations of `slot.startDate`, `slot.endDate`,\n * `slot.timezone`, `slot.resource`, and `slot.location`. All manually specified\n * values are overridden.\n *\n * ### Course booking\n *\n * For course services, specify the course's schedule ID in `bookedEntity.schedule.scheduleId`.\n * We recommend following [this sample flow](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flows#book-a-course)\n * to minimize failed calls due to unavailability.\n *\n * ### Booking status\n *\n * Create Booking defaults to `status=CREATED`. Such bookings aren't visible in the [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar).\n *\n * Only [identities](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) with `Manage Bookings` permissions can set `status=CONFIRMED`.\n *\n * ### Related resources\n *\n * Specifying a `resource` triggers an availability check, and the Create Booking call fails if the resource is unavailable.\n *\n * If you omit `resource`, resource assignment and availability validation occur during booking confirmation.\n * If no resources are available, the behavior depends on the confirmation method used and payment status.\n *\n * ### Participant information\n *\n * You must specify either `participantsChoices` or `totalParticipants`.\n * The call fails if the specified `participantsChoices` aren't among the supported\n * _service options and variants_\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer that's send\n * immediately. Ensure `participantNotification.notifyParticipants` is set to `true`\n * to send the message.\n *\n * If you specify `{\"sendSmsReminder\": true}`, the customer receives an SMS 24 hours\n * before the session starts. The phone number is taken from `contactDetails.phone`.\n *\n * ### Payment options\n *\n * The specified `selectedPaymentOption` indicates how the customer intends to pay, allowing for later changes to a different method supported by the service.\n *\n * ### Payment status\n *\n * All bookings are created with `paymentStatus=UNDEFINED`, ignoring the payment status you specify.\n *\n * For customers paying with a Wix eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/checkout/introduction)), Wix Bookings automatically syncs the booking's payment status from the corresponding eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).\n *\n * For customers using a custom checkout, call Confirm or Decline Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)) to update booking's payment status manually.\n *\n * ### Booking form data\n *\n * When customers sign up for a service, they must fill out the booking form.\n * To create a booking with a completed booking form, specify the relevant data in\n * `formSubmission`. Ensure the values of the corresponding fields in\n * `booking.contactDetails` and `formSubmission` are identical. If these values\n * don't match, Create Booking fails. Therefore, we recommend specifying\n * only `booking.contactDetails.contactId` when providing `formSubmission`.\n *\n * ### Admin overwrites\n *\n * There are small but important differences when you specify special\n * `flowControlSettings`:\n *\n * - `{\"skipAvailabilityValidation\": true}`: The call succeeds\n * regardless of availability. If you don't specify any resource, the call\n * succeeds even if no resource of the relevant type is available.\n * - `{\"skipBusinessConfirmation\": true}`: Automatically confirms `PENDING`\n * bookings that require manual confirmation.\n * - `{\"skipSelectedPaymentOptionValidation\": true}`: Allows customers to pay\n * with payment methods that aren't supported for the service.\n *\n * When using special `flowControlSettings`, ensure you have sufficient\n * permissions. If you encounter failed calls due to insufficient permissions,\n * consider the following options:\n *\n * - **App developers** can use a higher\n * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),\n * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.\n * - **Site developers** can utilize\n * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).\n *\n * Granting additional permissions and using elevation permits method calls that\n * would typically fail due to authorization checks. Therefore, you should use\n * them intentionally and securely.\n * @param - The booking to create.\n */\n (\n booking: NonNullablePaths<\n Booking,\n `additionalFields.${number}._id` | `bookedEntity`,\n 4\n >,\n options?: CreateBookingOptions\n ): Promise<\n NonNullablePaths<\n CreateBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: CreateBookingApplicationErrors;\n }\n >;\n}\n\nexport function bulkCreateBooking(\n httpClient: HttpClient\n): BulkCreateBookingSignature {\n return (\n createBookingsInfo: NonNullablePaths<\n CreateBookingInfo,\n | `booking`\n | `booking.additionalFields.${number}._id`\n | `booking.bookedEntity`,\n 5\n >[],\n options?: BulkCreateBookingOptions\n ) =>\n universalBulkCreateBooking(\n createBookingsInfo,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateBookingSignature {\n /**\n * Creates up to 8 bookings.\n *\n *\n * See Create Booking\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/create-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking))\n * for more information.\n *\n * If any of the specified bookings is missing a required field the entire call\n * fails.\n *\n * If you specify 1 or more unavailable bookings, the call succeeds\n * while the unavailable bookings aren't created. Instead, they're counted as\n * failures in the returned `bulkActionMetadata`.\n * @param - Bookings to create.\n *\n * Max: 8 bookings\n */\n (\n createBookingsInfo: NonNullablePaths<\n CreateBookingInfo,\n | `booking`\n | `booking.additionalFields.${number}._id`\n | `booking.bookedEntity`,\n 5\n >[],\n options?: BulkCreateBookingOptions\n ): Promise<\n NonNullablePaths<\n BulkCreateBookingResponse,\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 | `results.${number}.item.totalParticipants`\n | `results.${number}.item.status`\n | `results.${number}.item.paymentStatus`\n | `results.${number}.item.selectedPaymentOption`\n | `results.${number}.item.createdBy.anonymousVisitorId`\n | `results.${number}.item.createdBy.memberId`\n | `results.${number}.item.createdBy.wixUserId`\n | `results.${number}.item.createdBy.appId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkCreateBookingApplicationErrors;\n }\n >;\n}\n\nexport function rescheduleBooking(\n httpClient: HttpClient\n): RescheduleBookingSignature {\n return (\n bookingId: string,\n slot: V2Slot,\n options?: NonNullablePaths<RescheduleBookingOptions, `revision`, 2>\n ) =>\n universalRescheduleBooking(\n bookingId,\n slot,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RescheduleBookingSignature {\n /**\n * Reschedules an appointment booking to a different slot or a class booking to\n * a different session.\n *\n *\n * ### Course booking limitation\n *\n * You can't reschedule course bookings.\n *\n * ### Appointment sessions\n *\n * For appointments, the old session is removed from the business calendar\n * while a new session is added. We recommend calling Query Availability\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))\n * first and specifying the entire retrieved `slot`.\n *\n * ### Class sessions\n *\n * For classes, the new session must be an existing session belonging to the\n * same class. We recommend retrieving `availabilityEntries.slot.eventId`\n * from Query Availability\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/availability-calendar/query-availability))\n * to avoid failed Reschedule Booking calls due to unavailability. Specify\n * only `slot.eventId` instead of the entire `slot` object.\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer. To send\n * the message, you must also specify `participantNotification.notifyParticipants`\n * as `true`.\n *\n * ### Admin overwrites\n *\n * There are small but important differences when you specify special\n * `flowControlSettings`:\n *\n * - `{\"ignoreReschedulePolicy\": true}`: The call succeeds even if the\n * service's `reschedulePolicy` doesn't allow it.\n * - `{\"skipAvailabilityValidation\": true}`: The call succeeds even if\n * the specified session, slot, or resource isn't available. If you don't\n * specify any resource, the call succeeds even if no resource of the relevant\n * type is available.\n * - `{\"skipBusinessConfirmation\": true}`: Any `PENDING` booking is\n * automatically confirmed even if the services requires the merchants's\n * manual confirmation.\n *\n * When using special `flowControlSettings`, ensure you have sufficient\n * permissions. If you encounter failed calls due to insufficient permissions,\n * consider the following options:\n *\n * - **App developers** can use a higher\n * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),\n * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.\n * - **Site developers** can utilize\n * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).\n *\n * Granting additional permissions and using elevation permits method calls that\n * would typically fail due to authorization checks. Therefore, you should use\n * them intentionally and securely.\n * @param - ID of the booking to reschedule.\n * @param - New slot of the booking.\n * @param - An object representing the available options for rescheduling a booking.\n */\n (\n bookingId: string,\n slot: V2Slot,\n options?: NonNullablePaths<RescheduleBookingOptions, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n RescheduleBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: RescheduleBookingApplicationErrors;\n }\n >;\n}\n\nexport function confirmBooking(\n httpClient: HttpClient\n): ConfirmBookingSignature {\n return (\n bookingId: string,\n revision: string,\n options?: ConfirmBookingOptions\n ) =>\n universalConfirmBooking(\n bookingId,\n revision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConfirmBookingSignature {\n /**\n * Updates the booking status to `CONFIRMED` without checking whether the relevant slot or schedule is still available.\n *\n *\n * ### eCommerce checkout restriction\n *\n * Call this method only when using a custom checkout page. Don't\n * call it when using a Wix eCommerce checkout\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).\n * In such cases, Wix automatically updates the booking status based on\n * the `paymentStatus` of the corresponding Wix eCommerce order\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).\n *\n * ### When to call Confirm Or Decline Booking instead\n *\n * Confirm Booking doesn't check whether a slot or schedule is still available.\n * For these checks, call Confirm or Decline Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)) instead.\n *\n * ### Original status validation\n *\n * You can only confirm bookings with a status of `PENDING`, `CREATED`, or\n * `WAITING_LIST`.\n *\n * ### Double bookings\n *\n * Confirm Booking doesn't check whether a slot or schedule is still available.\n * You can specify\n *\n * ```json\n * {\n * \"flowControlSettings\": {\n * \"checkAvailabilityValidation\": true\n * },\n * \"doubleBooked\": true\n * }\n * ```\n * to forcefully set the booking's `doubleBooked` flag to `true`, regardless of\n * a potential double booking conflict. You must call with `Manage Bookings`\n * permissions to do so. For the default flow control settings\n * `{\"checkAvailabilityValidation\": false}`, the specified `doubleBooked` value\n * is ignored.\n *\n * ### Payment status\n *\n * Also updates the booking's `paymentStatus`, if you specify a new payment\n * status.\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer. To send\n * the message, you must also specify `participantNotification.notifyParticipants`\n * as `true`.\n * @param - ID of the booking to confirm.\n * @param - Revision number, which increments by 1 each time the booking is updated.\n * To prevent conflicting changes, the current revision must be passed when\n * updating the booking.\n * @param - An object representing the available options for canceling a booking.\n */\n (\n bookingId: string,\n revision: string,\n options?: ConfirmBookingOptions\n ): Promise<\n NonNullablePaths<\n ConfirmBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: ConfirmBookingApplicationErrors;\n }\n >;\n}\n\nexport function setBookingSubmissionId(\n httpClient: HttpClient\n): SetBookingSubmissionIdSignature {\n return (bookingId: string, submissionId: string) =>\n universalSetBookingSubmissionId(\n bookingId,\n submissionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetBookingSubmissionIdSignature {\n /**\n * Setting `submission_id` for a booking after the form submission is created.\n * @param - ID of the booking to set `submissionId` for.\n * @param - ID of the form submission to set on the booking.\n */\n (bookingId: string, submissionId: string): Promise<\n NonNullablePaths<\n SetBookingSubmissionIdResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: SetBookingSubmissionIdApplicationErrors;\n }\n >;\n}\n\nexport function updateExtendedFields(\n httpClient: HttpClient\n): UpdateExtendedFieldsSignature {\n return (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>\n ) =>\n universalUpdateExtendedFields(\n _id,\n namespace,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateExtendedFieldsSignature {\n /**\n * Updates the extended fields for a booking.\n *\n *\n * If you specify an extended field `namespace` that doesn't exist yet, it's\n * created.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/about-backend-extensions#schema-plugin-extensions).\n * @param - ID of the booking for which to update extended fields.\n * @param - [Namespace](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-reading-and-writing-schema-plugin-fields#namespaces) of the app for which to update extended fields.\n * @param - Options for updating the booking's extended fields.\n */\n (\n _id: string,\n namespace: string,\n options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>\n ): Promise<\n NonNullablePaths<UpdateExtendedFieldsResponse, `namespace`, 2> & {\n __applicationErrorsType?: UpdateExtendedFieldsApplicationErrors;\n }\n >;\n}\n\nexport function declineBooking(\n httpClient: HttpClient\n): DeclineBookingSignature {\n return (\n bookingId: string,\n revision: string,\n options?: DeclineBookingOptions\n ) =>\n universalDeclineBooking(\n bookingId,\n revision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeclineBookingSignature {\n /**\n * Updates the booking status to `DECLINED` and updates the relevant session's\n * `participants.approvalStatus` to `DECLINED` without checking whether the relevant\n * slot or schedule is still available.\n *\n *\n * ### eCommerce checkout restriction\n *\n * Call this method only when using a custom checkout page. Don't\n * call it when using a Wix eCommerce checkout\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).\n * In such cases, Wix automatically updates the booking status based on\n * the `paymentStatus` of the corresponding Wix eCommerce order\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)).\n *\n * ### When to call Confirm Or Decline Booking instead\n *\n * The method doesn't check whether a slot or schedule is still available. For\n * these checks you can call Confirm or Decline Booking\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-or-decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)).\n *\n * ### Original status validation\n *\n * You can only decline bookings with a `status` of `PENDING`, `CREATED`, or\n * `WAITING_LIST`.\n *\n * ### Payment status\n *\n * Also updates the booking's `paymentStatus`, if you specify a new payment\n * status.\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer. To send\n * the message, you must also specify `participantNotification.notifyParticipants`\n * as `true`.\n * @param - ID of the booking to decline.\n * @param - Revision number, which increments by 1 each time the booking is updated.\n *\n * To prevent conflicting changes, the current revision must be specified when\n * declining the booking.\n * @param - An object representing the available options for declining a booking.\n */\n (\n bookingId: string,\n revision: string,\n options?: DeclineBookingOptions\n ): Promise<\n NonNullablePaths<\n DeclineBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: DeclineBookingApplicationErrors;\n }\n >;\n}\n\nexport function cancelBooking(httpClient: HttpClient): CancelBookingSignature {\n return (\n bookingId: string,\n options?: NonNullablePaths<CancelBookingOptions, `revision`, 2>\n ) =>\n universalCancelBooking(\n bookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelBookingSignature {\n /**\n * Updates the booking status to `CANCELED`.\n *\n *\n * ### Appointments\n *\n * For appointments, the corresponding event is removed from the Bookings\n * calendar.\n *\n * ### Class and course bookings\n *\n * For class or course bookings, the relevant participants are removed\n * from the class session or the course. However, the class session or course\n * remain on the business calendar.\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer. To send\n * the message, you must also specify `participantNotification.notifyParticipants`\n * as `true`.\n *\n * ### Admin overwrites\n *\n * There are small but important differences when you specify special\n * `flowControlSettings`:\n *\n * - `{\"ignoreCancellationPolicy\": true}`: The call succeeds even if the\n * service's `cancellationPolicy` doesn't allow it.\n * - `{\"withRefund\": true}`: The customer is refunded even if the service's\n * `refundPolicy` doesn't allow it.\n * - `{\"waiveCancellationFee\": true}`: The customer doesn't have to pay\n * the cancellation fee, even if the service's `cancellationPolicy` requires it.\n *\n * When using special `flowControlSettings`, ensure you have sufficient\n * permissions. If you encounter failed calls due to insufficient permissions,\n * consider the following options:\n *\n * - **App developers** can use a higher\n * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions),\n * such as `MANAGE BOOKINGS - ALL PERMISSIONS`.\n * - **Site developers** can utilize\n * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).\n *\n * Granting additional permissions and using elevation permits method calls that\n * would typically fail due to authorization checks. Therefore, you should use\n * them intentionally and securely.\n * @param - ID of the booking to cancel.\n * @param - An object representing the available options for canceling a booking.\n */\n (\n bookingId: string,\n options?: NonNullablePaths<CancelBookingOptions, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n CancelBookingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: CancelBookingApplicationErrors;\n }\n >;\n}\n\nexport function updateNumberOfParticipants(\n httpClient: HttpClient\n): UpdateNumberOfParticipantsSignature {\n return (\n bookingId: string,\n options?: NonNullablePaths<UpdateNumberOfParticipantsOptions, `revision`, 2>\n ) =>\n universalUpdateNumberOfParticipants(\n bookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateNumberOfParticipantsSignature {\n /**\n * Updates the number of participants for a class or course booking and changes\n * the `totalNumberOfParticipants` for the relevant sessions.\n *\n *\n * ### Appointment limitation\n *\n * You can't update the number of participants for appointment bookings.\n *\n * ### Participant information\n *\n * You must specify either `participantsChoices` or `totalParticipants`.\n * The call fails if the specified `participantsChoices` aren't among the\n * supported service options and variants\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).\n * @param - ID of the booking to update the number of participants for.\n */\n (\n bookingId: string,\n options?: NonNullablePaths<UpdateNumberOfParticipantsOptions, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n UpdateNumberOfParticipantsResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: UpdateNumberOfParticipantsApplicationErrors;\n }\n >;\n}\n\nexport function markBookingAsPending(\n httpClient: HttpClient\n): MarkBookingAsPendingSignature {\n return (\n bookingId: string,\n revision: string,\n options?: MarkBookingAsPendingOptions\n ) =>\n universalMarkBookingAsPending(\n bookingId,\n revision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MarkBookingAsPendingSignature {\n /**\n * Updates the booking status to `PENDING`.\n *\n *\n * ### Service requirement\n *\n * By default, this method only works for services ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)) with `service.onlineBooking.requireManualApproval` set to `true`.\n * If you attempt to mark a booking as pending for a service that doesn't require approval, the call fails unless you use the `skipPendingApprovalServiceValidation` admin overwrite.\n *\n * ### Status requirements\n *\n * - __Original status__: Booking must have `CREATED` status.\n * - __Target status__: Booking moves to `PENDING`.\n *\n * ### Checkout restrictions\n *\n * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/introduction)), Wix Bookings automatically manages the bookings' statuses based on payment processing.\n *\n * When using custom checkouts, you can also update the booking's `paymentStatus` by specifying a new payment status.\n *\n * ### Business workflow\n *\n * After marking a booking as `PENDING`, the business must manually approve or reject it. You can call these methods:\n * - Confirm Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking)).\n * - Decline Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking)).\n *\n * ### Resource availability and scheduling\n *\n * Marking a booking as `PENDING` immediately affects resource availability:\n *\n * - **Calendar impact**: The booking appears on the business calendar.\n * - **Availability**: The time slot becomes unavailable for other bookings, even while pending approval.\n * - **Resource assignment**: Available resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) are automatically assigned if none were explicitly selected during booking creation.\n *\n * ### Double bookings\n *\n * By default, the method doesn't check for availability conflicts. To detect and handle double bookings, use the `checkAvailabilityValidation: true` admin overwrite.\n *\n * ### Notify customers\n *\n * You can specify a `participantNotification.message` for the customer.\n * To send the message, you must also specify `participantNotification.notifyParticipants` as `true`.\n *\n * ### Admin overwrites\n *\n * There are small but important differences when you specify special\n * `flowControlSettings`:\n *\n * - `{\"checkAvailabilityValidation\": true}`: Checks for double booking conflicts before updating the status.\n * When conflicts exist, the booking is still marked as `PENDING` and `doubleBooked` is set to `true` for the business to resolve manually.\n * - `{\"skipPendingApprovalServiceValidation\": true}`: Allows marking any booking as pending, even if the service doesn't require manual approval.\n *\n * When using special `flowControlSettings`, ensure you have sufficient permissions.\n * If you encounter failed calls due to insufficient permissions, consider the following options:\n *\n * - __App developers__ can use a higher\n * [permission](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions), such as `MANAGE BOOKINGS - ALL PERMISSIONS`.\n * - __Site developers__ can utilize\n * [elevation](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/authorization/elevation).\n *\n * Granting additional permissions and using elevation permits method calls that would typically fail due to authorization checks.\n * Therefore, you should use them intentionally and securely.\n * @param - ID of the booking to mark as `PENDING`.\n * @param - Revision number, which increments by 1 each time the booking is updated.\n *\n * To prevent conflicting changes, the current revision must be specified when\n * managing the booking.\n */\n (\n bookingId: string,\n revision: string,\n options?: MarkBookingAsPendingOptions\n ): Promise<\n NonNullablePaths<\n MarkBookingAsPendingResponse,\n | `booking.totalParticipants`\n | `booking.participantsChoices.serviceChoices`\n | `booking.bookedEntity.slot.serviceId`\n | `booking.bookedEntity.slot.scheduleId`\n | `booking.bookedEntity.slot.resource._id`\n | `booking.bookedEntity.slot.location.locationType`\n | `booking.bookedEntity.schedule.scheduleId`\n | `booking.bookedEntity.tags`\n | `booking.contactDetails.fullAddress.streetAddress.number`\n | `booking.contactDetails.fullAddress.streetAddress.name`\n | `booking.contactDetails.fullAddress.streetAddress.apt`\n | `booking.contactDetails.fullAddress.subdivisions`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.code`\n | `booking.contactDetails.fullAddress.subdivisions.${number}.name`\n | `booking.additionalFields`\n | `booking.additionalFields.${number}._id`\n | `booking.additionalFields.${number}.valueType`\n | `booking.status`\n | `booking.paymentStatus`\n | `booking.selectedPaymentOption`\n | `booking.createdBy.anonymousVisitorId`\n | `booking.createdBy.memberId`\n | `booking.createdBy.wixUserId`\n | `booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: MarkBookingAsPendingApplicationErrors;\n }\n >;\n}\n\nexport function createMultiServiceBooking(\n httpClient: HttpClient\n): CreateMultiServiceBookingSignature {\n return (\n bookings: NonNullablePaths<\n Booking,\n | `additionalFields.${number}._id`\n | `bookedEntity`\n | `bookedEntity.slot`\n | `bookedEntity.slot.endDate`\n | `bookedEntity.slot.location.locationType`\n | `bookedEntity.slot.scheduleId`\n | `bookedEntity.slot.startDate`,\n 5\n >[],\n options?: CreateMultiServiceBookingOptions\n ) =>\n universalCreateMultiServiceBooking(\n bookings,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateMultiServiceBookingSignature {\n /**\n * Creates a multi-service booking and all included single-service bookings simultaneously.\n *\n *\n * ### When to call this method\n *\n * Create sequential appointments where customers book related services together. For adding existing single-service bookings to an existing multi-service booking, call Add Bookings to Multi Service Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings-writer-v2/add-bookings-to-multi-service-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/add-bookings-to-multi-service-booking)) instead.\n *\n * ### Requirements and behavior\n *\n * __Package constraints__: Multi-service bookings support 2-8 appointment-based single-service bookings only (course and class bookings aren't supported). All single-service bookings must be at the same location with sequential scheduling and no gaps between appointments.\n *\n * __Timing specification__: You must provide complete `slot` details (`scheduleId`, `startDate`, `endDate`) for each single-service booking. Wix Bookings validates sequential timing but doesn't auto-calculate it.\n *\n * __Package pricing__: The total price equals the sum of individual services. Wix Bookings automatically syncs the payment status from the corresponding Wix eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecommerce/orders/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)) if the customer paid via an eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).\n *\n * __Package notifications__: Customers receive 1 unified notification for the entire multi-service booking. Wix Bookings doesn't send notifications for the package's individual single-service bookings.\n *\n * ### Related methods\n *\n * Verify availability first with List Multi Service Availability Time Slots ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/time-slots/multi-service-availability-time-slots/list-multi-service-availability-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/list-multi-service-availability-time-slots)).\n *\n * See Create Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/create-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-booking)) for more details about constraints and effects of creating single-service bookings.\n * @param - Between 2 to 8 new single-service booking specifications to create and combine in a multi-service booking.\n *\n * Each single-service booking specification must include `slot` details (`scheduleId`, `startDate`, and `endDate`).\n * Specify contact details, number of participants, and any additional fields as needed.\n *\n * For sequential bookings, ensure the timing allows services to be scheduled back-to-back.\n */\n (\n bookings: NonNullablePaths<\n Booking,\n | `additionalFields.${number}._id`\n | `bookedEntity`\n | `bookedEntity.slot`\n | `bookedEntity.slot.endDate`\n | `bookedEntity.slot.location.locationType`\n | `bookedEntity.slot.scheduleId`\n | `bookedEntity.slot.startDate`,\n 5\n >[],\n options?: CreateMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n CreateMultiServiceBookingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: CreateMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function rescheduleMultiServiceBooking(\n httpClient: HttpClient\n): RescheduleMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n rescheduleBookingsInfo: NonNullablePaths<\n RescheduleBookingInfo,\n `bookingId` | `revision` | `slot`,\n 2\n >[],\n options?: RescheduleMultiServiceBookingOptions\n ) =>\n universalRescheduleMultiServiceBooking(\n multiServiceBookingId,\n rescheduleBookingsInfo,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RescheduleMultiServiceBookingSignature {\n /**\n * Reschedules a multi-service booking by changing the timing for all or specific single-service bookings in the package.\n *\n *\n * This method reschedules single-service bookings within the multi-service booking while maintaining sequential order. You must specify exact new timing for each service to ensure they remain back-to-back with no gaps or overlaps.\n *\n * This method fails if it can't reschedule at least 1 single-service booking. You must provide the current revision number for each single-service booking you're rescheduling to prevent conflicting changes.\n *\n * See Reschedule Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/reschedule-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/reschedule-booking)) for single-service booking rescheduling details.\n * @param - ID of the multi-service booking to reschedule.\n * @param - Information about the single-service bookings to reschedule.\n */\n (\n multiServiceBookingId: string,\n rescheduleBookingsInfo: NonNullablePaths<\n RescheduleBookingInfo,\n `bookingId` | `revision` | `slot`,\n 2\n >[],\n options?: RescheduleMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n RescheduleMultiServiceBookingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: RescheduleMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function getMultiServiceBookingAvailability(\n httpClient: HttpClient\n): GetMultiServiceBookingAvailabilitySignature {\n return (multiServiceBookingId: string) =>\n universalGetMultiServiceBookingAvailability(\n multiServiceBookingId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetMultiServiceBookingAvailabilitySignature {\n /**\n * Checks if the business can still accommodate an existing multi-service booking and returns overall bookability status, capacity details, and policy violations.\n *\n *\n * Wix Bookings considers:\n * - The relevant services' booking policies ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)).\n * - The availability of all required resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)).\n *\n * Call this method to check if an existing multi-service booking is still valid after business configuration changes.\n * For example, staff changes, policy updates, or capacity modifications.\n *\n * For checking availability before creating new multi-service bookings, call List Multi Service Availability Time Slots\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/time-slots/multi-service-availability-time-slots/list-multi-service-availability-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/list-multi-service-availability-time-slots)) instead.\n * @param - ID of the multi-service booking to retrieve.\n */\n (multiServiceBookingId: string): Promise<\n NonNullablePaths<\n GetMultiServiceBookingAvailabilityResponse,\n `bookable` | `multiServiceBookingInfo`,\n 2\n > & {\n __applicationErrorsType?: GetMultiServiceBookingAvailabilityApplicationErrors;\n }\n >;\n}\n\nexport function cancelMultiServiceBooking(\n httpClient: HttpClient\n): CancelMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n options?: CancelMultiServiceBookingOptions\n ) =>\n universalCancelMultiServiceBooking(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelMultiServiceBookingSignature {\n /**\n * Cancels a multi-service booking and all its associated single-service bookings.\n *\n *\n * Cancels the entire multi-service booking, updating the status of all single-service bookings to `CANCELED`.\n * The call fails if all single-service bookings are already canceled or declined.\n *\n * See Cancel Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/cancel-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/cancel-booking)) for single-service booking cancellation details.\n * @param - ID of the multi-service booking to cancel.\n */\n (\n multiServiceBookingId: string,\n options?: CancelMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n CancelMultiServiceBookingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: CancelMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function markMultiServiceBookingAsPending(\n httpClient: HttpClient\n): MarkMultiServiceBookingAsPendingSignature {\n return (\n multiServiceBookingId: string,\n options?: MarkMultiServiceBookingAsPendingOptions\n ) =>\n universalMarkMultiServiceBookingAsPending(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MarkMultiServiceBookingAsPendingSignature {\n /**\n * Updates the status for all single-service bookings in a multi-service booking to `PENDING`.\n *\n *\n * Call this method for multi-service bookings requiring manual business approval before confirmation.\n *\n * ### Status requirements\n *\n * - __Original status__: All single-service bookings must have `CREATED` status.\n * - __Target status__: All bookings move to `PENDING` together (all-or-nothing operation).\n *\n * ### Checkout restrictions\n *\n * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts,\n * Wix Bookings automatically manages the bookings' statuses based on payment processing.\n *\n * ### Additional updates\n *\n * - __Payment status__: Updates if you specify a new `markAsPendingBookingsInfo.paymentStatus`.\n * - __Customer notifications__: Send messages using `participantNotification`.\n * - __Revision control__: Requires current revision numbers for all single-service bookings.\n *\n * See Mark Booking as Pending ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/mark-booking-as-pending) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/mark-booking-as-pending)) for more details about marking single-service bookings as pending.\n * @param - ID of the multi-service booking to mark as `PENDING`.\n */\n (\n multiServiceBookingId: string,\n options?: MarkMultiServiceBookingAsPendingOptions\n ): Promise<\n NonNullablePaths<\n MarkMultiServiceBookingAsPendingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: MarkMultiServiceBookingAsPendingApplicationErrors;\n }\n >;\n}\n\nexport function confirmMultiServiceBooking(\n httpClient: HttpClient\n): ConfirmMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n options?: ConfirmMultiServiceBookingOptions\n ) =>\n universalConfirmMultiServiceBooking(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConfirmMultiServiceBookingSignature {\n /**\n * Updates the status for all single-service bookings in a multi-service booking to `CONFIRMED`.\n *\n *\n * Call this method for multi-service bookings requiring manual business approval.\n *\n * ### Status requirements\n *\n * - __Original status__: All single-service bookings must have `PENDING`, `CREATED`, or `WAITING_LIST` status.\n * - __Target status__: All bookings move to `CONFIRMED` together (all-or-nothing operation).\n *\n * ### Checkout restrictions\n *\n * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts,\n * Wix Bookings automatically manages the bookings' statuses based on payment processing.\n *\n * ### Additional updates\n *\n * - __Payment status__: Updates if you specify a new `confirmBookingsInfo.paymentStatus`.\n * - __Customer notifications__: Send messages using `participantNotification`.\n * - __Revision control__: Requires current revision numbers for all single-service bookings.\n *\n * See Confirm Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/confirm-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking)) for more details about confirming single-service bookings.\n * @param - ID of the multi-service booking to confirm its related bookings.\n */\n (\n multiServiceBookingId: string,\n options?: ConfirmMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n ConfirmMultiServiceBookingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: ConfirmMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function declineMultiServiceBooking(\n httpClient: HttpClient\n): DeclineMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n options?: DeclineMultiServiceBookingOptions\n ) =>\n universalDeclineMultiServiceBooking(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeclineMultiServiceBookingSignature {\n /**\n * Updates the status for all single-service bookings in a multi-service booking to `DECLINED`.\n *\n *\n * Call this method to reject multi-service bookings that can't be accommodated or don't meet business requirements.\n *\n * ### Status requirements\n *\n * - __Original status__: All single-service bookings must have `PENDING`, `CREATED`, or `WAITING_LIST` status.\n * - __Target status__: All bookings move to `DECLINED` together (all-or-nothing operation).\n *\n * ### Checkout restrictions\n *\n * Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts,\n * Wix Bookings automatically manages the bookings' statuses based on payment processing.\n *\n * ### Additional updates\n *\n * - __Payment status__: Updates if you specify a new `declineBookingsInfo.paymentStatus`.\n * - __Customer notifications__: Send messages using `participantNotification`.\n * - __Revision control__: Requires current revision numbers for all single-service bookings.\n *\n * Refer to Decline Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/decline-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking)) for more details about declining single-service bookings.\n * @param - ID of the multi-service booking to decline.\n */\n (\n multiServiceBookingId: string,\n options?: DeclineMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n DeclineMultiServiceBookingResponse,\n | `multiServiceBooking.bookings`\n | `multiServiceBooking.bookings.${number}.booking.totalParticipants`\n | `multiServiceBooking.bookings.${number}.booking.status`\n | `multiServiceBooking.bookings.${number}.booking.paymentStatus`\n | `multiServiceBooking.bookings.${number}.booking.selectedPaymentOption`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.memberId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.wixUserId`\n | `multiServiceBooking.bookings.${number}.booking.createdBy.appId`,\n 7\n > & {\n __applicationErrorsType?: DeclineMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function bulkGetMultiServiceBookingAllowedActions(\n httpClient: HttpClient\n): BulkGetMultiServiceBookingAllowedActionsSignature {\n return (multiServiceBookingIds: string[]) =>\n universalBulkGetMultiServiceBookingAllowedActions(\n multiServiceBookingIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGetMultiServiceBookingAllowedActionsSignature {\n /**\n * Retrieves information about which actions the customer can perform for up to 50 multi-service bookings.\n *\n *\n * For each multi-service booking, the response indicates which actions are currently allowed:\n * - `cancel`: Whether the customer can cancel the multi-service booking.\n * - `reschedule`: Whether the customer can adjust the multi-service booking's timing.\n *\n * Bear the following considerations in mind when calling this method:\n *\n * __Real-time validation__: Wix Bookings calculates allowed actions based on current multi-service booking status, booking policies ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)), and available resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) at the time of the call.\n *\n * __Permission context__: Depending on the permissions of the calling [identity](https://dev.wix.com/build-apps/develop-your-app/about-identities), you may see different allowed actions for the same multi-service booking. For example, if the identity has permissions to read only part of the multi-service booking, the response indicates which single-service bookings the identity can read.\n *\n * __Status dependencies__: Allowed actions change as bookings progress through their lifecycle (`CREATED` → `PENDING` → `CONFIRMED`/`DECLINED` → `CANCELED`).\n * Bookings can skip `PENDING` and move directly from `CREATED` to `CONFIRMED`/`DECLINED` based on service configuration.\n * @param - IDs of the multi-service bookings to retrieve allowed actions for.\n */\n (multiServiceBookingIds: string[]): Promise<\n NonNullablePaths<\n BulkGetMultiServiceBookingAllowedActionsResponse,\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 | `results.${number}.item.cancel`\n | `results.${number}.item.reschedule`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function getMultiServiceBooking(\n httpClient: HttpClient\n): GetMultiServiceBookingSignature {\n return (multiServiceBookingId: string) =>\n universalGetMultiServiceBooking(\n multiServiceBookingId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetMultiServiceBookingSignature {\n /**\n * Retrieves a multi-service booking and all its associated single-service bookings.\n *\n *\n * Returns the complete multi-service booking information including its ID, associated single-service bookings, and the total number of scheduled single-service bookings.\n *\n * If you call on behalf of an [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) with permissions to read only part of the multi-service booking, only the permitted single-service bookings are retrieved.\n * The returned total number includes single-service bookings for which you don't have permissions.\n *\n * See Query Extended Bookings ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/extended-bookings/query-extended-bookings) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-reader-v2/query-extended-bookings)) for details about retrieving individual single-service bookings and additional metadata.\n * @param - ID of the multi-service booking.\n * @returns Retrieved multi-service booking.\n */\n (multiServiceBookingId: string): Promise<\n NonNullablePaths<\n MultiServiceBooking,\n | `bookings`\n | `bookings.${number}.booking.totalParticipants`\n | `bookings.${number}.booking.status`\n | `bookings.${number}.booking.paymentStatus`\n | `bookings.${number}.booking.selectedPaymentOption`\n | `bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `bookings.${number}.booking.createdBy.memberId`\n | `bookings.${number}.booking.createdBy.wixUserId`\n | `bookings.${number}.booking.createdBy.appId`,\n 6\n >\n >;\n}\n\nexport function addBookingsToMultiServiceBooking(\n httpClient: HttpClient\n): AddBookingsToMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n options?: NonNullablePaths<\n AddBookingsToMultiServiceBookingOptions,\n | `bookings`\n | `bookings.${number}.bookingId`\n | `bookings.${number}.revision`,\n 4\n >\n ) =>\n universalAddBookingsToMultiServiceBooking(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddBookingsToMultiServiceBookingSignature {\n /**\n * Expands an existing multi-service booking by adding existing single-service bookings to the package.\n *\n *\n * ### When to call this method\n *\n * Call this method to add 1 or more existing single-service bookings to an existing multi-service booking.\n * For creating a new multi-service booking with new single-service bookings, call Create Multi Service Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/create-multi-service-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/create-multi-service-booking)) instead.\n *\n * ### Package integration\n *\n * The timing of the single-service bookings to add must be compatible with the multi-service booking's sequential schedule to ensure no gaps or overlaps between services in the updated package.\n *\n * ### Requirements and limitations\n *\n * - __Maximum capacity__: The total number of single-service bookings can't exceed 8.\n * - __Booking eligibility__: You can add only independent single-service bookings that aren't part of another multi-service booking.\n * - __Status compatibility__: Added bookings must have compatible status with the target multi-service booking.\n * - __Revision control__: You must provide current revision numbers for all single-service bookings to add.\n * @param - ID of the multi-service booking.\n */\n (\n multiServiceBookingId: string,\n options?: NonNullablePaths<\n AddBookingsToMultiServiceBookingOptions,\n | `bookings`\n | `bookings.${number}.bookingId`\n | `bookings.${number}.revision`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n AddBookingsToMultiServiceBookingResponse,\n | `bookings`\n | `bookings.${number}.booking.totalParticipants`\n | `bookings.${number}.booking.status`\n | `bookings.${number}.booking.paymentStatus`\n | `bookings.${number}.booking.selectedPaymentOption`\n | `bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `bookings.${number}.booking.createdBy.memberId`\n | `bookings.${number}.booking.createdBy.wixUserId`\n | `bookings.${number}.booking.createdBy.appId`,\n 6\n > & {\n __applicationErrorsType?: AddBookingsToMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport function removeBookingsFromMultiServiceBooking(\n httpClient: HttpClient\n): RemoveBookingsFromMultiServiceBookingSignature {\n return (\n multiServiceBookingId: string,\n options?: RemoveBookingsFromMultiServiceBookingOptions\n ) =>\n universalRemoveBookingsFromMultiServiceBooking(\n multiServiceBookingId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveBookingsFromMultiServiceBookingSignature {\n /**\n * Removes single-service bookings from a multi-service booking and converts them to independent single-service bookings.\n *\n *\n * ### Removal options\n *\n * __Remove all permitted bookings__: If you specify an empty `bookings` array, all single-service bookings for which the call's [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) has read permissions are removed from the multi-service booking.\n *\n * __Selective removal__: Specify single-service booking IDs and revisions to remove only specific single-service bookings from the package.\n *\n * __Sequential scheduling__: To maintain sequential scheduling, remove only first or last single-service bookings. For middle bookings, first reschedule all relevant single-service bookings to eliminate gaps. To do so, call Reschedule Multi Service Booking ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/reschedule-multi-service-booking) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/reschedule-multi-service-booking)) before removing the unwanted bookings.\n *\n * ### Removal behavior\n *\n * __Independent bookings__: Removed single-service bookings become independent bookings.\n * You can manage them using single-service booking methods.\n *\n * __Automatic cleanup__: Multi-service bookings must contain at least 2 services.\n * If removal results in only 1 remaining single-service booking for the multi-service booking, the entire multi-service booking is deleted and the remaining single-service booking becomes a standalone booking.\n *\n * __Revision control__: Specify current revision numbers to prevent conflicting modifications during the removal process.\n * @param - ID of the multi-service booking.\n */\n (\n multiServiceBookingId: string,\n options?: RemoveBookingsFromMultiServiceBookingOptions\n ): Promise<\n NonNullablePaths<\n RemoveBookingsFromMultiServiceBookingResponse,\n | `bookings`\n | `bookings.${number}.booking.totalParticipants`\n | `bookings.${number}.booking.status`\n | `bookings.${number}.booking.paymentStatus`\n | `bookings.${number}.booking.selectedPaymentOption`\n | `bookings.${number}.booking.createdBy.anonymousVisitorId`\n | `bookings.${number}.booking.createdBy.memberId`\n | `bookings.${number}.booking.createdBy.wixUserId`\n | `bookings.${number}.booking.createdBy.appId`,\n 6\n > & {\n __applicationErrorsType?: RemoveBookingsFromMultiServiceBookingApplicationErrors;\n }\n >;\n}\n\nexport const onBookingCanceled = EventDefinition(\n 'wix.bookings.v2.booking_canceled',\n true,\n (event: BookingCanceledEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.booking.createdDate' },\n { path: 'data.booking.startDate' },\n { path: 'data.booking.endDate' },\n { path: 'data.booking.updatedDate' },\n { path: 'data.booking.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.latitude',\n },\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.longitude',\n },\n ],\n },\n ])\n )\n)<BookingCanceledEnvelope>();\nexport const onBookingConfirmed = EventDefinition(\n 'wix.bookings.v2.booking_confirmed',\n true,\n (event: BookingConfirmedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.booking.createdDate' },\n { path: 'data.booking.startDate' },\n { path: 'data.booking.endDate' },\n { path: 'data.booking.updatedDate' },\n { path: 'data.booking.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.latitude',\n },\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.longitude',\n },\n ],\n },\n ])\n )\n)<BookingConfirmedEnvelope>();\nexport const onBookingCreated = EventDefinition(\n 'wix.bookings.v2.booking_created',\n true,\n (event: BookingCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.startDate' },\n { path: 'entity.endDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'entity.contactDetails.fullAddress.geocode.latitude' },\n { path: 'entity.contactDetails.fullAddress.geocode.longitude' },\n ],\n },\n ])\n )\n)<BookingCreatedEnvelope>();\nexport const onBookingDeclined = EventDefinition(\n 'wix.bookings.v2.booking_declined',\n true,\n (event: BookingDeclinedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.booking.createdDate' },\n { path: 'data.booking.startDate' },\n { path: 'data.booking.endDate' },\n { path: 'data.booking.updatedDate' },\n { path: 'data.booking.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.latitude',\n },\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.longitude',\n },\n ],\n },\n ])\n )\n)<BookingDeclinedEnvelope>();\nexport const onBookingNumberOfParticipantsUpdated = EventDefinition(\n 'wix.bookings.v2.booking_number_of_participants_updated',\n true,\n (event: BookingNumberOfParticipantsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.booking.createdDate' },\n { path: 'data.booking.startDate' },\n { path: 'data.booking.endDate' },\n { path: 'data.booking.updatedDate' },\n { path: 'data.booking.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.latitude',\n },\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.longitude',\n },\n ],\n },\n ])\n )\n)<BookingNumberOfParticipantsUpdatedEnvelope>();\nexport const onBookingRescheduled = EventDefinition(\n 'wix.bookings.v2.booking_rescheduled',\n true,\n (event: BookingRescheduledEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.previousStartDate' },\n { path: 'data.previousEndDate' },\n { path: 'data.booking.createdDate' },\n { path: 'data.booking.startDate' },\n { path: 'data.booking.endDate' },\n { path: 'data.booking.updatedDate' },\n { path: 'data.booking.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.latitude',\n },\n {\n path: 'data.booking.contactDetails.fullAddress.geocode.longitude',\n },\n ],\n },\n ])\n )\n)<BookingRescheduledEnvelope>();\nexport const onBookingUpdated = EventDefinition(\n 'wix.bookings.v2.booking_updated',\n true,\n (event: BookingUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.startDate' },\n { path: 'entity.endDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.canceledDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'entity.contactDetails.fullAddress.geocode.latitude' },\n { path: 'entity.contactDetails.fullAddress.geocode.longitude' },\n ],\n },\n ])\n )\n)<BookingUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n Actor,\n AddBookingsToMultiServiceBookingOptions,\n AddBookingsToMultiServiceBookingRequest,\n AddBookingsToMultiServiceBookingResponse,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AllowedActions,\n AllowedActionsAnonymously,\n AnonymousBookingUrls,\n ApplicationError,\n AvailableResources,\n BaseEventMetadata,\n BookedAddOn,\n BookedEntity,\n BookedEntityItemOneOf,\n BookedResource,\n BookedSchedule,\n BookedSlot,\n Booking,\n BookingCanceled,\n BookingCanceledEnvelope,\n BookingChanged,\n BookingConfirmed,\n BookingConfirmedEnvelope,\n BookingCreatedEnvelope,\n BookingDeclined,\n BookingDeclinedEnvelope,\n BookingDetails,\n BookingFormFilled,\n BookingIdAndRevision,\n BookingInfo,\n BookingMarkedAsPending,\n BookingNumberOfParticipantsUpdatedEnvelope,\n BookingParticipantsInfoOneOf,\n BookingPolicySettings,\n BookingPolicyViolations,\n BookingRescheduled,\n BookingRescheduledEnvelope,\n BookingRescheduledPreviousParticipantsInfoOneOf,\n BookingResult,\n BookingSource,\n BookingStatus,\n BookingUpdatedEnvelope,\n BulkActionMetadata,\n BulkBookingResult,\n BulkCalculateAllowedActionsRequest,\n BulkCalculateAllowedActionsResponse,\n BulkCalculateAllowedActionsResult,\n BulkConfirmOrDeclineBookingOptions,\n BulkConfirmOrDeclineBookingRequest,\n BulkConfirmOrDeclineBookingRequestBookingDetails,\n BulkConfirmOrDeclineBookingResponse,\n BulkCreateBookingOptions,\n BulkCreateBookingRequest,\n BulkCreateBookingResponse,\n BulkGetMultiServiceBookingAllowedActionsRequest,\n BulkGetMultiServiceBookingAllowedActionsResponse,\n BulkRescheduleBookingRequest,\n BulkRescheduleBookingRequestBooking,\n BulkRescheduleBookingResponse,\n BulkUpdateBookedScheduleRequest,\n BulkUpdateBookedScheduleResponse,\n BulkUpdateBookingRequest,\n BulkUpdateBookingResponse,\n CancelBookingAnonymouslyRequest,\n CancelBookingAnonymouslyResponse,\n CancelBookingFlowControlSettings,\n CancelBookingOptions,\n CancelBookingRequest,\n CancelBookingRequestFlowControlSettings,\n CancelBookingResponse,\n CancelMultiServiceBookingOptions,\n CancelMultiServiceBookingRequest,\n CancelMultiServiceBookingResponse,\n Clash,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ConfirmBookingFlowControlSettings,\n ConfirmBookingOptions,\n ConfirmBookingRequest,\n ConfirmBookingResponse,\n ConfirmMultiServiceBookingOptions,\n ConfirmMultiServiceBookingRequest,\n ConfirmMultiServiceBookingResponse,\n ConfirmOrDeclineBookingOptions,\n ConfirmOrDeclineBookingRequest,\n ConfirmOrDeclineBookingResponse,\n ConfirmRequest,\n ConfirmResponse,\n ConsistentQueryBookingsRequest,\n ConsistentQueryBookingsResponse,\n ContactDetails,\n CountBookingsRequest,\n CountBookingsResponse,\n CreateBookingFlowControlSettings,\n CreateBookingInfo,\n CreateBookingOptions,\n CreateBookingRequest,\n CreateBookingRequestFlowControlSettings,\n CreateBookingResponse,\n CreateMultiServiceBookingOptions,\n CreateMultiServiceBookingRequest,\n CreateMultiServiceBookingResponse,\n CursorPaging,\n Cursors,\n CustomFormField,\n DeclineBookingFlowControlSettings,\n DeclineBookingOptions,\n DeclineBookingRequest,\n DeclineBookingResponse,\n DeclineMultiServiceBookingOptions,\n DeclineMultiServiceBookingRequest,\n DeclineMultiServiceBookingResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Duration,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n FlowControlSettings,\n GetAnonymousActionDetailsRequest,\n GetAnonymousActionDetailsResponse,\n GetBookingAnonymouslyRequest,\n GetBookingAnonymouslyResponse,\n GetMultiServiceBookingAvailabilityRequest,\n GetMultiServiceBookingAvailabilityResponse,\n GetMultiServiceBookingAvailabilityResponseBookingInfo,\n GetMultiServiceBookingRequest,\n GetMultiServiceBookingResponse,\n GetScheduleAvailabilityRequest,\n GetScheduleAvailabilityResponse,\n GetSlotAvailabilityRequest,\n GetSlotAvailabilityResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentificationDataIdentityType,\n IdentityType,\n ItemMetadata,\n LegacyCreateBookingRequest,\n LegacyCreateBookingResponse,\n Location,\n LocationLocationType,\n LocationType,\n MarkBookingAsPendingFlowControlSettings,\n MarkBookingAsPendingOptions,\n MarkBookingAsPendingRequest,\n MarkBookingAsPendingResponse,\n MarkMultiServiceBookingAsPendingOptions,\n MarkMultiServiceBookingAsPendingRequest,\n MarkMultiServiceBookingAsPendingResponse,\n MaskedBooking,\n MessageEnvelope,\n MigrationCheckIfClashesWithBlockedTimeRequest,\n MigrationCheckIfClashesWithBlockedTimeResponse,\n MsidAndBookingId,\n MultiServiceBooking,\n MultiServiceBookingInfo,\n MultiServiceBookingMetadata,\n MultiServiceBookingType,\n NumberOfParticipantsUpdated,\n NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf,\n Paging,\n PagingMetadataV2,\n ParticipantChoices,\n ParticipantNotification,\n PaymentStatus,\n Platform,\n QueryBookingsRequest,\n QueryBookingsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RemoveBookingsFromMultiServiceBookingOptions,\n RemoveBookingsFromMultiServiceBookingRequest,\n RemoveBookingsFromMultiServiceBookingResponse,\n RescheduleBookingAnonymouslyRequest,\n RescheduleBookingAnonymouslyResponse,\n RescheduleBookingFlowControlSettings,\n RescheduleBookingInfo,\n RescheduleBookingInfoParticipantsInfoOneOf,\n RescheduleBookingOptions,\n RescheduleBookingOptionsParticipantsInfoOneOf,\n RescheduleBookingRequest,\n RescheduleBookingRequestFlowControlSettings,\n RescheduleBookingRequestParticipantsInfoOneOf,\n RescheduleBookingResponse,\n RescheduleMultiServiceBookingOptions,\n RescheduleMultiServiceBookingRequest,\n RescheduleMultiServiceBookingResponse,\n ResourceSelection,\n RestoreInfo,\n ScheduleAvailability,\n SelectedPaymentOption,\n SelectionMethod,\n ServiceChoice,\n ServiceChoiceChoiceOneOf,\n ServiceChoices,\n SetBookingFormAndSubmissionIdRequest,\n SetBookingFormAndSubmissionIdRequestCreatedByOneOf,\n SetBookingFormAndSubmissionIdResponse,\n SetBookingSessionIdRequest,\n SetBookingSessionIdResponse,\n SetBookingSubmissionIdRequest,\n SetBookingSubmissionIdResponse,\n Slot,\n SlotAvailability,\n SlotBookings,\n SlotLocation,\n SlotResource,\n SlotSlotResource,\n SortOrder,\n Sorting,\n StreetAddress,\n Subdivision,\n UpdateBookingRequest,\n UpdateBookingResponse,\n UpdateExtendedFieldsOptions,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n UpdateNumberOfParticipantsOptions,\n UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf,\n UpdateNumberOfParticipantsRequest,\n UpdateNumberOfParticipantsRequestParticipantsInfoOneOf,\n UpdateNumberOfParticipantsResponse,\n V2CancelBookingRequest,\n V2CancelBookingResponse,\n V2ConfirmBookingRequest,\n V2ConfirmBookingResponse,\n V2CreateBookingRequest,\n V2CreateBookingRequestBookableItemOneOf,\n V2CreateBookingRequestParticipantsInfoOneOf,\n V2CreateBookingResponse,\n V2DeclineBookingRequest,\n V2DeclineBookingResponse,\n V2RescheduleBookingRequest,\n V2RescheduleBookingRequestParticipantsInfoOneOf,\n V2RescheduleBookingResponse,\n V2Slot,\n V2UpdateNumberOfParticipantsRequest,\n V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf,\n V2UpdateNumberOfParticipantsResponse,\n ValueType,\n WaitingList,\n WebhookIdentityType,\n WebhooksIdentificationData,\n WebhooksIdentificationDataIdOneOf,\n} from './bookings-v2-booking-bookings.universal.js';\n","import {\n confirmOrDeclineBooking as publicConfirmOrDeclineBooking,\n bulkConfirmOrDeclineBooking as publicBulkConfirmOrDeclineBooking,\n createBooking as publicCreateBooking,\n bulkCreateBooking as publicBulkCreateBooking,\n rescheduleBooking as publicRescheduleBooking,\n confirmBooking as publicConfirmBooking,\n setBookingSubmissionId as publicSetBookingSubmissionId,\n updateExtendedFields as publicUpdateExtendedFields,\n declineBooking as publicDeclineBooking,\n cancelBooking as publicCancelBooking,\n updateNumberOfParticipants as publicUpdateNumberOfParticipants,\n markBookingAsPending as publicMarkBookingAsPending,\n createMultiServiceBooking as publicCreateMultiServiceBooking,\n rescheduleMultiServiceBooking as publicRescheduleMultiServiceBooking,\n getMultiServiceBookingAvailability as publicGetMultiServiceBookingAvailability,\n cancelMultiServiceBooking as publicCancelMultiServiceBooking,\n markMultiServiceBookingAsPending as publicMarkMultiServiceBookingAsPending,\n confirmMultiServiceBooking as publicConfirmMultiServiceBooking,\n declineMultiServiceBooking as publicDeclineMultiServiceBooking,\n bulkGetMultiServiceBookingAllowedActions as publicBulkGetMultiServiceBookingAllowedActions,\n getMultiServiceBooking as publicGetMultiServiceBooking,\n addBookingsToMultiServiceBooking as publicAddBookingsToMultiServiceBooking,\n removeBookingsFromMultiServiceBooking as publicRemoveBookingsFromMultiServiceBooking,\n} from './bookings-v2-booking-bookings.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 { onBookingCanceled as publicOnBookingCanceled } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingConfirmed as publicOnBookingConfirmed } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingCreated as publicOnBookingCreated } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingDeclined as publicOnBookingDeclined } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingNumberOfParticipantsUpdated as publicOnBookingNumberOfParticipantsUpdated } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingRescheduled as publicOnBookingRescheduled } from './bookings-v2-booking-bookings.public.js';\nimport { onBookingUpdated as publicOnBookingUpdated } from './bookings-v2-booking-bookings.public.js';\n\nexport const confirmOrDeclineBooking: MaybeContext<\n BuildRESTFunction<typeof publicConfirmOrDeclineBooking> &\n typeof publicConfirmOrDeclineBooking\n> = /*#__PURE__*/ createRESTModule(publicConfirmOrDeclineBooking);\nexport const bulkConfirmOrDeclineBooking: MaybeContext<\n BuildRESTFunction<typeof publicBulkConfirmOrDeclineBooking> &\n typeof publicBulkConfirmOrDeclineBooking\n> = /*#__PURE__*/ createRESTModule(publicBulkConfirmOrDeclineBooking);\nexport const createBooking: MaybeContext<\n BuildRESTFunction<typeof publicCreateBooking> & typeof publicCreateBooking\n> = /*#__PURE__*/ createRESTModule(publicCreateBooking);\nexport const bulkCreateBooking: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateBooking> &\n typeof publicBulkCreateBooking\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateBooking);\nexport const rescheduleBooking: MaybeContext<\n BuildRESTFunction<typeof publicRescheduleBooking> &\n typeof publicRescheduleBooking\n> = /*#__PURE__*/ createRESTModule(publicRescheduleBooking);\nexport const confirmBooking: MaybeContext<\n BuildRESTFunction<typeof publicConfirmBooking> & typeof publicConfirmBooking\n> = /*#__PURE__*/ createRESTModule(publicConfirmBooking);\nexport const setBookingSubmissionId: MaybeContext<\n BuildRESTFunction<typeof publicSetBookingSubmissionId> &\n typeof publicSetBookingSubmissionId\n> = /*#__PURE__*/ createRESTModule(publicSetBookingSubmissionId);\nexport const updateExtendedFields: MaybeContext<\n BuildRESTFunction<typeof publicUpdateExtendedFields> &\n typeof publicUpdateExtendedFields\n> = /*#__PURE__*/ createRESTModule(publicUpdateExtendedFields);\nexport const declineBooking: MaybeContext<\n BuildRESTFunction<typeof publicDeclineBooking> & typeof publicDeclineBooking\n> = /*#__PURE__*/ createRESTModule(publicDeclineBooking);\nexport const cancelBooking: MaybeContext<\n BuildRESTFunction<typeof publicCancelBooking> & typeof publicCancelBooking\n> = /*#__PURE__*/ createRESTModule(publicCancelBooking);\nexport const updateNumberOfParticipants: MaybeContext<\n BuildRESTFunction<typeof publicUpdateNumberOfParticipants> &\n typeof publicUpdateNumberOfParticipants\n> = /*#__PURE__*/ createRESTModule(publicUpdateNumberOfParticipants);\nexport const markBookingAsPending: MaybeContext<\n BuildRESTFunction<typeof publicMarkBookingAsPending> &\n typeof publicMarkBookingAsPending\n> = /*#__PURE__*/ createRESTModule(publicMarkBookingAsPending);\nexport const createMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicCreateMultiServiceBooking> &\n typeof publicCreateMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicCreateMultiServiceBooking);\nexport const rescheduleMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicRescheduleMultiServiceBooking> &\n typeof publicRescheduleMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicRescheduleMultiServiceBooking);\nexport const getMultiServiceBookingAvailability: MaybeContext<\n BuildRESTFunction<typeof publicGetMultiServiceBookingAvailability> &\n typeof publicGetMultiServiceBookingAvailability\n> = /*#__PURE__*/ createRESTModule(publicGetMultiServiceBookingAvailability);\nexport const cancelMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicCancelMultiServiceBooking> &\n typeof publicCancelMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicCancelMultiServiceBooking);\nexport const markMultiServiceBookingAsPending: MaybeContext<\n BuildRESTFunction<typeof publicMarkMultiServiceBookingAsPending> &\n typeof publicMarkMultiServiceBookingAsPending\n> = /*#__PURE__*/ createRESTModule(publicMarkMultiServiceBookingAsPending);\nexport const confirmMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicConfirmMultiServiceBooking> &\n typeof publicConfirmMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicConfirmMultiServiceBooking);\nexport const declineMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicDeclineMultiServiceBooking> &\n typeof publicDeclineMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicDeclineMultiServiceBooking);\nexport const bulkGetMultiServiceBookingAllowedActions: MaybeContext<\n BuildRESTFunction<typeof publicBulkGetMultiServiceBookingAllowedActions> &\n typeof publicBulkGetMultiServiceBookingAllowedActions\n> = /*#__PURE__*/ createRESTModule(\n publicBulkGetMultiServiceBookingAllowedActions\n);\nexport const getMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicGetMultiServiceBooking> &\n typeof publicGetMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicGetMultiServiceBooking);\nexport const addBookingsToMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicAddBookingsToMultiServiceBooking> &\n typeof publicAddBookingsToMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicAddBookingsToMultiServiceBooking);\nexport const removeBookingsFromMultiServiceBooking: MaybeContext<\n BuildRESTFunction<typeof publicRemoveBookingsFromMultiServiceBooking> &\n typeof publicRemoveBookingsFromMultiServiceBooking\n> = /*#__PURE__*/ createRESTModule(publicRemoveBookingsFromMultiServiceBooking);\n/**\n * Triggered when a booking is canceled.\n */\nexport const onBookingCanceled: BuildEventDefinition<\n typeof publicOnBookingCanceled\n> &\n typeof publicOnBookingCanceled = createEventModule(publicOnBookingCanceled);\n/**\n * Triggered when a booking is confirmed.\n */\nexport const onBookingConfirmed: BuildEventDefinition<\n typeof publicOnBookingConfirmed\n> &\n typeof publicOnBookingConfirmed = createEventModule(publicOnBookingConfirmed);\n/**\n * Triggered when a booking is created.\n */\nexport const onBookingCreated: BuildEventDefinition<\n typeof publicOnBookingCreated\n> &\n typeof publicOnBookingCreated = createEventModule(publicOnBookingCreated);\n/**\n * Triggered when a booking is declined.\n */\nexport const onBookingDeclined: BuildEventDefinition<\n typeof publicOnBookingDeclined\n> &\n typeof publicOnBookingDeclined = createEventModule(publicOnBookingDeclined);\n/**\n * Triggered when the number of participants is updated.\n */\nexport const onBookingNumberOfParticipantsUpdated: BuildEventDefinition<\n typeof publicOnBookingNumberOfParticipantsUpdated\n> &\n typeof publicOnBookingNumberOfParticipantsUpdated = createEventModule(\n publicOnBookingNumberOfParticipantsUpdated\n);\n/**\n * Triggered when a booking is rescheduled.\n */\nexport const onBookingRescheduled: BuildEventDefinition<\n typeof publicOnBookingRescheduled\n> &\n typeof publicOnBookingRescheduled = createEventModule(\n publicOnBookingRescheduled\n);\n/**\n * Triggered when a booked schedule is updated.\n */\nexport const onBookingUpdated: BuildEventDefinition<\n typeof publicOnBookingUpdated\n> &\n typeof publicOnBookingUpdated = createEventModule(publicOnBookingUpdated);\n\nexport {\n MultiServiceBookingType,\n LocationType,\n SelectionMethod,\n ValueType,\n BookingStatus,\n PaymentStatus,\n SelectedPaymentOption,\n Platform,\n Actor,\n IdentificationDataIdentityType,\n LocationLocationType,\n WebhookIdentityType,\n IdentityType,\n SortOrder,\n} from './bookings-v2-booking-bookings.universal.js';\nexport {\n Booking,\n BookingParticipantsInfoOneOf,\n BookedEntity,\n BookedEntityItemOneOf,\n BookedSlot,\n BookedResource,\n Location,\n ResourceSelection,\n BookedSchedule,\n ContactDetails,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n CustomFormField,\n BookingSource,\n ParticipantNotification,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n FlowControlSettings,\n ExtendedFields,\n ParticipantChoices,\n ServiceChoices,\n ServiceChoice,\n ServiceChoiceChoiceOneOf,\n Duration,\n MultiServiceBookingInfo,\n BookedAddOn,\n BookingFormFilled,\n GetAnonymousActionDetailsRequest,\n GetAnonymousActionDetailsResponse,\n AnonymousBookingUrls,\n CancelBookingAnonymouslyRequest,\n CancelBookingAnonymouslyResponse,\n RescheduleBookingAnonymouslyRequest,\n V2Slot,\n SlotSlotResource,\n SlotLocation,\n RescheduleBookingAnonymouslyResponse,\n GetBookingAnonymouslyRequest,\n GetBookingAnonymouslyResponse,\n AllowedActionsAnonymously,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n WebhooksIdentificationData,\n WebhooksIdentificationDataIdOneOf,\n SetBookingFormAndSubmissionIdRequest,\n SetBookingFormAndSubmissionIdRequestCreatedByOneOf,\n SetBookingFormAndSubmissionIdResponse,\n V2CreateBookingRequest,\n V2CreateBookingRequestBookableItemOneOf,\n V2CreateBookingRequestParticipantsInfoOneOf,\n Slot,\n SlotResource,\n CreateBookingRequestFlowControlSettings,\n V2CreateBookingResponse,\n V2CancelBookingRequest,\n CancelBookingRequestFlowControlSettings,\n V2CancelBookingResponse,\n V2RescheduleBookingRequest,\n V2RescheduleBookingRequestParticipantsInfoOneOf,\n RescheduleBookingRequestFlowControlSettings,\n V2RescheduleBookingResponse,\n V2ConfirmBookingRequest,\n V2ConfirmBookingResponse,\n V2DeclineBookingRequest,\n V2DeclineBookingResponse,\n V2UpdateNumberOfParticipantsRequest,\n V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf,\n V2UpdateNumberOfParticipantsResponse,\n ConfirmOrDeclineBookingRequest,\n ConfirmOrDeclineBookingResponse,\n BulkConfirmOrDeclineBookingRequest,\n BulkConfirmOrDeclineBookingRequestBookingDetails,\n BulkConfirmOrDeclineBookingResponse,\n BulkBookingResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n BookingChanged,\n CreateBookingRequest,\n CreateBookingFlowControlSettings,\n CreateBookingResponse,\n UpdateBookingRequest,\n UpdateBookingResponse,\n LegacyCreateBookingRequest,\n LegacyCreateBookingResponse,\n BulkUpdateBookingRequest,\n MaskedBooking,\n BulkUpdateBookingResponse,\n BulkCreateBookingRequest,\n CreateBookingInfo,\n BulkCreateBookingResponse,\n RescheduleBookingRequest,\n RescheduleBookingRequestParticipantsInfoOneOf,\n RescheduleBookingFlowControlSettings,\n RescheduleBookingResponse,\n BookingRescheduled,\n BookingRescheduledPreviousParticipantsInfoOneOf,\n IdentificationData,\n IdentificationDataIdOneOf,\n BulkRescheduleBookingRequest,\n BulkRescheduleBookingRequestBooking,\n SlotBookings,\n BulkRescheduleBookingResponse,\n BulkUpdateBookedScheduleRequest,\n BookingDetails,\n BulkUpdateBookedScheduleResponse,\n QueryBookingsRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryBookingsResponse,\n PagingMetadataV2,\n Cursors,\n ConfirmRequest,\n ConfirmResponse,\n ConfirmBookingRequest,\n ConfirmBookingFlowControlSettings,\n ConfirmBookingResponse,\n BookingConfirmed,\n ConsistentQueryBookingsRequest,\n ConsistentQueryBookingsResponse,\n SetBookingSessionIdRequest,\n SetBookingSessionIdResponse,\n SetBookingSubmissionIdRequest,\n SetBookingSubmissionIdResponse,\n UpdateExtendedFieldsRequest,\n UpdateExtendedFieldsResponse,\n DeclineBookingRequest,\n DeclineBookingFlowControlSettings,\n DeclineBookingResponse,\n BookingDeclined,\n CancelBookingRequest,\n CancelBookingFlowControlSettings,\n CancelBookingResponse,\n BookingCanceled,\n UpdateNumberOfParticipantsRequest,\n UpdateNumberOfParticipantsRequestParticipantsInfoOneOf,\n UpdateNumberOfParticipantsResponse,\n NumberOfParticipantsUpdated,\n NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf,\n BulkCalculateAllowedActionsRequest,\n BulkCalculateAllowedActionsResponse,\n BulkCalculateAllowedActionsResult,\n AllowedActions,\n GetSlotAvailabilityRequest,\n GetSlotAvailabilityResponse,\n SlotAvailability,\n WaitingList,\n BookingPolicyViolations,\n BookingPolicySettings,\n AvailableResources,\n GetScheduleAvailabilityRequest,\n GetScheduleAvailabilityResponse,\n ScheduleAvailability,\n MarkBookingAsPendingRequest,\n MarkBookingAsPendingFlowControlSettings,\n MarkBookingAsPendingResponse,\n BookingMarkedAsPending,\n MigrationCheckIfClashesWithBlockedTimeRequest,\n MsidAndBookingId,\n MigrationCheckIfClashesWithBlockedTimeResponse,\n Clash,\n CountBookingsRequest,\n CountBookingsResponse,\n CreateMultiServiceBookingRequest,\n CreateMultiServiceBookingResponse,\n MultiServiceBooking,\n BookingResult,\n RescheduleMultiServiceBookingRequest,\n RescheduleBookingInfo,\n RescheduleBookingInfoParticipantsInfoOneOf,\n RescheduleMultiServiceBookingResponse,\n GetMultiServiceBookingAvailabilityRequest,\n GetMultiServiceBookingAvailabilityResponse,\n GetMultiServiceBookingAvailabilityResponseBookingInfo,\n CancelMultiServiceBookingRequest,\n CancelMultiServiceBookingResponse,\n MarkMultiServiceBookingAsPendingRequest,\n BookingInfo,\n MarkMultiServiceBookingAsPendingResponse,\n ConfirmMultiServiceBookingRequest,\n ConfirmMultiServiceBookingResponse,\n DeclineMultiServiceBookingRequest,\n DeclineMultiServiceBookingResponse,\n BulkGetMultiServiceBookingAllowedActionsRequest,\n BulkGetMultiServiceBookingAllowedActionsResponse,\n GetMultiServiceBookingRequest,\n GetMultiServiceBookingResponse,\n MultiServiceBookingMetadata,\n AddBookingsToMultiServiceBookingRequest,\n BookingIdAndRevision,\n AddBookingsToMultiServiceBookingResponse,\n RemoveBookingsFromMultiServiceBookingRequest,\n RemoveBookingsFromMultiServiceBookingResponse,\n BaseEventMetadata,\n EventMetadata,\n BookingCanceledEnvelope,\n BookingConfirmedEnvelope,\n BookingCreatedEnvelope,\n BookingDeclinedEnvelope,\n BookingNumberOfParticipantsUpdatedEnvelope,\n BookingRescheduledEnvelope,\n BookingUpdatedEnvelope,\n ConfirmOrDeclineBookingOptions,\n BulkConfirmOrDeclineBookingOptions,\n CreateBookingOptions,\n BulkCreateBookingOptions,\n RescheduleBookingOptions,\n RescheduleBookingOptionsParticipantsInfoOneOf,\n ConfirmBookingOptions,\n UpdateExtendedFieldsOptions,\n DeclineBookingOptions,\n CancelBookingOptions,\n UpdateNumberOfParticipantsOptions,\n UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf,\n MarkBookingAsPendingOptions,\n CreateMultiServiceBookingOptions,\n RescheduleMultiServiceBookingOptions,\n CancelMultiServiceBookingOptions,\n MarkMultiServiceBookingAsPendingOptions,\n ConfirmMultiServiceBookingOptions,\n DeclineMultiServiceBookingOptions,\n AddBookingsToMultiServiceBookingOptions,\n RemoveBookingsFromMultiServiceBookingOptions,\n} from './bookings-v2-booking-bookings.universal.js';\nexport {\n MultiServiceBookingTypeWithLiterals,\n LocationTypeWithLiterals,\n SelectionMethodWithLiterals,\n ValueTypeWithLiterals,\n BookingStatusWithLiterals,\n PaymentStatusWithLiterals,\n SelectedPaymentOptionWithLiterals,\n PlatformWithLiterals,\n ActorWithLiterals,\n IdentificationDataIdentityTypeWithLiterals,\n LocationLocationTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n IdentityTypeWithLiterals,\n SortOrderWithLiterals,\n ConfirmOrDeclineBookingApplicationErrors,\n BulkConfirmOrDeclineBookingApplicationErrors,\n CreateBookingApplicationErrors,\n BulkCreateBookingApplicationErrors,\n RescheduleBookingApplicationErrors,\n ConfirmBookingApplicationErrors,\n SetBookingSubmissionIdApplicationErrors,\n UpdateExtendedFieldsApplicationErrors,\n DeclineBookingApplicationErrors,\n CancelBookingApplicationErrors,\n UpdateNumberOfParticipantsApplicationErrors,\n MarkBookingAsPendingApplicationErrors,\n CreateMultiServiceBookingApplicationErrors,\n RescheduleMultiServiceBookingApplicationErrors,\n GetMultiServiceBookingAvailabilityApplicationErrors,\n CancelMultiServiceBookingApplicationErrors,\n MarkMultiServiceBookingAsPendingApplicationErrors,\n ConfirmMultiServiceBookingApplicationErrors,\n DeclineMultiServiceBookingApplicationErrors,\n AddBookingsToMultiServiceBookingApplicationErrors,\n RemoveBookingsFromMultiServiceBookingApplicationErrors,\n} from './bookings-v2-booking-bookings.universal.js';\n","const parseMethod = (method) => {\n switch (method) {\n case 'get':\n case 'GET':\n return 'GET';\n case 'post':\n case 'POST':\n return 'POST';\n case 'put':\n case 'PUT':\n return 'PUT';\n case 'delete':\n case 'DELETE':\n return 'DELETE';\n case 'patch':\n case 'PATCH':\n return 'PATCH';\n case 'head':\n case 'HEAD':\n return 'HEAD';\n case 'options':\n case 'OPTIONS':\n return 'OPTIONS';\n default:\n throw new Error(`Unknown method: ${method}`);\n }\n};\nexport const toHTTPModule = (factory) => (httpClient) => async (payload) => {\n let requestOptions;\n const HTTPFactory = (context) => {\n requestOptions = factory(payload)(context);\n if (requestOptions.url === undefined) {\n throw new Error('Url was not successfully created for this request, please reach out to support channels for assistance.');\n }\n const { method, url, params } = requestOptions;\n return {\n ...requestOptions,\n method: parseMethod(method),\n url,\n data: requestOptions.data,\n params,\n };\n };\n try {\n const response = await httpClient.request(HTTPFactory);\n if (requestOptions === undefined) {\n throw new Error('Request options were not created for this request, please reach out to support channels for assistance.');\n }\n const transformations = Array.isArray(requestOptions.transformResponse)\n ? requestOptions.transformResponse\n : [requestOptions.transformResponse];\n /**\n * Based on Axios implementation:\n * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/lib/core/transformData.js#L22\n */\n let data = response.data;\n transformations.forEach((transform) => {\n if (transform) {\n data = transform(response.data, response.headers);\n }\n });\n return data;\n }\n catch (e) {\n if (typeof e === 'object' &&\n e !== null &&\n 'response' in e &&\n typeof e.response === 'object' &&\n e.response !== null &&\n 'data' in e.response) {\n throw e.response.data;\n }\n throw e;\n }\n};\n/*\n * Because of issues with tree-shaking, we cant really put static parameter on module.\n * We still have check for __isAmbassador for backward compatibility\n */\nexport const isAmbassadorModule = (module) => {\n if (module.__isAmbassador) {\n return true;\n }\n const fn = module();\n return Boolean(fn.__isAmbassador);\n};\n","export const PUBLIC_METADATA_KEY = '__metadata';\nexport const DEFAULT_API_URL = 'www.wixapis.com';\nexport const DEFAULT_EDGE_API_URL = 'edge.wixapis.com';\nexport const FORCE_WRITE_API_URLS = ['/ecom/v1/carts/current'];\n","export class FetchErrorResponse extends Error {\n message;\n response;\n constructor(message, response) {\n super(message);\n this.message = message;\n this.response = response;\n }\n async details() {\n const dataError = await this.response.json();\n return errorBuilder(this.response.status, dataError?.message, dataError?.details, {\n requestId: this.response.headers.get('X-Wix-Request-Id'),\n details: dataError,\n });\n }\n}\nconst errorBuilder = (code, description, details, data) => {\n return {\n details: {\n ...(!details?.validationError && {\n applicationError: {\n description,\n code,\n data,\n },\n }),\n ...details,\n },\n message: description,\n requestId: data?.requestId,\n };\n};\n","// we follow a simplified version of the axios convention\n// https://github.com/axios/axios/blob/649d739288c8e2c55829ac60e2345a0f3439c730/lib/defaults/index.js#L65\nexport const getDefaultContentHeader = (options) => {\n if (options?.method &&\n ['post', 'put', 'patch'].includes(options.method.toLocaleLowerCase()) &&\n options.body) {\n return { 'Content-Type': 'application/json' };\n }\n return {};\n};\nexport const isObject = (val) => val && typeof val === 'object' && !Array.isArray(val);\nexport function parsePublicKeyIfEncoded(publicKey) {\n if (publicKey.includes('\\n') || publicKey.includes('\\r')) {\n // publicKey is multi-line string, can be used as is\n return publicKey.trim();\n }\n else {\n // publicKey is base64 encoded\n return typeof atob !== 'undefined'\n ? atob(publicKey)\n : Buffer.from(publicKey, 'base64').toString('utf-8');\n }\n}\n","export const isHostModule = (val) => val.__type === 'host';\nexport function buildHostModule(val, host) {\n return val.create(host);\n}\n","export const WixBIHeaderName = 'x-wix-bi-gateway';\nexport function biHeaderGenerator(apiMetadata, publicMetadata, environment) {\n return {\n [WixBIHeaderName]: objectToKeyValue({\n environment: `js-sdk${environment ? `-${environment}` : ``}`,\n 'package-name': apiMetadata.packageName ?? publicMetadata?.PACKAGE_NAME,\n 'method-fqn': apiMetadata.methodFqn,\n entity: apiMetadata.entityFqdn,\n }),\n };\n}\nfunction objectToKeyValue(input) {\n return Object.entries(input)\n .filter(([_, value]) => Boolean(value))\n .map(([key, value]) => `${key}=${value}`)\n .join(',');\n}\n","import { biHeaderGenerator } from './bi/biHeaderGenerator.js';\nimport { DEFAULT_API_URL, DEFAULT_EDGE_API_URL } from './common.js';\nimport { runWithoutContext } from '@wix/sdk-runtime/context';\nimport { transformError } from '@wix/sdk-runtime/transform-error';\nexport function buildRESTDescriptor(origFunc, publicMetadata, boundFetch, errorHandler, wixAPIFetch, getActiveToken, options, hostName, useCDN) {\n return runWithoutContext(() => origFunc({\n request: async (factory) => {\n const requestOptions = factory({\n host: options?.HTTPHost || DEFAULT_API_URL,\n });\n let request = requestOptions;\n if (request.method === 'GET' &&\n request.fallback?.length &&\n request.params.toString().length > 4000) {\n request = requestOptions.fallback[0];\n }\n const domain = options?.HTTPHost ?? DEFAULT_API_URL;\n let url = `https://${useCDN ? DEFAULT_EDGE_API_URL : domain}${request.url}`;\n if (request.params && request.params.toString()) {\n url += `?${request.params.toString()}`;\n }\n try {\n const biHeader = biHeaderGenerator(requestOptions, publicMetadata, hostName);\n const requestOptionsInit = {\n method: request.method,\n ...(request.data && {\n body: JSON.stringify(request.data),\n }),\n headers: {\n ...biHeader,\n },\n };\n const res = await boundFetch(url, requestOptionsInit);\n if (res.status !== 200) {\n let dataError = null;\n try {\n dataError = await res.json();\n }\n catch (e) {\n //\n }\n const error = errorBuilder(res.status, dataError?.message, dataError?.details, {\n requestId: res.headers.get('X-Wix-Request-Id'),\n details: dataError,\n });\n const transformedError = transformError(error);\n errorHandler?.handleError(transformedError, {\n requestOptions: {\n url: request.url,\n method: request.method,\n entityFqdn: requestOptions.entityFqdn,\n methodFqn: requestOptions.methodFqn,\n },\n });\n throw error;\n }\n const data = await res.json();\n return {\n data,\n headers: res.headers,\n status: res.status,\n statusText: res.statusText,\n };\n }\n catch (e) {\n if (e.message?.includes('fetch is not defined')) {\n console.error('Node.js v18+ is required');\n }\n throw e;\n }\n },\n fetchWithAuth: boundFetch,\n wixAPIFetch,\n getActiveToken,\n }));\n}\nclass SDKError extends Error {\n response;\n requestId;\n constructor(params) {\n super();\n this.response = params.response;\n this.requestId = params.requestId;\n }\n}\nconst errorBuilder = (code, description, details, data) => {\n return new SDKError({\n response: {\n data: {\n details: {\n ...(!details?.validationError && {\n applicationError: {\n description,\n code,\n data,\n },\n }),\n ...details,\n },\n message: description,\n },\n status: code,\n },\n requestId: data?.requestId,\n });\n};\n","// Inlined from https://github.com/ai/nanoevents/blob/main/index.js\n/**\n * Create event emitter.\n *\n * ```js\n * import { createNanoEvents } from 'nanoevents'\n *\n * class Ticker {\n * constructor() {\n * this.emitter = createNanoEvents()\n * }\n * on(...args) {\n * return this.emitter.on(...args)\n * }\n * tick() {\n * this.emitter.emit('tick')\n * }\n * }\n * ```\n * @returns Event emitter.\n */\nexport function createNanoEvents() {\n return {\n emit(event, ...args) {\n for (let i = 0, callbacks = this.events[event] || [], length = callbacks.length; i < length; i++) {\n callbacks[i](...args);\n }\n },\n events: {},\n on(event, cb) {\n (this.events[event] ||= []).push(cb);\n return () => {\n this.events[event] = this.events[event]?.filter((i) => cb !== i);\n };\n },\n };\n}\n","import { EventDefinition, } from '@wix/sdk-types';\nimport { createNanoEvents } from './nanoevents.js';\nexport const isEventHandlerModule = (val) => val.__type === 'event-definition';\nexport function buildEventDefinition(eventDefinition, registerHandler) {\n return (handler) => {\n registerHandler(eventDefinition, handler);\n };\n}\nfunction runHandler(eventDefinition, handler, payload, baseEventMetadata) {\n let envelope;\n if (eventDefinition.isDomainEvent) {\n const domainEventPayload = payload;\n const { deletedEvent, actionEvent, createdEvent, updatedEvent, ...domainEventMetadata } = domainEventPayload;\n const metadata = {\n ...baseEventMetadata,\n ...domainEventMetadata,\n };\n if (deletedEvent) {\n if (deletedEvent?.deletedEntity) {\n envelope = {\n entity: deletedEvent?.deletedEntity,\n metadata,\n };\n }\n else {\n envelope = { metadata };\n }\n }\n else if (actionEvent) {\n envelope = {\n data: actionEvent.body,\n metadata,\n };\n }\n else {\n envelope = {\n entity: createdEvent?.entity ?? updatedEvent?.currentEntity,\n metadata,\n };\n }\n }\n else {\n envelope = {\n data: payload,\n metadata: baseEventMetadata,\n };\n }\n const transformFromRESTFn = eventDefinition.transformations ?? ((x) => x);\n return handler(transformFromRESTFn(envelope));\n}\nexport function eventHandlersModules(authStrategy) {\n const eventHandlers = new Map();\n const webhooksEmitter = createNanoEvents();\n const client = {\n ...webhooksEmitter,\n getRegisteredEvents: () => eventHandlers,\n async process(jwt, opts = {\n expectedEvents: [],\n }) {\n const { eventType, identity, instanceId, payload } = await this.parseJWT(jwt);\n const allExpectedEvents = [\n ...opts.expectedEvents,\n ...Array.from(eventHandlers.keys()).map((type) => ({ type })),\n ];\n if (allExpectedEvents.length > 0 &&\n !allExpectedEvents.some(({ type }) => type === eventType)) {\n throw new Error(`Unexpected event type: ${eventType}. Expected one of: ${allExpectedEvents\n .map((x) => x.type)\n .join(', ')}`);\n }\n const handlers = eventHandlers.get(eventType) ?? [];\n await Promise.all(handlers.map(({ eventDefinition, handler }) => runHandler(eventDefinition, handler, payload, {\n instanceId,\n identity,\n })));\n return {\n instanceId,\n eventType,\n payload,\n identity,\n };\n },\n async processRequest(request, opts) {\n const body = await request.text();\n return this.process(body, opts);\n },\n async parseJWT(jwt) {\n if (!authStrategy.decodeJWT) {\n throw new Error('decodeJWT is not supported by the authentication strategy');\n }\n const { decoded, valid } = await authStrategy.decodeJWT(jwt);\n if (!valid) {\n throw new Error('JWT is not valid');\n }\n if (typeof decoded.data !== 'string') {\n throw new Error(`Unexpected type of JWT data: expected string, got ${typeof decoded.data}`);\n }\n const parsedDecoded = JSON.parse(decoded.data);\n const eventType = parsedDecoded.eventType;\n const instanceId = parsedDecoded.instanceId;\n const identity = parsedDecoded.identity\n ? JSON.parse(parsedDecoded.identity)\n : undefined;\n const payload = JSON.parse(parsedDecoded.data);\n return {\n instanceId,\n eventType,\n payload,\n identity,\n };\n },\n async parseRequest(request) {\n const jwt = await request.text();\n return this.parseJWT(jwt);\n },\n async executeHandlers(event) {\n const allExpectedEvents = Array.from(eventHandlers.keys()).map((type) => ({ type }));\n if (allExpectedEvents.length > 0 &&\n !allExpectedEvents.some(({ type }) => type === event.eventType)) {\n throw new Error(`Unexpected event type: ${event.eventType}. Expected one of: ${allExpectedEvents\n .map((x) => x.type)\n .join(', ')}`);\n }\n const handlers = eventHandlers.get(event.eventType) ?? [];\n await Promise.all(handlers.map(({ eventDefinition, handler }) => runHandler(eventDefinition, handler, event.payload, {\n instanceId: event.instanceId,\n identity: event.identity,\n })));\n },\n apps: {\n AppInstalled: EventDefinition('AppInstalled')(),\n AppRemoved: EventDefinition('AppRemoved')(),\n },\n };\n return {\n initModule(eventDefinition) {\n return (handler) => {\n const handlers = eventHandlers.get(eventDefinition.type) ?? [];\n handlers.push({ eventDefinition, handler });\n eventHandlers.set(eventDefinition.type, handlers);\n webhooksEmitter.emit('registered', eventDefinition);\n };\n },\n client,\n };\n}\n","import { createNanoEvents } from './nanoevents.js';\nexport const isServicePluginModule = (val) => val.__type === 'service-plugin-definition';\nexport function servicePluginsModules(authStrategy) {\n const servicePluginsImplementations = new Map();\n const servicePluginsEmitter = createNanoEvents();\n const client = {\n ...servicePluginsEmitter,\n getRegisteredServicePlugins: () => servicePluginsImplementations,\n async parseJWT(jwt) {\n if (!authStrategy.decodeJWT) {\n throw new Error('decodeJWT is not supported by the authentication strategy');\n }\n const { decoded, valid } = await authStrategy.decodeJWT(jwt, true);\n if (!valid) {\n throw new Error('JWT is not valid');\n }\n if (typeof decoded.data !== 'object' ||\n decoded.data === null ||\n !('metadata' in decoded.data) ||\n typeof decoded.data.metadata !== 'object' ||\n decoded.data.metadata === null ||\n !('appExtensionType' in decoded.data.metadata) ||\n typeof decoded.data.metadata.appExtensionType !== 'string') {\n throw new Error('Unexpected JWT data: expected object with metadata.appExtensionType string');\n }\n return decoded.data;\n },\n async process(request) {\n const servicePluginRequest = await this.parseJWT(request.body);\n return this.executeHandler(servicePluginRequest, request.url);\n },\n async parseRequest(request) {\n const body = await request.text();\n return this.parseJWT(body);\n },\n async processRequest(request) {\n const url = request.url;\n const body = await request.text();\n try {\n const implMethodResult = await this.process({ url, body });\n return Response.json(implMethodResult);\n }\n catch (err) {\n if (err.errorType === 'SPI' && err.applicationCode && err.httpCode) {\n return Response.json({ applicationError: { code: err.applicationCode, data: err.data } }, { status: err.httpCode });\n }\n throw err;\n }\n },\n async executeHandler(servicePluginRequest, url) {\n const componentType = servicePluginRequest.metadata.appExtensionType.toLowerCase();\n const implementations = servicePluginsImplementations.get(componentType) ?? [];\n if (implementations.length === 0) {\n throw new Error(`No service plugin implementations found for component type ${componentType}`);\n }\n else if (implementations.length > 1) {\n throw new Error(`Multiple service plugin implementations found for component type ${componentType}. This is currently not supported`);\n }\n const { implementation: impl, servicePluginDefinition } = implementations[0];\n const method = servicePluginDefinition.methods.find((m) => url.endsWith(m.primaryHttpMappingPath));\n if (!method) {\n throw new Error('Unexpect request: request url did not match any method: ' + url);\n }\n const implMethod = impl[method.name];\n if (!implMethod) {\n throw new Error(`Got request for service plugin method ${method.name} but no implementation was provided. Available methods: ${Object.keys(impl).join(', ')}`);\n }\n return method.transformations.toREST(await implMethod(method.transformations.fromREST(servicePluginRequest)));\n },\n };\n return {\n initModule(servicePluginDefinition) {\n return (implementation) => {\n const implementations = servicePluginsImplementations.get(servicePluginDefinition.componentType.toLowerCase()) ?? [];\n implementations.push({ servicePluginDefinition, implementation });\n servicePluginsImplementations.set(servicePluginDefinition.componentType.toLowerCase(), implementations);\n servicePluginsEmitter.emit('registered', servicePluginDefinition);\n };\n },\n client,\n };\n}\n","import { wixContext } from '@wix/sdk-context';\nimport { SERVICE_PLUGIN_ERROR_TYPE, } from '@wix/sdk-types';\nimport { isAmbassadorModule, toHTTPModule } from './ambassador-modules.js';\nimport { DEFAULT_API_URL, PUBLIC_METADATA_KEY } from './common.js';\nimport { FetchErrorResponse } from './fetch-error.js';\nimport { getDefaultContentHeader, isObject } from './helpers.js';\nimport { buildHostModule, isHostModule } from './host-modules.js';\nimport { buildRESTDescriptor } from './rest-modules.js';\nimport { eventHandlersModules, isEventHandlerModule, } from './event-handlers-modules.js';\nimport { isServicePluginModule, servicePluginsModules, } from './service-plugin-modules.js';\nimport { runWithoutContext } from '@wix/sdk-runtime/context';\nexport const X_WIX_CONSISTENT_HEADER = 'X-Wix-Consistent';\nexport function createClient(config) {\n const _headers = config.headers || { Authorization: '' };\n const authStrategy = config.auth ||\n {\n getAuthHeaders: (_) => Promise.resolve({ headers: {} }),\n };\n const boundGetAuthHeaders = authStrategy.getAuthHeaders.bind(undefined, config.host);\n authStrategy.getAuthHeaders = boundGetAuthHeaders;\n const fetchWithAuth = async (urlOrRequest, requestInit) => {\n const authHeaders = await boundGetAuthHeaders();\n const headers = {\n ...(requestInit?.headers ?? {}),\n ...authHeaders.headers,\n ...config.host?.essentials?.passThroughHeaders,\n ...(_headers[X_WIX_CONSISTENT_HEADER]\n ? { [X_WIX_CONSISTENT_HEADER]: _headers[X_WIX_CONSISTENT_HEADER] }\n : {}),\n };\n const errorHandler = config.host?.getErrorHandler?.();\n try {\n if (typeof urlOrRequest === 'string' || urlOrRequest instanceof URL) {\n const response = await fetch(urlOrRequest, {\n ...requestInit,\n headers,\n });\n errorHandler?.handleError(response, {\n requestOptions: {\n url: urlOrRequest.toString(),\n method: requestInit?.method,\n },\n });\n const consistentHeader = findConsistentHeader(response);\n if (consistentHeader) {\n _headers[X_WIX_CONSISTENT_HEADER] = consistentHeader;\n }\n return response;\n }\n else {\n for (const [k, v] of Object.entries(headers)) {\n if (typeof v === 'string') {\n urlOrRequest.headers.set(k, v);\n }\n }\n const response = await fetch(urlOrRequest, requestInit);\n errorHandler?.handleError(response, {\n requestOptions: {\n url: urlOrRequest.url,\n method: requestInit?.method,\n },\n });\n const consistentHeader = findConsistentHeader(response);\n if (consistentHeader) {\n _headers[X_WIX_CONSISTENT_HEADER] = consistentHeader;\n }\n return response;\n }\n }\n catch (e) {\n errorHandler?.handleError(e, {\n requestOptions: {\n url: typeof urlOrRequest === 'string' || urlOrRequest instanceof URL\n ? urlOrRequest.toString()\n : urlOrRequest.url,\n method: requestInit?.method,\n },\n });\n throw e;\n }\n };\n const { client: servicePluginsClient, initModule: initServicePluginModule } = servicePluginsModules(authStrategy);\n const { client: eventHandlersClient, initModule: initEventHandlerModule } = eventHandlersModules(authStrategy);\n const boundFetch = async (url, options) => {\n const authHeaders = await boundGetAuthHeaders();\n const defaultContentTypeHeader = getDefaultContentHeader(options);\n const response = await fetch(url, {\n ...options,\n headers: {\n ...defaultContentTypeHeader,\n ..._headers,\n ...authHeaders?.headers,\n ...options?.headers,\n ...config.host?.essentials?.passThroughHeaders,\n // Ensure consistent header always takes precedence\n ...(_headers[X_WIX_CONSISTENT_HEADER]\n ? { [X_WIX_CONSISTENT_HEADER]: _headers[X_WIX_CONSISTENT_HEADER] }\n : {}),\n },\n });\n const consistentHeader = findConsistentHeader(response);\n if (consistentHeader) {\n _headers[X_WIX_CONSISTENT_HEADER] = consistentHeader;\n }\n return response;\n };\n // This is typed as `any` because when trying to properly type it as defined\n // on the WixClient, typescript starts failing with `Type instantiation is\n // excessively deep and possibly infinite.`\n const use = (modules, metadata) => {\n if (isEventHandlerModule(modules)) {\n return initEventHandlerModule(modules);\n }\n else if (isServicePluginModule(modules)) {\n return initServicePluginModule(modules);\n }\n else if (isHostModule(modules) && config.host) {\n return buildHostModule(modules, config.host);\n }\n else if (typeof modules === 'function') {\n // The generated namespaces all have the error classes on them and\n // a class is also a function, so we need to explicitly ignore these\n // error classes using a static field that exists on them.\n if ('__type' in modules && modules.__type === SERVICE_PLUGIN_ERROR_TYPE) {\n return modules;\n }\n const apiBaseUrl = config.host?.apiBaseUrl ?? DEFAULT_API_URL;\n const shouldUseCDN = config.useCDN === undefined ? config.auth?.shouldUseCDN : config.useCDN;\n return buildRESTDescriptor(runWithoutContext(() => isAmbassadorModule(modules))\n ? toHTTPModule(modules)\n : modules, metadata ?? {}, boundFetch, config.host?.getErrorHandler?.(), (relativeUrl, fetchOptions) => {\n const finalUrl = new URL(relativeUrl, `https://${apiBaseUrl}`);\n finalUrl.host = apiBaseUrl;\n finalUrl.protocol = 'https';\n return boundFetch(finalUrl.toString(), fetchOptions);\n }, authStrategy.getActiveToken, { HTTPHost: apiBaseUrl }, config.host?.name, shouldUseCDN);\n }\n else if (isObject(modules)) {\n return Object.fromEntries(Object.entries(modules).map(([key, value]) => {\n return [key, use(value, modules[PUBLIC_METADATA_KEY])];\n }));\n }\n else {\n return modules;\n }\n };\n const setHeaders = (headers) => {\n for (const k in headers) {\n _headers[k] = headers[k];\n }\n };\n const wrappedModules = config.modules\n ? use(config.modules)\n : {};\n return {\n ...wrappedModules,\n auth: authStrategy,\n setHeaders,\n use,\n enableContext(contextType, opts = { elevated: false }) {\n if (contextType === 'global') {\n if (globalThis.__wix_context__ != null) {\n if (opts.elevated) {\n globalThis.__wix_context__.elevatedClient = this;\n }\n else {\n globalThis.__wix_context__.client = this;\n }\n }\n else {\n if (opts.elevated) {\n globalThis.__wix_context__ = { elevatedClient: this };\n }\n else {\n globalThis.__wix_context__ = { client: this };\n }\n }\n }\n else {\n if (opts.elevated) {\n wixContext.elevatedClient = this;\n }\n else {\n wixContext.client = this;\n }\n }\n },\n /**\n * @param relativeUrl The URL to fetch relative to the API base URL\n * @param options The fetch options\n * @returns The fetch Response object\n * @deprecated Use `fetchWithAuth` instead\n */\n fetch: (relativeUrl, options) => {\n const apiBaseUrl = config.host?.apiBaseUrl ?? DEFAULT_API_URL;\n const finalUrl = new URL(relativeUrl, `https://${apiBaseUrl}`);\n finalUrl.host = apiBaseUrl;\n finalUrl.protocol = 'https';\n return boundFetch(finalUrl.toString(), options);\n },\n fetchWithAuth,\n async graphql(query, variables, opts = {\n apiVersion: 'alpha',\n }) {\n const apiBaseUrl = config?.host?.apiBaseUrl ?? DEFAULT_API_URL;\n const res = await boundFetch(`https://${apiBaseUrl}/graphql/${opts.apiVersion}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ query, variables }),\n });\n if (res.status !== 200) {\n throw new FetchErrorResponse(`GraphQL request failed with status ${res.status}`, res);\n }\n const { data, errors } = await res.json();\n return { data: data ?? {}, errors };\n },\n webhooks: eventHandlersClient,\n servicePlugins: servicePluginsClient,\n };\n}\nfunction findConsistentHeader(response) {\n return (response.headers?.get(X_WIX_CONSISTENT_HEADER) ??\n response.headers?.get(X_WIX_CONSISTENT_HEADER.toLowerCase()));\n}\n","import { PluginEnv } from \"@wix/wix-vibe-plugins\";\nimport dedent from \"dedent\";\nimport { services } from '@wix/bookings';\nimport { createClient } from '@wix/sdk';\n\ntype Service = any;\n\n/**\n * Creates a service image based on user request and service name,\n * then adds the image media to the service payload\n */\nexport const createServicesMediaAndAddToPayload = async (\n service: Service,\n userRequest: string,\n _siteId: string,\n generateImage: PluginEnv[\"generateImage\"],\n photoTheme: string,\n ) => {\n const photoThemePromptSection = photoTheme\n ? `The Photo Theme is:\n ${photoTheme}`\n : \"\";\n \n const imagePrompt = dedent`\n The original user request for building the site and site plan is:\n ${userRequest.slice(0, 500)}\n ---\n ${photoThemePromptSection}\n ---\n Product details:\n \n service name:\n ${service.service.name}\n \n service description:\n ${service.service.description}\n ---\n Generate a service image for the service that is part of a bookings service\n `;\n \n const imageGenStartTime = Date.now();\n console.log(\n \"[createServicesImageAndAddToPayload] generating service image\",\n imagePrompt,\n userRequest,\n );\n \n const imageUrl = await generateImage(imagePrompt, {\n width: 500,\n height: 500,\n });\n \n const imageGenEndTime = Date.now();\n const imageGenDuration = imageGenEndTime - imageGenStartTime;\n const imageGenDurationInSeconds = (imageGenDuration / 1000).toFixed(2);\n \n console.log(\n `[wix-bookings] service image generation took ${imageGenDurationInSeconds} seconds`,\n );\n console.log(\"[wix-bookings] service image url\", imageUrl);\n \n // add image media to service payload:\n service.service.media = {\n mainMedia: {\n url: imageUrl,\n altText: service.service.name,\n }\n };\n \n return { imageUrl, imageGenDurationInSeconds };\n };\n\n export async function getWixClient(env: PluginEnv) {\n if (!env.WIX_TOKEN) {\n console.error(\"[getWixClient] WIX_TOKEN is not set\");\n }\n \n return createClient({\n auth: {\n getAuthHeaders: async () => ({\n headers: {\n Authorization: env.WIX_TOKEN\n },\n }),\n },\n modules: { services },\n });\n }\n\nexport const createInquireService = async (service: Service, client: any) => {\n console.log(\"[wix-bookings] creating service\", service);\n const response = await client.services.createService(service)\n console.log(\"[wix-bookings] service created\", response);\n return response;\n\n}","import dedent from \"dedent\";\n\nconst getRouterFileContent = () => {\n return dedent`\n import {\n Navigate,\n RouterProvider,\n createBrowserRouter,\n Outlet,\n } from 'react-router-dom';\n\n // Import route components and loaders\n import { rootRouteLoader, WixServicesProvider } from '@/wix-verticals/react-pages/react-router/routes/root';\n import {\n ServicesListRoute,\n servicesListRouteLoader,\n } from '@/wix-verticals/react-pages/react-router/routes/services-list';\n\n const router = createBrowserRouter(\n [\n {\n path: '/',\n element: <Navigate to=\"/services\" />,\n },\n {\n element: (\n <WixServicesProvider>\n <Outlet />\n </WixServicesProvider>\n ),\n loader: rootRouteLoader,\n children: [\n {\n path: '/services',\n element: <ServicesListRoute />,\n loader: servicesListRouteLoader,\n },\n ],\n },\n ],\n {\n basename: '/react-router',\n }\n );\n\n export default function ReactRouterApp() {\n return <RouterProvider router={router} />;\n }\n `;\n};\n\n/**\n * Get coding instructions for your vertical\n * These instructions guide the AI coder on how to work with your vertical\n */\nexport const getVerticalCodingInstructions = () => {\n return dedent`\n<bookings_instructions>\n\nYour tasks for implementing and integrating the Bookings features of the site are:\n\n# FIRST TASK: INTEGRATE THE BOOKINGS ROUTES INTO THE SITE ROUTER\n\nIntegrate the bookings routes into the existing router of the app. There is an example router file. You should not import it directly, but rather use the content of the file as reference for how to implement the router in the app.\n\n## Example Bookings Router File\n\\`\\`\\`tsx\n${getRouterFileContent()}\n\\`\\`\\`\n\nit includes the following route:\n - /services - a services list page that displays all available booking services\n\nThe routes in the example router file are wrapped with:\n\n\\`\\`\\`tsx\n<WixServicesProvider>\n ...\n <Outlet />\n</WixServicesProvider>\n\\`\\`\\`\n\n<important_router_notes>\n<strong>MAKE SURE TO WRAP ALL THE ROUTES WITH THE PROVIDERS IN THE ABOVE EXAMPLE ROUTER</strong>\n<strong>WRAP THE MAIN LAYOUT WITH <code><WixServicesProvider>...</WixServicesProvider></code> not only the bookings routes.</strong>\n- Use <code><WixServicesProvider></code> only in the top level router and only once, the same component tree should not include more than one <code><WixServicesProvider></code>.\n<strong>ALWAYS IMPLEMENT THE LAYOUT COMPONENTS OF THE SITE, AS A LAYOUT FOR THE SITE, AND WRAP ALL THE ROUTES WITH THAT LAYOUT (INCLUDING THE BOOKINGS ROUTES).</strong>\n</important_router_notes>\n\nThe services list route is 100% width, no titles, no background, no padding nor margin, so wrap it with an html element with the right positioning, background, padding or margin, and titles for the route.\nFor example:\n\n\\`\\`\\`tsx\n<div className=\"bg-background\">\n <h1 className=\"font-heading text-foreground px-4 py-2\">Our Services</h1>\n <ServicesListRoute />\n</div>\n\\`\\`\\`\n\n<important_notes>\n<strong>ALL BOOKINGS FEATURES ARE ALREADY IMPLEMENTED BY THE BOOKINGS ROUTES, THEY DO NOT INCLUDE HEADER FOOTER OR ANY OTHER LAYOUT COMPONENTS.</strong>\n<strong>THE REST OF THE SITE PAGES SHOULD BE IMPLEMENTED AS USUAL ACCORDING TO THE PLAN AND USER REQUESTS, FOLLOWING THE OTHER INSTRUCTIONS IN THE CONTEXT.</strong>\n<strong>DO NOT IMPLEMENT CMS-BASED PAGES FOR BOOKINGS FEATURES LIKE SERVICES OR ANY OTHER BOOKING FEATURES - ONLY USE THE BOOKINGS ROUTES AND SERVICES TO IMPLEMENT THE BOOKINGS FEATURES!</strong>\n<strong>DO NOT IMPLEMENT A \"FEATURED SERVICES\" SECTIONS OR PAGES OR TRY TO LINK TO SPECIFIC SERVICES IN ANY PAGE - JUST LINK TO THE SERVICES PAGE.</strong>\n<strong>DO NOT USE MOCK DATA FOR SERVICES OR ANY OTHER DATA IN THE HOME PAGE OR ANY OTHER PAGE. ALWAYS LINK TO THE SERVICES PAGE.</strong>\n<strong>DO NOT IMPLEMENT SERVICES SEARCH YOURSELF - NO SERVICES SEARCH BAR OR ANY OTHER SERVICES SEARCH FEATURES</strong>\n<strong>DO NOT EDIT or READ ANY FILE in <code>./src/wix-verticals/</code> USE EVERYTHING AS IS, ONLY INTEGRATE THE ROUTER!! with the exception of non-english sites, in this case, you are allowed to change the static text to match the new language.</strong>\n</important_notes>\n\n<optional_task>\n# OPTIONAL TASK: TRANSLATE THE SITE TO NON ENGLISH LANGUAGE:\n\nIF AND ONLY IF THE USER ASKS FOR A NON ENGLISH LANGUAGE, YOU MUST TRANSLATE THE FOLLOWING COMPONENTS:\n\n\\`\\`\\`bash\nsrc/components/bookings/\n├── VerticalDetails.tsx\n├── VerticalDetailsPage.tsx\n├── VerticalList.tsx\n└── VerticalListPage.tsx\n\nsrc/components/ui/bookings/\n├── VerticalCard.tsx\n├── VerticalItem.tsx\n└── VerticalItemList.tsx\n\\`\\`\\`\n\nYOU MUST GO OVER ALL THE FILES IN THE ABOVE LIST AND CHANGE THE STATIC TEXT TO MATCH THE NEW LANGUAGE.\nIF THE SITE IS IN ENGLISH OR THE LANGUAGE IS NOT SPECIFIED, YOU MUST NOT READ OR WRITE ANYTHING IN THE ABOVE FILES.\n</optional_task>\n\n</bookings_instructions>\n `;\n};","import { PluginEnv } from \"./types\";\nimport { createMockServicesInSite, generateMockServices, unzipAndMergePluginFiles } from \"./utils\";\nimport { PluginModule } from \"@wix/wix-vibe-plugins\";\nimport { getVerticalCodingInstructions } from \"./bookings-instructions\";\nimport { VERTICAL_NAME, PLUGIN_FILES_ZIP_URL } from \"./constants\";\n\n/**\n * Install function - called when the plugin is first installed\n * This is where you set up your vertical's functionality\n */\nconst install = async (env: PluginEnv) => {\n console.log(`[${VERTICAL_NAME}-plugin-install] Starting installation`, env);\n\n // TODO: Uncomment and customize these steps based on your vertical's needs\n\n // Step 1: Install your vertical's core functionality\n console.log(`[${VERTICAL_NAME}-plugin-install] Installing vertical functionality...`);\n ///await installVertical(env);\n\n // Step 2: Install UI components (if you have a plugin-files package)\n console.log(`[${VERTICAL_NAME}-plugin-install] Unzipping and merging plugin files...`);\n await unzipAndMergePluginFiles(env, PLUGIN_FILES_ZIP_URL);\n\n console.log(`\\n\\x1b[34m ==== Bookings installation completed ==== \\x1b[0m\\n`);\n};\n\n/**\n * Generate data function - called when the user wants to populate the site with sample data\n * This is where you create mock/sample data for development and testing\n */\nconst generateData = async (env: PluginEnv): Promise<any> => {\n console.log(`[${VERTICAL_NAME}-plugin-generateData] Starting data generation`, env);\n\n // Generate mock data based on the user's request\n console.log(`[${VERTICAL_NAME}-plugin-generateData] Generating mock data...`);\n const parsedResult = await generateMockServices(env);\n\n console.log(\"[bookings-plugin-generateData] creating Wix bookings services...\");\n\n const apiCallResults = await createMockServicesInSite(\n parsedResult,\n env.userRequest,\n env,\n );\n\n console.log(\n `\\n\\x1b[34m ==== Bookings data generation completed ==== \\x1b[0m\\n`,\n );\n\n parsedResult.apiCallResults = apiCallResults; // can potentially be used by coder to get ids of the entities created\n\n return parsedResult;\n};\n\n/**\n * Get instructions function - provides coding guidance to the AI\n * This helps the AI understand how to work with your vertical\n * originalInstructions is the instructions from dev center\n * result is the result of the install function\n */\nconst getInstructions = async (params: {\n result: unknown;\n originalInstructions: string | undefined;\n}) => {\n const actualInstructions = getVerticalCodingInstructions();\n \n console.log(`[${VERTICAL_NAME}-plugin-getInstructions] Getting instructions`, {\n result: params.result,\n originalInstructions: params.originalInstructions,\n actualInstructions,\n });\n\n return actualInstructions;\n};\n\n// Export the plugin module\nexport const verticalNamePlugin: PluginModule = {\n install,\n generateData,\n getInstructions,\n};\n\nexport default verticalNamePlugin;"]}