@nestia/fetcher 1.3.1 → 1.3.2
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/lib/IConnection.d.ts +23 -14
- package/package.json +1 -1
- package/src/IConnection.ts +25 -15
package/lib/IConnection.d.ts
CHANGED
|
@@ -20,26 +20,35 @@ export interface IConnection {
|
|
|
20
20
|
*/
|
|
21
21
|
host: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Header values delivered to the remote HTTP server.
|
|
24
|
+
*/
|
|
25
|
+
headers?: Record<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Encryption password of its closure function.
|
|
28
|
+
*/
|
|
29
|
+
encryption?: IEncryptionPassword | IEncryptionPassword.Closure;
|
|
30
|
+
/**
|
|
31
|
+
* Use simulation mode.
|
|
24
32
|
*
|
|
25
|
-
* If you configure this property to be `true` or an {@link IRandomGenerator}
|
|
33
|
+
* If you configure this property to be `true` or assign an {@link IRandomGenerator}
|
|
26
34
|
* instance, your SDK library does not send any request to remote backend server,
|
|
27
|
-
* but just returns
|
|
35
|
+
* but just returns random data generated by `typia.random<T>()` function with
|
|
36
|
+
* request data validation.
|
|
28
37
|
*
|
|
29
|
-
* By the way, to utilize this
|
|
30
|
-
* {@link INestiaConfig.
|
|
31
|
-
* configure {@link INestiaConfig.
|
|
32
|
-
* SDK library would have a built-in
|
|
38
|
+
* By the way, to utilize this simulation mode, SDK library must be generated with
|
|
39
|
+
* {@link INestiaConfig.simulate} option, too. Open `nestia.config.ts` file, and
|
|
40
|
+
* configure {@link INestiaConfig.simulate} property to be `true`. Them, newly
|
|
41
|
+
* generated SDK library would have a built-in mock-up data generator.
|
|
33
42
|
*
|
|
34
43
|
* @default false
|
|
35
44
|
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Header values delivered to the remote HTTP server.
|
|
39
|
-
*/
|
|
40
|
-
headers?: Record<string, string>;
|
|
45
|
+
simulate?: boolean | Partial<IRandomGenerator>;
|
|
41
46
|
/**
|
|
42
|
-
*
|
|
47
|
+
* Use simulation mode.
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
* @deprecated Use {@link simulate} property instead.
|
|
51
|
+
* This property would be erased after v2.0 update
|
|
43
52
|
*/
|
|
44
|
-
|
|
53
|
+
random?: boolean | Partial<IRandomGenerator>;
|
|
45
54
|
}
|
package/package.json
CHANGED
package/src/IConnection.ts
CHANGED
|
@@ -22,28 +22,38 @@ export interface IConnection {
|
|
|
22
22
|
host: string;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Header values delivered to the remote HTTP server.
|
|
26
|
+
*/
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Encryption password of its closure function.
|
|
31
|
+
*/
|
|
32
|
+
encryption?: IEncryptionPassword | IEncryptionPassword.Closure;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Use simulation mode.
|
|
26
36
|
*
|
|
27
|
-
* If you configure this property to be `true` or an {@link IRandomGenerator}
|
|
37
|
+
* If you configure this property to be `true` or assign an {@link IRandomGenerator}
|
|
28
38
|
* instance, your SDK library does not send any request to remote backend server,
|
|
29
|
-
* but just returns
|
|
39
|
+
* but just returns random data generated by `typia.random<T>()` function with
|
|
40
|
+
* request data validation.
|
|
30
41
|
*
|
|
31
|
-
* By the way, to utilize this
|
|
32
|
-
* {@link INestiaConfig.
|
|
33
|
-
* configure {@link INestiaConfig.
|
|
34
|
-
* SDK library would have a built-in
|
|
42
|
+
* By the way, to utilize this simulation mode, SDK library must be generated with
|
|
43
|
+
* {@link INestiaConfig.simulate} option, too. Open `nestia.config.ts` file, and
|
|
44
|
+
* configure {@link INestiaConfig.simulate} property to be `true`. Them, newly
|
|
45
|
+
* generated SDK library would have a built-in mock-up data generator.
|
|
35
46
|
*
|
|
36
47
|
* @default false
|
|
37
48
|
*/
|
|
38
|
-
|
|
49
|
+
simulate?: boolean | Partial<IRandomGenerator>;
|
|
39
50
|
|
|
40
51
|
/**
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* Encryption password of its closure function.
|
|
52
|
+
* Use simulation mode.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
* @deprecated Use {@link simulate} property instead.
|
|
56
|
+
* This property would be erased after v2.0 update
|
|
47
57
|
*/
|
|
48
|
-
|
|
58
|
+
random?: boolean | Partial<IRandomGenerator>;
|
|
49
59
|
}
|