@avaprotocol/sdk-js 1.2.1-dev.6 → 1.2.1-dev.7
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 +73 -14
- package/dist/index.d.ts +73 -14
- package/dist/index.js +274 -72
- package/dist/index.mjs +274 -72
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -70,6 +70,7 @@ var require_avs_pb = __commonJS({
|
|
|
70
70
|
goog.exportSymbol("proto.aggregator.Execution.Step", null, global);
|
|
71
71
|
goog.exportSymbol("proto.aggregator.FilterNode", null, global);
|
|
72
72
|
goog.exportSymbol("proto.aggregator.FixedTimeCondition", null, global);
|
|
73
|
+
goog.exportSymbol("proto.aggregator.GetExecutionReq", null, global);
|
|
73
74
|
goog.exportSymbol("proto.aggregator.GetKeyReq", null, global);
|
|
74
75
|
goog.exportSymbol("proto.aggregator.GetWalletReq", null, global);
|
|
75
76
|
goog.exportSymbol("proto.aggregator.GetWalletResp", null, global);
|
|
@@ -97,6 +98,7 @@ var require_avs_pb = __commonJS({
|
|
|
97
98
|
goog.exportSymbol("proto.aggregator.TaskTrigger", null, global);
|
|
98
99
|
goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global);
|
|
99
100
|
goog.exportSymbol("proto.aggregator.TriggerMetadata", null, global);
|
|
101
|
+
goog.exportSymbol("proto.aggregator.TriggerMetadata.TriggerType", null, global);
|
|
100
102
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskReq", null, global);
|
|
101
103
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskResp", null, global);
|
|
102
104
|
proto.aggregator.IdReq = function(opt_data) {
|
|
@@ -296,7 +298,7 @@ var require_avs_pb = __commonJS({
|
|
|
296
298
|
proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp";
|
|
297
299
|
}
|
|
298
300
|
proto.aggregator.ListTasksReq = function(opt_data) {
|
|
299
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
301
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksReq.repeatedFields_, null);
|
|
300
302
|
};
|
|
301
303
|
goog.inherits(proto.aggregator.ListTasksReq, jspb.Message);
|
|
302
304
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -317,7 +319,7 @@ var require_avs_pb = __commonJS({
|
|
|
317
319
|
proto.aggregator.ListTasksResp.Item.displayName = "proto.aggregator.ListTasksResp.Item";
|
|
318
320
|
}
|
|
319
321
|
proto.aggregator.ListExecutionsReq = function(opt_data) {
|
|
320
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
322
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListExecutionsReq.repeatedFields_, null);
|
|
321
323
|
};
|
|
322
324
|
goog.inherits(proto.aggregator.ListExecutionsReq, jspb.Message);
|
|
323
325
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -330,6 +332,13 @@ var require_avs_pb = __commonJS({
|
|
|
330
332
|
if (goog.DEBUG && !COMPILED) {
|
|
331
333
|
proto.aggregator.ListExecutionsResp.displayName = "proto.aggregator.ListExecutionsResp";
|
|
332
334
|
}
|
|
335
|
+
proto.aggregator.GetExecutionReq = function(opt_data) {
|
|
336
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
337
|
+
};
|
|
338
|
+
goog.inherits(proto.aggregator.GetExecutionReq, jspb.Message);
|
|
339
|
+
if (goog.DEBUG && !COMPILED) {
|
|
340
|
+
proto.aggregator.GetExecutionReq.displayName = "proto.aggregator.GetExecutionReq";
|
|
341
|
+
}
|
|
333
342
|
proto.aggregator.GetKeyReq = function(opt_data) {
|
|
334
343
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
335
344
|
};
|
|
@@ -4226,13 +4235,14 @@ var require_avs_pb = __commonJS({
|
|
|
4226
4235
|
proto.aggregator.ListWalletResp.prototype.clearItemsList = function() {
|
|
4227
4236
|
return this.setItemsList([]);
|
|
4228
4237
|
};
|
|
4238
|
+
proto.aggregator.ListTasksReq.repeatedFields_ = [1];
|
|
4229
4239
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4230
4240
|
proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) {
|
|
4231
4241
|
return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this);
|
|
4232
4242
|
};
|
|
4233
4243
|
proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) {
|
|
4234
4244
|
var f, obj = {
|
|
4235
|
-
|
|
4245
|
+
smartWalletAddressList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f,
|
|
4236
4246
|
cursor: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4237
4247
|
itemPerPage: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
4238
4248
|
};
|
|
@@ -4259,7 +4269,7 @@ var require_avs_pb = __commonJS({
|
|
|
4259
4269
|
/** @type {string} */
|
|
4260
4270
|
reader.readString()
|
|
4261
4271
|
);
|
|
4262
|
-
msg.
|
|
4272
|
+
msg.addSmartWalletAddress(value);
|
|
4263
4273
|
break;
|
|
4264
4274
|
case 2:
|
|
4265
4275
|
var value = (
|
|
@@ -4289,9 +4299,9 @@ var require_avs_pb = __commonJS({
|
|
|
4289
4299
|
};
|
|
4290
4300
|
proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) {
|
|
4291
4301
|
var f = void 0;
|
|
4292
|
-
f = message.
|
|
4302
|
+
f = message.getSmartWalletAddressList();
|
|
4293
4303
|
if (f.length > 0) {
|
|
4294
|
-
writer.
|
|
4304
|
+
writer.writeRepeatedString(
|
|
4295
4305
|
1,
|
|
4296
4306
|
f
|
|
4297
4307
|
);
|
|
@@ -4311,14 +4321,20 @@ var require_avs_pb = __commonJS({
|
|
|
4311
4321
|
);
|
|
4312
4322
|
}
|
|
4313
4323
|
};
|
|
4314
|
-
proto.aggregator.ListTasksReq.prototype.
|
|
4324
|
+
proto.aggregator.ListTasksReq.prototype.getSmartWalletAddressList = function() {
|
|
4315
4325
|
return (
|
|
4316
|
-
/** @type {string} */
|
|
4317
|
-
jspb.Message.
|
|
4326
|
+
/** @type {!Array<string>} */
|
|
4327
|
+
jspb.Message.getRepeatedField(this, 1)
|
|
4318
4328
|
);
|
|
4319
4329
|
};
|
|
4320
|
-
proto.aggregator.ListTasksReq.prototype.
|
|
4321
|
-
return jspb.Message.
|
|
4330
|
+
proto.aggregator.ListTasksReq.prototype.setSmartWalletAddressList = function(value) {
|
|
4331
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
4332
|
+
};
|
|
4333
|
+
proto.aggregator.ListTasksReq.prototype.addSmartWalletAddress = function(value, opt_index) {
|
|
4334
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
4335
|
+
};
|
|
4336
|
+
proto.aggregator.ListTasksReq.prototype.clearSmartWalletAddressList = function() {
|
|
4337
|
+
return this.setSmartWalletAddressList([]);
|
|
4322
4338
|
};
|
|
4323
4339
|
proto.aggregator.ListTasksReq.prototype.getCursor = function() {
|
|
4324
4340
|
return (
|
|
@@ -4350,7 +4366,8 @@ var require_avs_pb = __commonJS({
|
|
|
4350
4366
|
proto.aggregator.ListTasksResp.Item.toObject,
|
|
4351
4367
|
includeInstance
|
|
4352
4368
|
),
|
|
4353
|
-
cursor: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
4369
|
+
cursor: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4370
|
+
hasMore: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
|
4354
4371
|
};
|
|
4355
4372
|
if (includeInstance) {
|
|
4356
4373
|
obj.$jspbMessageInstance = msg;
|
|
@@ -4382,6 +4399,13 @@ var require_avs_pb = __commonJS({
|
|
|
4382
4399
|
);
|
|
4383
4400
|
msg.setCursor(value);
|
|
4384
4401
|
break;
|
|
4402
|
+
case 3:
|
|
4403
|
+
var value = (
|
|
4404
|
+
/** @type {boolean} */
|
|
4405
|
+
reader.readBool()
|
|
4406
|
+
);
|
|
4407
|
+
msg.setHasMore(value);
|
|
4408
|
+
break;
|
|
4385
4409
|
default:
|
|
4386
4410
|
reader.skipField();
|
|
4387
4411
|
break;
|
|
@@ -4411,6 +4435,13 @@ var require_avs_pb = __commonJS({
|
|
|
4411
4435
|
f
|
|
4412
4436
|
);
|
|
4413
4437
|
}
|
|
4438
|
+
f = message.getHasMore();
|
|
4439
|
+
if (f) {
|
|
4440
|
+
writer.writeBool(
|
|
4441
|
+
3,
|
|
4442
|
+
f
|
|
4443
|
+
);
|
|
4444
|
+
}
|
|
4414
4445
|
};
|
|
4415
4446
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4416
4447
|
proto.aggregator.ListTasksResp.Item.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -4769,13 +4800,23 @@ var require_avs_pb = __commonJS({
|
|
|
4769
4800
|
proto.aggregator.ListTasksResp.prototype.setCursor = function(value) {
|
|
4770
4801
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4771
4802
|
};
|
|
4803
|
+
proto.aggregator.ListTasksResp.prototype.getHasMore = function() {
|
|
4804
|
+
return (
|
|
4805
|
+
/** @type {boolean} */
|
|
4806
|
+
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
|
|
4807
|
+
);
|
|
4808
|
+
};
|
|
4809
|
+
proto.aggregator.ListTasksResp.prototype.setHasMore = function(value) {
|
|
4810
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
4811
|
+
};
|
|
4812
|
+
proto.aggregator.ListExecutionsReq.repeatedFields_ = [1];
|
|
4772
4813
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4773
4814
|
proto.aggregator.ListExecutionsReq.prototype.toObject = function(opt_includeInstance) {
|
|
4774
4815
|
return proto.aggregator.ListExecutionsReq.toObject(opt_includeInstance, this);
|
|
4775
4816
|
};
|
|
4776
4817
|
proto.aggregator.ListExecutionsReq.toObject = function(includeInstance, msg) {
|
|
4777
4818
|
var f, obj = {
|
|
4778
|
-
|
|
4819
|
+
taskIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f,
|
|
4779
4820
|
cursor: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4780
4821
|
itemPerPage: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
4781
4822
|
};
|
|
@@ -4802,7 +4843,7 @@ var require_avs_pb = __commonJS({
|
|
|
4802
4843
|
/** @type {string} */
|
|
4803
4844
|
reader.readString()
|
|
4804
4845
|
);
|
|
4805
|
-
msg.
|
|
4846
|
+
msg.addTaskIds(value);
|
|
4806
4847
|
break;
|
|
4807
4848
|
case 2:
|
|
4808
4849
|
var value = (
|
|
@@ -4832,9 +4873,9 @@ var require_avs_pb = __commonJS({
|
|
|
4832
4873
|
};
|
|
4833
4874
|
proto.aggregator.ListExecutionsReq.serializeBinaryToWriter = function(message, writer) {
|
|
4834
4875
|
var f = void 0;
|
|
4835
|
-
f = message.
|
|
4876
|
+
f = message.getTaskIdsList();
|
|
4836
4877
|
if (f.length > 0) {
|
|
4837
|
-
writer.
|
|
4878
|
+
writer.writeRepeatedString(
|
|
4838
4879
|
1,
|
|
4839
4880
|
f
|
|
4840
4881
|
);
|
|
@@ -4854,14 +4895,20 @@ var require_avs_pb = __commonJS({
|
|
|
4854
4895
|
);
|
|
4855
4896
|
}
|
|
4856
4897
|
};
|
|
4857
|
-
proto.aggregator.ListExecutionsReq.prototype.
|
|
4898
|
+
proto.aggregator.ListExecutionsReq.prototype.getTaskIdsList = function() {
|
|
4858
4899
|
return (
|
|
4859
|
-
/** @type {string} */
|
|
4860
|
-
jspb.Message.
|
|
4900
|
+
/** @type {!Array<string>} */
|
|
4901
|
+
jspb.Message.getRepeatedField(this, 1)
|
|
4861
4902
|
);
|
|
4862
4903
|
};
|
|
4863
|
-
proto.aggregator.ListExecutionsReq.prototype.
|
|
4864
|
-
return jspb.Message.
|
|
4904
|
+
proto.aggregator.ListExecutionsReq.prototype.setTaskIdsList = function(value) {
|
|
4905
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
4906
|
+
};
|
|
4907
|
+
proto.aggregator.ListExecutionsReq.prototype.addTaskIds = function(value, opt_index) {
|
|
4908
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
4909
|
+
};
|
|
4910
|
+
proto.aggregator.ListExecutionsReq.prototype.clearTaskIdsList = function() {
|
|
4911
|
+
return this.setTaskIdsList([]);
|
|
4865
4912
|
};
|
|
4866
4913
|
proto.aggregator.ListExecutionsReq.prototype.getCursor = function() {
|
|
4867
4914
|
return (
|
|
@@ -4893,7 +4940,8 @@ var require_avs_pb = __commonJS({
|
|
|
4893
4940
|
proto.aggregator.Execution.toObject,
|
|
4894
4941
|
includeInstance
|
|
4895
4942
|
),
|
|
4896
|
-
cursor: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
4943
|
+
cursor: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4944
|
+
hasMore: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
|
|
4897
4945
|
};
|
|
4898
4946
|
if (includeInstance) {
|
|
4899
4947
|
obj.$jspbMessageInstance = msg;
|
|
@@ -4925,6 +4973,13 @@ var require_avs_pb = __commonJS({
|
|
|
4925
4973
|
);
|
|
4926
4974
|
msg.setCursor(value);
|
|
4927
4975
|
break;
|
|
4976
|
+
case 4:
|
|
4977
|
+
var value = (
|
|
4978
|
+
/** @type {boolean} */
|
|
4979
|
+
reader.readBool()
|
|
4980
|
+
);
|
|
4981
|
+
msg.setHasMore(value);
|
|
4982
|
+
break;
|
|
4928
4983
|
default:
|
|
4929
4984
|
reader.skipField();
|
|
4930
4985
|
break;
|
|
@@ -4954,6 +5009,13 @@ var require_avs_pb = __commonJS({
|
|
|
4954
5009
|
f
|
|
4955
5010
|
);
|
|
4956
5011
|
}
|
|
5012
|
+
f = message.getHasMore();
|
|
5013
|
+
if (f) {
|
|
5014
|
+
writer.writeBool(
|
|
5015
|
+
4,
|
|
5016
|
+
f
|
|
5017
|
+
);
|
|
5018
|
+
}
|
|
4957
5019
|
};
|
|
4958
5020
|
proto.aggregator.ListExecutionsResp.prototype.getItemsList = function() {
|
|
4959
5021
|
return (
|
|
@@ -4979,6 +5041,103 @@ var require_avs_pb = __commonJS({
|
|
|
4979
5041
|
proto.aggregator.ListExecutionsResp.prototype.setCursor = function(value) {
|
|
4980
5042
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4981
5043
|
};
|
|
5044
|
+
proto.aggregator.ListExecutionsResp.prototype.getHasMore = function() {
|
|
5045
|
+
return (
|
|
5046
|
+
/** @type {boolean} */
|
|
5047
|
+
jspb.Message.getBooleanFieldWithDefault(this, 4, false)
|
|
5048
|
+
);
|
|
5049
|
+
};
|
|
5050
|
+
proto.aggregator.ListExecutionsResp.prototype.setHasMore = function(value) {
|
|
5051
|
+
return jspb.Message.setProto3BooleanField(this, 4, value);
|
|
5052
|
+
};
|
|
5053
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5054
|
+
proto.aggregator.GetExecutionReq.prototype.toObject = function(opt_includeInstance) {
|
|
5055
|
+
return proto.aggregator.GetExecutionReq.toObject(opt_includeInstance, this);
|
|
5056
|
+
};
|
|
5057
|
+
proto.aggregator.GetExecutionReq.toObject = function(includeInstance, msg) {
|
|
5058
|
+
var f, obj = {
|
|
5059
|
+
taskId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
5060
|
+
executionId: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
5061
|
+
};
|
|
5062
|
+
if (includeInstance) {
|
|
5063
|
+
obj.$jspbMessageInstance = msg;
|
|
5064
|
+
}
|
|
5065
|
+
return obj;
|
|
5066
|
+
};
|
|
5067
|
+
}
|
|
5068
|
+
proto.aggregator.GetExecutionReq.deserializeBinary = function(bytes) {
|
|
5069
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
5070
|
+
var msg = new proto.aggregator.GetExecutionReq();
|
|
5071
|
+
return proto.aggregator.GetExecutionReq.deserializeBinaryFromReader(msg, reader);
|
|
5072
|
+
};
|
|
5073
|
+
proto.aggregator.GetExecutionReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
5074
|
+
while (reader.nextField()) {
|
|
5075
|
+
if (reader.isEndGroup()) {
|
|
5076
|
+
break;
|
|
5077
|
+
}
|
|
5078
|
+
var field = reader.getFieldNumber();
|
|
5079
|
+
switch (field) {
|
|
5080
|
+
case 1:
|
|
5081
|
+
var value = (
|
|
5082
|
+
/** @type {string} */
|
|
5083
|
+
reader.readString()
|
|
5084
|
+
);
|
|
5085
|
+
msg.setTaskId(value);
|
|
5086
|
+
break;
|
|
5087
|
+
case 2:
|
|
5088
|
+
var value = (
|
|
5089
|
+
/** @type {string} */
|
|
5090
|
+
reader.readString()
|
|
5091
|
+
);
|
|
5092
|
+
msg.setExecutionId(value);
|
|
5093
|
+
break;
|
|
5094
|
+
default:
|
|
5095
|
+
reader.skipField();
|
|
5096
|
+
break;
|
|
5097
|
+
}
|
|
5098
|
+
}
|
|
5099
|
+
return msg;
|
|
5100
|
+
};
|
|
5101
|
+
proto.aggregator.GetExecutionReq.prototype.serializeBinary = function() {
|
|
5102
|
+
var writer = new jspb.BinaryWriter();
|
|
5103
|
+
proto.aggregator.GetExecutionReq.serializeBinaryToWriter(this, writer);
|
|
5104
|
+
return writer.getResultBuffer();
|
|
5105
|
+
};
|
|
5106
|
+
proto.aggregator.GetExecutionReq.serializeBinaryToWriter = function(message, writer) {
|
|
5107
|
+
var f = void 0;
|
|
5108
|
+
f = message.getTaskId();
|
|
5109
|
+
if (f.length > 0) {
|
|
5110
|
+
writer.writeString(
|
|
5111
|
+
1,
|
|
5112
|
+
f
|
|
5113
|
+
);
|
|
5114
|
+
}
|
|
5115
|
+
f = message.getExecutionId();
|
|
5116
|
+
if (f.length > 0) {
|
|
5117
|
+
writer.writeString(
|
|
5118
|
+
2,
|
|
5119
|
+
f
|
|
5120
|
+
);
|
|
5121
|
+
}
|
|
5122
|
+
};
|
|
5123
|
+
proto.aggregator.GetExecutionReq.prototype.getTaskId = function() {
|
|
5124
|
+
return (
|
|
5125
|
+
/** @type {string} */
|
|
5126
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
5127
|
+
);
|
|
5128
|
+
};
|
|
5129
|
+
proto.aggregator.GetExecutionReq.prototype.setTaskId = function(value) {
|
|
5130
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
5131
|
+
};
|
|
5132
|
+
proto.aggregator.GetExecutionReq.prototype.getExecutionId = function() {
|
|
5133
|
+
return (
|
|
5134
|
+
/** @type {string} */
|
|
5135
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
5136
|
+
);
|
|
5137
|
+
};
|
|
5138
|
+
proto.aggregator.GetExecutionReq.prototype.setExecutionId = function(value) {
|
|
5139
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
5140
|
+
};
|
|
4982
5141
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4983
5142
|
proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) {
|
|
4984
5143
|
return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this);
|
|
@@ -5164,7 +5323,8 @@ var require_avs_pb = __commonJS({
|
|
|
5164
5323
|
blockNumber: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
5165
5324
|
logIndex: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
5166
5325
|
txHash: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
5167
|
-
epoch: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
5326
|
+
epoch: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
5327
|
+
type: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
5168
5328
|
};
|
|
5169
5329
|
if (includeInstance) {
|
|
5170
5330
|
obj.$jspbMessageInstance = msg;
|
|
@@ -5212,6 +5372,13 @@ var require_avs_pb = __commonJS({
|
|
|
5212
5372
|
);
|
|
5213
5373
|
msg.setEpoch(value);
|
|
5214
5374
|
break;
|
|
5375
|
+
case 5:
|
|
5376
|
+
var value = (
|
|
5377
|
+
/** @type {!proto.aggregator.TriggerMetadata.TriggerType} */
|
|
5378
|
+
reader.readEnum()
|
|
5379
|
+
);
|
|
5380
|
+
msg.setType(value);
|
|
5381
|
+
break;
|
|
5215
5382
|
default:
|
|
5216
5383
|
reader.skipField();
|
|
5217
5384
|
break;
|
|
@@ -5254,6 +5421,21 @@ var require_avs_pb = __commonJS({
|
|
|
5254
5421
|
f
|
|
5255
5422
|
);
|
|
5256
5423
|
}
|
|
5424
|
+
f = message.getType();
|
|
5425
|
+
if (f !== 0) {
|
|
5426
|
+
writer.writeEnum(
|
|
5427
|
+
5,
|
|
5428
|
+
f
|
|
5429
|
+
);
|
|
5430
|
+
}
|
|
5431
|
+
};
|
|
5432
|
+
proto.aggregator.TriggerMetadata.TriggerType = {
|
|
5433
|
+
UNSET: 0,
|
|
5434
|
+
MANUAL: 2,
|
|
5435
|
+
FIXEDTIME: 3,
|
|
5436
|
+
CRON: 4,
|
|
5437
|
+
BLOCK: 5,
|
|
5438
|
+
EVENT: 6
|
|
5257
5439
|
};
|
|
5258
5440
|
proto.aggregator.TriggerMetadata.prototype.getBlockNumber = function() {
|
|
5259
5441
|
return (
|
|
@@ -5291,6 +5473,15 @@ var require_avs_pb = __commonJS({
|
|
|
5291
5473
|
proto.aggregator.TriggerMetadata.prototype.setEpoch = function(value) {
|
|
5292
5474
|
return jspb.Message.setProto3IntField(this, 4, value);
|
|
5293
5475
|
};
|
|
5476
|
+
proto.aggregator.TriggerMetadata.prototype.getType = function() {
|
|
5477
|
+
return (
|
|
5478
|
+
/** @type {!proto.aggregator.TriggerMetadata.TriggerType} */
|
|
5479
|
+
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
5480
|
+
);
|
|
5481
|
+
};
|
|
5482
|
+
proto.aggregator.TriggerMetadata.prototype.setType = function(value) {
|
|
5483
|
+
return jspb.Message.setProto3EnumField(this, 5, value);
|
|
5484
|
+
};
|
|
5294
5485
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5295
5486
|
proto.aggregator.GetWalletReq.prototype.toObject = function(opt_includeInstance) {
|
|
5296
5487
|
return proto.aggregator.GetWalletReq.toObject(opt_includeInstance, this);
|
|
@@ -5615,8 +5806,7 @@ var require_avs_pb = __commonJS({
|
|
|
5615
5806
|
proto.aggregator.UserTriggerTaskResp.toObject = function(includeInstance, msg) {
|
|
5616
5807
|
var f, obj = {
|
|
5617
5808
|
result: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
5618
|
-
executionId: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
5619
|
-
jobId: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
5809
|
+
executionId: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
5620
5810
|
};
|
|
5621
5811
|
if (includeInstance) {
|
|
5622
5812
|
obj.$jspbMessageInstance = msg;
|
|
@@ -5650,13 +5840,6 @@ var require_avs_pb = __commonJS({
|
|
|
5650
5840
|
);
|
|
5651
5841
|
msg.setExecutionId(value);
|
|
5652
5842
|
break;
|
|
5653
|
-
case 3:
|
|
5654
|
-
var value = (
|
|
5655
|
-
/** @type {string} */
|
|
5656
|
-
reader.readString()
|
|
5657
|
-
);
|
|
5658
|
-
msg.setJobId(value);
|
|
5659
|
-
break;
|
|
5660
5843
|
default:
|
|
5661
5844
|
reader.skipField();
|
|
5662
5845
|
break;
|
|
@@ -5685,13 +5868,6 @@ var require_avs_pb = __commonJS({
|
|
|
5685
5868
|
f
|
|
5686
5869
|
);
|
|
5687
5870
|
}
|
|
5688
|
-
f = message.getJobId();
|
|
5689
|
-
if (f.length > 0) {
|
|
5690
|
-
writer.writeString(
|
|
5691
|
-
3,
|
|
5692
|
-
f
|
|
5693
|
-
);
|
|
5694
|
-
}
|
|
5695
5871
|
};
|
|
5696
5872
|
proto.aggregator.UserTriggerTaskResp.prototype.getResult = function() {
|
|
5697
5873
|
return (
|
|
@@ -5711,15 +5887,6 @@ var require_avs_pb = __commonJS({
|
|
|
5711
5887
|
proto.aggregator.UserTriggerTaskResp.prototype.setExecutionId = function(value) {
|
|
5712
5888
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
5713
5889
|
};
|
|
5714
|
-
proto.aggregator.UserTriggerTaskResp.prototype.getJobId = function() {
|
|
5715
|
-
return (
|
|
5716
|
-
/** @type {string} */
|
|
5717
|
-
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
5718
|
-
);
|
|
5719
|
-
};
|
|
5720
|
-
proto.aggregator.UserTriggerTaskResp.prototype.setJobId = function(value) {
|
|
5721
|
-
return jspb.Message.setProto3StringField(this, 3, value);
|
|
5722
|
-
};
|
|
5723
5890
|
proto.aggregator.Error = {
|
|
5724
5891
|
UNKNOWERROR: 0,
|
|
5725
5892
|
RPCNODEERROR: 1e3,
|
|
@@ -5769,6 +5936,24 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
5769
5936
|
function deserialize_aggregator_CreateTaskResp(buffer_arg) {
|
|
5770
5937
|
return avs_pb20.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5771
5938
|
}
|
|
5939
|
+
function serialize_aggregator_Execution(arg) {
|
|
5940
|
+
if (!(arg instanceof avs_pb20.Execution)) {
|
|
5941
|
+
throw new Error("Expected argument of type aggregator.Execution");
|
|
5942
|
+
}
|
|
5943
|
+
return Buffer.from(arg.serializeBinary());
|
|
5944
|
+
}
|
|
5945
|
+
function deserialize_aggregator_Execution(buffer_arg) {
|
|
5946
|
+
return avs_pb20.Execution.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5947
|
+
}
|
|
5948
|
+
function serialize_aggregator_GetExecutionReq(arg) {
|
|
5949
|
+
if (!(arg instanceof avs_pb20.GetExecutionReq)) {
|
|
5950
|
+
throw new Error("Expected argument of type aggregator.GetExecutionReq");
|
|
5951
|
+
}
|
|
5952
|
+
return Buffer.from(arg.serializeBinary());
|
|
5953
|
+
}
|
|
5954
|
+
function deserialize_aggregator_GetExecutionReq(buffer_arg) {
|
|
5955
|
+
return avs_pb20.GetExecutionReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
5956
|
+
}
|
|
5772
5957
|
function serialize_aggregator_GetKeyReq(arg) {
|
|
5773
5958
|
if (!(arg instanceof avs_pb20.GetKeyReq)) {
|
|
5774
5959
|
throw new Error("Expected argument of type aggregator.GetKeyReq");
|
|
@@ -6014,6 +6199,17 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6014
6199
|
responseSerialize: serialize_aggregator_ListExecutionsResp,
|
|
6015
6200
|
responseDeserialize: deserialize_aggregator_ListExecutionsResp
|
|
6016
6201
|
},
|
|
6202
|
+
getExecution: {
|
|
6203
|
+
path: "/aggregator.Aggregator/GetExecution",
|
|
6204
|
+
requestStream: false,
|
|
6205
|
+
responseStream: false,
|
|
6206
|
+
requestType: avs_pb20.GetExecutionReq,
|
|
6207
|
+
responseType: avs_pb20.Execution,
|
|
6208
|
+
requestSerialize: serialize_aggregator_GetExecutionReq,
|
|
6209
|
+
requestDeserialize: deserialize_aggregator_GetExecutionReq,
|
|
6210
|
+
responseSerialize: serialize_aggregator_Execution,
|
|
6211
|
+
responseDeserialize: deserialize_aggregator_Execution
|
|
6212
|
+
},
|
|
6017
6213
|
cancelTask: {
|
|
6018
6214
|
path: "/aggregator.Aggregator/CancelTask",
|
|
6019
6215
|
requestStream: false,
|
|
@@ -6053,7 +6249,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
6053
6249
|
});
|
|
6054
6250
|
|
|
6055
6251
|
// src/index.ts
|
|
6056
|
-
import
|
|
6252
|
+
import _4 from "lodash";
|
|
6057
6253
|
import * as grpc from "@grpc/grpc-js";
|
|
6058
6254
|
import { Metadata } from "@grpc/grpc-js";
|
|
6059
6255
|
|
|
@@ -6688,10 +6884,8 @@ var avs_pb18 = __toESM(require_avs_pb());
|
|
|
6688
6884
|
|
|
6689
6885
|
// src/models/trigger/metadata.ts
|
|
6690
6886
|
var avs_pb16 = __toESM(require_avs_pb());
|
|
6691
|
-
import _4 from "lodash";
|
|
6692
6887
|
var TriggerMetadata2 = class _TriggerMetadata {
|
|
6693
6888
|
constructor(props) {
|
|
6694
|
-
console.log("constructor.props", props);
|
|
6695
6889
|
this.type = props.type;
|
|
6696
6890
|
switch (props.type) {
|
|
6697
6891
|
case TriggerTypes.FIXED_TIME:
|
|
@@ -6714,17 +6908,8 @@ var TriggerMetadata2 = class _TriggerMetadata {
|
|
|
6714
6908
|
if (!data) {
|
|
6715
6909
|
return void 0;
|
|
6716
6910
|
}
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
if (data.getEpoch() !== 0) {
|
|
6720
|
-
type = TriggerTypes.FIXED_TIME;
|
|
6721
|
-
} else if (data.getBlockNumber() !== 0) {
|
|
6722
|
-
if (data.getLogIndex() !== 0 && !_4.isEmpty(data.getTxHash())) {
|
|
6723
|
-
type = TriggerTypes.EVENT;
|
|
6724
|
-
} else {
|
|
6725
|
-
type = TriggerTypes.BLOCK;
|
|
6726
|
-
}
|
|
6727
|
-
} else {
|
|
6911
|
+
let type = data.getType();
|
|
6912
|
+
if (type != avs_pb16.TaskTrigger.TriggerTypeCase.FIXED_TIME && type != avs_pb16.TaskTrigger.TriggerTypeCase.CRON && type != avs_pb16.TaskTrigger.TriggerTypeCase.BLOCK && type != avs_pb16.TaskTrigger.TriggerTypeCase.EVENT) {
|
|
6728
6913
|
throw new Error("Unable to determine trigger type from response");
|
|
6729
6914
|
}
|
|
6730
6915
|
return new _TriggerMetadata({
|
|
@@ -6949,7 +7134,7 @@ var BaseClient = class {
|
|
|
6949
7134
|
* @returns {Promise<TResponse>} - The response from the gRPC call
|
|
6950
7135
|
*/
|
|
6951
7136
|
sendGrpcRequest(method, request, options) {
|
|
6952
|
-
const metadata =
|
|
7137
|
+
const metadata = _4.cloneDeep(this.metadata);
|
|
6953
7138
|
if (options?.authKey) {
|
|
6954
7139
|
metadata.set(AUTH_KEY_HEADER, options.authKey);
|
|
6955
7140
|
} else if (this.authKey) {
|
|
@@ -7025,42 +7210,59 @@ var Client = class extends BaseClient {
|
|
|
7025
7210
|
* @param {RequestOptions} options - Request options
|
|
7026
7211
|
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
7027
7212
|
*/
|
|
7028
|
-
async getWorkflows(
|
|
7213
|
+
async getWorkflows(addresses, options) {
|
|
7029
7214
|
const request = new avs_pb19.ListTasksReq();
|
|
7030
|
-
|
|
7215
|
+
for (const a of addresses) {
|
|
7216
|
+
request.addSmartWalletAddress(a);
|
|
7217
|
+
}
|
|
7031
7218
|
if (options?.cursor) {
|
|
7032
7219
|
request.setCursor(options.cursor);
|
|
7033
7220
|
}
|
|
7034
7221
|
request.setItemPerPage(options?.limit || DEFAULT_LIMIT);
|
|
7035
7222
|
const result = await this.sendGrpcRequest("listTasks", request, options);
|
|
7036
|
-
console.log("result", result.toObject());
|
|
7037
7223
|
return {
|
|
7038
7224
|
cursor: result.getCursor(),
|
|
7225
|
+
hasMore: result.getHasMore(),
|
|
7039
7226
|
result: result.getItemsList().map((item) => workflow_default.fromListResponse(item))
|
|
7040
7227
|
};
|
|
7041
7228
|
}
|
|
7042
7229
|
/**
|
|
7043
|
-
* Get the list of executions for
|
|
7044
|
-
* @param {string}
|
|
7230
|
+
* Get the list of executions for multiple workflow given in the workflows argument.
|
|
7231
|
+
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
7045
7232
|
* @param {GetExecutionsRequest} options - Request options
|
|
7046
7233
|
* @param {string} [options.cursor] - The cursor for pagination
|
|
7047
7234
|
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
7048
7235
|
* @param {string} [options.authKey] - The auth key for the request
|
|
7049
7236
|
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
7050
7237
|
*/
|
|
7051
|
-
async getExecutions(
|
|
7238
|
+
async getExecutions(workflows, options) {
|
|
7052
7239
|
const request = new avs_pb19.ListExecutionsReq();
|
|
7053
|
-
request.
|
|
7054
|
-
if (options?.cursor) {
|
|
7240
|
+
request.setTaskIdsList(workflows);
|
|
7241
|
+
if (options?.cursor && options?.cursor != "") {
|
|
7055
7242
|
request.setCursor(options.cursor);
|
|
7056
7243
|
}
|
|
7057
7244
|
request.setItemPerPage(options?.limit || DEFAULT_LIMIT);
|
|
7058
7245
|
const result = await this.sendGrpcRequest("listExecutions", request, options);
|
|
7059
7246
|
return {
|
|
7060
7247
|
cursor: result.getCursor(),
|
|
7061
|
-
result: result.getItemsList().map((item) => execution_default.fromResponse(item))
|
|
7248
|
+
result: result.getItemsList().map((item) => execution_default.fromResponse(item)),
|
|
7249
|
+
hasMore: result.getHasMore()
|
|
7062
7250
|
};
|
|
7063
7251
|
}
|
|
7252
|
+
/**
|
|
7253
|
+
* Get a single execution for given workflow and execution id
|
|
7254
|
+
* @param {string} workflowId - The workflow id
|
|
7255
|
+
* @param {string} executionId - The exectuion id
|
|
7256
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
7257
|
+
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
7258
|
+
*/
|
|
7259
|
+
async getExecution(taskId, executionId, options) {
|
|
7260
|
+
const request = new avs_pb19.GetExecutionReq();
|
|
7261
|
+
request.setTaskId(taskId);
|
|
7262
|
+
request.setExecutionId(executionId);
|
|
7263
|
+
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
7264
|
+
return execution_default.fromResponse(result);
|
|
7265
|
+
}
|
|
7064
7266
|
/**
|
|
7065
7267
|
* Get a workflow by its Id
|
|
7066
7268
|
* @param {string} id - The Id of the workflow
|
package/package.json
CHANGED