@rapidrest/core 1.0.1
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.
- package/LICENSE +23 -0
- package/README.rst +37 -0
- package/dist/lib/AlertUtils.js +239 -0
- package/dist/lib/AlertUtils.js.map +1 -0
- package/dist/lib/ApiError.js +34 -0
- package/dist/lib/ApiError.js.map +1 -0
- package/dist/lib/ClassLoader.js +159 -0
- package/dist/lib/ClassLoader.js.map +1 -0
- package/dist/lib/FileUtils.js +190 -0
- package/dist/lib/FileUtils.js.map +1 -0
- package/dist/lib/JWTUtils.js +111 -0
- package/dist/lib/JWTUtils.js.map +1 -0
- package/dist/lib/Logger.js +28 -0
- package/dist/lib/Logger.js.map +1 -0
- package/dist/lib/MessagingUtils.js +218 -0
- package/dist/lib/MessagingUtils.js.map +1 -0
- package/dist/lib/NotificationsUtils.js +52 -0
- package/dist/lib/NotificationsUtils.js.map +1 -0
- package/dist/lib/OASUtils.js +207 -0
- package/dist/lib/OASUtils.js.map +1 -0
- package/dist/lib/ObjectFactory.js +302 -0
- package/dist/lib/ObjectFactory.js.map +1 -0
- package/dist/lib/ObjectUtils.js +49 -0
- package/dist/lib/ObjectUtils.js.map +1 -0
- package/dist/lib/StringUtils.js +104 -0
- package/dist/lib/StringUtils.js.map +1 -0
- package/dist/lib/TelemetryUtils.js +159 -0
- package/dist/lib/TelemetryUtils.js.map +1 -0
- package/dist/lib/UserUtils.js +138 -0
- package/dist/lib/UserUtils.js.map +1 -0
- package/dist/lib/ValidationUtils.js +130 -0
- package/dist/lib/ValidationUtils.js.map +1 -0
- package/dist/lib/decorators/ObjectDecorators.js +95 -0
- package/dist/lib/decorators/ObjectDecorators.js.map +1 -0
- package/dist/lib/decorators/index.js +2 -0
- package/dist/lib/decorators/index.js.map +1 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/sleep.js +15 -0
- package/dist/lib/sleep.js.map +1 -0
- package/dist/lib/threads/ThreadLogger.js +43 -0
- package/dist/lib/threads/ThreadLogger.js.map +1 -0
- package/dist/lib/threads/ThreadPool.js +270 -0
- package/dist/lib/threads/ThreadPool.js.map +1 -0
- package/dist/lib/threads/ThreadWorker.js +25 -0
- package/dist/lib/threads/ThreadWorker.js.map +1 -0
- package/dist/lib/threads/ThreadWorkerEntry.js +77 -0
- package/dist/lib/threads/ThreadWorkerEntry.js.map +1 -0
- package/dist/lib/threads/index.js +3 -0
- package/dist/lib/threads/index.js.map +1 -0
- package/dist/types/AlertUtils.d.ts +132 -0
- package/dist/types/ApiError.d.ts +13 -0
- package/dist/types/ClassLoader.d.ts +87 -0
- package/dist/types/FileUtils.d.ts +46 -0
- package/dist/types/JWTUtils.d.ts +139 -0
- package/dist/types/Logger.d.ts +7 -0
- package/dist/types/MessagingUtils.d.ts +77 -0
- package/dist/types/NotificationsUtils.d.ts +32 -0
- package/dist/types/OASUtils.d.ts +54 -0
- package/dist/types/ObjectFactory.d.ts +77 -0
- package/dist/types/ObjectUtils.d.ts +17 -0
- package/dist/types/StringUtils.d.ts +52 -0
- package/dist/types/TelemetryUtils.d.ts +84 -0
- package/dist/types/UserUtils.d.ts +61 -0
- package/dist/types/ValidationUtils.d.ts +66 -0
- package/dist/types/decorators/ObjectDecorators.d.ts +55 -0
- package/dist/types/decorators/index.d.ts +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/sleep.d.ts +5 -0
- package/dist/types/threads/ThreadLogger.d.ts +15 -0
- package/dist/types/threads/ThreadPool.d.ts +115 -0
- package/dist/types/threads/ThreadWorker.d.ts +41 -0
- package/dist/types/threads/ThreadWorkerEntry.d.ts +1 -0
- package/dist/types/threads/index.d.ts +2 -0
- package/docs/Makefile +20 -0
- package/docs/conf.py +58 -0
- package/docs/index.rst +17 -0
- package/docs/make.bat +35 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/README.md +21 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +47 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +33 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +45 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +39 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +31 -0
- package/docs/reference/README.md +73 -0
- package/docs/reference/classes/AlertUtils.md +158 -0
- package/docs/reference/classes/ApiError.md +263 -0
- package/docs/reference/classes/ClassLoader.md +224 -0
- package/docs/reference/classes/Event.md +109 -0
- package/docs/reference/classes/EventUtils.md +123 -0
- package/docs/reference/classes/FileUtils.md +193 -0
- package/docs/reference/classes/JWTUtils.md +91 -0
- package/docs/reference/classes/MessagingUtils.md +145 -0
- package/docs/reference/classes/OASUtils.md +213 -0
- package/docs/reference/classes/ObjectFactory.md +274 -0
- package/docs/reference/classes/ObjectUtils.md +60 -0
- package/docs/reference/classes/StringUtils.md +169 -0
- package/docs/reference/classes/ThreadPool.md +249 -0
- package/docs/reference/classes/ThreadWorker.md +91 -0
- package/docs/reference/classes/UserUtils.md +239 -0
- package/docs/reference/classes/ValidationUtils.md +294 -0
- package/docs/reference/enumerations/AlertPriority.md +61 -0
- package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +21 -0
- package/docs/reference/enumerations/WorkerMessageType.md +43 -0
- package/docs/reference/functions/sleep.md +25 -0
- package/docs/reference/interfaces/Alert.md +101 -0
- package/docs/reference/interfaces/AlertAttachment.md +51 -0
- package/docs/reference/interfaces/AlertClose.md +31 -0
- package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +42 -0
- package/docs/reference/interfaces/AlertUtilsOptions.md +41 -0
- package/docs/reference/interfaces/InstanceOptions.md +35 -0
- package/docs/reference/interfaces/JWTPayload.md +143 -0
- package/docs/reference/interfaces/JWTUser.md +55 -0
- package/docs/reference/interfaces/JWTUtilsConfig.md +45 -0
- package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +68 -0
- package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +40 -0
- package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +78 -0
- package/docs/reference/interfaces/NewEvent.md +25 -0
- package/docs/reference/interfaces/OriginSettings.md +25 -0
- package/docs/reference/interfaces/SlackConfig.md +33 -0
- package/docs/reference/interfaces/SmtpAuth.md +25 -0
- package/docs/reference/interfaces/SmtpConfig.md +41 -0
- package/docs/reference/interfaces/Template.md +81 -0
- package/docs/reference/interfaces/TemplateMapBase.md +13 -0
- package/docs/reference/interfaces/TwilioConfig.md +33 -0
- package/docs/reference/interfaces/WorkerMessage.md +31 -0
- package/docs/reference/interfaces/WorkerOptions.md +61 -0
- package/docs/reference/type-aliases/BooleanFunc.md +23 -0
- package/docs/reference/type-aliases/TemplateMap.md +17 -0
- package/docs/reference/type-aliases/WorkerCallback.md +31 -0
- package/docs/reference/variables/Logger.md +21 -0
- package/package.json +96 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / Alert
|
|
6
|
+
|
|
7
|
+
# Interface: Alert
|
|
8
|
+
|
|
9
|
+
Defined in: src/AlertUtils.ts:40
|
|
10
|
+
|
|
11
|
+
Describes a single system failure or other similar critical event that requires immediate attention.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### alias
|
|
16
|
+
|
|
17
|
+
> **alias**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: src/AlertUtils.ts:42
|
|
20
|
+
|
|
21
|
+
The name of the alert that uniquely identifies the report for purposes of de-duplication.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### description
|
|
26
|
+
|
|
27
|
+
> **description**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: src/AlertUtils.ts:44
|
|
30
|
+
|
|
31
|
+
The detailed information about the event that has occurred.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### details?
|
|
36
|
+
|
|
37
|
+
> `optional` **details**: `any`
|
|
38
|
+
|
|
39
|
+
Defined in: src/AlertUtils.ts:46
|
|
40
|
+
|
|
41
|
+
A key-value map of custom information about the alert.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### entity?
|
|
46
|
+
|
|
47
|
+
> `optional` **entity**: `string`
|
|
48
|
+
|
|
49
|
+
Defined in: src/AlertUtils.ts:48
|
|
50
|
+
|
|
51
|
+
Used to specify a category or problem domain for filtering.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### message
|
|
56
|
+
|
|
57
|
+
> **message**: `string`
|
|
58
|
+
|
|
59
|
+
Defined in: src/AlertUtils.ts:50
|
|
60
|
+
|
|
61
|
+
The basic summary of the alert that describes the event.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### note?
|
|
66
|
+
|
|
67
|
+
> `optional` **note**: `string`
|
|
68
|
+
|
|
69
|
+
Defined in: src/AlertUtils.ts:52
|
|
70
|
+
|
|
71
|
+
Additional detail about the event.
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### priority
|
|
76
|
+
|
|
77
|
+
> **priority**: [`AlertPriority`](../enumerations/AlertPriority.md)
|
|
78
|
+
|
|
79
|
+
Defined in: src/AlertUtils.ts:54
|
|
80
|
+
|
|
81
|
+
The priority level of the alert.
|
|
82
|
+
|
|
83
|
+
***
|
|
84
|
+
|
|
85
|
+
### source
|
|
86
|
+
|
|
87
|
+
> **source**: `string`
|
|
88
|
+
|
|
89
|
+
Defined in: src/AlertUtils.ts:56
|
|
90
|
+
|
|
91
|
+
The source of the alert. Can be a pod/service name, IP address or other unique identifier.
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### tags?
|
|
96
|
+
|
|
97
|
+
> `optional` **tags**: `string`[]
|
|
98
|
+
|
|
99
|
+
Defined in: src/AlertUtils.ts:58
|
|
100
|
+
|
|
101
|
+
A list of unique tags to associate with the event.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / AlertAttachment
|
|
6
|
+
|
|
7
|
+
# Interface: AlertAttachment
|
|
8
|
+
|
|
9
|
+
Defined in: src/AlertUtils.ts:64
|
|
10
|
+
|
|
11
|
+
Describes a single attachment that can be added to an alert.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### contentType
|
|
16
|
+
|
|
17
|
+
> **contentType**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: src/AlertUtils.ts:66
|
|
20
|
+
|
|
21
|
+
The content-type of the attachment.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### data
|
|
26
|
+
|
|
27
|
+
> **data**: `Buffer`\<`ArrayBufferLike`\> \| `ReadStream`
|
|
28
|
+
|
|
29
|
+
Defined in: src/AlertUtils.ts:68
|
|
30
|
+
|
|
31
|
+
The contents of the attachment.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### filename
|
|
36
|
+
|
|
37
|
+
> **filename**: `string`
|
|
38
|
+
|
|
39
|
+
Defined in: src/AlertUtils.ts:70
|
|
40
|
+
|
|
41
|
+
The name of the attachment.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### size?
|
|
46
|
+
|
|
47
|
+
> `optional` **size**: `number`
|
|
48
|
+
|
|
49
|
+
Defined in: src/AlertUtils.ts:72
|
|
50
|
+
|
|
51
|
+
The size of the attachment.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / AlertClose
|
|
6
|
+
|
|
7
|
+
# Interface: AlertClose
|
|
8
|
+
|
|
9
|
+
Defined in: src/AlertUtils.ts:78
|
|
10
|
+
|
|
11
|
+
Describes a request to close an alert.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### note?
|
|
16
|
+
|
|
17
|
+
> `optional` **note**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: src/AlertUtils.ts:82
|
|
20
|
+
|
|
21
|
+
Additional alert note to add.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### source?
|
|
26
|
+
|
|
27
|
+
> `optional` **source**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: src/AlertUtils.ts:80
|
|
30
|
+
|
|
31
|
+
Display name of the request source.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / AlertUtilsAttachmentOptions
|
|
6
|
+
|
|
7
|
+
# Interface: AlertUtilsAttachmentOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/AlertUtils.ts:100
|
|
10
|
+
|
|
11
|
+
Describes the alert attachment options to use when creating an alert.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### files
|
|
16
|
+
|
|
17
|
+
> **files**: [`AlertAttachment`](AlertAttachment.md)[]
|
|
18
|
+
|
|
19
|
+
Defined in: src/AlertUtils.ts:102
|
|
20
|
+
|
|
21
|
+
The attachment files to upload with the alert.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### indexFile?
|
|
26
|
+
|
|
27
|
+
> `optional` **indexFile**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: src/AlertUtils.ts:104
|
|
30
|
+
|
|
31
|
+
The name of the index file when the attachment is a zip file.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### zip?
|
|
36
|
+
|
|
37
|
+
> `optional` **zip**: `boolean`
|
|
38
|
+
|
|
39
|
+
Defined in: src/AlertUtils.ts:109
|
|
40
|
+
|
|
41
|
+
Set to `true` to to package all files into a single zip before being uploaded, otherwise set to `false` to
|
|
42
|
+
upload each file individually.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / AlertUtilsOptions
|
|
6
|
+
|
|
7
|
+
# Interface: AlertUtilsOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/AlertUtils.ts:88
|
|
10
|
+
|
|
11
|
+
The set of configuration options to pass to AlertUtils when creating an instance.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### auth
|
|
16
|
+
|
|
17
|
+
> **auth**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: src/AlertUtils.ts:90
|
|
20
|
+
|
|
21
|
+
The value of the Authorization header to apply to all outgoing HTTP requests.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### logger?
|
|
26
|
+
|
|
27
|
+
> `optional` **logger**: `any`
|
|
28
|
+
|
|
29
|
+
Defined in: src/AlertUtils.ts:94
|
|
30
|
+
|
|
31
|
+
The logging utility to use.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### serviceUrl
|
|
36
|
+
|
|
37
|
+
> **serviceUrl**: `string`
|
|
38
|
+
|
|
39
|
+
Defined in: src/AlertUtils.ts:92
|
|
40
|
+
|
|
41
|
+
The full url of the REST API service that alerts will be sent to.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / InstanceOptions
|
|
6
|
+
|
|
7
|
+
# Interface: InstanceOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/ObjectFactory.ts:11
|
|
10
|
+
|
|
11
|
+
The set of options to use when creating new instances of objects.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### args?
|
|
16
|
+
|
|
17
|
+
> `optional` **args**: `any`[]
|
|
18
|
+
|
|
19
|
+
Defined in: src/ObjectFactory.ts:12
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### initialize?
|
|
24
|
+
|
|
25
|
+
> `optional` **initialize**: `boolean`
|
|
26
|
+
|
|
27
|
+
Defined in: src/ObjectFactory.ts:14
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### name?
|
|
32
|
+
|
|
33
|
+
> `optional` **name**: `string`
|
|
34
|
+
|
|
35
|
+
Defined in: src/ObjectFactory.ts:13
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTPayload
|
|
6
|
+
|
|
7
|
+
# Interface: JWTPayload
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:38
|
|
10
|
+
|
|
11
|
+
Describes the payload data structure of signed JWT tokens.
|
|
12
|
+
|
|
13
|
+
## Extends
|
|
14
|
+
|
|
15
|
+
- `JwtPayload`
|
|
16
|
+
|
|
17
|
+
## Indexable
|
|
18
|
+
|
|
19
|
+
\[`key`: `string`\]: `any`
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### aud?
|
|
24
|
+
|
|
25
|
+
> `optional` **aud**: `string` \| `string`[]
|
|
26
|
+
|
|
27
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:115
|
|
28
|
+
|
|
29
|
+
#### Inherited from
|
|
30
|
+
|
|
31
|
+
`jwt.JwtPayload.aud`
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### compression?
|
|
36
|
+
|
|
37
|
+
> `optional` **compression**: `"zlib"`
|
|
38
|
+
|
|
39
|
+
Defined in: src/JWTUtils.ts:40
|
|
40
|
+
|
|
41
|
+
Indicates if the payload profile has been compressed and with what method.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### encryption?
|
|
46
|
+
|
|
47
|
+
> `optional` **encryption**: `boolean`
|
|
48
|
+
|
|
49
|
+
Defined in: src/JWTUtils.ts:43
|
|
50
|
+
|
|
51
|
+
Indicates if the payload profile has been encrypted.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### exp?
|
|
56
|
+
|
|
57
|
+
> `optional` **exp**: `number`
|
|
58
|
+
|
|
59
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:116
|
|
60
|
+
|
|
61
|
+
#### Inherited from
|
|
62
|
+
|
|
63
|
+
`jwt.JwtPayload.exp`
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### iat?
|
|
68
|
+
|
|
69
|
+
> `optional` **iat**: `number`
|
|
70
|
+
|
|
71
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:118
|
|
72
|
+
|
|
73
|
+
#### Inherited from
|
|
74
|
+
|
|
75
|
+
`jwt.JwtPayload.iat`
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### iss?
|
|
80
|
+
|
|
81
|
+
> `optional` **iss**: `string`
|
|
82
|
+
|
|
83
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:113
|
|
84
|
+
|
|
85
|
+
#### Inherited from
|
|
86
|
+
|
|
87
|
+
`jwt.JwtPayload.iss`
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### jti?
|
|
92
|
+
|
|
93
|
+
> `optional` **jti**: `string`
|
|
94
|
+
|
|
95
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:119
|
|
96
|
+
|
|
97
|
+
#### Inherited from
|
|
98
|
+
|
|
99
|
+
`jwt.JwtPayload.jti`
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### nbf?
|
|
104
|
+
|
|
105
|
+
> `optional` **nbf**: `number`
|
|
106
|
+
|
|
107
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:117
|
|
108
|
+
|
|
109
|
+
#### Inherited from
|
|
110
|
+
|
|
111
|
+
`jwt.JwtPayload.nbf`
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### profile
|
|
116
|
+
|
|
117
|
+
> **profile**: `string` \| [`JWTUser`](JWTUser.md)
|
|
118
|
+
|
|
119
|
+
Defined in: src/JWTUtils.ts:46
|
|
120
|
+
|
|
121
|
+
The user profile of the authenticated user the token is valid for.
|
|
122
|
+
|
|
123
|
+
***
|
|
124
|
+
|
|
125
|
+
### sessionUid
|
|
126
|
+
|
|
127
|
+
> **sessionUid**: `string`
|
|
128
|
+
|
|
129
|
+
Defined in: src/JWTUtils.ts:49
|
|
130
|
+
|
|
131
|
+
The unique identifier of the user's authentication session.
|
|
132
|
+
|
|
133
|
+
***
|
|
134
|
+
|
|
135
|
+
### sub?
|
|
136
|
+
|
|
137
|
+
> `optional` **sub**: `string`
|
|
138
|
+
|
|
139
|
+
Defined in: node\_modules/@types/jsonwebtoken/index.d.ts:114
|
|
140
|
+
|
|
141
|
+
#### Inherited from
|
|
142
|
+
|
|
143
|
+
`jwt.JwtPayload.sub`
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTUser
|
|
6
|
+
|
|
7
|
+
# Interface: JWTUser
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:13
|
|
10
|
+
|
|
11
|
+
Describes user data that is encoded in the payload of a JWT token.
|
|
12
|
+
|
|
13
|
+
## Author
|
|
14
|
+
|
|
15
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### name
|
|
20
|
+
|
|
21
|
+
> **name**: `string`
|
|
22
|
+
|
|
23
|
+
Defined in: src/JWTUtils.ts:22
|
|
24
|
+
|
|
25
|
+
The unique name of the user.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### roles
|
|
30
|
+
|
|
31
|
+
> **roles**: `string`[]
|
|
32
|
+
|
|
33
|
+
Defined in: src/JWTUtils.ts:27
|
|
34
|
+
|
|
35
|
+
The list of roles (by name) that the user is apart of and will assume privileges for.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### uid
|
|
40
|
+
|
|
41
|
+
> **uid**: `string`
|
|
42
|
+
|
|
43
|
+
Defined in: src/JWTUtils.ts:17
|
|
44
|
+
|
|
45
|
+
The universally unique identifier of the user.
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### verified?
|
|
50
|
+
|
|
51
|
+
> `optional` **verified**: `boolean`
|
|
52
|
+
|
|
53
|
+
Defined in: src/JWTUtils.ts:32
|
|
54
|
+
|
|
55
|
+
Indicates if the user's e-mail address has been verified.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTUtilsConfig
|
|
6
|
+
|
|
7
|
+
# Interface: JWTUtilsConfig
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:123
|
|
10
|
+
|
|
11
|
+
Describes the configuration options to be used with `JWTUtils` functions.
|
|
12
|
+
|
|
13
|
+
## Author
|
|
14
|
+
|
|
15
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### options?
|
|
20
|
+
|
|
21
|
+
> `optional` **options**: `VerifyOptions`
|
|
22
|
+
|
|
23
|
+
Defined in: src/JWTUtils.ts:132
|
|
24
|
+
|
|
25
|
+
The options to use when performing JWT signing or verification.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### payload?
|
|
30
|
+
|
|
31
|
+
> `optional` **payload**: [`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md) \| [`JWTUtilsPayloadPasswordOptions`](JWTUtilsPayloadPasswordOptions.md) \| [`JWTUtilsPayloadKeyOptions`](JWTUtilsPayloadKeyOptions.md)
|
|
32
|
+
|
|
33
|
+
Defined in: src/JWTUtils.ts:137
|
|
34
|
+
|
|
35
|
+
The options that determine how JWT token payloads will be handled.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### secret
|
|
40
|
+
|
|
41
|
+
> **secret**: `Secret`
|
|
42
|
+
|
|
43
|
+
Defined in: src/JWTUtils.ts:127
|
|
44
|
+
|
|
45
|
+
The secret to use for signing and verifying JWT tokens.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTUtilsPayloadKeyOptions
|
|
6
|
+
|
|
7
|
+
# Interface: JWTUtilsPayloadKeyOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:106
|
|
10
|
+
|
|
11
|
+
Describes the configuration options to be used with the `JWTUtilsConfig.payload` property when performing
|
|
12
|
+
key-based encryption.
|
|
13
|
+
|
|
14
|
+
## Author
|
|
15
|
+
|
|
16
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
17
|
+
|
|
18
|
+
## Extends
|
|
19
|
+
|
|
20
|
+
- [`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md)
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
### compress?
|
|
25
|
+
|
|
26
|
+
> `optional` **compress**: [`ZLIB`](../enumerations/JWTUtilsCompressionMethods.md#zlib)
|
|
27
|
+
|
|
28
|
+
Defined in: src/JWTUtils.ts:69
|
|
29
|
+
|
|
30
|
+
Set the method to use for compressing the payload profile, otherwise set to `null` for no compression.
|
|
31
|
+
|
|
32
|
+
#### Inherited from
|
|
33
|
+
|
|
34
|
+
[`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md).[`compress`](JWTUtilsPayloadOptions.md#compress)
|
|
35
|
+
|
|
36
|
+
***
|
|
37
|
+
|
|
38
|
+
### encrypt?
|
|
39
|
+
|
|
40
|
+
> `optional` **encrypt**: `boolean`
|
|
41
|
+
|
|
42
|
+
Defined in: src/JWTUtils.ts:74
|
|
43
|
+
|
|
44
|
+
Set to `true` to indicate that the JWT token payload is encrypted, otherwise set to `false`.
|
|
45
|
+
|
|
46
|
+
#### Inherited from
|
|
47
|
+
|
|
48
|
+
[`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md).[`encrypt`](JWTUtilsPayloadOptions.md#encrypt)
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### private\_key
|
|
53
|
+
|
|
54
|
+
> **private\_key**: `string`
|
|
55
|
+
|
|
56
|
+
Defined in: src/JWTUtils.ts:110
|
|
57
|
+
|
|
58
|
+
The private key used to encrypt JWT token payloads.
|
|
59
|
+
|
|
60
|
+
***
|
|
61
|
+
|
|
62
|
+
### public\_key
|
|
63
|
+
|
|
64
|
+
> **public\_key**: `string`
|
|
65
|
+
|
|
66
|
+
Defined in: src/JWTUtils.ts:115
|
|
67
|
+
|
|
68
|
+
The public key used to decrypt JWT token payloads.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTUtilsPayloadOptions
|
|
6
|
+
|
|
7
|
+
# Interface: JWTUtilsPayloadOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:65
|
|
10
|
+
|
|
11
|
+
Describes the configuration options to be used with the `JWTUtilsConfig.payload` property.
|
|
12
|
+
|
|
13
|
+
## Author
|
|
14
|
+
|
|
15
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
16
|
+
|
|
17
|
+
## Extended by
|
|
18
|
+
|
|
19
|
+
- [`JWTUtilsPayloadPasswordOptions`](JWTUtilsPayloadPasswordOptions.md)
|
|
20
|
+
- [`JWTUtilsPayloadKeyOptions`](JWTUtilsPayloadKeyOptions.md)
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
### compress?
|
|
25
|
+
|
|
26
|
+
> `optional` **compress**: [`ZLIB`](../enumerations/JWTUtilsCompressionMethods.md#zlib)
|
|
27
|
+
|
|
28
|
+
Defined in: src/JWTUtils.ts:69
|
|
29
|
+
|
|
30
|
+
Set the method to use for compressing the payload profile, otherwise set to `null` for no compression.
|
|
31
|
+
|
|
32
|
+
***
|
|
33
|
+
|
|
34
|
+
### encrypt?
|
|
35
|
+
|
|
36
|
+
> `optional` **encrypt**: `boolean`
|
|
37
|
+
|
|
38
|
+
Defined in: src/JWTUtils.ts:74
|
|
39
|
+
|
|
40
|
+
Set to `true` to indicate that the JWT token payload is encrypted, otherwise set to `false`.
|