@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.mjs
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"(exports) {
|
|
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,
|
|
@@ -6260,10 +6358,10 @@ var getKeyRequestMessage = (address, expiredAt) => {
|
|
|
6260
6358
|
|
|
6261
6359
|
// src/index.ts
|
|
6262
6360
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
6263
|
-
var
|
|
6361
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
6264
6362
|
|
|
6265
6363
|
// src/models/workflow.ts
|
|
6266
|
-
var
|
|
6364
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
6267
6365
|
import _3 from "lodash";
|
|
6268
6366
|
|
|
6269
6367
|
// src/models/edge.ts
|
|
@@ -6288,7 +6386,7 @@ var Edge = class _Edge {
|
|
|
6288
6386
|
var edge_default = Edge;
|
|
6289
6387
|
|
|
6290
6388
|
// src/models/trigger/block.ts
|
|
6291
|
-
var
|
|
6389
|
+
var avs_pb3 = __toESM(require_avs_pb());
|
|
6292
6390
|
|
|
6293
6391
|
// src/models/trigger/interface.ts
|
|
6294
6392
|
var Trigger = class {
|
|
@@ -6308,6 +6406,7 @@ var Trigger = class {
|
|
|
6308
6406
|
var interface_default = Trigger;
|
|
6309
6407
|
|
|
6310
6408
|
// src/types.ts
|
|
6409
|
+
var avs_pb2 = __toESM(require_avs_pb());
|
|
6311
6410
|
var AUTH_KEY_HEADER = "authkey";
|
|
6312
6411
|
var DEFAULT_LIMIT = 10;
|
|
6313
6412
|
var WorkflowStatus = /* @__PURE__ */ ((WorkflowStatus2) => {
|
|
@@ -6327,6 +6426,7 @@ var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
|
|
|
6327
6426
|
TriggerType2["Unset"] = "unset";
|
|
6328
6427
|
return TriggerType2;
|
|
6329
6428
|
})(TriggerType || {});
|
|
6429
|
+
var ExecutionStatus2 = avs_pb2.ExecutionStatus;
|
|
6330
6430
|
|
|
6331
6431
|
// src/models/trigger/block.ts
|
|
6332
6432
|
var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
@@ -6334,12 +6434,12 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6334
6434
|
super({ ...props, type: "block" /* Block */, data: props.data });
|
|
6335
6435
|
}
|
|
6336
6436
|
toRequest() {
|
|
6337
|
-
const request = new
|
|
6437
|
+
const request = new avs_pb3.TaskTrigger();
|
|
6338
6438
|
request.setName(this.name);
|
|
6339
6439
|
if (!this.data) {
|
|
6340
6440
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6341
6441
|
}
|
|
6342
|
-
const condition = new
|
|
6442
|
+
const condition = new avs_pb3.BlockCondition();
|
|
6343
6443
|
condition.setInterval(this.data.interval);
|
|
6344
6444
|
request.setBlock(condition);
|
|
6345
6445
|
return request;
|
|
@@ -6356,7 +6456,7 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6356
6456
|
var block_default = BlockTrigger;
|
|
6357
6457
|
|
|
6358
6458
|
// src/models/trigger/cron.ts
|
|
6359
|
-
var
|
|
6459
|
+
var avs_pb4 = __toESM(require_avs_pb());
|
|
6360
6460
|
var CronTrigger = class _CronTrigger extends interface_default {
|
|
6361
6461
|
constructor(props) {
|
|
6362
6462
|
super({ ...props, type: "cron" /* Cron */, data: props.data });
|
|
@@ -6367,12 +6467,12 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6367
6467
|
});
|
|
6368
6468
|
}
|
|
6369
6469
|
toRequest() {
|
|
6370
|
-
const request = new
|
|
6470
|
+
const request = new avs_pb4.TaskTrigger();
|
|
6371
6471
|
request.setName(this.name);
|
|
6372
6472
|
if (!this.data) {
|
|
6373
6473
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6374
6474
|
}
|
|
6375
|
-
const condition = new
|
|
6475
|
+
const condition = new avs_pb4.CronCondition();
|
|
6376
6476
|
condition.setScheduleList(this.data.scheduleList);
|
|
6377
6477
|
request.setCron(condition);
|
|
6378
6478
|
console.log("CronTrigger.toRequest.request:", request.toObject());
|
|
@@ -6391,7 +6491,7 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6391
6491
|
var cron_default = CronTrigger;
|
|
6392
6492
|
|
|
6393
6493
|
// src/models/trigger/event.ts
|
|
6394
|
-
var
|
|
6494
|
+
var avs_pb5 = __toESM(require_avs_pb());
|
|
6395
6495
|
var EventTrigger = class _EventTrigger extends interface_default {
|
|
6396
6496
|
constructor(props) {
|
|
6397
6497
|
super({ ...props, type: "event" /* Event */, data: props.data });
|
|
@@ -6402,12 +6502,12 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6402
6502
|
});
|
|
6403
6503
|
}
|
|
6404
6504
|
toRequest() {
|
|
6405
|
-
const request = new
|
|
6505
|
+
const request = new avs_pb5.TaskTrigger();
|
|
6406
6506
|
request.setName(this.name);
|
|
6407
6507
|
if (!this.data) {
|
|
6408
6508
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6409
6509
|
}
|
|
6410
|
-
const condition = new
|
|
6510
|
+
const condition = new avs_pb5.EventCondition();
|
|
6411
6511
|
condition.setExpression(this.data.expression);
|
|
6412
6512
|
request.setEvent(condition);
|
|
6413
6513
|
console.log("EventTrigger.toRequest.request:", request.toObject());
|
|
@@ -6426,7 +6526,7 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6426
6526
|
var event_default = EventTrigger;
|
|
6427
6527
|
|
|
6428
6528
|
// src/models/trigger/fixedTime.ts
|
|
6429
|
-
var
|
|
6529
|
+
var avs_pb6 = __toESM(require_avs_pb());
|
|
6430
6530
|
var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
6431
6531
|
constructor(props) {
|
|
6432
6532
|
super({ ...props, type: "fixed_time" /* FixedTime */, data: props.data });
|
|
@@ -6437,12 +6537,12 @@ var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
|
6437
6537
|
});
|
|
6438
6538
|
}
|
|
6439
6539
|
toRequest() {
|
|
6440
|
-
const request = new
|
|
6540
|
+
const request = new avs_pb6.TaskTrigger();
|
|
6441
6541
|
request.setName(this.name);
|
|
6442
6542
|
if (!this.data) {
|
|
6443
6543
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6444
6544
|
}
|
|
6445
|
-
const condition = new
|
|
6545
|
+
const condition = new avs_pb6.FixedTimeCondition();
|
|
6446
6546
|
condition.setEpochsList(this.data.epochsList);
|
|
6447
6547
|
request.setFixedTime(condition);
|
|
6448
6548
|
console.log("FixedTimeTrigger.toRequest.request:", request.toObject());
|
|
@@ -6506,9 +6606,9 @@ var factory_default = TriggerFactory;
|
|
|
6506
6606
|
import _2 from "lodash";
|
|
6507
6607
|
|
|
6508
6608
|
// src/models/node/interface.ts
|
|
6509
|
-
var
|
|
6609
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
6610
|
+
import { NodeType } from "@avaprotocol/types";
|
|
6510
6611
|
import _ from "lodash";
|
|
6511
|
-
var NodeTypes = avs_pb6.TaskNode.TaskTypeCase;
|
|
6512
6612
|
var Node = class {
|
|
6513
6613
|
constructor(props) {
|
|
6514
6614
|
this.id = props.id;
|
|
@@ -6517,10 +6617,9 @@ var Node = class {
|
|
|
6517
6617
|
this.data = props.data;
|
|
6518
6618
|
}
|
|
6519
6619
|
toRequest() {
|
|
6520
|
-
const request = new
|
|
6521
|
-
console.log("Node.toRequest.request:", request);
|
|
6620
|
+
const request = new avs_pb7.TaskNode();
|
|
6522
6621
|
const raw = request.serializeBinary();
|
|
6523
|
-
const parsed =
|
|
6622
|
+
const parsed = avs_pb7.TaskNode.deserializeBinary(raw);
|
|
6524
6623
|
if (!_.isEqual(request, parsed)) {
|
|
6525
6624
|
throw new Error("Invalid request object");
|
|
6526
6625
|
}
|
|
@@ -6530,24 +6629,25 @@ var Node = class {
|
|
|
6530
6629
|
var interface_default2 = Node;
|
|
6531
6630
|
|
|
6532
6631
|
// src/models/node/contractWrite.ts
|
|
6533
|
-
var
|
|
6632
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
6633
|
+
import { NodeType as NodeType2 } from "@avaprotocol/types";
|
|
6534
6634
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
6535
6635
|
constructor(props) {
|
|
6536
|
-
super({ ...props, type:
|
|
6636
|
+
super({ ...props, type: NodeType2.ContractWrite, data: props.data });
|
|
6537
6637
|
}
|
|
6538
6638
|
static fromResponse(raw) {
|
|
6539
6639
|
const obj = raw.toObject();
|
|
6540
6640
|
return new _ContractWriteNode({
|
|
6541
6641
|
...obj,
|
|
6542
|
-
type:
|
|
6642
|
+
type: NodeType2.ContractWrite,
|
|
6543
6643
|
data: raw.getContractWrite().toObject()
|
|
6544
6644
|
});
|
|
6545
6645
|
}
|
|
6546
6646
|
toRequest() {
|
|
6547
|
-
const request = new
|
|
6647
|
+
const request = new avs_pb8.TaskNode();
|
|
6548
6648
|
request.setId(this.id);
|
|
6549
6649
|
request.setName(this.name);
|
|
6550
|
-
const nodeData = new
|
|
6650
|
+
const nodeData = new avs_pb8.ContractWriteNode();
|
|
6551
6651
|
nodeData.setContractAddress(
|
|
6552
6652
|
this.data.contractAddress
|
|
6553
6653
|
);
|
|
@@ -6560,25 +6660,26 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
6560
6660
|
var contractWrite_default = ContractWriteNode2;
|
|
6561
6661
|
|
|
6562
6662
|
// src/models/node/customCode.ts
|
|
6563
|
-
var
|
|
6564
|
-
|
|
6663
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
6664
|
+
import { NodeType as NodeType3 } from "@avaprotocol/types";
|
|
6665
|
+
var CustomCodeLangs = avs_pb9.CustomCodeLang;
|
|
6565
6666
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
6566
6667
|
constructor(props) {
|
|
6567
|
-
super({ ...props, type:
|
|
6668
|
+
super({ ...props, type: NodeType3.CustomCode, data: props.data });
|
|
6568
6669
|
}
|
|
6569
6670
|
static fromResponse(raw) {
|
|
6570
6671
|
const obj = raw.toObject();
|
|
6571
6672
|
return new _CustomCodeNode({
|
|
6572
6673
|
...obj,
|
|
6573
|
-
type:
|
|
6674
|
+
type: NodeType3.CustomCode,
|
|
6574
6675
|
data: raw.getCustomCode().toObject()
|
|
6575
6676
|
});
|
|
6576
6677
|
}
|
|
6577
6678
|
toRequest() {
|
|
6578
|
-
const request = new
|
|
6679
|
+
const request = new avs_pb9.TaskNode();
|
|
6579
6680
|
request.setId(this.id);
|
|
6580
6681
|
request.setName(this.name);
|
|
6581
|
-
const nodeData = new
|
|
6682
|
+
const nodeData = new avs_pb9.CustomCodeNode();
|
|
6582
6683
|
nodeData.setLang(this.data.lang);
|
|
6583
6684
|
nodeData.setSource(this.data.source);
|
|
6584
6685
|
request.setCustomCode(nodeData);
|
|
@@ -6588,12 +6689,13 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
6588
6689
|
var customCode_default = CustomCodeNode2;
|
|
6589
6690
|
|
|
6590
6691
|
// src/models/node/graphqlQuery.ts
|
|
6591
|
-
var
|
|
6692
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
6693
|
+
import { NodeType as NodeType4 } from "@avaprotocol/types";
|
|
6592
6694
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
6593
6695
|
constructor(props) {
|
|
6594
6696
|
super({
|
|
6595
6697
|
...props,
|
|
6596
|
-
type:
|
|
6698
|
+
type: NodeType4.GraphQLQuery,
|
|
6597
6699
|
data: props.data
|
|
6598
6700
|
});
|
|
6599
6701
|
}
|
|
@@ -6601,15 +6703,15 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6601
6703
|
const obj = raw.toObject();
|
|
6602
6704
|
return new _GraphQLQueryNode({
|
|
6603
6705
|
...obj,
|
|
6604
|
-
type:
|
|
6706
|
+
type: NodeType4.GraphQLQuery,
|
|
6605
6707
|
data: raw.getGraphqlQuery().toObject()
|
|
6606
6708
|
});
|
|
6607
6709
|
}
|
|
6608
6710
|
toRequest() {
|
|
6609
|
-
const request = new
|
|
6711
|
+
const request = new avs_pb10.TaskNode();
|
|
6610
6712
|
request.setId(this.id);
|
|
6611
6713
|
request.setName(this.name);
|
|
6612
|
-
const nodeData = new
|
|
6714
|
+
const nodeData = new avs_pb10.GraphQLQueryNode();
|
|
6613
6715
|
nodeData.setUrl(this.data.url);
|
|
6614
6716
|
nodeData.setQuery(this.data.query);
|
|
6615
6717
|
const variables = this.data.variablesMap;
|
|
@@ -6624,24 +6726,25 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6624
6726
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
6625
6727
|
|
|
6626
6728
|
// src/models/node/restApi.ts
|
|
6627
|
-
var
|
|
6729
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
6730
|
+
import { NodeType as NodeType5 } from "@avaprotocol/types";
|
|
6628
6731
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
6629
6732
|
constructor(props) {
|
|
6630
|
-
super({ ...props, type:
|
|
6733
|
+
super({ ...props, type: NodeType5.RestAPI, data: props.data });
|
|
6631
6734
|
}
|
|
6632
6735
|
static fromResponse(raw) {
|
|
6633
6736
|
const obj = raw.toObject();
|
|
6634
6737
|
return new _RestAPINode({
|
|
6635
6738
|
...obj,
|
|
6636
|
-
type:
|
|
6739
|
+
type: NodeType5.RestAPI,
|
|
6637
6740
|
data: raw.getRestApi().toObject()
|
|
6638
6741
|
});
|
|
6639
6742
|
}
|
|
6640
6743
|
toRequest() {
|
|
6641
|
-
const request = new
|
|
6744
|
+
const request = new avs_pb11.TaskNode();
|
|
6642
6745
|
request.setId(this.id);
|
|
6643
6746
|
request.setName(this.name);
|
|
6644
|
-
const nodeData = new
|
|
6747
|
+
const nodeData = new avs_pb11.RestAPINode();
|
|
6645
6748
|
nodeData.setUrl(this.data.url);
|
|
6646
6749
|
nodeData.setMethod(this.data.method);
|
|
6647
6750
|
nodeData.setBody(this.data.body);
|
|
@@ -6657,24 +6760,25 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6657
6760
|
var restApi_default = RestAPINode2;
|
|
6658
6761
|
|
|
6659
6762
|
// src/models/node/contractRead.ts
|
|
6660
|
-
var
|
|
6763
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
6764
|
+
import { NodeType as NodeType6 } from "@avaprotocol/types";
|
|
6661
6765
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
6662
6766
|
constructor(props) {
|
|
6663
|
-
super({ ...props, type:
|
|
6767
|
+
super({ ...props, type: NodeType6.ContractRead, data: props.data });
|
|
6664
6768
|
}
|
|
6665
6769
|
static fromResponse(raw) {
|
|
6666
6770
|
const obj = raw.toObject();
|
|
6667
6771
|
return new _ContractReadNode({
|
|
6668
6772
|
...obj,
|
|
6669
|
-
type:
|
|
6773
|
+
type: NodeType6.ContractRead,
|
|
6670
6774
|
data: raw.getContractRead().toObject()
|
|
6671
6775
|
});
|
|
6672
6776
|
}
|
|
6673
6777
|
toRequest() {
|
|
6674
|
-
const request = new
|
|
6778
|
+
const request = new avs_pb12.TaskNode();
|
|
6675
6779
|
request.setId(this.id);
|
|
6676
6780
|
request.setName(this.name);
|
|
6677
|
-
const nodeData = new
|
|
6781
|
+
const nodeData = new avs_pb12.ContractReadNode();
|
|
6678
6782
|
nodeData.setContractAddress(
|
|
6679
6783
|
this.data.contractAddress
|
|
6680
6784
|
);
|
|
@@ -6688,24 +6792,25 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6688
6792
|
var contractRead_default = ContractReadNode2;
|
|
6689
6793
|
|
|
6690
6794
|
// src/models/node/ethTransfer.ts
|
|
6691
|
-
var
|
|
6795
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
6796
|
+
import { NodeType as NodeType7 } from "@avaprotocol/types";
|
|
6692
6797
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
6693
6798
|
constructor(props) {
|
|
6694
|
-
super({ ...props, type:
|
|
6799
|
+
super({ ...props, type: NodeType7.ETHTransfer, data: props.data });
|
|
6695
6800
|
}
|
|
6696
6801
|
static fromResponse(raw) {
|
|
6697
6802
|
const obj = raw.toObject();
|
|
6698
6803
|
return new _ETHTransferNode({
|
|
6699
6804
|
...obj,
|
|
6700
|
-
type:
|
|
6805
|
+
type: NodeType7.ETHTransfer,
|
|
6701
6806
|
data: raw.getEthTransfer().toObject()
|
|
6702
6807
|
});
|
|
6703
6808
|
}
|
|
6704
6809
|
toRequest() {
|
|
6705
|
-
const request = new
|
|
6810
|
+
const request = new avs_pb13.TaskNode();
|
|
6706
6811
|
request.setId(this.id);
|
|
6707
6812
|
request.setName(this.name);
|
|
6708
|
-
const nodeData = new
|
|
6813
|
+
const nodeData = new avs_pb13.ETHTransferNode();
|
|
6709
6814
|
nodeData.setDestination(this.data.destination);
|
|
6710
6815
|
nodeData.setAmount(this.data.amount);
|
|
6711
6816
|
request.setEthTransfer(nodeData);
|
|
@@ -6715,27 +6820,28 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
6715
6820
|
var ethTransfer_default = ETHTransferNode2;
|
|
6716
6821
|
|
|
6717
6822
|
// src/models/node/branch.ts
|
|
6718
|
-
|
|
6823
|
+
import { NodeType as NodeType8 } from "@avaprotocol/types";
|
|
6824
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
6719
6825
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
6720
6826
|
constructor(props) {
|
|
6721
|
-
super({ ...props, type:
|
|
6827
|
+
super({ ...props, type: NodeType8.Branch, data: props.data });
|
|
6722
6828
|
}
|
|
6723
6829
|
static fromResponse(raw) {
|
|
6724
6830
|
const obj = raw.toObject();
|
|
6725
6831
|
return new _BranchNode({
|
|
6726
6832
|
...obj,
|
|
6727
|
-
type:
|
|
6833
|
+
type: NodeType8.Branch,
|
|
6728
6834
|
data: raw.getBranch().toObject()
|
|
6729
6835
|
});
|
|
6730
6836
|
}
|
|
6731
6837
|
toRequest() {
|
|
6732
|
-
const request = new
|
|
6838
|
+
const request = new avs_pb14.TaskNode();
|
|
6733
6839
|
request.setId(this.id);
|
|
6734
6840
|
request.setName(this.name);
|
|
6735
|
-
const nodeData = new
|
|
6841
|
+
const nodeData = new avs_pb14.BranchNode();
|
|
6736
6842
|
nodeData.setConditionsList(
|
|
6737
6843
|
this.data.conditionsList.map((condition) => {
|
|
6738
|
-
const conditionObj = new
|
|
6844
|
+
const conditionObj = new avs_pb14.Condition();
|
|
6739
6845
|
conditionObj.setId(condition.id);
|
|
6740
6846
|
conditionObj.setType(condition.type);
|
|
6741
6847
|
return conditionObj;
|
|
@@ -6749,22 +6855,23 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
6749
6855
|
var branch_default = BranchNode2;
|
|
6750
6856
|
|
|
6751
6857
|
// src/models/node/factory.ts
|
|
6858
|
+
import { NodeType as NodeType9 } from "@avaprotocol/types";
|
|
6752
6859
|
var NodeFactory = class {
|
|
6753
6860
|
static create(props) {
|
|
6754
6861
|
switch (props.type) {
|
|
6755
|
-
case
|
|
6862
|
+
case NodeType9.ContractWrite:
|
|
6756
6863
|
return new contractWrite_default(props);
|
|
6757
|
-
case
|
|
6864
|
+
case NodeType9.RestAPI:
|
|
6758
6865
|
return new restApi_default(props);
|
|
6759
|
-
case
|
|
6866
|
+
case NodeType9.CustomCode:
|
|
6760
6867
|
return new customCode_default(props);
|
|
6761
|
-
case
|
|
6868
|
+
case NodeType9.ContractRead:
|
|
6762
6869
|
return new contractRead_default(props);
|
|
6763
|
-
case
|
|
6870
|
+
case NodeType9.ETHTransfer:
|
|
6764
6871
|
return new ethTransfer_default(props);
|
|
6765
|
-
case
|
|
6872
|
+
case NodeType9.GraphQLQuery:
|
|
6766
6873
|
return new graphqlQuery_default(props);
|
|
6767
|
-
case
|
|
6874
|
+
case NodeType9.Branch:
|
|
6768
6875
|
return new branch_default(props);
|
|
6769
6876
|
default:
|
|
6770
6877
|
throw new Error(`Unsupported node type: ${props.type}`);
|
|
@@ -6799,11 +6906,11 @@ var factory_default2 = NodeFactory;
|
|
|
6799
6906
|
// src/models/workflow.ts
|
|
6800
6907
|
function convertStatusToString(status) {
|
|
6801
6908
|
const conversionMap = {
|
|
6802
|
-
[
|
|
6803
|
-
[
|
|
6804
|
-
[
|
|
6805
|
-
[
|
|
6806
|
-
[
|
|
6909
|
+
[avs_pb15.TaskStatus.ACTIVE]: "active" /* Active */,
|
|
6910
|
+
[avs_pb15.TaskStatus.COMPLETED]: "completed" /* Completed */,
|
|
6911
|
+
[avs_pb15.TaskStatus.FAILED]: "failed" /* Failed */,
|
|
6912
|
+
[avs_pb15.TaskStatus.CANCELED]: "canceled" /* Canceled */,
|
|
6913
|
+
[avs_pb15.TaskStatus.EXECUTING]: "executing" /* Executing */
|
|
6807
6914
|
};
|
|
6808
6915
|
return conversionMap[status];
|
|
6809
6916
|
}
|
|
@@ -6891,7 +6998,7 @@ var Workflow = class _Workflow {
|
|
|
6891
6998
|
});
|
|
6892
6999
|
}
|
|
6893
7000
|
toRequest() {
|
|
6894
|
-
const request = new
|
|
7001
|
+
const request = new avs_pb15.CreateTaskReq();
|
|
6895
7002
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
6896
7003
|
request.setTrigger(this.trigger.toRequest());
|
|
6897
7004
|
_3.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -6908,18 +7015,18 @@ var Workflow = class _Workflow {
|
|
|
6908
7015
|
var workflow_default = Workflow;
|
|
6909
7016
|
|
|
6910
7017
|
// src/models/execution.ts
|
|
6911
|
-
var
|
|
7018
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
6912
7019
|
|
|
6913
7020
|
// src/models/trigger/metadata.ts
|
|
6914
|
-
var
|
|
7021
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
6915
7022
|
var convertTriggerType = (grpcType) => {
|
|
6916
7023
|
const conversionMap = {
|
|
6917
|
-
[
|
|
6918
|
-
[
|
|
6919
|
-
[
|
|
6920
|
-
[
|
|
6921
|
-
[
|
|
6922
|
-
[
|
|
7024
|
+
[avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME]: "fixed_time" /* FixedTime */,
|
|
7025
|
+
[avs_pb16.TriggerMetadata.TriggerType.CRON]: "cron" /* Cron */,
|
|
7026
|
+
[avs_pb16.TriggerMetadata.TriggerType.BLOCK]: "block" /* Block */,
|
|
7027
|
+
[avs_pb16.TriggerMetadata.TriggerType.EVENT]: "event" /* Event */,
|
|
7028
|
+
[avs_pb16.TriggerMetadata.TriggerType.MANUAL]: "manual" /* Manual */,
|
|
7029
|
+
[avs_pb16.TriggerMetadata.TriggerType.UNSET]: "unset" /* Unset */
|
|
6923
7030
|
};
|
|
6924
7031
|
return conversionMap[grpcType];
|
|
6925
7032
|
};
|
|
@@ -6956,28 +7063,28 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6956
7063
|
});
|
|
6957
7064
|
}
|
|
6958
7065
|
toRequest() {
|
|
6959
|
-
const request = new
|
|
7066
|
+
const request = new avs_pb16.TriggerMetadata();
|
|
6960
7067
|
switch (this.type) {
|
|
6961
7068
|
case "fixed_time" /* FixedTime */:
|
|
6962
|
-
request.setType(
|
|
7069
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME);
|
|
6963
7070
|
if (this.epoch) {
|
|
6964
7071
|
request.setEpoch(this.epoch);
|
|
6965
7072
|
}
|
|
6966
7073
|
break;
|
|
6967
7074
|
case "cron" /* Cron */:
|
|
6968
|
-
request.setType(
|
|
7075
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.CRON);
|
|
6969
7076
|
if (this.epoch) {
|
|
6970
7077
|
request.setEpoch(this.epoch);
|
|
6971
7078
|
}
|
|
6972
7079
|
break;
|
|
6973
7080
|
case "block" /* Block */:
|
|
6974
|
-
request.setType(
|
|
7081
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.BLOCK);
|
|
6975
7082
|
if (this.blockNumber) {
|
|
6976
7083
|
request.setBlockNumber(this.blockNumber);
|
|
6977
7084
|
}
|
|
6978
7085
|
break;
|
|
6979
7086
|
case "event" /* Event */:
|
|
6980
|
-
request.setType(
|
|
7087
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.EVENT);
|
|
6981
7088
|
if (this.blockNumber) {
|
|
6982
7089
|
request.setBlockNumber(this.blockNumber);
|
|
6983
7090
|
}
|
|
@@ -6989,10 +7096,10 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6989
7096
|
}
|
|
6990
7097
|
break;
|
|
6991
7098
|
case "manual" /* Manual */:
|
|
6992
|
-
request.setType(
|
|
7099
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.MANUAL);
|
|
6993
7100
|
break;
|
|
6994
7101
|
case "unset" /* Unset */:
|
|
6995
|
-
request.setType(
|
|
7102
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.UNSET);
|
|
6996
7103
|
break;
|
|
6997
7104
|
default:
|
|
6998
7105
|
throw new Error("Unsupported trigger type");
|
|
@@ -7003,7 +7110,7 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7003
7110
|
var metadata_default = TriggerMetadata2;
|
|
7004
7111
|
|
|
7005
7112
|
// src/models/step.ts
|
|
7006
|
-
var
|
|
7113
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
7007
7114
|
var Step = class _Step {
|
|
7008
7115
|
constructor(props) {
|
|
7009
7116
|
this.nodeId = props.nodeId;
|
|
@@ -7026,7 +7133,7 @@ var Step = class _Step {
|
|
|
7026
7133
|
});
|
|
7027
7134
|
}
|
|
7028
7135
|
toRequest() {
|
|
7029
|
-
const step = new
|
|
7136
|
+
const step = new avs_pb17.Execution.Step();
|
|
7030
7137
|
step.setNodeId(this.nodeId);
|
|
7031
7138
|
step.setSuccess(this.success);
|
|
7032
7139
|
step.setOutputData(this.outputData);
|
|
@@ -7066,7 +7173,7 @@ var Execution3 = class _Execution {
|
|
|
7066
7173
|
});
|
|
7067
7174
|
}
|
|
7068
7175
|
toRequest() {
|
|
7069
|
-
const execution = new
|
|
7176
|
+
const execution = new avs_pb18.Execution();
|
|
7070
7177
|
execution.setId(this.id);
|
|
7071
7178
|
execution.setStartAt(this.startAt);
|
|
7072
7179
|
execution.setEndAt(this.endAt);
|
|
@@ -7117,7 +7224,7 @@ var BaseClient = class {
|
|
|
7117
7224
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7118
7225
|
*/
|
|
7119
7226
|
async authWithAPIKey(address, apiKey, expiredAtEpoch) {
|
|
7120
|
-
const request = new
|
|
7227
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7121
7228
|
request.setOwner(address);
|
|
7122
7229
|
request.setExpiredAt(expiredAtEpoch);
|
|
7123
7230
|
request.setSignature(apiKey);
|
|
@@ -7132,7 +7239,7 @@ var BaseClient = class {
|
|
|
7132
7239
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7133
7240
|
*/
|
|
7134
7241
|
async authWithSignature(address, signature, expiredAtEpoch) {
|
|
7135
|
-
const request = new
|
|
7242
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7136
7243
|
request.setOwner(address);
|
|
7137
7244
|
request.setExpiredAt(expiredAtEpoch);
|
|
7138
7245
|
request.setSignature(signature);
|
|
@@ -7207,7 +7314,7 @@ var Client = class extends BaseClient {
|
|
|
7207
7314
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
7208
7315
|
*/
|
|
7209
7316
|
async getWallets(options) {
|
|
7210
|
-
const request = new
|
|
7317
|
+
const request = new avs_pb19.ListWalletReq();
|
|
7211
7318
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
7212
7319
|
return result.getItemsList().map((item) => item.toObject());
|
|
7213
7320
|
}
|
|
@@ -7219,7 +7326,7 @@ var Client = class extends BaseClient {
|
|
|
7219
7326
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
7220
7327
|
*/
|
|
7221
7328
|
async getWallet({ salt, factoryAddress }, options) {
|
|
7222
|
-
const request = new
|
|
7329
|
+
const request = new avs_pb19.GetWalletReq();
|
|
7223
7330
|
request.setSalt(salt);
|
|
7224
7331
|
if (factoryAddress) {
|
|
7225
7332
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -7256,7 +7363,7 @@ var Client = class extends BaseClient {
|
|
|
7256
7363
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
7257
7364
|
*/
|
|
7258
7365
|
async getWorkflows(addresses, options) {
|
|
7259
|
-
const request = new
|
|
7366
|
+
const request = new avs_pb19.ListTasksReq();
|
|
7260
7367
|
for (const a of addresses) {
|
|
7261
7368
|
request.addSmartWalletAddress(a);
|
|
7262
7369
|
}
|
|
@@ -7281,7 +7388,7 @@ var Client = class extends BaseClient {
|
|
|
7281
7388
|
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
7282
7389
|
*/
|
|
7283
7390
|
async getExecutions(workflows, options) {
|
|
7284
|
-
const request = new
|
|
7391
|
+
const request = new avs_pb19.ListExecutionsReq();
|
|
7285
7392
|
request.setTaskIdsList(workflows);
|
|
7286
7393
|
if (options?.cursor && options?.cursor != "") {
|
|
7287
7394
|
request.setCursor(options.cursor);
|
|
@@ -7302,12 +7409,29 @@ var Client = class extends BaseClient {
|
|
|
7302
7409
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
7303
7410
|
*/
|
|
7304
7411
|
async getExecution(taskId, executionId, options) {
|
|
7305
|
-
const request = new
|
|
7412
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7306
7413
|
request.setTaskId(taskId);
|
|
7307
7414
|
request.setExecutionId(executionId);
|
|
7308
7415
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
7309
7416
|
return execution_default.fromResponse(result);
|
|
7310
7417
|
}
|
|
7418
|
+
/**
|
|
7419
|
+
* Get status of an execution.
|
|
7420
|
+
*
|
|
7421
|
+
* 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.
|
|
7422
|
+
*
|
|
7423
|
+
* @param {string} workflowId - The workflow id
|
|
7424
|
+
* @param {string} executionId - The exectuion id
|
|
7425
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
7426
|
+
* @returns {Promise<ExecutionStatus>} - The result execution if it is existed
|
|
7427
|
+
*/
|
|
7428
|
+
async getExecutionStatus(taskId, executionId, options) {
|
|
7429
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7430
|
+
request.setTaskId(taskId);
|
|
7431
|
+
request.setExecutionId(executionId);
|
|
7432
|
+
const result = await this.sendGrpcRequest("getExecutionStatus", request, options);
|
|
7433
|
+
return result.getStatus();
|
|
7434
|
+
}
|
|
7311
7435
|
/**
|
|
7312
7436
|
* Get a workflow by its Id
|
|
7313
7437
|
* @param {string} id - The Id of the workflow
|
|
@@ -7315,7 +7439,7 @@ var Client = class extends BaseClient {
|
|
|
7315
7439
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
7316
7440
|
*/
|
|
7317
7441
|
async getWorkflow(id, options) {
|
|
7318
|
-
const request = new
|
|
7442
|
+
const request = new avs_pb19.IdReq();
|
|
7319
7443
|
request.setId(id);
|
|
7320
7444
|
const result = await this.sendGrpcRequest(
|
|
7321
7445
|
"getTask",
|
|
@@ -7337,7 +7461,7 @@ var Client = class extends BaseClient {
|
|
|
7337
7461
|
data,
|
|
7338
7462
|
isBlocking = false
|
|
7339
7463
|
}, options) {
|
|
7340
|
-
const request = new
|
|
7464
|
+
const request = new avs_pb19.UserTriggerTaskReq();
|
|
7341
7465
|
request.setTaskId(id);
|
|
7342
7466
|
request.setTriggerMetadata(new metadata_default(data).toRequest());
|
|
7343
7467
|
request.setIsBlocking(isBlocking);
|
|
@@ -7351,7 +7475,7 @@ var Client = class extends BaseClient {
|
|
|
7351
7475
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
7352
7476
|
*/
|
|
7353
7477
|
async cancelWorkflow(id, options) {
|
|
7354
|
-
const request = new
|
|
7478
|
+
const request = new avs_pb19.IdReq();
|
|
7355
7479
|
request.setId(id);
|
|
7356
7480
|
const result = await this.sendGrpcRequest(
|
|
7357
7481
|
"cancelTask",
|
|
@@ -7367,7 +7491,7 @@ var Client = class extends BaseClient {
|
|
|
7367
7491
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
7368
7492
|
*/
|
|
7369
7493
|
async deleteWorkflow(id, options) {
|
|
7370
|
-
const request = new
|
|
7494
|
+
const request = new avs_pb19.IdReq();
|
|
7371
7495
|
request.setId(id);
|
|
7372
7496
|
const result = await this.sendGrpcRequest(
|
|
7373
7497
|
"deleteTask",
|
|
@@ -7391,11 +7515,11 @@ export {
|
|
|
7391
7515
|
edge_default as Edge,
|
|
7392
7516
|
event_default as EventTrigger,
|
|
7393
7517
|
execution_default as Execution,
|
|
7518
|
+
ExecutionStatus2 as ExecutionStatus,
|
|
7394
7519
|
fixedTime_default as FixedTimeTrigger,
|
|
7395
7520
|
graphqlQuery_default as GraphQLQueryNode,
|
|
7396
7521
|
interface_default2 as Node,
|
|
7397
7522
|
factory_default2 as NodeFactory,
|
|
7398
|
-
NodeTypes,
|
|
7399
7523
|
restApi_default as RestAPINode,
|
|
7400
7524
|
interface_default as Trigger,
|
|
7401
7525
|
factory_default as TriggerFactory,
|