core-services-sdk 1.3.37 → 1.3.39

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 (46) hide show
  1. package/package.json +2 -2
  2. package/src/http/HttpError.js +1 -1
  3. package/tests/http/HttpError.unit.test.js +2 -2
  4. package/tsconfig.json +3 -1
  5. package/types/core/combine-unique-arrays.d.ts +1 -1
  6. package/types/core/index.d.ts +9 -9
  7. package/types/core/normalize-array-operators.d.ts +1 -1
  8. package/types/core/normalize-min-max.d.ts +16 -10
  9. package/types/core/normalize-phone-number.d.ts +30 -24
  10. package/types/core/normalize-premitives-types-or-default.d.ts +17 -4
  11. package/types/core/normalize-to-array.d.ts +1 -1
  12. package/types/core/otp-generators.d.ts +22 -18
  13. package/types/core/regex-utils.d.ts +1 -1
  14. package/types/core/sanitize-objects.d.ts +13 -4
  15. package/types/crypto/crypto.d.ts +31 -18
  16. package/types/crypto/encryption.d.ts +14 -6
  17. package/types/crypto/index.d.ts +2 -2
  18. package/types/fastify/error-handlers/with-error-handling.d.ts +26 -15
  19. package/types/fastify/index.d.ts +2 -2
  20. package/types/http/HttpError.d.ts +3 -4
  21. package/types/http/http-method.d.ts +6 -6
  22. package/types/http/http.d.ts +58 -34
  23. package/types/http/index.d.ts +4 -4
  24. package/types/http/responseType.d.ts +6 -6
  25. package/types/ids/generators.d.ts +28 -28
  26. package/types/ids/index.d.ts +2 -2
  27. package/types/ids/prefixes.d.ts +54 -54
  28. package/types/index.d.ts +11 -11
  29. package/types/logger/get-logger.d.ts +23 -21
  30. package/types/logger/index.d.ts +1 -1
  31. package/types/mailer/index.d.ts +2 -2
  32. package/types/mailer/mailer.service.d.ts +29 -19
  33. package/types/mailer/transport.factory.d.ts +43 -43
  34. package/types/mongodb/connect.d.ts +12 -7
  35. package/types/mongodb/dsl-to-mongo.d.ts +2 -1
  36. package/types/mongodb/index.d.ts +5 -5
  37. package/types/mongodb/initialize-mongodb.d.ts +18 -13
  38. package/types/mongodb/paginate.d.ts +23 -13
  39. package/types/mongodb/validate-mongo-uri.d.ts +1 -1
  40. package/types/rabbit-mq/index.d.ts +1 -1
  41. package/types/rabbit-mq/rabbit-mq.d.ts +62 -37
  42. package/types/templates/index.d.ts +1 -1
  43. package/types/templates/template-loader.d.ts +7 -3
  44. package/types/util/context.d.ts +53 -53
  45. package/types/util/index.d.ts +6 -6
  46. package/types/util/mask-sensitive.d.ts +14 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-services-sdk",
3
- "version": "1.3.37",
3
+ "version": "1.3.39",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "types": "types/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "test": "vitest run --coverage",
11
11
  "format": "prettier --write .",
12
12
  "bump": "node ./scripts/bump-version.js",
13
- "build:types": "tsc --declaration --allowJs --emitDeclarationOnly --outDir types ./src/index.js"
13
+ "build:types": "tsc --project tsconfig.json && prettier --write ."
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
@@ -35,7 +35,7 @@ export class HttpError extends Error {
35
35
  constructor(error = {}) {
36
36
  const { code, status, message, extendInfo } = error
37
37
 
38
- super(message || (status && httpStatus[status]) || code || 'Unknown error')
38
+ super(message || code || httpStatus[status] || 'Unknown error')
39
39
 
40
40
  this.code = code
41
41
  this.status = status
@@ -21,11 +21,11 @@ describe('HttpError', () => {
21
21
 
22
22
  it('should fallback to default message from status if message is missing', () => {
23
23
  const error = new HttpError({
24
- code: 'BAD_REQUEST',
24
+ code: 'Missing parameter x',
25
25
  status: httpStatus.BAD_REQUEST,
26
26
  })
27
27
 
28
- expect(error.message).toBe(httpStatus[httpStatus.BAD_REQUEST])
28
+ expect(error.message).toBe('Missing parameter x')
29
29
  expect(error.extendInfo).toBeUndefined()
30
30
  })
31
31
 
package/tsconfig.json CHANGED
@@ -3,7 +3,9 @@
3
3
  "declaration": true,
4
4
  "allowJs": true,
5
5
  "emitDeclarationOnly": true,
6
- "outDir": "types"
6
+ "outDir": "types",
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true
7
9
  },
8
10
  "include": ["src"]
9
11
  }
@@ -1 +1 @@
1
- export function combineUniqueArrays(...lists: Array<any>[]): Array<any>;
1
+ export function combineUniqueArrays(...lists: Array<any>[]): Array<any>
@@ -1,9 +1,9 @@
1
- export * from "./regex-utils.js";
2
- export * from "./otp-generators.js";
3
- export * from "./sanitize-objects.js";
4
- export * from "./normalize-min-max.js";
5
- export * from "./normalize-to-array.js";
6
- export * from "./combine-unique-arrays.js";
7
- export * from "./normalize-phone-number.js";
8
- export * from "./normalize-array-operators.js";
9
- export * from "./normalize-premitives-types-or-default.js";
1
+ export * from './regex-utils.js'
2
+ export * from './otp-generators.js'
3
+ export * from './sanitize-objects.js'
4
+ export * from './normalize-min-max.js'
5
+ export * from './normalize-to-array.js'
6
+ export * from './combine-unique-arrays.js'
7
+ export * from './normalize-phone-number.js'
8
+ export * from './normalize-array-operators.js'
9
+ export * from './normalize-premitives-types-or-default.js'
@@ -1 +1 @@
1
- export function normalizeOperators(obj: any): any;
1
+ export function normalizeOperators(obj: any): any
@@ -1,10 +1,16 @@
1
- export function normalizeMinMax(defaultMinMax: {
2
- min: number;
3
- max: number;
4
- }, valuesMinMax: {
5
- min?: number;
6
- max?: number;
7
- } | null | undefined): {
8
- min: number;
9
- max: number;
10
- };
1
+ export function normalizeMinMax(
2
+ defaultMinMax: {
3
+ min: number
4
+ max: number
5
+ },
6
+ valuesMinMax:
7
+ | {
8
+ min?: number
9
+ max?: number
10
+ }
11
+ | null
12
+ | undefined,
13
+ ): {
14
+ min: number
15
+ max: number
16
+ }
@@ -1,6 +1,6 @@
1
1
  /** Resolve libphonenumber regardless of interop shape */
2
- export function getLib(): any;
3
- export function phoneUtil(): any;
2
+ export function getLib(): any
3
+ export function phoneUtil(): any
4
4
  /**
5
5
  * Parse & validate an international number (must start with '+').
6
6
  * @param {string} input
@@ -8,12 +8,12 @@ export function phoneUtil(): any;
8
8
  * @throws {Error} If the number is invalid
9
9
  */
10
10
  export function normalizePhoneOrThrowIntl(input: string): {
11
- e164: string;
12
- national: string;
13
- international: string;
14
- regionCode: string | undefined;
15
- type: number;
16
- };
11
+ e164: string
12
+ national: string
13
+ international: string
14
+ regionCode: string | undefined
15
+ type: number
16
+ }
17
17
  /**
18
18
  * Parse & validate a national number using a region hint.
19
19
  * @param {string} input
@@ -21,13 +21,16 @@ export function normalizePhoneOrThrowIntl(input: string): {
21
21
  * @returns {{e164:string,national:string,international:string,regionCode:string|undefined,type:number}}
22
22
  * @throws {Error} If the number is invalid
23
23
  */
24
- export function normalizePhoneOrThrowWithRegion(input: string, defaultRegion: string): {
25
- e164: string;
26
- national: string;
27
- international: string;
28
- regionCode: string | undefined;
29
- type: number;
30
- };
24
+ export function normalizePhoneOrThrowWithRegion(
25
+ input: string,
26
+ defaultRegion: string,
27
+ ): {
28
+ e164: string
29
+ national: string
30
+ international: string
31
+ regionCode: string | undefined
32
+ type: number
33
+ }
31
34
  /**
32
35
  * Smart normalization:
33
36
  * - If input starts with '+', parse as international.
@@ -37,12 +40,15 @@ export function normalizePhoneOrThrowWithRegion(input: string, defaultRegion: st
37
40
  * @returns {{e164:string,national:string,international:string,regionCode:string|undefined,type:number}}
38
41
  * @throws {Error} If invalid or defaultRegion is missing for non-international input
39
42
  */
40
- export function normalizePhoneOrThrow(input: string, opts?: {
41
- defaultRegion?: string;
42
- }): {
43
- e164: string;
44
- national: string;
45
- international: string;
46
- regionCode: string | undefined;
47
- type: number;
48
- };
43
+ export function normalizePhoneOrThrow(
44
+ input: string,
45
+ opts?: {
46
+ defaultRegion?: string
47
+ },
48
+ ): {
49
+ e164: string
50
+ national: string
51
+ international: string
52
+ regionCode: string | undefined
53
+ type: number
54
+ }
@@ -53,7 +53,11 @@
53
53
  * {}
54
54
  * )
55
55
  */
56
- export function normalizeOrDefault<T>(value: any, isValid: (v: any) => boolean, defaultValue: T): T;
56
+ export function normalizeOrDefault<T>(
57
+ value: any,
58
+ isValid: (v: any) => boolean,
59
+ defaultValue: T,
60
+ ): T
57
61
  /**
58
62
  * Normalize a value to a non-empty, trimmed string; otherwise return a default (also trimmed).
59
63
  *
@@ -93,7 +97,10 @@ export function normalizeOrDefault<T>(value: any, isValid: (v: any) => boolean,
93
97
  * normalizeStringOrDefault(42, 'user-roles-management:edit')
94
98
  * // → 'user-roles-management:edit'
95
99
  */
96
- export function normalizeStringOrDefault(value: any, defaultValue: string): string;
100
+ export function normalizeStringOrDefault(
101
+ value: any,
102
+ defaultValue: string,
103
+ ): string
97
104
  /**
98
105
  * Normalize a value to a valid number (with safe string coercion); otherwise return a default.
99
106
  *
@@ -131,7 +138,10 @@ export function normalizeStringOrDefault(value: any, defaultValue: string): stri
131
138
  * normalizeNumberOrDefault(NaN, 7) // → 7
132
139
  * normalizeNumberOrDefault({}, 7) // → 7
133
140
  */
134
- export function normalizeNumberOrDefault(value: any, defaultValue: number): number;
141
+ export function normalizeNumberOrDefault(
142
+ value: any,
143
+ defaultValue: number,
144
+ ): number
135
145
  /**
136
146
  * Normalize a value to a boolean (with "true"/"false" string support); otherwise return a default.
137
147
  *
@@ -169,4 +179,7 @@ export function normalizeNumberOrDefault(value: any, defaultValue: number): numb
169
179
  * normalizeBooleanOrDefault('yes', false) // → false (rejected → default)
170
180
  * normalizeBooleanOrDefault(1, true) // → true (rejected → default)
171
181
  */
172
- export function normalizeBooleanOrDefault(value: any, defaultValue: boolean): boolean;
182
+ export function normalizeBooleanOrDefault(
183
+ value: any,
184
+ defaultValue: boolean,
185
+ ): boolean
@@ -1 +1 @@
1
- export function normalizeToArray(value: any): string[];
1
+ export function normalizeToArray(value: any): string[]
@@ -11,46 +11,50 @@
11
11
  * @throws {Error} If charset is provided and is not a non-empty string.
12
12
  * @throws {Error} If the type is invalid and no valid charset is provided.
13
13
  */
14
- export function generateCode({ length, type, charset }?: {
15
- length?: number;
16
- type?: string;
17
- charset?: string;
18
- }): string;
14
+ export function generateCode({
15
+ length,
16
+ type,
17
+ charset,
18
+ }?: {
19
+ length?: number
20
+ type?: string
21
+ charset?: string
22
+ }): string
19
23
  /**
20
24
  * Generates an OTP code using alphabetic characters (both lowercase and uppercase).
21
25
  *
22
26
  * @param {number} [length=4] - The desired length of the code.
23
27
  * @returns {string} The generated code.
24
28
  */
25
- export function generateCodeAlpha(length?: number): string;
29
+ export function generateCodeAlpha(length?: number): string
26
30
  /**
27
31
  * Generates an OTP code using only numeric digits (0-9).
28
32
  *
29
33
  * @param {number} [length=4] - The desired length of the code.
30
34
  * @returns {string} The generated code.
31
35
  */
32
- export function generateCodeDigits(length?: number): string;
36
+ export function generateCodeDigits(length?: number): string
33
37
  /**
34
38
  * Generates an OTP code using alphabetic characters and digits.
35
39
  *
36
40
  * @param {number} [length=4] - The desired length of the code.
37
41
  * @returns {string} The generated code.
38
42
  */
39
- export function generateCodeAlphaNumeric(length?: number): string;
43
+ export function generateCodeAlphaNumeric(length?: number): string
40
44
  /**
41
45
  * Generates an OTP code using alphabetic characters, digits, and symbols.
42
46
  *
43
47
  * @param {number} [length=4] - The desired length of the code.
44
48
  * @returns {string} The generated code.
45
49
  */
46
- export function generateCodeAlphaNumericSymbols(length?: number): string;
50
+ export function generateCodeAlphaNumericSymbols(length?: number): string
47
51
  export const OTP_GENERATOR_TYPES: Readonly<{
48
- any: "any";
49
- alpha: "alpha";
50
- numeric: "numeric";
51
- symbols: "symbols";
52
- alphaLower: "alphaLower";
53
- alphaUpper: "alphaUpper";
54
- alphanumeric: "alphanumeric";
55
- alphanumericSymbols: "alphanumericSymbols";
56
- }>;
52
+ any: 'any'
53
+ alpha: 'alpha'
54
+ numeric: 'numeric'
55
+ symbols: 'symbols'
56
+ alphaLower: 'alphaLower'
57
+ alphaUpper: 'alphaUpper'
58
+ alphanumeric: 'alphanumeric'
59
+ alphanumericSymbols: 'alphanumericSymbols'
60
+ }>
@@ -1 +1 @@
1
- export function isValidRegex(pattern: string | RegExp): boolean;
1
+ export function isValidRegex(pattern: string | RegExp): boolean
@@ -1,4 +1,13 @@
1
- export function sanitizeObject(obj: any, filter: (entry: [string, any]) => boolean): any;
2
- export function sanitizeUndefinedFields(obj: any): any;
3
- export function sanitizeObjectAllowProps(obj: any, allowedFields?: string[]): any;
4
- export function sanitizeObjectDisallowProps(obj: any, disallowedFields?: string[]): any;
1
+ export function sanitizeObject(
2
+ obj: any,
3
+ filter: (entry: [string, any]) => boolean,
4
+ ): any
5
+ export function sanitizeUndefinedFields(obj: any): any
6
+ export function sanitizeObjectAllowProps(
7
+ obj: any,
8
+ allowedFields?: string[],
9
+ ): any
10
+ export function sanitizeObjectDisallowProps(
11
+ obj: any,
12
+ disallowedFields?: string[],
13
+ ): any
@@ -1,18 +1,31 @@
1
- export function getSalt(length: number): Buffer;
2
- export function getSaltHex(length: number): string;
3
- export function getEncryptedBuffer({ salt, expression, length, }: {
4
- expression: string;
5
- salt: string;
6
- length?: number;
7
- }): Promise<Buffer>;
8
- export function encrypt({ salt, expression, passwordPrivateKey }: {
9
- expression: string;
10
- salt: string;
11
- passwordPrivateKey?: string;
12
- }): Promise<string>;
13
- export function isPasswordMatch({ salt, password, encryptedPassword, passwordPrivateKey, }: {
14
- salt: string;
15
- password: string;
16
- encryptedPassword: string;
17
- passwordPrivateKey?: string;
18
- }): Promise<boolean>;
1
+ export function getSalt(length: number): Buffer
2
+ export function getSaltHex(length: number): string
3
+ export function getEncryptedBuffer({
4
+ salt,
5
+ expression,
6
+ length,
7
+ }: {
8
+ expression: string
9
+ salt: string
10
+ length?: number
11
+ }): Promise<Buffer>
12
+ export function encrypt({
13
+ salt,
14
+ expression,
15
+ passwordPrivateKey,
16
+ }: {
17
+ expression: string
18
+ salt: string
19
+ passwordPrivateKey?: string
20
+ }): Promise<string>
21
+ export function isPasswordMatch({
22
+ salt,
23
+ password,
24
+ encryptedPassword,
25
+ passwordPrivateKey,
26
+ }: {
27
+ salt: string
28
+ password: string
29
+ encryptedPassword: string
30
+ passwordPrivateKey?: string
31
+ }): Promise<boolean>
@@ -1,6 +1,14 @@
1
- export function encryptPassword({ password }: {
2
- password: string;
3
- }, { saltLength, passwordPrivateKey }: {
4
- saltLength: number;
5
- passwordPrivateKey?: string;
6
- }): Promise<any>;
1
+ export function encryptPassword(
2
+ {
3
+ password,
4
+ }: {
5
+ password: string
6
+ },
7
+ {
8
+ saltLength,
9
+ passwordPrivateKey,
10
+ }: {
11
+ saltLength: number
12
+ passwordPrivateKey?: string
13
+ },
14
+ ): Promise<any>
@@ -1,2 +1,2 @@
1
- export * from "./crypto.js";
2
- export * from "./encryption.js";
1
+ export * from './crypto.js'
2
+ export * from './encryption.js'
@@ -1,15 +1,26 @@
1
- export function withErrorHandling(log: object, defaultError: HttpError): (funcToInvoke: () => Promise<any>) => Promise<any>;
2
- export function withErrorHandlingReply({ reply, log, defaultError }: {
3
- reply: Reply;
4
- log: Logger;
5
- defaultError?: HttpError;
6
- }): (funcToInvoke: any) => Promise<any>;
7
- export function replyOnErrorOnly({ reply, log, defaultError }: {
8
- reply: Reply;
9
- log: Logger;
10
- defaultError?: HttpError;
11
- }): (funcToInvoke: any) => Promise<any>;
12
- export type Reply = import("fastify").FastifyReply;
13
- export type Request = import("fastify").FastifyRequest;
14
- export type Logger = import("pino").Logger;
15
- import { HttpError } from '../../http/HttpError.js';
1
+ export function withErrorHandling(
2
+ log: object,
3
+ defaultError: HttpError,
4
+ ): (funcToInvoke: () => Promise<any>) => Promise<any>
5
+ export function withErrorHandlingReply({
6
+ reply,
7
+ log,
8
+ defaultError,
9
+ }: {
10
+ reply: Reply
11
+ log: Logger
12
+ defaultError?: HttpError
13
+ }): (funcToInvoke: any) => Promise<any>
14
+ export function replyOnErrorOnly({
15
+ reply,
16
+ log,
17
+ defaultError,
18
+ }: {
19
+ reply: Reply
20
+ log: Logger
21
+ defaultError?: HttpError
22
+ }): (funcToInvoke: any) => Promise<any>
23
+ export type Reply = import('fastify').FastifyReply
24
+ export type Request = import('fastify').FastifyRequest
25
+ export type Logger = import('pino').Logger
26
+ import { HttpError } from '../../http/HttpError.js'
@@ -1,2 +1,2 @@
1
- export { GENERAL_ERROR } from "./error-codes.js";
2
- export * from "./error-handlers/with-error-handling.js";
1
+ export { GENERAL_ERROR } from './error-codes.js'
2
+ export * from './error-handlers/with-error-handling.js'
@@ -37,7 +37,6 @@ export class HttpError extends Error {
37
37
  code?: string | number
38
38
  message?: string
39
39
  status?: number
40
-
41
40
  extendInfo?: object
42
41
  })
43
42
  /**
@@ -49,10 +48,10 @@ export class HttpError extends Error {
49
48
  * @type {number | undefined}
50
49
  * HTTP status code associated with the error (e.g., 400, 500).
51
50
  */
52
- httpStatusCode: number | undefined
51
+ status: number | undefined
53
52
  /**
54
- * @type {string | undefined}
55
- * Human-readable HTTP status text (e.g., "Bad Request").
53
+ * @type {object | undefined}
54
+ * Optional metadata for debugging/logging (e.g., request ID, user ID, retryAfter).
56
55
  */
57
56
  extendInfo: object | undefined
58
57
  /**
@@ -1,7 +1,7 @@
1
1
  export const HTTP_METHODS: Readonly<{
2
- GET: "GET";
3
- POST: "POST";
4
- PUT: "PUT";
5
- PATCH: "PATCH";
6
- DELETE: "DELETE";
7
- }>;
2
+ GET: 'GET'
3
+ POST: 'POST'
4
+ PUT: 'PUT'
5
+ PATCH: 'PATCH'
6
+ DELETE: 'DELETE'
7
+ }>
@@ -1,36 +1,60 @@
1
- export function get({ url, headers, expectedType, }: {
2
- url: any;
3
- headers?: {};
4
- expectedType?: "json";
5
- }): Promise<any>;
6
- export function post({ url, body, headers, expectedType, }: {
7
- url: any;
8
- body: any;
9
- headers?: {};
10
- expectedType?: "json";
11
- }): Promise<any>;
12
- export function put({ url, body, headers, expectedType, }: {
13
- url: any;
14
- body: any;
15
- headers?: {};
16
- expectedType?: "json";
17
- }): Promise<any>;
18
- export function patch({ url, body, headers, expectedType, }: {
19
- url: any;
20
- body: any;
21
- headers?: {};
22
- expectedType?: "json";
23
- }): Promise<any>;
24
- export function deleteApi({ url, body, headers, expectedType, }: {
25
- url: any;
26
- body: any;
27
- headers?: {};
28
- expectedType?: "json";
29
- }): Promise<any>;
1
+ export function get({
2
+ url,
3
+ headers,
4
+ expectedType,
5
+ }: {
6
+ url: any
7
+ headers?: {}
8
+ expectedType?: 'json'
9
+ }): Promise<any>
10
+ export function post({
11
+ url,
12
+ body,
13
+ headers,
14
+ expectedType,
15
+ }: {
16
+ url: any
17
+ body: any
18
+ headers?: {}
19
+ expectedType?: 'json'
20
+ }): Promise<any>
21
+ export function put({
22
+ url,
23
+ body,
24
+ headers,
25
+ expectedType,
26
+ }: {
27
+ url: any
28
+ body: any
29
+ headers?: {}
30
+ expectedType?: 'json'
31
+ }): Promise<any>
32
+ export function patch({
33
+ url,
34
+ body,
35
+ headers,
36
+ expectedType,
37
+ }: {
38
+ url: any
39
+ body: any
40
+ headers?: {}
41
+ expectedType?: 'json'
42
+ }): Promise<any>
43
+ export function deleteApi({
44
+ url,
45
+ body,
46
+ headers,
47
+ expectedType,
48
+ }: {
49
+ url: any
50
+ body: any
51
+ headers?: {}
52
+ expectedType?: 'json'
53
+ }): Promise<any>
30
54
  export namespace http {
31
- export { get };
32
- export { put };
33
- export { post };
34
- export { patch };
35
- export { deleteApi };
55
+ export { get }
56
+ export { put }
57
+ export { post }
58
+ export { patch }
59
+ export { deleteApi }
36
60
  }
@@ -1,4 +1,4 @@
1
- export * from "./http.js";
2
- export * from "./HttpError.js";
3
- export * from "./http-method.js";
4
- export * from "./responseType.js";
1
+ export * from './http.js'
2
+ export * from './HttpError.js'
3
+ export * from './http-method.js'
4
+ export * from './responseType.js'
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * *
3
3
  */
4
- export type ResponseType = string;
4
+ export type ResponseType = string
5
5
  /**
6
6
  * Enum representing supported response types for HTTP client parsing.
7
7
  *
@@ -13,8 +13,8 @@ export type ResponseType = string;
13
13
  * @property {string} file - Binary file or blob (not automatically parsed).
14
14
  */
15
15
  export const ResponseType: Readonly<{
16
- xml: "xml";
17
- json: "json";
18
- text: "text";
19
- file: "file";
20
- }>;
16
+ xml: 'xml'
17
+ json: 'json'
18
+ text: 'text'
19
+ file: 'file'
20
+ }>