@rapidrest/core 1.0.1 → 1.0.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.
Files changed (72) hide show
  1. package/{README.rst → README.md} +5 -11
  2. package/dist/lib/FileUtils.js +9 -9
  3. package/dist/lib/FileUtils.js.map +1 -1
  4. package/dist/lib/Logger.js +1 -1
  5. package/dist/lib/Logger.js.map +1 -1
  6. package/dist/lib/ObjectFactory.js +2 -2
  7. package/dist/lib/ObjectFactory.js.map +1 -1
  8. package/dist/lib/TelemetryUtils.js +2 -2
  9. package/dist/lib/TelemetryUtils.js.map +1 -1
  10. package/dist/lib/threads/ThreadLogger.js +1 -2
  11. package/dist/lib/threads/ThreadLogger.js.map +1 -1
  12. package/dist/lib/threads/ThreadWorkerEntry.js +2 -3
  13. package/dist/lib/threads/ThreadWorkerEntry.js.map +1 -1
  14. package/dist/types/threads/ThreadLogger.d.ts +1 -15
  15. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/README.md +1 -1
  16. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +2 -2
  17. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +2 -2
  18. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +2 -2
  19. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +2 -2
  20. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +2 -2
  21. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +2 -2
  22. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +2 -2
  23. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +2 -2
  24. package/docs/reference/README.md +23 -61
  25. package/docs/reference/classes/AlertUtils.md +7 -7
  26. package/docs/reference/classes/ApiError.md +6 -6
  27. package/docs/reference/classes/ClassLoader.md +12 -12
  28. package/docs/reference/classes/Event.md +9 -9
  29. package/docs/reference/classes/EventUtils.md +5 -5
  30. package/docs/reference/classes/FileUtils.md +6 -6
  31. package/docs/reference/classes/JWTUtils.md +4 -4
  32. package/docs/reference/classes/MessagingUtils.md +8 -8
  33. package/docs/reference/classes/OASUtils.md +9 -9
  34. package/docs/reference/classes/ObjectFactory.md +15 -15
  35. package/docs/reference/classes/ObjectUtils.md +3 -3
  36. package/docs/reference/classes/StringUtils.md +7 -7
  37. package/docs/reference/classes/ThreadPool.md +12 -12
  38. package/docs/reference/classes/ThreadWorker.md +7 -7
  39. package/docs/reference/classes/UserUtils.md +9 -9
  40. package/docs/reference/classes/ValidationUtils.md +15 -15
  41. package/docs/reference/enumerations/AlertPriority.md +7 -7
  42. package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +3 -3
  43. package/docs/reference/enumerations/WorkerMessageType.md +6 -6
  44. package/docs/reference/functions/sleep.md +2 -2
  45. package/docs/reference/globals.md +73 -0
  46. package/docs/reference/interfaces/Alert.md +11 -11
  47. package/docs/reference/interfaces/AlertAttachment.md +6 -6
  48. package/docs/reference/interfaces/AlertClose.md +4 -4
  49. package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +5 -5
  50. package/docs/reference/interfaces/AlertUtilsOptions.md +5 -5
  51. package/docs/reference/interfaces/InstanceOptions.md +5 -5
  52. package/docs/reference/interfaces/JWTPayload.md +6 -6
  53. package/docs/reference/interfaces/JWTUser.md +6 -6
  54. package/docs/reference/interfaces/JWTUtilsConfig.md +5 -5
  55. package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +6 -6
  56. package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +4 -4
  57. package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +7 -7
  58. package/docs/reference/interfaces/NewEvent.md +3 -3
  59. package/docs/reference/interfaces/OriginSettings.md +4 -4
  60. package/docs/reference/interfaces/SlackConfig.md +5 -5
  61. package/docs/reference/interfaces/SmtpAuth.md +4 -4
  62. package/docs/reference/interfaces/SmtpConfig.md +6 -6
  63. package/docs/reference/interfaces/Template.md +11 -11
  64. package/docs/reference/interfaces/TemplateMapBase.md +2 -2
  65. package/docs/reference/interfaces/TwilioConfig.md +5 -5
  66. package/docs/reference/interfaces/WorkerMessage.md +4 -4
  67. package/docs/reference/interfaces/WorkerOptions.md +7 -7
  68. package/docs/reference/type-aliases/BooleanFunc.md +2 -2
  69. package/docs/reference/type-aliases/TemplateMap.md +2 -2
  70. package/docs/reference/type-aliases/WorkerCallback.md +2 -2
  71. package/docs/reference/variables/Logger.md +2 -2
  72. package/package.json +1 -1
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / ApiError
5
+ [@rapidrest/core](../globals.md) / ApiError
6
6
 
7
7
  # Class: ApiError
8
8
 
9
- Defined in: src/ApiError.ts:8
9
+ Defined in: [src/ApiError.ts:8](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ApiError.ts#L8)
10
10
 
11
11
  Describes an error that originates from a API service. This class extends the standard `Error` class to include
12
12
  a unique code that can be used to trace an error to source code as well as the HTTP response status returned with
@@ -22,7 +22,7 @@ the error.
22
22
 
23
23
  > **new ApiError**(`code`, `status`, `message?`, `templateVariables?`): `ApiError`
24
24
 
25
- Defined in: src/ApiError.ts:24
25
+ Defined in: [src/ApiError.ts:24](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ApiError.ts#L24)
26
26
 
27
27
  #### Parameters
28
28
 
@@ -68,7 +68,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
68
68
 
69
69
  > **code**: `string`
70
70
 
71
- Defined in: src/ApiError.ts:10
71
+ Defined in: [src/ApiError.ts:10](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ApiError.ts#L10)
72
72
 
73
73
  The unique code of the error.
74
74
 
@@ -114,7 +114,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
114
114
 
115
115
  > **status**: `number`
116
116
 
117
- Defined in: src/ApiError.ts:12
117
+ Defined in: [src/ApiError.ts:12](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ApiError.ts#L12)
118
118
 
119
119
  The HTTP status associated with the error.
120
120
 
@@ -146,7 +146,7 @@ not capture any frames.
146
146
 
147
147
  > **ApiMessageTemplate**(`message`, `templateVariables?`): `string`
148
148
 
149
- Defined in: src/ApiError.ts:14
149
+ Defined in: [src/ApiError.ts:14](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ApiError.ts#L14)
150
150
 
151
151
  #### Parameters
152
152
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / ClassLoader
5
+ [@rapidrest/core](../globals.md) / ClassLoader
6
6
 
7
7
  # Class: ClassLoader
8
8
 
9
- Defined in: src/ClassLoader.ts:48
9
+ Defined in: [src/ClassLoader.ts:48](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L48)
10
10
 
11
11
  The *ClassLoader* provides a container for dynamically loading classes at runtime using C#/Java style namespaces.
12
12
  Namespaces are determined from the folder structure relative to the root.
@@ -57,7 +57,7 @@ Jean-Philippe Steinmetz
57
57
 
58
58
  > **new ClassLoader**(`rootDir`, `includeJavaScript`, `includeTypeScript`, `ignore`): `ClassLoader`
59
59
 
60
- Defined in: src/ClassLoader.ts:67
60
+ Defined in: [src/ClassLoader.ts:67](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L67)
61
61
 
62
62
  Creates a new instance of `ClassLoader` with the specified defaults.
63
63
 
@@ -96,7 +96,7 @@ A list of regex pattern of file paths to ignore.
96
96
 
97
97
  > `protected` **classes**: `Map`\<`string`, `any`\>
98
98
 
99
- Defined in: src/ClassLoader.ts:50
99
+ Defined in: [src/ClassLoader.ts:50](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L50)
100
100
 
101
101
  The map containnig all loaded classes.
102
102
 
@@ -106,7 +106,7 @@ The map containnig all loaded classes.
106
106
 
107
107
  > `protected` **ignore**: (`string` \| `RegExp`)[] = `[]`
108
108
 
109
- Defined in: src/ClassLoader.ts:51
109
+ Defined in: [src/ClassLoader.ts:51](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L51)
110
110
 
111
111
  ***
112
112
 
@@ -114,7 +114,7 @@ Defined in: src/ClassLoader.ts:51
114
114
 
115
115
  > `protected` **includeJavaScript**: `boolean` = `true`
116
116
 
117
- Defined in: src/ClassLoader.ts:55
117
+ Defined in: [src/ClassLoader.ts:55](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L55)
118
118
 
119
119
  Indicates if JavaScript classes should be loaded.
120
120
 
@@ -124,7 +124,7 @@ Indicates if JavaScript classes should be loaded.
124
124
 
125
125
  > `protected` **includeTypeScript**: `boolean` = `true`
126
126
 
127
- Defined in: src/ClassLoader.ts:53
127
+ Defined in: [src/ClassLoader.ts:53](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L53)
128
128
 
129
129
  Indicates if TypeScript classes should be loaded.
130
130
 
@@ -134,7 +134,7 @@ Indicates if TypeScript classes should be loaded.
134
134
 
135
135
  > `protected` **rootDir**: `string` = `"."`
136
136
 
137
- Defined in: src/ClassLoader.ts:57
137
+ Defined in: [src/ClassLoader.ts:57](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L57)
138
138
 
139
139
  The path to the root directory containing all classes on disk.
140
140
 
@@ -144,7 +144,7 @@ The path to the root directory containing all classes on disk.
144
144
 
145
145
  > **getClass**(`fqn`): `any`
146
146
 
147
- Defined in: src/ClassLoader.ts:80
147
+ Defined in: [src/ClassLoader.ts:80](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L80)
148
148
 
149
149
  Returns the class with the specified fully qualified name.
150
150
 
@@ -168,7 +168,7 @@ The class definition for the given fully qualified name if found, otherwise `und
168
168
 
169
169
  > **getClasses**(): `Map`\<`string`, `any`\>
170
170
 
171
- Defined in: src/ClassLoader.ts:87
171
+ Defined in: [src/ClassLoader.ts:87](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L87)
172
172
 
173
173
  Returns the map containing all classes that have been loaded.
174
174
 
@@ -182,7 +182,7 @@ Returns the map containing all classes that have been loaded.
182
182
 
183
183
  > **hasClass**(`fqn`): `any`
184
184
 
185
- Defined in: src/ClassLoader.ts:97
185
+ Defined in: [src/ClassLoader.ts:97](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L97)
186
186
 
187
187
  Returns `true` if a class exists with the specified fully qualified name.
188
188
 
@@ -206,7 +206,7 @@ The fully qualified name of the class to search.
206
206
 
207
207
  > **load**(`dir`): `Promise`\<`void`\>
208
208
 
209
- Defined in: src/ClassLoader.ts:107
209
+ Defined in: [src/ClassLoader.ts:107](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ClassLoader.ts#L107)
210
210
 
211
211
  Loads all modules exports contained in the directory specified. The folder must be a child
212
212
  directory to the `rootDir` parameter passed in to the constructor.
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / Event
5
+ [@rapidrest/core](../globals.md) / Event
6
6
 
7
7
  # Class: Event
8
8
 
9
- Defined in: src/TelemetryUtils.ts:23
9
+ Defined in: [src/TelemetryUtils.ts:23](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L23)
10
10
 
11
11
  Describes a single telemetry event. A telemetry event is when something occurs in the system.
12
12
 
@@ -24,7 +24,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
24
24
 
25
25
  > **new Event**(`config`, `userId`, `data`): `Event`
26
26
 
27
- Defined in: src/TelemetryUtils.ts:54
27
+ Defined in: [src/TelemetryUtils.ts:54](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L54)
28
28
 
29
29
  #### Parameters
30
30
 
@@ -50,7 +50,7 @@ Defined in: src/TelemetryUtils.ts:54
50
50
 
51
51
  > `readonly` **environment**: `string`
52
52
 
53
- Defined in: src/TelemetryUtils.ts:32
53
+ Defined in: [src/TelemetryUtils.ts:32](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L32)
54
54
 
55
55
  The name of the environment that the event originated from. This is typically `dev` or `prod`.
56
56
 
@@ -60,7 +60,7 @@ The name of the environment that the event originated from. This is typically `d
60
60
 
61
61
  > `readonly` **origin**: `string`
62
62
 
63
- Defined in: src/TelemetryUtils.ts:37
63
+ Defined in: [src/TelemetryUtils.ts:37](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L37)
64
64
 
65
65
  The unique name of the service or client that the event originated from.
66
66
 
@@ -70,7 +70,7 @@ The unique name of the service or client that the event originated from.
70
70
 
71
71
  > `readonly` **timestamp**: `Date`
72
72
 
73
- Defined in: src/TelemetryUtils.ts:42
73
+ Defined in: [src/TelemetryUtils.ts:42](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L42)
74
74
 
75
75
  The date and time that the event occured.
76
76
 
@@ -80,7 +80,7 @@ The date and time that the event occured.
80
80
 
81
81
  > `readonly` **type**: `string`
82
82
 
83
- Defined in: src/TelemetryUtils.ts:47
83
+ Defined in: [src/TelemetryUtils.ts:47](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L47)
84
84
 
85
85
  The type of event being recorded.
86
86
 
@@ -94,7 +94,7 @@ The type of event being recorded.
94
94
 
95
95
  > `readonly` **uid**: `string`
96
96
 
97
- Defined in: src/TelemetryUtils.ts:27
97
+ Defined in: [src/TelemetryUtils.ts:27](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L27)
98
98
 
99
99
  The universally unique identifier of the event.
100
100
 
@@ -104,6 +104,6 @@ The universally unique identifier of the event.
104
104
 
105
105
  > `readonly` **userId**: `string`
106
106
 
107
- Defined in: src/TelemetryUtils.ts:52
107
+ Defined in: [src/TelemetryUtils.ts:52](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L52)
108
108
 
109
109
  The universally unique identifer of the user that sent the event.
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / EventUtils
5
+ [@rapidrest/core](../globals.md) / EventUtils
6
6
 
7
7
  # Class: EventUtils
8
8
 
9
- Defined in: src/TelemetryUtils.ts:84
9
+ Defined in: [src/TelemetryUtils.ts:84](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L84)
10
10
 
11
11
  Provides a common set of static functions for recording and working with telemetry `Event` instances.
12
12
 
@@ -37,7 +37,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
37
37
 
38
38
  > `static` **init**(`config`, `logger`, `jwtToken`): `void`
39
39
 
40
- Defined in: src/TelemetryUtils.ts:99
40
+ Defined in: [src/TelemetryUtils.ts:99](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L99)
41
41
 
42
42
  Initializes `EventUtils` with the provided defaults.
43
43
 
@@ -71,7 +71,7 @@ The user's JWT token to send telemetry events on behalf of.
71
71
 
72
72
  > `static` **on**(`type`, `callback`): `void`
73
73
 
74
- Defined in: src/TelemetryUtils.ts:173
74
+ Defined in: [src/TelemetryUtils.ts:173](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L173)
75
75
 
76
76
  Registers a `callback` function to receive notifications of recorded events of the given `type`. Note that only
77
77
  events originating from the same application or service will be notified.
@@ -100,7 +100,7 @@ The function to call when an event is recorded.
100
100
 
101
101
  > `static` **record**(`evt`, `type?`): `Promise`\<`void`\>
102
102
 
103
- Defined in: src/TelemetryUtils.ts:118
103
+ Defined in: [src/TelemetryUtils.ts:118](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/TelemetryUtils.ts#L118)
104
104
 
105
105
  Sends the given event to the telemetry service for permanent recording.
106
106
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / FileUtils
5
+ [@rapidrest/core](../globals.md) / FileUtils
6
6
 
7
7
  # Class: FileUtils
8
8
 
9
- Defined in: src/FileUtils.ts:18
9
+ Defined in: [src/FileUtils.ts:17](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/FileUtils.ts#L17)
10
10
 
11
11
  Utility functions for working with files.
12
12
 
@@ -30,7 +30,7 @@ Jean-Philippe Steinmetz
30
30
 
31
31
  > `static` **copyBinaryFile**(`srcPath`, `outPath`, `variables`): `Promise`\<`void`\>
32
32
 
33
- Defined in: src/FileUtils.ts:160
33
+ Defined in: [src/FileUtils.ts:159](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/FileUtils.ts#L159)
34
34
 
35
35
  Generates a copy of the source file at the desired output destination using binary copy mode.
36
36
 
@@ -64,7 +64,7 @@ The map of variable names to values to swap. Applies to outPath only.
64
64
 
65
65
  > `static` **copyDirectory**(`srcPath`, `outPath`, `vars`, `excludeFilters`, `binaryFilters`, `force`): `Promise`\<`void`\>
66
66
 
67
- Defined in: src/FileUtils.ts:188
67
+ Defined in: [src/FileUtils.ts:187](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/FileUtils.ts#L187)
68
68
 
69
69
  Performs a deep copy of a directory tree at the given srcPath to the specified output directory. Performs
70
70
  template replacement for all variables given and skips any files in the specified filter.
@@ -117,7 +117,7 @@ Set to `true` to force writing over any existing files.
117
117
 
118
118
  > `static` **copyFile**(`srcPath`, `outPath`, `variables`, `overwrite`): `Promise`\<`void`\>
119
119
 
120
- Defined in: src/FileUtils.ts:124
120
+ Defined in: [src/FileUtils.ts:123](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/FileUtils.ts#L123)
121
121
 
122
122
  Generates a copy of the source file at the desired output destination and performs a swap of all values of the
123
123
  variables specified.
@@ -156,7 +156,7 @@ The map of variable names to values to swap.
156
156
 
157
157
  > `static` **writeFile**(`srcPath`, `outPath`, `contents`, `overwrite`): `Promise`\<`void`\>
158
158
 
159
- Defined in: src/FileUtils.ts:29
159
+ Defined in: [src/FileUtils.ts:28](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/FileUtils.ts#L28)
160
160
 
161
161
  Attempts to write the provided contents to the file path given. If a file already exists the user is prompted to
162
162
  allow the file to be overwritten or merged. In the case of a merge, srcPath is used as a baseline in order to
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / JWTUtils
5
+ [@rapidrest/core](../globals.md) / JWTUtils
6
6
 
7
7
  # Class: JWTUtils
8
8
 
9
- Defined in: src/JWTUtils.ts:145
9
+ Defined in: [src/JWTUtils.ts:145](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/JWTUtils.ts#L145)
10
10
 
11
11
  Utility class for working with Json Web Token (JWT) authentication tokens.
12
12
 
@@ -30,7 +30,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
30
30
 
31
31
  > `static` **createToken**(`config`, `user`, `data?`): `string`
32
32
 
33
- Defined in: src/JWTUtils.ts:154
33
+ Defined in: [src/JWTUtils.ts:154](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/JWTUtils.ts#L154)
34
34
 
35
35
  Generates a new JWT token for the given config and user object. The user object must be a valid RapidREST
36
36
  user.
@@ -65,7 +65,7 @@ Additional data to include the token's payload.
65
65
 
66
66
  > `static` **decodeToken**(`config`, `token`): [`JWTPayload`](../interfaces/JWTPayload.md)
67
67
 
68
- Defined in: src/JWTUtils.ts:207
68
+ Defined in: [src/JWTUtils.ts:207](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/JWTUtils.ts#L207)
69
69
 
70
70
  Decodes the given JWT authentication token using the provided configuration. If the token is not valid an
71
71
  error is thrown with the reason. Returns the encoded user object payload upon success.
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / MessagingUtils
5
+ [@rapidrest/core](../globals.md) / MessagingUtils
6
6
 
7
7
  # Class: MessagingUtils
8
8
 
9
- Defined in: src/MessagingUtils.ts:68
9
+ Defined in: [src/MessagingUtils.ts:68](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L68)
10
10
 
11
11
  Simple utility class for sending templated messages via e-mail, SMS and more.
12
12
 
@@ -26,7 +26,7 @@ Simple utility class for sending templated messages via e-mail, SMS and more.
26
26
 
27
27
  > `protected` **slackApps**: `any`[] = `[]`
28
28
 
29
- Defined in: src/MessagingUtils.ts:69
29
+ Defined in: [src/MessagingUtils.ts:69](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L69)
30
30
 
31
31
  ***
32
32
 
@@ -34,7 +34,7 @@ Defined in: src/MessagingUtils.ts:69
34
34
 
35
35
  > `protected` **slackConfigs**: `any`[] = `[]`
36
36
 
37
- Defined in: src/MessagingUtils.ts:71
37
+ Defined in: [src/MessagingUtils.ts:71](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L71)
38
38
 
39
39
  ## Methods
40
40
 
@@ -42,7 +42,7 @@ Defined in: src/MessagingUtils.ts:71
42
42
 
43
43
  > **init**(): `Promise`\<`void`\>
44
44
 
45
- Defined in: src/MessagingUtils.ts:83
45
+ Defined in: [src/MessagingUtils.ts:83](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L83)
46
46
 
47
47
  #### Returns
48
48
 
@@ -54,7 +54,7 @@ Defined in: src/MessagingUtils.ts:83
54
54
 
55
55
  > **sendEmail**(`templateName`, `templateVars`, `options`): `Promise`\<`any`\>
56
56
 
57
- Defined in: src/MessagingUtils.ts:149
57
+ Defined in: [src/MessagingUtils.ts:149](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L149)
58
58
 
59
59
  Sends an email using the given template name and variables.
60
60
 
@@ -88,7 +88,7 @@ The map of additional options to pass into the sendMail function.
88
88
 
89
89
  > **sendSlack**(`templateName`, `templateVars`): `Promise`\<`any`[] \| `undefined`\>
90
90
 
91
- Defined in: src/MessagingUtils.ts:204
91
+ Defined in: [src/MessagingUtils.ts:204](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L204)
92
92
 
93
93
  Sends an Slack message using the given template name and variables.
94
94
 
@@ -116,7 +116,7 @@ The map of variables to inject into the template.
116
116
 
117
117
  > **sendSMS**(`templateName`, `templateVars`, `options`): `Promise`\<`any`\>
118
118
 
119
- Defined in: src/MessagingUtils.ts:241
119
+ Defined in: [src/MessagingUtils.ts:241](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/MessagingUtils.ts#L241)
120
120
 
121
121
  Sends an SMS using the given template name and variables.
122
122
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / OASUtils
5
+ [@rapidrest/core](../globals.md) / OASUtils
6
6
 
7
7
  # Class: OASUtils
8
8
 
9
- Defined in: src/OASUtils.ts:12
9
+ Defined in: [src/OASUtils.ts:12](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L12)
10
10
 
11
11
  ## Constructors
12
12
 
@@ -24,7 +24,7 @@ Defined in: src/OASUtils.ts:12
24
24
 
25
25
  > `static` **getDatastore**(`spec`, `name`): `any`
26
26
 
27
- Defined in: src/OASUtils.ts:20
27
+ Defined in: [src/OASUtils.ts:20](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L20)
28
28
 
29
29
  Gets the datastore definition with the specified name.
30
30
 
@@ -54,7 +54,7 @@ The definition for the datastore with the given name if found, otherwise `undefi
54
54
 
55
55
  > `static` **getObject**(`spec`, `path`): `any`
56
56
 
57
- Defined in: src/OASUtils.ts:37
57
+ Defined in: [src/OASUtils.ts:37](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L37)
58
58
 
59
59
  Gets the specification object at the specified path.
60
60
 
@@ -84,7 +84,7 @@ The object at the specified path if found, otherwise `undefined`.
84
84
 
85
85
  > `static` **getResponse**(`obj`): `any`
86
86
 
87
- Defined in: src/OASUtils.ts:64
87
+ Defined in: [src/OASUtils.ts:64](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L64)
88
88
 
89
89
  Returns the first available response object for a 2XX response as defined by the provided Operation schema object.
90
90
 
@@ -106,7 +106,7 @@ The Operation schema object to search.
106
106
 
107
107
  > `static` **getResponseContent**(`obj`): `any`
108
108
 
109
- Defined in: src/OASUtils.ts:83
109
+ Defined in: [src/OASUtils.ts:83](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L83)
110
110
 
111
111
  Returns the first available response content object for a 2XX response as defined by the provided Operation schema object.
112
112
 
@@ -128,7 +128,7 @@ The Operation schema object to search.
128
128
 
129
129
  > `static` **getSchema**(`spec`, `name`): `any`
130
130
 
131
- Defined in: src/OASUtils.ts:95
131
+ Defined in: [src/OASUtils.ts:95](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L95)
132
132
 
133
133
  Retrieves the schema definition with the given name.
134
134
 
@@ -158,7 +158,7 @@ The schema definition with the given name.
158
158
 
159
159
  > `static` **getTypeInfo**(`schemaDef`, `spec`, `convertDataType`): `any`
160
160
 
161
- Defined in: src/OASUtils.ts:118
161
+ Defined in: [src/OASUtils.ts:118](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L118)
162
162
 
163
163
  Extracts the type information for a given schema Object definition.
164
164
 
@@ -194,7 +194,7 @@ A tuple containing the type, subType and subSchemaRef information.
194
194
 
195
195
  > `static` **loadSpec**(`file`): `Promise`\<`any`\>
196
196
 
197
- Defined in: src/OASUtils.ts:173
197
+ Defined in: [src/OASUtils.ts:173](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/OASUtils.ts#L173)
198
198
 
199
199
  Attempts to load the Open API specification at the given path or URL.
200
200
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / ObjectFactory
5
+ [@rapidrest/core](../globals.md) / ObjectFactory
6
6
 
7
7
  # Class: ObjectFactory
8
8
 
9
- Defined in: src/ObjectFactory.ts:24
9
+ Defined in: [src/ObjectFactory.ts:24](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L24)
10
10
 
11
11
  The `ObjectFactory` is a manager for creating objects based on registered
12
12
  class types. This allows for the tracking of multiple instances of objects
@@ -22,7 +22,7 @@ Jean-Philippe Steinmetz
22
22
 
23
23
  > **new ObjectFactory**(`config?`, `logger?`): `ObjectFactory`
24
24
 
25
- Defined in: src/ObjectFactory.ts:37
25
+ Defined in: [src/ObjectFactory.ts:37](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L37)
26
26
 
27
27
  #### Parameters
28
28
 
@@ -44,7 +44,7 @@ Defined in: src/ObjectFactory.ts:37
44
44
 
45
45
  > `readonly` **classes**: `Map`\<`string`, `any`\>
46
46
 
47
- Defined in: src/ObjectFactory.ts:26
47
+ Defined in: [src/ObjectFactory.ts:26](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L26)
48
48
 
49
49
  A map for string fully qualified class names to their class types.
50
50
 
@@ -54,7 +54,7 @@ A map for string fully qualified class names to their class types.
54
54
 
55
55
  > `protected` **config**: `any`
56
56
 
57
- Defined in: src/ObjectFactory.ts:29
57
+ Defined in: [src/ObjectFactory.ts:29](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L29)
58
58
 
59
59
  The global application configuration object.
60
60
 
@@ -64,7 +64,7 @@ The global application configuration object.
64
64
 
65
65
  > `readonly` **instances**: `Map`\<`string`, `any`\>
66
66
 
67
- Defined in: src/ObjectFactory.ts:32
67
+ Defined in: [src/ObjectFactory.ts:32](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L32)
68
68
 
69
69
  A map for the unique name to the intance of a particular class type.
70
70
 
@@ -74,7 +74,7 @@ A map for the unique name to the intance of a particular class type.
74
74
 
75
75
  > `protected` **logger**: `any`
76
76
 
77
- Defined in: src/ObjectFactory.ts:35
77
+ Defined in: [src/ObjectFactory.ts:35](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L35)
78
78
 
79
79
  The application logging utility.
80
80
 
@@ -84,7 +84,7 @@ The application logging utility.
84
84
 
85
85
  > **clear**(): `void`
86
86
 
87
- Defined in: src/ObjectFactory.ts:104
87
+ Defined in: [src/ObjectFactory.ts:104](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L104)
88
88
 
89
89
  Deletes all instantiated objects.
90
90
 
@@ -98,7 +98,7 @@ Deletes all instantiated objects.
98
98
 
99
99
  > **clearAll**(): `void`
100
100
 
101
- Defined in: src/ObjectFactory.ts:111
101
+ Defined in: [src/ObjectFactory.ts:111](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L111)
102
102
 
103
103
  Deletes all instantiated objects and registered class types.
104
104
 
@@ -112,7 +112,7 @@ Deletes all instantiated objects and registered class types.
112
112
 
113
113
  > **destroy**(`objs?`): `Promise`\<`void`\>
114
114
 
115
- Defined in: src/ObjectFactory.ts:47
115
+ Defined in: [src/ObjectFactory.ts:47](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L47)
116
116
 
117
117
  Destroys the specified objects. If `undefined` is passed in, all objects managed by the factory are destroyed.
118
118
 
@@ -132,7 +132,7 @@ Destroys the specified objects. If `undefined` is passed in, all objects managed
132
132
 
133
133
  > **getInitMethods**(`obj`): `Function`[]
134
134
 
135
- Defined in: src/ObjectFactory.ts:186
135
+ Defined in: [src/ObjectFactory.ts:186](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L186)
136
136
 
137
137
  Searches an object for one or more functions that implement a `@Init` decorator.
138
138
 
@@ -156,7 +156,7 @@ The list of functions that implements the `@Init` decorator if found, otherwise
156
156
 
157
157
  > **getInstance**\<`T`\>(`nameOrType`): `T` \| `undefined`
158
158
 
159
- Defined in: src/ObjectFactory.ts:220
159
+ Defined in: [src/ObjectFactory.ts:220](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L220)
160
160
 
161
161
  Returns the object instance with the given unique name. Unique names take the form `<ClassName>:<InstanceName>`.
162
162
  It is possible to only specifiy the `<ClassName>`, doing so will automatically look for the `<ClassName>:default`
@@ -188,7 +188,7 @@ The object instance associated with the given name if found, otherwise `undefine
188
188
 
189
189
  > **initialize**\<`T`\>(`obj`): `Promise`\<`T`\>
190
190
 
191
- Defined in: src/ObjectFactory.ts:120
191
+ Defined in: [src/ObjectFactory.ts:120](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L120)
192
192
 
193
193
  Scans the given object for any properties with the `@Inject` decorator and assigns the correct values.
194
194
 
@@ -216,7 +216,7 @@ The object to initialize with injected defaults
216
216
 
217
217
  > **newInstance**\<`T`\>(`type`, `options?`): `T` \| `Promise`\<`T`\>
218
218
 
219
- Defined in: src/ObjectFactory.ts:265
219
+ Defined in: [src/ObjectFactory.ts:265](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L265)
220
220
 
221
221
  Creates a new instance of the class specified with the provided unique name or type and constructor arguments. If an existing
222
222
  object has already been created with the given name, that instance is returned, otherwise a new instance is created
@@ -251,7 +251,7 @@ via the constructor name.
251
251
 
252
252
  > **register**(`clazz`, `fqn?`): `void`
253
253
 
254
- Defined in: src/ObjectFactory.ts:336
254
+ Defined in: [src/ObjectFactory.ts:336](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectFactory.ts#L336)
255
255
 
256
256
  Registers the given class type for the provided fully qualified name.
257
257
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  ***
4
4
 
5
- [@rapidrest/core](../README.md) / ObjectUtils
5
+ [@rapidrest/core](../globals.md) / ObjectUtils
6
6
 
7
7
  # Class: ObjectUtils
8
8
 
9
- Defined in: src/ObjectUtils.ts:12
9
+ Defined in: [src/ObjectUtils.ts:12](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectUtils.ts#L12)
10
10
 
11
11
  Utility class for working with objects.
12
12
 
@@ -30,7 +30,7 @@ Jean-Philippe Steinmetz
30
30
 
31
31
  > `static` **validate**(`obj`, `clazz?`, `recurse?`): `void`
32
32
 
33
- Defined in: src/ObjectUtils.ts:21
33
+ Defined in: [src/ObjectUtils.ts:21](https://github.com/rapidrest/core/blob/7282268947b97f019217897045e771d4e99f9ffa/src/ObjectUtils.ts#L21)
34
34
 
35
35
  Performs validation of the given object or array. Validation is performed by scanning the object class for properties
36
36
  decorated with `@Validator` and executing the provided validation function.