@avaprotocol/sdk-js 1.5.0 → 1.6.2
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 +25 -0
- package/dist/grpc_codegen/custom_types.d.ts +45 -0
- package/dist/grpc_codegen/custom_types.d.ts.map +1 -0
- package/dist/grpc_codegen/custom_types.js +179 -0
- package/dist/index.d.ts +100 -61
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7288 -4601
- package/dist/index.mjs +8031 -5346
- package/dist/models/execution.d.ts +9 -2
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/execution.js +25 -8
- package/dist/models/node/branch.d.ts +1 -1
- package/dist/models/node/branch.d.ts.map +1 -1
- package/dist/models/node/branch.js +14 -8
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +7 -3
- package/dist/models/node/contractWrite.d.ts +1 -1
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/contractWrite.js +6 -4
- package/dist/models/node/customCode.d.ts +4 -1
- package/dist/models/node/customCode.d.ts.map +1 -1
- package/dist/models/node/customCode.js +10 -3
- package/dist/models/node/ethTransfer.d.ts +1 -1
- package/dist/models/node/ethTransfer.d.ts.map +1 -1
- package/dist/models/node/ethTransfer.js +5 -3
- package/dist/models/node/factory.d.ts +4 -3
- package/dist/models/node/factory.d.ts.map +1 -1
- package/dist/models/node/factory.js +5 -2
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +6 -2
- package/dist/models/node/graphqlQuery.d.ts.map +1 -1
- package/dist/models/node/graphqlQuery.js +13 -7
- package/dist/models/node/loop.d.ts +13 -0
- package/dist/models/node/loop.d.ts.map +1 -0
- package/dist/models/node/loop.js +145 -0
- package/dist/models/node/restApi.d.ts.map +1 -1
- package/dist/models/node/restApi.js +14 -8
- package/dist/models/secret.d.ts +6 -7
- package/dist/models/secret.d.ts.map +1 -1
- package/dist/models/secret.js +7 -1
- package/dist/models/trigger/block.d.ts +8 -1
- package/dist/models/trigger/block.d.ts.map +1 -1
- package/dist/models/trigger/block.js +23 -4
- package/dist/models/trigger/cron.d.ts +8 -1
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/cron.js +23 -4
- package/dist/models/trigger/event.d.ts +8 -1
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +41 -28
- package/dist/models/trigger/factory.d.ts +8 -10
- package/dist/models/trigger/factory.d.ts.map +1 -1
- package/dist/models/trigger/factory.js +6 -1
- package/dist/models/trigger/fixedTime.d.ts +8 -1
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +23 -4
- package/dist/models/trigger/interface.d.ts +5 -1
- package/dist/models/trigger/interface.d.ts.map +1 -1
- package/dist/models/trigger/interface.js +4 -0
- package/dist/models/trigger/manual.d.ts +13 -0
- package/dist/models/trigger/manual.d.ts.map +1 -0
- package/dist/models/trigger/manual.js +27 -0
- package/dist/models/trigger/reason.d.ts.map +1 -1
- package/dist/models/trigger/reason.js +3 -0
- package/dist/models/workflow.d.ts +1 -1
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +3 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 1.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b2db42f: Update getSecrets to use general pageInfo
|
|
8
|
+
- Updated dependencies [b2db42f]
|
|
9
|
+
- @avaprotocol/types@1.0.2
|
|
10
|
+
|
|
11
|
+
## 1.6.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- f6ba804: Added eventTrigger tests
|
|
16
|
+
|
|
17
|
+
## 1.6.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- a38f8df: Consolidated pagination response and match protobuf of AVS v1.8.2
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [a38f8df]
|
|
26
|
+
- @avaprotocol/types@1.0.1
|
|
27
|
+
|
|
3
28
|
## 1.5.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as jspb from "google-protobuf";
|
|
2
|
+
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
3
|
+
/**
|
|
4
|
+
* Custom implementation of RunNodeWithInputsReq class
|
|
5
|
+
* This is needed because the class is not generated from the proto file
|
|
6
|
+
*/
|
|
7
|
+
export declare class RunNodeWithInputsReq extends jspb.Message {
|
|
8
|
+
private nodeType_;
|
|
9
|
+
private nodeConfig_;
|
|
10
|
+
private inputVariables_;
|
|
11
|
+
constructor();
|
|
12
|
+
getNodeType(): string;
|
|
13
|
+
setNodeType(value: string): RunNodeWithInputsReq;
|
|
14
|
+
getNodeConfig(): google_protobuf_struct_pb.Struct | undefined;
|
|
15
|
+
setNodeConfig(value: google_protobuf_struct_pb.Struct | undefined): RunNodeWithInputsReq;
|
|
16
|
+
getInputVariables(): google_protobuf_struct_pb.Struct | undefined;
|
|
17
|
+
setInputVariables(value: google_protobuf_struct_pb.Struct | undefined): RunNodeWithInputsReq;
|
|
18
|
+
serializeBinary(): Uint8Array;
|
|
19
|
+
serializeBinaryToWriter(writer: jspb.BinaryWriter): void;
|
|
20
|
+
toObject(includeInstance?: boolean): object;
|
|
21
|
+
static deserializeBinary(bytes: Uint8Array): RunNodeWithInputsReq;
|
|
22
|
+
static deserializeBinaryFromReader(message: RunNodeWithInputsReq, reader: jspb.BinaryReader): RunNodeWithInputsReq;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Custom implementation of RunNodeWithInputsResp class
|
|
26
|
+
* This is needed because the class is not generated from the proto file
|
|
27
|
+
*/
|
|
28
|
+
export declare class RunNodeWithInputsResp extends jspb.Message {
|
|
29
|
+
private success_;
|
|
30
|
+
private error_;
|
|
31
|
+
private result_;
|
|
32
|
+
constructor();
|
|
33
|
+
getSuccess(): boolean;
|
|
34
|
+
setSuccess(value: boolean): RunNodeWithInputsResp;
|
|
35
|
+
getError(): string;
|
|
36
|
+
setError(value: string): RunNodeWithInputsResp;
|
|
37
|
+
getResult(): google_protobuf_struct_pb.Struct | undefined;
|
|
38
|
+
setResult(value: google_protobuf_struct_pb.Struct | undefined): RunNodeWithInputsResp;
|
|
39
|
+
serializeBinary(): Uint8Array;
|
|
40
|
+
serializeBinaryToWriter(writer: jspb.BinaryWriter): void;
|
|
41
|
+
toObject(includeInstance?: boolean): object;
|
|
42
|
+
static deserializeBinary(bytes: Uint8Array): RunNodeWithInputsResp;
|
|
43
|
+
static deserializeBinaryFromReader(message: RunNodeWithInputsResp, reader: jspb.BinaryReader): RunNodeWithInputsResp;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=custom_types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom_types.d.ts","sourceRoot":"","sources":["../../src/grpc_codegen/custom_types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,yBAAyB,MAAM,2CAA2C,CAAC;AAEvF;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,IAAI,CAAC,OAAO;IACpD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAA+C;IAClE,OAAO,CAAC,eAAe,CAA+C;;IAStE,WAAW,IAAI,MAAM;IAIrB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB;IAKhD,aAAa,IAAI,yBAAyB,CAAC,MAAM,GAAG,SAAS;IAI7D,aAAa,CAAC,KAAK,EAAE,yBAAyB,CAAC,MAAM,GAAG,SAAS,GAAG,oBAAoB;IAKxF,iB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0,0 +1,179 @@
|
|
|
1
|
+
import * as jspb from "google-protobuf";
|
|
2
|
+
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
3
|
+
/**
|
|
4
|
+
* Custom implementation of RunNodeWithInputsReq class
|
|
5
|
+
* This is needed because the class is not generated from the proto file
|
|
6
|
+
*/
|
|
7
|
+
export class RunNodeWithInputsReq extends jspb.Message {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.nodeType_ = "";
|
|
11
|
+
this.nodeConfig_ = undefined;
|
|
12
|
+
this.inputVariables_ = undefined;
|
|
13
|
+
}
|
|
14
|
+
getNodeType() {
|
|
15
|
+
return this.nodeType_;
|
|
16
|
+
}
|
|
17
|
+
setNodeType(value) {
|
|
18
|
+
this.nodeType_ = value;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
getNodeConfig() {
|
|
22
|
+
return this.nodeConfig_;
|
|
23
|
+
}
|
|
24
|
+
setNodeConfig(value) {
|
|
25
|
+
this.nodeConfig_ = value;
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
getInputVariables() {
|
|
29
|
+
return this.inputVariables_;
|
|
30
|
+
}
|
|
31
|
+
setInputVariables(value) {
|
|
32
|
+
this.inputVariables_ = value;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
serializeBinary() {
|
|
36
|
+
const writer = new jspb.BinaryWriter();
|
|
37
|
+
this.serializeBinaryToWriter(writer);
|
|
38
|
+
return writer.getResultBuffer();
|
|
39
|
+
}
|
|
40
|
+
serializeBinaryToWriter(writer) {
|
|
41
|
+
if (this.nodeType_ !== "") {
|
|
42
|
+
writer.writeString(1, this.nodeType_);
|
|
43
|
+
}
|
|
44
|
+
if (this.nodeConfig_ !== undefined) {
|
|
45
|
+
writer.writeMessage(2, this.nodeConfig_, google_protobuf_struct_pb.Struct.serializeBinaryToWriter);
|
|
46
|
+
}
|
|
47
|
+
if (this.inputVariables_ !== undefined) {
|
|
48
|
+
writer.writeMessage(3, this.inputVariables_, google_protobuf_struct_pb.Struct.serializeBinaryToWriter);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
toObject(includeInstance) {
|
|
52
|
+
return {
|
|
53
|
+
nodeType: this.nodeType_,
|
|
54
|
+
nodeConfig: this.nodeConfig_ ?
|
|
55
|
+
this.nodeConfig_.toObject(includeInstance) : undefined,
|
|
56
|
+
inputVariables: this.inputVariables_ ?
|
|
57
|
+
this.inputVariables_.toObject(includeInstance) : undefined
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static deserializeBinary(bytes) {
|
|
61
|
+
const reader = new jspb.BinaryReader(bytes);
|
|
62
|
+
const message = new RunNodeWithInputsReq();
|
|
63
|
+
return RunNodeWithInputsReq.deserializeBinaryFromReader(message, reader);
|
|
64
|
+
}
|
|
65
|
+
static deserializeBinaryFromReader(message, reader) {
|
|
66
|
+
while (reader.nextField()) {
|
|
67
|
+
if (reader.isEndGroup()) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
const field = reader.getFieldNumber();
|
|
71
|
+
switch (field) {
|
|
72
|
+
case 1:
|
|
73
|
+
message.setNodeType(reader.readString());
|
|
74
|
+
break;
|
|
75
|
+
case 2:
|
|
76
|
+
const nodeConfig = new google_protobuf_struct_pb.Struct();
|
|
77
|
+
reader.readMessage(nodeConfig, google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
78
|
+
message.setNodeConfig(nodeConfig);
|
|
79
|
+
break;
|
|
80
|
+
case 3:
|
|
81
|
+
const inputVariables = new google_protobuf_struct_pb.Struct();
|
|
82
|
+
reader.readMessage(inputVariables, google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
83
|
+
message.setInputVariables(inputVariables);
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
reader.skipField();
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return message;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Custom implementation of RunNodeWithInputsResp class
|
|
95
|
+
* This is needed because the class is not generated from the proto file
|
|
96
|
+
*/
|
|
97
|
+
export class RunNodeWithInputsResp extends jspb.Message {
|
|
98
|
+
constructor() {
|
|
99
|
+
super();
|
|
100
|
+
this.success_ = false;
|
|
101
|
+
this.error_ = "";
|
|
102
|
+
this.result_ = undefined;
|
|
103
|
+
}
|
|
104
|
+
getSuccess() {
|
|
105
|
+
return this.success_;
|
|
106
|
+
}
|
|
107
|
+
setSuccess(value) {
|
|
108
|
+
this.success_ = value;
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
getError() {
|
|
112
|
+
return this.error_;
|
|
113
|
+
}
|
|
114
|
+
setError(value) {
|
|
115
|
+
this.error_ = value;
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
getResult() {
|
|
119
|
+
return this.result_;
|
|
120
|
+
}
|
|
121
|
+
setResult(value) {
|
|
122
|
+
this.result_ = value;
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
serializeBinary() {
|
|
126
|
+
const writer = new jspb.BinaryWriter();
|
|
127
|
+
this.serializeBinaryToWriter(writer);
|
|
128
|
+
return writer.getResultBuffer();
|
|
129
|
+
}
|
|
130
|
+
serializeBinaryToWriter(writer) {
|
|
131
|
+
if (this.success_ !== false) {
|
|
132
|
+
writer.writeBool(1, this.success_);
|
|
133
|
+
}
|
|
134
|
+
if (this.error_ !== "") {
|
|
135
|
+
writer.writeString(2, this.error_);
|
|
136
|
+
}
|
|
137
|
+
if (this.result_ !== undefined) {
|
|
138
|
+
writer.writeMessage(3, this.result_, google_protobuf_struct_pb.Struct.serializeBinaryToWriter);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
toObject(includeInstance) {
|
|
142
|
+
return {
|
|
143
|
+
success: this.success_,
|
|
144
|
+
error: this.error_,
|
|
145
|
+
result: this.result_ ?
|
|
146
|
+
this.result_.toObject(includeInstance) : undefined
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
static deserializeBinary(bytes) {
|
|
150
|
+
const reader = new jspb.BinaryReader(bytes);
|
|
151
|
+
const message = new RunNodeWithInputsResp();
|
|
152
|
+
return RunNodeWithInputsResp.deserializeBinaryFromReader(message, reader);
|
|
153
|
+
}
|
|
154
|
+
static deserializeBinaryFromReader(message, reader) {
|
|
155
|
+
while (reader.nextField()) {
|
|
156
|
+
if (reader.isEndGroup()) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
const field = reader.getFieldNumber();
|
|
160
|
+
switch (field) {
|
|
161
|
+
case 1:
|
|
162
|
+
message.setSuccess(reader.readBool());
|
|
163
|
+
break;
|
|
164
|
+
case 2:
|
|
165
|
+
message.setError(reader.readString());
|
|
166
|
+
break;
|
|
167
|
+
case 3:
|
|
168
|
+
const result = new google_protobuf_struct_pb.Struct();
|
|
169
|
+
reader.readMessage(result, google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
170
|
+
message.setResult(result);
|
|
171
|
+
break;
|
|
172
|
+
default:
|
|
173
|
+
reader.skipField();
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return message;
|
|
178
|
+
}
|
|
179
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ import Execution, { ExecutionProps, OutputDataProps } from "./models/execution";
|
|
|
7
7
|
import Step, { StepProps } from "./models/step";
|
|
8
8
|
import NodeFactory from "./models/node/factory";
|
|
9
9
|
import TriggerFactory from "./models/trigger/factory";
|
|
10
|
-
import Secret
|
|
11
|
-
import type { GetKeyResponse,
|
|
10
|
+
import Secret from "./models/secret";
|
|
11
|
+
import type { GetKeyResponse, SecretRequestOptions, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsRequest, GetWorkflowsRequest, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, SecretProps, PageInfo } from "@avaprotocol/types";
|
|
12
|
+
import { ExecutionStatus } from "@/grpc_codegen/avs_pb";
|
|
12
13
|
import TriggerReason, { TriggerReasonProps } from "./models/trigger/reason";
|
|
13
14
|
declare class BaseClient {
|
|
14
15
|
readonly endpoint: string;
|
|
@@ -78,6 +79,18 @@ declare class BaseClient {
|
|
|
78
79
|
* @returns {Promise<TResponse>} - The response from the gRPC call
|
|
79
80
|
*/
|
|
80
81
|
protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Convert a protobuf Value to a JavaScript value
|
|
84
|
+
* @param value - The protobuf Value object
|
|
85
|
+
* @returns {any} - The converted JavaScript value
|
|
86
|
+
*/
|
|
87
|
+
protected convertProtobufValueToJS(value: any): any;
|
|
88
|
+
/**
|
|
89
|
+
* Convert a JavaScript value to a protobuf Value
|
|
90
|
+
* @param value - The JavaScript value to convert
|
|
91
|
+
* @returns {any} - The protobuf Value object
|
|
92
|
+
*/
|
|
93
|
+
protected convertJSValueToProtobuf(value: any): any;
|
|
81
94
|
}
|
|
82
95
|
declare class Client extends BaseClient {
|
|
83
96
|
constructor(config: ClientOption);
|
|
@@ -122,10 +135,19 @@ declare class Client extends BaseClient {
|
|
|
122
135
|
* @param {RequestOptions} options - Request options
|
|
123
136
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
124
137
|
*/
|
|
138
|
+
/**
|
|
139
|
+
* Get the list of workflows for multiple addresses
|
|
140
|
+
* @param {string[]} addresses - The list of addresses
|
|
141
|
+
* @param {GetWorkflowsRequest} options - Request options
|
|
142
|
+
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
143
|
+
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
144
|
+
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
145
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
146
|
+
* @returns {Promise<{ cursor: string; result: Workflow[]; hasMore: boolean }>} - The list of Workflow objects with pagination metadata
|
|
147
|
+
*/
|
|
125
148
|
getWorkflows(addresses: string[], options?: GetWorkflowsRequest): Promise<{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
hasMore: boolean;
|
|
149
|
+
items: Workflow[];
|
|
150
|
+
pageInfo: PageInfo;
|
|
129
151
|
}>;
|
|
130
152
|
/**
|
|
131
153
|
* Get the count of workflows for multiple addresses
|
|
@@ -138,108 +160,125 @@ declare class Client extends BaseClient {
|
|
|
138
160
|
* Get the list of executions for multiple workflow given in the workflows argument.
|
|
139
161
|
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
140
162
|
* @param {GetExecutionsRequest} options - Request options
|
|
141
|
-
* @param {string} [options.
|
|
163
|
+
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
164
|
+
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
142
165
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
143
166
|
* @param {string} [options.authKey] - The auth key for the request
|
|
144
|
-
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of
|
|
167
|
+
* @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
|
|
145
168
|
*/
|
|
146
169
|
getExecutions(workflows: string[], options?: GetExecutionsRequest): Promise<{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
hasMore: boolean;
|
|
170
|
+
items: Execution[];
|
|
171
|
+
pageInfo: PageInfo;
|
|
150
172
|
}>;
|
|
151
173
|
/**
|
|
152
|
-
* Get a
|
|
153
|
-
* @param {string} workflowId - The workflow id
|
|
154
|
-
* @param {string} executionId - The
|
|
155
|
-
* @param {
|
|
156
|
-
* @returns {Promise<Execution>} - The
|
|
174
|
+
* Get a specific execution by id
|
|
175
|
+
* @param {string} workflowId - The workflow id (taskId)
|
|
176
|
+
* @param {string} executionId - The execution id
|
|
177
|
+
* @param {RequestOptions} options - Request options
|
|
178
|
+
* @returns {Promise<Execution>} - The Execution object
|
|
157
179
|
*/
|
|
158
|
-
getExecution(
|
|
180
|
+
getExecution(workflowId: string, executionId: string, options?: RequestOptions): Promise<Execution>;
|
|
159
181
|
/**
|
|
160
182
|
* Get the count of executions for multiple workflows
|
|
161
|
-
* @param
|
|
183
|
+
* @param workflows - The list of workflow ids
|
|
162
184
|
* @param options - Request options
|
|
163
185
|
* @returns {Promise<number>} - The count of executions
|
|
164
186
|
*/
|
|
165
|
-
getExecutionCount(
|
|
187
|
+
getExecutionCount(workflows: string[], options?: RequestOptions): Promise<number>;
|
|
166
188
|
/**
|
|
167
|
-
* Get status of an execution
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* @
|
|
172
|
-
* @param {string} executionId - The exectuion id
|
|
173
|
-
* @param {GetExecutionsRequest} options - Request options
|
|
174
|
-
* @returns {Promise<ExecutionStatus>} - The result execution if it is existed
|
|
189
|
+
* Get the status of an execution
|
|
190
|
+
* @param {string} workflowId - The workflow id (taskId)
|
|
191
|
+
* @param {string} executionId - The execution id
|
|
192
|
+
* @param {RequestOptions} options - Request options
|
|
193
|
+
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
175
194
|
*/
|
|
176
|
-
getExecutionStatus(
|
|
195
|
+
getExecutionStatus(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus>;
|
|
177
196
|
/**
|
|
178
|
-
* Get a workflow by
|
|
179
|
-
* @param {string} id - The
|
|
197
|
+
* Get a workflow by id
|
|
198
|
+
* @param {string} id - The workflow id
|
|
180
199
|
* @param {RequestOptions} options - Request options
|
|
181
200
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
182
201
|
*/
|
|
183
202
|
getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
|
|
184
203
|
/**
|
|
185
|
-
*
|
|
186
|
-
* @param
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param
|
|
190
|
-
* @
|
|
204
|
+
* Trigger a workflow manually
|
|
205
|
+
* @param {object} params - The trigger parameters
|
|
206
|
+
* @param {string} params.id - The workflow id
|
|
207
|
+
* @param {TriggerReasonProps} params.reason - The trigger reason
|
|
208
|
+
* @param {boolean} [params.isBlocking=false] - Whether to wait for execution completion
|
|
209
|
+
* @param {RequestOptions} [options] - Request options
|
|
210
|
+
* @returns {Promise<avs_pb.UserTriggerTaskResp.AsObject>} - The execution result
|
|
191
211
|
*/
|
|
192
212
|
triggerWorkflow({ id, reason, isBlocking, }: {
|
|
193
213
|
id: string;
|
|
194
214
|
reason: TriggerReasonProps;
|
|
195
|
-
isBlocking
|
|
215
|
+
isBlocking?: boolean;
|
|
196
216
|
}, options?: RequestOptions): Promise<avs_pb.UserTriggerTaskResp.AsObject>;
|
|
197
217
|
/**
|
|
198
|
-
* Cancel a workflow
|
|
199
|
-
* @param {string} id - The
|
|
218
|
+
* Cancel a workflow
|
|
219
|
+
* @param {string} id - The workflow id
|
|
200
220
|
* @param {RequestOptions} options - Request options
|
|
201
221
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
202
222
|
*/
|
|
203
223
|
cancelWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
204
224
|
/**
|
|
205
|
-
* Delete a workflow
|
|
206
|
-
* @param {string} id - The
|
|
225
|
+
* Delete a workflow
|
|
226
|
+
* @param {string} id - The workflow id
|
|
207
227
|
* @param {RequestOptions} options - Request options
|
|
208
228
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
209
229
|
*/
|
|
210
230
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
231
|
+
/**
|
|
232
|
+
* Create a new secret
|
|
233
|
+
* @param {string} name - The name of the secret
|
|
234
|
+
* @param {string} value - The value of the secret
|
|
235
|
+
* @param {SecretRequestOptions} options - Request options
|
|
236
|
+
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
237
|
+
*/
|
|
211
238
|
createSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
212
239
|
/**
|
|
213
|
-
* Update
|
|
214
|
-
* @param
|
|
215
|
-
* @param
|
|
216
|
-
* @
|
|
240
|
+
* Update a secret
|
|
241
|
+
* @param {string} name - The name of the secret
|
|
242
|
+
* @param {string} value - The value of the secret
|
|
243
|
+
* @param {SecretRequestOptions} options - Request options
|
|
244
|
+
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
217
245
|
*/
|
|
218
246
|
updateSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
219
247
|
/**
|
|
220
|
-
*
|
|
221
|
-
* @param options - Request options
|
|
222
|
-
* @
|
|
223
|
-
* @param options.orgId - Filter secrets by organization ID
|
|
224
|
-
* @param options.cursor - Legacy cursor parameter (deprecated, use before/after instead)
|
|
225
|
-
* @param options.before - Get items before this cursor value (for backward pagination)
|
|
226
|
-
* @param options.after - Get items after this cursor value (for forward pagination)
|
|
227
|
-
* @param options.itemPerPage - Number of items per page
|
|
228
|
-
* @returns {Promise<ListSecretsResponse>} - The list of secrets with pagination metadata
|
|
248
|
+
* Get the list of secrets
|
|
249
|
+
* @param {SecretRequestOptions} options - Request options
|
|
250
|
+
* @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
|
|
229
251
|
*/
|
|
230
|
-
getSecrets(options?: SecretRequestOptions): Promise<
|
|
252
|
+
getSecrets(options?: SecretRequestOptions): Promise<{
|
|
253
|
+
items: SecretProps[];
|
|
254
|
+
pageInfo: PageInfo;
|
|
255
|
+
}>;
|
|
231
256
|
/**
|
|
232
|
-
* Delete a secret
|
|
233
|
-
* @param name - The name of the secret
|
|
234
|
-
* @param options - Request options
|
|
235
|
-
* @
|
|
236
|
-
* @param options.orgId - The organization id; if specified, the secret will be deleted from the organization scope
|
|
237
|
-
* @returns {Promise<boolean>} - Whether the secret was successfully deleted
|
|
257
|
+
* Delete a secret
|
|
258
|
+
* @param {string} name - The name of the secret
|
|
259
|
+
* @param {SecretRequestOptions} options - Request options
|
|
260
|
+
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
238
261
|
*/
|
|
239
262
|
deleteSecret(name: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
263
|
+
/**
|
|
264
|
+
* Run a node with inputs
|
|
265
|
+
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
266
|
+
* @param {string} params.nodeType - The type of the node
|
|
267
|
+
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
268
|
+
* @param {Record<string, any>} params.inputVariables - The input variables for the node
|
|
269
|
+
* @param {string} params.walletAddress - The wallet address to use for the node
|
|
270
|
+
* @param {RequestOptions} options - Request options
|
|
271
|
+
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
272
|
+
*/
|
|
273
|
+
runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
|
|
274
|
+
private createNodeFromConfig;
|
|
275
|
+
private mapNodeTypeString;
|
|
276
|
+
private createNodeData;
|
|
277
|
+
private createTempWorkflowForNode;
|
|
278
|
+
private extractNodeExecutionData;
|
|
240
279
|
}
|
|
241
280
|
export * from "./models/node/factory";
|
|
242
281
|
export * from "./models/trigger/factory";
|
|
243
282
|
export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, TriggerReason, Secret, };
|
|
244
|
-
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps,
|
|
283
|
+
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps, RunNodeWithInputsRequest, RunNodeWithInputsResponse, };
|
|
245
284
|
//# 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":"AACA,OAAO,EAAe,QAAQ,EAAE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