@useago/sdk 1.0.5 → 1.0.7

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.
Files changed (36) hide show
  1. package/README.md +53 -0
  2. package/dist/angular.d.cts +2 -0
  3. package/dist/angular.d.ts +2 -0
  4. package/dist/{createConversationSession-lJWANT6T.cjs → createConversationSession-BuMXp0Ia.cjs} +1 -1
  5. package/dist/{createConversationSession-Boi0PjDU.js → createConversationSession-CCT1hCf8.js} +1 -1
  6. package/dist/createFormCollector-BwM7qTrp.js +276 -0
  7. package/dist/createFormCollector-DWzGKDwO.cjs +1 -0
  8. package/dist/devtools.d.cts +2 -0
  9. package/dist/devtools.d.ts +2 -0
  10. package/dist/{functions-C1-5vadY.js → functions-CApuQZ2b.js} +50 -43
  11. package/dist/{functions-DsmzgHjC.cjs → functions-Djnq-JAo.cjs} +1 -1
  12. package/dist/helpers.cjs +1 -1
  13. package/dist/helpers.js +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.cts +19 -0
  16. package/dist/index.d.ts +19 -0
  17. package/dist/index.js +35 -35
  18. package/dist/react.cjs +3 -31
  19. package/dist/react.d.cts +19 -0
  20. package/dist/react.d.ts +19 -0
  21. package/dist/react.js +603 -8158
  22. package/dist/rolldown-runtime-16Nf8qvH.cjs +1 -0
  23. package/dist/testing.d.cts +2 -0
  24. package/dist/testing.d.ts +2 -0
  25. package/dist/vue.cjs +1 -1
  26. package/dist/vue.d.cts +2 -0
  27. package/dist/vue.d.ts +2 -0
  28. package/dist/widget.cjs +4 -4
  29. package/dist/widget.d.cts +22 -0
  30. package/dist/widget.d.ts +22 -0
  31. package/dist/widget.js +347 -297
  32. package/package.json +3 -3
  33. package/dist/createFormCollector-BUqSA2Qw.js +0 -257
  34. package/dist/createFormCollector-CSG5ioym.cjs +0 -1
  35. package/dist/rolldown-runtime-CaekUdDJ.cjs +0 -1
  36. package/dist/rolldown-runtime-DxmricAu.js +0 -25
package/dist/react.d.cts CHANGED
@@ -591,6 +591,16 @@ export declare interface CreateFormCollectorOptions<V = Record<string, unknown>>
591
591
  submit?: SubmitConfig<V>;
592
592
  /** Pre-filled values. */
593
593
  initialValues?: Partial<V>;
594
+ /**
595
+ * Submit on its own as soon as every required field is filled, without waiting
596
+ * for the agent or a UI button. The form submits at most once. Defaults to
597
+ * `true` whenever a `submit` target is set: when on, no `submit_<name>` function
598
+ * is exposed, the form submits itself, and the agent never confirms a submit.
599
+ * Pass `autoSubmit: false` to keep the manual flow (expose `submit_<name>` and
600
+ * submit only on an explicit call). Has no effect on a collect-only form (no
601
+ * `submit` target); setting it `true` there is ignored with a warning.
602
+ */
603
+ autoSubmit?: boolean;
594
604
  }
595
605
 
596
606
  /**
@@ -667,6 +677,8 @@ export declare interface FormCollectorDefinition<V = Record<string, unknown>> {
667
677
  schema: FormCollectorSchema;
668
678
  /** Server-stored submit target, if any. Absent means collect-only. */
669
679
  submit?: SubmitConfig<V>;
680
+ /** Server-stored default for auto-submitting once the form is complete. */
681
+ autoSubmit?: boolean;
670
682
  }
671
683
 
672
684
  /**
@@ -685,6 +697,13 @@ export declare interface FormCollectorState<V = Record<string, unknown>> {
685
697
  values: Partial<V>;
686
698
  /** True once a submit succeeded. */
687
699
  submitted: boolean;
700
+ /**
701
+ * The submit response, set once `submitted` is true: the resolved value of the
702
+ * client `handler`, the parsed JSON of a client `url` POST, or the backend
703
+ * relay result. Lets a UI surface a server-returned message. Undefined until
704
+ * a submit succeeds (and after `reset()`).
705
+ */
706
+ submitResult?: unknown;
688
707
  }
689
708
 
690
709
  /** Completeness status derived from values + schema — computed on read, never stored. */
package/dist/react.d.ts CHANGED
@@ -591,6 +591,16 @@ export declare interface CreateFormCollectorOptions<V = Record<string, unknown>>
591
591
  submit?: SubmitConfig<V>;
592
592
  /** Pre-filled values. */
593
593
  initialValues?: Partial<V>;
594
+ /**
595
+ * Submit on its own as soon as every required field is filled, without waiting
596
+ * for the agent or a UI button. The form submits at most once. Defaults to
597
+ * `true` whenever a `submit` target is set: when on, no `submit_<name>` function
598
+ * is exposed, the form submits itself, and the agent never confirms a submit.
599
+ * Pass `autoSubmit: false` to keep the manual flow (expose `submit_<name>` and
600
+ * submit only on an explicit call). Has no effect on a collect-only form (no
601
+ * `submit` target); setting it `true` there is ignored with a warning.
602
+ */
603
+ autoSubmit?: boolean;
594
604
  }
595
605
 
596
606
  /**
@@ -667,6 +677,8 @@ export declare interface FormCollectorDefinition<V = Record<string, unknown>> {
667
677
  schema: FormCollectorSchema;
668
678
  /** Server-stored submit target, if any. Absent means collect-only. */
669
679
  submit?: SubmitConfig<V>;
680
+ /** Server-stored default for auto-submitting once the form is complete. */
681
+ autoSubmit?: boolean;
670
682
  }
671
683
 
672
684
  /**
@@ -685,6 +697,13 @@ export declare interface FormCollectorState<V = Record<string, unknown>> {
685
697
  values: Partial<V>;
686
698
  /** True once a submit succeeded. */
687
699
  submitted: boolean;
700
+ /**
701
+ * The submit response, set once `submitted` is true: the resolved value of the
702
+ * client `handler`, the parsed JSON of a client `url` POST, or the backend
703
+ * relay result. Lets a UI surface a server-returned message. Undefined until
704
+ * a submit succeeds (and after `reset()`).
705
+ */
706
+ submitResult?: unknown;
688
707
  }
689
708
 
690
709
  /** Completeness status derived from values + schema — computed on read, never stored. */