@3sixty/api-models 0.20.0-next.0 → 0.20.0-next.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.
Files changed (123) hide show
  1. package/dist/es/errors/forbiddenError.js.map +1 -1
  2. package/dist/es/errors/tooManyRequestsError.js.map +1 -1
  3. package/dist/es/factories/mimeTypeProcessorFactory.js.map +1 -1
  4. package/dist/es/factories/restClientProcessorFactory.js.map +1 -1
  5. package/dist/es/factories/restRouteProcessorFactory.js.map +1 -1
  6. package/dist/es/factories/socketRouteProcessorFactory.js.map +1 -1
  7. package/dist/es/helpers/httpErrorHelper.js.map +1 -1
  8. package/dist/es/helpers/httpHeaderHelper.js.map +1 -1
  9. package/dist/es/helpers/httpParameterHelper.js.map +1 -1
  10. package/dist/es/helpers/httpUrlHelper.js.map +1 -1
  11. package/dist/es/index.js +4 -1
  12. package/dist/es/index.js.map +1 -1
  13. package/dist/es/models/IHealth.js.map +1 -1
  14. package/dist/es/models/api/IServerFavIconResponse.js.map +1 -1
  15. package/dist/es/models/api/IServerHealthResponse.js.map +1 -1
  16. package/dist/es/models/api/IServerInfoResponse.js.map +1 -1
  17. package/dist/es/models/api/IServerLivezResponse.js.map +1 -1
  18. package/dist/es/models/api/IServerReadyzResponse.js.map +1 -1
  19. package/dist/es/models/api/IServerRootResponse.js.map +1 -1
  20. package/dist/es/models/api/IServerSpecResponse.js.map +1 -1
  21. package/dist/es/models/client/IRestClientProcessor.js.map +1 -1
  22. package/dist/es/models/client/IRestClientProcessorContext.js.map +1 -1
  23. package/dist/es/models/config/IBaseRestClientConfig.js.map +1 -1
  24. package/dist/es/models/config/IBaseSocketClientConfig.js.map +1 -1
  25. package/dist/es/models/healthCategory.js.map +1 -1
  26. package/dist/es/models/healthStatus.js.map +1 -1
  27. package/dist/es/models/httpContextIdKeys.js +1 -4
  28. package/dist/es/models/httpContextIdKeys.js.map +1 -1
  29. package/dist/es/models/protocol/IHttpRequest.js.map +1 -1
  30. package/dist/es/models/protocol/IHttpRequestContext.js.map +1 -1
  31. package/dist/es/models/protocol/IHttpRequestPathParams.js.map +1 -1
  32. package/dist/es/models/protocol/IHttpRequestQuery.js.map +1 -1
  33. package/dist/es/models/protocol/IHttpResponse.js.map +1 -1
  34. package/dist/es/models/protocol/IHttpServerRequest.js.map +1 -1
  35. package/dist/es/models/protocol/ISocketRequestContext.js.map +1 -1
  36. package/dist/es/models/protocol/ISocketServerRequest.js.map +1 -1
  37. package/dist/es/models/requests/INoContentRequest.js.map +1 -1
  38. package/dist/es/models/responses/errors/IBadRequestResponse.js.map +1 -1
  39. package/dist/es/models/responses/errors/IConflictResponse.js.map +1 -1
  40. package/dist/es/models/responses/errors/IForbiddenResponse.js.map +1 -1
  41. package/dist/es/models/responses/errors/IInternalServerErrorResponse.js.map +1 -1
  42. package/dist/es/models/responses/errors/INotFoundResponse.js.map +1 -1
  43. package/dist/es/models/responses/errors/INotImplementedResponse.js.map +1 -1
  44. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js.map +1 -1
  45. package/dist/es/models/responses/errors/IUnauthorizedResponse.js.map +1 -1
  46. package/dist/es/models/responses/errors/IUnprocessableEntityResponse.js.map +1 -1
  47. package/dist/es/models/responses/success/IAcceptedResponse.js.map +1 -1
  48. package/dist/es/models/responses/success/ICreatedResponse.js.map +1 -1
  49. package/dist/es/models/responses/success/INoContentResponse.js.map +1 -1
  50. package/dist/es/models/responses/success/IOkResponse.js.map +1 -1
  51. package/dist/es/models/routes/IBaseRoute.js +0 -2
  52. package/dist/es/models/routes/IBaseRoute.js.map +1 -1
  53. package/dist/es/models/routes/IBaseRouteEntryPoint.js.map +1 -1
  54. package/dist/es/models/routes/IRestRoute.js.map +1 -1
  55. package/dist/es/models/routes/IRestRouteEntryPoint.js.map +1 -1
  56. package/dist/es/models/routes/IRestRouteExample.js.map +1 -1
  57. package/dist/es/models/routes/IRestRouteRequestExample.js.map +1 -1
  58. package/dist/es/models/routes/IRestRouteResponseAttachmentOptions.js.map +1 -1
  59. package/dist/es/models/routes/IRestRouteResponseExample.js.map +1 -1
  60. package/dist/es/models/routes/IRestRouteResponseOptions.js.map +1 -1
  61. package/dist/es/models/routes/IRouteAuthorization.js +4 -0
  62. package/dist/es/models/routes/IRouteAuthorization.js.map +1 -0
  63. package/dist/es/models/routes/ISocketRoute.js.map +1 -1
  64. package/dist/es/models/routes/ISocketRouteEntryPoint.js.map +1 -1
  65. package/dist/es/models/routes/ITag.js.map +1 -1
  66. package/dist/es/models/routes/httpBodyLimit.js.map +1 -1
  67. package/dist/es/models/server/IBaseRouteProcessor.js.map +1 -1
  68. package/dist/es/models/server/IMimeTypeProcessor.js.map +1 -1
  69. package/dist/es/models/server/IRestRouteProcessor.js.map +1 -1
  70. package/dist/es/models/server/ISocketRouteProcessor.js.map +1 -1
  71. package/dist/es/models/server/IWebServer.js.map +1 -1
  72. package/dist/es/models/server/IWebServerOptions.js.map +1 -1
  73. package/dist/es/models/services/IHealthApplicationCallback.js.map +1 -1
  74. package/dist/es/models/services/IHealthComponent.js.map +1 -1
  75. package/dist/es/models/services/IHealthProviderComponent.js.map +1 -1
  76. package/dist/es/models/services/IInformationComponent.js.map +1 -1
  77. package/dist/es/models/services/IPlatformComponent.js.map +1 -1
  78. package/dist/es/models/services/IServerInfo.js.map +1 -1
  79. package/dist/es/models/services/ITenant.js.map +1 -1
  80. package/dist/es/models/services/ITenantAdminComponent.js.map +1 -1
  81. package/dist/es/models/services/tenantEventCallback.js +2 -0
  82. package/dist/es/models/services/tenantEventCallback.js.map +1 -0
  83. package/dist/es/models/services/tenantEventType.js +21 -0
  84. package/dist/es/models/services/tenantEventType.js.map +1 -0
  85. package/dist/types/index.d.ts +3 -1
  86. package/dist/types/models/httpContextIdKeys.d.ts +0 -4
  87. package/dist/types/models/routes/IBaseRoute.d.ts +12 -3
  88. package/dist/types/models/routes/IRouteAuthorization.d.ts +17 -0
  89. package/dist/types/models/server/IBaseRouteProcessor.d.ts +0 -7
  90. package/dist/types/models/services/IPlatformComponent.d.ts +20 -0
  91. package/dist/types/models/services/tenantEventCallback.d.ts +6 -0
  92. package/dist/types/models/services/tenantEventType.d.ts +21 -0
  93. package/docs/changelog.md +10 -0
  94. package/docs/reference/classes/ForbiddenError.md +2 -0
  95. package/docs/reference/classes/HttpParameterHelper.md +4 -4
  96. package/docs/reference/classes/TooManyRequestsError.md +2 -0
  97. package/docs/reference/index.md +4 -1
  98. package/docs/reference/interfaces/IBaseRoute.md +36 -4
  99. package/docs/reference/interfaces/IBaseRouteEntryPoint.md +1 -1
  100. package/docs/reference/interfaces/IBaseRouteProcessor.md +6 -18
  101. package/docs/reference/interfaces/IHttpRequest.md +1 -1
  102. package/docs/reference/interfaces/IHttpResponse.md +1 -1
  103. package/docs/reference/interfaces/IHttpServerRequest.md +1 -1
  104. package/docs/reference/interfaces/IPlatformComponent.md +74 -0
  105. package/docs/reference/interfaces/IRestRoute.md +43 -7
  106. package/docs/reference/interfaces/IRestRouteProcessor.md +6 -20
  107. package/docs/reference/interfaces/IRestRouteRequestExample.md +1 -1
  108. package/docs/reference/interfaces/IRestRouteResponseExample.md +1 -1
  109. package/docs/reference/interfaces/IRouteAuthorization.md +27 -0
  110. package/docs/reference/interfaces/ISocketRoute.md +43 -7
  111. package/docs/reference/interfaces/ISocketRouteProcessor.md +6 -20
  112. package/docs/reference/interfaces/ISocketServerRequest.md +1 -1
  113. package/docs/reference/interfaces/ITenantAdminComponent.md +1 -1
  114. package/docs/reference/interfaces/IWebServer.md +1 -1
  115. package/docs/reference/type-aliases/TenantEventCallback.md +20 -0
  116. package/docs/reference/type-aliases/TenantEventType.md +5 -0
  117. package/docs/reference/variables/HttpContextIdKeys.md +0 -6
  118. package/docs/reference/variables/TenantEventType.md +25 -0
  119. package/package.json +1 -1
  120. package/dist/es/helpers/scopeHelper.js +0 -46
  121. package/dist/es/helpers/scopeHelper.js.map +0 -1
  122. package/dist/types/helpers/scopeHelper.d.ts +0 -27
  123. package/docs/reference/classes/ScopeHelper.md +0 -88
@@ -8,7 +8,6 @@
8
8
  - [HttpHeaderHelper](classes/HttpHeaderHelper.md)
9
9
  - [HttpParameterHelper](classes/HttpParameterHelper.md)
10
10
  - [HttpUrlHelper](classes/HttpUrlHelper.md)
11
- - [ScopeHelper](classes/ScopeHelper.md)
12
11
 
13
12
  ## Interfaces
14
13
 
@@ -54,6 +53,7 @@
54
53
  - [IRestRouteResponseAttachmentOptions](interfaces/IRestRouteResponseAttachmentOptions.md)
55
54
  - [IRestRouteResponseExample](interfaces/IRestRouteResponseExample.md)
56
55
  - [IRestRouteResponseOptions](interfaces/IRestRouteResponseOptions.md)
56
+ - [IRouteAuthorization](interfaces/IRouteAuthorization.md)
57
57
  - [ISocketRoute](interfaces/ISocketRoute.md)
58
58
  - [ITag](interfaces/ITag.md)
59
59
  - [IBaseRouteProcessor](interfaces/IBaseRouteProcessor.md)
@@ -79,6 +79,8 @@
79
79
  - [ISocketRouteEntryPoint](type-aliases/ISocketRouteEntryPoint.md)
80
80
  - [HttpBodyLimit](type-aliases/HttpBodyLimit.md)
81
81
  - [HealthApplicationCallback](type-aliases/HealthApplicationCallback.md)
82
+ - [TenantEventCallback](type-aliases/TenantEventCallback.md)
83
+ - [TenantEventType](type-aliases/TenantEventType.md)
82
84
 
83
85
  ## Variables
84
86
 
@@ -90,3 +92,4 @@
90
92
  - [HealthStatus](variables/HealthStatus.md)
91
93
  - [HttpContextIdKeys](variables/HttpContextIdKeys.md)
92
94
  - [HttpBodyLimit](variables/HttpBodyLimit.md)
95
+ - [TenantEventType](variables/TenantEventType.md)
@@ -31,6 +31,12 @@ The path to use for routing.
31
31
 
32
32
  Skips the authentication requirement for this route.
33
33
 
34
+ #### Default
35
+
36
+ ```ts
37
+ false
38
+ ```
39
+
34
40
  ***
35
41
 
36
42
  ### skipTenant? {#skiptenant}
@@ -39,13 +45,33 @@ Skips the authentication requirement for this route.
39
45
 
40
46
  Skips the tenant requirement for this route.
41
47
 
48
+ #### Default
49
+
50
+ ```ts
51
+ false
52
+ ```
53
+
42
54
  ***
43
55
 
44
- ### requiredScope? {#requiredscope}
56
+ ### requiresAuthorization? {#requiresauthorization}
45
57
 
46
- > `optional` **requiredScope?**: `string`[]
58
+ > `optional` **requiresAuthorization?**: `boolean`
47
59
 
48
- The user must have one of the specified scopes to access the route.
60
+ Requires authorization for this route.
61
+
62
+ #### Default
63
+
64
+ ```ts
65
+ true
66
+ ```
67
+
68
+ ***
69
+
70
+ ### defaultAuthorization? {#defaultauthorization}
71
+
72
+ > `optional` **defaultAuthorization?**: [`IRouteAuthorization`](IRouteAuthorization.md)
73
+
74
+ The default authorization which can access this route, used to seed the RBAC rules.
49
75
 
50
76
  ***
51
77
 
@@ -54,4 +80,10 @@ The user must have one of the specified scopes to access the route.
54
80
  > `optional` **disableTenantOverride?**: `boolean`
55
81
 
56
82
  Set to true to prevent callers from using the overrideTenant query parameter on this route.
57
- Tenant override is allowed by default, but you must hold the escalated privilege scope to use it.
83
+ Tenant override is allowed by default, but you must hold the escalated privilege role to use it.
84
+
85
+ #### Default
86
+
87
+ ```ts
88
+ false
89
+ ```
@@ -4,7 +4,7 @@ Route entry points are used for exposing the routes from a package.
4
4
 
5
5
  ## Type Parameters
6
6
 
7
- ### T
7
+ ### T {#t}
8
8
 
9
9
  `T`
10
10
 
@@ -13,32 +13,16 @@ The definition for a base processor for handling REST routes.
13
13
 
14
14
  ## Type Parameters
15
15
 
16
- ### T
16
+ ### T {#t}
17
17
 
18
18
  `T` = [`IBaseRoute`](IBaseRoute.md)
19
19
 
20
- ### R
20
+ ### R {#r}
21
21
 
22
22
  `R` = [`IHttpServerRequest`](IHttpServerRequest.md)
23
23
 
24
24
  ## Methods
25
25
 
26
- ### features()? {#features}
27
-
28
- > `optional` **features**(): `string`[]
29
-
30
- Features supported by this processor.
31
- If a route has any of these features listed, this processor will be run for that route.
32
- If this is not implemented, the processor will run for all routes.
33
-
34
- #### Returns
35
-
36
- `string`[]
37
-
38
- The features supported by this processor.
39
-
40
- ***
41
-
42
26
  ### pre()? {#pre}
43
27
 
44
28
  > `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
@@ -73,6 +57,8 @@ The context IDs of the request.
73
57
 
74
58
  ##### processorState
75
59
 
60
+ \{\[`id`: `string`\]: `unknown`; \}
61
+
76
62
  The state handed through the processors.
77
63
 
78
64
  ##### componentTypes?
@@ -127,6 +113,8 @@ The context IDs of the request.
127
113
 
128
114
  ##### processorState
129
115
 
116
+ \{\[`id`: `string`\]: `unknown`; \}
117
+
130
118
  The state handed through the processors.
131
119
 
132
120
  ##### componentTypes?
@@ -9,7 +9,7 @@ Model for the standard parameters for an http request.
9
9
 
10
10
  ## Type Parameters
11
11
 
12
- ### T
12
+ ### T {#t}
13
13
 
14
14
  `T` = `any`
15
15
 
@@ -4,7 +4,7 @@ Model for the standard parameters for an http response.
4
4
 
5
5
  ## Type Parameters
6
6
 
7
- ### T
7
+ ### T {#t}
8
8
 
9
9
  `T` = `any`
10
10
 
@@ -12,7 +12,7 @@ Model for the standard parameters for an http request.
12
12
 
13
13
  ## Type Parameters
14
14
 
15
- ### T
15
+ ### T {#t}
16
16
 
17
17
  `T` = `any`
18
18
 
@@ -63,3 +63,77 @@ The URL to check.
63
63
  `Promise`\<`IContextIds` \| `undefined`\>
64
64
 
65
65
  A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.
66
+
67
+ ***
68
+
69
+ ### registerTenantEventCallback() {#registertenanteventcallback}
70
+
71
+ > **registerTenantEventCallback**(`callbackId`, `callback`): `void`
72
+
73
+ Registers a callback to be invoked when a tenant event occurs.
74
+
75
+ #### Parameters
76
+
77
+ ##### callbackId
78
+
79
+ `string`
80
+
81
+ A unique identifier for the callback.
82
+
83
+ ##### callback
84
+
85
+ [`TenantEventCallback`](../type-aliases/TenantEventCallback.md)
86
+
87
+ The callback to invoke when a tenant event occurs.
88
+
89
+ #### Returns
90
+
91
+ `void`
92
+
93
+ ***
94
+
95
+ ### unregisterTenantEventCallback() {#unregistertenanteventcallback}
96
+
97
+ > **unregisterTenantEventCallback**(`callbackId`): `void`
98
+
99
+ Unregisters a previously registered tenant event callback.
100
+
101
+ #### Parameters
102
+
103
+ ##### callbackId
104
+
105
+ `string`
106
+
107
+ The identifier of the callback to unregister.
108
+
109
+ #### Returns
110
+
111
+ `void`
112
+
113
+ ***
114
+
115
+ ### fireTenantEvent() {#firetenantevent}
116
+
117
+ > **fireTenantEvent**(`tenantId`, `eventType`): `Promise`\<`void`\>
118
+
119
+ Fires all registered tenant event callbacks.
120
+
121
+ #### Parameters
122
+
123
+ ##### tenantId
124
+
125
+ `string`
126
+
127
+ The ID of the tenant for which the event occurred.
128
+
129
+ ##### eventType
130
+
131
+ [`TenantEventType`](../type-aliases/TenantEventType.md)
132
+
133
+ The type of event that occurred.
134
+
135
+ #### Returns
136
+
137
+ `Promise`\<`void`\>
138
+
139
+ A promise that resolves when all callbacks have been invoked.
@@ -8,11 +8,11 @@ Interface which defines a REST route.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T` *extends* [`IHttpRequest`](IHttpRequest.md) = `any`
14
14
 
15
- ### U
15
+ ### U {#u}
16
16
 
17
17
  `U` *extends* [`IHttpResponse`](IHttpResponse.md) & [`IRestRouteResponseOptions`](IRestRouteResponseOptions.md) = `any`
18
18
 
@@ -48,6 +48,12 @@ The path to use for routing.
48
48
 
49
49
  Skips the authentication requirement for this route.
50
50
 
51
+ #### Default
52
+
53
+ ```ts
54
+ false
55
+ ```
56
+
51
57
  #### Inherited from
52
58
 
53
59
  [`IBaseRoute`](IBaseRoute.md).[`skipAuth`](IBaseRoute.md#skipauth)
@@ -60,21 +66,45 @@ Skips the authentication requirement for this route.
60
66
 
61
67
  Skips the tenant requirement for this route.
62
68
 
69
+ #### Default
70
+
71
+ ```ts
72
+ false
73
+ ```
74
+
63
75
  #### Inherited from
64
76
 
65
77
  [`IBaseRoute`](IBaseRoute.md).[`skipTenant`](IBaseRoute.md#skiptenant)
66
78
 
67
79
  ***
68
80
 
69
- ### requiredScope? {#requiredscope}
81
+ ### requiresAuthorization? {#requiresauthorization}
82
+
83
+ > `optional` **requiresAuthorization?**: `boolean`
84
+
85
+ Requires authorization for this route.
86
+
87
+ #### Default
88
+
89
+ ```ts
90
+ true
91
+ ```
92
+
93
+ #### Inherited from
94
+
95
+ [`IBaseRoute`](IBaseRoute.md).[`requiresAuthorization`](IBaseRoute.md#requiresauthorization)
96
+
97
+ ***
98
+
99
+ ### defaultAuthorization? {#defaultauthorization}
70
100
 
71
- > `optional` **requiredScope?**: `string`[]
101
+ > `optional` **defaultAuthorization?**: [`IRouteAuthorization`](IRouteAuthorization.md)
72
102
 
73
- The user must have one of the specified scopes to access the route.
103
+ The default authorization which can access this route, used to seed the RBAC rules.
74
104
 
75
105
  #### Inherited from
76
106
 
77
- [`IBaseRoute`](IBaseRoute.md).[`requiredScope`](IBaseRoute.md#requiredscope)
107
+ [`IBaseRoute`](IBaseRoute.md).[`defaultAuthorization`](IBaseRoute.md#defaultauthorization)
78
108
 
79
109
  ***
80
110
 
@@ -83,7 +113,13 @@ The user must have one of the specified scopes to access the route.
83
113
  > `optional` **disableTenantOverride?**: `boolean`
84
114
 
85
115
  Set to true to prevent callers from using the overrideTenant query parameter on this route.
86
- Tenant override is allowed by default, but you must hold the escalated privilege scope to use it.
116
+ Tenant override is allowed by default, but you must hold the escalated privilege role to use it.
117
+
118
+ #### Default
119
+
120
+ ```ts
121
+ false
122
+ ```
87
123
 
88
124
  #### Inherited from
89
125
 
@@ -8,26 +8,6 @@ The definition for a processor for handling REST routes.
8
8
 
9
9
  ## Methods
10
10
 
11
- ### features()? {#features}
12
-
13
- > `optional` **features**(): `string`[]
14
-
15
- Features supported by this processor.
16
- If a route has any of these features listed, this processor will be run for that route.
17
- If this is not implemented, the processor will run for all routes.
18
-
19
- #### Returns
20
-
21
- `string`[]
22
-
23
- The features supported by this processor.
24
-
25
- #### Inherited from
26
-
27
- [`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`features`](IBaseRouteProcessor.md#features)
28
-
29
- ***
30
-
31
11
  ### pre()? {#pre}
32
12
 
33
13
  > `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
@@ -62,6 +42,8 @@ The context IDs of the request.
62
42
 
63
43
  ##### processorState
64
44
 
45
+ \{\[`id`: `string`\]: `unknown`; \}
46
+
65
47
  The state handed through the processors.
66
48
 
67
49
  ##### componentTypes?
@@ -120,6 +102,8 @@ The context IDs of the request.
120
102
 
121
103
  ##### processorState
122
104
 
105
+ \{\[`id`: `string`\]: `unknown`; \}
106
+
123
107
  The state handed through the processors.
124
108
 
125
109
  ##### componentTypes?
@@ -172,6 +156,8 @@ The route being requested, if a matching one was found.
172
156
 
173
157
  ##### processorState
174
158
 
159
+ \{\[`id`: `string`\]: `unknown`; \}
160
+
175
161
  The state handed through the processors.
176
162
 
177
163
  ##### componentTypes?
@@ -8,7 +8,7 @@ Interface which defines a REST route request example.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T`
14
14
 
@@ -8,7 +8,7 @@ Interface which defines a REST route response example.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T`
14
14
 
@@ -0,0 +1,27 @@
1
+ # Interface: IRouteAuthorization
2
+
3
+ Interface which defines the default authorization permission for a route used to seed the RBAC rules.
4
+
5
+ ## Properties
6
+
7
+ ### permission {#permission}
8
+
9
+ > **permission**: `string`
10
+
11
+ The permission string for the route.
12
+
13
+ ***
14
+
15
+ ### role? {#role}
16
+
17
+ > `optional` **role?**: `string`
18
+
19
+ The optional role string for the route.
20
+
21
+ ***
22
+
23
+ ### inherits? {#inherits}
24
+
25
+ > `optional` **inherits?**: `string`[]
26
+
27
+ The optional array of inherited permissions for the route.
@@ -8,11 +8,11 @@ Interface which defines a socket route.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T` *extends* [`IHttpRequest`](IHttpRequest.md) = `any`
14
14
 
15
- ### U
15
+ ### U {#u}
16
16
 
17
17
  `U` *extends* [`IHttpResponse`](IHttpResponse.md) = `any`
18
18
 
@@ -48,6 +48,12 @@ The path to use for routing.
48
48
 
49
49
  Skips the authentication requirement for this route.
50
50
 
51
+ #### Default
52
+
53
+ ```ts
54
+ false
55
+ ```
56
+
51
57
  #### Inherited from
52
58
 
53
59
  [`IBaseRoute`](IBaseRoute.md).[`skipAuth`](IBaseRoute.md#skipauth)
@@ -60,21 +66,45 @@ Skips the authentication requirement for this route.
60
66
 
61
67
  Skips the tenant requirement for this route.
62
68
 
69
+ #### Default
70
+
71
+ ```ts
72
+ false
73
+ ```
74
+
63
75
  #### Inherited from
64
76
 
65
77
  [`IBaseRoute`](IBaseRoute.md).[`skipTenant`](IBaseRoute.md#skiptenant)
66
78
 
67
79
  ***
68
80
 
69
- ### requiredScope? {#requiredscope}
81
+ ### requiresAuthorization? {#requiresauthorization}
82
+
83
+ > `optional` **requiresAuthorization?**: `boolean`
84
+
85
+ Requires authorization for this route.
86
+
87
+ #### Default
88
+
89
+ ```ts
90
+ true
91
+ ```
92
+
93
+ #### Inherited from
94
+
95
+ [`IBaseRoute`](IBaseRoute.md).[`requiresAuthorization`](IBaseRoute.md#requiresauthorization)
96
+
97
+ ***
98
+
99
+ ### defaultAuthorization? {#defaultauthorization}
70
100
 
71
- > `optional` **requiredScope?**: `string`[]
101
+ > `optional` **defaultAuthorization?**: [`IRouteAuthorization`](IRouteAuthorization.md)
72
102
 
73
- The user must have one of the specified scopes to access the route.
103
+ The default authorization which can access this route, used to seed the RBAC rules.
74
104
 
75
105
  #### Inherited from
76
106
 
77
- [`IBaseRoute`](IBaseRoute.md).[`requiredScope`](IBaseRoute.md#requiredscope)
107
+ [`IBaseRoute`](IBaseRoute.md).[`defaultAuthorization`](IBaseRoute.md#defaultauthorization)
78
108
 
79
109
  ***
80
110
 
@@ -83,7 +113,13 @@ The user must have one of the specified scopes to access the route.
83
113
  > `optional` **disableTenantOverride?**: `boolean`
84
114
 
85
115
  Set to true to prevent callers from using the overrideTenant query parameter on this route.
86
- Tenant override is allowed by default, but you must hold the escalated privilege scope to use it.
116
+ Tenant override is allowed by default, but you must hold the escalated privilege role to use it.
117
+
118
+ #### Default
119
+
120
+ ```ts
121
+ false
122
+ ```
87
123
 
88
124
  #### Inherited from
89
125
 
@@ -8,26 +8,6 @@ The definition for a processor for handling socket routes.
8
8
 
9
9
  ## Methods
10
10
 
11
- ### features()? {#features}
12
-
13
- > `optional` **features**(): `string`[]
14
-
15
- Features supported by this processor.
16
- If a route has any of these features listed, this processor will be run for that route.
17
- If this is not implemented, the processor will run for all routes.
18
-
19
- #### Returns
20
-
21
- `string`[]
22
-
23
- The features supported by this processor.
24
-
25
- #### Inherited from
26
-
27
- [`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`features`](IBaseRouteProcessor.md#features)
28
-
29
- ***
30
-
31
11
  ### pre()? {#pre}
32
12
 
33
13
  > `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
@@ -62,6 +42,8 @@ The context IDs of the request.
62
42
 
63
43
  ##### processorState
64
44
 
45
+ \{\[`id`: `string`\]: `unknown`; \}
46
+
65
47
  The state handed through the processors.
66
48
 
67
49
  ##### componentTypes?
@@ -120,6 +102,8 @@ The context IDs of the request.
120
102
 
121
103
  ##### processorState
122
104
 
105
+ \{\[`id`: `string`\]: `unknown`; \}
106
+
123
107
  The state handed through the processors.
124
108
 
125
109
  ##### componentTypes?
@@ -240,6 +224,8 @@ The route being requested, if a matching one was found.
240
224
 
241
225
  ##### processorState
242
226
 
227
+ \{\[`id`: `string`\]: `unknown`; \}
228
+
243
229
  The state handed through the processors.
244
230
 
245
231
  ##### responseEmitter
@@ -8,7 +8,7 @@ Model for the standard parameters for an http request.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T` = `any`
14
14
 
@@ -204,7 +204,7 @@ The conditions to filter the tenants.
204
204
 
205
205
  ##### properties?
206
206
 
207
- keyof [`ITenant`](ITenant.md)[]
207
+ (keyof [`ITenant`](ITenant.md))[]
208
208
 
209
209
  The properties to include in the returned tenants.
210
210
 
@@ -8,7 +8,7 @@ Interface describing a web server.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- ### T
11
+ ### T {#t}
12
12
 
13
13
  `T`
14
14
 
@@ -0,0 +1,20 @@
1
+ # Type Alias: TenantEventCallback
2
+
3
+ > **TenantEventCallback** = (`tenantId`, `eventType`) => `Promise`\<`void`\>
4
+
5
+ Callback invoked when a tenant event occurs.
6
+ Failures in the callback will be logged but will not prevent other callbacks from being invoked.
7
+
8
+ ## Parameters
9
+
10
+ ### tenantId
11
+
12
+ `string`
13
+
14
+ ### eventType
15
+
16
+ [`TenantEventType`](TenantEventType.md)
17
+
18
+ ## Returns
19
+
20
+ `Promise`\<`void`\>
@@ -0,0 +1,5 @@
1
+ # Type Alias: TenantEventType
2
+
3
+ > **TenantEventType** = *typeof* [`TenantEventType`](../variables/TenantEventType.md)\[keyof *typeof* [`TenantEventType`](../variables/TenantEventType.md)\]
4
+
5
+ The type of event that occurred for a tenant.
@@ -42,12 +42,6 @@ Public Origin of the request.
42
42
 
43
43
  Local Origin of the request.
44
44
 
45
- ### Scope {#scope}
46
-
47
- > `readonly` **Scope**: `"scope"` = `"scope"`
48
-
49
- The comma-separated scope claim from the verified JWT for the current request.
50
-
51
45
  ### OriginalTenant {#originaltenant}
52
46
 
53
47
  > `readonly` **OriginalTenant**: `"originalTenant"` = `"originalTenant"`
@@ -0,0 +1,25 @@
1
+ # Variable: TenantEventType
2
+
3
+ > `const` **TenantEventType**: `object`
4
+
5
+ The type of event that occurred for a tenant.
6
+
7
+ ## Type Declaration
8
+
9
+ ### Created {#created}
10
+
11
+ > `readonly` **Created**: `"created"` = `"created"`
12
+
13
+ The tenant was created.
14
+
15
+ ### Updated {#updated}
16
+
17
+ > `readonly` **Updated**: `"updated"` = `"updated"`
18
+
19
+ The tenant was updated.
20
+
21
+ ### Deleted {#deleted}
22
+
23
+ > `readonly` **Deleted**: `"deleted"` = `"deleted"`
24
+
25
+ The tenant was deleted.