@avaprotocol/sdk-js 1.3.0 → 1.3.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/dist/index.d.mts +67 -25
- package/dist/index.d.ts +67 -25
- package/dist/index.js +340 -216
- package/dist/index.mjs +339 -215
- package/package.json +4 -16
package/dist/index.js
CHANGED
|
@@ -68,9 +68,11 @@ var require_avs_pb = __commonJS({
|
|
|
68
68
|
goog.exportSymbol("proto.aggregator.EventCondition", null, global);
|
|
69
69
|
goog.exportSymbol("proto.aggregator.Execution", null, global);
|
|
70
70
|
goog.exportSymbol("proto.aggregator.Execution.Step", null, global);
|
|
71
|
+
goog.exportSymbol("proto.aggregator.ExecutionReq", null, global);
|
|
72
|
+
goog.exportSymbol("proto.aggregator.ExecutionStatus", null, global);
|
|
73
|
+
goog.exportSymbol("proto.aggregator.ExecutionStatusResp", null, global);
|
|
71
74
|
goog.exportSymbol("proto.aggregator.FilterNode", null, global);
|
|
72
75
|
goog.exportSymbol("proto.aggregator.FixedTimeCondition", null, global);
|
|
73
|
-
goog.exportSymbol("proto.aggregator.GetExecutionReq", null, global);
|
|
74
76
|
goog.exportSymbol("proto.aggregator.GetKeyReq", null, global);
|
|
75
77
|
goog.exportSymbol("proto.aggregator.GetWalletReq", null, global);
|
|
76
78
|
goog.exportSymbol("proto.aggregator.GetWalletResp", null, global);
|
|
@@ -332,12 +334,19 @@ var require_avs_pb = __commonJS({
|
|
|
332
334
|
if (goog.DEBUG && !COMPILED) {
|
|
333
335
|
proto.aggregator.ListExecutionsResp.displayName = "proto.aggregator.ListExecutionsResp";
|
|
334
336
|
}
|
|
335
|
-
proto.aggregator.
|
|
337
|
+
proto.aggregator.ExecutionReq = function(opt_data) {
|
|
336
338
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
337
339
|
};
|
|
338
|
-
goog.inherits(proto.aggregator.
|
|
340
|
+
goog.inherits(proto.aggregator.ExecutionReq, jspb.Message);
|
|
339
341
|
if (goog.DEBUG && !COMPILED) {
|
|
340
|
-
proto.aggregator.
|
|
342
|
+
proto.aggregator.ExecutionReq.displayName = "proto.aggregator.ExecutionReq";
|
|
343
|
+
}
|
|
344
|
+
proto.aggregator.ExecutionStatusResp = function(opt_data) {
|
|
345
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
346
|
+
};
|
|
347
|
+
goog.inherits(proto.aggregator.ExecutionStatusResp, jspb.Message);
|
|
348
|
+
if (goog.DEBUG && !COMPILED) {
|
|
349
|
+
proto.aggregator.ExecutionStatusResp.displayName = "proto.aggregator.ExecutionStatusResp";
|
|
341
350
|
}
|
|
342
351
|
proto.aggregator.GetKeyReq = function(opt_data) {
|
|
343
352
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
@@ -3967,7 +3976,7 @@ var require_avs_pb = __commonJS({
|
|
|
3967
3976
|
};
|
|
3968
3977
|
proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) {
|
|
3969
3978
|
var f, obj = {
|
|
3970
|
-
|
|
3979
|
+
factoryAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3971
3980
|
salt: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
3972
3981
|
};
|
|
3973
3982
|
if (includeInstance) {
|
|
@@ -3993,7 +4002,7 @@ var require_avs_pb = __commonJS({
|
|
|
3993
4002
|
/** @type {string} */
|
|
3994
4003
|
reader.readString()
|
|
3995
4004
|
);
|
|
3996
|
-
msg.
|
|
4005
|
+
msg.setFactoryAddress(value);
|
|
3997
4006
|
break;
|
|
3998
4007
|
case 2:
|
|
3999
4008
|
var value = (
|
|
@@ -4016,7 +4025,7 @@ var require_avs_pb = __commonJS({
|
|
|
4016
4025
|
};
|
|
4017
4026
|
proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) {
|
|
4018
4027
|
var f = void 0;
|
|
4019
|
-
f = message.
|
|
4028
|
+
f = message.getFactoryAddress();
|
|
4020
4029
|
if (f.length > 0) {
|
|
4021
4030
|
writer.writeString(
|
|
4022
4031
|
1,
|
|
@@ -4031,13 +4040,13 @@ var require_avs_pb = __commonJS({
|
|
|
4031
4040
|
);
|
|
4032
4041
|
}
|
|
4033
4042
|
};
|
|
4034
|
-
proto.aggregator.ListWalletReq.prototype.
|
|
4043
|
+
proto.aggregator.ListWalletReq.prototype.getFactoryAddress = function() {
|
|
4035
4044
|
return (
|
|
4036
4045
|
/** @type {string} */
|
|
4037
4046
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
4038
4047
|
);
|
|
4039
4048
|
};
|
|
4040
|
-
proto.aggregator.ListWalletReq.prototype.
|
|
4049
|
+
proto.aggregator.ListWalletReq.prototype.setFactoryAddress = function(value) {
|
|
4041
4050
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
4042
4051
|
};
|
|
4043
4052
|
proto.aggregator.ListWalletReq.prototype.getSalt = function() {
|
|
@@ -5051,10 +5060,10 @@ var require_avs_pb = __commonJS({
|
|
|
5051
5060
|
return jspb.Message.setProto3BooleanField(this, 4, value);
|
|
5052
5061
|
};
|
|
5053
5062
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5054
|
-
proto.aggregator.
|
|
5055
|
-
return proto.aggregator.
|
|
5063
|
+
proto.aggregator.ExecutionReq.prototype.toObject = function(opt_includeInstance) {
|
|
5064
|
+
return proto.aggregator.ExecutionReq.toObject(opt_includeInstance, this);
|
|
5056
5065
|
};
|
|
5057
|
-
proto.aggregator.
|
|
5066
|
+
proto.aggregator.ExecutionReq.toObject = function(includeInstance, msg) {
|
|
5058
5067
|
var f, obj = {
|
|
5059
5068
|
taskId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
5060
5069
|
executionId: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
@@ -5065,12 +5074,12 @@ var require_avs_pb = __commonJS({
|
|
|
5065
5074
|
return obj;
|
|
5066
5075
|
};
|
|
5067
5076
|
}
|
|
5068
|
-
proto.aggregator.
|
|
5077
|
+
proto.aggregator.ExecutionReq.deserializeBinary = function(bytes) {
|
|
5069
5078
|
var reader = new jspb.BinaryReader(bytes);
|
|
5070
|
-
var msg = new proto.aggregator.
|
|
5071
|
-
return proto.aggregator.
|
|
5079
|
+
var msg = new proto.aggregator.ExecutionReq();
|
|
5080
|
+
return proto.aggregator.ExecutionReq.deserializeBinaryFromReader(msg, reader);
|
|
5072
5081
|
};
|
|
5073
|
-
proto.aggregator.
|
|
5082
|
+
proto.aggregator.ExecutionReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
5074
5083
|
while (reader.nextField()) {
|
|
5075
5084
|
if (reader.isEndGroup()) {
|
|
5076
5085
|
break;
|
|
@@ -5098,12 +5107,12 @@ var require_avs_pb = __commonJS({
|
|
|
5098
5107
|
}
|
|
5099
5108
|
return msg;
|
|
5100
5109
|
};
|
|
5101
|
-
proto.aggregator.
|
|
5110
|
+
proto.aggregator.ExecutionReq.prototype.serializeBinary = function() {
|
|
5102
5111
|
var writer = new jspb.BinaryWriter();
|
|
5103
|
-
proto.aggregator.
|
|
5112
|
+
proto.aggregator.ExecutionReq.serializeBinaryToWriter(this, writer);
|
|
5104
5113
|
return writer.getResultBuffer();
|
|
5105
5114
|
};
|
|
5106
|
-
proto.aggregator.
|
|
5115
|
+
proto.aggregator.ExecutionReq.serializeBinaryToWriter = function(message, writer) {
|
|
5107
5116
|
var f = void 0;
|
|
5108
5117
|
f = message.getTaskId();
|
|
5109
5118
|
if (f.length > 0) {
|
|
@@ -5120,24 +5129,88 @@ var require_avs_pb = __commonJS({
|
|
|
5120
5129
|
);
|
|
5121
5130
|
}
|
|
5122
5131
|
};
|
|
5123
|
-
proto.aggregator.
|
|
5132
|
+
proto.aggregator.ExecutionReq.prototype.getTaskId = function() {
|
|
5124
5133
|
return (
|
|
5125
5134
|
/** @type {string} */
|
|
5126
5135
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
5127
5136
|
);
|
|
5128
5137
|
};
|
|
5129
|
-
proto.aggregator.
|
|
5138
|
+
proto.aggregator.ExecutionReq.prototype.setTaskId = function(value) {
|
|
5130
5139
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
5131
5140
|
};
|
|
5132
|
-
proto.aggregator.
|
|
5141
|
+
proto.aggregator.ExecutionReq.prototype.getExecutionId = function() {
|
|
5133
5142
|
return (
|
|
5134
5143
|
/** @type {string} */
|
|
5135
5144
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
5136
5145
|
);
|
|
5137
5146
|
};
|
|
5138
|
-
proto.aggregator.
|
|
5147
|
+
proto.aggregator.ExecutionReq.prototype.setExecutionId = function(value) {
|
|
5139
5148
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
5140
5149
|
};
|
|
5150
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5151
|
+
proto.aggregator.ExecutionStatusResp.prototype.toObject = function(opt_includeInstance) {
|
|
5152
|
+
return proto.aggregator.ExecutionStatusResp.toObject(opt_includeInstance, this);
|
|
5153
|
+
};
|
|
5154
|
+
proto.aggregator.ExecutionStatusResp.toObject = function(includeInstance, msg) {
|
|
5155
|
+
var f, obj = {
|
|
5156
|
+
status: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
5157
|
+
};
|
|
5158
|
+
if (includeInstance) {
|
|
5159
|
+
obj.$jspbMessageInstance = msg;
|
|
5160
|
+
}
|
|
5161
|
+
return obj;
|
|
5162
|
+
};
|
|
5163
|
+
}
|
|
5164
|
+
proto.aggregator.ExecutionStatusResp.deserializeBinary = function(bytes) {
|
|
5165
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
5166
|
+
var msg = new proto.aggregator.ExecutionStatusResp();
|
|
5167
|
+
return proto.aggregator.ExecutionStatusResp.deserializeBinaryFromReader(msg, reader);
|
|
5168
|
+
};
|
|
5169
|
+
proto.aggregator.ExecutionStatusResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
5170
|
+
while (reader.nextField()) {
|
|
5171
|
+
if (reader.isEndGroup()) {
|
|
5172
|
+
break;
|
|
5173
|
+
}
|
|
5174
|
+
var field = reader.getFieldNumber();
|
|
5175
|
+
switch (field) {
|
|
5176
|
+
case 1:
|
|
5177
|
+
var value = (
|
|
5178
|
+
/** @type {!proto.aggregator.ExecutionStatus} */
|
|
5179
|
+
reader.readEnum()
|
|
5180
|
+
);
|
|
5181
|
+
msg.setStatus(value);
|
|
5182
|
+
break;
|
|
5183
|
+
default:
|
|
5184
|
+
reader.skipField();
|
|
5185
|
+
break;
|
|
5186
|
+
}
|
|
5187
|
+
}
|
|
5188
|
+
return msg;
|
|
5189
|
+
};
|
|
5190
|
+
proto.aggregator.ExecutionStatusResp.prototype.serializeBinary = function() {
|
|
5191
|
+
var writer = new jspb.BinaryWriter();
|
|
5192
|
+
proto.aggregator.ExecutionStatusResp.serializeBinaryToWriter(this, writer);
|
|
5193
|
+
return writer.getResultBuffer();
|
|
5194
|
+
};
|
|
5195
|
+
proto.aggregator.ExecutionStatusResp.serializeBinaryToWriter = function(message, writer) {
|
|
5196
|
+
var f = void 0;
|
|
5197
|
+
f = message.getStatus();
|
|
5198
|
+
if (f !== 0) {
|
|
5199
|
+
writer.writeEnum(
|
|
5200
|
+
1,
|
|
5201
|
+
f
|
|
5202
|
+
);
|
|
5203
|
+
}
|
|
5204
|
+
};
|
|
5205
|
+
proto.aggregator.ExecutionStatusResp.prototype.getStatus = function() {
|
|
5206
|
+
return (
|
|
5207
|
+
/** @type {!proto.aggregator.ExecutionStatus} */
|
|
5208
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
5209
|
+
);
|
|
5210
|
+
};
|
|
5211
|
+
proto.aggregator.ExecutionStatusResp.prototype.setStatus = function(value) {
|
|
5212
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
5213
|
+
};
|
|
5141
5214
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5142
5215
|
proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) {
|
|
5143
5216
|
return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this);
|
|
@@ -5805,8 +5878,8 @@ var require_avs_pb = __commonJS({
|
|
|
5805
5878
|
};
|
|
5806
5879
|
proto.aggregator.UserTriggerTaskResp.toObject = function(includeInstance, msg) {
|
|
5807
5880
|
var f, obj = {
|
|
5808
|
-
|
|
5809
|
-
|
|
5881
|
+
executionId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
5882
|
+
status: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
5810
5883
|
};
|
|
5811
5884
|
if (includeInstance) {
|
|
5812
5885
|
obj.$jspbMessageInstance = msg;
|
|
@@ -5828,17 +5901,17 @@ var require_avs_pb = __commonJS({
|
|
|
5828
5901
|
switch (field) {
|
|
5829
5902
|
case 1:
|
|
5830
5903
|
var value = (
|
|
5831
|
-
/** @type {
|
|
5832
|
-
reader.
|
|
5904
|
+
/** @type {string} */
|
|
5905
|
+
reader.readString()
|
|
5833
5906
|
);
|
|
5834
|
-
msg.
|
|
5907
|
+
msg.setExecutionId(value);
|
|
5835
5908
|
break;
|
|
5836
5909
|
case 2:
|
|
5837
5910
|
var value = (
|
|
5838
|
-
/** @type {
|
|
5839
|
-
reader.
|
|
5911
|
+
/** @type {!proto.aggregator.ExecutionStatus} */
|
|
5912
|
+
reader.readEnum()
|
|
5840
5913
|
);
|
|
5841
|
-
msg.
|
|
5914
|
+
msg.setStatus(value);
|
|
5842
5915
|
break;
|
|
5843
5916
|
default:
|
|
5844
5917
|
reader.skipField();
|
|
@@ -5854,38 +5927,38 @@ var require_avs_pb = __commonJS({
|
|
|
5854
5927
|
};
|
|
5855
5928
|
proto.aggregator.UserTriggerTaskResp.serializeBinaryToWriter = function(message, writer) {
|
|
5856
5929
|
var f = void 0;
|
|
5857
|
-
f = message.
|
|
5858
|
-
if (f) {
|
|
5859
|
-
writer.
|
|
5930
|
+
f = message.getExecutionId();
|
|
5931
|
+
if (f.length > 0) {
|
|
5932
|
+
writer.writeString(
|
|
5860
5933
|
1,
|
|
5861
5934
|
f
|
|
5862
5935
|
);
|
|
5863
5936
|
}
|
|
5864
|
-
f = message.
|
|
5865
|
-
if (f
|
|
5866
|
-
writer.
|
|
5937
|
+
f = message.getStatus();
|
|
5938
|
+
if (f !== 0) {
|
|
5939
|
+
writer.writeEnum(
|
|
5867
5940
|
2,
|
|
5868
5941
|
f
|
|
5869
5942
|
);
|
|
5870
5943
|
}
|
|
5871
5944
|
};
|
|
5872
|
-
proto.aggregator.UserTriggerTaskResp.prototype.
|
|
5945
|
+
proto.aggregator.UserTriggerTaskResp.prototype.getExecutionId = function() {
|
|
5873
5946
|
return (
|
|
5874
|
-
/** @type {
|
|
5875
|
-
jspb.Message.
|
|
5947
|
+
/** @type {string} */
|
|
5948
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
5876
5949
|
);
|
|
5877
5950
|
};
|
|
5878
|
-
proto.aggregator.UserTriggerTaskResp.prototype.
|
|
5879
|
-
return jspb.Message.
|
|
5951
|
+
proto.aggregator.UserTriggerTaskResp.prototype.setExecutionId = function(value) {
|
|
5952
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
5880
5953
|
};
|
|
5881
|
-
proto.aggregator.UserTriggerTaskResp.prototype.
|
|
5954
|
+
proto.aggregator.UserTriggerTaskResp.prototype.getStatus = function() {
|
|
5882
5955
|
return (
|
|
5883
|
-
/** @type {
|
|
5884
|
-
jspb.Message.getFieldWithDefault(this, 2,
|
|
5956
|
+
/** @type {!proto.aggregator.ExecutionStatus} */
|
|
5957
|
+
jspb.Message.getFieldWithDefault(this, 2, 0)
|
|
5885
5958
|
);
|
|
5886
5959
|
};
|
|
5887
|
-
proto.aggregator.UserTriggerTaskResp.prototype.
|
|
5888
|
-
return jspb.Message.
|
|
5960
|
+
proto.aggregator.UserTriggerTaskResp.prototype.setStatus = function(value) {
|
|
5961
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
5889
5962
|
};
|
|
5890
5963
|
proto.aggregator.Error = {
|
|
5891
5964
|
UNKNOWERROR: 0,
|
|
@@ -5895,7 +5968,8 @@ var require_avs_pb = __commonJS({
|
|
|
5895
5968
|
SMARTWALLETRPCERROR: 6e3,
|
|
5896
5969
|
SMARTWALLETNOTFOUNDERROR: 6001,
|
|
5897
5970
|
TASKDATACORRUPTED: 7e3,
|
|
5898
|
-
TASKDATAMISSINGERROR: 7001
|
|
5971
|
+
TASKDATAMISSINGERROR: 7001,
|
|
5972
|
+
TASKTRIGGERERROR: 7003
|
|
5899
5973
|
};
|
|
5900
5974
|
proto.aggregator.TaskStatus = {
|
|
5901
5975
|
ACTIVE: 0,
|
|
@@ -5904,6 +5978,10 @@ var require_avs_pb = __commonJS({
|
|
|
5904
5978
|
CANCELED: 3,
|
|
5905
5979
|
EXECUTING: 4
|
|
5906
5980
|
};
|
|
5981
|
+
proto.aggregator.ExecutionStatus = {
|
|
5982
|
+
QUEUED: 0,
|
|
5983
|
+
FINISHED: 2
|
|
5984
|
+
};
|
|
5907
5985
|
proto.aggregator.CustomCodeLang = {
|
|
5908
5986
|
JAVASCRIPT: 0
|
|
5909
5987
|
};
|
|
@@ -5916,187 +5994,196 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
5916
5994
|
"../../grpc_codegen/avs_grpc_pb.js"(exports2) {
|
|
5917
5995
|
"use strict";
|
|
5918
5996
|
var grpc2 = require("@grpc/grpc-js");
|
|
5919
|
-
var
|
|
5997
|
+
var avs_pb20 = require_avs_pb();
|
|
5920
5998
|
var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js");
|
|
5921
5999
|
function serialize_aggregator_CreateTaskReq(arg) {
|
|
5922
|
-
if (!(arg instanceof
|
|
6000
|
+
if (!(arg instanceof avs_pb20.CreateTaskReq)) {
|
|
5923
6001
|
throw new Error("Expected argument of type aggregator.CreateTaskReq");
|
|
5924
6002
|
}
|
|
5925
6003
|
return Buffer.from(arg.serializeBinary());
|
|
5926
6004
|
}
|
|
5927
6005
|
function deserialize_aggregator_CreateTaskReq(buffer_arg) {
|
|
5928
|
-
return
|
|
6006
|
+
return avs_pb20.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5929
6007
|
}
|
|
5930
6008
|
function serialize_aggregator_CreateTaskResp(arg) {
|
|
5931
|
-
if (!(arg instanceof
|
|
6009
|
+
if (!(arg instanceof avs_pb20.CreateTaskResp)) {
|
|
5932
6010
|
throw new Error("Expected argument of type aggregator.CreateTaskResp");
|
|
5933
6011
|
}
|
|
5934
6012
|
return Buffer.from(arg.serializeBinary());
|
|
5935
6013
|
}
|
|
5936
6014
|
function deserialize_aggregator_CreateTaskResp(buffer_arg) {
|
|
5937
|
-
return
|
|
6015
|
+
return avs_pb20.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5938
6016
|
}
|
|
5939
6017
|
function serialize_aggregator_Execution(arg) {
|
|
5940
|
-
if (!(arg instanceof
|
|
6018
|
+
if (!(arg instanceof avs_pb20.Execution)) {
|
|
5941
6019
|
throw new Error("Expected argument of type aggregator.Execution");
|
|
5942
6020
|
}
|
|
5943
6021
|
return Buffer.from(arg.serializeBinary());
|
|
5944
6022
|
}
|
|
5945
6023
|
function deserialize_aggregator_Execution(buffer_arg) {
|
|
5946
|
-
return
|
|
6024
|
+
return avs_pb20.Execution.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6025
|
+
}
|
|
6026
|
+
function serialize_aggregator_ExecutionReq(arg) {
|
|
6027
|
+
if (!(arg instanceof avs_pb20.ExecutionReq)) {
|
|
6028
|
+
throw new Error("Expected argument of type aggregator.ExecutionReq");
|
|
6029
|
+
}
|
|
6030
|
+
return Buffer.from(arg.serializeBinary());
|
|
6031
|
+
}
|
|
6032
|
+
function deserialize_aggregator_ExecutionReq(buffer_arg) {
|
|
6033
|
+
return avs_pb20.ExecutionReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5947
6034
|
}
|
|
5948
|
-
function
|
|
5949
|
-
if (!(arg instanceof
|
|
5950
|
-
throw new Error("Expected argument of type aggregator.
|
|
6035
|
+
function serialize_aggregator_ExecutionStatusResp(arg) {
|
|
6036
|
+
if (!(arg instanceof avs_pb20.ExecutionStatusResp)) {
|
|
6037
|
+
throw new Error("Expected argument of type aggregator.ExecutionStatusResp");
|
|
5951
6038
|
}
|
|
5952
6039
|
return Buffer.from(arg.serializeBinary());
|
|
5953
6040
|
}
|
|
5954
|
-
function
|
|
5955
|
-
return
|
|
6041
|
+
function deserialize_aggregator_ExecutionStatusResp(buffer_arg) {
|
|
6042
|
+
return avs_pb20.ExecutionStatusResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5956
6043
|
}
|
|
5957
6044
|
function serialize_aggregator_GetKeyReq(arg) {
|
|
5958
|
-
if (!(arg instanceof
|
|
6045
|
+
if (!(arg instanceof avs_pb20.GetKeyReq)) {
|
|
5959
6046
|
throw new Error("Expected argument of type aggregator.GetKeyReq");
|
|
5960
6047
|
}
|
|
5961
6048
|
return Buffer.from(arg.serializeBinary());
|
|
5962
6049
|
}
|
|
5963
6050
|
function deserialize_aggregator_GetKeyReq(buffer_arg) {
|
|
5964
|
-
return
|
|
6051
|
+
return avs_pb20.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5965
6052
|
}
|
|
5966
6053
|
function serialize_aggregator_GetWalletReq(arg) {
|
|
5967
|
-
if (!(arg instanceof
|
|
6054
|
+
if (!(arg instanceof avs_pb20.GetWalletReq)) {
|
|
5968
6055
|
throw new Error("Expected argument of type aggregator.GetWalletReq");
|
|
5969
6056
|
}
|
|
5970
6057
|
return Buffer.from(arg.serializeBinary());
|
|
5971
6058
|
}
|
|
5972
6059
|
function deserialize_aggregator_GetWalletReq(buffer_arg) {
|
|
5973
|
-
return
|
|
6060
|
+
return avs_pb20.GetWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5974
6061
|
}
|
|
5975
6062
|
function serialize_aggregator_GetWalletResp(arg) {
|
|
5976
|
-
if (!(arg instanceof
|
|
6063
|
+
if (!(arg instanceof avs_pb20.GetWalletResp)) {
|
|
5977
6064
|
throw new Error("Expected argument of type aggregator.GetWalletResp");
|
|
5978
6065
|
}
|
|
5979
6066
|
return Buffer.from(arg.serializeBinary());
|
|
5980
6067
|
}
|
|
5981
6068
|
function deserialize_aggregator_GetWalletResp(buffer_arg) {
|
|
5982
|
-
return
|
|
6069
|
+
return avs_pb20.GetWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5983
6070
|
}
|
|
5984
6071
|
function serialize_aggregator_IdReq(arg) {
|
|
5985
|
-
if (!(arg instanceof
|
|
6072
|
+
if (!(arg instanceof avs_pb20.IdReq)) {
|
|
5986
6073
|
throw new Error("Expected argument of type aggregator.IdReq");
|
|
5987
6074
|
}
|
|
5988
6075
|
return Buffer.from(arg.serializeBinary());
|
|
5989
6076
|
}
|
|
5990
6077
|
function deserialize_aggregator_IdReq(buffer_arg) {
|
|
5991
|
-
return
|
|
6078
|
+
return avs_pb20.IdReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5992
6079
|
}
|
|
5993
6080
|
function serialize_aggregator_KeyResp(arg) {
|
|
5994
|
-
if (!(arg instanceof
|
|
6081
|
+
if (!(arg instanceof avs_pb20.KeyResp)) {
|
|
5995
6082
|
throw new Error("Expected argument of type aggregator.KeyResp");
|
|
5996
6083
|
}
|
|
5997
6084
|
return Buffer.from(arg.serializeBinary());
|
|
5998
6085
|
}
|
|
5999
6086
|
function deserialize_aggregator_KeyResp(buffer_arg) {
|
|
6000
|
-
return
|
|
6087
|
+
return avs_pb20.KeyResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6001
6088
|
}
|
|
6002
6089
|
function serialize_aggregator_ListExecutionsReq(arg) {
|
|
6003
|
-
if (!(arg instanceof
|
|
6090
|
+
if (!(arg instanceof avs_pb20.ListExecutionsReq)) {
|
|
6004
6091
|
throw new Error("Expected argument of type aggregator.ListExecutionsReq");
|
|
6005
6092
|
}
|
|
6006
6093
|
return Buffer.from(arg.serializeBinary());
|
|
6007
6094
|
}
|
|
6008
6095
|
function deserialize_aggregator_ListExecutionsReq(buffer_arg) {
|
|
6009
|
-
return
|
|
6096
|
+
return avs_pb20.ListExecutionsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6010
6097
|
}
|
|
6011
6098
|
function serialize_aggregator_ListExecutionsResp(arg) {
|
|
6012
|
-
if (!(arg instanceof
|
|
6099
|
+
if (!(arg instanceof avs_pb20.ListExecutionsResp)) {
|
|
6013
6100
|
throw new Error("Expected argument of type aggregator.ListExecutionsResp");
|
|
6014
6101
|
}
|
|
6015
6102
|
return Buffer.from(arg.serializeBinary());
|
|
6016
6103
|
}
|
|
6017
6104
|
function deserialize_aggregator_ListExecutionsResp(buffer_arg) {
|
|
6018
|
-
return
|
|
6105
|
+
return avs_pb20.ListExecutionsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6019
6106
|
}
|
|
6020
6107
|
function serialize_aggregator_ListTasksReq(arg) {
|
|
6021
|
-
if (!(arg instanceof
|
|
6108
|
+
if (!(arg instanceof avs_pb20.ListTasksReq)) {
|
|
6022
6109
|
throw new Error("Expected argument of type aggregator.ListTasksReq");
|
|
6023
6110
|
}
|
|
6024
6111
|
return Buffer.from(arg.serializeBinary());
|
|
6025
6112
|
}
|
|
6026
6113
|
function deserialize_aggregator_ListTasksReq(buffer_arg) {
|
|
6027
|
-
return
|
|
6114
|
+
return avs_pb20.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6028
6115
|
}
|
|
6029
6116
|
function serialize_aggregator_ListTasksResp(arg) {
|
|
6030
|
-
if (!(arg instanceof
|
|
6117
|
+
if (!(arg instanceof avs_pb20.ListTasksResp)) {
|
|
6031
6118
|
throw new Error("Expected argument of type aggregator.ListTasksResp");
|
|
6032
6119
|
}
|
|
6033
6120
|
return Buffer.from(arg.serializeBinary());
|
|
6034
6121
|
}
|
|
6035
6122
|
function deserialize_aggregator_ListTasksResp(buffer_arg) {
|
|
6036
|
-
return
|
|
6123
|
+
return avs_pb20.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6037
6124
|
}
|
|
6038
6125
|
function serialize_aggregator_ListWalletReq(arg) {
|
|
6039
|
-
if (!(arg instanceof
|
|
6126
|
+
if (!(arg instanceof avs_pb20.ListWalletReq)) {
|
|
6040
6127
|
throw new Error("Expected argument of type aggregator.ListWalletReq");
|
|
6041
6128
|
}
|
|
6042
6129
|
return Buffer.from(arg.serializeBinary());
|
|
6043
6130
|
}
|
|
6044
6131
|
function deserialize_aggregator_ListWalletReq(buffer_arg) {
|
|
6045
|
-
return
|
|
6132
|
+
return avs_pb20.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6046
6133
|
}
|
|
6047
6134
|
function serialize_aggregator_ListWalletResp(arg) {
|
|
6048
|
-
if (!(arg instanceof
|
|
6135
|
+
if (!(arg instanceof avs_pb20.ListWalletResp)) {
|
|
6049
6136
|
throw new Error("Expected argument of type aggregator.ListWalletResp");
|
|
6050
6137
|
}
|
|
6051
6138
|
return Buffer.from(arg.serializeBinary());
|
|
6052
6139
|
}
|
|
6053
6140
|
function deserialize_aggregator_ListWalletResp(buffer_arg) {
|
|
6054
|
-
return
|
|
6141
|
+
return avs_pb20.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6055
6142
|
}
|
|
6056
6143
|
function serialize_aggregator_NonceRequest(arg) {
|
|
6057
|
-
if (!(arg instanceof
|
|
6144
|
+
if (!(arg instanceof avs_pb20.NonceRequest)) {
|
|
6058
6145
|
throw new Error("Expected argument of type aggregator.NonceRequest");
|
|
6059
6146
|
}
|
|
6060
6147
|
return Buffer.from(arg.serializeBinary());
|
|
6061
6148
|
}
|
|
6062
6149
|
function deserialize_aggregator_NonceRequest(buffer_arg) {
|
|
6063
|
-
return
|
|
6150
|
+
return avs_pb20.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6064
6151
|
}
|
|
6065
6152
|
function serialize_aggregator_NonceResp(arg) {
|
|
6066
|
-
if (!(arg instanceof
|
|
6153
|
+
if (!(arg instanceof avs_pb20.NonceResp)) {
|
|
6067
6154
|
throw new Error("Expected argument of type aggregator.NonceResp");
|
|
6068
6155
|
}
|
|
6069
6156
|
return Buffer.from(arg.serializeBinary());
|
|
6070
6157
|
}
|
|
6071
6158
|
function deserialize_aggregator_NonceResp(buffer_arg) {
|
|
6072
|
-
return
|
|
6159
|
+
return avs_pb20.NonceResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6073
6160
|
}
|
|
6074
6161
|
function serialize_aggregator_Task(arg) {
|
|
6075
|
-
if (!(arg instanceof
|
|
6162
|
+
if (!(arg instanceof avs_pb20.Task)) {
|
|
6076
6163
|
throw new Error("Expected argument of type aggregator.Task");
|
|
6077
6164
|
}
|
|
6078
6165
|
return Buffer.from(arg.serializeBinary());
|
|
6079
6166
|
}
|
|
6080
6167
|
function deserialize_aggregator_Task(buffer_arg) {
|
|
6081
|
-
return
|
|
6168
|
+
return avs_pb20.Task.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6082
6169
|
}
|
|
6083
6170
|
function serialize_aggregator_UserTriggerTaskReq(arg) {
|
|
6084
|
-
if (!(arg instanceof
|
|
6171
|
+
if (!(arg instanceof avs_pb20.UserTriggerTaskReq)) {
|
|
6085
6172
|
throw new Error("Expected argument of type aggregator.UserTriggerTaskReq");
|
|
6086
6173
|
}
|
|
6087
6174
|
return Buffer.from(arg.serializeBinary());
|
|
6088
6175
|
}
|
|
6089
6176
|
function deserialize_aggregator_UserTriggerTaskReq(buffer_arg) {
|
|
6090
|
-
return
|
|
6177
|
+
return avs_pb20.UserTriggerTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6091
6178
|
}
|
|
6092
6179
|
function serialize_aggregator_UserTriggerTaskResp(arg) {
|
|
6093
|
-
if (!(arg instanceof
|
|
6180
|
+
if (!(arg instanceof avs_pb20.UserTriggerTaskResp)) {
|
|
6094
6181
|
throw new Error("Expected argument of type aggregator.UserTriggerTaskResp");
|
|
6095
6182
|
}
|
|
6096
6183
|
return Buffer.from(arg.serializeBinary());
|
|
6097
6184
|
}
|
|
6098
6185
|
function deserialize_aggregator_UserTriggerTaskResp(buffer_arg) {
|
|
6099
|
-
return
|
|
6186
|
+
return avs_pb20.UserTriggerTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6100
6187
|
}
|
|
6101
6188
|
function serialize_google_protobuf_BoolValue(arg) {
|
|
6102
6189
|
if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) {
|
|
@@ -6113,8 +6200,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6113
6200
|
path: "/aggregator.Aggregator/GetKey",
|
|
6114
6201
|
requestStream: false,
|
|
6115
6202
|
responseStream: false,
|
|
6116
|
-
requestType:
|
|
6117
|
-
responseType:
|
|
6203
|
+
requestType: avs_pb20.GetKeyReq,
|
|
6204
|
+
responseType: avs_pb20.KeyResp,
|
|
6118
6205
|
requestSerialize: serialize_aggregator_GetKeyReq,
|
|
6119
6206
|
requestDeserialize: deserialize_aggregator_GetKeyReq,
|
|
6120
6207
|
responseSerialize: serialize_aggregator_KeyResp,
|
|
@@ -6125,8 +6212,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6125
6212
|
path: "/aggregator.Aggregator/GetNonce",
|
|
6126
6213
|
requestStream: false,
|
|
6127
6214
|
responseStream: false,
|
|
6128
|
-
requestType:
|
|
6129
|
-
responseType:
|
|
6215
|
+
requestType: avs_pb20.NonceRequest,
|
|
6216
|
+
responseType: avs_pb20.NonceResp,
|
|
6130
6217
|
requestSerialize: serialize_aggregator_NonceRequest,
|
|
6131
6218
|
requestDeserialize: deserialize_aggregator_NonceRequest,
|
|
6132
6219
|
responseSerialize: serialize_aggregator_NonceResp,
|
|
@@ -6136,8 +6223,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6136
6223
|
path: "/aggregator.Aggregator/GetWallet",
|
|
6137
6224
|
requestStream: false,
|
|
6138
6225
|
responseStream: false,
|
|
6139
|
-
requestType:
|
|
6140
|
-
responseType:
|
|
6226
|
+
requestType: avs_pb20.GetWalletReq,
|
|
6227
|
+
responseType: avs_pb20.GetWalletResp,
|
|
6141
6228
|
requestSerialize: serialize_aggregator_GetWalletReq,
|
|
6142
6229
|
requestDeserialize: deserialize_aggregator_GetWalletReq,
|
|
6143
6230
|
responseSerialize: serialize_aggregator_GetWalletResp,
|
|
@@ -6147,8 +6234,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6147
6234
|
path: "/aggregator.Aggregator/ListWallets",
|
|
6148
6235
|
requestStream: false,
|
|
6149
6236
|
responseStream: false,
|
|
6150
|
-
requestType:
|
|
6151
|
-
responseType:
|
|
6237
|
+
requestType: avs_pb20.ListWalletReq,
|
|
6238
|
+
responseType: avs_pb20.ListWalletResp,
|
|
6152
6239
|
requestSerialize: serialize_aggregator_ListWalletReq,
|
|
6153
6240
|
requestDeserialize: deserialize_aggregator_ListWalletReq,
|
|
6154
6241
|
responseSerialize: serialize_aggregator_ListWalletResp,
|
|
@@ -6159,8 +6246,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6159
6246
|
path: "/aggregator.Aggregator/CreateTask",
|
|
6160
6247
|
requestStream: false,
|
|
6161
6248
|
responseStream: false,
|
|
6162
|
-
requestType:
|
|
6163
|
-
responseType:
|
|
6249
|
+
requestType: avs_pb20.CreateTaskReq,
|
|
6250
|
+
responseType: avs_pb20.CreateTaskResp,
|
|
6164
6251
|
requestSerialize: serialize_aggregator_CreateTaskReq,
|
|
6165
6252
|
requestDeserialize: deserialize_aggregator_CreateTaskReq,
|
|
6166
6253
|
responseSerialize: serialize_aggregator_CreateTaskResp,
|
|
@@ -6170,8 +6257,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6170
6257
|
path: "/aggregator.Aggregator/ListTasks",
|
|
6171
6258
|
requestStream: false,
|
|
6172
6259
|
responseStream: false,
|
|
6173
|
-
requestType:
|
|
6174
|
-
responseType:
|
|
6260
|
+
requestType: avs_pb20.ListTasksReq,
|
|
6261
|
+
responseType: avs_pb20.ListTasksResp,
|
|
6175
6262
|
requestSerialize: serialize_aggregator_ListTasksReq,
|
|
6176
6263
|
requestDeserialize: deserialize_aggregator_ListTasksReq,
|
|
6177
6264
|
responseSerialize: serialize_aggregator_ListTasksResp,
|
|
@@ -6181,8 +6268,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6181
6268
|
path: "/aggregator.Aggregator/GetTask",
|
|
6182
6269
|
requestStream: false,
|
|
6183
6270
|
responseStream: false,
|
|
6184
|
-
requestType:
|
|
6185
|
-
responseType:
|
|
6271
|
+
requestType: avs_pb20.IdReq,
|
|
6272
|
+
responseType: avs_pb20.Task,
|
|
6186
6273
|
requestSerialize: serialize_aggregator_IdReq,
|
|
6187
6274
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
6188
6275
|
responseSerialize: serialize_aggregator_Task,
|
|
@@ -6192,8 +6279,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6192
6279
|
path: "/aggregator.Aggregator/ListExecutions",
|
|
6193
6280
|
requestStream: false,
|
|
6194
6281
|
responseStream: false,
|
|
6195
|
-
requestType:
|
|
6196
|
-
responseType:
|
|
6282
|
+
requestType: avs_pb20.ListExecutionsReq,
|
|
6283
|
+
responseType: avs_pb20.ListExecutionsResp,
|
|
6197
6284
|
requestSerialize: serialize_aggregator_ListExecutionsReq,
|
|
6198
6285
|
requestDeserialize: deserialize_aggregator_ListExecutionsReq,
|
|
6199
6286
|
responseSerialize: serialize_aggregator_ListExecutionsResp,
|
|
@@ -6203,18 +6290,29 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6203
6290
|
path: "/aggregator.Aggregator/GetExecution",
|
|
6204
6291
|
requestStream: false,
|
|
6205
6292
|
responseStream: false,
|
|
6206
|
-
requestType:
|
|
6207
|
-
responseType:
|
|
6208
|
-
requestSerialize:
|
|
6209
|
-
requestDeserialize:
|
|
6293
|
+
requestType: avs_pb20.ExecutionReq,
|
|
6294
|
+
responseType: avs_pb20.Execution,
|
|
6295
|
+
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
6296
|
+
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
6210
6297
|
responseSerialize: serialize_aggregator_Execution,
|
|
6211
6298
|
responseDeserialize: deserialize_aggregator_Execution
|
|
6212
6299
|
},
|
|
6300
|
+
getExecutionStatus: {
|
|
6301
|
+
path: "/aggregator.Aggregator/GetExecutionStatus",
|
|
6302
|
+
requestStream: false,
|
|
6303
|
+
responseStream: false,
|
|
6304
|
+
requestType: avs_pb20.ExecutionReq,
|
|
6305
|
+
responseType: avs_pb20.ExecutionStatusResp,
|
|
6306
|
+
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
6307
|
+
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
6308
|
+
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
6309
|
+
responseDeserialize: deserialize_aggregator_ExecutionStatusResp
|
|
6310
|
+
},
|
|
6213
6311
|
cancelTask: {
|
|
6214
6312
|
path: "/aggregator.Aggregator/CancelTask",
|
|
6215
6313
|
requestStream: false,
|
|
6216
6314
|
responseStream: false,
|
|
6217
|
-
requestType:
|
|
6315
|
+
requestType: avs_pb20.IdReq,
|
|
6218
6316
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
6219
6317
|
requestSerialize: serialize_aggregator_IdReq,
|
|
6220
6318
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -6225,7 +6323,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6225
6323
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
6226
6324
|
requestStream: false,
|
|
6227
6325
|
responseStream: false,
|
|
6228
|
-
requestType:
|
|
6326
|
+
requestType: avs_pb20.IdReq,
|
|
6229
6327
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
6230
6328
|
requestSerialize: serialize_aggregator_IdReq,
|
|
6231
6329
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -6236,8 +6334,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6236
6334
|
path: "/aggregator.Aggregator/TriggerTask",
|
|
6237
6335
|
requestStream: false,
|
|
6238
6336
|
responseStream: false,
|
|
6239
|
-
requestType:
|
|
6240
|
-
responseType:
|
|
6337
|
+
requestType: avs_pb20.UserTriggerTaskReq,
|
|
6338
|
+
responseType: avs_pb20.UserTriggerTaskResp,
|
|
6241
6339
|
requestSerialize: serialize_aggregator_UserTriggerTaskReq,
|
|
6242
6340
|
requestDeserialize: deserialize_aggregator_UserTriggerTaskReq,
|
|
6243
6341
|
responseSerialize: serialize_aggregator_UserTriggerTaskResp,
|
|
@@ -6264,11 +6362,11 @@ __export(index_exports, {
|
|
|
6264
6362
|
Edge: () => edge_default,
|
|
6265
6363
|
EventTrigger: () => event_default,
|
|
6266
6364
|
Execution: () => execution_default,
|
|
6365
|
+
ExecutionStatus: () => ExecutionStatus2,
|
|
6267
6366
|
FixedTimeTrigger: () => fixedTime_default,
|
|
6268
6367
|
GraphQLQueryNode: () => graphqlQuery_default,
|
|
6269
6368
|
Node: () => interface_default2,
|
|
6270
6369
|
NodeFactory: () => factory_default2,
|
|
6271
|
-
NodeTypes: () => NodeTypes,
|
|
6272
6370
|
RestAPINode: () => restApi_default,
|
|
6273
6371
|
Trigger: () => interface_default,
|
|
6274
6372
|
TriggerFactory: () => factory_default,
|
|
@@ -6290,11 +6388,11 @@ var getKeyRequestMessage = (address, expiredAt) => {
|
|
|
6290
6388
|
|
|
6291
6389
|
// src/index.ts
|
|
6292
6390
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
6293
|
-
var
|
|
6391
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
6294
6392
|
|
|
6295
6393
|
// src/models/workflow.ts
|
|
6296
6394
|
var import_lodash3 = __toESM(require("lodash"));
|
|
6297
|
-
var
|
|
6395
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
6298
6396
|
|
|
6299
6397
|
// src/models/edge.ts
|
|
6300
6398
|
var avs_pb = __toESM(require_avs_pb());
|
|
@@ -6318,7 +6416,7 @@ var Edge = class _Edge {
|
|
|
6318
6416
|
var edge_default = Edge;
|
|
6319
6417
|
|
|
6320
6418
|
// src/models/trigger/block.ts
|
|
6321
|
-
var
|
|
6419
|
+
var avs_pb3 = __toESM(require_avs_pb());
|
|
6322
6420
|
|
|
6323
6421
|
// src/models/trigger/interface.ts
|
|
6324
6422
|
var Trigger = class {
|
|
@@ -6338,6 +6436,7 @@ var Trigger = class {
|
|
|
6338
6436
|
var interface_default = Trigger;
|
|
6339
6437
|
|
|
6340
6438
|
// src/types.ts
|
|
6439
|
+
var avs_pb2 = __toESM(require_avs_pb());
|
|
6341
6440
|
var AUTH_KEY_HEADER = "authkey";
|
|
6342
6441
|
var DEFAULT_LIMIT = 10;
|
|
6343
6442
|
var WorkflowStatus = /* @__PURE__ */ ((WorkflowStatus2) => {
|
|
@@ -6357,6 +6456,7 @@ var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
|
|
|
6357
6456
|
TriggerType2["Unset"] = "unset";
|
|
6358
6457
|
return TriggerType2;
|
|
6359
6458
|
})(TriggerType || {});
|
|
6459
|
+
var ExecutionStatus2 = avs_pb2.ExecutionStatus;
|
|
6360
6460
|
|
|
6361
6461
|
// src/models/trigger/block.ts
|
|
6362
6462
|
var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
@@ -6364,12 +6464,12 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6364
6464
|
super({ ...props, type: "block" /* Block */, data: props.data });
|
|
6365
6465
|
}
|
|
6366
6466
|
toRequest() {
|
|
6367
|
-
const request = new
|
|
6467
|
+
const request = new avs_pb3.TaskTrigger();
|
|
6368
6468
|
request.setName(this.name);
|
|
6369
6469
|
if (!this.data) {
|
|
6370
6470
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6371
6471
|
}
|
|
6372
|
-
const condition = new
|
|
6472
|
+
const condition = new avs_pb3.BlockCondition();
|
|
6373
6473
|
condition.setInterval(this.data.interval);
|
|
6374
6474
|
request.setBlock(condition);
|
|
6375
6475
|
return request;
|
|
@@ -6386,7 +6486,7 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6386
6486
|
var block_default = BlockTrigger;
|
|
6387
6487
|
|
|
6388
6488
|
// src/models/trigger/cron.ts
|
|
6389
|
-
var
|
|
6489
|
+
var avs_pb4 = __toESM(require_avs_pb());
|
|
6390
6490
|
var CronTrigger = class _CronTrigger extends interface_default {
|
|
6391
6491
|
constructor(props) {
|
|
6392
6492
|
super({ ...props, type: "cron" /* Cron */, data: props.data });
|
|
@@ -6397,12 +6497,12 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6397
6497
|
});
|
|
6398
6498
|
}
|
|
6399
6499
|
toRequest() {
|
|
6400
|
-
const request = new
|
|
6500
|
+
const request = new avs_pb4.TaskTrigger();
|
|
6401
6501
|
request.setName(this.name);
|
|
6402
6502
|
if (!this.data) {
|
|
6403
6503
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6404
6504
|
}
|
|
6405
|
-
const condition = new
|
|
6505
|
+
const condition = new avs_pb4.CronCondition();
|
|
6406
6506
|
condition.setScheduleList(this.data.scheduleList);
|
|
6407
6507
|
request.setCron(condition);
|
|
6408
6508
|
console.log("CronTrigger.toRequest.request:", request.toObject());
|
|
@@ -6421,7 +6521,7 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6421
6521
|
var cron_default = CronTrigger;
|
|
6422
6522
|
|
|
6423
6523
|
// src/models/trigger/event.ts
|
|
6424
|
-
var
|
|
6524
|
+
var avs_pb5 = __toESM(require_avs_pb());
|
|
6425
6525
|
var EventTrigger = class _EventTrigger extends interface_default {
|
|
6426
6526
|
constructor(props) {
|
|
6427
6527
|
super({ ...props, type: "event" /* Event */, data: props.data });
|
|
@@ -6432,12 +6532,12 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6432
6532
|
});
|
|
6433
6533
|
}
|
|
6434
6534
|
toRequest() {
|
|
6435
|
-
const request = new
|
|
6535
|
+
const request = new avs_pb5.TaskTrigger();
|
|
6436
6536
|
request.setName(this.name);
|
|
6437
6537
|
if (!this.data) {
|
|
6438
6538
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6439
6539
|
}
|
|
6440
|
-
const condition = new
|
|
6540
|
+
const condition = new avs_pb5.EventCondition();
|
|
6441
6541
|
condition.setExpression(this.data.expression);
|
|
6442
6542
|
request.setEvent(condition);
|
|
6443
6543
|
console.log("EventTrigger.toRequest.request:", request.toObject());
|
|
@@ -6456,7 +6556,7 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6456
6556
|
var event_default = EventTrigger;
|
|
6457
6557
|
|
|
6458
6558
|
// src/models/trigger/fixedTime.ts
|
|
6459
|
-
var
|
|
6559
|
+
var avs_pb6 = __toESM(require_avs_pb());
|
|
6460
6560
|
var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
6461
6561
|
constructor(props) {
|
|
6462
6562
|
super({ ...props, type: "fixed_time" /* FixedTime */, data: props.data });
|
|
@@ -6467,12 +6567,12 @@ var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
|
6467
6567
|
});
|
|
6468
6568
|
}
|
|
6469
6569
|
toRequest() {
|
|
6470
|
-
const request = new
|
|
6570
|
+
const request = new avs_pb6.TaskTrigger();
|
|
6471
6571
|
request.setName(this.name);
|
|
6472
6572
|
if (!this.data) {
|
|
6473
6573
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6474
6574
|
}
|
|
6475
|
-
const condition = new
|
|
6575
|
+
const condition = new avs_pb6.FixedTimeCondition();
|
|
6476
6576
|
condition.setEpochsList(this.data.epochsList);
|
|
6477
6577
|
request.setFixedTime(condition);
|
|
6478
6578
|
console.log("FixedTimeTrigger.toRequest.request:", request.toObject());
|
|
@@ -6536,9 +6636,9 @@ var factory_default = TriggerFactory;
|
|
|
6536
6636
|
var import_lodash2 = __toESM(require("lodash"));
|
|
6537
6637
|
|
|
6538
6638
|
// src/models/node/interface.ts
|
|
6539
|
-
var
|
|
6639
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
6640
|
+
var import_types6 = require("@avaprotocol/types");
|
|
6540
6641
|
var import_lodash = __toESM(require("lodash"));
|
|
6541
|
-
var NodeTypes = avs_pb6.TaskNode.TaskTypeCase;
|
|
6542
6642
|
var Node = class {
|
|
6543
6643
|
constructor(props) {
|
|
6544
6644
|
this.id = props.id;
|
|
@@ -6547,10 +6647,9 @@ var Node = class {
|
|
|
6547
6647
|
this.data = props.data;
|
|
6548
6648
|
}
|
|
6549
6649
|
toRequest() {
|
|
6550
|
-
const request = new
|
|
6551
|
-
console.log("Node.toRequest.request:", request);
|
|
6650
|
+
const request = new avs_pb7.TaskNode();
|
|
6552
6651
|
const raw = request.serializeBinary();
|
|
6553
|
-
const parsed =
|
|
6652
|
+
const parsed = avs_pb7.TaskNode.deserializeBinary(raw);
|
|
6554
6653
|
if (!import_lodash.default.isEqual(request, parsed)) {
|
|
6555
6654
|
throw new Error("Invalid request object");
|
|
6556
6655
|
}
|
|
@@ -6560,24 +6659,25 @@ var Node = class {
|
|
|
6560
6659
|
var interface_default2 = Node;
|
|
6561
6660
|
|
|
6562
6661
|
// src/models/node/contractWrite.ts
|
|
6563
|
-
var
|
|
6662
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
6663
|
+
var import_types7 = require("@avaprotocol/types");
|
|
6564
6664
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
6565
6665
|
constructor(props) {
|
|
6566
|
-
super({ ...props, type:
|
|
6666
|
+
super({ ...props, type: import_types7.NodeType.ContractWrite, data: props.data });
|
|
6567
6667
|
}
|
|
6568
6668
|
static fromResponse(raw) {
|
|
6569
6669
|
const obj = raw.toObject();
|
|
6570
6670
|
return new _ContractWriteNode({
|
|
6571
6671
|
...obj,
|
|
6572
|
-
type:
|
|
6672
|
+
type: import_types7.NodeType.ContractWrite,
|
|
6573
6673
|
data: raw.getContractWrite().toObject()
|
|
6574
6674
|
});
|
|
6575
6675
|
}
|
|
6576
6676
|
toRequest() {
|
|
6577
|
-
const request = new
|
|
6677
|
+
const request = new avs_pb8.TaskNode();
|
|
6578
6678
|
request.setId(this.id);
|
|
6579
6679
|
request.setName(this.name);
|
|
6580
|
-
const nodeData = new
|
|
6680
|
+
const nodeData = new avs_pb8.ContractWriteNode();
|
|
6581
6681
|
nodeData.setContractAddress(
|
|
6582
6682
|
this.data.contractAddress
|
|
6583
6683
|
);
|
|
@@ -6590,25 +6690,26 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
6590
6690
|
var contractWrite_default = ContractWriteNode2;
|
|
6591
6691
|
|
|
6592
6692
|
// src/models/node/customCode.ts
|
|
6593
|
-
var
|
|
6594
|
-
var
|
|
6693
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
6694
|
+
var import_types8 = require("@avaprotocol/types");
|
|
6695
|
+
var CustomCodeLangs = avs_pb9.CustomCodeLang;
|
|
6595
6696
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
6596
6697
|
constructor(props) {
|
|
6597
|
-
super({ ...props, type:
|
|
6698
|
+
super({ ...props, type: import_types8.NodeType.CustomCode, data: props.data });
|
|
6598
6699
|
}
|
|
6599
6700
|
static fromResponse(raw) {
|
|
6600
6701
|
const obj = raw.toObject();
|
|
6601
6702
|
return new _CustomCodeNode({
|
|
6602
6703
|
...obj,
|
|
6603
|
-
type:
|
|
6704
|
+
type: import_types8.NodeType.CustomCode,
|
|
6604
6705
|
data: raw.getCustomCode().toObject()
|
|
6605
6706
|
});
|
|
6606
6707
|
}
|
|
6607
6708
|
toRequest() {
|
|
6608
|
-
const request = new
|
|
6709
|
+
const request = new avs_pb9.TaskNode();
|
|
6609
6710
|
request.setId(this.id);
|
|
6610
6711
|
request.setName(this.name);
|
|
6611
|
-
const nodeData = new
|
|
6712
|
+
const nodeData = new avs_pb9.CustomCodeNode();
|
|
6612
6713
|
nodeData.setLang(this.data.lang);
|
|
6613
6714
|
nodeData.setSource(this.data.source);
|
|
6614
6715
|
request.setCustomCode(nodeData);
|
|
@@ -6618,12 +6719,13 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
6618
6719
|
var customCode_default = CustomCodeNode2;
|
|
6619
6720
|
|
|
6620
6721
|
// src/models/node/graphqlQuery.ts
|
|
6621
|
-
var
|
|
6722
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
6723
|
+
var import_types9 = require("@avaprotocol/types");
|
|
6622
6724
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
6623
6725
|
constructor(props) {
|
|
6624
6726
|
super({
|
|
6625
6727
|
...props,
|
|
6626
|
-
type:
|
|
6728
|
+
type: import_types9.NodeType.GraphQLQuery,
|
|
6627
6729
|
data: props.data
|
|
6628
6730
|
});
|
|
6629
6731
|
}
|
|
@@ -6631,15 +6733,15 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6631
6733
|
const obj = raw.toObject();
|
|
6632
6734
|
return new _GraphQLQueryNode({
|
|
6633
6735
|
...obj,
|
|
6634
|
-
type:
|
|
6736
|
+
type: import_types9.NodeType.GraphQLQuery,
|
|
6635
6737
|
data: raw.getGraphqlQuery().toObject()
|
|
6636
6738
|
});
|
|
6637
6739
|
}
|
|
6638
6740
|
toRequest() {
|
|
6639
|
-
const request = new
|
|
6741
|
+
const request = new avs_pb10.TaskNode();
|
|
6640
6742
|
request.setId(this.id);
|
|
6641
6743
|
request.setName(this.name);
|
|
6642
|
-
const nodeData = new
|
|
6744
|
+
const nodeData = new avs_pb10.GraphQLQueryNode();
|
|
6643
6745
|
nodeData.setUrl(this.data.url);
|
|
6644
6746
|
nodeData.setQuery(this.data.query);
|
|
6645
6747
|
const variables = this.data.variablesMap;
|
|
@@ -6654,24 +6756,25 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6654
6756
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
6655
6757
|
|
|
6656
6758
|
// src/models/node/restApi.ts
|
|
6657
|
-
var
|
|
6759
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
6760
|
+
var import_types10 = require("@avaprotocol/types");
|
|
6658
6761
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
6659
6762
|
constructor(props) {
|
|
6660
|
-
super({ ...props, type:
|
|
6763
|
+
super({ ...props, type: import_types10.NodeType.RestAPI, data: props.data });
|
|
6661
6764
|
}
|
|
6662
6765
|
static fromResponse(raw) {
|
|
6663
6766
|
const obj = raw.toObject();
|
|
6664
6767
|
return new _RestAPINode({
|
|
6665
6768
|
...obj,
|
|
6666
|
-
type:
|
|
6769
|
+
type: import_types10.NodeType.RestAPI,
|
|
6667
6770
|
data: raw.getRestApi().toObject()
|
|
6668
6771
|
});
|
|
6669
6772
|
}
|
|
6670
6773
|
toRequest() {
|
|
6671
|
-
const request = new
|
|
6774
|
+
const request = new avs_pb11.TaskNode();
|
|
6672
6775
|
request.setId(this.id);
|
|
6673
6776
|
request.setName(this.name);
|
|
6674
|
-
const nodeData = new
|
|
6777
|
+
const nodeData = new avs_pb11.RestAPINode();
|
|
6675
6778
|
nodeData.setUrl(this.data.url);
|
|
6676
6779
|
nodeData.setMethod(this.data.method);
|
|
6677
6780
|
nodeData.setBody(this.data.body);
|
|
@@ -6687,24 +6790,25 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6687
6790
|
var restApi_default = RestAPINode2;
|
|
6688
6791
|
|
|
6689
6792
|
// src/models/node/contractRead.ts
|
|
6690
|
-
var
|
|
6793
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
6794
|
+
var import_types11 = require("@avaprotocol/types");
|
|
6691
6795
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
6692
6796
|
constructor(props) {
|
|
6693
|
-
super({ ...props, type:
|
|
6797
|
+
super({ ...props, type: import_types11.NodeType.ContractRead, data: props.data });
|
|
6694
6798
|
}
|
|
6695
6799
|
static fromResponse(raw) {
|
|
6696
6800
|
const obj = raw.toObject();
|
|
6697
6801
|
return new _ContractReadNode({
|
|
6698
6802
|
...obj,
|
|
6699
|
-
type:
|
|
6803
|
+
type: import_types11.NodeType.ContractRead,
|
|
6700
6804
|
data: raw.getContractRead().toObject()
|
|
6701
6805
|
});
|
|
6702
6806
|
}
|
|
6703
6807
|
toRequest() {
|
|
6704
|
-
const request = new
|
|
6808
|
+
const request = new avs_pb12.TaskNode();
|
|
6705
6809
|
request.setId(this.id);
|
|
6706
6810
|
request.setName(this.name);
|
|
6707
|
-
const nodeData = new
|
|
6811
|
+
const nodeData = new avs_pb12.ContractReadNode();
|
|
6708
6812
|
nodeData.setContractAddress(
|
|
6709
6813
|
this.data.contractAddress
|
|
6710
6814
|
);
|
|
@@ -6718,24 +6822,25 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6718
6822
|
var contractRead_default = ContractReadNode2;
|
|
6719
6823
|
|
|
6720
6824
|
// src/models/node/ethTransfer.ts
|
|
6721
|
-
var
|
|
6825
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
6826
|
+
var import_types12 = require("@avaprotocol/types");
|
|
6722
6827
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
6723
6828
|
constructor(props) {
|
|
6724
|
-
super({ ...props, type:
|
|
6829
|
+
super({ ...props, type: import_types12.NodeType.ETHTransfer, data: props.data });
|
|
6725
6830
|
}
|
|
6726
6831
|
static fromResponse(raw) {
|
|
6727
6832
|
const obj = raw.toObject();
|
|
6728
6833
|
return new _ETHTransferNode({
|
|
6729
6834
|
...obj,
|
|
6730
|
-
type:
|
|
6835
|
+
type: import_types12.NodeType.ETHTransfer,
|
|
6731
6836
|
data: raw.getEthTransfer().toObject()
|
|
6732
6837
|
});
|
|
6733
6838
|
}
|
|
6734
6839
|
toRequest() {
|
|
6735
|
-
const request = new
|
|
6840
|
+
const request = new avs_pb13.TaskNode();
|
|
6736
6841
|
request.setId(this.id);
|
|
6737
6842
|
request.setName(this.name);
|
|
6738
|
-
const nodeData = new
|
|
6843
|
+
const nodeData = new avs_pb13.ETHTransferNode();
|
|
6739
6844
|
nodeData.setDestination(this.data.destination);
|
|
6740
6845
|
nodeData.setAmount(this.data.amount);
|
|
6741
6846
|
request.setEthTransfer(nodeData);
|
|
@@ -6745,27 +6850,28 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
6745
6850
|
var ethTransfer_default = ETHTransferNode2;
|
|
6746
6851
|
|
|
6747
6852
|
// src/models/node/branch.ts
|
|
6748
|
-
var
|
|
6853
|
+
var import_types13 = require("@avaprotocol/types");
|
|
6854
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
6749
6855
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
6750
6856
|
constructor(props) {
|
|
6751
|
-
super({ ...props, type:
|
|
6857
|
+
super({ ...props, type: import_types13.NodeType.Branch, data: props.data });
|
|
6752
6858
|
}
|
|
6753
6859
|
static fromResponse(raw) {
|
|
6754
6860
|
const obj = raw.toObject();
|
|
6755
6861
|
return new _BranchNode({
|
|
6756
6862
|
...obj,
|
|
6757
|
-
type:
|
|
6863
|
+
type: import_types13.NodeType.Branch,
|
|
6758
6864
|
data: raw.getBranch().toObject()
|
|
6759
6865
|
});
|
|
6760
6866
|
}
|
|
6761
6867
|
toRequest() {
|
|
6762
|
-
const request = new
|
|
6868
|
+
const request = new avs_pb14.TaskNode();
|
|
6763
6869
|
request.setId(this.id);
|
|
6764
6870
|
request.setName(this.name);
|
|
6765
|
-
const nodeData = new
|
|
6871
|
+
const nodeData = new avs_pb14.BranchNode();
|
|
6766
6872
|
nodeData.setConditionsList(
|
|
6767
6873
|
this.data.conditionsList.map((condition) => {
|
|
6768
|
-
const conditionObj = new
|
|
6874
|
+
const conditionObj = new avs_pb14.Condition();
|
|
6769
6875
|
conditionObj.setId(condition.id);
|
|
6770
6876
|
conditionObj.setType(condition.type);
|
|
6771
6877
|
return conditionObj;
|
|
@@ -6779,22 +6885,23 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
6779
6885
|
var branch_default = BranchNode2;
|
|
6780
6886
|
|
|
6781
6887
|
// src/models/node/factory.ts
|
|
6888
|
+
var import_types14 = require("@avaprotocol/types");
|
|
6782
6889
|
var NodeFactory = class {
|
|
6783
6890
|
static create(props) {
|
|
6784
6891
|
switch (props.type) {
|
|
6785
|
-
case
|
|
6892
|
+
case import_types14.NodeType.ContractWrite:
|
|
6786
6893
|
return new contractWrite_default(props);
|
|
6787
|
-
case
|
|
6894
|
+
case import_types14.NodeType.RestAPI:
|
|
6788
6895
|
return new restApi_default(props);
|
|
6789
|
-
case
|
|
6896
|
+
case import_types14.NodeType.CustomCode:
|
|
6790
6897
|
return new customCode_default(props);
|
|
6791
|
-
case
|
|
6898
|
+
case import_types14.NodeType.ContractRead:
|
|
6792
6899
|
return new contractRead_default(props);
|
|
6793
|
-
case
|
|
6900
|
+
case import_types14.NodeType.ETHTransfer:
|
|
6794
6901
|
return new ethTransfer_default(props);
|
|
6795
|
-
case
|
|
6902
|
+
case import_types14.NodeType.GraphQLQuery:
|
|
6796
6903
|
return new graphqlQuery_default(props);
|
|
6797
|
-
case
|
|
6904
|
+
case import_types14.NodeType.Branch:
|
|
6798
6905
|
return new branch_default(props);
|
|
6799
6906
|
default:
|
|
6800
6907
|
throw new Error(`Unsupported node type: ${props.type}`);
|
|
@@ -6829,11 +6936,11 @@ var factory_default2 = NodeFactory;
|
|
|
6829
6936
|
// src/models/workflow.ts
|
|
6830
6937
|
function convertStatusToString(status) {
|
|
6831
6938
|
const conversionMap = {
|
|
6832
|
-
[
|
|
6833
|
-
[
|
|
6834
|
-
[
|
|
6835
|
-
[
|
|
6836
|
-
[
|
|
6939
|
+
[avs_pb15.TaskStatus.ACTIVE]: "active" /* Active */,
|
|
6940
|
+
[avs_pb15.TaskStatus.COMPLETED]: "completed" /* Completed */,
|
|
6941
|
+
[avs_pb15.TaskStatus.FAILED]: "failed" /* Failed */,
|
|
6942
|
+
[avs_pb15.TaskStatus.CANCELED]: "canceled" /* Canceled */,
|
|
6943
|
+
[avs_pb15.TaskStatus.EXECUTING]: "executing" /* Executing */
|
|
6837
6944
|
};
|
|
6838
6945
|
return conversionMap[status];
|
|
6839
6946
|
}
|
|
@@ -6921,7 +7028,7 @@ var Workflow = class _Workflow {
|
|
|
6921
7028
|
});
|
|
6922
7029
|
}
|
|
6923
7030
|
toRequest() {
|
|
6924
|
-
const request = new
|
|
7031
|
+
const request = new avs_pb15.CreateTaskReq();
|
|
6925
7032
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
6926
7033
|
request.setTrigger(this.trigger.toRequest());
|
|
6927
7034
|
import_lodash3.default.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -6938,18 +7045,18 @@ var Workflow = class _Workflow {
|
|
|
6938
7045
|
var workflow_default = Workflow;
|
|
6939
7046
|
|
|
6940
7047
|
// src/models/execution.ts
|
|
6941
|
-
var
|
|
7048
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
6942
7049
|
|
|
6943
7050
|
// src/models/trigger/metadata.ts
|
|
6944
|
-
var
|
|
7051
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
6945
7052
|
var convertTriggerType = (grpcType) => {
|
|
6946
7053
|
const conversionMap = {
|
|
6947
|
-
[
|
|
6948
|
-
[
|
|
6949
|
-
[
|
|
6950
|
-
[
|
|
6951
|
-
[
|
|
6952
|
-
[
|
|
7054
|
+
[avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME]: "fixed_time" /* FixedTime */,
|
|
7055
|
+
[avs_pb16.TriggerMetadata.TriggerType.CRON]: "cron" /* Cron */,
|
|
7056
|
+
[avs_pb16.TriggerMetadata.TriggerType.BLOCK]: "block" /* Block */,
|
|
7057
|
+
[avs_pb16.TriggerMetadata.TriggerType.EVENT]: "event" /* Event */,
|
|
7058
|
+
[avs_pb16.TriggerMetadata.TriggerType.MANUAL]: "manual" /* Manual */,
|
|
7059
|
+
[avs_pb16.TriggerMetadata.TriggerType.UNSET]: "unset" /* Unset */
|
|
6953
7060
|
};
|
|
6954
7061
|
return conversionMap[grpcType];
|
|
6955
7062
|
};
|
|
@@ -6986,28 +7093,28 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6986
7093
|
});
|
|
6987
7094
|
}
|
|
6988
7095
|
toRequest() {
|
|
6989
|
-
const request = new
|
|
7096
|
+
const request = new avs_pb16.TriggerMetadata();
|
|
6990
7097
|
switch (this.type) {
|
|
6991
7098
|
case "fixed_time" /* FixedTime */:
|
|
6992
|
-
request.setType(
|
|
7099
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME);
|
|
6993
7100
|
if (this.epoch) {
|
|
6994
7101
|
request.setEpoch(this.epoch);
|
|
6995
7102
|
}
|
|
6996
7103
|
break;
|
|
6997
7104
|
case "cron" /* Cron */:
|
|
6998
|
-
request.setType(
|
|
7105
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.CRON);
|
|
6999
7106
|
if (this.epoch) {
|
|
7000
7107
|
request.setEpoch(this.epoch);
|
|
7001
7108
|
}
|
|
7002
7109
|
break;
|
|
7003
7110
|
case "block" /* Block */:
|
|
7004
|
-
request.setType(
|
|
7111
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.BLOCK);
|
|
7005
7112
|
if (this.blockNumber) {
|
|
7006
7113
|
request.setBlockNumber(this.blockNumber);
|
|
7007
7114
|
}
|
|
7008
7115
|
break;
|
|
7009
7116
|
case "event" /* Event */:
|
|
7010
|
-
request.setType(
|
|
7117
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.EVENT);
|
|
7011
7118
|
if (this.blockNumber) {
|
|
7012
7119
|
request.setBlockNumber(this.blockNumber);
|
|
7013
7120
|
}
|
|
@@ -7019,10 +7126,10 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7019
7126
|
}
|
|
7020
7127
|
break;
|
|
7021
7128
|
case "manual" /* Manual */:
|
|
7022
|
-
request.setType(
|
|
7129
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.MANUAL);
|
|
7023
7130
|
break;
|
|
7024
7131
|
case "unset" /* Unset */:
|
|
7025
|
-
request.setType(
|
|
7132
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.UNSET);
|
|
7026
7133
|
break;
|
|
7027
7134
|
default:
|
|
7028
7135
|
throw new Error("Unsupported trigger type");
|
|
@@ -7033,7 +7140,7 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7033
7140
|
var metadata_default = TriggerMetadata2;
|
|
7034
7141
|
|
|
7035
7142
|
// src/models/step.ts
|
|
7036
|
-
var
|
|
7143
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
7037
7144
|
var Step = class _Step {
|
|
7038
7145
|
constructor(props) {
|
|
7039
7146
|
this.nodeId = props.nodeId;
|
|
@@ -7056,7 +7163,7 @@ var Step = class _Step {
|
|
|
7056
7163
|
});
|
|
7057
7164
|
}
|
|
7058
7165
|
toRequest() {
|
|
7059
|
-
const step = new
|
|
7166
|
+
const step = new avs_pb17.Execution.Step();
|
|
7060
7167
|
step.setNodeId(this.nodeId);
|
|
7061
7168
|
step.setSuccess(this.success);
|
|
7062
7169
|
step.setOutputData(this.outputData);
|
|
@@ -7096,7 +7203,7 @@ var Execution3 = class _Execution {
|
|
|
7096
7203
|
});
|
|
7097
7204
|
}
|
|
7098
7205
|
toRequest() {
|
|
7099
|
-
const execution = new
|
|
7206
|
+
const execution = new avs_pb18.Execution();
|
|
7100
7207
|
execution.setId(this.id);
|
|
7101
7208
|
execution.setStartAt(this.startAt);
|
|
7102
7209
|
execution.setEndAt(this.endAt);
|
|
@@ -7147,7 +7254,7 @@ var BaseClient = class {
|
|
|
7147
7254
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7148
7255
|
*/
|
|
7149
7256
|
async authWithAPIKey(address, apiKey, expiredAtEpoch) {
|
|
7150
|
-
const request = new
|
|
7257
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7151
7258
|
request.setOwner(address);
|
|
7152
7259
|
request.setExpiredAt(expiredAtEpoch);
|
|
7153
7260
|
request.setSignature(apiKey);
|
|
@@ -7162,7 +7269,7 @@ var BaseClient = class {
|
|
|
7162
7269
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7163
7270
|
*/
|
|
7164
7271
|
async authWithSignature(address, signature, expiredAtEpoch) {
|
|
7165
|
-
const request = new
|
|
7272
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7166
7273
|
request.setOwner(address);
|
|
7167
7274
|
request.setExpiredAt(expiredAtEpoch);
|
|
7168
7275
|
request.setSignature(signature);
|
|
@@ -7237,7 +7344,7 @@ var Client = class extends BaseClient {
|
|
|
7237
7344
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
7238
7345
|
*/
|
|
7239
7346
|
async getWallets(options) {
|
|
7240
|
-
const request = new
|
|
7347
|
+
const request = new avs_pb19.ListWalletReq();
|
|
7241
7348
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
7242
7349
|
return result.getItemsList().map((item) => item.toObject());
|
|
7243
7350
|
}
|
|
@@ -7249,7 +7356,7 @@ var Client = class extends BaseClient {
|
|
|
7249
7356
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
7250
7357
|
*/
|
|
7251
7358
|
async getWallet({ salt, factoryAddress }, options) {
|
|
7252
|
-
const request = new
|
|
7359
|
+
const request = new avs_pb19.GetWalletReq();
|
|
7253
7360
|
request.setSalt(salt);
|
|
7254
7361
|
if (factoryAddress) {
|
|
7255
7362
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -7286,7 +7393,7 @@ var Client = class extends BaseClient {
|
|
|
7286
7393
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
7287
7394
|
*/
|
|
7288
7395
|
async getWorkflows(addresses, options) {
|
|
7289
|
-
const request = new
|
|
7396
|
+
const request = new avs_pb19.ListTasksReq();
|
|
7290
7397
|
for (const a of addresses) {
|
|
7291
7398
|
request.addSmartWalletAddress(a);
|
|
7292
7399
|
}
|
|
@@ -7311,7 +7418,7 @@ var Client = class extends BaseClient {
|
|
|
7311
7418
|
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
7312
7419
|
*/
|
|
7313
7420
|
async getExecutions(workflows, options) {
|
|
7314
|
-
const request = new
|
|
7421
|
+
const request = new avs_pb19.ListExecutionsReq();
|
|
7315
7422
|
request.setTaskIdsList(workflows);
|
|
7316
7423
|
if (options?.cursor && options?.cursor != "") {
|
|
7317
7424
|
request.setCursor(options.cursor);
|
|
@@ -7332,12 +7439,29 @@ var Client = class extends BaseClient {
|
|
|
7332
7439
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
7333
7440
|
*/
|
|
7334
7441
|
async getExecution(taskId, executionId, options) {
|
|
7335
|
-
const request = new
|
|
7442
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7336
7443
|
request.setTaskId(taskId);
|
|
7337
7444
|
request.setExecutionId(executionId);
|
|
7338
7445
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
7339
7446
|
return execution_default.fromResponse(result);
|
|
7340
7447
|
}
|
|
7448
|
+
/**
|
|
7449
|
+
* Get status of an execution.
|
|
7450
|
+
*
|
|
7451
|
+
* When a task is trigger in async manner, it has not run yet, so the data isn't available to return in GetExecution. Calling GetExecution will return in execution not found. We can instad call getExecutionStatus to check whether the execution is finished or not.
|
|
7452
|
+
*
|
|
7453
|
+
* @param {string} workflowId - The workflow id
|
|
7454
|
+
* @param {string} executionId - The exectuion id
|
|
7455
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
7456
|
+
* @returns {Promise<ExecutionStatus>} - The result execution if it is existed
|
|
7457
|
+
*/
|
|
7458
|
+
async getExecutionStatus(taskId, executionId, options) {
|
|
7459
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7460
|
+
request.setTaskId(taskId);
|
|
7461
|
+
request.setExecutionId(executionId);
|
|
7462
|
+
const result = await this.sendGrpcRequest("getExecutionStatus", request, options);
|
|
7463
|
+
return result.getStatus();
|
|
7464
|
+
}
|
|
7341
7465
|
/**
|
|
7342
7466
|
* Get a workflow by its Id
|
|
7343
7467
|
* @param {string} id - The Id of the workflow
|
|
@@ -7345,7 +7469,7 @@ var Client = class extends BaseClient {
|
|
|
7345
7469
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
7346
7470
|
*/
|
|
7347
7471
|
async getWorkflow(id, options) {
|
|
7348
|
-
const request = new
|
|
7472
|
+
const request = new avs_pb19.IdReq();
|
|
7349
7473
|
request.setId(id);
|
|
7350
7474
|
const result = await this.sendGrpcRequest(
|
|
7351
7475
|
"getTask",
|
|
@@ -7367,7 +7491,7 @@ var Client = class extends BaseClient {
|
|
|
7367
7491
|
data,
|
|
7368
7492
|
isBlocking = false
|
|
7369
7493
|
}, options) {
|
|
7370
|
-
const request = new
|
|
7494
|
+
const request = new avs_pb19.UserTriggerTaskReq();
|
|
7371
7495
|
request.setTaskId(id);
|
|
7372
7496
|
request.setTriggerMetadata(new metadata_default(data).toRequest());
|
|
7373
7497
|
request.setIsBlocking(isBlocking);
|
|
@@ -7381,7 +7505,7 @@ var Client = class extends BaseClient {
|
|
|
7381
7505
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
7382
7506
|
*/
|
|
7383
7507
|
async cancelWorkflow(id, options) {
|
|
7384
|
-
const request = new
|
|
7508
|
+
const request = new avs_pb19.IdReq();
|
|
7385
7509
|
request.setId(id);
|
|
7386
7510
|
const result = await this.sendGrpcRequest(
|
|
7387
7511
|
"cancelTask",
|
|
@@ -7397,7 +7521,7 @@ var Client = class extends BaseClient {
|
|
|
7397
7521
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
7398
7522
|
*/
|
|
7399
7523
|
async deleteWorkflow(id, options) {
|
|
7400
|
-
const request = new
|
|
7524
|
+
const request = new avs_pb19.IdReq();
|
|
7401
7525
|
request.setId(id);
|
|
7402
7526
|
const result = await this.sendGrpcRequest(
|
|
7403
7527
|
"deleteTask",
|
|
@@ -7422,11 +7546,11 @@ var Client = class extends BaseClient {
|
|
|
7422
7546
|
Edge,
|
|
7423
7547
|
EventTrigger,
|
|
7424
7548
|
Execution,
|
|
7549
|
+
ExecutionStatus,
|
|
7425
7550
|
FixedTimeTrigger,
|
|
7426
7551
|
GraphQLQueryNode,
|
|
7427
7552
|
Node,
|
|
7428
7553
|
NodeFactory,
|
|
7429
|
-
NodeTypes,
|
|
7430
7554
|
RestAPINode,
|
|
7431
7555
|
Trigger,
|
|
7432
7556
|
TriggerFactory,
|