SDK: docs and improvements (#4310)

This commit is contained in:
Stanislav Novosad
2025-12-17 14:11:39 -07:00
committed by GitHub
parent 0d6a070a80
commit 5d2bb07371
32 changed files with 1274 additions and 291 deletions

View File

@@ -2,6 +2,7 @@
import * as Skyvern from "./api/index.js";
import { Scripts } from "./api/resources/scripts/client/Client.js";
import { Workflows } from "./api/resources/workflows/client/Client.js";
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "./core/headers.js";
import * as core from "./core/index.js";
@@ -16,6 +17,7 @@ export declare namespace SkyvernClient {
export class SkyvernClient {
protected readonly _options: SkyvernClient.Options;
protected _workflows: Workflows | undefined;
protected _scripts: Scripts | undefined;
constructor(_options: SkyvernClient.Options = {}) {
@@ -36,6 +38,10 @@ export class SkyvernClient {
};
}
public get workflows(): Workflows {
return (this._workflows ??= new Workflows(this._options));
}
public get scripts(): Scripts {
return (this._scripts ??= new Scripts(this._options));
}
@@ -399,6 +405,7 @@ export class SkyvernClient {
* page_size: 1,
* only_saved_tasks: true,
* only_workflows: true,
* only_templates: true,
* search_key: "search_key",
* title: "title",
* folder_id: "folder_id",
@@ -421,6 +428,7 @@ export class SkyvernClient {
page_size: pageSize,
only_saved_tasks: onlySavedTasks,
only_workflows: onlyWorkflows,
only_templates: onlyTemplates,
search_key: searchKey,
title,
folder_id: folderId,
@@ -444,6 +452,10 @@ export class SkyvernClient {
_queryParams.only_workflows = onlyWorkflows.toString();
}
if (onlyTemplates != null) {
_queryParams.only_templates = onlyTemplates.toString();
}
if (searchKey != null) {
_queryParams.search_key = searchKey;
}