@twin.org/web 0.0.2-next.9 → 0.0.3-next.1
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.
- package/dist/es/errors/fetchError.js +27 -0
- package/dist/es/errors/fetchError.js.map +1 -0
- package/dist/es/index.js +20 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IFetchOptions.js +2 -0
- package/dist/es/models/IFetchOptions.js.map +1 -0
- package/dist/es/models/IHttpHeaders.js +4 -0
- package/dist/es/models/IHttpHeaders.js.map +1 -0
- package/dist/es/models/IJwk.js +2 -0
- package/dist/es/models/IJwk.js.map +1 -0
- package/dist/es/models/IJwtHeader.js +2 -0
- package/dist/es/models/IJwtHeader.js.map +1 -0
- package/dist/es/models/IJwtPayload.js +2 -0
- package/dist/es/models/IJwtPayload.js.map +1 -0
- package/dist/es/models/headerTypes.js +41 -0
- package/dist/es/models/headerTypes.js.map +1 -0
- package/dist/es/models/httpMethod.js +18 -0
- package/dist/es/models/httpMethod.js.map +1 -0
- package/dist/es/models/httpStatusCode.js +257 -0
- package/dist/es/models/httpStatusCode.js.map +1 -0
- package/dist/es/models/jwkCryptoKey.js +4 -0
- package/dist/es/models/jwkCryptoKey.js.map +1 -0
- package/dist/es/models/mimeTypes.js +101 -0
- package/dist/es/models/mimeTypes.js.map +1 -0
- package/dist/es/utils/fetchHelper.js +271 -0
- package/dist/es/utils/fetchHelper.js.map +1 -0
- package/dist/es/utils/headerHelper.js +34 -0
- package/dist/es/utils/headerHelper.js.map +1 -0
- package/dist/es/utils/jwk.js +99 -0
- package/dist/es/utils/jwk.js.map +1 -0
- package/dist/es/utils/jws.js +58 -0
- package/dist/es/utils/jws.js.map +1 -0
- package/dist/es/utils/jwt.js +243 -0
- package/dist/es/utils/jwt.js.map +1 -0
- package/dist/es/utils/mimeTypeHelper.js +144 -0
- package/dist/es/utils/mimeTypeHelper.js.map +1 -0
- package/dist/types/errors/fetchError.d.ts +1 -1
- package/dist/types/index.d.ts +17 -16
- package/dist/types/models/IFetchOptions.d.ts +1 -1
- package/dist/types/models/IJwk.d.ts +1 -2
- package/dist/types/models/IJwtHeader.d.ts +1 -2
- package/dist/types/models/IJwtPayload.d.ts +1 -2
- package/dist/types/utils/fetchHelper.d.ts +6 -2
- package/dist/types/utils/headerHelper.d.ts +17 -0
- package/dist/types/utils/jwk.d.ts +10 -4
- package/dist/types/utils/jws.d.ts +5 -1
- package/dist/types/utils/jwt.d.ts +7 -3
- package/docs/changelog.md +292 -0
- package/docs/reference/classes/FetchHelper.md +10 -2
- package/docs/reference/classes/HeaderHelper.md +57 -0
- package/docs/reference/classes/Jwk.md +27 -7
- package/docs/reference/classes/Jws.md +8 -0
- package/docs/reference/classes/Jwt.md +30 -22
- package/docs/reference/classes/MimeTypeHelper.md +5 -5
- package/docs/reference/index.md +4 -3
- package/docs/reference/type-aliases/IJwk.md +5 -0
- package/docs/reference/type-aliases/IJwtHeader.md +5 -0
- package/docs/reference/type-aliases/IJwtPayload.md +5 -0
- package/locales/.validate-ignore +1 -0
- package/locales/en.json +3 -2
- package/package.json +25 -12
- package/dist/cjs/index.cjs +0 -1269
- package/dist/esm/index.mjs +0 -1258
- package/docs/reference/interfaces/IJwk.md +0 -7
- package/docs/reference/interfaces/IJwtHeader.md +0 -13
- package/docs/reference/interfaces/IJwtPayload.md +0 -13
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { BaseError } from "@twin.org/core";
|
|
4
|
+
/**
|
|
5
|
+
* Class to represent errors from fetch.
|
|
6
|
+
*/
|
|
7
|
+
export class FetchError extends BaseError {
|
|
8
|
+
/**
|
|
9
|
+
* Runtime name for the class.
|
|
10
|
+
*/
|
|
11
|
+
static CLASS_NAME = "FetchError";
|
|
12
|
+
/**
|
|
13
|
+
* Create a new instance of FetchError.
|
|
14
|
+
* @param source The source of the error.
|
|
15
|
+
* @param message The message as a code.
|
|
16
|
+
* @param httpStatus The http status code.
|
|
17
|
+
* @param properties Any additional information for the error.
|
|
18
|
+
* @param cause The cause of the error if we have wrapped another error.
|
|
19
|
+
*/
|
|
20
|
+
constructor(source, message, httpStatus, properties, cause) {
|
|
21
|
+
super(FetchError.CLASS_NAME, source, message, {
|
|
22
|
+
httpStatus,
|
|
23
|
+
...properties
|
|
24
|
+
}, cause);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=fetchError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchError.js","sourceRoot":"","sources":["../../../src/errors/fetchError.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,SAAS;IACxC;;OAEG;IACI,MAAM,CAAU,UAAU,gBAAgC;IAEjE;;;;;;;OAOG;IACH,YACC,MAAc,EACd,OAAe,EACf,UAA0B,EAC1B,UAEC,EACD,KAAe;QAEf,KAAK,CACJ,UAAU,CAAC,UAAU,EACrB,MAAM,EACN,OAAO,EACP;YACC,UAAU;YACV,GAAG,UAAU;SACb,EACD,KAAK,CACL,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseError } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { HttpStatusCode } from \"../models/httpStatusCode.js\";\n\n/**\n * Class to represent errors from fetch.\n */\nexport class FetchError extends BaseError {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<FetchError>();\n\n\t/**\n\t * Create a new instance of FetchError.\n\t * @param source The source of the error.\n\t * @param message The message as a code.\n\t * @param httpStatus The http status code.\n\t * @param properties Any additional information for the error.\n\t * @param cause The cause of the error if we have wrapped another error.\n\t */\n\tconstructor(\n\t\tsource: string,\n\t\tmessage: string,\n\t\thttpStatus: HttpStatusCode,\n\t\tproperties?: {\n\t\t\t[id: string]: unknown;\n\t\t},\n\t\tcause?: unknown\n\t) {\n\t\tsuper(\n\t\t\tFetchError.CLASS_NAME,\n\t\t\tsource,\n\t\t\tmessage,\n\t\t\t{\n\t\t\t\thttpStatus,\n\t\t\t\t...properties\n\t\t\t},\n\t\t\tcause\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./errors/fetchError.js";
|
|
4
|
+
export * from "./models/headerTypes.js";
|
|
5
|
+
export * from "./models/httpMethod.js";
|
|
6
|
+
export * from "./models/httpStatusCode.js";
|
|
7
|
+
export * from "./models/IFetchOptions.js";
|
|
8
|
+
export * from "./models/IHttpHeaders.js";
|
|
9
|
+
export * from "./models/IJwk.js";
|
|
10
|
+
export * from "./models/IJwtHeader.js";
|
|
11
|
+
export * from "./models/IJwtPayload.js";
|
|
12
|
+
export * from "./models/jwkCryptoKey.js";
|
|
13
|
+
export * from "./models/mimeTypes.js";
|
|
14
|
+
export * from "./utils/fetchHelper.js";
|
|
15
|
+
export * from "./utils/headerHelper.js";
|
|
16
|
+
export * from "./utils/jwk.js";
|
|
17
|
+
export * from "./utils/jws.js";
|
|
18
|
+
export * from "./utils/jwt.js";
|
|
19
|
+
export * from "./utils/mimeTypeHelper.js";
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./errors/fetchError.js\";\nexport * from \"./models/headerTypes.js\";\nexport * from \"./models/httpMethod.js\";\nexport * from \"./models/httpStatusCode.js\";\nexport * from \"./models/IFetchOptions.js\";\nexport * from \"./models/IHttpHeaders.js\";\nexport * from \"./models/IJwk.js\";\nexport * from \"./models/IJwtHeader.js\";\nexport * from \"./models/IJwtPayload.js\";\nexport * from \"./models/jwkCryptoKey.js\";\nexport * from \"./models/mimeTypes.js\";\nexport * from \"./utils/fetchHelper.js\";\nexport * from \"./utils/headerHelper.js\";\nexport * from \"./utils/jwk.js\";\nexport * from \"./utils/jws.js\";\nexport * from \"./utils/jwt.js\";\nexport * from \"./utils/mimeTypeHelper.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFetchOptions.js","sourceRoot":"","sources":["../../../src/models/IFetchOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHttpHeaders } from \"./IHttpHeaders.js\";\n\n/**\n * Options for call to the fetch helper.\n */\nexport interface IFetchOptions {\n\t/**\n\t * @param headers The headers for the request.\n\t */\n\theaders?: IHttpHeaders;\n\n\t/**\n\t * Timeout for requests in milliseconds.\n\t */\n\ttimeoutMs?: number;\n\n\t/**\n\t * Include credentials in the requests.\n\t */\n\tincludeCredentials?: boolean;\n\n\t/**\n\t * The number of times to retry fetching defaults to no retries.\n\t */\n\tretryCount?: number;\n\n\t/**\n\t * The number of milliseconds we should delay before any retry.\n\t */\n\tretryDelayMs?: number;\n\n\t/**\n\t * The number of milliseconds to cache the response for, leave undefined for no cache, 0 means infinite.\n\t */\n\tcacheTtlMs?: number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHttpHeaders.js","sourceRoot":"","sources":["../../../src/models/IHttpHeaders.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Model used for Http headers parameter.\n */\nexport interface IHttpHeaders {\n\t[key: string]: string | string[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJwk.js","sourceRoot":"","sources":["../../../src/models/IJwk.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JWK } from \"jose\";\n\n/**\n * The fields in a JSON Web Key.\n */\nexport type IJwk = JWK;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJwtHeader.js","sourceRoot":"","sources":["../../../src/models/IJwtHeader.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JWTHeaderParameters } from \"jose\";\n\n/**\n * The fields in a JSON Web Token header.\n */\nexport type IJwtHeader = JWTHeaderParameters;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJwtPayload.js","sourceRoot":"","sources":["../../../src/models/IJwtPayload.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JWTPayload } from \"jose\";\n\n/**\n * The fields in a JSON Web Token payload.\n */\nexport type IJwtPayload = JWTPayload;\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Common http header types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const HeaderTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Content Type.
|
|
10
|
+
*/
|
|
11
|
+
ContentType: "content-type",
|
|
12
|
+
/**
|
|
13
|
+
* Content Length.
|
|
14
|
+
*/
|
|
15
|
+
ContentLength: "content-length",
|
|
16
|
+
/**
|
|
17
|
+
* Content Disposition.
|
|
18
|
+
*/
|
|
19
|
+
ContentDisposition: "content-disposition",
|
|
20
|
+
/**
|
|
21
|
+
* Accept.
|
|
22
|
+
*/
|
|
23
|
+
Accept: "accept",
|
|
24
|
+
/**
|
|
25
|
+
* Authorization.
|
|
26
|
+
*/
|
|
27
|
+
Authorization: "authorization",
|
|
28
|
+
/**
|
|
29
|
+
* Cookie.
|
|
30
|
+
*/
|
|
31
|
+
Cookie: "cookie",
|
|
32
|
+
/**
|
|
33
|
+
* Set Cookie.
|
|
34
|
+
*/
|
|
35
|
+
SetCookie: "set-cookie",
|
|
36
|
+
/**
|
|
37
|
+
* Location
|
|
38
|
+
*/
|
|
39
|
+
Location: "location"
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=headerTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerTypes.js","sourceRoot":"","sources":["../../../src/models/headerTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,WAAW,EAAE,cAAc;IAE3B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,kBAAkB,EAAE,qBAAqB;IAEzC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Common http header types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HeaderTypes = {\n\t/**\n\t * Content Type.\n\t */\n\tContentType: \"content-type\",\n\n\t/**\n\t * Content Length.\n\t */\n\tContentLength: \"content-length\",\n\n\t/**\n\t * Content Disposition.\n\t */\n\tContentDisposition: \"content-disposition\",\n\n\t/**\n\t * Accept.\n\t */\n\tAccept: \"accept\",\n\n\t/**\n\t * Authorization.\n\t */\n\tAuthorization: \"authorization\",\n\n\t/**\n\t * Cookie.\n\t */\n\tCookie: \"cookie\",\n\n\t/**\n\t * Set Cookie.\n\t */\n\tSetCookie: \"set-cookie\",\n\n\t/**\n\t * Location\n\t */\n\tLocation: \"location\"\n} as const;\n\n/**\n * Common http header types.\n */\nexport type HeaderTypes = (typeof HeaderTypes)[keyof typeof HeaderTypes];\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The names of the HTTP Methods.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const HttpMethod = {
|
|
8
|
+
GET: "GET",
|
|
9
|
+
POST: "POST",
|
|
10
|
+
PUT: "PUT",
|
|
11
|
+
PATCH: "PATCH",
|
|
12
|
+
DELETE: "DELETE",
|
|
13
|
+
OPTIONS: "OPTIONS",
|
|
14
|
+
HEAD: "HEAD",
|
|
15
|
+
CONNECT: "CONNECT",
|
|
16
|
+
TRACE: "TRACE"
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=httpMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpMethod.js","sourceRoot":"","sources":["../../../src/models/httpMethod.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACL,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The names of the HTTP Methods.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HttpMethod = {\n\tGET: \"GET\",\n\tPOST: \"POST\",\n\tPUT: \"PUT\",\n\tPATCH: \"PATCH\",\n\tDELETE: \"DELETE\",\n\tOPTIONS: \"OPTIONS\",\n\tHEAD: \"HEAD\",\n\tCONNECT: \"CONNECT\",\n\tTRACE: \"TRACE\"\n} as const;\n\n/**\n * The HTTP Methods.\n */\nexport type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];\n"]}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Standard HTTP status codes.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const HttpStatusCode = {
|
|
8
|
+
/**
|
|
9
|
+
* Continue status code.
|
|
10
|
+
*/
|
|
11
|
+
continue: 100,
|
|
12
|
+
/**
|
|
13
|
+
* Switching Protocols status code.
|
|
14
|
+
*/
|
|
15
|
+
switchingProtocols: 101,
|
|
16
|
+
/**
|
|
17
|
+
* Processing status code.
|
|
18
|
+
*/
|
|
19
|
+
processing: 102,
|
|
20
|
+
/**
|
|
21
|
+
* Early Hints status code.
|
|
22
|
+
*/
|
|
23
|
+
earlyHints: 103,
|
|
24
|
+
/**
|
|
25
|
+
* OK status code.
|
|
26
|
+
*/
|
|
27
|
+
ok: 200,
|
|
28
|
+
/**
|
|
29
|
+
* Created status code.
|
|
30
|
+
*/
|
|
31
|
+
created: 201,
|
|
32
|
+
/**
|
|
33
|
+
* Accepted status code.
|
|
34
|
+
*/
|
|
35
|
+
accepted: 202,
|
|
36
|
+
/**
|
|
37
|
+
* Non-Authoritative Information status code.
|
|
38
|
+
*/
|
|
39
|
+
nonAuthoritativeInformation: 203,
|
|
40
|
+
/**
|
|
41
|
+
* No Content status code.
|
|
42
|
+
*/
|
|
43
|
+
noContent: 204,
|
|
44
|
+
/**
|
|
45
|
+
* Reset Content status code.
|
|
46
|
+
*/
|
|
47
|
+
resetContent: 205,
|
|
48
|
+
/**
|
|
49
|
+
* Partial Content status code.
|
|
50
|
+
*/
|
|
51
|
+
partialContent: 206,
|
|
52
|
+
/**
|
|
53
|
+
* Multi-Status status code.
|
|
54
|
+
*/
|
|
55
|
+
multiStatus: 207,
|
|
56
|
+
/**
|
|
57
|
+
* Already Reported status code.
|
|
58
|
+
*/
|
|
59
|
+
alreadyReported: 208,
|
|
60
|
+
/**
|
|
61
|
+
* IM Used status code.
|
|
62
|
+
*/
|
|
63
|
+
imUsed: 226,
|
|
64
|
+
/**
|
|
65
|
+
* Multiple Choices status code.
|
|
66
|
+
*/
|
|
67
|
+
multipleChoices: 300,
|
|
68
|
+
/**
|
|
69
|
+
* Moved Permanently status code.
|
|
70
|
+
*/
|
|
71
|
+
movedPermanently: 301,
|
|
72
|
+
/**
|
|
73
|
+
* Found status code.
|
|
74
|
+
*/
|
|
75
|
+
found: 302,
|
|
76
|
+
/**
|
|
77
|
+
* See Other status code.
|
|
78
|
+
*/
|
|
79
|
+
seeOther: 303,
|
|
80
|
+
/**
|
|
81
|
+
* Not Modified status code.
|
|
82
|
+
*/
|
|
83
|
+
notModified: 304,
|
|
84
|
+
/**
|
|
85
|
+
* Use Proxy status code.
|
|
86
|
+
*/
|
|
87
|
+
useProxy: 305,
|
|
88
|
+
/**
|
|
89
|
+
* Temporary Redirect status code.
|
|
90
|
+
*/
|
|
91
|
+
temporaryRedirect: 307,
|
|
92
|
+
/**
|
|
93
|
+
* Permanent Redirect status code.
|
|
94
|
+
*/
|
|
95
|
+
permanentRedirect: 308,
|
|
96
|
+
/**
|
|
97
|
+
* Bad Request status code.
|
|
98
|
+
*/
|
|
99
|
+
badRequest: 400,
|
|
100
|
+
/**
|
|
101
|
+
* Unauthorized status code.
|
|
102
|
+
*/
|
|
103
|
+
unauthorized: 401,
|
|
104
|
+
/**
|
|
105
|
+
* Payment Required status code.
|
|
106
|
+
*/
|
|
107
|
+
paymentRequired: 402,
|
|
108
|
+
/**
|
|
109
|
+
* Forbidden status code.
|
|
110
|
+
*/
|
|
111
|
+
forbidden: 403,
|
|
112
|
+
/**
|
|
113
|
+
* Not Found status code.
|
|
114
|
+
*/
|
|
115
|
+
notFound: 404,
|
|
116
|
+
/**
|
|
117
|
+
* Method Not Allowed status code.
|
|
118
|
+
*/
|
|
119
|
+
methodNotAllowed: 405,
|
|
120
|
+
/**
|
|
121
|
+
* Not Acceptable status code.
|
|
122
|
+
*/
|
|
123
|
+
notAcceptable: 406,
|
|
124
|
+
/**
|
|
125
|
+
* Proxy Authentication Required status code.
|
|
126
|
+
*/
|
|
127
|
+
proxyAuthenticationRequired: 407,
|
|
128
|
+
/**
|
|
129
|
+
* Request Timeout status code.
|
|
130
|
+
*/
|
|
131
|
+
requestTimeout: 408,
|
|
132
|
+
/**
|
|
133
|
+
* Conflict status code.
|
|
134
|
+
*/
|
|
135
|
+
conflict: 409,
|
|
136
|
+
/**
|
|
137
|
+
* Gone status code.
|
|
138
|
+
*/
|
|
139
|
+
gone: 410,
|
|
140
|
+
/**
|
|
141
|
+
* Length Required status code.
|
|
142
|
+
*/
|
|
143
|
+
lengthRequired: 411,
|
|
144
|
+
/**
|
|
145
|
+
* Precondition Failed status code.
|
|
146
|
+
*/
|
|
147
|
+
preconditionFailed: 412,
|
|
148
|
+
/**
|
|
149
|
+
* Payload Too Large status code.
|
|
150
|
+
*/
|
|
151
|
+
payloadTooLarge: 413,
|
|
152
|
+
/**
|
|
153
|
+
* URI Too Long status code.
|
|
154
|
+
*/
|
|
155
|
+
uriTooLong: 414,
|
|
156
|
+
/**
|
|
157
|
+
* Unsupported Media Type status code.
|
|
158
|
+
*/
|
|
159
|
+
unsupportedMediaType: 415,
|
|
160
|
+
/**
|
|
161
|
+
* Range Not Satisfiable status code.
|
|
162
|
+
*/
|
|
163
|
+
rangeNotSatisfiable: 416,
|
|
164
|
+
/**
|
|
165
|
+
* Expectation Failed status code.
|
|
166
|
+
*/
|
|
167
|
+
expectationFailed: 417,
|
|
168
|
+
/**
|
|
169
|
+
* I'm a Teapot status code.
|
|
170
|
+
*/
|
|
171
|
+
imATeapot: 418,
|
|
172
|
+
/**
|
|
173
|
+
* Misdirected Request status code.
|
|
174
|
+
*/
|
|
175
|
+
misdirectedRequest: 421,
|
|
176
|
+
/**
|
|
177
|
+
* Unprocessable Entity status code.
|
|
178
|
+
*/
|
|
179
|
+
unprocessableEntity: 422,
|
|
180
|
+
/**
|
|
181
|
+
* Locked status code.
|
|
182
|
+
*/
|
|
183
|
+
locked: 423,
|
|
184
|
+
/**
|
|
185
|
+
* Failed Dependency status code.
|
|
186
|
+
*/
|
|
187
|
+
failedDependency: 424,
|
|
188
|
+
/**
|
|
189
|
+
* Too Early status code.
|
|
190
|
+
*/
|
|
191
|
+
tooEarly: 425,
|
|
192
|
+
/**
|
|
193
|
+
* Upgrade Required status code.
|
|
194
|
+
*/
|
|
195
|
+
upgradeRequired: 426,
|
|
196
|
+
/**
|
|
197
|
+
* Precondition Required status code.
|
|
198
|
+
*/
|
|
199
|
+
preconditionRequired: 428,
|
|
200
|
+
/**
|
|
201
|
+
* Too Many Requests status code.
|
|
202
|
+
*/
|
|
203
|
+
tooManyRequests: 429,
|
|
204
|
+
/**
|
|
205
|
+
* Request Header Fields Too Large status code.
|
|
206
|
+
*/
|
|
207
|
+
requestHeaderFieldsTooLarge: 431,
|
|
208
|
+
/**
|
|
209
|
+
* Unavailable For Legal Reasons status code.
|
|
210
|
+
*/
|
|
211
|
+
unavailableForLegalReasons: 451,
|
|
212
|
+
/**
|
|
213
|
+
* Internal Server Error status code.
|
|
214
|
+
*/
|
|
215
|
+
internalServerError: 500,
|
|
216
|
+
/**
|
|
217
|
+
* Not Implemented status code.
|
|
218
|
+
*/
|
|
219
|
+
notImplemented: 501,
|
|
220
|
+
/**
|
|
221
|
+
* Bad Gateway status code.
|
|
222
|
+
*/
|
|
223
|
+
badGateway: 502,
|
|
224
|
+
/**
|
|
225
|
+
* Service Unavailable status code.
|
|
226
|
+
*/
|
|
227
|
+
serviceUnavailable: 503,
|
|
228
|
+
/**
|
|
229
|
+
* Gateway Timeout status code.
|
|
230
|
+
*/
|
|
231
|
+
gatewayTimeout: 504,
|
|
232
|
+
/**
|
|
233
|
+
* HTTP Version Not Supported status code.
|
|
234
|
+
*/
|
|
235
|
+
httpVersionNotSupported: 505,
|
|
236
|
+
/**
|
|
237
|
+
* Variant Also Negotiates status code.
|
|
238
|
+
*/
|
|
239
|
+
variantAlsoNegotiates: 506,
|
|
240
|
+
/**
|
|
241
|
+
* Insufficient Storage status code.
|
|
242
|
+
*/
|
|
243
|
+
insufficientStorage: 507,
|
|
244
|
+
/**
|
|
245
|
+
* Loop Detected status code.
|
|
246
|
+
*/
|
|
247
|
+
loopDetected: 508,
|
|
248
|
+
/**
|
|
249
|
+
* Not Extended status code.
|
|
250
|
+
*/
|
|
251
|
+
notExtended: 510,
|
|
252
|
+
/**
|
|
253
|
+
* Network Authentication Required status code.
|
|
254
|
+
*/
|
|
255
|
+
networkAuthenticationRequired: 511
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=httpStatusCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpStatusCode.js","sourceRoot":"","sources":["../../../src/models/httpStatusCode.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Standard HTTP status codes.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HttpStatusCode = {\n\t/**\n\t * Continue status code.\n\t */\n\tcontinue: 100,\n\n\t/**\n\t * Switching Protocols status code.\n\t */\n\tswitchingProtocols: 101,\n\n\t/**\n\t * Processing status code.\n\t */\n\tprocessing: 102,\n\n\t/**\n\t * Early Hints status code.\n\t */\n\tearlyHints: 103,\n\n\t/**\n\t * OK status code.\n\t */\n\tok: 200,\n\n\t/**\n\t * Created status code.\n\t */\n\tcreated: 201,\n\n\t/**\n\t * Accepted status code.\n\t */\n\taccepted: 202,\n\n\t/**\n\t * Non-Authoritative Information status code.\n\t */\n\tnonAuthoritativeInformation: 203,\n\n\t/**\n\t * No Content status code.\n\t */\n\tnoContent: 204,\n\n\t/**\n\t * Reset Content status code.\n\t */\n\tresetContent: 205,\n\n\t/**\n\t * Partial Content status code.\n\t */\n\tpartialContent: 206,\n\n\t/**\n\t * Multi-Status status code.\n\t */\n\tmultiStatus: 207,\n\n\t/**\n\t * Already Reported status code.\n\t */\n\talreadyReported: 208,\n\n\t/**\n\t * IM Used status code.\n\t */\n\timUsed: 226,\n\n\t/**\n\t * Multiple Choices status code.\n\t */\n\tmultipleChoices: 300,\n\n\t/**\n\t * Moved Permanently status code.\n\t */\n\tmovedPermanently: 301,\n\n\t/**\n\t * Found status code.\n\t */\n\tfound: 302,\n\n\t/**\n\t * See Other status code.\n\t */\n\tseeOther: 303,\n\n\t/**\n\t * Not Modified status code.\n\t */\n\tnotModified: 304,\n\n\t/**\n\t * Use Proxy status code.\n\t */\n\tuseProxy: 305,\n\n\t/**\n\t * Temporary Redirect status code.\n\t */\n\ttemporaryRedirect: 307,\n\n\t/**\n\t * Permanent Redirect status code.\n\t */\n\tpermanentRedirect: 308,\n\n\t/**\n\t * Bad Request status code.\n\t */\n\tbadRequest: 400,\n\n\t/**\n\t * Unauthorized status code.\n\t */\n\tunauthorized: 401,\n\n\t/**\n\t * Payment Required status code.\n\t */\n\tpaymentRequired: 402,\n\n\t/**\n\t * Forbidden status code.\n\t */\n\tforbidden: 403,\n\n\t/**\n\t * Not Found status code.\n\t */\n\tnotFound: 404,\n\n\t/**\n\t * Method Not Allowed status code.\n\t */\n\tmethodNotAllowed: 405,\n\n\t/**\n\t * Not Acceptable status code.\n\t */\n\tnotAcceptable: 406,\n\n\t/**\n\t * Proxy Authentication Required status code.\n\t */\n\tproxyAuthenticationRequired: 407,\n\n\t/**\n\t * Request Timeout status code.\n\t */\n\trequestTimeout: 408,\n\n\t/**\n\t * Conflict status code.\n\t */\n\tconflict: 409,\n\n\t/**\n\t * Gone status code.\n\t */\n\tgone: 410,\n\n\t/**\n\t * Length Required status code.\n\t */\n\tlengthRequired: 411,\n\n\t/**\n\t * Precondition Failed status code.\n\t */\n\tpreconditionFailed: 412,\n\n\t/**\n\t * Payload Too Large status code.\n\t */\n\tpayloadTooLarge: 413,\n\n\t/**\n\t * URI Too Long status code.\n\t */\n\turiTooLong: 414,\n\n\t/**\n\t * Unsupported Media Type status code.\n\t */\n\tunsupportedMediaType: 415,\n\n\t/**\n\t * Range Not Satisfiable status code.\n\t */\n\trangeNotSatisfiable: 416,\n\n\t/**\n\t * Expectation Failed status code.\n\t */\n\texpectationFailed: 417,\n\n\t/**\n\t * I'm a Teapot status code.\n\t */\n\timATeapot: 418,\n\n\t/**\n\t * Misdirected Request status code.\n\t */\n\tmisdirectedRequest: 421,\n\n\t/**\n\t * Unprocessable Entity status code.\n\t */\n\tunprocessableEntity: 422,\n\n\t/**\n\t * Locked status code.\n\t */\n\tlocked: 423,\n\n\t/**\n\t * Failed Dependency status code.\n\t */\n\tfailedDependency: 424,\n\n\t/**\n\t * Too Early status code.\n\t */\n\ttooEarly: 425,\n\n\t/**\n\t * Upgrade Required status code.\n\t */\n\tupgradeRequired: 426,\n\n\t/**\n\t * Precondition Required status code.\n\t */\n\tpreconditionRequired: 428,\n\n\t/**\n\t * Too Many Requests status code.\n\t */\n\ttooManyRequests: 429,\n\n\t/**\n\t * Request Header Fields Too Large status code.\n\t */\n\trequestHeaderFieldsTooLarge: 431,\n\n\t/**\n\t * Unavailable For Legal Reasons status code.\n\t */\n\tunavailableForLegalReasons: 451,\n\n\t/**\n\t * Internal Server Error status code.\n\t */\n\tinternalServerError: 500,\n\n\t/**\n\t * Not Implemented status code.\n\t */\n\tnotImplemented: 501,\n\n\t/**\n\t * Bad Gateway status code.\n\t */\n\tbadGateway: 502,\n\n\t/**\n\t * Service Unavailable status code.\n\t */\n\tserviceUnavailable: 503,\n\n\t/**\n\t * Gateway Timeout status code.\n\t */\n\tgatewayTimeout: 504,\n\n\t/**\n\t * HTTP Version Not Supported status code.\n\t */\n\thttpVersionNotSupported: 505,\n\n\t/**\n\t * Variant Also Negotiates status code.\n\t */\n\tvariantAlsoNegotiates: 506,\n\n\t/**\n\t * Insufficient Storage status code.\n\t */\n\tinsufficientStorage: 507,\n\n\t/**\n\t * Loop Detected status code.\n\t */\n\tloopDetected: 508,\n\n\t/**\n\t * Not Extended status code.\n\t */\n\tnotExtended: 510,\n\n\t/**\n\t * Network Authentication Required status code.\n\t */\n\tnetworkAuthenticationRequired: 511\n} as const;\n\n/**\n * Standard HTTP status codes.\n */\nexport type HttpStatusCode = (typeof HttpStatusCode)[keyof typeof HttpStatusCode];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwkCryptoKey.js","sourceRoot":"","sources":["../../../src/models/jwkCryptoKey.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The crypto key for a JWK.\n */\nexport type JwkCryptoKey = CryptoKey | Uint8Array;\n"]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Common mime types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const MimeTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Plaint Text - text/plain
|
|
10
|
+
*/
|
|
11
|
+
PlainText: "text/plain",
|
|
12
|
+
/**
|
|
13
|
+
* HTML - text/html
|
|
14
|
+
*/
|
|
15
|
+
Html: "text/html",
|
|
16
|
+
/**
|
|
17
|
+
* Javascript - text/javascript
|
|
18
|
+
*/
|
|
19
|
+
Javascript: "text/javascript",
|
|
20
|
+
/**
|
|
21
|
+
* JSON - application/json
|
|
22
|
+
*/
|
|
23
|
+
Json: "application/json",
|
|
24
|
+
/**
|
|
25
|
+
* JSON-LD - application/ld+json
|
|
26
|
+
*/
|
|
27
|
+
JsonLd: "application/ld+json",
|
|
28
|
+
/**
|
|
29
|
+
* JWT - application/jwt
|
|
30
|
+
*/
|
|
31
|
+
Jwt: "application/jwt",
|
|
32
|
+
/**
|
|
33
|
+
* XML - application/xml
|
|
34
|
+
*/
|
|
35
|
+
Xml: "application/xml",
|
|
36
|
+
/**
|
|
37
|
+
* Application Octet Stream, arbitrary binary - application/octet-stream
|
|
38
|
+
*/
|
|
39
|
+
OctetStream: "application/octet-stream",
|
|
40
|
+
/**
|
|
41
|
+
* Application GZIP - application/gzip
|
|
42
|
+
*/
|
|
43
|
+
Gzip: "application/gzip",
|
|
44
|
+
/**
|
|
45
|
+
* Application deflate - application/zlib
|
|
46
|
+
*/
|
|
47
|
+
Zlib: "application/zlib",
|
|
48
|
+
/**
|
|
49
|
+
* Application BZIP2 - application/x-bzip2
|
|
50
|
+
*/
|
|
51
|
+
Bzip2: "application/x-bzip2",
|
|
52
|
+
/**
|
|
53
|
+
* Application ZIP - application/zip
|
|
54
|
+
*/
|
|
55
|
+
Zip: "application/zip",
|
|
56
|
+
/**
|
|
57
|
+
* Application PDF - application/pdf
|
|
58
|
+
*/
|
|
59
|
+
Pdf: "application/pdf",
|
|
60
|
+
/**
|
|
61
|
+
* Image GIF - image/gif
|
|
62
|
+
*/
|
|
63
|
+
Gif: "image/gif",
|
|
64
|
+
/**
|
|
65
|
+
* Image BMP - image/bmp
|
|
66
|
+
*/
|
|
67
|
+
Bmp: "image/bmp",
|
|
68
|
+
/**
|
|
69
|
+
* Image JPEG - image/jpeg
|
|
70
|
+
*/
|
|
71
|
+
Jpeg: "image/jpeg",
|
|
72
|
+
/**
|
|
73
|
+
* Image PNG - image/png
|
|
74
|
+
*/
|
|
75
|
+
Png: "image/png",
|
|
76
|
+
/**
|
|
77
|
+
* Image Tiff - image/tiff
|
|
78
|
+
*/
|
|
79
|
+
Tiff: "image/tiff",
|
|
80
|
+
/**
|
|
81
|
+
* Image SVG - image/svg+xml
|
|
82
|
+
*/
|
|
83
|
+
Svg: "image/svg+xml",
|
|
84
|
+
/**
|
|
85
|
+
* Image WEBP - image/webp
|
|
86
|
+
*/
|
|
87
|
+
WebP: "image/webp",
|
|
88
|
+
/**
|
|
89
|
+
* Video MP4 - video/mp4
|
|
90
|
+
*/
|
|
91
|
+
Mp4: "video/mp4",
|
|
92
|
+
/**
|
|
93
|
+
* Audio/Video MPEG - video/mpeg
|
|
94
|
+
*/
|
|
95
|
+
Mpeg: "video/mpeg",
|
|
96
|
+
/**
|
|
97
|
+
* Video WEBM - video/webm
|
|
98
|
+
*/
|
|
99
|
+
Webm: "video/webm"
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=mimeTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mimeTypes.js","sourceRoot":"","sources":["../../../src/models/mimeTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,IAAI,EAAE,WAAW;IAEjB;;OAEG;IACH,UAAU,EAAE,iBAAiB;IAE7B;;OAEG;IACH,IAAI,EAAE,kBAAkB;IAExB;;OAEG;IACH,MAAM,EAAE,qBAAqB;IAE7B;;OAEG;IACH,GAAG,EAAE,iBAAiB;IAEtB;;OAEG;IACH,GAAG,EAAE,iBAAiB;IAEtB;;OAEG;IACH,WAAW,EAAE,0BAA0B;IAEvC;;OAEG;IACH,IAAI,EAAE,kBAAkB;IAExB;;OAEG;IACH,IAAI,EAAE,kBAAkB;IAExB;;OAEG;IACH,KAAK,EAAE,qBAAqB;IAE5B;;OAEG;IACH,GAAG,EAAE,iBAAiB;IAEtB;;OAEG;IACH,GAAG,EAAE,iBAAiB;IAEtB;;OAEG;IACH,GAAG,EAAE,WAAW;IAEhB;;OAEG;IACH,GAAG,EAAE,WAAW;IAEhB;;OAEG;IACH,IAAI,EAAE,YAAY;IAElB;;OAEG;IACH,GAAG,EAAE,WAAW;IAEhB;;OAEG;IACH,IAAI,EAAE,YAAY;IAElB;;OAEG;IACH,GAAG,EAAE,eAAe;IAEpB;;OAEG;IACH,IAAI,EAAE,YAAY;IAElB;;OAEG;IACH,GAAG,EAAE,WAAW;IAEhB;;OAEG;IACH,IAAI,EAAE,YAAY;IAElB;;OAEG;IACH,IAAI,EAAE,YAAY;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Common mime types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const MimeTypes = {\n\t/**\n\t * Plaint Text - text/plain\n\t */\n\tPlainText: \"text/plain\",\n\n\t/**\n\t * HTML - text/html\n\t */\n\tHtml: \"text/html\",\n\n\t/**\n\t * Javascript - text/javascript\n\t */\n\tJavascript: \"text/javascript\",\n\n\t/**\n\t * JSON - application/json\n\t */\n\tJson: \"application/json\",\n\n\t/**\n\t * JSON-LD - application/ld+json\n\t */\n\tJsonLd: \"application/ld+json\",\n\n\t/**\n\t * JWT - application/jwt\n\t */\n\tJwt: \"application/jwt\",\n\n\t/**\n\t * XML - application/xml\n\t */\n\tXml: \"application/xml\",\n\n\t/**\n\t * Application Octet Stream, arbitrary binary - application/octet-stream\n\t */\n\tOctetStream: \"application/octet-stream\",\n\n\t/**\n\t * Application GZIP - application/gzip\n\t */\n\tGzip: \"application/gzip\",\n\n\t/**\n\t * Application deflate - application/zlib\n\t */\n\tZlib: \"application/zlib\",\n\n\t/**\n\t * Application BZIP2 - application/x-bzip2\n\t */\n\tBzip2: \"application/x-bzip2\",\n\n\t/**\n\t * Application ZIP - application/zip\n\t */\n\tZip: \"application/zip\",\n\n\t/**\n\t * Application PDF - application/pdf\n\t */\n\tPdf: \"application/pdf\",\n\n\t/**\n\t * Image GIF - image/gif\n\t */\n\tGif: \"image/gif\",\n\n\t/**\n\t * Image BMP - image/bmp\n\t */\n\tBmp: \"image/bmp\",\n\n\t/**\n\t * Image JPEG - image/jpeg\n\t */\n\tJpeg: \"image/jpeg\",\n\n\t/**\n\t * Image PNG - image/png\n\t */\n\tPng: \"image/png\",\n\n\t/**\n\t * Image Tiff - image/tiff\n\t */\n\tTiff: \"image/tiff\",\n\n\t/**\n\t * Image SVG - image/svg+xml\n\t */\n\tSvg: \"image/svg+xml\",\n\n\t/**\n\t * Image WEBP - image/webp\n\t */\n\tWebP: \"image/webp\",\n\n\t/**\n\t * Video MP4 - video/mp4\n\t */\n\tMp4: \"video/mp4\",\n\n\t/**\n\t * Audio/Video MPEG - video/mpeg\n\t */\n\tMpeg: \"video/mpeg\",\n\n\t/**\n\t * Video WEBM - video/webm\n\t */\n\tWebm: \"video/webm\"\n} as const;\n\n/**\n * Common mime types.\n */\nexport type MimeTypes = (typeof MimeTypes)[keyof typeof MimeTypes];\n"]}
|