MCPcopy Create free account
hub / github.com/apitable/apitable / cmdExecute

Function cmdExecute

packages/widget-sdk/src/message/utils.ts:18–30  ·  view source on GitHub ↗
(cmdOptions: ICollaCommandOptions, widgetId?: string)

Source from the content-addressed store, hash-verified

16};
17
18export const cmdExecute = (cmdOptions: ICollaCommandOptions, widgetId?: string): Promise<ICollaCommandExecuteResult<any>> => {
19 if (isSandbox()) {
20 return widgetMessage.syncCmd(cmdOptions);
21 }
22 if (!widgetId) {
23 return new Promise((resolve) => resolve({
24 result: ExecuteResult.None,
25 resourceId: '',
26 resourceType: ResourceType.Widget
27 }));
28 }
29 return eventMessage.syncCmd(cmdOptions, widgetId!);
30};
31
32/**
33 * Receiving Message Interceptor.

Callers 8

setMethod · 0.90
updateDescriptionMethod · 0.90
updatePropertyMethod · 0.90
addRecordsMethod · 0.90
setRecordsMethod · 0.90
deleteRecordsMethod · 0.90
addFieldMethod · 0.90
deleteFieldMethod · 0.90

Calls 2

isSandboxFunction · 0.90
syncCmdMethod · 0.45

Tested by

no test coverage detected