@avaprotocol/sdk-js 2.17.0 → 4.0.0-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.
- package/dist/index.d.ts +1 -370
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +737 -22356
- package/dist/index.mjs +699 -22386
- package/dist/v4/auth.d.ts +54 -0
- package/dist/v4/auth.d.ts.map +1 -0
- package/dist/v4/auth.js +70 -0
- package/dist/v4/builders/nodes.d.ts +103 -0
- package/dist/v4/builders/nodes.d.ts.map +1 -0
- package/dist/v4/builders/nodes.js +132 -0
- package/dist/v4/builders/triggers.d.ts +66 -0
- package/dist/v4/builders/triggers.d.ts.map +1 -0
- package/dist/v4/builders/triggers.js +74 -0
- package/dist/v4/chains.d.ts +16 -0
- package/dist/v4/chains.d.ts.map +1 -0
- package/dist/v4/chains.js +23 -0
- package/dist/v4/client.d.ts +60 -0
- package/dist/v4/client.d.ts.map +1 -0
- package/dist/v4/client.js +53 -0
- package/dist/v4/index.d.ts +18 -0
- package/dist/v4/index.d.ts.map +1 -0
- package/dist/v4/index.js +23 -0
- package/dist/v4/internal/errors.d.ts +36 -0
- package/dist/v4/internal/errors.d.ts.map +1 -0
- package/dist/v4/internal/errors.js +32 -0
- package/dist/v4/internal/transport.d.ts +64 -0
- package/dist/v4/internal/transport.d.ts.map +1 -0
- package/dist/v4/internal/transport.js +133 -0
- package/dist/v4/resources/auth.d.ts +39 -0
- package/dist/v4/resources/auth.d.ts.map +1 -0
- package/dist/v4/resources/auth.js +53 -0
- package/dist/v4/resources/executions.d.ts +68 -0
- package/dist/v4/resources/executions.d.ts.map +1 -0
- package/dist/v4/resources/executions.js +126 -0
- package/dist/v4/resources/health.d.ts +9 -0
- package/dist/v4/resources/health.d.ts.map +1 -0
- package/dist/v4/resources/health.js +9 -0
- package/dist/v4/resources/nodes.d.ts +9 -0
- package/dist/v4/resources/nodes.d.ts.map +1 -0
- package/dist/v4/resources/nodes.js +13 -0
- package/dist/v4/resources/operators.d.ts +9 -0
- package/dist/v4/resources/operators.d.ts.map +1 -0
- package/dist/v4/resources/operators.js +9 -0
- package/dist/v4/resources/secrets.d.ts +24 -0
- package/dist/v4/resources/secrets.d.ts.map +1 -0
- package/dist/v4/resources/secrets.js +28 -0
- package/dist/v4/resources/tokens.d.ts +16 -0
- package/dist/v4/resources/tokens.d.ts.map +1 -0
- package/dist/v4/resources/tokens.js +17 -0
- package/dist/v4/resources/triggers.d.ts +9 -0
- package/dist/v4/resources/triggers.d.ts.map +1 -0
- package/dist/v4/resources/triggers.js +13 -0
- package/dist/v4/resources/wallets.d.ts +25 -0
- package/dist/v4/resources/wallets.d.ts.map +1 -0
- package/dist/v4/resources/wallets.js +45 -0
- package/dist/v4/resources/workflows.d.ts +54 -0
- package/dist/v4/resources/workflows.d.ts.map +1 -0
- package/dist/v4/resources/workflows.js +81 -0
- package/package.json +4 -12
- package/dist/auth.d.ts +0 -2
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -10
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -19
- package/dist/models/edge.d.ts +0 -12
- package/dist/models/edge.d.ts.map +0 -1
- package/dist/models/edge.js +0 -19
- package/dist/models/execution.d.ts +0 -30
- package/dist/models/execution.d.ts.map +0 -1
- package/dist/models/execution.js +0 -100
- package/dist/models/node/balance.d.ts +0 -17
- package/dist/models/node/balance.d.ts.map +0 -1
- package/dist/models/node/balance.js +0 -78
- package/dist/models/node/branch.d.ts +0 -11
- package/dist/models/node/branch.d.ts.map +0 -1
- package/dist/models/node/branch.js +0 -63
- package/dist/models/node/contractRead.d.ts +0 -17
- package/dist/models/node/contractRead.d.ts.map +0 -1
- package/dist/models/node/contractRead.js +0 -91
- package/dist/models/node/contractWrite.d.ts +0 -17
- package/dist/models/node/contractWrite.d.ts.map +0 -1
- package/dist/models/node/contractWrite.js +0 -102
- package/dist/models/node/customCode.d.ts +0 -20
- package/dist/models/node/customCode.d.ts.map +0 -1
- package/dist/models/node/customCode.js +0 -74
- package/dist/models/node/ethTransfer.d.ts +0 -20
- package/dist/models/node/ethTransfer.d.ts.map +0 -1
- package/dist/models/node/ethTransfer.js +0 -58
- package/dist/models/node/factory.d.ts +0 -24
- package/dist/models/node/factory.d.ts.map +0 -1
- package/dist/models/node/factory.js +0 -108
- package/dist/models/node/filter.d.ts +0 -11
- package/dist/models/node/filter.d.ts.map +0 -1
- package/dist/models/node/filter.js +0 -57
- package/dist/models/node/graphqlQuery.d.ts +0 -21
- package/dist/models/node/graphqlQuery.d.ts.map +0 -1
- package/dist/models/node/graphqlQuery.js +0 -74
- package/dist/models/node/interface.d.ts +0 -20
- package/dist/models/node/interface.d.ts.map +0 -1
- package/dist/models/node/interface.js +0 -58
- package/dist/models/node/loop.d.ts +0 -15
- package/dist/models/node/loop.d.ts.map +0 -1
- package/dist/models/node/loop.js +0 -235
- package/dist/models/node/restApi.d.ts +0 -23
- package/dist/models/node/restApi.d.ts.map +0 -1
- package/dist/models/node/restApi.js +0 -84
- package/dist/models/secret.d.ts +0 -16
- package/dist/models/secret.d.ts.map +0 -1
- package/dist/models/secret.js +0 -28
- package/dist/models/step.d.ts +0 -33
- package/dist/models/step.d.ts.map +0 -1
- package/dist/models/step.js +0 -287
- package/dist/models/trigger/block.d.ts +0 -21
- package/dist/models/trigger/block.d.ts.map +0 -1
- package/dist/models/trigger/block.js +0 -81
- package/dist/models/trigger/cron.d.ts +0 -23
- package/dist/models/trigger/cron.d.ts.map +0 -1
- package/dist/models/trigger/cron.js +0 -77
- package/dist/models/trigger/event.d.ts +0 -22
- package/dist/models/trigger/event.d.ts.map +0 -1
- package/dist/models/trigger/event.js +0 -244
- package/dist/models/trigger/factory.d.ts +0 -27
- package/dist/models/trigger/factory.d.ts.map +0 -1
- package/dist/models/trigger/factory.js +0 -73
- package/dist/models/trigger/fixedTime.d.ts +0 -23
- package/dist/models/trigger/fixedTime.d.ts.map +0 -1
- package/dist/models/trigger/fixedTime.js +0 -69
- package/dist/models/trigger/interface.d.ts +0 -19
- package/dist/models/trigger/interface.d.ts.map +0 -1
- package/dist/models/trigger/interface.js +0 -35
- package/dist/models/trigger/manual.d.ts +0 -16
- package/dist/models/trigger/manual.d.ts.map +0 -1
- package/dist/models/trigger/manual.js +0 -117
- package/dist/models/workflow.d.ts +0 -53
- package/dist/models/workflow.d.ts.map +0 -1
- package/dist/models/workflow.js +0 -219
- package/dist/utils.d.ts +0 -82
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -286
package/dist/index.d.ts
CHANGED
|
@@ -1,371 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { AggregatorClient } from "@/grpc_codegen/avs_grpc_pb";
|
|
3
|
-
import Workflow from "./models/workflow";
|
|
4
|
-
import Edge from "./models/edge";
|
|
5
|
-
import Execution from "./models/execution";
|
|
6
|
-
import Step from "./models/step";
|
|
7
|
-
import NodeFactory from "./models/node/factory";
|
|
8
|
-
import TriggerFactory from "./models/trigger/factory";
|
|
9
|
-
import Secret from "./models/secret";
|
|
10
|
-
import { ErrorCode, 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 SetTaskEnabledResponse, type DeleteTaskResponse, type GetExecutionStatsResponse, type GetExecutionStatsOptions, ExecutionStatus, type TriggerWorkflowResponse, type WithdrawFundsRequest, type WithdrawFundsResponse, type EstimateFeesRequest, type EstimateFeesResponse } from "@avaprotocol/types";
|
|
11
|
-
import { cleanGrpcErrorMessage } from "./utils";
|
|
12
|
-
declare class BaseClient {
|
|
13
|
-
readonly endpoint: string;
|
|
14
|
-
readonly rpcClient: AggregatorClient;
|
|
15
|
-
protected metadata: Metadata;
|
|
16
|
-
protected factoryAddress?: string;
|
|
17
|
-
protected authKey?: string;
|
|
18
|
-
protected timeoutConfig: TimeoutConfig;
|
|
19
|
-
constructor(opts: ClientOption);
|
|
20
|
-
/**
|
|
21
|
-
* Set default timeout configuration for all requests
|
|
22
|
-
* @param config - The timeout configuration
|
|
23
|
-
*/
|
|
24
|
-
setTimeoutConfig(config: TimeoutConfig): void;
|
|
25
|
-
/**
|
|
26
|
-
* Get the current timeout configuration
|
|
27
|
-
* @returns {TimeoutConfig} - The current timeout configuration
|
|
28
|
-
*/
|
|
29
|
-
getTimeoutConfig(): TimeoutConfig;
|
|
30
|
-
/**
|
|
31
|
-
* Send a fast gRPC request using FAST preset (5s timeout, 2 retries)
|
|
32
|
-
* @param method - The method name to call
|
|
33
|
-
* @param request - The request object
|
|
34
|
-
* @param options - Request options
|
|
35
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
36
|
-
*/
|
|
37
|
-
protected sendFastRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* Send a slow gRPC request using SLOW preset (2min timeout, 2 retries)
|
|
40
|
-
* @param method - The method name to call
|
|
41
|
-
* @param request - The request object
|
|
42
|
-
* @param options - Request options
|
|
43
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
44
|
-
*/
|
|
45
|
-
protected sendSlowRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Send a no-retry gRPC request using NO_RETRY preset (30s timeout, no retries)
|
|
48
|
-
* @param method - The method name to call
|
|
49
|
-
* @param request - The request object
|
|
50
|
-
* @param options - Request options
|
|
51
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
52
|
-
*/
|
|
53
|
-
protected sendNoRetryRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
54
|
-
/**
|
|
55
|
-
* Check if the auth key is valid by decoding the JWT token and checking the expiration
|
|
56
|
-
* @param key - The auth key
|
|
57
|
-
* @returns {boolean} - Whether the auth key is valid
|
|
58
|
-
*/
|
|
59
|
-
isAuthKeyValid(key: string): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Get the signature format from the server
|
|
62
|
-
* @param wallet - The wallet address
|
|
63
|
-
* @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
|
|
64
|
-
*/
|
|
65
|
-
getSignatureFormat(wallet: string): Promise<GetSignatureFormatResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* The API key could retrieve a wallet's authKey by skipping its signature verification
|
|
68
|
-
* @param message - The message to sign, obtained from getSignatureFormat
|
|
69
|
-
* @param apiKey - The API key used instead of a signature
|
|
70
|
-
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
71
|
-
*/
|
|
72
|
-
authWithAPIKey({ message, apiKey, }: {
|
|
73
|
-
message: string;
|
|
74
|
-
apiKey: string;
|
|
75
|
-
}): Promise<GetKeyResponse>;
|
|
76
|
-
/**
|
|
77
|
-
* Getting an authKey from the server by verifying the signature of an EOA wallet
|
|
78
|
-
* @param message - The message to sign, obtained from getSignatureFormat
|
|
79
|
-
* @param signature - The signature of the message
|
|
80
|
-
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
81
|
-
*/
|
|
82
|
-
authWithSignature({ message, signature, }: {
|
|
83
|
-
message: string;
|
|
84
|
-
signature: string;
|
|
85
|
-
}): Promise<GetKeyResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
|
|
88
|
-
* The authKey can be overridden at the request level by request options
|
|
89
|
-
* @param authKey - The auth key
|
|
90
|
-
*/
|
|
91
|
-
setAuthKey(authKey: string | undefined): void;
|
|
92
|
-
/**
|
|
93
|
-
* Get the auth key if it's set in the client
|
|
94
|
-
* @returns {string | undefined} - The auth key
|
|
95
|
-
*/
|
|
96
|
-
getAuthKey(): string | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Set the factory address of smart wallets for the client
|
|
99
|
-
* @param address - The factory address
|
|
100
|
-
*/
|
|
101
|
-
setFactoryAddress(address: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Get the factory address if it's set in the client
|
|
104
|
-
* @returns {string | undefined} - The factory address
|
|
105
|
-
*/
|
|
106
|
-
getFactoryAddress(): string | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Send a gRPC request with authentication, timeout support, and error handling
|
|
109
|
-
* @param method - The method name to call
|
|
110
|
-
* @param request - The request object
|
|
111
|
-
* @param options - Request options including timeout configuration
|
|
112
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
113
|
-
*/
|
|
114
|
-
protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
115
|
-
}
|
|
116
|
-
declare class Client extends BaseClient {
|
|
117
|
-
constructor(config: ClientOption);
|
|
118
|
-
/**
|
|
119
|
-
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
120
|
-
* @param {RequestOptions} options - Request options
|
|
121
|
-
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects, sorted by salt
|
|
122
|
-
*/
|
|
123
|
-
getWallets(options?: RequestOptions): Promise<SmartWallet[]>;
|
|
124
|
-
/**
|
|
125
|
-
* Add a new smart wallet address to the wallet list
|
|
126
|
-
* @param {string} salt - The salt for the wallet
|
|
127
|
-
* @param {string} factoryAddress - Factory address for the wallet; if not provided, the address stored in the client will be used
|
|
128
|
-
* @param {RequestOptions} options - Request options
|
|
129
|
-
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
130
|
-
*/
|
|
131
|
-
getWallet({ salt, factoryAddress }: GetWalletRequest, options?: RequestOptions): Promise<SmartWallet>;
|
|
132
|
-
/**
|
|
133
|
-
* Set wallet properties including hiding/unhiding a wallet
|
|
134
|
-
* @param {GetWalletRequest} walletRequest - The wallet request containing salt and optional factory address
|
|
135
|
-
* @param {object} options - Options for the wallet
|
|
136
|
-
* @param {boolean} options.isHidden - Whether the wallet should be hidden
|
|
137
|
-
* @param {RequestOptions} requestOptions - Request options
|
|
138
|
-
* @returns {Promise<SmartWallet>} - The updated SmartWallet object
|
|
139
|
-
*/
|
|
140
|
-
setWallet({ salt, factoryAddress }: GetWalletRequest, { isHidden }: {
|
|
141
|
-
isHidden: boolean;
|
|
142
|
-
}, requestOptions?: RequestOptions): Promise<SmartWallet>;
|
|
143
|
-
/**
|
|
144
|
-
* Withdraw funds from a smart wallet using UserOp
|
|
145
|
-
* @param {WithdrawFundsRequest} withdrawRequest - The withdraw request parameters
|
|
146
|
-
* @param {string} withdrawRequest.recipientAddress - The recipient address to send funds to
|
|
147
|
-
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20. Use "max" to withdraw maximum available balance
|
|
148
|
-
* @param {string} withdrawRequest.token - Token type: "ETH" for native ETH, or contract address for ERC20 tokens
|
|
149
|
-
* @param {string} withdrawRequest.smartWalletAddress - Required: Smart wallet address to withdraw from (must be from user's getWallet() call)
|
|
150
|
-
* @param {RequestOptions} options - Request options
|
|
151
|
-
* @returns {Promise<WithdrawFundsResponse>} - The response from the withdraw operation
|
|
152
|
-
*/
|
|
153
|
-
withdrawFunds({ recipientAddress, amount, token, smartWalletAddress, }: WithdrawFundsRequest, options?: RequestOptions): Promise<WithdrawFundsResponse>;
|
|
154
|
-
/**
|
|
155
|
-
* Submit a workflow to the AVS server; once the workflow is submitted, it cannot be modified
|
|
156
|
-
* @param {Workflow} workflow - Workflow object to submit
|
|
157
|
-
* @param {RequestOptions} options - Request options
|
|
158
|
-
* @returns {Promise<string>} - The Id of the submitted workflow
|
|
159
|
-
*/
|
|
160
|
-
submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
|
|
161
|
-
createWorkflow(props: WorkflowProps): Workflow;
|
|
162
|
-
/**
|
|
163
|
-
* Get the list of workflows for multiple addresses
|
|
164
|
-
* @param {string[]} addresses - The list of addresses
|
|
165
|
-
* @param {GetWorkflowsOptions} options - Request options
|
|
166
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
167
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
168
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
169
|
-
* @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
|
|
170
|
-
* @param {boolean} [options.includeEdges] - Include task edges (expensive field)
|
|
171
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
172
|
-
* @returns {Promise<{ items: WorkflowProps[]; pageInfo: PageInfo }>} - The list of WorkflowProps objects with nested pagination metadata
|
|
173
|
-
*/
|
|
174
|
-
getWorkflows(addresses: string[], options?: GetWorkflowsOptions): Promise<{
|
|
175
|
-
items: WorkflowProps[];
|
|
176
|
-
pageInfo: PageInfo;
|
|
177
|
-
}>;
|
|
178
|
-
/**
|
|
179
|
-
* Get the count of workflows for multiple addresses
|
|
180
|
-
* @param addresses - The list of addresses
|
|
181
|
-
* @param options - Request options
|
|
182
|
-
* @returns {Promise<number>} - The count of workflows
|
|
183
|
-
*/
|
|
184
|
-
getWorkflowCount(addresses: string[], options?: RequestOptions): Promise<number>;
|
|
185
|
-
/**
|
|
186
|
-
* Get the list of executions for multiple workflows
|
|
187
|
-
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
188
|
-
* @param {GetExecutionsOptions} options - Request options
|
|
189
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
190
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
191
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
192
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
193
|
-
* @returns {Promise<{ items: ExecutionProps[]; pageInfo: PageInfo }>} - The list of ExecutionProps objects with nested pagination metadata
|
|
194
|
-
*/
|
|
195
|
-
getExecutions(workflows: string[], options?: GetExecutionsOptions): Promise<{
|
|
196
|
-
items: ExecutionProps[];
|
|
197
|
-
pageInfo: PageInfo;
|
|
198
|
-
}>;
|
|
199
|
-
/**
|
|
200
|
-
* Get a specific execution by id
|
|
201
|
-
* @param {string} workflowId - The workflow id (taskId)
|
|
202
|
-
* @param {string} executionId - The execution id
|
|
203
|
-
* @param {RequestOptions} options - Request options
|
|
204
|
-
* @returns {Promise<ExecutionProps>} - The ExecutionProps object
|
|
205
|
-
*/
|
|
206
|
-
getExecution(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionProps>;
|
|
207
|
-
/**
|
|
208
|
-
* Get the count of executions for multiple workflows
|
|
209
|
-
* @param workflows - The list of workflow ids
|
|
210
|
-
* @param options - Request options
|
|
211
|
-
* @returns {Promise<number>} - The count of executions
|
|
212
|
-
*/
|
|
213
|
-
getExecutionCount(workflows: string[], options?: RequestOptions): Promise<number>;
|
|
214
|
-
/**
|
|
215
|
-
* Get execution statistics for a specified time period
|
|
216
|
-
* @param {GetExecutionStatsOptions} options - Request options
|
|
217
|
-
* @param {string[]} [options.workflowIds] - Optional array of workflow IDs
|
|
218
|
-
* @param {number} [options.days] - Number of days to look back (default: 7)
|
|
219
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
220
|
-
* @returns {Promise<GetExecutionStatsResponse>} - Execution statistics
|
|
221
|
-
*/
|
|
222
|
-
getExecutionStats(options?: GetExecutionStatsOptions): Promise<GetExecutionStatsResponse>;
|
|
223
|
-
/**
|
|
224
|
-
* Get the status of an execution
|
|
225
|
-
* @param {string} workflowId - The workflow id (taskId)
|
|
226
|
-
* @param {string} executionId - The execution id
|
|
227
|
-
* @param {RequestOptions} options - Request options
|
|
228
|
-
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
229
|
-
*/
|
|
230
|
-
getExecutionStatus(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus>;
|
|
231
|
-
/**
|
|
232
|
-
* Get a workflow by id
|
|
233
|
-
* @param {string} id - The workflow id
|
|
234
|
-
* @param {RequestOptions} options - Request options
|
|
235
|
-
* @returns {Promise<Workflow>} - The Workflow object
|
|
236
|
-
*/
|
|
237
|
-
getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
|
|
238
|
-
/**
|
|
239
|
-
* Trigger a workflow with enhanced response including workflowId and optional execution details
|
|
240
|
-
* @param {Object} params - The trigger parameters
|
|
241
|
-
* @param {string} params.id - The workflow id
|
|
242
|
-
* @param {TriggerDataProps} params.triggerData - The trigger data
|
|
243
|
-
* @param {boolean} params.isBlocking - Whether to block until execution completes
|
|
244
|
-
* @param {RequestOptions} options - Request options
|
|
245
|
-
* @returns {Promise<TriggerWorkflowResponse>} - Enhanced response with workflowId and execution details
|
|
246
|
-
*/
|
|
247
|
-
triggerWorkflow({ id, triggerData, isBlocking, }: {
|
|
248
|
-
id: string;
|
|
249
|
-
triggerData: TriggerDataProps;
|
|
250
|
-
isBlocking?: boolean;
|
|
251
|
-
}, options?: RequestOptions): Promise<TriggerWorkflowResponse>;
|
|
252
|
-
/**
|
|
253
|
-
* Set workflow active state (activate/deactivate)
|
|
254
|
-
* @param {string} id - The workflow id
|
|
255
|
-
* @param {boolean} enabled - Desired enabled state (true=enable, false=disable)
|
|
256
|
-
* @param {RequestOptions} options - Request options
|
|
257
|
-
* @returns {Promise<SetTaskEnabledResponse>} - The response from updating the workflow state
|
|
258
|
-
*/
|
|
259
|
-
setWorkflowEnabled(id: string, enabled: boolean, options?: RequestOptions): Promise<SetTaskEnabledResponse>;
|
|
260
|
-
/**
|
|
261
|
-
* Delete a workflow
|
|
262
|
-
* @param {string} id - The workflow id
|
|
263
|
-
* @param {RequestOptions} options - Request options
|
|
264
|
-
* @returns {Promise<DeleteTaskResponse>} - The response from deleting the workflow
|
|
265
|
-
*/
|
|
266
|
-
deleteWorkflow(id: string, options?: RequestOptions): Promise<DeleteTaskResponse>;
|
|
267
|
-
/**
|
|
268
|
-
* Create a new secret
|
|
269
|
-
* @param {string} name - The name of the secret
|
|
270
|
-
* @param {string} value - The value of the secret
|
|
271
|
-
* @param {SecretOptions} [options] - Request options
|
|
272
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
273
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
274
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
275
|
-
* @returns {Promise<CreateSecretResponse>} - Structured response with creation details
|
|
276
|
-
*/
|
|
277
|
-
createSecret(name: string, value: string, options?: SecretOptions): Promise<CreateSecretResponse>;
|
|
278
|
-
/**
|
|
279
|
-
* Update a secret
|
|
280
|
-
* @param {string} name - The name of the secret
|
|
281
|
-
* @param {string} value - The value of the secret
|
|
282
|
-
* @param {SecretOptions} [options] - Request options
|
|
283
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
284
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
285
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
286
|
-
* @returns {Promise<UpdateSecretResponse>} - Structured response with update details
|
|
287
|
-
*/
|
|
288
|
-
updateSecret(name: string, value: string, options?: SecretOptions): Promise<UpdateSecretResponse>;
|
|
289
|
-
/**
|
|
290
|
-
* Get the list of secrets
|
|
291
|
-
* @param {GetSecretsOptions} options - Request options
|
|
292
|
-
* @param {string} [options.workflowId] - Filter secrets by workflow ID
|
|
293
|
-
* @param {string} [options.orgId] - Filter secrets by organization ID
|
|
294
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
295
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
296
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
297
|
-
* @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
|
|
298
|
-
* @param {boolean} [options.includeCreatedBy] - Include created_by field
|
|
299
|
-
* @param {boolean} [options.includeDescription] - Include description field
|
|
300
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
301
|
-
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
302
|
-
*/
|
|
303
|
-
getSecrets(options?: GetSecretsOptions): Promise<{
|
|
304
|
-
items: SecretProps[];
|
|
305
|
-
pageInfo: PageInfo;
|
|
306
|
-
}>;
|
|
307
|
-
/**
|
|
308
|
-
* Delete a secret
|
|
309
|
-
* @param {string} name - The name of the secret
|
|
310
|
-
* @param {SecretOptions} [options] - Request options
|
|
311
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
312
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
313
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
314
|
-
* @returns {Promise<DeleteSecretResponse>} - Structured response with deletion details
|
|
315
|
-
*/
|
|
316
|
-
deleteSecret(name: string, options?: SecretOptions): Promise<DeleteSecretResponse>;
|
|
317
|
-
/**
|
|
318
|
-
* Run a node with inputs for testing purposes
|
|
319
|
-
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
320
|
-
* @param {NodeProps} params.node - Complete node definition (id, name, type, data)
|
|
321
|
-
* @param {Record<string, any>} params.inputVariables - Variables to pass to the node (settings, data from previous nodes, etc.)
|
|
322
|
-
* @param {RequestOptions} options - Request options
|
|
323
|
-
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
324
|
-
*/
|
|
325
|
-
runNodeWithInputs({ node, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
|
|
326
|
-
/**
|
|
327
|
-
* Run a trigger for testing purposes
|
|
328
|
-
* @param {RunTriggerRequest} params - The parameters for running the trigger
|
|
329
|
-
* @param {TriggerProps} params.trigger - Complete trigger definition (id, name, type, data)
|
|
330
|
-
* @param {Record<string, any>} params.triggerInput - Optional input variables for template resolution
|
|
331
|
-
* @param {RequestOptions} options - Request options
|
|
332
|
-
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
333
|
-
*/
|
|
334
|
-
runTrigger({ trigger, triggerInput }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
|
|
335
|
-
/**
|
|
336
|
-
* Simulate a complete task execution including trigger and all workflow nodes
|
|
337
|
-
* @param {SimulateWorkflowRequest} params - The parameters for simulating the task
|
|
338
|
-
* @param {Record<string, any>} params.trigger - The trigger configuration
|
|
339
|
-
* @param {Array<Record<string, any>>} params.nodes - The workflow nodes
|
|
340
|
-
* @param {Array<Record<string, any>>} params.edges - The workflow edges
|
|
341
|
-
* @param {Record<string, any>} params.inputVariables - Input variables for the simulation
|
|
342
|
-
* @param {RequestOptions} options - Request options
|
|
343
|
-
* @returns {Promise<ExecutionProps>} - The response from simulating the task
|
|
344
|
-
*/
|
|
345
|
-
simulateWorkflow({ trigger, nodes, edges, inputVariables }: SimulateWorkflowRequest, options?: RequestOptions): Promise<ExecutionProps>;
|
|
346
|
-
/**
|
|
347
|
-
* Get token metadata by contract address
|
|
348
|
-
* @param {GetTokenMetadataRequest} params - The parameters for getting token metadata
|
|
349
|
-
* @param {string} params.address - The contract address to look up
|
|
350
|
-
* @param {RequestOptions} options - Request options
|
|
351
|
-
* @returns {Promise<GetTokenMetadataResponse>} - The response containing token metadata
|
|
352
|
-
*/
|
|
353
|
-
getTokenMetadata({ address }: GetTokenMetadataRequest, options?: RequestOptions): Promise<GetTokenMetadataResponse>;
|
|
354
|
-
/**
|
|
355
|
-
* Get comprehensive fee estimation for workflow deployment
|
|
356
|
-
*
|
|
357
|
-
* @param params - Fee estimation request parameters
|
|
358
|
-
* @param options - Optional request options (auth key, timeout)
|
|
359
|
-
* @returns Promise resolving to comprehensive fee breakdown
|
|
360
|
-
*/
|
|
361
|
-
estimateFees({ trigger, nodes, runner, inputVariables, createdAt, expireAt, }: EstimateFeesRequest, options?: RequestOptions): Promise<EstimateFeesResponse>;
|
|
362
|
-
/**
|
|
363
|
-
* Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
|
|
364
|
-
* @private
|
|
365
|
-
*/
|
|
366
|
-
private convertEstimateFeesResponse;
|
|
367
|
-
}
|
|
368
|
-
export * from "./models/node/factory";
|
|
369
|
-
export * from "./models/trigger/factory";
|
|
370
|
-
export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, Secret, ErrorCode, cleanGrpcErrorMessage, };
|
|
1
|
+
export * from "./v4";
|
|
371
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAwBA,cAAc,MAAM,CAAC"}
|