@avaprotocol/sdk-js 1.5.0 → 1.6.1
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 +17 -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 +102 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8043 -5376
- package/dist/index.mjs +7808 -5143
- 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,22 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 1.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f6ba804: Added eventTrigger tests
|
|
8
|
+
|
|
9
|
+
## 1.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- a38f8df: Consolidated pagination response and match protobuf of AVS v1.8.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [a38f8df]
|
|
18
|
+
- @avaprotocol/types@1.0.1
|
|
19
|
+
|
|
3
20
|
## 1.5.0
|
|
4
21
|
|
|
5
22
|
### 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,iBAAiB,IAAI,yBAAyB,CAAC,MAAM,GAAG,SAAS;IAIjE,iBAAiB,CAAC,KAAK,EAAE,yBAAyB,CAAC,MAAM,GAAG,SAAS,GAAG,oBAAoB;IAK5F,eAAe,IAAI,UAAU;IAM7B,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI;IAoBxD,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM;IAU3C,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,oBAAoB;IAMjE,MAAM,CAAC,2BAA2B,CAChC,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,IAAI,CAAC,YAAY,GACxB,oBAAoB;CAiCxB;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,IAAI,CAAC,OAAO;IACrD,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAA+C;;IAS9D,UAAU,IAAI,OAAO;IAIrB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB;IAKjD,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB;IAK9C,SAAS,IAAI,yBAAyB,CAAC,MAAM,GAAG,SAAS;IAIzD,SAAS,CAAC,KAAK,EAAE,yBAAyB,CAAC,MAAM,GAAG,SAAS,GAAG,qBAAqB;IAKrF,eAAe,IAAI,UAAU;IAM7B,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI;IAgBxD,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM;IAS3C,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB;IAMlE,MAAM,CAAC,2BAA2B,CAChC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,IAAI,CAAC,YAAY,GACxB,qBAAqB;CA4BzB"}
|
|
@@ -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, ListSecretsResponse, SecretRequestOptions, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsRequest, GetWorkflowsRequest, GetSignatureFormatResponse } from "@avaprotocol/types";
|
|
10
|
+
import Secret from "./models/secret";
|
|
11
|
+
import type { GetKeyResponse, ListSecretsResponse, SecretRequestOptions, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsRequest, GetWorkflowsRequest, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse } 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,22 @@ 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
|
-
|
|
149
|
+
items: Workflow[];
|
|
150
|
+
startCursor: string;
|
|
151
|
+
endCursor: string;
|
|
152
|
+
hasPreviousPage: boolean;
|
|
153
|
+
hasNextPage: boolean;
|
|
129
154
|
}>;
|
|
130
155
|
/**
|
|
131
156
|
* Get the count of workflows for multiple addresses
|
|
@@ -138,108 +163,125 @@ declare class Client extends BaseClient {
|
|
|
138
163
|
* Get the list of executions for multiple workflow given in the workflows argument.
|
|
139
164
|
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
140
165
|
* @param {GetExecutionsRequest} options - Request options
|
|
141
|
-
* @param {string} [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)
|
|
142
168
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
143
169
|
* @param {string} [options.authKey] - The auth key for the request
|
|
144
|
-
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of
|
|
170
|
+
* @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
|
|
145
171
|
*/
|
|
146
172
|
getExecutions(workflows: string[], options?: GetExecutionsRequest): Promise<{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
173
|
+
items: Execution[];
|
|
174
|
+
startCursor: string;
|
|
175
|
+
endCursor: string;
|
|
176
|
+
hasPreviousPage: boolean;
|
|
177
|
+
hasNextPage: boolean;
|
|
150
178
|
}>;
|
|
151
179
|
/**
|
|
152
|
-
* Get a
|
|
153
|
-
* @param {string} workflowId - The workflow id
|
|
154
|
-
* @param {string} executionId - The
|
|
155
|
-
* @param {
|
|
156
|
-
* @returns {Promise<Execution>} - The
|
|
180
|
+
* Get a specific execution by id
|
|
181
|
+
* @param {string} workflowId - The workflow id (taskId)
|
|
182
|
+
* @param {string} executionId - The execution id
|
|
183
|
+
* @param {RequestOptions} options - Request options
|
|
184
|
+
* @returns {Promise<Execution>} - The Execution object
|
|
157
185
|
*/
|
|
158
|
-
getExecution(
|
|
186
|
+
getExecution(workflowId: string, executionId: string, options?: RequestOptions): Promise<Execution>;
|
|
159
187
|
/**
|
|
160
188
|
* Get the count of executions for multiple workflows
|
|
161
|
-
* @param
|
|
189
|
+
* @param workflows - The list of workflow ids
|
|
162
190
|
* @param options - Request options
|
|
163
191
|
* @returns {Promise<number>} - The count of executions
|
|
164
192
|
*/
|
|
165
|
-
getExecutionCount(
|
|
193
|
+
getExecutionCount(workflows: string[], options?: RequestOptions): Promise<number>;
|
|
166
194
|
/**
|
|
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
|
|
195
|
+
* Get the status of an execution
|
|
196
|
+
* @param {string} workflowId - The workflow id (taskId)
|
|
197
|
+
* @param {string} executionId - The execution id
|
|
198
|
+
* @param {RequestOptions} options - Request options
|
|
199
|
+
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
175
200
|
*/
|
|
176
|
-
getExecutionStatus(
|
|
201
|
+
getExecutionStatus(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus>;
|
|
177
202
|
/**
|
|
178
|
-
* Get a workflow by
|
|
179
|
-
* @param {string} id - The
|
|
203
|
+
* Get a workflow by id
|
|
204
|
+
* @param {string} id - The workflow id
|
|
180
205
|
* @param {RequestOptions} options - Request options
|
|
181
206
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
182
207
|
*/
|
|
183
208
|
getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
|
|
184
209
|
/**
|
|
185
|
-
*
|
|
186
|
-
* @param
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param
|
|
190
|
-
* @
|
|
210
|
+
* Trigger a workflow manually
|
|
211
|
+
* @param {object} params - The trigger parameters
|
|
212
|
+
* @param {string} params.id - The workflow id
|
|
213
|
+
* @param {TriggerReasonProps} params.reason - The trigger reason
|
|
214
|
+
* @param {boolean} [params.isBlocking=false] - Whether to wait for execution completion
|
|
215
|
+
* @param {RequestOptions} [options] - Request options
|
|
216
|
+
* @returns {Promise<avs_pb.UserTriggerTaskResp.AsObject>} - The execution result
|
|
191
217
|
*/
|
|
192
218
|
triggerWorkflow({ id, reason, isBlocking, }: {
|
|
193
219
|
id: string;
|
|
194
220
|
reason: TriggerReasonProps;
|
|
195
|
-
isBlocking
|
|
221
|
+
isBlocking?: boolean;
|
|
196
222
|
}, options?: RequestOptions): Promise<avs_pb.UserTriggerTaskResp.AsObject>;
|
|
197
223
|
/**
|
|
198
|
-
* Cancel a workflow
|
|
199
|
-
* @param {string} id - The
|
|
224
|
+
* Cancel a workflow
|
|
225
|
+
* @param {string} id - The workflow id
|
|
200
226
|
* @param {RequestOptions} options - Request options
|
|
201
227
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
202
228
|
*/
|
|
203
229
|
cancelWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
204
230
|
/**
|
|
205
|
-
* Delete a workflow
|
|
206
|
-
* @param {string} id - The
|
|
231
|
+
* Delete a workflow
|
|
232
|
+
* @param {string} id - The workflow id
|
|
207
233
|
* @param {RequestOptions} options - Request options
|
|
208
234
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
209
235
|
*/
|
|
210
236
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
237
|
+
/**
|
|
238
|
+
* Create a new secret
|
|
239
|
+
* @param {string} name - The name of the secret
|
|
240
|
+
* @param {string} value - The value of the secret
|
|
241
|
+
* @param {SecretRequestOptions} options - Request options
|
|
242
|
+
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
243
|
+
*/
|
|
211
244
|
createSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
212
245
|
/**
|
|
213
|
-
* Update
|
|
214
|
-
* @param
|
|
215
|
-
* @param
|
|
216
|
-
* @
|
|
246
|
+
* Update a secret
|
|
247
|
+
* @param {string} name - The name of the secret
|
|
248
|
+
* @param {string} value - The value of the secret
|
|
249
|
+
* @param {SecretRequestOptions} options - Request options
|
|
250
|
+
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
217
251
|
*/
|
|
218
252
|
updateSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
219
253
|
/**
|
|
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
|
|
254
|
+
* Get the list of secrets
|
|
255
|
+
* @param {SecretRequestOptions} options - Request options
|
|
256
|
+
* @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
|
|
229
257
|
*/
|
|
230
258
|
getSecrets(options?: SecretRequestOptions): Promise<ListSecretsResponse>;
|
|
231
259
|
/**
|
|
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
|
|
260
|
+
* Delete a secret
|
|
261
|
+
* @param {string} name - The name of the secret
|
|
262
|
+
* @param {SecretRequestOptions} options - Request options
|
|
263
|
+
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
238
264
|
*/
|
|
239
265
|
deleteSecret(name: string, options?: SecretRequestOptions): Promise<boolean>;
|
|
266
|
+
/**
|
|
267
|
+
* Run a node with inputs
|
|
268
|
+
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
269
|
+
* @param {string} params.nodeType - The type of the node
|
|
270
|
+
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
271
|
+
* @param {Record<string, any>} params.inputVariables - The input variables for the node
|
|
272
|
+
* @param {string} params.walletAddress - The wallet address to use for the node
|
|
273
|
+
* @param {RequestOptions} options - Request options
|
|
274
|
+
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
275
|
+
*/
|
|
276
|
+
runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
|
|
277
|
+
private createNodeFromConfig;
|
|
278
|
+
private mapNodeTypeString;
|
|
279
|
+
private createNodeData;
|
|
280
|
+
private createTempWorkflowForNode;
|
|
281
|
+
private extractNodeExecutionData;
|
|
240
282
|
}
|
|
241
283
|
export * from "./models/node/factory";
|
|
242
284
|
export * from "./models/trigger/factory";
|
|
243
285
|
export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, TriggerReason, Secret, };
|
|
244
|
-
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps,
|
|
286
|
+
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps, RunNodeWithInputsRequest, RunNodeWithInputsResponse, };
|
|
245
287
|
//# 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,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EA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