@nestia/fetcher 7.3.1 → 7.3.3

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.
@@ -6,12 +6,14 @@ import { IPropagation } from "./IPropagation";
6
6
  *
7
7
  * `EncryptedFetcher` is a utility class designed for SDK functions generated by
8
8
  * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote
9
- * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a collection of
10
- * dedicated `fetch()` functions for `@nestia/sdk` with encryption.
9
+ * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a
10
+ * collection of dedicated `fetch()` functions for `@nestia/sdk` with
11
+ * encryption.
11
12
  *
12
- * For reference, `EncryptedFetcher` class being used only when target controller
13
- * method is encrypting body data by `@EncryptedRoute` or `@EncryptedBody` decorators.
14
- * If those decorators are not used, {@link PlainFetcher} class would be used instead.
13
+ * For reference, `EncryptedFetcher` class being used only when target
14
+ * controller method is encrypting body data by `@EncryptedRoute` or
15
+ * `@EncryptedBody` decorators. If those decorators are not used,
16
+ * {@link PlainFetcher} class would be used instead.
15
17
  *
16
18
  * @author Jeongho Nam - https://github.com/samchon
17
19
  */
@@ -21,7 +23,7 @@ export declare namespace EncryptedFetcher {
21
23
  *
22
24
  * @param connection Connection information for the remote HTTP server
23
25
  * @param route Route information about the target API
24
- * @return Nothing because of `HEAD` method
26
+ * @returns Nothing because of `HEAD` method
25
27
  */
26
28
  function fetch(connection: IConnection, route: IFetchRoute<"HEAD">): Promise<void>;
27
29
  /**
@@ -29,7 +31,7 @@ export declare namespace EncryptedFetcher {
29
31
  *
30
32
  * @param connection Connection information for the remote HTTP server
31
33
  * @param route Route information about the target API
32
- * @return Response body data from the remote API
34
+ * @returns Response body data from the remote API
33
35
  */
34
36
  function fetch<Output>(connection: IConnection, route: IFetchRoute<"GET">): Promise<Output>;
35
37
  /**
@@ -37,7 +39,7 @@ export declare namespace EncryptedFetcher {
37
39
  *
38
40
  * @param connection Connection information for the remote HTTP server
39
41
  * @param route Route information about the target API
40
- * @return Response body data from the remote API
42
+ * @returns Response body data from the remote API
41
43
  */
42
44
  function fetch<Input, Output>(connection: IConnection, route: IFetchRoute<"POST" | "PUT" | "PATCH" | "DELETE">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;
43
45
  function propagate<Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<"GET" | "HEAD">): Promise<Output>;
@@ -44,12 +44,14 @@ var FetcherBase_1 = require("./internal/FetcherBase");
44
44
  *
45
45
  * `EncryptedFetcher` is a utility class designed for SDK functions generated by
46
46
  * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote
47
- * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a collection of
48
- * dedicated `fetch()` functions for `@nestia/sdk` with encryption.
47
+ * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a
48
+ * collection of dedicated `fetch()` functions for `@nestia/sdk` with
49
+ * encryption.
49
50
  *
50
- * For reference, `EncryptedFetcher` class being used only when target controller
51
- * method is encrypting body data by `@EncryptedRoute` or `@EncryptedBody` decorators.
52
- * If those decorators are not used, {@link PlainFetcher} class would be used instead.
51
+ * For reference, `EncryptedFetcher` class being used only when target
52
+ * controller method is encrypting body data by `@EncryptedRoute` or
53
+ * `@EncryptedBody` decorators. If those decorators are not used,
54
+ * {@link PlainFetcher} class would be used instead.
53
55
  *
54
56
  * @author Jeongho Nam - https://github.com/samchon
55
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"EncryptedFetcher.js","sourceRoot":"","sources":["../src/EncryptedFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAKtC,sDAAqD;AAErD;;;;;;;;;;;;;GAaG;AACH,IAAiB,gBAAgB,CAwJhC;AAxJD,WAAiB,gBAAgB;IAuC/B,SAAsB,KAAK,CACzB,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC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AAK,EAAE,SAAS,CAAoB,EAAC;;;KAC5D;IAjDqB,0BAAS,YAiD9B,CAAA;AACH,CAAC,EAxJgB,gBAAgB,gCAAhB,gBAAgB,QAwJhC"}
@@ -2,30 +2,27 @@
2
2
  * FormData input type.
3
3
  *
4
4
  * `FormDataInput<T>` is a type for the input of the `FormData` request, casting
5
- * `File` property value type as an union of `File` and {@link FormDataInput.IFileProps},
6
- * especially for the React Native environment.
5
+ * `File` property value type as an union of `File` and
6
+ * {@link FormDataInput.IFileProps}, especially for the React Native
7
+ * environment.
7
8
  *
8
- * You know what? In the React Native environment, `File` class is not supported.
9
- * Therefore, when composing a `FormData` request, you have to put the URI address
10
- * of the local filesystem with file name and content type that is represented by the
11
- * {@link FormDataInput.IFileProps} type.
9
+ * You know what? In the React Native environment, `File` class is not
10
+ * supported. Therefore, when composing a `FormData` request, you have to put
11
+ * the URI address of the local filesystem with file name and content type that
12
+ * is represented by the {@link FormDataInput.IFileProps} type.
12
13
  *
13
- * This `FormDataInput<T>` type is designed for that purpose. If the property value
14
- * type is a `File` class, it converts it to an union type of `File` and
15
- * {@link FormDataInput.IFileProps} type. Also, if the property value type is an array
16
- * of `File` class, it converts it to an array of union type of `File` and
14
+ * This `FormDataInput<T>` type is designed for that purpose. If the property
15
+ * value type is a `File` class, it converts it to an union type of `File` and
16
+ * {@link FormDataInput.IFileProps} type. Also, if the property value type is an
17
+ * array of `File` class, it converts it to an array of union type of `File` and
17
18
  * {@link FormDataInput.IFileProps} type too.
18
19
  *
19
- * Before | After
20
- * ----------|------------------------
21
- * `boolean` | `boolean`
22
- * `bigint` | `bigint`
23
- * `number` | `number`
24
- * `string` | `string`
25
- * `File` | `File \| IFileProps`
20
+ * Before | After ----------|------------------------ `boolean` | `boolean`
21
+ * `bigint` | `bigint` `number` | `number` `string` | `string` `File` | `File \|
22
+ * IFileProps`
26
23
  *
27
- * @template T Target object type.
28
24
  * @author Jeongho Nam - https://github.com/samchon
25
+ * @template T Target object type.
29
26
  */
30
27
  export type FormDataInput<T extends object> = T extends Array<any> ? never : T extends Function ? never : {
31
28
  [P in keyof T]: T[P] extends Array<infer U> ? FormDataInput.Value<U>[] : FormDataInput.Value<T[P]>;
@@ -36,24 +33,24 @@ export declare namespace FormDataInput {
36
33
  *
37
34
  * `Value<T>` is a type for the property value defined in the `FormDataInput`.
38
35
  *
39
- * If the original value type is a `File` class, `Value<T>` converts it to an union
40
- * type of `File` and {@link IFileProps} type which is a structured data for the
41
- * URI file location in the React Native environment.
36
+ * If the original value type is a `File` class, `Value<T>` converts it to an
37
+ * union type of `File` and {@link IFileProps} type which is a structured data
38
+ * for the URI file location in the React Native environment.
42
39
  */
43
40
  type Value<T> = T extends File ? T | IFileProps : T;
44
41
  /**
45
42
  * Properties of a file.
46
43
  *
47
- * In the React Native, this `IFileProps` structured data can replace the `File`
48
- * class instance in the `FormData` request.
44
+ * In the React Native, this `IFileProps` structured data can replace the
45
+ * `File` class instance in the `FormData` request.
49
46
  *
50
- * Just put the {@link uri URI address} of the local file system with the file's
51
- * {@link name} and {@link type}. It would be casted to the `File` class instance
52
- * automatically in the `FormData` request.
47
+ * Just put the {@link uri URI address} of the local file system with the
48
+ * file's {@link name} and {@link type}. It would be casted to the `File` class
49
+ * instance automatically in the `FormData` request.
53
50
  *
54
- * Note that, this `IFileProps` type works only in the React Native environment.
55
- * If you are developing a Web or NodeJS application, you have to utilize the
56
- * `File` class instance directly.
51
+ * Note that, this `IFileProps` type works only in the React Native
52
+ * environment. If you are developing a Web or NodeJS application, you have to
53
+ * utilize the `File` class instance directly.
57
54
  */
58
55
  interface IFileProps {
59
56
  /**
@@ -65,13 +62,9 @@ export declare namespace FormDataInput {
65
62
  * @format uri
66
63
  */
67
64
  uri: string;
68
- /**
69
- * Name of the file.
70
- */
65
+ /** Name of the file. */
71
66
  name: string;
72
- /**
73
- * Content type of the file.
74
- */
67
+ /** Content type of the file. */
75
68
  type: string;
76
69
  }
77
70
  }
@@ -2,30 +2,26 @@ import { IConnection } from "./IConnection";
2
2
  /**
3
3
  * Encryption password.
4
4
  *
5
- * `IEncryptionPassword` is a type of interface who represents encryption password used by
6
- * the {@link Fetcher} with AES-128/256 algorithm. If your encryption password is not fixed
7
- * but changes according to the input content, you can utilize the
8
- * {@link IEncryptionPassword.Closure} function type.
5
+ * `IEncryptionPassword` is a type of interface who represents encryption
6
+ * password used by the {@link Fetcher} with AES-128/256 algorithm. If your
7
+ * encryption password is not fixed but changes according to the input content,
8
+ * you can utilize the {@link IEncryptionPassword.Closure} function type.
9
9
  *
10
10
  * @author Jeongho Nam - https://github.com/samchon
11
11
  */
12
12
  export interface IEncryptionPassword {
13
- /**
14
- * Secret key.
15
- */
13
+ /** Secret key. */
16
14
  key: string;
17
- /**
18
- * Initialization Vector.
19
- */
15
+ /** Initialization Vector. */
20
16
  iv: string;
21
17
  }
22
18
  export declare namespace IEncryptionPassword {
23
19
  /**
24
20
  * Type of a closure function returning the {@link IEncryptionPassword} object.
25
21
  *
26
- * `IEncryptionPassword.Closure` is a type of closure function who are returning the
27
- * {@link IEncryptionPassword} object. It would be used when your encryption password
28
- * be changed according to the input content.
22
+ * `IEncryptionPassword.Closure` is a type of closure function who are
23
+ * returning the {@link IEncryptionPassword} object. It would be used when your
24
+ * encryption password be changed according to the input content.
29
25
  */
30
26
  interface Closure {
31
27
  /**
@@ -36,9 +32,7 @@ export declare namespace IEncryptionPassword {
36
32
  */
37
33
  (props: IProps): IEncryptionPassword;
38
34
  }
39
- /**
40
- * Properties for the closure.
41
- */
35
+ /** Properties for the closure. */
42
36
  interface IProps {
43
37
  headers: Record<string, IConnection.HeaderValue | undefined>;
44
38
  body: string;
@@ -4,13 +4,9 @@
4
4
  * @author Jeongho Nam - https://github.com/samchon
5
5
  */
6
6
  export interface IFetchRoute<Method extends "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE"> {
7
- /**
8
- * Method of the HTTP request.
9
- */
7
+ /** Method of the HTTP request. */
10
8
  method: Method;
11
- /**
12
- * Path of the HTTP request.
13
- */
9
+ /** Path of the HTTP request. */
14
10
  path: string;
15
11
  /**
16
12
  * Path template.
@@ -18,17 +14,11 @@ export interface IFetchRoute<Method extends "HEAD" | "GET" | "POST" | "PUT" | "P
18
14
  * Filled since 3.2.2 version.
19
15
  */
20
16
  template?: string;
21
- /**
22
- * Request body data info.
23
- */
17
+ /** Request body data info. */
24
18
  request: Method extends "DELETE" | "POST" | "PUT" | "PATCH" ? IFetchRoute.IBody | null : null;
25
- /**
26
- * Response body data info.
27
- */
19
+ /** Response body data info. */
28
20
  response: Method extends "HEAD" ? null : IFetchRoute.IBody;
29
- /**
30
- * When special status code being used.
31
- */
21
+ /** When special status code being used. */
32
22
  status: number | null;
33
23
  /**
34
24
  * Parser of the query string.
@@ -37,8 +27,8 @@ export interface IFetchRoute<Method extends "HEAD" | "GET" | "POST" | "PUT" | "P
37
27
  * then this `parseQuery` function would be called.
38
28
  *
39
29
  * If you've forgotten to configuring this `parseQuery` property about the
40
- * `application/x-www-form-urlencoded` typed response body data, then
41
- * only the `URLSearchParams` typed instance would be returned instead.
30
+ * `application/x-www-form-urlencoded` typed response body data, then only the
31
+ * `URLSearchParams` typed instance would be returned instead.
42
32
  */
43
33
  parseQuery?(input: URLSearchParams): any;
44
34
  }
@@ -46,7 +36,8 @@ export declare namespace IFetchRoute {
46
36
  /**
47
37
  * Metadata of body.
48
38
  *
49
- * Describes how content-type being used in body, and whether encrypted or not.
39
+ * Describes how content-type being used in body, and whether encrypted or
40
+ * not.
50
41
  */
51
42
  interface IBody {
52
43
  type: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
@@ -24,14 +24,15 @@
24
24
  * }
25
25
  * ```
26
26
  *
27
- * For reference, this `IPropagation` type is utilized by SDK library generated by
28
- * `@nestia/sdk`, when you've configured {@link INestiaConfig.propagate} to be `true`.
29
- * In that case, SDK functions generated by `@nestia/sdk` no more returns response DTO
30
- * typed data directly, but returns this `IPropagation` typed object instead.
27
+ * For reference, this `IPropagation` type is utilized by SDK library generated
28
+ * by `@nestia/sdk`, when you've configured {@link INestiaConfig.propagate} to be
29
+ * `true`. In that case, SDK functions generated by `@nestia/sdk` no more
30
+ * returns response DTO typed data directly, but returns this `IPropagation`
31
+ * typed object instead.
31
32
  *
33
+ * @author Jeongho Nam - https://github.com/samchon
32
34
  * @template StatusMap Map of status code and its body data type.
33
35
  * @template Success Default success status code.
34
- * @author Jeongho Nam - https://github.com/samchon
35
36
  */
36
37
  export type IPropagation<StatusMap extends {
37
38
  [P in IPropagation.Status]?: any;
@@ -42,17 +43,17 @@ export declare namespace IPropagation {
42
43
  /**
43
44
  * Type of configurable status codes.
44
45
  *
45
- * The special characters like `2XX`, `3XX`, `4XX`, `5XX` are meaning the range
46
- * of status codes. If `5XX` is specified, it means the status code is in the
47
- * range of `500` to `599`.
46
+ * The special characters like `2XX`, `3XX`, `4XX`, `5XX` are meaning the
47
+ * range of status codes. If `5XX` is specified, it means the status code is
48
+ * in the range of `500` to `599`.
48
49
  */
49
50
  export type Status = number | "2XX" | "3XX" | "4XX" | "5XX";
50
51
  /**
51
52
  * Branch type of propagation.
52
53
  *
53
54
  * `IPropagation.IBranch` is a branch type composing `IPropagation` type,
54
- * which is gathering all possible status codes and their body data types
55
- * as a union type.
55
+ * which is gathering all possible status codes and their body data types as a
56
+ * union type.
56
57
  */
57
58
  export interface IBranch<Success extends boolean, StatusValue, BodyData> {
58
59
  success: Success;
@@ -60,9 +61,7 @@ export declare namespace IPropagation {
60
61
  data: BodyData;
61
62
  headers: Record<string, string | string[]>;
62
63
  }
63
- /**
64
- * Range of status codes by the first digit.
65
- */
64
+ /** Range of status codes by the first digit. */
66
65
  export type StatusRange<T extends "2XX" | "3XX" | "4XX" | "5XX"> = T extends 0 ? IntRange<200, 299> : T extends 3 ? IntRange<300, 399> : T extends 4 ? IntRange<400, 499> : IntRange<500, 599>;
67
66
  type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
68
67
  type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
@@ -22,7 +22,7 @@ export declare namespace PlainFetcher {
22
22
  *
23
23
  * @param connection Connection information for the remote HTTP server
24
24
  * @param route Route information about the target API
25
- * @return Nothing because of `HEAD` method
25
+ * @returns Nothing because of `HEAD` method
26
26
  */
27
27
  function fetch(connection: IConnection, route: IFetchRoute<"HEAD">): Promise<void>;
28
28
  /**
@@ -30,7 +30,7 @@ export declare namespace PlainFetcher {
30
30
  *
31
31
  * @param connection Connection information for the remote HTTP server
32
32
  * @param route Route information about the target API
33
- * @return Response body data from the remote API
33
+ * @returns Response body data from the remote API
34
34
  */
35
35
  function fetch<Output>(connection: IConnection, route: IFetchRoute<"GET">): Promise<Output>;
36
36
  /**
@@ -38,7 +38,7 @@ export declare namespace PlainFetcher {
38
38
  *
39
39
  * @param connection Connection information for the remote HTTP server
40
40
  * @param route Route information about the target API
41
- * @return Response body data from the remote API
41
+ * @returns Response body data from the remote API
42
42
  */
43
43
  function fetch<Input, Output>(connection: IConnection, route: IFetchRoute<"POST" | "PUT" | "PATCH" | "DELETE">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;
44
44
  function propagate<Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<"GET" | "HEAD">): Promise<Output>;
@@ -85,9 +85,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
85
85
  Object.defineProperty(exports, "__esModule", { value: true });
86
86
  exports.FetcherBase = void 0;
87
87
  var HttpError_1 = require("../HttpError");
88
- /**
89
- * @internal
90
- */
88
+ /** @internal */
91
89
  var FetcherBase;
92
90
  (function (FetcherBase) {
93
91
  var _this = this;
@@ -111,9 +109,7 @@ var FetcherBase;
111
109
  return [2 /*return*/, _Propagate("propagate")(props)(connection, route, input, stringify)];
112
110
  }); }); };
113
111
  };
114
- /**
115
- * @internal
116
- */
112
+ /** @internal */
117
113
  var _Propagate = function (method) {
118
114
  return function (props) {
119
115
  return function (connection, route, input, stringify) { return __awaiter(_this, void 0, void 0, function () {
@@ -277,9 +273,7 @@ var FetcherBase;
277
273
  };
278
274
  };
279
275
  })(FetcherBase || (exports.FetcherBase = FetcherBase = {}));
280
- /**
281
- * @internal
282
- */
276
+ /** @internal */
283
277
  var request_query_body = function (input) {
284
278
  var e_3, _a;
285
279
  var q = new URLSearchParams();
@@ -306,9 +300,7 @@ var request_query_body = function (input) {
306
300
  }
307
301
  return q;
308
302
  };
309
- /**
310
- * @internal
311
- */
303
+ /** @internal */
312
304
  var request_form_data_body = function (input) {
313
305
  var e_4, _a;
314
306
  var encoded = new FormData();
@@ -338,9 +330,7 @@ var request_form_data_body = function (input) {
338
330
  }
339
331
  return encoded;
340
332
  };
341
- /**
342
- * @internal
343
- */
333
+ /** @internal */
344
334
  var response_headers_to_object = function (headers) {
345
335
  var output = {};
346
336
  headers.forEach(function (value, key) {
@@ -1 +1 @@
1
- {"version":3,"file":"FetcherBase.js","sourceRoot":"","sources":["../../src/internal/FetcherBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAyC;AAMzC;;GAEG;AACH,IAAiB,WAAW,CA2L3B;AA3LD,WAAiB,WAAW;;IAab,mBAAO,GAClB,UAAC,KAAa;QACd,OAAA,UACE,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;;;;4BAErB,qBAAM,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAC7C,UAAU,EACV,KAAK,EACL,KAAK,EACL,SAAS,CACV,EAAA;;wBALK,MAAM,GAAG,SAKd;wBACD,IAAK,MAAc,CAAC,OAAO,KAAK,KAAK;4BACnC,MAAM,IAAI,qBAAS,CACjB,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,EACV,MAAM,CAAC,MAAuB,EAC9B,MAAM,CAAC,OAAO,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,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"FetcherBase.js","sourceRoot":"","sources":["../../src/internal/FetcherBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAyC;AAMzC,gBAAgB;AAChB,IAAiB,WAAW,CAyL3B;AAzLD,WAAiB,WAAW;;IAab,mBAAO,GAClB,UAAC,KAAa;QACd,OAAA,UACE,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;;;;4BAErB,qBAAM,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAC7C,UAAU,EACV,KAAK,EACL,KAAK,EACL,SAAS,CACV,EAAA;;wBALK,MAAM,GAAG,SAKd;wBACD,IAAK,MAAc,CAAC,OAAO,KAAK,KAAK;4BACnC,MAAM,IAAI,qBAAS,CACjB,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,EACV,MAAM,CAAC,MAAuB,EAC9B,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,IAAc,CACtB,CAAC;wBACJ,sBAAO,MAAM,CAAC,IAAc,EAAC;;;aAC9B;IArBD,CAqBC,CAAC;IAES,qBAAS,GACpB,UAAC,KAAa;QACd,OAAA,UACE,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;YAEpC,sBAAA,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAA;iBAAA;IANrE,CAMqE,CAAC;IAExE,gBAAgB;IAChB,IAAM,UAAU,GACd,UAAC,MAAc;QACf,OAAA,UAAC,KAAa;YACd,OAAA,UACE,UAAuB,EACvB,KAAwE,EACxE,KAAa,EACb,SAAoC;;;;;;4BAM9B,OAAO,gBACR,CAAC,MAAA,UAAU,CAAC,OAAO,mCAAI,EA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AAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;;gBAC5C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;SAAA;;;;;;;;;IAC1B,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,gBAAgB;AAChB,IAAM,0BAA0B,GAAG,UACjC,OAAgB;IAEhB,IAAM,MAAM,GAAsC,EAAE,CAAC;IACrD,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;;;QACzB,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;YACzB,MAAA,MAAM,CAAC,GAAG,qCAAV,MAAM,CAAC,GAAG,IAAM,EAAE,EAAC;YACnB,CAAA,KAAC,MAAM,CAAC,GAAG,CAAc,CAAA,CAAC,IAAI,oCACzB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC,WAC5C;QACJ,CAAC;;YAAM,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/fetcher",
3
- "version": "7.3.1",
3
+ "version": "7.3.3",
4
4
  "description": "Fetcher library of Nestia SDK",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "@typescript-eslint/eslint-plugin": "^5.46.1",
34
34
  "@typescript-eslint/parser": "^5.46.1",
35
35
  "rimraf": "^6.0.1",
36
- "typescript": "~5.8.3"
36
+ "typescript": "~5.9.2"
37
37
  },
38
38
  "files": [
39
39
  "README.md",
@@ -10,12 +10,14 @@ import { FetcherBase } from "./internal/FetcherBase";
10
10
  *
11
11
  * `EncryptedFetcher` is a utility class designed for SDK functions generated by
12
12
  * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote
13
- * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a collection of
14
- * dedicated `fetch()` functions for `@nestia/sdk` with encryption.
13
+ * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a
14
+ * collection of dedicated `fetch()` functions for `@nestia/sdk` with
15
+ * encryption.
15
16
  *
16
- * For reference, `EncryptedFetcher` class being used only when target controller
17
- * method is encrypting body data by `@EncryptedRoute` or `@EncryptedBody` decorators.
18
- * If those decorators are not used, {@link PlainFetcher} class would be used instead.
17
+ * For reference, `EncryptedFetcher` class being used only when target
18
+ * controller method is encrypting body data by `@EncryptedRoute` or
19
+ * `@EncryptedBody` decorators. If those decorators are not used,
20
+ * {@link PlainFetcher} class would be used instead.
19
21
  *
20
22
  * @author Jeongho Nam - https://github.com/samchon
21
23
  */
@@ -25,7 +27,7 @@ export namespace EncryptedFetcher {
25
27
  *
26
28
  * @param connection Connection information for the remote HTTP server
27
29
  * @param route Route information about the target API
28
- * @return Nothing because of `HEAD` method
30
+ * @returns Nothing because of `HEAD` method
29
31
  */
30
32
  export function fetch(
31
33
  connection: IConnection,
@@ -37,7 +39,7 @@ export namespace EncryptedFetcher {
37
39
  *
38
40
  * @param connection Connection information for the remote HTTP server
39
41
  * @param route Route information about the target API
40
- * @return Response body data from the remote API
42
+ * @returns Response body data from the remote API
41
43
  */
42
44
  export function fetch<Output>(
43
45
  connection: IConnection,
@@ -49,7 +51,7 @@ export namespace EncryptedFetcher {
49
51
  *
50
52
  * @param connection Connection information for the remote HTTP server
51
53
  * @param route Route information about the target API
52
- * @return Response body data from the remote API
54
+ * @returns Response body data from the remote API
53
55
  */
54
56
  export function fetch<Input, Output>(
55
57
  connection: IConnection,
@@ -2,30 +2,27 @@
2
2
  * FormData input type.
3
3
  *
4
4
  * `FormDataInput<T>` is a type for the input of the `FormData` request, casting
5
- * `File` property value type as an union of `File` and {@link FormDataInput.IFileProps},
6
- * especially for the React Native environment.
5
+ * `File` property value type as an union of `File` and
6
+ * {@link FormDataInput.IFileProps}, especially for the React Native
7
+ * environment.
7
8
  *
8
- * You know what? In the React Native environment, `File` class is not supported.
9
- * Therefore, when composing a `FormData` request, you have to put the URI address
10
- * of the local filesystem with file name and content type that is represented by the
11
- * {@link FormDataInput.IFileProps} type.
9
+ * You know what? In the React Native environment, `File` class is not
10
+ * supported. Therefore, when composing a `FormData` request, you have to put
11
+ * the URI address of the local filesystem with file name and content type that
12
+ * is represented by the {@link FormDataInput.IFileProps} type.
12
13
  *
13
- * This `FormDataInput<T>` type is designed for that purpose. If the property value
14
- * type is a `File` class, it converts it to an union type of `File` and
15
- * {@link FormDataInput.IFileProps} type. Also, if the property value type is an array
16
- * of `File` class, it converts it to an array of union type of `File` and
14
+ * This `FormDataInput<T>` type is designed for that purpose. If the property
15
+ * value type is a `File` class, it converts it to an union type of `File` and
16
+ * {@link FormDataInput.IFileProps} type. Also, if the property value type is an
17
+ * array of `File` class, it converts it to an array of union type of `File` and
17
18
  * {@link FormDataInput.IFileProps} type too.
18
19
  *
19
- * Before | After
20
- * ----------|------------------------
21
- * `boolean` | `boolean`
22
- * `bigint` | `bigint`
23
- * `number` | `number`
24
- * `string` | `string`
25
- * `File` | `File \| IFileProps`
20
+ * Before | After ----------|------------------------ `boolean` | `boolean`
21
+ * `bigint` | `bigint` `number` | `number` `string` | `string` `File` | `File \|
22
+ * IFileProps`
26
23
  *
27
- * @template T Target object type.
28
24
  * @author Jeongho Nam - https://github.com/samchon
25
+ * @template T Target object type.
29
26
  */
30
27
  export type FormDataInput<T extends object> =
31
28
  T extends Array<any>
@@ -43,25 +40,25 @@ export namespace FormDataInput {
43
40
  *
44
41
  * `Value<T>` is a type for the property value defined in the `FormDataInput`.
45
42
  *
46
- * If the original value type is a `File` class, `Value<T>` converts it to an union
47
- * type of `File` and {@link IFileProps} type which is a structured data for the
48
- * URI file location in the React Native environment.
43
+ * If the original value type is a `File` class, `Value<T>` converts it to an
44
+ * union type of `File` and {@link IFileProps} type which is a structured data
45
+ * for the URI file location in the React Native environment.
49
46
  */
50
47
  export type Value<T> = T extends File ? T | IFileProps : T;
51
48
 
52
49
  /**
53
50
  * Properties of a file.
54
51
  *
55
- * In the React Native, this `IFileProps` structured data can replace the `File`
56
- * class instance in the `FormData` request.
52
+ * In the React Native, this `IFileProps` structured data can replace the
53
+ * `File` class instance in the `FormData` request.
57
54
  *
58
- * Just put the {@link uri URI address} of the local file system with the file's
59
- * {@link name} and {@link type}. It would be casted to the `File` class instance
60
- * automatically in the `FormData` request.
55
+ * Just put the {@link uri URI address} of the local file system with the
56
+ * file's {@link name} and {@link type}. It would be casted to the `File` class
57
+ * instance automatically in the `FormData` request.
61
58
  *
62
- * Note that, this `IFileProps` type works only in the React Native environment.
63
- * If you are developing a Web or NodeJS application, you have to utilize the
64
- * `File` class instance directly.
59
+ * Note that, this `IFileProps` type works only in the React Native
60
+ * environment. If you are developing a Web or NodeJS application, you have to
61
+ * utilize the `File` class instance directly.
65
62
  */
66
63
  export interface IFileProps {
67
64
  /**
@@ -74,14 +71,10 @@ export namespace FormDataInput {
74
71
  */
75
72
  uri: string;
76
73
 
77
- /**
78
- * Name of the file.
79
- */
74
+ /** Name of the file. */
80
75
  name: string;
81
76
 
82
- /**
83
- * Content type of the file.
84
- */
77
+ /** Content type of the file. */
85
78
  type: string;
86
79
  }
87
80
  }
@@ -3,31 +3,27 @@ import { IConnection } from "./IConnection";
3
3
  /**
4
4
  * Encryption password.
5
5
  *
6
- * `IEncryptionPassword` is a type of interface who represents encryption password used by
7
- * the {@link Fetcher} with AES-128/256 algorithm. If your encryption password is not fixed
8
- * but changes according to the input content, you can utilize the
9
- * {@link IEncryptionPassword.Closure} function type.
6
+ * `IEncryptionPassword` is a type of interface who represents encryption
7
+ * password used by the {@link Fetcher} with AES-128/256 algorithm. If your
8
+ * encryption password is not fixed but changes according to the input content,
9
+ * you can utilize the {@link IEncryptionPassword.Closure} function type.
10
10
  *
11
11
  * @author Jeongho Nam - https://github.com/samchon
12
12
  */
13
13
  export interface IEncryptionPassword {
14
- /**
15
- * Secret key.
16
- */
14
+ /** Secret key. */
17
15
  key: string;
18
16
 
19
- /**
20
- * Initialization Vector.
21
- */
17
+ /** Initialization Vector. */
22
18
  iv: string;
23
19
  }
24
20
  export namespace IEncryptionPassword {
25
21
  /**
26
22
  * Type of a closure function returning the {@link IEncryptionPassword} object.
27
23
  *
28
- * `IEncryptionPassword.Closure` is a type of closure function who are returning the
29
- * {@link IEncryptionPassword} object. It would be used when your encryption password
30
- * be changed according to the input content.
24
+ * `IEncryptionPassword.Closure` is a type of closure function who are
25
+ * returning the {@link IEncryptionPassword} object. It would be used when your
26
+ * encryption password be changed according to the input content.
31
27
  */
32
28
  export interface Closure {
33
29
  /**
@@ -39,9 +35,7 @@ export namespace IEncryptionPassword {
39
35
  (props: IProps): IEncryptionPassword;
40
36
  }
41
37
 
42
- /**
43
- * Properties for the closure.
44
- */
38
+ /** Properties for the closure. */
45
39
  export interface IProps {
46
40
  headers: Record<string, IConnection.HeaderValue | undefined>;
47
41
  body: string;
@@ -6,14 +6,10 @@
6
6
  export interface IFetchRoute<
7
7
  Method extends "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE",
8
8
  > {
9
- /**
10
- * Method of the HTTP request.
11
- */
9
+ /** Method of the HTTP request. */
12
10
  method: Method;
13
11
 
14
- /**
15
- * Path of the HTTP request.
16
- */
12
+ /** Path of the HTTP request. */
17
13
  path: string;
18
14
 
19
15
  /**
@@ -23,21 +19,15 @@ export interface IFetchRoute<
23
19
  */
24
20
  template?: string;
25
21
 
26
- /**
27
- * Request body data info.
28
- */
22
+ /** Request body data info. */
29
23
  request: Method extends "DELETE" | "POST" | "PUT" | "PATCH"
30
24
  ? IFetchRoute.IBody | null
31
25
  : null;
32
26
 
33
- /**
34
- * Response body data info.
35
- */
27
+ /** Response body data info. */
36
28
  response: Method extends "HEAD" ? null : IFetchRoute.IBody;
37
29
 
38
- /**
39
- * When special status code being used.
40
- */
30
+ /** When special status code being used. */
41
31
  status: number | null;
42
32
 
43
33
  /**
@@ -47,8 +37,8 @@ export interface IFetchRoute<
47
37
  * then this `parseQuery` function would be called.
48
38
  *
49
39
  * If you've forgotten to configuring this `parseQuery` property about the
50
- * `application/x-www-form-urlencoded` typed response body data, then
51
- * only the `URLSearchParams` typed instance would be returned instead.
40
+ * `application/x-www-form-urlencoded` typed response body data, then only the
41
+ * `URLSearchParams` typed instance would be returned instead.
52
42
  */
53
43
  parseQuery?(input: URLSearchParams): any;
54
44
  }
@@ -56,7 +46,8 @@ export namespace IFetchRoute {
56
46
  /**
57
47
  * Metadata of body.
58
48
  *
59
- * Describes how content-type being used in body, and whether encrypted or not.
49
+ * Describes how content-type being used in body, and whether encrypted or
50
+ * not.
60
51
  */
61
52
  export interface IBody {
62
53
  type:
@@ -24,14 +24,15 @@
24
24
  * }
25
25
  * ```
26
26
  *
27
- * For reference, this `IPropagation` type is utilized by SDK library generated by
28
- * `@nestia/sdk`, when you've configured {@link INestiaConfig.propagate} to be `true`.
29
- * In that case, SDK functions generated by `@nestia/sdk` no more returns response DTO
30
- * typed data directly, but returns this `IPropagation` typed object instead.
27
+ * For reference, this `IPropagation` type is utilized by SDK library generated
28
+ * by `@nestia/sdk`, when you've configured {@link INestiaConfig.propagate} to be
29
+ * `true`. In that case, SDK functions generated by `@nestia/sdk` no more
30
+ * returns response DTO typed data directly, but returns this `IPropagation`
31
+ * typed object instead.
31
32
  *
33
+ * @author Jeongho Nam - https://github.com/samchon
32
34
  * @template StatusMap Map of status code and its body data type.
33
35
  * @template Success Default success status code.
34
- * @author Jeongho Nam - https://github.com/samchon
35
36
  */
36
37
  export type IPropagation<
37
38
  StatusMap extends {
@@ -51,9 +52,9 @@ export namespace IPropagation {
51
52
  /**
52
53
  * Type of configurable status codes.
53
54
  *
54
- * The special characters like `2XX`, `3XX`, `4XX`, `5XX` are meaning the range
55
- * of status codes. If `5XX` is specified, it means the status code is in the
56
- * range of `500` to `599`.
55
+ * The special characters like `2XX`, `3XX`, `4XX`, `5XX` are meaning the
56
+ * range of status codes. If `5XX` is specified, it means the status code is
57
+ * in the range of `500` to `599`.
57
58
  */
58
59
  export type Status = number | "2XX" | "3XX" | "4XX" | "5XX";
59
60
 
@@ -61,8 +62,8 @@ export namespace IPropagation {
61
62
  * Branch type of propagation.
62
63
  *
63
64
  * `IPropagation.IBranch` is a branch type composing `IPropagation` type,
64
- * which is gathering all possible status codes and their body data types
65
- * as a union type.
65
+ * which is gathering all possible status codes and their body data types as a
66
+ * union type.
66
67
  */
67
68
  export interface IBranch<Success extends boolean, StatusValue, BodyData> {
68
69
  success: Success;
@@ -75,9 +76,7 @@ export namespace IPropagation {
75
76
  headers: Record<string, string | string[]>;
76
77
  }
77
78
 
78
- /**
79
- * Range of status codes by the first digit.
80
- */
79
+ /** Range of status codes by the first digit. */
81
80
  export type StatusRange<T extends "2XX" | "3XX" | "4XX" | "5XX"> = T extends 0
82
81
  ? IntRange<200, 299>
83
82
  : T extends 3
@@ -24,7 +24,7 @@ export namespace PlainFetcher {
24
24
  *
25
25
  * @param connection Connection information for the remote HTTP server
26
26
  * @param route Route information about the target API
27
- * @return Nothing because of `HEAD` method
27
+ * @returns Nothing because of `HEAD` method
28
28
  */
29
29
  export function fetch(
30
30
  connection: IConnection,
@@ -36,7 +36,7 @@ export namespace PlainFetcher {
36
36
  *
37
37
  * @param connection Connection information for the remote HTTP server
38
38
  * @param route Route information about the target API
39
- * @return Response body data from the remote API
39
+ * @returns Response body data from the remote API
40
40
  */
41
41
  export function fetch<Output>(
42
42
  connection: IConnection,
@@ -48,7 +48,7 @@ export namespace PlainFetcher {
48
48
  *
49
49
  * @param connection Connection information for the remote HTTP server
50
50
  * @param route Route information about the target API
51
- * @return Response body data from the remote API
51
+ * @returns Response body data from the remote API
52
52
  */
53
53
  export function fetch<Input, Output>(
54
54
  connection: IConnection,
@@ -4,9 +4,7 @@ import { IFetchEvent } from "../IFetchEvent";
4
4
  import { IFetchRoute } from "../IFetchRoute";
5
5
  import { IPropagation } from "../IPropagation";
6
6
 
7
- /**
8
- * @internal
9
- */
7
+ /** @internal */
10
8
  export namespace FetcherBase {
11
9
  export interface IProps {
12
10
  className: string;
@@ -55,9 +53,7 @@ export namespace FetcherBase {
55
53
  ): Promise<IPropagation<any, any>> =>
56
54
  _Propagate("propagate")(props)(connection, route, input, stringify);
57
55
 
58
- /**
59
- * @internal
60
- */
56
+ /** @internal */
61
57
  const _Propagate =
62
58
  (method: string) =>
63
59
  (props: IProps) =>
@@ -196,9 +192,7 @@ export namespace FetcherBase {
196
192
  };
197
193
  }
198
194
 
199
- /**
200
- * @internal
201
- */
195
+ /** @internal */
202
196
  const request_query_body = (input: any): URLSearchParams => {
203
197
  const q: URLSearchParams = new URLSearchParams();
204
198
  for (const [key, value] of Object.entries(input))
@@ -209,9 +203,7 @@ const request_query_body = (input: any): URLSearchParams => {
209
203
  return q;
210
204
  };
211
205
 
212
- /**
213
- * @internal
214
- */
206
+ /** @internal */
215
207
  const request_form_data_body = (input: Record<string, any>): FormData => {
216
208
  const encoded: FormData = new FormData();
217
209
  const append = (key: string) => (value: any) => {
@@ -226,9 +218,7 @@ const request_form_data_body = (input: Record<string, any>): FormData => {
226
218
  return encoded;
227
219
  };
228
220
 
229
- /**
230
- * @internal
231
- */
221
+ /** @internal */
232
222
  const response_headers_to_object = (
233
223
  headers: Headers,
234
224
  ): Record<string, string | string[]> => {