@lessly/sdk-app 67.4.0 → 67.5.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.
- package/dist/_types/gen/client.gen.d.ts +6 -1
- package/dist/_types/gen/types.gen.d.ts +224 -2
- package/dist/_types/gen/workflow/index.d.ts +1 -1
- package/dist/_types/gen/workflow/queryOptions.gen.d.ts +13 -1
- package/dist/{chunk-UPW2DNXO.js → chunk-SJFS6NWD.js} +45 -2
- package/dist/{chunk-UPW2DNXO.js.map → chunk-SJFS6NWD.js.map} +1 -1
- package/dist/index.cjs +46 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/playground/index.cjs.map +1 -1
- package/dist/playground/index.js +1 -1
- package/dist/workflow/index.cjs +15 -0
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.js +13 -1
- package/dist/workflow/index.js.map +1 -1
- package/package.json +2 -2
- package/src/gen/bindings.gen.ts +43 -0
- package/src/gen/client.gen.ts +11 -0
- package/src/gen/manifest.gen.ts +3 -0
- package/src/gen/types.gen.ts +231 -2
- package/src/gen/workflow/index.ts +1 -1
- package/src/gen/workflow/queryOptions.gen.ts +20 -0
package/src/gen/types.gen.ts
CHANGED
|
@@ -111115,7 +111115,7 @@ http?: ({
|
|
|
111115
111115
|
path: string
|
|
111116
111116
|
method: string
|
|
111117
111117
|
} | null)
|
|
111118
|
-
kind: ("action" | "event" | "schedule" | "manual")
|
|
111118
|
+
kind: ("action" | "event" | "schedule" | "batch" | "manual")
|
|
111119
111119
|
title: string
|
|
111120
111120
|
schema?: {
|
|
111121
111121
|
[k: string]: unknown
|
|
@@ -111169,7 +111169,7 @@ http?: ({
|
|
|
111169
111169
|
path: string
|
|
111170
111170
|
method: string
|
|
111171
111171
|
} | null)
|
|
111172
|
-
kind: ("action" | "event" | "schedule" | "manual")
|
|
111172
|
+
kind: ("action" | "event" | "schedule" | "batch" | "manual")
|
|
111173
111173
|
title: string
|
|
111174
111174
|
schema?: {
|
|
111175
111175
|
[k: string]: unknown
|
|
@@ -111575,6 +111575,37 @@ description: (string | null)
|
|
|
111575
111575
|
live_version: (number | null)
|
|
111576
111576
|
}
|
|
111577
111577
|
|
|
111578
|
+
export interface WorkflowDefinitionEstimateInput {
|
|
111579
|
+
/**
|
|
111580
|
+
* A workflow definition: trigger, nodes, edges, grants, config_refs.
|
|
111581
|
+
*/
|
|
111582
|
+
definition?: {
|
|
111583
|
+
[k: string]: unknown
|
|
111584
|
+
}
|
|
111585
|
+
workflow_id?: string
|
|
111586
|
+
}
|
|
111587
|
+
|
|
111588
|
+
/**
|
|
111589
|
+
* There is deliberately no `count` on `unavailable`: "we could not ask" and "nobody is in the audience" are opposite facts. `grant_missing` is the ordinary answer for an unpublished draft — the source's grant arrives at publish.
|
|
111590
|
+
*/
|
|
111591
|
+
export type WorkflowDefinitionEstimateOutput = ({
|
|
111592
|
+
/**
|
|
111593
|
+
* Runs one tick would start: the trigger filter is applied. A floor when `exact` is false.
|
|
111594
|
+
*/
|
|
111595
|
+
count: number
|
|
111596
|
+
/**
|
|
111597
|
+
* False when the page budget ran out before the source did; `count` is then "at least this many".
|
|
111598
|
+
*/
|
|
111599
|
+
exact: boolean
|
|
111600
|
+
status: "counted"
|
|
111601
|
+
counted_pages: number
|
|
111602
|
+
page_limit_reached: boolean
|
|
111603
|
+
} | {
|
|
111604
|
+
reason: ("unknown_tool" | "not_a_batch_trigger" | "source_failed" | "grant_missing")
|
|
111605
|
+
status: "unavailable"
|
|
111606
|
+
counted_pages: number
|
|
111607
|
+
})
|
|
111608
|
+
|
|
111578
111609
|
export interface WorkflowDefinitionExportInput {
|
|
111579
111610
|
/**
|
|
111580
111611
|
* Defaults to the live version.
|
|
@@ -112765,6 +112796,204 @@ trigger_event_id: string
|
|
|
112765
112796
|
replay_generation: number
|
|
112766
112797
|
}
|
|
112767
112798
|
|
|
112799
|
+
export interface WorkflowTemplateApplyInput {
|
|
112800
|
+
/**
|
|
112801
|
+
* Defaults to the template's own name.
|
|
112802
|
+
*/
|
|
112803
|
+
name?: string
|
|
112804
|
+
template_id: string
|
|
112805
|
+
}
|
|
112806
|
+
|
|
112807
|
+
export interface WorkflowTemplateApplyOutput {
|
|
112808
|
+
live: ({
|
|
112809
|
+
note: (string | null)
|
|
112810
|
+
version: number
|
|
112811
|
+
published_at: (string | null)
|
|
112812
|
+
} | null)
|
|
112813
|
+
draft: ({
|
|
112814
|
+
[k: string]: unknown
|
|
112815
|
+
} | null)
|
|
112816
|
+
/**
|
|
112817
|
+
* The workflow principal's grants; null when Governance could not be reached.
|
|
112818
|
+
*/
|
|
112819
|
+
grants: ({
|
|
112820
|
+
/**
|
|
112821
|
+
* What to do next, when something needs doing; null when nothing does.
|
|
112822
|
+
*/
|
|
112823
|
+
hint: (string | null)
|
|
112824
|
+
grants: {
|
|
112825
|
+
/**
|
|
112826
|
+
* "approved" is the only status a call gets through on.
|
|
112827
|
+
*/
|
|
112828
|
+
status: ("pending" | "approved" | "revoked" | "needs_sponsor")
|
|
112829
|
+
tool_key: string
|
|
112830
|
+
approved_at: (string | null)
|
|
112831
|
+
/**
|
|
112832
|
+
* The member who vouches for the grant.
|
|
112833
|
+
*/
|
|
112834
|
+
sponsor_member_id: (string | null)
|
|
112835
|
+
}[]
|
|
112836
|
+
/**
|
|
112837
|
+
* Tool keys asked for and waiting on a human.
|
|
112838
|
+
*/
|
|
112839
|
+
pending: string[]
|
|
112840
|
+
/**
|
|
112841
|
+
* Tool keys a human withdrew. Approving one again is not enough: Governance does not resurrect a revoked grant, so it has to be asked for first.
|
|
112842
|
+
*/
|
|
112843
|
+
revoked: string[]
|
|
112844
|
+
/**
|
|
112845
|
+
* Tool keys the workflow may call right now.
|
|
112846
|
+
*/
|
|
112847
|
+
effective: string[]
|
|
112848
|
+
/**
|
|
112849
|
+
* Tool keys that were approved and lost their sponsor.
|
|
112850
|
+
*/
|
|
112851
|
+
needs_sponsor: string[]
|
|
112852
|
+
} | null)
|
|
112853
|
+
/**
|
|
112854
|
+
* What the dependency check found; null when nothing is unknown.
|
|
112855
|
+
*/
|
|
112856
|
+
health: ({
|
|
112857
|
+
unknown: {
|
|
112858
|
+
kind: ("trigger" | "action")
|
|
112859
|
+
name: string
|
|
112860
|
+
reason: ("missing" | "schema_changed")
|
|
112861
|
+
node_id?: string
|
|
112862
|
+
toolkit: string
|
|
112863
|
+
}[]
|
|
112864
|
+
/**
|
|
112865
|
+
* What a recovery restores.
|
|
112866
|
+
*/
|
|
112867
|
+
previous_status?: ("draft" | "enabled" | "disabled")
|
|
112868
|
+
} | null)
|
|
112869
|
+
/**
|
|
112870
|
+
* Validation of the draft as it stands right now.
|
|
112871
|
+
*/
|
|
112872
|
+
issues: {
|
|
112873
|
+
/**
|
|
112874
|
+
* A documented issue code; repair by reacting to this, not to prose.
|
|
112875
|
+
*/
|
|
112876
|
+
code: string
|
|
112877
|
+
hint?: string
|
|
112878
|
+
/**
|
|
112879
|
+
* JSON Pointer into the definition.
|
|
112880
|
+
*/
|
|
112881
|
+
path: string
|
|
112882
|
+
actual?: string
|
|
112883
|
+
node_id?: string
|
|
112884
|
+
expected?: string
|
|
112885
|
+
severity: ("error" | "warning")
|
|
112886
|
+
}[]
|
|
112887
|
+
/**
|
|
112888
|
+
* The last 20 health entries, newest first; `workflow_health_list` pages the rest.
|
|
112889
|
+
*/
|
|
112890
|
+
timeline: {
|
|
112891
|
+
at: string
|
|
112892
|
+
fix?: unknown
|
|
112893
|
+
/**
|
|
112894
|
+
* `broken`, `recovered`, `grants_pending`, `grant_revoked`, `sponsor_gone`, `grants_ok` and whatever the dispatcher and the executor record beside them.
|
|
112895
|
+
*/
|
|
112896
|
+
kind: string
|
|
112897
|
+
detail?: unknown
|
|
112898
|
+
}[]
|
|
112899
|
+
workflow: {
|
|
112900
|
+
id: string
|
|
112901
|
+
name: string
|
|
112902
|
+
/**
|
|
112903
|
+
* `broken` is the dependency check's, not an operator's: a capability is gone.
|
|
112904
|
+
*/
|
|
112905
|
+
status: ("draft" | "enabled" | "disabled" | "broken")
|
|
112906
|
+
/**
|
|
112907
|
+
* What starts this workflow and how big it is, without fetching the definition. Taken from the live version when one is live, from the draft otherwise.
|
|
112908
|
+
*/
|
|
112909
|
+
summary: {
|
|
112910
|
+
/**
|
|
112911
|
+
* What starts the workflow; null when the definition declares no trigger.
|
|
112912
|
+
*/
|
|
112913
|
+
trigger: ({
|
|
112914
|
+
/**
|
|
112915
|
+
* Set for `schedule` and `batch`; null otherwise.
|
|
112916
|
+
*/
|
|
112917
|
+
cron: (string | null)
|
|
112918
|
+
kind: ("event" | "schedule" | "batch" | "manual")
|
|
112919
|
+
/**
|
|
112920
|
+
* The event name for `event`, the source tool for `batch`; null otherwise.
|
|
112921
|
+
*/
|
|
112922
|
+
name: (string | null)
|
|
112923
|
+
} | null)
|
|
112924
|
+
/**
|
|
112925
|
+
* Steps in the graph; a loop counts as one.
|
|
112926
|
+
*/
|
|
112927
|
+
node_count: number
|
|
112928
|
+
}
|
|
112929
|
+
/**
|
|
112930
|
+
* What is stopping an otherwise published workflow; null when nothing is.
|
|
112931
|
+
*/
|
|
112932
|
+
attention: ({
|
|
112933
|
+
code: ("grants_pending" | "sponsor_gone" | "grant_revoked" | "rate_limited" | "auto_disable_warning")
|
|
112934
|
+
detail: {
|
|
112935
|
+
/**
|
|
112936
|
+
* Set instead when Governance could not be asked.
|
|
112937
|
+
*/
|
|
112938
|
+
error?: string
|
|
112939
|
+
/**
|
|
112940
|
+
* The tools still waiting on a sponsor.
|
|
112941
|
+
*/
|
|
112942
|
+
tools?: string[]
|
|
112943
|
+
}
|
|
112944
|
+
} | null)
|
|
112945
|
+
created_at: string
|
|
112946
|
+
updated_at: string
|
|
112947
|
+
description: (string | null)
|
|
112948
|
+
live_version: (number | null)
|
|
112949
|
+
}
|
|
112950
|
+
/**
|
|
112951
|
+
* What the live version was validated against, with the hashes it saw.
|
|
112952
|
+
*/
|
|
112953
|
+
dependencies: {
|
|
112954
|
+
kind: ("trigger" | "action")
|
|
112955
|
+
/**
|
|
112956
|
+
* The event name of the trigger, or the tool name of the action.
|
|
112957
|
+
*/
|
|
112958
|
+
name: string
|
|
112959
|
+
toolkit: string
|
|
112960
|
+
/**
|
|
112961
|
+
* The hash the capability had at publish; a drift means broken.
|
|
112962
|
+
*/
|
|
112963
|
+
schema_hash: string
|
|
112964
|
+
}[]
|
|
112965
|
+
}
|
|
112966
|
+
|
|
112967
|
+
export interface WorkflowTemplateListInput {
|
|
112968
|
+
|
|
112969
|
+
}
|
|
112970
|
+
|
|
112971
|
+
export interface WorkflowTemplateListOutput {
|
|
112972
|
+
items: {
|
|
112973
|
+
id: string
|
|
112974
|
+
name: string
|
|
112975
|
+
/**
|
|
112976
|
+
* Empty when applicable. An inapplicable template is shown with this, never hidden.
|
|
112977
|
+
*/
|
|
112978
|
+
missing: {
|
|
112979
|
+
/**
|
|
112980
|
+
* The tool name or event name the template needs.
|
|
112981
|
+
*/
|
|
112982
|
+
key: string
|
|
112983
|
+
kind: ("tool" | "event")
|
|
112984
|
+
/**
|
|
112985
|
+
* Why this template cannot work without it, as a sentence to show a person.
|
|
112986
|
+
*/
|
|
112987
|
+
reason: string
|
|
112988
|
+
}[]
|
|
112989
|
+
/**
|
|
112990
|
+
* False when something in `missing` is not registered on this Product.
|
|
112991
|
+
*/
|
|
112992
|
+
applicable: boolean
|
|
112993
|
+
description: string
|
|
112994
|
+
}[]
|
|
112995
|
+
}
|
|
112996
|
+
|
|
112768
112997
|
export interface WorkflowVersionGetInput {
|
|
112769
112998
|
/**
|
|
112770
112999
|
* 0 is the draft.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTOGENERATED by scripts/generate.ts — do not edit.
|
|
2
2
|
export * from './queryOptions.gen';
|
|
3
|
-
export type { WorkflowCapListInput, WorkflowCapListOutput, WorkflowCapabilityGetInput, WorkflowCapabilityGetOutput, WorkflowCapabilityListInput, WorkflowCapabilityListOutput, WorkflowConfigDeleteInput, WorkflowConfigDeleteOutput, WorkflowConfigListInput, WorkflowConfigListOutput, WorkflowConfigSetInput, WorkflowConfigSetOutput, WorkflowDefinitionCreateInput, WorkflowDefinitionCreateOutput, WorkflowDefinitionDisableInput, WorkflowDefinitionDisableOutput, WorkflowDefinitionDryrunInput, WorkflowDefinitionDryrunOutput, WorkflowDefinitionEnableInput, WorkflowDefinitionEnableOutput, WorkflowDefinitionExportInput, WorkflowDefinitionExportOutput, WorkflowDefinitionGetInput, WorkflowDefinitionGetOutput, WorkflowDefinitionImportInput, WorkflowDefinitionImportOutput, WorkflowDefinitionListInput, WorkflowDefinitionListOutput, WorkflowDefinitionPublishInput, WorkflowDefinitionPublishOutput, WorkflowDefinitionUpdateInput, WorkflowDefinitionUpdateOutput, WorkflowDefinitionValidateInput, WorkflowDefinitionValidateOutput, WorkflowDependencyListInput, WorkflowDependencyListOutput, WorkflowGrantListInput, WorkflowGrantListOutput, WorkflowGrantRequestInput, WorkflowGrantRequestOutput, WorkflowHealthListInput, WorkflowHealthListOutput, WorkflowHealthPingInput, WorkflowHealthPingOutput, WorkflowKillswitchGetInput, WorkflowKillswitchGetOutput, WorkflowKillswitchSetInput, WorkflowKillswitchSetOutput, WorkflowRunCancelInput, WorkflowRunCancelOutput, WorkflowRunGetInput, WorkflowRunGetOutput, WorkflowRunListInput, WorkflowRunListOutput, WorkflowRunReplayAllInput, WorkflowRunReplayAllOutput, WorkflowRunReplayInput, WorkflowRunReplayOutput, WorkflowRunStartInput, WorkflowRunStartOutput, WorkflowRunStatsInput, WorkflowRunStatsOutput, WorkflowRunTestInput, WorkflowRunTestOutput, WorkflowVersionGetInput, WorkflowVersionGetOutput, WorkflowVersionListInput, WorkflowVersionListOutput, WorkflowWaitGetInput, WorkflowWaitGetOutput, WorkflowWaitListAllInput, WorkflowWaitListAllOutput, WorkflowWaitListInput, WorkflowWaitListOutput, WorkflowWaitResolveInput, WorkflowWaitResolveOutput } from '../types.gen';
|
|
3
|
+
export type { WorkflowCapListInput, WorkflowCapListOutput, WorkflowCapabilityGetInput, WorkflowCapabilityGetOutput, WorkflowCapabilityListInput, WorkflowCapabilityListOutput, WorkflowConfigDeleteInput, WorkflowConfigDeleteOutput, WorkflowConfigListInput, WorkflowConfigListOutput, WorkflowConfigSetInput, WorkflowConfigSetOutput, WorkflowDefinitionCreateInput, WorkflowDefinitionCreateOutput, WorkflowDefinitionDisableInput, WorkflowDefinitionDisableOutput, WorkflowDefinitionDryrunInput, WorkflowDefinitionDryrunOutput, WorkflowDefinitionEnableInput, WorkflowDefinitionEnableOutput, WorkflowDefinitionEstimateInput, WorkflowDefinitionEstimateOutput, WorkflowDefinitionExportInput, WorkflowDefinitionExportOutput, WorkflowDefinitionGetInput, WorkflowDefinitionGetOutput, WorkflowDefinitionImportInput, WorkflowDefinitionImportOutput, WorkflowDefinitionListInput, WorkflowDefinitionListOutput, WorkflowDefinitionPublishInput, WorkflowDefinitionPublishOutput, WorkflowDefinitionUpdateInput, WorkflowDefinitionUpdateOutput, WorkflowDefinitionValidateInput, WorkflowDefinitionValidateOutput, WorkflowDependencyListInput, WorkflowDependencyListOutput, WorkflowGrantListInput, WorkflowGrantListOutput, WorkflowGrantRequestInput, WorkflowGrantRequestOutput, WorkflowHealthListInput, WorkflowHealthListOutput, WorkflowHealthPingInput, WorkflowHealthPingOutput, WorkflowKillswitchGetInput, WorkflowKillswitchGetOutput, WorkflowKillswitchSetInput, WorkflowKillswitchSetOutput, WorkflowRunCancelInput, WorkflowRunCancelOutput, WorkflowRunGetInput, WorkflowRunGetOutput, WorkflowRunListInput, WorkflowRunListOutput, WorkflowRunReplayAllInput, WorkflowRunReplayAllOutput, WorkflowRunReplayInput, WorkflowRunReplayOutput, WorkflowRunStartInput, WorkflowRunStartOutput, WorkflowRunStatsInput, WorkflowRunStatsOutput, WorkflowRunTestInput, WorkflowRunTestOutput, WorkflowTemplateApplyInput, WorkflowTemplateApplyOutput, WorkflowTemplateListInput, WorkflowTemplateListOutput, WorkflowVersionGetInput, WorkflowVersionGetOutput, WorkflowVersionListInput, WorkflowVersionListOutput, WorkflowWaitGetInput, WorkflowWaitGetOutput, WorkflowWaitListAllInput, WorkflowWaitListAllOutput, WorkflowWaitListInput, WorkflowWaitListOutput, WorkflowWaitResolveInput, WorkflowWaitResolveOutput } from '../types.gen';
|
|
@@ -16,6 +16,8 @@ import type {
|
|
|
16
16
|
WorkflowDefinitionDryrunInput,
|
|
17
17
|
WorkflowDefinitionDryrunOutput,
|
|
18
18
|
WorkflowDefinitionEnableInput,
|
|
19
|
+
WorkflowDefinitionEstimateInput,
|
|
20
|
+
WorkflowDefinitionEstimateOutput,
|
|
19
21
|
WorkflowDefinitionExportInput,
|
|
20
22
|
WorkflowDefinitionExportOutput,
|
|
21
23
|
WorkflowDefinitionGetInput,
|
|
@@ -50,6 +52,9 @@ import type {
|
|
|
50
52
|
WorkflowRunStatsInput,
|
|
51
53
|
WorkflowRunStatsOutput,
|
|
52
54
|
WorkflowRunTestInput,
|
|
55
|
+
WorkflowTemplateApplyInput,
|
|
56
|
+
WorkflowTemplateListInput,
|
|
57
|
+
WorkflowTemplateListOutput,
|
|
53
58
|
WorkflowVersionGetInput,
|
|
54
59
|
WorkflowVersionGetOutput,
|
|
55
60
|
WorkflowVersionListInput,
|
|
@@ -113,6 +118,11 @@ export const workflowDefinitionEnableMutationOptions = (sdk: GeneratedClient) =>
|
|
|
113
118
|
mutationFn: (input: WorkflowDefinitionEnableInput) => sdk['workflow']['definition']['enable'](input),
|
|
114
119
|
});
|
|
115
120
|
|
|
121
|
+
export const workflowDefinitionEstimateQueryOptions = (sdk: GeneratedClient, input: WorkflowDefinitionEstimateInput) => ({
|
|
122
|
+
queryKey: ['workflow', 'definition', 'estimate', input] as const,
|
|
123
|
+
queryFn: () => sdk['workflow']['definition']['estimate'](input),
|
|
124
|
+
});
|
|
125
|
+
|
|
116
126
|
export const workflowDefinitionExportQueryOptions = (sdk: GeneratedClient, input: WorkflowDefinitionExportInput) => ({
|
|
117
127
|
queryKey: ['workflow', 'definition', 'export', input] as const,
|
|
118
128
|
queryFn: () => sdk['workflow']['definition']['export'](input),
|
|
@@ -223,6 +233,16 @@ export const workflowRunTestMutationOptions = (sdk: GeneratedClient) => ({
|
|
|
223
233
|
mutationFn: (input: WorkflowRunTestInput) => sdk['workflow']['run']['test'](input),
|
|
224
234
|
});
|
|
225
235
|
|
|
236
|
+
export const workflowTemplateApplyMutationOptions = (sdk: GeneratedClient) => ({
|
|
237
|
+
mutationKey: ['workflow', 'template', 'apply'],
|
|
238
|
+
mutationFn: (input: WorkflowTemplateApplyInput) => sdk['workflow']['template']['apply'](input),
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
export const workflowTemplateListQueryOptions = (sdk: GeneratedClient, input: WorkflowTemplateListInput) => ({
|
|
242
|
+
queryKey: ['workflow', 'template', 'list', input] as const,
|
|
243
|
+
queryFn: () => sdk['workflow']['template']['list'](input),
|
|
244
|
+
});
|
|
245
|
+
|
|
226
246
|
export const workflowVersionGetQueryOptions = (sdk: GeneratedClient, input: WorkflowVersionGetInput) => ({
|
|
227
247
|
queryKey: ['workflow', 'version', 'get', input] as const,
|
|
228
248
|
queryFn: () => sdk['workflow']['version']['get'](input),
|