@avaprotocol/sdk-js 2.16.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.
Files changed (141) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/index.d.ts +1 -370
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +736 -22391
  5. package/dist/index.mjs +698 -22422
  6. package/dist/v4/auth.d.ts +54 -0
  7. package/dist/v4/auth.d.ts.map +1 -0
  8. package/dist/v4/auth.js +70 -0
  9. package/dist/v4/builders/nodes.d.ts +103 -0
  10. package/dist/v4/builders/nodes.d.ts.map +1 -0
  11. package/dist/v4/builders/nodes.js +132 -0
  12. package/dist/v4/builders/triggers.d.ts +66 -0
  13. package/dist/v4/builders/triggers.d.ts.map +1 -0
  14. package/dist/v4/builders/triggers.js +74 -0
  15. package/dist/v4/chains.d.ts +16 -0
  16. package/dist/v4/chains.d.ts.map +1 -0
  17. package/dist/v4/chains.js +23 -0
  18. package/dist/v4/client.d.ts +60 -0
  19. package/dist/v4/client.d.ts.map +1 -0
  20. package/dist/v4/client.js +53 -0
  21. package/dist/v4/index.d.ts +18 -0
  22. package/dist/v4/index.d.ts.map +1 -0
  23. package/dist/v4/index.js +23 -0
  24. package/dist/v4/internal/errors.d.ts +36 -0
  25. package/dist/v4/internal/errors.d.ts.map +1 -0
  26. package/dist/v4/internal/errors.js +32 -0
  27. package/dist/v4/internal/transport.d.ts +64 -0
  28. package/dist/v4/internal/transport.d.ts.map +1 -0
  29. package/dist/v4/internal/transport.js +133 -0
  30. package/dist/v4/resources/auth.d.ts +39 -0
  31. package/dist/v4/resources/auth.d.ts.map +1 -0
  32. package/dist/v4/resources/auth.js +53 -0
  33. package/dist/v4/resources/executions.d.ts +68 -0
  34. package/dist/v4/resources/executions.d.ts.map +1 -0
  35. package/dist/v4/resources/executions.js +126 -0
  36. package/dist/v4/resources/health.d.ts +9 -0
  37. package/dist/v4/resources/health.d.ts.map +1 -0
  38. package/dist/v4/resources/health.js +9 -0
  39. package/dist/v4/resources/nodes.d.ts +9 -0
  40. package/dist/v4/resources/nodes.d.ts.map +1 -0
  41. package/dist/v4/resources/nodes.js +13 -0
  42. package/dist/v4/resources/operators.d.ts +9 -0
  43. package/dist/v4/resources/operators.d.ts.map +1 -0
  44. package/dist/v4/resources/operators.js +9 -0
  45. package/dist/v4/resources/secrets.d.ts +24 -0
  46. package/dist/v4/resources/secrets.d.ts.map +1 -0
  47. package/dist/v4/resources/secrets.js +28 -0
  48. package/dist/v4/resources/tokens.d.ts +16 -0
  49. package/dist/v4/resources/tokens.d.ts.map +1 -0
  50. package/dist/v4/resources/tokens.js +17 -0
  51. package/dist/v4/resources/triggers.d.ts +9 -0
  52. package/dist/v4/resources/triggers.d.ts.map +1 -0
  53. package/dist/v4/resources/triggers.js +13 -0
  54. package/dist/v4/resources/wallets.d.ts +25 -0
  55. package/dist/v4/resources/wallets.d.ts.map +1 -0
  56. package/dist/v4/resources/wallets.js +45 -0
  57. package/dist/v4/resources/workflows.d.ts +54 -0
  58. package/dist/v4/resources/workflows.d.ts.map +1 -0
  59. package/dist/v4/resources/workflows.js +81 -0
  60. package/package.json +4 -12
  61. package/dist/auth.d.ts +0 -2
  62. package/dist/auth.d.ts.map +0 -1
  63. package/dist/auth.js +0 -10
  64. package/dist/config.d.ts +0 -9
  65. package/dist/config.d.ts.map +0 -1
  66. package/dist/config.js +0 -19
  67. package/dist/models/edge.d.ts +0 -12
  68. package/dist/models/edge.d.ts.map +0 -1
  69. package/dist/models/edge.js +0 -19
  70. package/dist/models/execution.d.ts +0 -20
  71. package/dist/models/execution.d.ts.map +0 -1
  72. package/dist/models/execution.js +0 -97
  73. package/dist/models/node/balance.d.ts +0 -17
  74. package/dist/models/node/balance.d.ts.map +0 -1
  75. package/dist/models/node/balance.js +0 -78
  76. package/dist/models/node/branch.d.ts +0 -11
  77. package/dist/models/node/branch.d.ts.map +0 -1
  78. package/dist/models/node/branch.js +0 -63
  79. package/dist/models/node/contractRead.d.ts +0 -17
  80. package/dist/models/node/contractRead.d.ts.map +0 -1
  81. package/dist/models/node/contractRead.js +0 -91
  82. package/dist/models/node/contractWrite.d.ts +0 -17
  83. package/dist/models/node/contractWrite.d.ts.map +0 -1
  84. package/dist/models/node/contractWrite.js +0 -102
  85. package/dist/models/node/customCode.d.ts +0 -20
  86. package/dist/models/node/customCode.d.ts.map +0 -1
  87. package/dist/models/node/customCode.js +0 -74
  88. package/dist/models/node/ethTransfer.d.ts +0 -20
  89. package/dist/models/node/ethTransfer.d.ts.map +0 -1
  90. package/dist/models/node/ethTransfer.js +0 -58
  91. package/dist/models/node/factory.d.ts +0 -24
  92. package/dist/models/node/factory.d.ts.map +0 -1
  93. package/dist/models/node/factory.js +0 -108
  94. package/dist/models/node/filter.d.ts +0 -11
  95. package/dist/models/node/filter.d.ts.map +0 -1
  96. package/dist/models/node/filter.js +0 -57
  97. package/dist/models/node/graphqlQuery.d.ts +0 -21
  98. package/dist/models/node/graphqlQuery.d.ts.map +0 -1
  99. package/dist/models/node/graphqlQuery.js +0 -74
  100. package/dist/models/node/interface.d.ts +0 -20
  101. package/dist/models/node/interface.d.ts.map +0 -1
  102. package/dist/models/node/interface.js +0 -58
  103. package/dist/models/node/loop.d.ts +0 -15
  104. package/dist/models/node/loop.d.ts.map +0 -1
  105. package/dist/models/node/loop.js +0 -235
  106. package/dist/models/node/restApi.d.ts +0 -23
  107. package/dist/models/node/restApi.d.ts.map +0 -1
  108. package/dist/models/node/restApi.js +0 -84
  109. package/dist/models/secret.d.ts +0 -16
  110. package/dist/models/secret.d.ts.map +0 -1
  111. package/dist/models/secret.js +0 -28
  112. package/dist/models/step.d.ts +0 -33
  113. package/dist/models/step.d.ts.map +0 -1
  114. package/dist/models/step.js +0 -287
  115. package/dist/models/trigger/block.d.ts +0 -21
  116. package/dist/models/trigger/block.d.ts.map +0 -1
  117. package/dist/models/trigger/block.js +0 -81
  118. package/dist/models/trigger/cron.d.ts +0 -23
  119. package/dist/models/trigger/cron.d.ts.map +0 -1
  120. package/dist/models/trigger/cron.js +0 -77
  121. package/dist/models/trigger/event.d.ts +0 -22
  122. package/dist/models/trigger/event.d.ts.map +0 -1
  123. package/dist/models/trigger/event.js +0 -244
  124. package/dist/models/trigger/factory.d.ts +0 -27
  125. package/dist/models/trigger/factory.d.ts.map +0 -1
  126. package/dist/models/trigger/factory.js +0 -73
  127. package/dist/models/trigger/fixedTime.d.ts +0 -23
  128. package/dist/models/trigger/fixedTime.d.ts.map +0 -1
  129. package/dist/models/trigger/fixedTime.js +0 -69
  130. package/dist/models/trigger/interface.d.ts +0 -19
  131. package/dist/models/trigger/interface.d.ts.map +0 -1
  132. package/dist/models/trigger/interface.js +0 -35
  133. package/dist/models/trigger/manual.d.ts +0 -16
  134. package/dist/models/trigger/manual.d.ts.map +0 -1
  135. package/dist/models/trigger/manual.js +0 -117
  136. package/dist/models/workflow.d.ts +0 -53
  137. package/dist/models/workflow.d.ts.map +0 -1
  138. package/dist/models/workflow.js +0 -219
  139. package/dist/utils.d.ts +0 -82
  140. package/dist/utils.d.ts.map +0 -1
  141. package/dist/utils.js +0 -286
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 2.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bfb7974: Replace `ExecutionStatus.PartialSuccess` with clear SUCCESS/FAILED/ERROR semantics.
8
+
9
+ **Breaking:** `ExecutionStatus.PartialSuccess` is removed. Use `ExecutionStatus.Failed` for step failures and `ExecutionStatus.Error` for system-level failures. Branch-skip workflows now return `ExecutionStatus.Success`.
10
+
11
+ Legacy proto value 4 (former PARTIAL_SUCCESS) is mapped to `Failed` automatically — no data migration needed.
12
+
13
+ ### Patch Changes
14
+
15
+ - d46e755: fix: consolidate conversion functions like convertProtobufExecutionStatus
16
+ - Updated dependencies [bfb7974]
17
+ - Updated dependencies [d46e755]
18
+ - @avaprotocol/types@2.13.0
19
+
3
20
  ## 2.16.0
4
21
 
5
22
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,371 +1,2 @@
1
- import { Metadata } from "@grpc/grpc-js";
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAU,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAKL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KA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