@avaprotocol/sdk-js 1.3.1-dev.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +77 -34
- package/dist/index.d.ts +77 -34
- package/dist/index.js +330 -211
- package/dist/index.mjs +329 -211
- package/package.json +2 -2
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);
|
|
@@ -3125,7 +3134,7 @@ var require_avs_pb = __commonJS({
|
|
|
3125
3134
|
smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
3126
3135
|
startAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
3127
3136
|
expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
3128
|
-
|
|
3137
|
+
name: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
|
3129
3138
|
completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
3130
3139
|
maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
3131
3140
|
totalExecution: jspb.Message.getFieldWithDefault(msg, 9, 0),
|
|
@@ -3201,7 +3210,7 @@ var require_avs_pb = __commonJS({
|
|
|
3201
3210
|
/** @type {string} */
|
|
3202
3211
|
reader.readString()
|
|
3203
3212
|
);
|
|
3204
|
-
msg.
|
|
3213
|
+
msg.setName(value);
|
|
3205
3214
|
break;
|
|
3206
3215
|
case 7:
|
|
3207
3216
|
var value = (
|
|
@@ -3302,7 +3311,7 @@ var require_avs_pb = __commonJS({
|
|
|
3302
3311
|
f
|
|
3303
3312
|
);
|
|
3304
3313
|
}
|
|
3305
|
-
f = message.
|
|
3314
|
+
f = message.getName();
|
|
3306
3315
|
if (f.length > 0) {
|
|
3307
3316
|
writer.writeString(
|
|
3308
3317
|
6,
|
|
@@ -3414,13 +3423,13 @@ var require_avs_pb = __commonJS({
|
|
|
3414
3423
|
proto.aggregator.Task.prototype.setExpiredAt = function(value) {
|
|
3415
3424
|
return jspb.Message.setProto3IntField(this, 5, value);
|
|
3416
3425
|
};
|
|
3417
|
-
proto.aggregator.Task.prototype.
|
|
3426
|
+
proto.aggregator.Task.prototype.getName = function() {
|
|
3418
3427
|
return (
|
|
3419
3428
|
/** @type {string} */
|
|
3420
3429
|
jspb.Message.getFieldWithDefault(this, 6, "")
|
|
3421
3430
|
);
|
|
3422
3431
|
};
|
|
3423
|
-
proto.aggregator.Task.prototype.
|
|
3432
|
+
proto.aggregator.Task.prototype.setName = function(value) {
|
|
3424
3433
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
3425
3434
|
};
|
|
3426
3435
|
proto.aggregator.Task.prototype.getCompletedAt = function() {
|
|
@@ -3525,7 +3534,7 @@ var require_avs_pb = __commonJS({
|
|
|
3525
3534
|
expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
3526
3535
|
maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
3527
3536
|
smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
3528
|
-
|
|
3537
|
+
name: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
|
3529
3538
|
nodesList: jspb.Message.toObjectList(
|
|
3530
3539
|
msg.getNodesList(),
|
|
3531
3540
|
proto.aggregator.TaskNode.toObject,
|
|
@@ -3593,7 +3602,7 @@ var require_avs_pb = __commonJS({
|
|
|
3593
3602
|
/** @type {string} */
|
|
3594
3603
|
reader.readString()
|
|
3595
3604
|
);
|
|
3596
|
-
msg.
|
|
3605
|
+
msg.setName(value);
|
|
3597
3606
|
break;
|
|
3598
3607
|
case 7:
|
|
3599
3608
|
var value = new proto.aggregator.TaskNode();
|
|
@@ -3655,7 +3664,7 @@ var require_avs_pb = __commonJS({
|
|
|
3655
3664
|
f
|
|
3656
3665
|
);
|
|
3657
3666
|
}
|
|
3658
|
-
f = message.
|
|
3667
|
+
f = message.getName();
|
|
3659
3668
|
if (f.length > 0) {
|
|
3660
3669
|
writer.writeString(
|
|
3661
3670
|
6,
|
|
@@ -3730,13 +3739,13 @@ var require_avs_pb = __commonJS({
|
|
|
3730
3739
|
proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) {
|
|
3731
3740
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
3732
3741
|
};
|
|
3733
|
-
proto.aggregator.CreateTaskReq.prototype.
|
|
3742
|
+
proto.aggregator.CreateTaskReq.prototype.getName = function() {
|
|
3734
3743
|
return (
|
|
3735
3744
|
/** @type {string} */
|
|
3736
3745
|
jspb.Message.getFieldWithDefault(this, 6, "")
|
|
3737
3746
|
);
|
|
3738
3747
|
};
|
|
3739
|
-
proto.aggregator.CreateTaskReq.prototype.
|
|
3748
|
+
proto.aggregator.CreateTaskReq.prototype.setName = function(value) {
|
|
3740
3749
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
3741
3750
|
};
|
|
3742
3751
|
proto.aggregator.CreateTaskReq.prototype.getNodesList = function() {
|
|
@@ -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() {
|
|
@@ -4454,7 +4463,7 @@ var require_avs_pb = __commonJS({
|
|
|
4454
4463
|
smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
4455
4464
|
startAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
4456
4465
|
expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
4457
|
-
|
|
4466
|
+
name: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
|
4458
4467
|
completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
4459
4468
|
maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
4460
4469
|
totalExecution: jspb.Message.getFieldWithDefault(msg, 9, 0),
|
|
@@ -4520,7 +4529,7 @@ var require_avs_pb = __commonJS({
|
|
|
4520
4529
|
/** @type {string} */
|
|
4521
4530
|
reader.readString()
|
|
4522
4531
|
);
|
|
4523
|
-
msg.
|
|
4532
|
+
msg.setName(value);
|
|
4524
4533
|
break;
|
|
4525
4534
|
case 7:
|
|
4526
4535
|
var value = (
|
|
@@ -4611,7 +4620,7 @@ var require_avs_pb = __commonJS({
|
|
|
4611
4620
|
f
|
|
4612
4621
|
);
|
|
4613
4622
|
}
|
|
4614
|
-
f = message.
|
|
4623
|
+
f = message.getName();
|
|
4615
4624
|
if (f.length > 0) {
|
|
4616
4625
|
writer.writeString(
|
|
4617
4626
|
6,
|
|
@@ -4707,13 +4716,13 @@ var require_avs_pb = __commonJS({
|
|
|
4707
4716
|
proto.aggregator.ListTasksResp.Item.prototype.setExpiredAt = function(value) {
|
|
4708
4717
|
return jspb.Message.setProto3IntField(this, 5, value);
|
|
4709
4718
|
};
|
|
4710
|
-
proto.aggregator.ListTasksResp.Item.prototype.
|
|
4719
|
+
proto.aggregator.ListTasksResp.Item.prototype.getName = function() {
|
|
4711
4720
|
return (
|
|
4712
4721
|
/** @type {string} */
|
|
4713
4722
|
jspb.Message.getFieldWithDefault(this, 6, "")
|
|
4714
4723
|
);
|
|
4715
4724
|
};
|
|
4716
|
-
proto.aggregator.ListTasksResp.Item.prototype.
|
|
4725
|
+
proto.aggregator.ListTasksResp.Item.prototype.setName = function(value) {
|
|
4717
4726
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
4718
4727
|
};
|
|
4719
4728
|
proto.aggregator.ListTasksResp.Item.prototype.getCompletedAt = 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));
|
|
5947
6025
|
}
|
|
5948
|
-
function
|
|
5949
|
-
if (!(arg instanceof
|
|
5950
|
-
throw new Error("Expected argument of type aggregator.
|
|
6026
|
+
function serialize_aggregator_ExecutionReq(arg) {
|
|
6027
|
+
if (!(arg instanceof avs_pb20.ExecutionReq)) {
|
|
6028
|
+
throw new Error("Expected argument of type aggregator.ExecutionReq");
|
|
5951
6029
|
}
|
|
5952
6030
|
return Buffer.from(arg.serializeBinary());
|
|
5953
6031
|
}
|
|
5954
|
-
function
|
|
5955
|
-
return
|
|
6032
|
+
function deserialize_aggregator_ExecutionReq(buffer_arg) {
|
|
6033
|
+
return avs_pb20.ExecutionReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
6034
|
+
}
|
|
6035
|
+
function serialize_aggregator_ExecutionStatusResp(arg) {
|
|
6036
|
+
if (!(arg instanceof avs_pb20.ExecutionStatusResp)) {
|
|
6037
|
+
throw new Error("Expected argument of type aggregator.ExecutionStatusResp");
|
|
6038
|
+
}
|
|
6039
|
+
return Buffer.from(arg.serializeBinary());
|
|
6040
|
+
}
|
|
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,6 +6362,7 @@ __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,
|
|
@@ -6289,11 +6388,11 @@ var getKeyRequestMessage = (address, expiredAt) => {
|
|
|
6289
6388
|
|
|
6290
6389
|
// src/index.ts
|
|
6291
6390
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
6292
|
-
var
|
|
6391
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
6293
6392
|
|
|
6294
6393
|
// src/models/workflow.ts
|
|
6295
6394
|
var import_lodash3 = __toESM(require("lodash"));
|
|
6296
|
-
var
|
|
6395
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
6297
6396
|
|
|
6298
6397
|
// src/models/edge.ts
|
|
6299
6398
|
var avs_pb = __toESM(require_avs_pb());
|
|
@@ -6317,7 +6416,7 @@ var Edge = class _Edge {
|
|
|
6317
6416
|
var edge_default = Edge;
|
|
6318
6417
|
|
|
6319
6418
|
// src/models/trigger/block.ts
|
|
6320
|
-
var
|
|
6419
|
+
var avs_pb3 = __toESM(require_avs_pb());
|
|
6321
6420
|
|
|
6322
6421
|
// src/models/trigger/interface.ts
|
|
6323
6422
|
var Trigger = class {
|
|
@@ -6337,6 +6436,7 @@ var Trigger = class {
|
|
|
6337
6436
|
var interface_default = Trigger;
|
|
6338
6437
|
|
|
6339
6438
|
// src/types.ts
|
|
6439
|
+
var avs_pb2 = __toESM(require_avs_pb());
|
|
6340
6440
|
var AUTH_KEY_HEADER = "authkey";
|
|
6341
6441
|
var DEFAULT_LIMIT = 10;
|
|
6342
6442
|
var WorkflowStatus = /* @__PURE__ */ ((WorkflowStatus2) => {
|
|
@@ -6356,6 +6456,7 @@ var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
|
|
|
6356
6456
|
TriggerType2["Unset"] = "unset";
|
|
6357
6457
|
return TriggerType2;
|
|
6358
6458
|
})(TriggerType || {});
|
|
6459
|
+
var ExecutionStatus2 = avs_pb2.ExecutionStatus;
|
|
6359
6460
|
|
|
6360
6461
|
// src/models/trigger/block.ts
|
|
6361
6462
|
var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
@@ -6363,12 +6464,12 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6363
6464
|
super({ ...props, type: "block" /* Block */, data: props.data });
|
|
6364
6465
|
}
|
|
6365
6466
|
toRequest() {
|
|
6366
|
-
const request = new
|
|
6467
|
+
const request = new avs_pb3.TaskTrigger();
|
|
6367
6468
|
request.setName(this.name);
|
|
6368
6469
|
if (!this.data) {
|
|
6369
6470
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6370
6471
|
}
|
|
6371
|
-
const condition = new
|
|
6472
|
+
const condition = new avs_pb3.BlockCondition();
|
|
6372
6473
|
condition.setInterval(this.data.interval);
|
|
6373
6474
|
request.setBlock(condition);
|
|
6374
6475
|
return request;
|
|
@@ -6385,7 +6486,7 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
|
|
|
6385
6486
|
var block_default = BlockTrigger;
|
|
6386
6487
|
|
|
6387
6488
|
// src/models/trigger/cron.ts
|
|
6388
|
-
var
|
|
6489
|
+
var avs_pb4 = __toESM(require_avs_pb());
|
|
6389
6490
|
var CronTrigger = class _CronTrigger extends interface_default {
|
|
6390
6491
|
constructor(props) {
|
|
6391
6492
|
super({ ...props, type: "cron" /* Cron */, data: props.data });
|
|
@@ -6396,12 +6497,12 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6396
6497
|
});
|
|
6397
6498
|
}
|
|
6398
6499
|
toRequest() {
|
|
6399
|
-
const request = new
|
|
6500
|
+
const request = new avs_pb4.TaskTrigger();
|
|
6400
6501
|
request.setName(this.name);
|
|
6401
6502
|
if (!this.data) {
|
|
6402
6503
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6403
6504
|
}
|
|
6404
|
-
const condition = new
|
|
6505
|
+
const condition = new avs_pb4.CronCondition();
|
|
6405
6506
|
condition.setScheduleList(this.data.scheduleList);
|
|
6406
6507
|
request.setCron(condition);
|
|
6407
6508
|
console.log("CronTrigger.toRequest.request:", request.toObject());
|
|
@@ -6420,7 +6521,7 @@ var CronTrigger = class _CronTrigger extends interface_default {
|
|
|
6420
6521
|
var cron_default = CronTrigger;
|
|
6421
6522
|
|
|
6422
6523
|
// src/models/trigger/event.ts
|
|
6423
|
-
var
|
|
6524
|
+
var avs_pb5 = __toESM(require_avs_pb());
|
|
6424
6525
|
var EventTrigger = class _EventTrigger extends interface_default {
|
|
6425
6526
|
constructor(props) {
|
|
6426
6527
|
super({ ...props, type: "event" /* Event */, data: props.data });
|
|
@@ -6431,12 +6532,12 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6431
6532
|
});
|
|
6432
6533
|
}
|
|
6433
6534
|
toRequest() {
|
|
6434
|
-
const request = new
|
|
6535
|
+
const request = new avs_pb5.TaskTrigger();
|
|
6435
6536
|
request.setName(this.name);
|
|
6436
6537
|
if (!this.data) {
|
|
6437
6538
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6438
6539
|
}
|
|
6439
|
-
const condition = new
|
|
6540
|
+
const condition = new avs_pb5.EventCondition();
|
|
6440
6541
|
condition.setExpression(this.data.expression);
|
|
6441
6542
|
request.setEvent(condition);
|
|
6442
6543
|
console.log("EventTrigger.toRequest.request:", request.toObject());
|
|
@@ -6455,7 +6556,7 @@ var EventTrigger = class _EventTrigger extends interface_default {
|
|
|
6455
6556
|
var event_default = EventTrigger;
|
|
6456
6557
|
|
|
6457
6558
|
// src/models/trigger/fixedTime.ts
|
|
6458
|
-
var
|
|
6559
|
+
var avs_pb6 = __toESM(require_avs_pb());
|
|
6459
6560
|
var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
6460
6561
|
constructor(props) {
|
|
6461
6562
|
super({ ...props, type: "fixed_time" /* FixedTime */, data: props.data });
|
|
@@ -6466,12 +6567,12 @@ var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
|
|
|
6466
6567
|
});
|
|
6467
6568
|
}
|
|
6468
6569
|
toRequest() {
|
|
6469
|
-
const request = new
|
|
6570
|
+
const request = new avs_pb6.TaskTrigger();
|
|
6470
6571
|
request.setName(this.name);
|
|
6471
6572
|
if (!this.data) {
|
|
6472
6573
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
6473
6574
|
}
|
|
6474
|
-
const condition = new
|
|
6575
|
+
const condition = new avs_pb6.FixedTimeCondition();
|
|
6475
6576
|
condition.setEpochsList(this.data.epochsList);
|
|
6476
6577
|
request.setFixedTime(condition);
|
|
6477
6578
|
console.log("FixedTimeTrigger.toRequest.request:", request.toObject());
|
|
@@ -6535,7 +6636,7 @@ var factory_default = TriggerFactory;
|
|
|
6535
6636
|
var import_lodash2 = __toESM(require("lodash"));
|
|
6536
6637
|
|
|
6537
6638
|
// src/models/node/interface.ts
|
|
6538
|
-
var
|
|
6639
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
6539
6640
|
var import_types6 = require("@avaprotocol/types");
|
|
6540
6641
|
var import_lodash = __toESM(require("lodash"));
|
|
6541
6642
|
var Node = class {
|
|
@@ -6546,9 +6647,9 @@ var Node = class {
|
|
|
6546
6647
|
this.data = props.data;
|
|
6547
6648
|
}
|
|
6548
6649
|
toRequest() {
|
|
6549
|
-
const request = new
|
|
6650
|
+
const request = new avs_pb7.TaskNode();
|
|
6550
6651
|
const raw = request.serializeBinary();
|
|
6551
|
-
const parsed =
|
|
6652
|
+
const parsed = avs_pb7.TaskNode.deserializeBinary(raw);
|
|
6552
6653
|
if (!import_lodash.default.isEqual(request, parsed)) {
|
|
6553
6654
|
throw new Error("Invalid request object");
|
|
6554
6655
|
}
|
|
@@ -6558,7 +6659,7 @@ var Node = class {
|
|
|
6558
6659
|
var interface_default2 = Node;
|
|
6559
6660
|
|
|
6560
6661
|
// src/models/node/contractWrite.ts
|
|
6561
|
-
var
|
|
6662
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
6562
6663
|
var import_types7 = require("@avaprotocol/types");
|
|
6563
6664
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
6564
6665
|
constructor(props) {
|
|
@@ -6573,10 +6674,10 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
6573
6674
|
});
|
|
6574
6675
|
}
|
|
6575
6676
|
toRequest() {
|
|
6576
|
-
const request = new
|
|
6677
|
+
const request = new avs_pb8.TaskNode();
|
|
6577
6678
|
request.setId(this.id);
|
|
6578
6679
|
request.setName(this.name);
|
|
6579
|
-
const nodeData = new
|
|
6680
|
+
const nodeData = new avs_pb8.ContractWriteNode();
|
|
6580
6681
|
nodeData.setContractAddress(
|
|
6581
6682
|
this.data.contractAddress
|
|
6582
6683
|
);
|
|
@@ -6589,9 +6690,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
6589
6690
|
var contractWrite_default = ContractWriteNode2;
|
|
6590
6691
|
|
|
6591
6692
|
// src/models/node/customCode.ts
|
|
6592
|
-
var
|
|
6693
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
6593
6694
|
var import_types8 = require("@avaprotocol/types");
|
|
6594
|
-
var CustomCodeLangs =
|
|
6695
|
+
var CustomCodeLangs = avs_pb9.CustomCodeLang;
|
|
6595
6696
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
6596
6697
|
constructor(props) {
|
|
6597
6698
|
super({ ...props, type: import_types8.NodeType.CustomCode, data: props.data });
|
|
@@ -6605,10 +6706,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
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,7 +6719,7 @@ 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());
|
|
6622
6723
|
var import_types9 = require("@avaprotocol/types");
|
|
6623
6724
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
6624
6725
|
constructor(props) {
|
|
@@ -6637,10 +6738,10 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6637
6738
|
});
|
|
6638
6739
|
}
|
|
6639
6740
|
toRequest() {
|
|
6640
|
-
const request = new
|
|
6741
|
+
const request = new avs_pb10.TaskNode();
|
|
6641
6742
|
request.setId(this.id);
|
|
6642
6743
|
request.setName(this.name);
|
|
6643
|
-
const nodeData = new
|
|
6744
|
+
const nodeData = new avs_pb10.GraphQLQueryNode();
|
|
6644
6745
|
nodeData.setUrl(this.data.url);
|
|
6645
6746
|
nodeData.setQuery(this.data.query);
|
|
6646
6747
|
const variables = this.data.variablesMap;
|
|
@@ -6655,7 +6756,7 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6655
6756
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
6656
6757
|
|
|
6657
6758
|
// src/models/node/restApi.ts
|
|
6658
|
-
var
|
|
6759
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
6659
6760
|
var import_types10 = require("@avaprotocol/types");
|
|
6660
6761
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
6661
6762
|
constructor(props) {
|
|
@@ -6670,10 +6771,10 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6670
6771
|
});
|
|
6671
6772
|
}
|
|
6672
6773
|
toRequest() {
|
|
6673
|
-
const request = new
|
|
6774
|
+
const request = new avs_pb11.TaskNode();
|
|
6674
6775
|
request.setId(this.id);
|
|
6675
6776
|
request.setName(this.name);
|
|
6676
|
-
const nodeData = new
|
|
6777
|
+
const nodeData = new avs_pb11.RestAPINode();
|
|
6677
6778
|
nodeData.setUrl(this.data.url);
|
|
6678
6779
|
nodeData.setMethod(this.data.method);
|
|
6679
6780
|
nodeData.setBody(this.data.body);
|
|
@@ -6689,7 +6790,7 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6689
6790
|
var restApi_default = RestAPINode2;
|
|
6690
6791
|
|
|
6691
6792
|
// src/models/node/contractRead.ts
|
|
6692
|
-
var
|
|
6793
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
6693
6794
|
var import_types11 = require("@avaprotocol/types");
|
|
6694
6795
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
6695
6796
|
constructor(props) {
|
|
@@ -6704,10 +6805,10 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6704
6805
|
});
|
|
6705
6806
|
}
|
|
6706
6807
|
toRequest() {
|
|
6707
|
-
const request = new
|
|
6808
|
+
const request = new avs_pb12.TaskNode();
|
|
6708
6809
|
request.setId(this.id);
|
|
6709
6810
|
request.setName(this.name);
|
|
6710
|
-
const nodeData = new
|
|
6811
|
+
const nodeData = new avs_pb12.ContractReadNode();
|
|
6711
6812
|
nodeData.setContractAddress(
|
|
6712
6813
|
this.data.contractAddress
|
|
6713
6814
|
);
|
|
@@ -6721,7 +6822,7 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6721
6822
|
var contractRead_default = ContractReadNode2;
|
|
6722
6823
|
|
|
6723
6824
|
// src/models/node/ethTransfer.ts
|
|
6724
|
-
var
|
|
6825
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
6725
6826
|
var import_types12 = require("@avaprotocol/types");
|
|
6726
6827
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
6727
6828
|
constructor(props) {
|
|
@@ -6736,10 +6837,10 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
6736
6837
|
});
|
|
6737
6838
|
}
|
|
6738
6839
|
toRequest() {
|
|
6739
|
-
const request = new
|
|
6840
|
+
const request = new avs_pb13.TaskNode();
|
|
6740
6841
|
request.setId(this.id);
|
|
6741
6842
|
request.setName(this.name);
|
|
6742
|
-
const nodeData = new
|
|
6843
|
+
const nodeData = new avs_pb13.ETHTransferNode();
|
|
6743
6844
|
nodeData.setDestination(this.data.destination);
|
|
6744
6845
|
nodeData.setAmount(this.data.amount);
|
|
6745
6846
|
request.setEthTransfer(nodeData);
|
|
@@ -6750,7 +6851,7 @@ var ethTransfer_default = ETHTransferNode2;
|
|
|
6750
6851
|
|
|
6751
6852
|
// src/models/node/branch.ts
|
|
6752
6853
|
var import_types13 = require("@avaprotocol/types");
|
|
6753
|
-
var
|
|
6854
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
6754
6855
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
6755
6856
|
constructor(props) {
|
|
6756
6857
|
super({ ...props, type: import_types13.NodeType.Branch, data: props.data });
|
|
@@ -6764,13 +6865,13 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
6764
6865
|
});
|
|
6765
6866
|
}
|
|
6766
6867
|
toRequest() {
|
|
6767
|
-
const request = new
|
|
6868
|
+
const request = new avs_pb14.TaskNode();
|
|
6768
6869
|
request.setId(this.id);
|
|
6769
6870
|
request.setName(this.name);
|
|
6770
|
-
const nodeData = new
|
|
6871
|
+
const nodeData = new avs_pb14.BranchNode();
|
|
6771
6872
|
nodeData.setConditionsList(
|
|
6772
6873
|
this.data.conditionsList.map((condition) => {
|
|
6773
|
-
const conditionObj = new
|
|
6874
|
+
const conditionObj = new avs_pb14.Condition();
|
|
6774
6875
|
conditionObj.setId(condition.id);
|
|
6775
6876
|
conditionObj.setType(condition.type);
|
|
6776
6877
|
return conditionObj;
|
|
@@ -6835,11 +6936,11 @@ var factory_default2 = NodeFactory;
|
|
|
6835
6936
|
// src/models/workflow.ts
|
|
6836
6937
|
function convertStatusToString(status) {
|
|
6837
6938
|
const conversionMap = {
|
|
6838
|
-
[
|
|
6839
|
-
[
|
|
6840
|
-
[
|
|
6841
|
-
[
|
|
6842
|
-
[
|
|
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 */
|
|
6843
6944
|
};
|
|
6844
6945
|
return conversionMap[status];
|
|
6845
6946
|
}
|
|
@@ -6861,7 +6962,7 @@ var Workflow = class _Workflow {
|
|
|
6861
6962
|
this.maxExecution = props.maxExecution;
|
|
6862
6963
|
this.id = props.id;
|
|
6863
6964
|
this.owner = props.owner;
|
|
6864
|
-
this.
|
|
6965
|
+
this.name = props.name;
|
|
6865
6966
|
this.status = props.status;
|
|
6866
6967
|
this.completedAt = props.completedAt;
|
|
6867
6968
|
this.totalExecution = props.totalExecution;
|
|
@@ -6892,7 +6993,7 @@ var Workflow = class _Workflow {
|
|
|
6892
6993
|
startAt: obj.getStartAt(),
|
|
6893
6994
|
expiredAt: obj.getExpiredAt(),
|
|
6894
6995
|
maxExecution: obj.getMaxExecution(),
|
|
6895
|
-
|
|
6996
|
+
name: obj.getName(),
|
|
6896
6997
|
status: convertStatusToString(obj.getStatus()),
|
|
6897
6998
|
completedAt: obj.getCompletedAt(),
|
|
6898
6999
|
totalExecution: obj.getTotalExecution(),
|
|
@@ -6921,13 +7022,13 @@ var Workflow = class _Workflow {
|
|
|
6921
7022
|
edges: [],
|
|
6922
7023
|
completedAt: obj.getCompletedAt(),
|
|
6923
7024
|
status: convertStatusToString(obj.getStatus()),
|
|
6924
|
-
|
|
7025
|
+
name: obj.getName(),
|
|
6925
7026
|
totalExecution: obj.getTotalExecution(),
|
|
6926
7027
|
lastRanAt: obj.getLastRanAt()
|
|
6927
7028
|
});
|
|
6928
7029
|
}
|
|
6929
7030
|
toRequest() {
|
|
6930
|
-
const request = new
|
|
7031
|
+
const request = new avs_pb15.CreateTaskReq();
|
|
6931
7032
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
6932
7033
|
request.setTrigger(this.trigger.toRequest());
|
|
6933
7034
|
import_lodash3.default.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -6935,8 +7036,8 @@ var Workflow = class _Workflow {
|
|
|
6935
7036
|
request.setStartAt(this.startAt);
|
|
6936
7037
|
request.setExpiredAt(this.expiredAt);
|
|
6937
7038
|
request.setMaxExecution(this.maxExecution);
|
|
6938
|
-
if (this.
|
|
6939
|
-
request.
|
|
7039
|
+
if (this.name) {
|
|
7040
|
+
request.setName(this.name);
|
|
6940
7041
|
}
|
|
6941
7042
|
return request;
|
|
6942
7043
|
}
|
|
@@ -6944,18 +7045,18 @@ var Workflow = class _Workflow {
|
|
|
6944
7045
|
var workflow_default = Workflow;
|
|
6945
7046
|
|
|
6946
7047
|
// src/models/execution.ts
|
|
6947
|
-
var
|
|
7048
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
6948
7049
|
|
|
6949
7050
|
// src/models/trigger/metadata.ts
|
|
6950
|
-
var
|
|
7051
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
6951
7052
|
var convertTriggerType = (grpcType) => {
|
|
6952
7053
|
const conversionMap = {
|
|
6953
|
-
[
|
|
6954
|
-
[
|
|
6955
|
-
[
|
|
6956
|
-
[
|
|
6957
|
-
[
|
|
6958
|
-
[
|
|
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 */
|
|
6959
7060
|
};
|
|
6960
7061
|
return conversionMap[grpcType];
|
|
6961
7062
|
};
|
|
@@ -6992,28 +7093,28 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6992
7093
|
});
|
|
6993
7094
|
}
|
|
6994
7095
|
toRequest() {
|
|
6995
|
-
const request = new
|
|
7096
|
+
const request = new avs_pb16.TriggerMetadata();
|
|
6996
7097
|
switch (this.type) {
|
|
6997
7098
|
case "fixed_time" /* FixedTime */:
|
|
6998
|
-
request.setType(
|
|
7099
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME);
|
|
6999
7100
|
if (this.epoch) {
|
|
7000
7101
|
request.setEpoch(this.epoch);
|
|
7001
7102
|
}
|
|
7002
7103
|
break;
|
|
7003
7104
|
case "cron" /* Cron */:
|
|
7004
|
-
request.setType(
|
|
7105
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.CRON);
|
|
7005
7106
|
if (this.epoch) {
|
|
7006
7107
|
request.setEpoch(this.epoch);
|
|
7007
7108
|
}
|
|
7008
7109
|
break;
|
|
7009
7110
|
case "block" /* Block */:
|
|
7010
|
-
request.setType(
|
|
7111
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.BLOCK);
|
|
7011
7112
|
if (this.blockNumber) {
|
|
7012
7113
|
request.setBlockNumber(this.blockNumber);
|
|
7013
7114
|
}
|
|
7014
7115
|
break;
|
|
7015
7116
|
case "event" /* Event */:
|
|
7016
|
-
request.setType(
|
|
7117
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.EVENT);
|
|
7017
7118
|
if (this.blockNumber) {
|
|
7018
7119
|
request.setBlockNumber(this.blockNumber);
|
|
7019
7120
|
}
|
|
@@ -7025,10 +7126,10 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7025
7126
|
}
|
|
7026
7127
|
break;
|
|
7027
7128
|
case "manual" /* Manual */:
|
|
7028
|
-
request.setType(
|
|
7129
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.MANUAL);
|
|
7029
7130
|
break;
|
|
7030
7131
|
case "unset" /* Unset */:
|
|
7031
|
-
request.setType(
|
|
7132
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.UNSET);
|
|
7032
7133
|
break;
|
|
7033
7134
|
default:
|
|
7034
7135
|
throw new Error("Unsupported trigger type");
|
|
@@ -7039,7 +7140,7 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7039
7140
|
var metadata_default = TriggerMetadata2;
|
|
7040
7141
|
|
|
7041
7142
|
// src/models/step.ts
|
|
7042
|
-
var
|
|
7143
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
7043
7144
|
var Step = class _Step {
|
|
7044
7145
|
constructor(props) {
|
|
7045
7146
|
this.nodeId = props.nodeId;
|
|
@@ -7062,7 +7163,7 @@ var Step = class _Step {
|
|
|
7062
7163
|
});
|
|
7063
7164
|
}
|
|
7064
7165
|
toRequest() {
|
|
7065
|
-
const step = new
|
|
7166
|
+
const step = new avs_pb17.Execution.Step();
|
|
7066
7167
|
step.setNodeId(this.nodeId);
|
|
7067
7168
|
step.setSuccess(this.success);
|
|
7068
7169
|
step.setOutputData(this.outputData);
|
|
@@ -7102,7 +7203,7 @@ var Execution3 = class _Execution {
|
|
|
7102
7203
|
});
|
|
7103
7204
|
}
|
|
7104
7205
|
toRequest() {
|
|
7105
|
-
const execution = new
|
|
7206
|
+
const execution = new avs_pb18.Execution();
|
|
7106
7207
|
execution.setId(this.id);
|
|
7107
7208
|
execution.setStartAt(this.startAt);
|
|
7108
7209
|
execution.setEndAt(this.endAt);
|
|
@@ -7153,7 +7254,7 @@ var BaseClient = class {
|
|
|
7153
7254
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7154
7255
|
*/
|
|
7155
7256
|
async authWithAPIKey(address, apiKey, expiredAtEpoch) {
|
|
7156
|
-
const request = new
|
|
7257
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7157
7258
|
request.setOwner(address);
|
|
7158
7259
|
request.setExpiredAt(expiredAtEpoch);
|
|
7159
7260
|
request.setSignature(apiKey);
|
|
@@ -7168,7 +7269,7 @@ var BaseClient = class {
|
|
|
7168
7269
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7169
7270
|
*/
|
|
7170
7271
|
async authWithSignature(address, signature, expiredAtEpoch) {
|
|
7171
|
-
const request = new
|
|
7272
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7172
7273
|
request.setOwner(address);
|
|
7173
7274
|
request.setExpiredAt(expiredAtEpoch);
|
|
7174
7275
|
request.setSignature(signature);
|
|
@@ -7243,7 +7344,7 @@ var Client = class extends BaseClient {
|
|
|
7243
7344
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
7244
7345
|
*/
|
|
7245
7346
|
async getWallets(options) {
|
|
7246
|
-
const request = new
|
|
7347
|
+
const request = new avs_pb19.ListWalletReq();
|
|
7247
7348
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
7248
7349
|
return result.getItemsList().map((item) => item.toObject());
|
|
7249
7350
|
}
|
|
@@ -7255,7 +7356,7 @@ var Client = class extends BaseClient {
|
|
|
7255
7356
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
7256
7357
|
*/
|
|
7257
7358
|
async getWallet({ salt, factoryAddress }, options) {
|
|
7258
|
-
const request = new
|
|
7359
|
+
const request = new avs_pb19.GetWalletReq();
|
|
7259
7360
|
request.setSalt(salt);
|
|
7260
7361
|
if (factoryAddress) {
|
|
7261
7362
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -7292,7 +7393,7 @@ var Client = class extends BaseClient {
|
|
|
7292
7393
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
7293
7394
|
*/
|
|
7294
7395
|
async getWorkflows(addresses, options) {
|
|
7295
|
-
const request = new
|
|
7396
|
+
const request = new avs_pb19.ListTasksReq();
|
|
7296
7397
|
for (const a of addresses) {
|
|
7297
7398
|
request.addSmartWalletAddress(a);
|
|
7298
7399
|
}
|
|
@@ -7317,7 +7418,7 @@ var Client = class extends BaseClient {
|
|
|
7317
7418
|
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
7318
7419
|
*/
|
|
7319
7420
|
async getExecutions(workflows, options) {
|
|
7320
|
-
const request = new
|
|
7421
|
+
const request = new avs_pb19.ListExecutionsReq();
|
|
7321
7422
|
request.setTaskIdsList(workflows);
|
|
7322
7423
|
if (options?.cursor && options?.cursor != "") {
|
|
7323
7424
|
request.setCursor(options.cursor);
|
|
@@ -7338,12 +7439,29 @@ var Client = class extends BaseClient {
|
|
|
7338
7439
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
7339
7440
|
*/
|
|
7340
7441
|
async getExecution(taskId, executionId, options) {
|
|
7341
|
-
const request = new
|
|
7442
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7342
7443
|
request.setTaskId(taskId);
|
|
7343
7444
|
request.setExecutionId(executionId);
|
|
7344
7445
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
7345
7446
|
return execution_default.fromResponse(result);
|
|
7346
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
|
+
}
|
|
7347
7465
|
/**
|
|
7348
7466
|
* Get a workflow by its Id
|
|
7349
7467
|
* @param {string} id - The Id of the workflow
|
|
@@ -7351,7 +7469,7 @@ var Client = class extends BaseClient {
|
|
|
7351
7469
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
7352
7470
|
*/
|
|
7353
7471
|
async getWorkflow(id, options) {
|
|
7354
|
-
const request = new
|
|
7472
|
+
const request = new avs_pb19.IdReq();
|
|
7355
7473
|
request.setId(id);
|
|
7356
7474
|
const result = await this.sendGrpcRequest(
|
|
7357
7475
|
"getTask",
|
|
@@ -7373,7 +7491,7 @@ var Client = class extends BaseClient {
|
|
|
7373
7491
|
data,
|
|
7374
7492
|
isBlocking = false
|
|
7375
7493
|
}, options) {
|
|
7376
|
-
const request = new
|
|
7494
|
+
const request = new avs_pb19.UserTriggerTaskReq();
|
|
7377
7495
|
request.setTaskId(id);
|
|
7378
7496
|
request.setTriggerMetadata(new metadata_default(data).toRequest());
|
|
7379
7497
|
request.setIsBlocking(isBlocking);
|
|
@@ -7387,7 +7505,7 @@ var Client = class extends BaseClient {
|
|
|
7387
7505
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
7388
7506
|
*/
|
|
7389
7507
|
async cancelWorkflow(id, options) {
|
|
7390
|
-
const request = new
|
|
7508
|
+
const request = new avs_pb19.IdReq();
|
|
7391
7509
|
request.setId(id);
|
|
7392
7510
|
const result = await this.sendGrpcRequest(
|
|
7393
7511
|
"cancelTask",
|
|
@@ -7403,7 +7521,7 @@ var Client = class extends BaseClient {
|
|
|
7403
7521
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
7404
7522
|
*/
|
|
7405
7523
|
async deleteWorkflow(id, options) {
|
|
7406
|
-
const request = new
|
|
7524
|
+
const request = new avs_pb19.IdReq();
|
|
7407
7525
|
request.setId(id);
|
|
7408
7526
|
const result = await this.sendGrpcRequest(
|
|
7409
7527
|
"deleteTask",
|
|
@@ -7428,6 +7546,7 @@ var Client = class extends BaseClient {
|
|
|
7428
7546
|
Edge,
|
|
7429
7547
|
EventTrigger,
|
|
7430
7548
|
Execution,
|
|
7549
|
+
ExecutionStatus,
|
|
7431
7550
|
FixedTimeTrigger,
|
|
7432
7551
|
GraphQLQueryNode,
|
|
7433
7552
|
Node,
|