weave-typescript 0.43.0 → 0.44.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.
@@ -0,0 +1,369 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Observable } from "rxjs";
3
+ import { WorkflowDefinition, WorkflowDraft, WorkflowPublishPlan, WorkflowRun, WorkflowRunEvent, WorkflowRunStatus, WorkflowStepRun, WorkflowTemplate, WorkflowTemplateStatus, WorkflowVersion } from "./workflow.pb";
4
+ export declare const protobufPackage = "weaveapi.workflow.v1";
5
+ export interface CreateWorkflowTemplateRequest {
6
+ organizationId: string;
7
+ slug: string;
8
+ name: string;
9
+ description: string;
10
+ definition: WorkflowDefinition | undefined;
11
+ inputSchema: {
12
+ [key: string]: any;
13
+ } | undefined;
14
+ outputSchema: {
15
+ [key: string]: any;
16
+ } | undefined;
17
+ metadata: {
18
+ [key: string]: any;
19
+ } | undefined;
20
+ }
21
+ export interface CreateWorkflowTemplateResponse {
22
+ template: WorkflowTemplate | undefined;
23
+ draft: WorkflowDraft | undefined;
24
+ }
25
+ export interface GetWorkflowTemplateRequest {
26
+ organizationId: string;
27
+ workflowTemplateId: string;
28
+ }
29
+ export interface GetWorkflowTemplateResponse {
30
+ template: WorkflowTemplate | undefined;
31
+ draft: WorkflowDraft | undefined;
32
+ latestVersion: WorkflowVersion | undefined;
33
+ }
34
+ export interface ListWorkflowTemplatesRequest {
35
+ organizationId: string;
36
+ status: WorkflowTemplateStatus;
37
+ pageSize: number;
38
+ pageToken: string;
39
+ }
40
+ export interface ListWorkflowTemplatesResponse {
41
+ templates: WorkflowTemplate[];
42
+ nextPageToken: string;
43
+ }
44
+ export interface UpdateWorkflowDraftRequest {
45
+ organizationId: string;
46
+ workflowTemplateId: string;
47
+ expectedRevision: number;
48
+ name: string;
49
+ description: string;
50
+ definition: WorkflowDefinition | undefined;
51
+ inputSchema: {
52
+ [key: string]: any;
53
+ } | undefined;
54
+ outputSchema: {
55
+ [key: string]: any;
56
+ } | undefined;
57
+ metadata: {
58
+ [key: string]: any;
59
+ } | undefined;
60
+ patch: {
61
+ [key: string]: any;
62
+ } | undefined;
63
+ }
64
+ export interface UpdateWorkflowDraftResponse {
65
+ draft: WorkflowDraft | undefined;
66
+ }
67
+ export interface PlanWorkflowPublishRequest {
68
+ organizationId: string;
69
+ workflowTemplateId: string;
70
+ draftRevision: number;
71
+ }
72
+ export interface PlanWorkflowPublishResponse {
73
+ plan: WorkflowPublishPlan | undefined;
74
+ }
75
+ export interface PublishWorkflowTemplateRequest {
76
+ organizationId: string;
77
+ workflowTemplateId: string;
78
+ draftRevision: number;
79
+ }
80
+ export interface PublishWorkflowTemplateResponse {
81
+ version: WorkflowVersion | undefined;
82
+ }
83
+ export interface GetWorkflowVersionRequest {
84
+ organizationId: string;
85
+ workflowTemplateId: string;
86
+ version: number;
87
+ }
88
+ export interface GetWorkflowVersionResponse {
89
+ version: WorkflowVersion | undefined;
90
+ }
91
+ export interface ListWorkflowVersionsRequest {
92
+ organizationId: string;
93
+ workflowTemplateId: string;
94
+ pageSize: number;
95
+ pageToken: string;
96
+ }
97
+ export interface ListWorkflowVersionsResponse {
98
+ versions: WorkflowVersion[];
99
+ nextPageToken: string;
100
+ }
101
+ export interface RunWorkflowRequest {
102
+ organizationId: string;
103
+ workflowTemplateId: string;
104
+ version: number;
105
+ chatSessionId: string;
106
+ input: {
107
+ [key: string]: any;
108
+ } | undefined;
109
+ }
110
+ export interface RunWorkflowResponse {
111
+ run: WorkflowRun | undefined;
112
+ }
113
+ export interface GetWorkflowRunRequest {
114
+ organizationId: string;
115
+ workflowRunId: string;
116
+ }
117
+ export interface GetWorkflowRunResponse {
118
+ run: WorkflowRun | undefined;
119
+ steps: WorkflowStepRun[];
120
+ }
121
+ export interface ListWorkflowRunsRequest {
122
+ organizationId: string;
123
+ workflowTemplateId: string;
124
+ status: WorkflowRunStatus;
125
+ pageSize: number;
126
+ pageToken: string;
127
+ }
128
+ export interface ListWorkflowRunsResponse {
129
+ runs: WorkflowRun[];
130
+ nextPageToken: string;
131
+ }
132
+ export interface WatchWorkflowRunEventsRequest {
133
+ organizationId: string;
134
+ workflowRunId: string;
135
+ afterSequence: number;
136
+ }
137
+ export interface WatchWorkflowRunEventsResponse {
138
+ event: WorkflowRunEvent | undefined;
139
+ }
140
+ export declare const CreateWorkflowTemplateRequest: MessageFns<CreateWorkflowTemplateRequest>;
141
+ export declare const CreateWorkflowTemplateResponse: MessageFns<CreateWorkflowTemplateResponse>;
142
+ export declare const GetWorkflowTemplateRequest: MessageFns<GetWorkflowTemplateRequest>;
143
+ export declare const GetWorkflowTemplateResponse: MessageFns<GetWorkflowTemplateResponse>;
144
+ export declare const ListWorkflowTemplatesRequest: MessageFns<ListWorkflowTemplatesRequest>;
145
+ export declare const ListWorkflowTemplatesResponse: MessageFns<ListWorkflowTemplatesResponse>;
146
+ export declare const UpdateWorkflowDraftRequest: MessageFns<UpdateWorkflowDraftRequest>;
147
+ export declare const UpdateWorkflowDraftResponse: MessageFns<UpdateWorkflowDraftResponse>;
148
+ export declare const PlanWorkflowPublishRequest: MessageFns<PlanWorkflowPublishRequest>;
149
+ export declare const PlanWorkflowPublishResponse: MessageFns<PlanWorkflowPublishResponse>;
150
+ export declare const PublishWorkflowTemplateRequest: MessageFns<PublishWorkflowTemplateRequest>;
151
+ export declare const PublishWorkflowTemplateResponse: MessageFns<PublishWorkflowTemplateResponse>;
152
+ export declare const GetWorkflowVersionRequest: MessageFns<GetWorkflowVersionRequest>;
153
+ export declare const GetWorkflowVersionResponse: MessageFns<GetWorkflowVersionResponse>;
154
+ export declare const ListWorkflowVersionsRequest: MessageFns<ListWorkflowVersionsRequest>;
155
+ export declare const ListWorkflowVersionsResponse: MessageFns<ListWorkflowVersionsResponse>;
156
+ export declare const RunWorkflowRequest: MessageFns<RunWorkflowRequest>;
157
+ export declare const RunWorkflowResponse: MessageFns<RunWorkflowResponse>;
158
+ export declare const GetWorkflowRunRequest: MessageFns<GetWorkflowRunRequest>;
159
+ export declare const GetWorkflowRunResponse: MessageFns<GetWorkflowRunResponse>;
160
+ export declare const ListWorkflowRunsRequest: MessageFns<ListWorkflowRunsRequest>;
161
+ export declare const ListWorkflowRunsResponse: MessageFns<ListWorkflowRunsResponse>;
162
+ export declare const WatchWorkflowRunEventsRequest: MessageFns<WatchWorkflowRunEventsRequest>;
163
+ export declare const WatchWorkflowRunEventsResponse: MessageFns<WatchWorkflowRunEventsResponse>;
164
+ export interface WorkflowService {
165
+ CreateWorkflowTemplate(request: CreateWorkflowTemplateRequest): Promise<CreateWorkflowTemplateResponse>;
166
+ GetWorkflowTemplate(request: GetWorkflowTemplateRequest): Promise<GetWorkflowTemplateResponse>;
167
+ ListWorkflowTemplates(request: ListWorkflowTemplatesRequest): Promise<ListWorkflowTemplatesResponse>;
168
+ UpdateWorkflowDraft(request: UpdateWorkflowDraftRequest): Promise<UpdateWorkflowDraftResponse>;
169
+ PlanWorkflowPublish(request: PlanWorkflowPublishRequest): Promise<PlanWorkflowPublishResponse>;
170
+ PublishWorkflowTemplate(request: PublishWorkflowTemplateRequest): Promise<PublishWorkflowTemplateResponse>;
171
+ GetWorkflowVersion(request: GetWorkflowVersionRequest): Promise<GetWorkflowVersionResponse>;
172
+ ListWorkflowVersions(request: ListWorkflowVersionsRequest): Promise<ListWorkflowVersionsResponse>;
173
+ RunWorkflow(request: RunWorkflowRequest): Promise<RunWorkflowResponse>;
174
+ GetWorkflowRun(request: GetWorkflowRunRequest): Promise<GetWorkflowRunResponse>;
175
+ ListWorkflowRuns(request: ListWorkflowRunsRequest): Promise<ListWorkflowRunsResponse>;
176
+ WatchWorkflowRunEvents(request: WatchWorkflowRunEventsRequest): Observable<WatchWorkflowRunEventsResponse>;
177
+ }
178
+ export declare const WorkflowServiceServiceName = "weaveapi.workflow.v1.WorkflowService";
179
+ export declare class WorkflowServiceClientImpl implements WorkflowService {
180
+ private readonly rpc;
181
+ private readonly service;
182
+ constructor(rpc: Rpc, opts?: {
183
+ service?: string;
184
+ });
185
+ CreateWorkflowTemplate(request: CreateWorkflowTemplateRequest): Promise<CreateWorkflowTemplateResponse>;
186
+ GetWorkflowTemplate(request: GetWorkflowTemplateRequest): Promise<GetWorkflowTemplateResponse>;
187
+ ListWorkflowTemplates(request: ListWorkflowTemplatesRequest): Promise<ListWorkflowTemplatesResponse>;
188
+ UpdateWorkflowDraft(request: UpdateWorkflowDraftRequest): Promise<UpdateWorkflowDraftResponse>;
189
+ PlanWorkflowPublish(request: PlanWorkflowPublishRequest): Promise<PlanWorkflowPublishResponse>;
190
+ PublishWorkflowTemplate(request: PublishWorkflowTemplateRequest): Promise<PublishWorkflowTemplateResponse>;
191
+ GetWorkflowVersion(request: GetWorkflowVersionRequest): Promise<GetWorkflowVersionResponse>;
192
+ ListWorkflowVersions(request: ListWorkflowVersionsRequest): Promise<ListWorkflowVersionsResponse>;
193
+ RunWorkflow(request: RunWorkflowRequest): Promise<RunWorkflowResponse>;
194
+ GetWorkflowRun(request: GetWorkflowRunRequest): Promise<GetWorkflowRunResponse>;
195
+ ListWorkflowRuns(request: ListWorkflowRunsRequest): Promise<ListWorkflowRunsResponse>;
196
+ WatchWorkflowRunEvents(request: WatchWorkflowRunEventsRequest): Observable<WatchWorkflowRunEventsResponse>;
197
+ }
198
+ export type WorkflowServiceDefinition = typeof WorkflowServiceDefinition;
199
+ export declare const WorkflowServiceDefinition: {
200
+ readonly name: "WorkflowService";
201
+ readonly fullName: "weaveapi.workflow.v1.WorkflowService";
202
+ readonly methods: {
203
+ readonly createWorkflowTemplate: {
204
+ readonly name: "CreateWorkflowTemplate";
205
+ readonly requestType: typeof CreateWorkflowTemplateRequest;
206
+ readonly requestStream: false;
207
+ readonly responseType: typeof CreateWorkflowTemplateResponse;
208
+ readonly responseStream: false;
209
+ readonly options: {
210
+ readonly _unknownFields: {
211
+ readonly 578365826: readonly [Uint8Array];
212
+ };
213
+ };
214
+ };
215
+ readonly getWorkflowTemplate: {
216
+ readonly name: "GetWorkflowTemplate";
217
+ readonly requestType: typeof GetWorkflowTemplateRequest;
218
+ readonly requestStream: false;
219
+ readonly responseType: typeof GetWorkflowTemplateResponse;
220
+ readonly responseStream: false;
221
+ readonly options: {
222
+ readonly _unknownFields: {
223
+ readonly 578365826: readonly [Uint8Array];
224
+ };
225
+ };
226
+ };
227
+ readonly listWorkflowTemplates: {
228
+ readonly name: "ListWorkflowTemplates";
229
+ readonly requestType: typeof ListWorkflowTemplatesRequest;
230
+ readonly requestStream: false;
231
+ readonly responseType: typeof ListWorkflowTemplatesResponse;
232
+ readonly responseStream: false;
233
+ readonly options: {
234
+ readonly _unknownFields: {
235
+ readonly 578365826: readonly [Uint8Array];
236
+ };
237
+ };
238
+ };
239
+ readonly updateWorkflowDraft: {
240
+ readonly name: "UpdateWorkflowDraft";
241
+ readonly requestType: typeof UpdateWorkflowDraftRequest;
242
+ readonly requestStream: false;
243
+ readonly responseType: typeof UpdateWorkflowDraftResponse;
244
+ readonly responseStream: false;
245
+ readonly options: {
246
+ readonly _unknownFields: {
247
+ readonly 578365826: readonly [Uint8Array];
248
+ };
249
+ };
250
+ };
251
+ readonly planWorkflowPublish: {
252
+ readonly name: "PlanWorkflowPublish";
253
+ readonly requestType: typeof PlanWorkflowPublishRequest;
254
+ readonly requestStream: false;
255
+ readonly responseType: typeof PlanWorkflowPublishResponse;
256
+ readonly responseStream: false;
257
+ readonly options: {
258
+ readonly _unknownFields: {
259
+ readonly 578365826: readonly [Uint8Array];
260
+ };
261
+ };
262
+ };
263
+ readonly publishWorkflowTemplate: {
264
+ readonly name: "PublishWorkflowTemplate";
265
+ readonly requestType: typeof PublishWorkflowTemplateRequest;
266
+ readonly requestStream: false;
267
+ readonly responseType: typeof PublishWorkflowTemplateResponse;
268
+ readonly responseStream: false;
269
+ readonly options: {
270
+ readonly _unknownFields: {
271
+ readonly 578365826: readonly [Uint8Array];
272
+ };
273
+ };
274
+ };
275
+ readonly getWorkflowVersion: {
276
+ readonly name: "GetWorkflowVersion";
277
+ readonly requestType: typeof GetWorkflowVersionRequest;
278
+ readonly requestStream: false;
279
+ readonly responseType: typeof GetWorkflowVersionResponse;
280
+ readonly responseStream: false;
281
+ readonly options: {
282
+ readonly _unknownFields: {
283
+ readonly 578365826: readonly [Uint8Array];
284
+ };
285
+ };
286
+ };
287
+ readonly listWorkflowVersions: {
288
+ readonly name: "ListWorkflowVersions";
289
+ readonly requestType: typeof ListWorkflowVersionsRequest;
290
+ readonly requestStream: false;
291
+ readonly responseType: typeof ListWorkflowVersionsResponse;
292
+ readonly responseStream: false;
293
+ readonly options: {
294
+ readonly _unknownFields: {
295
+ readonly 578365826: readonly [Uint8Array];
296
+ };
297
+ };
298
+ };
299
+ readonly runWorkflow: {
300
+ readonly name: "RunWorkflow";
301
+ readonly requestType: typeof RunWorkflowRequest;
302
+ readonly requestStream: false;
303
+ readonly responseType: typeof RunWorkflowResponse;
304
+ readonly responseStream: false;
305
+ readonly options: {
306
+ readonly _unknownFields: {
307
+ readonly 578365826: readonly [Uint8Array];
308
+ };
309
+ };
310
+ };
311
+ readonly getWorkflowRun: {
312
+ readonly name: "GetWorkflowRun";
313
+ readonly requestType: typeof GetWorkflowRunRequest;
314
+ readonly requestStream: false;
315
+ readonly responseType: typeof GetWorkflowRunResponse;
316
+ readonly responseStream: false;
317
+ readonly options: {
318
+ readonly _unknownFields: {
319
+ readonly 578365826: readonly [Uint8Array];
320
+ };
321
+ };
322
+ };
323
+ readonly listWorkflowRuns: {
324
+ readonly name: "ListWorkflowRuns";
325
+ readonly requestType: typeof ListWorkflowRunsRequest;
326
+ readonly requestStream: false;
327
+ readonly responseType: typeof ListWorkflowRunsResponse;
328
+ readonly responseStream: false;
329
+ readonly options: {
330
+ readonly _unknownFields: {
331
+ readonly 578365826: readonly [Uint8Array];
332
+ };
333
+ };
334
+ };
335
+ readonly watchWorkflowRunEvents: {
336
+ readonly name: "WatchWorkflowRunEvents";
337
+ readonly requestType: typeof WatchWorkflowRunEventsRequest;
338
+ readonly requestStream: false;
339
+ readonly responseType: typeof WatchWorkflowRunEventsResponse;
340
+ readonly responseStream: true;
341
+ readonly options: {};
342
+ };
343
+ };
344
+ };
345
+ interface Rpc {
346
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
347
+ clientStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Promise<Uint8Array>;
348
+ serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable<Uint8Array>;
349
+ bidirectionalStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Observable<Uint8Array>;
350
+ }
351
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
352
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
353
+ [K in keyof T]?: DeepPartial<T[K]>;
354
+ } : Partial<T>;
355
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
356
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
357
+ [K in keyof P]: Exact<P[K], I[K]>;
358
+ } & {
359
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
360
+ };
361
+ export interface MessageFns<T> {
362
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
363
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
364
+ fromJSON(object: any): T;
365
+ toJSON(message: T): unknown;
366
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
367
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
368
+ }
369
+ export {};