@avaprotocol/sdk-js 2.10.4 → 2.11.0
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/CHANGELOG.md +11 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +219 -100
- package/dist/index.mjs +219 -100
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +15 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -64,7 +64,6 @@ var require_avs_pb = __commonJS({
|
|
|
64
64
|
goog.exportSymbol("proto.aggregator.BranchNode.Condition", null, global);
|
|
65
65
|
goog.exportSymbol("proto.aggregator.BranchNode.Config", null, global);
|
|
66
66
|
goog.exportSymbol("proto.aggregator.BranchNode.Output", null, global);
|
|
67
|
-
goog.exportSymbol("proto.aggregator.CancelTaskResp", null, global);
|
|
68
67
|
goog.exportSymbol("proto.aggregator.ContractReadNode", null, global);
|
|
69
68
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Config", null, global);
|
|
70
69
|
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodCall", null, global);
|
|
@@ -166,6 +165,8 @@ var require_avs_pb = __commonJS({
|
|
|
166
165
|
goog.exportSymbol("proto.aggregator.RunTriggerResp", null, global);
|
|
167
166
|
goog.exportSymbol("proto.aggregator.RunTriggerResp.OutputDataCase", null, global);
|
|
168
167
|
goog.exportSymbol("proto.aggregator.Secret", null, global);
|
|
168
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledReq", null, global);
|
|
169
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledResp", null, global);
|
|
169
170
|
goog.exportSymbol("proto.aggregator.SetWalletReq", null, global);
|
|
170
171
|
goog.exportSymbol("proto.aggregator.SimulateTaskReq", null, global);
|
|
171
172
|
goog.exportSymbol("proto.aggregator.SmartWallet", null, global);
|
|
@@ -864,12 +865,19 @@ var require_avs_pb = __commonJS({
|
|
|
864
865
|
if (goog.DEBUG && !COMPILED) {
|
|
865
866
|
proto.aggregator.DeleteTaskResp.displayName = "proto.aggregator.DeleteTaskResp";
|
|
866
867
|
}
|
|
867
|
-
proto.aggregator.
|
|
868
|
+
proto.aggregator.SetTaskEnabledReq = function(opt_data) {
|
|
868
869
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
869
870
|
};
|
|
870
|
-
goog.inherits(proto.aggregator.
|
|
871
|
+
goog.inherits(proto.aggregator.SetTaskEnabledReq, jspb.Message);
|
|
871
872
|
if (goog.DEBUG && !COMPILED) {
|
|
872
|
-
proto.aggregator.
|
|
873
|
+
proto.aggregator.SetTaskEnabledReq.displayName = "proto.aggregator.SetTaskEnabledReq";
|
|
874
|
+
}
|
|
875
|
+
proto.aggregator.SetTaskEnabledResp = function(opt_data) {
|
|
876
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
877
|
+
};
|
|
878
|
+
goog.inherits(proto.aggregator.SetTaskEnabledResp, jspb.Message);
|
|
879
|
+
if (goog.DEBUG && !COMPILED) {
|
|
880
|
+
proto.aggregator.SetTaskEnabledResp.displayName = "proto.aggregator.SetTaskEnabledResp";
|
|
873
881
|
}
|
|
874
882
|
proto.aggregator.GetWorkflowCountReq = function(opt_data) {
|
|
875
883
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.GetWorkflowCountReq.repeatedFields_, null);
|
|
@@ -10870,10 +10878,10 @@ var require_avs_pb = __commonJS({
|
|
|
10870
10878
|
factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
10871
10879
|
isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
|
10872
10880
|
totalTaskCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
10873
|
-
|
|
10881
|
+
enabledTaskCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
10874
10882
|
completedTaskCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
10875
10883
|
failedTaskCount: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
10876
|
-
|
|
10884
|
+
disabledTaskCount: jspb.Message.getFieldWithDefault(msg, 9, 0)
|
|
10877
10885
|
};
|
|
10878
10886
|
if (includeInstance) {
|
|
10879
10887
|
obj.$jspbMessageInstance = msg;
|
|
@@ -10933,7 +10941,7 @@ var require_avs_pb = __commonJS({
|
|
|
10933
10941
|
/** @type {number} */
|
|
10934
10942
|
reader.readUint64()
|
|
10935
10943
|
);
|
|
10936
|
-
msg.
|
|
10944
|
+
msg.setEnabledTaskCount(value);
|
|
10937
10945
|
break;
|
|
10938
10946
|
case 7:
|
|
10939
10947
|
var value = (
|
|
@@ -10954,7 +10962,7 @@ var require_avs_pb = __commonJS({
|
|
|
10954
10962
|
/** @type {number} */
|
|
10955
10963
|
reader.readUint64()
|
|
10956
10964
|
);
|
|
10957
|
-
msg.
|
|
10965
|
+
msg.setDisabledTaskCount(value);
|
|
10958
10966
|
break;
|
|
10959
10967
|
default:
|
|
10960
10968
|
reader.skipField();
|
|
@@ -11005,7 +11013,7 @@ var require_avs_pb = __commonJS({
|
|
|
11005
11013
|
f
|
|
11006
11014
|
);
|
|
11007
11015
|
}
|
|
11008
|
-
f = message.
|
|
11016
|
+
f = message.getEnabledTaskCount();
|
|
11009
11017
|
if (f !== 0) {
|
|
11010
11018
|
writer.writeUint64(
|
|
11011
11019
|
6,
|
|
@@ -11026,7 +11034,7 @@ var require_avs_pb = __commonJS({
|
|
|
11026
11034
|
f
|
|
11027
11035
|
);
|
|
11028
11036
|
}
|
|
11029
|
-
f = message.
|
|
11037
|
+
f = message.getDisabledTaskCount();
|
|
11030
11038
|
if (f !== 0) {
|
|
11031
11039
|
writer.writeUint64(
|
|
11032
11040
|
9,
|
|
@@ -11079,13 +11087,13 @@ var require_avs_pb = __commonJS({
|
|
|
11079
11087
|
proto.aggregator.GetWalletResp.prototype.setTotalTaskCount = function(value) {
|
|
11080
11088
|
return jspb.Message.setProto3IntField(this, 5, value);
|
|
11081
11089
|
};
|
|
11082
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11090
|
+
proto.aggregator.GetWalletResp.prototype.getEnabledTaskCount = function() {
|
|
11083
11091
|
return (
|
|
11084
11092
|
/** @type {number} */
|
|
11085
11093
|
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
11086
11094
|
);
|
|
11087
11095
|
};
|
|
11088
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11096
|
+
proto.aggregator.GetWalletResp.prototype.setEnabledTaskCount = function(value) {
|
|
11089
11097
|
return jspb.Message.setProto3IntField(this, 6, value);
|
|
11090
11098
|
};
|
|
11091
11099
|
proto.aggregator.GetWalletResp.prototype.getCompletedTaskCount = function() {
|
|
@@ -11106,13 +11114,13 @@ var require_avs_pb = __commonJS({
|
|
|
11106
11114
|
proto.aggregator.GetWalletResp.prototype.setFailedTaskCount = function(value) {
|
|
11107
11115
|
return jspb.Message.setProto3IntField(this, 8, value);
|
|
11108
11116
|
};
|
|
11109
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11117
|
+
proto.aggregator.GetWalletResp.prototype.getDisabledTaskCount = function() {
|
|
11110
11118
|
return (
|
|
11111
11119
|
/** @type {number} */
|
|
11112
11120
|
jspb.Message.getFieldWithDefault(this, 9, 0)
|
|
11113
11121
|
);
|
|
11114
11122
|
};
|
|
11115
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11123
|
+
proto.aggregator.GetWalletResp.prototype.setDisabledTaskCount = function(value) {
|
|
11116
11124
|
return jspb.Message.setProto3IntField(this, 9, value);
|
|
11117
11125
|
};
|
|
11118
11126
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -13972,17 +13980,105 @@ var require_avs_pb = __commonJS({
|
|
|
13972
13980
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
13973
13981
|
};
|
|
13974
13982
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
13975
|
-
proto.aggregator.
|
|
13976
|
-
return proto.aggregator.
|
|
13983
|
+
proto.aggregator.SetTaskEnabledReq.prototype.toObject = function(opt_includeInstance) {
|
|
13984
|
+
return proto.aggregator.SetTaskEnabledReq.toObject(opt_includeInstance, this);
|
|
13977
13985
|
};
|
|
13978
|
-
proto.aggregator.
|
|
13986
|
+
proto.aggregator.SetTaskEnabledReq.toObject = function(includeInstance, msg) {
|
|
13987
|
+
var f, obj = {
|
|
13988
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
13989
|
+
enabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
|
13990
|
+
};
|
|
13991
|
+
if (includeInstance) {
|
|
13992
|
+
obj.$jspbMessageInstance = msg;
|
|
13993
|
+
}
|
|
13994
|
+
return obj;
|
|
13995
|
+
};
|
|
13996
|
+
}
|
|
13997
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinary = function(bytes) {
|
|
13998
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
13999
|
+
var msg = new proto.aggregator.SetTaskEnabledReq();
|
|
14000
|
+
return proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader(msg, reader);
|
|
14001
|
+
};
|
|
14002
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
14003
|
+
while (reader.nextField()) {
|
|
14004
|
+
if (reader.isEndGroup()) {
|
|
14005
|
+
break;
|
|
14006
|
+
}
|
|
14007
|
+
var field = reader.getFieldNumber();
|
|
14008
|
+
switch (field) {
|
|
14009
|
+
case 1:
|
|
14010
|
+
var value = (
|
|
14011
|
+
/** @type {string} */
|
|
14012
|
+
reader.readString()
|
|
14013
|
+
);
|
|
14014
|
+
msg.setId(value);
|
|
14015
|
+
break;
|
|
14016
|
+
case 2:
|
|
14017
|
+
var value = (
|
|
14018
|
+
/** @type {boolean} */
|
|
14019
|
+
reader.readBool()
|
|
14020
|
+
);
|
|
14021
|
+
msg.setEnabled(value);
|
|
14022
|
+
break;
|
|
14023
|
+
default:
|
|
14024
|
+
reader.skipField();
|
|
14025
|
+
break;
|
|
14026
|
+
}
|
|
14027
|
+
}
|
|
14028
|
+
return msg;
|
|
14029
|
+
};
|
|
14030
|
+
proto.aggregator.SetTaskEnabledReq.prototype.serializeBinary = function() {
|
|
14031
|
+
var writer = new jspb.BinaryWriter();
|
|
14032
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter(this, writer);
|
|
14033
|
+
return writer.getResultBuffer();
|
|
14034
|
+
};
|
|
14035
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter = function(message, writer) {
|
|
14036
|
+
var f = void 0;
|
|
14037
|
+
f = message.getId();
|
|
14038
|
+
if (f.length > 0) {
|
|
14039
|
+
writer.writeString(
|
|
14040
|
+
1,
|
|
14041
|
+
f
|
|
14042
|
+
);
|
|
14043
|
+
}
|
|
14044
|
+
f = message.getEnabled();
|
|
14045
|
+
if (f) {
|
|
14046
|
+
writer.writeBool(
|
|
14047
|
+
2,
|
|
14048
|
+
f
|
|
14049
|
+
);
|
|
14050
|
+
}
|
|
14051
|
+
};
|
|
14052
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getId = function() {
|
|
14053
|
+
return (
|
|
14054
|
+
/** @type {string} */
|
|
14055
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
14056
|
+
);
|
|
14057
|
+
};
|
|
14058
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setId = function(value) {
|
|
14059
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
14060
|
+
};
|
|
14061
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getEnabled = function() {
|
|
14062
|
+
return (
|
|
14063
|
+
/** @type {boolean} */
|
|
14064
|
+
jspb.Message.getBooleanFieldWithDefault(this, 2, false)
|
|
14065
|
+
);
|
|
14066
|
+
};
|
|
14067
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setEnabled = function(value) {
|
|
14068
|
+
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
14069
|
+
};
|
|
14070
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
14071
|
+
proto.aggregator.SetTaskEnabledResp.prototype.toObject = function(opt_includeInstance) {
|
|
14072
|
+
return proto.aggregator.SetTaskEnabledResp.toObject(opt_includeInstance, this);
|
|
14073
|
+
};
|
|
14074
|
+
proto.aggregator.SetTaskEnabledResp.toObject = function(includeInstance, msg) {
|
|
13979
14075
|
var f, obj = {
|
|
13980
14076
|
success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
13981
14077
|
status: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
13982
14078
|
message: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
14079
|
+
id: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
14080
|
+
previousStatus: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
14081
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0)
|
|
13986
14082
|
};
|
|
13987
14083
|
if (includeInstance) {
|
|
13988
14084
|
obj.$jspbMessageInstance = msg;
|
|
@@ -13990,12 +14086,12 @@ var require_avs_pb = __commonJS({
|
|
|
13990
14086
|
return obj;
|
|
13991
14087
|
};
|
|
13992
14088
|
}
|
|
13993
|
-
proto.aggregator.
|
|
14089
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinary = function(bytes) {
|
|
13994
14090
|
var reader = new jspb.BinaryReader(bytes);
|
|
13995
|
-
var msg = new proto.aggregator.
|
|
13996
|
-
return proto.aggregator.
|
|
14091
|
+
var msg = new proto.aggregator.SetTaskEnabledResp();
|
|
14092
|
+
return proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader(msg, reader);
|
|
13997
14093
|
};
|
|
13998
|
-
proto.aggregator.
|
|
14094
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
13999
14095
|
while (reader.nextField()) {
|
|
14000
14096
|
if (reader.isEndGroup()) {
|
|
14001
14097
|
break;
|
|
@@ -14025,24 +14121,24 @@ var require_avs_pb = __commonJS({
|
|
|
14025
14121
|
break;
|
|
14026
14122
|
case 4:
|
|
14027
14123
|
var value = (
|
|
14028
|
-
/** @type {
|
|
14029
|
-
reader.
|
|
14124
|
+
/** @type {string} */
|
|
14125
|
+
reader.readString()
|
|
14030
14126
|
);
|
|
14031
|
-
msg.
|
|
14127
|
+
msg.setId(value);
|
|
14032
14128
|
break;
|
|
14033
14129
|
case 5:
|
|
14034
14130
|
var value = (
|
|
14035
14131
|
/** @type {string} */
|
|
14036
14132
|
reader.readString()
|
|
14037
14133
|
);
|
|
14038
|
-
msg.
|
|
14134
|
+
msg.setPreviousStatus(value);
|
|
14039
14135
|
break;
|
|
14040
14136
|
case 6:
|
|
14041
14137
|
var value = (
|
|
14042
|
-
/** @type {
|
|
14043
|
-
reader.
|
|
14138
|
+
/** @type {number} */
|
|
14139
|
+
reader.readInt64()
|
|
14044
14140
|
);
|
|
14045
|
-
msg.
|
|
14141
|
+
msg.setUpdatedAt(value);
|
|
14046
14142
|
break;
|
|
14047
14143
|
default:
|
|
14048
14144
|
reader.skipField();
|
|
@@ -14051,12 +14147,12 @@ var require_avs_pb = __commonJS({
|
|
|
14051
14147
|
}
|
|
14052
14148
|
return msg;
|
|
14053
14149
|
};
|
|
14054
|
-
proto.aggregator.
|
|
14150
|
+
proto.aggregator.SetTaskEnabledResp.prototype.serializeBinary = function() {
|
|
14055
14151
|
var writer = new jspb.BinaryWriter();
|
|
14056
|
-
proto.aggregator.
|
|
14152
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter(this, writer);
|
|
14057
14153
|
return writer.getResultBuffer();
|
|
14058
14154
|
};
|
|
14059
|
-
proto.aggregator.
|
|
14155
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter = function(message, writer) {
|
|
14060
14156
|
var f = void 0;
|
|
14061
14157
|
f = message.getSuccess();
|
|
14062
14158
|
if (f) {
|
|
@@ -14079,81 +14175,81 @@ var require_avs_pb = __commonJS({
|
|
|
14079
14175
|
f
|
|
14080
14176
|
);
|
|
14081
14177
|
}
|
|
14082
|
-
f = message.
|
|
14083
|
-
if (f
|
|
14084
|
-
writer.
|
|
14178
|
+
f = message.getId();
|
|
14179
|
+
if (f.length > 0) {
|
|
14180
|
+
writer.writeString(
|
|
14085
14181
|
4,
|
|
14086
14182
|
f
|
|
14087
14183
|
);
|
|
14088
14184
|
}
|
|
14089
|
-
f = message.
|
|
14185
|
+
f = message.getPreviousStatus();
|
|
14090
14186
|
if (f.length > 0) {
|
|
14091
14187
|
writer.writeString(
|
|
14092
14188
|
5,
|
|
14093
14189
|
f
|
|
14094
14190
|
);
|
|
14095
14191
|
}
|
|
14096
|
-
f = message.
|
|
14097
|
-
if (f
|
|
14098
|
-
writer.
|
|
14192
|
+
f = message.getUpdatedAt();
|
|
14193
|
+
if (f !== 0) {
|
|
14194
|
+
writer.writeInt64(
|
|
14099
14195
|
6,
|
|
14100
14196
|
f
|
|
14101
14197
|
);
|
|
14102
14198
|
}
|
|
14103
14199
|
};
|
|
14104
|
-
proto.aggregator.
|
|
14200
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getSuccess = function() {
|
|
14105
14201
|
return (
|
|
14106
14202
|
/** @type {boolean} */
|
|
14107
14203
|
jspb.Message.getBooleanFieldWithDefault(this, 1, false)
|
|
14108
14204
|
);
|
|
14109
14205
|
};
|
|
14110
|
-
proto.aggregator.
|
|
14206
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setSuccess = function(value) {
|
|
14111
14207
|
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
14112
14208
|
};
|
|
14113
|
-
proto.aggregator.
|
|
14209
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getStatus = function() {
|
|
14114
14210
|
return (
|
|
14115
14211
|
/** @type {string} */
|
|
14116
14212
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
14117
14213
|
);
|
|
14118
14214
|
};
|
|
14119
|
-
proto.aggregator.
|
|
14215
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setStatus = function(value) {
|
|
14120
14216
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
14121
14217
|
};
|
|
14122
|
-
proto.aggregator.
|
|
14218
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getMessage = function() {
|
|
14123
14219
|
return (
|
|
14124
14220
|
/** @type {string} */
|
|
14125
14221
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
14126
14222
|
);
|
|
14127
14223
|
};
|
|
14128
|
-
proto.aggregator.
|
|
14224
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setMessage = function(value) {
|
|
14129
14225
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
14130
14226
|
};
|
|
14131
|
-
proto.aggregator.
|
|
14227
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getId = function() {
|
|
14132
14228
|
return (
|
|
14133
|
-
/** @type {
|
|
14134
|
-
jspb.Message.getFieldWithDefault(this, 4,
|
|
14229
|
+
/** @type {string} */
|
|
14230
|
+
jspb.Message.getFieldWithDefault(this, 4, "")
|
|
14135
14231
|
);
|
|
14136
14232
|
};
|
|
14137
|
-
proto.aggregator.
|
|
14138
|
-
return jspb.Message.
|
|
14233
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setId = function(value) {
|
|
14234
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
14139
14235
|
};
|
|
14140
|
-
proto.aggregator.
|
|
14236
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getPreviousStatus = function() {
|
|
14141
14237
|
return (
|
|
14142
14238
|
/** @type {string} */
|
|
14143
14239
|
jspb.Message.getFieldWithDefault(this, 5, "")
|
|
14144
14240
|
);
|
|
14145
14241
|
};
|
|
14146
|
-
proto.aggregator.
|
|
14242
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setPreviousStatus = function(value) {
|
|
14147
14243
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
14148
14244
|
};
|
|
14149
|
-
proto.aggregator.
|
|
14245
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getUpdatedAt = function() {
|
|
14150
14246
|
return (
|
|
14151
|
-
/** @type {
|
|
14152
|
-
jspb.Message.getFieldWithDefault(this, 6,
|
|
14247
|
+
/** @type {number} */
|
|
14248
|
+
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
14153
14249
|
);
|
|
14154
14250
|
};
|
|
14155
|
-
proto.aggregator.
|
|
14156
|
-
return jspb.Message.
|
|
14251
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setUpdatedAt = function(value) {
|
|
14252
|
+
return jspb.Message.setProto3IntField(this, 6, value);
|
|
14157
14253
|
};
|
|
14158
14254
|
proto.aggregator.GetWorkflowCountReq.repeatedFields_ = [1];
|
|
14159
14255
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -17844,11 +17940,11 @@ var require_avs_pb = __commonJS({
|
|
|
17844
17940
|
INSUFFICIENT_BALANCE: 8003
|
|
17845
17941
|
};
|
|
17846
17942
|
proto.aggregator.TaskStatus = {
|
|
17847
|
-
|
|
17943
|
+
ENABLED: 0,
|
|
17848
17944
|
COMPLETED: 1,
|
|
17849
17945
|
FAILED: 2,
|
|
17850
|
-
|
|
17851
|
-
|
|
17946
|
+
RUNNING: 4,
|
|
17947
|
+
DISABLED: 5
|
|
17852
17948
|
};
|
|
17853
17949
|
proto.aggregator.ExecutionStatus = {
|
|
17854
17950
|
EXECUTION_STATUS_UNSPECIFIED: 0,
|
|
@@ -17868,15 +17964,6 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
17868
17964
|
var grpc = require("@grpc/grpc-js");
|
|
17869
17965
|
var avs_pb25 = require_avs_pb();
|
|
17870
17966
|
var google_protobuf_struct_pb4 = require("google-protobuf/google/protobuf/struct_pb.js");
|
|
17871
|
-
function serialize_aggregator_CancelTaskResp(arg) {
|
|
17872
|
-
if (!(arg instanceof avs_pb25.CancelTaskResp)) {
|
|
17873
|
-
throw new Error("Expected argument of type aggregator.CancelTaskResp");
|
|
17874
|
-
}
|
|
17875
|
-
return Buffer.from(arg.serializeBinary());
|
|
17876
|
-
}
|
|
17877
|
-
function deserialize_aggregator_CancelTaskResp(buffer_arg) {
|
|
17878
|
-
return avs_pb25.CancelTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
17879
|
-
}
|
|
17880
17967
|
function serialize_aggregator_CreateOrUpdateSecretReq(arg) {
|
|
17881
17968
|
if (!(arg instanceof avs_pb25.CreateOrUpdateSecretReq)) {
|
|
17882
17969
|
throw new Error("Expected argument of type aggregator.CreateOrUpdateSecretReq");
|
|
@@ -18246,6 +18333,24 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18246
18333
|
function deserialize_aggregator_RunTriggerResp(buffer_arg) {
|
|
18247
18334
|
return avs_pb25.RunTriggerResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18248
18335
|
}
|
|
18336
|
+
function serialize_aggregator_SetTaskEnabledReq(arg) {
|
|
18337
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledReq)) {
|
|
18338
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledReq");
|
|
18339
|
+
}
|
|
18340
|
+
return Buffer.from(arg.serializeBinary());
|
|
18341
|
+
}
|
|
18342
|
+
function deserialize_aggregator_SetTaskEnabledReq(buffer_arg) {
|
|
18343
|
+
return avs_pb25.SetTaskEnabledReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18344
|
+
}
|
|
18345
|
+
function serialize_aggregator_SetTaskEnabledResp(arg) {
|
|
18346
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledResp)) {
|
|
18347
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledResp");
|
|
18348
|
+
}
|
|
18349
|
+
return Buffer.from(arg.serializeBinary());
|
|
18350
|
+
}
|
|
18351
|
+
function deserialize_aggregator_SetTaskEnabledResp(buffer_arg) {
|
|
18352
|
+
return avs_pb25.SetTaskEnabledResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18353
|
+
}
|
|
18249
18354
|
function serialize_aggregator_SetWalletReq(arg) {
|
|
18250
18355
|
if (!(arg instanceof avs_pb25.SetWalletReq)) {
|
|
18251
18356
|
throw new Error("Expected argument of type aggregator.SetWalletReq");
|
|
@@ -18467,16 +18572,16 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18467
18572
|
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
18468
18573
|
responseDeserialize: deserialize_aggregator_ExecutionStatusResp
|
|
18469
18574
|
},
|
|
18470
|
-
|
|
18471
|
-
path: "/aggregator.Aggregator/
|
|
18575
|
+
setTaskEnabled: {
|
|
18576
|
+
path: "/aggregator.Aggregator/SetTaskEnabled",
|
|
18472
18577
|
requestStream: false,
|
|
18473
18578
|
responseStream: false,
|
|
18474
|
-
requestType: avs_pb25.
|
|
18475
|
-
responseType: avs_pb25.
|
|
18476
|
-
requestSerialize:
|
|
18477
|
-
requestDeserialize:
|
|
18478
|
-
responseSerialize:
|
|
18479
|
-
responseDeserialize:
|
|
18579
|
+
requestType: avs_pb25.SetTaskEnabledReq,
|
|
18580
|
+
responseType: avs_pb25.SetTaskEnabledResp,
|
|
18581
|
+
requestSerialize: serialize_aggregator_SetTaskEnabledReq,
|
|
18582
|
+
requestDeserialize: deserialize_aggregator_SetTaskEnabledReq,
|
|
18583
|
+
responseSerialize: serialize_aggregator_SetTaskEnabledResp,
|
|
18584
|
+
responseDeserialize: deserialize_aggregator_SetTaskEnabledResp
|
|
18480
18585
|
},
|
|
18481
18586
|
deleteTask: {
|
|
18482
18587
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
@@ -20492,14 +20597,21 @@ var factory_default2 = NodeFactory;
|
|
|
20492
20597
|
// src/models/workflow.ts
|
|
20493
20598
|
var import_types20 = require("@avaprotocol/types");
|
|
20494
20599
|
function convertStatusToString(status2) {
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20600
|
+
switch (status2) {
|
|
20601
|
+
case avs_pb20.TaskStatus.ENABLED:
|
|
20602
|
+
return import_types20.WorkflowStatus.Enabled;
|
|
20603
|
+
case avs_pb20.TaskStatus.COMPLETED:
|
|
20604
|
+
return import_types20.WorkflowStatus.Completed;
|
|
20605
|
+
case avs_pb20.TaskStatus.FAILED:
|
|
20606
|
+
return import_types20.WorkflowStatus.Failed;
|
|
20607
|
+
case avs_pb20.TaskStatus.RUNNING:
|
|
20608
|
+
return import_types20.WorkflowStatus.Running;
|
|
20609
|
+
case avs_pb20.TaskStatus.DISABLED:
|
|
20610
|
+
return import_types20.WorkflowStatus.Disabled;
|
|
20611
|
+
default: {
|
|
20612
|
+
throw new Error(`Unknown TaskStatus: ${status2}`);
|
|
20613
|
+
}
|
|
20614
|
+
}
|
|
20503
20615
|
}
|
|
20504
20616
|
var Workflow = class _Workflow {
|
|
20505
20617
|
/**
|
|
@@ -21255,12 +21367,17 @@ var Client = class extends BaseClient {
|
|
|
21255
21367
|
/**
|
|
21256
21368
|
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
21257
21369
|
* @param {RequestOptions} options - Request options
|
|
21258
|
-
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
21370
|
+
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects, sorted by salt
|
|
21259
21371
|
*/
|
|
21260
21372
|
async getWallets(options) {
|
|
21261
21373
|
const request = new avs_pb24.ListWalletReq();
|
|
21262
21374
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
21263
|
-
|
|
21375
|
+
const wallets = result.getItemsList().map((item) => item.toObject());
|
|
21376
|
+
return wallets.sort((a, b) => {
|
|
21377
|
+
const saltA = a.salt || "";
|
|
21378
|
+
const saltB = b.salt || "";
|
|
21379
|
+
return saltA.localeCompare(saltB);
|
|
21380
|
+
});
|
|
21264
21381
|
}
|
|
21265
21382
|
/**
|
|
21266
21383
|
* Add a new smart wallet address to the wallet list
|
|
@@ -21284,10 +21401,10 @@ var Client = class extends BaseClient {
|
|
|
21284
21401
|
factory: result.getFactoryAddress(),
|
|
21285
21402
|
isHidden: result.getIsHidden(),
|
|
21286
21403
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21287
|
-
|
|
21404
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21288
21405
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21289
21406
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21290
|
-
|
|
21407
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21291
21408
|
};
|
|
21292
21409
|
}
|
|
21293
21410
|
/**
|
|
@@ -21314,17 +21431,17 @@ var Client = class extends BaseClient {
|
|
|
21314
21431
|
factory: result.getFactoryAddress(),
|
|
21315
21432
|
isHidden: result.getIsHidden(),
|
|
21316
21433
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21317
|
-
|
|
21434
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21318
21435
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21319
21436
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21320
|
-
|
|
21437
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21321
21438
|
};
|
|
21322
21439
|
}
|
|
21323
21440
|
/**
|
|
21324
21441
|
* Withdraw funds from a smart wallet using UserOp
|
|
21325
21442
|
* @param {WithdrawFundsRequest} withdrawRequest - The withdraw request parameters
|
|
21326
21443
|
* @param {string} withdrawRequest.recipientAddress - The recipient address to send funds to
|
|
21327
|
-
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20
|
|
21444
|
+
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20. Use "max" to withdraw maximum available balance
|
|
21328
21445
|
* @param {string} withdrawRequest.token - Token type: "ETH" for native ETH, or contract address for ERC20 tokens
|
|
21329
21446
|
* @param {string} withdrawRequest.smartWalletAddress - Required: Smart wallet address to withdraw from (must be from user's getWallet() call)
|
|
21330
21447
|
* @param {RequestOptions} options - Request options
|
|
@@ -21687,20 +21804,22 @@ var Client = class extends BaseClient {
|
|
|
21687
21804
|
return response;
|
|
21688
21805
|
}
|
|
21689
21806
|
/**
|
|
21690
|
-
*
|
|
21807
|
+
* Set workflow active state (activate/deactivate)
|
|
21691
21808
|
* @param {string} id - The workflow id
|
|
21809
|
+
* @param {boolean} enabled - Desired enabled state (true=enable, false=disable)
|
|
21692
21810
|
* @param {RequestOptions} options - Request options
|
|
21693
|
-
* @returns {Promise<
|
|
21811
|
+
* @returns {Promise<SetTaskEnabledResponse>} - The response from updating the workflow state
|
|
21694
21812
|
*/
|
|
21695
|
-
async
|
|
21696
|
-
const request = new avs_pb24.
|
|
21813
|
+
async setWorkflowEnabled(id, enabled, options) {
|
|
21814
|
+
const request = new avs_pb24.SetTaskEnabledReq();
|
|
21697
21815
|
request.setId(id);
|
|
21698
|
-
|
|
21816
|
+
request.setEnabled(enabled);
|
|
21817
|
+
const result = await this.sendGrpcRequest("setTaskEnabled", request, options);
|
|
21699
21818
|
return {
|
|
21700
21819
|
success: result.getSuccess(),
|
|
21701
21820
|
status: result.getStatus(),
|
|
21702
21821
|
message: result.getMessage(),
|
|
21703
|
-
|
|
21822
|
+
updatedAt: result.getUpdatedAt() || void 0,
|
|
21704
21823
|
id: result.getId(),
|
|
21705
21824
|
previousStatus: result.getPreviousStatus()
|
|
21706
21825
|
};
|