@twin.org/api-tenant-processor 0.0.3-next.4 → 0.0.3-next.40

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 (106) hide show
  1. package/README.md +1 -1
  2. package/dist/es/entities/tenant.js +17 -1
  3. package/dist/es/entities/tenant.js.map +1 -1
  4. package/dist/es/index.js +13 -2
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/es/models/ITenantProcessorConfig.js.map +1 -1
  7. package/dist/es/models/ITenantProcessorConstructorOptions.js.map +1 -1
  8. package/dist/es/models/ITenantServiceConfig.js +4 -0
  9. package/dist/es/models/ITenantServiceConfig.js.map +1 -0
  10. package/dist/es/models/ITenantServiceConstructorOptions.js +2 -0
  11. package/dist/es/models/ITenantServiceConstructorOptions.js.map +1 -0
  12. package/dist/es/models/api/ITenantCreateRequest.js +2 -0
  13. package/dist/es/models/api/ITenantCreateRequest.js.map +1 -0
  14. package/dist/es/models/api/ITenantGetByApiKeyRequest.js +4 -0
  15. package/dist/es/models/api/ITenantGetByApiKeyRequest.js.map +1 -0
  16. package/dist/es/models/api/ITenantGetByIdRequest.js +4 -0
  17. package/dist/es/models/api/ITenantGetByIdRequest.js.map +1 -0
  18. package/dist/es/models/api/ITenantGetByPublicOriginRequest.js +4 -0
  19. package/dist/es/models/api/ITenantGetByPublicOriginRequest.js.map +1 -0
  20. package/dist/es/models/api/ITenantGetResponse.js +2 -0
  21. package/dist/es/models/api/ITenantGetResponse.js.map +1 -0
  22. package/dist/es/models/api/ITenantListRequest.js +4 -0
  23. package/dist/es/models/api/ITenantListRequest.js.map +1 -0
  24. package/dist/es/models/api/ITenantListResponse.js +2 -0
  25. package/dist/es/models/api/ITenantListResponse.js.map +1 -0
  26. package/dist/es/models/api/ITenantRemoveRequest.js +4 -0
  27. package/dist/es/models/api/ITenantRemoveRequest.js.map +1 -0
  28. package/dist/es/models/api/ITenantUpdateRequest.js +2 -0
  29. package/dist/es/models/api/ITenantUpdateRequest.js.map +1 -0
  30. package/dist/es/restEntryPoints.js +10 -0
  31. package/dist/es/restEntryPoints.js.map +1 -0
  32. package/dist/es/tenantAdminService.js +101 -16
  33. package/dist/es/tenantAdminService.js.map +1 -1
  34. package/dist/es/tenantIdContextIdHandler.js +7 -0
  35. package/dist/es/tenantIdContextIdHandler.js.map +1 -1
  36. package/dist/es/tenantProcessor.js +75 -17
  37. package/dist/es/tenantProcessor.js.map +1 -1
  38. package/dist/es/tenantRoutes.js +394 -0
  39. package/dist/es/tenantRoutes.js.map +1 -0
  40. package/dist/es/tenantService.js +51 -0
  41. package/dist/es/tenantService.js.map +1 -0
  42. package/dist/es/utils/tenantIdHelper.js +3 -3
  43. package/dist/es/utils/tenantIdHelper.js.map +1 -1
  44. package/dist/types/entities/tenant.d.ts +8 -0
  45. package/dist/types/index.d.ts +13 -2
  46. package/dist/types/models/ITenantProcessorConfig.d.ts +4 -0
  47. package/dist/types/models/ITenantProcessorConstructorOptions.d.ts +5 -0
  48. package/dist/types/models/ITenantServiceConfig.d.ts +5 -0
  49. package/dist/types/models/ITenantServiceConstructorOptions.d.ts +15 -0
  50. package/dist/types/models/api/ITenantCreateRequest.d.ts +12 -0
  51. package/dist/types/models/api/ITenantGetByApiKeyRequest.d.ts +14 -0
  52. package/dist/types/models/api/ITenantGetByIdRequest.d.ts +14 -0
  53. package/dist/types/models/api/ITenantGetByPublicOriginRequest.d.ts +14 -0
  54. package/dist/types/models/api/ITenantGetResponse.d.ts +10 -0
  55. package/dist/types/models/api/ITenantListRequest.d.ts +23 -0
  56. package/dist/types/models/api/ITenantListResponse.d.ts +17 -0
  57. package/dist/types/models/api/ITenantRemoveRequest.d.ts +14 -0
  58. package/dist/types/models/api/ITenantUpdateRequest.d.ts +19 -0
  59. package/dist/types/restEntryPoints.d.ts +2 -0
  60. package/dist/types/tenantAdminService.d.ts +28 -11
  61. package/dist/types/tenantIdContextIdHandler.d.ts +5 -0
  62. package/dist/types/tenantProcessor.d.ts +1 -1
  63. package/dist/types/tenantRoutes.d.ts +77 -0
  64. package/dist/types/tenantService.d.ts +27 -0
  65. package/docs/changelog.md +532 -15
  66. package/docs/examples.md +81 -1
  67. package/docs/reference/classes/Tenant.md +20 -4
  68. package/docs/reference/classes/TenantAdminService.md +96 -26
  69. package/docs/reference/classes/TenantIdContextIdHandler.md +21 -3
  70. package/docs/reference/classes/TenantIdHelper.md +2 -2
  71. package/docs/reference/classes/TenantProcessor.md +6 -6
  72. package/docs/reference/classes/TenantService.md +79 -0
  73. package/docs/reference/functions/generateRestRoutesTenants.md +25 -0
  74. package/docs/reference/functions/tenantByApiKey.md +31 -0
  75. package/docs/reference/functions/tenantById.md +31 -0
  76. package/docs/reference/functions/tenantByPublicOrigin.md +31 -0
  77. package/docs/reference/functions/tenantCreate.md +31 -0
  78. package/docs/reference/functions/tenantList.md +31 -0
  79. package/docs/reference/functions/tenantRemove.md +31 -0
  80. package/docs/reference/functions/tenantUpdate.md +31 -0
  81. package/docs/reference/index.md +24 -2
  82. package/docs/reference/interfaces/ITenantAdminServiceConstructorOptions.md +4 -4
  83. package/docs/reference/interfaces/ITenantCreateRequest.md +17 -0
  84. package/docs/reference/interfaces/ITenantGetByApiKeyRequest.md +17 -0
  85. package/docs/reference/interfaces/ITenantGetByIdRequest.md +17 -0
  86. package/docs/reference/interfaces/ITenantGetByPublicOriginRequest.md +17 -0
  87. package/docs/reference/interfaces/ITenantGetResponse.md +11 -0
  88. package/docs/reference/interfaces/ITenantListRequest.md +30 -0
  89. package/docs/reference/interfaces/ITenantListResponse.md +23 -0
  90. package/docs/reference/interfaces/ITenantProcessorConfig.md +10 -2
  91. package/docs/reference/interfaces/ITenantProcessorConstructorOptions.md +18 -4
  92. package/docs/reference/interfaces/ITenantRemoveRequest.md +17 -0
  93. package/docs/reference/interfaces/ITenantServiceConfig.md +3 -0
  94. package/docs/reference/interfaces/ITenantServiceConstructorOptions.md +25 -0
  95. package/docs/reference/interfaces/ITenantUpdateRequest.md +25 -0
  96. package/docs/reference/variables/tagsTenants.md +5 -0
  97. package/locales/en.json +8 -2
  98. package/package.json +6 -5
  99. package/dist/es/models/ITenant.js +0 -4
  100. package/dist/es/models/ITenant.js.map +0 -1
  101. package/dist/es/models/ITenantAdminComponent.js +0 -2
  102. package/dist/es/models/ITenantAdminComponent.js.map +0 -1
  103. package/dist/types/models/ITenant.d.ts +0 -21
  104. package/dist/types/models/ITenantAdminComponent.d.ts +0 -41
  105. package/docs/reference/interfaces/ITenant.md +0 -35
  106. package/docs/reference/interfaces/ITenantAdminComponent.md +0 -123
@@ -14,7 +14,7 @@ Class defining the storage for node tenants.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### id
17
+ ### id {#id}
18
18
 
19
19
  > **id**: `string`
20
20
 
@@ -22,7 +22,7 @@ The unique identifier for the tenant.
22
22
 
23
23
  ***
24
24
 
25
- ### apiKey
25
+ ### apiKey {#apikey}
26
26
 
27
27
  > **apiKey**: `string`
28
28
 
@@ -30,7 +30,7 @@ The api key for the tenant.
30
30
 
31
31
  ***
32
32
 
33
- ### label
33
+ ### label {#label}
34
34
 
35
35
  > **label**: `string`
36
36
 
@@ -38,8 +38,24 @@ The label of the tenant.
38
38
 
39
39
  ***
40
40
 
41
- ### dateCreated
41
+ ### dateCreated {#datecreated}
42
42
 
43
43
  > **dateCreated**: `string`
44
44
 
45
45
  The date the tenant was created.
46
+
47
+ ***
48
+
49
+ ### dateModified {#datemodified}
50
+
51
+ > **dateModified**: `string`
52
+
53
+ The date the tenant was modified.
54
+
55
+ ***
56
+
57
+ ### publicOrigin? {#publicorigin}
58
+
59
+ > `optional` **publicOrigin?**: `string`
60
+
61
+ The origin available to the public for accessing the API.
@@ -1,10 +1,10 @@
1
1
  # Class: TenantAdminService
2
2
 
3
- Service for performing email messaging operations to a connector.
3
+ Service for performing tenant administration operations.
4
4
 
5
5
  ## Implements
6
6
 
7
- - [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md)
7
+ - `ITenantAdminComponent`
8
8
 
9
9
  ## Constructors
10
10
 
@@ -28,7 +28,7 @@ The options for the connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,9 +54,9 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### get()
57
+ ### get() {#get}
58
58
 
59
- > **get**(`tenantId`): `Promise`\<[`ITenant`](../interfaces/ITenant.md) \| `undefined`\>
59
+ > **get**(`tenantId`): `Promise`\<`ITenant`\>
60
60
 
61
61
  Get a tenant by its id.
62
62
 
@@ -70,19 +70,23 @@ The id of the tenant.
70
70
 
71
71
  #### Returns
72
72
 
73
- `Promise`\<[`ITenant`](../interfaces/ITenant.md) \| `undefined`\>
73
+ `Promise`\<`ITenant`\>
74
74
 
75
- The tenant or undefined if not found.
75
+ The tenant.
76
+
77
+ #### Throws
78
+
79
+ Error if the tenant is not found.
76
80
 
77
81
  #### Implementation of
78
82
 
79
- [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md).[`get`](../interfaces/ITenantAdminComponent.md#get)
83
+ `ITenantAdminComponent.get`
80
84
 
81
85
  ***
82
86
 
83
- ### getByApiKey()
87
+ ### getByApiKey() {#getbyapikey}
84
88
 
85
- > **getByApiKey**(`apiKey`): `Promise`\<[`ITenant`](../interfaces/ITenant.md) \| `undefined`\>
89
+ > **getByApiKey**(`apiKey`): `Promise`\<`ITenant`\>
86
90
 
87
91
  Get a tenant by its api key.
88
92
 
@@ -96,43 +100,103 @@ The api key of the tenant.
96
100
 
97
101
  #### Returns
98
102
 
99
- `Promise`\<[`ITenant`](../interfaces/ITenant.md) \| `undefined`\>
103
+ `Promise`\<`ITenant`\>
104
+
105
+ The tenant.
106
+
107
+ #### Throws
108
+
109
+ Error if the tenant is not found.
110
+
111
+ #### Implementation of
112
+
113
+ `ITenantAdminComponent.getByApiKey`
114
+
115
+ ***
116
+
117
+ ### getByPublicOrigin() {#getbypublicorigin}
118
+
119
+ > **getByPublicOrigin**(`publicOrigin`): `Promise`\<`ITenant`\>
120
+
121
+ Get a tenant by its public origin.
122
+
123
+ #### Parameters
124
+
125
+ ##### publicOrigin
126
+
127
+ `string`
128
+
129
+ The origin of the tenant.
130
+
131
+ #### Returns
132
+
133
+ `Promise`\<`ITenant`\>
134
+
135
+ The tenant.
100
136
 
101
- The tenant or undefined if not found.
137
+ #### Throws
138
+
139
+ Error if the tenant is not found.
102
140
 
103
141
  #### Implementation of
104
142
 
105
- [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md).[`getByApiKey`](../interfaces/ITenantAdminComponent.md#getbyapikey)
143
+ `ITenantAdminComponent.getByPublicOrigin`
106
144
 
107
145
  ***
108
146
 
109
- ### set()
147
+ ### create() {#create}
110
148
 
111
- > **set**(`tenant`): `Promise`\<`void`\>
149
+ > **create**(`tenant`): `Promise`\<`string`\>
112
150
 
113
- Set a tenant.
151
+ Create a tenant.
114
152
 
115
153
  #### Parameters
116
154
 
117
155
  ##### tenant
118
156
 
119
- [`ITenant`](../interfaces/ITenant.md)
157
+ `Omit`\<`ITenant`, `"id"` \| `"dateCreated"` \| `"dateModified"`\> & `object`
120
158
 
121
159
  The tenant to store.
122
160
 
123
161
  #### Returns
124
162
 
163
+ `Promise`\<`string`\>
164
+
165
+ The tenant id.
166
+
167
+ #### Implementation of
168
+
169
+ `ITenantAdminComponent.create`
170
+
171
+ ***
172
+
173
+ ### update() {#update}
174
+
175
+ > **update**(`tenant`): `Promise`\<`void`\>
176
+
177
+ Update a tenant.
178
+
179
+ #### Parameters
180
+
181
+ ##### tenant
182
+
183
+ `Partial`\<`Omit`\<`ITenant`, `"dateCreated"` \| `"dateModified"`\>\>
184
+
185
+ The tenant to update.
186
+
187
+ #### Returns
188
+
125
189
  `Promise`\<`void`\>
126
190
 
127
- Nothing.
191
+ The nothing.
128
192
 
129
193
  #### Implementation of
130
194
 
131
- [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md).[`set`](../interfaces/ITenantAdminComponent.md#set)
195
+ `ITenantAdminComponent.update`
132
196
 
133
197
  ***
134
198
 
135
- ### remove()
199
+ ### remove() {#remove}
136
200
 
137
201
  > **remove**(`tenantId`): `Promise`\<`void`\>
138
202
 
@@ -154,18 +218,24 @@ Nothing.
154
218
 
155
219
  #### Implementation of
156
220
 
157
- [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md).[`remove`](../interfaces/ITenantAdminComponent.md#remove)
221
+ `ITenantAdminComponent.remove`
158
222
 
159
223
  ***
160
224
 
161
- ### query()
225
+ ### query() {#query}
162
226
 
163
- > **query**(`cursor?`, `limit?`): `Promise`\<\{ `tenants`: [`ITenant`](../interfaces/ITenant.md)[]; `cursor?`: `string`; \}\>
227
+ > **query**(`properties`, `cursor?`, `limit?`): `Promise`\<\{ `tenants`: `ITenant`[]; `cursor?`: `string`; \}\>
164
228
 
165
229
  Query tenants with pagination.
166
230
 
167
231
  #### Parameters
168
232
 
233
+ ##### properties
234
+
235
+ keyof `ITenant`[] \| `undefined`
236
+
237
+ The properties to include in the returned tenants.
238
+
169
239
  ##### cursor?
170
240
 
171
241
  `string`
@@ -180,10 +250,10 @@ The maximum number of tenants to return.
180
250
 
181
251
  #### Returns
182
252
 
183
- `Promise`\<\{ `tenants`: [`ITenant`](../interfaces/ITenant.md)[]; `cursor?`: `string`; \}\>
253
+ `Promise`\<\{ `tenants`: `ITenant`[]; `cursor?`: `string`; \}\>
184
254
 
185
255
  The tenants and the next cursor if more tenants are available.
186
256
 
187
257
  #### Implementation of
188
258
 
189
- [`ITenantAdminComponent`](../interfaces/ITenantAdminComponent.md).[`query`](../interfaces/ITenantAdminComponent.md#query)
259
+ `ITenantAdminComponent.query`
@@ -18,7 +18,7 @@ Context Id handler for testing as a tenant id.
18
18
 
19
19
  ## Properties
20
20
 
21
- ### CLASS\_NAME
21
+ ### CLASS\_NAME {#class_name}
22
22
 
23
23
  > `readonly` `static` **CLASS\_NAME**: `string`
24
24
 
@@ -26,7 +26,25 @@ Runtime name for the class.
26
26
 
27
27
  ## Methods
28
28
 
29
- ### short()
29
+ ### className() {#classname}
30
+
31
+ > **className**(): `string`
32
+
33
+ The class name of the component.
34
+
35
+ #### Returns
36
+
37
+ `string`
38
+
39
+ The class name.
40
+
41
+ #### Implementation of
42
+
43
+ `IContextIdHandler.className`
44
+
45
+ ***
46
+
47
+ ### short() {#short}
30
48
 
31
49
  > **short**(`value`): `string`
32
50
 
@@ -52,7 +70,7 @@ Short form string.
52
70
 
53
71
  ***
54
72
 
55
- ### guard()
73
+ ### guard() {#guard}
56
74
 
57
75
  > **guard**(`value`): `void`
58
76
 
@@ -14,7 +14,7 @@ Helper class for tenant id related operations.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### generateTenantId()
17
+ ### generateTenantId() {#generatetenantid}
18
18
 
19
19
  > `static` **generateTenantId**(): `string`
20
20
 
@@ -28,7 +28,7 @@ A new tenant ID.
28
28
 
29
29
  ***
30
30
 
31
- ### generateApiKey()
31
+ ### generateApiKey() {#generateapikey}
32
32
 
33
33
  > `static` **generateApiKey**(): `string`
34
34
 
@@ -12,7 +12,7 @@ Handles incoming api keys and maps them to tenant ids.
12
12
 
13
13
  > **new TenantProcessor**(`options?`): `TenantProcessor`
14
14
 
15
- Create a new instance of NodeTenantProcessor.
15
+ Create a new instance of TenantProcessor.
16
16
 
17
17
  #### Parameters
18
18
 
@@ -28,7 +28,7 @@ Options for the processor.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,7 +54,7 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### pre()
57
+ ### pre() {#pre}
58
58
 
59
59
  > **pre**(`request`, `response`, `route`, `contextIds`, `processorState`): `Promise`\<`void`\>
60
60
 
@@ -76,9 +76,9 @@ The outgoing response.
76
76
 
77
77
  ##### route
78
78
 
79
- The route to process.
79
+ `IBaseRoute` \| `undefined`
80
80
 
81
- `IBaseRoute` | `undefined`
81
+ The route to process.
82
82
 
83
83
  ##### contextIds
84
84
 
@@ -0,0 +1,79 @@
1
+ # Class: TenantService
2
+
3
+ Service for performing tenant administration operations.
4
+
5
+ ## Implements
6
+
7
+ - `ITenantComponent`
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new TenantService**(`options?`): `TenantService`
14
+
15
+ Create a new instance of TenantService.
16
+
17
+ #### Parameters
18
+
19
+ ##### options?
20
+
21
+ [`ITenantAdminServiceConstructorOptions`](../interfaces/ITenantAdminServiceConstructorOptions.md)
22
+
23
+ The options for the connector.
24
+
25
+ #### Returns
26
+
27
+ `TenantService`
28
+
29
+ ## Properties
30
+
31
+ ### CLASS\_NAME {#class_name}
32
+
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
+
35
+ Runtime name for the class.
36
+
37
+ ## Methods
38
+
39
+ ### className() {#classname}
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `ITenantComponent.className`
54
+
55
+ ***
56
+
57
+ ### runPerTenant() {#runpertenant}
58
+
59
+ > **runPerTenant**(`method`): `Promise`\<`void`\>
60
+
61
+ Run a per tenant operation.
62
+
63
+ #### Parameters
64
+
65
+ ##### method
66
+
67
+ () => `Promise`\<`void`\>
68
+
69
+ The method to run for each tenant.
70
+
71
+ #### Returns
72
+
73
+ `Promise`\<`void`\>
74
+
75
+ Nothing.
76
+
77
+ #### Implementation of
78
+
79
+ `ITenantComponent.runPerTenant`
@@ -0,0 +1,25 @@
1
+ # Function: generateRestRoutesTenants()
2
+
3
+ > **generateRestRoutesTenants**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
+
5
+ The REST routes for tenant management.
6
+
7
+ ## Parameters
8
+
9
+ ### baseRouteName
10
+
11
+ `string`
12
+
13
+ Prefix to prepend to the paths.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes stored in the ComponentFactory.
20
+
21
+ ## Returns
22
+
23
+ `IRestRoute`\<`any`, `any`\>[]
24
+
25
+ The generated routes.
@@ -0,0 +1,31 @@
1
+ # Function: tenantByApiKey()
2
+
3
+ > **tenantByApiKey**(`httpRequestContext`, `componentName`, `request`): `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
4
+
5
+ Get the tenant by api key.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantGetByApiKeyRequest`](../interfaces/ITenantGetByApiKeyRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: tenantById()
2
+
3
+ > **tenantById**(`httpRequestContext`, `componentName`, `request`): `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
4
+
5
+ Get the tenant by id.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantGetByIdRequest`](../interfaces/ITenantGetByIdRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: tenantByPublicOrigin()
2
+
3
+ > **tenantByPublicOrigin**(`httpRequestContext`, `componentName`, `request`): `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
4
+
5
+ Get the tenant by public origin.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantGetByPublicOriginRequest`](../interfaces/ITenantGetByPublicOriginRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<[`ITenantGetResponse`](../interfaces/ITenantGetResponse.md)\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: tenantCreate()
2
+
3
+ > **tenantCreate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`ICreatedResponse`\>
4
+
5
+ Create the tenant.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantCreateRequest`](../interfaces/ITenantCreateRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`ICreatedResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: tenantList()
2
+
3
+ > **tenantList**(`httpRequestContext`, `componentName`, `request`): `Promise`\<[`ITenantListResponse`](../interfaces/ITenantListResponse.md)\>
4
+
5
+ Get the list of tenants.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantListRequest`](../interfaces/ITenantListRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<[`ITenantListResponse`](../interfaces/ITenantListResponse.md)\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: tenantRemove()
2
+
3
+ > **tenantRemove**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Remove the tenant by id.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ [`ITenantRemoveRequest`](../interfaces/ITenantRemoveRequest.md)
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.