{"version":3,"sources":["../src/index.ts","../src/api/countries/createCountriesClient.ts","../src/api/countries/getCountryList/getCountryList.ts","../src/utilities/FetchError.ts","../src/api/countries/untypeable.ts","../src/api/region/createRegionClient.ts","../src/api/region/regionList/regionList.ts","../src/api/region/untypeable.ts","../src/api/statistics/createStatisticsClient.ts","../src/api/statistics/getStatistics/getStatistics.ts","../src/api/statistics/untypeable.ts","../src/api/storage-zone/createStorageZoneClient.ts","../src/api/storage-zone/addStorageZone/addStorageZone.ts","../src/api/storage-zone/untypeable.ts","../src/api/storage-zone/checkTheStorageZoneAvailability/checkTheStorageZoneAvailability.ts","../src/api/storage-zone/deleteStorageZone/deleteStorageZone.ts","../src/api/storage-zone/getStorageZone/getStorageZone.ts","../src/api/storage-zone/getStorageZoneStatistics/getStorageZoneStatistics.ts","../src/api/storage-zone/listStorageZones/listStorageZones.ts","../src/api/storage-zone/resetPassword/resetPassword.ts","../src/api/storage-zone/resetReadOnlyPassword/resetReadOnlyPassword.ts","../src/api/storage-zone/updateStorageZone/updateStorageZone.ts","../src/api/support/createSupportClient.ts","../src/api/support/closeTicket/closeTicket.ts","../src/api/support/untypeable.ts","../src/api/support/createTicket/createTicket.ts","../src/api/support/getTicketDetails/getTicketDetails.ts","../src/api/support/getTicketList/getTicketList.ts","../src/api/support/replyTicket/replyTicket.ts","../src/edge-storage-api/browse-files/createBrowseFilesClient.ts","../src/edge-storage-api/browse-files/listFiles/listFiles.ts","../src/edge-storage-api/browse-files/untypeable.ts","../src/edge-storage-api/manage-files/createManageFilesClient.ts","../src/edge-storage-api/manage-files/deleteFile/deleteFile.ts","../src/edge-storage-api/manage-files/untypeable.ts","../src/edge-storage-api/manage-files/downloadFile/downloadFile.ts","../src/edge-storage-api/manage-files/uploadFile/uploadFile.ts"],"sourcesContent":["export type {\n  AddStorageZoneRequest,\n  AddStorageZoneResponse,\n  CheckTheStorageZoneAvailabilityRequest,\n  CheckTheStorageZoneAvailabilityResponse,\n  CloseTicketRequest,\n  CloseTicketResponse,\n  CreateTicketRequest,\n  CreateTicketResponse,\n  DeleteStorageZoneRequest,\n  DeleteStorageZoneResponse,\n  GetCountryListRequest,\n  GetCountryListResponse,\n  GetStatisticsRequest,\n  GetStatisticsResponse,\n  GetStorageZoneRequest,\n  GetStorageZoneResponse,\n  GetStorageZoneStatisticsRequest,\n  GetStorageZoneStatisticsResponse,\n  GetTicketDetailsRequest,\n  GetTicketDetailsResponse,\n  GetTicketListRequest,\n  GetTicketListResponse,\n  ListStorageZonesRequest,\n  ListStorageZonesResponse,\n  RegionListRequest,\n  RegionListResponse,\n  ReplyTicketRequest,\n  ReplyTicketResponse,\n  ResetPasswordRequest,\n  ResetPasswordResponse,\n  ResetReadOnlyPasswordRequest,\n  ResetReadOnlyPasswordResponse,\n  UpdateStorageZoneRequest,\n  UpdateStorageZoneResponse,\n} from \"./api\";\nexport {\n  createCountriesClient,\n  createRegionClient,\n  createStatisticsClient,\n  createStorageZoneClient,\n  createSupportClient,\n} from \"./api\";\nexport type {\n  DeleteFileRequest,\n  DeleteFileResponse,\n  DownloadFileRequest,\n  DownloadFileResponse,\n  ListFilesRequest,\n  ListFilesResponse,\n  UploadFileRequest,\n  UploadFileResponse,\n} from \"./edge-storage-api\";\nexport {\n  createBrowseFilesClient,\n  createManageFilesClient,\n} from \"./edge-storage-api\";\nexport { FetchError } from \"./utilities\";\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  getCountryList,\n  getCountryListClient,\n  getCountryListEndpoints,\n} from \"./getCountryList\";\nimport { u } from \"./untypeable\";\n\nconst countriesRouter = u.router({\n  [getCountryListEndpoints.getCountryList]: getCountryList,\n  [getCountryListEndpoints[\"GET /country\"]]: getCountryList,\n});\n\n/**\n * @param defaultRequestInit default fetch parameters for every request\n * @returns countriesClient\n *\n * @example\n * ```ts\n * const countriesClient = createCountriesClient({\n *   apiKey: API_ACCESS_KEY,\n * });\n *\n * const response = await countriesClient(\"getCountryList\");\n * ```\n */\nexport function createCountriesClient(\n  defaultInput: Record<string, any>,\n  defaultRequestInit: RequestInit = {}\n) {\n  const countriesClient = createTypeLevelClient<typeof countriesRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case getCountryListEndpoints.getCountryList:\n        case getCountryListEndpoints[\"GET /country\"]:\n          return getCountryListClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${countriesClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return countriesClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface Country {\n  /**\n   * Url of a 512x512 png with a circular country flag with a grey (#e1dfdf) background color\n   */\n  FlagUrl: string;\n  /**\n   * Country is part of the [European Union](https://web.archive.org/web/20230427223937/https://en.wikipedia.org/wiki/European_Union)\n   * @example false\n   */\n  IsEU: boolean;\n  /**\n   * Country two-digit [ISO country code](https://web.archive.org/web/20230427223803/https://www.nationsonline.org/oneworld/country_code_list.htm)\n   * @example \"GB\"\n   */\n  IsoCode: string;\n  /**\n   * Country name\n   * @example \"United Kingdom\"\n   */\n  Name: string;\n  /**\n   * Country [Points of Presence](https://web.archive.org/web/20230427225159/https://www.imperva.com/learn/performance/what-is-cdn-how-it-works/) [list](https://web.archive.org/web/20230427225239/https://bunny.net/network/) of abbreviations\n   * @example \"NY\"\n   */\n  PopList: string[];\n  /**\n   * Country tax rate out of 100 percent\n   * in the [European Union](https://web.archive.org/web/20230427223937/https://en.wikipedia.org/wiki/European_Union), this is the VAT tax rate\n   * @example 25\n   */\n  TaxRate: number;\n}\n\nexport interface GetCountryListRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n}\n\nexport type GetCountryListResponse = Country[];\n\nexport const getCountryList = u\n  .input<GetCountryListRequest>()\n  .output<GetCountryListResponse>();\n\nconst url = \"https://api.bunny.net/country\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getCountryListEndpoints = {\n  \"GET /country\": \"GET /country\",\n  getCountryList: \"getCountryList\",\n} as const;\n\nexport async function getCountryListClient(\n  defaultRequestInit: RequestInit,\n  { apiKey }: GetCountryListRequest = {}\n): Promise<GetCountryListResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const response = await fetch(\n    url,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetCountryListResponse = await response.json();\n\n  return json;\n}\n","import { CustomError } from \"ts-custom-error\";\n\nexport class FetchError extends CustomError {\n  public constructor(\n    public code: number,\n    public reason: string,\n    public response: Response\n  ) {\n    super(`${code}: ${reason}`);\n  }\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  regionList,\n  regionListClient,\n  regionListEndpoints,\n} from \"./regionList\";\nimport { u } from \"./untypeable\";\n\nconst countriesRouter = u.router({\n  [regionListEndpoints.regionList]: regionList,\n  [regionListEndpoints[\"GET /region\"]]: regionList,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns regionClient\n *\n * @example\n * ```ts\n * const regionClient = createRegionClient({\n *   apiKey: API_ACCESS_KEY,\n * });\n *\n * const response = await regionClient(\"regionList\");\n * ```\n */\nexport function createRegionClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const regionClient = createTypeLevelClient<typeof countriesRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case regionListEndpoints.regionList:\n        case regionListEndpoints[\"GET /region\"]:\n          return regionListClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${regionClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return regionClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface Region {\n  /**\n   * Allow latency routing\n   * @example true\n   */\n  AllowLatencyRouting: boolean;\n  /**\n   * Region [continent code](https://web.archive.org/web/20230428180958/https://gist.github.com/alyssaq/3415363a18610d22f0d307bcaac857cd)\n   * @example \"OC\"\n   */\n  ContinentCode: string;\n  /**\n   * Region [country code](https://web.archive.org/web/20230428180958/https://gist.github.com/alyssaq/3415363a18610d22f0d307bcaac857cd)\n   * @example \"AU\"\n   */\n  CountryCode: string;\n  /**\n   * Region id\n   * @example 15\n   */\n  Id: number;\n  /**\n   * Region latitude\n   * @example -33.8674869\n   */\n  Latitude: number;\n  /**\n   * Region longitude\n   * @example 151.20699020000006\n   */\n  Longitude: number;\n  /**\n   * Region name, composed of `${ContinentCode}: ${RegionName}, ${RegionCode}`\n   * @example \"OC: Sydney, SYD\"\n   * @example \"NA:  Honolulu, HI\"\n   */\n  Name: string;\n  /**\n   * Region price per gigabyte in dollars (USD$)\n   * @example 0.03\n   */\n  PricePerGigabyte: number;\n  /**\n   * Region code\n   * @example \"SYD\"\n   */\n  RegionCode: string;\n}\n\nexport interface RegionListRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n}\n\nexport type RegionListResponse = Region[];\n\nexport const regionList = u\n  .input<RegionListRequest>()\n  .output<RegionListResponse>();\n\nconst url = \"https://api.bunny.net/region\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const regionListEndpoints = {\n  \"GET /region\": \"GET /region\",\n  regionList: \"regionList\",\n} as const;\n\nexport async function regionListClient(\n  defaultRequestInit: RequestInit,\n  { apiKey }: RegionListRequest = {}\n): Promise<RegionListResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const response = await fetch(\n    url,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: RegionListResponse = await response.json();\n\n  return json;\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  getStatistics,\n  getStatisticsClient,\n  getStatisticsEndpoints,\n} from \"./getStatistics\";\nimport { u } from \"./untypeable\";\n\nconst statisticsRouter = u.router({\n  [getStatisticsEndpoints.getStatistics]: getStatistics,\n  [getStatisticsEndpoints[\"GET /statistics\"]]: getStatistics,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns statisticsClient\n *\n * @example\n * ```ts\n * const statisticsClient = createStatisticsClient({\n *   apiKey: API_ACCESS_KEY,\n * });\n *\n * const response = await statisticsClient(\"getStatistics\");\n * ```\n */\nexport function createStatisticsClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const statisticsClient = createTypeLevelClient<typeof statisticsRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case getStatisticsEndpoints.getStatistics:\n        case getStatisticsEndpoints[\"GET /statistics\"]:\n          return getStatisticsClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${statisticsClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return statisticsClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\n// TODO: test after traffic\nexport interface Statistics {\n  AverageOriginResponseTime: number;\n  BandwidthCachedChart: Record<string, number>;\n  BandwidthUsedChart: Record<string, number>;\n  CacheHitRate: number;\n  CacheHitRateChart: Record<string, number>;\n  Error3xxChart: Record<string, number>;\n  Error4xxChart: Record<string, number>;\n  Error5xxChart: Record<string, number>;\n  // TODO\n  GeoTrafficDistribution: any; // {}\n  OriginResponseTimeChart: Record<string, number>;\n  OriginShieldBandwidthUsedChart: Record<string, number>;\n  OriginShieldInternalBandwidthUsedChart: Record<string, number>;\n  OriginTrafficChart: Record<string, number>;\n  PullRequestsPulledChart: Record<string, number>;\n  RequestsServedChart: Record<string, number>;\n  TotalBandwidthUsed: number;\n  TotalOriginTraffic: number;\n  TotalRequestsServed: number;\n  UserBalanceHistoryChart: Record<string, number>;\n}\n\nexport interface GetStatisticsRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The ISO 8601 start date of the statistics. If no value is passed, the last 30 days will be returned.\n   * @example \"2023-04-27T00:00:00Z\"\n   */\n  dateFrom?: string;\n  /**\n   * The ISO 8601 end date of the statistics. If no value is passed, the last 30 days will be returned.\n   * @example \"2023-04-28T00:00:00Z\"\n   */\n  dateTo?: string;\n  /**\n   * If true, the statistics data will be returned in hourly grouping.\n   * @example false\n   */\n  hourly?: boolean;\n  /**\n   * If set, the respose will contain the non-2xx response\n   * @example false\n   */\n  loadErrors?: boolean;\n  /**\n   * If set, the statistics will be only returned for the given Pull Zone\n   */\n  pullZone?: number;\n  /**\n   * If set, the statistics will be only returned for the given region ID\n   */\n  serverZoneId?: number;\n}\n\nexport type GetStatisticsResponse = Statistics;\n\nexport const getStatistics = u\n  .input<GetStatisticsRequest>()\n  .output<GetStatisticsResponse>();\n\nconst url = \"https://api.bunny.net/statistics\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getStatisticsEndpoints = {\n  \"GET /statistics\": \"GET /statistics\",\n  getStatistics: \"getStatistics\",\n} as const;\n\nexport async function getStatisticsClient(\n  defaultRequestInit: RequestInit,\n  {\n    apiKey,\n    dateFrom,\n    dateTo,\n    hourly = false,\n    loadErrors = false,\n    pullZone = -1,\n    serverZoneId = -1,\n  }: GetStatisticsRequest = {}\n): Promise<GetStatisticsResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const urlSearchParameters = new URLSearchParams({\n    ...(dateFrom && { dateFrom }),\n    ...(dateTo && { dateTo }),\n    hourly: hourly.toString(),\n    loadErrors: loadErrors.toString(),\n    pullZone: pullZone.toString(),\n    serverZoneId: serverZoneId.toString(),\n  }).toString();\n\n  const overrideUrl = `${url}?${urlSearchParameters}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetStatisticsResponse = await response.json();\n\n  return json;\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  addStorageZone,\n  addStorageZoneClient,\n  addStorageZoneEndpoints,\n} from \"./addStorageZone\";\nimport {\n  checkTheStorageZoneAvailability,\n  checkTheStorageZoneAvailabilityClient,\n  checkTheStorageZoneAvailabilityEndpoints,\n} from \"./checkTheStorageZoneAvailability\";\nimport {\n  deleteStorageZone,\n  deleteStorageZoneClient,\n  deleteStorageZoneEndpoints,\n} from \"./deleteStorageZone\";\nimport {\n  getStorageZone,\n  getStorageZoneClient,\n  getStorageZoneEndpoints,\n} from \"./getStorageZone\";\nimport {\n  getStorageZoneStatistics,\n  getStorageZoneStatisticsClient,\n  getStorageZoneStatisticsEndpoints,\n} from \"./getStorageZoneStatistics\";\nimport {\n  listStorageZones,\n  listStorageZonesClient,\n  listStorageZonesEndpoints,\n} from \"./listStorageZones\";\nimport {\n  resetPassword,\n  resetPasswordClient,\n  resetPasswordEndpoints,\n} from \"./resetPassword\";\nimport {\n  resetReadOnlyPassword,\n  resetReadOnlyPasswordClient,\n  resetReadOnlyPasswordEndpoints,\n} from \"./resetReadOnlyPassword\";\nimport { u } from \"./untypeable\";\nimport {\n  updateStorageZone,\n  updateStorageZoneClient,\n  updateStorageZoneEndpoints,\n} from \"./updateStorageZone\";\n\nconst storageZoneRouter = u.router({\n  [addStorageZoneEndpoints.addStorageZone]: addStorageZone,\n  [addStorageZoneEndpoints[\"POST /storagezone\"]]: addStorageZone,\n  [checkTheStorageZoneAvailabilityEndpoints.checkTheStorageZoneAvailability]:\n    checkTheStorageZoneAvailability,\n  [checkTheStorageZoneAvailabilityEndpoints[\n    \"POST /storagezone/checkavailability\"\n  ]]: checkTheStorageZoneAvailability,\n  [deleteStorageZoneEndpoints.deleteStorageZone]: deleteStorageZone,\n  [deleteStorageZoneEndpoints[\"DELETE /storagezone/:id\"]]: deleteStorageZone,\n  [getStorageZoneEndpoints.getStorageZone]: getStorageZone,\n  [getStorageZoneEndpoints[\"GET /storagezone/:id\"]]: getStorageZone,\n  [getStorageZoneStatisticsEndpoints.getStorageZoneStatistics]:\n    getStorageZoneStatistics,\n  [getStorageZoneStatisticsEndpoints[\"GET /storagezone/:id/statistics\"]]:\n    getStorageZoneStatistics,\n  [listStorageZonesEndpoints.listStorageZones]: listStorageZones,\n  [listStorageZonesEndpoints[\"GET /storagezone\"]]: listStorageZones,\n  [resetPasswordEndpoints.resetPassword]: resetPassword,\n  [resetPasswordEndpoints[\"POST /storagezone/:id/resetPassword\"]]:\n    resetPassword,\n  [resetReadOnlyPasswordEndpoints.resetReadOnlyPassword]: resetReadOnlyPassword,\n  [resetReadOnlyPasswordEndpoints[\n    \"POST /storagezone/resetReadOnlyPassword?id=:id\"\n  ]]: resetReadOnlyPassword,\n  [updateStorageZoneEndpoints.updateStorageZone]: updateStorageZone,\n  [updateStorageZoneEndpoints[\"POST /storagezone/:id\"]]: updateStorageZone,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns storageZoneClient\n *\n * @example\n * ```ts\n * const storageZoneClient = createStorageZoneClient({\n *   apiKey: API_ACCESS_KEY,\n * });\n *\n * const response = await storageZoneClient(\"addStorageZone\", {\n *   Name: \"api-example\",\n *   Region: \"NY\",\n *   ZoneTier: 1,\n * });\n * ```\n */\nexport function createStorageZoneClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const storageZoneClient = createTypeLevelClient<typeof storageZoneRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case addStorageZoneEndpoints.addStorageZone:\n        case addStorageZoneEndpoints[\"POST /storagezone\"]:\n          return addStorageZoneClient(defaultRequestInit, overrideInput);\n        case checkTheStorageZoneAvailabilityEndpoints.checkTheStorageZoneAvailability:\n        case checkTheStorageZoneAvailabilityEndpoints[\n          \"POST /storagezone/checkavailability\"\n        ]:\n          return checkTheStorageZoneAvailabilityClient(\n            defaultRequestInit,\n            overrideInput\n          );\n        case deleteStorageZoneEndpoints.deleteStorageZone:\n        case deleteStorageZoneEndpoints[\"DELETE /storagezone/:id\"]:\n          return deleteStorageZoneClient(defaultRequestInit, overrideInput);\n        case getStorageZoneEndpoints.getStorageZone:\n        case getStorageZoneEndpoints[\"GET /storagezone/:id\"]:\n          return getStorageZoneClient(defaultRequestInit, overrideInput);\n        case getStorageZoneStatisticsEndpoints.getStorageZoneStatistics:\n        case getStorageZoneStatisticsEndpoints[\n          \"GET /storagezone/:id/statistics\"\n        ]:\n          return getStorageZoneStatisticsClient(\n            defaultRequestInit,\n            overrideInput\n          );\n        case listStorageZonesEndpoints.listStorageZones:\n        case listStorageZonesEndpoints[\"GET /storagezone\"]:\n          return listStorageZonesClient(defaultRequestInit, overrideInput);\n        case resetPasswordEndpoints.resetPassword:\n        case resetPasswordEndpoints[\"POST /storagezone/:id/resetPassword\"]:\n          return resetPasswordClient(defaultRequestInit, overrideInput);\n        case resetReadOnlyPasswordEndpoints.resetReadOnlyPassword:\n        case resetReadOnlyPasswordEndpoints[\n          \"POST /storagezone/resetReadOnlyPassword?id=:id\"\n        ]:\n          return resetReadOnlyPasswordClient(defaultRequestInit, overrideInput);\n        case updateStorageZoneEndpoints.updateStorageZone:\n        case updateStorageZoneEndpoints[\"POST /storagezone/:id\"]:\n          return updateStorageZoneClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${storageZoneClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return storageZoneClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { Region, ReplicationRegion, StorageZone } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface AddStorageZoneRequestBase {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The name of the storage zone\n   * @example \"mywebsite\"\n   */\n  Name: string;\n  /**\n   * The origin URL of the storage zone that will be added\n   *\n   * The origin URL is a very important part of your Pull Zone. It tells our servers where to fetch files that we don't yet have in cache. In the majority of cases, this will simply be the URL of your website or storage service. Please make sure that if your website is using HTTPS, that you make sure your origin URL is set up with HTTPS as well to keep the connection encrypted throughout the network.\n   *\n   * @example \"https://mywebsite.com\"\n   */\n  OriginUrl?: string;\n  /**\n   * The code of the main storage zone region (Possible values: DE, NY, LA, SG)\n   * @example \"NY\"\n   */\n  Region: Region;\n}\n\nexport interface AddStorageZoneRequestEdgeSsd\n  extends AddStorageZoneRequestBase {\n  /**\n   * The code of the main storage zone region (Possible values: DE, NY, LA, SG, SYD)\n   * @example \"DE\"\n   */\n  ReplicationRegions?: never;\n  /**\n   * Determines the storage zone tier that will be storing the data\n   *\n   * 0 - Standard\n   *\n   * 1 - Edge (SSD)\n   *\n   * @example 0\n   */\n  ZoneTier: 1;\n}\n\nexport interface AddStorageZoneRequestReplicationRegion\n  extends AddStorageZoneRequestBase {\n  /**\n   * The code of the main storage zone region (Possible values: DE, NY, LA, SG, SYD)\n   * @example \"DE\"\n   */\n  ReplicationRegions?: ReplicationRegion[];\n  /**\n   * Determines the storage zone tier that will be storing the data\n   * @example 0\n   */\n  ZoneTier: 0;\n}\n\n// Mutually exclusive options https://effectivetypescript.com/2021/11/11/optional-never/\nexport type AddStorageZoneRequest =\n  | AddStorageZoneRequestEdgeSsd\n  | AddStorageZoneRequestReplicationRegion;\n\nexport type AddStorageZoneResponse = StorageZone;\n\nexport const addStorageZone = u\n  .input<AddStorageZoneRequest>()\n  .output<AddStorageZoneResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n    \"content-type\": \"application/json\",\n  },\n  method: \"POST\",\n};\n\nexport const addStorageZoneEndpoints = {\n  addStorageZone: \"addStorageZone\",\n  \"POST /storagezone\": \"POST /storagezone\",\n} as const;\n\nexport async function addStorageZoneClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, ...input }: AddStorageZoneRequest\n): Promise<AddStorageZoneResponse> {\n  const overrideOptions: RequestInit = {\n    body: JSON.stringify(input),\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const response = await fetch(\n    url,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: AddStorageZoneResponse = await response.json();\n\n  return json;\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface CheckTheStorageZoneAvailabilityRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * Determines the name of the zone that we are checking.\n   *\n   * The zone can be any in the [Points of Presence](https://web.archive.org/web/20230427225159/https://www.imperva.com/learn/performance/what-is-cdn-how-it-works/) [list](https://web.archive.org/web/20230427225239/https://bunny.net/network/) of abbreviations\n   * @example \"NY\"\n   */\n  Name: string;\n}\n\nexport interface CheckTheStorageZoneAvailabilityResponse {\n  Available: boolean;\n}\n\nexport const checkTheStorageZoneAvailability = u\n  .input<CheckTheStorageZoneAvailabilityRequest>()\n  .output<CheckTheStorageZoneAvailabilityResponse>();\n\nconst url = \"https://api.bunny.net/storagezone/checkavailability\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n    \"content-type\": \"application/json\",\n  },\n  method: \"POST\",\n};\n\nexport const checkTheStorageZoneAvailabilityEndpoints = {\n  checkTheStorageZoneAvailability: \"checkTheStorageZoneAvailability\",\n  \"POST /storagezone/checkavailability\": \"POST /storagezone/checkavailability\",\n} as const;\n\nexport async function checkTheStorageZoneAvailabilityClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, ...input }: CheckTheStorageZoneAvailabilityRequest\n): Promise<CheckTheStorageZoneAvailabilityResponse> {\n  const overrideOptions: RequestInit = {\n    body: JSON.stringify(input),\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const response = await fetch(\n    url,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: CheckTheStorageZoneAvailabilityResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface DeleteStorageZoneRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * IMPORTANT: deleted buckets cannot be re-created with the same name\n   *\n   * You can list deleted buckets with the `includeDeleted` option when using `listFiles`\n   *\n   * The Storage Zone ID that should be deleted\n   * @example 270299\n   */\n  id: number;\n}\n\nexport type DeleteStorageZoneResponse = void;\n\nexport const deleteStorageZone = u\n  .input<DeleteStorageZoneRequest>()\n  .output<DeleteStorageZoneResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  method: \"DELETE\",\n};\n\nexport const deleteStorageZoneEndpoints = {\n  \"DELETE /storagezone/:id\": \"DELETE /storagezone/:id\",\n  deleteStorageZone: \"deleteStorageZone\",\n} as const;\n\nexport async function deleteStorageZoneClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: DeleteStorageZoneRequest\n): Promise<DeleteStorageZoneResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { StorageZone } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface GetStorageZoneRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The ID of the Storage Zone that should be returned\n   * @example 270299\n   */\n  id: number;\n}\n\nexport type GetStorageZoneResponse = StorageZone;\n\nexport const getStorageZone = u\n  .input<GetStorageZoneRequest>()\n  .output<GetStorageZoneResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getStorageZoneEndpoints = {\n  \"GET /storagezone/:id\": \"GET /storagezone/:id\",\n  getStorageZone: \"getStorageZone\",\n} as const;\n\nexport async function getStorageZoneClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: GetStorageZoneRequest\n): Promise<GetStorageZoneResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetStorageZoneResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface GetStorageZoneStatisticsRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The ISO 8601 start date of the statistics. If no value is passed, the last 30 days will be returned.\n   * @example \"2023-04-15T00:00:00Z\"\n   */\n  dateFrom?: string;\n  /**\n   * The ISO 8601 end date of the statistics. If no value is passed, the last 30 days will be returned.\n   * @example \"2023-04-17T00:00:00Z\"\n   */\n  dateTo?: string;\n  /**\n   * The ID of the storage zone\n   * @example 270299\n   */\n  id: number;\n}\n\nexport interface GetStorageZoneStatisticsResponse {\n  /**\n   * BUG: may be inaccurate with new or empty buckets\n   *\n   * key: ISO 8601 date and time\n   *\n   * value: total file count\n   *\n   * @example { \"2023-03-29T00:00:00Z\": 191475, }\n   */\n  FileCountChart: Record<string, number>;\n  /**\n   * BUG: may be inaccurate with new or empty buckets\n   *\n   * key: ISO 8601 date and time\n   *\n   * value: storage used\n   *\n   * @example { \"2023-03-29T00:00:00Z\": 9274615899, }\n   */\n  StorageUsedChart: Record<string, number>;\n}\n\nexport const getStorageZoneStatistics = u\n  .input<GetStorageZoneStatisticsRequest>()\n  .output<GetStorageZoneStatisticsResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getStorageZoneStatisticsEndpoints = {\n  \"GET /storagezone/:id/statistics\": \"GET /storagezone/:id/statistics\",\n  getStorageZoneStatistics: \"getStorageZoneStatistics\",\n} as const;\n\nexport async function getStorageZoneStatisticsClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, dateFrom, dateTo, id }: GetStorageZoneStatisticsRequest\n): Promise<GetStorageZoneStatisticsResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const urlSearchParameters = new URLSearchParams({\n    ...(dateFrom && { dateFrom }),\n    ...(dateTo && { dateTo }),\n  }).toString();\n\n  const overrideUrl = `${url}/${id}/statistics?${urlSearchParameters}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetStorageZoneStatisticsResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { StorageZone } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface ListStorageZonesRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * Should include deleted storage zones\n   * @example false\n   */\n  includeDeleted?: boolean;\n  /**\n   * Page number between 1 and 2147483647\n   * @example 1\n   */\n  page?: number;\n  /**\n   * Number of results per page between 5 and 1000\n   * @example 1000\n   */\n  perPage?: number;\n  /**\n   * The search term that will be used to filter the results\n   * @example \"storage-zone-name-substring\"\n   */\n  search?: string;\n}\n\nexport interface ListStorageZonesResponse {\n  /**\n   * The current query page number\n   * @example 1\n   */\n  CurrentPage: number;\n  /**\n   * Whether the query has additional pages of results\n   * @example false\n   */\n  HasMoreItems: boolean;\n  /**\n   * List of storage zones that match the query\n   */\n  Items: StorageZone[];\n  /**\n   * The total number of queried items in all pages\n   * @example 5\n   */\n  TotalItems: number;\n}\n\nexport const listStorageZones = u\n  .input<ListStorageZonesRequest>()\n  .output<ListStorageZonesResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const listStorageZonesEndpoints = {\n  \"GET /storagezone\": \"GET /storagezone\",\n  listStorageZones: \"listStorageZones\",\n} as const;\n\nexport async function listStorageZonesClient(\n  defaultRequestInit: RequestInit,\n  {\n    apiKey,\n    includeDeleted,\n    page = 1,\n    perPage = 1000,\n    search,\n  }: ListStorageZonesRequest\n): Promise<ListStorageZonesResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const urlSearchParameters = new URLSearchParams({\n    ...(typeof includeDeleted === \"boolean\" && {\n      includeDeleted: includeDeleted.toString(),\n    }),\n    ...(search && { search }),\n    page: page.toString(),\n    perPage: perPage.toString(),\n  }).toString();\n\n  const overrideUrl = `${url}?${urlSearchParameters}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: ListStorageZonesResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface ResetPasswordRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The ID of the storage zone that should have the password reset\n   * @example 270299\n   */\n  id: number;\n}\n\nexport type ResetPasswordResponse = void;\n\nexport const resetPassword = u\n  .input<ResetPasswordRequest>()\n  .output<ResetPasswordResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  method: \"POST\",\n};\n\nexport const resetPasswordEndpoints = {\n  \"POST /storagezone/:id/resetPassword\": \"POST /storagezone/:id/resetPassword\",\n  resetPassword: \"resetPassword\",\n} as const;\n\nexport async function resetPasswordClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: ResetPasswordRequest\n): Promise<ResetPasswordResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}/resetPassword`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface ResetReadOnlyPasswordRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * The ID of the storage zone that should have the read-only password reset\n   * @example 270299\n   */\n  id: number;\n}\n\nexport type ResetReadOnlyPasswordResponse = void;\n\nexport const resetReadOnlyPassword = u\n  .input<ResetReadOnlyPasswordRequest>()\n  .output<ResetReadOnlyPasswordResponse>();\n\nconst url = \"https://api.bunny.net/storagezone/resetReadOnlyPassword\";\nconst options: RequestInit = {\n  method: \"POST\",\n};\n\nexport const resetReadOnlyPasswordEndpoints = {\n  \"POST /storagezone/resetReadOnlyPassword?id=:id\":\n    \"POST /storagezone/resetReadOnlyPassword?id=:id\",\n  resetReadOnlyPassword: \"resetReadOnlyPassword\",\n} as const;\n\nexport async function resetReadOnlyPasswordClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: ResetReadOnlyPasswordRequest\n): Promise<ResetReadOnlyPasswordResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const urlSearchParameters = new URLSearchParams({\n    id: id.toString(),\n  }).toString();\n\n  const overrideUrl = `${url}?${urlSearchParameters}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { ReplicationRegion as ReplicationZone } from \"../types\";\nimport { u } from \"../untypeable\";\n\n// TODO\nexport interface UpdateStorageZoneRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  // TODO: confirm path\n  /**\n   * The path to the custom file that will be returned in a case of 404\n   * @example \"/my-partial/url/404.html\"\n   */\n  Custom404FilePath?: string;\n  /**\n   * The ID of the storage zone that should be updated\n   * @example 270302\n   */\n  id: number;\n  /**\n   * The origin URL of the storage zone\n   *\n   * The origin URL is a very important part of your Pull Zone. It tells our servers where to fetch files that we don't yet have in cache. In the majority of cases, this will simply be the URL of your website or storage service. Please make sure that if your website is using HTTPS, that you make sure your origin URL is set up with HTTPS as well to keep the connection encrypted throughout the network.\n   *\n   * @example \"https://mywebsite.com\"\n   */\n  OriginUrl?: string;\n  /**\n   * The list of replication zones enabled for the storage zone\n   * @example \"DE\"\n   */\n  ReplicationZones?: ReplicationZone[];\n  /**\n   * Rewrite 404 status code to 200 for URLs without extension\n   * @example true\n   */\n  Rewrite404To200?: boolean;\n}\n\nexport type UpdateStorageZoneResponse = void;\n\nexport const updateStorageZone = u\n  .input<UpdateStorageZoneRequest>()\n  .output<UpdateStorageZoneResponse>();\n\nconst url = \"https://api.bunny.net/storagezone\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n    \"content-type\": \"application/json\",\n  },\n  method: \"POST\",\n};\n\nexport const updateStorageZoneEndpoints = {\n  \"POST /storagezone/:id\": \"POST /storagezone/:id\",\n  updateStorageZone: \"updateStorageZone\",\n} as const;\n\nexport async function updateStorageZoneClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id, ...input }: UpdateStorageZoneRequest\n): Promise<UpdateStorageZoneResponse> {\n  const overrideOptions: RequestInit = {\n    body: JSON.stringify(input),\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  closeTicket,\n  closeTicketClient,\n  closeTicketEndpoints,\n} from \"./closeTicket\";\nimport {\n  createTicket,\n  createTicketClient,\n  createTicketEndpoints,\n} from \"./createTicket\";\nimport {\n  getTicketDetails,\n  getTicketDetailsClient,\n  getTicketDetailsEndpoints,\n} from \"./getTicketDetails\";\nimport {\n  getTicketList,\n  getTicketListClient,\n  getTicketListEndpoints,\n} from \"./getTicketList\";\nimport {\n  replyTicket,\n  replyTicketClient,\n  replyTicketEndpoints,\n} from \"./replyTicket\";\nimport { u } from \"./untypeable\";\n\nconst statisticsRouter = u.router({\n  [closeTicketEndpoints.closeTicket]: closeTicket,\n  [closeTicketEndpoints[\"POST /support/ticket/:id/close\"]]: closeTicket,\n  [createTicketEndpoints.createTicket]: createTicket,\n  [createTicketEndpoints[\"POST /support/ticket/create\"]]: createTicket,\n  [getTicketDetailsEndpoints.getTicketDetails]: getTicketDetails,\n  [getTicketDetailsEndpoints[\"GET /support/ticket/details/:id\"]]:\n    getTicketDetails,\n  [getTicketListEndpoints.getTicketList]: getTicketList,\n  [getTicketListEndpoints[\"GET /support/ticket/list\"]]: getTicketList,\n  [replyTicketEndpoints.replyTicket]: replyTicket,\n  [replyTicketEndpoints[\"POST /support/ticket/:id/reply\"]]: replyTicket,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns statisticsClient\n *\n * @example\n * ```ts\n * const supportClient = createSupportClient({\n *   apiKey: API_ACCESS_KEY,\n * });\n *\n * const response = await supportClient(\"getTicketList\");\n * ```\n */\nexport function createSupportClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const supportClient = createTypeLevelClient<typeof statisticsRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case closeTicketEndpoints.closeTicket:\n        case closeTicketEndpoints[\"POST /support/ticket/:id/close\"]:\n          return closeTicketClient(defaultRequestInit, overrideInput);\n        case createTicketEndpoints.createTicket:\n        case createTicketEndpoints[\"POST /support/ticket/create\"]:\n          return createTicketClient(defaultRequestInit, overrideInput);\n        case getTicketDetailsEndpoints.getTicketDetails:\n        case getTicketDetailsEndpoints[\"GET /support/ticket/details/:id\"]:\n          return getTicketDetailsClient(defaultRequestInit, overrideInput);\n        case getTicketListEndpoints.getTicketList:\n        case getTicketListEndpoints[\"GET /support/ticket/list\"]:\n          return getTicketListClient(defaultRequestInit, overrideInput);\n        case replyTicketEndpoints.replyTicket:\n        case replyTicketEndpoints[\"POST /support/ticket/:id/reply\"]:\n          return replyTicketClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${supportClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return supportClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface CloseTicketRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * Ticket id\n   * @example 196584\n   */\n  id: number;\n}\n\nexport type CloseTicketResponse = void;\n\nexport const closeTicket = u\n  .input<CloseTicketRequest>()\n  .output<CloseTicketResponse>();\n\nconst url = \"https://api.bunny.net/support/ticket\";\nconst options: RequestInit = {\n  method: \"POST\",\n};\n\nexport const closeTicketEndpoints = {\n  closeTicket: \"closeTicket\",\n  \"POST /support/ticket/:id/close\": \"POST /support/ticket/:id/close\",\n} as const;\n\nexport async function closeTicketClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: CloseTicketRequest\n): Promise<CloseTicketResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}/close`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { CreateAttachment, Ticket } from \"../types\";\nimport { u } from \"../untypeable\";\n\n// TODO: fill in all the id examples\nexport interface CreateTicketRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * File attachments related to this ticket\n   */\n  Attachments?: CreateAttachment[];\n  /**\n   * Dns zone id related to this ticket\n   */\n  LinkedDnsZone?: number;\n  /**\n   * Pull zone id related to this ticket\n   */\n  LinkedPullZone?: number;\n  /**\n   * Storage zone id related to this ticket\n   */\n  LinkedStorageZone?: number;\n  /**\n   * Video library id related to this ticket\n   */\n  LinkedVideoLibrary?: number;\n  /**\n   * Ticket message\n   * @example \"My videos are buffering\"\n   */\n  Message: string;\n  /**\n   * Ticket subject line\n   * @example \"Stream\"\n   */\n  Subject?: string;\n}\n\nexport type CreateTicketResponse = Ticket;\n\nexport const createTicket = u\n  .input<CreateTicketRequest>()\n  .output<CreateTicketResponse>();\n\nconst url = \"https://api.bunny.net/support/ticket/create\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n    \"content-type\": \"application/json\",\n  },\n  method: \"POST\",\n};\n\nexport const createTicketEndpoints = {\n  createTicket: \"createTicket\",\n  \"POST /support/ticket/create\": \"POST /support/ticket/create\",\n} as const;\n\nexport async function createTicketClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, ...input }: CreateTicketRequest\n): Promise<CreateTicketResponse> {\n  const overrideOptions: RequestInit = {\n    body: JSON.stringify(input),\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const response = await fetch(\n    url,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: CreateTicketResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { type Ticket } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface GetTicketDetailsRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * Ticket id\n   * @example 196584\n   */\n  id: number;\n}\n\nexport type GetTicketDetailsResponse = Ticket;\n\nexport const getTicketDetails = u\n  .input<GetTicketDetailsRequest>()\n  .output<GetTicketDetailsResponse>();\n\nconst url = \"https://api.bunny.net/support/ticket/details\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getTicketDetailsEndpoints = {\n  \"GET /support/ticket/details/:id\": \"GET /support/ticket/details/:id\",\n  getTicketDetails: \"getTicketDetails\",\n} as const;\n\nexport async function getTicketDetailsClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id }: GetTicketDetailsRequest\n): Promise<GetTicketDetailsResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetTicketDetailsResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport { type Ticket } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface GetTicketListRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * Current page of tickets list\n   * @example 1\n   */\n  page?: number;\n  /**\n   * Number of tickets per page\n   * @example 100\n   */\n  perPage?: number;\n}\n\nexport interface GetTicketListResponse {\n  /**\n   * Current page in ticket list\n   * @example 1\n   */\n  CurrentPage: number;\n  /**\n   * Ticket list has more pages\n   * @example false\n   */\n  HasMoreItems: boolean;\n  /**\n   * List of tickets\n   */\n  Items: Ticket[];\n  /**\n   * Total number of tickets in all pages\n   * @example 3\n   */\n  TotalItems: number;\n}\n\nexport const getTicketList = u\n  .input<GetTicketListRequest>()\n  .output<GetTicketListResponse>();\n\nconst url = \"https://api.bunny.net/support/ticket/list\";\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const getTicketListEndpoints = {\n  \"GET /support/ticket/list\": \"GET /support/ticket/list\",\n  getTicketList: \"getTicketList\",\n} as const;\n\nexport async function getTicketListClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, page, perPage }: GetTicketListRequest = {}\n): Promise<GetTicketListResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const urlSearchParameters = new URLSearchParams({\n    ...(typeof page === \"number\" && { page: page.toString() }),\n    ...(typeof perPage === \"number\" && { perPage: perPage.toString() }),\n  }).toString();\n\n  const overrideUrl = `${url}?${urlSearchParameters}`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: GetTicketListResponse = await response.json();\n\n  return json;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport { FetchError } from \"../../../utilities\";\nimport type { CreateAttachment, Ticket } from \"../types\";\nimport { u } from \"../untypeable\";\n\nexport interface ReplyTicketRequest {\n  /**\n   * User-specific [API Key](https://dash.bunny.net/account/settings)\n   * @example \"cb1a7c68-89a0-462a-9495-13ebd7366cfe\"\n   */\n  apiKey?: string;\n  /**\n   * File attachments related to this ticket\n   */\n  Attachments?: CreateAttachment[];\n  /**\n   * Ticket id\n   * @example 196584\n   */\n  id: number;\n  /**\n   * Ticket message\n   * @example \"My videos are still buffering\"\n   */\n  Message?: string;\n}\n\nexport type ReplyTicketResponse = Ticket;\n\nexport const replyTicket = u\n  .input<ReplyTicketRequest>()\n  .output<ReplyTicketResponse>();\n\nconst url = \"https://api.bunny.net/support/ticket\";\nconst options: RequestInit = {\n  headers: {\n    \"content-type\": \"application/json\",\n  },\n  method: \"POST\",\n};\n\nexport const replyTicketEndpoints = {\n  \"POST /support/ticket/:id/reply\": \"POST /support/ticket/:id/reply\",\n  replyTicket: \"replyTicket\",\n} as const;\n\nexport async function replyTicketClient(\n  defaultRequestInit: RequestInit,\n  { apiKey, id, ...input }: ReplyTicketRequest\n): Promise<ReplyTicketResponse> {\n  const overrideOptions: RequestInit = {\n    body: JSON.stringify(input),\n    headers: {\n      ...(apiKey && { AccessKey: apiKey }),\n    },\n  };\n\n  const overrideUrl = `${url}/${id}/reply`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: ReplyTicketResponse = await response.json();\n\n  return json;\n}\n","import { createTypeLevelClient } from \"untypeable\";\nimport { listFiles, listFilesClient, listFilesEndpoints } from \"./listFiles\";\nimport { u } from \"./untypeable\";\n\nconst statisticsRouter = u.router({\n  [listFilesEndpoints.listFiles]: listFiles,\n  [listFilesEndpoints[\"GET /:storageZoneName/:path\"]]: listFiles,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns browseFilesClient\n *\n * @example\n * ```ts\n * const browseFilesClient = createBrowseFilesClient({\n *   storageZonePassword: \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\",\n *   storageZoneEndpoint: \"ny.storage.bunnycdn.com\",\n *   storageZoneName: \"example-storage-zone\",\n * });\n *\n * const response = await browseFilesClient(\"listFiles\");\n * ```\n */\nexport function createBrowseFilesClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const browseFilesClient = createTypeLevelClient<typeof statisticsRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case listFilesEndpoints.listFiles:\n        case listFilesEndpoints[\"GET /:storageZoneName/:path\"]:\n          return listFilesClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${browseFilesClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return browseFilesClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport normalize from \"normalize-path\";\nimport type { StorageHostname as StorageZoneEndpoint } from \"../../../api/storage-zone/types\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface File {\n  /**\n   * @example 0\n   */\n  ArrayNumber: number;\n  /**\n   * The hex-encoded SHA256 checksum of the uploaded content.\n   *\n   * File\n   * @example \"49BC20DF15E412A64472421E13FE86FF1C5165E18B2AFCCF160D4DC19FE68A14\"\n   *\n   * Folder\n   * @example null\n   */\n  Checksum: string | null;\n  /**\n   * [Content-Type](https://web.archive.org/web/20230429020308/https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) of the attachment, see also [MIME Types](https://web.archive.org/web/20230429020146/https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)\n   * @example \"\"\n   * @example \"text/plain\"\n   */\n  ContentType: string;\n  /**\n   * ISO 8601 date and time of file created\n   * @example \"2023-05-01T04:06:38.882\"\n   */\n  DateCreated: string;\n  /**\n   * File id\n   * @example \"02f8ef36-e3e8-4701-a86f-08cab3efe8b9\"\n   */\n  Guid: string;\n  /**\n   * File is directory\n   *\n   * File\n   * @example false\n   *\n   * Folder\n   * @example true\n   */\n  IsDirectory: boolean;\n  /**\n   * ISO 8601 date and time of file last changed\n   */\n  LastChanged: string;\n  /**\n   * Length of file in bytes\n   *\n   * File\n   * @example 1073741824\n   *\n   * Folder\n   * @example 0\n   */\n  Length: number;\n  /**\n   * File\n   * @example demo.db\n   *\n   * Folder\n   * @example subpath\n   */\n  ObjectName: string;\n  /**\n   * File path\n   * @example \"/example-storage-zone/subpath/\"\n   */\n  Path: string;\n  /**\n   * Storage zone replication regions the file exists in (BUG: may be empty string)\n   * @example \"\"\n   */\n  ReplicatedZones: \"\";\n  /**\n   * Server id\n   *\n   * File\n   * @example 562\n   *\n   * Folder\n   * @example 0\n   */\n  ServerId: number;\n  /**\n   * Storage zone id where the file is located\n   * @example 271332\n   */\n  StorageZoneId: number;\n  /**\n   * Storage zone name\n   * @example \"example-storage-zone\"\n   */\n  StorageZoneName: string;\n  /**\n   * User id associated with file\n   * @example \"c2fbdbcf-0961-4a89-b818-edf3ad7456e3\"\n   */\n  UserId: string;\n}\n\nexport interface ListFilesRequest {\n  /**\n   * The directory path to where your file will be stored. If this is the root of your storage zone, you can ignore this parameter.\n   * @example \"subpath\"\n   */\n  path?: string;\n  /**\n   * The storage API endpoint depends on the primary storage region of your storage zone. You can also find this in the FTP & HTTP API Information of your storage zone.\n   * @example \"ny.storage.bunnycdn.com\"\n   */\n  storageZoneEndpoint?: StorageZoneEndpoint;\n  /**\n   * The name of your storage zone where you are connecting to.\n   * @example \"example-storage-zone\"\n   */\n  storageZoneName?: string;\n  /**\n   * The storage zone password\n   * @example \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\"\n   */\n  storageZonePassword?: string;\n}\n\nexport type ListFilesResponse = File[];\n\nexport const listFiles = u\n  .input<ListFilesRequest>()\n  .output<ListFilesResponse>();\n\nconst options: RequestInit = {\n  headers: {\n    accept: \"application/json\",\n  },\n  method: \"GET\",\n};\n\nexport const listFilesEndpoints = {\n  \"GET /:storageZoneName/:path\": \"GET /:storageZoneName/:path\",\n  listFiles: \"listFiles\",\n} as const;\n\nexport async function listFilesClient(\n  defaultRequestInit: RequestInit,\n  {\n    path = \"\",\n    storageZoneEndpoint = \"storage.bunnycdn.com\",\n    storageZoneName = \"\",\n    storageZonePassword,\n  }: ListFilesRequest\n): Promise<ListFilesResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(storageZonePassword && { AccessKey: storageZonePassword }),\n    },\n  };\n\n  const fullPath = normalize(`${storageZoneName}/${path}`);\n  const overrideUrl = `https://${storageZoneEndpoint}/${fullPath}/`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  const json: File[] = await response.json();\n\n  return json;\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { createTypeLevelClient } from \"untypeable\";\nimport {\n  deleteFile,\n  deleteFileClient,\n  deleteFileEndpoints,\n} from \"./deleteFile\";\nimport {\n  downloadFile,\n  downloadFileClient,\n  downloadFileEndpoints,\n} from \"./downloadFile\";\nimport { u } from \"./untypeable\";\nimport {\n  uploadFile,\n  uploadFileClient,\n  uploadFileEndpoints,\n} from \"./uploadFile\";\n\nconst statisticsRouter = u.router({\n  [deleteFileEndpoints.deleteFile]: deleteFile,\n  [deleteFileEndpoints[\"DELETE /:storageZoneName/:path/:fileName\"]]: deleteFile,\n  [downloadFileEndpoints.downloadFile]: downloadFile,\n  [downloadFileEndpoints[\"GET /:storageZoneName/:path/:fileName\"]]:\n    downloadFile,\n  [uploadFileEndpoints.uploadFile]: uploadFile,\n  [uploadFileEndpoints[\"PUT /:storageZoneName/:path/:fileName\"]]: uploadFile,\n});\n\n/**\n * @param defaultInput default input parameters for every request\n * @param defaultRequestInit default fetch parameters for every request\n * @returns manageFilesClient\n *\n * @example\n * ```ts\n * const manageFilesClient = createManageFilesClient({\n *   storageZonePassword: \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\",\n *   storageZoneEndpoint: \"ny.storage.bunnycdn.com\",\n *   storageZoneName: \"example-storage-zone\",\n * });\n *\n * const response = await manageFilesClient(\"deleteFile\", {\n *   fileName: \"demo.sqlite\",\n * });\n * ```\n */\nexport function createManageFilesClient(\n  defaultInput: Record<string, any> = {},\n  defaultRequestInit: RequestInit = {}\n) {\n  const manageFilesClient = createTypeLevelClient<typeof statisticsRouter>(\n    async (path, input) => {\n      const overrideInput = {\n        ...defaultInput,\n        ...input,\n      };\n\n      switch (path) {\n        case deleteFileEndpoints.deleteFile:\n        case deleteFileEndpoints[\"DELETE /:storageZoneName/:path/:fileName\"]:\n          return deleteFileClient(defaultRequestInit, overrideInput);\n        case downloadFileEndpoints.downloadFile:\n        case downloadFileEndpoints[\"GET /:storageZoneName/:path/:fileName\"]:\n          return downloadFileClient(defaultRequestInit, overrideInput);\n        case uploadFileEndpoints.uploadFile:\n        case uploadFileEndpoints[\"PUT /:storageZoneName/:path/:fileName\"]:\n          return uploadFileClient(defaultRequestInit, overrideInput);\n        default:\n          throw new Error(\n            `[${manageFilesClient.name}]: no endpoint found named \"${path}\"`\n          );\n      }\n    }\n  );\n  return manageFilesClient;\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport normalize from \"normalize-path\";\nimport type { StorageHostname as StorageZoneEndpoint } from \"../../../api/storage-zone/types\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface DeleteFileRequest {\n  /**\n   * The name that the file will be uploaded as.\n   * @example \"demo.sqlite\"\n   */\n  fileName: string;\n  /**\n   * The directory path to where your file will be stored. If this is the root of your storage zone, you can ignore this parameter.\n   * @example \"subpath\"\n   */\n  path?: string;\n  /**\n   * The storage API endpoint depends on the primary storage region of your storage zone. You can also find this in the FTP & HTTP API Information of your storage zone.\n   * @example \"ny.storage.bunnycdn.com\"\n   */\n  storageZoneEndpoint?: StorageZoneEndpoint;\n  /**\n   * The name of your storage zone where you are connecting to.\n   * @example \"example-storage-zone\"\n   */\n  storageZoneName?: string;\n  /**\n   * The storage zone password\n   * @example \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\"\n   */\n  storageZonePassword?: string;\n}\n\nexport type DeleteFileResponse = void;\n\nexport const deleteFile = u\n  .input<DeleteFileRequest>()\n  .output<DeleteFileResponse>();\n\nconst options: RequestInit = {\n  method: \"DELETE\",\n};\n\nexport const deleteFileEndpoints = {\n  \"DELETE /:storageZoneName/:path/:fileName\":\n    \"DELETE /:storageZoneName/:path/:fileName\",\n  deleteFile: \"deleteFile\",\n} as const;\n\nexport async function deleteFileClient(\n  defaultRequestInit: RequestInit,\n  {\n    fileName,\n    path = \"\",\n    storageZoneEndpoint = \"storage.bunnycdn.com\",\n    storageZoneName = \"\",\n    storageZonePassword,\n  }: DeleteFileRequest\n): Promise<DeleteFileResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(storageZonePassword && { AccessKey: storageZonePassword }),\n    },\n  };\n\n  const fullPath = normalize(`${storageZoneName}/${path}/${fileName}`);\n  const overrideUrl = `https://${storageZoneEndpoint}/${fullPath}/`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n","import { initUntypeable } from \"untypeable\";\n\nexport const u = initUntypeable();\n","import { deepmerge } from \"deepmerge-ts\";\nimport normalize from \"normalize-path\";\nimport type { StorageHostname as StorageZoneEndpoint } from \"../../../api/storage-zone/types\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface DownloadFileRequest {\n  /**\n   * The name that the file will be uploaded as.\n   * @example \"demo.sqlite\"\n   */\n  fileName: string;\n  /**\n   * The directory path to where your file will be stored. If this is the root of your storage zone, you can ignore this parameter.\n   * @example \"subpath\"\n   */\n  path?: string;\n  /**\n   * The storage API endpoint depends on the primary storage region of your storage zone. You can also find this in the FTP & HTTP API Information of your storage zone.\n   * @example \"ny.storage.bunnycdn.com\"\n   */\n  storageZoneEndpoint?: StorageZoneEndpoint;\n  /**\n   * The name of your storage zone where you are connecting to.\n   * @example \"example-storage-zone\"\n   */\n  storageZoneName?: string;\n  /**\n   * The storage zone password\n   * @example \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\"\n   */\n  storageZonePassword?: string;\n}\n\nexport type DownloadFileResponse = ArrayBuffer;\n\nexport const downloadFile = u\n  .input<DownloadFileRequest>()\n  .output<DownloadFileResponse>();\n\nconst options: RequestInit = {\n  headers: {\n    accept: \"*/*\",\n  },\n  method: \"GET\",\n};\n\nexport const downloadFileEndpoints = {\n  downloadFile: \"downloadFile\",\n  \"GET /:storageZoneName/:path/:fileName\":\n    \"GET /:storageZoneName/:path/:fileName\",\n} as const;\n\nexport async function downloadFileClient(\n  defaultRequestInit: RequestInit,\n  {\n    fileName,\n    path = \"\",\n    storageZoneEndpoint = \"storage.bunnycdn.com\",\n    storageZoneName = \"\",\n    storageZonePassword,\n  }: DownloadFileRequest\n): Promise<DownloadFileResponse> {\n  const overrideOptions: RequestInit = {\n    headers: {\n      ...(storageZonePassword && { AccessKey: storageZonePassword }),\n    },\n  };\n\n  const fullPath = normalize(`${storageZoneName}/${path}/${fileName}`);\n  const overrideUrl = `https://${storageZoneEndpoint}/${fullPath}/`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n\n  return response.arrayBuffer();\n}\n","import { deepmerge } from \"deepmerge-ts\";\nimport normalize from \"normalize-path\";\nimport type { StorageHostname as StorageZoneEndpoint } from \"../../../api/storage-zone/types\";\nimport { FetchError } from \"../../../utilities\";\nimport { u } from \"../untypeable\";\n\nexport interface UploadFileRequest {\n  /**\n   * The hex-encoded SHA256 checksum of the uploaded content. The server will compare the final SHA256 to the checksum and reject the request in case the checksums do not match.\n   * @example \"49bc20df15e412a64472421e13fe86ff1c5165e18b2afccf160d4dc19fe68a14\"\n   */\n  checksum?: string;\n  /**\n   * Raw request body should contain the contents of the file. This should be raw file data without any sort of encoding.\n   *\n   * Converting a Buffer to an ArrayBuffer safely:\n   * @example\n   * ```ts\n   * const buffer = Buffer.from(\"Hello World\");\n   * const arrayBuffer = buffer.buffer.slice(\n   *   buffer.byteOffset,\n   *   buffer.byteOffset + buffer.byteLength\n   * );\n   * const string = Buffer.from(arrayBuffer).toString();\n   * ```\n   *\n   * Converting a String to an ArrayBuffer safely:\n   * @example\n   * ```ts\n   * const textEncoder = new TextEncoder(); // Always utf-8\n   * const textDecoder = new TextDecoder(\"utf-8\");\n   *\n   * const uint8Array = textEncoder.encode(\"Hello World\");\n   * const arrayBuffer = uint8Array.buffer.slice(\n   *   uint8Array.byteOffset,\n   *   uint8Array.byteLength + uint8Array.byteOffset,\n   * );\n   * const string = textDecoder.decode(arrayBuffer);\n   * ```\n   */\n  file: ArrayBuffer;\n  /**\n   * The name that the file will be uploaded as.\n   * @example \"demo.sqlite\"\n   */\n  fileName: string;\n  /**\n   * The directory path to where your file will be stored. If this is the root of your storage zone, you can ignore this parameter.\n   * @example \"subpath\"\n   */\n  path?: string;\n  /**\n   * The storage API endpoint depends on the primary storage region of your storage zone. You can also find this in the FTP & HTTP API Information of your storage zone.\n   * @example \"ny.storage.bunnycdn.com\"\n   */\n  storageZoneEndpoint?: StorageZoneEndpoint;\n  /**\n   * The name of your storage zone where you are connecting to.\n   * @example \"example-storage-zone\"\n   */\n  storageZoneName?: string;\n  /**\n   * The storage zone password\n   * @example \"22a5e2c4-0b5f-4fb0-bdb94eebb264-8944-4154\"\n   */\n  storageZonePassword?: string;\n  // TODO: add cache tag https://bunny.net/blog/introducing-tag-based-cdn-cache-purging/\n}\n\nexport type UploadFileResponse = void;\n\nexport const uploadFile = u\n  .input<UploadFileRequest>()\n  .output<UploadFileResponse>();\n\nconst options: RequestInit = {\n  headers: {\n    \"content-type\": \"application/octet-stream\",\n  },\n  method: \"PUT\",\n};\n\nexport const uploadFileEndpoints = {\n  \"PUT /:storageZoneName/:path/:fileName\":\n    \"PUT /:storageZoneName/:path/:fileName\",\n  uploadFile: \"uploadFile\",\n} as const;\n\nexport async function uploadFileClient(\n  defaultRequestInit: RequestInit,\n  {\n    file,\n    fileName,\n    path = \"\",\n    storageZoneEndpoint = \"storage.bunnycdn.com\",\n    storageZoneName = \"\",\n    storageZonePassword,\n  }: UploadFileRequest\n): Promise<UploadFileResponse> {\n  const overrideOptions: RequestInit = {\n    body: file,\n    headers: {\n      ...(storageZonePassword && { AccessKey: storageZonePassword }),\n    },\n  };\n\n  const fullPath = normalize(`${storageZoneName}/${path}/${fileName}`);\n  const overrideUrl = `https://${storageZoneEndpoint}/${fullPath}/`;\n\n  const response = await fetch(\n    overrideUrl,\n    deepmerge(defaultRequestInit, options, overrideOptions)\n  );\n\n  if (!response.ok) {\n    throw new FetchError(response.status, response.statusText, response);\n  }\n}\n"],"mappings":"q+BAAA,kcCAA,IAAAA,mBAAsC,sBCAtC,wBAA0B,wBCA1B,2BAA4B,2BAErB,IAAM,WAAN,cAAyB,kCAAY,CACnC,YACE,KACA,OACA,SACP,CACA,MAAM,GAAG,SAAS,QAAQ,EAJnB,eACA,mBACA,sBAGT,CACF,EARa,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C,EAC9D,OAAO,iBAAiB,mBAAoB,aAAa,EAC3D,QACE,MAAM,IAAI,MACR,IAAI,kBAAkB,mCAAmC,OAC3D,CACJ,CACF,CACF,EACA,OAAO,iBACT,CA7BgB","names":["import_untypeable","import_untypeable","import_deepmerge_ts","import_untypeable","u","u","url","options","countriesRouter","u","import_untypeable","import_deepmerge_ts","import_untypeable","u","u","url","options","u","import_untypeable","import_deepmerge_ts","import_untypeable","u","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","u","import_untypeable","import_deepmerge_ts","import_untypeable","u","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","import_deepmerge_ts","u","url","options","statisticsRouter","u","import_untypeable","import_deepmerge_ts","import_untypeable","u","u","options","normalize","statisticsRouter","u","import_untypeable","import_deepmerge_ts","import_normalize_path","import_untypeable","u","u","options","normalize","import_deepmerge_ts","import_normalize_path","u","options","normalize","import_deepmerge_ts","import_normalize_path","u","options","normalize","statisticsRouter","u"]}