@rapidrest/core 1.1.4 → 1.2.0

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 (69) hide show
  1. package/dist/lib/JWTUtils.js +11 -8
  2. package/dist/lib/JWTUtils.js.map +1 -1
  3. package/dist/lib/ObjectFactory.js +5 -5
  4. package/dist/lib/ObjectFactory.js.map +1 -1
  5. package/dist/lib/UserUtils.js +0 -32
  6. package/dist/lib/UserUtils.js.map +1 -1
  7. package/dist/lib/decorators/ObjectDecorators.js +1 -5
  8. package/dist/lib/decorators/ObjectDecorators.js.map +1 -1
  9. package/dist/lib/threads/ThreadPool.js +0 -1
  10. package/dist/lib/threads/ThreadPool.js.map +1 -1
  11. package/dist/types/ObjectFactory.d.ts +4 -3
  12. package/dist/types/UserUtils.d.ts +0 -12
  13. package/dist/types/decorators/ObjectDecorators.d.ts +1 -5
  14. package/dist/types/threads/ThreadPool.d.ts +0 -1
  15. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +4 -18
  16. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +1 -1
  17. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +3 -3
  18. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +6 -18
  19. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +2 -2
  20. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +2 -2
  21. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +2 -16
  22. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +2 -2
  23. package/docs/reference/classes/AlertUtils.md +10 -10
  24. package/docs/reference/classes/ApiError.md +10 -22
  25. package/docs/reference/classes/ClassLoader.md +17 -17
  26. package/docs/reference/classes/Event.md +8 -8
  27. package/docs/reference/classes/EventUtils.md +4 -4
  28. package/docs/reference/classes/FileUtils.md +17 -17
  29. package/docs/reference/classes/JWTUtils.md +5 -5
  30. package/docs/reference/classes/MessagingUtils.md +12 -12
  31. package/docs/reference/classes/OASUtils.md +8 -8
  32. package/docs/reference/classes/ObjectFactory.md +25 -23
  33. package/docs/reference/classes/ObjectUtils.md +2 -2
  34. package/docs/reference/classes/StringUtils.md +8 -8
  35. package/docs/reference/classes/ThreadPool.md +25 -25
  36. package/docs/reference/classes/ThreadWorker.md +6 -6
  37. package/docs/reference/classes/UserUtils.md +10 -64
  38. package/docs/reference/classes/ValidationUtils.md +14 -14
  39. package/docs/reference/enumerations/AlertPriority.md +6 -6
  40. package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +2 -2
  41. package/docs/reference/enumerations/WorkerMessageType.md +5 -5
  42. package/docs/reference/functions/sleep.md +3 -3
  43. package/docs/reference/interfaces/Alert.md +14 -14
  44. package/docs/reference/interfaces/AlertAttachment.md +6 -6
  45. package/docs/reference/interfaces/AlertClose.md +5 -5
  46. package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +6 -6
  47. package/docs/reference/interfaces/AlertUtilsOptions.md +5 -5
  48. package/docs/reference/interfaces/InstanceOptions.md +13 -7
  49. package/docs/reference/interfaces/JWTPayload.md +15 -15
  50. package/docs/reference/interfaces/JWTUser.md +6 -6
  51. package/docs/reference/interfaces/JWTUtilsConfig.md +6 -6
  52. package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +8 -8
  53. package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +5 -5
  54. package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +9 -9
  55. package/docs/reference/interfaces/NewEvent.md +2 -2
  56. package/docs/reference/interfaces/OriginSettings.md +3 -3
  57. package/docs/reference/interfaces/SlackConfig.md +4 -4
  58. package/docs/reference/interfaces/SmtpAuth.md +3 -3
  59. package/docs/reference/interfaces/SmtpConfig.md +6 -6
  60. package/docs/reference/interfaces/Template.md +24 -24
  61. package/docs/reference/interfaces/TemplateMapBase.md +2 -2
  62. package/docs/reference/interfaces/TwilioConfig.md +5 -5
  63. package/docs/reference/interfaces/WorkerMessage.md +4 -4
  64. package/docs/reference/interfaces/WorkerOptions.md +11 -11
  65. package/docs/reference/type-aliases/BooleanFunc.md +2 -2
  66. package/docs/reference/type-aliases/TemplateMap.md +1 -1
  67. package/docs/reference/type-aliases/WorkerCallback.md +2 -2
  68. package/docs/reference/variables/Logger.md +5 -1
  69. package/package.json +96 -96
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: ApiError
8
8
 
9
- Defined in: [src/ApiError.ts:8](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ApiError.ts#L8)
9
+ Defined in: [src/ApiError.ts:8](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ApiError.ts#L24)
25
+ Defined in: [src/ApiError.ts:24](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ApiError.ts#L24)
26
26
 
27
27
  #### Parameters
28
28
 
@@ -52,23 +52,11 @@ Defined in: [src/ApiError.ts:24](https://github.com/rapidrest/core/blob/23a4f312
52
52
 
53
53
  ## Properties
54
54
 
55
- ### cause?
56
-
57
- > `optional` **cause**: `unknown`
58
-
59
- Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
60
-
61
- #### Inherited from
62
-
63
- `Error.cause`
64
-
65
- ***
66
-
67
55
  ### code
68
56
 
69
57
  > **code**: `string`
70
58
 
71
- Defined in: [src/ApiError.ts:10](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ApiError.ts#L10)
59
+ Defined in: [src/ApiError.ts:10](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ApiError.ts#L10)
72
60
 
73
61
  The unique code of the error.
74
62
 
@@ -78,7 +66,7 @@ The unique code of the error.
78
66
 
79
67
  > **message**: `string`
80
68
 
81
- Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077
69
+ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075
82
70
 
83
71
  #### Inherited from
84
72
 
@@ -90,7 +78,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077
90
78
 
91
79
  > **name**: `string`
92
80
 
93
- Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
81
+ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1074
94
82
 
95
83
  #### Inherited from
96
84
 
@@ -100,9 +88,9 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
100
88
 
101
89
  ### stack?
102
90
 
103
- > `optional` **stack**: `string`
91
+ > `optional` **stack?**: `string`
104
92
 
105
- Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
93
+ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
106
94
 
107
95
  #### Inherited from
108
96
 
@@ -114,7 +102,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
114
102
 
115
103
  > **status**: `number`
116
104
 
117
- Defined in: [src/ApiError.ts:12](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ApiError.ts#L12)
105
+ Defined in: [src/ApiError.ts:12](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ApiError.ts#L12)
118
106
 
119
107
  The HTTP status associated with the error.
120
108
 
@@ -146,13 +134,13 @@ not capture any frames.
146
134
 
147
135
  > **ApiMessageTemplate**(`message`, `templateVariables?`): `string`
148
136
 
149
- Defined in: [src/ApiError.ts:14](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ApiError.ts#L14)
137
+ Defined in: [src/ApiError.ts:14](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ApiError.ts#L14)
150
138
 
151
139
  #### Parameters
152
140
 
153
141
  ##### message
154
142
 
155
- `string` | `undefined`
143
+ `string` \| `undefined`
156
144
 
157
145
  ##### templateVariables?
158
146
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: ClassLoader
8
8
 
9
- Defined in: [src/ClassLoader.ts:48](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L48)
9
+ Defined in: [src/ClassLoader.ts:48](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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.
@@ -55,9 +55,9 @@ Jean-Philippe Steinmetz
55
55
 
56
56
  ### Constructor
57
57
 
58
- > **new ClassLoader**(`rootDir`, `includeJavaScript`, `includeTypeScript`, `ignore`): `ClassLoader`
58
+ > **new ClassLoader**(`rootDir`, `includeJavaScript?`, `includeTypeScript?`, `ignore?`): `ClassLoader`
59
59
 
60
- Defined in: [src/ClassLoader.ts:67](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L67)
60
+ Defined in: [src/ClassLoader.ts:67](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ClassLoader.ts#L67)
61
61
 
62
62
  Creates a new instance of `ClassLoader` with the specified defaults.
63
63
 
@@ -69,18 +69,18 @@ Creates a new instance of `ClassLoader` with the specified defaults.
69
69
 
70
70
  The root directory to load all classes from.
71
71
 
72
- ##### includeJavaScript
72
+ ##### includeJavaScript?
73
73
 
74
74
  `boolean` = `true`
75
75
 
76
76
  Set to `true` to load all TypeScript classes from the given `rootDir`, otherwise set to `false.
77
77
  @param includeTypeScript Set to `true` to load all JavaScript classes from the given `rootDir`, otherwise set to `false.
78
78
 
79
- ##### includeTypeScript
79
+ ##### includeTypeScript?
80
80
 
81
81
  `boolean` = `true`
82
82
 
83
- ##### ignore
83
+ ##### ignore?
84
84
 
85
85
  (`string` \| `RegExp`)[] = `[]`
86
86
 
@@ -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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L50)
99
+ Defined in: [src/ClassLoader.ts:50](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L51)
109
+ Defined in: [src/ClassLoader.ts:51](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ClassLoader.ts#L51)
110
110
 
111
111
  ***
112
112
 
@@ -114,7 +114,7 @@ Defined in: [src/ClassLoader.ts:51](https://github.com/rapidrest/core/blob/23a4f
114
114
 
115
115
  > `protected` **includeJavaScript**: `boolean` = `true`
116
116
 
117
- Defined in: [src/ClassLoader.ts:55](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L55)
117
+ Defined in: [src/ClassLoader.ts:55](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L53)
127
+ Defined in: [src/ClassLoader.ts:53](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L57)
137
+ Defined in: [src/ClassLoader.ts:57](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L80)
147
+ Defined in: [src/ClassLoader.ts:80](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L87)
171
+ Defined in: [src/ClassLoader.ts:87](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L97)
185
+ Defined in: [src/ClassLoader.ts:97](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/ClassLoader.ts#L97)
186
186
 
187
187
  Returns `true` if a class exists with the specified fully qualified name.
188
188
 
@@ -204,16 +204,16 @@ The fully qualified name of the class to search.
204
204
 
205
205
  ### load()
206
206
 
207
- > **load**(`dir`): `Promise`\<`void`\>
207
+ > **load**(`dir?`): `Promise`\<`void`\>
208
208
 
209
- Defined in: [src/ClassLoader.ts:107](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/ClassLoader.ts#L107)
209
+ Defined in: [src/ClassLoader.ts:107](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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.
213
213
 
214
214
  #### Parameters
215
215
 
216
- ##### dir
216
+ ##### dir?
217
217
 
218
218
  `string` = `""`
219
219
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: Event
8
8
 
9
- Defined in: [src/TelemetryUtils.ts:23](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L23)
9
+ Defined in: [src/TelemetryUtils.ts:23](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L54)
27
+ Defined in: [src/TelemetryUtils.ts:54](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/TelemetryUtils.ts#L54)
28
28
 
29
29
  #### Parameters
30
30
 
@@ -50,7 +50,7 @@ Defined in: [src/TelemetryUtils.ts:54](https://github.com/rapidrest/core/blob/23
50
50
 
51
51
  > `readonly` **environment**: `string`
52
52
 
53
- Defined in: [src/TelemetryUtils.ts:32](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L32)
53
+ Defined in: [src/TelemetryUtils.ts:32](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L37)
63
+ Defined in: [src/TelemetryUtils.ts:37](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L42)
73
+ Defined in: [src/TelemetryUtils.ts:42](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L47)
83
+ Defined in: [src/TelemetryUtils.ts:47](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L27)
97
+ Defined in: [src/TelemetryUtils.ts:27](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L52)
107
+ Defined in: [src/TelemetryUtils.ts:52](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/TelemetryUtils.ts#L52)
108
108
 
109
109
  The universally unique identifer of the user that sent the event.
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: EventUtils
8
8
 
9
- Defined in: [src/TelemetryUtils.ts:84](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L84)
9
+ Defined in: [src/TelemetryUtils.ts:84](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L99)
40
+ Defined in: [src/TelemetryUtils.ts:99](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L173)
74
+ Defined in: [src/TelemetryUtils.ts:173](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/TelemetryUtils.ts#L118)
103
+ Defined in: [src/TelemetryUtils.ts:118](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/TelemetryUtils.ts#L118)
104
104
 
105
105
  Sends the given event to the telemetry service for permanent recording.
106
106
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: FileUtils
8
8
 
9
- Defined in: [src/FileUtils.ts:17](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/FileUtils.ts#L17)
9
+ Defined in: [src/FileUtils.ts:17](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/FileUtils.ts#L17)
10
10
 
11
11
  Utility functions for working with files.
12
12
 
@@ -28,9 +28,9 @@ Jean-Philippe Steinmetz
28
28
 
29
29
  ### copyBinaryFile()
30
30
 
31
- > `static` **copyBinaryFile**(`srcPath`, `outPath`, `variables`): `Promise`\<`void`\>
31
+ > `static` **copyBinaryFile**(`srcPath`, `outPath`, `variables?`): `Promise`\<`void`\>
32
32
 
33
- Defined in: [src/FileUtils.ts:159](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/FileUtils.ts#L159)
33
+ Defined in: [src/FileUtils.ts:159](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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
 
@@ -48,7 +48,7 @@ The source file to copy.
48
48
 
49
49
  The destination file to generate.
50
50
 
51
- ##### variables
51
+ ##### variables?
52
52
 
53
53
  `any` = `{}`
54
54
 
@@ -62,9 +62,9 @@ The map of variable names to values to swap. Applies to outPath only.
62
62
 
63
63
  ### copyDirectory()
64
64
 
65
- > `static` **copyDirectory**(`srcPath`, `outPath`, `vars`, `excludeFilters`, `binaryFilters`, `force`): `Promise`\<`void`\>
65
+ > `static` **copyDirectory**(`srcPath`, `outPath`, `vars?`, `excludeFilters?`, `binaryFilters?`, `force?`): `Promise`\<`void`\>
66
66
 
67
- Defined in: [src/FileUtils.ts:187](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/FileUtils.ts#L187)
67
+ Defined in: [src/FileUtils.ts:187](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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.
@@ -83,25 +83,25 @@ The path to the source directory to copy files from.
83
83
 
84
84
  The path to the destination directory to copy files to.
85
85
 
86
- ##### vars
86
+ ##### vars?
87
87
 
88
88
  `any` = `{}`
89
89
 
90
90
  The map of template variables to perform replacement on.
91
91
 
92
- ##### excludeFilters
92
+ ##### excludeFilters?
93
93
 
94
94
  `string`[] = `[]`
95
95
 
96
96
  The list of file extension filters to exclude during the copy process.
97
97
 
98
- ##### binaryFilters
98
+ ##### binaryFilters?
99
99
 
100
100
  `string`[] = `[]`
101
101
 
102
102
  The list of file extension filters to copy as binary only.
103
103
 
104
- ##### force
104
+ ##### force?
105
105
 
106
106
  `boolean` = `false`
107
107
 
@@ -115,9 +115,9 @@ Set to `true` to force writing over any existing files.
115
115
 
116
116
  ### copyFile()
117
117
 
118
- > `static` **copyFile**(`srcPath`, `outPath`, `variables`, `overwrite`): `Promise`\<`void`\>
118
+ > `static` **copyFile**(`srcPath`, `outPath`, `variables?`, `overwrite?`): `Promise`\<`void`\>
119
119
 
120
- Defined in: [src/FileUtils.ts:123](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/FileUtils.ts#L123)
120
+ Defined in: [src/FileUtils.ts:123](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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.
@@ -136,13 +136,13 @@ The source file to copy.
136
136
 
137
137
  The destination file to generate.
138
138
 
139
- ##### variables
139
+ ##### variables?
140
140
 
141
141
  `any` = `{}`
142
142
 
143
143
  The map of variable names to values to swap.
144
144
 
145
- ##### overwrite
145
+ ##### overwrite?
146
146
 
147
147
  `boolean` = `false`
148
148
 
@@ -154,9 +154,9 @@ The map of variable names to values to swap.
154
154
 
155
155
  ### writeFile()
156
156
 
157
- > `static` **writeFile**(`srcPath`, `outPath`, `contents`, `overwrite`): `Promise`\<`void`\>
157
+ > `static` **writeFile**(`srcPath`, `outPath`, `contents`, `overwrite?`): `Promise`\<`void`\>
158
158
 
159
- Defined in: [src/FileUtils.ts:28](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/FileUtils.ts#L28)
159
+ Defined in: [src/FileUtils.ts:28](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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
@@ -182,7 +182,7 @@ The destination file path to be written.
182
182
 
183
183
  The contents of the file to write.
184
184
 
185
- ##### overwrite
185
+ ##### overwrite?
186
186
 
187
187
  `boolean` = `false`
188
188
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: JWTUtils
8
8
 
9
- Defined in: [src/JWTUtils.ts:145](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/JWTUtils.ts#L145)
9
+ Defined in: [src/JWTUtils.ts:145](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/JWTUtils.ts#L145)
10
10
 
11
11
  Utility class for working with Json Web Token (JWT) authentication tokens.
12
12
 
@@ -30,9 +30,9 @@ 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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/JWTUtils.ts#L154)
33
+ Defined in: [src/JWTUtils.ts:154](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/JWTUtils.ts#L154)
34
34
 
35
- Generates a new JWT token for the given config and user object. The user object must be a valid RapidREST
35
+ Generates a new JWT token for the given config and user object. The user object must be a valid RapidREST
36
36
  user.
37
37
 
38
38
  #### Parameters
@@ -65,9 +65,9 @@ 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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/JWTUtils.ts#L207)
68
+ Defined in: [src/JWTUtils.ts:208](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/JWTUtils.ts#L208)
69
69
 
70
- Decodes the given JWT authentication token using the provided configuration. If the token is not valid an
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.
72
72
 
73
73
  #### Parameters
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: MessagingUtils
8
8
 
9
- Defined in: [src/MessagingUtils.ts:75](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L75)
9
+ Defined in: [src/MessagingUtils.ts:75](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L75)
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:76](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L76)
29
+ Defined in: [src/MessagingUtils.ts:76](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L76)
30
30
 
31
31
  ***
32
32
 
@@ -34,7 +34,7 @@ Defined in: [src/MessagingUtils.ts:76](https://github.com/rapidrest/core/blob/23
34
34
 
35
35
  > `protected` **slackConfigs**: `any`[] = `[]`
36
36
 
37
- Defined in: [src/MessagingUtils.ts:78](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L78)
37
+ Defined in: [src/MessagingUtils.ts:78](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L78)
38
38
 
39
39
  ## Methods
40
40
 
@@ -42,7 +42,7 @@ Defined in: [src/MessagingUtils.ts:78](https://github.com/rapidrest/core/blob/23
42
42
 
43
43
  > **init**(): `Promise`\<`void`\>
44
44
 
45
- Defined in: [src/MessagingUtils.ts:90](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L90)
45
+ Defined in: [src/MessagingUtils.ts:90](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L90)
46
46
 
47
47
  #### Returns
48
48
 
@@ -54,7 +54,7 @@ Defined in: [src/MessagingUtils.ts:90](https://github.com/rapidrest/core/blob/23
54
54
 
55
55
  > **loadTemplate**(`name`): [`Template`](../interfaces/Template.md)
56
56
 
57
- Defined in: [src/MessagingUtils.ts:152](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L152)
57
+ Defined in: [src/MessagingUtils.ts:152](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L152)
58
58
 
59
59
  Loads the template with the given name and returns its contents as a string.
60
60
 
@@ -74,9 +74,9 @@ The name of the template to load.
74
74
 
75
75
  ### sendEmail()
76
76
 
77
- > **sendEmail**(`templateName`, `templateVars`, `options`): `Promise`\<`any`\>
77
+ > **sendEmail**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
78
78
 
79
- Defined in: [src/MessagingUtils.ts:184](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L184)
79
+ Defined in: [src/MessagingUtils.ts:184](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L184)
80
80
 
81
81
  Sends an email using the given template name and variables.
82
82
 
@@ -94,7 +94,7 @@ The name of the email template to send.
94
94
 
95
95
  The map of variables to inject into the template.
96
96
 
97
- ##### options
97
+ ##### options?
98
98
 
99
99
  `any` = `{}`
100
100
 
@@ -110,7 +110,7 @@ The map of additional options to pass into the sendMail function.
110
110
 
111
111
  > **sendSlack**(`templateName`, `templateVars`): `Promise`\<`any`[] \| `undefined`\>
112
112
 
113
- Defined in: [src/MessagingUtils.ts:236](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L236)
113
+ Defined in: [src/MessagingUtils.ts:236](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L236)
114
114
 
115
115
  Sends an Slack message using the given template name and variables.
116
116
 
@@ -136,9 +136,9 @@ The map of variables to inject into the template.
136
136
 
137
137
  ### sendSMS()
138
138
 
139
- > **sendSMS**(`templateName`, `templateVars`, `options`): `Promise`\<`any`\>
139
+ > **sendSMS**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
140
140
 
141
- Defined in: [src/MessagingUtils.ts:270](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/MessagingUtils.ts#L270)
141
+ Defined in: [src/MessagingUtils.ts:270](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/MessagingUtils.ts#L270)
142
142
 
143
143
  Sends an SMS using the given template name and variables.
144
144
 
@@ -156,7 +156,7 @@ The name of the SMS template to send.
156
156
 
157
157
  The map of variables to inject into the template.
158
158
 
159
- ##### options
159
+ ##### options?
160
160
 
161
161
  `any` = `{}`
162
162
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: OASUtils
8
8
 
9
- Defined in: [src/OASUtils.ts:12](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L12)
9
+ Defined in: [src/OASUtils.ts:12](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/OASUtils.ts#L12)
10
10
 
11
11
  ## Constructors
12
12
 
@@ -24,7 +24,7 @@ Defined in: [src/OASUtils.ts:12](https://github.com/rapidrest/core/blob/23a4f312
24
24
 
25
25
  > `static` **getDatastore**(`spec`, `name`): `any`
26
26
 
27
- Defined in: [src/OASUtils.ts:20](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L20)
27
+ Defined in: [src/OASUtils.ts:20](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L37)
57
+ Defined in: [src/OASUtils.ts:37](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L64)
87
+ Defined in: [src/OASUtils.ts:64](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L83)
109
+ Defined in: [src/OASUtils.ts:83](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L95)
131
+ Defined in: [src/OASUtils.ts:95](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L118)
161
+ Defined in: [src/OASUtils.ts:118](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/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](https://github.com/rapidrest/core/blob/23a4f312bccd7ea3a0598e320bd5d984466027e5/src/OASUtils.ts#L173)
197
+ Defined in: [src/OASUtils.ts:173](https://github.com/rapidrest/core/blob/0eb0ed1163d4555240daccc189ac59a2ba35179a/src/OASUtils.ts#L173)
198
198
 
199
199
  Attempts to load the Open API specification at the given path or URL.
200
200