@kissflow/lowcode-client-sdk 1.0.39 → 1.0.40

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/nocode.d.ts CHANGED
@@ -50,9 +50,46 @@ declare module "core/constants" {
50
50
  DECISION_TABLE_EXECUTE: string;
51
51
  DATAFORM_IMPORT_CSV: string;
52
52
  DATAFORM_OPEN_FORM: string;
53
+ DATAFORM_GET_FIELDS: string;
54
+ DATAFORM_GET_ITEMS: string;
55
+ DATAFORM_CREATE_ITEM: string;
56
+ DATAFORM_UPDATE_ITEM: string;
57
+ DATAFORM_GET_ITEM: string;
58
+ DATAFORM_DELETE_ITEM: string;
59
+ DATAFORM_DISCARD_ITEM: string;
60
+ DATAFORM_SUBMIT_ITEM: string;
53
61
  PROCESS_OPEN_FORM: string;
62
+ PROCESS_GET_FIELDS: string;
63
+ PROCESS_GET_MYTASK_FIELDS: string;
64
+ PROCESS_GET_PARTICIPATED_FIELDS: string;
65
+ PROCESS_GET_MY_ITEMS_FIELDS: string;
66
+ PROCESS_GET_MY_ITEMS: string;
67
+ PROCESS_GET_MY_TASKS_ITEMS: string;
68
+ PROCESS_GET_PARTICIPATED_ITEMS: string;
69
+ PROCESS_GET_ADMIN_ITEMS: string;
70
+ PROCESS_CREATE_ITEM: string;
71
+ PROCESS_UPDATE_ITEM: string;
72
+ PROCESS_GET_ITEM: string;
73
+ PROCESS_DELETE_ITEM: string;
74
+ PROCESS_SUBMIT_ITEM: string;
75
+ PROCESS_REJECT_ITEM: string;
76
+ PROCESS_WITHDRAW_ITEM: string;
77
+ PROCESS_SENDBACK_ITEM: string;
78
+ PROCESS_REASSIGN_ITEM: string;
79
+ PROCESS_GET_REASSIGNEES: string;
80
+ PROCESS_RESTART_ITEM: string;
81
+ PROCESS_DISCARD_ITEM: string;
82
+ PROCESS_GET_PROGRESS: string;
54
83
  BOARD_IMPORT_CSV: string;
55
84
  BOARD_OPEN_FORM: string;
85
+ BOARD_GET_FIELDS: string;
86
+ BOARD_GET_ITEMS: string;
87
+ BOARD_CREATE_ITEM: string;
88
+ BOARD_UPDATE_ITEM: string;
89
+ BOARD_GET_ITEM: string;
90
+ BOARD_DELETE_ITEM: string;
91
+ BOARD_SUBMIT_ITEM: string;
92
+ BOARD_DISCARD_ITEM: string;
56
93
  };
57
94
  export const EVENT_TYPES: {
58
95
  COMPONENT_ON_MOUNT: string;
@@ -139,9 +176,32 @@ declare module "utils/formatter" {
139
176
  toBoolean(value: string): any;
140
177
  }
141
178
  }
179
+ declare module "utils/validation" {
180
+ /**
181
+ * Validation utilities for SDK methods
182
+ */
183
+ /**
184
+ * Throws error if value is falsy
185
+ */
186
+ export function requireField(value: any, fieldName: string): void;
187
+ /**
188
+ * Returns a rejected promise if value is falsy, null otherwise
189
+ * Use for async validation in SDK methods
190
+ */
191
+ export function requireFieldAsync(value: any, fieldName: string): Promise<never> | null;
192
+ /**
193
+ * Returns a rejected promise if any of the values are falsy
194
+ * Use for validating multiple required fields
195
+ */
196
+ export function requireFieldsAsync(fields: Array<{
197
+ value: any;
198
+ name: string;
199
+ }>): Promise<never> | null;
200
+ }
142
201
  declare module "utils/index" {
143
202
  export * from "utils/client";
144
203
  export * from "utils/formatter";
204
+ export * from "utils/validation";
145
205
  export const isObject: (value: any) => boolean;
146
206
  }
147
207
  declare module "window/NDEFReader" {
@@ -163,6 +223,32 @@ declare module "window/index" {
163
223
  };
164
224
  }
165
225
  declare module "types/external" {
226
+ export type QueryResponse = {
227
+ items: any[];
228
+ total: number;
229
+ page?: number;
230
+ pageSize?: number;
231
+ };
232
+ export type BaseQueryOptions = {
233
+ searchValue?: string;
234
+ pageNumber?: number;
235
+ pageSize?: number;
236
+ };
237
+ export type PayloadSortItem = {
238
+ Id: string;
239
+ SortType: "ASC" | "DESC";
240
+ };
241
+ export type PayloadOptions = {
242
+ Columns?: any[];
243
+ Filters?: any;
244
+ Sort?: PayloadSortItem[];
245
+ FilterParam?: any;
246
+ };
247
+ export type ProcessPayloadOptions = {
248
+ Columns?: any[];
249
+ Filters?: any;
250
+ Sort?: PayloadSortItem[];
251
+ };
166
252
  export type userObject = {
167
253
  _id: string;
168
254
  Name: string;
@@ -192,11 +278,138 @@ declare module "types/external" {
192
278
  _id: string;
193
279
  _activity_instance_id: string;
194
280
  };
281
+ export type ProcessMyItemsOptions = BaseQueryOptions & {
282
+ status?: "draft" | "inprogress" | "completed" | "withdrawn" | "rejected" | "all";
283
+ payload?: ProcessPayloadOptions;
284
+ };
285
+ export type ProcessMyTasksOptions = BaseQueryOptions & {
286
+ activityId?: string;
287
+ payload?: ProcessPayloadOptions;
288
+ };
289
+ export type ProcessParticipatedOptions = BaseQueryOptions & {
290
+ activityId?: string;
291
+ payload?: ProcessPayloadOptions;
292
+ };
293
+ export type ProcessAdminOptions = BaseQueryOptions & {
294
+ payload?: ProcessPayloadOptions;
295
+ };
296
+ export type ProcessQueryResponse = QueryResponse;
297
+ export type ProcessGetItemOptions = {
298
+ instanceId: string;
299
+ };
300
+ export type ProcessCreateItemOptions = {
301
+ data?: object;
302
+ };
303
+ export type ProcessUpdateItemOptions = {
304
+ instanceId: string;
305
+ activityInstanceId: string;
306
+ data: object;
307
+ };
308
+ export type ProcessDeleteItemOptions = {
309
+ instanceId: string;
310
+ };
311
+ export type ProcessSubmitItemOptions = {
312
+ instanceId: string;
313
+ activityInstanceId: string;
314
+ comment?: string;
315
+ };
316
+ export type ProcessRejectItemOptions = {
317
+ instanceId: string;
318
+ activityInstanceId: string;
319
+ comment: string;
320
+ };
321
+ export type ProcessWithdrawItemOptions = {
322
+ instanceId: string;
323
+ comment?: string;
324
+ };
325
+ export type ProcessSendbackItemOptions = {
326
+ instanceId: string;
327
+ activityInstanceId: string;
328
+ stepId: string;
329
+ comment: string;
330
+ };
331
+ export type ProcessReassignItemOptions = {
332
+ instanceId: string;
333
+ activityInstanceId: string;
334
+ reassignTo: object;
335
+ comment: string;
336
+ reassignType?: "initiator" | "approver" | "admin";
337
+ reassignedFrom?: object[];
338
+ };
339
+ export type ProcessGetReassigneesOptions = {
340
+ instanceId: string;
341
+ activityInstanceId: string;
342
+ pageNumber?: number;
343
+ pageSize?: number;
344
+ query?: string;
345
+ };
346
+ export type ProcessRestartItemOptions = {
347
+ instanceId: string;
348
+ activityInstanceId: string;
349
+ };
350
+ export type ProcessDiscardItemOptions = {
351
+ instanceId: string;
352
+ };
195
353
  export type FetchOptions = {
196
354
  method?: string;
197
355
  body?: string | object;
198
356
  headers?: object;
199
357
  };
358
+ export type DataformQueryOptions = BaseQueryOptions & {
359
+ viewId?: string;
360
+ payload?: PayloadOptions;
361
+ };
362
+ export type DataformQueryResponse = QueryResponse;
363
+ export type DataformCreateItemOptions = {
364
+ data?: object;
365
+ viewId?: string;
366
+ };
367
+ export type DataformUpdateItemOptions = {
368
+ itemId: string;
369
+ data: object;
370
+ viewId?: string;
371
+ };
372
+ export type DataformGetItemOptions = {
373
+ itemId: string;
374
+ viewId?: string;
375
+ };
376
+ export type DataformDeleteItemOptions = {
377
+ itemId: string;
378
+ viewId?: string;
379
+ };
380
+ export type DataformDiscardItemOptions = {
381
+ viewId?: string;
382
+ };
383
+ export type DataformSubmitItemOptions = {
384
+ itemId: string;
385
+ data?: object;
386
+ viewId?: string;
387
+ };
388
+ export type BoardGetItemsOptions = BaseQueryOptions & {
389
+ viewId?: string;
390
+ payload?: PayloadOptions;
391
+ };
392
+ export type BoardQueryResponse = QueryResponse;
393
+ export type BoardGetItemOptions = {
394
+ instanceId: string;
395
+ };
396
+ export type BoardCreateItemOptions = {
397
+ data?: object;
398
+ };
399
+ export type BoardUpdateItemOptions = {
400
+ instanceId: string;
401
+ data: object;
402
+ };
403
+ export type BoardDeleteItemOptions = {
404
+ instanceId: string;
405
+ };
406
+ export type BoardSubmitItemOptions = {
407
+ instanceId: string;
408
+ comment?: string;
409
+ };
410
+ export type BoardDiscardItemOptions = {
411
+ instanceId: string;
412
+ };
200
413
  }
201
414
  declare module "types/internal" {
202
415
  import { userObject, accountObject, environmentObject } from "types/external";
@@ -277,16 +490,6 @@ declare module "app/component" {
277
490
  watchParams(callBack: (data: any) => any): void;
278
491
  }
279
492
  }
280
- declare module "app/dataform" {
281
- import { BaseSDK } from "core/index";
282
- import { DataformItem } from "types/external";
283
- export class Dataform extends BaseSDK {
284
- private _id;
285
- constructor(flowId: string);
286
- importCSV(defaultValues?: object): any;
287
- openForm(item: DataformItem): any;
288
- }
289
- }
290
493
  declare module "app/decisiontable" {
291
494
  import { BaseSDK } from "core/index";
292
495
  export class DecisionTable extends BaseSDK {
@@ -336,23 +539,353 @@ declare module "app/page" {
336
539
  getComponent(componentId: string): Component;
337
540
  }
338
541
  }
542
+ declare module "dataform/index" {
543
+ import { BaseSDK } from "core/index";
544
+ import { DataformItem, DataformQueryOptions, DataformQueryResponse, DataformCreateItemOptions, DataformUpdateItemOptions, DataformGetItemOptions, DataformDeleteItemOptions, DataformDiscardItemOptions, DataformSubmitItemOptions } from "types/external";
545
+ export class Dataform extends BaseSDK {
546
+ private _id;
547
+ constructor(flowId: string);
548
+ /**
549
+ * Get all items from this dataform with optional filtering, sorting, and pagination
550
+ * @param options - Query options (searchValue, pageNumber, pageSize, payload)
551
+ * @returns Promise containing items and total count
552
+ */
553
+ getItems(options?: DataformQueryOptions): Promise<DataformQueryResponse>;
554
+ /**
555
+ * Get a single item by ID from this dataform
556
+ * @param options - itemId (required), optional viewId
557
+ * @returns Promise containing the item data
558
+ */
559
+ getItem(options: DataformGetItemOptions): Promise<DataformItem>;
560
+ /**
561
+ * Create a new item in this dataform
562
+ * @param options - Creation options (data: initial field values, viewId: optional view ID)
563
+ * @returns Promise containing the newly created item with _id
564
+ */
565
+ createItem(options?: DataformCreateItemOptions): Promise<DataformItem>;
566
+ /**
567
+ * Update an existing item in this dataform
568
+ * @param options - Update options (itemId: required, data: required updated values, viewId: optional view ID)
569
+ * @returns Promise containing the updated item
570
+ */
571
+ updateItem(options: DataformUpdateItemOptions): Promise<DataformItem>;
572
+ /**
573
+ * Import items from a CSV file into this dataform
574
+ * @param defaultValues - Optional default field values to apply to all imported items
575
+ */
576
+ importCSV(defaultValues?: object): any;
577
+ /**
578
+ * Open the form UI for an existing dataform item
579
+ * @param item - Dataform item with _id
580
+ */
581
+ openForm(item: DataformItem): any;
582
+ /**
583
+ * Delete an item from this dataform
584
+ * @param options - itemId (required), optional viewId
585
+ *
586
+ * @example
587
+ * await dataform.deleteItem({ itemId: "item_123" });
588
+ */
589
+ deleteItem(options: DataformDeleteItemOptions): Promise<void>;
590
+ /**
591
+ * Discard the current draft for this dataform
592
+ * @param options - optional viewId
593
+ *
594
+ * @example
595
+ * await dataform.discardItem();
596
+ */
597
+ discardItem(options?: DataformDiscardItemOptions): Promise<void>;
598
+ /**
599
+ * Submit/finalize a dataform item
600
+ * @param options - itemId (required), optional data and viewId
601
+ *
602
+ * @example
603
+ * await dataform.submitItem({ itemId: "item_123" });
604
+ */
605
+ submitItem(options: DataformSubmitItemOptions): Promise<void>;
606
+ /**
607
+ * Get field definitions for this dataform
608
+ * @param options - Optional viewId to scope fields to a specific view
609
+ */
610
+ getFields(options?: {
611
+ viewId?: string;
612
+ }): Promise<any>;
613
+ }
614
+ }
339
615
  declare module "board/index" {
340
616
  import { BaseSDK } from "core/index";
341
- import { BoardItem } from "types/external";
617
+ import { BoardItem, BoardGetItemOptions, BoardGetItemsOptions, BoardQueryResponse, BoardCreateItemOptions, BoardUpdateItemOptions, BoardDeleteItemOptions, BoardSubmitItemOptions, BoardDiscardItemOptions } from "types/external";
342
618
  export class Board extends BaseSDK {
343
619
  private _id;
344
620
  constructor(flowId: string);
621
+ /**
622
+ * Import data from CSV file
623
+ * @param defaultValues - Optional default values to apply to imported items
624
+ */
345
625
  importCSV(defaultValues?: object): any;
626
+ /**
627
+ * Open the form UI for a board item
628
+ * @param item - Board item with _id and optional _view_id
629
+ */
346
630
  openForm(item: BoardItem): any;
631
+ /**
632
+ * Get items from a board view
633
+ * @param options - Query options (viewId, searchValue, pageNumber, pageSize, payload)
634
+ * @returns Promise containing items array and total count
635
+ *
636
+ * @example
637
+ * const board = kf.app.getBoard("Inventory");
638
+ * const { items } = await board.getItems({ viewId: "AllItems_View" });
639
+ */
640
+ getItems(options?: BoardGetItemsOptions): Promise<BoardQueryResponse>;
641
+ /**
642
+ * Get a single board/case item by instance ID
643
+ * @param options - instanceId (required)
644
+ * @returns Promise containing the item data
645
+ */
646
+ getItem(options: BoardGetItemOptions): Promise<BoardItem>;
647
+ /**
648
+ * Create a new board item
649
+ * @param options - Creation options (data: initial field values)
650
+ * @returns Promise containing the newly created item with _id
651
+ *
652
+ * @example
653
+ * const board = kf.app.getBoard("Inventory");
654
+ * const item = await board.createItem({ data: { Name: "New Item" } });
655
+ */
656
+ createItem(options?: BoardCreateItemOptions): Promise<BoardItem>;
657
+ /**
658
+ * Update an existing board item
659
+ * @param options - Update options (instanceId, data)
660
+ * @returns Promise containing the updated item
661
+ *
662
+ * @example
663
+ * const board = kf.app.getBoard("Inventory");
664
+ * await board.updateItem({
665
+ * instanceId: "item_123",
666
+ * data: { Name: "Updated Item" }
667
+ * });
668
+ */
669
+ updateItem(options: BoardUpdateItemOptions): Promise<BoardItem>;
670
+ /**
671
+ * Delete a board item
672
+ * @param options - Delete options (instanceId)
673
+ * @returns Promise resolving on successful deletion
674
+ *
675
+ * @example
676
+ * const board = kf.app.getBoard("Inventory");
677
+ * await board.deleteItem({ instanceId: "item_123" });
678
+ */
679
+ deleteItem(options: BoardDeleteItemOptions): Promise<void>;
680
+ /**
681
+ * Submit a board item
682
+ * @param options - instanceId
683
+ */
684
+ submitItem(options: BoardSubmitItemOptions): Promise<void>;
685
+ /**
686
+ * Discard a board item
687
+ * @param options - instanceId
688
+ */
689
+ discardItem(options: BoardDiscardItemOptions): Promise<void>;
690
+ /**
691
+ * Get field definitions for this board
692
+ * @param options - Optional viewId to scope fields to a specific view
693
+ */
694
+ getFields(options?: {
695
+ viewId?: string;
696
+ }): Promise<any>;
347
697
  }
348
698
  }
349
699
  declare module "process/index" {
350
700
  import { BaseSDK } from "core/index";
351
- import { ProcessItem } from "types/external";
701
+ import { ProcessItem, ProcessGetItemOptions, ProcessMyItemsOptions, ProcessMyTasksOptions, ProcessParticipatedOptions, ProcessAdminOptions, ProcessQueryResponse, ProcessCreateItemOptions, ProcessUpdateItemOptions, ProcessDeleteItemOptions, ProcessSubmitItemOptions, ProcessRejectItemOptions, ProcessWithdrawItemOptions, ProcessSendbackItemOptions, ProcessReassignItemOptions, ProcessGetReassigneesOptions, ProcessRestartItemOptions, ProcessDiscardItemOptions } from "types/external";
352
702
  export class Process extends BaseSDK {
353
703
  private _id;
354
704
  constructor(flowId: string);
705
+ /**
706
+ * Get my items from this process (items I initiated)
707
+ * @param options - Query options (status, searchValue, pageNumber, pageSize, payload)
708
+ * @returns Promise containing items and total count
709
+ *
710
+ * @example
711
+ * const process = kf.app.getProcess("LeaveRequest");
712
+ * // Get draft items
713
+ * const { items } = await process.getMyItems({ status: "draft" });
714
+ * // Get in-progress items
715
+ * const { items } = await process.getMyItems({ status: "inprogress" });
716
+ */
717
+ getMyItems(options?: ProcessMyItemsOptions): Promise<ProcessQueryResponse>;
718
+ /**
719
+ * Get my pending tasks from this process (tasks assigned to me)
720
+ * @param options - Query options (activityId, searchValue, pageNumber, pageSize, payload)
721
+ * @returns Promise containing tasks and total count
722
+ *
723
+ * @example
724
+ * const process = kf.app.getProcess("LeaveRequest");
725
+ * // Get all pending tasks
726
+ * const { items } = await process.getMyTasksItems();
727
+ * // Get tasks for specific activity/step
728
+ * const { items } = await process.getMyTasksItems({ activityId: "Approval_Step" });
729
+ */
730
+ getMyTasksItems(options?: ProcessMyTasksOptions): Promise<ProcessQueryResponse>;
731
+ /**
732
+ * Get items I participated in (items where I took action)
733
+ * @param options - Query options (activityId, searchValue, pageNumber, pageSize, payload)
734
+ * @returns Promise containing items and total count
735
+ *
736
+ * @example
737
+ * const process = kf.app.getProcess("LeaveRequest");
738
+ * const { items } = await process.getParticipatedItems();
739
+ */
740
+ getParticipatedItems(options?: ProcessParticipatedOptions): Promise<ProcessQueryResponse>;
741
+ /**
742
+ * Get all items as admin (requires admin access)
743
+ * @param options - Query options (searchValue, pageNumber, pageSize, payload)
744
+ * @returns Promise containing items and total count
745
+ *
746
+ * @example
747
+ * const process = kf.app.getProcess("LeaveRequest");
748
+ * const { items } = await process.getAdminItems();
749
+ */
750
+ getAdminItems(options?: ProcessAdminOptions): Promise<ProcessQueryResponse>;
751
+ /**
752
+ * Get a single process instance by ID
753
+ * @param options - instanceId (required)
754
+ * @returns Promise containing the instance data
755
+ */
756
+ getItem(options: ProcessGetItemOptions): Promise<ProcessItem>;
757
+ /**
758
+ * Create a new process instance (start a new process)
759
+ * @param options - Creation options (data: initial field values)
760
+ * @returns Promise containing the newly created process item with _id and _activity_instance_id
761
+ *
762
+ * @example
763
+ * const process = kf.app.getProcess("LeaveRequest");
764
+ * const item = await process.createItem({ data: { LeaveType: "Annual" } });
765
+ */
766
+ createItem(options?: ProcessCreateItemOptions): Promise<ProcessItem>;
767
+ /**
768
+ * Update an existing process instance
769
+ * @param options - Update options (instanceId, activityInstanceId, data)
770
+ * @returns Promise containing the updated item
771
+ *
772
+ * @example
773
+ * const process = kf.app.getProcess("LeaveRequest");
774
+ * await process.updateItem({
775
+ * instanceId: "item_123",
776
+ * activityInstanceId: "activity_456",
777
+ * data: { LeaveType: "Sick" }
778
+ * });
779
+ */
780
+ updateItem(options: ProcessUpdateItemOptions): Promise<ProcessItem>;
781
+ /**
782
+ * Delete a process instance
783
+ * @param options - Delete options (instanceId)
784
+ * @returns Promise resolving on successful deletion
785
+ *
786
+ * @example
787
+ * const process = kf.app.getProcess("LeaveRequest");
788
+ * await process.deleteItem({ instanceId: "item_123" });
789
+ */
790
+ deleteItem(options: ProcessDeleteItemOptions): Promise<void>;
791
+ /**
792
+ * Open the form UI for a process instance
793
+ * @param item - Process item with _id and _activity_instance_id
794
+ */
355
795
  openForm(item: ProcessItem): any;
796
+ /**
797
+ * Submit a process task
798
+ * @param options - instanceId, activityInstanceId, optional comment
799
+ *
800
+ * @example
801
+ * await process.submitItem({ instanceId: "item_123", activityInstanceId: "act_456" });
802
+ */
803
+ submitItem(options: ProcessSubmitItemOptions): Promise<void>;
804
+ /**
805
+ * Reject a process task
806
+ * @param options - instanceId, activityInstanceId, comment (required)
807
+ *
808
+ * @example
809
+ * await process.reject({ instanceId: "item_123", activityInstanceId: "act_456", comment: "Not approved" });
810
+ */
811
+ rejectItem(options: ProcessRejectItemOptions): Promise<void>;
812
+ /**
813
+ * Withdraw a process instance (initiator only)
814
+ * @param options - instanceId, optional comment
815
+ *
816
+ * @example
817
+ * await process.withdraw({ instanceId: "item_123", comment: "Withdrawing request" });
818
+ */
819
+ withdrawItem(options: ProcessWithdrawItemOptions): Promise<void>;
820
+ /**
821
+ * Send back a process task to a previous step
822
+ * @param options - instanceId, activityInstanceId, stepId (target step), comment (required)
823
+ *
824
+ * @example
825
+ * await process.sendback({ instanceId: "item_123", activityInstanceId: "act_456", stepId: "step_789", comment: "Please revise" });
826
+ */
827
+ sendbackItem(options: ProcessSendbackItemOptions): Promise<void>;
828
+ /**
829
+ * Reassign a process task to another user
830
+ * @param options - instanceId, activityInstanceId, reassignTo (user object), comment (required), optional reassignType and reassignedFrom
831
+ *
832
+ * @example
833
+ * await process.reassign({ instanceId: "item_123", activityInstanceId: "act_456", reassignTo: { _id: "user_789" }, comment: "Reassigning to manager" });
834
+ */
835
+ reassignItem(options: ProcessReassignItemOptions): Promise<void>;
836
+ /**
837
+ * Get list of eligible reassignees for a process task
838
+ * @param options - instanceId, activityInstanceId, optional pageNumber, pageSize, query
839
+ */
840
+ getReassignees(options: ProcessGetReassigneesOptions): Promise<any>;
841
+ /**
842
+ * Restart a rejected/withdrawn process instance
843
+ * @param options - instanceId, activityInstanceId
844
+ *
845
+ * @example
846
+ * await process.restart({ instanceId: "item_123", activityInstanceId: "act_456" });
847
+ */
848
+ restartItem(options: ProcessRestartItemOptions): Promise<void>;
849
+ /**
850
+ * Discard a draft process instance
851
+ * @param options - instanceId
852
+ *
853
+ * @example
854
+ * await process.discard({ instanceId: "item_123" });
855
+ */
856
+ discardItem(options: ProcessDiscardItemOptions): Promise<void>;
857
+ /**
858
+ * Get field definitions for this process
859
+ */
860
+ getFields(): Promise<any>;
861
+ /**
862
+ * Get field definitions for a specific task step (my tasks view)
863
+ * @param options - activityId of the target step
864
+ */
865
+ getMyTaskFields(options: {
866
+ activityId: string;
867
+ }): Promise<any>;
868
+ /**
869
+ * Get field definitions for a specific task step (participated view)
870
+ * @param options - activityId of the target step
871
+ */
872
+ getParticipatedFields(options: {
873
+ activityId: string;
874
+ }): Promise<any>;
875
+ /**
876
+ * Get field definitions for the my items view filtered by status
877
+ * @param options - status filter (e.g. "draft", "inprogress", "all")
878
+ */
879
+ getMyItemsFields(options: {
880
+ status: string;
881
+ }): Promise<any>;
882
+ /**
883
+ * Get the progress/timeline of a process instance
884
+ * @param options - instanceId (required)
885
+ */
886
+ getProgress(options: {
887
+ instanceId: string;
888
+ }): Promise<any>;
356
889
  }
357
890
  }
358
891
  declare module "app/index" {
@@ -360,7 +893,7 @@ declare module "app/index" {
360
893
  import { Page } from "app/page";
361
894
  import { AppContext } from "types/internal";
362
895
  import { DecisionTable } from "app/decisiontable";
363
- import { Dataform } from "app/dataform";
896
+ import { Dataform } from "dataform/index";
364
897
  import { Board } from "board/index";
365
898
  import { Process } from "process/index";
366
899
  export class Application extends BaseSDK {