@rapidrest/core 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/lib/ClassLoader.js +3 -2
  2. package/dist/lib/ClassLoader.js.map +1 -1
  3. package/dist/lib/JWTUtils.js +1 -0
  4. package/dist/lib/JWTUtils.js.map +1 -1
  5. package/dist/lib/StringUtils.js +3 -3
  6. package/dist/types/JWTUtils.d.ts +1 -0
  7. package/dist/types/StringUtils.d.ts +3 -3
  8. package/package.json +2 -7
  9. package/docs/Makefile +0 -20
  10. package/docs/conf.py +0 -58
  11. package/docs/index.rst +0 -17
  12. package/docs/make.bat +0 -35
  13. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/README.md +0 -21
  14. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +0 -33
  15. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +0 -27
  16. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +0 -33
  17. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +0 -33
  18. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +0 -27
  19. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +0 -27
  20. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +0 -25
  21. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +0 -31
  22. package/docs/reference/README.md +0 -35
  23. package/docs/reference/classes/AlertUtils.md +0 -158
  24. package/docs/reference/classes/ApiError.md +0 -251
  25. package/docs/reference/classes/ClassLoader.md +0 -224
  26. package/docs/reference/classes/Event.md +0 -109
  27. package/docs/reference/classes/EventUtils.md +0 -123
  28. package/docs/reference/classes/FileUtils.md +0 -193
  29. package/docs/reference/classes/JWTUtils.md +0 -139
  30. package/docs/reference/classes/MessagingUtils.md +0 -167
  31. package/docs/reference/classes/OASUtils.md +0 -227
  32. package/docs/reference/classes/ObjectFactory.md +0 -276
  33. package/docs/reference/classes/ObjectUtils.md +0 -60
  34. package/docs/reference/classes/StringUtils.md +0 -169
  35. package/docs/reference/classes/ThreadPool.md +0 -249
  36. package/docs/reference/classes/ThreadWorker.md +0 -91
  37. package/docs/reference/classes/UserUtils.md +0 -185
  38. package/docs/reference/classes/ValidationUtils.md +0 -294
  39. package/docs/reference/enumerations/AlertPriority.md +0 -61
  40. package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +0 -21
  41. package/docs/reference/enumerations/WorkerMessageType.md +0 -43
  42. package/docs/reference/functions/sleep.md +0 -25
  43. package/docs/reference/globals.md +0 -73
  44. package/docs/reference/interfaces/Alert.md +0 -101
  45. package/docs/reference/interfaces/AlertAttachment.md +0 -51
  46. package/docs/reference/interfaces/AlertClose.md +0 -31
  47. package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +0 -42
  48. package/docs/reference/interfaces/AlertUtilsOptions.md +0 -41
  49. package/docs/reference/interfaces/InstanceOptions.md +0 -41
  50. package/docs/reference/interfaces/JWTPayload.md +0 -143
  51. package/docs/reference/interfaces/JWTUser.md +0 -55
  52. package/docs/reference/interfaces/JWTUtilsConfig.md +0 -45
  53. package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +0 -68
  54. package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +0 -40
  55. package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +0 -78
  56. package/docs/reference/interfaces/NewEvent.md +0 -25
  57. package/docs/reference/interfaces/OriginSettings.md +0 -25
  58. package/docs/reference/interfaces/SlackConfig.md +0 -33
  59. package/docs/reference/interfaces/SmtpAuth.md +0 -25
  60. package/docs/reference/interfaces/SmtpConfig.md +0 -41
  61. package/docs/reference/interfaces/Template.md +0 -105
  62. package/docs/reference/interfaces/TemplateMapBase.md +0 -13
  63. package/docs/reference/interfaces/TwilioConfig.md +0 -33
  64. package/docs/reference/interfaces/WorkerMessage.md +0 -31
  65. package/docs/reference/interfaces/WorkerOptions.md +0 -61
  66. package/docs/reference/type-aliases/BooleanFunc.md +0 -23
  67. package/docs/reference/type-aliases/TemplateMap.md +0 -17
  68. package/docs/reference/type-aliases/WorkerCallback.md +0 -31
  69. package/docs/reference/variables/Logger.md +0 -25
@@ -1,167 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / MessagingUtils
6
-
7
- # Class: MessagingUtils
8
-
9
- Defined in: [src/MessagingUtils.ts:75](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L75)
10
-
11
- Simple utility class for sending templated messages via e-mail, SMS and more.
12
-
13
- ## Constructors
14
-
15
- ### Constructor
16
-
17
- > **new MessagingUtils**(): `MessagingUtils`
18
-
19
- #### Returns
20
-
21
- `MessagingUtils`
22
-
23
- ## Properties
24
-
25
- ### slackApps
26
-
27
- > `protected` **slackApps**: `any`[] = `[]`
28
-
29
- Defined in: [src/MessagingUtils.ts:76](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L76)
30
-
31
- ***
32
-
33
- ### slackConfigs
34
-
35
- > `protected` **slackConfigs**: `any`[] = `[]`
36
-
37
- Defined in: [src/MessagingUtils.ts:78](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L78)
38
-
39
- ## Methods
40
-
41
- ### init()
42
-
43
- > **init**(): `Promise`\<`void`\>
44
-
45
- Defined in: [src/MessagingUtils.ts:96](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L96)
46
-
47
- #### Returns
48
-
49
- `Promise`\<`void`\>
50
-
51
- ***
52
-
53
- ### loadTemplate()
54
-
55
- > **loadTemplate**(`name`): [`Template`](../interfaces/Template.md)
56
-
57
- Defined in: [src/MessagingUtils.ts:160](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L160)
58
-
59
- Loads the template with the given name and returns its contents as a string.
60
-
61
- #### Parameters
62
-
63
- ##### name
64
-
65
- `string`
66
-
67
- The name of the template to load.
68
-
69
- #### Returns
70
-
71
- [`Template`](../interfaces/Template.md)
72
-
73
- ***
74
-
75
- ### sendEmail()
76
-
77
- > **sendEmail**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
78
-
79
- Defined in: [src/MessagingUtils.ts:199](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L199)
80
-
81
- Sends an email using the given template name and variables.
82
-
83
- #### Parameters
84
-
85
- ##### templateName
86
-
87
- `string`
88
-
89
- The name of the email template to send.
90
-
91
- ##### templateVars
92
-
93
- `any`
94
-
95
- The map of variables to inject into the template.
96
-
97
- ##### options?
98
-
99
- `any` = `{}`
100
-
101
- The map of additional options to pass into the sendMail function.
102
-
103
- #### Returns
104
-
105
- `Promise`\<`any`\>
106
-
107
- ***
108
-
109
- ### sendSlack()
110
-
111
- > **sendSlack**(`templateName`, `templateVars`): `Promise`\<`any`[] \| `undefined`\>
112
-
113
- Defined in: [src/MessagingUtils.ts:243](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L243)
114
-
115
- Sends an Slack message using the given template name and variables.
116
-
117
- #### Parameters
118
-
119
- ##### templateName
120
-
121
- `string`
122
-
123
- The name of the Slack template to send.
124
-
125
- ##### templateVars
126
-
127
- `any`
128
-
129
- The map of variables to inject into the template.
130
-
131
- #### Returns
132
-
133
- `Promise`\<`any`[] \| `undefined`\>
134
-
135
- ***
136
-
137
- ### sendSMS()
138
-
139
- > **sendSMS**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
140
-
141
- Defined in: [src/MessagingUtils.ts:276](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/MessagingUtils.ts#L276)
142
-
143
- Sends an SMS using the given template name and variables.
144
-
145
- #### Parameters
146
-
147
- ##### templateName
148
-
149
- `string`
150
-
151
- The name of the SMS template to send.
152
-
153
- ##### templateVars
154
-
155
- `any`
156
-
157
- The map of variables to inject into the template.
158
-
159
- ##### options?
160
-
161
- `any` = `{}`
162
-
163
- The map of additional options to pass into the sendMail function.
164
-
165
- #### Returns
166
-
167
- `Promise`\<`any`\>
@@ -1,227 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / OASUtils
6
-
7
- # Class: OASUtils
8
-
9
- Defined in: [src/OASUtils.ts:17](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L17)
10
-
11
- ## Constructors
12
-
13
- ### Constructor
14
-
15
- > **new OASUtils**(): `OASUtils`
16
-
17
- #### Returns
18
-
19
- `OASUtils`
20
-
21
- ## Methods
22
-
23
- ### clearSpecCache()
24
-
25
- > `static` **clearSpecCache**(): `void`
26
-
27
- Defined in: [src/OASUtils.ts:230](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L230)
28
-
29
- Clears the spec parse cache. Useful in tests to force re-loading of specs.
30
-
31
- #### Returns
32
-
33
- `void`
34
-
35
- ***
36
-
37
- ### getDatastore()
38
-
39
- > `static` **getDatastore**(`spec`, `name`): `any`
40
-
41
- Defined in: [src/OASUtils.ts:25](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L25)
42
-
43
- Gets the datastore definition with the specified name.
44
-
45
- #### Parameters
46
-
47
- ##### spec
48
-
49
- `any`
50
-
51
- The OpenAPI specification to search.
52
-
53
- ##### name
54
-
55
- `string`
56
-
57
- The name of the datastore to retrieve.
58
-
59
- #### Returns
60
-
61
- `any`
62
-
63
- The definition for the datastore with the given name if found, otherwise `undefined`.
64
-
65
- ***
66
-
67
- ### getObject()
68
-
69
- > `static` **getObject**(`spec`, `path`): `any`
70
-
71
- Defined in: [src/OASUtils.ts:42](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L42)
72
-
73
- Gets the specification object at the specified path.
74
-
75
- #### Parameters
76
-
77
- ##### spec
78
-
79
- `any`
80
-
81
- The OpenAPI specification to reference.
82
-
83
- ##### path
84
-
85
- `string`
86
-
87
- The path of the object to retrieve.
88
-
89
- #### Returns
90
-
91
- `any`
92
-
93
- The object at the specified path if found, otherwise `undefined`.
94
-
95
- ***
96
-
97
- ### getResponse()
98
-
99
- > `static` **getResponse**(`obj`): `any`
100
-
101
- Defined in: [src/OASUtils.ts:69](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L69)
102
-
103
- Returns the first available response object for a 2XX response as defined by the provided Operation schema object.
104
-
105
- #### Parameters
106
-
107
- ##### obj
108
-
109
- `any`
110
-
111
- The Operation schema object to search.
112
-
113
- #### Returns
114
-
115
- `any`
116
-
117
- ***
118
-
119
- ### getResponseContent()
120
-
121
- > `static` **getResponseContent**(`obj`): `any`
122
-
123
- Defined in: [src/OASUtils.ts:88](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L88)
124
-
125
- Returns the first available response content object for a 2XX response as defined by the provided Operation schema object.
126
-
127
- #### Parameters
128
-
129
- ##### obj
130
-
131
- `any`
132
-
133
- The Operation schema object to search.
134
-
135
- #### Returns
136
-
137
- `any`
138
-
139
- ***
140
-
141
- ### getSchema()
142
-
143
- > `static` **getSchema**(`spec`, `name`): `any`
144
-
145
- Defined in: [src/OASUtils.ts:100](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L100)
146
-
147
- Retrieves the schema definition with the given name.
148
-
149
- #### Parameters
150
-
151
- ##### spec
152
-
153
- `any`
154
-
155
- The OpenAPI specification object to reference.
156
-
157
- ##### name
158
-
159
- `string`
160
-
161
- The name of the schema to retrieve.
162
-
163
- #### Returns
164
-
165
- `any`
166
-
167
- The schema definition with the given name.
168
-
169
- ***
170
-
171
- ### getTypeInfo()
172
-
173
- > `static` **getTypeInfo**(`schemaDef`, `spec`, `convertDataType`): `any`
174
-
175
- Defined in: [src/OASUtils.ts:124](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L124)
176
-
177
- Extracts the type information for a given schema Object definition.
178
-
179
- #### Parameters
180
-
181
- ##### schemaDef
182
-
183
- `any`
184
-
185
- The schema definition object to extract type information from.
186
-
187
- ##### spec
188
-
189
- `any`
190
-
191
- The entire OpenAPI specification object.
192
-
193
- ##### convertDataType
194
-
195
- `Function`
196
-
197
- The function that converts OpenAPI Specification types to native types.
198
-
199
- #### Returns
200
-
201
- `any`
202
-
203
- A tuple containing the type, subType and subSchemaRef information.
204
-
205
- ***
206
-
207
- ### loadSpec()
208
-
209
- > `static` **loadSpec**(`file`): `Promise`\<`any`\>
210
-
211
- Defined in: [src/OASUtils.ts:179](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/OASUtils.ts#L179)
212
-
213
- Attempts to load the Open API specification at the given path or URL.
214
-
215
- #### Parameters
216
-
217
- ##### file
218
-
219
- `string`
220
-
221
- The path or URL of the OpenAPI Specification file to load.
222
-
223
- #### Returns
224
-
225
- `Promise`\<`any`\>
226
-
227
- A promise whose result will be the loaded OpenAPI Specification as an object.
@@ -1,276 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / ObjectFactory
6
-
7
- # Class: ObjectFactory
8
-
9
- Defined in: [src/ObjectFactory.ts:36](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L36)
10
-
11
- The `ObjectFactory` is a manager for creating objects based on registered
12
- class types. This allows for the tracking of multiple instances of objects
13
- so that references can be referenced by unique name.
14
-
15
- ## Author
16
-
17
- Jean-Philippe Steinmetz
18
-
19
- ## Constructors
20
-
21
- ### Constructor
22
-
23
- > **new ObjectFactory**(`config?`, `logger?`): `ObjectFactory`
24
-
25
- Defined in: [src/ObjectFactory.ts:55](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L55)
26
-
27
- #### Parameters
28
-
29
- ##### config?
30
-
31
- `any`
32
-
33
- ##### logger?
34
-
35
- `any`
36
-
37
- #### Returns
38
-
39
- `ObjectFactory`
40
-
41
- ## Properties
42
-
43
- ### classes
44
-
45
- > `readonly` **classes**: `Map`\<`string`, `any`\>
46
-
47
- Defined in: [src/ObjectFactory.ts:38](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L38)
48
-
49
- A map for string fully qualified class names to their class types.
50
-
51
- ***
52
-
53
- ### config
54
-
55
- > `protected` **config**: `any`
56
-
57
- Defined in: [src/ObjectFactory.ts:41](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L41)
58
-
59
- The global application configuration object.
60
-
61
- ***
62
-
63
- ### instances
64
-
65
- > `readonly` **instances**: `Map`\<`string`, `any`\>
66
-
67
- Defined in: [src/ObjectFactory.ts:44](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L44)
68
-
69
- A map for the unique name to the intance of a particular class type.
70
-
71
- ***
72
-
73
- ### logger
74
-
75
- > `protected` **logger**: `any`
76
-
77
- Defined in: [src/ObjectFactory.ts:47](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L47)
78
-
79
- The application logging utility.
80
-
81
- ## Methods
82
-
83
- ### clear()
84
-
85
- > **clear**(): `void`
86
-
87
- Defined in: [src/ObjectFactory.ts:158](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L158)
88
-
89
- Deletes all instantiated objects.
90
-
91
- #### Returns
92
-
93
- `void`
94
-
95
- ***
96
-
97
- ### clearAll()
98
-
99
- > **clearAll**(): `void`
100
-
101
- Defined in: [src/ObjectFactory.ts:166](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L166)
102
-
103
- Deletes all instantiated objects and registered class types.
104
-
105
- #### Returns
106
-
107
- `void`
108
-
109
- ***
110
-
111
- ### destroy()
112
-
113
- > **destroy**(`objs?`): `Promise`\<`void`\>
114
-
115
- Defined in: [src/ObjectFactory.ts:117](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L117)
116
-
117
- Destroys the specified objects. If `undefined` is passed in, all objects managed by the factory are destroyed.
118
-
119
- #### Parameters
120
-
121
- ##### objs?
122
-
123
- `any`
124
-
125
- #### Returns
126
-
127
- `Promise`\<`void`\>
128
-
129
- ***
130
-
131
- ### getInitMethods()
132
-
133
- > **getInitMethods**(`obj`): `Function`[]
134
-
135
- Defined in: [src/ObjectFactory.ts:248](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L248)
136
-
137
- Searches an object for one or more functions that implement a `@Init` decorator.
138
-
139
- #### Parameters
140
-
141
- ##### obj
142
-
143
- `any`
144
-
145
- The object to search.
146
-
147
- #### Returns
148
-
149
- `Function`[]
150
-
151
- The list of functions that implements the `@Init` decorator if found, otherwise undefined.
152
-
153
- ***
154
-
155
- ### getInstance()
156
-
157
- > **getInstance**\<`T`\>(`nameOrType`): `T` \| `undefined`
158
-
159
- Defined in: [src/ObjectFactory.ts:282](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L282)
160
-
161
- Returns the object instance with the given unique name. Unique names take the form `<ClassName>:<InstanceName>`.
162
- It is possible to only specifiy the `<ClassName>`, doing so will automatically look for the `<ClassName>:default`
163
- instance or the first found instance of the given type.
164
-
165
- #### Type Parameters
166
-
167
- ##### T
168
-
169
- `T`
170
-
171
- #### Parameters
172
-
173
- ##### nameOrType
174
-
175
- `any`
176
-
177
- The unique name or class type of the object to retrieve.
178
-
179
- #### Returns
180
-
181
- `T` \| `undefined`
182
-
183
- The object instance associated with the given name if found, otherwise `undefined`.
184
-
185
- ***
186
-
187
- ### initialize()
188
-
189
- > **initialize**\<`T`\>(`obj`): `T` \| `Promise`\<`T`\>
190
-
191
- Defined in: [src/ObjectFactory.ts:175](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L175)
192
-
193
- Scans the given object for any properties with the `@Inject` decorator and assigns the correct values.
194
-
195
- #### Type Parameters
196
-
197
- ##### T
198
-
199
- `T`
200
-
201
- #### Parameters
202
-
203
- ##### obj
204
-
205
- `any`
206
-
207
- The object to initialize with injected defaults
208
-
209
- #### Returns
210
-
211
- `T` \| `Promise`\<`T`\>
212
-
213
- ***
214
-
215
- ### newInstance()
216
-
217
- > **newInstance**\<`T`\>(`type`, `options?`): `T` \| `Promise`\<`T`\>
218
-
219
- Defined in: [src/ObjectFactory.ts:323](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L323)
220
-
221
- Creates a new instance of the class specified with the provided unique name or type and constructor arguments. If an existing
222
- object has already been created with the given name, that instance is returned, otherwise a new instance is created
223
- using the provided arguments.
224
-
225
- #### Type Parameters
226
-
227
- ##### T
228
-
229
- `T`
230
-
231
- #### Parameters
232
-
233
- ##### type
234
-
235
- `any`
236
-
237
- The fully qualified name or type of the class to instantiate. If a type is given it's class name will be inferred
238
- via the constructor name.
239
-
240
- ##### options?
241
-
242
- [`InstanceOptions`](../interfaces/InstanceOptions.md)
243
-
244
- The options to use when instantiating the new class object.
245
-
246
- #### Returns
247
-
248
- `T` \| `Promise`\<`T`\>
249
-
250
- ***
251
-
252
- ### register()
253
-
254
- > **register**(`clazz`, `fqn?`): `void`
255
-
256
- Defined in: [src/ObjectFactory.ts:399](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectFactory.ts#L399)
257
-
258
- Registers the given class type for the provided fully qualified name.
259
-
260
- #### Parameters
261
-
262
- ##### clazz
263
-
264
- `any`
265
-
266
- The class type to register.
267
-
268
- ##### fqn?
269
-
270
- `string`
271
-
272
- The fully qualified name of the class to register. If not specified, the class name will be used.
273
-
274
- #### Returns
275
-
276
- `void`
@@ -1,60 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / ObjectUtils
6
-
7
- # Class: ObjectUtils
8
-
9
- Defined in: [src/ObjectUtils.ts:12](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectUtils.ts#L12)
10
-
11
- Utility class for working with objects.
12
-
13
- ## Author
14
-
15
- Jean-Philippe Steinmetz
16
-
17
- ## Constructors
18
-
19
- ### Constructor
20
-
21
- > **new ObjectUtils**(): `ObjectUtils`
22
-
23
- #### Returns
24
-
25
- `ObjectUtils`
26
-
27
- ## Methods
28
-
29
- ### validate()
30
-
31
- > `static` **validate**(`obj`, `clazz?`, `recurse?`): `void`
32
-
33
- Defined in: [src/ObjectUtils.ts:21](https://github.com/rapidrest/core/blob/df82e91f4c858ef61526c7f35789a4199b84d999/src/ObjectUtils.ts#L21)
34
-
35
- Performs validation of the given object or array. Validation is performed by scanning the object class for properties
36
- decorated with `@Validator` and executing the provided validation function.
37
-
38
- #### Parameters
39
-
40
- ##### obj
41
-
42
- `any`
43
-
44
- The object or array of objects to validate.
45
-
46
- ##### clazz?
47
-
48
- `any`
49
-
50
- The class type that contains the validation metadata.
51
-
52
- ##### recurse?
53
-
54
- `boolean`
55
-
56
- Set to `true` to validate all child objects.
57
-
58
- #### Returns
59
-
60
- `void`