@twin.org/api-service 0.0.3-next.9 → 0.9.0
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/README.md +1 -1
- package/dist/es/healthRoutes.js +107 -0
- package/dist/es/healthRoutes.js.map +1 -0
- package/dist/es/healthService.js +155 -0
- package/dist/es/healthService.js.map +1 -0
- package/dist/es/index.js +7 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/informationRoutes.js +35 -67
- package/dist/es/informationRoutes.js.map +1 -1
- package/dist/es/informationService.js +11 -87
- package/dist/es/informationService.js.map +1 -1
- package/dist/es/models/IHealthServiceConfig.js +4 -0
- package/dist/es/models/IHealthServiceConfig.js.map +1 -0
- package/dist/es/models/IHealthServiceConstructorOptions.js +2 -0
- package/dist/es/models/IHealthServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IPlatformServiceConfig.js +4 -0
- package/dist/es/models/IPlatformServiceConfig.js.map +1 -0
- package/dist/es/models/IPlatformServiceConstructorOptions.js +2 -0
- package/dist/es/models/IPlatformServiceConstructorOptions.js.map +1 -0
- package/dist/es/platformService.js +155 -0
- package/dist/es/platformService.js.map +1 -0
- package/dist/es/restEntryPoints.js +10 -0
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/types/healthRoutes.d.ts +20 -0
- package/dist/types/healthService.d.ts +42 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/informationRoutes.d.ts +3 -3
- package/dist/types/informationService.d.ts +11 -23
- package/dist/types/models/IHealthServiceConfig.d.ts +16 -0
- package/dist/types/models/IHealthServiceConstructorOptions.d.ts +10 -0
- package/dist/types/models/IPlatformServiceConfig.d.ts +10 -0
- package/dist/types/models/IPlatformServiceConstructorOptions.d.ts +15 -0
- package/dist/types/platformService.d.ts +39 -0
- package/dist/types/restEntryPoints.d.ts +3 -0
- package/docs/changelog.md +750 -70
- package/docs/examples.md +74 -1
- package/docs/reference/classes/HealthService.md +123 -0
- package/docs/reference/classes/InformationService.md +18 -94
- package/docs/reference/classes/PlatformService.md +123 -0
- package/docs/reference/functions/generateRestRoutesHealth.md +25 -0
- package/docs/reference/functions/serverReadyz.md +31 -0
- package/docs/reference/index.md +10 -1
- package/docs/reference/interfaces/IHealthServiceConfig.md +32 -0
- package/docs/reference/interfaces/IHealthServiceConstructorOptions.md +11 -0
- package/docs/reference/interfaces/IInformationServiceConfig.md +5 -5
- package/docs/reference/interfaces/IInformationServiceConstructorOptions.md +1 -1
- package/docs/reference/interfaces/IPlatformServiceConfig.md +17 -0
- package/docs/reference/interfaces/IPlatformServiceConstructorOptions.md +25 -0
- package/docs/reference/variables/restEntryPoints.md +2 -0
- package/docs/reference/variables/tagsHealth.md +5 -0
- package/locales/en.json +7 -1
- package/package.json +13 -9
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type IPlatformComponent } from "@twin.org/api-models";
|
|
2
|
+
import { type IContextIds } from "@twin.org/context";
|
|
3
|
+
import type { IPlatformServiceConstructorOptions } from "./models/IPlatformServiceConstructorOptions.js";
|
|
4
|
+
/**
|
|
5
|
+
* Service for performing platform operations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PlatformService implements IPlatformComponent {
|
|
8
|
+
/**
|
|
9
|
+
* Runtime name for the class.
|
|
10
|
+
*/
|
|
11
|
+
static readonly CLASS_NAME: string;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new instance of PlatformService.
|
|
14
|
+
* @param options The options for the connector.
|
|
15
|
+
*/
|
|
16
|
+
constructor(options?: IPlatformServiceConstructorOptions);
|
|
17
|
+
/**
|
|
18
|
+
* Returns the class name of the component.
|
|
19
|
+
* @returns The class name of the component.
|
|
20
|
+
*/
|
|
21
|
+
className(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether the component is running in a multi-tenant environment.
|
|
24
|
+
* @returns True if the component is running in a multi-tenant environment, false otherwise.
|
|
25
|
+
*/
|
|
26
|
+
isMultiTenant(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Execute a method, if single tenant will run once, if multi-tenant will run for each tenant.
|
|
29
|
+
* @param method The method to run for each tenant.
|
|
30
|
+
* @returns A promise that resolves when the method has been executed for all applicable tenants.
|
|
31
|
+
*/
|
|
32
|
+
execute(method: () => Promise<void>): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Get the local origin context IDs for the given URL.
|
|
35
|
+
* @param url The URL to check.
|
|
36
|
+
* @returns A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.
|
|
37
|
+
*/
|
|
38
|
+
getLocalOriginContext(url: string): Promise<IContextIds | undefined>;
|
|
39
|
+
}
|