@serve.zone/dcrouter 14.4.0 → 15.0.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.
Files changed (45) hide show
  1. package/deno.json +1 -1
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/config/classes.route-config-manager.js +6 -22
  4. package/dist_ts/email/classes.workapp-mail-manager.d.ts +11 -1
  5. package/dist_ts/email/classes.workapp-mail-manager.js +1 -1
  6. package/dist_ts/opsserver/classes.opsserver.d.ts +1 -1
  7. package/dist_ts/opsserver/classes.opsserver.js +3 -3
  8. package/dist_ts/opsserver/handlers/{workhoster.handler.d.ts → gatewayclient.handler.d.ts} +1 -3
  9. package/dist_ts/opsserver/handlers/gatewayclient.handler.js +578 -0
  10. package/dist_ts/opsserver/handlers/index.d.ts +1 -1
  11. package/dist_ts/opsserver/handlers/index.js +2 -2
  12. package/dist_ts_apiclient/classes.certificate.js +1 -1
  13. package/dist_ts_apiclient/classes.dcrouterapiclient.d.ts +2 -2
  14. package/dist_ts_apiclient/classes.dcrouterapiclient.js +4 -4
  15. package/dist_ts_apiclient/classes.gatewayclient.d.ts +16 -0
  16. package/dist_ts_apiclient/classes.gatewayclient.js +36 -0
  17. package/dist_ts_apiclient/index.d.ts +1 -1
  18. package/dist_ts_apiclient/index.js +2 -2
  19. package/dist_ts_interfaces/data/route-management.d.ts +2 -17
  20. package/dist_ts_interfaces/data/route-management.js +1 -1
  21. package/dist_ts_interfaces/data/workhoster.d.ts +0 -29
  22. package/dist_ts_interfaces/requests/certificate.d.ts +0 -5
  23. package/dist_ts_interfaces/requests/certificate.js +3 -1
  24. package/dist_ts_interfaces/requests/workhoster.d.ts +1 -63
  25. package/dist_ts_migrations/index.js +63 -2
  26. package/dist_ts_web/00_commitinfo_data.js +1 -1
  27. package/dist_ts_web/appstate.js +1 -1
  28. package/package.json +1 -1
  29. package/ts/00_commitinfo_data.ts +1 -1
  30. package/ts/config/classes.route-config-manager.ts +5 -20
  31. package/ts/email/classes.workapp-mail-manager.ts +11 -1
  32. package/ts/opsserver/classes.opsserver.ts +2 -2
  33. package/ts/opsserver/handlers/certificate.handler.ts +2 -2
  34. package/ts/opsserver/handlers/{workhoster.handler.ts → gatewayclient.handler.ts} +26 -105
  35. package/ts/opsserver/handlers/index.ts +1 -1
  36. package/ts_apiclient/classes.certificate.ts +3 -2
  37. package/ts_apiclient/classes.dcrouterapiclient.ts +3 -3
  38. package/ts_apiclient/classes.gatewayclient.ts +65 -0
  39. package/ts_apiclient/index.ts +1 -1
  40. package/ts_web/00_commitinfo_data.ts +1 -1
  41. package/ts_web/appstate.ts +3 -2
  42. package/dist_ts/opsserver/handlers/workhoster.handler.js +0 -635
  43. package/dist_ts_apiclient/classes.workhoster.d.ts +0 -15
  44. package/dist_ts_apiclient/classes.workhoster.js +0 -33
  45. package/ts_apiclient/classes.workhoster.ts +0 -57
@@ -1,15 +0,0 @@
1
- import * as interfaces from '../dist_ts_interfaces/index.js';
2
- import type { DcRouterApiClient } from './classes.dcrouterapiclient.js';
3
- export declare class WorkHosterManager {
4
- private clientRef;
5
- constructor(clientRef: DcRouterApiClient);
6
- getCapabilities(): Promise<interfaces.data.IGatewayCapabilities>;
7
- getGatewayClientContext(): Promise<interfaces.data.IGatewayClientContext>;
8
- getDomains(): Promise<interfaces.data.IWorkHosterDomain[]>;
9
- syncRoute(options: {
10
- ownership: interfaces.data.IWorkAppRouteOwnership;
11
- route: interfaces.data.IDcRouterRouteConfig;
12
- enabled?: boolean;
13
- }): Promise<interfaces.data.IWorkAppRouteSyncResult>;
14
- deleteRoute(ownership: interfaces.data.IWorkAppRouteOwnership): Promise<interfaces.data.IWorkAppRouteSyncResult>;
15
- }
@@ -1,33 +0,0 @@
1
- import * as interfaces from '../dist_ts_interfaces/index.js';
2
- export class WorkHosterManager {
3
- clientRef;
4
- constructor(clientRef) {
5
- this.clientRef = clientRef;
6
- }
7
- async getCapabilities() {
8
- const response = await this.clientRef.request('getGatewayCapabilities', this.clientRef.buildRequestPayload());
9
- return response.capabilities;
10
- }
11
- async getGatewayClientContext() {
12
- const response = await this.clientRef.request('getGatewayClientContext', this.clientRef.buildRequestPayload());
13
- return response.context;
14
- }
15
- async getDomains() {
16
- const response = await this.clientRef.request('getWorkHosterDomains', this.clientRef.buildRequestPayload());
17
- return response.domains;
18
- }
19
- async syncRoute(options) {
20
- return this.clientRef.request('syncWorkAppRoute', this.clientRef.buildRequestPayload({
21
- ownership: options.ownership,
22
- route: options.route,
23
- enabled: options.enabled,
24
- }));
25
- }
26
- async deleteRoute(ownership) {
27
- return this.clientRef.request('syncWorkAppRoute', this.clientRef.buildRequestPayload({
28
- ownership,
29
- delete: true,
30
- }));
31
- }
32
- }
33
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3Nlcy53b3JraG9zdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfYXBpY2xpZW50L2NsYXNzZXMud29ya2hvc3Rlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssVUFBVSxNQUFNLDJCQUEyQixDQUFDO0FBR3hELE1BQU0sT0FBTyxpQkFBaUI7SUFDUjtJQUFwQixZQUFvQixTQUE0QjtRQUE1QixjQUFTLEdBQVQsU0FBUyxDQUFtQjtJQUFHLENBQUM7SUFFN0MsS0FBSyxDQUFDLGVBQWU7UUFDMUIsTUFBTSxRQUFRLEdBQUcsTUFBTSxJQUFJLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FDM0Msd0JBQXdCLEVBQ3hCLElBQUksQ0FBQyxTQUFTLENBQUMsbUJBQW1CLEVBQVMsQ0FDNUMsQ0FBQztRQUNGLE9BQU8sUUFBUSxDQUFDLFlBQVksQ0FBQztJQUMvQixDQUFDO0lBRU0sS0FBSyxDQUFDLHVCQUF1QjtRQUNsQyxNQUFNLFFBQVEsR0FBRyxNQUFN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terapiclient.js';
3
-
4
- export class WorkHosterManager {
5
- constructor(private clientRef: DcRouterApiClient) {}
6
-
7
- public async getCapabilities(): Promise<interfaces.data.IGatewayCapabilities> {
8
- const response = await this.clientRef.request<interfaces.requests.IReq_GetGatewayCapabilities>(
9
- 'getGatewayCapabilities',
10
- this.clientRef.buildRequestPayload() as any,
11
- );
12
- return response.capabilities;
13
- }
14
-
15
- public async getGatewayClientContext(): Promise<interfaces.data.IGatewayClientContext> {
16
- const response = await this.clientRef.request<interfaces.requests.IReq_GetGatewayClientContext>(
17
- 'getGatewayClientContext',
18
- this.clientRef.buildRequestPayload() as any,
19
- );
20
- return response.context;
21
- }
22
-
23
- public async getDomains(): Promise<interfaces.data.IWorkHosterDomain[]> {
24
- const response = await this.clientRef.request<interfaces.requests.IReq_GetWorkHosterDomains>(
25
- 'getWorkHosterDomains',
26
- this.clientRef.buildRequestPayload() as any,
27
- );
28
- return response.domains;
29
- }
30
-
31
- public async syncRoute(options: {
32
- ownership: interfaces.data.IWorkAppRouteOwnership;
33
- route: interfaces.data.IDcRouterRouteConfig;
34
- enabled?: boolean;
35
- }): Promise<interfaces.data.IWorkAppRouteSyncResult> {
36
- return this.clientRef.request<interfaces.requests.IReq_SyncWorkAppRoute>(
37
- 'syncWorkAppRoute',
38
- this.clientRef.buildRequestPayload({
39
- ownership: options.ownership,
40
- route: options.route,
41
- enabled: options.enabled,
42
- }) as any,
43
- );
44
- }
45
-
46
- public async deleteRoute(
47
- ownership: interfaces.data.IWorkAppRouteOwnership,
48
- ): Promise<interfaces.data.IWorkAppRouteSyncResult> {
49
- return this.clientRef.request<interfaces.requests.IReq_SyncWorkAppRoute>(
50
- 'syncWorkAppRoute',
51
- this.clientRef.buildRequestPayload({
52
- ownership,
53
- delete: true,
54
- }) as any,
55
- );
56
- }
57
- }