@nivaro/sdk 0.1.2
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 +2505 -0
- package/dist/index.d.ts +5167 -0
- package/dist/index.js +2563 -0
- package/package.json +55 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2563 @@
|
|
|
1
|
+
// src/command.ts
|
|
2
|
+
function cmd(method, path, params, body) {
|
|
3
|
+
return { _method: method, _path: path, _params: params, _body: body };
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// src/commands/admin.ts
|
|
7
|
+
function listRoles() {
|
|
8
|
+
return cmd("GET", "/roles");
|
|
9
|
+
}
|
|
10
|
+
function readRole(id) {
|
|
11
|
+
return cmd("GET", `/roles/${id}`);
|
|
12
|
+
}
|
|
13
|
+
function createRole(data) {
|
|
14
|
+
return cmd("POST", "/roles", void 0, data);
|
|
15
|
+
}
|
|
16
|
+
function updateRole(id, data) {
|
|
17
|
+
return cmd("PATCH", `/roles/${id}`, void 0, data);
|
|
18
|
+
}
|
|
19
|
+
function deleteRole(id) {
|
|
20
|
+
return cmd("DELETE", `/roles/${id}`);
|
|
21
|
+
}
|
|
22
|
+
function updateRoleUiPermissions(id, disabled) {
|
|
23
|
+
return cmd("PATCH", `/roles/${id}/ui-permissions`, void 0, { disabled });
|
|
24
|
+
}
|
|
25
|
+
function listRoleUsers(id) {
|
|
26
|
+
return cmd("GET", `/roles/${id}/users`);
|
|
27
|
+
}
|
|
28
|
+
function listRolePolicies(id) {
|
|
29
|
+
return cmd("GET", `/roles/${id}/policies`);
|
|
30
|
+
}
|
|
31
|
+
function createRolePolicy(roleId, data) {
|
|
32
|
+
return cmd("POST", `/roles/${roleId}/policies`, void 0, data);
|
|
33
|
+
}
|
|
34
|
+
function updateRolePolicy(policyId, data) {
|
|
35
|
+
return cmd("PATCH", `/roles/policies/${policyId}`, void 0, data);
|
|
36
|
+
}
|
|
37
|
+
function deleteRolePolicy(policyId) {
|
|
38
|
+
return cmd("DELETE", `/roles/policies/${policyId}`);
|
|
39
|
+
}
|
|
40
|
+
function readUser(id) {
|
|
41
|
+
return cmd("GET", `/users/${id}`);
|
|
42
|
+
}
|
|
43
|
+
function readUserCard(id) {
|
|
44
|
+
return cmd("GET", `/users/${id}/card`);
|
|
45
|
+
}
|
|
46
|
+
function createUser(data) {
|
|
47
|
+
return cmd("POST", "/users", void 0, data);
|
|
48
|
+
}
|
|
49
|
+
function updateUser(id, data) {
|
|
50
|
+
return cmd("PATCH", `/users/${id}`, void 0, data);
|
|
51
|
+
}
|
|
52
|
+
function deleteUser(id) {
|
|
53
|
+
return cmd("DELETE", `/users/${id}`);
|
|
54
|
+
}
|
|
55
|
+
function setMyDelegate(data) {
|
|
56
|
+
return cmd("POST", "/users/me/delegate", void 0, data);
|
|
57
|
+
}
|
|
58
|
+
function listImportJobs() {
|
|
59
|
+
return cmd("GET", "/imports");
|
|
60
|
+
}
|
|
61
|
+
function readImportJob(id) {
|
|
62
|
+
return cmd("GET", `/imports/${id}`);
|
|
63
|
+
}
|
|
64
|
+
function createImportJob(data) {
|
|
65
|
+
return cmd("POST", "/imports", void 0, data);
|
|
66
|
+
}
|
|
67
|
+
function createImportJobFromUrl(data) {
|
|
68
|
+
return cmd("POST", "/imports/from-url", void 0, data);
|
|
69
|
+
}
|
|
70
|
+
function deleteImportJob(id) {
|
|
71
|
+
return cmd("DELETE", `/imports/${id}`);
|
|
72
|
+
}
|
|
73
|
+
function readThroughputReport(options = {}) {
|
|
74
|
+
return cmd("GET", "/reports/throughput", options);
|
|
75
|
+
}
|
|
76
|
+
function listThroughputCollections() {
|
|
77
|
+
return cmd("GET", "/reports/throughput/collections");
|
|
78
|
+
}
|
|
79
|
+
function listAllNotificationSubscriptions() {
|
|
80
|
+
return cmd("GET", "/notification-subscriptions/admin/all");
|
|
81
|
+
}
|
|
82
|
+
function readNotificationSubscriptionStats() {
|
|
83
|
+
return cmd("GET", "/notification-subscriptions/admin/stats");
|
|
84
|
+
}
|
|
85
|
+
function listRegisteredExtensions() {
|
|
86
|
+
return cmd("GET", "/extension-registry");
|
|
87
|
+
}
|
|
88
|
+
function listRegisteredFlowOperations() {
|
|
89
|
+
return cmd("GET", "/flows/registered-operations");
|
|
90
|
+
}
|
|
91
|
+
function listRegisteredFlowTriggers() {
|
|
92
|
+
return cmd("GET", "/flows/registered-triggers");
|
|
93
|
+
}
|
|
94
|
+
function sendTestMail(to) {
|
|
95
|
+
return cmd("POST", "/mail/test", void 0, { to });
|
|
96
|
+
}
|
|
97
|
+
function simulatePermissions(roleId, input) {
|
|
98
|
+
return cmd("POST", `/roles/${roleId}/simulate`, void 0, input);
|
|
99
|
+
}
|
|
100
|
+
function readBackupManifest(options = {}) {
|
|
101
|
+
return cmd("GET", "/backups/manifest", {
|
|
102
|
+
include_system: options.include_system ? "true" : "false"
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function backupExportPath(options = {}) {
|
|
106
|
+
return `/api/backups/export?include_system=${options.include_system ? "true" : "false"}`;
|
|
107
|
+
}
|
|
108
|
+
function exportContentBundle(collections) {
|
|
109
|
+
return cmd("POST", "/promotion/export", void 0, { collections });
|
|
110
|
+
}
|
|
111
|
+
function previewContentBundle(bundle) {
|
|
112
|
+
return cmd("POST", "/promotion/preview", void 0, { bundle });
|
|
113
|
+
}
|
|
114
|
+
function applyContentBundle(bundle) {
|
|
115
|
+
return cmd("POST", "/promotion/apply", void 0, { bundle });
|
|
116
|
+
}
|
|
117
|
+
function reportClientError(input) {
|
|
118
|
+
return cmd("POST", "/issues/client", void 0, input);
|
|
119
|
+
}
|
|
120
|
+
function simulatePipeline(collection, itemId) {
|
|
121
|
+
return cmd("POST", "/pipelines/simulate", void 0, { collection, item_id: itemId });
|
|
122
|
+
}
|
|
123
|
+
function readFieldImpact(collection, field) {
|
|
124
|
+
return cmd("GET", `/data-model/${collection}/fields/${field}/impact`);
|
|
125
|
+
}
|
|
126
|
+
function listScheduledReports() {
|
|
127
|
+
return cmd("GET", "/scheduled-reports/");
|
|
128
|
+
}
|
|
129
|
+
function createScheduledReport(data) {
|
|
130
|
+
return cmd("POST", "/scheduled-reports/", void 0, data);
|
|
131
|
+
}
|
|
132
|
+
function updateScheduledReport(id, data) {
|
|
133
|
+
return cmd("PATCH", `/scheduled-reports/${id}`, void 0, data);
|
|
134
|
+
}
|
|
135
|
+
function deleteScheduledReport(id) {
|
|
136
|
+
return cmd("DELETE", `/scheduled-reports/${id}`);
|
|
137
|
+
}
|
|
138
|
+
function runScheduledReport(id) {
|
|
139
|
+
return cmd("POST", `/scheduled-reports/${id}/run`);
|
|
140
|
+
}
|
|
141
|
+
function readTimeline(collection, item) {
|
|
142
|
+
return cmd("GET", `/timeline/${collection}/${item}`);
|
|
143
|
+
}
|
|
144
|
+
function createShareLink(data) {
|
|
145
|
+
return cmd("POST", "/share-links/", void 0, data);
|
|
146
|
+
}
|
|
147
|
+
function listShareLinks(collection, item) {
|
|
148
|
+
return cmd("GET", `/share-links/for/${collection}/${item}`);
|
|
149
|
+
}
|
|
150
|
+
function revokeShareLink(id) {
|
|
151
|
+
return cmd("DELETE", `/share-links/${id}`);
|
|
152
|
+
}
|
|
153
|
+
function exportBlueprint(name, collections) {
|
|
154
|
+
return cmd("POST", "/blueprints/export", void 0, { name, collections });
|
|
155
|
+
}
|
|
156
|
+
function installBlueprint(blueprint) {
|
|
157
|
+
return cmd("POST", "/blueprints/install", void 0, { blueprint });
|
|
158
|
+
}
|
|
159
|
+
function readRecordGraph(collection, item) {
|
|
160
|
+
return cmd("GET", `/record-graph/${collection}/${item}`);
|
|
161
|
+
}
|
|
162
|
+
function readPipelineFlowMap(templateId, days) {
|
|
163
|
+
return cmd("GET", `/pipelines/${templateId}/flow-map`, days ? { days } : void 0);
|
|
164
|
+
}
|
|
165
|
+
function readPipelineReplay(templateId, days) {
|
|
166
|
+
return cmd("GET", `/pipelines/${templateId}/replay`, days ? { days } : void 0);
|
|
167
|
+
}
|
|
168
|
+
function sessionRecordingEnabled() {
|
|
169
|
+
return cmd("GET", "/session-recordings/enabled");
|
|
170
|
+
}
|
|
171
|
+
function startSessionRecording(app) {
|
|
172
|
+
return cmd("POST", "/session-recordings/start", void 0, app ? { app } : {});
|
|
173
|
+
}
|
|
174
|
+
function appendSessionRecordingEvents(id, seq, events) {
|
|
175
|
+
return cmd("POST", `/session-recordings/${id}/events`, void 0, { seq, events });
|
|
176
|
+
}
|
|
177
|
+
function endSessionRecording(id) {
|
|
178
|
+
return cmd("POST", `/session-recordings/${id}/end`);
|
|
179
|
+
}
|
|
180
|
+
function listSessionRecordings(user) {
|
|
181
|
+
return cmd("GET", "/session-recordings/", user ? { user } : void 0);
|
|
182
|
+
}
|
|
183
|
+
function readSessionRecordingEvents(id) {
|
|
184
|
+
return cmd("GET", `/session-recordings/${id}/events`);
|
|
185
|
+
}
|
|
186
|
+
function deleteSessionRecording(id) {
|
|
187
|
+
return cmd("DELETE", `/session-recordings/${id}`);
|
|
188
|
+
}
|
|
189
|
+
function readMyScopes() {
|
|
190
|
+
return cmd("GET", "/users/me/scopes");
|
|
191
|
+
}
|
|
192
|
+
function saveMyScopeDefaults(dimension, values) {
|
|
193
|
+
return cmd("PUT", `/users/me/scopes/${dimension}`, void 0, { values });
|
|
194
|
+
}
|
|
195
|
+
function readUserScopes(userId) {
|
|
196
|
+
return cmd("GET", `/user-scopes/${userId}`);
|
|
197
|
+
}
|
|
198
|
+
function saveUserScope(userId, body) {
|
|
199
|
+
return cmd("PUT", `/user-scopes/${userId}`, void 0, body);
|
|
200
|
+
}
|
|
201
|
+
function listReports() {
|
|
202
|
+
return cmd("GET", "/report-studio/");
|
|
203
|
+
}
|
|
204
|
+
function readReport(id) {
|
|
205
|
+
return cmd("GET", `/report-studio/${id}`);
|
|
206
|
+
}
|
|
207
|
+
function createReport(body) {
|
|
208
|
+
return cmd("POST", "/report-studio/", void 0, body);
|
|
209
|
+
}
|
|
210
|
+
function updateReport(id, body) {
|
|
211
|
+
return cmd("PATCH", `/report-studio/${id}`, void 0, body);
|
|
212
|
+
}
|
|
213
|
+
function deleteReport(id) {
|
|
214
|
+
return cmd("DELETE", `/report-studio/${id}`);
|
|
215
|
+
}
|
|
216
|
+
function saveReportWidgets(id, widgets) {
|
|
217
|
+
return cmd("PUT", `/report-studio/${id}/widgets`, void 0, { widgets });
|
|
218
|
+
}
|
|
219
|
+
function readReportWidgetData(id, widgetId, body) {
|
|
220
|
+
return cmd("POST", `/report-studio/${id}/widgets/${widgetId}/data`, void 0, body ?? {});
|
|
221
|
+
}
|
|
222
|
+
function previewReportWidget(body) {
|
|
223
|
+
return cmd("POST", "/report-studio/preview", void 0, body);
|
|
224
|
+
}
|
|
225
|
+
function cloneReport(id) {
|
|
226
|
+
return cmd("POST", `/report-studio/${id}/clone`);
|
|
227
|
+
}
|
|
228
|
+
function readReportFilterOptions(id, field) {
|
|
229
|
+
return cmd("GET", `/report-studio/${id}/filter-options`, { field });
|
|
230
|
+
}
|
|
231
|
+
function aiBuildReport(id, prompt) {
|
|
232
|
+
return cmd("POST", `/report-studio/${id}/ai-build`, void 0, { prompt });
|
|
233
|
+
}
|
|
234
|
+
function aiReportFilters(id, prompt, fields) {
|
|
235
|
+
return cmd("POST", `/report-studio/${id}/ai-filters`, void 0, { prompt, fields });
|
|
236
|
+
}
|
|
237
|
+
function readReportSubscription(id) {
|
|
238
|
+
return cmd("GET", `/report-studio/${id}/subscription`);
|
|
239
|
+
}
|
|
240
|
+
function setReportSubscription(id, body) {
|
|
241
|
+
return cmd("PUT", `/report-studio/${id}/subscription`, void 0, body);
|
|
242
|
+
}
|
|
243
|
+
function resetReportCache(id) {
|
|
244
|
+
return cmd("POST", `/report-studio/${id}/reset-cache`);
|
|
245
|
+
}
|
|
246
|
+
function listReportFilterPresets(id) {
|
|
247
|
+
return cmd("GET", `/report-studio/${id}/filter-presets`);
|
|
248
|
+
}
|
|
249
|
+
function saveReportFilterPreset(id, body) {
|
|
250
|
+
return cmd("POST", `/report-studio/${id}/filter-presets`, void 0, body);
|
|
251
|
+
}
|
|
252
|
+
function deleteReportFilterPreset(id, presetId) {
|
|
253
|
+
return cmd("DELETE", `/report-studio/${id}/filter-presets/${presetId}`);
|
|
254
|
+
}
|
|
255
|
+
function listReportAlerts(id) {
|
|
256
|
+
return cmd("GET", `/report-studio/${id}/alerts`);
|
|
257
|
+
}
|
|
258
|
+
function createReportAlert(id, body) {
|
|
259
|
+
return cmd("POST", `/report-studio/${id}/alerts`, void 0, body);
|
|
260
|
+
}
|
|
261
|
+
function updateReportAlert(id, alertId, body) {
|
|
262
|
+
return cmd("PATCH", `/report-studio/${id}/alerts/${alertId}`, void 0, body);
|
|
263
|
+
}
|
|
264
|
+
function resolveReportAlert(id, alertId) {
|
|
265
|
+
return cmd("POST", `/report-studio/${id}/alerts/${alertId}/resolve`);
|
|
266
|
+
}
|
|
267
|
+
function readReportAlertLog(id, alertId) {
|
|
268
|
+
return cmd("GET", `/report-studio/${id}/alerts/${alertId}/log`);
|
|
269
|
+
}
|
|
270
|
+
function toggleReportAlert(id, alertId, isActive) {
|
|
271
|
+
return cmd("PATCH", `/report-studio/${id}/alerts/${alertId}`, void 0, { is_active: isActive });
|
|
272
|
+
}
|
|
273
|
+
function deleteReportAlert(id, alertId) {
|
|
274
|
+
return cmd("DELETE", `/report-studio/${id}/alerts/${alertId}`);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/commands/ai.ts
|
|
278
|
+
function aiGenerate(body) {
|
|
279
|
+
return cmd("POST", "/ai/generate", void 0, body);
|
|
280
|
+
}
|
|
281
|
+
function aiSummarize(body) {
|
|
282
|
+
return cmd("POST", "/ai/summarize", void 0, body);
|
|
283
|
+
}
|
|
284
|
+
function aiQuery(body) {
|
|
285
|
+
return cmd("POST", "/ai/query", void 0, body);
|
|
286
|
+
}
|
|
287
|
+
function aiMapColumns(body) {
|
|
288
|
+
return cmd("POST", "/ai/map-columns", void 0, body);
|
|
289
|
+
}
|
|
290
|
+
function semanticSearch(body) {
|
|
291
|
+
return cmd("POST", "/search/semantic", void 0, body);
|
|
292
|
+
}
|
|
293
|
+
function reindexSemanticSearch(collection) {
|
|
294
|
+
return cmd("POST", `/search/reindex/${collection}`);
|
|
295
|
+
}
|
|
296
|
+
function aiValidate(body) {
|
|
297
|
+
return cmd("POST", "/ai/validate", void 0, body);
|
|
298
|
+
}
|
|
299
|
+
function aiCheckDuplicates(body) {
|
|
300
|
+
return cmd("POST", "/ai/check-duplicates", void 0, body);
|
|
301
|
+
}
|
|
302
|
+
function readAiSettings(collection) {
|
|
303
|
+
return cmd("GET", `/ai-settings/${collection}`);
|
|
304
|
+
}
|
|
305
|
+
function updateAiSettings(collection, body) {
|
|
306
|
+
return cmd("PATCH", `/ai-settings/${collection}`, void 0, body);
|
|
307
|
+
}
|
|
308
|
+
function aiChat(messages) {
|
|
309
|
+
return cmd("POST", "/ai/chat", void 0, { messages });
|
|
310
|
+
}
|
|
311
|
+
function approveAiProposal(id) {
|
|
312
|
+
return cmd("POST", `/ai/proposals/${id}/approve`);
|
|
313
|
+
}
|
|
314
|
+
function rejectAiProposal(id) {
|
|
315
|
+
return cmd("POST", `/ai/proposals/${id}/reject`);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// src/commands/collab.ts
|
|
319
|
+
function listTasks(query) {
|
|
320
|
+
const params = {};
|
|
321
|
+
if (query?.collection) params.collection = query.collection;
|
|
322
|
+
if (query?.item) params.item = query.item;
|
|
323
|
+
if (query?.assignee) params.assignee = query.assignee;
|
|
324
|
+
if (query?.status) params.status = query.status;
|
|
325
|
+
return cmd("GET", "/tasks", params);
|
|
326
|
+
}
|
|
327
|
+
function listMyTasks() {
|
|
328
|
+
return cmd("GET", "/tasks/mine");
|
|
329
|
+
}
|
|
330
|
+
function readTask(id) {
|
|
331
|
+
return cmd("GET", `/tasks/${id}`);
|
|
332
|
+
}
|
|
333
|
+
function createTask(body) {
|
|
334
|
+
return cmd("POST", "/tasks", void 0, body);
|
|
335
|
+
}
|
|
336
|
+
function updateTask(id, body) {
|
|
337
|
+
return cmd("PATCH", `/tasks/${id}`, void 0, body);
|
|
338
|
+
}
|
|
339
|
+
function completeTask(id) {
|
|
340
|
+
return cmd("POST", `/tasks/${id}/complete`);
|
|
341
|
+
}
|
|
342
|
+
function deleteTask(id) {
|
|
343
|
+
return cmd("DELETE", `/tasks/${id}`);
|
|
344
|
+
}
|
|
345
|
+
function listApprovalChains() {
|
|
346
|
+
return cmd("GET", "/approvals/chains");
|
|
347
|
+
}
|
|
348
|
+
function readApprovalChain(id) {
|
|
349
|
+
return cmd("GET", `/approvals/chains/${id}`);
|
|
350
|
+
}
|
|
351
|
+
function createApprovalChain(body) {
|
|
352
|
+
return cmd("POST", "/approvals/chains", void 0, body);
|
|
353
|
+
}
|
|
354
|
+
function updateApprovalChain(id, body) {
|
|
355
|
+
return cmd("PATCH", `/approvals/chains/${id}`, void 0, body);
|
|
356
|
+
}
|
|
357
|
+
function deleteApprovalChain(id) {
|
|
358
|
+
return cmd("DELETE", `/approvals/chains/${id}`);
|
|
359
|
+
}
|
|
360
|
+
function startApproval(body) {
|
|
361
|
+
return cmd("POST", "/approvals/start", void 0, body);
|
|
362
|
+
}
|
|
363
|
+
function decideApproval(instanceId, decision, comment) {
|
|
364
|
+
return cmd("POST", `/approvals/instances/${instanceId}/decide`, void 0, {
|
|
365
|
+
decision,
|
|
366
|
+
...comment != null ? { comment } : {}
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
function listApprovalInstances(query) {
|
|
370
|
+
const params = {};
|
|
371
|
+
if (query?.collection) params.collection = query.collection;
|
|
372
|
+
if (query?.item) params.item = query.item;
|
|
373
|
+
if (query?.status) params.status = query.status;
|
|
374
|
+
return cmd("GET", "/approvals/instances", params);
|
|
375
|
+
}
|
|
376
|
+
function readItemLock(collection, item) {
|
|
377
|
+
return cmd("GET", `/item-locks/${collection}/${item}/lock`);
|
|
378
|
+
}
|
|
379
|
+
function acquireItemLock(collection, item) {
|
|
380
|
+
return cmd("POST", `/item-locks/${collection}/${item}/lock`);
|
|
381
|
+
}
|
|
382
|
+
function heartbeatItemLock(collection, item) {
|
|
383
|
+
return cmd("POST", `/item-locks/${collection}/${item}/heartbeat`);
|
|
384
|
+
}
|
|
385
|
+
function releaseItemLock(collection, item, options) {
|
|
386
|
+
return cmd(
|
|
387
|
+
"DELETE",
|
|
388
|
+
`/item-locks/${collection}/${item}/lock`,
|
|
389
|
+
options?.force ? { force: "1" } : void 0
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
function listNotifications(query) {
|
|
393
|
+
const params = {};
|
|
394
|
+
if (query?.page != null) params.page = query.page;
|
|
395
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
396
|
+
if (query?.status) params.status = query.status;
|
|
397
|
+
return cmd("GET", "/notifications", params);
|
|
398
|
+
}
|
|
399
|
+
function readUnreadNotificationCount() {
|
|
400
|
+
return cmd("GET", "/notifications/unread-count");
|
|
401
|
+
}
|
|
402
|
+
function readUserActivity(userId, query) {
|
|
403
|
+
const params = {};
|
|
404
|
+
if (query?.page != null) params.page = query.page;
|
|
405
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
406
|
+
return cmd("GET", `/user-activity/${userId}`, params);
|
|
407
|
+
}
|
|
408
|
+
function readUserActivitySummary(userId) {
|
|
409
|
+
return cmd("GET", `/user-activity/${userId}/summary`);
|
|
410
|
+
}
|
|
411
|
+
function listIssues(query) {
|
|
412
|
+
const params = {};
|
|
413
|
+
if (query?.collection) params.collection = query.collection;
|
|
414
|
+
if (query?.item) params.item = query.item;
|
|
415
|
+
if (query?.status) params.status = query.status;
|
|
416
|
+
if (query?.severity) params.severity = query.severity;
|
|
417
|
+
if (query?.assigned_to) params.assigned_to = query.assigned_to;
|
|
418
|
+
return cmd("GET", "/issues", params);
|
|
419
|
+
}
|
|
420
|
+
function readIssueSummary() {
|
|
421
|
+
return cmd("GET", "/issues/summary");
|
|
422
|
+
}
|
|
423
|
+
function readIssue(id) {
|
|
424
|
+
return cmd("GET", `/issues/${id}`);
|
|
425
|
+
}
|
|
426
|
+
function createIssue(body) {
|
|
427
|
+
return cmd("POST", "/issues", void 0, body);
|
|
428
|
+
}
|
|
429
|
+
function updateIssue(id, body) {
|
|
430
|
+
return cmd("PATCH", `/issues/${id}`, void 0, body);
|
|
431
|
+
}
|
|
432
|
+
function deleteIssue(id) {
|
|
433
|
+
return cmd("DELETE", `/issues/${id}`);
|
|
434
|
+
}
|
|
435
|
+
function readNotificationCount() {
|
|
436
|
+
return cmd("GET", "/notifications/count");
|
|
437
|
+
}
|
|
438
|
+
function markNotificationRead(id) {
|
|
439
|
+
return cmd("POST", `/notifications/${id}/read`);
|
|
440
|
+
}
|
|
441
|
+
function markAllNotificationsRead() {
|
|
442
|
+
return cmd("POST", "/notifications/mark-all-read");
|
|
443
|
+
}
|
|
444
|
+
function deleteNotification(id) {
|
|
445
|
+
return cmd("DELETE", `/notifications/${id}`);
|
|
446
|
+
}
|
|
447
|
+
function readItemLockConfig(collection) {
|
|
448
|
+
return cmd("GET", `/item-locks/config/${collection}`);
|
|
449
|
+
}
|
|
450
|
+
function updateItemLockConfig(collection, enabled) {
|
|
451
|
+
return cmd("PATCH", `/item-locks/config/${collection}`, void 0, {
|
|
452
|
+
item_locking_enabled: enabled
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
function listFieldWatches() {
|
|
456
|
+
return cmd("GET", "/field-watches");
|
|
457
|
+
}
|
|
458
|
+
function readFieldWatch(id) {
|
|
459
|
+
return cmd("GET", `/field-watches/${id}`);
|
|
460
|
+
}
|
|
461
|
+
function createFieldWatch(data) {
|
|
462
|
+
return cmd("POST", "/field-watches", void 0, data);
|
|
463
|
+
}
|
|
464
|
+
function updateFieldWatch(id, data) {
|
|
465
|
+
return cmd("PATCH", `/field-watches/${id}`, void 0, data);
|
|
466
|
+
}
|
|
467
|
+
function deleteFieldWatch(id) {
|
|
468
|
+
return cmd("DELETE", `/field-watches/${id}`);
|
|
469
|
+
}
|
|
470
|
+
function subscribeFieldWatch(id) {
|
|
471
|
+
return cmd("POST", `/field-watches/${id}/subscribe`);
|
|
472
|
+
}
|
|
473
|
+
function unsubscribeFieldWatch(id) {
|
|
474
|
+
return cmd("DELETE", `/field-watches/${id}/subscribe`);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// src/commands/content.ts
|
|
478
|
+
function exportContent(collection, options) {
|
|
479
|
+
return cmd("POST", `/content-export/${collection}`, void 0, options ?? {});
|
|
480
|
+
}
|
|
481
|
+
function readDraftPublishConfig(collection) {
|
|
482
|
+
return cmd("GET", `/draft-publish/${collection}/config`);
|
|
483
|
+
}
|
|
484
|
+
function updateDraftPublishConfig(collection, enabled) {
|
|
485
|
+
return cmd("PATCH", `/draft-publish/${collection}/config`, void 0, {
|
|
486
|
+
draft_publish_enabled: enabled
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function publishItem(collection, id) {
|
|
490
|
+
return cmd("POST", `/draft-publish/${collection}/${id}/publish`);
|
|
491
|
+
}
|
|
492
|
+
function unpublishItem(collection, id) {
|
|
493
|
+
return cmd("POST", `/draft-publish/${collection}/${id}/unpublish`);
|
|
494
|
+
}
|
|
495
|
+
function submitItemForReview(collection, id) {
|
|
496
|
+
return cmd("POST", `/draft-publish/${collection}/${id}/submit-review`);
|
|
497
|
+
}
|
|
498
|
+
function listScheduledChanges(query) {
|
|
499
|
+
const params = {};
|
|
500
|
+
if (query?.collection) params.collection = query.collection;
|
|
501
|
+
if (query?.status) params.status = query.status;
|
|
502
|
+
return cmd("GET", "/scheduled-changes", params);
|
|
503
|
+
}
|
|
504
|
+
function listItemScheduledChanges(collection, itemId) {
|
|
505
|
+
return cmd("GET", `/scheduled-changes/${collection}/${itemId}`);
|
|
506
|
+
}
|
|
507
|
+
function createScheduledChange(body) {
|
|
508
|
+
return cmd("POST", "/scheduled-changes", void 0, body);
|
|
509
|
+
}
|
|
510
|
+
function cancelScheduledChange(id) {
|
|
511
|
+
return cmd("DELETE", `/scheduled-changes/${id}`);
|
|
512
|
+
}
|
|
513
|
+
function executeScheduledChange(id) {
|
|
514
|
+
return cmd("POST", `/scheduled-changes/${id}/execute`);
|
|
515
|
+
}
|
|
516
|
+
function readFieldConfig(collection) {
|
|
517
|
+
return cmd("GET", `/field-config/${collection}`);
|
|
518
|
+
}
|
|
519
|
+
function updateFieldConfig(collection, field, body) {
|
|
520
|
+
return cmd("PATCH", `/field-config/${collection}/${field}`, void 0, body);
|
|
521
|
+
}
|
|
522
|
+
function evaluateFieldVisibility(collection, values) {
|
|
523
|
+
return cmd("POST", `/field-config/${collection}/evaluate-visibility`, void 0, { values });
|
|
524
|
+
}
|
|
525
|
+
function evaluateFieldDefaults(collection, triggerField, values) {
|
|
526
|
+
return cmd("POST", `/field-config/${collection}/evaluate-defaults`, void 0, {
|
|
527
|
+
trigger_field: triggerField,
|
|
528
|
+
values
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
function evaluateFieldLock(collection, values) {
|
|
532
|
+
return cmd("POST", `/field-config/${collection}/evaluate-lock`, void 0, { values });
|
|
533
|
+
}
|
|
534
|
+
function cascadeFieldDependencies(collection, changedField, values) {
|
|
535
|
+
return cmd("POST", `/field-config/${collection}/cascade`, void 0, {
|
|
536
|
+
changed_field: changedField,
|
|
537
|
+
values
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
function listFieldGroups(collection) {
|
|
541
|
+
return cmd("GET", `/field-groups/${collection}`);
|
|
542
|
+
}
|
|
543
|
+
function createFieldGroup(body) {
|
|
544
|
+
return cmd("POST", "/field-groups", void 0, body);
|
|
545
|
+
}
|
|
546
|
+
function updateFieldGroup(id, body) {
|
|
547
|
+
return cmd("PATCH", `/field-groups/${id}`, void 0, body);
|
|
548
|
+
}
|
|
549
|
+
function deleteFieldGroup(id) {
|
|
550
|
+
return cmd("DELETE", `/field-groups/${id}`);
|
|
551
|
+
}
|
|
552
|
+
function reorderFieldGroups(collection, order) {
|
|
553
|
+
return cmd("POST", "/field-groups/reorder", void 0, { collection, order });
|
|
554
|
+
}
|
|
555
|
+
function listVirtualCollections() {
|
|
556
|
+
return cmd("GET", "/virtual-collections");
|
|
557
|
+
}
|
|
558
|
+
function createVirtualCollection(body) {
|
|
559
|
+
return cmd("POST", "/virtual-collections", void 0, body);
|
|
560
|
+
}
|
|
561
|
+
function updateVirtualCollection(collection, body) {
|
|
562
|
+
return cmd("PATCH", `/virtual-collections/${collection}`, void 0, body);
|
|
563
|
+
}
|
|
564
|
+
function deleteVirtualCollection(collection) {
|
|
565
|
+
return cmd("DELETE", `/virtual-collections/${collection}`);
|
|
566
|
+
}
|
|
567
|
+
function queryVirtualCollection(collection) {
|
|
568
|
+
return cmd("POST", `/virtual-collections/${collection}/query`);
|
|
569
|
+
}
|
|
570
|
+
function validateVirtualCollectionSql(collection, sql) {
|
|
571
|
+
return cmd(
|
|
572
|
+
"POST",
|
|
573
|
+
`/virtual-collections/${collection}/validate-sql`,
|
|
574
|
+
void 0,
|
|
575
|
+
sql ? { sql } : {}
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
function listRecordTemplates(collection) {
|
|
579
|
+
return cmd("GET", "/record-templates", collection ? { collection } : void 0);
|
|
580
|
+
}
|
|
581
|
+
function createRecordTemplate(body) {
|
|
582
|
+
return cmd("POST", "/record-templates", void 0, body);
|
|
583
|
+
}
|
|
584
|
+
function updateRecordTemplate(id, body) {
|
|
585
|
+
return cmd("PATCH", `/record-templates/${id}`, void 0, body);
|
|
586
|
+
}
|
|
587
|
+
function deleteRecordTemplate(id) {
|
|
588
|
+
return cmd("DELETE", `/record-templates/${id}`);
|
|
589
|
+
}
|
|
590
|
+
function applyRecordTemplate(id) {
|
|
591
|
+
return cmd("POST", `/record-templates/${id}/apply`);
|
|
592
|
+
}
|
|
593
|
+
function listCollectionPresets() {
|
|
594
|
+
return cmd("GET", "/collection-presets");
|
|
595
|
+
}
|
|
596
|
+
function installCollectionPreset(id) {
|
|
597
|
+
return cmd("POST", `/collection-presets/${id}/install`);
|
|
598
|
+
}
|
|
599
|
+
function getLocales() {
|
|
600
|
+
return cmd("GET", "/field-translations/locales");
|
|
601
|
+
}
|
|
602
|
+
function getTranslations(collection, itemId) {
|
|
603
|
+
return cmd("GET", `/field-translations/${collection}/${itemId}`);
|
|
604
|
+
}
|
|
605
|
+
function setTranslations(collection, itemId, translations) {
|
|
606
|
+
return cmd("PATCH", `/field-translations/${collection}/${itemId}`, void 0, translations);
|
|
607
|
+
}
|
|
608
|
+
function getFieldTranslations(collection, itemId, field) {
|
|
609
|
+
return cmd("GET", `/field-translations/${collection}/${itemId}/${field}`);
|
|
610
|
+
}
|
|
611
|
+
function deleteFieldTranslations(collection, itemId, field) {
|
|
612
|
+
return cmd("DELETE", `/field-translations/${collection}/${itemId}/${field}`);
|
|
613
|
+
}
|
|
614
|
+
function listSubRows(collection, itemId, field) {
|
|
615
|
+
return cmd("GET", `/sub-rows/${collection}/${itemId}/${field}`);
|
|
616
|
+
}
|
|
617
|
+
function addSubRow(collection, itemId, field, data) {
|
|
618
|
+
return cmd("POST", `/sub-rows/${collection}/${itemId}/${field}`, void 0, { data });
|
|
619
|
+
}
|
|
620
|
+
function replaceSubRows(collection, itemId, field, items) {
|
|
621
|
+
return cmd("PATCH", `/sub-rows/${collection}/${itemId}/${field}`, void 0, { items });
|
|
622
|
+
}
|
|
623
|
+
function deleteSubRow(collection, itemId, field, subRowId) {
|
|
624
|
+
return cmd("DELETE", `/sub-rows/${collection}/${itemId}/${field}/${subRowId}`);
|
|
625
|
+
}
|
|
626
|
+
function reorderSubRows(body) {
|
|
627
|
+
return cmd("POST", "/sub-rows/reorder", void 0, body);
|
|
628
|
+
}
|
|
629
|
+
function listSubRowTemplates(collection, field) {
|
|
630
|
+
return cmd("GET", `/sub-rows/templates/${collection}/${field}`);
|
|
631
|
+
}
|
|
632
|
+
function createSubRowTemplate(body) {
|
|
633
|
+
return cmd("POST", "/sub-rows/templates", void 0, body);
|
|
634
|
+
}
|
|
635
|
+
function deleteSubRowTemplate(id) {
|
|
636
|
+
return cmd("DELETE", `/sub-rows/templates/${id}`);
|
|
637
|
+
}
|
|
638
|
+
function applySubRowTemplate(id) {
|
|
639
|
+
return cmd("POST", `/sub-rows/templates/${id}/apply`);
|
|
640
|
+
}
|
|
641
|
+
function listAddendums(collection, itemId) {
|
|
642
|
+
return cmd("GET", `/addendums/${collection}/${itemId}`);
|
|
643
|
+
}
|
|
644
|
+
function readAddendum(id) {
|
|
645
|
+
return cmd("GET", `/addendums/${id}`);
|
|
646
|
+
}
|
|
647
|
+
function createAddendum(body) {
|
|
648
|
+
return cmd("POST", "/addendums", void 0, body);
|
|
649
|
+
}
|
|
650
|
+
function updateAddendum(id, body) {
|
|
651
|
+
return cmd("PATCH", `/addendums/${id}`, void 0, body);
|
|
652
|
+
}
|
|
653
|
+
function deleteAddendum(id) {
|
|
654
|
+
return cmd("DELETE", `/addendums/${id}`);
|
|
655
|
+
}
|
|
656
|
+
function submitAddendum(id) {
|
|
657
|
+
return cmd("POST", `/addendums/${id}/submit`);
|
|
658
|
+
}
|
|
659
|
+
function approveAddendum(id) {
|
|
660
|
+
return cmd("POST", `/addendums/${id}/approve`);
|
|
661
|
+
}
|
|
662
|
+
function rejectAddendum(id) {
|
|
663
|
+
return cmd("POST", `/addendums/${id}/reject`);
|
|
664
|
+
}
|
|
665
|
+
function listChangeOrders(collection, itemId) {
|
|
666
|
+
return cmd("GET", `/addendums/change-orders/${collection}/${itemId}`);
|
|
667
|
+
}
|
|
668
|
+
function cloneItem(collection, id, options) {
|
|
669
|
+
return cmd("POST", `/items/${collection}/${id}/clone`, void 0, options);
|
|
670
|
+
}
|
|
671
|
+
function readFieldHistory(collection, id, field) {
|
|
672
|
+
return cmd("GET", `/items/${collection}/${id}/field-history/${field}`);
|
|
673
|
+
}
|
|
674
|
+
function rollbackRevision(revisionId) {
|
|
675
|
+
return cmd("POST", `/revisions/${revisionId}/rollback`);
|
|
676
|
+
}
|
|
677
|
+
function listCollectionRecordTemplates(collection) {
|
|
678
|
+
return cmd("GET", `/record-templates/${collection}`);
|
|
679
|
+
}
|
|
680
|
+
function readCollectionLayout(id) {
|
|
681
|
+
return cmd("GET", `/collection-layouts/${id}`);
|
|
682
|
+
}
|
|
683
|
+
function readDetailLayout(collection, layoutId) {
|
|
684
|
+
return cmd(
|
|
685
|
+
"GET",
|
|
686
|
+
`/collection-layouts/detail/${collection}`,
|
|
687
|
+
layoutId ? { layout_id: layoutId } : void 0
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
function updateLayoutUngroupedSort(id, ungroupedSort) {
|
|
691
|
+
return cmd("PATCH", `/collection-layouts/${id}/ungrouped-sort`, void 0, {
|
|
692
|
+
ungrouped_sort: ungroupedSort
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// src/commands/devex.ts
|
|
697
|
+
function getPostmanCollection() {
|
|
698
|
+
return cmd("GET", "/dev-tools/postman.json");
|
|
699
|
+
}
|
|
700
|
+
function getBrunoCollection() {
|
|
701
|
+
return cmd("GET", "/dev-tools/bruno.json");
|
|
702
|
+
}
|
|
703
|
+
function listWebhookDeliveries(webhookId, query) {
|
|
704
|
+
const params = {};
|
|
705
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
706
|
+
if (query?.offset != null) params.offset = query.offset;
|
|
707
|
+
return cmd("GET", `/webhooks/${webhookId}/deliveries`, params);
|
|
708
|
+
}
|
|
709
|
+
function retryWebhookDelivery(deliveryId) {
|
|
710
|
+
return cmd("POST", `/webhooks/deliveries/${deliveryId}/retry`);
|
|
711
|
+
}
|
|
712
|
+
function replayActivityEvent(activityId) {
|
|
713
|
+
return cmd("POST", `/webhooks/replay/${activityId}`);
|
|
714
|
+
}
|
|
715
|
+
function listPersistedQueries() {
|
|
716
|
+
return cmd("GET", "/persisted-queries");
|
|
717
|
+
}
|
|
718
|
+
function readPersistedQuery(id) {
|
|
719
|
+
return cmd("GET", `/persisted-queries/${id}`);
|
|
720
|
+
}
|
|
721
|
+
function createPersistedQuery(body) {
|
|
722
|
+
return cmd("POST", "/persisted-queries", void 0, body);
|
|
723
|
+
}
|
|
724
|
+
function updatePersistedQuery(id, body) {
|
|
725
|
+
return cmd("PATCH", `/persisted-queries/${id}`, void 0, body);
|
|
726
|
+
}
|
|
727
|
+
function deletePersistedQuery(id) {
|
|
728
|
+
return cmd("DELETE", `/persisted-queries/${id}`);
|
|
729
|
+
}
|
|
730
|
+
function listSavedViews(collection) {
|
|
731
|
+
return cmd("GET", "/saved-views", { collection });
|
|
732
|
+
}
|
|
733
|
+
function createSavedView(body) {
|
|
734
|
+
return cmd("POST", "/saved-views", void 0, body);
|
|
735
|
+
}
|
|
736
|
+
function updateSavedView(id, body) {
|
|
737
|
+
return cmd("PATCH", `/saved-views/${id}`, void 0, body);
|
|
738
|
+
}
|
|
739
|
+
function deleteSavedView(id) {
|
|
740
|
+
return cmd("DELETE", `/saved-views/${id}`);
|
|
741
|
+
}
|
|
742
|
+
function globalSearch(q) {
|
|
743
|
+
return cmd("GET", "/global-search", { q });
|
|
744
|
+
}
|
|
745
|
+
function listApiKeys() {
|
|
746
|
+
return cmd("GET", "/api-keys");
|
|
747
|
+
}
|
|
748
|
+
function readApiKey(id) {
|
|
749
|
+
return cmd("GET", `/api-keys/${id}`);
|
|
750
|
+
}
|
|
751
|
+
function createApiKey(body) {
|
|
752
|
+
return cmd("POST", "/api-keys", void 0, body);
|
|
753
|
+
}
|
|
754
|
+
function updateApiKey(id, body) {
|
|
755
|
+
return cmd("PATCH", `/api-keys/${id}`, void 0, body);
|
|
756
|
+
}
|
|
757
|
+
function revokeApiKey(id) {
|
|
758
|
+
return cmd("POST", `/api-keys/${id}/revoke`);
|
|
759
|
+
}
|
|
760
|
+
function deleteApiKey(id) {
|
|
761
|
+
return cmd("DELETE", `/api-keys/${id}`);
|
|
762
|
+
}
|
|
763
|
+
function listDataQualityRules(collection) {
|
|
764
|
+
return cmd("GET", "/data-quality/rules", collection ? { collection } : void 0);
|
|
765
|
+
}
|
|
766
|
+
function createDataQualityRule(body) {
|
|
767
|
+
return cmd("POST", "/data-quality/rules", void 0, body);
|
|
768
|
+
}
|
|
769
|
+
function updateDataQualityRule(id, body) {
|
|
770
|
+
return cmd("PATCH", `/data-quality/rules/${id}`, void 0, body);
|
|
771
|
+
}
|
|
772
|
+
function deleteDataQualityRule(id) {
|
|
773
|
+
return cmd("DELETE", `/data-quality/rules/${id}`);
|
|
774
|
+
}
|
|
775
|
+
function runDataQuality(collection) {
|
|
776
|
+
return cmd("POST", `/data-quality/run/${collection}`);
|
|
777
|
+
}
|
|
778
|
+
function listDataQualityRuns(collection) {
|
|
779
|
+
return cmd("GET", "/data-quality/runs", collection ? { collection } : void 0);
|
|
780
|
+
}
|
|
781
|
+
function readDataQualityRun(id) {
|
|
782
|
+
return cmd("GET", `/data-quality/runs/${id}`);
|
|
783
|
+
}
|
|
784
|
+
function readApiAnalyticsSummary(hours) {
|
|
785
|
+
return cmd("GET", "/api-analytics/summary", hours != null ? { hours } : void 0);
|
|
786
|
+
}
|
|
787
|
+
function readApiAnalyticsTimeseries(hours) {
|
|
788
|
+
return cmd("GET", "/api-analytics/timeseries", hours != null ? { hours } : void 0);
|
|
789
|
+
}
|
|
790
|
+
function readApiAnalyticsTopPaths(hours) {
|
|
791
|
+
return cmd("GET", "/api-analytics/top-paths", hours != null ? { hours } : void 0);
|
|
792
|
+
}
|
|
793
|
+
function readApiAnalyticsTopCollections(hours) {
|
|
794
|
+
return cmd("GET", "/api-analytics/top-collections", hours != null ? { hours } : void 0);
|
|
795
|
+
}
|
|
796
|
+
function readApiAnalyticsErrors() {
|
|
797
|
+
return cmd("GET", "/api-analytics/errors");
|
|
798
|
+
}
|
|
799
|
+
function listDeadLetters() {
|
|
800
|
+
return cmd("GET", "/dead-letters");
|
|
801
|
+
}
|
|
802
|
+
function retryDeadLetter(runId) {
|
|
803
|
+
return cmd("POST", `/dead-letters/${runId}/retry`);
|
|
804
|
+
}
|
|
805
|
+
function isPageSlot(assignment) {
|
|
806
|
+
return assignment.field === "__pipeline__" || assignment.field === "__comments__" || assignment.field === "__tasks__";
|
|
807
|
+
}
|
|
808
|
+
function readCollectionLayouts(collection) {
|
|
809
|
+
return cmd("GET", "/collection-layouts", { collection });
|
|
810
|
+
}
|
|
811
|
+
function readActiveLayout(collection) {
|
|
812
|
+
return cmd("GET", "/collection-layouts/active", { collection });
|
|
813
|
+
}
|
|
814
|
+
function readLayoutGroups(collection, layoutId) {
|
|
815
|
+
return cmd("GET", `/field-groups/${collection}`, { layout_id: layoutId });
|
|
816
|
+
}
|
|
817
|
+
function readLayoutAssignments(layoutId) {
|
|
818
|
+
return cmd("GET", `/collection-layouts/${layoutId}/assignments`);
|
|
819
|
+
}
|
|
820
|
+
function activateLayout(layoutId) {
|
|
821
|
+
return cmd("POST", `/collection-layouts/${layoutId}/activate`);
|
|
822
|
+
}
|
|
823
|
+
function cloneLayout(layoutId, name) {
|
|
824
|
+
return cmd("POST", `/collection-layouts/${layoutId}/clone`, void 0, { name });
|
|
825
|
+
}
|
|
826
|
+
function createCollectionLayout(collection, name) {
|
|
827
|
+
return cmd("POST", "/collection-layouts", void 0, { collection, name });
|
|
828
|
+
}
|
|
829
|
+
function updateCollectionLayout(layoutId, patch) {
|
|
830
|
+
return cmd("PATCH", `/collection-layouts/${layoutId}`, void 0, patch);
|
|
831
|
+
}
|
|
832
|
+
function deleteCollectionLayout(layoutId) {
|
|
833
|
+
return cmd("DELETE", `/collection-layouts/${layoutId}`);
|
|
834
|
+
}
|
|
835
|
+
function updateLayoutAssignments(layoutId, assignments) {
|
|
836
|
+
return cmd("PUT", `/collection-layouts/${layoutId}/assignments`, void 0, { assignments });
|
|
837
|
+
}
|
|
838
|
+
function listInternalWidgets() {
|
|
839
|
+
return cmd("GET", "/widgets-internal");
|
|
840
|
+
}
|
|
841
|
+
function readInternalWidget(id) {
|
|
842
|
+
return cmd("GET", `/widgets-internal/${id}`);
|
|
843
|
+
}
|
|
844
|
+
function createInternalWidget(data) {
|
|
845
|
+
return cmd("POST", "/widgets-internal", void 0, data);
|
|
846
|
+
}
|
|
847
|
+
function updateInternalWidget(id, data) {
|
|
848
|
+
return cmd("PATCH", `/widgets-internal/${id}`, void 0, data);
|
|
849
|
+
}
|
|
850
|
+
function deleteInternalWidget(id) {
|
|
851
|
+
return cmd("DELETE", `/widgets-internal/${id}`);
|
|
852
|
+
}
|
|
853
|
+
function renderInternalWidget(id, data = {}) {
|
|
854
|
+
return cmd("POST", `/widgets-internal/${id}/render`, void 0, data);
|
|
855
|
+
}
|
|
856
|
+
function invokeInternalWidgetAction(id, data) {
|
|
857
|
+
return cmd("POST", `/widgets-internal/${id}/action`, void 0, data);
|
|
858
|
+
}
|
|
859
|
+
function listItemActions(collection) {
|
|
860
|
+
return cmd("GET", "/item-actions/registered", collection ? { collection } : void 0);
|
|
861
|
+
}
|
|
862
|
+
function executeItemAction(actionId, data) {
|
|
863
|
+
return cmd("POST", `/item-actions/${actionId}/execute`, void 0, data);
|
|
864
|
+
}
|
|
865
|
+
function listBulkActions(collection) {
|
|
866
|
+
return cmd("GET", "/bulk-actions/registered", collection ? { collection } : void 0);
|
|
867
|
+
}
|
|
868
|
+
function executeBulkAction(actionId, data) {
|
|
869
|
+
return cmd("POST", `/bulk-actions/${actionId}/execute`, void 0, data);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// src/commands/files.ts
|
|
873
|
+
function listFiles(options = {}) {
|
|
874
|
+
return cmd("GET", "/files", options);
|
|
875
|
+
}
|
|
876
|
+
function readFileMeta(id) {
|
|
877
|
+
return cmd("GET", `/files/${id}/meta`);
|
|
878
|
+
}
|
|
879
|
+
function presignFileUpload(data) {
|
|
880
|
+
return cmd("POST", "/files/presign", void 0, data);
|
|
881
|
+
}
|
|
882
|
+
function updateFileMeta(id, data) {
|
|
883
|
+
return cmd("PATCH", `/files/${id}`, void 0, data);
|
|
884
|
+
}
|
|
885
|
+
function deleteFile(id) {
|
|
886
|
+
return cmd("DELETE", `/files/${id}`);
|
|
887
|
+
}
|
|
888
|
+
function readFileUsage(id) {
|
|
889
|
+
return cmd("GET", `/files/${id}/usage`);
|
|
890
|
+
}
|
|
891
|
+
function listOrphanFiles(options = {}) {
|
|
892
|
+
return cmd("GET", "/files/usage/orphans", {
|
|
893
|
+
...options.limit != null ? { limit: String(options.limit) } : {},
|
|
894
|
+
...options.offset != null ? { offset: String(options.offset) } : {}
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
function fileDownloadPath(id, options = {}) {
|
|
898
|
+
return `/api/files/${id}${options.download ? "?download=1" : ""}`;
|
|
899
|
+
}
|
|
900
|
+
function fileTransformPath(id, options = {}) {
|
|
901
|
+
const qs = new URLSearchParams(
|
|
902
|
+
Object.fromEntries(
|
|
903
|
+
Object.entries(options).filter(([, v]) => v != null).map(([k, v]) => [k, String(v)])
|
|
904
|
+
)
|
|
905
|
+
).toString();
|
|
906
|
+
return `/api/files/${id}/transform${qs ? `?${qs}` : ""}`;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
// src/commands/import-templates.ts
|
|
910
|
+
var listImportTemplates = (collection) => cmd("GET", "/import-templates", { collection });
|
|
911
|
+
var executeImportTemplate = (id, payload) => cmd("POST", `/import-templates/${id}/execute`, void 0, payload);
|
|
912
|
+
|
|
913
|
+
// src/commands/infra.ts
|
|
914
|
+
function listWorkspaces() {
|
|
915
|
+
return cmd("GET", "/workspaces");
|
|
916
|
+
}
|
|
917
|
+
function readWorkspace(id) {
|
|
918
|
+
return cmd("GET", `/workspaces/${id}`);
|
|
919
|
+
}
|
|
920
|
+
function readWorkspaceUsage(id) {
|
|
921
|
+
return cmd("GET", `/workspaces/${id}/usage`);
|
|
922
|
+
}
|
|
923
|
+
function createWorkspace(body) {
|
|
924
|
+
return cmd("POST", "/workspaces", void 0, body);
|
|
925
|
+
}
|
|
926
|
+
function updateWorkspace(id, body) {
|
|
927
|
+
return cmd("PATCH", `/workspaces/${id}`, void 0, body);
|
|
928
|
+
}
|
|
929
|
+
function deleteWorkspace(id) {
|
|
930
|
+
return cmd("DELETE", `/workspaces/${id}`);
|
|
931
|
+
}
|
|
932
|
+
function switchWorkspace(id) {
|
|
933
|
+
return cmd("POST", `/workspaces/${id}/switch`);
|
|
934
|
+
}
|
|
935
|
+
function listWorkspaceTemplates() {
|
|
936
|
+
return cmd("GET", "/workspaces/templates");
|
|
937
|
+
}
|
|
938
|
+
function createWorkspaceTemplate(body) {
|
|
939
|
+
return cmd("POST", "/workspaces/templates", void 0, body);
|
|
940
|
+
}
|
|
941
|
+
function deleteWorkspaceTemplate(id) {
|
|
942
|
+
return cmd("DELETE", `/workspaces/templates/${id}`);
|
|
943
|
+
}
|
|
944
|
+
function listSyncJobs() {
|
|
945
|
+
return cmd("GET", "/sync-jobs");
|
|
946
|
+
}
|
|
947
|
+
function readSyncJob(id) {
|
|
948
|
+
return cmd("GET", `/sync-jobs/${id}`);
|
|
949
|
+
}
|
|
950
|
+
function createSyncJob(body) {
|
|
951
|
+
return cmd("POST", "/sync-jobs", void 0, body);
|
|
952
|
+
}
|
|
953
|
+
function updateSyncJob(id, body) {
|
|
954
|
+
return cmd("PATCH", `/sync-jobs/${id}`, void 0, body);
|
|
955
|
+
}
|
|
956
|
+
function deleteSyncJob(id) {
|
|
957
|
+
return cmd("DELETE", `/sync-jobs/${id}`);
|
|
958
|
+
}
|
|
959
|
+
function runSyncJob(id) {
|
|
960
|
+
return cmd("POST", `/sync-jobs/${id}/run`);
|
|
961
|
+
}
|
|
962
|
+
function submitToErp(body) {
|
|
963
|
+
return cmd("POST", "/erp-submissions", void 0, body);
|
|
964
|
+
}
|
|
965
|
+
function readErpSubmissionHistory(collection, item) {
|
|
966
|
+
return cmd("GET", `/erp-submissions/${collection}/${item}`);
|
|
967
|
+
}
|
|
968
|
+
function retryErpSubmission(id) {
|
|
969
|
+
return cmd("POST", `/erp-submissions/${id}/retry`);
|
|
970
|
+
}
|
|
971
|
+
function updateErpSubmissionStatus(id, status, externalRef) {
|
|
972
|
+
return cmd("PATCH", `/erp-submissions/${id}/status`, void 0, {
|
|
973
|
+
status,
|
|
974
|
+
...externalRef !== void 0 ? { external_ref: externalRef } : {}
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
function listPdfTemplates(collection) {
|
|
978
|
+
return cmd("GET", "/pdf-templates", collection ? { collection } : void 0);
|
|
979
|
+
}
|
|
980
|
+
function readPdfTemplate(id) {
|
|
981
|
+
return cmd("GET", `/pdf-templates/${id}`);
|
|
982
|
+
}
|
|
983
|
+
function createPdfTemplate(body) {
|
|
984
|
+
return cmd("POST", "/pdf-templates", void 0, body);
|
|
985
|
+
}
|
|
986
|
+
function updatePdfTemplate(id, body) {
|
|
987
|
+
return cmd("PATCH", `/pdf-templates/${id}`, void 0, body);
|
|
988
|
+
}
|
|
989
|
+
function deletePdfTemplate(id) {
|
|
990
|
+
return cmd("DELETE", `/pdf-templates/${id}`);
|
|
991
|
+
}
|
|
992
|
+
function renderPdfTemplate(id, body) {
|
|
993
|
+
return cmd("POST", `/pdf-templates/${id}/render`, void 0, body);
|
|
994
|
+
}
|
|
995
|
+
function listPages() {
|
|
996
|
+
return cmd("GET", "/pages");
|
|
997
|
+
}
|
|
998
|
+
function readPage(slug) {
|
|
999
|
+
return cmd("GET", `/pages/${slug}`);
|
|
1000
|
+
}
|
|
1001
|
+
function createPage(body) {
|
|
1002
|
+
return cmd("POST", "/pages", void 0, body);
|
|
1003
|
+
}
|
|
1004
|
+
function updatePage(id, body) {
|
|
1005
|
+
return cmd("PATCH", `/pages/${id}`, void 0, body);
|
|
1006
|
+
}
|
|
1007
|
+
function deletePage(id) {
|
|
1008
|
+
return cmd("DELETE", `/pages/${id}`);
|
|
1009
|
+
}
|
|
1010
|
+
function readPageWidgetData(slug, widgetId) {
|
|
1011
|
+
return cmd("POST", `/pages/${slug}/widget-data`, void 0, { widget_id: widgetId });
|
|
1012
|
+
}
|
|
1013
|
+
function setupTwoFactor() {
|
|
1014
|
+
return cmd("POST", "/two-factor/setup");
|
|
1015
|
+
}
|
|
1016
|
+
function verifyTwoFactor(token) {
|
|
1017
|
+
return cmd("POST", "/two-factor/verify", void 0, { token });
|
|
1018
|
+
}
|
|
1019
|
+
function disableTwoFactor(token) {
|
|
1020
|
+
return cmd("POST", "/two-factor/disable", void 0, { token });
|
|
1021
|
+
}
|
|
1022
|
+
function readTwoFactorStatus() {
|
|
1023
|
+
return cmd("GET", "/two-factor/status");
|
|
1024
|
+
}
|
|
1025
|
+
function readSettings() {
|
|
1026
|
+
return cmd("GET", "/settings");
|
|
1027
|
+
}
|
|
1028
|
+
function updateSettings(body) {
|
|
1029
|
+
return cmd("PATCH", "/settings", void 0, body);
|
|
1030
|
+
}
|
|
1031
|
+
function listWidgetFeeds() {
|
|
1032
|
+
return cmd("GET", "/widget");
|
|
1033
|
+
}
|
|
1034
|
+
function createWidgetFeed(body) {
|
|
1035
|
+
return cmd("POST", "/widget", void 0, body);
|
|
1036
|
+
}
|
|
1037
|
+
function updateWidgetFeed(id, body) {
|
|
1038
|
+
return cmd("PATCH", `/widget/${id}`, void 0, body);
|
|
1039
|
+
}
|
|
1040
|
+
function deleteWidgetFeed(id) {
|
|
1041
|
+
return cmd("DELETE", `/widget/${id}`);
|
|
1042
|
+
}
|
|
1043
|
+
function rotateWidgetFeedToken(id) {
|
|
1044
|
+
return cmd("POST", `/widget/${id}/rotate-token`);
|
|
1045
|
+
}
|
|
1046
|
+
function listRetentionPolicies() {
|
|
1047
|
+
return cmd("GET", "/retention");
|
|
1048
|
+
}
|
|
1049
|
+
function getRetentionPolicy(id) {
|
|
1050
|
+
return cmd("GET", `/retention/${id}`);
|
|
1051
|
+
}
|
|
1052
|
+
function createRetentionPolicy(body) {
|
|
1053
|
+
return cmd("POST", "/retention", void 0, body);
|
|
1054
|
+
}
|
|
1055
|
+
function updateRetentionPolicy(id, body) {
|
|
1056
|
+
return cmd("PATCH", `/retention/${id}`, void 0, body);
|
|
1057
|
+
}
|
|
1058
|
+
function deleteRetentionPolicy(id) {
|
|
1059
|
+
return cmd("DELETE", `/retention/${id}`);
|
|
1060
|
+
}
|
|
1061
|
+
function runRetentionPolicy(id, dryRun = false) {
|
|
1062
|
+
return cmd("POST", `/retention/${id}/run`, dryRun ? { dry_run: "true" } : void 0);
|
|
1063
|
+
}
|
|
1064
|
+
function listRetentionRuns(policyId) {
|
|
1065
|
+
return cmd("GET", `/retention/${policyId}/runs`);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
// src/commands/queues.ts
|
|
1069
|
+
function listQueues() {
|
|
1070
|
+
return cmd("GET", "/queues");
|
|
1071
|
+
}
|
|
1072
|
+
function readQueue(id) {
|
|
1073
|
+
return cmd("GET", `/queues/${id}`);
|
|
1074
|
+
}
|
|
1075
|
+
function createQueue(data) {
|
|
1076
|
+
return cmd("POST", "/queues", void 0, data);
|
|
1077
|
+
}
|
|
1078
|
+
function updateQueue(id, data) {
|
|
1079
|
+
return cmd("PATCH", `/queues/${id}`, void 0, data);
|
|
1080
|
+
}
|
|
1081
|
+
function deleteQueue(id) {
|
|
1082
|
+
return cmd("DELETE", `/queues/${id}`);
|
|
1083
|
+
}
|
|
1084
|
+
function updateQueueSources(id, sources) {
|
|
1085
|
+
return cmd("PATCH", `/queues/${id}/sources`, void 0, { sources });
|
|
1086
|
+
}
|
|
1087
|
+
function rematerializeQueue(id) {
|
|
1088
|
+
return cmd("POST", `/queues/${id}/rematerialize`);
|
|
1089
|
+
}
|
|
1090
|
+
function readQueueItems(id, options = {}) {
|
|
1091
|
+
const { filters, ...rest } = options;
|
|
1092
|
+
return cmd("GET", `/queues/${id}/items`, {
|
|
1093
|
+
...rest,
|
|
1094
|
+
...filters ? { filters: JSON.stringify(filters) } : {}
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
function readQueueWorkload(id) {
|
|
1098
|
+
return cmd("GET", `/queues/${id}/workload`);
|
|
1099
|
+
}
|
|
1100
|
+
function readQueueTrends(id, options = {}) {
|
|
1101
|
+
return cmd("GET", `/queues/${id}/trends`, options);
|
|
1102
|
+
}
|
|
1103
|
+
function suggestQueueLabels(id, options = { collection: "" }) {
|
|
1104
|
+
return cmd("GET", `/queues/${id}/label-suggest`, options);
|
|
1105
|
+
}
|
|
1106
|
+
function readQueueCollectionStates(collection) {
|
|
1107
|
+
return cmd("GET", `/queues/collection-states/${collection}`);
|
|
1108
|
+
}
|
|
1109
|
+
function claimQueueItem(id, item) {
|
|
1110
|
+
return cmd("POST", `/queues/${id}/claim`, void 0, item);
|
|
1111
|
+
}
|
|
1112
|
+
function releaseQueueItem(id, item) {
|
|
1113
|
+
return cmd("POST", `/queues/${id}/release`, void 0, item);
|
|
1114
|
+
}
|
|
1115
|
+
function listQueueViews(id) {
|
|
1116
|
+
return cmd("GET", `/queues/${id}/views`);
|
|
1117
|
+
}
|
|
1118
|
+
function createQueueView(id, data) {
|
|
1119
|
+
return cmd("POST", `/queues/${id}/views`, void 0, data);
|
|
1120
|
+
}
|
|
1121
|
+
function updateQueueView(viewId, data) {
|
|
1122
|
+
return cmd("PATCH", `/queues/views/${viewId}`, void 0, data);
|
|
1123
|
+
}
|
|
1124
|
+
function deleteQueueView(viewId) {
|
|
1125
|
+
return cmd("DELETE", `/queues/views/${viewId}`);
|
|
1126
|
+
}
|
|
1127
|
+
function readQueueColumnPrefs(id) {
|
|
1128
|
+
return cmd("GET", `/queues/${id}/column-prefs`);
|
|
1129
|
+
}
|
|
1130
|
+
function setQueueDefaultView(id, viewId) {
|
|
1131
|
+
return cmd("PUT", `/queues/${id}/default-view`, void 0, { view_id: viewId });
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
// src/presence.ts
|
|
1135
|
+
var STORAGE_KEY = "nvr_presence_sid";
|
|
1136
|
+
function generateId() {
|
|
1137
|
+
if (typeof crypto !== "undefined" && "randomUUID" in crypto) {
|
|
1138
|
+
return crypto.randomUUID();
|
|
1139
|
+
}
|
|
1140
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
1141
|
+
const r = Math.random() * 16 | 0;
|
|
1142
|
+
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
function detectDeviceType() {
|
|
1146
|
+
if (typeof navigator === "undefined") return "desktop";
|
|
1147
|
+
const ua = navigator.userAgent;
|
|
1148
|
+
if (/tablet|ipad|playbook|silk/i.test(ua)) return "tablet";
|
|
1149
|
+
if (/mobile|iphone|ipod|android|blackberry/i.test(ua)) return "mobile";
|
|
1150
|
+
return "desktop";
|
|
1151
|
+
}
|
|
1152
|
+
function createPresence(options) {
|
|
1153
|
+
const { pingInterval = 3e4 } = options;
|
|
1154
|
+
const base = options.apiUrl.replace(/\/$/, "");
|
|
1155
|
+
let userId = options.userId ?? null;
|
|
1156
|
+
let userEmail = options.userEmail ?? null;
|
|
1157
|
+
let userName = options.userName ?? null;
|
|
1158
|
+
let sessionId;
|
|
1159
|
+
try {
|
|
1160
|
+
sessionId = typeof localStorage !== "undefined" && localStorage.getItem(STORAGE_KEY) || generateId();
|
|
1161
|
+
if (typeof localStorage !== "undefined") localStorage.setItem(STORAGE_KEY, sessionId);
|
|
1162
|
+
} catch {
|
|
1163
|
+
sessionId = generateId();
|
|
1164
|
+
}
|
|
1165
|
+
function buildPayload() {
|
|
1166
|
+
return {
|
|
1167
|
+
sessionId,
|
|
1168
|
+
userId,
|
|
1169
|
+
userEmail,
|
|
1170
|
+
userName,
|
|
1171
|
+
pageUrl: typeof location !== "undefined" ? location.href : null,
|
|
1172
|
+
pageTitle: typeof document !== "undefined" ? document.title : null,
|
|
1173
|
+
referrer: typeof document !== "undefined" ? document.referrer || null : null,
|
|
1174
|
+
deviceType: detectDeviceType(),
|
|
1175
|
+
screenWidth: typeof screen !== "undefined" ? screen.width : null,
|
|
1176
|
+
screenHeight: typeof screen !== "undefined" ? screen.height : null,
|
|
1177
|
+
viewportWidth: typeof window !== "undefined" ? window.innerWidth : null,
|
|
1178
|
+
viewportHeight: typeof window !== "undefined" ? window.innerHeight : null
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
function sendPayload(path, data) {
|
|
1182
|
+
const url = `${base}${path}`;
|
|
1183
|
+
const body = JSON.stringify(data);
|
|
1184
|
+
try {
|
|
1185
|
+
if (typeof navigator !== "undefined" && "sendBeacon" in navigator) {
|
|
1186
|
+
;
|
|
1187
|
+
navigator.sendBeacon(
|
|
1188
|
+
url,
|
|
1189
|
+
new Blob([body], { type: "application/json" })
|
|
1190
|
+
);
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
} catch {
|
|
1194
|
+
}
|
|
1195
|
+
fetch(url, {
|
|
1196
|
+
method: "POST",
|
|
1197
|
+
headers: { "Content-Type": "application/json" },
|
|
1198
|
+
body,
|
|
1199
|
+
keepalive: true
|
|
1200
|
+
}).catch(() => {
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
function ping() {
|
|
1204
|
+
sendPayload("/api/presence/ping", buildPayload());
|
|
1205
|
+
}
|
|
1206
|
+
function disconnect() {
|
|
1207
|
+
sendPayload("/api/presence/disconnect", { sessionId });
|
|
1208
|
+
}
|
|
1209
|
+
function setUser(id, email, name) {
|
|
1210
|
+
userId = id;
|
|
1211
|
+
userEmail = email ?? null;
|
|
1212
|
+
userName = name ?? null;
|
|
1213
|
+
}
|
|
1214
|
+
ping();
|
|
1215
|
+
const timer = setInterval(ping, pingInterval);
|
|
1216
|
+
const visHandler = () => {
|
|
1217
|
+
if (typeof document !== "undefined" && document.visibilityState === "visible") ping();
|
|
1218
|
+
};
|
|
1219
|
+
const popHandler = () => setTimeout(ping, 100);
|
|
1220
|
+
const unloadHandler = () => disconnect();
|
|
1221
|
+
if (typeof document !== "undefined") document.addEventListener("visibilitychange", visHandler);
|
|
1222
|
+
if (typeof window !== "undefined") {
|
|
1223
|
+
window.addEventListener("popstate", popHandler);
|
|
1224
|
+
window.addEventListener("pagehide", unloadHandler);
|
|
1225
|
+
}
|
|
1226
|
+
if (typeof history !== "undefined") {
|
|
1227
|
+
let lastUrl = typeof location !== "undefined" ? location.href : "";
|
|
1228
|
+
const orig = history.pushState.bind(history);
|
|
1229
|
+
history.pushState = (...args) => {
|
|
1230
|
+
orig(...args);
|
|
1231
|
+
if (typeof location !== "undefined" && location.href !== lastUrl) {
|
|
1232
|
+
lastUrl = location.href;
|
|
1233
|
+
setTimeout(ping, 100);
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
function destroy() {
|
|
1238
|
+
clearInterval(timer);
|
|
1239
|
+
disconnect();
|
|
1240
|
+
if (typeof document !== "undefined")
|
|
1241
|
+
document.removeEventListener("visibilitychange", visHandler);
|
|
1242
|
+
if (typeof window !== "undefined") {
|
|
1243
|
+
window.removeEventListener("popstate", popHandler);
|
|
1244
|
+
window.removeEventListener("pagehide", unloadHandler);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
return { ping, disconnect, setUser, destroy, sessionId };
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// src/realtime.ts
|
|
1251
|
+
import { io } from "socket.io-client";
|
|
1252
|
+
function createRealtime() {
|
|
1253
|
+
let socket = null;
|
|
1254
|
+
const subs = /* @__PURE__ */ new Map();
|
|
1255
|
+
const connectHandlers = [];
|
|
1256
|
+
const disconnectHandlers = [];
|
|
1257
|
+
function subscriptionKey(collection, event) {
|
|
1258
|
+
return event ? `${collection}:${event}` : `${collection}:*`;
|
|
1259
|
+
}
|
|
1260
|
+
return {
|
|
1261
|
+
get connected() {
|
|
1262
|
+
return socket?.connected ?? false;
|
|
1263
|
+
},
|
|
1264
|
+
connect(url, token) {
|
|
1265
|
+
if (socket?.connected) return;
|
|
1266
|
+
socket = io(url.replace(/\/$/, ""), {
|
|
1267
|
+
path: "/socket.io",
|
|
1268
|
+
auth: token ? { token } : void 0,
|
|
1269
|
+
withCredentials: true,
|
|
1270
|
+
transports: ["websocket"]
|
|
1271
|
+
});
|
|
1272
|
+
socket.on("connect", () => {
|
|
1273
|
+
for (const fn of connectHandlers) fn();
|
|
1274
|
+
for (const sub of subs.values()) {
|
|
1275
|
+
socket?.emit("subscribe", {
|
|
1276
|
+
collection: sub.collection,
|
|
1277
|
+
event: sub.event
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
socket.on("disconnect", (reason) => {
|
|
1282
|
+
for (const fn of disconnectHandlers) fn(reason);
|
|
1283
|
+
});
|
|
1284
|
+
socket.on("items:create", ({ collection, data }) => {
|
|
1285
|
+
const cb = subs.get(subscriptionKey(collection, "create"))?.callback ?? subs.get(subscriptionKey(collection))?.callback;
|
|
1286
|
+
cb?.(data);
|
|
1287
|
+
});
|
|
1288
|
+
socket.on("items:update", ({ collection, data }) => {
|
|
1289
|
+
const cb = subs.get(subscriptionKey(collection, "update"))?.callback ?? subs.get(subscriptionKey(collection))?.callback;
|
|
1290
|
+
cb?.(data);
|
|
1291
|
+
});
|
|
1292
|
+
socket.on("items:delete", ({ collection, ids }) => {
|
|
1293
|
+
const cb = subs.get(subscriptionKey(collection, "delete"))?.callback ?? subs.get(subscriptionKey(collection))?.callback;
|
|
1294
|
+
cb?.(ids);
|
|
1295
|
+
});
|
|
1296
|
+
socket.on("notification", (data) => {
|
|
1297
|
+
const cb = subs.get("cms_notifications:*")?.callback;
|
|
1298
|
+
cb?.([data]);
|
|
1299
|
+
});
|
|
1300
|
+
},
|
|
1301
|
+
disconnect() {
|
|
1302
|
+
socket?.disconnect();
|
|
1303
|
+
socket = null;
|
|
1304
|
+
},
|
|
1305
|
+
subscribe(collection, opts, callback) {
|
|
1306
|
+
const key = subscriptionKey(collection, opts.event);
|
|
1307
|
+
subs.set(key, { collection, event: opts.event, callback });
|
|
1308
|
+
if (socket?.connected) {
|
|
1309
|
+
socket.emit("subscribe", { collection, event: opts.event, query: opts.query });
|
|
1310
|
+
}
|
|
1311
|
+
return () => {
|
|
1312
|
+
subs.delete(key);
|
|
1313
|
+
if (socket?.connected) {
|
|
1314
|
+
socket.emit("unsubscribe", { collection, event: opts.event });
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
},
|
|
1318
|
+
onConnect(fn) {
|
|
1319
|
+
connectHandlers.push(fn);
|
|
1320
|
+
},
|
|
1321
|
+
onDisconnect(fn) {
|
|
1322
|
+
disconnectHandlers.push(fn);
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
// src/index.ts
|
|
1328
|
+
function readItems(collection, query) {
|
|
1329
|
+
const params = {};
|
|
1330
|
+
if (query?.fields?.length) params.fields = query.fields.join(",");
|
|
1331
|
+
if (query?.filter) params.filter = JSON.stringify(query.filter);
|
|
1332
|
+
if (query?.sort?.length) params.sort = query.sort.join(",");
|
|
1333
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
1334
|
+
if (query?.offset != null) params.offset = query.offset;
|
|
1335
|
+
if (query?.page != null) params.page = query.page;
|
|
1336
|
+
if (query?.search) params.search = query.search;
|
|
1337
|
+
return cmd("GET", `/items/${collection}`, params);
|
|
1338
|
+
}
|
|
1339
|
+
function readItem(collection, id) {
|
|
1340
|
+
return cmd("GET", `/items/${collection}/${id}`);
|
|
1341
|
+
}
|
|
1342
|
+
function createItem(collection, data) {
|
|
1343
|
+
return cmd("POST", `/items/${collection}`, void 0, data);
|
|
1344
|
+
}
|
|
1345
|
+
function updateItem(collection, id, data) {
|
|
1346
|
+
return cmd("PATCH", `/items/${collection}/${id}`, void 0, data);
|
|
1347
|
+
}
|
|
1348
|
+
function deleteItem(collection, id) {
|
|
1349
|
+
return cmd("DELETE", `/items/${collection}/${id}`);
|
|
1350
|
+
}
|
|
1351
|
+
function readSingleton(collection) {
|
|
1352
|
+
return cmd("GET", `/items/${collection}`);
|
|
1353
|
+
}
|
|
1354
|
+
function updateSingleton(collection, data) {
|
|
1355
|
+
return cmd("PATCH", `/items/${collection}`, void 0, data);
|
|
1356
|
+
}
|
|
1357
|
+
function readMe() {
|
|
1358
|
+
return cmd("GET", "/auth/me");
|
|
1359
|
+
}
|
|
1360
|
+
function updateMe(data) {
|
|
1361
|
+
return cmd("PATCH", "/auth/me", void 0, data);
|
|
1362
|
+
}
|
|
1363
|
+
function readUsers(query) {
|
|
1364
|
+
const params = {};
|
|
1365
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
1366
|
+
if (query?.offset != null) params.offset = query.offset;
|
|
1367
|
+
if (query?.filter) params.filter = JSON.stringify(query.filter);
|
|
1368
|
+
if (query?.sort?.length) params.sort = query.sort.join(",");
|
|
1369
|
+
if (query?.search) params.search = query.search;
|
|
1370
|
+
return cmd("GET", "/users", params);
|
|
1371
|
+
}
|
|
1372
|
+
function generateToken() {
|
|
1373
|
+
return cmd("POST", "/users/me/token");
|
|
1374
|
+
}
|
|
1375
|
+
function revokeToken() {
|
|
1376
|
+
return cmd("DELETE", "/users/me/token");
|
|
1377
|
+
}
|
|
1378
|
+
function generateUserToken(userId) {
|
|
1379
|
+
return cmd("POST", `/users/${userId}/token`);
|
|
1380
|
+
}
|
|
1381
|
+
function revokeUserToken(userId) {
|
|
1382
|
+
return cmd("DELETE", `/users/${userId}/token`);
|
|
1383
|
+
}
|
|
1384
|
+
function readCollections() {
|
|
1385
|
+
return cmd("GET", "/collections");
|
|
1386
|
+
}
|
|
1387
|
+
function readCollection(collection) {
|
|
1388
|
+
return cmd("GET", `/collections/${collection}`);
|
|
1389
|
+
}
|
|
1390
|
+
function readRevisions(collection, item) {
|
|
1391
|
+
return cmd("GET", "/revisions", { collection, item });
|
|
1392
|
+
}
|
|
1393
|
+
function readRevision(id) {
|
|
1394
|
+
return cmd("GET", `/revisions/${id}`);
|
|
1395
|
+
}
|
|
1396
|
+
function readActivity(query) {
|
|
1397
|
+
const params = {};
|
|
1398
|
+
if (query?.collection) params.collection = query.collection;
|
|
1399
|
+
if (query?.action) params.action = query.action;
|
|
1400
|
+
if (query?.user) params.user = query.user;
|
|
1401
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
1402
|
+
if (query?.offset != null) params.offset = query.offset;
|
|
1403
|
+
return cmd("GET", "/activity", params);
|
|
1404
|
+
}
|
|
1405
|
+
function readWorkflowInstance(collection, item) {
|
|
1406
|
+
return cmd("GET", `/pipelines/instance/${collection}/${item}`);
|
|
1407
|
+
}
|
|
1408
|
+
function startWorkflow(collection, item) {
|
|
1409
|
+
return cmd("POST", `/pipelines/instance/${collection}/${item}/start`);
|
|
1410
|
+
}
|
|
1411
|
+
function transitionWorkflow(collection, item, transitionId, comment) {
|
|
1412
|
+
return cmd("POST", `/pipelines/instance/${collection}/${item}/transition`, void 0, {
|
|
1413
|
+
transition_id: transitionId,
|
|
1414
|
+
...comment ? { comment } : {}
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
function readWorkflowInstances(collection) {
|
|
1418
|
+
return cmd("GET", `/pipelines/instances/${collection}`);
|
|
1419
|
+
}
|
|
1420
|
+
function readWorkflowBindings() {
|
|
1421
|
+
return cmd("GET", "/pipelines/bindings");
|
|
1422
|
+
}
|
|
1423
|
+
function updateWorkflowBinding(bindingId, body) {
|
|
1424
|
+
return cmd("PATCH", `/pipelines/bindings/${bindingId}`, void 0, body);
|
|
1425
|
+
}
|
|
1426
|
+
function readInstanceOwners(collection, item) {
|
|
1427
|
+
return cmd("GET", `/pipelines/instance/${collection}/${item}/owners`);
|
|
1428
|
+
}
|
|
1429
|
+
function addInstanceOwner(collection, item, userId, state) {
|
|
1430
|
+
return cmd("POST", `/pipelines/instance/${collection}/${item}/owners`, void 0, {
|
|
1431
|
+
user: userId,
|
|
1432
|
+
...state !== void 0 ? { state } : {}
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
function readStateOwners(collection, item, stateId) {
|
|
1436
|
+
return cmd("GET", `/pipelines/instance/${collection}/${item}/owners/${stateId}`);
|
|
1437
|
+
}
|
|
1438
|
+
function readAllStateOwners(collection, item) {
|
|
1439
|
+
return cmd("GET", `/pipelines/instance/${collection}/${item}/owners/all`);
|
|
1440
|
+
}
|
|
1441
|
+
function removeInstanceOwner(ownerId) {
|
|
1442
|
+
return cmd("DELETE", `/pipelines/instance-owners/${ownerId}`);
|
|
1443
|
+
}
|
|
1444
|
+
function readPipelineTemplates() {
|
|
1445
|
+
return cmd("GET", "/pipelines");
|
|
1446
|
+
}
|
|
1447
|
+
function readPipelineTemplate(id) {
|
|
1448
|
+
return cmd("GET", `/pipelines/${id}`);
|
|
1449
|
+
}
|
|
1450
|
+
function readOwnerGroups(templateId) {
|
|
1451
|
+
return cmd("GET", `/pipelines/${templateId}/owner-groups`);
|
|
1452
|
+
}
|
|
1453
|
+
function readStateOwnerGroups(stateId) {
|
|
1454
|
+
return cmd("GET", `/pipelines/states/${stateId}/owner-groups`);
|
|
1455
|
+
}
|
|
1456
|
+
function listExternalApis() {
|
|
1457
|
+
return cmd("GET", "/external-apis");
|
|
1458
|
+
}
|
|
1459
|
+
function getExternalApi(id) {
|
|
1460
|
+
return cmd("GET", `/external-apis/${id}`);
|
|
1461
|
+
}
|
|
1462
|
+
function createExternalApi(body) {
|
|
1463
|
+
return cmd("POST", "/external-apis", void 0, body);
|
|
1464
|
+
}
|
|
1465
|
+
function updateExternalApi(id, body) {
|
|
1466
|
+
return cmd("PATCH", `/external-apis/${id}`, void 0, body);
|
|
1467
|
+
}
|
|
1468
|
+
function deleteExternalApi(id) {
|
|
1469
|
+
return cmd("DELETE", `/external-apis/${id}`);
|
|
1470
|
+
}
|
|
1471
|
+
function testExternalApi(id, options) {
|
|
1472
|
+
return cmd("POST", `/external-apis/${id}/test`, void 0, options ?? {});
|
|
1473
|
+
}
|
|
1474
|
+
function listExternalApiEndpoints(apiId) {
|
|
1475
|
+
return cmd("GET", `/external-apis/${apiId}/endpoints`);
|
|
1476
|
+
}
|
|
1477
|
+
function getExternalApiEndpoint(apiId, endpointId) {
|
|
1478
|
+
return cmd("GET", `/external-apis/${apiId}/endpoints/${endpointId}`);
|
|
1479
|
+
}
|
|
1480
|
+
function createExternalApiEndpoint(apiId, body) {
|
|
1481
|
+
return cmd("POST", `/external-apis/${apiId}/endpoints`, void 0, body);
|
|
1482
|
+
}
|
|
1483
|
+
function updateExternalApiEndpoint(endpointId, body) {
|
|
1484
|
+
return cmd("PATCH", `/external-apis/endpoints/${endpointId}`, void 0, body);
|
|
1485
|
+
}
|
|
1486
|
+
function deleteExternalApiEndpoint(endpointId) {
|
|
1487
|
+
return cmd("DELETE", `/external-apis/endpoints/${endpointId}`);
|
|
1488
|
+
}
|
|
1489
|
+
function callExternalApiEndpoint(slugOrId, options) {
|
|
1490
|
+
return cmd("POST", `/external-apis/endpoints/${slugOrId}/call`, void 0, options ?? {});
|
|
1491
|
+
}
|
|
1492
|
+
function callExternalApi(apiId, options) {
|
|
1493
|
+
return cmd("POST", `/external-apis/${apiId}/call`, void 0, options ?? {});
|
|
1494
|
+
}
|
|
1495
|
+
function importExternalApiSpec(apiId, spec) {
|
|
1496
|
+
return cmd("POST", `/external-apis/${apiId}/import-spec`, void 0, { spec });
|
|
1497
|
+
}
|
|
1498
|
+
function listExternalApiSchemas(apiId) {
|
|
1499
|
+
return cmd("GET", `/external-apis/${apiId}/schemas`);
|
|
1500
|
+
}
|
|
1501
|
+
function deleteExternalApiSchema(apiId, schemaId) {
|
|
1502
|
+
return cmd("DELETE", `/external-apis/${apiId}/schemas/${schemaId}`);
|
|
1503
|
+
}
|
|
1504
|
+
function getPickerExclusionStatus(collection, itemId) {
|
|
1505
|
+
return cmd("GET", `/picker-exclusions/status/${collection}/${itemId}`);
|
|
1506
|
+
}
|
|
1507
|
+
function excludeFromPicker(collection, itemId) {
|
|
1508
|
+
return cmd("POST", "/picker-exclusions", void 0, { collection, item_id: itemId });
|
|
1509
|
+
}
|
|
1510
|
+
function includeInPicker(collection, itemId) {
|
|
1511
|
+
return cmd("DELETE", "/picker-exclusions", void 0, { collection, item_id: itemId });
|
|
1512
|
+
}
|
|
1513
|
+
function batchPickerExclusionStatus(collection, ids) {
|
|
1514
|
+
return cmd("POST", "/picker-exclusions/batch-status", void 0, { collection, ids });
|
|
1515
|
+
}
|
|
1516
|
+
function bulkPickerExclusion(collection, ids, exclude) {
|
|
1517
|
+
return cmd("POST", "/picker-exclusions/bulk", void 0, { collection, ids, exclude });
|
|
1518
|
+
}
|
|
1519
|
+
function listWebhooks() {
|
|
1520
|
+
return cmd("GET", "/webhooks");
|
|
1521
|
+
}
|
|
1522
|
+
function getWebhook(id) {
|
|
1523
|
+
return cmd("GET", `/webhooks/${id}`);
|
|
1524
|
+
}
|
|
1525
|
+
function createWebhook(body) {
|
|
1526
|
+
return cmd("POST", "/webhooks", void 0, body);
|
|
1527
|
+
}
|
|
1528
|
+
function updateWebhook(id, body) {
|
|
1529
|
+
return cmd("PATCH", `/webhooks/${id}`, void 0, body);
|
|
1530
|
+
}
|
|
1531
|
+
function deleteWebhook(id) {
|
|
1532
|
+
return cmd("DELETE", `/webhooks/${id}`);
|
|
1533
|
+
}
|
|
1534
|
+
function testWebhook(id) {
|
|
1535
|
+
return cmd("POST", `/webhooks/${id}/test`);
|
|
1536
|
+
}
|
|
1537
|
+
function listComments(collection, item) {
|
|
1538
|
+
return cmd("GET", "/comments", { collection, item });
|
|
1539
|
+
}
|
|
1540
|
+
function createComment(body) {
|
|
1541
|
+
return cmd("POST", "/comments", void 0, body);
|
|
1542
|
+
}
|
|
1543
|
+
function updateComment(id, body) {
|
|
1544
|
+
return cmd("PATCH", `/comments/${id}`, void 0, body);
|
|
1545
|
+
}
|
|
1546
|
+
function deleteComment(id) {
|
|
1547
|
+
return cmd("DELETE", `/comments/${id}`);
|
|
1548
|
+
}
|
|
1549
|
+
function listFlowRuns(flowId, params) {
|
|
1550
|
+
const p = {};
|
|
1551
|
+
if (params?.limit != null) p.limit = params.limit;
|
|
1552
|
+
if (params?.offset != null) p.offset = params.offset;
|
|
1553
|
+
if (params?.status) p.status = params.status;
|
|
1554
|
+
return cmd("GET", `/flows/${flowId}/runs`, p);
|
|
1555
|
+
}
|
|
1556
|
+
function getFlowRun(runId) {
|
|
1557
|
+
return cmd("GET", `/flows/runs/${runId}`);
|
|
1558
|
+
}
|
|
1559
|
+
function listCustomQueries() {
|
|
1560
|
+
return cmd("GET", "/custom-queries");
|
|
1561
|
+
}
|
|
1562
|
+
function executeCustomQuery(slug, params) {
|
|
1563
|
+
return cmd("POST", `/custom-queries/${slug}/execute`, void 0, { params });
|
|
1564
|
+
}
|
|
1565
|
+
function listBlackoutDates(scope) {
|
|
1566
|
+
return cmd("GET", "/blackout-dates", scope ? { scope } : void 0);
|
|
1567
|
+
}
|
|
1568
|
+
function checkBlackoutDate(date, scope) {
|
|
1569
|
+
return cmd("GET", "/blackout-dates/check", scope ? { date, scope } : { date });
|
|
1570
|
+
}
|
|
1571
|
+
function createBlackoutDate(body) {
|
|
1572
|
+
return cmd("POST", "/blackout-dates", void 0, body);
|
|
1573
|
+
}
|
|
1574
|
+
function deleteBlackoutDate(id) {
|
|
1575
|
+
return cmd("DELETE", `/blackout-dates/${id}`);
|
|
1576
|
+
}
|
|
1577
|
+
function exportSchemaSnapshot() {
|
|
1578
|
+
return cmd("GET", "/schema-snapshot/export");
|
|
1579
|
+
}
|
|
1580
|
+
function importSchemaSnapshot(snapshot) {
|
|
1581
|
+
return cmd("POST", "/schema-snapshot/import", void 0, snapshot);
|
|
1582
|
+
}
|
|
1583
|
+
function listRules(collection) {
|
|
1584
|
+
return cmd("GET", "/rules", collection ? { collection } : void 0);
|
|
1585
|
+
}
|
|
1586
|
+
function createRule(body) {
|
|
1587
|
+
return cmd("POST", "/rules", void 0, body);
|
|
1588
|
+
}
|
|
1589
|
+
function updateRule(id, body) {
|
|
1590
|
+
return cmd("PATCH", `/rules/${id}`, void 0, body);
|
|
1591
|
+
}
|
|
1592
|
+
function deleteRule(id) {
|
|
1593
|
+
return cmd("DELETE", `/rules/${id}`);
|
|
1594
|
+
}
|
|
1595
|
+
function listAlertDefinitions(collection) {
|
|
1596
|
+
return cmd("GET", "/alerts/definitions", collection ? { collection } : void 0);
|
|
1597
|
+
}
|
|
1598
|
+
function getAlertDefinition(id) {
|
|
1599
|
+
return cmd("GET", `/alerts/definitions/${id}`);
|
|
1600
|
+
}
|
|
1601
|
+
function createAlertDefinition(body) {
|
|
1602
|
+
return cmd("POST", "/alerts/definitions", void 0, body);
|
|
1603
|
+
}
|
|
1604
|
+
function updateAlertDefinition(id, body) {
|
|
1605
|
+
return cmd("PATCH", `/alerts/definitions/${id}`, void 0, body);
|
|
1606
|
+
}
|
|
1607
|
+
function deleteAlertDefinition(id) {
|
|
1608
|
+
return cmd("DELETE", `/alerts/definitions/${id}`);
|
|
1609
|
+
}
|
|
1610
|
+
function listAlertSubscriptions() {
|
|
1611
|
+
return cmd("GET", "/alerts/subscriptions");
|
|
1612
|
+
}
|
|
1613
|
+
function createAlertSubscription(body) {
|
|
1614
|
+
return cmd("POST", "/alerts/subscriptions", void 0, body);
|
|
1615
|
+
}
|
|
1616
|
+
function deleteAlertSubscription(id) {
|
|
1617
|
+
return cmd("DELETE", `/alerts/subscriptions/${id}`);
|
|
1618
|
+
}
|
|
1619
|
+
function readAlertLog(definitionId) {
|
|
1620
|
+
return cmd("GET", "/alerts/log", definitionId != null ? { definition: definitionId } : void 0);
|
|
1621
|
+
}
|
|
1622
|
+
function evaluateAlerts() {
|
|
1623
|
+
return cmd("POST", "/alerts/evaluate");
|
|
1624
|
+
}
|
|
1625
|
+
function listAttributeDefinitions(collection) {
|
|
1626
|
+
return cmd("GET", "/attribute-definitions", collection ? { collection } : void 0);
|
|
1627
|
+
}
|
|
1628
|
+
function createAttributeDefinition(body) {
|
|
1629
|
+
return cmd("POST", "/attribute-definitions", void 0, body);
|
|
1630
|
+
}
|
|
1631
|
+
function updateAttributeDefinition(id, body) {
|
|
1632
|
+
return cmd("PATCH", `/attribute-definitions/${id}`, void 0, body);
|
|
1633
|
+
}
|
|
1634
|
+
function deleteAttributeDefinition(id) {
|
|
1635
|
+
return cmd("DELETE", `/attribute-definitions/${id}`);
|
|
1636
|
+
}
|
|
1637
|
+
function getAttributeValues(collection, itemId) {
|
|
1638
|
+
return cmd("GET", `/attributes/${collection}/${itemId}`);
|
|
1639
|
+
}
|
|
1640
|
+
function updateAttributeValues(collection, itemId, values) {
|
|
1641
|
+
return cmd("PATCH", `/attributes/${collection}/${itemId}`, void 0, values);
|
|
1642
|
+
}
|
|
1643
|
+
function listNotificationSubscriptions() {
|
|
1644
|
+
return cmd("GET", "/notification-subscriptions");
|
|
1645
|
+
}
|
|
1646
|
+
function createNotificationSubscription(body) {
|
|
1647
|
+
return cmd("POST", "/notification-subscriptions", void 0, body);
|
|
1648
|
+
}
|
|
1649
|
+
function updateNotificationSubscription(id, body) {
|
|
1650
|
+
return cmd("PATCH", `/notification-subscriptions/${id}`, void 0, body);
|
|
1651
|
+
}
|
|
1652
|
+
function deleteNotificationSubscription(id) {
|
|
1653
|
+
return cmd("DELETE", `/notification-subscriptions/${id}`);
|
|
1654
|
+
}
|
|
1655
|
+
function runActivityReport(query) {
|
|
1656
|
+
const params = {};
|
|
1657
|
+
if (query?.collection) params.collection = query.collection;
|
|
1658
|
+
if (query?.user) params.user = query.user;
|
|
1659
|
+
if (query?.action) params.action = query.action;
|
|
1660
|
+
if (query?.from) params.from = query.from;
|
|
1661
|
+
if (query?.to) params.to = query.to;
|
|
1662
|
+
if (query?.page != null) params.page = query.page;
|
|
1663
|
+
if (query?.limit != null) params.limit = query.limit;
|
|
1664
|
+
return cmd("GET", "/reports/activity", Object.keys(params).length ? params : void 0);
|
|
1665
|
+
}
|
|
1666
|
+
function runActivityReportCsv(query) {
|
|
1667
|
+
const params = { format: "csv" };
|
|
1668
|
+
if (query?.collection) params.collection = query.collection;
|
|
1669
|
+
if (query?.user) params.user = query.user;
|
|
1670
|
+
if (query?.action) params.action = query.action;
|
|
1671
|
+
if (query?.from) params.from = query.from;
|
|
1672
|
+
if (query?.to) params.to = query.to;
|
|
1673
|
+
return cmd("GET", "/reports/activity", params);
|
|
1674
|
+
}
|
|
1675
|
+
function readActivityReportSummary(query) {
|
|
1676
|
+
const params = {};
|
|
1677
|
+
if (query?.from) params.from = query.from;
|
|
1678
|
+
if (query?.to) params.to = query.to;
|
|
1679
|
+
return cmd("GET", "/reports/summary", Object.keys(params).length ? params : void 0);
|
|
1680
|
+
}
|
|
1681
|
+
function listSlaRules(workflowTemplateId) {
|
|
1682
|
+
return cmd("GET", "/sla/rules", workflowTemplateId ? { workflow: workflowTemplateId } : void 0);
|
|
1683
|
+
}
|
|
1684
|
+
function getSlaRule(id) {
|
|
1685
|
+
return cmd("GET", `/sla/rules/${id}`);
|
|
1686
|
+
}
|
|
1687
|
+
function createSlaRule(body) {
|
|
1688
|
+
return cmd("POST", "/sla/rules", void 0, body);
|
|
1689
|
+
}
|
|
1690
|
+
function updateSlaRule(id, body) {
|
|
1691
|
+
return cmd("PATCH", `/sla/rules/${id}`, void 0, body);
|
|
1692
|
+
}
|
|
1693
|
+
function deleteSlaRule(id) {
|
|
1694
|
+
return cmd("DELETE", `/sla/rules/${id}`);
|
|
1695
|
+
}
|
|
1696
|
+
function getSlaStatus(collection, itemId) {
|
|
1697
|
+
return cmd("GET", `/sla/status/${collection}/${itemId}`);
|
|
1698
|
+
}
|
|
1699
|
+
function getPresence(collection, itemId) {
|
|
1700
|
+
return cmd("GET", `/presence/${collection}/${itemId}`);
|
|
1701
|
+
}
|
|
1702
|
+
function listActivePresence() {
|
|
1703
|
+
return cmd("GET", "/presence/sessions");
|
|
1704
|
+
}
|
|
1705
|
+
function createNivaro(url, options = {}) {
|
|
1706
|
+
const baseUrl = url.replace(/\/$/, "");
|
|
1707
|
+
const fetcher = options.fetch ?? globalThis.fetch;
|
|
1708
|
+
let currentToken = options.token;
|
|
1709
|
+
function setToken(token) {
|
|
1710
|
+
currentToken = token ?? void 0;
|
|
1711
|
+
}
|
|
1712
|
+
function getToken() {
|
|
1713
|
+
return currentToken;
|
|
1714
|
+
}
|
|
1715
|
+
function authHeaders(json = true) {
|
|
1716
|
+
const h = {};
|
|
1717
|
+
if (json) h["Content-Type"] = "application/json";
|
|
1718
|
+
if (currentToken) h.Authorization = `Bearer ${currentToken}`;
|
|
1719
|
+
return h;
|
|
1720
|
+
}
|
|
1721
|
+
function credentialsMode() {
|
|
1722
|
+
return options.credentials ?? (currentToken ? "omit" : "include");
|
|
1723
|
+
}
|
|
1724
|
+
async function request(command) {
|
|
1725
|
+
const qs = command._params ? "?" + new URLSearchParams(
|
|
1726
|
+
Object.fromEntries(
|
|
1727
|
+
Object.entries(command._params).filter(([, v]) => v != null).map(([k, v]) => [k, String(v)])
|
|
1728
|
+
)
|
|
1729
|
+
).toString() : "";
|
|
1730
|
+
const res = await fetcher(`${baseUrl}/api${command._path}${qs}`, {
|
|
1731
|
+
method: command._method,
|
|
1732
|
+
headers: authHeaders(),
|
|
1733
|
+
credentials: credentialsMode(),
|
|
1734
|
+
body: command._body != null ? JSON.stringify(command._body) : void 0
|
|
1735
|
+
});
|
|
1736
|
+
if (command._method === "DELETE" && res.status === 204) {
|
|
1737
|
+
return void 0;
|
|
1738
|
+
}
|
|
1739
|
+
if (!res.ok) {
|
|
1740
|
+
const err = await res.json().catch(() => ({ error: res.statusText }));
|
|
1741
|
+
throw Object.assign(new Error(err.error ?? res.statusText), {
|
|
1742
|
+
status: res.status,
|
|
1743
|
+
response: err
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
const contentType = res.headers.get("content-type") ?? "";
|
|
1747
|
+
if (!contentType.includes("application/json")) {
|
|
1748
|
+
if (contentType.includes("application/pdf") || contentType.includes("application/octet-stream")) {
|
|
1749
|
+
return await res.arrayBuffer();
|
|
1750
|
+
}
|
|
1751
|
+
return await res.text();
|
|
1752
|
+
}
|
|
1753
|
+
return res.json();
|
|
1754
|
+
}
|
|
1755
|
+
async function upload(file, opts = {}) {
|
|
1756
|
+
const fd = new FormData();
|
|
1757
|
+
fd.append("file", file);
|
|
1758
|
+
if (opts.title) fd.append("title", opts.title);
|
|
1759
|
+
if (opts.folder) fd.append("folder", opts.folder);
|
|
1760
|
+
const res = await fetcher(`${baseUrl}/api/files/upload`, {
|
|
1761
|
+
method: "POST",
|
|
1762
|
+
headers: currentToken ? { Authorization: `Bearer ${currentToken}` } : {},
|
|
1763
|
+
credentials: credentialsMode(),
|
|
1764
|
+
body: fd
|
|
1765
|
+
});
|
|
1766
|
+
if (!res.ok) {
|
|
1767
|
+
const err = await res.json().catch(() => ({ error: res.statusText }));
|
|
1768
|
+
throw Object.assign(new Error(err.error ?? res.statusText), {
|
|
1769
|
+
status: res.status
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
const result = await res.json();
|
|
1773
|
+
return result.data;
|
|
1774
|
+
}
|
|
1775
|
+
function fileUrl(fileId) {
|
|
1776
|
+
return `${baseUrl}/api/files/${fileId}`;
|
|
1777
|
+
}
|
|
1778
|
+
async function importParse(templateId, file, fileName) {
|
|
1779
|
+
const form = new FormData();
|
|
1780
|
+
form.append("file", file, fileName ?? file.name ?? "import.xlsx");
|
|
1781
|
+
const res = await fetcher(`${baseUrl}/api/import-templates/${templateId}/parse`, {
|
|
1782
|
+
method: "POST",
|
|
1783
|
+
headers: currentToken ? { Authorization: `Bearer ${currentToken}` } : {},
|
|
1784
|
+
credentials: credentialsMode(),
|
|
1785
|
+
body: form
|
|
1786
|
+
});
|
|
1787
|
+
const json = await res.json().catch(() => ({ error: res.statusText }));
|
|
1788
|
+
if (!res.ok)
|
|
1789
|
+
throw Object.assign(new Error(json?.error || "Import parse failed"), {
|
|
1790
|
+
status: res.status,
|
|
1791
|
+
issues: json?.issues
|
|
1792
|
+
});
|
|
1793
|
+
return json.data;
|
|
1794
|
+
}
|
|
1795
|
+
async function graphql(query, variables, operationName) {
|
|
1796
|
+
const res = await fetcher(`${baseUrl}/api/graphql`, {
|
|
1797
|
+
method: "POST",
|
|
1798
|
+
headers: authHeaders(),
|
|
1799
|
+
credentials: credentialsMode(),
|
|
1800
|
+
body: JSON.stringify({ query, variables, operationName })
|
|
1801
|
+
});
|
|
1802
|
+
if (!res.ok) {
|
|
1803
|
+
const err = await res.json().catch(() => ({ error: res.statusText }));
|
|
1804
|
+
throw Object.assign(new Error(err.error ?? res.statusText), {
|
|
1805
|
+
status: res.status,
|
|
1806
|
+
response: err
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
const json = await res.json();
|
|
1810
|
+
if (json.errors?.length) {
|
|
1811
|
+
const first = json.errors[0];
|
|
1812
|
+
throw Object.assign(new Error(first.message), {
|
|
1813
|
+
graphqlErrors: json.errors,
|
|
1814
|
+
extensions: first.extensions
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
if (!json.data) throw new Error("GraphQL response contained no data");
|
|
1818
|
+
return json.data;
|
|
1819
|
+
}
|
|
1820
|
+
return { request, graphql, upload, importParse, fileUrl, setToken, getToken, url: baseUrl };
|
|
1821
|
+
}
|
|
1822
|
+
function readTreeConfig(collection) {
|
|
1823
|
+
return cmd("GET", `/tree-configs/by-collection/${collection}`);
|
|
1824
|
+
}
|
|
1825
|
+
function readTreeNodes(collection) {
|
|
1826
|
+
return cmd("GET", `/tree/${collection}/nodes`);
|
|
1827
|
+
}
|
|
1828
|
+
function readTreeNested(collection) {
|
|
1829
|
+
return cmd("GET", `/tree/${collection}/nested`);
|
|
1830
|
+
}
|
|
1831
|
+
function readTreeAncestors(collection, id) {
|
|
1832
|
+
return cmd("GET", `/tree/${collection}/${id}/ancestors`);
|
|
1833
|
+
}
|
|
1834
|
+
function readTreeDescendants(collection, id) {
|
|
1835
|
+
return cmd("GET", `/tree/${collection}/${id}/descendants`);
|
|
1836
|
+
}
|
|
1837
|
+
function readTreeChildren(collection, id) {
|
|
1838
|
+
return cmd("GET", `/tree/${collection}/${id}/children`);
|
|
1839
|
+
}
|
|
1840
|
+
function moveTreeNode(collection, id, parentId) {
|
|
1841
|
+
return cmd("PATCH", `/tree/${collection}/${id}/move`, void 0, { parent_id: parentId });
|
|
1842
|
+
}
|
|
1843
|
+
function reorderTreeSiblings(collection, id, order) {
|
|
1844
|
+
return cmd("PATCH", `/tree/${collection}/${id}/reorder`, void 0, { order });
|
|
1845
|
+
}
|
|
1846
|
+
function rebuildTreePaths(configId) {
|
|
1847
|
+
return cmd("POST", `/tree-configs/${configId}/rebuild-paths`);
|
|
1848
|
+
}
|
|
1849
|
+
function listTreePermissions(collection) {
|
|
1850
|
+
return cmd("GET", "/tree-permissions", collection ? { collection } : void 0);
|
|
1851
|
+
}
|
|
1852
|
+
function createTreePermission(body) {
|
|
1853
|
+
return cmd("POST", "/tree-permissions", void 0, body);
|
|
1854
|
+
}
|
|
1855
|
+
function updateTreePermission(id, body) {
|
|
1856
|
+
return cmd("PATCH", `/tree-permissions/${id}`, void 0, body);
|
|
1857
|
+
}
|
|
1858
|
+
function deleteTreePermission(id) {
|
|
1859
|
+
return cmd("DELETE", `/tree-permissions/${id}`);
|
|
1860
|
+
}
|
|
1861
|
+
function listHierarchyConfigs() {
|
|
1862
|
+
return cmd("GET", "/hierarchy-configs");
|
|
1863
|
+
}
|
|
1864
|
+
function readHierarchyConfig(id) {
|
|
1865
|
+
return cmd("GET", `/hierarchy-configs/${id}`);
|
|
1866
|
+
}
|
|
1867
|
+
function createHierarchyConfig(body) {
|
|
1868
|
+
return cmd("POST", "/hierarchy-configs", void 0, body);
|
|
1869
|
+
}
|
|
1870
|
+
function updateHierarchyConfig(id, body) {
|
|
1871
|
+
return cmd("PATCH", `/hierarchy-configs/${id}`, void 0, body);
|
|
1872
|
+
}
|
|
1873
|
+
function deleteHierarchyConfig(id) {
|
|
1874
|
+
return cmd("DELETE", `/hierarchy-configs/${id}`);
|
|
1875
|
+
}
|
|
1876
|
+
function readHierarchyTree(id) {
|
|
1877
|
+
return cmd("GET", `/hierarchy/${id}/tree`);
|
|
1878
|
+
}
|
|
1879
|
+
function readHierarchyNodes(id) {
|
|
1880
|
+
return cmd("GET", `/hierarchy/${id}/nodes`);
|
|
1881
|
+
}
|
|
1882
|
+
function readHierarchyNodeChildren(hierarchyId, collection, nodeId) {
|
|
1883
|
+
return cmd("GET", `/hierarchy/${hierarchyId}/node/${collection}/${nodeId}/children`);
|
|
1884
|
+
}
|
|
1885
|
+
function readHierarchyNodeAncestors(hierarchyId, collection, nodeId) {
|
|
1886
|
+
return cmd("GET", `/hierarchy/${hierarchyId}/node/${collection}/${nodeId}/ancestors`);
|
|
1887
|
+
}
|
|
1888
|
+
function listAtRiskRules(collection) {
|
|
1889
|
+
return cmd("GET", "/at-risk/rules", collection ? { collection } : void 0);
|
|
1890
|
+
}
|
|
1891
|
+
function listActiveAtRiskRules(collection) {
|
|
1892
|
+
return cmd("GET", "/at-risk/rules/active", { collection });
|
|
1893
|
+
}
|
|
1894
|
+
function createAtRiskRule(body) {
|
|
1895
|
+
return cmd("POST", "/at-risk/rules", void 0, body);
|
|
1896
|
+
}
|
|
1897
|
+
function updateAtRiskRule(id, body) {
|
|
1898
|
+
return cmd("PATCH", `/at-risk/rules/${id}`, void 0, body);
|
|
1899
|
+
}
|
|
1900
|
+
function deleteAtRiskRule(id) {
|
|
1901
|
+
return cmd("DELETE", `/at-risk/rules/${id}`);
|
|
1902
|
+
}
|
|
1903
|
+
function evaluateAtRisk(collection, ids) {
|
|
1904
|
+
return cmd("POST", "/at-risk/evaluate", void 0, { collection, ids });
|
|
1905
|
+
}
|
|
1906
|
+
function readAtRiskSummary() {
|
|
1907
|
+
return cmd("GET", "/at-risk/summary");
|
|
1908
|
+
}
|
|
1909
|
+
function readSlaStatusBatch(collection, ids) {
|
|
1910
|
+
return cmd("POST", "/sla/status/batch", void 0, { collection, ids });
|
|
1911
|
+
}
|
|
1912
|
+
function getTypes() {
|
|
1913
|
+
return cmd("GET", "/dev-tools/types.ts");
|
|
1914
|
+
}
|
|
1915
|
+
function getOpenApi() {
|
|
1916
|
+
return cmd("GET", "/dev-tools/openapi.json");
|
|
1917
|
+
}
|
|
1918
|
+
var _eq = (value) => ({ _eq: value });
|
|
1919
|
+
var _neq = (value) => ({ _neq: value });
|
|
1920
|
+
var _gt = (value) => ({ _gt: value });
|
|
1921
|
+
var _gte = (value) => ({ _gte: value });
|
|
1922
|
+
var _lt = (value) => ({ _lt: value });
|
|
1923
|
+
var _lte = (value) => ({ _lte: value });
|
|
1924
|
+
var _in = (values) => ({ _in: values });
|
|
1925
|
+
var _nin = (values) => ({ _nin: values });
|
|
1926
|
+
var _null = () => ({ _null: true });
|
|
1927
|
+
var _nnull = () => ({ _nnull: true });
|
|
1928
|
+
var _contains = (value) => ({ _contains: value });
|
|
1929
|
+
var _ncontains = (value) => ({ _ncontains: value });
|
|
1930
|
+
var _starts_with = (value) => ({ _starts_with: value });
|
|
1931
|
+
var _ends_with = (value) => ({ _ends_with: value });
|
|
1932
|
+
var _and = (...clauses) => ({ _and: clauses });
|
|
1933
|
+
var _or = (...clauses) => ({ _or: clauses });
|
|
1934
|
+
var _some = (filter) => ({ _some: filter });
|
|
1935
|
+
var _none = (filter) => ({ _none: filter });
|
|
1936
|
+
var asc = (field) => field;
|
|
1937
|
+
var desc = (field) => `-${field}`;
|
|
1938
|
+
function titleCaseField(key) {
|
|
1939
|
+
return key.replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").trim().split(/\s+/).map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
|
|
1940
|
+
}
|
|
1941
|
+
function parseJsonColumn(input) {
|
|
1942
|
+
if (input == null) return null;
|
|
1943
|
+
if (typeof input !== "string") return input;
|
|
1944
|
+
try {
|
|
1945
|
+
return JSON.parse(input);
|
|
1946
|
+
} catch {
|
|
1947
|
+
return null;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
function toBool(v) {
|
|
1951
|
+
return v === true || v === 1 || v === "1" || v === "true";
|
|
1952
|
+
}
|
|
1953
|
+
function buildFieldRelation(collection, field, relations) {
|
|
1954
|
+
for (const rel of relations) {
|
|
1955
|
+
const type = (rel.type ?? "").toLowerCase();
|
|
1956
|
+
const displayTemplate = rel.related_display_template ?? rel.display_template ?? null;
|
|
1957
|
+
if (rel.many_collection === collection && rel.many_field === field) {
|
|
1958
|
+
return {
|
|
1959
|
+
type: type === "m2a" ? "m2a" : "m2o",
|
|
1960
|
+
related_collection: rel.one_collection ?? "",
|
|
1961
|
+
display_template: displayTemplate,
|
|
1962
|
+
many_field: rel.many_field ?? null,
|
|
1963
|
+
junction_field: rel.junction_field ?? null
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
if (rel.one_collection === collection && rel.one_field === field) {
|
|
1967
|
+
return {
|
|
1968
|
+
type: type === "m2m" ? "m2m" : "o2m",
|
|
1969
|
+
related_collection: rel.many_collection ?? "",
|
|
1970
|
+
display_template: displayTemplate,
|
|
1971
|
+
many_field: rel.many_field ?? null,
|
|
1972
|
+
junction_field: rel.junction_field ?? null
|
|
1973
|
+
};
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
return null;
|
|
1977
|
+
}
|
|
1978
|
+
async function fetchFormSchema(client, collection, options) {
|
|
1979
|
+
const [collectionRes, groupsRes] = await Promise.all([
|
|
1980
|
+
client.request(cmd("GET", `/collections/${collection}`)),
|
|
1981
|
+
client.request(cmd("GET", `/field-groups/${collection}`))
|
|
1982
|
+
]);
|
|
1983
|
+
const meta = collectionRes.data;
|
|
1984
|
+
const rawFields = meta.fields ?? [];
|
|
1985
|
+
const relations = meta.relations ?? [];
|
|
1986
|
+
const fields = rawFields.filter((f) => options?.includeHidden === true || !toBool(f.hidden)).map((f) => {
|
|
1987
|
+
const relation = buildFieldRelation(collection, f.field, relations);
|
|
1988
|
+
return {
|
|
1989
|
+
field: f.field,
|
|
1990
|
+
type: f.type ?? "string",
|
|
1991
|
+
interface: f.interface ?? null,
|
|
1992
|
+
label: f.label ?? titleCaseField(f.field),
|
|
1993
|
+
note: f.note ?? null,
|
|
1994
|
+
required: toBool(f.required),
|
|
1995
|
+
readonly: toBool(f.readonly),
|
|
1996
|
+
hidden: toBool(f.hidden),
|
|
1997
|
+
sort: f.sort ?? null,
|
|
1998
|
+
group: f.group_key ?? null,
|
|
1999
|
+
options: parseJsonColumn(f.options) ?? parseJsonColumn(
|
|
2000
|
+
f.remote_options_config
|
|
2001
|
+
),
|
|
2002
|
+
validation_rules: parseJsonColumn(f.validation_rules),
|
|
2003
|
+
visibility_rules: parseJsonColumn(f.visibility_rules),
|
|
2004
|
+
lock_condition: parseJsonColumn(f.lock_condition),
|
|
2005
|
+
relation,
|
|
2006
|
+
default_value: f.default_value
|
|
2007
|
+
};
|
|
2008
|
+
}).sort((a, b) => {
|
|
2009
|
+
if (a.sort == null && b.sort == null) return 0;
|
|
2010
|
+
if (a.sort == null) return 1;
|
|
2011
|
+
if (b.sort == null) return -1;
|
|
2012
|
+
return a.sort - b.sort;
|
|
2013
|
+
});
|
|
2014
|
+
const groups = (groupsRes.data ?? []).map((g) => ({
|
|
2015
|
+
key: g.key,
|
|
2016
|
+
label: g.label,
|
|
2017
|
+
type: g.type,
|
|
2018
|
+
icon: g.icon ?? null,
|
|
2019
|
+
sort: g.sort ?? 0,
|
|
2020
|
+
is_collapsed: toBool(g.is_collapsed)
|
|
2021
|
+
})).sort((a, b) => a.sort - b.sort);
|
|
2022
|
+
return {
|
|
2023
|
+
collection: meta.collection,
|
|
2024
|
+
display_name: meta.display_name ?? null,
|
|
2025
|
+
singleton: toBool(meta.singleton),
|
|
2026
|
+
draft_publish_enabled: toBool(meta.draft_publish_enabled),
|
|
2027
|
+
fields,
|
|
2028
|
+
groups
|
|
2029
|
+
};
|
|
2030
|
+
}
|
|
2031
|
+
function evaluateFieldRules(collection, values) {
|
|
2032
|
+
return cmd("POST", "/field-rules/evaluate", void 0, { collection, values });
|
|
2033
|
+
}
|
|
2034
|
+
function readRelationOptions(relatedCollection, options) {
|
|
2035
|
+
const params = { limit: options?.limit ?? 50 };
|
|
2036
|
+
if (options?.search) params.search = options.search;
|
|
2037
|
+
if (options?.fields) params.fields = options.fields;
|
|
2038
|
+
return cmd("GET", `/items/${relatedCollection}`, params);
|
|
2039
|
+
}
|
|
2040
|
+
function submitFormItem(collection, values, options) {
|
|
2041
|
+
if (options?.itemId != null) {
|
|
2042
|
+
return cmd("PATCH", `/items/${collection}/${options.itemId}`, void 0, values);
|
|
2043
|
+
}
|
|
2044
|
+
return cmd("POST", `/items/${collection}`, void 0, values);
|
|
2045
|
+
}
|
|
2046
|
+
export {
|
|
2047
|
+
_and,
|
|
2048
|
+
_contains,
|
|
2049
|
+
_ends_with,
|
|
2050
|
+
_eq,
|
|
2051
|
+
_gt,
|
|
2052
|
+
_gte,
|
|
2053
|
+
_in,
|
|
2054
|
+
_lt,
|
|
2055
|
+
_lte,
|
|
2056
|
+
_ncontains,
|
|
2057
|
+
_neq,
|
|
2058
|
+
_nin,
|
|
2059
|
+
_nnull,
|
|
2060
|
+
_none,
|
|
2061
|
+
_null,
|
|
2062
|
+
_or,
|
|
2063
|
+
_some,
|
|
2064
|
+
_starts_with,
|
|
2065
|
+
acquireItemLock,
|
|
2066
|
+
activateLayout,
|
|
2067
|
+
addInstanceOwner,
|
|
2068
|
+
addSubRow,
|
|
2069
|
+
aiBuildReport,
|
|
2070
|
+
aiChat,
|
|
2071
|
+
aiCheckDuplicates,
|
|
2072
|
+
aiGenerate,
|
|
2073
|
+
aiMapColumns,
|
|
2074
|
+
aiQuery,
|
|
2075
|
+
aiReportFilters,
|
|
2076
|
+
aiSummarize,
|
|
2077
|
+
aiValidate,
|
|
2078
|
+
appendSessionRecordingEvents,
|
|
2079
|
+
applyContentBundle,
|
|
2080
|
+
applyRecordTemplate,
|
|
2081
|
+
applySubRowTemplate,
|
|
2082
|
+
approveAddendum,
|
|
2083
|
+
approveAiProposal,
|
|
2084
|
+
asc,
|
|
2085
|
+
backupExportPath,
|
|
2086
|
+
batchPickerExclusionStatus,
|
|
2087
|
+
bulkPickerExclusion,
|
|
2088
|
+
callExternalApi,
|
|
2089
|
+
callExternalApiEndpoint,
|
|
2090
|
+
cancelScheduledChange,
|
|
2091
|
+
cascadeFieldDependencies,
|
|
2092
|
+
checkBlackoutDate,
|
|
2093
|
+
claimQueueItem,
|
|
2094
|
+
cloneItem,
|
|
2095
|
+
cloneLayout,
|
|
2096
|
+
cloneReport,
|
|
2097
|
+
completeTask,
|
|
2098
|
+
createAddendum,
|
|
2099
|
+
createAlertDefinition,
|
|
2100
|
+
createAlertSubscription,
|
|
2101
|
+
createApiKey,
|
|
2102
|
+
createApprovalChain,
|
|
2103
|
+
createAtRiskRule,
|
|
2104
|
+
createAttributeDefinition,
|
|
2105
|
+
createBlackoutDate,
|
|
2106
|
+
createCollectionLayout,
|
|
2107
|
+
createComment,
|
|
2108
|
+
createDataQualityRule,
|
|
2109
|
+
createExternalApi,
|
|
2110
|
+
createExternalApiEndpoint,
|
|
2111
|
+
createFieldGroup,
|
|
2112
|
+
createFieldWatch,
|
|
2113
|
+
createHierarchyConfig,
|
|
2114
|
+
createImportJob,
|
|
2115
|
+
createImportJobFromUrl,
|
|
2116
|
+
createInternalWidget,
|
|
2117
|
+
createIssue,
|
|
2118
|
+
createItem,
|
|
2119
|
+
createNivaro,
|
|
2120
|
+
createNotificationSubscription,
|
|
2121
|
+
createPage,
|
|
2122
|
+
createPdfTemplate,
|
|
2123
|
+
createPersistedQuery,
|
|
2124
|
+
createPresence,
|
|
2125
|
+
createQueue,
|
|
2126
|
+
createQueueView,
|
|
2127
|
+
createRealtime,
|
|
2128
|
+
createRecordTemplate,
|
|
2129
|
+
createReport,
|
|
2130
|
+
createReportAlert,
|
|
2131
|
+
createRetentionPolicy,
|
|
2132
|
+
createRole,
|
|
2133
|
+
createRolePolicy,
|
|
2134
|
+
createRule,
|
|
2135
|
+
createSavedView,
|
|
2136
|
+
createScheduledChange,
|
|
2137
|
+
createScheduledReport,
|
|
2138
|
+
createShareLink,
|
|
2139
|
+
createSlaRule,
|
|
2140
|
+
createSubRowTemplate,
|
|
2141
|
+
createSyncJob,
|
|
2142
|
+
createTask,
|
|
2143
|
+
createTreePermission,
|
|
2144
|
+
createUser,
|
|
2145
|
+
createVirtualCollection,
|
|
2146
|
+
createWebhook,
|
|
2147
|
+
createWidgetFeed,
|
|
2148
|
+
createWorkspace,
|
|
2149
|
+
createWorkspaceTemplate,
|
|
2150
|
+
decideApproval,
|
|
2151
|
+
deleteAddendum,
|
|
2152
|
+
deleteAlertDefinition,
|
|
2153
|
+
deleteAlertSubscription,
|
|
2154
|
+
deleteApiKey,
|
|
2155
|
+
deleteApprovalChain,
|
|
2156
|
+
deleteAtRiskRule,
|
|
2157
|
+
deleteAttributeDefinition,
|
|
2158
|
+
deleteBlackoutDate,
|
|
2159
|
+
deleteCollectionLayout,
|
|
2160
|
+
deleteComment,
|
|
2161
|
+
deleteDataQualityRule,
|
|
2162
|
+
deleteExternalApi,
|
|
2163
|
+
deleteExternalApiEndpoint,
|
|
2164
|
+
deleteExternalApiSchema,
|
|
2165
|
+
deleteFieldGroup,
|
|
2166
|
+
deleteFieldTranslations,
|
|
2167
|
+
deleteFieldWatch,
|
|
2168
|
+
deleteFile,
|
|
2169
|
+
deleteHierarchyConfig,
|
|
2170
|
+
deleteImportJob,
|
|
2171
|
+
deleteInternalWidget,
|
|
2172
|
+
deleteIssue,
|
|
2173
|
+
deleteItem,
|
|
2174
|
+
deleteNotification,
|
|
2175
|
+
deleteNotificationSubscription,
|
|
2176
|
+
deletePage,
|
|
2177
|
+
deletePdfTemplate,
|
|
2178
|
+
deletePersistedQuery,
|
|
2179
|
+
deleteQueue,
|
|
2180
|
+
deleteQueueView,
|
|
2181
|
+
deleteRecordTemplate,
|
|
2182
|
+
deleteReport,
|
|
2183
|
+
deleteReportAlert,
|
|
2184
|
+
deleteReportFilterPreset,
|
|
2185
|
+
deleteRetentionPolicy,
|
|
2186
|
+
deleteRole,
|
|
2187
|
+
deleteRolePolicy,
|
|
2188
|
+
deleteRule,
|
|
2189
|
+
deleteSavedView,
|
|
2190
|
+
deleteScheduledReport,
|
|
2191
|
+
deleteSessionRecording,
|
|
2192
|
+
deleteSlaRule,
|
|
2193
|
+
deleteSubRow,
|
|
2194
|
+
deleteSubRowTemplate,
|
|
2195
|
+
deleteSyncJob,
|
|
2196
|
+
deleteTask,
|
|
2197
|
+
deleteTreePermission,
|
|
2198
|
+
deleteUser,
|
|
2199
|
+
deleteVirtualCollection,
|
|
2200
|
+
deleteWebhook,
|
|
2201
|
+
deleteWidgetFeed,
|
|
2202
|
+
deleteWorkspace,
|
|
2203
|
+
deleteWorkspaceTemplate,
|
|
2204
|
+
desc,
|
|
2205
|
+
disableTwoFactor,
|
|
2206
|
+
endSessionRecording,
|
|
2207
|
+
evaluateAlerts,
|
|
2208
|
+
evaluateAtRisk,
|
|
2209
|
+
evaluateFieldDefaults,
|
|
2210
|
+
evaluateFieldLock,
|
|
2211
|
+
evaluateFieldRules,
|
|
2212
|
+
evaluateFieldVisibility,
|
|
2213
|
+
excludeFromPicker,
|
|
2214
|
+
executeBulkAction,
|
|
2215
|
+
executeCustomQuery,
|
|
2216
|
+
executeImportTemplate,
|
|
2217
|
+
executeItemAction,
|
|
2218
|
+
executeScheduledChange,
|
|
2219
|
+
exportBlueprint,
|
|
2220
|
+
exportContent,
|
|
2221
|
+
exportContentBundle,
|
|
2222
|
+
exportSchemaSnapshot,
|
|
2223
|
+
fetchFormSchema,
|
|
2224
|
+
fileDownloadPath,
|
|
2225
|
+
fileTransformPath,
|
|
2226
|
+
generateToken,
|
|
2227
|
+
generateUserToken,
|
|
2228
|
+
getAlertDefinition,
|
|
2229
|
+
getAttributeValues,
|
|
2230
|
+
getBrunoCollection,
|
|
2231
|
+
getExternalApi,
|
|
2232
|
+
getExternalApiEndpoint,
|
|
2233
|
+
getFieldTranslations,
|
|
2234
|
+
getFlowRun,
|
|
2235
|
+
getLocales,
|
|
2236
|
+
getOpenApi,
|
|
2237
|
+
getPickerExclusionStatus,
|
|
2238
|
+
getPostmanCollection,
|
|
2239
|
+
getPresence,
|
|
2240
|
+
getRetentionPolicy,
|
|
2241
|
+
getSlaRule,
|
|
2242
|
+
getSlaStatus,
|
|
2243
|
+
getTranslations,
|
|
2244
|
+
getTypes,
|
|
2245
|
+
getWebhook,
|
|
2246
|
+
globalSearch,
|
|
2247
|
+
heartbeatItemLock,
|
|
2248
|
+
importExternalApiSpec,
|
|
2249
|
+
importSchemaSnapshot,
|
|
2250
|
+
includeInPicker,
|
|
2251
|
+
installBlueprint,
|
|
2252
|
+
installCollectionPreset,
|
|
2253
|
+
invokeInternalWidgetAction,
|
|
2254
|
+
isPageSlot,
|
|
2255
|
+
listActiveAtRiskRules,
|
|
2256
|
+
listActivePresence,
|
|
2257
|
+
listAddendums,
|
|
2258
|
+
listAlertDefinitions,
|
|
2259
|
+
listAlertSubscriptions,
|
|
2260
|
+
listAllNotificationSubscriptions,
|
|
2261
|
+
listApiKeys,
|
|
2262
|
+
listApprovalChains,
|
|
2263
|
+
listApprovalInstances,
|
|
2264
|
+
listAtRiskRules,
|
|
2265
|
+
listAttributeDefinitions,
|
|
2266
|
+
listBlackoutDates,
|
|
2267
|
+
listBulkActions,
|
|
2268
|
+
listChangeOrders,
|
|
2269
|
+
listCollectionPresets,
|
|
2270
|
+
listCollectionRecordTemplates,
|
|
2271
|
+
listComments,
|
|
2272
|
+
listCustomQueries,
|
|
2273
|
+
listDataQualityRules,
|
|
2274
|
+
listDataQualityRuns,
|
|
2275
|
+
listDeadLetters,
|
|
2276
|
+
listExternalApiEndpoints,
|
|
2277
|
+
listExternalApiSchemas,
|
|
2278
|
+
listExternalApis,
|
|
2279
|
+
listFieldGroups,
|
|
2280
|
+
listFieldWatches,
|
|
2281
|
+
listFiles,
|
|
2282
|
+
listFlowRuns,
|
|
2283
|
+
listHierarchyConfigs,
|
|
2284
|
+
listImportJobs,
|
|
2285
|
+
listImportTemplates,
|
|
2286
|
+
listInternalWidgets,
|
|
2287
|
+
listIssues,
|
|
2288
|
+
listItemActions,
|
|
2289
|
+
listItemScheduledChanges,
|
|
2290
|
+
listMyTasks,
|
|
2291
|
+
listNotificationSubscriptions,
|
|
2292
|
+
listNotifications,
|
|
2293
|
+
listOrphanFiles,
|
|
2294
|
+
listPages,
|
|
2295
|
+
listPdfTemplates,
|
|
2296
|
+
listPersistedQueries,
|
|
2297
|
+
listQueueViews,
|
|
2298
|
+
listQueues,
|
|
2299
|
+
listRecordTemplates,
|
|
2300
|
+
listRegisteredExtensions,
|
|
2301
|
+
listRegisteredFlowOperations,
|
|
2302
|
+
listRegisteredFlowTriggers,
|
|
2303
|
+
listReportAlerts,
|
|
2304
|
+
listReportFilterPresets,
|
|
2305
|
+
listReports,
|
|
2306
|
+
listRetentionPolicies,
|
|
2307
|
+
listRetentionRuns,
|
|
2308
|
+
listRolePolicies,
|
|
2309
|
+
listRoleUsers,
|
|
2310
|
+
listRoles,
|
|
2311
|
+
listRules,
|
|
2312
|
+
listSavedViews,
|
|
2313
|
+
listScheduledChanges,
|
|
2314
|
+
listScheduledReports,
|
|
2315
|
+
listSessionRecordings,
|
|
2316
|
+
listShareLinks,
|
|
2317
|
+
listSlaRules,
|
|
2318
|
+
listSubRowTemplates,
|
|
2319
|
+
listSubRows,
|
|
2320
|
+
listSyncJobs,
|
|
2321
|
+
listTasks,
|
|
2322
|
+
listThroughputCollections,
|
|
2323
|
+
listTreePermissions,
|
|
2324
|
+
listVirtualCollections,
|
|
2325
|
+
listWebhookDeliveries,
|
|
2326
|
+
listWebhooks,
|
|
2327
|
+
listWidgetFeeds,
|
|
2328
|
+
listWorkspaceTemplates,
|
|
2329
|
+
listWorkspaces,
|
|
2330
|
+
markAllNotificationsRead,
|
|
2331
|
+
markNotificationRead,
|
|
2332
|
+
moveTreeNode,
|
|
2333
|
+
presignFileUpload,
|
|
2334
|
+
previewContentBundle,
|
|
2335
|
+
previewReportWidget,
|
|
2336
|
+
publishItem,
|
|
2337
|
+
queryVirtualCollection,
|
|
2338
|
+
readActiveLayout,
|
|
2339
|
+
readActivity,
|
|
2340
|
+
readActivityReportSummary,
|
|
2341
|
+
readAddendum,
|
|
2342
|
+
readAiSettings,
|
|
2343
|
+
readAlertLog,
|
|
2344
|
+
readAllStateOwners,
|
|
2345
|
+
readApiAnalyticsErrors,
|
|
2346
|
+
readApiAnalyticsSummary,
|
|
2347
|
+
readApiAnalyticsTimeseries,
|
|
2348
|
+
readApiAnalyticsTopCollections,
|
|
2349
|
+
readApiAnalyticsTopPaths,
|
|
2350
|
+
readApiKey,
|
|
2351
|
+
readApprovalChain,
|
|
2352
|
+
readAtRiskSummary,
|
|
2353
|
+
readBackupManifest,
|
|
2354
|
+
readCollection,
|
|
2355
|
+
readCollectionLayout,
|
|
2356
|
+
readCollectionLayouts,
|
|
2357
|
+
readCollections,
|
|
2358
|
+
readDataQualityRun,
|
|
2359
|
+
readDetailLayout,
|
|
2360
|
+
readDraftPublishConfig,
|
|
2361
|
+
readErpSubmissionHistory,
|
|
2362
|
+
readFieldConfig,
|
|
2363
|
+
readFieldHistory,
|
|
2364
|
+
readFieldImpact,
|
|
2365
|
+
readFieldWatch,
|
|
2366
|
+
readFileMeta,
|
|
2367
|
+
readFileUsage,
|
|
2368
|
+
readHierarchyConfig,
|
|
2369
|
+
readHierarchyNodeAncestors,
|
|
2370
|
+
readHierarchyNodeChildren,
|
|
2371
|
+
readHierarchyNodes,
|
|
2372
|
+
readHierarchyTree,
|
|
2373
|
+
readImportJob,
|
|
2374
|
+
readInstanceOwners,
|
|
2375
|
+
readInternalWidget,
|
|
2376
|
+
readIssue,
|
|
2377
|
+
readIssueSummary,
|
|
2378
|
+
readItem,
|
|
2379
|
+
readItemLock,
|
|
2380
|
+
readItemLockConfig,
|
|
2381
|
+
readItems,
|
|
2382
|
+
readLayoutAssignments,
|
|
2383
|
+
readLayoutGroups,
|
|
2384
|
+
readMe,
|
|
2385
|
+
readMyScopes,
|
|
2386
|
+
readNotificationCount,
|
|
2387
|
+
readNotificationSubscriptionStats,
|
|
2388
|
+
readOwnerGroups,
|
|
2389
|
+
readPage,
|
|
2390
|
+
readPageWidgetData,
|
|
2391
|
+
readPdfTemplate,
|
|
2392
|
+
readPersistedQuery,
|
|
2393
|
+
readPipelineFlowMap,
|
|
2394
|
+
readPipelineReplay,
|
|
2395
|
+
readPipelineTemplate,
|
|
2396
|
+
readPipelineTemplates,
|
|
2397
|
+
readQueue,
|
|
2398
|
+
readQueueCollectionStates,
|
|
2399
|
+
readQueueColumnPrefs,
|
|
2400
|
+
readQueueItems,
|
|
2401
|
+
readQueueTrends,
|
|
2402
|
+
readQueueWorkload,
|
|
2403
|
+
readRecordGraph,
|
|
2404
|
+
readRelationOptions,
|
|
2405
|
+
readReport,
|
|
2406
|
+
readReportAlertLog,
|
|
2407
|
+
readReportFilterOptions,
|
|
2408
|
+
readReportSubscription,
|
|
2409
|
+
readReportWidgetData,
|
|
2410
|
+
readRevision,
|
|
2411
|
+
readRevisions,
|
|
2412
|
+
readRole,
|
|
2413
|
+
readSessionRecordingEvents,
|
|
2414
|
+
readSettings,
|
|
2415
|
+
readSingleton,
|
|
2416
|
+
readSlaStatusBatch,
|
|
2417
|
+
readStateOwnerGroups,
|
|
2418
|
+
readStateOwners,
|
|
2419
|
+
readSyncJob,
|
|
2420
|
+
readTask,
|
|
2421
|
+
readThroughputReport,
|
|
2422
|
+
readTimeline,
|
|
2423
|
+
readTreeAncestors,
|
|
2424
|
+
readTreeChildren,
|
|
2425
|
+
readTreeConfig,
|
|
2426
|
+
readTreeDescendants,
|
|
2427
|
+
readTreeNested,
|
|
2428
|
+
readTreeNodes,
|
|
2429
|
+
readTwoFactorStatus,
|
|
2430
|
+
readUnreadNotificationCount,
|
|
2431
|
+
readUser,
|
|
2432
|
+
readUserActivity,
|
|
2433
|
+
readUserActivitySummary,
|
|
2434
|
+
readUserCard,
|
|
2435
|
+
readUserScopes,
|
|
2436
|
+
readUsers,
|
|
2437
|
+
readWorkflowBindings,
|
|
2438
|
+
readWorkflowInstance,
|
|
2439
|
+
readWorkflowInstances,
|
|
2440
|
+
readWorkspace,
|
|
2441
|
+
readWorkspaceUsage,
|
|
2442
|
+
rebuildTreePaths,
|
|
2443
|
+
reindexSemanticSearch,
|
|
2444
|
+
rejectAddendum,
|
|
2445
|
+
rejectAiProposal,
|
|
2446
|
+
releaseItemLock,
|
|
2447
|
+
releaseQueueItem,
|
|
2448
|
+
rematerializeQueue,
|
|
2449
|
+
removeInstanceOwner,
|
|
2450
|
+
renderInternalWidget,
|
|
2451
|
+
renderPdfTemplate,
|
|
2452
|
+
reorderFieldGroups,
|
|
2453
|
+
reorderSubRows,
|
|
2454
|
+
reorderTreeSiblings,
|
|
2455
|
+
replaceSubRows,
|
|
2456
|
+
replayActivityEvent,
|
|
2457
|
+
reportClientError,
|
|
2458
|
+
resetReportCache,
|
|
2459
|
+
resolveReportAlert,
|
|
2460
|
+
retryDeadLetter,
|
|
2461
|
+
retryErpSubmission,
|
|
2462
|
+
retryWebhookDelivery,
|
|
2463
|
+
revokeApiKey,
|
|
2464
|
+
revokeShareLink,
|
|
2465
|
+
revokeToken,
|
|
2466
|
+
revokeUserToken,
|
|
2467
|
+
rollbackRevision,
|
|
2468
|
+
rotateWidgetFeedToken,
|
|
2469
|
+
runActivityReport,
|
|
2470
|
+
runActivityReportCsv,
|
|
2471
|
+
runDataQuality,
|
|
2472
|
+
runRetentionPolicy,
|
|
2473
|
+
runScheduledReport,
|
|
2474
|
+
runSyncJob,
|
|
2475
|
+
saveMyScopeDefaults,
|
|
2476
|
+
saveReportFilterPreset,
|
|
2477
|
+
saveReportWidgets,
|
|
2478
|
+
saveUserScope,
|
|
2479
|
+
semanticSearch,
|
|
2480
|
+
sendTestMail,
|
|
2481
|
+
sessionRecordingEnabled,
|
|
2482
|
+
setMyDelegate,
|
|
2483
|
+
setQueueDefaultView,
|
|
2484
|
+
setReportSubscription,
|
|
2485
|
+
setTranslations,
|
|
2486
|
+
setupTwoFactor,
|
|
2487
|
+
simulatePermissions,
|
|
2488
|
+
simulatePipeline,
|
|
2489
|
+
startApproval,
|
|
2490
|
+
startSessionRecording,
|
|
2491
|
+
startWorkflow,
|
|
2492
|
+
submitAddendum,
|
|
2493
|
+
submitFormItem,
|
|
2494
|
+
submitItemForReview,
|
|
2495
|
+
submitToErp,
|
|
2496
|
+
subscribeFieldWatch,
|
|
2497
|
+
suggestQueueLabels,
|
|
2498
|
+
switchWorkspace,
|
|
2499
|
+
testExternalApi,
|
|
2500
|
+
testWebhook,
|
|
2501
|
+
toggleReportAlert,
|
|
2502
|
+
transitionWorkflow,
|
|
2503
|
+
unpublishItem,
|
|
2504
|
+
unsubscribeFieldWatch,
|
|
2505
|
+
updateAddendum,
|
|
2506
|
+
updateAiSettings,
|
|
2507
|
+
updateAlertDefinition,
|
|
2508
|
+
updateApiKey,
|
|
2509
|
+
updateApprovalChain,
|
|
2510
|
+
updateAtRiskRule,
|
|
2511
|
+
updateAttributeDefinition,
|
|
2512
|
+
updateAttributeValues,
|
|
2513
|
+
updateCollectionLayout,
|
|
2514
|
+
updateComment,
|
|
2515
|
+
updateDataQualityRule,
|
|
2516
|
+
updateDraftPublishConfig,
|
|
2517
|
+
updateErpSubmissionStatus,
|
|
2518
|
+
updateExternalApi,
|
|
2519
|
+
updateExternalApiEndpoint,
|
|
2520
|
+
updateFieldConfig,
|
|
2521
|
+
updateFieldGroup,
|
|
2522
|
+
updateFieldWatch,
|
|
2523
|
+
updateFileMeta,
|
|
2524
|
+
updateHierarchyConfig,
|
|
2525
|
+
updateInternalWidget,
|
|
2526
|
+
updateIssue,
|
|
2527
|
+
updateItem,
|
|
2528
|
+
updateItemLockConfig,
|
|
2529
|
+
updateLayoutAssignments,
|
|
2530
|
+
updateLayoutUngroupedSort,
|
|
2531
|
+
updateMe,
|
|
2532
|
+
updateNotificationSubscription,
|
|
2533
|
+
updatePage,
|
|
2534
|
+
updatePdfTemplate,
|
|
2535
|
+
updatePersistedQuery,
|
|
2536
|
+
updateQueue,
|
|
2537
|
+
updateQueueSources,
|
|
2538
|
+
updateQueueView,
|
|
2539
|
+
updateRecordTemplate,
|
|
2540
|
+
updateReport,
|
|
2541
|
+
updateReportAlert,
|
|
2542
|
+
updateRetentionPolicy,
|
|
2543
|
+
updateRole,
|
|
2544
|
+
updateRolePolicy,
|
|
2545
|
+
updateRoleUiPermissions,
|
|
2546
|
+
updateRule,
|
|
2547
|
+
updateSavedView,
|
|
2548
|
+
updateScheduledReport,
|
|
2549
|
+
updateSettings,
|
|
2550
|
+
updateSingleton,
|
|
2551
|
+
updateSlaRule,
|
|
2552
|
+
updateSyncJob,
|
|
2553
|
+
updateTask,
|
|
2554
|
+
updateTreePermission,
|
|
2555
|
+
updateUser,
|
|
2556
|
+
updateVirtualCollection,
|
|
2557
|
+
updateWebhook,
|
|
2558
|
+
updateWidgetFeed,
|
|
2559
|
+
updateWorkflowBinding,
|
|
2560
|
+
updateWorkspace,
|
|
2561
|
+
validateVirtualCollectionSql,
|
|
2562
|
+
verifyTwoFactor
|
|
2563
|
+
};
|