@twin.org/core 0.0.1-next.51 → 0.0.1-next.52
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/dist/cjs/index.cjs +144 -70
- package/dist/esm/index.mjs +144 -71
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/II18nShared.d.ts +29 -0
- package/dist/types/utils/sharedStore.d.ts +23 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/classes/AlreadyExistsError.md +7 -7
- package/docs/reference/classes/ArrayHelper.md +3 -3
- package/docs/reference/classes/AsyncCache.md +14 -8
- package/docs/reference/classes/Base32.md +3 -3
- package/docs/reference/classes/Base58.md +3 -3
- package/docs/reference/classes/Base64.md +3 -3
- package/docs/reference/classes/Base64Url.md +3 -3
- package/docs/reference/classes/BaseError.md +5 -5
- package/docs/reference/classes/BitString.md +5 -5
- package/docs/reference/classes/Coerce.md +7 -5
- package/docs/reference/classes/Compression.md +3 -3
- package/docs/reference/classes/ConflictError.md +7 -7
- package/docs/reference/classes/Converter.md +6 -6
- package/docs/reference/classes/EnvHelper.md +7 -5
- package/docs/reference/classes/ErrorHelper.md +3 -3
- package/docs/reference/classes/Factory.md +17 -7
- package/docs/reference/classes/FilenameHelper.md +3 -3
- package/docs/reference/classes/GeneralError.md +7 -7
- package/docs/reference/classes/GuardError.md +7 -7
- package/docs/reference/classes/Guards.md +18 -8
- package/docs/reference/classes/HexHelper.md +3 -3
- package/docs/reference/classes/I18n.md +6 -6
- package/docs/reference/classes/Is.md +21 -9
- package/docs/reference/classes/JsonHelper.md +10 -6
- package/docs/reference/classes/NotFoundError.md +7 -7
- package/docs/reference/classes/NotImplementedError.md +7 -7
- package/docs/reference/classes/NotSupportedError.md +7 -7
- package/docs/reference/classes/ObjectHelper.md +40 -18
- package/docs/reference/classes/RandomHelper.md +3 -3
- package/docs/reference/classes/SharedStore.md +94 -0
- package/docs/reference/classes/StringHelper.md +3 -3
- package/docs/reference/classes/Uint8ArrayHelper.md +3 -3
- package/docs/reference/classes/UnauthorizedError.md +7 -7
- package/docs/reference/classes/UnprocessableError.md +7 -7
- package/docs/reference/classes/Url.md +7 -7
- package/docs/reference/classes/Urn.md +9 -9
- package/docs/reference/classes/Validation.md +36 -28
- package/docs/reference/classes/ValidationError.md +7 -7
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IComponent.md +3 -3
- package/docs/reference/interfaces/IError.md +1 -1
- package/docs/reference/interfaces/II18nShared.md +47 -0
- package/docs/reference/interfaces/IKeyValue.md +3 -1
- package/docs/reference/interfaces/ILabelledValue.md +3 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +1 -1
- package/docs/reference/type-aliases/CompressionType.md +1 -1
- package/package.json +2 -2
|
@@ -4,13 +4,13 @@ Helpers methods for JSON objects.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new JsonHelper**():
|
|
9
|
+
> **new JsonHelper**(): `JsonHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`JsonHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -46,7 +46,9 @@ Based on https://www.rfc-editor.org/rfc/rfc6902.
|
|
|
46
46
|
|
|
47
47
|
#### Type Parameters
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
##### T
|
|
50
|
+
|
|
51
|
+
`T` = `unknown`
|
|
50
52
|
|
|
51
53
|
#### Parameters
|
|
52
54
|
|
|
@@ -79,7 +81,9 @@ Based on https://www.rfc-editor.org/rfc/rfc6902.
|
|
|
79
81
|
|
|
80
82
|
#### Type Parameters
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
##### T
|
|
85
|
+
|
|
86
|
+
`T` = `unknown`
|
|
83
87
|
|
|
84
88
|
#### Parameters
|
|
85
89
|
|
|
@@ -109,7 +113,7 @@ GeneralError if the patch fails.
|
|
|
109
113
|
|
|
110
114
|
### stringifyEx()
|
|
111
115
|
|
|
112
|
-
> `static` **stringifyEx**(`object`, `space
|
|
116
|
+
> `static` **stringifyEx**(`object`, `space?`): `string`
|
|
113
117
|
|
|
114
118
|
Stringify the JSON with support for extended data types date/bigint/uint8array.
|
|
115
119
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors which are triggered by data not being found.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotFoundError**(`source`, `message`, `notFoundId
|
|
13
|
+
> **new NotFoundError**(`source`, `message`, `notFoundId?`, `inner?`): `NotFoundError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotFoundError.
|
|
16
16
|
|
|
@@ -42,11 +42,11 @@ The inner error if we have wrapped another error.
|
|
|
42
42
|
|
|
43
43
|
#### Returns
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
`NotFoundError`
|
|
46
46
|
|
|
47
47
|
#### Overrides
|
|
48
48
|
|
|
49
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
49
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
50
50
|
|
|
51
51
|
## Properties
|
|
52
52
|
|
|
@@ -58,7 +58,7 @@ The source of the error.
|
|
|
58
58
|
|
|
59
59
|
#### Inherited from
|
|
60
60
|
|
|
61
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
61
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
@@ -74,7 +74,7 @@ Any additional information for the error.
|
|
|
74
74
|
|
|
75
75
|
#### Inherited from
|
|
76
76
|
|
|
77
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
77
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -86,7 +86,7 @@ The inner error if there was one.
|
|
|
86
86
|
|
|
87
87
|
#### Inherited from
|
|
88
88
|
|
|
89
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
89
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotImplementedError**(`source`, `method`):
|
|
13
|
+
> **new NotImplementedError**(`source`, `method`): `NotImplementedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotImplementedError.
|
|
16
16
|
|
|
@@ -30,11 +30,11 @@ The method for the error.
|
|
|
30
30
|
|
|
31
31
|
#### Returns
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
`NotImplementedError`
|
|
34
34
|
|
|
35
35
|
#### Overrides
|
|
36
36
|
|
|
37
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
37
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ The source of the error.
|
|
|
46
46
|
|
|
47
47
|
#### Inherited from
|
|
48
48
|
|
|
49
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
49
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -62,7 +62,7 @@ Any additional information for the error.
|
|
|
62
62
|
|
|
63
63
|
#### Inherited from
|
|
64
64
|
|
|
65
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
65
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
@@ -74,7 +74,7 @@ The inner error if there was one.
|
|
|
74
74
|
|
|
75
75
|
#### Inherited from
|
|
76
76
|
|
|
77
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
77
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors when a feature is unsupported.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotSupportedError**(`source`, `message`, `inner
|
|
13
|
+
> **new NotSupportedError**(`source`, `message`, `inner?`): `NotSupportedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotSupportedError.
|
|
16
16
|
|
|
@@ -36,11 +36,11 @@ The inner error if we have wrapped another error.
|
|
|
36
36
|
|
|
37
37
|
#### Returns
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
`NotSupportedError`
|
|
40
40
|
|
|
41
41
|
#### Overrides
|
|
42
42
|
|
|
43
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
43
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
44
44
|
|
|
45
45
|
## Properties
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ The source of the error.
|
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Any additional information for the error.
|
|
|
68
68
|
|
|
69
69
|
#### Inherited from
|
|
70
70
|
|
|
71
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ The inner error if there was one.
|
|
|
80
80
|
|
|
81
81
|
#### Inherited from
|
|
82
82
|
|
|
83
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -4,13 +4,13 @@ Class to help with objects.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new ObjectHelper**():
|
|
9
|
+
> **new ObjectHelper**(): `ObjectHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`ObjectHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -22,7 +22,9 @@ Convert an object to bytes.
|
|
|
22
22
|
|
|
23
23
|
#### Type Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### T
|
|
26
|
+
|
|
27
|
+
`T`
|
|
26
28
|
|
|
27
29
|
#### Parameters
|
|
28
30
|
|
|
@@ -54,7 +56,9 @@ Convert a bytes to an object.
|
|
|
54
56
|
|
|
55
57
|
#### Type Parameters
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
##### T
|
|
60
|
+
|
|
61
|
+
`T`
|
|
58
62
|
|
|
59
63
|
#### Parameters
|
|
60
64
|
|
|
@@ -84,7 +88,9 @@ Make a deep clone of an object.
|
|
|
84
88
|
|
|
85
89
|
#### Type Parameters
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
##### T
|
|
92
|
+
|
|
93
|
+
`T`
|
|
88
94
|
|
|
89
95
|
#### Parameters
|
|
90
96
|
|
|
@@ -110,9 +116,13 @@ Deep merge objects.
|
|
|
110
116
|
|
|
111
117
|
#### Type Parameters
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
##### T
|
|
120
|
+
|
|
121
|
+
`T` = `unknown`
|
|
114
122
|
|
|
115
|
-
|
|
123
|
+
##### U
|
|
124
|
+
|
|
125
|
+
`U` = `unknown`
|
|
116
126
|
|
|
117
127
|
#### Parameters
|
|
118
128
|
|
|
@@ -138,13 +148,15 @@ The combined deep merge of the objects.
|
|
|
138
148
|
|
|
139
149
|
### equal()
|
|
140
150
|
|
|
141
|
-
> `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder
|
|
151
|
+
> `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder?`): `boolean`
|
|
142
152
|
|
|
143
153
|
Does one object equal another.
|
|
144
154
|
|
|
145
155
|
#### Type Parameters
|
|
146
156
|
|
|
147
|
-
|
|
157
|
+
##### T
|
|
158
|
+
|
|
159
|
+
`T`
|
|
148
160
|
|
|
149
161
|
#### Parameters
|
|
150
162
|
|
|
@@ -182,7 +194,9 @@ Get the property of an unknown object.
|
|
|
182
194
|
|
|
183
195
|
#### Type Parameters
|
|
184
196
|
|
|
185
|
-
|
|
197
|
+
##### T
|
|
198
|
+
|
|
199
|
+
`T` = `unknown`
|
|
186
200
|
|
|
187
201
|
#### Parameters
|
|
188
202
|
|
|
@@ -276,7 +290,9 @@ Extract a property from the object, providing alternative names.
|
|
|
276
290
|
|
|
277
291
|
#### Type Parameters
|
|
278
292
|
|
|
279
|
-
|
|
293
|
+
##### T
|
|
294
|
+
|
|
295
|
+
`T`
|
|
280
296
|
|
|
281
297
|
#### Parameters
|
|
282
298
|
|
|
@@ -308,13 +324,15 @@ The property if available.
|
|
|
308
324
|
|
|
309
325
|
### pick()
|
|
310
326
|
|
|
311
|
-
> `static` **pick**\<`T`\>(`obj`, `keys
|
|
327
|
+
> `static` **pick**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
|
|
312
328
|
|
|
313
329
|
Pick a subset of properties from an object.
|
|
314
330
|
|
|
315
331
|
#### Type Parameters
|
|
316
332
|
|
|
317
|
-
|
|
333
|
+
##### T
|
|
334
|
+
|
|
335
|
+
`T`
|
|
318
336
|
|
|
319
337
|
#### Parameters
|
|
320
338
|
|
|
@@ -340,13 +358,15 @@ The partial object.
|
|
|
340
358
|
|
|
341
359
|
### omit()
|
|
342
360
|
|
|
343
|
-
> `static` **omit**\<`T`\>(`obj`, `keys
|
|
361
|
+
> `static` **omit**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
|
|
344
362
|
|
|
345
363
|
Omit a subset of properties from an object.
|
|
346
364
|
|
|
347
365
|
#### Type Parameters
|
|
348
366
|
|
|
349
|
-
|
|
367
|
+
##### T
|
|
368
|
+
|
|
369
|
+
`T`
|
|
350
370
|
|
|
351
371
|
#### Parameters
|
|
352
372
|
|
|
@@ -416,13 +436,15 @@ The object with regular properties.
|
|
|
416
436
|
|
|
417
437
|
### removeEmptyProperties()
|
|
418
438
|
|
|
419
|
-
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options
|
|
439
|
+
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options?`): `T`
|
|
420
440
|
|
|
421
441
|
Remove empty properties from an object.
|
|
422
442
|
|
|
423
443
|
#### Type Parameters
|
|
424
444
|
|
|
425
|
-
|
|
445
|
+
##### T
|
|
446
|
+
|
|
447
|
+
`T` = `unknown`
|
|
426
448
|
|
|
427
449
|
#### Parameters
|
|
428
450
|
|
|
@@ -4,13 +4,13 @@ Class to help with random generation.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new RandomHelper**():
|
|
9
|
+
> **new RandomHelper**(): `RandomHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`RandomHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Class: SharedStore
|
|
2
|
+
|
|
3
|
+
Provide a store for shared objects which can be accesses through multiple
|
|
4
|
+
instance loads of a packages.
|
|
5
|
+
|
|
6
|
+
## Constructors
|
|
7
|
+
|
|
8
|
+
### Constructor
|
|
9
|
+
|
|
10
|
+
> **new SharedStore**(): `SharedStore`
|
|
11
|
+
|
|
12
|
+
#### Returns
|
|
13
|
+
|
|
14
|
+
`SharedStore`
|
|
15
|
+
|
|
16
|
+
## Methods
|
|
17
|
+
|
|
18
|
+
### get()
|
|
19
|
+
|
|
20
|
+
> `static` **get**\<`T`\>(`prop`): `undefined` \| `T`
|
|
21
|
+
|
|
22
|
+
Get a property from the shared store.
|
|
23
|
+
|
|
24
|
+
#### Type Parameters
|
|
25
|
+
|
|
26
|
+
##### T
|
|
27
|
+
|
|
28
|
+
`T` = `unknown`
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
##### prop
|
|
33
|
+
|
|
34
|
+
`string`
|
|
35
|
+
|
|
36
|
+
The name of the property to get.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`undefined` \| `T`
|
|
41
|
+
|
|
42
|
+
The property if it exists.
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### set()
|
|
47
|
+
|
|
48
|
+
> `static` **set**\<`T`\>(`prop`, `value`): `void`
|
|
49
|
+
|
|
50
|
+
Set the property in the shared store.
|
|
51
|
+
|
|
52
|
+
#### Type Parameters
|
|
53
|
+
|
|
54
|
+
##### T
|
|
55
|
+
|
|
56
|
+
`T` = `unknown`
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
##### prop
|
|
61
|
+
|
|
62
|
+
`string`
|
|
63
|
+
|
|
64
|
+
The name of the property to set.
|
|
65
|
+
|
|
66
|
+
##### value
|
|
67
|
+
|
|
68
|
+
`T`
|
|
69
|
+
|
|
70
|
+
The value to set.
|
|
71
|
+
|
|
72
|
+
#### Returns
|
|
73
|
+
|
|
74
|
+
`void`
|
|
75
|
+
|
|
76
|
+
***
|
|
77
|
+
|
|
78
|
+
### remove()
|
|
79
|
+
|
|
80
|
+
> `static` **remove**(`prop`): `void`
|
|
81
|
+
|
|
82
|
+
Remove a property from the shared store.
|
|
83
|
+
|
|
84
|
+
#### Parameters
|
|
85
|
+
|
|
86
|
+
##### prop
|
|
87
|
+
|
|
88
|
+
`string`
|
|
89
|
+
|
|
90
|
+
The name of the property to remove.
|
|
91
|
+
|
|
92
|
+
#### Returns
|
|
93
|
+
|
|
94
|
+
`void`
|
|
@@ -4,13 +4,13 @@ Class to help with string.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new StringHelper**():
|
|
9
|
+
> **new StringHelper**(): `StringHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`StringHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,13 +4,13 @@ Class to help with uint8 arrays.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Uint8ArrayHelper**():
|
|
9
|
+
> **new Uint8ArrayHelper**(): `Uint8ArrayHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Uint8ArrayHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors which are triggered by access not being unauthorized.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new UnauthorizedError**(`source`, `message`, `inner
|
|
13
|
+
> **new UnauthorizedError**(`source`, `message`, `inner?`): `UnauthorizedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of UnauthorizedError.
|
|
16
16
|
|
|
@@ -36,11 +36,11 @@ The inner error if we have wrapped another error.
|
|
|
36
36
|
|
|
37
37
|
#### Returns
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
`UnauthorizedError`
|
|
40
40
|
|
|
41
41
|
#### Overrides
|
|
42
42
|
|
|
43
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
43
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
44
44
|
|
|
45
45
|
## Properties
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ The source of the error.
|
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Any additional information for the error.
|
|
|
68
68
|
|
|
69
69
|
#### Inherited from
|
|
70
70
|
|
|
71
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ The inner error if there was one.
|
|
|
80
80
|
|
|
81
81
|
#### Inherited from
|
|
82
82
|
|
|
83
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors when some data can not be processed.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new UnprocessableError**(`source`, `message`, `properties
|
|
13
|
+
> **new UnprocessableError**(`source`, `message`, `properties?`, `inner?`): `UnprocessableError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of UnprocessableError.
|
|
16
16
|
|
|
@@ -40,11 +40,11 @@ The inner error if we have wrapped another error.
|
|
|
40
40
|
|
|
41
41
|
#### Returns
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
`UnprocessableError`
|
|
44
44
|
|
|
45
45
|
#### Overrides
|
|
46
46
|
|
|
47
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
47
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
48
48
|
|
|
49
49
|
## Properties
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ The source of the error.
|
|
|
56
56
|
|
|
57
57
|
#### Inherited from
|
|
58
58
|
|
|
59
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
59
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ Any additional information for the error.
|
|
|
72
72
|
|
|
73
73
|
#### Inherited from
|
|
74
74
|
|
|
75
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
75
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ The inner error if there was one.
|
|
|
84
84
|
|
|
85
85
|
#### Inherited from
|
|
86
86
|
|
|
87
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
87
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
@@ -4,9 +4,9 @@ Class to help with urls.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Url**(`url`):
|
|
9
|
+
> **new Url**(`url`): `Url`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Url.
|
|
12
12
|
|
|
@@ -20,13 +20,13 @@ The url string.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Url`
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
27
27
|
### tryParseExact()
|
|
28
28
|
|
|
29
|
-
> `static` **tryParseExact**(`url`): `undefined` \|
|
|
29
|
+
> `static` **tryParseExact**(`url`): `undefined` \| `Url`
|
|
30
30
|
|
|
31
31
|
Try and parse a string into the url parts.
|
|
32
32
|
|
|
@@ -40,7 +40,7 @@ The url to parse.
|
|
|
40
40
|
|
|
41
41
|
#### Returns
|
|
42
42
|
|
|
43
|
-
`undefined` \|
|
|
43
|
+
`undefined` \| `Url`
|
|
44
44
|
|
|
45
45
|
The formatted url or undefined if the value is not a url.
|
|
46
46
|
|
|
@@ -140,7 +140,7 @@ The formatted url.
|
|
|
140
140
|
|
|
141
141
|
### fromParts()
|
|
142
142
|
|
|
143
|
-
> `static` **fromParts**(`urlParts`):
|
|
143
|
+
> `static` **fromParts**(`urlParts`): `Url`
|
|
144
144
|
|
|
145
145
|
Construct a url from valid parts.
|
|
146
146
|
|
|
@@ -154,7 +154,7 @@ The url to create the parts from.
|
|
|
154
154
|
|
|
155
155
|
#### Returns
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
`Url`
|
|
158
158
|
|
|
159
159
|
The formatted url.
|
|
160
160
|
|