@sapphire/plugin-api 7.0.0-next.73121df → 7.0.0-next.73cea33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/index.cjs +1 -8
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +16 -32
  4. package/dist/cjs/lib/structures/MediaParser.cjs.map +1 -1
  5. package/dist/cjs/lib/structures/Route.cjs.map +1 -1
  6. package/dist/cjs/lib/structures/api/ApiResponse.cjs +4 -5
  7. package/dist/cjs/lib/structures/api/ApiResponse.cjs.map +1 -1
  8. package/dist/cjs/lib/structures/http/Server.cjs.map +1 -1
  9. package/dist/cjs/lib/utils/MimeType.cjs +4 -0
  10. package/dist/cjs/lib/utils/MimeType.cjs.map +1 -0
  11. package/dist/cjs/mediaParsers/applicationFormUrlEncoded.cjs +1 -2
  12. package/dist/cjs/mediaParsers/applicationFormUrlEncoded.cjs.map +1 -1
  13. package/dist/cjs/mediaParsers/applicationJson.cjs +1 -2
  14. package/dist/cjs/mediaParsers/applicationJson.cjs.map +1 -1
  15. package/dist/cjs/mediaParsers/textPlain.cjs +1 -2
  16. package/dist/cjs/mediaParsers/textPlain.cjs.map +1 -1
  17. package/dist/esm/index.d.mts +16 -32
  18. package/dist/esm/index.mjs +1 -2
  19. package/dist/esm/index.mjs.map +1 -1
  20. package/dist/esm/lib/structures/MediaParser.mjs.map +1 -1
  21. package/dist/esm/lib/structures/Route.mjs.map +1 -1
  22. package/dist/esm/lib/structures/api/ApiResponse.mjs +4 -5
  23. package/dist/esm/lib/structures/api/ApiResponse.mjs.map +1 -1
  24. package/dist/esm/lib/structures/http/Server.mjs.map +1 -1
  25. package/dist/esm/lib/utils/MimeType.mjs +3 -0
  26. package/dist/esm/lib/utils/MimeType.mjs.map +1 -0
  27. package/dist/esm/mediaParsers/applicationFormUrlEncoded.mjs +1 -2
  28. package/dist/esm/mediaParsers/applicationFormUrlEncoded.mjs.map +1 -1
  29. package/dist/esm/mediaParsers/applicationJson.mjs +1 -2
  30. package/dist/esm/mediaParsers/applicationJson.mjs.map +1 -1
  31. package/dist/esm/mediaParsers/textPlain.mjs +1 -2
  32. package/dist/esm/mediaParsers/textPlain.mjs.map +1 -1
  33. package/package.json +7 -6
  34. package/dist/cjs/lib/utils/MimeTypes.cjs +0 -26
  35. package/dist/cjs/lib/utils/MimeTypes.cjs.map +0 -1
  36. package/dist/esm/lib/utils/MimeTypes.mjs +0 -26
  37. package/dist/esm/lib/utils/MimeTypes.mjs.map +0 -1
@@ -16,14 +16,13 @@ var RouterBranch_cjs = require('./lib/structures/router/RouterBranch.cjs');
16
16
  var RouterNode_cjs = require('./lib/structures/router/RouterNode.cjs');
17
17
  var RouterRoot_cjs = require('./lib/structures/router/RouterRoot.cjs');
18
18
  var RouteStore_cjs = require('./lib/structures/RouteStore.cjs');
19
- var MimeTypes_cjs = require('./lib/utils/MimeTypes.cjs');
20
19
  var _load_cjs = require('./listeners/_load.cjs');
21
20
  var _load_cjs$1 = require('./mediaParsers/_load.cjs');
22
21
  var _load_cjs$2 = require('./middlewares/_load.cjs');
23
22
  var _load_cjs$3 = require('./routes/_load.cjs');
24
23
 
25
24
  // src/index.ts
26
- var version = "7.0.0-next.73121df";
25
+ var version = "7.0.0-next.73cea33";
27
26
 
28
27
  Object.defineProperty(exports, "loadListeners", {
29
28
  enumerable: true,
@@ -138,11 +137,5 @@ Object.keys(RouteStore_cjs).forEach(function (k) {
138
137
  get: function () { return RouteStore_cjs[k]; }
139
138
  });
140
139
  });
141
- Object.keys(MimeTypes_cjs).forEach(function (k) {
142
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
143
- enumerable: true,
144
- get: function () { return MimeTypes_cjs[k]; }
145
- });
146
- });
147
140
  //# sourceMappingURL=index.cjs.map
148
141
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyDO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { Server, ServerOptions } from './lib/structures/http/Server';\nimport type { MediaParserStore } from './lib/structures/MediaParserStore';\nimport type { MiddlewareStore } from './lib/structures/MiddlewareStore';\nimport type { RouteStore } from './lib/structures/RouteStore';\n\nexport * from './lib/structures/api/ApiRequest';\nexport * from './lib/structures/api/ApiResponse';\nexport * from './lib/structures/api/CookieStore';\nexport * from './lib/structures/http/Auth';\nexport * from './lib/structures/http/HttpCodes';\nexport * from './lib/structures/http/HttpMethods';\nexport * from './lib/structures/http/Server';\nexport * from './lib/structures/MediaParser';\nexport * from './lib/structures/MediaParserStore';\nexport * from './lib/structures/Middleware';\nexport * from './lib/structures/MiddlewareStore';\nexport * from './lib/structures/Route';\nexport * from './lib/structures/router/RouterBranch';\nexport * from './lib/structures/router/RouterNode';\nexport * from './lib/structures/router/RouterRoot';\nexport * from './lib/structures/RouteStore';\nexport * from './lib/utils/MimeTypes';\n\nexport { loadListeners } from './listeners/_load';\nexport { loadMediaParsers } from './mediaParsers/_load';\nexport { loadMiddlewares } from './middlewares/_load';\nexport { loadRoutes } from './routes/_load';\n\ndeclare module 'discord.js' {\n\tinterface Client {\n\t\tserver: Server;\n\t}\n\n\tinterface ClientOptions {\n\t\tapi?: ServerOptions;\n\t}\n}\n\ndeclare module '@sapphire/pieces' {\n\tinterface StoreRegistryEntries {\n\t\troutes: RouteStore;\n\t\tmediaParsers: MediaParserStore;\n\t\tmiddlewares: MiddlewareStore;\n\t}\n\n\tinterface Container {\n\t\tserver: Server;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-api](https://github.com/sapphiredev/plugins/blob/main/packages/api) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '7.0.0-next.73121df';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyDO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { Server, ServerOptions } from './lib/structures/http/Server';\nimport type { MediaParserStore } from './lib/structures/MediaParserStore';\nimport type { MiddlewareStore } from './lib/structures/MiddlewareStore';\nimport type { RouteStore } from './lib/structures/RouteStore';\n\nexport * from './lib/structures/api/ApiRequest';\nexport * from './lib/structures/api/ApiResponse';\nexport * from './lib/structures/api/CookieStore';\nexport * from './lib/structures/http/Auth';\nexport * from './lib/structures/http/HttpCodes';\nexport * from './lib/structures/http/HttpMethods';\nexport * from './lib/structures/http/Server';\nexport * from './lib/structures/MediaParser';\nexport * from './lib/structures/MediaParserStore';\nexport * from './lib/structures/Middleware';\nexport * from './lib/structures/MiddlewareStore';\nexport * from './lib/structures/Route';\nexport * from './lib/structures/router/RouterBranch';\nexport * from './lib/structures/router/RouterNode';\nexport * from './lib/structures/router/RouterRoot';\nexport * from './lib/structures/RouteStore';\nexport type * from './lib/utils/MimeType';\n\nexport { loadListeners } from './listeners/_load';\nexport { loadMediaParsers } from './mediaParsers/_load';\nexport { loadMiddlewares } from './middlewares/_load';\nexport { loadRoutes } from './routes/_load';\n\ndeclare module 'discord.js' {\n\tinterface Client {\n\t\tserver: Server;\n\t}\n\n\tinterface ClientOptions {\n\t\tapi?: ServerOptions;\n\t}\n}\n\ndeclare module '@sapphire/pieces' {\n\tinterface StoreRegistryEntries {\n\t\troutes: RouteStore;\n\t\tmediaParsers: MediaParserStore;\n\t\tmiddlewares: MiddlewareStore;\n\t}\n\n\tinterface Container {\n\t\tserver: Server;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-api](https://github.com/sapphiredev/plugins/blob/main/packages/api) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '7.0.0-next.73cea33';\n"]}
@@ -4,30 +4,10 @@ import { ListenOptions } from 'node:net';
4
4
  import { Piece, Store } from '@sapphire/pieces';
5
5
  import { Awaitable } from '@sapphire/utilities';
6
6
  import { Gunzip } from 'zlib';
7
- import { Readable } from 'node:stream';
8
7
  import { Snowflake, OAuth2Scopes, RESTGetAPICurrentUserResult, RESTGetAPICurrentUserGuildsResult, RESTGetAPICurrentUserConnectionsResult } from 'discord.js';
8
+ import { Readable } from 'node:stream';
9
9
 
10
- declare enum MimeTypes {
11
- ApplicationFormUrlEncoded = "application/x-www-form-urlencoded",
12
- ApplicationJson = "application/json",
13
- AudioOgg = "audio/ogg",
14
- AudioOpus = "audio/opus",
15
- AudioWebm = "audio/webm",
16
- ImageGif = "image/gif",
17
- ImageJpg = "image/jpeg",
18
- ImagePng = "image/png",
19
- ImageWebp = "image/webp",
20
- ImageXIcon = "image/x-icon",
21
- TextPlain = "text/plain",
22
- TextHtml = "text/html",
23
- VideoMp4 = "video/mp4",
24
- VideoMpeg = "video/mpeg",
25
- VideoOgg = "video/ogg",
26
- VideoWebm = "video/webm"
27
- }
28
-
29
- type MethodName = (typeof MethodNames)[number];
30
- declare const MethodNames: readonly ["ACL", "BIND", "CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LINK", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCALENDAR", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "REBIND", "REPORT", "SEARCH", "SOURCE", "SUBSCRIBE", "TRACE", "UNBIND", "UNLINK", "UNLOCK", "UNSUBSCRIBE"];
10
+ type MimeType = 'application/1d-interleaved-parityfec' | 'application/3gpdash-qoe-report+xml' | 'application/3gppHal+json' | 'application/3gppHalForms+json' | 'application/3gpp-ims+xml' | 'application/A2L' | 'application/ace-groupcomm+cbor' | 'application/ace+cbor' | 'application/ace+json' | 'application/activemessage' | 'application/activity+json' | 'application/aif+cbor' | 'application/aif+json' | 'application/alto-cdni+json' | 'application/alto-cdnifilter+json' | 'application/alto-costmap+json' | 'application/alto-costmapfilter+json' | 'application/alto-directory+json' | 'application/alto-endpointprop+json' | 'application/alto-endpointpropparams+json' | 'application/alto-endpointcost+json' | 'application/alto-endpointcostparams+json' | 'application/alto-error+json' | 'application/alto-networkmapfilter+json' | 'application/alto-networkmap+json' | 'application/alto-propmap+json' | 'application/alto-propmapparams+json' | 'application/alto-tips+json' | 'application/alto-tipsparams+json' | 'application/alto-updatestreamcontrol+json' | 'application/alto-updatestreamparams+json' | 'application/AML' | 'application/andrew-inset' | 'application/applefile' | 'application/at+jwt' | 'application/ATF' | 'application/ATFX' | 'application/atom+xml' | 'application/atomcat+xml' | 'application/atomdeleted+xml' | 'application/atomicmail' | 'application/atomsvc+xml' | 'application/atsc-dwd+xml' | 'application/atsc-dynamic-event-message' | 'application/atsc-held+xml' | 'application/atsc-rdt+json' | 'application/atsc-rsat+xml' | 'application/ATXML' | 'application/auth-policy+xml' | 'application/automationml-aml+xml' | 'application/automationml-amlx+zip' | 'application/bacnet-xdd+zip' | 'application/batch-SMTP' | 'application/beep+xml' | 'application/bufr' | 'application/c2pa' | 'application/calendar+json' | 'application/calendar+xml' | 'application/call-completion' | 'application/CALS-1840' | 'application/captive+json' | 'application/cbor' | 'application/cbor-seq' | 'application/cccex' | 'application/ccmp+xml' | 'application/ccxml+xml' | 'application/cda+xml' | 'application/CDFX+XML' | 'application/cdmi-capability' | 'application/cdmi-container' | 'application/cdmi-domain' | 'application/cdmi-object' | 'application/cdmi-queue' | 'application/cdni' | 'application/CEA' | 'application/cea-2018+xml' | 'application/cellml+xml' | 'application/cfw' | 'application/cid-edhoc+cbor-seq' | 'application/city+json' | 'application/clr' | 'application/clue_info+xml' | 'application/clue+xml' | 'application/cms' | 'application/cnrp+xml' | 'application/coap-group+json' | 'application/coap-payload' | 'application/commonground' | 'application/concise-problem-details+cbor' | 'application/conference-info+xml' | 'application/cpl+xml' | 'application/cose' | 'application/cose-key' | 'application/cose-key-set' | 'application/cose-x509' | 'application/csrattrs' | 'application/csta+xml' | 'application/CSTAdata+xml' | 'application/csvm+json' | 'application/cwl' | 'application/cwl+json' | 'application/cwl+yaml' | 'application/cwt' | 'application/cybercash' | 'application/dash+xml' | 'application/dash-patch+xml' | 'application/dashdelta' | 'application/davmount+xml' | 'application/dca-rft' | 'application/DCD' | 'application/dec-dx' | 'application/dialog-info+xml' | 'application/dicom' | 'application/dicom+json' | 'application/dicom+xml' | 'application/DII' | 'application/DIT' | 'application/dns' | 'application/dns+json' | 'application/dns-message' | 'application/dots+cbor' | 'application/dpop+jwt' | 'application/dskpp+xml' | 'application/dssc+der' | 'application/dssc+xml' | 'application/dvcs' | 'application/ecmascript' | 'application/edhoc+cbor-seq' | 'application/EDI-consent' | 'application/EDIFACT' | 'application/EDI-X12' | 'application/efi' | 'application/elm+json' | 'application/elm+xml' | 'application/EmergencyCallData.cap+xml' | 'application/EmergencyCallData.Comment+xml' | 'application/EmergencyCallData.Control+xml' | 'application/EmergencyCallData.DeviceInfo+xml' | 'application/EmergencyCallData.eCall.MSD' | 'application/EmergencyCallData.LegacyESN+json' | 'application/EmergencyCallData.ProviderInfo+xml' | 'application/EmergencyCallData.ServiceInfo+xml' | 'application/EmergencyCallData.SubscriberInfo+xml' | 'application/EmergencyCallData.VEDS+xml' | 'application/emma+xml' | 'application/emotionml+xml' | 'application/encaprtp' | 'application/epp+xml' | 'application/epub+zip' | 'application/eshop' | 'application/example' | 'application/exi' | 'application/expect-ct-report+json' | 'application/express' | 'application/fastinfoset' | 'application/fastsoap' | 'application/fdf' | 'application/fdt+xml' | 'application/fhir+json' | 'application/fhir+xml' | 'application/fits' | 'application/flexfec' | 'application/font-sfnt' | 'application/font-tdpfr' | 'application/font-woff' | 'application/framework-attributes+xml' | 'application/geo+json' | 'application/geo+json-seq' | 'application/geopackage+sqlite3' | 'application/geopose+json' | 'application/geoxacml+json' | 'application/geoxacml+xml' | 'application/gltf-buffer' | 'application/gml+xml' | 'application/gnap-binding-jws' | 'application/gnap-binding-jwsd' | 'application/gnap-binding-rotation-jws' | 'application/gnap-binding-rotation-jwsd' | 'application/grib' | 'application/gzip' | 'application/H224' | 'application/held+xml' | 'application/hl7v2+xml' | 'application/http' | 'application/hyperstudio' | 'application/ibe-key-request+xml' | 'application/ibe-pkg-reply+xml' | 'application/ibe-pp-data' | 'application/iges' | 'application/im-iscomposing+xml' | 'application/index' | 'application/index.cmd' | 'application/index.obj' | 'application/index.response' | 'application/index.vnd' | 'application/inkml+xml' | 'application/IOTP' | 'application/ipfix' | 'application/ipp' | 'application/ISUP' | 'application/its+xml' | 'application/java-archive' | 'application/javascript' | 'application/jf2feed+json' | 'application/jose' | 'application/jose+json' | 'application/jrd+json' | 'application/jscalendar+json' | 'application/jscontact+json' | 'application/json' | 'application/json-patch+json' | 'application/json-seq' | 'application/jsonpath' | 'application/jwk+json' | 'application/jwk-set+json' | 'application/jwt' | 'application/kpml-request+xml' | 'application/kpml-response+xml' | 'application/ld+json' | 'application/lgr+xml' | 'application/link-format' | 'application/linkset' | 'application/linkset+json' | 'application/load-control+xml' | 'application/logout+jwt' | 'application/lost+xml' | 'application/lostsync+xml' | 'application/lpf+zip' | 'application/LXF' | 'application/mac-binhex40' | 'application/macwriteii' | 'application/mads+xml' | 'application/manifest+json' | 'application/marc' | 'application/marcxml+xml' | 'application/mathematica' | 'application/mathml+xml' | 'application/mathml-content+xml' | 'application/mathml-presentation+xml' | 'application/mbms-associated-procedure-description+xml' | 'application/mbms-deregister+xml' | 'application/mbms-envelope+xml' | 'application/mbms-msk-response+xml' | 'application/mbms-msk+xml' | 'application/mbms-protection-description+xml' | 'application/mbms-reception-report+xml' | 'application/mbms-register-response+xml' | 'application/mbms-register+xml' | 'application/mbms-schedule+xml' | 'application/mbms-user-service-description+xml' | 'application/mbox' | 'application/media_control+xml' | 'application/media-policy-dataset+xml' | 'application/mediaservercontrol+xml' | 'application/merge-patch+json' | 'application/metalink4+xml' | 'application/mets+xml' | 'application/MF4' | 'application/mikey' | 'application/mipc' | 'application/missing-blocks+cbor-seq' | 'application/mmt-aei+xml' | 'application/mmt-usd+xml' | 'application/mods+xml' | 'application/moss-keys' | 'application/moss-signature' | 'application/mosskey-data' | 'application/mosskey-request' | 'application/mp21' | 'application/mp4' | 'application/mpeg4-generic' | 'application/mpeg4-iod' | 'application/mpeg4-iod-xmt' | 'application/mrb-consumer+xml' | 'application/mrb-publish+xml' | 'application/msc-ivr+xml' | 'application/msc-mixer+xml' | 'application/msword' | 'application/mud+json' | 'application/multipart-core' | 'application/mxf' | 'application/n-quads' | 'application/n-triples' | 'application/nasdata' | 'application/news-checkgroups' | 'application/news-groupinfo' | 'application/news-transmission' | 'application/nlsml+xml' | 'application/node' | 'application/nss' | 'application/oauth-authz-req+jwt' | 'application/oblivious-dns-message' | 'application/ocsp-request' | 'application/ocsp-response' | 'application/octet-stream' | 'application/ODA' | 'application/odm+xml' | 'application/ODX' | 'application/oebps-package+xml' | 'application/ogg' | 'application/ohttp-keys' | 'application/opc-nodeset+xml' | 'application/oscore' | 'application/oxps' | 'application/p21' | 'application/p21+zip' | 'application/p2p-overlay+xml' | 'application/parityfec' | 'application/passport' | 'application/patch-ops-error+xml' | 'application/pdf' | 'application/PDX' | 'application/pem-certificate-chain' | 'application/pgp-encrypted' | 'application/pgp-keys' | 'application/pgp-signature' | 'application/pidf-diff+xml' | 'application/pidf+xml' | 'application/pkcs10' | 'application/pkcs7-mime' | 'application/pkcs7-signature' | 'application/pkcs8' | 'application/pkcs8-encrypted' | 'application/pkcs12' | 'application/pkix-attr-cert' | 'application/pkix-cert' | 'application/pkix-crl' | 'application/pkix-pkipath' | 'application/pkixcmp' | 'application/pls+xml' | 'application/poc-settings+xml' | 'application/postscript' | 'application/ppsp-tracker+json' | 'application/private-token-issuer-directory' | 'application/private-token-request' | 'application/private-token-response' | 'application/problem+json' | 'application/problem+xml' | 'application/provenance+xml' | 'application/prs.alvestrand.titrax-sheet' | 'application/prs.cww' | 'application/prs.cyn' | 'application/prs.hpub+zip' | 'application/prs.implied-document+xml' | 'application/prs.implied-executable' | 'application/prs.implied-object+json' | 'application/prs.implied-object+json-seq' | 'application/prs.implied-object+yaml' | 'application/prs.implied-structure' | 'application/prs.mayfile' | 'application/prs.nprend' | 'application/prs.plucker' | 'application/prs.rdf-xml-crypt' | 'application/prs.vcfbzip2' | 'application/prs.xsf+xml' | 'application/pskc+xml' | 'application/pvd+json' | 'application/rdf+xml' | 'application/route-apd+xml' | 'application/route-s-tsid+xml' | 'application/route-usd+xml' | 'application/QSIG' | 'application/raptorfec' | 'application/rdap+json' | 'application/reginfo+xml' | 'application/relax-ng-compact-syntax' | 'application/remote-printing' | 'application/reputon+json' | 'application/resource-lists-diff+xml' | 'application/resource-lists+xml' | 'application/rfc+xml' | 'application/riscos' | 'application/rlmi+xml' | 'application/rls-services+xml' | 'application/rpki-checklist' | 'application/rpki-ghostbusters' | 'application/rpki-manifest' | 'application/rpki-publication' | 'application/rpki-roa' | 'application/rpki-signed-tal' | 'application/rpki-updown' | 'application/rtf' | 'application/rtploopback' | 'application/rtx' | 'application/samlassertion+xml' | 'application/samlmetadata+xml' | 'application/sarif-external-properties+json' | 'application/sarif+json' | 'application/sbe' | 'application/sbml+xml' | 'application/scaip+xml' | 'application/scim+json' | 'application/scvp-cv-request' | 'application/scvp-cv-response' | 'application/scvp-vp-request' | 'application/scvp-vp-response' | 'application/sdp' | 'application/secevent+jwt' | 'application/senml-etch+cbor' | 'application/senml-etch+json' | 'application/senml-exi' | 'application/senml+cbor' | 'application/senml+json' | 'application/senml+xml' | 'application/sensml-exi' | 'application/sensml+cbor' | 'application/sensml+json' | 'application/sensml+xml' | 'application/sep-exi' | 'application/sep+xml' | 'application/session-info' | 'application/set-payment' | 'application/set-payment-initiation' | 'application/set-registration' | 'application/set-registration-initiation' | 'application/SGML' | 'application/sgml-open-catalog' | 'application/shf+xml' | 'application/sieve' | 'application/simple-filter+xml' | 'application/simple-message-summary' | 'application/simpleSymbolContainer' | 'application/sipc' | 'application/slate' | 'application/smil' | 'application/smil+xml' | 'application/smpte336m' | 'application/soap+fastinfoset' | 'application/soap+xml' | 'application/sparql-query' | 'application/spdx+json' | 'application/sparql-results+xml' | 'application/spirits-event+xml' | 'application/sql' | 'application/srgs' | 'application/srgs+xml' | 'application/sru+xml' | 'application/sslkeylogfile' | 'application/ssml+xml' | 'application/ST2110-41' | 'application/stix+json' | 'application/stratum' | 'application/swid+cbor' | 'application/swid+xml' | 'application/tamp-apex-update' | 'application/tamp-apex-update-confirm' | 'application/tamp-community-update' | 'application/tamp-community-update-confirm' | 'application/tamp-error' | 'application/tamp-sequence-adjust' | 'application/tamp-sequence-adjust-confirm' | 'application/tamp-status-query' | 'application/tamp-status-response' | 'application/tamp-update' | 'application/tamp-update-confirm' | 'application/taxii+json' | 'application/td+json' | 'application/tei+xml' | 'application/TETRA_ISI' | 'application/thraud+xml' | 'application/timestamp-query' | 'application/timestamp-reply' | 'application/timestamped-data' | 'application/tlsrpt+gzip' | 'application/tlsrpt+json' | 'application/tm+json' | 'application/tnauthlist' | 'application/token-introspection+jwt' | 'application/trickle-ice-sdpfrag' | 'application/trig' | 'application/ttml+xml' | 'application/tve-trigger' | 'application/tzif' | 'application/tzif-leap' | 'application/ulpfec' | 'application/urc-grpsheet+xml' | 'application/urc-ressheet+xml' | 'application/urc-targetdesc+xml' | 'application/urc-uisocketdesc+xml' | 'application/vc' | 'application/vcard+json' | 'application/vcard+xml' | 'application/vemmi' | 'application/vnd.1000minds.decision-model+xml' | 'application/vnd.1ob' | 'application/vnd.3gpp.5gnas' | 'application/vnd.3gpp.5gsa2x' | 'application/vnd.3gpp.5gsa2x-local-service-information' | 'application/vnd.3gpp.access-transfer-events+xml' | 'application/vnd.3gpp.bsf+xml' | 'application/vnd.3gpp.crs+xml' | 'application/vnd.3gpp.current-location-discovery+xml' | 'application/vnd.3gpp.GMOP+xml' | 'application/vnd.3gpp.gtpc' | 'application/vnd.3gpp.interworking-data' | 'application/vnd.3gpp.lpp' | 'application/vnd.3gpp.mc-signalling-ear' | 'application/vnd.3gpp.mcdata-affiliation-command+xml' | 'application/vnd.3gpp.mcdata-info+xml' | 'application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml' | 'application/vnd.3gpp.mcdata-payload' | 'application/vnd.3gpp.mcdata-regroup+xml' | 'application/vnd.3gpp.mcdata-service-config+xml' | 'application/vnd.3gpp.mcdata-signalling' | 'application/vnd.3gpp.mcdata-ue-config+xml' | 'application/vnd.3gpp.mcdata-user-profile+xml' | 'application/vnd.3gpp.mcptt-affiliation-command+xml' | 'application/vnd.3gpp.mcptt-floor-request+xml' | 'application/vnd.3gpp.mcptt-info+xml' | 'application/vnd.3gpp.mcptt-location-info+xml' | 'application/vnd.3gpp.mcptt-mbms-usage-info+xml' | 'application/vnd.3gpp.mcptt-regroup+xml' | 'application/vnd.3gpp.mcptt-service-config+xml' | 'application/vnd.3gpp.mcptt-signed+xml' | 'application/vnd.3gpp.mcptt-ue-config+xml' | 'application/vnd.3gpp.mcptt-ue-init-config+xml' | 'application/vnd.3gpp.mcptt-user-profile+xml' | 'application/vnd.3gpp.mcvideo-affiliation-command+xml' | 'application/vnd.3gpp.mcvideo-affiliation-info+xml' | 'application/vnd.3gpp.mcvideo-info+xml' | 'application/vnd.3gpp.mcvideo-location-info+xml' | 'application/vnd.3gpp.mcvideo-mbms-usage-info+xml' | 'application/vnd.3gpp.mcvideo-regroup+xml' | 'application/vnd.3gpp.mcvideo-service-config+xml' | 'application/vnd.3gpp.mcvideo-transmission-request+xml' | 'application/vnd.3gpp.mcvideo-ue-config+xml' | 'application/vnd.3gpp.mcvideo-user-profile+xml' | 'application/vnd.3gpp.mid-call+xml' | 'application/vnd.3gpp.ngap' | 'application/vnd.3gpp.pfcp' | 'application/vnd.3gpp.pic-bw-large' | 'application/vnd.3gpp.pic-bw-small' | 'application/vnd.3gpp.pic-bw-var' | 'application/vnd.3gpp.pinapp-info+xml' | 'application/vnd.3gpp-prose-pc3a+xml' | 'application/vnd.3gpp-prose-pc3ach+xml' | 'application/vnd.3gpp-prose-pc3ch+xml' | 'application/vnd.3gpp-prose-pc8+xml' | 'application/vnd.3gpp-prose+xml' | 'application/vnd.3gpp.s1ap' | 'application/vnd.3gpp.seal-group-doc+xml' | 'application/vnd.3gpp.seal-info+xml' | 'application/vnd.3gpp.seal-location-info+xml' | 'application/vnd.3gpp.seal-mbms-usage-info+xml' | 'application/vnd.3gpp.seal-network-QoS-management-info+xml' | 'application/vnd.3gpp.seal-ue-config-info+xml' | 'application/vnd.3gpp.seal-unicast-info+xml' | 'application/vnd.3gpp.seal-user-profile-info+xml' | 'application/vnd.3gpp.sms' | 'application/vnd.3gpp.sms+xml' | 'application/vnd.3gpp.srvcc-ext+xml' | 'application/vnd.3gpp.SRVCC-info+xml' | 'application/vnd.3gpp.state-and-event-info+xml' | 'application/vnd.3gpp.ussd+xml' | 'application/vnd.3gpp.vae-info+xml' | 'application/vnd.3gpp-v2x-local-service-information' | 'application/vnd.3gpp2.bcmcsinfo+xml' | 'application/vnd.3gpp2.sms' | 'application/vnd.3gpp2.tcap' | 'application/vnd.3gpp.v2x' | 'application/vnd.3lightssoftware.imagescal' | 'application/vnd.3M.Post-it-Notes' | 'application/vnd.accpac.simply.aso' | 'application/vnd.accpac.simply.imp' | 'application/vnd.acm.addressxfer+json' | 'application/vnd.acm.chatbot+json' | 'application/vnd.acucobol' | 'application/vnd.acucorp' | 'application/vnd.adobe.flash.movie' | 'application/vnd.adobe.formscentral.fcdt' | 'application/vnd.adobe.fxp' | 'application/vnd.adobe.partial-upload' | 'application/vnd.adobe.xdp+xml' | 'application/vnd.aether.imp' | 'application/vnd.afpc.afplinedata' | 'application/vnd.afpc.afplinedata-pagedef' | 'application/vnd.afpc.cmoca-cmresource' | 'application/vnd.afpc.foca-charset' | 'application/vnd.afpc.foca-codedfont' | 'application/vnd.afpc.foca-codepage' | 'application/vnd.afpc.modca' | 'application/vnd.afpc.modca-cmtable' | 'application/vnd.afpc.modca-formdef' | 'application/vnd.afpc.modca-mediummap' | 'application/vnd.afpc.modca-objectcontainer' | 'application/vnd.afpc.modca-overlay' | 'application/vnd.afpc.modca-pagesegment' | 'application/vnd.age' | 'application/vnd.ah-barcode' | 'application/vnd.ahead.space' | 'application/vnd.airzip.filesecure.azf' | 'application/vnd.airzip.filesecure.azs' | 'application/vnd.amadeus+json' | 'application/vnd.amazon.mobi8-ebook' | 'application/vnd.americandynamics.acc' | 'application/vnd.amiga.ami' | 'application/vnd.amundsen.maze+xml' | 'application/vnd.android.ota' | 'application/vnd.anki' | 'application/vnd.anser-web-certificate-issue-initiation' | 'application/vnd.antix.game-component' | 'application/vnd.apache.arrow.file' | 'application/vnd.apache.arrow.stream' | 'application/vnd.apache.parquet' | 'application/vnd.apache.thrift.binary' | 'application/vnd.apache.thrift.compact' | 'application/vnd.apache.thrift.json' | 'application/vnd.apexlang' | 'application/vnd.api+json' | 'application/vnd.aplextor.warrp+json' | 'application/vnd.apothekende.reservation+json' | 'application/vnd.apple.installer+xml' | 'application/vnd.apple.keynote' | 'application/vnd.apple.mpegurl' | 'application/vnd.apple.numbers' | 'application/vnd.apple.pages' | 'application/vnd.arastra.swi' | 'application/vnd.aristanetworks.swi' | 'application/vnd.artisan+json' | 'application/vnd.artsquare' | 'application/vnd.astraea-software.iota' | 'application/vnd.audiograph' | 'application/vnd.autopackage' | 'application/vnd.avalon+json' | 'application/vnd.avistar+xml' | 'application/vnd.balsamiq.bmml+xml' | 'application/vnd.banana-accounting' | 'application/vnd.bbf.usp.error' | 'application/vnd.bbf.usp.msg' | 'application/vnd.bbf.usp.msg+json' | 'application/vnd.balsamiq.bmpr' | 'application/vnd.bekitzur-stech+json' | 'application/vnd.belightsoft.lhzd+zip' | 'application/vnd.belightsoft.lhzl+zip' | 'application/vnd.bint.med-content' | 'application/vnd.biopax.rdf+xml' | 'application/vnd.blink-idb-value-wrapper' | 'application/vnd.blueice.multipass' | 'application/vnd.bluetooth.ep.oob' | 'application/vnd.bluetooth.le.oob' | 'application/vnd.bmi' | 'application/vnd.bpf' | 'application/vnd.bpf3' | 'application/vnd.businessobjects' | 'application/vnd.byu.uapi+json' | 'application/vnd.bzip3' | 'application/vnd.c3voc.schedule+xml' | 'application/vnd.cab-jscript' | 'application/vnd.canon-cpdl' | 'application/vnd.canon-lips' | 'application/vnd.capasystems-pg+json' | 'application/vnd.cendio.thinlinc.clientconf' | 'application/vnd.century-systems.tcp_stream' | 'application/vnd.chemdraw+xml' | 'application/vnd.chess-pgn' | 'application/vnd.chipnuts.karaoke-mmd' | 'application/vnd.ciedi' | 'application/vnd.cinderella' | 'application/vnd.cirpack.isdn-ext' | 'application/vnd.citationstyles.style+xml' | 'application/vnd.claymore' | 'application/vnd.cloanto.rp9' | 'application/vnd.clonk.c4group' | 'application/vnd.cluetrust.cartomobile-config' | 'application/vnd.cluetrust.cartomobile-config-pkg' | 'application/vnd.cncf.helm.chart.content.v1.tar+gzip' | 'application/vnd.cncf.helm.chart.provenance.v1.prov' | 'application/vnd.cncf.helm.config.v1+json' | 'application/vnd.coffeescript' | 'application/vnd.collabio.xodocuments.document' | 'application/vnd.collabio.xodocuments.document-template' | 'application/vnd.collabio.xodocuments.presentation' | 'application/vnd.collabio.xodocuments.presentation-template' | 'application/vnd.collabio.xodocuments.spreadsheet' | 'application/vnd.collabio.xodocuments.spreadsheet-template' | 'application/vnd.collection.doc+json' | 'application/vnd.collection+json' | 'application/vnd.collection.next+json' | 'application/vnd.comicbook-rar' | 'application/vnd.comicbook+zip' | 'application/vnd.commerce-battelle' | 'application/vnd.commonspace' | 'application/vnd.coreos.ignition+json' | 'application/vnd.cosmocaller' | 'application/vnd.contact.cmsg' | 'application/vnd.crick.clicker' | 'application/vnd.crick.clicker.keyboard' | 'application/vnd.crick.clicker.palette' | 'application/vnd.crick.clicker.template' | 'application/vnd.crick.clicker.wordbank' | 'application/vnd.criticaltools.wbs+xml' | 'application/vnd.cryptii.pipe+json' | 'application/vnd.crypto-shade-file' | 'application/vnd.cryptomator.encrypted' | 'application/vnd.cryptomator.vault' | 'application/vnd.ctc-posml' | 'application/vnd.ctct.ws+xml' | 'application/vnd.cups-pdf' | 'application/vnd.cups-postscript' | 'application/vnd.cups-ppd' | 'application/vnd.cups-raster' | 'application/vnd.cups-raw' | 'application/vnd.curl' | 'application/vnd.cyan.dean.root+xml' | 'application/vnd.cybank' | 'application/vnd.cyclonedx+json' | 'application/vnd.cyclonedx+xml' | 'application/vnd.d2l.coursepackage1p0+zip' | 'application/vnd.d3m-dataset' | 'application/vnd.d3m-problem' | 'application/vnd.dart' | 'application/vnd.data-vision.rdz' | 'application/vnd.datalog' | 'application/vnd.datapackage+json' | 'application/vnd.dataresource+json' | 'application/vnd.dbf' | 'application/vnd.debian.binary-package' | 'application/vnd.dece.data' | 'application/vnd.dece.ttml+xml' | 'application/vnd.dece.unspecified' | 'application/vnd.dece.zip' | 'application/vnd.denovo.fcselayout-link' | 'application/vnd.desmume.movie' | 'application/vnd.dir-bi.plate-dl-nosuffix' | 'application/vnd.dm.delegation+xml' | 'application/vnd.dna' | 'application/vnd.document+json' | 'application/vnd.dolby.mobile.1' | 'application/vnd.dolby.mobile.2' | 'application/vnd.doremir.scorecloud-binary-document' | 'application/vnd.dpgraph' | 'application/vnd.dreamfactory' | 'application/vnd.drive+json' | 'application/vnd.dtg.local' | 'application/vnd.dtg.local.flash' | 'application/vnd.dtg.local.html' | 'application/vnd.dvb.ait' | 'application/vnd.dvb.dvbisl+xml' | 'application/vnd.dvb.dvbj' | 'application/vnd.dvb.esgcontainer' | 'application/vnd.dvb.ipdcdftnotifaccess' | 'application/vnd.dvb.ipdcesgaccess' | 'application/vnd.dvb.ipdcesgaccess2' | 'application/vnd.dvb.ipdcesgpdd' | 'application/vnd.dvb.ipdcroaming' | 'application/vnd.dvb.iptv.alfec-base' | 'application/vnd.dvb.iptv.alfec-enhancement' | 'application/vnd.dvb.notif-aggregate-root+xml' | 'application/vnd.dvb.notif-container+xml' | 'application/vnd.dvb.notif-generic+xml' | 'application/vnd.dvb.notif-ia-msglist+xml' | 'application/vnd.dvb.notif-ia-registration-request+xml' | 'application/vnd.dvb.notif-ia-registration-response+xml' | 'application/vnd.dvb.notif-init+xml' | 'application/vnd.dvb.pfr' | 'application/vnd.dvb.service' | 'application/vnd.dxr' | 'application/vnd.dynageo' | 'application/vnd.dzr' | 'application/vnd.easykaraoke.cdgdownload' | 'application/vnd.ecip.rlp' | 'application/vnd.ecdis-update' | 'application/vnd.eclipse.ditto+json' | 'application/vnd.ecowin.chart' | 'application/vnd.ecowin.filerequest' | 'application/vnd.ecowin.fileupdate' | 'application/vnd.ecowin.series' | 'application/vnd.ecowin.seriesrequest' | 'application/vnd.ecowin.seriesupdate' | 'application/vnd.efi.img' | 'application/vnd.efi.iso' | 'application/vnd.eln+zip' | 'application/vnd.emclient.accessrequest+xml' | 'application/vnd.enliven' | 'application/vnd.enphase.envoy' | 'application/vnd.eprints.data+xml' | 'application/vnd.epson.esf' | 'application/vnd.epson.msf' | 'application/vnd.epson.quickanime' | 'application/vnd.epson.salt' | 'application/vnd.epson.ssf' | 'application/vnd.ericsson.quickcall' | 'application/vnd.erofs' | 'application/vnd.espass-espass+zip' | 'application/vnd.eszigno3+xml' | 'application/vnd.etsi.aoc+xml' | 'application/vnd.etsi.asic-s+zip' | 'application/vnd.etsi.asic-e+zip' | 'application/vnd.etsi.cug+xml' | 'application/vnd.etsi.iptvcommand+xml' | 'application/vnd.etsi.iptvdiscovery+xml' | 'application/vnd.etsi.iptvprofile+xml' | 'application/vnd.etsi.iptvsad-bc+xml' | 'application/vnd.etsi.iptvsad-cod+xml' | 'application/vnd.etsi.iptvsad-npvr+xml' | 'application/vnd.etsi.iptvservice+xml' | 'application/vnd.etsi.iptvsync+xml' | 'application/vnd.etsi.iptvueprofile+xml' | 'application/vnd.etsi.mcid+xml' | 'application/vnd.etsi.mheg5' | 'application/vnd.etsi.overload-control-policy-dataset+xml' | 'application/vnd.etsi.pstn+xml' | 'application/vnd.etsi.sci+xml' | 'application/vnd.etsi.simservs+xml' | 'application/vnd.etsi.timestamp-token' | 'application/vnd.etsi.tsl+xml' | 'application/vnd.etsi.tsl.der' | 'application/vnd.eu.kasparian.car+json' | 'application/vnd.eudora.data' | 'application/vnd.evolv.ecig.profile' | 'application/vnd.evolv.ecig.settings' | 'application/vnd.evolv.ecig.theme' | 'application/vnd.exstream-empower+zip' | 'application/vnd.exstream-package' | 'application/vnd.ezpix-album' | 'application/vnd.ezpix-package' | 'application/vnd.f-secure.mobile' | 'application/vnd.fastcopy-disk-image' | 'application/vnd.familysearch.gedcom+zip' | 'application/vnd.fdsn.mseed' | 'application/vnd.fdsn.seed' | 'application/vnd.ffsns' | 'application/vnd.ficlab.flb+zip' | 'application/vnd.filmit.zfc' | 'application/vnd.fints' | 'application/vnd.firemonkeys.cloudcell' | 'application/vnd.FloGraphIt' | 'application/vnd.fluxtime.clip' | 'application/vnd.font-fontforge-sfd' | 'application/vnd.framemaker' | 'application/vnd.freelog.comic' | 'application/vnd.frogans.fnc' | 'application/vnd.frogans.ltf' | 'application/vnd.fsc.weblaunch' | 'application/vnd.fujifilm.fb.docuworks' | 'application/vnd.fujifilm.fb.docuworks.binder' | 'application/vnd.fujifilm.fb.docuworks.container' | 'application/vnd.fujifilm.fb.jfi+xml' | 'application/vnd.fujitsu.oasys' | 'application/vnd.fujitsu.oasys2' | 'application/vnd.fujitsu.oasys3' | 'application/vnd.fujitsu.oasysgp' | 'application/vnd.fujitsu.oasysprs' | 'application/vnd.fujixerox.ART4' | 'application/vnd.fujixerox.ART-EX' | 'application/vnd.fujixerox.ddd' | 'application/vnd.fujixerox.docuworks' | 'application/vnd.fujixerox.docuworks.binder' | 'application/vnd.fujixerox.docuworks.container' | 'application/vnd.fujixerox.HBPL' | 'application/vnd.fut-misnet' | 'application/vnd.futoin+cbor' | 'application/vnd.futoin+json' | 'application/vnd.fuzzysheet' | 'application/vnd.ga4gh.passport+jwt' | 'application/vnd.genomatix.tuxedo' | 'application/vnd.genozip' | 'application/vnd.gentics.grd+json' | 'application/vnd.gentoo.catmetadata+xml' | 'application/vnd.gentoo.ebuild' | 'application/vnd.gentoo.eclass' | 'application/vnd.gentoo.gpkg' | 'application/vnd.gentoo.manifest' | 'application/vnd.gentoo.xpak' | 'application/vnd.gentoo.pkgmetadata+xml' | 'application/vnd.geo+json' | 'application/vnd.geocube+xml' | 'application/vnd.geogebra.file' | 'application/vnd.geogebra.slides' | 'application/vnd.geogebra.tool' | 'application/vnd.geometry-explorer' | 'application/vnd.geonext' | 'application/vnd.geoplan' | 'application/vnd.geospace' | 'application/vnd.gerber' | 'application/vnd.globalplatform.card-content-mgt' | 'application/vnd.globalplatform.card-content-mgt-response' | 'application/vnd.gmx' | 'application/vnd.gnu.taler.exchange+json' | 'application/vnd.gnu.taler.merchant+json' | 'application/vnd.google-earth.kml+xml' | 'application/vnd.google-earth.kmz' | 'application/vnd.gov.sk.e-form+xml' | 'application/vnd.gov.sk.e-form+zip' | 'application/vnd.gov.sk.xmldatacontainer+xml' | 'application/vnd.gpxsee.map+xml' | 'application/vnd.grafeq' | 'application/vnd.gridmp' | 'application/vnd.groove-account' | 'application/vnd.groove-help' | 'application/vnd.groove-identity-message' | 'application/vnd.groove-injector' | 'application/vnd.groove-tool-message' | 'application/vnd.groove-tool-template' | 'application/vnd.groove-vcard' | 'application/vnd.hal+json' | 'application/vnd.hal+xml' | 'application/vnd.HandHeld-Entertainment+xml' | 'application/vnd.hbci' | 'application/vnd.hc+json' | 'application/vnd.hcl-bireports' | 'application/vnd.hdt' | 'application/vnd.heroku+json' | 'application/vnd.hhe.lesson-player' | 'application/vnd.hp-HPGL' | 'application/vnd.hp-hpid' | 'application/vnd.hp-hps' | 'application/vnd.hp-jlyt' | 'application/vnd.hp-PCL' | 'application/vnd.hp-PCLXL' | 'application/vnd.hsl' | 'application/vnd.httphone' | 'application/vnd.hydrostatix.sof-data' | 'application/vnd.hyper-item+json' | 'application/vnd.hyper+json' | 'application/vnd.hyperdrive+json' | 'application/vnd.hzn-3d-crossword' | 'application/vnd.ibm.afplinedata' | 'application/vnd.ibm.electronic-media' | 'application/vnd.ibm.MiniPay' | 'application/vnd.ibm.modcap' | 'application/vnd.ibm.rights-management' | 'application/vnd.ibm.secure-container' | 'application/vnd.iccprofile' | 'application/vnd.ieee.1905' | 'application/vnd.igloader' | 'application/vnd.imagemeter.folder+zip' | 'application/vnd.imagemeter.image+zip' | 'application/vnd.immervision-ivp' | 'application/vnd.immervision-ivu' | 'application/vnd.ims.imsccv1p1' | 'application/vnd.ims.imsccv1p2' | 'application/vnd.ims.imsccv1p3' | 'application/vnd.ims.lis.v2.result+json' | 'application/vnd.ims.lti.v2.toolconsumerprofile+json' | 'application/vnd.ims.lti.v2.toolproxy.id+json' | 'application/vnd.ims.lti.v2.toolproxy+json' | 'application/vnd.ims.lti.v2.toolsettings+json' | 'application/vnd.ims.lti.v2.toolsettings.simple+json' | 'application/vnd.informedcontrol.rms+xml' | 'application/vnd.infotech.project' | 'application/vnd.infotech.project+xml' | 'application/vnd.informix-visionary' | 'application/vnd.innopath.wamp.notification' | 'application/vnd.insors.igm' | 'application/vnd.intercon.formnet' | 'application/vnd.intergeo' | 'application/vnd.intertrust.digibox' | 'application/vnd.intertrust.nncp' | 'application/vnd.intu.qbo' | 'application/vnd.intu.qfx' | 'application/vnd.ipfs.ipns-record' | 'application/vnd.ipld.car' | 'application/vnd.ipld.dag-cbor' | 'application/vnd.ipld.dag-json' | 'application/vnd.ipld.raw' | 'application/vnd.iptc.g2.catalogitem+xml' | 'application/vnd.iptc.g2.conceptitem+xml' | 'application/vnd.iptc.g2.knowledgeitem+xml' | 'application/vnd.iptc.g2.newsitem+xml' | 'application/vnd.iptc.g2.newsmessage+xml' | 'application/vnd.iptc.g2.packageitem+xml' | 'application/vnd.iptc.g2.planningitem+xml' | 'application/vnd.ipunplugged.rcprofile' | 'application/vnd.irepository.package+xml' | 'application/vnd.is-xpr' | 'application/vnd.isac.fcs' | 'application/vnd.jam' | 'application/vnd.iso11783-10+zip' | 'application/vnd.japannet-directory-service' | 'application/vnd.japannet-jpnstore-wakeup' | 'application/vnd.japannet-payment-wakeup' | 'application/vnd.japannet-registration' | 'application/vnd.japannet-registration-wakeup' | 'application/vnd.japannet-setstore-wakeup' | 'application/vnd.japannet-verification' | 'application/vnd.japannet-verification-wakeup' | 'application/vnd.jcp.javame.midlet-rms' | 'application/vnd.jisp' | 'application/vnd.joost.joda-archive' | 'application/vnd.jsk.isdn-ngn' | 'application/vnd.kahootz' | 'application/vnd.kde.karbon' | 'application/vnd.kde.kchart' | 'application/vnd.kde.kformula' | 'application/vnd.kde.kivio' | 'application/vnd.kde.kontour' | 'application/vnd.kde.kpresenter' | 'application/vnd.kde.kspread' | 'application/vnd.kde.kword' | 'application/vnd.kenameaapp' | 'application/vnd.kidspiration' | 'application/vnd.Kinar' | 'application/vnd.koan' | 'application/vnd.kodak-descriptor' | 'application/vnd.las' | 'application/vnd.las.las+json' | 'application/vnd.las.las+xml' | 'application/vnd.laszip' | 'application/vnd.ldev.productlicensing' | 'application/vnd.leap+json' | 'application/vnd.liberty-request+xml' | 'application/vnd.llamagraphics.life-balance.desktop' | 'application/vnd.llamagraphics.life-balance.exchange+xml' | 'application/vnd.logipipe.circuit+zip' | 'application/vnd.loom' | 'application/vnd.lotus-1-2-3' | 'application/vnd.lotus-approach' | 'application/vnd.lotus-freelance' | 'application/vnd.lotus-notes' | 'application/vnd.lotus-organizer' | 'application/vnd.lotus-screencam' | 'application/vnd.lotus-wordpro' | 'application/vnd.macports.portpkg' | 'application/vnd.mapbox-vector-tile' | 'application/vnd.marlin.drm.actiontoken+xml' | 'application/vnd.marlin.drm.conftoken+xml' | 'application/vnd.marlin.drm.license+xml' | 'application/vnd.marlin.drm.mdcf' | 'application/vnd.mason+json' | 'application/vnd.maxar.archive.3tz+zip' | 'application/vnd.maxmind.maxmind-db' | 'application/vnd.mcd' | 'application/vnd.mdl' | 'application/vnd.mdl-mbsdf' | 'application/vnd.medcalcdata' | 'application/vnd.mediastation.cdkey' | 'application/vnd.medicalholodeck.recordxr' | 'application/vnd.meridian-slingshot' | 'application/vnd.mermaid' | 'application/vnd.MFER' | 'application/vnd.mfmp' | 'application/vnd.micro+json' | 'application/vnd.micrografx.flo' | 'application/vnd.micrografx.igx' | 'application/vnd.microsoft.portable-executable' | 'application/vnd.microsoft.windows.thumbnail-cache' | 'application/vnd.miele+json' | 'application/vnd.mif' | 'application/vnd.minisoft-hp3000-save' | 'application/vnd.mitsubishi.misty-guard.trustweb' | 'application/vnd.Mobius.DAF' | 'application/vnd.Mobius.DIS' | 'application/vnd.Mobius.MBK' | 'application/vnd.Mobius.MQY' | 'application/vnd.Mobius.MSL' | 'application/vnd.Mobius.PLC' | 'application/vnd.Mobius.TXF' | 'application/vnd.modl' | 'application/vnd.mophun.application' | 'application/vnd.mophun.certificate' | 'application/vnd.motorola.flexsuite' | 'application/vnd.motorola.flexsuite.adsi' | 'application/vnd.motorola.flexsuite.fis' | 'application/vnd.motorola.flexsuite.gotap' | 'application/vnd.motorola.flexsuite.kmr' | 'application/vnd.motorola.flexsuite.ttc' | 'application/vnd.motorola.flexsuite.wem' | 'application/vnd.motorola.iprm' | 'application/vnd.mozilla.xul+xml' | 'application/vnd.ms-artgalry' | 'application/vnd.ms-asf' | 'application/vnd.ms-cab-compressed' | 'application/vnd.ms-3mfdocument' | 'application/vnd.ms-excel' | 'application/vnd.ms-excel.addin.macroEnabled.12' | 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel.template.macroEnabled.12' | 'application/vnd.ms-fontobject' | 'application/vnd.ms-htmlhelp' | 'application/vnd.ms-ims' | 'application/vnd.ms-lrm' | 'application/vnd.ms-office.activeX+xml' | 'application/vnd.ms-officetheme' | 'application/vnd.ms-playready.initiator+xml' | 'application/vnd.ms-powerpoint' | 'application/vnd.ms-powerpoint.addin.macroEnabled.12' | 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' | 'application/vnd.ms-powerpoint.slide.macroEnabled.12' | 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' | 'application/vnd.ms-powerpoint.template.macroEnabled.12' | 'application/vnd.ms-PrintDeviceCapabilities+xml' | 'application/vnd.ms-PrintSchemaTicket+xml' | 'application/vnd.ms-project' | 'application/vnd.ms-tnef' | 'application/vnd.ms-windows.devicepairing' | 'application/vnd.ms-windows.nwprinting.oob' | 'application/vnd.ms-windows.printerpairing' | 'application/vnd.ms-windows.wsd.oob' | 'application/vnd.ms-wmdrm.lic-chlg-req' | 'application/vnd.ms-wmdrm.lic-resp' | 'application/vnd.ms-wmdrm.meter-chlg-req' | 'application/vnd.ms-wmdrm.meter-resp' | 'application/vnd.ms-word.document.macroEnabled.12' | 'application/vnd.ms-word.template.macroEnabled.12' | 'application/vnd.ms-works' | 'application/vnd.ms-wpl' | 'application/vnd.ms-xpsdocument' | 'application/vnd.msa-disk-image' | 'application/vnd.mseq' | 'application/vnd.msgpack' | 'application/vnd.msign' | 'application/vnd.multiad.creator' | 'application/vnd.multiad.creator.cif' | 'application/vnd.musician' | 'application/vnd.music-niff' | 'application/vnd.muvee.style' | 'application/vnd.mynfc' | 'application/vnd.nacamar.ybrid+json' | 'application/vnd.nato.bindingdataobject+cbor' | 'application/vnd.nato.bindingdataobject+json' | 'application/vnd.nato.bindingdataobject+xml' | 'application/vnd.nato.openxmlformats-package.iepd+zip' | 'application/vnd.ncd.control' | 'application/vnd.ncd.reference' | 'application/vnd.nearst.inv+json' | 'application/vnd.nebumind.line' | 'application/vnd.nervana' | 'application/vnd.netfpx' | 'application/vnd.neurolanguage.nlu' | 'application/vnd.nimn' | 'application/vnd.nintendo.snes.rom' | 'application/vnd.nintendo.nitro.rom' | 'application/vnd.nitf' | 'application/vnd.noblenet-directory' | 'application/vnd.noblenet-sealer' | 'application/vnd.noblenet-web' | 'application/vnd.nokia.catalogs' | 'application/vnd.nokia.conml+wbxml' | 'application/vnd.nokia.conml+xml' | 'application/vnd.nokia.iptv.config+xml' | 'application/vnd.nokia.iSDS-radio-presets' | 'application/vnd.nokia.landmark+wbxml' | 'application/vnd.nokia.landmark+xml' | 'application/vnd.nokia.landmarkcollection+xml' | 'application/vnd.nokia.ncd' | 'application/vnd.nokia.n-gage.ac+xml' | 'application/vnd.nokia.n-gage.data' | 'application/vnd.nokia.n-gage.symbian.install' | 'application/vnd.nokia.pcd+wbxml' | 'application/vnd.nokia.pcd+xml' | 'application/vnd.nokia.radio-preset' | 'application/vnd.nokia.radio-presets' | 'application/vnd.novadigm.EDM' | 'application/vnd.novadigm.EDX' | 'application/vnd.novadigm.EXT' | 'application/vnd.ntt-local.content-share' | 'application/vnd.ntt-local.file-transfer' | 'application/vnd.ntt-local.ogw_remote-access' | 'application/vnd.ntt-local.sip-ta_remote' | 'application/vnd.ntt-local.sip-ta_tcp_stream' | 'application/vnd.oai.workflows' | 'application/vnd.oai.workflows+json' | 'application/vnd.oai.workflows+yaml' | 'application/vnd.oasis.opendocument.base' | 'application/vnd.oasis.opendocument.chart' | 'application/vnd.oasis.opendocument.chart-template' | 'application/vnd.oasis.opendocument.database' | 'application/vnd.oasis.opendocument.formula' | 'application/vnd.oasis.opendocument.formula-template' | 'application/vnd.oasis.opendocument.graphics' | 'application/vnd.oasis.opendocument.graphics-template' | 'application/vnd.oasis.opendocument.image' | 'application/vnd.oasis.opendocument.image-template' | 'application/vnd.oasis.opendocument.presentation' | 'application/vnd.oasis.opendocument.presentation-template' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.oasis.opendocument.spreadsheet-template' | 'application/vnd.oasis.opendocument.text' | 'application/vnd.oasis.opendocument.text-master' | 'application/vnd.oasis.opendocument.text-master-template' | 'application/vnd.oasis.opendocument.text-template' | 'application/vnd.oasis.opendocument.text-web' | 'application/vnd.obn' | 'application/vnd.ocf+cbor' | 'application/vnd.oci.image.manifest.v1+json' | 'application/vnd.oftn.l10n+json' | 'application/vnd.oipf.contentaccessdownload+xml' | 'application/vnd.oipf.contentaccessstreaming+xml' | 'application/vnd.oipf.cspg-hexbinary' | 'application/vnd.oipf.dae.svg+xml' | 'application/vnd.oipf.dae.xhtml+xml' | 'application/vnd.oipf.mippvcontrolmessage+xml' | 'application/vnd.oipf.pae.gem' | 'application/vnd.oipf.spdiscovery+xml' | 'application/vnd.oipf.spdlist+xml' | 'application/vnd.oipf.ueprofile+xml' | 'application/vnd.oipf.userprofile+xml' | 'application/vnd.olpc-sugar' | 'application/vnd.oma.bcast.associated-procedure-parameter+xml' | 'application/vnd.oma.bcast.drm-trigger+xml' | 'application/vnd.oma.bcast.imd+xml' | 'application/vnd.oma.bcast.ltkm' | 'application/vnd.oma.bcast.notification+xml' | 'application/vnd.oma.bcast.provisioningtrigger' | 'application/vnd.oma.bcast.sgboot' | 'application/vnd.oma.bcast.sgdd+xml' | 'application/vnd.oma.bcast.sgdu' | 'application/vnd.oma.bcast.simple-symbol-container' | 'application/vnd.oma.bcast.smartcard-trigger+xml' | 'application/vnd.oma.bcast.sprov+xml' | 'application/vnd.oma.bcast.stkm' | 'application/vnd.oma.cab-address-book+xml' | 'application/vnd.oma.cab-feature-handler+xml' | 'application/vnd.oma.cab-pcc+xml' | 'application/vnd.oma.cab-subs-invite+xml' | 'application/vnd.oma.cab-user-prefs+xml' | 'application/vnd.oma.dcd' | 'application/vnd.oma.dcdc' | 'application/vnd.oma.dd2+xml' | 'application/vnd.oma.drm.risd+xml' | 'application/vnd.oma.group-usage-list+xml' | 'application/vnd.oma.lwm2m+cbor' | 'application/vnd.oma.lwm2m+json' | 'application/vnd.oma.lwm2m+tlv' | 'application/vnd.oma.pal+xml' | 'application/vnd.oma.poc.detailed-progress-report+xml' | 'application/vnd.oma.poc.final-report+xml' | 'application/vnd.oma.poc.groups+xml' | 'application/vnd.oma.poc.invocation-descriptor+xml' | 'application/vnd.oma.poc.optimized-progress-report+xml' | 'application/vnd.oma.push' | 'application/vnd.oma.scidm.messages+xml' | 'application/vnd.oma.xcap-directory+xml' | 'application/vnd.omads-email+xml' | 'application/vnd.omads-file+xml' | 'application/vnd.omads-folder+xml' | 'application/vnd.omaloc-supl-init' | 'application/vnd.oma-scws-config' | 'application/vnd.oma-scws-http-request' | 'application/vnd.oma-scws-http-response' | 'application/vnd.onepager' | 'application/vnd.onepagertamp' | 'application/vnd.onepagertamx' | 'application/vnd.onepagertat' | 'application/vnd.onepagertatp' | 'application/vnd.onepagertatx' | 'application/vnd.onvif.metadata' | 'application/vnd.openblox.game-binary' | 'application/vnd.openblox.game+xml' | 'application/vnd.openeye.oeb' | 'application/vnd.openstreetmap.data+xml' | 'application/vnd.opentimestamps.ots' | 'application/vnd.openxmlformats-officedocument.custom-properties+xml' | 'application/vnd.openxmlformats-officedocument.customXmlProperties+xml' | 'application/vnd.openxmlformats-officedocument.drawing+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml' | 'application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml' | 'application/vnd.openxmlformats-officedocument.extended-properties+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.comments+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.presProps+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.slide' | 'application/vnd.openxmlformats-officedocument.presentationml.slide+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' | 'application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.tags+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.template' | 'application/vnd.openxmlformats-officedocument.presentationml.template.main+xml' | 'application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml' | 'application/vnd.openxmlformats-officedocument.theme+xml' | 'application/vnd.openxmlformats-officedocument.themeOverride+xml' | 'application/vnd.openxmlformats-officedocument.vmlDrawing' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml' | 'application/vnd.openxmlformats-package.core-properties+xml' | 'application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml' | 'application/vnd.openxmlformats-package.relationships+xml' | 'application/vnd.oracle.resource+json' | 'application/vnd.orange.indata' | 'application/vnd.osa.netdeploy' | 'application/vnd.osgeo.mapguide.package' | 'application/vnd.osgi.bundle' | 'application/vnd.osgi.dp' | 'application/vnd.osgi.subsystem' | 'application/vnd.otps.ct-kip+xml' | 'application/vnd.oxli.countgraph' | 'application/vnd.pagerduty+json' | 'application/vnd.palm' | 'application/vnd.panoply' | 'application/vnd.paos.xml' | 'application/vnd.patentdive' | 'application/vnd.patientecommsdoc' | 'application/vnd.pawaafile' | 'application/vnd.pcos' | 'application/vnd.pg.format' | 'application/vnd.pg.osasli' | 'application/vnd.piaccess.application-licence' | 'application/vnd.picsel' | 'application/vnd.pmi.widget' | 'application/vnd.poc.group-advertisement+xml' | 'application/vnd.pocketlearn' | 'application/vnd.powerbuilder6' | 'application/vnd.powerbuilder6-s' | 'application/vnd.powerbuilder7' | 'application/vnd.powerbuilder75' | 'application/vnd.powerbuilder75-s' | 'application/vnd.powerbuilder7-s' | 'application/vnd.preminet' | 'application/vnd.previewsystems.box' | 'application/vnd.proteus.magazine' | 'application/vnd.psfs' | 'application/vnd.pt.mundusmundi' | 'application/vnd.publishare-delta-tree' | 'application/vnd.pvi.ptid1' | 'application/vnd.pwg-multiplexed' | 'application/vnd.pwg-xhtml-print+xml' | 'application/vnd.qualcomm.brew-app-res' | 'application/vnd.quarantainenet' | 'application/vnd.Quark.QuarkXPress' | 'application/vnd.quobject-quoxdocument' | 'application/vnd.radisys.moml+xml' | 'application/vnd.radisys.msml-audit-conf+xml' | 'application/vnd.radisys.msml-audit-conn+xml' | 'application/vnd.radisys.msml-audit-dialog+xml' | 'application/vnd.radisys.msml-audit-stream+xml' | 'application/vnd.radisys.msml-audit+xml' | 'application/vnd.radisys.msml-conf+xml' | 'application/vnd.radisys.msml-dialog-base+xml' | 'application/vnd.radisys.msml-dialog-fax-detect+xml' | 'application/vnd.radisys.msml-dialog-fax-sendrecv+xml' | 'application/vnd.radisys.msml-dialog-group+xml' | 'application/vnd.radisys.msml-dialog-speech+xml' | 'application/vnd.radisys.msml-dialog-transform+xml' | 'application/vnd.radisys.msml-dialog+xml' | 'application/vnd.radisys.msml+xml' | 'application/vnd.rainstor.data' | 'application/vnd.rapid' | 'application/vnd.rar' | 'application/vnd.realvnc.bed' | 'application/vnd.recordare.musicxml' | 'application/vnd.recordare.musicxml+xml' | 'application/vnd.relpipe' | 'application/vnd.RenLearn.rlprint' | 'application/vnd.resilient.logic' | 'application/vnd.restful+json' | 'application/vnd.rig.cryptonote' | 'application/vnd.route66.link66+xml' | 'application/vnd.rs-274x' | 'application/vnd.ruckus.download' | 'application/vnd.s3sms' | 'application/vnd.sailingtracker.track' | 'application/vnd.sar' | 'application/vnd.sbm.cid' | 'application/vnd.sbm.mid2' | 'application/vnd.scribus' | 'application/vnd.sealed.3df' | 'application/vnd.sealed.csf' | 'application/vnd.sealed.doc' | 'application/vnd.sealed.eml' | 'application/vnd.sealed.mht' | 'application/vnd.sealed.net' | 'application/vnd.sealed.ppt' | 'application/vnd.sealed.tiff' | 'application/vnd.sealed.xls' | 'application/vnd.sealedmedia.softseal.html' | 'application/vnd.sealedmedia.softseal.pdf' | 'application/vnd.seemail' | 'application/vnd.seis+json' | 'application/vnd.sema' | 'application/vnd.semd' | 'application/vnd.semf' | 'application/vnd.shade-save-file' | 'application/vnd.shana.informed.formdata' | 'application/vnd.shana.informed.formtemplate' | 'application/vnd.shana.informed.interchange' | 'application/vnd.shana.informed.package' | 'application/vnd.shootproof+json' | 'application/vnd.shopkick+json' | 'application/vnd.shp' | 'application/vnd.shx' | 'application/vnd.sigrok.session' | 'application/vnd.SimTech-MindMapper' | 'application/vnd.siren+json' | 'application/vnd.smaf' | 'application/vnd.smart.notebook' | 'application/vnd.smart.teacher' | 'application/vnd.smintio.portals.archive' | 'application/vnd.snesdev-page-table' | 'application/vnd.software602.filler.form+xml' | 'application/vnd.software602.filler.form-xml-zip' | 'application/vnd.solent.sdkm+xml' | 'application/vnd.spotfire.dxp' | 'application/vnd.spotfire.sfs' | 'application/vnd.sqlite3' | 'application/vnd.sss-cod' | 'application/vnd.sss-dtf' | 'application/vnd.sss-ntf' | 'application/vnd.stepmania.package' | 'application/vnd.stepmania.stepchart' | 'application/vnd.street-stream' | 'application/vnd.sun.wadl+xml' | 'application/vnd.sus-calendar' | 'application/vnd.svd' | 'application/vnd.swiftview-ics' | 'application/vnd.sybyl.mol2' | 'application/vnd.sycle+xml' | 'application/vnd.syft+json' | 'application/vnd.syncml.dm.notification' | 'application/vnd.syncml.dmddf+xml' | 'application/vnd.syncml.dmtnds+wbxml' | 'application/vnd.syncml.dmtnds+xml' | 'application/vnd.syncml.dmddf+wbxml' | 'application/vnd.syncml.dm+wbxml' | 'application/vnd.syncml.dm+xml' | 'application/vnd.syncml.ds.notification' | 'application/vnd.syncml+xml' | 'application/vnd.tableschema+json' | 'application/vnd.tao.intent-module-archive' | 'application/vnd.tcpdump.pcap' | 'application/vnd.think-cell.ppttc+json' | 'application/vnd.tml' | 'application/vnd.tmd.mediaflex.api+xml' | 'application/vnd.tmobile-livetv' | 'application/vnd.tri.onesource' | 'application/vnd.trid.tpt' | 'application/vnd.triscape.mxs' | 'application/vnd.trueapp' | 'application/vnd.truedoc' | 'application/vnd.ubisoft.webplayer' | 'application/vnd.ufdl' | 'application/vnd.uiq.theme' | 'application/vnd.umajin' | 'application/vnd.unity' | 'application/vnd.uoml+xml' | 'application/vnd.uplanet.alert' | 'application/vnd.uplanet.alert-wbxml' | 'application/vnd.uplanet.bearer-choice' | 'application/vnd.uplanet.bearer-choice-wbxml' | 'application/vnd.uplanet.cacheop' | 'application/vnd.uplanet.cacheop-wbxml' | 'application/vnd.uplanet.channel' | 'application/vnd.uplanet.channel-wbxml' | 'application/vnd.uplanet.list' | 'application/vnd.uplanet.listcmd' | 'application/vnd.uplanet.listcmd-wbxml' | 'application/vnd.uplanet.list-wbxml' | 'application/vnd.uri-map' | 'application/vnd.uplanet.signal' | 'application/vnd.valve.source.material' | 'application/vnd.vcx' | 'application/vnd.vd-study' | 'application/vnd.vectorworks' | 'application/vnd.vel+json' | 'application/vnd.verimatrix.vcas' | 'application/vnd.veritone.aion+json' | 'application/vnd.veryant.thin' | 'application/vnd.ves.encrypted' | 'application/vnd.vidsoft.vidconference' | 'application/vnd.visio' | 'application/vnd.visionary' | 'application/vnd.vividence.scriptfile' | 'application/vnd.vsf' | 'application/vnd.wap.sic' | 'application/vnd.wap.slc' | 'application/vnd.wap.wbxml' | 'application/vnd.wap.wmlc' | 'application/vnd.wap.wmlscriptc' | 'application/vnd.wasmflow.wafl' | 'application/vnd.webturbo' | 'application/vnd.wfa.dpp' | 'application/vnd.wfa.p2p' | 'application/vnd.wfa.wsc' | 'application/vnd.windows.devicepairing' | 'application/vnd.wmc' | 'application/vnd.wmf.bootstrap' | 'application/vnd.wolfram.mathematica' | 'application/vnd.wolfram.mathematica.package' | 'application/vnd.wolfram.player' | 'application/vnd.wordlift' | 'application/vnd.wordperfect' | 'application/vnd.wqd' | 'application/vnd.wrq-hp3000-labelled' | 'application/vnd.wt.stf' | 'application/vnd.wv.csp+xml' | 'application/vnd.wv.csp+wbxml' | 'application/vnd.wv.ssp+xml' | 'application/vnd.xacml+json' | 'application/vnd.xara' | 'application/vnd.xarin.cpj' | 'application/vnd.xecrets-encrypted' | 'application/vnd.xfdl' | 'application/vnd.xfdl.webform' | 'application/vnd.xmi+xml' | 'application/vnd.xmpie.cpkg' | 'application/vnd.xmpie.dpkg' | 'application/vnd.xmpie.plan' | 'application/vnd.xmpie.ppkg' | 'application/vnd.xmpie.xlim' | 'application/vnd.yamaha.hv-dic' | 'application/vnd.yamaha.hv-script' | 'application/vnd.yamaha.hv-voice' | 'application/vnd.yamaha.openscoreformat.osfpvg+xml' | 'application/vnd.yamaha.openscoreformat' | 'application/vnd.yamaha.remote-setup' | 'application/vnd.yamaha.smaf-audio' | 'application/vnd.yamaha.smaf-phrase' | 'application/vnd.yamaha.through-ngn' | 'application/vnd.yamaha.tunnel-udpencap' | 'application/vnd.yaoweme' | 'application/vnd.yellowriver-custom-menu' | 'application/vnd.youtube.yt' | 'application/vnd.zul' | 'application/vnd.zzazz.deck+xml' | 'application/voicexml+xml' | 'application/voucher-cms+json' | 'application/vp' | 'application/vq-rtcpxr' | 'application/wasm' | 'application/watcherinfo+xml' | 'application/webpush-options+json' | 'application/whoispp-query' | 'application/whoispp-response' | 'application/widget' | 'application/wita' | 'application/wordperfect5.1' | 'application/wsdl+xml' | 'application/wspolicy+xml' | 'application/x-pki-message' | 'application/x-www-form-urlencoded' | 'application/x-x509-ca-cert' | 'application/x-x509-ca-ra-cert' | 'application/x-x509-next-ca-cert' | 'application/x400-bp' | 'application/xacml+xml' | 'application/xcap-att+xml' | 'application/xcap-caps+xml' | 'application/xcap-diff+xml' | 'application/xcap-el+xml' | 'application/xcap-error+xml' | 'application/xcap-ns+xml' | 'application/xcon-conference-info-diff+xml' | 'application/xcon-conference-info+xml' | 'application/xenc+xml' | 'application/xfdf' | 'application/xhtml+xml' | 'application/xliff+xml' | 'application/xml' | 'application/xml-dtd' | 'application/xml-external-parsed-entity' | 'application/xml-patch+xml' | 'application/xmpp+xml' | 'application/xop+xml' | 'application/xslt+xml' | 'application/xv+xml' | 'application/yaml' | 'application/yang' | 'application/yang-data+cbor' | 'application/yang-data+json' | 'application/yang-data+xml' | 'application/yang-patch+json' | 'application/yang-patch+xml' | 'application/yang-sid+json' | 'application/yin+xml' | 'application/zip' | 'application/zlib' | 'application/zstd' | 'audio/1d-interleaved-parityfec' | 'audio/32kadpcm' | 'audio/3gpp' | 'audio/3gpp2' | 'audio/aac' | 'audio/ac3' | 'audio/AMR' | 'audio/AMR-WB' | 'audio/amr-wb+' | 'audio/aptx' | 'audio/asc' | 'audio/ATRAC-ADVANCED-LOSSLESS' | 'audio/ATRAC-X' | 'audio/ATRAC3' | 'audio/basic' | 'audio/BV16' | 'audio/BV32' | 'audio/clearmode' | 'audio/CN' | 'audio/DAT12' | 'audio/dls' | 'audio/dsr-es201108' | 'audio/dsr-es202050' | 'audio/dsr-es202211' | 'audio/dsr-es202212' | 'audio/DV' | 'audio/DVI4' | 'audio/eac3' | 'audio/encaprtp' | 'audio/EVRC' | 'audio/EVRC-QCP' | 'audio/EVRC0' | 'audio/EVRC1' | 'audio/EVRCB' | 'audio/EVRCB0' | 'audio/EVRCB1' | 'audio/EVRCNW' | 'audio/EVRCNW0' | 'audio/EVRCNW1' | 'audio/EVRCWB' | 'audio/EVRCWB0' | 'audio/EVRCWB1' | 'audio/EVS' | 'audio/example' | 'audio/flac' | 'audio/flexfec' | 'audio/fwdred' | 'audio/G711-0' | 'audio/G719' | 'audio/G7221' | 'audio/G722' | 'audio/G723' | 'audio/G726-16' | 'audio/G726-24' | 'audio/G726-32' | 'audio/G726-40' | 'audio/G728' | 'audio/G729' | 'audio/G7291' | 'audio/G729D' | 'audio/G729E' | 'audio/GSM' | 'audio/GSM-EFR' | 'audio/GSM-HR-08' | 'audio/iLBC' | 'audio/ip-mr_v2.5' | 'audio/L8' | 'audio/L16' | 'audio/L20' | 'audio/L24' | 'audio/LPC' | 'audio/matroska' | 'audio/MELP' | 'audio/MELP600' | 'audio/MELP1200' | 'audio/MELP2400' | 'audio/mhas' | 'audio/midi-clip' | 'audio/mobile-xmf' | 'audio/MPA' | 'audio/mp4' | 'audio/MP4A-LATM' | 'audio/mpa-robust' | 'audio/mpeg' | 'audio/mpeg4-generic' | 'audio/ogg' | 'audio/opus' | 'audio/parityfec' | 'audio/PCMA' | 'audio/PCMA-WB' | 'audio/PCMU' | 'audio/PCMU-WB' | 'audio/prs.sid' | 'audio/QCELP' | 'audio/raptorfec' | 'audio/RED' | 'audio/rtp-enc-aescm128' | 'audio/rtploopback' | 'audio/rtp-midi' | 'audio/rtx' | 'audio/scip' | 'audio/SMV' | 'audio/SMV0' | 'audio/SMV-QCP' | 'audio/sofa' | 'audio/sp-midi' | 'audio/speex' | 'audio/t140c' | 'audio/t38' | 'audio/telephone-event' | 'audio/TETRA_ACELP' | 'audio/TETRA_ACELP_BB' | 'audio/tone' | 'audio/TSVCIS' | 'audio/UEMCLIP' | 'audio/ulpfec' | 'audio/usac' | 'audio/VDVI' | 'audio/VMR-WB' | 'audio/vnd.3gpp.iufp' | 'audio/vnd.4SB' | 'audio/vnd.audiokoz' | 'audio/vnd.CELP' | 'audio/vnd.cisco.nse' | 'audio/vnd.cmles.radio-events' | 'audio/vnd.cns.anp1' | 'audio/vnd.cns.inf1' | 'audio/vnd.dece.audio' | 'audio/vnd.digital-winds' | 'audio/vnd.dlna.adts' | 'audio/vnd.dolby.heaac.1' | 'audio/vnd.dolby.heaac.2' | 'audio/vnd.dolby.mlp' | 'audio/vnd.dolby.mps' | 'audio/vnd.dolby.pl2' | 'audio/vnd.dolby.pl2x' | 'audio/vnd.dolby.pl2z' | 'audio/vnd.dolby.pulse.1' | 'audio/vnd.dra' | 'audio/vnd.dts' | 'audio/vnd.dts.hd' | 'audio/vnd.dts.uhd' | 'audio/vnd.dvb.file' | 'audio/vnd.everad.plj' | 'audio/vnd.hns.audio' | 'audio/vnd.lucent.voice' | 'audio/vnd.ms-playready.media.pya' | 'audio/vnd.nokia.mobile-xmf' | 'audio/vnd.nortel.vbk' | 'audio/vnd.nuera.ecelp4800' | 'audio/vnd.nuera.ecelp7470' | 'audio/vnd.nuera.ecelp9600' | 'audio/vnd.octel.sbc' | 'audio/vnd.presonus.multitrack' | 'audio/vnd.qcelp' | 'audio/vnd.rhetorex.32kadpcm' | 'audio/vnd.rip' | 'audio/vnd.sealedmedia.softseal.mpeg' | 'audio/vnd.vmx.cvsd' | 'audio/vorbis' | 'audio/vorbis-config' | 'font/collection' | 'font/otf' | 'font/sfnt' | 'font/ttf' | 'font/woff' | 'font/woff2' | 'haptics/ivs' | 'haptics/hjif' | 'haptics/hmpg' | 'image/aces' | 'image/apng' | 'image/avci' | 'image/avcs' | 'image/avif' | 'image/bmp' | 'image/cgm' | 'image/dicom-rle' | 'image/dpx' | 'image/emf' | 'image/example' | 'image/fits' | 'image/g3fax' | 'image/gif' | 'image/heic' | 'image/heic-sequence' | 'image/heif' | 'image/heif-sequence' | 'image/hej2k' | 'image/hsj2' | 'image/ief' | 'image/j2c' | 'image/jls' | 'image/jp2' | 'image/jpeg' | 'image/jph' | 'image/jphc' | 'image/jpm' | 'image/jpx' | 'image/jxl' | 'image/jxr' | 'image/jxrA' | 'image/jxrS' | 'image/jxs' | 'image/jxsc' | 'image/jxsi' | 'image/jxss' | 'image/ktx' | 'image/ktx2' | 'image/naplps' | 'image/png' | 'image/prs.btif' | 'image/prs.pti' | 'image/pwg-raster' | 'image/svg+xml' | 'image/t38' | 'image/tiff' | 'image/tiff-fx' | 'image/vnd.adobe.photoshop' | 'image/vnd.airzip.accelerator.azv' | 'image/vnd.cns.inf2' | 'image/vnd.dece.graphic' | 'image/vnd.djvu' | 'image/vnd.dwg' | 'image/vnd.dxf' | 'image/vnd.dvb.subtitle' | 'image/vnd.fastbidsheet' | 'image/vnd.fpx' | 'image/vnd.fst' | 'image/vnd.fujixerox.edmics-mmr' | 'image/vnd.fujixerox.edmics-rlc' | 'image/vnd.globalgraphics.pgb' | 'image/vnd.microsoft.icon' | 'image/vnd.mix' | 'image/vnd.ms-modi' | 'image/vnd.mozilla.apng' | 'image/vnd.net-fpx' | 'image/vnd.pco.b16' | 'image/vnd.radiance' | 'image/vnd.sealed.png' | 'image/vnd.sealedmedia.softseal.gif' | 'image/vnd.sealedmedia.softseal.jpg' | 'image/vnd.svf' | 'image/vnd.tencent.tap' | 'image/vnd.valve.source.texture' | 'image/vnd.wap.wbmp' | 'image/vnd.xiff' | 'image/vnd.zbrush.pcx' | 'image/webp' | 'image/wmf' | 'message/bhttp' | 'message/CPIM' | 'message/delivery-status' | 'message/disposition-notification' | 'message/example' | 'message/external-body' | 'message/feedback-report' | 'message/global' | 'message/global-delivery-status' | 'message/global-disposition-notification' | 'message/global-headers' | 'message/http' | 'message/imdn+xml' | 'message/mls' | 'message/news' | 'message/ohttp-req' | 'message/ohttp-res' | 'message/partial' | 'message/rfc822' | 'message/s-http' | 'message/sip' | 'message/sipfrag' | 'message/tracking-status' | 'message/vnd.si.simp' | 'message/vnd.wfa.wsc' | 'model/3mf' | 'model/e57' | 'model/example' | 'model/gltf-binary' | 'model/gltf+json' | 'model/JT' | 'model/iges' | 'model/mesh' | 'model/mtl' | 'model/obj' | 'model/prc' | 'model/step' | 'model/step+xml' | 'model/step+zip' | 'model/step-xml+zip' | 'model/stl' | 'model/u3d' | 'model/vnd.bary' | 'model/vnd.cld' | 'model/vnd.collada+xml' | 'model/vnd.dwf' | 'model/vnd.flatland.3dml' | 'model/vnd.gdl' | 'model/vnd.gs-gdl' | 'model/vnd.gtw' | 'model/vnd.moml+xml' | 'model/vnd.mts' | 'model/vnd.opengex' | 'model/vnd.parasolid.transmit.binary' | 'model/vnd.parasolid.transmit.text' | 'model/vnd.pytha.pyox' | 'model/vnd.rosette.annotated-data-model' | 'model/vnd.sap.vds' | 'model/vnd.usda' | 'model/vnd.usdz+zip' | 'model/vnd.valve.source.compiled-map' | 'model/vnd.vtu' | 'model/vrml' | 'model/x3d-vrml' | 'model/x3d+fastinfoset' | 'model/x3d+xml' | 'multipart/alternative' | 'multipart/appledouble' | 'multipart/byteranges' | 'multipart/digest' | 'multipart/encrypted' | 'multipart/example' | 'multipart/form-data' | 'multipart/header-set' | 'multipart/mixed' | 'multipart/multilingual' | 'multipart/parallel' | 'multipart/related' | 'multipart/report' | 'multipart/signed' | 'multipart/vnd.bint.med-plus' | 'multipart/voice-message' | 'multipart/x-mixed-replace' | 'text/1d-interleaved-parityfec' | 'text/cache-manifest' | 'text/calendar' | 'text/cql' | 'text/cql-expression' | 'text/cql-identifier' | 'text/css' | 'text/csv' | 'text/csv-schema' | 'text/directory' | 'text/dns' | 'text/ecmascript' | 'text/encaprtp' | 'text/enriched' | 'text/example' | 'text/fhirpath' | 'text/flexfec' | 'text/fwdred' | 'text/gff3' | 'text/grammar-ref-list' | 'text/hl7v2' | 'text/html' | 'text/javascript' | 'text/jcr-cnd' | 'text/markdown' | 'text/mizar' | 'text/n3' | 'text/parameters' | 'text/parityfec' | 'text/plain' | 'text/provenance-notation' | 'text/prs.fallenstein.rst' | 'text/prs.lines.tag' | 'text/prs.prop.logic' | 'text/prs.texi' | 'text/raptorfec' | 'text/RED' | 'text/rfc822-headers' | 'text/richtext' | 'text/rtf' | 'text/rtp-enc-aescm128' | 'text/rtploopback' | 'text/rtx' | 'text/SGML' | 'text/shaclc' | 'text/shex' | 'text/spdx' | 'text/strings' | 'text/t140' | 'text/tab-separated-values' | 'text/troff' | 'text/turtle' | 'text/ulpfec' | 'text/uri-list' | 'text/vcard' | 'text/vnd.a' | 'text/vnd.abc' | 'text/vnd.ascii-art' | 'text/vnd.curl' | 'text/vnd.debian.copyright' | 'text/vnd.DMClientScript' | 'text/vnd.dvb.subtitle' | 'text/vnd.esmertec.theme-descriptor' | 'text/vnd.exchangeable' | 'text/vnd.familysearch.gedcom' | 'text/vnd.ficlab.flt' | 'text/vnd.fly' | 'text/vnd.fmi.flexstor' | 'text/vnd.gml' | 'text/vnd.graphviz' | 'text/vnd.hans' | 'text/vnd.hgl' | 'text/vnd.in3d.3dml' | 'text/vnd.in3d.spot' | 'text/vnd.IPTC.NewsML' | 'text/vnd.IPTC.NITF' | 'text/vnd.latex-z' | 'text/vnd.motorola.reflex' | 'text/vnd.ms-mediapackage' | 'text/vnd.net2phone.commcenter.command' | 'text/vnd.radisys.msml-basic-layout' | 'text/vnd.senx.warpscript' | 'text/vnd.si.uricatalogue' | 'text/vnd.sun.j2me.app-descriptor' | 'text/vnd.sosi' | 'text/vnd.trolltech.linguist' | 'text/vnd.vcf' | 'text/vnd.wap.si' | 'text/vnd.wap.sl' | 'text/vnd.wap.wml' | 'text/vnd.wap.wmlscript' | 'text/vnd.zoo.kcl' | 'text/vtt' | 'text/wgsl' | 'text/xml' | 'text/xml-external-parsed-entity' | 'video/1d-interleaved-parityfec' | 'video/3gpp' | 'video/3gpp2' | 'video/3gpp-tt' | 'video/AV1' | 'video/BMPEG' | 'video/BT656' | 'video/CelB' | 'video/DV' | 'video/encaprtp' | 'video/evc' | 'video/example' | 'video/FFV1' | 'video/flexfec' | 'video/H261' | 'video/H263' | 'video/H263-1998' | 'video/H263-2000' | 'video/H264' | 'video/H264-RCDO' | 'video/H264-SVC' | 'video/H265' | 'video/H266' | 'video/iso.segment' | 'video/JPEG' | 'video/jpeg2000' | 'video/jxsv' | 'video/matroska' | 'video/matroska-3d' | 'video/mj2' | 'video/MP1S' | 'video/MP2P' | 'video/MP2T' | 'video/mp4' | 'video/MP4V-ES' | 'video/MPV' | 'video/mpeg' | 'video/mpeg4-generic' | 'video/nv' | 'video/ogg' | 'video/parityfec' | 'video/pointer' | 'video/quicktime' | 'video/raptorfec' | 'video/raw' | 'video/rtp-enc-aescm128' | 'video/rtploopback' | 'video/rtx' | 'video/scip' | 'video/smpte291' | 'video/SMPTE292M' | 'video/ulpfec' | 'video/vc1' | 'video/vc2' | 'video/vnd.CCTV' | 'video/vnd.dece.hd' | 'video/vnd.dece.mobile' | 'video/vnd.dece.mp4' | 'video/vnd.dece.pd' | 'video/vnd.dece.sd' | 'video/vnd.dece.video' | 'video/vnd.directv.mpeg' | 'video/vnd.directv.mpeg-tts' | 'video/vnd.dlna.mpeg-tts' | 'video/vnd.dvb.file' | 'video/vnd.fvt' | 'video/vnd.hns.video' | 'video/vnd.iptvforum.1dparityfec-1010' | 'video/vnd.iptvforum.1dparityfec-2005' | 'video/vnd.iptvforum.2dparityfec-1010' | 'video/vnd.iptvforum.2dparityfec-2005' | 'video/vnd.iptvforum.ttsavc' | 'video/vnd.iptvforum.ttsmpeg2' | 'video/vnd.motorola.video' | 'video/vnd.motorola.videop' | 'video/vnd.mpegurl' | 'video/vnd.ms-playready.media.pyv' | 'video/vnd.nokia.interleaved-multimedia' | 'video/vnd.nokia.mp4vr' | 'video/vnd.nokia.videovoip' | 'video/vnd.objectvideo' | 'video/vnd.radgamettools.bink' | 'video/vnd.radgamettools.smacker' | 'video/vnd.sealed.mpeg1' | 'video/vnd.sealed.mpeg4' | 'video/vnd.sealed.swf' | 'video/vnd.sealedmedia.softseal.mov' | 'video/vnd.uvvu.mp4' | 'video/vnd.youtube.yt' | 'video/vnd.vivo' | 'video/VP8' | 'video/VP9' | `X-${string}/${string}`;
31
11
 
32
12
  declare class Auth {
33
13
  #private;
@@ -189,6 +169,9 @@ interface LoginDataTransformer<T extends LoginData = LoginData> {
189
169
  (data: LoginData): Awaitable<T>;
190
170
  }
191
171
 
172
+ type MethodName = (typeof MethodNames)[number];
173
+ declare const MethodNames: readonly ["ACL", "BIND", "CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LINK", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCALENDAR", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "REBIND", "REPORT", "SEARCH", "SOURCE", "SUBSCRIBE", "TRACE", "UNBIND", "UNLINK", "UNLOCK", "UNSUBSCRIBE"];
174
+
192
175
  declare class CookieStore extends Map<string, string> {
193
176
  protected request: ApiRequest;
194
177
  protected response: ApiResponse;
@@ -286,10 +269,10 @@ declare class ApiResponse<Request extends IncomingMessage = IncomingMessage> ext
286
269
  *
287
270
  * Sets the image content type and sends the image data in the response.
288
271
  *
289
- * @param type - The MIME type of the image (e.g., {@link MimeTypes.ImagePng}).
272
+ * @param type - The MIME type of the image (e.g., 'image/png').
290
273
  * @param data - The image data as a `string`, {@link Buffer}, {@link Uint8Array}, or {@link ReadableStream}.
291
274
  */
292
- image(type: MimeTypes.ImageGif | MimeTypes.ImageJpg | MimeTypes.ImagePng | MimeTypes.ImageWebp | MimeTypes.ImageXIcon, data: string | Buffer | Uint8Array | Readable): void;
275
+ image(type: Extract<MimeType, `image/${string}`>, data: string | Buffer | Uint8Array | Readable): void;
293
276
  /**
294
277
  * @since 5.1.0
295
278
  */
@@ -297,7 +280,7 @@ declare class ApiResponse<Request extends IncomingMessage = IncomingMessage> ext
297
280
  /**
298
281
  * @since 1.0.0
299
282
  */
300
- setContentType(contentType: MimeTypes): this;
283
+ setContentType(contentType: MimeType): this;
301
284
  }
302
285
 
303
286
  interface RouteOptions extends Piece.Options {
@@ -332,7 +315,7 @@ interface RouteOptions extends Piece.Options {
332
315
  *
333
316
  * @defaultValue this.context.server.options.acceptedContentMimeTypes ?? null
334
317
  */
335
- acceptedContentMimeTypes?: readonly MimeTypeWithoutParameters[] | null;
318
+ acceptedContentMimeTypes?: readonly MimeType[] | null;
336
319
  /**
337
320
  * The methods this route accepts.
338
321
  * @since 7.0.0
@@ -386,7 +369,7 @@ declare abstract class Route<Options extends Route.Options = Route.Options> exte
386
369
  /**
387
370
  * The accepted content types.
388
371
  */
389
- readonly acceptedContentMimeTypes: readonly MimeTypeWithoutParameters[] | null;
372
+ readonly acceptedContentMimeTypes: readonly MimeType[] | null;
390
373
  /**
391
374
  * The path this route represents.
392
375
  */
@@ -784,14 +767,15 @@ type ContentTypeParameter = `; ${string}=${string}`;
784
767
  /**
785
768
  * RFC 1341 4: Defines the syntax for a Content-Type field without parameters, which follows the following structure:
786
769
  * `type "/" subtype`.
770
+ * @since 7.0.0
787
771
  */
788
- type MimeTypeWithoutParameters = `${ContentTypeType}/${string}`;
772
+ type GenericMimeType = `${ContentTypeType}/${string}`;
789
773
  /**
790
774
  * RFC 1341 4: Defines the syntax for a Content-Type field, which follows the following structure:
791
775
  * `type "/" subtype *[";" parameter]`.
792
- * @since 1.3.0
776
+ * @since 7.0.0
793
777
  */
794
- type MimeType = `${MimeTypeWithoutParameters}${'' | ContentTypeParameter}`;
778
+ type GenericParametrizedMimeType = `${GenericMimeType}${'' | ContentTypeParameter}`;
795
779
  /**
796
780
  * The API options.
797
781
  * @since 1.0.0
@@ -820,7 +804,7 @@ interface ServerOptions {
820
804
  * @since 1.3.0
821
805
  * @default null
822
806
  */
823
- acceptedContentMimeTypes?: MimeTypeWithoutParameters[] | null;
807
+ acceptedContentMimeTypes?: MimeType[] | null;
824
808
  /**
825
809
  * The HTTP server options.
826
810
  * @since 1.0.0
@@ -1265,4 +1249,4 @@ declare module '@sapphire/pieces' {
1265
1249
  */
1266
1250
  declare const version: string;
1267
1251
 
1268
- export { ApiRequest, ApiResponse, Auth, type AuthData, type AuthLessServerOptions, type ContentTypeParameter, type ContentTypeType, CookieStore, HttpCodes, type LoginData, type LoginDataTransformer, MediaParser, MediaParserStore, type MethodName, MethodNames, Middleware, type MiddlewareOptions, MiddlewareStore, type MimeType, type MimeTypeWithoutParameters, MimeTypes, Route, type RouteOptions, RouteStore, RouterBranch, RouterNode, RouterRoot, type SecureCookieStoreSetOptions, Server, ServerEvent, type ServerEvents, type ServerOptions, type ServerOptionsAuth, loadListeners, loadMediaParsers, loadMiddlewares, loadRoutes, version };
1252
+ export { ApiRequest, ApiResponse, Auth, type AuthData, type AuthLessServerOptions, type ContentTypeParameter, type ContentTypeType, CookieStore, type GenericMimeType, type GenericParametrizedMimeType, HttpCodes, type LoginData, type LoginDataTransformer, MediaParser, MediaParserStore, type MethodName, MethodNames, Middleware, type MiddlewareOptions, MiddlewareStore, type MimeType, Route, type RouteOptions, RouteStore, RouterBranch, RouterNode, RouterRoot, type SecureCookieStoreSetOptions, Server, ServerEvent, type ServerEvents, type ServerOptions, type ServerOptionsAuth, loadListeners, loadMediaParsers, loadMiddlewares, loadRoutes, version };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/structures/MediaParser.ts"],"names":["Piece","createInflate","createGunzip","createBrotliDecompress"],"mappings":";;;;;;;AAWO,IAAe,YAAA,GAAf,MAAe,YAAA,SAA+EA,YAA+B,CAAA;AAAA,EAC5H,WAAY,CAAA,OAAA,EAAoC,OAAmB,GAAA,EAAe,EAAA;AACxF,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA,CAAA;AAAA,GACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaO,QAAQ,KAAuB,EAAA;AACrC,IAAA,OAAO,MAAM,wBAA6B,KAAA,IAAA,IAAQ,MAAM,wBAAyB,CAAA,QAAA,CAAS,KAAK,IAAiC,CAAA,CAAA;AAAA,GACjI;AAAA;AAAA;AAAA;AAAA;A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AA,CAAA;AAAA,OACR;AAAA,MAKA,KAAK,IAAM,EAAA;AACV,QAAA,MAAM,SAASC,2BAAuB,EAAA,CAAA;AACtC,QAAA,OAAA,CAAQ,KAAK,MAAM,CAAA,CAAA;AACnB,QAAO,OAAA,MAAA,CAAA;AAAA,OACR;AAAA,MAIA,KAAK,UAAY,EAAA;AAChB,QAAO,OAAA,OAAA,CAAA;AAAA,OACR;AAAA,KACD;AAEA,IAAO,OAAA,IAAA,CAAA;AAAA,GACR;AACD,CAAA,CAAA;AAhGoI,MAAA,CAAA,YAAA,EAAA,aAAA,CAAA,CAAA;AAA7H,IAAe,WAAf,GAAA","file":"MediaParser.cjs","sourcesContent":["import { Piece } from '@sapphire/pieces';\nimport type { Awaitable } from '@sapphire/utilities';\nimport { createBrotliDecompress, createGunzip, createInflate, type Gunzip } from 'zlib';\nimport type { ApiRequest } from './api/ApiRequest';\nimport type { MimeTypeWithoutParameters } from './http/Server';\nimport type { Route } from './Route';\n\n/**\n * A media parser\n * @since 1.3.0\n */\nexport abstract class MediaParser<Options extends MediaParser.Options = MediaParser.Options> extends Piece<Options, 'mediaParsers'> {\n\tpublic constructor(context: MediaParser.LoaderContext, options: Options = {} as Options) {\n\t\tsuper(context, options);\n\t}\n\n\t/**\n\t * Parses the body data from an API request.\n\t * @since 1.3.0\n\t */\n\tpublic abstract run(request: MediaParser.Request): Awaitable<unknown>;\n\n\t/**\n\t * Checks if a route accepts the media type from this parser.\n\t * @since 1.3.0\n\t * @param route The route to be checked.\n\t */\n\tpublic accepts(route: Route): boolean {\n\t\treturn route.acceptedContentMimeTypes === null || route.acceptedContentMimeTypes.includes(this.name as MimeTypeWithoutParameters);\n\t}\n\n\t/**\n\t * Reads the content body as a string, this is useful for parsing/reading plain-text data.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected async readString(request: MediaParser.Request): Promise<string> {\n\t\tconst stream = this.contentStream(request);\n\t\tif (stream === null) return '';\n\n\t\tlet body = '';\n\t\tfor await (const chunk of stream) body += chunk;\n\n\t\treturn body;\n\t}\n\n\t/**\n\t * Reads the content body as a buffer, this is useful for parsing/reading binary data.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected async readBuffer(request: MediaParser.Request): Promise<Buffer> {\n\t\tconst stream = this.contentStream(request);\n\t\tif (stream === null) return Buffer.alloc(0);\n\n\t\tconst bodies: Buffer[] = [];\n\t\tfor await (const chunk of stream) bodies.push(chunk);\n\n\t\treturn Buffer.concat(bodies);\n\t}\n\n\t/**\n\t * Reads the content stream from a request, piping the data through a transformer stream.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected contentStream(request: MediaParser.Request): MediaParser.Request | Gunzip | null {\n\t\tswitch ((request.headers['content-encoding'] ?? 'identity').toLowerCase()) {\n\t\t\t// RFC 7230 4.2.2:\n\t\t\t//\n\t\t\t// The \"deflate\" coding is a \"zlib\" data format (RFC 1950) containing a \"deflate\" compressed data stream\n\t\t\t// (RFC 1951) that uses a combination of the Lempel-Ziv (LZ77) compression algorithm and Huffman coding.\n\t\t\tcase 'deflate': {\n\t\t\t\tconst stream = createInflate();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// RFC 7230 4.2.3\n\t\t\t//\n\t\t\t// The \"gzip\" coding is an LZ77 coding with a 32-bit Cyclic Redundancy Check (CRC) that is commonly produced\n\t\t\t// by the gzip file compression program (RFC 1952).\n\t\t\tcase 'x-gzip':\n\t\t\tcase 'gzip': {\n\t\t\t\tconst stream = createGunzip();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// RFC 7932\n\t\t\t//\n\t\t\t// A format using the Brotli algorithm.\n\t\t\tcase 'br': {\n\t\t\t\tconst stream = createBrotliDecompress();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// An \"identity\" token is used as a synonym for \"no encoding\" in order to communicate when no encoding is\n\t\t\t// preferred.\n\t\t\tcase 'identity': {\n\t\t\t\treturn request;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nexport namespace MediaParser {\n\t/** @deprecated Use {@linkcode LoaderContext} instead. */\n\texport type Context = LoaderContext;\n\texport type LoaderContext = Piece.LoaderContext<'mediaParsers'>;\n\texport type Options = Piece.Options;\n\texport type JSON = Piece.JSON;\n\texport type LocationJSON = Piece.LocationJSON;\n\n\texport type Request = ApiRequest;\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/lib/structures/MediaParser.ts"],"names":["Piece","createInflate","createGunzip","createBrotliDecompress"],"mappings":";;;;;;;AAWO,IAAe,YAAA,GAAf,MAAe,YAAA,SAA+EA,YAA+B,CAAA;AAAA,EAC5H,WAAY,CAAA,OAAA,EAAoC,OAAmB,GAAA,EAAe,EAAA;AACxF,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA,CAAA;AAAA,GACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaO,QAAQ,KAAuB,EAAA;AACrC,IAAA,OAAO,MAAM,wBAA6B,KAAA,IAAA,IAAQ,MAAM,wBAAyB,CAAA,QAAA,CAAS,KAAK,IAAgB,CAAA,CAAA;AAAA,GAChH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAgB,WAAW,OAA+C,EAAA;AACzE,IAAM,MAAA,MAAA,GAAS,IAAK,CAAA,aAAA,CAAc,OAAO,CAAA,CAAA;AACzC,IAAI,IAAA,MAAA,KAAW,MAAa,OAAA,EAAA,CAAA;AAE5B,IAAA,IAAI,IAAO,GAAA,EAAA,CAAA;AACX,IAAiB,WAAA,MAAA,KAAA,IAAS,QAAgB,IAAA,IAAA,KAAA,CAAA;AAE1C,IAAO,OAAA,IAAA,CAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAgB,WAAW,OAA+C,EAAA;AACzE,IAAM,MAAA,MAAA,GAAS,IA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["import { Piece } from '@sapphire/pieces';\nimport type { Awaitable } from '@sapphire/utilities';\nimport { createBrotliDecompress, createGunzip, createInflate, type Gunzip } from 'zlib';\nimport type { MimeType } from '../utils/MimeType';\nimport type { ApiRequest } from './api/ApiRequest';\nimport type { Route } from './Route';\n\n/**\n * A media parser\n * @since 1.3.0\n */\nexport abstract class MediaParser<Options extends MediaParser.Options = MediaParser.Options> extends Piece<Options, 'mediaParsers'> {\n\tpublic constructor(context: MediaParser.LoaderContext, options: Options = {} as Options) {\n\t\tsuper(context, options);\n\t}\n\n\t/**\n\t * Parses the body data from an API request.\n\t * @since 1.3.0\n\t */\n\tpublic abstract run(request: MediaParser.Request): Awaitable<unknown>;\n\n\t/**\n\t * Checks if a route accepts the media type from this parser.\n\t * @since 1.3.0\n\t * @param route The route to be checked.\n\t */\n\tpublic accepts(route: Route): boolean {\n\t\treturn route.acceptedContentMimeTypes === null || route.acceptedContentMimeTypes.includes(this.name as MimeType);\n\t}\n\n\t/**\n\t * Reads the content body as a string, this is useful for parsing/reading plain-text data.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected async readString(request: MediaParser.Request): Promise<string> {\n\t\tconst stream = this.contentStream(request);\n\t\tif (stream === null) return '';\n\n\t\tlet body = '';\n\t\tfor await (const chunk of stream) body += chunk;\n\n\t\treturn body;\n\t}\n\n\t/**\n\t * Reads the content body as a buffer, this is useful for parsing/reading binary data.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected async readBuffer(request: MediaParser.Request): Promise<Buffer> {\n\t\tconst stream = this.contentStream(request);\n\t\tif (stream === null) return Buffer.alloc(0);\n\n\t\tconst bodies: Buffer[] = [];\n\t\tfor await (const chunk of stream) bodies.push(chunk);\n\n\t\treturn Buffer.concat(bodies);\n\t}\n\n\t/**\n\t * Reads the content stream from a request, piping the data through a transformer stream.\n\t * @since 1.3.0\n\t * @param request The request to read the body from.\n\t */\n\tprotected contentStream(request: MediaParser.Request): MediaParser.Request | Gunzip | null {\n\t\tswitch ((request.headers['content-encoding'] ?? 'identity').toLowerCase()) {\n\t\t\t// RFC 7230 4.2.2:\n\t\t\t//\n\t\t\t// The \"deflate\" coding is a \"zlib\" data format (RFC 1950) containing a \"deflate\" compressed data stream\n\t\t\t// (RFC 1951) that uses a combination of the Lempel-Ziv (LZ77) compression algorithm and Huffman coding.\n\t\t\tcase 'deflate': {\n\t\t\t\tconst stream = createInflate();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// RFC 7230 4.2.3\n\t\t\t//\n\t\t\t// The \"gzip\" coding is an LZ77 coding with a 32-bit Cyclic Redundancy Check (CRC) that is commonly produced\n\t\t\t// by the gzip file compression program (RFC 1952).\n\t\t\tcase 'x-gzip':\n\t\t\tcase 'gzip': {\n\t\t\t\tconst stream = createGunzip();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// RFC 7932\n\t\t\t//\n\t\t\t// A format using the Brotli algorithm.\n\t\t\tcase 'br': {\n\t\t\t\tconst stream = createBrotliDecompress();\n\t\t\t\trequest.pipe(stream);\n\t\t\t\treturn stream;\n\t\t\t}\n\n\t\t\t// An \"identity\" token is used as a synonym for \"no encoding\" in order to communicate when no encoding is\n\t\t\t// preferred.\n\t\t\tcase 'identity': {\n\t\t\t\treturn request;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nexport namespace MediaParser {\n\t/** @deprecated Use {@linkcode LoaderContext} instead. */\n\texport type Context = LoaderContext;\n\texport type LoaderContext = Piece.LoaderContext<'mediaParsers'>;\n\texport type Options = Piece.Options;\n\texport type JSON = Piece.JSON;\n\texport type LocationJSON = Piece.LocationJSON;\n\n\texport type Request = ApiRequest;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/structures/Route.ts"],"names":["Piece","RouterRoot","isNullish"],"mappings":";;;;;;;;;;AA6CO,IAAe,MAAA,G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M,CAAG,EAAA,IAAA,CAAK,SAAS,CAAA,CAAE,MAAS,GAAA,OAAA,CAAQ,SAAS,CAAC,CAAA,CAAA;AACtF,MAAA,OAAA,CAAQ,IAAI,OAAqB,CAAA,CAAA;AAAA,KAClC;AAEA,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA,CAAA;AACZ,IAAA,IAAA,CAAK,OAAU,GAAA,OAAA,CAAA;AACf,IAAA,IAAA,CAAK,oBAAoB,OAAQ,CAAA,iBAAA,IAAqB,GAAI,CAAA,iBAAA,IAAqB,OAAO,IAAO,GAAA,EAAA,CAAA;AAC7F,IAAA,IAAA,CAAK,wBAA2B,GAAA,OAAA,CAAQ,wBAA4B,IAAA,GAAA,CAAI,wBAA4B,IAAA,IAAA,CAAA;AAAA,GACrG;AAGD,CAAA,CAAA;AA7C4G,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;AAArG,IAAe,KAAf,GAAA","file":"Route.cjs","sourcesContent":["import { Piece } from '@sapphire/pieces';\nimport { isNullish, type Awaitable } from '@sapphire/utilities';\nimport type { ApiRequest } from './api/ApiRequest';\nimport type { ApiResponse } from './api/ApiResponse';\nimport type { MethodName } from './http/HttpMethods';\nimport type { MimeTypeWithoutParameters } from './http/Server';\nimport { RouterRoot } from './router/RouterRoot';\n\n/**\n * @since 1.0.0\n *\n * @example A simple GET route that returns a JSON response:\n * ```typescript\n * // hello.get.ts\n * import { Route } from '@sapphire/plugin-api';\n *\n * export class MyRoute extends Route {\n * public run(request: Route.Request, response: Route.Response) {\n * return response.json({ message: 'Hello, World!' });\n * }\n * }\n * ```\n *\n * ```bash\n * $ curl http://localhost:4000/hello\n * {\"message\":\"Hello, World!\"}\n * ```\n *\n * @example A simple POST route that reads the body and returns it:\n * ```typescript\n * // echo.post.ts\n * import { Route } from '@sapphire/plugin-api';\n *\n * export class MyRoute extends Route {\n * public run(request: Route.Request, response: Route.Response) {\n * return response.json(request.params);\n * }\n * }\n * ```\n *\n * ```bash\n * $ curl -X POST -H \"Content-Type: application/json\" -d '{\"hello\":\"world\"}' http://localhost:4000/echo\n * {\"hello\":\"world\"}\n * ```\n */\nexport abstract class Route<Options extends Route.Options = Route.Options> extends Piece<Options, 'routes'> {\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t */\n\tpublic readonly maximumBodyLength: number;\n\n\t/**\n\t * The accepted content types.\n\t */\n\tpublic readonly acceptedContentMimeTypes: readonly MimeTypeWithoutParameters[] | null;\n\n\t/**\n\t * The path this route represents.\n\t */\n\tpublic readonly path: readonly string[];\n\n\t/**\n\t * The methods this route accepts.\n\t */\n\tpublic readonly methods: ReadonlySet<MethodName>;\n\n\tpublic constructor(context: Route.LoaderContext, options: Options = {} as Options) {\n\t\tsuper(context, options);\n\n\t\tconst api = this.container.server.options;\n\t\tconst path = ([] as string[]).concat(\n\t\t\tRouterRoot.normalize(api.prefix),\n\t\t\tRouterRoot.normalize(options.route ?? (this.location.virtual ? this.name : this.location.directories.concat(this.name).join('/')))\n\t\t);\n\n\t\tconst methods = new Set(options.methods);\n\t\tconst implied = RouterRoot.extractMethod(path);\n\t\tif (!isNullish(implied)) {\n\t\t\tconst lastIndex = path.length - 1;\n\t\t\tpath[lastIndex] = path[lastIndex].slice(0, path[lastIndex].length - implied.length - 1);\n\t\t\tmethods.add(implied as MethodName);\n\t\t}\n\n\t\tthis.path = path;\n\t\tthis.methods = methods;\n\t\tthis.maximumBodyLength = options.maximumBodyLength ?? api.maximumBodyLength ?? 1024 * 1024 * 50;\n\t\tthis.acceptedContentMimeTypes = options.acceptedContentMimeTypes ?? api.acceptedContentMimeTypes ?? null;\n\t}\n\n\tpublic abstract run(request: Route.Request, response: Route.Response): Awaitable<unknown>;\n}\n\nexport interface RouteOptions extends Piece.Options {\n\t/**\n\t * The route the piece should represent.\n\t * @since 1.0.0\n\t *\n\t * @defaultValue The filesystem-based path, or the name if the location is virtual.\n\t *\n\t * @example\n\t * ```typescript\n\t * '/users'\n\t * // request.params -> {}\n\t * ```\n\t * @example\n\t * ```typescript\n\t * '/guilds/[guild]/members/[member]'\n\t * // request.params -> { guild: '...', member: '...' }\n\t * ```\n\t */\n\troute?: string;\n\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t * @since 1.0.0\n\t *\n\t * @defaultValue this.context.server.options.maximumBodyLength ?? 1024 * 1024 * 50\n\t */\n\tmaximumBodyLength?: number;\n\n\t/**\n\t * The accepted content types for this route. If set to null, the route will accept any data.\n\t * @since 1.3.0\n\t *\n\t * @defaultValue this.context.server.options.acceptedContentMimeTypes ?? null\n\t */\n\tacceptedContentMimeTypes?: readonly MimeTypeWithoutParameters[] | null;\n\n\t/**\n\t * The methods this route accepts.\n\t * @since 7.0.0\n\t *\n\t * @defaultValue The method defined in the piece name, or none if not set.\n\t */\n\tmethods?: readonly MethodName[];\n}\n\nexport namespace Route {\n\t/** @deprecated Use {@linkcode LoaderContext} instead. */\n\texport type Context = LoaderContext;\n\texport type LoaderContext = Piece.LoaderContext<'routes'>;\n\texport type Options = RouteOptions;\n\texport type JSON = Piece.JSON;\n\texport type LocationJSON = Piece.LocationJSON;\n\n\texport type Request = ApiRequest;\n\texport type Response = ApiResponse;\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/lib/structures/Route.ts"],"names":["Piece","RouterRoot","isNullish"],"mappings":";;;;;;;;;;AA6CO,IAAe,MAAA,GAAf,MAAe,MAAA,SAA6DA,YAAyB,CAAA;AAAA,EAqBpG,WAAY,CAAA,OAAA,EAA8B,OAAmB,GAAA,EAAe,EAAA;AAClF,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA,CAAA;AAlBvB;AAAA;AAAA;AAAA,IAAgB,aAAA,CAAA,IAAA,EAAA,mBAAA,CAAA,CAAA;AAKhB;AAAA;AAAA;AAAA,IAAgB,aAAA,CAAA,IAAA,EAAA,0BAAA,CAAA,CAAA;AAKhB;AAAA;AAAA;AAAA,IAAgB,aAAA,CAAA,IAAA,EAAA,MAAA,CAAA,CA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IAAA,IAAA,CAAK,wBAA2B,GAAA,OAAA,CAAQ,wBAA4B,IAAA,GAAA,CAAI,wBAA4B,IAAA,IAAA,CAAA;AAAA,GACrG;AAGD,CAAA,CAAA;AA7C4G,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;AAArG,IAAe,KAAf,GAAA","file":"Route.cjs","sourcesContent":["import { Piece } from '@sapphire/pieces';\nimport { isNullish, type Awaitable } from '@sapphire/utilities';\nimport type { MimeType } from '../utils/MimeType';\nimport type { ApiRequest } from './api/ApiRequest';\nimport type { ApiResponse } from './api/ApiResponse';\nimport type { MethodName } from './http/HttpMethods';\nimport { RouterRoot } from './router/RouterRoot';\n\n/**\n * @since 1.0.0\n *\n * @example A simple GET route that returns a JSON response:\n * ```typescript\n * // hello.get.ts\n * import { Route } from '@sapphire/plugin-api';\n *\n * export class MyRoute extends Route {\n * public run(request: Route.Request, response: Route.Response) {\n * return response.json({ message: 'Hello, World!' });\n * }\n * }\n * ```\n *\n * ```bash\n * $ curl http://localhost:4000/hello\n * {\"message\":\"Hello, World!\"}\n * ```\n *\n * @example A simple POST route that reads the body and returns it:\n * ```typescript\n * // echo.post.ts\n * import { Route } from '@sapphire/plugin-api';\n *\n * export class MyRoute extends Route {\n * public run(request: Route.Request, response: Route.Response) {\n * return response.json(request.params);\n * }\n * }\n * ```\n *\n * ```bash\n * $ curl -X POST -H \"Content-Type: application/json\" -d '{\"hello\":\"world\"}' http://localhost:4000/echo\n * {\"hello\":\"world\"}\n * ```\n */\nexport abstract class Route<Options extends Route.Options = Route.Options> extends Piece<Options, 'routes'> {\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t */\n\tpublic readonly maximumBodyLength: number;\n\n\t/**\n\t * The accepted content types.\n\t */\n\tpublic readonly acceptedContentMimeTypes: readonly MimeType[] | null;\n\n\t/**\n\t * The path this route represents.\n\t */\n\tpublic readonly path: readonly string[];\n\n\t/**\n\t * The methods this route accepts.\n\t */\n\tpublic readonly methods: ReadonlySet<MethodName>;\n\n\tpublic constructor(context: Route.LoaderContext, options: Options = {} as Options) {\n\t\tsuper(context, options);\n\n\t\tconst api = this.container.server.options;\n\t\tconst path = ([] as string[]).concat(\n\t\t\tRouterRoot.normalize(api.prefix),\n\t\t\tRouterRoot.normalize(options.route ?? (this.location.virtual ? this.name : this.location.directories.concat(this.name).join('/')))\n\t\t);\n\n\t\tconst methods = new Set(options.methods);\n\t\tconst implied = RouterRoot.extractMethod(path);\n\t\tif (!isNullish(implied)) {\n\t\t\tconst lastIndex = path.length - 1;\n\t\t\tpath[lastIndex] = path[lastIndex].slice(0, path[lastIndex].length - implied.length - 1);\n\t\t\tmethods.add(implied as MethodName);\n\t\t}\n\n\t\tthis.path = path;\n\t\tthis.methods = methods;\n\t\tthis.maximumBodyLength = options.maximumBodyLength ?? api.maximumBodyLength ?? 1024 * 1024 * 50;\n\t\tthis.acceptedContentMimeTypes = options.acceptedContentMimeTypes ?? api.acceptedContentMimeTypes ?? null;\n\t}\n\n\tpublic abstract run(request: Route.Request, response: Route.Response): Awaitable<unknown>;\n}\n\nexport interface RouteOptions extends Piece.Options {\n\t/**\n\t * The route the piece should represent.\n\t * @since 1.0.0\n\t *\n\t * @defaultValue The filesystem-based path, or the name if the location is virtual.\n\t *\n\t * @example\n\t * ```typescript\n\t * '/users'\n\t * // request.params -> {}\n\t * ```\n\t * @example\n\t * ```typescript\n\t * '/guilds/[guild]/members/[member]'\n\t * // request.params -> { guild: '...', member: '...' }\n\t * ```\n\t */\n\troute?: string;\n\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t * @since 1.0.0\n\t *\n\t * @defaultValue this.context.server.options.maximumBodyLength ?? 1024 * 1024 * 50\n\t */\n\tmaximumBodyLength?: number;\n\n\t/**\n\t * The accepted content types for this route. If set to null, the route will accept any data.\n\t * @since 1.3.0\n\t *\n\t * @defaultValue this.context.server.options.acceptedContentMimeTypes ?? null\n\t */\n\tacceptedContentMimeTypes?: readonly MimeType[] | null;\n\n\t/**\n\t * The methods this route accepts.\n\t * @since 7.0.0\n\t *\n\t * @defaultValue The method defined in the piece name, or none if not set.\n\t */\n\tmethods?: readonly MethodName[];\n}\n\nexport namespace Route {\n\t/** @deprecated Use {@linkcode LoaderContext} instead. */\n\texport type Context = LoaderContext;\n\texport type LoaderContext = Piece.LoaderContext<'routes'>;\n\texport type Options = RouteOptions;\n\texport type JSON = Piece.JSON;\n\texport type LocationJSON = Piece.LocationJSON;\n\n\texport type Request = ApiRequest;\n\texport type Response = ApiResponse;\n}\n"]}
@@ -3,7 +3,6 @@
3
3
  var http = require('http');
4
4
  var stream = require('stream');
5
5
  require('stream/web');
6
- var MimeTypes_cjs = require('../../utils/MimeTypes.cjs');
7
6
  var HttpCodes_cjs = require('../http/HttpCodes.cjs');
8
7
 
9
8
  var __defProp = Object.defineProperty;
@@ -101,20 +100,20 @@ var _ApiResponse = class _ApiResponse extends http.ServerResponse {
101
100
  * @since 1.0.0
102
101
  */
103
102
  json(data) {
104
- this.setContentType(MimeTypes_cjs.MimeTypes.ApplicationJson).end(JSON.stringify(data));
103
+ this.setContentType("application/json").end(JSON.stringify(data));
105
104
  }
106
105
  /**
107
106
  * @since 1.0.0
108
107
  */
109
108
  text(data) {
110
- this.setContentType(MimeTypes_cjs.MimeTypes.TextPlain).end(data);
109
+ this.setContentType("text/plain").end(data);
111
110
  }
112
111
  /**
113
112
  * @since 6.1.0
114
113
  *
115
114
  * Sets the image content type and sends the image data in the response.
116
115
  *
117
- * @param type - The MIME type of the image (e.g., {@link MimeTypes.ImagePng}).
116
+ * @param type - The MIME type of the image (e.g., 'image/png').
118
117
  * @param data - The image data as a `string`, {@link Buffer}, {@link Uint8Array}, or {@link ReadableStream}.
119
118
  */
120
119
  image(type, data) {
@@ -129,7 +128,7 @@ var _ApiResponse = class _ApiResponse extends http.ServerResponse {
129
128
  * @since 5.1.0
130
129
  */
131
130
  html(code, data) {
132
- this.setContentType(MimeTypes_cjs.MimeTypes.TextHtml).status(code).end(data);
131
+ this.setContentType("text/html").status(code).end(data);
133
132
  }
134
133
  /**
135
134
  * @since 1.0.0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/lib/structures/api/ApiResponse.ts"],"names":["ServerResponse","STATUS_CODES","HttpCodes","MimeTypes","Readable"],"mappings":";;;;;;;;;;;;AAUO,IAAM,YAAA,GAAN,MAAM,YAAA,SAAuEA,mBAAwB,CAAA;AAAA,EAArG,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA,CAAA;AAIN;AAAA;AAAA;AAAA,IAAO,aAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAAA,GAAA;AAAA;AAAA;AAAA;AAAA,EAKA,EAAG,CAAA,IAAA,GAAgBC,iBAAa,CAAAC,uBAAA,CAAU,EAAE,CAAS,EAAA;AAC3D,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,EAAE,CAAA,CAAA;AACxB,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;AAAA,EAKO,OAAQ,CAAA,IAAA,GAAgBD,iBAAa,CAAAC,uBAAA,CAAU,OAAO,CAAS,EAAA;AACrE,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,OAAO,CAAA,CAAA;AAC7B,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;AAAA,EAKO,SAAU,CAAA,IAAA,GAAgBD,iBAAa,CAAAC,uBAAA,CAAU,SAAS,CAAS,EAAA;AACzE,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,SAAS,CAAA,CAAA;AAC/B,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;AAAA,EAKO,WAAW,IAAsB,EAAA;AACvC,IAAA,OAAO,IAAK,CAAA,KAAA,CAAMA,uBAAU,CAAA,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CAAA,CAAA;AAC1C,IAAO,OAAA,IAAA,CAAA;AAAA,GACR;AACD,CAAA,CAAA;AAlJ4G,MAAA,CAAA,YAAA,EAAA,aAAA,CAAA,CAAA;AAArG,IAAM,WAAN,GAAA","file":"ApiResponse.cjs","sourcesContent":["import { IncomingMessage, ServerResponse, STATUS_CODES } from 'node:http';\nimport { Readable } from 'node:stream';\nimport { ReadableStream } from 'node:stream/web';\nimport { MimeTypes } from '../../utils/MimeTypes';\nimport { HttpCodes } from '../http/HttpCodes';\nimport type { CookieStore } from './CookieStore';\n\n/**\n * @since 1.0.0\n */\nexport class ApiResponse<Request extends IncomingMessage = IncomingMessage> extends ServerResponse<Request> {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic cookies!: CookieStore;\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic ok(data: unknown = STATUS_CODES[HttpCodes.OK]): void {\n\t\tthis.status(HttpCodes.OK);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic created(data: unknown = STATUS_CODES[HttpCodes.Created]): void {\n\t\tthis.status(HttpCodes.Created);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic noContent(data: unknown = STATUS_CODES[HttpCodes.NoContent]): void {\n\t\tthis.status(HttpCodes.NoContent);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic badRequest(data?: unknown): void {\n\t\treturn this.error(HttpCodes.BadRequest, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic unauthorized(data?: unknown): void {\n\t\treturn this.error(HttpCodes.Unauthorized, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic forbidden(data?: unknown): void {\n\t\treturn this.error(HttpCodes.Forbidden, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic notFound(data?: unknown): void {\n\t\treturn this.error(HttpCodes.NotFound, data);\n\t}\n\n\t/**\n\t * @since 7.0.0\n\t */\n\tpublic methodNotAllowed(data?: unknown): void {\n\t\treturn this.error(HttpCodes.MethodNotAllowed, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic conflict(data?: unknown) {\n\t\treturn this.error(HttpCodes.Conflict, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic error(error: number | string, data?: unknown): void {\n\t\tif (typeof error === 'string') {\n\t\t\treturn this.status(HttpCodes.InternalServerError).json({ error });\n\t\t}\n\n\t\treturn this.status(error).json({ error: data ?? STATUS_CODES[error] });\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic respond(data: unknown): void {\n\t\treturn typeof data === 'string' ? this.text(data) : this.json(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic status(code: number): this {\n\t\tthis.statusCode = code;\n\t\treturn this;\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic json(data: any): void {\n\t\tthis.setContentType(MimeTypes.ApplicationJson).end(JSON.stringify(data));\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic text(data: string): void {\n\t\tthis.setContentType(MimeTypes.TextPlain).end(data);\n\t}\n\n\t/**\n\t * @since 6.1.0\n\t *\n\t * Sets the image content type and sends the image data in the response.\n\t *\n\t * @param type - The MIME type of the image (e.g., {@link MimeTypes.ImagePng}).\n\t * @param data - The image data as a `string`, {@link Buffer}, {@link Uint8Array}, or {@link ReadableStream}.\n\t */\n\tpublic image(\n\t\ttype: MimeTypes.ImageGif | MimeTypes.ImageJpg | MimeTypes.ImagePng | MimeTypes.ImageWebp | MimeTypes.ImageXIcon,\n\t\tdata: string | Buffer | Uint8Array | Readable\n\t): void {\n\t\tif (data instanceof Readable) {\n\t\t\tthis.setContentType(type);\n\t\t\tdata.pipe(this);\n\t\t} else {\n\t\t\tthis.setContentType(type).end(data);\n\t\t}\n\t}\n\n\t/**\n\t * @since 5.1.0\n\t */\n\tpublic html(code: number, data: string): void {\n\t\tthis.setContentType(MimeTypes.TextHtml).status(code).end(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic setContentType(contentType: MimeTypes): this {\n\t\tthis.setHeader('Content-Type', contentType);\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../../../src/lib/structures/api/ApiResponse.ts"],"names":["ServerResponse","STATUS_CODES","HttpCodes","Readable"],"mappings":";;;;;;;;;;;AAUO,IAAM,YAAA,GAAN,MAAM,YAAA,SAAuEA,mBAAwB,CAAA;AAAA,EAArG,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA,CAAA;AAIN;AAAA;AAAA;AAAA,IAAO,aAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAAA,GAAA;AAAA;AAAA;AAAA;AAAA,EAKA,EAAG,CAAA,IAAA,GAAgBC,iBAAa,CAAAC,uBAAA,CAAU,EAAE,CAAS,EAAA;AAC3D,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,EAAE,CAAA,CAAA;AACxB,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;AAAA,EAKO,OAAQ,CAAA,IAAA,GAAgBD,iBAAa,CAAAC,uBAAA,CAAU,OAAO,CAAS,EAAA;AACrE,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,OAAO,CAAA,CAAA;AAC7B,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;AAAA,EAKO,SAAU,CAAA,IAAA,GAAgBD,iBAAa,CAAAC,uBAAA,CAAU,SAAS,CAAS,EAAA;AACzE,IAAK,IAAA,CAAA,MAAA,CAAOA,wBAAU,SAAS,CAAA,CAAA;AAC/B,IAAO,OAAA,IAAA,CAAK,QAAQ,IAAI,CAAA,CAAA;AAAA,GACzB;AAAA;AAAA;AAAA;A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B,EAAA;AAClD,IAAK,IAAA,CAAA,SAAA,CAAU,gBAAgB,WAAW,CAAA,CAAA;AAC1C,IAAO,OAAA,IAAA,CAAA;AAAA,GACR;AACD,CAAA,CAAA;AA/I4G,MAAA,CAAA,YAAA,EAAA,aAAA,CAAA,CAAA;AAArG,IAAM,WAAN,GAAA","file":"ApiResponse.cjs","sourcesContent":["import { IncomingMessage, ServerResponse, STATUS_CODES } from 'node:http';\nimport { Readable } from 'node:stream';\nimport { ReadableStream } from 'node:stream/web';\nimport type { MimeType } from '../../utils/MimeType';\nimport { HttpCodes } from '../http/HttpCodes';\nimport type { CookieStore } from './CookieStore';\n\n/**\n * @since 1.0.0\n */\nexport class ApiResponse<Request extends IncomingMessage = IncomingMessage> extends ServerResponse<Request> {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic cookies!: CookieStore;\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic ok(data: unknown = STATUS_CODES[HttpCodes.OK]): void {\n\t\tthis.status(HttpCodes.OK);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic created(data: unknown = STATUS_CODES[HttpCodes.Created]): void {\n\t\tthis.status(HttpCodes.Created);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic noContent(data: unknown = STATUS_CODES[HttpCodes.NoContent]): void {\n\t\tthis.status(HttpCodes.NoContent);\n\t\treturn this.respond(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic badRequest(data?: unknown): void {\n\t\treturn this.error(HttpCodes.BadRequest, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic unauthorized(data?: unknown): void {\n\t\treturn this.error(HttpCodes.Unauthorized, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic forbidden(data?: unknown): void {\n\t\treturn this.error(HttpCodes.Forbidden, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic notFound(data?: unknown): void {\n\t\treturn this.error(HttpCodes.NotFound, data);\n\t}\n\n\t/**\n\t * @since 7.0.0\n\t */\n\tpublic methodNotAllowed(data?: unknown): void {\n\t\treturn this.error(HttpCodes.MethodNotAllowed, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic conflict(data?: unknown) {\n\t\treturn this.error(HttpCodes.Conflict, data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic error(error: number | string, data?: unknown): void {\n\t\tif (typeof error === 'string') {\n\t\t\treturn this.status(HttpCodes.InternalServerError).json({ error });\n\t\t}\n\n\t\treturn this.status(error).json({ error: data ?? STATUS_CODES[error] });\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic respond(data: unknown): void {\n\t\treturn typeof data === 'string' ? this.text(data) : this.json(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic status(code: number): this {\n\t\tthis.statusCode = code;\n\t\treturn this;\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic json(data: any): void {\n\t\tthis.setContentType('application/json').end(JSON.stringify(data));\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic text(data: string): void {\n\t\tthis.setContentType('text/plain').end(data);\n\t}\n\n\t/**\n\t * @since 6.1.0\n\t *\n\t * Sets the image content type and sends the image data in the response.\n\t *\n\t * @param type - The MIME type of the image (e.g., 'image/png').\n\t * @param data - The image data as a `string`, {@link Buffer}, {@link Uint8Array}, or {@link ReadableStream}.\n\t */\n\tpublic image(type: Extract<MimeType, `image/${string}`>, data: string | Buffer | Uint8Array | Readable): void {\n\t\tif (data instanceof Readable) {\n\t\t\tthis.setContentType(type);\n\t\t\tdata.pipe(this);\n\t\t} else {\n\t\t\tthis.setContentType(type).end(data);\n\t\t}\n\t}\n\n\t/**\n\t * @since 5.1.0\n\t */\n\tpublic html(code: number, data: string): void {\n\t\tthis.setContentType('text/html').status(code).end(data);\n\t}\n\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic setContentType(contentType: MimeType): this {\n\t\tthis.setHeader('Content-Type', contentType);\n\t\treturn this;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/lib/structures/http/Server.ts"],"names":["ServerEvent","AsyncEventEmitter","container","httpCreateServer","ApiRequest","ApiResponse","RouteStore","MiddlewareStore","MediaParserStore","Auth","error"],"mappings":";;;;;;;;;;;;;;;;AAaY,IAAA,WAAA,qBAAAA,YAAL,KAAA;AACN,EAAAA,aAAA,OAAQ,CAAA,GAAA,OAAA,CAAA;AACR,EAAAA,aAAA,SAAU,CAAA,GAAA,SAAA,CAAA;AACV,EAAAA,aAAA,sBAAuB,CAAA,GAAA,sBAAA,CAAA;AACvB,EAAAA,aAAA,8BAA+B,CAAA,GAAA,8BAAA,CAAA;AAC/B,EAAAA,aAAA,aAAc,CAAA,GAAA,aAAA,CAAA;AACd,EAAAA,aAAA,YAAa,CAAA,GAAA,YAAA,CAAA;AACb,EAAAA,aAAA,mBAAoB,CAAA,GAAA,mBAAA,CAAA;AACpB,EAAAA,aAAA,iBAAkB,CAAA,GAAA,iBAAA,CAAA;AAClB,EAAAA,aAAA,mBAAoB,CAAA,GAAA,mBAAA,CAAA;AATT,EAAAA,OAAAA,YAAAA,CAAAA;AAAA,CAAA,EAAA,WAAA,IAAA,EAAA,EAAA;AA2BL,IAAM,OAAA,GAAN,MAAM,OAAA,SAAeC,qCAAgC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyCpD,YAAY,EAAE,IAAA,EAAM,GAAG,OAAQ,EAAA,GAAmB,EAAI,EAAA;AAC5D,IAAM,KAAA,EAAA,CAAA;AArCP;AAAA;AAAA;AAAA;AAAA,IAAgB,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,CAAA;AAMhB;AAAA;AAAA;AAAA;AAAA,IAAgB,aAAA,CAAA,IAAA,EAAA,aAAA,CAAA,CAAA;AAMhB;AAAA;AAAA;AAA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A,CAAc,CAAC,OAAA,EAAS,MAAW,KAAA;AAC7C,MAAK,IAAA,CAAA,MAAA,CAAO,MAAM,CAAC,KAAA,KAAW,QAAQ,OAAQ,EAAA,GAAI,MAAO,CAAA,KAAK,CAAE,CAAA,CAAA;AAAA,KAChE,CAAA,CAAA;AAAA,GACF;AACD,CAAA,CAAA;AApG4D,MAAA,CAAA,OAAA,EAAA,QAAA,CAAA,CAAA;AAArD,IAAM,MAAN,GAAA","file":"Server.cjs","sourcesContent":["import { container } from '@sapphire/pieces';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { Server as HttpServer, createServer as httpCreateServer, type ServerOptions as HttpOptions } from 'node:http';\nimport type { ListenOptions } from 'node:net';\nimport { MediaParserStore } from '../MediaParserStore';\nimport { MiddlewareStore } from '../MiddlewareStore';\nimport type { Route } from '../Route';\nimport { RouteStore } from '../RouteStore';\nimport { ApiRequest } from '../api/ApiRequest';\nimport { ApiResponse } from '../api/ApiResponse';\nimport type { RouterBranch } from '../router/RouterBranch';\nimport { Auth, type ServerOptionsAuth } from './Auth';\n\nexport enum ServerEvent {\n\tError = 'error',\n\tRequest = 'request',\n\tRouterBranchNotFound = 'routerBranchNotFound',\n\tRouterBranchMethodNotAllowed = 'routerBranchMethodNotAllowed',\n\tRouterFound = 'routerFound',\n\tRouteError = 'routeError',\n\tMiddlewareFailure = 'middlewareFailure',\n\tMiddlewareError = 'middlewareError',\n\tMiddlewareSuccess = 'middlewareSuccess'\n}\n\nexport interface ServerEvents {\n\t[ServerEvent.Error]: [error: Error, request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.Request]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouterBranchNotFound]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouterBranchMethodNotAllowed]: [request: ApiRequest, response: ApiResponse, node: RouterBranch];\n\t[ServerEvent.RouterFound]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouteError]: [error: Error, request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.MiddlewareFailure]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.MiddlewareSuccess]: [request: Route.Request, response: Route.Response, route: Route];\n\t[ServerEvent.MiddlewareError]: [error: Error, request: ApiRequest, response: ApiResponse];\n}\n\n/**\n * @since 1.0.0\n */\nexport class Server extends AsyncEventEmitter<ServerEvents> {\n\t/**\n\t * The routes this server holds.\n\t * @since 1.0.0\n\t */\n\tpublic readonly routes: RouteStore;\n\n\t/**\n\t * The middlewares this server holds.\n\t * @since 1.0.0\n\t */\n\tpublic readonly middlewares: MiddlewareStore;\n\n\t/**\n\t * The media parsers this server holds.\n\t * @since 1.3.0\n\t */\n\tpublic readonly mediaParsers: MediaParserStore;\n\n\t/**\n\t * The authentication system.\n\t * @since 1.0.0\n\t */\n\tpublic readonly auth: Auth | null;\n\n\t/**\n\t * The http.Server instance that manages the recieved HTTP requests.\n\t * @since 1.0.0\n\t */\n\tpublic readonly server: HttpServer;\n\n\t/**\n\t * The options for this server.\n\t * @since 1.0.0\n\t */\n\tpublic readonly options: AuthLessServerOptions;\n\n\t/**\n\t * @since 1.0.0\n\t * @param options The options for this server\n\t */\n\tpublic constructor({ auth, ...options }: ServerOptions = {}) {\n\t\tsuper();\n\n\t\tcontainer.server = this;\n\n\t\tthis.options = options;\n\t\tthis.server = httpCreateServer({\n\t\t\tIncomingMessage: ApiRequest,\n\t\t\tServerResponse: ApiResponse,\n\t\t\t...(options.server ?? {})\n\t\t});\n\t\tthis.routes = new RouteStore();\n\t\tthis.middlewares = new MiddlewareStore();\n\t\tthis.mediaParsers = new MediaParserStore();\n\t\tthis.auth = Auth.create(auth);\n\t\tthis.server.on('error', this.emit.bind(this, ServerEvent.Error));\n\t\tthis.server.on('request', this.emit.bind(this, ServerEvent.Request));\n\t}\n\n\tpublic connect() {\n\t\tconst { server } = this;\n\t\tserver.listen({\n\t\t\tport: 4000,\n\t\t\t...(this.options.listenOptions ?? {})\n\t\t});\n\n\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\tfunction listening() {\n\t\t\t\tcleanup();\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tfunction error(error: Error) {\n\t\t\t\tcleanup();\n\t\t\t\treject(error);\n\t\t\t}\n\n\t\t\tfunction close() {\n\t\t\t\tcleanup();\n\t\t\t\treject(new Error('Closed unexpectedly.'));\n\t\t\t}\n\n\t\t\tfunction cleanup() {\n\t\t\t\tserver.off('listening', listening);\n\t\t\t\tserver.off('error', error);\n\t\t\t\tserver.off('close', close);\n\t\t\t}\n\n\t\t\tserver.on('listening', listening);\n\t\t\tserver.on('error', error);\n\t\t\tserver.on('close', close);\n\t\t});\n\t}\n\n\tpublic disconnect() {\n\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\tthis.server.close((error) => (error ? resolve() : reject(error)));\n\t\t});\n\t}\n}\n\n/**\n * RFC 1341 4: Defines a Content-Type's type, which follows the following structure:\n *\n * - `type` = `text` | `multipart` | `message` | `image` | `audio` | `video` | `application` | x-token\n * - `x-token` = The two characters \"X-\" followed, with no intervening white space, by any token\n * @since 1.3.0\n */\nexport type ContentTypeType = 'text' | 'multipart' | 'message' | 'image' | 'audio' | 'video' | 'application' | `X-${string}`;\n\n/**\n * RFC 1341 4: Defines a Content-Type's parameter, which follows the following structure:\n *\n * - `parameter` = `attribute` \"=\" `value`\n * - `attribute` = `token`\n * - `value` = `token` / `quoted-string`\n * - `token` = `1*<any CHAR except \"SPACE\", \"CTLs\", or \"tspecials\">`\n * - `tspecials` = `(` | `)` | `<` | `>` | `@` | `,` | `;` | `:` | `\\` | `\"` | `/` | `[` | `]` | `?` | `.` | `=`\n *\n * @note `tspecials` must be in quoted-string, to use within parameter values.\n * @note The definition of `tspecials` is the same as the RFC 822 definition of `specials` with the addition of the\n * three characters `/`, `?`, and `=`.\n * @since 1.3.0\n */\nexport type ContentTypeParameter = `; ${string}=${string}`;\n\n/**\n * RFC 1341 4: Defines the syntax for a Content-Type field without parameters, which follows the following structure:\n * `type \"/\" subtype`.\n */\nexport type MimeTypeWithoutParameters = `${ContentTypeType}/${string}`;\n\n/**\n * RFC 1341 4: Defines the syntax for a Content-Type field, which follows the following structure:\n * `type \"/\" subtype *[\";\" parameter]`.\n * @since 1.3.0\n */\nexport type MimeType = `${MimeTypeWithoutParameters}${'' | ContentTypeParameter}`;\n\n/**\n * The API options.\n * @since 1.0.0\n */\nexport interface ServerOptions {\n\t/**\n\t * The prefix for all routes, e.g. `v1/`.\n\t * @since 1.0.0\n\t * @default ''\n\t */\n\tprefix?: string;\n\n\t/**\n\t * The origin header to be set on every request at 'Access-Control-Allow-Origin'.\n\t * @since 1.0.0\n\t * @default '*'\n\t */\n\torigin?: string;\n\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t * @since 1.0.0\n\t * @default 1024 * 1024 * 50\n\t */\n\tmaximumBodyLength?: number;\n\n\t/**\n\t * The accepted content types for this route. If set to null, the route will accept any data.\n\t * @since 1.3.0\n\t * @default null\n\t */\n\tacceptedContentMimeTypes?: MimeTypeWithoutParameters[] | null;\n\n\t/**\n\t * The HTTP server options.\n\t * @since 1.0.0\n\t * @default {}\n\t */\n\tserver?: HttpOptions;\n\n\t/**\n\t * The HTTP listen options.\n\t * @since 1.0.0\n\t * @default { port: 4000 }\n\t */\n\tlistenOptions?: ListenOptions;\n\n\t/**\n\t * The auth options. If neither `auth` nor `auth.secret` are defined, auth-related routes and middlewares will be\n\t * automatically disabled.\n\t * @since 1.0.0\n\t * @default {}\n\t */\n\tauth?: ServerOptionsAuth;\n\n\t/**\n\t * Whether the server should connect upon being when the plugin is loaded.\n\t * @since 3.2.0\n\t * @default true\n\t */\n\tautomaticallyConnect?: boolean;\n}\n\n/**\n * The {@link ServerOptions} without {@link ServerOptions.auth}.\n * @since 1.0.0\n */\nexport type AuthLessServerOptions = Omit<ServerOptions, 'auth'>;\n"]}
1
+ {"version":3,"sources":["../../../../../src/lib/structures/http/Server.ts"],"names":["ServerEvent","Asy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;AAAA,GACF;AACD,CAAA,CAAA;AApG4D,MAAA,CAAA,OAAA,EAAA,QAAA,CAAA,CAAA;AAArD,IAAM,MAAN,GAAA","file":"Server.cjs","sourcesContent":["import { container } from '@sapphire/pieces';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { Server as HttpServer, createServer as httpCreateServer, type ServerOptions as HttpOptions } from 'node:http';\nimport type { ListenOptions } from 'node:net';\nimport type { MimeType } from '../../utils/MimeType';\nimport { MediaParserStore } from '../MediaParserStore';\nimport { MiddlewareStore } from '../MiddlewareStore';\nimport type { Route } from '../Route';\nimport { RouteStore } from '../RouteStore';\nimport { ApiRequest } from '../api/ApiRequest';\nimport { ApiResponse } from '../api/ApiResponse';\nimport type { RouterBranch } from '../router/RouterBranch';\nimport { Auth, type ServerOptionsAuth } from './Auth';\n\nexport enum ServerEvent {\n\tError = 'error',\n\tRequest = 'request',\n\tRouterBranchNotFound = 'routerBranchNotFound',\n\tRouterBranchMethodNotAllowed = 'routerBranchMethodNotAllowed',\n\tRouterFound = 'routerFound',\n\tRouteError = 'routeError',\n\tMiddlewareFailure = 'middlewareFailure',\n\tMiddlewareError = 'middlewareError',\n\tMiddlewareSuccess = 'middlewareSuccess'\n}\n\nexport interface ServerEvents {\n\t[ServerEvent.Error]: [error: Error, request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.Request]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouterBranchNotFound]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouterBranchMethodNotAllowed]: [request: ApiRequest, response: ApiResponse, node: RouterBranch];\n\t[ServerEvent.RouterFound]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.RouteError]: [error: Error, request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.MiddlewareFailure]: [request: ApiRequest, response: ApiResponse];\n\t[ServerEvent.MiddlewareSuccess]: [request: Route.Request, response: Route.Response, route: Route];\n\t[ServerEvent.MiddlewareError]: [error: Error, request: ApiRequest, response: ApiResponse];\n}\n\n/**\n * @since 1.0.0\n */\nexport class Server extends AsyncEventEmitter<ServerEvents> {\n\t/**\n\t * The routes this server holds.\n\t * @since 1.0.0\n\t */\n\tpublic readonly routes: RouteStore;\n\n\t/**\n\t * The middlewares this server holds.\n\t * @since 1.0.0\n\t */\n\tpublic readonly middlewares: MiddlewareStore;\n\n\t/**\n\t * The media parsers this server holds.\n\t * @since 1.3.0\n\t */\n\tpublic readonly mediaParsers: MediaParserStore;\n\n\t/**\n\t * The authentication system.\n\t * @since 1.0.0\n\t */\n\tpublic readonly auth: Auth | null;\n\n\t/**\n\t * The http.Server instance that manages the recieved HTTP requests.\n\t * @since 1.0.0\n\t */\n\tpublic readonly server: HttpServer;\n\n\t/**\n\t * The options for this server.\n\t * @since 1.0.0\n\t */\n\tpublic readonly options: AuthLessServerOptions;\n\n\t/**\n\t * @since 1.0.0\n\t * @param options The options for this server\n\t */\n\tpublic constructor({ auth, ...options }: ServerOptions = {}) {\n\t\tsuper();\n\n\t\tcontainer.server = this;\n\n\t\tthis.options = options;\n\t\tthis.server = httpCreateServer({\n\t\t\tIncomingMessage: ApiRequest,\n\t\t\tServerResponse: ApiResponse,\n\t\t\t...(options.server ?? {})\n\t\t});\n\t\tthis.routes = new RouteStore();\n\t\tthis.middlewares = new MiddlewareStore();\n\t\tthis.mediaParsers = new MediaParserStore();\n\t\tthis.auth = Auth.create(auth);\n\t\tthis.server.on('error', this.emit.bind(this, ServerEvent.Error));\n\t\tthis.server.on('request', this.emit.bind(this, ServerEvent.Request));\n\t}\n\n\tpublic connect() {\n\t\tconst { server } = this;\n\t\tserver.listen({\n\t\t\tport: 4000,\n\t\t\t...(this.options.listenOptions ?? {})\n\t\t});\n\n\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\tfunction listening() {\n\t\t\t\tcleanup();\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tfunction error(error: Error) {\n\t\t\t\tcleanup();\n\t\t\t\treject(error);\n\t\t\t}\n\n\t\t\tfunction close() {\n\t\t\t\tcleanup();\n\t\t\t\treject(new Error('Closed unexpectedly.'));\n\t\t\t}\n\n\t\t\tfunction cleanup() {\n\t\t\t\tserver.off('listening', listening);\n\t\t\t\tserver.off('error', error);\n\t\t\t\tserver.off('close', close);\n\t\t\t}\n\n\t\t\tserver.on('listening', listening);\n\t\t\tserver.on('error', error);\n\t\t\tserver.on('close', close);\n\t\t});\n\t}\n\n\tpublic disconnect() {\n\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\tthis.server.close((error) => (error ? resolve() : reject(error)));\n\t\t});\n\t}\n}\n\n/**\n * RFC 1341 4: Defines a Content-Type's type, which follows the following structure:\n *\n * - `type` = `text` | `multipart` | `message` | `image` | `audio` | `video` | `application` | x-token\n * - `x-token` = The two characters \"X-\" followed, with no intervening white space, by any token\n * @since 1.3.0\n */\nexport type ContentTypeType = 'text' | 'multipart' | 'message' | 'image' | 'audio' | 'video' | 'application' | `X-${string}`;\n\n/**\n * RFC 1341 4: Defines a Content-Type's parameter, which follows the following structure:\n *\n * - `parameter` = `attribute` \"=\" `value`\n * - `attribute` = `token`\n * - `value` = `token` / `quoted-string`\n * - `token` = `1*<any CHAR except \"SPACE\", \"CTLs\", or \"tspecials\">`\n * - `tspecials` = `(` | `)` | `<` | `>` | `@` | `,` | `;` | `:` | `\\` | `\"` | `/` | `[` | `]` | `?` | `.` | `=`\n *\n * @note `tspecials` must be in quoted-string, to use within parameter values.\n * @note The definition of `tspecials` is the same as the RFC 822 definition of `specials` with the addition of the\n * three characters `/`, `?`, and `=`.\n * @since 1.3.0\n */\nexport type ContentTypeParameter = `; ${string}=${string}`;\n\n/**\n * RFC 1341 4: Defines the syntax for a Content-Type field without parameters, which follows the following structure:\n * `type \"/\" subtype`.\n * @since 7.0.0\n */\nexport type GenericMimeType = `${ContentTypeType}/${string}`;\n\n/**\n * RFC 1341 4: Defines the syntax for a Content-Type field, which follows the following structure:\n * `type \"/\" subtype *[\";\" parameter]`.\n * @since 7.0.0\n */\nexport type GenericParametrizedMimeType = `${GenericMimeType}${'' | ContentTypeParameter}`;\n\n/**\n * The API options.\n * @since 1.0.0\n */\nexport interface ServerOptions {\n\t/**\n\t * The prefix for all routes, e.g. `v1/`.\n\t * @since 1.0.0\n\t * @default ''\n\t */\n\tprefix?: string;\n\n\t/**\n\t * The origin header to be set on every request at 'Access-Control-Allow-Origin'.\n\t * @since 1.0.0\n\t * @default '*'\n\t */\n\torigin?: string;\n\n\t/**\n\t * (RFC 7230 3.3.2) The maximum decimal number of octets.\n\t * @since 1.0.0\n\t * @default 1024 * 1024 * 50\n\t */\n\tmaximumBodyLength?: number;\n\n\t/**\n\t * The accepted content types for this route. If set to null, the route will accept any data.\n\t * @since 1.3.0\n\t * @default null\n\t */\n\tacceptedContentMimeTypes?: MimeType[] | null;\n\n\t/**\n\t * The HTTP server options.\n\t * @since 1.0.0\n\t * @default {}\n\t */\n\tserver?: HttpOptions;\n\n\t/**\n\t * The HTTP listen options.\n\t * @since 1.0.0\n\t * @default { port: 4000 }\n\t */\n\tlistenOptions?: ListenOptions;\n\n\t/**\n\t * The auth options. If neither `auth` nor `auth.secret` are defined, auth-related routes and middlewares will be\n\t * automatically disabled.\n\t * @since 1.0.0\n\t * @default {}\n\t */\n\tauth?: ServerOptionsAuth;\n\n\t/**\n\t * Whether the server should connect upon being when the plugin is loaded.\n\t * @since 3.2.0\n\t * @default true\n\t */\n\tautomaticallyConnect?: boolean;\n}\n\n/**\n * The {@link ServerOptions} without {@link ServerOptions.auth}.\n * @since 1.0.0\n */\nexport type AuthLessServerOptions = Omit<ServerOptions, 'auth'>;\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=MimeType.cjs.map
4
+ //# sourceMappingURL=MimeType.cjs.map