@avaprotocol/sdk-js 1.6.2 → 1.6.4
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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +37 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -98
- package/dist/index.mjs +87 -99
- package/dist/models/node/branch.d.ts +1 -1
- package/dist/models/node/branch.d.ts.map +1 -1
- package/dist/models/node/contractRead.d.ts +1 -1
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +6 -8
- package/dist/models/node/contractWrite.d.ts +1 -1
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/customCode.d.ts +1 -5
- package/dist/models/node/customCode.d.ts.map +1 -1
- package/dist/models/node/customCode.js +5 -11
- package/dist/models/node/ethTransfer.d.ts +1 -1
- package/dist/models/node/ethTransfer.d.ts.map +1 -1
- package/dist/models/node/factory.d.ts +10 -9
- package/dist/models/node/factory.d.ts.map +1 -1
- package/dist/models/node/factory.js +2 -2
- package/dist/models/node/filter.d.ts +1 -1
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +5 -7
- package/dist/models/node/graphqlQuery.d.ts +1 -1
- package/dist/models/node/graphqlQuery.d.ts.map +1 -1
- package/dist/models/node/graphqlQuery.js +11 -13
- package/dist/models/node/loop.d.ts +1 -1
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +20 -38
- package/dist/models/node/restApi.d.ts +1 -2
- package/dist/models/node/restApi.d.ts.map +1 -1
- package/dist/models/node/restApi.js +12 -14
- package/dist/models/trigger/block.d.ts +1 -2
- package/dist/models/trigger/block.d.ts.map +1 -1
- package/dist/models/trigger/cron.d.ts +1 -2
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/event.d.ts +1 -2
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.d.ts +1 -2
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 1.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fa76ec5: Moved node DataType from sdk-js to types pacakge
|
|
8
|
+
- Updated dependencies [fa76ec5]
|
|
9
|
+
- @avaprotocol/types@1.0.4
|
|
10
|
+
|
|
11
|
+
## 1.6.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 6e9069f: Make type definitions more consistent
|
|
16
|
+
- Updated dependencies [6e9069f]
|
|
17
|
+
- @avaprotocol/types@1.0.3
|
|
18
|
+
|
|
3
19
|
## 1.6.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import Step, { StepProps } from "./models/step";
|
|
|
8
8
|
import NodeFactory from "./models/node/factory";
|
|
9
9
|
import TriggerFactory from "./models/trigger/factory";
|
|
10
10
|
import Secret from "./models/secret";
|
|
11
|
-
import type { GetKeyResponse,
|
|
11
|
+
import type { GetKeyResponse, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsOptions, GetWorkflowsOptions, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, SecretProps, PageInfo, GetSecretsOptions, SecretOptions } from "@avaprotocol/types";
|
|
12
12
|
import { ExecutionStatus } from "@/grpc_codegen/avs_pb";
|
|
13
13
|
import TriggerReason, { TriggerReasonProps } from "./models/trigger/reason";
|
|
14
14
|
declare class BaseClient {
|
|
@@ -127,25 +127,19 @@ declare class Client extends BaseClient {
|
|
|
127
127
|
*/
|
|
128
128
|
submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
|
|
129
129
|
createWorkflow(props: WorkflowProps): Workflow;
|
|
130
|
-
/**
|
|
131
|
-
* Get the list of workflows; new workflows can be created by calling `submitWorkflow`
|
|
132
|
-
* @param {string} address - The address of the smart wallet
|
|
133
|
-
* @param {string} cursor - The cursor for the list
|
|
134
|
-
* @param {number} limit - The limit for the list
|
|
135
|
-
* @param {RequestOptions} options - Request options
|
|
136
|
-
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
137
|
-
*/
|
|
138
130
|
/**
|
|
139
131
|
* Get the list of workflows for multiple addresses
|
|
140
132
|
* @param {string[]} addresses - The list of addresses
|
|
141
|
-
* @param {
|
|
133
|
+
* @param {GetWorkflowsOptions} options - Request options
|
|
142
134
|
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
143
135
|
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
144
136
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
137
|
+
* @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
|
|
138
|
+
* @param {boolean} [options.includeEdges] - Include task edges (expensive field)
|
|
145
139
|
* @param {string} [options.authKey] - The auth key for the request
|
|
146
|
-
* @returns {Promise<{
|
|
140
|
+
* @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
|
|
147
141
|
*/
|
|
148
|
-
getWorkflows(addresses: string[], options?:
|
|
142
|
+
getWorkflows(addresses: string[], options?: GetWorkflowsOptions): Promise<{
|
|
149
143
|
items: Workflow[];
|
|
150
144
|
pageInfo: PageInfo;
|
|
151
145
|
}>;
|
|
@@ -157,16 +151,16 @@ declare class Client extends BaseClient {
|
|
|
157
151
|
*/
|
|
158
152
|
getWorkflowCount(addresses: string[], options?: RequestOptions): Promise<number>;
|
|
159
153
|
/**
|
|
160
|
-
* Get the list of executions for multiple
|
|
154
|
+
* Get the list of executions for multiple workflows
|
|
161
155
|
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
162
|
-
* @param {
|
|
156
|
+
* @param {GetExecutionsOptions} options - Request options
|
|
163
157
|
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
164
158
|
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
165
159
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
166
160
|
* @param {string} [options.authKey] - The auth key for the request
|
|
167
|
-
* @returns {Promise<{
|
|
161
|
+
* @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
|
|
168
162
|
*/
|
|
169
|
-
getExecutions(workflows: string[], options?:
|
|
163
|
+
getExecutions(workflows: string[], options?: GetExecutionsOptions): Promise<{
|
|
170
164
|
items: Execution[];
|
|
171
165
|
pageInfo: PageInfo;
|
|
172
166
|
}>;
|
|
@@ -232,34 +226,52 @@ declare class Client extends BaseClient {
|
|
|
232
226
|
* Create a new secret
|
|
233
227
|
* @param {string} name - The name of the secret
|
|
234
228
|
* @param {string} value - The value of the secret
|
|
235
|
-
* @param {
|
|
229
|
+
* @param {SecretOptions} [options] - Request options
|
|
230
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
231
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
232
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
236
233
|
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
237
234
|
*/
|
|
238
|
-
createSecret(name: string, value: string, options?:
|
|
235
|
+
createSecret(name: string, value: string, options?: SecretOptions): Promise<boolean>;
|
|
239
236
|
/**
|
|
240
237
|
* Update a secret
|
|
241
238
|
* @param {string} name - The name of the secret
|
|
242
239
|
* @param {string} value - The value of the secret
|
|
243
|
-
* @param {
|
|
240
|
+
* @param {SecretOptions} [options] - Request options
|
|
241
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
242
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
243
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
244
244
|
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
245
245
|
*/
|
|
246
|
-
updateSecret(name: string, value: string, options?:
|
|
246
|
+
updateSecret(name: string, value: string, options?: SecretOptions): Promise<boolean>;
|
|
247
247
|
/**
|
|
248
248
|
* Get the list of secrets
|
|
249
|
-
* @param {
|
|
250
|
-
* @
|
|
249
|
+
* @param {GetSecretsOptions} options - Request options
|
|
250
|
+
* @param {string} [options.workflowId] - Filter secrets by workflow ID
|
|
251
|
+
* @param {string} [options.orgId] - Filter secrets by organization ID
|
|
252
|
+
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
253
|
+
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
254
|
+
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
255
|
+
* @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
|
|
256
|
+
* @param {boolean} [options.includeCreatedBy] - Include created_by field
|
|
257
|
+
* @param {boolean} [options.includeDescription] - Include description field
|
|
258
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
259
|
+
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
251
260
|
*/
|
|
252
|
-
getSecrets(options?:
|
|
261
|
+
getSecrets(options?: GetSecretsOptions): Promise<{
|
|
253
262
|
items: SecretProps[];
|
|
254
263
|
pageInfo: PageInfo;
|
|
255
264
|
}>;
|
|
256
265
|
/**
|
|
257
266
|
* Delete a secret
|
|
258
267
|
* @param {string} name - The name of the secret
|
|
259
|
-
* @param {
|
|
268
|
+
* @param {SecretOptions} [options] - Request options
|
|
269
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
270
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
271
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
260
272
|
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
261
273
|
*/
|
|
262
|
-
deleteSecret(name: string, options?:
|
|
274
|
+
deleteSecret(name: string, options?: SecretOptions): Promise<boolean>;
|
|
263
275
|
/**
|
|
264
276
|
* Run a node with inputs
|
|
265
277
|
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe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ACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,MAAM,GACP,CAAC;AAEF,YAAY,EACV,aAAa,EACb,SAAS,EACT,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,yBAAyB,GAC1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13185,7 +13185,7 @@ __export(index_exports, {
|
|
|
13185
13185
|
ContractReadNode: () => contractRead_default,
|
|
13186
13186
|
ContractWriteNode: () => contractWrite_default,
|
|
13187
13187
|
CronTrigger: () => cron_default,
|
|
13188
|
-
CustomCodeLangs: () => CustomCodeLangs,
|
|
13188
|
+
CustomCodeLangs: () => import_types17.CustomCodeLangs,
|
|
13189
13189
|
CustomCodeNode: () => customCode_default,
|
|
13190
13190
|
ETHTransferNode: () => ethTransfer_default,
|
|
13191
13191
|
Edge: () => edge_default,
|
|
@@ -13618,10 +13618,6 @@ var contractWrite_default = ContractWriteNode2;
|
|
|
13618
13618
|
// src/models/node/customCode.ts
|
|
13619
13619
|
var avs_pb9 = __toESM(require_avs_pb());
|
|
13620
13620
|
var import_types9 = require("@avaprotocol/types");
|
|
13621
|
-
var CustomCodeLangs = {
|
|
13622
|
-
JAVASCRIPT: 0,
|
|
13623
|
-
PYTHON: 1
|
|
13624
|
-
};
|
|
13625
13621
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
13626
13622
|
constructor(props) {
|
|
13627
13623
|
super({ ...props, type: import_types9.NodeType.CustomCode, data: props.data });
|
|
@@ -13631,7 +13627,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
13631
13627
|
return new _CustomCodeNode({
|
|
13632
13628
|
...obj,
|
|
13633
13629
|
type: import_types9.NodeType.CustomCode,
|
|
13634
|
-
data: raw.getCustomCode().toObject()
|
|
13630
|
+
data: raw.getCustomCode().getConfig().toObject()
|
|
13635
13631
|
});
|
|
13636
13632
|
}
|
|
13637
13633
|
toRequest() {
|
|
@@ -13639,12 +13635,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
13639
13635
|
request.setId(this.id);
|
|
13640
13636
|
request.setName(this.name);
|
|
13641
13637
|
const nodeData = new avs_pb9.CustomCodeNode();
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
nodeData.setConfig(config);
|
|
13647
|
-
}
|
|
13638
|
+
const config = new avs_pb9.CustomCodeNode.Config();
|
|
13639
|
+
config.setLang(this.data.lang);
|
|
13640
|
+
config.setSource(this.data.source);
|
|
13641
|
+
nodeData.setConfig(config);
|
|
13648
13642
|
request.setCustomCode(nodeData);
|
|
13649
13643
|
return request;
|
|
13650
13644
|
}
|
|
@@ -13667,7 +13661,7 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13667
13661
|
return new _GraphQLQueryNode({
|
|
13668
13662
|
...obj,
|
|
13669
13663
|
type: import_types10.NodeType.GraphQLQuery,
|
|
13670
|
-
data: raw.getGraphqlQuery().toObject()
|
|
13664
|
+
data: raw.getGraphqlQuery().getConfig().toObject()
|
|
13671
13665
|
});
|
|
13672
13666
|
}
|
|
13673
13667
|
toRequest() {
|
|
@@ -13675,18 +13669,16 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13675
13669
|
request.setId(this.id);
|
|
13676
13670
|
request.setName(this.name);
|
|
13677
13671
|
const nodeData = new avs_pb10.GraphQLQueryNode();
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
});
|
|
13687
|
-
}
|
|
13688
|
-
nodeData.setConfig(config);
|
|
13672
|
+
const config = new avs_pb10.GraphQLQueryNode.Config();
|
|
13673
|
+
config.setUrl(this.data.url);
|
|
13674
|
+
config.setQuery(this.data.query);
|
|
13675
|
+
if (this.data.variablesMap && this.data.variablesMap.length > 0) {
|
|
13676
|
+
const variablesMap = config.getVariablesMap();
|
|
13677
|
+
this.data.variablesMap.forEach(([key, value]) => {
|
|
13678
|
+
variablesMap.set(key, value);
|
|
13679
|
+
});
|
|
13689
13680
|
}
|
|
13681
|
+
nodeData.setConfig(config);
|
|
13690
13682
|
request.setGraphqlQuery(nodeData);
|
|
13691
13683
|
return request;
|
|
13692
13684
|
}
|
|
@@ -13705,7 +13697,7 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
13705
13697
|
return new _RestAPINode({
|
|
13706
13698
|
...obj,
|
|
13707
13699
|
type: import_types11.NodeType.RestAPI,
|
|
13708
|
-
data: raw.getRestApi().toObject()
|
|
13700
|
+
data: raw.getRestApi().getConfig().toObject()
|
|
13709
13701
|
});
|
|
13710
13702
|
}
|
|
13711
13703
|
toRequest() {
|
|
@@ -13713,19 +13705,17 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
13713
13705
|
request.setId(this.id);
|
|
13714
13706
|
request.setName(this.name);
|
|
13715
13707
|
const nodeData = new avs_pb11.RestAPINode();
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
});
|
|
13726
|
-
}
|
|
13727
|
-
nodeData.setConfig(config);
|
|
13708
|
+
const config = new avs_pb11.RestAPINode.Config();
|
|
13709
|
+
config.setUrl(this.data.url);
|
|
13710
|
+
config.setMethod(this.data.method);
|
|
13711
|
+
config.setBody(this.data.body || "");
|
|
13712
|
+
if (this.data.headersMap && this.data.headersMap.length > 0) {
|
|
13713
|
+
const headersMap = config.getHeadersMap();
|
|
13714
|
+
this.data.headersMap.forEach(([key, value]) => {
|
|
13715
|
+
headersMap.set(key, value);
|
|
13716
|
+
});
|
|
13728
13717
|
}
|
|
13718
|
+
nodeData.setConfig(config);
|
|
13729
13719
|
request.setRestApi(nodeData);
|
|
13730
13720
|
return request;
|
|
13731
13721
|
}
|
|
@@ -13744,7 +13734,7 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13744
13734
|
return new _ContractReadNode({
|
|
13745
13735
|
...obj,
|
|
13746
13736
|
type: import_types12.NodeType.ContractRead,
|
|
13747
|
-
data: raw.getContractRead().toObject()
|
|
13737
|
+
data: raw.getContractRead().getConfig().toObject()
|
|
13748
13738
|
});
|
|
13749
13739
|
}
|
|
13750
13740
|
toRequest() {
|
|
@@ -13752,13 +13742,11 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13752
13742
|
request.setId(this.id);
|
|
13753
13743
|
request.setName(this.name);
|
|
13754
13744
|
const nodeData = new avs_pb12.ContractReadNode();
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
nodeData.setConfig(config);
|
|
13761
|
-
}
|
|
13745
|
+
const config = new avs_pb12.ContractReadNode.Config();
|
|
13746
|
+
config.setContractAddress(this.data.contractAddress);
|
|
13747
|
+
config.setCallData(this.data.callData);
|
|
13748
|
+
config.setContractAbi(this.data.contractAbi);
|
|
13749
|
+
nodeData.setConfig(config);
|
|
13762
13750
|
request.setContractRead(nodeData);
|
|
13763
13751
|
return request;
|
|
13764
13752
|
}
|
|
@@ -13848,7 +13836,7 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
|
13848
13836
|
return new _FilterNode({
|
|
13849
13837
|
...obj,
|
|
13850
13838
|
type: import_types15.NodeType.Filter,
|
|
13851
|
-
data: raw.getFilter().toObject()
|
|
13839
|
+
data: raw.getFilter().getConfig().toObject()
|
|
13852
13840
|
});
|
|
13853
13841
|
}
|
|
13854
13842
|
toRequest() {
|
|
@@ -13856,12 +13844,10 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
|
13856
13844
|
request.setId(this.id);
|
|
13857
13845
|
request.setName(this.name);
|
|
13858
13846
|
const nodeData = new avs_pb15.FilterNode();
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
nodeData.setConfig(config);
|
|
13864
|
-
}
|
|
13847
|
+
const config = new avs_pb15.FilterNode.Config();
|
|
13848
|
+
config.setExpression(this.data.expression);
|
|
13849
|
+
config.setSourceId(this.data.sourceId || "");
|
|
13850
|
+
nodeData.setConfig(config);
|
|
13865
13851
|
request.setFilter(nodeData);
|
|
13866
13852
|
return request;
|
|
13867
13853
|
}
|
|
@@ -13880,30 +13866,23 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13880
13866
|
if (!loopNode) {
|
|
13881
13867
|
throw new Error("Response does not contain a Loop node");
|
|
13882
13868
|
}
|
|
13869
|
+
const configData = loopNode.getConfig()?.toObject();
|
|
13883
13870
|
const loopNodeData = loopNode.toObject();
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
|
|
13894
|
-
} else if (loopNodeData.contractRead) {
|
|
13895
|
-
loopNodeData.runnerType = import_types16.NodeType.ContractRead;
|
|
13896
|
-
} else if (loopNodeData.contractWrite) {
|
|
13897
|
-
loopNodeData.runnerType = import_types16.NodeType.ContractWrite;
|
|
13898
|
-
} else if (loopNodeData.graphqlDataQuery) {
|
|
13899
|
-
loopNodeData.runnerType = import_types16.NodeType.GraphQLQuery;
|
|
13900
|
-
}
|
|
13901
|
-
}
|
|
13871
|
+
const data = {
|
|
13872
|
+
...configData,
|
|
13873
|
+
// Keep the nested node structures from the full object
|
|
13874
|
+
restApi: loopNodeData.restApi,
|
|
13875
|
+
customCode: loopNodeData.customCode,
|
|
13876
|
+
ethTransfer: loopNodeData.ethTransfer,
|
|
13877
|
+
contractRead: loopNodeData.contractRead,
|
|
13878
|
+
contractWrite: loopNodeData.contractWrite,
|
|
13879
|
+
graphqlDataQuery: loopNodeData.graphqlDataQuery
|
|
13880
|
+
};
|
|
13902
13881
|
return new _LoopNode({
|
|
13903
13882
|
id: raw.getId(),
|
|
13904
13883
|
name: raw.getName(),
|
|
13905
13884
|
type: import_types16.NodeType.Loop,
|
|
13906
|
-
data
|
|
13885
|
+
data
|
|
13907
13886
|
});
|
|
13908
13887
|
}
|
|
13909
13888
|
toRequest() {
|
|
@@ -13913,15 +13892,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13913
13892
|
node.setName(this.name);
|
|
13914
13893
|
const data = this.data;
|
|
13915
13894
|
const config = new avs_pb16.LoopNode.Config();
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
config.setIterKey(data.config.iterKey || "");
|
|
13920
|
-
} else {
|
|
13921
|
-
config.setSourceId(data.input || data.sourceId || "");
|
|
13922
|
-
config.setIterVal(data.iterVal || "");
|
|
13923
|
-
config.setIterKey(data.iterKey || "");
|
|
13924
|
-
}
|
|
13895
|
+
config.setSourceId(data.sourceId || "");
|
|
13896
|
+
config.setIterVal(data.iterVal || "");
|
|
13897
|
+
config.setIterKey(data.iterKey || "");
|
|
13925
13898
|
loopNode.setConfig(config);
|
|
13926
13899
|
if (data.ethTransfer) {
|
|
13927
13900
|
const ethTransfer = new avs_pb16.ETHTransferNode();
|
|
@@ -14765,23 +14738,17 @@ var Client = class extends BaseClient {
|
|
|
14765
14738
|
createWorkflow(props) {
|
|
14766
14739
|
return new workflow_default(props);
|
|
14767
14740
|
}
|
|
14768
|
-
/**
|
|
14769
|
-
* Get the list of workflows; new workflows can be created by calling `submitWorkflow`
|
|
14770
|
-
* @param {string} address - The address of the smart wallet
|
|
14771
|
-
* @param {string} cursor - The cursor for the list
|
|
14772
|
-
* @param {number} limit - The limit for the list
|
|
14773
|
-
* @param {RequestOptions} options - Request options
|
|
14774
|
-
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
14775
|
-
*/
|
|
14776
14741
|
/**
|
|
14777
14742
|
* Get the list of workflows for multiple addresses
|
|
14778
14743
|
* @param {string[]} addresses - The list of addresses
|
|
14779
|
-
* @param {
|
|
14744
|
+
* @param {GetWorkflowsOptions} options - Request options
|
|
14780
14745
|
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
14781
14746
|
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
14782
14747
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
14748
|
+
* @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
|
|
14749
|
+
* @param {boolean} [options.includeEdges] - Include task edges (expensive field)
|
|
14783
14750
|
* @param {string} [options.authKey] - The auth key for the request
|
|
14784
|
-
* @returns {Promise<{
|
|
14751
|
+
* @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
|
|
14785
14752
|
*/
|
|
14786
14753
|
async getWorkflows(addresses, options) {
|
|
14787
14754
|
const request = new avs_pb22.ListTasksReq();
|
|
@@ -14829,14 +14796,14 @@ var Client = class extends BaseClient {
|
|
|
14829
14796
|
return result.getTotal();
|
|
14830
14797
|
}
|
|
14831
14798
|
/**
|
|
14832
|
-
* Get the list of executions for multiple
|
|
14799
|
+
* Get the list of executions for multiple workflows
|
|
14833
14800
|
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
14834
|
-
* @param {
|
|
14801
|
+
* @param {GetExecutionsOptions} options - Request options
|
|
14835
14802
|
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
14836
14803
|
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
14837
14804
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
14838
14805
|
* @param {string} [options.authKey] - The auth key for the request
|
|
14839
|
-
* @returns {Promise<{
|
|
14806
|
+
* @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
|
|
14840
14807
|
*/
|
|
14841
14808
|
async getExecutions(workflows, options) {
|
|
14842
14809
|
const request = new avs_pb22.ListExecutionsReq();
|
|
@@ -14978,7 +14945,10 @@ var Client = class extends BaseClient {
|
|
|
14978
14945
|
* Create a new secret
|
|
14979
14946
|
* @param {string} name - The name of the secret
|
|
14980
14947
|
* @param {string} value - The value of the secret
|
|
14981
|
-
* @param {
|
|
14948
|
+
* @param {SecretOptions} [options] - Request options
|
|
14949
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
14950
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
14951
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
14982
14952
|
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
14983
14953
|
*/
|
|
14984
14954
|
async createSecret(name, value, options) {
|
|
@@ -14998,7 +14968,10 @@ var Client = class extends BaseClient {
|
|
|
14998
14968
|
* Update a secret
|
|
14999
14969
|
* @param {string} name - The name of the secret
|
|
15000
14970
|
* @param {string} value - The value of the secret
|
|
15001
|
-
* @param {
|
|
14971
|
+
* @param {SecretOptions} [options] - Request options
|
|
14972
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
14973
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
14974
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
15002
14975
|
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
15003
14976
|
*/
|
|
15004
14977
|
async updateSecret(name, value, options) {
|
|
@@ -15016,8 +14989,17 @@ var Client = class extends BaseClient {
|
|
|
15016
14989
|
}
|
|
15017
14990
|
/**
|
|
15018
14991
|
* Get the list of secrets
|
|
15019
|
-
* @param {
|
|
15020
|
-
* @
|
|
14992
|
+
* @param {GetSecretsOptions} options - Request options
|
|
14993
|
+
* @param {string} [options.workflowId] - Filter secrets by workflow ID
|
|
14994
|
+
* @param {string} [options.orgId] - Filter secrets by organization ID
|
|
14995
|
+
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
14996
|
+
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
14997
|
+
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
14998
|
+
* @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
|
|
14999
|
+
* @param {boolean} [options.includeCreatedBy] - Include created_by field
|
|
15000
|
+
* @param {boolean} [options.includeDescription] - Include description field
|
|
15001
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
15002
|
+
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
15021
15003
|
*/
|
|
15022
15004
|
async getSecrets(options) {
|
|
15023
15005
|
const request = new avs_pb22.ListSecretsReq();
|
|
@@ -15068,7 +15050,10 @@ var Client = class extends BaseClient {
|
|
|
15068
15050
|
/**
|
|
15069
15051
|
* Delete a secret
|
|
15070
15052
|
* @param {string} name - The name of the secret
|
|
15071
|
-
* @param {
|
|
15053
|
+
* @param {SecretOptions} [options] - Request options
|
|
15054
|
+
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
15055
|
+
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
15056
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
15072
15057
|
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
15073
15058
|
*/
|
|
15074
15059
|
async deleteSecret(name, options) {
|