@avaprotocol/sdk-js 2.6.2 → 2.6.4-dev.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +185 -260
  4. package/dist/index.mjs +185 -260
  5. package/dist/models/node/filter.d.ts +1 -1
  6. package/dist/models/node/filter.d.ts.map +1 -1
  7. package/dist/models/node/filter.js +5 -14
  8. package/dist/models/trigger/block.d.ts +2 -3
  9. package/dist/models/trigger/block.d.ts.map +1 -1
  10. package/dist/models/trigger/block.js +22 -37
  11. package/dist/models/trigger/cron.d.ts +2 -2
  12. package/dist/models/trigger/cron.d.ts.map +1 -1
  13. package/dist/models/trigger/cron.js +18 -18
  14. package/dist/models/trigger/event.d.ts.map +1 -1
  15. package/dist/models/trigger/event.js +5 -1
  16. package/dist/models/trigger/fixedTime.d.ts +2 -2
  17. package/dist/models/trigger/fixedTime.d.ts.map +1 -1
  18. package/dist/models/trigger/fixedTime.js +10 -10
  19. package/package.json +2 -2
  20. package/dist/auth.d.ts +0 -2
  21. package/dist/auth.d.ts.map +0 -1
  22. package/dist/auth.js +0 -10
  23. package/dist/config.d.ts +0 -9
  24. package/dist/index.d.ts +0 -351
  25. package/dist/models/edge.d.ts +0 -12
  26. package/dist/models/execution.d.ts +0 -20
  27. package/dist/models/node/branch.d.ts +0 -11
  28. package/dist/models/node/contractRead.d.ts +0 -17
  29. package/dist/models/node/contractWrite.d.ts +0 -17
  30. package/dist/models/node/customCode.d.ts +0 -20
  31. package/dist/models/node/ethTransfer.d.ts +0 -20
  32. package/dist/models/node/factory.d.ts +0 -23
  33. package/dist/models/node/graphqlQuery.d.ts +0 -21
  34. package/dist/models/node/interface.d.ts +0 -20
  35. package/dist/models/node/loop.d.ts +0 -15
  36. package/dist/models/node/restApi.d.ts +0 -22
  37. package/dist/models/secret.d.ts +0 -16
  38. package/dist/models/step.d.ts +0 -27
  39. package/dist/models/workflow.d.ts +0 -47
  40. package/dist/utils.d.ts +0 -72
package/dist/index.d.ts DELETED
@@ -1,351 +0,0 @@
1
- import { Metadata } from "@grpc/grpc-js";
2
- import { AggregatorClient } from "@/grpc_codegen/avs_grpc_pb";
3
- import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- import Workflow from "./models/workflow";
5
- import Edge from "./models/edge";
6
- import Execution from "./models/execution";
7
- import Step from "./models/step";
8
- import NodeFactory from "./models/node/factory";
9
- import TriggerFactory from "./models/trigger/factory";
10
- import Secret from "./models/secret";
11
- import { type WorkflowProps, type GetKeyResponse, type RequestOptions, type ClientOption, type SmartWallet, type GetWalletRequest, type GetExecutionsOptions, type GetWorkflowsOptions, type GetSignatureFormatResponse, type RunNodeWithInputsRequest, type RunNodeWithInputsResponse, type RunTriggerRequest, type RunTriggerResponse, type SecretProps, type PageInfo, type GetSecretsOptions, type SecretOptions, type TriggerDataProps, type SimulateWorkflowRequest, type ExecutionProps, type GetTokenMetadataRequest, type GetTokenMetadataResponse, type TimeoutConfig, type CreateSecretResponse, type UpdateSecretResponse, type DeleteSecretResponse, type CancelTaskResponse, type DeleteTaskResponse, type GetExecutionStatsResponse, type GetExecutionStatsOptions } from "@avaprotocol/types";
12
- import { ExecutionStatus } from "@/grpc_codegen/avs_pb";
13
- import { cleanGrpcErrorMessage } from "./utils";
14
- declare class BaseClient {
15
- readonly endpoint: string;
16
- readonly rpcClient: AggregatorClient;
17
- protected metadata: Metadata;
18
- protected factoryAddress?: string;
19
- protected authKey?: string;
20
- protected timeoutConfig: TimeoutConfig;
21
- constructor(opts: ClientOption);
22
- /**
23
- * Set default timeout configuration for all requests
24
- * @param config - The timeout configuration
25
- */
26
- setTimeoutConfig(config: TimeoutConfig): void;
27
- /**
28
- * Get the current timeout configuration
29
- * @returns {TimeoutConfig} - The current timeout configuration
30
- */
31
- getTimeoutConfig(): TimeoutConfig;
32
- /**
33
- * Send a fast gRPC request using FAST preset (5s timeout, 2 retries)
34
- * @param method - The method name to call
35
- * @param request - The request object
36
- * @param options - Request options
37
- * @returns {Promise<TResponse>} - The response from the server
38
- */
39
- protected sendFastRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
40
- /**
41
- * Send a slow gRPC request using SLOW preset (2min timeout, 2 retries)
42
- * @param method - The method name to call
43
- * @param request - The request object
44
- * @param options - Request options
45
- * @returns {Promise<TResponse>} - The response from the server
46
- */
47
- protected sendSlowRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
48
- /**
49
- * Send a no-retry gRPC request using NO_RETRY preset (30s timeout, no retries)
50
- * @param method - The method name to call
51
- * @param request - The request object
52
- * @param options - Request options
53
- * @returns {Promise<TResponse>} - The response from the server
54
- */
55
- protected sendNoRetryRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
56
- /**
57
- * Check if the auth key is valid by decoding the JWT token and checking the expiration
58
- * @param key - The auth key
59
- * @returns {boolean} - Whether the auth key is valid
60
- */
61
- isAuthKeyValid(key: string): boolean;
62
- /**
63
- * Get the signature format from the server
64
- * @param wallet - The wallet address
65
- * @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
66
- */
67
- getSignatureFormat(wallet: string): Promise<GetSignatureFormatResponse>;
68
- /**
69
- * The API key could retrieve a wallet's authKey by skipping its signature verification
70
- * @param message - The message to sign, obtained from getSignatureFormat
71
- * @param apiKey - The API key used instead of a signature
72
- * @returns {Promise<GetKeyResponse>} - The response from the auth call
73
- */
74
- authWithAPIKey({ message, apiKey, }: {
75
- message: string;
76
- apiKey: string;
77
- }): Promise<GetKeyResponse>;
78
- /**
79
- * Getting an authKey from the server by verifying the signature of an EOA wallet
80
- * @param message - The message to sign, obtained from getSignatureFormat
81
- * @param signature - The signature of the message
82
- * @returns {Promise<GetKeyResponse>} - The response from the auth call
83
- */
84
- authWithSignature({ message, signature, }: {
85
- message: string;
86
- signature: string;
87
- }): Promise<GetKeyResponse>;
88
- /**
89
- * The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
90
- * The authKey can be overridden at the request level by request options
91
- * @param authKey - The auth key
92
- */
93
- setAuthKey(authKey: string | undefined): void;
94
- /**
95
- * Get the auth key if it's set in the client
96
- * @returns {string | undefined} - The auth key
97
- */
98
- getAuthKey(): string | undefined;
99
- /**
100
- * Set the factory address of smart wallets for the client
101
- * @param address - The factory address
102
- */
103
- setFactoryAddress(address: string): void;
104
- /**
105
- * Get the factory address if it's set in the client
106
- * @returns {string | undefined} - The factory address
107
- */
108
- getFactoryAddress(): string | undefined;
109
- /**
110
- * Send a gRPC request with authentication, timeout support, and error handling
111
- * @param method - The method name to call
112
- * @param request - The request object
113
- * @param options - Request options including timeout configuration
114
- * @returns {Promise<TResponse>} - The response from the server
115
- */
116
- protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
117
- }
118
- declare class Client extends BaseClient {
119
- constructor(config: ClientOption);
120
- /**
121
- * Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
122
- * @param {RequestOptions} options - Request options
123
- * @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
124
- */
125
- getWallets(options?: RequestOptions): Promise<SmartWallet[]>;
126
- /**
127
- * Add a new smart wallet address to the wallet list
128
- * @param {string} salt - The salt for the wallet
129
- * @param {string} factoryAddress - Factory address for the wallet; if not provided, the address stored in the client will be used
130
- * @param {RequestOptions} options - Request options
131
- * @returns {Promise<SmartWallet>} - The added SmartWallet object
132
- */
133
- getWallet({ salt, factoryAddress }: GetWalletRequest, options?: RequestOptions): Promise<SmartWallet>;
134
- /**
135
- * Set wallet properties including hiding/unhiding a wallet
136
- * @param {GetWalletRequest} walletRequest - The wallet request containing salt and optional factory address
137
- * @param {object} options - Options for the wallet
138
- * @param {boolean} options.isHidden - Whether the wallet should be hidden
139
- * @param {RequestOptions} requestOptions - Request options
140
- * @returns {Promise<SmartWallet>} - The updated SmartWallet object
141
- */
142
- setWallet({ salt, factoryAddress }: GetWalletRequest, { isHidden }: {
143
- isHidden: boolean;
144
- }, requestOptions?: RequestOptions): Promise<SmartWallet>;
145
- /**
146
- * Submit a workflow to the AVS server; once the workflow is submitted, it cannot be modified
147
- * @param {Workflow} workflow - Workflow object to submit
148
- * @param {RequestOptions} options - Request options
149
- * @returns {Promise<string>} - The Id of the submitted workflow
150
- */
151
- submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
152
- createWorkflow(props: WorkflowProps): Workflow;
153
- /**
154
- * Get the list of workflows for multiple addresses
155
- * @param {string[]} addresses - The list of addresses
156
- * @param {GetWorkflowsOptions} options - Request options
157
- * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
158
- * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
159
- * @param {number} [options.limit] - The page limit of the response; default is 10
160
- * @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
161
- * @param {boolean} [options.includeEdges] - Include task edges (expensive field)
162
- * @param {string} [options.authKey] - The auth key for the request
163
- * @returns {Promise<{ items: WorkflowProps[]; pageInfo: PageInfo }>} - The list of WorkflowProps objects with nested pagination metadata
164
- */
165
- getWorkflows(addresses: string[], options?: GetWorkflowsOptions): Promise<{
166
- items: WorkflowProps[];
167
- pageInfo: PageInfo;
168
- }>;
169
- /**
170
- * Get the count of workflows for multiple addresses
171
- * @param addresses - The list of addresses
172
- * @param options - Request options
173
- * @returns {Promise<number>} - The count of workflows
174
- */
175
- getWorkflowCount(addresses: string[], options?: RequestOptions): Promise<number>;
176
- /**
177
- * Get the list of executions for multiple workflows
178
- * @param {string[]} workflows - The list of workflow ids to fetch execution for
179
- * @param {GetExecutionsOptions} options - Request options
180
- * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
181
- * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
182
- * @param {number} [options.limit] - The page limit of the response; default is 10
183
- * @param {string} [options.authKey] - The auth key for the request
184
- * @returns {Promise<{ items: ExecutionProps[]; pageInfo: PageInfo }>} - The list of ExecutionProps objects with nested pagination metadata
185
- */
186
- getExecutions(workflows: string[], options?: GetExecutionsOptions): Promise<{
187
- items: ExecutionProps[];
188
- pageInfo: PageInfo;
189
- }>;
190
- /**
191
- * Get a specific execution by id
192
- * @param {string} workflowId - The workflow id (taskId)
193
- * @param {string} executionId - The execution id
194
- * @param {RequestOptions} options - Request options
195
- * @returns {Promise<ExecutionProps>} - The ExecutionProps object
196
- */
197
- getExecution(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionProps>;
198
- /**
199
- * Get the count of executions for multiple workflows
200
- * @param workflows - The list of workflow ids
201
- * @param options - Request options
202
- * @returns {Promise<number>} - The count of executions
203
- */
204
- getExecutionCount(workflows: string[], options?: RequestOptions): Promise<number>;
205
- /**
206
- * Get execution statistics for a specified time period
207
- * @param {GetExecutionStatsOptions} options - Request options
208
- * @param {string[]} [options.workflowIds] - Optional array of workflow IDs
209
- * @param {number} [options.days] - Number of days to look back (default: 7)
210
- * @param {string} [options.authKey] - The auth key for the request
211
- * @returns {Promise<GetExecutionStatsResponse>} - Execution statistics
212
- */
213
- getExecutionStats(options?: GetExecutionStatsOptions): Promise<GetExecutionStatsResponse>;
214
- /**
215
- * Get the status of an execution
216
- * @param {string} workflowId - The workflow id (taskId)
217
- * @param {string} executionId - The execution id
218
- * @param {RequestOptions} options - Request options
219
- * @returns {Promise<ExecutionStatus>} - The status of the execution
220
- */
221
- getExecutionStatus(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus>;
222
- /**
223
- * Get a workflow by id
224
- * @param {string} id - The workflow id
225
- * @param {RequestOptions} options - Request options
226
- * @returns {Promise<Workflow>} - The Workflow object
227
- */
228
- getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
229
- /**
230
- * Trigger a workflow with the new flattened trigger data structure
231
- * @param {Object} params - The trigger parameters
232
- * @param {string} params.id - The workflow id
233
- * @param {TriggerDataProps} params.triggerData - The trigger data
234
- * @param {boolean} params.isBlocking - Whether to block until execution completes
235
- * @param {RequestOptions} options - Request options
236
- * @returns {Promise<avs_pb.TriggerTaskResp.AsObject>} - The response from triggering the workflow
237
- */
238
- triggerWorkflow({ id, triggerData, isBlocking, }: {
239
- id: string;
240
- triggerData: TriggerDataProps;
241
- isBlocking?: boolean;
242
- }, options?: RequestOptions): Promise<avs_pb.TriggerTaskResp.AsObject>;
243
- /**
244
- * Cancel a workflow
245
- * @param {string} id - The workflow id
246
- * @param {RequestOptions} options - Request options
247
- * @returns {Promise<CancelTaskResponse>} - The response from canceling the workflow
248
- */
249
- cancelWorkflow(id: string, options?: RequestOptions): Promise<CancelTaskResponse>;
250
- /**
251
- * Delete a workflow
252
- * @param {string} id - The workflow id
253
- * @param {RequestOptions} options - Request options
254
- * @returns {Promise<DeleteTaskResponse>} - The response from deleting the workflow
255
- */
256
- deleteWorkflow(id: string, options?: RequestOptions): Promise<DeleteTaskResponse>;
257
- /**
258
- * Create a new secret
259
- * @param {string} name - The name of the secret
260
- * @param {string} value - The value of the secret
261
- * @param {SecretOptions} [options] - Request options
262
- * @param {string} [options.workflowId] - The workflow ID to associate the secret with
263
- * @param {string} [options.orgId] - The organization ID to associate the secret with
264
- * @param {string} [options.authKey] - The auth key for the request
265
- * @returns {Promise<CreateSecretResponse>} - Structured response with creation details
266
- */
267
- createSecret(name: string, value: string, options?: SecretOptions): Promise<CreateSecretResponse>;
268
- /**
269
- * Update a secret
270
- * @param {string} name - The name of the secret
271
- * @param {string} value - The value of the secret
272
- * @param {SecretOptions} [options] - Request options
273
- * @param {string} [options.workflowId] - The workflow ID to associate the secret with
274
- * @param {string} [options.orgId] - The organization ID to associate the secret with
275
- * @param {string} [options.authKey] - The auth key for the request
276
- * @returns {Promise<UpdateSecretResponse>} - Structured response with update details
277
- */
278
- updateSecret(name: string, value: string, options?: SecretOptions): Promise<UpdateSecretResponse>;
279
- /**
280
- * Get the list of secrets
281
- * @param {GetSecretsOptions} options - Request options
282
- * @param {string} [options.workflowId] - Filter secrets by workflow ID
283
- * @param {string} [options.orgId] - Filter secrets by organization ID
284
- * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
285
- * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
286
- * @param {number} [options.limit] - The page limit of the response; default is 10
287
- * @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
288
- * @param {boolean} [options.includeCreatedBy] - Include created_by field
289
- * @param {boolean} [options.includeDescription] - Include description field
290
- * @param {string} [options.authKey] - The auth key for the request
291
- * @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
292
- */
293
- getSecrets(options?: GetSecretsOptions): Promise<{
294
- items: SecretProps[];
295
- pageInfo: PageInfo;
296
- }>;
297
- /**
298
- * Delete a secret
299
- * @param {string} name - The name of the secret
300
- * @param {SecretOptions} [options] - Request options
301
- * @param {string} [options.workflowId] - The workflow ID to associate the secret with
302
- * @param {string} [options.orgId] - The organization ID to associate the secret with
303
- * @param {string} [options.authKey] - The auth key for the request
304
- * @returns {Promise<DeleteSecretResponse>} - Structured response with deletion details
305
- */
306
- deleteSecret(name: string, options?: SecretOptions): Promise<DeleteSecretResponse>;
307
- /**
308
- * Run a node with inputs for testing purposes
309
- * @param {RunNodeWithInputsRequest} params - The parameters for running the node
310
- * @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
311
- * @param {Record<string, any>} params.nodeConfig - The configuration for the node
312
- * @param {Record<string, any>} params.inputVariables - Variables to pass to the node
313
- * @param {RequestOptions} options - Request options
314
- * @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
315
- */
316
- runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
317
- /**
318
- * Run a trigger for testing purposes
319
- * @param {RunTriggerRequest} params - The parameters for running the trigger
320
- * @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
321
- * @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
322
- * @param {RequestOptions} options - Request options
323
- * @returns {Promise<RunTriggerResponse>} - The response from running the trigger
324
- */
325
- runTrigger({ triggerType, triggerConfig }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
326
- /**
327
- * Simulate a complete task execution including trigger and all workflow nodes
328
- * @param {SimulateWorkflowRequest} params - The parameters for simulating the task
329
- * @param {Record<string, any>} params.trigger - The trigger configuration
330
- * @param {Array<Record<string, any>>} params.nodes - The workflow nodes
331
- * @param {Array<Record<string, any>>} params.edges - The workflow edges
332
- * @param {Record<string, any>} params.inputVariables - Input variables for the simulation
333
- * @param {RequestOptions} options - Request options
334
- * @returns {Promise<ExecutionProps>} - The response from simulating the task
335
- */
336
- simulateWorkflow({ trigger, nodes, edges, inputVariables }: SimulateWorkflowRequest, options?: RequestOptions): Promise<ExecutionProps>;
337
- /**
338
- * Get token metadata by contract address
339
- * @param {GetTokenMetadataRequest} params - The parameters for getting token metadata
340
- * @param {string} params.address - The contract address to look up
341
- * @param {RequestOptions} options - Request options
342
- * @returns {Promise<GetTokenMetadataResponse>} - The response containing token metadata
343
- */
344
- getTokenMetadata({ address }: GetTokenMetadataRequest, options?: RequestOptions): Promise<GetTokenMetadataResponse>;
345
- }
346
- export * from "./models/node/factory";
347
- export * from "./models/trigger/factory";
348
- export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, Secret, cleanGrpcErrorMessage, };
349
- export type { TokenMetadata, GetTokenMetadataRequest, GetTokenMetadataResponse, TokenSource, } from "@avaprotocol/types";
350
- export { TimeoutPresets, type TimeoutConfig, type TimeoutError, } from "@avaprotocol/types";
351
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import { EdgeProps } from "@avaprotocol/types";
3
- declare class Edge implements EdgeProps {
4
- id: string;
5
- source: string;
6
- target: string;
7
- constructor(edge: EdgeProps);
8
- static fromResponse(edge: avs_pb.TaskEdge): Edge;
9
- toRequest(): avs_pb.TaskEdge;
10
- }
11
- export default Edge;
12
- //# sourceMappingURL=edge.d.ts.map
@@ -1,20 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import { ExecutionProps } from "@avaprotocol/types";
3
- import Step from "./step";
4
- declare class Execution implements ExecutionProps {
5
- id: string;
6
- startAt: number;
7
- endAt: number;
8
- success: boolean;
9
- error: string;
10
- steps: Step[];
11
- constructor(props: ExecutionProps);
12
- /**
13
- * Convert Execution instance to plain object (ExecutionProps)
14
- * This is useful for serialization, especially with Next.js Server Components
15
- */
16
- toJson(): ExecutionProps;
17
- static fromResponse(execution: avs_pb.Execution): Execution;
18
- }
19
- export default Execution;
20
- //# sourceMappingURL=execution.d.ts.map
@@ -1,11 +0,0 @@
1
- import { BranchNodeProps } from "@avaprotocol/types";
2
- import Node from "./interface";
3
- import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- declare class BranchNode extends Node {
5
- constructor(props: BranchNodeProps);
6
- static fromResponse(raw: avs_pb.TaskNode): BranchNode;
7
- toRequest(): avs_pb.TaskNode;
8
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
9
- }
10
- export default BranchNode;
11
- //# sourceMappingURL=branch.d.ts.map
@@ -1,17 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { ContractReadNodeData, ContractReadNodeProps } from "@avaprotocol/types";
4
- declare class ContractReadNode extends Node {
5
- constructor(props: ContractReadNodeProps);
6
- /**
7
- * Create a protobuf ContractReadNode from config data
8
- * @param configData - The configuration data for the contract read node
9
- * @returns Configured avs_pb.ContractReadNode
10
- */
11
- static createProtobufNode(configData: ContractReadNodeData): avs_pb.ContractReadNode;
12
- static fromResponse(raw: avs_pb.TaskNode): ContractReadNode;
13
- toRequest(): avs_pb.TaskNode;
14
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown | null;
15
- }
16
- export default ContractReadNode;
17
- //# sourceMappingURL=contractRead.d.ts.map
@@ -1,17 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { ContractWriteNodeData, ContractWriteNodeProps } from "@avaprotocol/types";
4
- declare class ContractWriteNode extends Node {
5
- constructor(props: ContractWriteNodeProps);
6
- /**
7
- * Create a protobuf ContractWriteNode from config data
8
- * @param configData - The configuration data for the contract write node
9
- * @returns Configured avs_pb.ContractWriteNode
10
- */
11
- static createProtobufNode(configData: ContractWriteNodeData): avs_pb.ContractWriteNode;
12
- static fromResponse(raw: avs_pb.TaskNode): ContractWriteNode;
13
- toRequest(): avs_pb.TaskNode;
14
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown[] | null;
15
- }
16
- export default ContractWriteNode;
17
- //# sourceMappingURL=contractWrite.d.ts.map
@@ -1,20 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { CustomCodeLang, CustomCodeNodeProps } from "@avaprotocol/types";
4
- declare class CustomCodeNode extends Node {
5
- constructor(props: CustomCodeNodeProps);
6
- /**
7
- * Create a protobuf CustomCodeNode from config data
8
- * @param configData - The configuration data for the custom code node
9
- * @returns Configured avs_pb.CustomCodeNode
10
- */
11
- static createProtobufNode(configData: {
12
- lang: CustomCodeLang | string | number;
13
- source: string;
14
- }): avs_pb.CustomCodeNode;
15
- static fromResponse(raw: avs_pb.TaskNode): CustomCodeNode;
16
- toRequest(): avs_pb.TaskNode;
17
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
18
- }
19
- export default CustomCodeNode;
20
- //# sourceMappingURL=customCode.d.ts.map
@@ -1,20 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { ETHTransferNodeProps } from "@avaprotocol/types";
4
- declare class ETHTransferNode extends Node {
5
- constructor(props: ETHTransferNodeProps);
6
- /**
7
- * Create a protobuf ETHTransferNode from config data
8
- * @param configData - The configuration data for the ETH transfer node
9
- * @returns Configured avs_pb.ETHTransferNode
10
- */
11
- static createProtobufNode(configData: {
12
- destination: string;
13
- amount: string;
14
- }): avs_pb.ETHTransferNode;
15
- static fromResponse(raw: avs_pb.TaskNode): ETHTransferNode;
16
- toRequest(): avs_pb.TaskNode;
17
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
18
- }
19
- export default ETHTransferNode;
20
- //# sourceMappingURL=ethTransfer.d.ts.map
@@ -1,23 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import ContractWriteNode from "./contractWrite";
3
- import CustomCodeNode from "./customCode";
4
- import GraphQLQueryNode from "./graphqlQuery";
5
- import Node from "./interface";
6
- import RestAPINode from "./restApi";
7
- import ContractReadNode from "./contractRead";
8
- import ETHTransferNode from "./ethTransfer";
9
- import BranchNode from "./branch";
10
- import FilterNode from "./filter";
11
- import LoopNode from "./loop";
12
- import { ContractWriteNodeData, ContractReadNodeData, BranchNodeData, ETHTransferNodeData, GraphQLQueryNodeData, RestAPINodeData, CustomCodeNodeData, FilterNodeData, LoopNodeData, NodeProps, ContractWriteNodeProps, ContractReadNodeProps, BranchNodeProps, ETHTransferNodeProps, GraphQLQueryNodeProps, RestAPINodeProps, CustomCodeNodeProps, FilterNodeProps, LoopNodeProps } from "@avaprotocol/types";
13
- declare class NodeFactory {
14
- static create(props: NodeProps): Node;
15
- static createNodes(props: NodeProps[]): Node[];
16
- static fromResponse(raw: avs_pb.TaskNode): Node;
17
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
18
- }
19
- export default NodeFactory;
20
- export { Node, ContractWriteNode, ContractReadNode, BranchNode, ETHTransferNode, GraphQLQueryNode, RestAPINode, CustomCodeNode, FilterNode, LoopNode, };
21
- export type { ContractWriteNodeData, ContractReadNodeData, BranchNodeData, ETHTransferNodeData, GraphQLQueryNodeData, RestAPINodeData, CustomCodeNodeData, FilterNodeData, LoopNodeData, };
22
- export type { NodeProps, ContractWriteNodeProps, ContractReadNodeProps, BranchNodeProps, ETHTransferNodeProps, GraphQLQueryNodeProps, RestAPINodeProps, CustomCodeNodeProps, FilterNodeProps, LoopNodeProps, };
23
- //# sourceMappingURL=factory.d.ts.map
@@ -1,21 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { GraphQLQueryNodeProps } from "@avaprotocol/types";
4
- declare class GraphQLQueryNode extends Node {
5
- constructor(props: GraphQLQueryNodeProps);
6
- /**
7
- * Create a protobuf GraphQLQueryNode from config data
8
- * @param configData - The configuration data for the GraphQL query node
9
- * @returns Configured avs_pb.GraphQLQueryNode
10
- */
11
- static createProtobufNode(configData: {
12
- url: string;
13
- query: string;
14
- variablesMap?: Array<[string, string]>;
15
- }): avs_pb.GraphQLQueryNode;
16
- static fromResponse(raw: avs_pb.TaskNode): GraphQLQueryNode;
17
- toRequest(): avs_pb.TaskNode;
18
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
19
- }
20
- export default GraphQLQueryNode;
21
- //# sourceMappingURL=graphqlQuery.d.ts.map
@@ -1,20 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import { NodeType, NodeProps, NodeData } from "@avaprotocol/types";
3
- export declare function covertNodeTypeToString(status: avs_pb.TaskNode.TaskTypeCase): NodeType;
4
- export type ProtobufNodeProps = Omit<avs_pb.TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
5
- data: any;
6
- };
7
- export declare const ProtobufNodePropsUtils: {
8
- getGoStringType: (props: ProtobufNodeProps) => string;
9
- fromGoStringType: (goStringType: string, baseProps: Omit<ProtobufNodeProps, "type">) => ProtobufNodeProps;
10
- };
11
- export default abstract class Node implements NodeProps {
12
- id: string;
13
- name: string;
14
- type: NodeType;
15
- data: NodeData;
16
- constructor(props: NodeProps);
17
- toRequest(): avs_pb.TaskNode;
18
- static fromResponse(raw: avs_pb.TaskNode): Node;
19
- }
20
- //# sourceMappingURL=interface.d.ts.map
@@ -1,15 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import Node from "./interface";
3
- import { LoopNodeProps } from "@avaprotocol/types";
4
- declare class LoopNode extends Node {
5
- constructor(props: LoopNodeProps);
6
- static fromResponse(raw: avs_pb.TaskNode): LoopNode;
7
- private static extractRunnerFromProtobuf;
8
- private static mapExecutionModeFromProtobuf;
9
- private mapExecutionModeToProtobuf;
10
- toRequest(): avs_pb.TaskNode;
11
- private setRunnerOnProtobuf;
12
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown;
13
- }
14
- export default LoopNode;
15
- //# sourceMappingURL=loop.d.ts.map
@@ -1,22 +0,0 @@
1
- import Node from "./interface";
2
- import * as avs_pb from "@/grpc_codegen/avs_pb";
3
- import { RestAPINodeProps } from "@avaprotocol/types";
4
- declare class RestAPINode extends Node {
5
- constructor(props: RestAPINodeProps);
6
- /**
7
- * Create a protobuf RestAPINode from config data
8
- * @param configData - The configuration data for the REST API node
9
- * @returns Configured avs_pb.RestAPINode
10
- */
11
- static createProtobufNode(configData: {
12
- url: string;
13
- method: string;
14
- body?: string;
15
- headers?: Record<string, string>;
16
- }): avs_pb.RestAPINode;
17
- static fromResponse(raw: avs_pb.TaskNode): RestAPINode;
18
- toRequest(): avs_pb.TaskNode;
19
- static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): Record<string, unknown> | null;
20
- }
21
- export default RestAPINode;
22
- //# sourceMappingURL=restApi.d.ts.map
@@ -1,16 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import { SecretProps } from "@avaprotocol/types";
3
- declare class Secret implements SecretProps {
4
- name: string;
5
- secret?: string;
6
- workflowId?: string;
7
- orgId?: string;
8
- createdAt?: number;
9
- updatedAt?: number;
10
- createdBy?: string;
11
- description?: string;
12
- constructor(props: SecretProps);
13
- toRequest(): avs_pb.CreateOrUpdateSecretReq;
14
- }
15
- export default Secret;
16
- //# sourceMappingURL=secret.d.ts.map
@@ -1,27 +0,0 @@
1
- import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import { StepProps, OutputDataProps } from "@avaprotocol/types";
3
- declare class Step implements StepProps {
4
- id: string;
5
- type: string;
6
- name: string;
7
- success: boolean;
8
- error: string;
9
- log: string;
10
- inputsList: string[];
11
- config?: any;
12
- output: OutputDataProps;
13
- startAt: number;
14
- endAt: number;
15
- constructor(props: StepProps);
16
- /**
17
- * Convert Step instance to plain object (StepProps)
18
- * This is useful for serialization, especially with Next.js Server Components
19
- */
20
- toJson(): StepProps;
21
- static getOutput(step: avs_pb.Execution.Step): OutputDataProps;
22
- private static extractOutputData;
23
- private static getOutputDataCase;
24
- static fromResponse(step: avs_pb.Execution.Step): Step;
25
- }
26
- export default Step;
27
- //# sourceMappingURL=step.d.ts.map