express-sweet 1.0.40 → 1.0.42

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 (66) hide show
  1. package/CHANGELOG.md +72 -6
  2. package/INSTALL-Redis.md +65 -39
  3. package/README.md +7 -0
  4. package/dist/build.common.js +66 -19
  5. package/dist/build.esm.js +66 -19
  6. package/docs/index.html +11 -3
  7. package/package.json +12 -20
  8. package/types/database/Database.d.ts +181 -181
  9. package/types/database/Model.d.ts +221 -221
  10. package/types/database/index.d.ts +3 -4
  11. package/types/database/loadModels.d.ts +6 -6
  12. package/types/exceptions/FaceCollectionCreateFailed.d.ts +25 -25
  13. package/types/exceptions/FaceCollectionDeleteFailed.d.ts +25 -25
  14. package/types/exceptions/FaceIndexFailed.d.ts +20 -20
  15. package/types/exceptions/FaceMissingInPhoto.d.ts +11 -11
  16. package/types/exceptions/FacesMultipleInPhoto.d.ts +11 -11
  17. package/types/exceptions/index.d.ts +5 -6
  18. package/types/handlebars_helpers/comparison.d.ts +351 -351
  19. package/types/handlebars_helpers/date.d.ts +19 -19
  20. package/types/handlebars_helpers/html.d.ts +12 -12
  21. package/types/handlebars_helpers/index.d.ts +7 -8
  22. package/types/handlebars_helpers/math.d.ts +81 -81
  23. package/types/handlebars_helpers/number.d.ts +18 -18
  24. package/types/handlebars_helpers/object.d.ts +21 -21
  25. package/types/handlebars_helpers/string.d.ts +50 -50
  26. package/types/index.d.ts +7 -8
  27. package/types/interfaces/AuthenticationConfig.d.ts +108 -108
  28. package/types/interfaces/BasicConfig.d.ts +74 -74
  29. package/types/interfaces/BoundingBox.d.ts +25 -25
  30. package/types/interfaces/DatabaseConfig.d.ts +7 -7
  31. package/types/interfaces/FaceDetails.d.ts +30 -0
  32. package/types/interfaces/FaceDetailsEmotions.d.ts +40 -40
  33. package/types/interfaces/FaceMatch.d.ts +31 -31
  34. package/types/interfaces/IndexFaceDetails.d.ts +29 -0
  35. package/types/interfaces/RekognitionOptions.d.ts +26 -26
  36. package/types/interfaces/SesOptions.d.ts +27 -27
  37. package/types/interfaces/ViewConfig.d.ts +44 -44
  38. package/types/interfaces/index.d.ts +8 -9
  39. package/types/middlewares/Authentication.d.ts +13 -13
  40. package/types/middlewares/CORS.d.ts +10 -10
  41. package/types/middlewares/Environment.d.ts +10 -10
  42. package/types/middlewares/ErrorHandler.d.ts +10 -10
  43. package/types/middlewares/Global.d.ts +13 -13
  44. package/types/middlewares/Http.d.ts +10 -10
  45. package/types/middlewares/Local.d.ts +13 -13
  46. package/types/middlewares/View.d.ts +14 -14
  47. package/types/middlewares/index.d.ts +7 -8
  48. package/types/mount.d.ts +7 -7
  49. package/types/routing/Router.d.ts +13 -13
  50. package/types/routing/index.d.ts +1 -2
  51. package/types/services/AWSRekognitionClient.d.ts +126 -118
  52. package/types/services/AWSSesClient.d.ts +57 -57
  53. package/types/services/Authentication.d.ts +34 -34
  54. package/types/services/index.d.ts +3 -4
  55. package/types/utils/Types.d.ts +24 -24
  56. package/types/utils/index.d.ts +9 -12
  57. package/types/utils/isArray.d.ts +8 -8
  58. package/types/utils/isAsyncFunction.d.ts +12 -12
  59. package/types/utils/isFunction.d.ts +13 -13
  60. package/types/utils/isObject.d.ts +8 -8
  61. package/types/utils/isString.d.ts +8 -8
  62. package/types/utils/loadAuthenticationConfig.d.ts +8 -8
  63. package/types/utils/loadBasicConfig.d.ts +8 -8
  64. package/types/utils/loadDatabaseConfig.d.ts +8 -8
  65. package/types/utils/loadViewConfig.d.ts +8 -8
  66. package/types/services/RedisClient.d.ts +0 -80
@@ -1,118 +1,126 @@
1
- import RekognitionOptions from '~/interfaces/RekognitionOptions';
2
- import FaceMatch from '~/interfaces/FaceMatch';
3
- import BoundingBox from '~/interfaces/BoundingBox';
4
- import FaceDetails from '~/interfaces/FaceDetails';
5
- import IndexFaceDetails from '~/interfaces/IndexFaceDetails';
6
- /**
7
- * AWS Rekognition Client.
8
- */
9
- export default class {
10
- #private;
11
- /**
12
- * Constructs a rekognition client object.
13
- */
14
- constructor(options: RekognitionOptions);
15
- /**
16
- * Detects faces within an image that is provided as input.
17
- * For each face detected, the operation returns a bounding box of the face.
18
- *
19
- * @param {string} img Image path or Data Url or image buffer.
20
- * @param {number} minConfidence The minimum confidence of the detected face. Faces with a confidence lower than this value will not be returned as a result.
21
- * @param {boolean} withDetails If false, returns only the face bounding box.When true, returns the age group, gender, and emotion in addition to the face bounding box.
22
- * @return {Promise<BoundingBox[]|FaceDetails[]>}
23
- */
24
- detectFaces(img: string, minConfidence?: number, withDetails?: boolean): Promise<BoundingBox[] | FaceDetails[]>;
25
- /**
26
- * Compare the similarity of two faces.
27
- *
28
- * @param {string} img1 Image path or Data Url or image buffer.
29
- * @param {string} img2 Image path or Data Url or image buffer.
30
- * @return {Promise<number>} Level of confidence that the faces match.
31
- */
32
- compareFaces(img1: string, img2: string): Promise<number>;
33
- /**
34
- * Add faces to the collection using the IndexFaces operation.
35
- * For example, you might create collections, one for each of your application users.
36
- * A user can then index faces using the IndexFaces operation and persist results in a specific collection.
37
- * Then, a user can search the collection for faces in the user-specific container.
38
- * Note that Collection names are case-sensitive.
39
- *
40
- * @param {string} collectionId ID for the collection that you are creating.
41
- * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-]+".
42
- */
43
- createCollection(collectionId: string): Promise<void>;
44
- /**
45
- * Returns list of collection IDs.
46
- *
47
- * @return {Promise<string[]>} An array of collection IDs.
48
- */
49
- listCollections(): Promise<string[]>;
50
- /**
51
- * Detects one face in the input image and adds it to the specified collection.
52
- * Note that this method is used to index one face.
53
- * Throws an exception if no face is found in the input image or multiple faces are found.
54
- *
55
- * @param {string} collectionId The ID of an existing collection to which you want to add the faces that are detected in the input images.
56
- * @param {string} img Image path or Data Url or image buffer.
57
- * @param {string|undefined} options.externalImageId The ID you want to assign to the faces detected in the image.
58
- * When you call the "listFaces" operation, the response returns the external ID.
59
- * You can use this external image ID to create a client-side index to associate the faces with each image.
60
- * You can then use the index to find all faces in an image.
61
- * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-:]+".
62
- * @param {boolean} options.returnDetails If false, only the face ID of the created face is returned.
63
- * If true, returns the face ID of the created face, plus age range, gender, and emotion.
64
- * @return {Promise<string|IndexFaceDetails>} If options.returnDetails is false, the face identifier is returned.
65
- * If options.returnDetails is true, returns the gender, age group, and emotion in addition to the face identifier.
66
- */
67
- indexFace(collectionId: string, img: string, options?: {
68
- externalImageId?: string;
69
- returnDetails?: boolean;
70
- }): Promise<string | IndexFaceDetails>;
71
- /**
72
- * For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces.
73
- * The operation compares the features of the input face with faces in the specified collection.
74
- *
75
- * @param {string} collectionId ID of the collection to search.
76
- * @param {string} img Image path or Data Url or image buffer.
77
- * @param {object} options option.
78
- * @param {number} options.minConfidence Specifies the minimum confidence in the face match to return.
79
- * The default value is 80%.
80
- * @param {number} options.maxFaces Maximum number of faces to return.
81
- * The operation returns the maximum number of faces with the highest confidence in the match.
82
- * The default value is 5.
83
- * @return {Promise<FaceMatch[]|FaceMatch|null>} If options.maxFaces is 1, the face information found is returned.
84
- * If options.maxFaces is 2 or more, the list of face information found is returned.
85
- * Returns null if no face is found.
86
- */
87
- searchFaces(collectionId: string, img: string, options?: {
88
- minConfidence?: number;
89
- maxFaces?: number;
90
- }): Promise<FaceMatch[] | FaceMatch | null>;
91
- /**
92
- * Returns metadata for faces in the specified collection.
93
- * This metadata includes information such as the bounding box coordinates, and face ID.
94
- *
95
- * @param {string} collectionId ID of the collection from which to list the faces.
96
- * @param {number} maxResults Maximum number of faces to return.
97
- * The default value is 1000.
98
- * @return {Promise<FaceMatch[]>} Returns all face metadata in the collection.
99
- */
100
- listFaces(collectionId: string, maxResults?: number): Promise<FaceMatch[]>;
101
- /**
102
- * Deletes faces from a collection.
103
- * You specify a collection ID and an array of face IDs to remove from the collection.
104
- *
105
- * @param {string} collectionId Collection from which to remove the specific faces.
106
- * @param {string[]} faceIds An array of face IDs to delete.
107
- * @return {Promise<boolean>} True on success.
108
- */
109
- deleteFaces(collectionId: string, faceIds: string[]): Promise<boolean>;
110
- /**
111
- * Deletes the specified collection.
112
- * Note that this operation removes all faces in the collection.
113
- *
114
- * @param {string} collectionId ID of the collection to delete.
115
- * @return {Promise<boolean>} True on success.
116
- */
117
- deleteCollection(collectionId: string): Promise<boolean>;
118
- }
1
+ import RekognitionOptions from '~/interfaces/RekognitionOptions';
2
+ import FaceMatch from '~/interfaces/FaceMatch';
3
+ import BoundingBox from '~/interfaces/BoundingBox';
4
+ import FaceDetails from '~/interfaces/FaceDetails';
5
+ import IndexFaceDetails from '~/interfaces/IndexFaceDetails';
6
+ /**
7
+ * Rekognition Client.
8
+ */
9
+ export default class {
10
+ #private;
11
+ /**
12
+ * Constructs a rekognition client object.
13
+ */
14
+ constructor(options: RekognitionOptions);
15
+ /**
16
+ * Detects faces within an image that is provided as input.
17
+ * For each face detected, the operation returns a bounding box of the face.
18
+ *
19
+ * @param {string} img Image path or Data Url or image buffer.
20
+ * @param {number} minConfidence The minimum confidence of the detected face. Faces with a confidence lower than this value will not be returned as a result.
21
+ * @param {boolean} withDetails If false, returns only the face bounding box.When true, returns the age group, gender, and emotion in addition to the face bounding box.
22
+ * @return {Promise<BoundingBox[]|FaceDetails[]>}
23
+ */
24
+ detectFaces(img: string, minConfidence?: number, withDetails?: boolean): Promise<BoundingBox[] | FaceDetails[]>;
25
+ /**
26
+ * Compare the similarity of two faces.
27
+ *
28
+ * @param {string} img1 Image path or Data Url or image buffer.
29
+ * @param {string} img2 Image path or Data Url or image buffer.
30
+ * @return {Promise<number>} Level of confidence that the faces match.
31
+ */
32
+ compareFaces(img1: string, img2: string): Promise<number>;
33
+ /**
34
+ * Add faces to the collection using the IndexFaces operation.
35
+ * For example, you might create collections, one for each of your application users.
36
+ * A user can then index faces using the IndexFaces operation and persist results in a specific collection.
37
+ * Then, a user can search the collection for faces in the user-specific container.
38
+ * Note that Collection names are case-sensitive.
39
+ *
40
+ * @param {string} collectionId ID for the collection that you are creating.
41
+ * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-]+".
42
+ */
43
+ createCollection(collectionId: string): Promise<void>;
44
+ /**
45
+ * Returns list of collection IDs.
46
+ *
47
+ * @return {Promise<string[]>} An array of collection IDs.
48
+ */
49
+ listCollections(): Promise<string[]>;
50
+ /**
51
+ * Detects one face in the input image and adds it to the specified collection.
52
+ * Note that this method is used to index one face.
53
+ * Throws an exception if no face is found in the input image or multiple faces are found.
54
+ *
55
+ * @param {string} collectionId The ID of an existing collection to which you want to add the faces that are detected in the input images.
56
+ * @param {string} img Image path or Data Url or image buffer.
57
+ * @param {string|undefined} options.externalImageId The ID you want to assign to the faces detected in the image.
58
+ * When you call the "listFaces" operation, the response returns the external ID.
59
+ * You can use this external image ID to create a client-side index to associate the faces with each image.
60
+ * You can then use the index to find all faces in an image.
61
+ * The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-:]+".
62
+ * @param {boolean} options.returnDetails If false, only the face ID of the created face is returned.
63
+ * If true, returns the face ID of the created face, plus age range, gender, and emotion.
64
+ * @throws {FaceMissingInPhoto} Throws an exception if no face is found in the image.
65
+ * @throws {FacesMultipleInPhoto} Throws an exception if more than one face is found in the image.
66
+ * @return {Promise<string|IndexFaceDetails>} If options.returnDetails is false, the face identifier is returned.
67
+ * If options.returnDetails is true, returns the gender, age group, and emotion in addition to the face identifier.
68
+ */
69
+ indexFace(collectionId: string, img: string, options?: {
70
+ externalImageId?: string;
71
+ returnDetails?: boolean;
72
+ }): Promise<string | IndexFaceDetails>;
73
+ /**
74
+ * For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces.
75
+ * The operation compares the features of the input face with faces in the specified collection.
76
+ *
77
+ * @param {string} collectionId ID of the collection to search.
78
+ * @param {string} img Image path or Data Url or image buffer.
79
+ * @param {object} options option.
80
+ * @param {number} options.minConfidence Specifies the minimum confidence in the face match to return.
81
+ * The default value is 80%.
82
+ * @param {number} options.maxFaces Maximum number of faces to return.
83
+ * The operation returns the maximum number of faces with the highest confidence in the match.
84
+ * The default value is 5.
85
+ * @param {boolean} options.throwNotFoundFaceException If true, throws a FaceMissingInPhoto exception when a face is not found in the image; if false, returns null. Default is false.
86
+ * @param {boolean} options.throwTooManyFaceException If true, throws a FacesMultipleInPhoto exception when more than one face is found in the image. Default is false.
87
+ * @throws {FaceMissingInPhoto} Throws an exception if options.throwNotFoundFaceException is true and no face is found in the image
88
+ * @throws {FacesMultipleInPhoto} Throws an exception if options.throwTooManyFaceException is true and more than one face is found in the image
89
+ * @return {Promise<FaceMatch[]|FaceMatch|null>} If options.maxFaces is 1, the face information found is returned.
90
+ * If options.maxFaces is 2 or more, the list of face information found is returned.
91
+ * Returns null if no face is found.
92
+ */
93
+ searchFaces(collectionId: string, img: string, options?: {
94
+ minConfidence?: number;
95
+ maxFaces?: number;
96
+ throwNotFoundFaceException?: boolean;
97
+ throwTooManyFaceException?: boolean;
98
+ }): Promise<FaceMatch[] | FaceMatch | null>;
99
+ /**
100
+ * Returns metadata for faces in the specified collection.
101
+ * This metadata includes information such as the bounding box coordinates, and face ID.
102
+ *
103
+ * @param {string} collectionId ID of the collection from which to list the faces.
104
+ * @param {number} maxResults Maximum number of faces to return.
105
+ * The default value is 1000.
106
+ * @return {Promise<FaceMatch[]>} Returns all face metadata in the collection.
107
+ */
108
+ listFaces(collectionId: string, maxResults?: number): Promise<FaceMatch[]>;
109
+ /**
110
+ * Deletes faces from a collection.
111
+ * You specify a collection ID and an array of face IDs to remove from the collection.
112
+ *
113
+ * @param {string} collectionId Collection from which to remove the specific faces.
114
+ * @param {string[]} faceIds An array of face IDs to delete.
115
+ * @return {Promise<boolean>} True on success.
116
+ */
117
+ deleteFaces(collectionId: string, faceIds: string[]): Promise<boolean>;
118
+ /**
119
+ * Deletes the specified collection.
120
+ * Note that this operation removes all faces in the collection.
121
+ *
122
+ * @param {string} collectionId ID of the collection to delete.
123
+ * @return {Promise<boolean>} True on success.
124
+ */
125
+ deleteCollection(collectionId: string): Promise<boolean>;
126
+ }
@@ -1,57 +1,57 @@
1
- import SesOptions from '~/interfaces/SesOptions';
2
- /**
3
- * AWS SES email sending client.
4
- */
5
- export default class AWSSesClient {
6
- #private;
7
- /**
8
- * Constructs a SES client object.
9
- */
10
- constructor(options: SesOptions);
11
- /**
12
- * Set the sender's email address.
13
- *
14
- * @param {string} from Sender's email address.
15
- * @param {string} name? Sender Name.
16
- * @return {AWSSesClient}
17
- */
18
- from(from: string, name?: string): AWSSesClient;
19
- /**
20
- * Set the destination email address.
21
- *
22
- * @param {(string|string[])} to Email address to be sent to.
23
- * @return {AWSSesClient}
24
- */
25
- to(to: string | string[]): AWSSesClient;
26
- /**
27
- * Set CC email address.
28
- *
29
- * @param {(string|string[])} cc CC email address.
30
- * @return {AWSSesClient}
31
- */
32
- cc(cc: string | string[]): AWSSesClient;
33
- /**
34
- * Set the email subject.
35
- *
36
- * @param {string} subject Email Subject.
37
- * @return {AWSSesClient}
38
- */
39
- subject(subject: string): AWSSesClient;
40
- /**
41
- * Set the body of the email.
42
- *
43
- * @param {string} body Email Body. The body can use the <a href="https://handlebarsjs.com/">handlebars</a> and <a href="https://www.npmjs.com/package/handlebars-extd">handlebars-extd</a> syntax.
44
- * @param {{[key: string]: any}} vars The value of a variable in the body of the e-mail.
45
- * @return {AWSSesClient}
46
- */
47
- body(body: string, vars?: {
48
- [key: string]: any;
49
- }): AWSSesClient;
50
- /**
51
- * Send email.
52
- *
53
- * @param {'text'|'html'} type E-Mail type ('html': HTML mail, 'text': text mail). Default is 'text'.
54
- * @return {Promise<string>} Unique ID assigned by Amazon SES for a successfully sent email.
55
- */
56
- send(type?: 'text' | 'html'): Promise<string>;
57
- }
1
+ import SesOptions from '~/interfaces/SesOptions';
2
+ /**
3
+ * AWS SES email sending client.
4
+ */
5
+ export default class AWSSesClient {
6
+ #private;
7
+ /**
8
+ * Constructs a SES client object.
9
+ */
10
+ constructor(options: SesOptions);
11
+ /**
12
+ * Set the sender's email address.
13
+ *
14
+ * @param {string} from Sender's email address.
15
+ * @param {string} name? Sender Name.
16
+ * @return {AWSSesClient}
17
+ */
18
+ from(from: string, name?: string): AWSSesClient;
19
+ /**
20
+ * Set the destination email address.
21
+ *
22
+ * @param {(string|string[])} to Email address to be sent to.
23
+ * @return {AWSSesClient}
24
+ */
25
+ to(to: string | string[]): AWSSesClient;
26
+ /**
27
+ * Set CC email address.
28
+ *
29
+ * @param {(string|string[])} cc CC email address.
30
+ * @return {AWSSesClient}
31
+ */
32
+ cc(cc: string | string[]): AWSSesClient;
33
+ /**
34
+ * Set the email subject.
35
+ *
36
+ * @param {string} subject Email Subject.
37
+ * @return {AWSSesClient}
38
+ */
39
+ subject(subject: string): AWSSesClient;
40
+ /**
41
+ * Set the body of the email.
42
+ *
43
+ * @param {string} body Email Body. The body can use the <a href="https://handlebarsjs.com/">handlebars</a> and <a href="https://www.npmjs.com/package/handlebars-extd">handlebars-extd</a> syntax.
44
+ * @param {{[key: string]: any}} vars The value of a variable in the body of the e-mail.
45
+ * @return {AWSSesClient}
46
+ */
47
+ body(body: string, vars?: {
48
+ [key: string]: any;
49
+ }): AWSSesClient;
50
+ /**
51
+ * Send email.
52
+ *
53
+ * @param {'text'|'html'} type E-Mail type ('html': HTML mail, 'text': text mail). Default is 'text'.
54
+ * @return {Promise<string>} Unique ID assigned by Amazon SES for a successfully sent email.
55
+ */
56
+ send(type?: 'text' | 'html'): Promise<string>;
57
+ }
@@ -1,34 +1,34 @@
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.Request} req The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.
31
- * @param {express.Response} res The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
32
- */
33
- static failureRedirect(req: express.Request, res: express.Response): void;
34
- }
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.Request} req The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.
31
+ * @param {express.Response} res The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
32
+ */
33
+ static failureRedirect(req: express.Request, res: express.Response): void;
34
+ }
@@ -1,4 +1,3 @@
1
- import AWSRekognitionClient from '~/services/AWSRekognitionClient';
2
- import Authentication from '~/services/Authentication';
3
- import AWSSesClient from '~/services/AWSSesClient';
4
- export { AWSRekognitionClient, Authentication, AWSSesClient, };
1
+ export { default as AWSRekognitionClient } from '~/services/AWSRekognitionClient';
2
+ export { default as Authentication } from '~/services/Authentication';
3
+ export { default as AWSSesClient } from '~/services/AWSSesClient';
@@ -1,24 +1,24 @@
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
- /**
17
- * Return true if `val` is a non-empty string.
18
- *
19
- * @param {any} `val` The value to check
20
- * @return {Boolean}
21
- * @api public
22
- */
23
- static isString(value: any): boolean;
24
- }
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
+ /**
17
+ * Return true if `val` is a non-empty string.
18
+ *
19
+ * @param {any} `val` The value to check
20
+ * @return {Boolean}
21
+ * @api public
22
+ */
23
+ static isString(value: any): boolean;
24
+ }
@@ -1,12 +1,9 @@
1
- declare const _default: {
2
- isArray: (value: any) => boolean;
3
- isAsyncFunction: (value: any) => boolean;
4
- isFunction: (value: any) => boolean;
5
- isObject: (value: any) => boolean;
6
- isString: (value: any) => boolean;
7
- loadAuthenticationConfig: () => import("../interfaces").AuthenticationConfig;
8
- loadBasicConfig: () => import("../interfaces").BasicConfig;
9
- loadDatabaseConfig: () => import("sequelize").Options;
10
- loadViewConfig: () => import("../interfaces").ViewConfig;
11
- };
12
- export default _default;
1
+ export { default as isArray } from '~/utils/isArray';
2
+ export { default as isAsyncFunction } from '~/utils/isAsyncFunction';
3
+ export { default as isFunction } from '~/utils/isFunction';
4
+ export { default as isObject } from '~/utils/isObject';
5
+ export { default as isString } from '~/utils/isString';
6
+ export { default as loadAuthenticationConfig } from '~/utils/loadAuthenticationConfig';
7
+ export { default as loadBasicConfig } from '~/utils/loadBasicConfig';
8
+ export { default as loadDatabaseConfig } from '~/utils/loadDatabaseConfig';
9
+ export { default as loadViewConfig } from '~/utils/loadViewConfig';
@@ -1,8 +1,8 @@
1
- /**
2
- * Check if param is an array.
3
- *
4
- * @param {any} value
5
- * @returns {boolean}
6
- */
7
- declare const _default: (value: any) => boolean;
8
- export default _default;
1
+ /**
2
+ * Check if param is an array.
3
+ *
4
+ * @param {any} value
5
+ * @returns {boolean}
6
+ */
7
+ declare const _default: (value: any) => boolean;
8
+ export default _default;
@@ -1,12 +1,12 @@
1
- /**
2
- * Returns true for asynchronous functions, false otherwise.
3
- *
4
- * @example
5
- * utils.isAsyncFunction(async () => {});// true
6
- * utils.isAsyncFunction(() => {});// false
7
- *
8
- * @param {any} value
9
- * @return {boolean}
10
- */
11
- declare const _default: (value: any) => boolean;
12
- export default _default;
1
+ /**
2
+ * Returns true for asynchronous functions, false otherwise.
3
+ *
4
+ * @example
5
+ * utils.isAsyncFunction(async () => {});// true
6
+ * utils.isAsyncFunction(() => {});// false
7
+ *
8
+ * @param {any} value
9
+ * @return {boolean}
10
+ */
11
+ declare const _default: (value: any) => boolean;
12
+ export default _default;
@@ -1,13 +1,13 @@
1
- /**
2
- * Returns true for functions, false otherwise.
3
- *
4
- * @example
5
- * utils.isFunction(() => {});// true
6
- * utils.isFunction(async () => {});// true
7
- * utils.isFunction('');// false
8
- *
9
- * @param {any} value
10
- * @return {boolean}
11
- */
12
- declare const _default: (value: any) => boolean;
13
- export default _default;
1
+ /**
2
+ * Returns true for functions, false otherwise.
3
+ *
4
+ * @example
5
+ * utils.isFunction(() => {});// true
6
+ * utils.isFunction(async () => {});// true
7
+ * utils.isFunction('');// false
8
+ *
9
+ * @param {any} value
10
+ * @return {boolean}
11
+ */
12
+ declare const _default: (value: any) => boolean;
13
+ export default _default;
@@ -1,8 +1,8 @@
1
- /**
2
- * Check if param is an object.
3
- *
4
- * @param {any} value Character strings, arrays, objects, etc. to be checked.
5
- * @returns {boolean} Returns true if it is an object.
6
- */
7
- declare const _default: (value: any) => boolean;
8
- export default _default;
1
+ /**
2
+ * Check if param is an object.
3
+ *
4
+ * @param {any} value Character strings, arrays, objects, etc. to be checked.
5
+ * @returns {boolean} Returns true if it is an object.
6
+ */
7
+ declare const _default: (value: any) => boolean;
8
+ export default _default;
@@ -1,8 +1,8 @@
1
- /**
2
- * Return true if `val` is a non-empty string.
3
- *
4
- * @param {any} `val` The value to check
5
- * @return {boolean}
6
- */
7
- declare const _default: (value: any) => boolean;
8
- export default _default;
1
+ /**
2
+ * Return true if `val` is a non-empty string.
3
+ *
4
+ * @param {any} `val` The value to check
5
+ * @return {boolean}
6
+ */
7
+ declare const _default: (value: any) => boolean;
8
+ export default _default;