@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.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);
|
|
@@ -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"(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));
|
|
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,
|
|
@@ -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,7 +6606,7 @@ 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());
|
|
6510
6610
|
import { NodeType } from "@avaprotocol/types";
|
|
6511
6611
|
import _ from "lodash";
|
|
6512
6612
|
var Node = class {
|
|
@@ -6517,9 +6617,9 @@ var Node = class {
|
|
|
6517
6617
|
this.data = props.data;
|
|
6518
6618
|
}
|
|
6519
6619
|
toRequest() {
|
|
6520
|
-
const request = new
|
|
6620
|
+
const request = new avs_pb7.TaskNode();
|
|
6521
6621
|
const raw = request.serializeBinary();
|
|
6522
|
-
const parsed =
|
|
6622
|
+
const parsed = avs_pb7.TaskNode.deserializeBinary(raw);
|
|
6523
6623
|
if (!_.isEqual(request, parsed)) {
|
|
6524
6624
|
throw new Error("Invalid request object");
|
|
6525
6625
|
}
|
|
@@ -6529,7 +6629,7 @@ var Node = class {
|
|
|
6529
6629
|
var interface_default2 = Node;
|
|
6530
6630
|
|
|
6531
6631
|
// src/models/node/contractWrite.ts
|
|
6532
|
-
var
|
|
6632
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
6533
6633
|
import { NodeType as NodeType2 } from "@avaprotocol/types";
|
|
6534
6634
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
6535
6635
|
constructor(props) {
|
|
@@ -6544,10 +6644,10 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
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,9 +6660,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
6560
6660
|
var contractWrite_default = ContractWriteNode2;
|
|
6561
6661
|
|
|
6562
6662
|
// src/models/node/customCode.ts
|
|
6563
|
-
var
|
|
6663
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
6564
6664
|
import { NodeType as NodeType3 } from "@avaprotocol/types";
|
|
6565
|
-
var CustomCodeLangs =
|
|
6665
|
+
var CustomCodeLangs = avs_pb9.CustomCodeLang;
|
|
6566
6666
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
6567
6667
|
constructor(props) {
|
|
6568
6668
|
super({ ...props, type: NodeType3.CustomCode, data: props.data });
|
|
@@ -6576,10 +6676,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
6576
6676
|
});
|
|
6577
6677
|
}
|
|
6578
6678
|
toRequest() {
|
|
6579
|
-
const request = new
|
|
6679
|
+
const request = new avs_pb9.TaskNode();
|
|
6580
6680
|
request.setId(this.id);
|
|
6581
6681
|
request.setName(this.name);
|
|
6582
|
-
const nodeData = new
|
|
6682
|
+
const nodeData = new avs_pb9.CustomCodeNode();
|
|
6583
6683
|
nodeData.setLang(this.data.lang);
|
|
6584
6684
|
nodeData.setSource(this.data.source);
|
|
6585
6685
|
request.setCustomCode(nodeData);
|
|
@@ -6589,7 +6689,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
6589
6689
|
var customCode_default = CustomCodeNode2;
|
|
6590
6690
|
|
|
6591
6691
|
// src/models/node/graphqlQuery.ts
|
|
6592
|
-
var
|
|
6692
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
6593
6693
|
import { NodeType as NodeType4 } from "@avaprotocol/types";
|
|
6594
6694
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
6595
6695
|
constructor(props) {
|
|
@@ -6608,10 +6708,10 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6608
6708
|
});
|
|
6609
6709
|
}
|
|
6610
6710
|
toRequest() {
|
|
6611
|
-
const request = new
|
|
6711
|
+
const request = new avs_pb10.TaskNode();
|
|
6612
6712
|
request.setId(this.id);
|
|
6613
6713
|
request.setName(this.name);
|
|
6614
|
-
const nodeData = new
|
|
6714
|
+
const nodeData = new avs_pb10.GraphQLQueryNode();
|
|
6615
6715
|
nodeData.setUrl(this.data.url);
|
|
6616
6716
|
nodeData.setQuery(this.data.query);
|
|
6617
6717
|
const variables = this.data.variablesMap;
|
|
@@ -6626,7 +6726,7 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
6626
6726
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
6627
6727
|
|
|
6628
6728
|
// src/models/node/restApi.ts
|
|
6629
|
-
var
|
|
6729
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
6630
6730
|
import { NodeType as NodeType5 } from "@avaprotocol/types";
|
|
6631
6731
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
6632
6732
|
constructor(props) {
|
|
@@ -6641,10 +6741,10 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6641
6741
|
});
|
|
6642
6742
|
}
|
|
6643
6743
|
toRequest() {
|
|
6644
|
-
const request = new
|
|
6744
|
+
const request = new avs_pb11.TaskNode();
|
|
6645
6745
|
request.setId(this.id);
|
|
6646
6746
|
request.setName(this.name);
|
|
6647
|
-
const nodeData = new
|
|
6747
|
+
const nodeData = new avs_pb11.RestAPINode();
|
|
6648
6748
|
nodeData.setUrl(this.data.url);
|
|
6649
6749
|
nodeData.setMethod(this.data.method);
|
|
6650
6750
|
nodeData.setBody(this.data.body);
|
|
@@ -6660,7 +6760,7 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
6660
6760
|
var restApi_default = RestAPINode2;
|
|
6661
6761
|
|
|
6662
6762
|
// src/models/node/contractRead.ts
|
|
6663
|
-
var
|
|
6763
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
6664
6764
|
import { NodeType as NodeType6 } from "@avaprotocol/types";
|
|
6665
6765
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
6666
6766
|
constructor(props) {
|
|
@@ -6675,10 +6775,10 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6675
6775
|
});
|
|
6676
6776
|
}
|
|
6677
6777
|
toRequest() {
|
|
6678
|
-
const request = new
|
|
6778
|
+
const request = new avs_pb12.TaskNode();
|
|
6679
6779
|
request.setId(this.id);
|
|
6680
6780
|
request.setName(this.name);
|
|
6681
|
-
const nodeData = new
|
|
6781
|
+
const nodeData = new avs_pb12.ContractReadNode();
|
|
6682
6782
|
nodeData.setContractAddress(
|
|
6683
6783
|
this.data.contractAddress
|
|
6684
6784
|
);
|
|
@@ -6692,7 +6792,7 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
6692
6792
|
var contractRead_default = ContractReadNode2;
|
|
6693
6793
|
|
|
6694
6794
|
// src/models/node/ethTransfer.ts
|
|
6695
|
-
var
|
|
6795
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
6696
6796
|
import { NodeType as NodeType7 } from "@avaprotocol/types";
|
|
6697
6797
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
6698
6798
|
constructor(props) {
|
|
@@ -6707,10 +6807,10 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
6707
6807
|
});
|
|
6708
6808
|
}
|
|
6709
6809
|
toRequest() {
|
|
6710
|
-
const request = new
|
|
6810
|
+
const request = new avs_pb13.TaskNode();
|
|
6711
6811
|
request.setId(this.id);
|
|
6712
6812
|
request.setName(this.name);
|
|
6713
|
-
const nodeData = new
|
|
6813
|
+
const nodeData = new avs_pb13.ETHTransferNode();
|
|
6714
6814
|
nodeData.setDestination(this.data.destination);
|
|
6715
6815
|
nodeData.setAmount(this.data.amount);
|
|
6716
6816
|
request.setEthTransfer(nodeData);
|
|
@@ -6721,7 +6821,7 @@ var ethTransfer_default = ETHTransferNode2;
|
|
|
6721
6821
|
|
|
6722
6822
|
// src/models/node/branch.ts
|
|
6723
6823
|
import { NodeType as NodeType8 } from "@avaprotocol/types";
|
|
6724
|
-
var
|
|
6824
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
6725
6825
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
6726
6826
|
constructor(props) {
|
|
6727
6827
|
super({ ...props, type: NodeType8.Branch, data: props.data });
|
|
@@ -6735,13 +6835,13 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
6735
6835
|
});
|
|
6736
6836
|
}
|
|
6737
6837
|
toRequest() {
|
|
6738
|
-
const request = new
|
|
6838
|
+
const request = new avs_pb14.TaskNode();
|
|
6739
6839
|
request.setId(this.id);
|
|
6740
6840
|
request.setName(this.name);
|
|
6741
|
-
const nodeData = new
|
|
6841
|
+
const nodeData = new avs_pb14.BranchNode();
|
|
6742
6842
|
nodeData.setConditionsList(
|
|
6743
6843
|
this.data.conditionsList.map((condition) => {
|
|
6744
|
-
const conditionObj = new
|
|
6844
|
+
const conditionObj = new avs_pb14.Condition();
|
|
6745
6845
|
conditionObj.setId(condition.id);
|
|
6746
6846
|
conditionObj.setType(condition.type);
|
|
6747
6847
|
return conditionObj;
|
|
@@ -6806,11 +6906,11 @@ var factory_default2 = NodeFactory;
|
|
|
6806
6906
|
// src/models/workflow.ts
|
|
6807
6907
|
function convertStatusToString(status) {
|
|
6808
6908
|
const conversionMap = {
|
|
6809
|
-
[
|
|
6810
|
-
[
|
|
6811
|
-
[
|
|
6812
|
-
[
|
|
6813
|
-
[
|
|
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 */
|
|
6814
6914
|
};
|
|
6815
6915
|
return conversionMap[status];
|
|
6816
6916
|
}
|
|
@@ -6832,7 +6932,7 @@ var Workflow = class _Workflow {
|
|
|
6832
6932
|
this.maxExecution = props.maxExecution;
|
|
6833
6933
|
this.id = props.id;
|
|
6834
6934
|
this.owner = props.owner;
|
|
6835
|
-
this.
|
|
6935
|
+
this.name = props.name;
|
|
6836
6936
|
this.status = props.status;
|
|
6837
6937
|
this.completedAt = props.completedAt;
|
|
6838
6938
|
this.totalExecution = props.totalExecution;
|
|
@@ -6863,7 +6963,7 @@ var Workflow = class _Workflow {
|
|
|
6863
6963
|
startAt: obj.getStartAt(),
|
|
6864
6964
|
expiredAt: obj.getExpiredAt(),
|
|
6865
6965
|
maxExecution: obj.getMaxExecution(),
|
|
6866
|
-
|
|
6966
|
+
name: obj.getName(),
|
|
6867
6967
|
status: convertStatusToString(obj.getStatus()),
|
|
6868
6968
|
completedAt: obj.getCompletedAt(),
|
|
6869
6969
|
totalExecution: obj.getTotalExecution(),
|
|
@@ -6892,13 +6992,13 @@ var Workflow = class _Workflow {
|
|
|
6892
6992
|
edges: [],
|
|
6893
6993
|
completedAt: obj.getCompletedAt(),
|
|
6894
6994
|
status: convertStatusToString(obj.getStatus()),
|
|
6895
|
-
|
|
6995
|
+
name: obj.getName(),
|
|
6896
6996
|
totalExecution: obj.getTotalExecution(),
|
|
6897
6997
|
lastRanAt: obj.getLastRanAt()
|
|
6898
6998
|
});
|
|
6899
6999
|
}
|
|
6900
7000
|
toRequest() {
|
|
6901
|
-
const request = new
|
|
7001
|
+
const request = new avs_pb15.CreateTaskReq();
|
|
6902
7002
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
6903
7003
|
request.setTrigger(this.trigger.toRequest());
|
|
6904
7004
|
_3.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -6906,8 +7006,8 @@ var Workflow = class _Workflow {
|
|
|
6906
7006
|
request.setStartAt(this.startAt);
|
|
6907
7007
|
request.setExpiredAt(this.expiredAt);
|
|
6908
7008
|
request.setMaxExecution(this.maxExecution);
|
|
6909
|
-
if (this.
|
|
6910
|
-
request.
|
|
7009
|
+
if (this.name) {
|
|
7010
|
+
request.setName(this.name);
|
|
6911
7011
|
}
|
|
6912
7012
|
return request;
|
|
6913
7013
|
}
|
|
@@ -6915,18 +7015,18 @@ var Workflow = class _Workflow {
|
|
|
6915
7015
|
var workflow_default = Workflow;
|
|
6916
7016
|
|
|
6917
7017
|
// src/models/execution.ts
|
|
6918
|
-
var
|
|
7018
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
6919
7019
|
|
|
6920
7020
|
// src/models/trigger/metadata.ts
|
|
6921
|
-
var
|
|
7021
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
6922
7022
|
var convertTriggerType = (grpcType) => {
|
|
6923
7023
|
const conversionMap = {
|
|
6924
|
-
[
|
|
6925
|
-
[
|
|
6926
|
-
[
|
|
6927
|
-
[
|
|
6928
|
-
[
|
|
6929
|
-
[
|
|
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 */
|
|
6930
7030
|
};
|
|
6931
7031
|
return conversionMap[grpcType];
|
|
6932
7032
|
};
|
|
@@ -6963,28 +7063,28 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6963
7063
|
});
|
|
6964
7064
|
}
|
|
6965
7065
|
toRequest() {
|
|
6966
|
-
const request = new
|
|
7066
|
+
const request = new avs_pb16.TriggerMetadata();
|
|
6967
7067
|
switch (this.type) {
|
|
6968
7068
|
case "fixed_time" /* FixedTime */:
|
|
6969
|
-
request.setType(
|
|
7069
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.FIXEDTIME);
|
|
6970
7070
|
if (this.epoch) {
|
|
6971
7071
|
request.setEpoch(this.epoch);
|
|
6972
7072
|
}
|
|
6973
7073
|
break;
|
|
6974
7074
|
case "cron" /* Cron */:
|
|
6975
|
-
request.setType(
|
|
7075
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.CRON);
|
|
6976
7076
|
if (this.epoch) {
|
|
6977
7077
|
request.setEpoch(this.epoch);
|
|
6978
7078
|
}
|
|
6979
7079
|
break;
|
|
6980
7080
|
case "block" /* Block */:
|
|
6981
|
-
request.setType(
|
|
7081
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.BLOCK);
|
|
6982
7082
|
if (this.blockNumber) {
|
|
6983
7083
|
request.setBlockNumber(this.blockNumber);
|
|
6984
7084
|
}
|
|
6985
7085
|
break;
|
|
6986
7086
|
case "event" /* Event */:
|
|
6987
|
-
request.setType(
|
|
7087
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.EVENT);
|
|
6988
7088
|
if (this.blockNumber) {
|
|
6989
7089
|
request.setBlockNumber(this.blockNumber);
|
|
6990
7090
|
}
|
|
@@ -6996,10 +7096,10 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6996
7096
|
}
|
|
6997
7097
|
break;
|
|
6998
7098
|
case "manual" /* Manual */:
|
|
6999
|
-
request.setType(
|
|
7099
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.MANUAL);
|
|
7000
7100
|
break;
|
|
7001
7101
|
case "unset" /* Unset */:
|
|
7002
|
-
request.setType(
|
|
7102
|
+
request.setType(avs_pb16.TriggerMetadata.TriggerType.UNSET);
|
|
7003
7103
|
break;
|
|
7004
7104
|
default:
|
|
7005
7105
|
throw new Error("Unsupported trigger type");
|
|
@@ -7010,7 +7110,7 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
7010
7110
|
var metadata_default = TriggerMetadata2;
|
|
7011
7111
|
|
|
7012
7112
|
// src/models/step.ts
|
|
7013
|
-
var
|
|
7113
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
7014
7114
|
var Step = class _Step {
|
|
7015
7115
|
constructor(props) {
|
|
7016
7116
|
this.nodeId = props.nodeId;
|
|
@@ -7033,7 +7133,7 @@ var Step = class _Step {
|
|
|
7033
7133
|
});
|
|
7034
7134
|
}
|
|
7035
7135
|
toRequest() {
|
|
7036
|
-
const step = new
|
|
7136
|
+
const step = new avs_pb17.Execution.Step();
|
|
7037
7137
|
step.setNodeId(this.nodeId);
|
|
7038
7138
|
step.setSuccess(this.success);
|
|
7039
7139
|
step.setOutputData(this.outputData);
|
|
@@ -7073,7 +7173,7 @@ var Execution3 = class _Execution {
|
|
|
7073
7173
|
});
|
|
7074
7174
|
}
|
|
7075
7175
|
toRequest() {
|
|
7076
|
-
const execution = new
|
|
7176
|
+
const execution = new avs_pb18.Execution();
|
|
7077
7177
|
execution.setId(this.id);
|
|
7078
7178
|
execution.setStartAt(this.startAt);
|
|
7079
7179
|
execution.setEndAt(this.endAt);
|
|
@@ -7124,7 +7224,7 @@ var BaseClient = class {
|
|
|
7124
7224
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7125
7225
|
*/
|
|
7126
7226
|
async authWithAPIKey(address, apiKey, expiredAtEpoch) {
|
|
7127
|
-
const request = new
|
|
7227
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7128
7228
|
request.setOwner(address);
|
|
7129
7229
|
request.setExpiredAt(expiredAtEpoch);
|
|
7130
7230
|
request.setSignature(apiKey);
|
|
@@ -7139,7 +7239,7 @@ var BaseClient = class {
|
|
|
7139
7239
|
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
7140
7240
|
*/
|
|
7141
7241
|
async authWithSignature(address, signature, expiredAtEpoch) {
|
|
7142
|
-
const request = new
|
|
7242
|
+
const request = new avs_pb19.GetKeyReq();
|
|
7143
7243
|
request.setOwner(address);
|
|
7144
7244
|
request.setExpiredAt(expiredAtEpoch);
|
|
7145
7245
|
request.setSignature(signature);
|
|
@@ -7214,7 +7314,7 @@ var Client = class extends BaseClient {
|
|
|
7214
7314
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
7215
7315
|
*/
|
|
7216
7316
|
async getWallets(options) {
|
|
7217
|
-
const request = new
|
|
7317
|
+
const request = new avs_pb19.ListWalletReq();
|
|
7218
7318
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
7219
7319
|
return result.getItemsList().map((item) => item.toObject());
|
|
7220
7320
|
}
|
|
@@ -7226,7 +7326,7 @@ var Client = class extends BaseClient {
|
|
|
7226
7326
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
7227
7327
|
*/
|
|
7228
7328
|
async getWallet({ salt, factoryAddress }, options) {
|
|
7229
|
-
const request = new
|
|
7329
|
+
const request = new avs_pb19.GetWalletReq();
|
|
7230
7330
|
request.setSalt(salt);
|
|
7231
7331
|
if (factoryAddress) {
|
|
7232
7332
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -7263,7 +7363,7 @@ var Client = class extends BaseClient {
|
|
|
7263
7363
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
7264
7364
|
*/
|
|
7265
7365
|
async getWorkflows(addresses, options) {
|
|
7266
|
-
const request = new
|
|
7366
|
+
const request = new avs_pb19.ListTasksReq();
|
|
7267
7367
|
for (const a of addresses) {
|
|
7268
7368
|
request.addSmartWalletAddress(a);
|
|
7269
7369
|
}
|
|
@@ -7288,7 +7388,7 @@ var Client = class extends BaseClient {
|
|
|
7288
7388
|
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
7289
7389
|
*/
|
|
7290
7390
|
async getExecutions(workflows, options) {
|
|
7291
|
-
const request = new
|
|
7391
|
+
const request = new avs_pb19.ListExecutionsReq();
|
|
7292
7392
|
request.setTaskIdsList(workflows);
|
|
7293
7393
|
if (options?.cursor && options?.cursor != "") {
|
|
7294
7394
|
request.setCursor(options.cursor);
|
|
@@ -7309,12 +7409,29 @@ var Client = class extends BaseClient {
|
|
|
7309
7409
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
7310
7410
|
*/
|
|
7311
7411
|
async getExecution(taskId, executionId, options) {
|
|
7312
|
-
const request = new
|
|
7412
|
+
const request = new avs_pb19.ExecutionReq();
|
|
7313
7413
|
request.setTaskId(taskId);
|
|
7314
7414
|
request.setExecutionId(executionId);
|
|
7315
7415
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
7316
7416
|
return execution_default.fromResponse(result);
|
|
7317
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
|
+
}
|
|
7318
7435
|
/**
|
|
7319
7436
|
* Get a workflow by its Id
|
|
7320
7437
|
* @param {string} id - The Id of the workflow
|
|
@@ -7322,7 +7439,7 @@ var Client = class extends BaseClient {
|
|
|
7322
7439
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
7323
7440
|
*/
|
|
7324
7441
|
async getWorkflow(id, options) {
|
|
7325
|
-
const request = new
|
|
7442
|
+
const request = new avs_pb19.IdReq();
|
|
7326
7443
|
request.setId(id);
|
|
7327
7444
|
const result = await this.sendGrpcRequest(
|
|
7328
7445
|
"getTask",
|
|
@@ -7344,7 +7461,7 @@ var Client = class extends BaseClient {
|
|
|
7344
7461
|
data,
|
|
7345
7462
|
isBlocking = false
|
|
7346
7463
|
}, options) {
|
|
7347
|
-
const request = new
|
|
7464
|
+
const request = new avs_pb19.UserTriggerTaskReq();
|
|
7348
7465
|
request.setTaskId(id);
|
|
7349
7466
|
request.setTriggerMetadata(new metadata_default(data).toRequest());
|
|
7350
7467
|
request.setIsBlocking(isBlocking);
|
|
@@ -7358,7 +7475,7 @@ var Client = class extends BaseClient {
|
|
|
7358
7475
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
7359
7476
|
*/
|
|
7360
7477
|
async cancelWorkflow(id, options) {
|
|
7361
|
-
const request = new
|
|
7478
|
+
const request = new avs_pb19.IdReq();
|
|
7362
7479
|
request.setId(id);
|
|
7363
7480
|
const result = await this.sendGrpcRequest(
|
|
7364
7481
|
"cancelTask",
|
|
@@ -7374,7 +7491,7 @@ var Client = class extends BaseClient {
|
|
|
7374
7491
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
7375
7492
|
*/
|
|
7376
7493
|
async deleteWorkflow(id, options) {
|
|
7377
|
-
const request = new
|
|
7494
|
+
const request = new avs_pb19.IdReq();
|
|
7378
7495
|
request.setId(id);
|
|
7379
7496
|
const result = await this.sendGrpcRequest(
|
|
7380
7497
|
"deleteTask",
|
|
@@ -7398,6 +7515,7 @@ export {
|
|
|
7398
7515
|
edge_default as Edge,
|
|
7399
7516
|
event_default as EventTrigger,
|
|
7400
7517
|
execution_default as Execution,
|
|
7518
|
+
ExecutionStatus2 as ExecutionStatus,
|
|
7401
7519
|
fixedTime_default as FixedTimeTrigger,
|
|
7402
7520
|
graphqlQuery_default as GraphQLQueryNode,
|
|
7403
7521
|
interface_default2 as Node,
|