windmill-client 1.795.0 → 1.797.0

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.
@@ -4911,17 +4911,17 @@ var ResourceService = class {
4911
4911
  * get a single resource version, with its value
4912
4912
  * @param data The data for the request.
4913
4913
  * @param data.workspace
4914
- * @param data.version
4914
+ * @param data.id The version's id, not its number.
4915
4915
  * @returns unknown resource version
4916
4916
  * @throws ApiError
4917
4917
  */
4918
4918
  static getResourceVersion(data) {
4919
4919
  return request(OpenAPI, {
4920
4920
  method: "GET",
4921
- url: "/w/{workspace}/resources/history/v/{version}",
4921
+ url: "/w/{workspace}/resources/history/v/{id}",
4922
4922
  path: {
4923
4923
  workspace: data.workspace,
4924
- version: data.version
4924
+ id: data.id
4925
4925
  }
4926
4926
  });
4927
4927
  }
@@ -4929,17 +4929,17 @@ var ResourceService = class {
4929
4929
  * restore a resource to a previous version
4930
4930
  * @param data The data for the request.
4931
4931
  * @param data.workspace
4932
- * @param data.version
4932
+ * @param data.id The version's id, not its number.
4933
4933
  * @returns string resource restored
4934
4934
  * @throws ApiError
4935
4935
  */
4936
4936
  static restoreResourceVersion(data) {
4937
4937
  return request(OpenAPI, {
4938
4938
  method: "POST",
4939
- url: "/w/{workspace}/resources/history/restore/v/{version}",
4939
+ url: "/w/{workspace}/resources/history/restore/v/{id}",
4940
4940
  path: {
4941
4941
  workspace: data.workspace,
4942
- version: data.version
4942
+ id: data.id
4943
4943
  }
4944
4944
  });
4945
4945
  }
@@ -10702,6 +10702,268 @@ var FlowConversationsService = class {
10702
10702
  });
10703
10703
  }
10704
10704
  };
10705
+ var AiEvalsService = class {
10706
+ /**
10707
+ * list eval datasets
10708
+ * @param data The data for the request.
10709
+ * @param data.workspace
10710
+ * @returns EvalDataset eval datasets list
10711
+ * @throws ApiError
10712
+ */
10713
+ static listEvalDatasets(data) {
10714
+ return request(OpenAPI, {
10715
+ method: "GET",
10716
+ url: "/w/{workspace}/ai_evals/datasets/list",
10717
+ path: { workspace: data.workspace }
10718
+ });
10719
+ }
10720
+ /**
10721
+ * create an eval dataset
10722
+ * @param data The data for the request.
10723
+ * @param data.workspace
10724
+ * @param data.requestBody new eval dataset
10725
+ * @returns string eval dataset created
10726
+ * @throws ApiError
10727
+ */
10728
+ static createEvalDataset(data) {
10729
+ return request(OpenAPI, {
10730
+ method: "POST",
10731
+ url: "/w/{workspace}/ai_evals/datasets/create",
10732
+ path: { workspace: data.workspace },
10733
+ body: data.requestBody,
10734
+ mediaType: "application/json"
10735
+ });
10736
+ }
10737
+ /**
10738
+ * get an eval dataset
10739
+ * @param data The data for the request.
10740
+ * @param data.workspace
10741
+ * @param data.path
10742
+ * @returns EvalDataset eval dataset
10743
+ * @throws ApiError
10744
+ */
10745
+ static getEvalDataset(data) {
10746
+ return request(OpenAPI, {
10747
+ method: "GET",
10748
+ url: "/w/{workspace}/ai_evals/datasets/get/{path}",
10749
+ path: {
10750
+ workspace: data.workspace,
10751
+ path: data.path
10752
+ }
10753
+ });
10754
+ }
10755
+ /**
10756
+ * update an eval dataset
10757
+ * @param data The data for the request.
10758
+ * @param data.workspace
10759
+ * @param data.path
10760
+ * @param data.requestBody updated eval dataset
10761
+ * @returns string eval dataset updated
10762
+ * @throws ApiError
10763
+ */
10764
+ static updateEvalDataset(data) {
10765
+ return request(OpenAPI, {
10766
+ method: "POST",
10767
+ url: "/w/{workspace}/ai_evals/datasets/update/{path}",
10768
+ path: {
10769
+ workspace: data.workspace,
10770
+ path: data.path
10771
+ },
10772
+ body: data.requestBody,
10773
+ mediaType: "application/json"
10774
+ });
10775
+ }
10776
+ /**
10777
+ * delete an eval dataset and all its cases
10778
+ * The cases, the runs and their recorded case sets go with it through the foreign keys; the jobs those runs produced are left alone.
10779
+ *
10780
+ * @param data The data for the request.
10781
+ * @param data.workspace
10782
+ * @param data.path
10783
+ * @returns string eval dataset deleted
10784
+ * @throws ApiError
10785
+ */
10786
+ static deleteEvalDataset(data) {
10787
+ return request(OpenAPI, {
10788
+ method: "POST",
10789
+ url: "/w/{workspace}/ai_evals/datasets/delete/{path}",
10790
+ path: {
10791
+ workspace: data.workspace,
10792
+ path: data.path
10793
+ }
10794
+ });
10795
+ }
10796
+ /**
10797
+ * list the cases of an eval dataset
10798
+ * @param data The data for the request.
10799
+ * @param data.workspace
10800
+ * @param data.path
10801
+ * @param data.page which page to return (start at 1, default 1)
10802
+ * @param data.perPage number of items to return for a given page (default 30, max 100)
10803
+ * @returns unknown eval cases
10804
+ * @throws ApiError
10805
+ */
10806
+ static listEvalCases(data) {
10807
+ return request(OpenAPI, {
10808
+ method: "GET",
10809
+ url: "/w/{workspace}/ai_evals/cases/list/{path}",
10810
+ path: {
10811
+ workspace: data.workspace,
10812
+ path: data.path
10813
+ },
10814
+ query: {
10815
+ page: data.page,
10816
+ per_page: data.perPage
10817
+ }
10818
+ });
10819
+ }
10820
+ /**
10821
+ * what the agent under test is right now
10822
+ * The version it is deployed at. Small on purpose: the results endpoint reports the same thing but harvests scores and reads every job to do it, so it is not something to ask for on its own.
10823
+ *
10824
+ * @param data The data for the request.
10825
+ * @param data.workspace
10826
+ * @param data.path
10827
+ * @returns unknown the subject as it is now
10828
+ * @throws ApiError
10829
+ */
10830
+ static evalSubjectState(data) {
10831
+ return request(OpenAPI, {
10832
+ method: "GET",
10833
+ url: "/w/{workspace}/ai_evals/subject_state",
10834
+ path: { workspace: data.workspace },
10835
+ query: { path: data.path }
10836
+ });
10837
+ }
10838
+ /**
10839
+ * the run one iteration of an eval run answered, as its scorers read it
10840
+ * Called by the step a run's flow places between the agent and its scorers. Every tool call is enriched with the arguments, result, status and duration of the job that ran it, and with the schema of the script version it ran, none of which the flow itself can read.
10841
+ *
10842
+ * @param data The data for the request.
10843
+ * @param data.workspace
10844
+ * @param data.jobId The flow job that answered the case.
10845
+ * @returns unknown the run and its rendering
10846
+ * @throws ApiError
10847
+ */
10848
+ static evalRunPayload(data) {
10849
+ return request(OpenAPI, {
10850
+ method: "GET",
10851
+ url: "/w/{workspace}/ai_evals/run_payload",
10852
+ path: { workspace: data.workspace },
10853
+ query: { job_id: data.jobId }
10854
+ });
10855
+ }
10856
+ /**
10857
+ * what a new judge agent and a new script scorer are created from
10858
+ * @param data The data for the request.
10859
+ * @param data.workspace
10860
+ * @returns unknown scorer defaults
10861
+ * @throws ApiError
10862
+ */
10863
+ static scorerDefaults(data) {
10864
+ return request(OpenAPI, {
10865
+ method: "GET",
10866
+ url: "/w/{workspace}/ai_evals/scorer_defaults",
10867
+ path: { workspace: data.workspace }
10868
+ });
10869
+ }
10870
+ /**
10871
+ * list the scorers already in use in this workspace, most recent first
10872
+ * Filtered twice, both times by what the caller can read: the datasets they come from, and the runnables themselves. A scorer they could not run does not appear.
10873
+ *
10874
+ * @param data The data for the request.
10875
+ * @param data.workspace
10876
+ * @param data.kind only scorers of this kind
10877
+ * @returns unknown recently used scorers
10878
+ * @throws ApiError
10879
+ */
10880
+ static recentScorers(data) {
10881
+ return request(OpenAPI, {
10882
+ method: "GET",
10883
+ url: "/w/{workspace}/ai_evals/scorers/recent",
10884
+ path: { workspace: data.workspace },
10885
+ query: { kind: data.kind }
10886
+ });
10887
+ }
10888
+ /**
10889
+ * run every case of a dataset as one immutable experiment
10890
+ * @param data The data for the request.
10891
+ * @param data.workspace
10892
+ * @param data.requestBody what to run
10893
+ * @returns string id of the created experiment
10894
+ * @throws ApiError
10895
+ */
10896
+ static runExperiment(data) {
10897
+ return request(OpenAPI, {
10898
+ method: "POST",
10899
+ url: "/w/{workspace}/ai_evals/experiments/run",
10900
+ path: { workspace: data.workspace },
10901
+ body: data.requestBody,
10902
+ mediaType: "application/json"
10903
+ });
10904
+ }
10905
+ /**
10906
+ * record what a run produced, so it outlives the jobs that produced it
10907
+ * Called by a run's own flow as its last step. The answers and scores a run produced live in its jobs, which have their own retention; this copies them onto the run's rows. Reading a run does the same, so this is what covers a run nobody opened.
10908
+ *
10909
+ * @param data The data for the request.
10910
+ * @param data.workspace
10911
+ * @param data.id
10912
+ * @returns number how many of the run's cases are recorded
10913
+ * @throws ApiError
10914
+ */
10915
+ static collectExperiment(data) {
10916
+ return request(OpenAPI, {
10917
+ method: "POST",
10918
+ url: "/w/{workspace}/ai_evals/experiments/collect",
10919
+ path: { workspace: data.workspace },
10920
+ query: { id: data.id }
10921
+ });
10922
+ }
10923
+ /**
10924
+ * list every experiment, across datasets
10925
+ * @param data The data for the request.
10926
+ * @param data.workspace
10927
+ * @param data.subjectPath Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
10928
+ *
10929
+ * @returns EvalExperiment The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
10930
+ *
10931
+ * @throws ApiError
10932
+ */
10933
+ static listAllExperiments(data) {
10934
+ return request(OpenAPI, {
10935
+ method: "GET",
10936
+ url: "/w/{workspace}/ai_evals/experiments/list_all",
10937
+ path: { workspace: data.workspace },
10938
+ query: { subject_path: data.subjectPath }
10939
+ });
10940
+ }
10941
+ /**
10942
+ * read an experiment's results, one row per case
10943
+ * @param data The data for the request.
10944
+ * @param data.workspace
10945
+ * @param data.path
10946
+ * @param data.id the experiment to read
10947
+ * @param data.baseline The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
10948
+ *
10949
+ * @returns unknown experiment results
10950
+ * @throws ApiError
10951
+ */
10952
+ static experimentResults(data) {
10953
+ return request(OpenAPI, {
10954
+ method: "GET",
10955
+ url: "/w/{workspace}/ai_evals/experiments/results/{path}",
10956
+ path: {
10957
+ workspace: data.workspace,
10958
+ path: data.path
10959
+ },
10960
+ query: {
10961
+ id: data.id,
10962
+ baseline: data.baseline
10963
+ }
10964
+ });
10965
+ }
10966
+ };
10705
10967
  var PathAutocompleteService = class {
10706
10968
  /**
10707
10969
  * list all paths in a workspace for client-side autocomplete
@@ -10771,6 +11033,47 @@ var RawAppService = class {
10771
11033
  });
10772
11034
  }
10773
11035
  };
11036
+ var AiService = class {
11037
+ /**
11038
+ * record AI token usage for the calling user
11039
+ * @param data The data for the request.
11040
+ * @param data.workspace
11041
+ * @param data.requestBody
11042
+ * @returns void usage recorded
11043
+ * @throws ApiError
11044
+ */
11045
+ static recordAiUsage(data) {
11046
+ return request(OpenAPI, {
11047
+ method: "POST",
11048
+ url: "/w/{workspace}/ai/usage",
11049
+ path: { workspace: data.workspace },
11050
+ body: data.requestBody,
11051
+ mediaType: "application/json"
11052
+ });
11053
+ }
11054
+ /**
11055
+ * list aggregated AI token usage
11056
+ * @param data The data for the request.
11057
+ * @param data.workspace
11058
+ * @param data.days
11059
+ * @param data.groupBy
11060
+ * @param data.scope workspace-wide usage (admin only) or the calling user's own
11061
+ * @returns unknown usage buckets
11062
+ * @throws ApiError
11063
+ */
11064
+ static listAiUsage(data) {
11065
+ return request(OpenAPI, {
11066
+ method: "GET",
11067
+ url: "/w/{workspace}/ai/usage",
11068
+ path: { workspace: data.workspace },
11069
+ query: {
11070
+ days: data.days,
11071
+ group_by: data.groupBy,
11072
+ scope: data.scope
11073
+ }
11074
+ });
11075
+ }
11076
+ };
10774
11077
  var TriggerService = class {
10775
11078
  /**
10776
11079
  * resume all suspended jobs for a specific trigger
@@ -16689,6 +16992,62 @@ var HubPublishService = class {
16689
16992
  });
16690
16993
  }
16691
16994
  /**
16995
+ * take a hub project submission back out of review
16996
+ * Requires the caller to be a workspace admin. Forwards the request to the
16997
+ * configured Hub scoped to the `{workspace}:{folder}` source and returns
16998
+ * the Hub's status code and raw response body. Everything pushed for the
16999
+ * submission is kept, so it can be fixed and submitted again.
17000
+ *
17001
+ * @param data The data for the request.
17002
+ * @param data.workspace
17003
+ * @param data.slug hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
17004
+ * @param data.folder workspace folder scoping the Hub publication: a workspace can publish
17005
+ * one Hub project per folder and the Hub-side source key is
17006
+ * `{workspace}:{folder}`
17007
+ *
17008
+ * @returns string raw Hub response body (status code is passed through from the Hub)
17009
+ * @throws ApiError
17010
+ */
17011
+ static withdrawHubProject(data) {
17012
+ return request(OpenAPI, {
17013
+ method: "POST",
17014
+ url: "/w/{workspace}/hub/projects/{slug}/withdraw",
17015
+ path: {
17016
+ workspace: data.workspace,
17017
+ slug: data.slug
17018
+ },
17019
+ query: { folder: data.folder }
17020
+ });
17021
+ }
17022
+ /**
17023
+ * discard the pending update to a published hub project
17024
+ * Requires the caller to be a workspace admin. Forwards the request to the
17025
+ * configured Hub scoped to the `{workspace}:{folder}` source and returns
17026
+ * the Hub's status code and raw response body. The published project is
17027
+ * left untouched.
17028
+ *
17029
+ * @param data The data for the request.
17030
+ * @param data.workspace
17031
+ * @param data.slug hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
17032
+ * @param data.folder workspace folder scoping the Hub publication: a workspace can publish
17033
+ * one Hub project per folder and the Hub-side source key is
17034
+ * `{workspace}:{folder}`
17035
+ *
17036
+ * @returns string raw Hub response body (status code is passed through from the Hub)
17037
+ * @throws ApiError
17038
+ */
17039
+ static discardHubProjectUpdate(data) {
17040
+ return request(OpenAPI, {
17041
+ method: "POST",
17042
+ url: "/w/{workspace}/hub/projects/{slug}/discard_update",
17043
+ path: {
17044
+ workspace: data.workspace,
17045
+ slug: data.slug
17046
+ },
17047
+ query: { folder: data.folder }
17048
+ });
17049
+ }
17050
+ /**
16692
17051
  * get the hub project linked to a workspace folder
16693
17052
  * Requires the caller to be a workspace admin. Forwards the request to the
16694
17053
  * configured Hub scoped to the `{workspace}:{folder}` source and returns
@@ -16714,4 +17073,4 @@ var HubPublishService = class {
16714
17073
  };
16715
17074
 
16716
17075
  //#endregion
16717
- export { AdminService, AgentWorkersService, AmqpTriggerService, AppService, AssetService, AuditService, AzureTriggerService, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService };
17076
+ export { AdminService, AgentWorkersService, AiEvalsService, AiService, AmqpTriggerService, AppService, AssetService, AuditService, AzureTriggerService, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService };