@tailor-platform/sdk 1.39.1 → 1.40.1
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/CHANGELOG.md +38 -0
- package/README.md +7 -10
- package/dist/{actor-Bb4OVq1j.d.mts → actor-B2oEmlTc.d.mts} +2 -2
- package/dist/application-CE2s_a6w.mjs +4 -0
- package/dist/{application-BHu8YE-g.mjs → application-EvhIIVg0.mjs} +2 -2
- package/dist/{application-BHu8YE-g.mjs.map → application-EvhIIVg0.mjs.map} +1 -1
- package/dist/cli/index.mjs +153 -32
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +40 -6
- package/dist/cli/lib.mjs +3 -3
- package/dist/cli/skills.mjs +13 -43
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/{client-B2K45RvK.mjs → client-CcV6Jjds.mjs} +38 -7
- package/dist/{client-B2K45RvK.mjs.map → client-CcV6Jjds.mjs.map} +1 -1
- package/dist/client-Cn9SqhZT.mjs +4 -0
- package/dist/configure/index.d.mts +4 -4
- package/dist/{crash-report-CPUF3T5d.mjs → crash-report-CSYupJ0T.mjs} +1 -1
- package/dist/{crash-report-CACiemAr.mjs → crash-report-CUbm1ErM.mjs} +2 -2
- package/dist/{crash-report-CACiemAr.mjs.map → crash-report-CUbm1ErM.mjs.map} +1 -1
- package/dist/{index-Cx1RYDbu.d.mts → index-BtXZdz-F.d.mts} +2 -2
- package/dist/{index-CeFwhUkX.d.mts → index-Chvw1Eod.d.mts} +2 -2
- package/dist/{index-Ch8Em3nz.d.mts → index-CiNNNpuH.d.mts} +2 -2
- package/dist/{index-BYmdVno1.d.mts → index-D_ezppY7.d.mts} +4 -4
- package/dist/{index-DLO_XvLi.d.mts → index-reFAYSX7.d.mts} +2 -2
- package/dist/{interceptor-B5bKVwgq.mjs → interceptor-4UC-KTno.mjs} +1 -1
- package/dist/{interceptor-B5bKVwgq.mjs.map → interceptor-4UC-KTno.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/repl-editor-DjycioU-.mjs +255 -0
- package/dist/repl-editor-DjycioU-.mjs.map +1 -0
- package/dist/{runtime-2xqzvkQv.mjs → runtime-B9R1TzLD.mjs} +234 -172
- package/dist/runtime-B9R1TzLD.mjs.map +1 -0
- package/dist/{tailor-db-field-B99RnR2N.d.mts → tailor-db-field-CoFKRCYW.d.mts} +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-DSwr-k57.d.mts → workflow.generated-Btz6srLR.d.mts} +2 -2
- package/docs/cli/auth.md +20 -14
- package/docs/cli/executor.md +17 -14
- package/docs/cli/function.md +6 -4
- package/docs/cli/query.md +45 -0
- package/docs/cli/secret.md +13 -9
- package/docs/cli/skills.md +75 -0
- package/docs/cli/staticwebsite.md +6 -4
- package/docs/cli/user.md +9 -1
- package/docs/cli/workflow.md +17 -13
- package/docs/cli-reference.md +16 -0
- package/docs/services/idp.md +85 -64
- package/docs/services/workflow.md +1 -1
- package/package.json +17 -14
- package/dist/application-C8Lr37AM.mjs +0 -4
- package/dist/client-CEVmv94H.mjs +0 -4
- package/dist/runtime-2xqzvkQv.mjs.map +0 -1
package/dist/cli/lib.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-
|
|
3
|
-
import { n as AppConfig } from "../workflow.generated-
|
|
4
|
-
import { n as kyselyTypePlugin } from "../index-
|
|
5
|
-
import { n as enumConstantsPlugin } from "../index-
|
|
6
|
-
import { n as fileUtilsPlugin } from "../index-
|
|
7
|
-
import { n as seedPlugin } from "../index-
|
|
2
|
+
import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-CoFKRCYW.mjs";
|
|
3
|
+
import { n as AppConfig } from "../workflow.generated-Btz6srLR.mjs";
|
|
4
|
+
import { n as kyselyTypePlugin } from "../index-Chvw1Eod.mjs";
|
|
5
|
+
import { n as enumConstantsPlugin } from "../index-reFAYSX7.mjs";
|
|
6
|
+
import { n as fileUtilsPlugin } from "../index-BtXZdz-F.mjs";
|
|
7
|
+
import { n as seedPlugin } from "../index-CiNNNpuH.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import * as _$_bufbuild_protobuf_codegenv20 from "@bufbuild/protobuf/codegenv2";
|
|
10
10
|
import { GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
@@ -17690,11 +17690,23 @@ type HealthOptions = z.input<typeof healthOptionsSchema>;
|
|
|
17690
17690
|
*/
|
|
17691
17691
|
declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
|
|
17692
17692
|
//#endregion
|
|
17693
|
+
//#region src/cli/shared/args.d.ts
|
|
17694
|
+
/**
|
|
17695
|
+
* Schema for sort order (`asc` or `desc`).
|
|
17696
|
+
*/
|
|
17697
|
+
declare const orderArg: z.ZodEnum<{
|
|
17698
|
+
asc: "asc";
|
|
17699
|
+
desc: "desc";
|
|
17700
|
+
}>;
|
|
17701
|
+
type Order = z.infer<typeof orderArg>;
|
|
17702
|
+
//#endregion
|
|
17693
17703
|
//#region src/cli/commands/machineuser/list.d.ts
|
|
17694
17704
|
interface ListMachineUsersOptions {
|
|
17695
17705
|
workspaceId?: string;
|
|
17696
17706
|
profile?: string;
|
|
17697
17707
|
configPath?: string;
|
|
17708
|
+
order?: Order;
|
|
17709
|
+
limit?: number;
|
|
17698
17710
|
}
|
|
17699
17711
|
interface MachineUserInfo {
|
|
17700
17712
|
name: string;
|
|
@@ -17768,6 +17780,8 @@ interface ListOAuth2ClientsOptions {
|
|
|
17768
17780
|
workspaceId?: string;
|
|
17769
17781
|
profile?: string;
|
|
17770
17782
|
configPath?: string;
|
|
17783
|
+
order?: Order;
|
|
17784
|
+
limit?: number;
|
|
17771
17785
|
}
|
|
17772
17786
|
/**
|
|
17773
17787
|
* List OAuth2 clients for the current application.
|
|
@@ -17812,6 +17826,8 @@ interface WorkflowExecutionInfo {
|
|
|
17812
17826
|
interface ListWorkflowsOptions {
|
|
17813
17827
|
workspaceId?: string;
|
|
17814
17828
|
profile?: string;
|
|
17829
|
+
order?: Order;
|
|
17830
|
+
limit?: number;
|
|
17815
17831
|
}
|
|
17816
17832
|
/**
|
|
17817
17833
|
* List workflows in the workspace and return CLI-friendly info.
|
|
@@ -17909,6 +17925,8 @@ type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> =
|
|
|
17909
17925
|
status?: string;
|
|
17910
17926
|
workspaceId?: string;
|
|
17911
17927
|
profile?: string;
|
|
17928
|
+
order?: Order;
|
|
17929
|
+
limit?: number;
|
|
17912
17930
|
};
|
|
17913
17931
|
/**
|
|
17914
17932
|
* @deprecated Use ListWorkflowExecutionsTypedOptions instead.
|
|
@@ -17918,6 +17936,8 @@ interface ListWorkflowExecutionsOptions {
|
|
|
17918
17936
|
profile?: string;
|
|
17919
17937
|
workflowName?: string;
|
|
17920
17938
|
status?: string;
|
|
17939
|
+
order?: Order;
|
|
17940
|
+
limit?: number;
|
|
17921
17941
|
}
|
|
17922
17942
|
interface GetWorkflowExecutionOptions {
|
|
17923
17943
|
executionId: string;
|
|
@@ -17938,6 +17958,11 @@ interface GetWorkflowExecutionResult {
|
|
|
17938
17958
|
}
|
|
17939
17959
|
/**
|
|
17940
17960
|
* List workflow executions with optional filters.
|
|
17961
|
+
*
|
|
17962
|
+
* Returns at most `options.limit` items. When `limit` is omitted or 0 the
|
|
17963
|
+
* function pages through every execution. The CLI caps this at 50 by
|
|
17964
|
+
* default via `pagedLogArgs`; programmatic callers that want the same
|
|
17965
|
+
* cap should pass `limit: 50` explicitly.
|
|
17941
17966
|
* @param options - Workflow execution listing options
|
|
17942
17967
|
* @returns List of workflow executions
|
|
17943
17968
|
*/
|
|
@@ -18051,6 +18076,7 @@ type ExecutorLike$1 = {
|
|
|
18051
18076
|
type ListExecutorJobsTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
|
|
18052
18077
|
executor: E;
|
|
18053
18078
|
status?: string;
|
|
18079
|
+
order?: Order;
|
|
18054
18080
|
limit?: number;
|
|
18055
18081
|
workspaceId?: string;
|
|
18056
18082
|
profile?: string;
|
|
@@ -18076,6 +18102,7 @@ type WatchExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
|
|
|
18076
18102
|
interface ListExecutorJobsOptions {
|
|
18077
18103
|
executorName: string;
|
|
18078
18104
|
status?: string;
|
|
18105
|
+
order?: Order;
|
|
18079
18106
|
limit?: number;
|
|
18080
18107
|
workspaceId?: string;
|
|
18081
18108
|
profile?: string;
|
|
@@ -18121,6 +18148,11 @@ interface WatchExecutorJobResult {
|
|
|
18121
18148
|
}
|
|
18122
18149
|
/**
|
|
18123
18150
|
* List executor jobs for a given executor.
|
|
18151
|
+
*
|
|
18152
|
+
* Returns at most `options.limit` items. When `limit` is omitted or 0 the
|
|
18153
|
+
* function pages through every job. The CLI caps this at 50 by default
|
|
18154
|
+
* via `pagedLogArgs`; programmatic callers that want the same cap should
|
|
18155
|
+
* pass `limit: 50` explicitly.
|
|
18124
18156
|
* @param options - Options for listing executor jobs
|
|
18125
18157
|
* @returns List of executor job information
|
|
18126
18158
|
*/
|
|
@@ -18145,6 +18177,8 @@ declare function watchExecutorJob(options: WatchExecutorJobOptions): Promise<Wat
|
|
|
18145
18177
|
interface ListExecutorsOptions {
|
|
18146
18178
|
workspaceId?: string;
|
|
18147
18179
|
profile?: string;
|
|
18180
|
+
order?: Order;
|
|
18181
|
+
limit?: number;
|
|
18148
18182
|
}
|
|
18149
18183
|
/**
|
|
18150
18184
|
* List executors in the workspace and return CLI-friendly info.
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { A as truncate, B as updateOrganization, Bt as DIFF_FILE_NAME, Ct as startWorkflow, D as resumeWorkflow, Dt as getWorkflowExecution, Ft as waitForExecution, Gt as compareSnapshots, Ht as MIGRATE_FILE_NAME, It as MIGRATION_LABEL_KEY, J as updateFolder, Jt as getLatestMigrationNumber, K as getOrganization, Kt as createSnapshotFromLocalTypes, L as remove, M as generate$1, Mt as getExecutor, Nt as apply, Ot as listWorkflowExecutions, P as show, Pt as executeScript, Q as getFolder, Qt as getNextMigrationNumber, Rt as bundleMigrationScript, S as listApps, Tt as getWorkflow, Ut as SCHEMA_FILE_NAME, V as organizationTree, Vt as INITIAL_SCHEMA_NUMBER, W as listOrganizations, Wt as compareLocalTypesWithSnapshot, X as listFolders, Xt as getMigrationFilePath, Yt as getMigrationDirPath, Zt as getMigrationFiles, _ as getWorkspace, _t as listExecutors, a as updateUser, an as getNamespacesWithMigrations, bt as listExecutorJobs, d as inviteUser, dt as generate, et as deleteFolder, ft as listWebhookExecutors, h as listWorkspaces, ht as triggerExecutor, in as hasChanges, it as listOAuth2Clients, k as listWorkflows, l as listUsers, ln as generateUserTypes, n as query, nn as formatDiffSummary, nt as createFolder, ot as getOAuth2Client, p as restoreWorkspace, rn as formatMigrationDiff, s as removeUser, st as getMachineUserToken, t as isNativeTypeScriptRuntime, tn as reconstructSnapshotFromMigrations, un as apiCall, ut as listMachineUsers, vt as getExecutorJob, w as getAppHealth, x as createWorkspace, xt as watchExecutorJob, y as deleteWorkspace, zt as DB_TYPES_FILE_NAME } from "../runtime-
|
|
4
|
-
import { _ as loadConfig, b as loadAccessToken, h as getDistDir, x as loadWorkspaceId } from "../application-
|
|
2
|
+
import { d as initOperatorClient } from "../client-CcV6Jjds.mjs";
|
|
3
|
+
import { A as truncate, B as updateOrganization, Bt as DIFF_FILE_NAME, Ct as startWorkflow, D as resumeWorkflow, Dt as getWorkflowExecution, Ft as waitForExecution, Gt as compareSnapshots, Ht as MIGRATE_FILE_NAME, It as MIGRATION_LABEL_KEY, J as updateFolder, Jt as getLatestMigrationNumber, K as getOrganization, Kt as createSnapshotFromLocalTypes, L as remove, M as generate$1, Mt as getExecutor, Nt as apply, Ot as listWorkflowExecutions, P as show, Pt as executeScript, Q as getFolder, Qt as getNextMigrationNumber, Rt as bundleMigrationScript, S as listApps, Tt as getWorkflow, Ut as SCHEMA_FILE_NAME, V as organizationTree, Vt as INITIAL_SCHEMA_NUMBER, W as listOrganizations, Wt as compareLocalTypesWithSnapshot, X as listFolders, Xt as getMigrationFilePath, Yt as getMigrationDirPath, Zt as getMigrationFiles, _ as getWorkspace, _t as listExecutors, a as updateUser, an as getNamespacesWithMigrations, bt as listExecutorJobs, d as inviteUser, dt as generate, et as deleteFolder, ft as listWebhookExecutors, h as listWorkspaces, ht as triggerExecutor, in as hasChanges, it as listOAuth2Clients, k as listWorkflows, l as listUsers, ln as generateUserTypes, n as query, nn as formatDiffSummary, nt as createFolder, ot as getOAuth2Client, p as restoreWorkspace, rn as formatMigrationDiff, s as removeUser, st as getMachineUserToken, t as isNativeTypeScriptRuntime, tn as reconstructSnapshotFromMigrations, un as apiCall, ut as listMachineUsers, vt as getExecutorJob, w as getAppHealth, x as createWorkspace, xt as watchExecutorJob, y as deleteWorkspace, zt as DB_TYPES_FILE_NAME } from "../runtime-B9R1TzLD.mjs";
|
|
4
|
+
import { _ as loadConfig, b as loadAccessToken, h as getDistDir, x as loadWorkspaceId } from "../application-EvhIIVg0.mjs";
|
|
5
5
|
import { n as enumConstantsPlugin } from "../enum-constants-Dx82rSjf.mjs";
|
|
6
6
|
import { n as fileUtilsPlugin } from "../file-utils-DeWpvq3T.mjs";
|
|
7
7
|
import { n as kyselyTypePlugin } from "../kysely-type-CwtvQuxh.mjs";
|
package/dist/cli/skills.mjs
CHANGED
|
@@ -1,51 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { n as logger } from "../logger-DTNAMYGy.mjs";
|
|
4
|
+
import { dirname, resolve } from "pathe";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
3
6
|
import { spawn } from "node:child_process";
|
|
4
7
|
|
|
5
|
-
//#region src/cli/shared/skills-installer.ts
|
|
6
|
-
const SKILL_NAME = "tailor-sdk";
|
|
7
|
-
const DEFAULT_SKILLS_SOURCE = "https://github.com/tailor-platform/sdk/tree/main/packages/sdk/skills";
|
|
8
|
-
const SKILLS_SOURCE_ENV_KEY = "TAILOR_SDK_SKILLS_SOURCE";
|
|
9
|
-
function resolveNpxCommand(platform = process.platform) {
|
|
10
|
-
return platform === "win32" ? "npx.cmd" : "npx";
|
|
11
|
-
}
|
|
12
|
-
function resolveSkillsSource(source) {
|
|
13
|
-
return source ?? process.env[SKILLS_SOURCE_ENV_KEY] ?? "https://github.com/tailor-platform/sdk/tree/main/packages/sdk/skills";
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Build CLI arguments for `skills add` with the fixed tailor-sdk skill target.
|
|
17
|
-
* @param additionalArgs - Additional options to pass through to `skills add`
|
|
18
|
-
* @param source - Optional skill source URL or path
|
|
19
|
-
* @returns CLI arguments for `npx skills add`
|
|
20
|
-
*/
|
|
21
|
-
function buildSkillsAddArgs(additionalArgs, source) {
|
|
22
|
-
return [
|
|
23
|
-
"skills",
|
|
24
|
-
"add",
|
|
25
|
-
resolveSkillsSource(source),
|
|
26
|
-
"--skill",
|
|
27
|
-
SKILL_NAME,
|
|
28
|
-
...additionalArgs
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Run `npx skills add` to install the tailor-sdk skill.
|
|
33
|
-
* @param options - Runtime options for skill installation
|
|
34
|
-
* @returns Process exit code from the spawned `npx` command
|
|
35
|
-
*/
|
|
36
|
-
async function runSkillsInstaller(options = {}) {
|
|
37
|
-
const args = buildSkillsAddArgs(options.additionalArgs ?? [], options.source);
|
|
38
|
-
const childProcess = (options.spawnFn ?? ((command, spawnArgs, spawnOptions) => spawn(command, spawnArgs, spawnOptions)))(resolveNpxCommand(), args, { stdio: "inherit" });
|
|
39
|
-
return await new Promise((resolve, reject) => {
|
|
40
|
-
childProcess.on("error", (error) => reject(error));
|
|
41
|
-
childProcess.on("close", (code) => resolve(code ?? 1));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
8
|
//#region src/cli/skills.ts
|
|
47
|
-
|
|
48
|
-
|
|
9
|
+
logger.warn("`tailor-sdk-skills` is deprecated and will be removed in v2. Use `tailor-sdk skills install` instead.");
|
|
10
|
+
const mainCli = resolve(dirname(fileURLToPath(import.meta.url)), "index.mjs");
|
|
11
|
+
spawn(process.execPath, [
|
|
12
|
+
mainCli,
|
|
13
|
+
"skills",
|
|
14
|
+
"install",
|
|
15
|
+
...process.argv.slice(2)
|
|
16
|
+
], { stdio: "inherit" }).on("exit", (code) => {
|
|
17
|
+
process.exit(code ?? 1);
|
|
18
|
+
});
|
|
49
19
|
|
|
50
20
|
//#endregion
|
|
51
21
|
export { };
|
package/dist/cli/skills.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.mjs","names":[],"sources":["../../src/cli/
|
|
1
|
+
{"version":3,"file":"skills.mjs","names":[],"sources":["../../src/cli/skills.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, resolve } from \"pathe\";\nimport { logger } from \"./shared/logger\";\n\nlogger.warn(\n \"`tailor-sdk-skills` is deprecated and will be removed in v2. Use `tailor-sdk skills install` instead.\",\n);\n\nconst here = dirname(fileURLToPath(import.meta.url));\nconst mainCli = resolve(here, \"index.mjs\");\n\nconst child = spawn(process.execPath, [mainCli, \"skills\", \"install\", ...process.argv.slice(2)], {\n stdio: \"inherit\",\n});\n\nchild.on(\"exit\", (code) => {\n process.exit(code ?? 1);\n});\n"],"mappings":";;;;;;;;AAOA,OAAO,KACL,wGACD;AAGD,MAAM,UAAU,QADH,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EACtB,YAAY;AAE5B,MAAM,QAAQ,UAAU;CAAC;CAAS;CAAU;CAAW,GAAG,QAAQ,KAAK,MAAM,EAAE;CAAC,EAAE,EAC9F,OAAO,WACR,CAAC,CAEI,GAAG,SAAS,SAAS;AACzB,SAAQ,KAAK,QAAQ,EAAE;EACvB"}
|
|
@@ -9,7 +9,7 @@ import { OAuth2Client } from "@badgateway/oauth2-client";
|
|
|
9
9
|
import { Code, ConnectError, createClient } from "@connectrpc/connect";
|
|
10
10
|
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
12
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
13
13
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -4870,11 +4870,14 @@ var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4870
4870
|
const { webidl } = require_webidl();
|
|
4871
4871
|
var FileLike = class FileLike {
|
|
4872
4872
|
constructor(blobLike, fileName, options = {}) {
|
|
4873
|
+
const n = fileName;
|
|
4874
|
+
const t = options.type;
|
|
4875
|
+
const d = options.lastModified ?? Date.now();
|
|
4873
4876
|
this[kState] = {
|
|
4874
4877
|
blobLike,
|
|
4875
|
-
name:
|
|
4876
|
-
type:
|
|
4877
|
-
lastModified:
|
|
4878
|
+
name: n,
|
|
4879
|
+
type: t,
|
|
4880
|
+
lastModified: d
|
|
4878
4881
|
};
|
|
4879
4882
|
}
|
|
4880
4883
|
stream(...args) {
|
|
@@ -16149,7 +16152,7 @@ function initOAuth2Client() {
|
|
|
16149
16152
|
* @returns Configured Operator client
|
|
16150
16153
|
*/
|
|
16151
16154
|
async function initOperatorClient(accessToken) {
|
|
16152
|
-
const { createTracingInterceptor } = await import("./interceptor-
|
|
16155
|
+
const { createTracingInterceptor } = await import("./interceptor-4UC-KTno.mjs");
|
|
16153
16156
|
return createClient(OperatorService, await createTransport(platformBaseUrl, [
|
|
16154
16157
|
await userAgentInterceptor(),
|
|
16155
16158
|
await bearerTokenInterceptor(accessToken),
|
|
@@ -16328,6 +16331,34 @@ async function fetchAll(fn) {
|
|
|
16328
16331
|
return items;
|
|
16329
16332
|
}
|
|
16330
16333
|
/**
|
|
16334
|
+
* Fetch paginated resources with an optional upper bound on the number of
|
|
16335
|
+
* items returned. When `limit` is 0 or undefined the function behaves
|
|
16336
|
+
* like `fetchAll` and returns every page. When `limit` is positive the
|
|
16337
|
+
* function stops once enough items are collected, requesting smaller
|
|
16338
|
+
* pages as it approaches the boundary.
|
|
16339
|
+
* @template T
|
|
16340
|
+
* @param fn - Page fetcher returning items and next page token
|
|
16341
|
+
* @param options - Pagination options
|
|
16342
|
+
* @returns Fetched items (length <= limit when limit > 0)
|
|
16343
|
+
*/
|
|
16344
|
+
async function fetchPaged(fn, options) {
|
|
16345
|
+
const limit = options?.limit;
|
|
16346
|
+
const unbounded = limit === void 0 || limit === 0;
|
|
16347
|
+
const items = [];
|
|
16348
|
+
let pageToken = "";
|
|
16349
|
+
while (true) {
|
|
16350
|
+
const pageSize = unbounded ? MAX_PAGE_SIZE : Math.min(limit - items.length, MAX_PAGE_SIZE);
|
|
16351
|
+
if (!unbounded && pageSize <= 0) break;
|
|
16352
|
+
const [batch, nextPageToken] = await fn(pageToken, pageSize);
|
|
16353
|
+
items.push(...batch);
|
|
16354
|
+
if (!unbounded && items.length >= limit) break;
|
|
16355
|
+
if (!nextPageToken) break;
|
|
16356
|
+
pageToken = nextPageToken;
|
|
16357
|
+
}
|
|
16358
|
+
if (!unbounded && items.length > limit) return items.slice(0, limit);
|
|
16359
|
+
return items;
|
|
16360
|
+
}
|
|
16361
|
+
/**
|
|
16331
16362
|
* Fetch user info from the Tailor Platform userinfo endpoint.
|
|
16332
16363
|
* @param accessToken - Access token for the current user
|
|
16333
16364
|
* @returns Parsed user info
|
|
@@ -16428,5 +16459,5 @@ async function closeConnectionPool() {
|
|
|
16428
16459
|
}
|
|
16429
16460
|
|
|
16430
16461
|
//#endregion
|
|
16431
|
-
export {
|
|
16432
|
-
//# sourceMappingURL=client-
|
|
16462
|
+
export { ApplicationSchemaUpdateAttemptStatus as $, FunctionExecution_Status as A, AuthOAuth2Client_GrantType as B, TailorDBType_Permission_Operator as C, IdPLang as D, PipelineResolver_OperationType as E, AuthConnection_Type as F, PATScope as G, AuthSCIMAttribute_Type as H, AuthHookPoint as I, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as J, TenantProviderConfig_TenantProviderType as K, AuthIDPConfig_AuthType as L, ExecutorJobStatus as M, ExecutorTargetType as N, IdPPermissionOperator as O, ExecutorTriggerType as P, PageDirection as Q, AuthInvokerSchema as R, TailorDBGQLPermission_Permit as S, TailorDBType_PermitAction as T, AuthSCIMAttribute_Uniqueness as U, AuthSCIMAttribute_Mutability as V, AuthSCIMConfig_AuthorizationType as W, Condition_Operator as X, ConditionSchema as Y, FilterSchema as Z, WorkspacePlatformUserRole as _, fetchMachineUserToken as a, TailorDBGQLPermission_Action as b, fetchUserInfo as c, initOperatorClient as d, Subgraph_ServiceType as et, parseMethodName as f, OperatorService as g, userAgent as h, fetchAll as i, FunctionExecution_Type as j, IdPPermissionPermit as k, formatRequestParams as l, resolveStaticWebsiteUrls as m, closeConnectionPool as n, fetchPaged as o, platformBaseUrl as p, UserProfileProviderConfig_UserProfileProviderType as q, createTransport as r, fetchPlatformMachineUserToken as s, MAX_PAGE_SIZE as t, initOAuth2Client as u, WorkflowExecution_Status as v, TailorDBType_Permission_Permit as w, TailorDBGQLPermission_Operator as x, WorkflowJobExecution_Status as y, AuthOAuth2Client_ClientType as z };
|
|
16463
|
+
//# sourceMappingURL=client-CcV6Jjds.mjs.map
|