@antcde/connect-ts 0.4.18-rc.00a441c → 0.4.18-rc.1d0df62
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/build/comms/client.d.ts +10 -12
- package/build/comms/client.d.ts.map +1 -1
- package/build/comms/client.js +72 -157
- package/build/comms/compat.d.ts +18 -0
- package/build/comms/compat.d.ts.map +1 -0
- package/build/comms/compat.js +80 -0
- package/build/comms/host.d.ts +5 -18
- package/build/comms/host.d.ts.map +1 -1
- package/build/comms/host.js +88 -161
- package/build/comms/hostAPI.d.ts +49 -0
- package/build/comms/hostAPI.d.ts.map +1 -0
- package/build/comms/hostAPI.js +56 -0
- package/build/comms/models.d.ts +4 -0
- package/build/comms/models.d.ts.map +1 -1
- package/build/comms/python-schema.d.ts +4 -0
- package/build/comms/python-schema.d.ts.map +1 -0
- package/build/comms/python-schema.js +4 -0
- package/build/comms/signal.d.ts +5 -321
- package/build/comms/signal.d.ts.map +1 -1
- package/build/comms/signal.js +5 -9
- package/build/comms/signalChangeTypes.d.ts +47 -0
- package/build/comms/signalChangeTypes.d.ts.map +1 -0
- package/build/comms/signalChangeTypes.js +1 -0
- package/build/comms/signalTypes.d.ts +262 -0
- package/build/comms/signalTypes.d.ts.map +1 -0
- package/build/comms/signalTypes.js +6 -0
- package/build/comms/transport.d.ts +16 -0
- package/build/comms/transport.d.ts.map +1 -0
- package/build/comms/transport.js +51 -0
- package/build/comms/utils.d.ts +4 -36
- package/build/comms/utils.d.ts.map +1 -1
- package/build/comms/utils.js +6 -79
- package/build/index.d.ts +4 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -1
- package/build/services/AppManifest.d.ts +39 -0
- package/build/services/AppManifest.d.ts.map +1 -0
- package/build/services/AppManifest.js +1 -0
- package/build/services/AppService.d.ts +4 -230
- package/build/services/AppService.d.ts.map +1 -1
- package/build/services/AppService.js +1 -2
- package/build/services/AppService.types.d.ts +173 -0
- package/build/services/AppService.types.d.ts.map +1 -0
- package/build/services/AppService.types.js +1 -0
- package/build/services/ProjectService.d.ts +24 -1
- package/build/services/ProjectService.d.ts.map +1 -1
- package/build/services/RBAC/PermissionService.d.ts +2 -2
- package/build/services/RBAC/PermissionService.d.ts.map +1 -1
- package/build/services/ResourceTypeService.d.ts +5 -6
- package/build/services/ResourceTypeService.d.ts.map +1 -1
- package/build/services/ResourceTypeService.js +0 -2
- package/build/services/TaskService.types.d.ts +3 -1
- package/build/services/TaskService.types.d.ts.map +1 -1
- package/build/services/TaskServiceQueries.d.ts.map +1 -1
- package/build/services/TaskServiceQueries.js +1 -0
- package/build/utils.d.ts +2 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +6 -0
- package/package.json +11 -7
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import type { ChangeSignal, DmsFileBatchSignal } from './signalChangeTypes';
|
|
2
|
+
import type { DmsFile } from "../services/DmsService";
|
|
3
|
+
import type { ImportProgressEvent } from "../services/RecordService";
|
|
4
|
+
import type { Task, TaskAppendix } from "../services/TaskService";
|
|
5
|
+
import type { JobProgressEvent, LimitChangeEvent } from "../types";
|
|
6
|
+
export type TaskLike = Pick<Task, 'id'>;
|
|
7
|
+
export interface DmsGallery {
|
|
8
|
+
files: DmsFile[];
|
|
9
|
+
index?: number;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
licenseId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RecordDocument {
|
|
14
|
+
tableId: string;
|
|
15
|
+
recordId: string;
|
|
16
|
+
documentId: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
}
|
|
19
|
+
export type ShowOverlay = boolean | TaskAppendix[] | TaskLike | null | undefined | DmsGallery | RecordDocument;
|
|
20
|
+
export interface RouteSignal {
|
|
21
|
+
query?: Record<string, string | null | (string | null)[]>;
|
|
22
|
+
path?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function isDmsGallery(value: any): value is DmsGallery;
|
|
25
|
+
export declare function isRecordDocument(value: any): value is RecordDocument;
|
|
26
|
+
export interface NavigateToApp {
|
|
27
|
+
app: {
|
|
28
|
+
title?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
favorite?: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface Navigate {
|
|
34
|
+
/**
|
|
35
|
+
* If it is one of the literals, it will try to navigate to that screen
|
|
36
|
+
* DEPRECATED If it is a string; it will assume a like-search for apps, so it will try to navigate to the first app it can find
|
|
37
|
+
* DEPRECATED Otherwise it will try to navigate to a favorite.
|
|
38
|
+
* Otherwise, it will look for an app with a specific ID, an app with a title (like & case-insensitive search), or a favorite index
|
|
39
|
+
*/
|
|
40
|
+
to: 'OS.dash' | 'OS.login' | 'OS.profile' | string | {
|
|
41
|
+
favorite: number;
|
|
42
|
+
} | NavigateToApp;
|
|
43
|
+
method?: 'push' | 'replace';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This is the core message that can be sent and received by host and client. It made to be is simple to add your own ones.
|
|
47
|
+
*
|
|
48
|
+
* The nested object looks quirky, but makes it simple on the receiving and to filter out the right message
|
|
49
|
+
*
|
|
50
|
+
* ```
|
|
51
|
+
* host.receive.subscribe((s) => s.task && doSomething(s.taks.id)) // task prop is check to be defined, so all set!
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export interface Signal extends ChangeSignal {
|
|
55
|
+
route?: RouteSignal;
|
|
56
|
+
overlay?: {
|
|
57
|
+
action: ShowOverlay;
|
|
58
|
+
};
|
|
59
|
+
navigate?: Navigate;
|
|
60
|
+
select?: {
|
|
61
|
+
project?: string | null;
|
|
62
|
+
task?: string | null;
|
|
63
|
+
sbs?: string | null;
|
|
64
|
+
};
|
|
65
|
+
notepad?: {
|
|
66
|
+
action: boolean | 'toggle';
|
|
67
|
+
};
|
|
68
|
+
immersive?: {
|
|
69
|
+
mode: boolean | 'toggle';
|
|
70
|
+
};
|
|
71
|
+
notifications?: {
|
|
72
|
+
action: boolean | 'toggle';
|
|
73
|
+
};
|
|
74
|
+
hotkeys?: {
|
|
75
|
+
ctrl?: true;
|
|
76
|
+
shift?: true;
|
|
77
|
+
};
|
|
78
|
+
ping?: true;
|
|
79
|
+
pong?: true;
|
|
80
|
+
dmsFileBatch?: DmsFileBatchSignal;
|
|
81
|
+
observe?: {
|
|
82
|
+
random: string;
|
|
83
|
+
type: keyof ChangeSignal | (string & {});
|
|
84
|
+
id?: string;
|
|
85
|
+
actions?: import('./signalChangeTypes').Change[];
|
|
86
|
+
scope?: ('project' | 'license')[];
|
|
87
|
+
};
|
|
88
|
+
unobserve?: {
|
|
89
|
+
random: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Import progress events relayed from WebSocket
|
|
93
|
+
* Sent by ant-os when async import progress is received
|
|
94
|
+
*/
|
|
95
|
+
importProgress?: ImportProgressEvent;
|
|
96
|
+
/**
|
|
97
|
+
* Generic job progress events relayed from WebSocket
|
|
98
|
+
* Sent by ant-os when async job progress is received (generation, export, validation, etc.)
|
|
99
|
+
*/
|
|
100
|
+
jobProgress?: JobProgressEvent;
|
|
101
|
+
/**
|
|
102
|
+
* Resource limit change events relayed from WebSocket
|
|
103
|
+
* Sent by ant-os when resource limits change (record created/deleted, project created, etc.)
|
|
104
|
+
*/
|
|
105
|
+
limitChange?: LimitChangeEvent;
|
|
106
|
+
/**
|
|
107
|
+
* Request ant-os to subscribe to an Echo channel on behalf of the app.
|
|
108
|
+
* Events received on the channel will be relayed back via signals.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* // Subscribe to table limit changes
|
|
113
|
+
* host.signal({
|
|
114
|
+
* subscribeChannel: {
|
|
115
|
+
* channel: `App.Table.${tableId}.Limits`,
|
|
116
|
+
* events: ['limit.change']
|
|
117
|
+
* }
|
|
118
|
+
* })
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
subscribeChannel?: {
|
|
122
|
+
/** The Echo channel name (e.g., "App.Table.{id}.Limits") */
|
|
123
|
+
channel: string;
|
|
124
|
+
/** Event names to listen for on this channel */
|
|
125
|
+
events: string[];
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Request ant-os to unsubscribe from an Echo channel.
|
|
129
|
+
*/
|
|
130
|
+
unsubscribeChannel?: {
|
|
131
|
+
/** The Echo channel name to unsubscribe from */
|
|
132
|
+
channel: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Arbitrary entity change signals for app-defined resource types.
|
|
136
|
+
* Observed via `signal.with('homeowner', id, actions, scope)`.
|
|
137
|
+
* Echo-backed through a generic `App.Project.{id}.Resources` channel.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```typescript
|
|
141
|
+
* signal.send({ resource: { homeowner: { id: '123', action: 'updated' } } })
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
resource?: Record<string, import('./signalChangeTypes').Cause>;
|
|
145
|
+
/**
|
|
146
|
+
* Generic topic pub/sub via Echo whisper (client events).
|
|
147
|
+
* Sends a message to all other subscribers on the same topic — sender excluded.
|
|
148
|
+
* Topic name must match [a-zA-Z0-9_-] (no dots).
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* // Publish to a project-scoped topic
|
|
153
|
+
* signal.send({ topic: { name: 'cursor-positions', data: { x: 100, y: 200 } } })
|
|
154
|
+
*
|
|
155
|
+
* // Publish to a license-scoped topic
|
|
156
|
+
* signal.send({ topic: { name: 'sync-status', data: { ready: true }, scope: 'license' } })
|
|
157
|
+
*
|
|
158
|
+
* // Receive topic events (manual filtering)
|
|
159
|
+
* signal.receive((s) => {
|
|
160
|
+
* if (s.topic?.name === 'cursor-positions') handleCursor(s.topic.data)
|
|
161
|
+
* })
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
topic?: {
|
|
165
|
+
name: string;
|
|
166
|
+
data?: any;
|
|
167
|
+
scope?: 'project' | 'license';
|
|
168
|
+
/**
|
|
169
|
+
* OS-only loop-break marker — prevents re-entry when redistributing topics to local hosts. Never set by user code.
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
172
|
+
_loopBreakId?: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Request ant-os to open an app in split-screen mode alongside the current app.
|
|
176
|
+
* The current app stays in pane 0; the requested app opens in pane 1 by default.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* // Open app by ID in a vertical (side-by-side) split
|
|
181
|
+
* signal.send({ openSplit: { app: { id: 'some-app-id' } } })
|
|
182
|
+
*
|
|
183
|
+
* // Open app by title in a horizontal (stacked) split on the left pane
|
|
184
|
+
* signal.send({ openSplit: { app: { title: 'My App' }, layout: 'h', pane: 0 } })
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
openSplit?: {
|
|
188
|
+
/** App to open in the split pane — resolve by id or title (case-insensitive) */
|
|
189
|
+
app: {
|
|
190
|
+
id?: string;
|
|
191
|
+
title?: string;
|
|
192
|
+
};
|
|
193
|
+
/** Which pane: 0 = left/top, 1 = right/bottom. Defaults to 1. */
|
|
194
|
+
pane?: 0 | 1;
|
|
195
|
+
/** Split direction: 'v' = side-by-side (default), 'h' = stacked */
|
|
196
|
+
layout?: 'h' | 'v';
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Request ant-os to open a flow/workflow in a floating window.
|
|
200
|
+
* Can be sent from any app via signals to show a task's flow editor.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* signal.send({ openFlow: { taskId: 'some-task-id', title: 'My Workflow' } })
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
openFlow?: {
|
|
208
|
+
/** The root task ID to open in the flow editor */
|
|
209
|
+
taskId: string;
|
|
210
|
+
/** Optional window title (falls back to task title) */
|
|
211
|
+
title?: string;
|
|
212
|
+
/** Open in read-only mode (locks all editing) */
|
|
213
|
+
readonly?: boolean;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Request ant-os to close a flow window.
|
|
217
|
+
*/
|
|
218
|
+
closeFlow?: {
|
|
219
|
+
taskId: string;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Request ant-os to open a DMS file preview in a floating window.
|
|
223
|
+
* Supports images and PDFs — unsupported types trigger a download instead.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* signal.send({ openFilePreview: { fileId: 'dms-file-id', fileName: 'photo.jpg' } })
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
openFilePreview?: {
|
|
231
|
+
/** DMS file token to preview (used to resolve download URL) */
|
|
232
|
+
fileToken: string;
|
|
233
|
+
/** Display name for the window title */
|
|
234
|
+
fileName?: string;
|
|
235
|
+
/** Project scope for download URL resolution */
|
|
236
|
+
projectId?: string;
|
|
237
|
+
/** License scope for download URL resolution (used when projectId is absent) */
|
|
238
|
+
licenseId?: string;
|
|
239
|
+
/** Pre-resolved content URL (blob or data URL). Skips DMS download when provided. */
|
|
240
|
+
contentUrl?: string;
|
|
241
|
+
/** File size in bytes (for details sidebar) */
|
|
242
|
+
fileSize?: number;
|
|
243
|
+
/** File extension without dot (for details sidebar icon) */
|
|
244
|
+
fileExtension?: string;
|
|
245
|
+
/** Owner display name */
|
|
246
|
+
ownerName?: string;
|
|
247
|
+
/** Owner avatar URL */
|
|
248
|
+
ownerAvatar?: string;
|
|
249
|
+
/** ISO date string — file creation date */
|
|
250
|
+
createdAt?: string;
|
|
251
|
+
/** ISO date string — last modified date */
|
|
252
|
+
updatedAt?: string;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Request ant-os to close a file preview window.
|
|
256
|
+
*/
|
|
257
|
+
closeFilePreview?: {
|
|
258
|
+
fileToken: string;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|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 +1,6 @@
|
|
|
1
|
+
export function isDmsGallery(value) {
|
|
2
|
+
return typeof value === 'object' && value !== null && !!value.files && Array.isArray(value.files);
|
|
3
|
+
}
|
|
4
|
+
export function isRecordDocument(value) {
|
|
5
|
+
return typeof value === 'object' && value !== null && !!value.tableId && !!value.recordId && !!value.documentId;
|
|
6
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Context } from './models';
|
|
2
|
+
export declare const COMLINK_INIT = "ant-comms-init";
|
|
3
|
+
export declare const COMLINK_READY = "ant-comms-ready";
|
|
4
|
+
export declare function transferPort(target: Window, initData: {
|
|
5
|
+
clientId: string;
|
|
6
|
+
context: Context;
|
|
7
|
+
}): MessagePort;
|
|
8
|
+
export declare function receivePort(): Promise<{
|
|
9
|
+
port: MessagePort;
|
|
10
|
+
clientId: string;
|
|
11
|
+
context: Context;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function requestPort(target: Window): void;
|
|
14
|
+
export declare function onPortRequest(expectedSource: Window | null, cb: (source: Window) => void): () => void;
|
|
15
|
+
export declare function createPortRelay(childWindow: Window): () => void;
|
|
16
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/comms/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,eAAO,MAAM,YAAY,mBAAmB,CAAA;AAC5C,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAE9C,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,WAAW,CAI1G;AAED,wBAAgB,WAAW,IAAI,OAAO,CAAC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAUhG;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,QAEzC;AAED,wBAAgB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAUrG;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,IAAI,CAiB/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { clone } from './utils';
|
|
2
|
+
export const COMLINK_INIT = 'ant-comms-init';
|
|
3
|
+
export const COMLINK_READY = 'ant-comms-ready';
|
|
4
|
+
export function transferPort(target, initData) {
|
|
5
|
+
const { port1, port2 } = new MessageChannel();
|
|
6
|
+
target.postMessage({ type: COMLINK_INIT, clientId: initData.clientId, context: clone(initData.context) }, '*', [port2]);
|
|
7
|
+
return port1;
|
|
8
|
+
}
|
|
9
|
+
export function receivePort() {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
const handler = (event) => {
|
|
12
|
+
if (event.data?.type !== COMLINK_INIT || !event.ports[0])
|
|
13
|
+
return;
|
|
14
|
+
globalThis.removeEventListener('message', handler);
|
|
15
|
+
resolve({ port: event.ports[0], clientId: event.data.clientId, context: event.data.context });
|
|
16
|
+
};
|
|
17
|
+
globalThis.addEventListener('message', handler);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export function requestPort(target) {
|
|
21
|
+
target.postMessage({ type: COMLINK_READY }, '*');
|
|
22
|
+
}
|
|
23
|
+
export function onPortRequest(expectedSource, cb) {
|
|
24
|
+
const handler = (event) => {
|
|
25
|
+
if (event.data?.type !== COMLINK_READY || !event.source)
|
|
26
|
+
return;
|
|
27
|
+
if (expectedSource && event.source !== expectedSource)
|
|
28
|
+
return;
|
|
29
|
+
cb(event.source);
|
|
30
|
+
};
|
|
31
|
+
globalThis.addEventListener('message', handler);
|
|
32
|
+
return () => globalThis.removeEventListener('message', handler);
|
|
33
|
+
}
|
|
34
|
+
export function createPortRelay(childWindow) {
|
|
35
|
+
const forwardInit = (event) => {
|
|
36
|
+
if (event.data?.type === COMLINK_INIT && event.ports.length > 0) {
|
|
37
|
+
childWindow.postMessage(event.data, '*', [...event.ports]);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const forwardReady = (event) => {
|
|
41
|
+
if (event.data?.type === COMLINK_READY && event.source === childWindow) {
|
|
42
|
+
globalThis.parent.postMessage(event.data, '*');
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
globalThis.addEventListener('message', forwardInit);
|
|
46
|
+
globalThis.addEventListener('message', forwardReady);
|
|
47
|
+
return () => {
|
|
48
|
+
globalThis.removeEventListener('message', forwardInit);
|
|
49
|
+
globalThis.removeEventListener('message', forwardReady);
|
|
50
|
+
};
|
|
51
|
+
}
|
package/build/comms/utils.d.ts
CHANGED
|
@@ -1,51 +1,19 @@
|
|
|
1
1
|
import type { MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
/**
|
|
4
|
-
* Ensures a stream is closed whenever the parent subscription is closed.
|
|
5
|
-
*
|
|
6
|
-
* This will make sure the stream is not sending results after a UI component is destroyed.
|
|
7
|
-
* @param subscription
|
|
8
|
-
*/
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
9
3
|
export declare function takeUntilClosed<T>(subscription: Subscription): MonoTypeOperatorFunction<T>;
|
|
10
4
|
export interface Message<T extends object = any, R = unknown> {
|
|
11
5
|
data: T;
|
|
12
6
|
origin: string;
|
|
13
|
-
source: Window;
|
|
7
|
+
source: Window | null;
|
|
14
8
|
response?: R;
|
|
15
9
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
origin: string;
|
|
19
|
-
data: T;
|
|
20
|
-
}) => Promise<R> | R;
|
|
21
|
-
export declare function newScope(parent?: Subscription): Subscription & {
|
|
22
|
-
resolve: <T>(value: PromiseLike<T> | {
|
|
23
|
-
cancel: () => void;
|
|
24
|
-
}) => Promise<T> & Subscription;
|
|
25
|
-
on: <T extends object = any, R extends object = any>(name: string, handler?: HandlerType<T, R>) => Observable<Message<T>>;
|
|
26
|
-
once: <T extends object = any, R extends object = any>(name: string, handler?: (message: Message<T>) => Promise<R>) => Observable<Message<T>>;
|
|
27
|
-
send: <T extends object = any, R extends object = any>(window: Window, name: string, data: T, options?: {
|
|
28
|
-
fireAndForget?: boolean;
|
|
29
|
-
timeout?: number;
|
|
30
|
-
}) => Observable<Message<R>>;
|
|
31
|
-
};
|
|
32
|
-
export type Scope = ReturnType<typeof newScope>;
|
|
10
|
+
export declare function newScope(parent?: Subscription): Subscription;
|
|
11
|
+
export type Scope = Subscription;
|
|
33
12
|
export declare const newId: () => string;
|
|
34
|
-
/**
|
|
35
|
-
* The toRaw and structuredClonew are failing under certain conditions, but this good old one not.
|
|
36
|
-
* @param value
|
|
37
|
-
*/
|
|
38
13
|
export declare function clone<T>(value: T): T;
|
|
39
14
|
export interface AppStateData {
|
|
40
15
|
timestamp: number;
|
|
41
16
|
state: string;
|
|
42
17
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Deletes properties of an object in place
|
|
45
|
-
* @param value The object to delete properties from
|
|
46
|
-
* @param keys Property names to keep
|
|
47
|
-
* @returns The original object with only the specified properties
|
|
48
|
-
*/
|
|
49
18
|
export declare function objectDelete<T extends object, K extends keyof T>(value?: T, ...keys: K[]): Omit<T, K>;
|
|
50
|
-
export {};
|
|
51
19
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/comms/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/comms/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAA;AACpD,OAAO,EAAW,YAAY,EAAwB,MAAM,MAAM,CAAA;AAElE,wBAAgB,eAAe,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW1F;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,OAAO;IAC1D,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,CAAA;CACb;AAED,wBAAgB,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAI5D;AAED,MAAM,MAAM,KAAK,GAAG,YAAY,CAAA;AAEhC,eAAO,MAAM,KAAK,cAAuE,CAAA;AAEzF,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAIpC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAGrG"}
|
package/build/comms/utils.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EMPTY, first, firstValueFrom, map, Observable, Subject, Subscription, takeUntil, takeWhile } from 'rxjs';
|
|
3
|
-
import { fromPromise } from 'rxjs/internal/observable/innerFrom';
|
|
4
|
-
import { isPromise } from 'rxjs/internal/util/isPromise';
|
|
5
|
-
/**
|
|
6
|
-
* Ensures a stream is closed whenever the parent subscription is closed.
|
|
7
|
-
*
|
|
8
|
-
* This will make sure the stream is not sending results after a UI component is destroyed.
|
|
9
|
-
* @param subscription
|
|
10
|
-
*/
|
|
1
|
+
import { Subject, Subscription, takeUntil, takeWhile } from 'rxjs';
|
|
11
2
|
export function takeUntilClosed(subscription) {
|
|
12
3
|
return (observable) => {
|
|
13
4
|
const subject = new Subject();
|
|
@@ -18,81 +9,17 @@ export function takeUntilClosed(subscription) {
|
|
|
18
9
|
return observable.pipe(takeUntil(subject), takeWhile(() => !subscription.closed));
|
|
19
10
|
};
|
|
20
11
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Helper function that can process all the `post-robot` functions. It will wrap the `post-robot` function in a Observable to make it cancellable.
|
|
23
|
-
*
|
|
24
|
-
* Cancelling the scope will result in all the ongoing `post-robot` functions to be cancelled.
|
|
25
|
-
*/
|
|
26
|
-
function newResolve(parent) {
|
|
27
|
-
return (value) => {
|
|
28
|
-
const subscription = new Subscription();
|
|
29
|
-
const promise = isPromise(value)
|
|
30
|
-
? firstValueFrom(fromPromise(value).pipe(takeUntilClosed(subscription)))
|
|
31
|
-
: new Promise((_, error) => {
|
|
32
|
-
subscription.add(() => {
|
|
33
|
-
value.cancel();
|
|
34
|
-
EMPTY.pipe(first()).subscribe({ error }); // send error, because it is default behavior to either a success or an error
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
parent.add(subscription);
|
|
38
|
-
return Object.assign(promise, subscription);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
12
|
export function newScope(parent) {
|
|
42
|
-
const
|
|
43
|
-
parent?.add(
|
|
44
|
-
return
|
|
45
|
-
resolve: newResolve(subscription),
|
|
46
|
-
on: (name, handler) => newObservable((subscriber) => {
|
|
47
|
-
const cancellable = on(name, async (params) => {
|
|
48
|
-
const response = await Promise.resolve().then(() => handler?.(params));
|
|
49
|
-
subscriber.next({ ...params, response });
|
|
50
|
-
return response;
|
|
51
|
-
});
|
|
52
|
-
const teardown = () => cancellable.cancel();
|
|
53
|
-
subscription.add(teardown);
|
|
54
|
-
return teardown;
|
|
55
|
-
}),
|
|
56
|
-
once: (name, handler) => newObservable((subscriber) => {
|
|
57
|
-
const promise = once(name, handler);
|
|
58
|
-
const child = fromCancellablePromise(promise)
|
|
59
|
-
.pipe(map(e => e))
|
|
60
|
-
.subscribe(subscriber);
|
|
61
|
-
subscription.add(child);
|
|
62
|
-
return child;
|
|
63
|
-
}),
|
|
64
|
-
send: (window, name, data, options) => newObservable((subscriber) => {
|
|
65
|
-
const promise = send(window, name, data, options);
|
|
66
|
-
const child = fromCancellablePromise(promise).subscribe(subscriber);
|
|
67
|
-
subscription.add(child);
|
|
68
|
-
return child;
|
|
69
|
-
}),
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function newObservable(subscribe) {
|
|
73
|
-
return new Observable(subscribe);
|
|
74
|
-
}
|
|
75
|
-
function fromCancellablePromise(promise) {
|
|
76
|
-
return newObservable((subscriber) => {
|
|
77
|
-
const child = fromPromise(promise).subscribe(subscriber);
|
|
78
|
-
child.add(() => promise.cancel?.());
|
|
79
|
-
return child;
|
|
80
|
-
});
|
|
13
|
+
const child = new Subscription();
|
|
14
|
+
parent?.add(child);
|
|
15
|
+
return child;
|
|
81
16
|
}
|
|
82
17
|
export const newId = () => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString();
|
|
83
|
-
/**
|
|
84
|
-
* The toRaw and structuredClonew are failing under certain conditions, but this good old one not.
|
|
85
|
-
* @param value
|
|
86
|
-
*/
|
|
87
18
|
export function clone(value) {
|
|
19
|
+
if (value === undefined || value === null)
|
|
20
|
+
return value;
|
|
88
21
|
return JSON.parse(JSON.stringify(value));
|
|
89
22
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Deletes properties of an object in place
|
|
92
|
-
* @param value The object to delete properties from
|
|
93
|
-
* @param keys Property names to keep
|
|
94
|
-
* @returns The original object with only the specified properties
|
|
95
|
-
*/
|
|
96
23
|
export function objectDelete(value, ...keys) {
|
|
97
24
|
value && keys.forEach(key => delete value[key]);
|
|
98
25
|
return value;
|
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export * from './AntConnect';
|
|
2
2
|
export { type AntConnect, newAntConnectChain, type PartialAntConnect } from './AntConnect';
|
|
3
3
|
export { AntHttpClient, newAntHttpClient, type NewAntHttpClientConfig } from './AntHttpClient';
|
|
4
|
-
export { type Client, newCommsClient
|
|
4
|
+
export { type Client, newCommsClient } from './comms/client';
|
|
5
5
|
export { type Host, type HostParams, newCommsHost, type SignalObserverFactory } from './comms/host';
|
|
6
6
|
export type { Context, Notepad, NotepadVisibilityTabs, Notification, Notifications, Toolbar, ToolbarItem, } from './comms/models';
|
|
7
7
|
export type { Cause, Change, ChangeSignal, DmsGallery, NavigateToApp, RecordDocument, RouteSignal, SendSignal, ShowOverlay, Signal, SignalReceiver, SignalSender, TaskLike, } from './comms/signal';
|
|
8
8
|
export { changes, changeSignalKeys, isDmsGallery, isRecordDocument } from './comms/signal';
|
|
9
|
+
export { createPortRelay } from './comms/transport';
|
|
9
10
|
export { clone, newScope, type Scope } from './comms/utils';
|
|
10
11
|
export type { App, AppCategory, AppFormData, AppManifest, AppManifestColumn, AppManifestColumnType, AppManifestSignals, AppManifestTable, AppManifestTopic, AppManifestTopicDirection, AppManifestTopicScope, AppMedia, AppMediaFormData, AppTemplate, AppVersion, AppVersionFormData, AttachVersionToAppFormData, CategorizedList, FetchAppsParams, JsonSchema, ListApp, Subscriber, UpdateAppMediaFormData, } from './services/AppService';
|
|
11
12
|
export type { Column, ColumnRequestBody, ColumnType, DuplicateColumnValuesError } from './services/ColumnService';
|
|
@@ -14,7 +15,7 @@ export type { AttachTarget, CreateLabelPayload, Label, LabelFilterParams, LabelF
|
|
|
14
15
|
export type { InviteUserData, License, LicenseLimits, LicensePermissionMap, LicenseQueryParams, LicenseUserAccess, LicenseUserProjectAccess, LicenseUserResourcePermission, LicenseUserRoleDetail, LicenseUsersResponse } from './services/LicenseService';
|
|
15
16
|
export type { NotificationEvent, NotificationFrequency, NotificationRule, NotificationTopic } from './services/Notifications/NotificationService';
|
|
16
17
|
export type { ProjectMember } from './services/ProjectService';
|
|
17
|
-
export type { FileResponse, Project, ProjectLimits, ProjectPermissionMap, ProjectQueryParams, ProjectRequestBody, ProjectShort } from './services/ProjectService';
|
|
18
|
+
export type { FileResponse, Project, ProjectLimits, ProjectPermissionMap, ProjectQueryParams, ProjectRequestBody, ProjectShort, ProjectTypeFilters, ProjectTypeFilterValue, UpdateProjectBody } from './services/ProjectService';
|
|
18
19
|
export type { ApplyPropagationTemplateBody, ApplyPropagationTemplateResponse, CreatePropagationTemplateBody, CreatePropagationTemplateItemBody, PropagationResourceType, PropagationRun, PropagationRunItem, PropagationRunItemStatus, PropagationRunStatus, PropagationService, PropagationTemplate, PropagationTemplateItem, PropagationTemplateItemPayload, PropagationTemplateItemPayloadApp, PropagationTemplateItemPayloadTable, ReorderPropagationTemplateItemsBody, UpdatePropagationTemplateBody, UpdatePropagationTemplateItemBody, } from './services/PropagationService';
|
|
19
20
|
export type { BatchPermissionData, Permission, PermissionData, PermissionGroup, PermissionGroupItem, PermissionResourceType, UserPermission, UserRoleAndPermission, } from './services/RBAC/PermissionService';
|
|
20
21
|
export type { RBACRoleService, Role, RoleData, RoleUpdate, UserRoleData } from './services/RBAC/RoleService';
|
|
@@ -42,4 +43,5 @@ export type { Trigger, TriggerableType, TriggerExecutionResult, TriggerRequestBo
|
|
|
42
43
|
export type { DmsFileAction, DmsFileBatchChangeItem, DmsFileChangedEvent, DmsFileEventData, DmsFilesBatchChangedEvent, DmsWebSocketEvent } from './services/Websockets/DmsEvents';
|
|
43
44
|
export type { Blueprint, BlueprintRequest, BlueprintResult } from './services/WorkflowService';
|
|
44
45
|
export * from './types';
|
|
46
|
+
export { randomUUID } from './utils';
|
|
45
47
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AA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EAAE,eAAe,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AACtI,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACzN,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC7G,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AAC5D,YAAY,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAC/I,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC7H,YAAY,EAAE,aAAa,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACjL,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE9F,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export * from './AntConnect';
|
|
2
2
|
export { newAntConnectChain } from './AntConnect';
|
|
3
3
|
export { AntHttpClient, newAntHttpClient } from './AntHttpClient';
|
|
4
|
-
export { newCommsClient
|
|
4
|
+
export { newCommsClient } from './comms/client';
|
|
5
5
|
export { newCommsHost } from './comms/host';
|
|
6
6
|
export { changes, changeSignalKeys, isDmsGallery, isRecordDocument } from './comms/signal';
|
|
7
|
+
export { createPortRelay } from './comms/transport';
|
|
7
8
|
export { clone, newScope } from './comms/utils';
|
|
8
9
|
export { isAsyncImport } from './services/RecordService';
|
|
9
10
|
export { taskStatuses } from './services/TaskService';
|
|
10
11
|
export { buildTaskQuery, defaultGetTaskQuery, defaultGetTasksQuery } from './services/TaskServiceQueries';
|
|
11
12
|
export * from './types';
|
|
13
|
+
export { randomUUID } from './utils';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Schema document describing a topic payload shape.
|
|
3
|
+
*/
|
|
4
|
+
export type JsonSchema = Record<string, unknown>;
|
|
5
|
+
export type AppManifestTopicScope = 'project' | 'license';
|
|
6
|
+
export type AppManifestTopicDirection = 'send' | 'receive';
|
|
7
|
+
export interface AppManifestTopic {
|
|
8
|
+
scope?: AppManifestTopicScope;
|
|
9
|
+
description?: string;
|
|
10
|
+
direction?: AppManifestTopicDirection[];
|
|
11
|
+
schema?: JsonSchema;
|
|
12
|
+
}
|
|
13
|
+
export interface AppManifestSignals {
|
|
14
|
+
topics?: Record<string, AppManifestTopic>;
|
|
15
|
+
}
|
|
16
|
+
export type AppManifestColumnType = 'integer' | 'text' | 'text-field' | 'boolean' | 'date' | 'link' | 'email' | 'dropdown' | 'document' | 'float' | 'sbscode' | 'table';
|
|
17
|
+
export interface AppManifestColumn {
|
|
18
|
+
name: string;
|
|
19
|
+
type: AppManifestColumnType;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
is_unique?: boolean;
|
|
22
|
+
is_indexed?: boolean;
|
|
23
|
+
default_value?: unknown;
|
|
24
|
+
options_value?: string[];
|
|
25
|
+
hint?: string;
|
|
26
|
+
field_name?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AppManifestTable {
|
|
29
|
+
name: string;
|
|
30
|
+
master_table?: boolean;
|
|
31
|
+
columns: AppManifestColumn[];
|
|
32
|
+
}
|
|
33
|
+
export interface AppManifest {
|
|
34
|
+
version: string;
|
|
35
|
+
tagline?: string;
|
|
36
|
+
tables?: AppManifestTable[];
|
|
37
|
+
signals?: AppManifestSignals;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=AppManifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppManifest.d.ts","sourceRoot":"","sources":["../../src/services/AppManifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEhD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAA;AAEzD,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,SAAS,CAAA;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,qBAAqB,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACvC,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAC1C;AAED,MAAM,MAAM,qBAAqB,GAC3B,SAAS,GACT,MAAM,GACN,YAAY,GACZ,SAAS,GACT,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,GACV,UAAU,GACV,OAAO,GACP,SAAS,GACT,OAAO,CAAA;AAEb,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,qBAAqB,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY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