@kissflow/lowcode-client-sdk 1.0.43 → 1.0.49
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/dist/index.d.ts +560 -159
- package/dist/kf.lowcodeworkersdk.es.js +335 -45
- package/dist/kfsdk.es.js +450 -36
- package/dist/kfsdk.umd.js +1 -1
- package/dist/lowcode.d.ts +529 -128
- package/dist/lowcode.types.d.ts +461 -106
- package/dist/nocode.d.ts +538 -137
- package/dist/nocode.types.d.ts +301 -104
- package/package.json +4 -1
- package/dist/kf.nocodeworkersdk.es.js +0 -573
package/dist/lowcode.types.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
declare class Form {
|
|
3
3
|
type: string
|
|
4
|
+
instanceId: string
|
|
5
|
+
activityInstanceId: string
|
|
4
6
|
toJSON(): any;
|
|
5
7
|
getField(fieldId: string): any;
|
|
6
8
|
updateField(args: object): any;
|
|
9
|
+
getValidationErrors(): any;
|
|
10
|
+
getFormConfiguration(): any;
|
|
11
|
+
getFieldState(): any;
|
|
7
12
|
getTable(tableId: string): Table;
|
|
8
13
|
}
|
|
9
14
|
declare class Table {
|
|
@@ -87,6 +92,121 @@ declare class Client {
|
|
|
87
92
|
* document.querySelector("#avatar").src = dataUrl;
|
|
88
93
|
*/
|
|
89
94
|
getImageUrl(imageValue: Record<string, unknown>): any;
|
|
95
|
+
/**
|
|
96
|
+
* Open the platform's file picker, upload the selected file(s), and resolve
|
|
97
|
+
* with their metadata.
|
|
98
|
+
*
|
|
99
|
+
* Custom components (iframes) cannot access the platform's authenticated upload
|
|
100
|
+
* endpoints directly. This method opens the file picker in the parent window
|
|
101
|
+
* (which has the required session), runs the full select → upload flow, and
|
|
102
|
+
* resolves once all uploads settle with an array of the uploaded files'
|
|
103
|
+
* metadata (each including `key`, `name`, `size`, `photos`, etc. — the same
|
|
104
|
+
* shape consumed by `getImageUrl`).
|
|
105
|
+
*
|
|
106
|
+
* Always resolves with an array — a single-element array for single-file
|
|
107
|
+
* pickers (e.g. `maxCount: 1` for `Image`), one entry per uploaded file for
|
|
108
|
+
* multi-file pickers (e.g. `Attachment`). Resolves with `[]` if the user closes
|
|
109
|
+
* the picker without completing any upload.
|
|
110
|
+
*
|
|
111
|
+
* @param options - File picker configuration (e.g. `fileExtensions`, `maxSize`,
|
|
112
|
+
* `maxCount`, `imageProps`).
|
|
113
|
+
* @returns A promise that resolves with an array of uploaded file metadata
|
|
114
|
+
* objects (empty if the picker was closed without uploading anything).
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* const files = await kf.client.openFilePicker({ fileExtensions: ["JPG", "PNG"] });
|
|
118
|
+
* if (files.length) onChange(files[0]); // single-file consumer (Image)
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* const files = await kf.client.openFilePicker({ maxCount: 10 });
|
|
122
|
+
* if (files.length) onChange([...existing, ...files]); // multi-file consumer (Attachment)
|
|
123
|
+
*/
|
|
124
|
+
openFilePicker(options: FilePickerOptions): any;
|
|
125
|
+
/**
|
|
126
|
+
* Open the platform's barcode/QR scanner and resolve with the decoded text.
|
|
127
|
+
*
|
|
128
|
+
* The scanner UI (camera stream + decoding) runs in the parent window, which
|
|
129
|
+
* owns the camera permission — the iframe itself never accesses the camera.
|
|
130
|
+
* Camera-permission prompts and denials are handled inside the scanner UI;
|
|
131
|
+
* they are not surfaced as errors here.
|
|
132
|
+
*
|
|
133
|
+
* Resolves with `null` if the user closes the scanner without a successful
|
|
134
|
+
* scan (including the scanner's own inactivity timeout).
|
|
135
|
+
*
|
|
136
|
+
* Note: currently supported in web custom app UIs; the mobile (PWA) custom
|
|
137
|
+
* UI does not host the scanner portal yet.
|
|
138
|
+
*
|
|
139
|
+
* @param options - Scanner configuration (e.g. `localFileScan` to allow
|
|
140
|
+
* decoding from an uploaded image instead of the camera).
|
|
141
|
+
* @returns A promise that resolves with the decoded string, or `null` if the
|
|
142
|
+
* scanner was closed without scanning.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* const code = await kf.client.openScanner({ localFileScan: true });
|
|
146
|
+
* if (code) onChange(code);
|
|
147
|
+
*/
|
|
148
|
+
openScanner(options?: ScannerOptions): any;
|
|
149
|
+
/**
|
|
150
|
+
* Open the platform's native Geolocation map picker (search, current-location
|
|
151
|
+
* detection, marker drag, reverse-geocoding) in a modal over the custom
|
|
152
|
+
* form/component. Runs in the parent window, which owns the Google Maps API
|
|
153
|
+
* key — the iframe itself never needs one.
|
|
154
|
+
*
|
|
155
|
+
* Resolves with `null` if the user closes the picker without selecting a
|
|
156
|
+
* location.
|
|
157
|
+
*
|
|
158
|
+
* @param value - Optional current geolocation value to pre-select on the map.
|
|
159
|
+
* @returns A promise that resolves with the picked location object, or
|
|
160
|
+
* `null` if the picker was closed without a selection.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* const location = await kf.client.pickLocation();
|
|
164
|
+
* if (location) onChange(location);
|
|
165
|
+
*/
|
|
166
|
+
pickLocation(value?: GeolocationValue): any;
|
|
167
|
+
/**
|
|
168
|
+
* Upload a File object to Kissflow's S3 storage and resolve with its metadata.
|
|
169
|
+
*
|
|
170
|
+
* Use this when you have a File/Blob already in memory (e.g. a canvas drawing
|
|
171
|
+
* converted to a PNG blob) and need to upload it without opening a file picker UI.
|
|
172
|
+
* The platform runs the upload in the parent window (which has the required session)
|
|
173
|
+
* and resolves with the uploaded file's `{ key, name, ... }` metadata — the same
|
|
174
|
+
* shape returned by `openFilePicker`.
|
|
175
|
+
*
|
|
176
|
+
* Resolves with `null` if the upload fails.
|
|
177
|
+
*
|
|
178
|
+
* @param file - The File or Blob to upload.
|
|
179
|
+
* @param fileName - Optional file name override (defaults to `file.name`).
|
|
180
|
+
* @returns A promise that resolves with the uploaded file metadata, or `null` on failure.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* const blob = await new Promise<Blob>(res => canvas.toBlob(res, 'image/png'));
|
|
184
|
+
* const file = new File([blob], 'signature.png', { type: 'image/png' });
|
|
185
|
+
* const result = await kf.client.uploadFile(file);
|
|
186
|
+
* if (result) onChange(result);
|
|
187
|
+
*/
|
|
188
|
+
uploadFile(file: UploadableFile, fileName?: string): any;
|
|
189
|
+
/**
|
|
190
|
+
* Open the platform's file preview (lightbox) for one or more files.
|
|
191
|
+
*
|
|
192
|
+
* `files` always accepts an array — pass a single-element array for fields like
|
|
193
|
+
* `Image`, or the full list for multi-file fields like `Attachment`. The host's
|
|
194
|
+
* preview UI natively renders next/prev navigation across the array; the SDK
|
|
195
|
+
* just passes the file list through, no extra navigation surface is needed here.
|
|
196
|
+
*
|
|
197
|
+
* @param args - Preview configuration.
|
|
198
|
+
* @param args.files - Array of file metadata objects to preview.
|
|
199
|
+
* @param args.indexOfFile - Index of the file to open the preview on (default: 0).
|
|
200
|
+
* @returns A promise that resolves once the user closes the preview.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* await kf.client.openFilePreview({ files: [imageFieldValue] });
|
|
204
|
+
* await kf.client.openFilePreview({ files: attachmentFieldValue, indexOfFile: 2 });
|
|
205
|
+
*/
|
|
206
|
+
openFilePreview(args: {
|
|
207
|
+
files: Record<string, unknown>[];
|
|
208
|
+
indexOfFile?: number;
|
|
209
|
+
}): any;
|
|
90
210
|
}
|
|
91
211
|
declare class Formatter {
|
|
92
212
|
toDate(date: string): any;
|
|
@@ -117,12 +237,20 @@ declare class Page {
|
|
|
117
237
|
_id: string
|
|
118
238
|
popup: Popup
|
|
119
239
|
type: string
|
|
240
|
+
_route: string
|
|
120
241
|
getParameter(key: string): any;
|
|
121
242
|
getAllParameters(): any;
|
|
122
243
|
getVariable(key: string): any;
|
|
123
244
|
setVariable(key: string | object, value?: any): any;
|
|
124
245
|
openPopup(popupId: string, popupParams?: object): any;
|
|
125
246
|
getComponent(componentId: string): Component;
|
|
247
|
+
/**
|
|
248
|
+
* Notify the Kissflow host that the custom UI navigated to `path`,
|
|
249
|
+
* so the parent browser URL mirrors the route. Used by the App UI framework.
|
|
250
|
+
*/
|
|
251
|
+
setRoute(path: string): void;
|
|
252
|
+
/** Returns the initial deep-link route the page was opened with. */
|
|
253
|
+
getRoute(): string;
|
|
126
254
|
}
|
|
127
255
|
declare class DecisionTable {
|
|
128
256
|
evaluate(payload?: object): any;
|
|
@@ -159,7 +287,7 @@ declare class Dataform {
|
|
|
159
287
|
importCSV(defaultValues?: object): any;
|
|
160
288
|
/**
|
|
161
289
|
* Open the form UI for an existing dataform item
|
|
162
|
-
* @param item - Dataform item with _id
|
|
290
|
+
* @param item - Dataform item with _id and optional _view_id
|
|
163
291
|
*/
|
|
164
292
|
openForm(item: DataformItem): any;
|
|
165
293
|
/**
|
|
@@ -193,6 +321,30 @@ declare class Dataform {
|
|
|
193
321
|
getFields(options?: {
|
|
194
322
|
viewId?: string;
|
|
195
323
|
}): Promise<any>;
|
|
324
|
+
/**
|
|
325
|
+
* Initialize a form with all necessary data (schema, item data, form store)
|
|
326
|
+
* This is the recommended way to create a custom form for dataform records
|
|
327
|
+
* It automatically handles fetching schema, item data, and initializing the form store
|
|
328
|
+
*
|
|
329
|
+
* @param instanceId - Optional instance ID of the dataform record. If omitted, creates a new record
|
|
330
|
+
* @param viewId - Optional view ID to scope the form's schema/permissions to a specific view
|
|
331
|
+
* @returns Promise with Form instance ready to use
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* // Load existing record
|
|
335
|
+
* const dataform = kf.app.getDataform("EmpMaster");
|
|
336
|
+
* const form = await dataform.initForm("emp_123");
|
|
337
|
+
* const data = await form.toJSON();
|
|
338
|
+
*
|
|
339
|
+
* // Load existing record scoped to a view
|
|
340
|
+
* const form = await dataform.initForm("emp_123", "EmpMaster_View");
|
|
341
|
+
*
|
|
342
|
+
* // Create new record
|
|
343
|
+
* const form = await dataform.initForm();
|
|
344
|
+
* await form.updateField({ firstName: "John" });
|
|
345
|
+
*/
|
|
346
|
+
initForm(instanceId?: string, viewId?: string): Promise<Form>;
|
|
347
|
+
getFieldOptions(options?: DataformFieldOptions): Promise<DataformQueryResponse>;
|
|
196
348
|
}
|
|
197
349
|
declare class Board {
|
|
198
350
|
/**
|
|
@@ -271,6 +423,41 @@ declare class Board {
|
|
|
271
423
|
getFields(options?: {
|
|
272
424
|
viewId?: string;
|
|
273
425
|
}): Promise<any>;
|
|
426
|
+
/**
|
|
427
|
+
* Initialize a form for a board item with all necessary setup
|
|
428
|
+
* Fetches schema, item data, creates and initializes the form store
|
|
429
|
+
*
|
|
430
|
+
* @param instanceId - Optional instance ID. If omitted, creates a new board item
|
|
431
|
+
* @param viewId - Optional view ID to scope the form's schema/permissions to a specific view
|
|
432
|
+
* @returns Promise with Form instance ready to use
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* // Create new board item
|
|
436
|
+
* const board = kf.app.getBoard("Inventory");
|
|
437
|
+
* const form = await board.initForm();
|
|
438
|
+
* await form.updateField({ Name: "New Item" });
|
|
439
|
+
*
|
|
440
|
+
* // Edit existing board item
|
|
441
|
+
* const form = await board.initForm("item_123");
|
|
442
|
+
* const data = await form.toJSON();
|
|
443
|
+
*
|
|
444
|
+
* // Edit existing board item scoped to a view
|
|
445
|
+
* const form = await board.initForm("item_123", "Inventory_View");
|
|
446
|
+
*/
|
|
447
|
+
initForm(instanceId?: string, viewId?: string): Promise<Form>;
|
|
448
|
+
/**
|
|
449
|
+
* Get field options for dropdown/lookup fields
|
|
450
|
+
* @param options - Field options (instanceId, fieldId)
|
|
451
|
+
* @returns Promise containing the field options
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* const board = kf.app.getBoard("Inventory");
|
|
455
|
+
* const options = await board.getFieldOptions({
|
|
456
|
+
* instanceId: "item_123",
|
|
457
|
+
* fieldId: "Category"
|
|
458
|
+
* });
|
|
459
|
+
*/
|
|
460
|
+
getFieldOptions(options: BoardFieldOptions): Promise<any>;
|
|
274
461
|
}
|
|
275
462
|
declare class Process {
|
|
276
463
|
/**
|
|
@@ -321,7 +508,7 @@ declare class Process {
|
|
|
321
508
|
getAdminItems(options?: ProcessAdminOptions): Promise<ProcessQueryResponse>;
|
|
322
509
|
/**
|
|
323
510
|
* Get a single process instance by ID
|
|
324
|
-
* @param options - instanceId (required)
|
|
511
|
+
* @param options - instanceId, activityInstanceId (both required)
|
|
325
512
|
* @returns Promise containing the instance data
|
|
326
513
|
*/
|
|
327
514
|
getItem(options: ProcessGetItemOptions): Promise<ProcessItem>;
|
|
@@ -359,6 +546,26 @@ declare class Process {
|
|
|
359
546
|
* await process.deleteItem({ instanceId: "item_123" });
|
|
360
547
|
*/
|
|
361
548
|
deleteItem(options: ProcessDeleteItemOptions): Promise<void>;
|
|
549
|
+
/**
|
|
550
|
+
* Get a single process instance as admin (requires admin access)
|
|
551
|
+
* @param options - instanceId (required)
|
|
552
|
+
* @returns Promise containing the instance data
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* const process = kf.app.getProcess("LeaveRequest");
|
|
556
|
+
* const item = await process.getAdminItem({ instanceId: "item_123" });
|
|
557
|
+
*/
|
|
558
|
+
getAdminItem(options: ProcessGetAdminItemOptions): Promise<ProcessItem>;
|
|
559
|
+
/**
|
|
560
|
+
* Update a process instance as admin (requires admin access)
|
|
561
|
+
* @param options - instanceId, data (required)
|
|
562
|
+
* @returns Promise containing the updated item
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* const process = kf.app.getProcess("LeaveRequest");
|
|
566
|
+
* await process.updateAdminItem({ instanceId: "item_123", data: { LeaveType: "Sick" } });
|
|
567
|
+
*/
|
|
568
|
+
updateAdminItem(options: ProcessUpdateAdminItemOptions): Promise<ProcessItem>;
|
|
362
569
|
/**
|
|
363
570
|
* Open the form UI for a process instance
|
|
364
571
|
* @param item - Process item with _id and _activity_instance_id
|
|
@@ -457,6 +664,40 @@ declare class Process {
|
|
|
457
664
|
getProgress(options: {
|
|
458
665
|
instanceId: string;
|
|
459
666
|
}): Promise<any>;
|
|
667
|
+
/**
|
|
668
|
+
* Initialize a form with all necessary data (schema, item data, form store)
|
|
669
|
+
* This is the recommended way to create a custom form for dataform records
|
|
670
|
+
* It automatically handles fetching schema, item data, and initializing the form store
|
|
671
|
+
*
|
|
672
|
+
* @param instanceId - Optional instance ID of the dataform record. If omitted, creates a new record
|
|
673
|
+
* @returns Promise with Form instance ready to use
|
|
674
|
+
*
|
|
675
|
+
* @example
|
|
676
|
+
* // Load existing record
|
|
677
|
+
* const dataform = kf.app.getDataform("EmpMaster");
|
|
678
|
+
* const form = await dataform.initForm("emp_123");
|
|
679
|
+
* const data = await form.toJSON();
|
|
680
|
+
*
|
|
681
|
+
* // Create new record
|
|
682
|
+
* const form = await dataform.initForm();
|
|
683
|
+
* await form.updateField({ firstName: "John" });
|
|
684
|
+
*/
|
|
685
|
+
initForm(instanceId?: string, activityInstanceId?: string): Promise<Form>;
|
|
686
|
+
getFieldOptions(options?: ProcessFieldOptions): Promise<ProcessQueryResponse>;
|
|
687
|
+
/**
|
|
688
|
+
* Trigger AI document parsing on an uploaded file for a Smart Attachment field.
|
|
689
|
+
* Matches native platform behavior: matching empty fields are auto-filled directly
|
|
690
|
+
* into the form store (respecting field permissions) — no separate apply step needed.
|
|
691
|
+
* Call `form.toJSON()` afterward to read the updated values.
|
|
692
|
+
*
|
|
693
|
+
* @example
|
|
694
|
+
* const form = await process.initForm();
|
|
695
|
+
* const files = await kf.client.openFilePicker({ fileExtensions: ["pdf"], maxCount: 1 });
|
|
696
|
+
* await form.updateField({ [fieldId]: files });
|
|
697
|
+
* await process.parseAttachment({ instanceId: form.instanceId, fieldId, file: files[0] });
|
|
698
|
+
* const updated = await form.toJSON(); // other fields now auto-filled
|
|
699
|
+
*/
|
|
700
|
+
parseAttachment(options: ProcessParseAttachmentOptions): Promise<ProcessAttachmentParseResult>;
|
|
460
701
|
}
|
|
461
702
|
declare class Application {
|
|
462
703
|
page: Page
|
|
@@ -468,6 +709,43 @@ declare class Application {
|
|
|
468
709
|
getDataform(flowId: string): Dataform;
|
|
469
710
|
getBoard(flowId: string): Board;
|
|
470
711
|
getProcess(flowId: string): Process;
|
|
712
|
+
/**
|
|
713
|
+
* List the app's roles and which of them the current user is a member of.
|
|
714
|
+
*
|
|
715
|
+
* Only available in a Development account - use this to build a role
|
|
716
|
+
* picker UI inside the component, then pass the chosen role to
|
|
717
|
+
* {@link switchRole}.
|
|
718
|
+
*
|
|
719
|
+
* @returns A promise that resolves with `{ roles, currentRoles }` - the
|
|
720
|
+
* full list of app roles and the subset the current user belongs to.
|
|
721
|
+
*
|
|
722
|
+
* @example
|
|
723
|
+
* const { roles, currentRoles } = await kf.app.getRoles();
|
|
724
|
+
*/
|
|
725
|
+
getRoles(): Promise<{
|
|
726
|
+
roles: rolesObject[];
|
|
727
|
+
currentRoles: rolesObject[];
|
|
728
|
+
}>;
|
|
729
|
+
/**
|
|
730
|
+
* Switch the current user's active role in a Development account.
|
|
731
|
+
*
|
|
732
|
+
* This performs a real role change - it removes the user from their
|
|
733
|
+
* current role(s) and adds them to the target role. The platform's app
|
|
734
|
+
* shell (top nav, other widgets) picks up the new role on its own; no
|
|
735
|
+
* page reload happens. Only available in a Development account.
|
|
736
|
+
*
|
|
737
|
+
* @param args - Either `roleId` or `roleName` identifying the target role
|
|
738
|
+
* (use the values returned by {@link getRoles}).
|
|
739
|
+
* @returns A promise that resolves with the switched-to role.
|
|
740
|
+
*
|
|
741
|
+
* @example
|
|
742
|
+
* const { roles } = await kf.app.getRoles();
|
|
743
|
+
* await kf.app.switchRole({ roleId: roles[1]._id });
|
|
744
|
+
*/
|
|
745
|
+
switchRole(args: {
|
|
746
|
+
roleId?: string;
|
|
747
|
+
roleName?: string;
|
|
748
|
+
}): Promise<rolesObject>;
|
|
471
749
|
}
|
|
472
750
|
declare class kf {
|
|
473
751
|
static context: Component
|
|
@@ -485,34 +763,34 @@ declare class kf {
|
|
|
485
763
|
// ============================================
|
|
486
764
|
|
|
487
765
|
declare type QueryResponse = {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
766
|
+
items: any[];
|
|
767
|
+
total: number;
|
|
768
|
+
page?: number;
|
|
769
|
+
pageSize?: number;
|
|
492
770
|
};
|
|
493
771
|
|
|
494
772
|
declare type BaseQueryOptions = {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
773
|
+
searchValue?: string;
|
|
774
|
+
pageNumber?: number;
|
|
775
|
+
pageSize?: number;
|
|
498
776
|
};
|
|
499
777
|
|
|
500
778
|
declare type PayloadSortItem = {
|
|
501
|
-
|
|
502
|
-
|
|
779
|
+
Id: string;
|
|
780
|
+
SortType: "ASC" | "DESC";
|
|
503
781
|
};
|
|
504
782
|
|
|
505
783
|
declare type PayloadOptions = {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
784
|
+
Columns?: any[];
|
|
785
|
+
Filters?: any;
|
|
786
|
+
Sort?: PayloadSortItem[];
|
|
787
|
+
FilterParam?: any;
|
|
510
788
|
};
|
|
511
789
|
|
|
512
790
|
declare type ProcessPayloadOptions = {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
791
|
+
Columns?: any[];
|
|
792
|
+
Filters?: any;
|
|
793
|
+
Sort?: PayloadSortItem[];
|
|
516
794
|
};
|
|
517
795
|
|
|
518
796
|
// ============================================
|
|
@@ -520,43 +798,59 @@ declare type ProcessPayloadOptions = {
|
|
|
520
798
|
// ============================================
|
|
521
799
|
|
|
522
800
|
declare type userObject = {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
801
|
+
_id: string;
|
|
802
|
+
Name: string;
|
|
803
|
+
Email: string;
|
|
804
|
+
/** @deprecated Use AppRoles instead. */
|
|
805
|
+
Role: string;
|
|
806
|
+
AppRoles: rolesObject[];
|
|
529
807
|
};
|
|
530
808
|
|
|
531
809
|
declare type rolesObject = {
|
|
532
|
-
|
|
533
|
-
|
|
810
|
+
_id: string;
|
|
811
|
+
Name: string;
|
|
534
812
|
};
|
|
535
813
|
|
|
536
814
|
declare type accountObject = {
|
|
537
|
-
|
|
815
|
+
_id: string;
|
|
538
816
|
};
|
|
539
817
|
|
|
540
818
|
declare type environmentObject = {
|
|
541
|
-
|
|
819
|
+
isMobile: boolean;
|
|
542
820
|
};
|
|
543
821
|
|
|
544
822
|
declare type BoardItem = {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
_view_id: string;
|
|
823
|
+
_id: string;
|
|
824
|
+
_view_id: string;
|
|
548
825
|
};
|
|
549
826
|
|
|
550
827
|
declare type DataformItem = {
|
|
551
|
-
|
|
552
|
-
|
|
828
|
+
_id: string;
|
|
829
|
+
_view_id?: string;
|
|
553
830
|
};
|
|
554
831
|
|
|
555
|
-
|
|
556
832
|
declare type ProcessItem = {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
833
|
+
_id: string;
|
|
834
|
+
_activity_instance_id: string;
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
// ============================================
|
|
838
|
+
// Form Field Value Types
|
|
839
|
+
// ============================================
|
|
840
|
+
|
|
841
|
+
// The value shape a Geolocation field is stored/read as across the platform
|
|
842
|
+
// (native forms and custom forms alike) — Latitude/Longitude are stringified
|
|
843
|
+
// on save, matching the native Geolocation field's saved representation.
|
|
844
|
+
declare type GeolocationValue = {
|
|
845
|
+
Address?: string;
|
|
846
|
+
Latitude: string;
|
|
847
|
+
Longitude: string;
|
|
848
|
+
City?: string;
|
|
849
|
+
State?: string;
|
|
850
|
+
Country?: string;
|
|
851
|
+
ZipCode?: string;
|
|
852
|
+
Area?: string;
|
|
853
|
+
PlaceId?: string;
|
|
560
854
|
};
|
|
561
855
|
|
|
562
856
|
// ============================================
|
|
@@ -564,98 +858,144 @@ declare type ProcessItem = {
|
|
|
564
858
|
// ============================================
|
|
565
859
|
|
|
566
860
|
declare type ProcessMyItemsOptions = BaseQueryOptions & {
|
|
567
|
-
|
|
568
|
-
|
|
861
|
+
status?:
|
|
862
|
+
| "draft"
|
|
863
|
+
| "inprogress"
|
|
864
|
+
| "completed"
|
|
865
|
+
| "withdrawn"
|
|
866
|
+
| "rejected"
|
|
867
|
+
| "all";
|
|
868
|
+
payload?: ProcessPayloadOptions;
|
|
569
869
|
};
|
|
570
870
|
|
|
571
871
|
declare type ProcessMyTasksOptions = BaseQueryOptions & {
|
|
572
|
-
|
|
573
|
-
|
|
872
|
+
activityId?: string;
|
|
873
|
+
payload?: ProcessPayloadOptions;
|
|
574
874
|
};
|
|
575
875
|
|
|
576
876
|
declare type ProcessParticipatedOptions = BaseQueryOptions & {
|
|
577
|
-
|
|
578
|
-
|
|
877
|
+
activityId?: string;
|
|
878
|
+
payload?: ProcessPayloadOptions;
|
|
579
879
|
};
|
|
580
880
|
|
|
581
881
|
declare type ProcessAdminOptions = BaseQueryOptions & {
|
|
582
|
-
|
|
882
|
+
payload?: ProcessPayloadOptions;
|
|
583
883
|
};
|
|
584
884
|
|
|
585
885
|
declare type ProcessQueryResponse = QueryResponse;
|
|
586
886
|
|
|
587
887
|
declare type ProcessGetItemOptions = {
|
|
588
|
-
|
|
888
|
+
instanceId: string;
|
|
889
|
+
activityInstanceId: string;
|
|
589
890
|
};
|
|
590
891
|
|
|
591
892
|
declare type ProcessCreateItemOptions = {
|
|
592
|
-
|
|
893
|
+
data?: object;
|
|
593
894
|
};
|
|
594
895
|
|
|
595
896
|
declare type ProcessUpdateItemOptions = {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
897
|
+
instanceId: string;
|
|
898
|
+
activityInstanceId: string;
|
|
899
|
+
data: object;
|
|
599
900
|
};
|
|
600
901
|
|
|
601
902
|
declare type ProcessDeleteItemOptions = {
|
|
602
|
-
|
|
903
|
+
instanceId: string;
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
declare type ProcessGetAdminItemOptions = {
|
|
907
|
+
instanceId: string;
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
declare type ProcessUpdateAdminItemOptions = {
|
|
911
|
+
instanceId: string;
|
|
912
|
+
data: object;
|
|
603
913
|
};
|
|
604
914
|
|
|
605
915
|
declare type ProcessSubmitItemOptions = {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
916
|
+
instanceId: string;
|
|
917
|
+
activityInstanceId: string;
|
|
918
|
+
comment?: string;
|
|
609
919
|
};
|
|
610
920
|
|
|
611
921
|
declare type ProcessRejectItemOptions = {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
922
|
+
instanceId: string;
|
|
923
|
+
activityInstanceId: string;
|
|
924
|
+
comment: string;
|
|
615
925
|
};
|
|
616
926
|
|
|
617
927
|
declare type ProcessWithdrawItemOptions = {
|
|
618
|
-
|
|
619
|
-
|
|
928
|
+
instanceId: string;
|
|
929
|
+
comment?: string;
|
|
620
930
|
};
|
|
621
931
|
|
|
622
932
|
declare type ProcessSendbackItemOptions = {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
933
|
+
instanceId: string;
|
|
934
|
+
activityInstanceId: string;
|
|
935
|
+
stepId: string;
|
|
936
|
+
comment: string;
|
|
627
937
|
};
|
|
628
938
|
|
|
629
939
|
declare type ProcessReassignItemOptions = {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
940
|
+
instanceId: string;
|
|
941
|
+
activityInstanceId: string;
|
|
942
|
+
reassignTo: object;
|
|
943
|
+
comment: string;
|
|
944
|
+
reassignType?: "initiator" | "approver" | "admin";
|
|
945
|
+
reassignedFrom?: object[];
|
|
636
946
|
};
|
|
637
947
|
|
|
638
948
|
declare type ProcessGetReassigneesOptions = {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
949
|
+
instanceId: string;
|
|
950
|
+
activityInstanceId: string;
|
|
951
|
+
pageNumber?: number;
|
|
952
|
+
pageSize?: number;
|
|
953
|
+
query?: string;
|
|
644
954
|
};
|
|
645
955
|
|
|
646
956
|
declare type ProcessRestartItemOptions = {
|
|
647
|
-
|
|
648
|
-
|
|
957
|
+
instanceId: string;
|
|
958
|
+
activityInstanceId: string;
|
|
649
959
|
};
|
|
650
960
|
|
|
651
961
|
declare type ProcessDiscardItemOptions = {
|
|
652
|
-
|
|
962
|
+
instanceId: string;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
declare type ProcessFieldOptions = {
|
|
966
|
+
instanceId: string;
|
|
967
|
+
activityInstanceId: string;
|
|
968
|
+
fieldId: string;
|
|
969
|
+
/** Skip the server-side model lookup by supplying the field's type directly. */
|
|
970
|
+
fieldType?: string;
|
|
971
|
+
tableId?: string;
|
|
972
|
+
tableRowId?: string;
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
declare type ProcessAttachmentFile = {
|
|
976
|
+
id: string;
|
|
977
|
+
name: string;
|
|
978
|
+
key: string;
|
|
979
|
+
size?: number;
|
|
980
|
+
fileExtension?: string;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
declare type ProcessParseAttachmentOptions = {
|
|
984
|
+
instanceId: string; // form.instanceId (process record id)
|
|
985
|
+
activityInstanceId: string;
|
|
986
|
+
fieldId: string;
|
|
987
|
+
file: ProcessAttachmentFile;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
declare type ProcessAttachmentParseResult = {
|
|
991
|
+
appliedFields: string[]; // field IDs auto-filled into the form store
|
|
992
|
+
suggestedBy: string; // name of the parsed file
|
|
653
993
|
};
|
|
654
994
|
|
|
655
995
|
declare type FetchOptions = {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
996
|
+
method?: string;
|
|
997
|
+
body?: string | object;
|
|
998
|
+
headers?: object;
|
|
659
999
|
};
|
|
660
1000
|
|
|
661
1001
|
// ============================================
|
|
@@ -663,41 +1003,50 @@ declare type FetchOptions = {
|
|
|
663
1003
|
// ============================================
|
|
664
1004
|
|
|
665
1005
|
declare type DataformQueryOptions = BaseQueryOptions & {
|
|
666
|
-
|
|
667
|
-
|
|
1006
|
+
viewId?: string;
|
|
1007
|
+
payload?: PayloadOptions;
|
|
668
1008
|
};
|
|
669
1009
|
|
|
670
1010
|
declare type DataformQueryResponse = QueryResponse;
|
|
671
1011
|
|
|
672
1012
|
declare type DataformCreateItemOptions = {
|
|
673
|
-
|
|
674
|
-
|
|
1013
|
+
data?: object;
|
|
1014
|
+
viewId?: string;
|
|
675
1015
|
};
|
|
676
1016
|
|
|
677
1017
|
declare type DataformUpdateItemOptions = {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
1018
|
+
itemId: string; // Required: the _id of the item to update
|
|
1019
|
+
data: object; // Required: the updated field values
|
|
1020
|
+
viewId?: string; // Optional: view ID for view-specific update
|
|
681
1021
|
};
|
|
682
1022
|
|
|
683
1023
|
declare type DataformGetItemOptions = {
|
|
684
|
-
|
|
685
|
-
|
|
1024
|
+
itemId: string;
|
|
1025
|
+
viewId?: string;
|
|
686
1026
|
};
|
|
687
1027
|
|
|
688
1028
|
declare type DataformDeleteItemOptions = {
|
|
689
|
-
|
|
690
|
-
|
|
1029
|
+
itemId: string;
|
|
1030
|
+
viewId?: string;
|
|
691
1031
|
};
|
|
692
1032
|
|
|
693
1033
|
declare type DataformDiscardItemOptions = {
|
|
694
|
-
|
|
1034
|
+
viewId?: string;
|
|
695
1035
|
};
|
|
696
1036
|
|
|
697
1037
|
declare type DataformSubmitItemOptions = {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
1038
|
+
itemId: string;
|
|
1039
|
+
data?: object;
|
|
1040
|
+
viewId?: string;
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
declare type DataformFieldOptions = {
|
|
1044
|
+
instanceId: string;
|
|
1045
|
+
fieldId: string;
|
|
1046
|
+
/** Skip the server-side model lookup by supplying the field's type directly. */
|
|
1047
|
+
fieldType?: string;
|
|
1048
|
+
tableId?: string;
|
|
1049
|
+
tableRowId?: string;
|
|
701
1050
|
};
|
|
702
1051
|
|
|
703
1052
|
// ============================================
|
|
@@ -705,37 +1054,43 @@ declare type DataformSubmitItemOptions = {
|
|
|
705
1054
|
// ============================================
|
|
706
1055
|
|
|
707
1056
|
declare type BoardGetItemsOptions = BaseQueryOptions & {
|
|
708
|
-
|
|
709
|
-
|
|
1057
|
+
viewId?: string;
|
|
1058
|
+
payload?: PayloadOptions;
|
|
710
1059
|
};
|
|
711
1060
|
|
|
712
1061
|
declare type BoardQueryResponse = QueryResponse;
|
|
713
1062
|
|
|
714
1063
|
declare type BoardGetItemOptions = {
|
|
715
|
-
|
|
1064
|
+
instanceId: string;
|
|
716
1065
|
};
|
|
717
1066
|
|
|
718
1067
|
declare type BoardCreateItemOptions = {
|
|
719
|
-
|
|
1068
|
+
data?: object;
|
|
720
1069
|
};
|
|
721
1070
|
|
|
722
1071
|
declare type BoardUpdateItemOptions = {
|
|
723
|
-
|
|
724
|
-
|
|
1072
|
+
instanceId: string; // Required: the _id of the item to update
|
|
1073
|
+
data: object; // Required: the updated field values
|
|
725
1074
|
};
|
|
726
1075
|
|
|
727
1076
|
declare type BoardDeleteItemOptions = {
|
|
728
|
-
|
|
1077
|
+
instanceId: string; // Required: the _id of the item to delete
|
|
729
1078
|
};
|
|
730
1079
|
|
|
731
1080
|
declare type BoardSubmitItemOptions = {
|
|
732
|
-
|
|
733
|
-
|
|
1081
|
+
instanceId: string;
|
|
1082
|
+
comment?: string;
|
|
734
1083
|
};
|
|
735
1084
|
|
|
736
1085
|
declare type BoardDiscardItemOptions = {
|
|
737
|
-
|
|
1086
|
+
instanceId: string;
|
|
738
1087
|
};
|
|
739
1088
|
|
|
740
|
-
|
|
741
|
-
|
|
1089
|
+
declare type BoardFieldOptions = {
|
|
1090
|
+
instanceId: string;
|
|
1091
|
+
fieldId: string;
|
|
1092
|
+
/** Skip the server-side model lookup by supplying the field's type directly. */
|
|
1093
|
+
fieldType?: string;
|
|
1094
|
+
tableId?: string;
|
|
1095
|
+
tableRowId?: string;
|
|
1096
|
+
};
|