@interopio/workspaces-api 3.2.2 → 3.2.3

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.
@@ -1,62 +0,0 @@
1
- import { BaseBuilder } from "./baseBuilder";
2
- import { ChildBuilder } from "../types/builders";
3
- import { IOConnectWorkspaces } from "../../workspaces";
4
-
5
- interface PrivateData {
6
- definition: IOConnectWorkspaces.BoxDefinition;
7
- base: BaseBuilder;
8
- children: ChildBuilder[];
9
- }
10
-
11
- const privateData = new WeakMap<ParentBuilder, PrivateData>();
12
-
13
- export class ParentBuilder implements ParentBuilder {
14
-
15
- constructor(
16
- definition: IOConnectWorkspaces.BoxDefinition,
17
- base: BaseBuilder
18
- ) {
19
- const children = base.wrapChildren(definition.children);
20
-
21
- delete definition.children;
22
-
23
- privateData.set(this, { base, children, definition });
24
- }
25
-
26
- public get type(): "column" | "row" | "group" {
27
- return privateData.get(this).definition.type;
28
- }
29
-
30
- public addColumn(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
31
- const base = privateData.get(this).base;
32
-
33
- return base.add("column", privateData.get(this).children, definition);
34
- }
35
-
36
- public addRow(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
37
- const base = privateData.get(this).base;
38
-
39
- return base.add("row", privateData.get(this).children, definition);
40
- }
41
-
42
- public addGroup(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
43
- const base = privateData.get(this).base;
44
-
45
- return base.add("group", privateData.get(this).children, definition);
46
- }
47
-
48
- public addWindow(definition: IOConnectWorkspaces.WorkspaceWindowDefinition): ParentBuilder {
49
- const base = privateData.get(this).base;
50
-
51
- base.addWindow(privateData.get(this).children, definition);
52
-
53
- return this;
54
- }
55
-
56
- public serialize(): IOConnectWorkspaces.BoxDefinition {
57
- const definition = privateData.get(this).definition;
58
- definition.children = privateData.get(this).base.serializeChildren(privateData.get(this).children);
59
- return definition;
60
- }
61
-
62
- }
@@ -1,102 +0,0 @@
1
- import { BaseBuilder } from "./baseBuilder";
2
- import { ChildBuilder } from "../types/builders";
3
- import { ParentBuilder } from "./parentBuilder";
4
- import { workspaceBuilderCreateConfigDecoder, nonNegativeNumberDecoder } from "../shared/decoders";
5
- import { IOConnectWorkspaces } from "../../workspaces";
6
- import { WorkspacesController } from "../types/controller";
7
-
8
- interface PrivateData {
9
- definition: IOConnectWorkspaces.WorkspaceDefinition;
10
- children: ChildBuilder[];
11
- base: BaseBuilder;
12
- controller: WorkspacesController;
13
- }
14
-
15
- const privateData = new WeakMap<WorkspaceBuilder, PrivateData>();
16
-
17
- export class WorkspaceBuilder implements WorkspaceBuilder {
18
-
19
- constructor(
20
- definition: IOConnectWorkspaces.WorkspaceDefinition,
21
- base: BaseBuilder,
22
- controller: WorkspacesController
23
- ) {
24
- const children = base.wrapChildren(definition.children);
25
-
26
- delete definition.children;
27
-
28
- privateData.set(this, { base, children, definition, controller });
29
- }
30
-
31
- public addColumn(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
32
- const children = privateData.get(this).children;
33
-
34
- const areAllColumns = children.every((child) => child instanceof ParentBuilder && child.type === "column");
35
-
36
- if (!areAllColumns) {
37
- throw new Error("Cannot add a column to this workspace, because there are already children of another type");
38
- }
39
-
40
- const base = privateData.get(this).base;
41
-
42
- return base.add("column", children, definition);
43
- }
44
-
45
- public addRow(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
46
- const children = privateData.get(this).children;
47
-
48
- const areAllRows = children.every((child) => child instanceof ParentBuilder && child.type === "row");
49
-
50
- if (!areAllRows) {
51
- throw new Error("Cannot add a row to this workspace, because there are already children of another type");
52
- }
53
-
54
- const base = privateData.get(this).base;
55
-
56
- return base.add("row", children, definition);
57
- }
58
-
59
- public addGroup(definition?: IOConnectWorkspaces.BoxDefinition): ParentBuilder {
60
- const children = privateData.get(this).children;
61
-
62
- if (children.length !== 0) {
63
- throw new Error("Cannot add a group to this workspace, because there are already defined children.");
64
- }
65
-
66
- const base = privateData.get(this).base;
67
-
68
- return base.add("group", children, definition);
69
- }
70
-
71
- public addWindow(definition: IOConnectWorkspaces.WorkspaceWindowDefinition): WorkspaceBuilder {
72
- const children = privateData.get(this).children;
73
-
74
- if (children.length !== 0) {
75
- throw new Error("Cannot add a window to this workspace, because there are already defined children.");
76
- }
77
-
78
- const base = privateData.get(this).base;
79
-
80
- base.addWindow(children, definition);
81
-
82
- return this;
83
- }
84
-
85
- public getChildAt(index: number): ChildBuilder {
86
- nonNegativeNumberDecoder.runWithException(index);
87
- const data = privateData.get(this).children;
88
-
89
- return data[index];
90
- }
91
-
92
- public async create(config?: IOConnectWorkspaces.WorkspaceCreateConfig): Promise<IOConnectWorkspaces.Workspace> {
93
- const saveConfig = workspaceBuilderCreateConfigDecoder.runWithException(config);
94
-
95
- const definition = privateData.get(this).definition;
96
- definition.children = privateData.get(this).base.serializeChildren(privateData.get(this).children);
97
-
98
- const controller = privateData.get(this).controller;
99
-
100
- return controller.createWorkspace(definition, saveConfig);
101
- }
102
- }
@@ -1,263 +0,0 @@
1
- import { CallbackRegistry, UnsubscribeFunction } from "callback-registry";
2
- import { SubscriptionConfig, ActiveSubscription, WorkspaceEventType, WorkspaceEventAction, WorkspacePayload, WorkspaceEventScope, PendingSubscription } from "../types/subscription";
3
- import { ClientOperations, CLIENT_OPERATIONS, STREAMS } from "./constants";
4
- import { OPERATIONS } from "./constants";
5
- import { eventTypeDecoder, streamRequestArgumentsDecoder, workspaceEventActionDecoder } from "../shared/decoders";
6
- import { IOConnectWorkspaces } from "../../workspaces";
7
- import { InteropTransport } from "./interop-transport";
8
- import { PromiseWrapper } from "../shared/promiseWrapper";
9
- import { Instance } from "../types/glue";
10
-
11
- export class Bridge {
12
-
13
- private readonly activeSubscriptions: ActiveSubscription[] = [];
14
- private readonly pendingSubScriptions: PendingSubscription[] = [];
15
-
16
- constructor(
17
- private readonly transport: InteropTransport,
18
- private readonly registry: CallbackRegistry
19
- ) { }
20
-
21
- public async createCoreEventSubscription(): Promise<void> {
22
- await this.transport.coreSubscriptionReady(this.handleCoreEvent.bind(this));
23
- }
24
-
25
- public handleCoreSubscription(config: SubscriptionConfig): UnsubscribeFunction {
26
- const registryKey = `${config.eventType}-${config.action}`;
27
- const scope = config.scope;
28
- const scopeId = config.scopeId;
29
-
30
- return this.registry.add(registryKey, (args) => {
31
- const scopeConfig = {
32
- type: scope,
33
- id: scopeId
34
- };
35
-
36
- const receivedIds = {
37
- frame: args.frameSummary?.id || args.windowSummary?.config.frameId,
38
- workspace: args.workspaceSummary?.id || args.windowSummary?.config.workspaceId,
39
- container: args.containerSummary?.itemId,
40
- window: args.windowSummary?.itemId
41
- };
42
-
43
- const shouldInvokeCallback = this.checkScopeMatch(scopeConfig, receivedIds);
44
-
45
- if (!shouldInvokeCallback) {
46
- return;
47
- }
48
-
49
- config.callback(args);
50
- });
51
- }
52
-
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- public async send<T>(operationName: string, operationArgs?: any): Promise<T> {
55
-
56
- const operationDefinition = Object.values(OPERATIONS).find((operation) => operation.name === operationName);
57
-
58
- if (!operationDefinition) {
59
- throw new Error(`Cannot find definition for operation name: ${operationName}`);
60
- }
61
-
62
- if (operationDefinition.argsDecoder) {
63
- try {
64
- operationDefinition.argsDecoder.runWithException(operationArgs);
65
- } catch (error) {
66
- throw new Error(`Unexpected internal outgoing validation error: ${error.message}, for input: ${JSON.stringify(error.input)}, for operation ${operationName}`);
67
- }
68
- }
69
-
70
- try {
71
- const operationResult = await this.transport.transmitControl(operationDefinition.name, operationArgs);
72
-
73
- operationDefinition.resultDecoder.runWithException(operationResult);
74
-
75
- return operationResult;
76
- } catch (error) {
77
- if (error.kind) {
78
- throw new Error(`Unexpected internal incoming validation error: ${error.message}, for input: ${JSON.stringify(error.input)}, for operation ${operationName}`);
79
- }
80
- throw new Error(error.message);
81
- }
82
- }
83
-
84
- public async subscribe(config: SubscriptionConfig): Promise<IOConnectWorkspaces.Unsubscribe> {
85
- const pendingSub = this.getPendingSubscription(config);
86
- if (pendingSub) {
87
- await pendingSub.promise;
88
- }
89
-
90
- let activeSub = this.getActiveSubscription(config);
91
- const registryKey = this.getRegistryKey(config);
92
-
93
- if (!activeSub) {
94
- const pendingPromise = new PromiseWrapper<void>();
95
- const pendingSubscription = {
96
- streamType: config.eventType,
97
- level: config.scope,
98
- levelId: config.scopeId,
99
- promise: pendingPromise.promise
100
- };
101
- this.pendingSubScriptions.push(pendingSubscription);
102
- try {
103
- const stream = STREAMS[config.eventType];
104
- const gdSub = await this.transport.subscribe(stream.name, this.getBranchKey(config), config.eventType);
105
-
106
- gdSub.onData((streamData) => {
107
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
108
- const data = streamData.data as { action: string; payload: any };
109
-
110
- // important to decode without exception, because we do not want to throw an exception here
111
- const requestedArgumentsResult = streamRequestArgumentsDecoder.run(streamData.requestArguments);
112
- const actionResult = workspaceEventActionDecoder.run(data.action);
113
-
114
- if (!requestedArgumentsResult.ok || !actionResult.ok) {
115
- return;
116
- }
117
-
118
- const streamType = requestedArgumentsResult.result.type;
119
- const branch = requestedArgumentsResult.result.branch;
120
-
121
- const keyToExecute = `${streamType}-${branch}-${actionResult.result}`;
122
- const validatedPayload = STREAMS[streamType].payloadDecoder.run(data.payload);
123
- if (!validatedPayload.ok) {
124
- return;
125
- }
126
-
127
- this.registry.execute(keyToExecute, validatedPayload.result);
128
- });
129
-
130
- activeSub = {
131
- streamType: config.eventType,
132
- level: config.scope,
133
- levelId: config.scopeId,
134
- callbacksCount: 0,
135
- gdSub
136
- };
137
-
138
- this.activeSubscriptions.push(activeSub);
139
-
140
- pendingPromise.resolve();
141
- } catch (error) {
142
- pendingPromise.reject(error);
143
-
144
- throw error;
145
- } finally {
146
- this.removePendingSubscription(pendingSubscription);
147
- }
148
-
149
- }
150
-
151
- const unsubscribe = this.registry.add(registryKey, config.callback);
152
-
153
- ++activeSub.callbacksCount;
154
-
155
- return (): void => {
156
- unsubscribe();
157
- --activeSub.callbacksCount;
158
-
159
- if (activeSub.callbacksCount === 0) {
160
- activeSub.gdSub.close();
161
- this.activeSubscriptions.splice(this.activeSubscriptions.indexOf(activeSub), 1);
162
- }
163
- };
164
- }
165
-
166
- public onOperation(callback: (operation: ClientOperations, caller: Instance) => void) {
167
-
168
- const wrappedCallback = (payload: ClientOperations, caller: Instance) => {
169
- const operationName = payload.operation;
170
- const operationArgs = payload.data;
171
- const operationDefinition = Object.values(CLIENT_OPERATIONS).find((operation) => operation.name === operationName);
172
-
173
- if (!operationDefinition) {
174
- throw new Error(`Cannot find definition for operation name: ${operationName}`);
175
- }
176
-
177
- if (operationDefinition.argsDecoder) {
178
- try {
179
- operationDefinition.argsDecoder.runWithException(operationArgs);
180
- } catch (error) {
181
- throw new Error(`Unexpected internal outgoing validation error: ${error.message}, for input: ${JSON.stringify(error.input)}, for operation ${operationName}`);
182
- }
183
- }
184
-
185
- callback(payload, caller);
186
- };
187
-
188
- return this.transport.onInternalMethodInvoked("control", wrappedCallback);
189
- }
190
-
191
- private checkScopeMatch(scope: { type: WorkspaceEventScope; id?: string }, receivedIds: { frame: string; workspace: string; container: string; window: string }): boolean {
192
-
193
- if (scope.type === "global") {
194
- return true;
195
- }
196
-
197
- if (scope.type === "frame" && scope.id === receivedIds.frame) {
198
- return true;
199
- }
200
-
201
- if (scope.type === "workspace" && scope.id === receivedIds.workspace) {
202
- return true;
203
- }
204
-
205
- if (scope.type === "container" && scope.id === receivedIds.container) {
206
- return true;
207
- }
208
-
209
- if (scope.type === "window" && scope.id === receivedIds.window) {
210
- return true;
211
- }
212
-
213
- return false;
214
- }
215
-
216
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
217
- private handleCoreEvent(args: any): void {
218
- const data = args.data;
219
- try {
220
- const verifiedAction: WorkspaceEventAction = workspaceEventActionDecoder.runWithException(data.action);
221
- const verifiedType: WorkspaceEventType = eventTypeDecoder.runWithException(data.type);
222
- const verifiedPayload: WorkspacePayload = STREAMS[verifiedType].payloadDecoder.runWithException(data.payload);
223
-
224
- const registryKey = `${verifiedType}-${verifiedAction}`;
225
-
226
- this.registry.execute(registryKey, verifiedPayload);
227
- } catch (error) {
228
- console.warn(`Cannot handle event with data ${JSON.stringify(data)}, because of validation error: ${error.message}`);
229
- }
230
- }
231
-
232
- private getBranchKey(config: SubscriptionConfig): string {
233
- return config.scope === "global" ? config.scope : `${config.scope}_${config.scopeId}`;
234
- }
235
-
236
- private getRegistryKey(config: SubscriptionConfig): string {
237
- return `${config.eventType}-${this.getBranchKey(config)}-${config.action}`;
238
- }
239
-
240
- private getActiveSubscription(config: SubscriptionConfig): ActiveSubscription {
241
- return this.activeSubscriptions
242
- .find((activeSub) => activeSub.streamType === config.eventType &&
243
- activeSub.level === config.scope &&
244
- activeSub.levelId === config.scopeId
245
- );
246
- }
247
-
248
- private getPendingSubscription(config: SubscriptionConfig): PendingSubscription {
249
- return this.pendingSubScriptions
250
- .find((activeSub) => activeSub.streamType === config.eventType &&
251
- activeSub.level === config.scope &&
252
- activeSub.levelId === config.scopeId
253
- );
254
- }
255
-
256
- private removePendingSubscription(pendingSubscription: PendingSubscription): void {
257
- const index = this.pendingSubScriptions.indexOf(pendingSubscription);
258
-
259
- if (index >= 0) {
260
- this.pendingSubScriptions.splice(index, 1);
261
- }
262
- }
263
- }
@@ -1,202 +0,0 @@
1
- import {
2
- isWindowInSwimlaneResultDecoder,
3
- frameSummaryDecoder,
4
- workspaceSnapshotResultDecoder,
5
- frameSummariesResultDecoder,
6
- workspaceCreateConfigDecoder,
7
- getFrameSummaryConfigDecoder,
8
- layoutSummariesDecoder,
9
- openWorkspaceConfigDecoder,
10
- workspaceSummariesResultDecoder,
11
- voidResultDecoder,
12
- exportedLayoutsResultDecoder,
13
- workspaceLayoutDecoder,
14
- deleteLayoutConfigDecoder,
15
- simpleItemConfigDecoder,
16
- resizeItemConfigDecoder,
17
- moveFrameConfigDecoder,
18
- frameSnapshotResultDecoder,
19
- simpleWindowOperationSuccessResultDecoder,
20
- setItemTitleConfigDecoder,
21
- moveWindowConfigDecoder,
22
- addWindowConfigDecoder,
23
- addContainerConfigDecoder,
24
- addItemResultDecoder,
25
- bundleWorkspaceConfigDecoder,
26
- workspaceStreamDataDecoder,
27
- frameStreamDataDecoder,
28
- containerStreamDataDecoder,
29
- windowStreamDataDecoder,
30
- workspaceLayoutSaveConfigDecoder,
31
- pingResultDecoder,
32
- frameStateConfigDecoder,
33
- frameStateResultDecoder,
34
- workspacesImportLayoutDecoder,
35
- workspaceSelectorDecoder,
36
- lockWorkspaceDecoder,
37
- lockWindowDecoder,
38
- lockContainerDecoder,
39
- frameBoundsResultDecoder,
40
- getWorkspaceIconResultDecoder,
41
- pinWorkspaceDecoder,
42
- setWorkspaceIconDecoder,
43
- frameSummaryResultDecoder,
44
- emptyFrameDefinitionDecoder,
45
- frameInitProtocolConfigDecoder,
46
- shortcutClickedDataDecoder,
47
- shortcutConfigDecoder,
48
- frameSnapshotConfigDecoder,
49
- setMaximizationBoundaryConfigDecoder,
50
- loadingAnimationConfigDecoder,
51
- getPlatformFrameIdResultDecoder,
52
- workspacesImportLayoutsDecoder,
53
- bundleItemConfigDecoder,
54
- operationCheckConfigDecoder,
55
- operationCheckResultDecoder
56
- } from "../shared/decoders";
57
- import { ControlOperation, StreamOperation } from "../types/protocol";
58
- import { WorkspaceEventType } from "../types/subscription";
59
-
60
- type OperationsTypes = "isWindowInWorkspace" |
61
- "createWorkspace" |
62
- "getAllFramesSummaries" |
63
- "getFrameSummary" |
64
- "getAllWorkspacesSummaries" |
65
- "getWorkspaceSnapshot" |
66
- "getAllLayoutsSummaries" |
67
- "openWorkspace" |
68
- "deleteLayout" |
69
- "saveLayout" |
70
- "importLayout" |
71
- "importLayouts" |
72
- "exportAllLayouts" |
73
- "restoreItem" |
74
- "maximizeItem" |
75
- "focusItem" |
76
- "closeItem" |
77
- "resizeItem" |
78
- "setMaximizationBoundary" |
79
- "moveFrame" |
80
- "getFrameSnapshot" |
81
- "forceLoadWindow" |
82
- "ejectWindow" |
83
- "setItemTitle" |
84
- "moveWindowTo" |
85
- "addWindow" |
86
- "addContainer" |
87
- "bundleWorkspace" |
88
- "bundleItem" |
89
- "ping" |
90
- "changeFrameState" |
91
- "getFrameState" |
92
- "getFrameBounds" |
93
- "hibernateWorkspace" |
94
- "resumeWorkspace" |
95
- "lockWorkspace" |
96
- "lockWindow" |
97
- "lockContainer" |
98
- "pinWorkspace" |
99
- "unpinWorkspace" |
100
- "getWorkspaceIcon" |
101
- "setWorkspaceIcon" |
102
- "createFrame" |
103
- "registerShortcut" |
104
- "unregisterShortcut" |
105
- "initFrame" |
106
- "showLoadingAnimation" |
107
- "hideLoadingAnimation" |
108
- "getPlatformFrameId" |
109
- "operationCheck";
110
- type OutgoingMethodTypes = "control" | "frameStream" | "workspaceStream" | "containerStream" | "windowStream";
111
- export type IncomingMethodTypes = "control";
112
-
113
- export const webPlatformMethodName = "T42.Web.Platform.Control";
114
- export const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
115
-
116
- export const OUTGOING_METHODS: { [key in OutgoingMethodTypes]: { name: string; isStream: boolean } } = {
117
- control: { name: "T42.Workspaces.Control", isStream: false },
118
- frameStream: { name: "T42.Workspaces.Stream.Frame", isStream: true },
119
- workspaceStream: { name: "T42.Workspaces.Stream.Workspace", isStream: true },
120
- containerStream: { name: "T42.Workspaces.Stream.Container", isStream: true },
121
- windowStream: { name: "T42.Workspaces.Stream.Window", isStream: true }
122
- };
123
-
124
- export const INCOMING_METHODS: { [key in IncomingMethodTypes]: { name: string; isStream: boolean } } = {
125
- control: { name: "T42.Workspaces.Client.Control", isStream: false },
126
- };
127
-
128
- export const STREAMS: { [key in WorkspaceEventType]: StreamOperation } = {
129
- frame: { name: "T42.Workspaces.Stream.Frame", payloadDecoder: frameStreamDataDecoder },
130
- workspace: { name: "T42.Workspaces.Stream.Workspace", payloadDecoder: workspaceStreamDataDecoder },
131
- container: { name: "T42.Workspaces.Stream.Container", payloadDecoder: containerStreamDataDecoder },
132
- window: { name: "T42.Workspaces.Stream.Window", payloadDecoder: windowStreamDataDecoder }
133
- };
134
-
135
- interface ShortcutClicked {
136
- operation: "shortcutClicked",
137
- data: {
138
- shortcut: string;
139
- frameId: string;
140
- }
141
- }
142
-
143
- export type ClientOperations = ShortcutClicked;
144
-
145
- export type OnOperationsTypes = "shortcutClicked";
146
-
147
- export const CLIENT_OPERATIONS: { [key in OnOperationsTypes]: ControlOperation } = {
148
- shortcutClicked: { name: "shortcutClicked", argsDecoder: shortcutClickedDataDecoder, resultDecoder: voidResultDecoder },
149
- };
150
-
151
- export const OPERATIONS: { [key in OperationsTypes]: ControlOperation } = {
152
- ping: { name: "ping", resultDecoder: pingResultDecoder },
153
- isWindowInWorkspace: { name: "isWindowInWorkspace", argsDecoder: simpleItemConfigDecoder, resultDecoder: isWindowInSwimlaneResultDecoder },
154
- createWorkspace: { name: "createWorkspace", resultDecoder: workspaceSnapshotResultDecoder, argsDecoder: workspaceCreateConfigDecoder },
155
- createFrame: { name: "createFrame", resultDecoder: frameSummaryResultDecoder, argsDecoder: emptyFrameDefinitionDecoder },
156
- initFrame: { name: "initFrame", resultDecoder: voidResultDecoder, argsDecoder: frameInitProtocolConfigDecoder },
157
- getAllFramesSummaries: { name: "getAllFramesSummaries", resultDecoder: frameSummariesResultDecoder },
158
- getFrameSummary: { name: "getFrameSummary", resultDecoder: frameSummaryDecoder, argsDecoder: getFrameSummaryConfigDecoder },
159
- getAllWorkspacesSummaries: { name: "getAllWorkspacesSummaries", resultDecoder: workspaceSummariesResultDecoder },
160
- getWorkspaceSnapshot: { name: "getWorkspaceSnapshot", resultDecoder: workspaceSnapshotResultDecoder, argsDecoder: simpleItemConfigDecoder },
161
- getAllLayoutsSummaries: { name: "getAllLayoutsSummaries", resultDecoder: layoutSummariesDecoder },
162
- openWorkspace: { name: "openWorkspace", argsDecoder: openWorkspaceConfigDecoder, resultDecoder: workspaceSnapshotResultDecoder },
163
- deleteLayout: { name: "deleteLayout", resultDecoder: voidResultDecoder, argsDecoder: deleteLayoutConfigDecoder },
164
- saveLayout: { name: "saveLayout", resultDecoder: workspaceLayoutDecoder, argsDecoder: workspaceLayoutSaveConfigDecoder },
165
- importLayout: { name: "importLayout", resultDecoder: voidResultDecoder, argsDecoder: workspacesImportLayoutDecoder },
166
- importLayouts: { name: "importLayouts", resultDecoder: voidResultDecoder, argsDecoder: workspacesImportLayoutsDecoder },
167
- exportAllLayouts: { name: "exportAllLayouts", resultDecoder: exportedLayoutsResultDecoder },
168
- restoreItem: { name: "restoreItem", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
169
- maximizeItem: { name: "maximizeItem", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
170
- focusItem: { name: "focusItem", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
171
- closeItem: { name: "closeItem", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
172
- resizeItem: { name: "resizeItem", argsDecoder: resizeItemConfigDecoder, resultDecoder: voidResultDecoder },
173
- setMaximizationBoundary: { name: "setMaximizationBoundary", argsDecoder: setMaximizationBoundaryConfigDecoder, resultDecoder: voidResultDecoder },
174
- changeFrameState: { name: "changeFrameState", argsDecoder: frameStateConfigDecoder, resultDecoder: voidResultDecoder },
175
- getFrameState: { name: "getFrameState", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameStateResultDecoder },
176
- getFrameBounds: { name: "getFrameBounds", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameBoundsResultDecoder },
177
- moveFrame: { name: "moveFrame", argsDecoder: moveFrameConfigDecoder, resultDecoder: voidResultDecoder },
178
- getFrameSnapshot: { name: "getFrameSnapshot", argsDecoder: frameSnapshotConfigDecoder, resultDecoder: frameSnapshotResultDecoder },
179
- forceLoadWindow: { name: "forceLoadWindow", argsDecoder: simpleItemConfigDecoder, resultDecoder: simpleWindowOperationSuccessResultDecoder },
180
- ejectWindow: { name: "ejectWindow", argsDecoder: simpleItemConfigDecoder, resultDecoder: simpleWindowOperationSuccessResultDecoder },
181
- setItemTitle: { name: "setItemTitle", argsDecoder: setItemTitleConfigDecoder, resultDecoder: voidResultDecoder },
182
- moveWindowTo: { name: "moveWindowTo", argsDecoder: moveWindowConfigDecoder, resultDecoder: voidResultDecoder },
183
- addWindow: { name: "addWindow", argsDecoder: addWindowConfigDecoder, resultDecoder: addItemResultDecoder },
184
- addContainer: { name: "addContainer", argsDecoder: addContainerConfigDecoder, resultDecoder: addItemResultDecoder },
185
- bundleWorkspace: { name: "bundleWorkspace", argsDecoder: bundleWorkspaceConfigDecoder, resultDecoder: voidResultDecoder },
186
- bundleItem: { name: "bundleItem", argsDecoder: bundleItemConfigDecoder, resultDecoder: voidResultDecoder },
187
- hibernateWorkspace: { name: "hibernateWorkspace", argsDecoder: workspaceSelectorDecoder, resultDecoder: voidResultDecoder },
188
- resumeWorkspace: { name: "resumeWorkspace", argsDecoder: workspaceSelectorDecoder, resultDecoder: voidResultDecoder },
189
- lockWorkspace: { name: "lockWorkspace", argsDecoder: lockWorkspaceDecoder, resultDecoder: voidResultDecoder },
190
- lockWindow: { name: "lockWindow", argsDecoder: lockWindowDecoder, resultDecoder: voidResultDecoder },
191
- lockContainer: { name: "lockContainer", argsDecoder: lockContainerDecoder, resultDecoder: voidResultDecoder },
192
- pinWorkspace: { name: "pinWorkspace", argsDecoder: pinWorkspaceDecoder, resultDecoder: voidResultDecoder },
193
- unpinWorkspace: { name: "unpinWorkspace", argsDecoder: workspaceSelectorDecoder, resultDecoder: voidResultDecoder },
194
- getWorkspaceIcon: { name: "getWorkspaceIcon", argsDecoder: workspaceSelectorDecoder, resultDecoder: getWorkspaceIconResultDecoder },
195
- setWorkspaceIcon: { name: "setWorkspaceIcon", argsDecoder: setWorkspaceIconDecoder, resultDecoder: voidResultDecoder },
196
- registerShortcut: { name: "registerShortcut", argsDecoder: shortcutConfigDecoder, resultDecoder: voidResultDecoder },
197
- unregisterShortcut: { name: "unregisterShortcut", argsDecoder: shortcutConfigDecoder, resultDecoder: voidResultDecoder },
198
- showLoadingAnimation: { name: "showLoadingAnimation", argsDecoder: loadingAnimationConfigDecoder, resultDecoder: voidResultDecoder },
199
- hideLoadingAnimation: { name: "hideLoadingAnimation", argsDecoder: loadingAnimationConfigDecoder, resultDecoder: voidResultDecoder },
200
- getPlatformFrameId: { name: "getPlatformFrameId", resultDecoder: getPlatformFrameIdResultDecoder },
201
- operationCheck: { name: "operationCheck", argsDecoder: operationCheckConfigDecoder, resultDecoder: operationCheckResultDecoder },
202
- };