windmill-client 1.811.0 → 1.812.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.
@@ -29,7 +29,7 @@ const OpenAPI = {
29
29
  PASSWORD: void 0,
30
30
  TOKEN: getEnv("WM_TOKEN"),
31
31
  USERNAME: void 0,
32
- VERSION: "1.811.0",
32
+ VERSION: "1.812.0",
33
33
  WITH_CREDENTIALS: !getEnv("WM_RAW_APP"),
34
34
  interceptors: {
35
35
  request: new Interceptors(),
package/dist/index.js CHANGED
@@ -126,7 +126,7 @@ const OpenAPI = {
126
126
  PASSWORD: void 0,
127
127
  TOKEN: getEnv$1("WM_TOKEN"),
128
128
  USERNAME: void 0,
129
- VERSION: "1.811.0",
129
+ VERSION: "1.812.0",
130
130
  WITH_CREDENTIALS: !getEnv$1("WM_RAW_APP"),
131
131
  interceptors: {
132
132
  request: new Interceptors(),
@@ -549,6 +549,99 @@ var AuditService = class {
549
549
  });
550
550
  }
551
551
  };
552
+ var TrashService = class {
553
+ /**
554
+ * list the workspace trashbin (requires admin privilege)
555
+ * @param data The data for the request.
556
+ * @param data.workspace
557
+ * @param data.itemKind only return items of this kind: script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger
558
+ *
559
+ * @param data.page which page to return (starts at 0, default 0)
560
+ * @param data.perPage number of items to return for a given page (default 100, max 1000)
561
+ * @returns TrashItem the trashed items, most recently deleted first
562
+ * @throws ApiError
563
+ */
564
+ static listTrash(data) {
565
+ return request(OpenAPI, {
566
+ method: "GET",
567
+ url: "/w/{workspace}/trash/list",
568
+ path: { workspace: data.workspace },
569
+ query: {
570
+ item_kind: data.itemKind,
571
+ page: data.page,
572
+ per_page: data.perPage
573
+ }
574
+ });
575
+ }
576
+ /**
577
+ * get a trashed item with the data it was deleted with (requires admin privilege)
578
+ * @param data The data for the request.
579
+ * @param data.workspace
580
+ * @param data.id
581
+ * @returns TrashItemWithData the trashed item
582
+ * @throws ApiError
583
+ */
584
+ static getTrashItem(data) {
585
+ return request(OpenAPI, {
586
+ method: "GET",
587
+ url: "/w/{workspace}/trash/get/{id}",
588
+ path: {
589
+ workspace: data.workspace,
590
+ id: data.id
591
+ }
592
+ });
593
+ }
594
+ /**
595
+ * restore a trashed item to its path (requires admin privilege)
596
+ * @param data The data for the request.
597
+ * @param data.workspace
598
+ * @param data.id
599
+ * @returns string item restored
600
+ * @throws ApiError
601
+ */
602
+ static restoreTrashItem(data) {
603
+ return request(OpenAPI, {
604
+ method: "POST",
605
+ url: "/w/{workspace}/trash/restore/{id}",
606
+ path: {
607
+ workspace: data.workspace,
608
+ id: data.id
609
+ }
610
+ });
611
+ }
612
+ /**
613
+ * permanently delete a trashed item (requires admin privilege)
614
+ * @param data The data for the request.
615
+ * @param data.workspace
616
+ * @param data.id
617
+ * @returns string item permanently deleted
618
+ * @throws ApiError
619
+ */
620
+ static permanentlyDeleteTrashItem(data) {
621
+ return request(OpenAPI, {
622
+ method: "DELETE",
623
+ url: "/w/{workspace}/trash/delete/{id}",
624
+ path: {
625
+ workspace: data.workspace,
626
+ id: data.id
627
+ }
628
+ });
629
+ }
630
+ /**
631
+ * permanently delete every item in the workspace trashbin (requires admin privilege)
632
+ * @param data The data for the request.
633
+ * @param data.workspace
634
+ * @returns string trashbin emptied
635
+ * @throws ApiError
636
+ */
637
+ static emptyTrash(data) {
638
+ return request(OpenAPI, {
639
+ method: "POST",
640
+ url: "/w/{workspace}/trash/empty",
641
+ path: { workspace: data.workspace }
642
+ });
643
+ }
644
+ };
552
645
  var UserService = class {
553
646
  /**
554
647
  * login with password
@@ -616,6 +709,22 @@ var UserService = class {
616
709
  });
617
710
  }
618
711
  /**
712
+ * consume a single-use login link, set the session cookie and redirect
713
+ * @param data The data for the request.
714
+ * @param data.token
715
+ * @param data.rd
716
+ * @throws ApiError
717
+ */
718
+ static consumeLoginLink(data) {
719
+ return request(OpenAPI, {
720
+ method: "GET",
721
+ url: "/auth/login_link/{token}",
722
+ path: { token: data.token },
723
+ query: { rd: data.rd },
724
+ errors: { 302: "redirected to the post-login destination, or to /user/login_link_expired when the link is used, expired or unknown" }
725
+ });
726
+ }
727
+ /**
619
728
  * reset password using token
620
729
  * @param data The data for the request.
621
730
  * @param data.requestBody token and new password
@@ -1364,6 +1473,89 @@ var UserService = class {
1364
1473
  });
1365
1474
  }
1366
1475
  /**
1476
+ * mint a single-use login link for an account (require superadmin)
1477
+ * @param data The data for the request.
1478
+ * @param data.requestBody target account and link options
1479
+ * @returns unknown login link minted
1480
+ * @throws ApiError
1481
+ */
1482
+ static createLoginLink(data) {
1483
+ return request(OpenAPI, {
1484
+ method: "POST",
1485
+ url: "/users/login_links",
1486
+ body: data.requestBody,
1487
+ mediaType: "application/json",
1488
+ errors: { 409: "the account does not have the required login type" }
1489
+ });
1490
+ }
1491
+ /**
1492
+ * record or consume a pre-approved self-hosted trial offer for a cloud account (require superadmin, cloud only)
1493
+ * @param data The data for the request.
1494
+ * @param data.requestBody
1495
+ * @returns string offer recorded or consumed
1496
+ * @throws ApiError
1497
+ */
1498
+ static setCloudTrialOffer(data) {
1499
+ return request(OpenAPI, {
1500
+ method: "POST",
1501
+ url: "/users/cloud_trial_offer",
1502
+ body: data.requestBody,
1503
+ mediaType: "application/json"
1504
+ });
1505
+ }
1506
+ /**
1507
+ * whether the signed-in account holds an unconsumed pre-approved self-hosted trial offer (cloud only)
1508
+ * @returns unknown offer state
1509
+ * @throws ApiError
1510
+ */
1511
+ static getCloudTrialOffer() {
1512
+ return request(OpenAPI, {
1513
+ method: "GET",
1514
+ url: "/users/cloud_trial_offer"
1515
+ });
1516
+ }
1517
+ /**
1518
+ * start the signed-in account's pre-approved self-hosted trial on the customer portal (cloud only). A POST answered as JSON rather than a redirecting GET, so a cross-site navigation cannot start it; the browser navigates to `location` itself
1519
+ * @returns unknown where to go — the customer portal signed in with the trial being started, or the portal home with the reason the offer could not be used
1520
+ * @throws ApiError
1521
+ */
1522
+ static goCloudTrialOffer() {
1523
+ return request(OpenAPI, {
1524
+ method: "POST",
1525
+ url: "/users/cloud_trial_offer/go",
1526
+ errors: {
1527
+ 403: "called with a job token",
1528
+ 404: "no offer for this account"
1529
+ }
1530
+ });
1531
+ }
1532
+ /**
1533
+ * record the invite context an account's onboarding tailors itself from (require superadmin, cloud only)
1534
+ * @param data The data for the request.
1535
+ * @param data.requestBody
1536
+ * @returns string profile recorded
1537
+ * @throws ApiError
1538
+ */
1539
+ static setOnboardingProfile(data) {
1540
+ return request(OpenAPI, {
1541
+ method: "POST",
1542
+ url: "/users/onboarding_profile",
1543
+ body: data.requestBody,
1544
+ mediaType: "application/json"
1545
+ });
1546
+ }
1547
+ /**
1548
+ * the invite context recorded for the signed-in account, if any (cloud only)
1549
+ * @returns unknown the profile, or null when none was recorded
1550
+ * @throws ApiError
1551
+ */
1552
+ static getOnboardingProfile() {
1553
+ return request(OpenAPI, {
1554
+ method: "GET",
1555
+ url: "/users/onboarding_profile"
1556
+ });
1557
+ }
1558
+ /**
1367
1559
  * delete token
1368
1560
  * @param data The data for the request.
1369
1561
  * @param data.tokenPrefix
@@ -11639,6 +11831,77 @@ var AiService = class {
11639
11831
  }
11640
11832
  });
11641
11833
  }
11834
+ /**
11835
+ * share an AI session artifact with the workspace
11836
+ * Stores a read-only copy that any member of the workspace can open by id. Sharing the same artifact again updates that copy, keeps its id, and restarts its retention window.
11837
+ *
11838
+ * @param data The data for the request.
11839
+ * @param data.workspace
11840
+ * @param data.requestBody
11841
+ * @returns SharedAiArtifactInfo the shared copy
11842
+ * @throws ApiError
11843
+ */
11844
+ static shareAiArtifact(data) {
11845
+ return request(OpenAPI, {
11846
+ method: "POST",
11847
+ url: "/w/{workspace}/ai/shared_artifacts/share",
11848
+ path: { workspace: data.workspace },
11849
+ body: data.requestBody,
11850
+ mediaType: "application/json"
11851
+ });
11852
+ }
11853
+ /**
11854
+ * get the calling user's share of one of their AI session artifacts
11855
+ * @param data The data for the request.
11856
+ * @param data.workspace
11857
+ * @param data.artifactId
11858
+ * @returns unknown the live share, if any, and how long shares last
11859
+ * @throws ApiError
11860
+ */
11861
+ static getAiArtifactShareStatus(data) {
11862
+ return request(OpenAPI, {
11863
+ method: "GET",
11864
+ url: "/w/{workspace}/ai/shared_artifacts/status",
11865
+ path: { workspace: data.workspace },
11866
+ query: { artifact_id: data.artifactId }
11867
+ });
11868
+ }
11869
+ /**
11870
+ * get a shared AI session artifact
11871
+ * @param data The data for the request.
11872
+ * @param data.workspace
11873
+ * @param data.id
11874
+ * @returns unknown the shared artifact
11875
+ * @throws ApiError
11876
+ */
11877
+ static getSharedAiArtifact(data) {
11878
+ return request(OpenAPI, {
11879
+ method: "GET",
11880
+ url: "/w/{workspace}/ai/shared_artifacts/get/{id}",
11881
+ path: {
11882
+ workspace: data.workspace,
11883
+ id: data.id
11884
+ }
11885
+ });
11886
+ }
11887
+ /**
11888
+ * stop sharing an AI session artifact
11889
+ * @param data The data for the request.
11890
+ * @param data.workspace
11891
+ * @param data.id
11892
+ * @returns string share deleted
11893
+ * @throws ApiError
11894
+ */
11895
+ static unshareAiArtifact(data) {
11896
+ return request(OpenAPI, {
11897
+ method: "DELETE",
11898
+ url: "/w/{workspace}/ai/shared_artifacts/delete/{id}",
11899
+ path: {
11900
+ workspace: data.workspace,
11901
+ id: data.id
11902
+ }
11903
+ });
11904
+ }
11642
11905
  };
11643
11906
  var TriggerService = class {
11644
11907
  /**
@@ -19961,6 +20224,7 @@ exports.SqsTriggerService = SqsTriggerService;
19961
20224
  exports.StepSuspend = StepSuspend;
19962
20225
  exports.TeamsService = TeamsService;
19963
20226
  exports.TokenService = TokenService;
20227
+ exports.TrashService = TrashService;
19964
20228
  exports.TriggerService = TriggerService;
19965
20229
  exports.UserService = UserService;
19966
20230
  exports.VariableService = VariableService;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ApiError } from "./core/ApiError.mjs";
2
2
  import { CancelError, CancelablePromise } from "./core/CancelablePromise.mjs";
3
3
  import { OpenAPI } from "./core/OpenAPI.mjs";
4
- import { 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 } from "./services.gen.mjs";
4
+ import { 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, TrashService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService } from "./services.gen.mjs";
5
5
  import { parseS3Object } from "./s3Types.mjs";
6
6
  import { appendPartition, datatable, ducklake, upsertPartition } from "./sqlUtils.mjs";
7
7
  import { SHARED_FOLDER, StepSuspend, WorkflowCtx, _workflowCtx, appendToResultStream, base64ToUint8Array, cancelJob, commitKafkaOffsets, databaseUrlFromResource, deleteS3File, denoS3LightClientSettings, getApprovalUrls, getFlowUserState, getIdToken, getInternalState, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResult, getResultMaybe, getResumeEndpoints, getResumeUrls, getRootJobId, getState, getStatePath, getVariable, getWorkspace, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, resolveDefaultResource, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setInternalState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, uint8ArrayToBase64, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File } from "./client.mjs";
@@ -95,4 +95,4 @@ const wmill = {
95
95
  var src_default = wmill;
96
96
 
97
97
  //#endregion
98
- export { AdminService, AgentWorkersService, AiEvalsService, AiService, AmqpTriggerService, ApiError, AppService, AssetService, AuditService, AzureTriggerService, CancelError, CancelablePromise, 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, OpenAPI, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, StepSuspend, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkflowCtx, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService, _workflowCtx, appendPartition, appendToResultStream, cancelJob, commitKafkaOffsets, datatable, src_default as default, deleteS3File, denoS3LightClientSettings, ducklake, getApprovalUrls, getFlowUserState, getIdToken, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResumeUrls, getRootJobId, getState, getVariable, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, upsertPartition, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File };
98
+ export { AdminService, AgentWorkersService, AiEvalsService, AiService, AmqpTriggerService, ApiError, AppService, AssetService, AuditService, AzureTriggerService, CancelError, CancelablePromise, 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, OpenAPI, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, StepSuspend, TeamsService, TokenService, TrashService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkflowCtx, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService, _workflowCtx, appendPartition, appendToResultStream, cancelJob, commitKafkaOffsets, datatable, src_default as default, deleteS3File, denoS3LightClientSettings, ducklake, getApprovalUrls, getFlowUserState, getIdToken, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResumeUrls, getRootJobId, getState, getVariable, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, upsertPartition, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File };