express-sweet 1.0.11 → 1.0.15

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 (45) hide show
  1. package/CHANGELOG.md +0 -87
  2. package/docs/index.html +345 -295
  3. package/docs/styles/docs.css +5 -10
  4. package/package.json +1 -1
  5. package/dist/build.common.js +0 -53
  6. package/dist/build.esm.js +0 -53
  7. package/types/database/Database.d.ts +0 -162
  8. package/types/database/Model.d.ts +0 -158
  9. package/types/database/index.d.ts +0 -4
  10. package/types/database/loadModels.d.ts +0 -6
  11. package/types/exceptions/ApiError.d.ts +0 -29
  12. package/types/exceptions/index.d.ts +0 -2
  13. package/types/handlebars_helpers/comparison.d.ts +0 -261
  14. package/types/handlebars_helpers/html.d.ts +0 -11
  15. package/types/handlebars_helpers/index.d.ts +0 -5
  16. package/types/handlebars_helpers/object.d.ts +0 -21
  17. package/types/handlebars_helpers/string.d.ts +0 -12
  18. package/types/index.d.ts +0 -9
  19. package/types/interfaces/AuthenticationOptions.d.ts +0 -84
  20. package/types/interfaces/BoundingBox.d.ts +0 -25
  21. package/types/interfaces/Config.d.ts +0 -66
  22. package/types/interfaces/DatabaseOptions.d.ts +0 -7
  23. package/types/interfaces/FaceMatch.d.ts +0 -31
  24. package/types/interfaces/RekognitionOptions.d.ts +0 -26
  25. package/types/interfaces/ViewOptions.d.ts +0 -30
  26. package/types/interfaces/index.d.ts +0 -8
  27. package/types/middlewares/Authentication.d.ts +0 -16
  28. package/types/middlewares/CORS.d.ts +0 -16
  29. package/types/middlewares/Environment.d.ts +0 -17
  30. package/types/middlewares/ErrorHandling.d.ts +0 -16
  31. package/types/middlewares/Global.d.ts +0 -13
  32. package/types/middlewares/Http.d.ts +0 -16
  33. package/types/middlewares/Local.d.ts +0 -20
  34. package/types/middlewares/View.d.ts +0 -16
  35. package/types/middlewares/index.d.ts +0 -8
  36. package/types/mount.d.ts +0 -7
  37. package/types/package.d.ts +0 -91
  38. package/types/routing/Router.d.ts +0 -19
  39. package/types/routing/index.d.ts +0 -2
  40. package/types/services/AWSRekognitionClient.d.ts +0 -359
  41. package/types/services/Authentication.d.ts +0 -39
  42. package/types/services/RedisClient.d.ts +0 -80
  43. package/types/services/index.d.ts +0 -3
  44. package/types/utils/Types.d.ts +0 -16
  45. package/types/utils/index.d.ts +0 -2
@@ -1,359 +0,0 @@
1
- import RekognitionOptions from '~/interfaces/RekognitionOptions';
2
- import FaceMatch from '~/interfaces/FaceMatch';
3
- import BoundingBox from '~/interfaces/BoundingBox';
4
- /**
5
- * AWS Rekognition Client.
6
- */
7
- export default class {
8
- /**
9
- * Rekognition client instance.
10
- * @type {AWS.Rekognition}
11
- */
12
- private client;
13
- /**
14
- * Constructs a rekognition client object.
15
- */
16
- constructor(opts: RekognitionOptions);
17
- /**
18
- * Detects faces within an image that is provided as input.
19
- * For each face detected, the operation returns a bounding box of the face.
20
- *
21
- * @example
22
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
23
- * const fs = require('fs');
24
- *
25
- * // Instantiate Rekognition client.
26
- * const client = new AWSRekognitionClient({
27
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
28
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
29
- * region: process.env.AWS_REKOGNITION_REGION
30
- * });
31
- *
32
- * // Detect faces from path.
33
- * // Output: [
34
- * // {
35
- * // width: 0.5004957914352417,
36
- * // height: 0.6926820874214172,
37
- * // left: 0.2928674817085266,
38
- * // top: 0.09095800668001175
39
- * // }
40
- * // ]
41
- * await client.detectFaces('img.jpg');
42
- *
43
- * // Detect faces from data URL.
44
- * await client.detectFaces('data:image/png;base64,/9j/4...');
45
- *
46
- * // Detect faces from buffer.
47
- * await client.detectFaces(fs.readFileSync('img.jpg'));
48
- *
49
- * @param {string} img Image path or Data Url or image buffer.
50
- * @param {number} minConfidence The minimum confidence of the detected face.
51
- * Faces with a confidence lower than this value will not be returned as a result.
52
- * @return {Promise<BoundingBox[]>} Returns the bounding box of the detected face.
53
- */
54
- detectFaces(img: string, minConfidence?: number): Promise<BoundingBox[]>;
55
- /**
56
- * Compare the similarity of two faces.
57
- *
58
- * @example
59
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
60
- * const fs = require('fs');
61
- *
62
- * // Instantiate Rekognition client.
63
- * const client = new AWSRekognitionClient({
64
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
65
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
66
- * region: process.env.AWS_REKOGNITION_REGION
67
- * });
68
- *
69
- * // Compare faces from path.
70
- * await client.compareFaces('img1.jpg', 'img2.jpg');
71
- *
72
- * // Compare faces from data URL.
73
- * await client.compareFaces('data:image/png;base64,/9j/4...', 'data:image/png;base64,/9j/4...');
74
- *
75
- * // Compare faces from buffer.
76
- * await client.compareFaces(fs.readFileSync('img1.jpg'), fs.readFileSync('img1.jpg'));
77
- *
78
- * @param {string} img1 Image path or Data Url or image buffer.
79
- * @param {string} img2 Image path or Data Url or image buffer.
80
- * @return {Promise<number>} Level of confidence that the faces match.
81
- */
82
- compareFaces(img1: string, img2: string): Promise<number>;
83
- /**
84
- * Add faces to the collection using the IndexFaces operation.
85
- * For example, you might create collections, one for each of your application users.
86
- * A user can then index faces using the IndexFaces operation and persist results in a specific collection.
87
- * Then, a user can search the collection for faces in the user-specific container.
88
- * Note that Collection names are case-sensitive.
89
- *
90
- * @example
91
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
92
- *
93
- * // Instantiate Rekognition client.
94
- * const client = new AWSRekognitionClient({
95
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
96
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
97
- * region: process.env.AWS_REKOGNITION_REGION
98
- * });
99
- *
100
- * try {
101
- * // Creates a collection.
102
- * await client.createCollection('MyCollection');
103
- * } catch (e) {
104
- * // You can get the resulting HTTP status code from the exception.
105
- * console.log(`name: ${e.name}`);
106
- * console.log(`statusCode: ${e.statusCode}`);
107
- * console.log(`message: ${e.message}`);
108
- * }
109
- *
110
- * @param {string} collectionId ID for the collection that you are creating.
111
- * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-]+".
112
- */
113
- createCollection(collectionId: string): Promise<void>;
114
- /**
115
- * Returns list of collection IDs.
116
- *
117
- * @example
118
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
119
- *
120
- * // Instantiate Rekognition client.
121
- * const client = new AWSRekognitionClient({
122
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
123
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
124
- * region: process.env.AWS_REKOGNITION_REGION
125
- * });
126
- *
127
- * // Find the collection IDs.
128
- * // Output: [
129
- * // 'MyCollection',
130
- * // 'AnotherCollection'
131
- * // ]
132
- * await client.listCollections();
133
- *
134
- * @return {Promise<string[]>} An array of collection IDs.
135
- */
136
- listCollections(): Promise<string[]>;
137
- /**
138
- * Detects one face in the input image and adds it to the specified collection.
139
- * This method doesn't save the actual faces that are detected.
140
- * Instead, the underlying detection algorithm first detects the faces in the input image.
141
- * The algorithm extracts facial features into a feature vector, and stores it in the backend database.
142
- *
143
- * Note that this method is used to index one face.
144
- * Throws an exception if no face is found in the input image or multiple faces are found.
145
- *
146
- * @example
147
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
148
- * const fs = require('fs');
149
- *
150
- * // Instantiate Rekognition client.
151
- * const client = new AWSRekognitionClient({
152
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
153
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
154
- * region: process.env.AWS_REKOGNITION_REGION
155
- * });
156
- *
157
- * // Add face to collection from path.
158
- * // Output: df8adc94-e888-4442-a03d-42aacd4a6cee
159
- * const faceId = await client.indexFace('MyCollection', 'img.jpg', 'img.jpg');
160
- * console.log(faceId);
161
- *
162
- * // Add face to collection from data URL.
163
- * // Output: df8adc94-e888-4442-a03d-42aacd4a6cee
164
- * const faceId = await client.indexFace('MyCollection', 'data:image/png;base64,/9j/4...', 'img.jpg');
165
- * console.log(faceId);
166
- *
167
- * // Add face to collection from buffer.
168
- * // Output: df8adc94-e888-4442-a03d-42aacd4a6cee
169
- * const faceId = await client.indexFace('MyCollection', fs.readFileSync('img.jpg'), 'img.jpg');
170
- * console.log(faceId);
171
- *
172
- * // If the face is not found in the image, throw an error.
173
- * // Output: name: IndexFaceFaceNotFound
174
- * // statusCode: 400
175
- * // message: No face was found in the image
176
- * try {
177
- * await client.indexFace('MyCollection', 'img.jpg');
178
- * } catch (e) {
179
- * // You can get the resulting HTTP status code from the exception.
180
- * console.log(`name: ${e.name}`);
181
- * console.log(`statusCode: ${e.statusCode}`);
182
- * console.log(`message: ${e.message}`);
183
- * }
184
- *
185
- * // If multiple faces are found in the image, throw an error.
186
- * // Output: name: IndexFaceMultipleFacesFound
187
- * // statusCode: 400
188
- * // message: Multiple faces found in the image
189
- * try {
190
- * await client.indexFace('MyCollection', 'img.jpg');
191
- * } catch (e) {
192
- * // You can get the resulting HTTP status code from the exception.
193
- * console.log(`name: ${e.name}`);
194
- * console.log(`statusCode: ${e.statusCode}`);
195
- * console.log(`message: ${e.message}`);
196
- * }
197
- *
198
- * @param {string} collectionId The ID of an existing collection to which you want to add the faces that are detected in the input images.
199
- * @param {string} img Image path or Data Url or image buffer.
200
- * @param {string} externalImageId The ID you want to assign to the faces detected in the image.
201
- * When you call the "listFaces" operation, the response returns the external ID.
202
- * You can use this external image ID to create a client-side index to associate the faces with each image.
203
- * You can then use the index to find all faces in an image.
204
- * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-:]+".
205
- * @return {Promise<string>} A unique identifier assigned to the face.
206
- */
207
- indexFace(collectionId: string, img: string, externalImageId?: string): Promise<string>;
208
- /**
209
- * For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces.
210
- * The operation compares the features of the input face with faces in the specified collection.
211
- *
212
- * @example
213
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
214
- * const fs = require('fs');
215
- *
216
- * // Instantiate Rekognition client.
217
- * const client = new AWSRekognitionClient({
218
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
219
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
220
- * region: process.env.AWS_REKOGNITION_REGION
221
- * });
222
- *
223
- * // If you want to search for one face, specify 1 for the maxFaces option.
224
- * // In that case, the search result will return the face data for one person.
225
- * // Output: {
226
- * // faceId: '2ce7f471-9c4b-4f27-b5a4-bbd02a5e134d',
227
- * // boundingBox: {
228
- * // width: 0.500495970249176,
229
- * // height: 0.6926820278167725,
230
- * // left: 0.2928670048713684,
231
- * // top: 0.09095799922943115
232
- * // },
233
- * // externalImageId: 'img.jpg'
234
- * // }
235
- * const match = await client.searchFaces('MyCollection', 'img.jpg', {minConfidence: 99, maxFaces: 1});
236
- * console.log(match);
237
- *
238
- * // If you want to search for multiple faces, specify 2 or more for the maxFaces option.
239
- * // In that case, the search results will return a list of the face data of multiple people found.
240
- * // Output: [
241
- * // {
242
- * // faceId: '2ce7f471-9c4b-4f27-b5a4-bbd02a5e134d',
243
- * // boundingBox: {
244
- * // width: 0.500495970249176,
245
- * // height: 0.6926820278167725,
246
- * // left: 0.2928670048713684,
247
- * // top: 0.09095799922943115
248
- * // },
249
- * // externalImageId: 'img.jpg'
250
- * // }
251
- * // ]
252
- * const matches = await client.searchFaces('MyCollection', 'img.jpg', {minConfidence: 99, maxFaces: 5});
253
- * console.log(matches);
254
- *
255
- * // The input image can specify a buffer or DataURL in addition to the image path.
256
- * await client.searchFaces('MyCollection', 'data:image/png;base64,/9j/4...');
257
- * await client.searchFaces('MyCollection', fs.readFileSync('img.jpg'));
258
- *
259
- * @param {string} collectionId ID of the collection to search.
260
- * @param {string} img Image path or Data Url or image buffer.
261
- * @param {object} options option.
262
- * @param {number} options.minConfidence Specifies the minimum confidence in the face match to return.
263
- * The default value is 80%.
264
- * @param {number} options.maxFaces Maximum number of faces to return.
265
- * The operation returns the maximum number of faces with the highest confidence in the match.
266
- * The default value is 5.
267
- * @return {Promise<FaceMatch[]|FaceMatch|null>} If options.maxFaces is 1, the face information found is returned.
268
- * If options.maxFaces is 2 or more, the list of face information found is returned.
269
- * Returns null if no face is found.
270
- */
271
- searchFaces(collectionId: string, img: string, opts?: {
272
- minConfidence?: number;
273
- maxFaces?: number;
274
- }): Promise<FaceMatch[] | FaceMatch | null>;
275
- /**
276
- * Returns metadata for faces in the specified collection.
277
- * This metadata includes information such as the bounding box coordinates, and face ID.
278
- *
279
- * @example
280
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
281
- * const fs = require('fs');
282
- *
283
- * // Instantiate Rekognition client.
284
- * const client = new AWSRekognitionClient({
285
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
286
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
287
- * region: process.env.AWS_REKOGNITION_REGION
288
- * });
289
- *
290
- * // Find all face metadata in the collection.
291
- * // Output: [
292
- * // {
293
- * // faceId: '2ce7f471-9c4b-4f27-b5a4-bbd02a5e134d',
294
- * // boundingBox: {
295
- * // width: 0.500495970249176,
296
- * // height: 0.6926820278167725,
297
- * // left: 0.2928670048713684,
298
- * // top: 0.09095799922943115
299
- * // },
300
- * // externalImageId: 'img.jpg'
301
- * // }
302
- * // ]
303
- * const result = await client.listFaces('MyCollection');
304
- * console.log(result);
305
- *
306
- * @param {string} collectionId ID of the collection from which to list the faces.
307
- * @param {number} maxResults Maximum number of faces to return.
308
- * The default value is 1000.
309
- * @return {Promise<FaceMatch[]>} Returns all face metadata in the collection.
310
- */
311
- listFaces(collectionId: string, maxResults?: number): Promise<FaceMatch[]>;
312
- /**
313
- * Deletes faces from a collection.
314
- * You specify a collection ID and an array of face IDs to remove from the collection.
315
- *
316
- * @example
317
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
318
- *
319
- * // Instantiate Rekognition client.
320
- * const client = new AWSRekognitionClient({
321
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
322
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
323
- * region: process.env.AWS_REKOGNITION_REGION
324
- * });
325
- *
326
- * // Delete a face from the collection.
327
- * await client.deleteFaces('MyCollection', ['f7befa24-3b83-43cc-b21f-7fac4b91f51d']);
328
- *
329
- * @param {string} collectionId Collection from which to remove the specific faces.
330
- * @param {string[]} faceIds An array of face IDs to delete.
331
- */
332
- deleteFaces(collectionId: string, faceIds: string[]): Promise<void>;
333
- /**
334
- * Deletes the specified collection.
335
- * Note that this operation removes all faces in the collection.
336
- *
337
- * @example
338
- * const AWSRekognitionClient = require('express-sweet').services.AWSRekognitionClient;
339
- *
340
- * // Instantiate Rekognition client.
341
- * const client = new AWSRekognitionClient({
342
- * accessKeyId: process.env.AWS_REKOGNITION_ACCESS_KEY_ID,
343
- * secretAccessKey: process.env.AWS_REKOGNITION_SECRET_ACCESS_KEY,
344
- * region: process.env.AWS_REKOGNITION_REGION
345
- * });
346
- *
347
- * // Delete collection.
348
- * await client.deleteCollection('MyCollection');
349
- *
350
- * @param {string} collectionId ID of the collection to delete.
351
- */
352
- deleteCollection(collectionId: string): Promise<void>;
353
- /**
354
- * Returns a buffer of images..
355
- * @param {string|Buffer} img Image path or Data Url or image buffer.
356
- * @return {Buffer} Image buffer.
357
- */
358
- private getImageBuffer;
359
- }
@@ -1,39 +0,0 @@
1
- import express from 'express';
2
- /**
3
- * User authentication service.
4
- */
5
- export default class {
6
- /**
7
- * Authenticate the user.
8
- *
9
- * @param {express.Request} req The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.
10
- * @param {express.Response} res The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
11
- * @param {express.NextFunction} next A function that can access the next middleware function in the application's request-response cycle.
12
- * @return {Promise<boolean>} Returns true if authentication is successful, false otherwise.
13
- */
14
- static authenticate(req: express.Request, res: express.Response, next: express.NextFunction): Promise<boolean>;
15
- /**
16
- * Log out the user.
17
- *
18
- * @param {express.Request} req The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.
19
- */
20
- static logout(req: express.Request): void;
21
- /**
22
- * Redirects to the page that responds immediately after successful authentication set in "success_redirect" of "config/authentication.js".
23
- *
24
- * @param {express.Response} res The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
25
- */
26
- static successRedirect(res: express.Response): void;
27
- /**
28
- * Redirects to the page that responds immediately after authentication failure set in "failure_redirect" of "config/authentication.js".
29
- *
30
- * @param {express.Response} res The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
31
- */
32
- static failureRedirect(res: express.Response): void;
33
- /**
34
- * Returns the option.
35
- *
36
- * @return {AuthenticationOptions} option.
37
- */
38
- private static loadOptions;
39
- }
@@ -1,80 +0,0 @@
1
- import * as IORedis from 'ioredis';
2
- /**
3
- * Redis client.
4
- * Supports Redis >= 2.6.12 and (Node.js >= 6). Completely compatible with Redis 6.x.
5
- */
6
- export default class extends IORedis.Redis {
7
- /**
8
- * Constructs a Redis client object.
9
- *
10
- * @param {IORedis.IRedisOptions} options
11
- * @param {number} options.port=6379 Port of the Redis server.
12
- * @param {string} options.host=localhost Host of the Redis server.
13
- * @param {string} options.family=4 Version of IP stack. Defaults to 4.
14
- * @param {string} options.path=null Local domain socket path. If set the `port`, `host` and `family` will be ignored.
15
- * @param {number} options.keepAlive=0 TCP KeepAlive on the socket with a X ms delay before start.
16
- * Set to a non-number value to disable keepAlive.
17
- * @param {boolean} options.noDelay=true Whether to disable the Nagle's Algorithm. By default we disable it to reduce the latency.
18
- * @param {string} options.connectionName=null Connection name.
19
- * @param {number} options.db=0 Database index to use.
20
- * @param {string} options.password=null If set, client will send AUTH command with the value of this option when connected.
21
- * @param {string} options.username=null - Similar to `password`, Provide this for Redis ACL support.
22
- * @param {boolean} options.dropBufferSupport=false Drop the buffer support for better performance.
23
- * This option is recommended to be enabled when handling large array response and you don't need the buffer support.
24
- * @param {boolean} options.enableReadyCheck=true When a connection is established to
25
- * the Redis server, the server might still be loading the database from disk.
26
- * While loading, the server not respond to any commands.
27
- * To work around this, when this option is `true`,
28
- * ioredis will check the status of the Redis server,
29
- * and when the Redis server is able to process commands,
30
- * a `ready` event will be emitted.
31
- * @param {boolean} options.enableOfflineQueue=true By default, if there is no active connection to the Redis server,
32
- * commands are added to a queue and are executed once the connection is "ready"
33
- * (when `enableReadyCheck` is `true`,
34
- * "ready" means the Redis server has loaded the database from disk, otherwise means the connection
35
- * to the Redis server has been established). If this option is false,
36
- * when execute the command when the connection isn't ready, an error will be returned.
37
- * @param {number} options.connectTimeout=10000 The milliseconds before a timeout occurs during the initial connection to the Redis server.
38
- * @param {boolean} options.autoResubscribe=true After reconnected, if the previous connection was in the subscriber mode, client will auto re-subscribe these channels.
39
- * @param {boolean} options.autoResendUnfulfilledCommands=true If true, client will resend unfulfilled
40
- * commands(e.g. block commands) in the previous connection when reconnected.
41
- * @param {boolean} options.lazyConnect=false By default,
42
- * When a new `Redis` instance is created, it will connect to Redis server automatically.
43
- * If you want to keep the instance disconnected until a command is called, you can pass the `lazyConnect` option to the constructor:
44
- * ```javascript
45
- * const redis = new RedisClient({lazyConnect: true});
46
- * // No attempting to connect to the Redis server here.
47
- * // Now let's connect to the Redis server
48
- * redis.get('foo', function () {});
49
- * ```
50
- * @param {Object} options.tls TLS connection support. See https://github.com/luin/ioredis#tls-options
51
- * @param {string} options.keyPrefix='' The prefix to prepend to all keys in a command.
52
- * @param {function} options.retryStrategy See "Quick Start" section
53
- * @param {number} options.maxRetriesPerRequest See "Quick Start" section
54
- * @param {number} options.maxLoadingRetryTime=10000 when redis server is not ready, we will wait for `loading_eta_seconds` from `info` command or maxLoadingRetryTime (milliseconds), whichever is smaller.
55
- * @param {function} options.reconnectOnError See "Quick Start" section
56
- * @param {boolean} options.readOnly=false Enable READONLY mode for the connection. Only available for cluster mode.
57
- * @param {boolean} options.stringNumbers=false Force numbers to be always returned as JavaScript strings. This option is necessary when dealing with big numbers (exceed the [-2^53, +2^53] range).
58
- * @param {boolean} options.enableTLSForSentinelMode=false Whether to support the `tls` option when connecting to Redis via sentinel mode.
59
- * @param {NatMap} options.natMap=null NAT map for sentinel connector.
60
- * @param {boolean} options.updateSentinels=true Update the given `sentinels` list with new IP addresses when communicating with existing sentinels.
61
- * @param {boolean} options.failoverDetector=false Detect failover actively by subscribing to the
62
- * related channels. With this option disabled, ioredis is still able to detect failovers because Redis
63
- * Sentinel will disconnect all clients whenever a failover happens, so ioredis will reconnect to the new
64
- * master. This option is useful when you want to detect failover quicker, but it will create more TCP
65
- * connections to Redis servers in order to subscribe to related channels.
66
- * @param {boolean} options.enableAutoPipelining=false When enabled, all commands issued during an event loop
67
- * iteration are automatically wrapped in a pipeline and sent to the server at the same time.
68
- * This can dramatically improve performance.
69
- * @param {string[]} options.autoPipeliningIgnoredCommands=[] The list of commands which must not be automatically wrapped in pipelines.
70
- * @param {number} options.maxScriptsCachingTime=60000 Default script definition caching time.
71
- *
72
- * @example
73
- * const RedisClient = require('express-sweet').services.RedisClient;
74
- *
75
- * // Instantiate Redis client.
76
- * const unixSocketRedis = new RedisClient({path: "/tmp/echo.sock"});
77
- * const redis = new RedisClient({host: 'localhost', port: 6379});
78
- */
79
- constructor(opts: IORedis.IRedisOptions);
80
- }
@@ -1,3 +0,0 @@
1
- import AWSRekognitionClient from './AWSRekognitionClient';
2
- import Authentication from './Authentication';
3
- export { AWSRekognitionClient, Authentication, };
@@ -1,16 +0,0 @@
1
- /**
2
- * Type judgment processing.
3
- */
4
- export default class {
5
- /**
6
- * Returns true for asynchronous functions, false otherwise.
7
- *
8
- * @example
9
- * Types.isAsyncFunction(async () => {});// true
10
- * Types.isAsyncFunction(() => {});// false
11
- *
12
- * @param {Function} value
13
- * @return {boolean}
14
- */
15
- static isAsyncFunction(value: Function): boolean;
16
- }
@@ -1,2 +0,0 @@
1
- import Types from './Types';
2
- export { Types };