@avaprotocol/sdk-js 1.6.4 → 1.6.5
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 +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +112 -36
- package/dist/index.mjs +137 -61
- package/dist/models/node/factory.js +2 -2
- package/dist/models/node/interface.d.ts +8 -1
- package/dist/models/node/interface.d.ts.map +1 -1
- package/dist/models/node/interface.js +16 -2
- package/dist/models/trigger/interface.d.ts +1 -1
- package/dist/models/trigger/interface.d.ts.map +1 -1
- package/dist/models/trigger/reason.d.ts +1 -1
- package/dist/models/trigger/reason.d.ts.map +1 -1
- package/dist/models/trigger/reason.js +14 -14
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,m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tC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,MAAM,GACP,CAAC;AAEF,YAAY,EACV,aAAa,EACb,SAAS,EACT,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,yBAAyB,GAC1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -137,6 +137,7 @@ var require_avs_pb = __commonJS({
|
|
|
137
137
|
goog.exportSymbol("proto.aggregator.LoopNode.Config", null, global);
|
|
138
138
|
goog.exportSymbol("proto.aggregator.LoopNode.Output", null, global);
|
|
139
139
|
goog.exportSymbol("proto.aggregator.LoopNode.RunnerCase", null, global);
|
|
140
|
+
goog.exportSymbol("proto.aggregator.NodeType", null, global);
|
|
140
141
|
goog.exportSymbol("proto.aggregator.NonceRequest", null, global);
|
|
141
142
|
goog.exportSymbol("proto.aggregator.NonceResp", null, global);
|
|
142
143
|
goog.exportSymbol("proto.aggregator.PageInfo", null, global);
|
|
@@ -157,7 +158,7 @@ var require_avs_pb = __commonJS({
|
|
|
157
158
|
goog.exportSymbol("proto.aggregator.TaskTrigger", null, global);
|
|
158
159
|
goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global);
|
|
159
160
|
goog.exportSymbol("proto.aggregator.TriggerReason", null, global);
|
|
160
|
-
goog.exportSymbol("proto.aggregator.
|
|
161
|
+
goog.exportSymbol("proto.aggregator.TriggerType", null, global);
|
|
161
162
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskReq", null, global);
|
|
162
163
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskResp", null, global);
|
|
163
164
|
proto.aggregator.IdReq = function(opt_data) {
|
|
@@ -2363,6 +2364,7 @@ var require_avs_pb = __commonJS({
|
|
|
2363
2364
|
proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) {
|
|
2364
2365
|
var f, obj = {
|
|
2365
2366
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
2367
|
+
type: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
2366
2368
|
manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
|
2367
2369
|
fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedTimeTrigger.toObject(includeInstance, f),
|
|
2368
2370
|
cron: (f = msg.getCron()) && proto.aggregator.CronTrigger.toObject(includeInstance, f),
|
|
@@ -2395,6 +2397,13 @@ var require_avs_pb = __commonJS({
|
|
|
2395
2397
|
);
|
|
2396
2398
|
msg.setName(value);
|
|
2397
2399
|
break;
|
|
2400
|
+
case 8:
|
|
2401
|
+
var value = (
|
|
2402
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
2403
|
+
reader.readEnum()
|
|
2404
|
+
);
|
|
2405
|
+
msg.setType(value);
|
|
2406
|
+
break;
|
|
2398
2407
|
case 2:
|
|
2399
2408
|
var value = (
|
|
2400
2409
|
/** @type {boolean} */
|
|
@@ -2450,6 +2459,13 @@ var require_avs_pb = __commonJS({
|
|
|
2450
2459
|
f
|
|
2451
2460
|
);
|
|
2452
2461
|
}
|
|
2462
|
+
f = message.getType();
|
|
2463
|
+
if (f !== 0) {
|
|
2464
|
+
writer.writeEnum(
|
|
2465
|
+
8,
|
|
2466
|
+
f
|
|
2467
|
+
);
|
|
2468
|
+
}
|
|
2453
2469
|
f = /** @type {boolean} */
|
|
2454
2470
|
jspb.Message.getField(message, 2);
|
|
2455
2471
|
if (f != null) {
|
|
@@ -2507,6 +2523,15 @@ var require_avs_pb = __commonJS({
|
|
|
2507
2523
|
proto.aggregator.TaskTrigger.prototype.setName = function(value) {
|
|
2508
2524
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
2509
2525
|
};
|
|
2526
|
+
proto.aggregator.TaskTrigger.prototype.getType = function() {
|
|
2527
|
+
return (
|
|
2528
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
2529
|
+
jspb.Message.getFieldWithDefault(this, 8, 0)
|
|
2530
|
+
);
|
|
2531
|
+
};
|
|
2532
|
+
proto.aggregator.TaskTrigger.prototype.setType = function(value) {
|
|
2533
|
+
return jspb.Message.setProto3EnumField(this, 8, value);
|
|
2534
|
+
};
|
|
2510
2535
|
proto.aggregator.TaskTrigger.prototype.getManual = function() {
|
|
2511
2536
|
return (
|
|
2512
2537
|
/** @type {boolean} */
|
|
@@ -5219,6 +5244,7 @@ var require_avs_pb = __commonJS({
|
|
|
5219
5244
|
var f, obj = {
|
|
5220
5245
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5221
5246
|
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
5247
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
5222
5248
|
ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f),
|
|
5223
5249
|
contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f),
|
|
5224
5250
|
contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f),
|
|
@@ -5261,6 +5287,13 @@ var require_avs_pb = __commonJS({
|
|
|
5261
5287
|
);
|
|
5262
5288
|
msg.setName(value);
|
|
5263
5289
|
break;
|
|
5290
|
+
case 1:
|
|
5291
|
+
var value = (
|
|
5292
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
5293
|
+
reader.readEnum()
|
|
5294
|
+
);
|
|
5295
|
+
msg.setType(value);
|
|
5296
|
+
break;
|
|
5264
5297
|
case 10:
|
|
5265
5298
|
var value = new proto.aggregator.ETHTransferNode();
|
|
5266
5299
|
reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader);
|
|
@@ -5334,6 +5367,13 @@ var require_avs_pb = __commonJS({
|
|
|
5334
5367
|
f
|
|
5335
5368
|
);
|
|
5336
5369
|
}
|
|
5370
|
+
f = message.getType();
|
|
5371
|
+
if (f !== 0) {
|
|
5372
|
+
writer.writeEnum(
|
|
5373
|
+
1,
|
|
5374
|
+
f
|
|
5375
|
+
);
|
|
5376
|
+
}
|
|
5337
5377
|
f = message.getEthTransfer();
|
|
5338
5378
|
if (f != null) {
|
|
5339
5379
|
writer.writeMessage(
|
|
@@ -5425,6 +5465,15 @@ var require_avs_pb = __commonJS({
|
|
|
5425
5465
|
proto.aggregator.TaskNode.prototype.setName = function(value) {
|
|
5426
5466
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
5427
5467
|
};
|
|
5468
|
+
proto.aggregator.TaskNode.prototype.getType = function() {
|
|
5469
|
+
return (
|
|
5470
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
5471
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
5472
|
+
);
|
|
5473
|
+
};
|
|
5474
|
+
proto.aggregator.TaskNode.prototype.setType = function(value) {
|
|
5475
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
5476
|
+
};
|
|
5428
5477
|
proto.aggregator.TaskNode.prototype.getEthTransfer = function() {
|
|
5429
5478
|
return (
|
|
5430
5479
|
/** @type{?proto.aggregator.ETHTransferNode} */
|
|
@@ -8482,7 +8531,7 @@ var require_avs_pb = __commonJS({
|
|
|
8482
8531
|
break;
|
|
8483
8532
|
case 5:
|
|
8484
8533
|
var value = (
|
|
8485
|
-
/** @type {!proto.aggregator.
|
|
8534
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
8486
8535
|
reader.readEnum()
|
|
8487
8536
|
);
|
|
8488
8537
|
msg.setType(value);
|
|
@@ -8537,14 +8586,6 @@ var require_avs_pb = __commonJS({
|
|
|
8537
8586
|
);
|
|
8538
8587
|
}
|
|
8539
8588
|
};
|
|
8540
|
-
proto.aggregator.TriggerReason.TriggerType = {
|
|
8541
|
-
UNSET: 0,
|
|
8542
|
-
MANUAL: 2,
|
|
8543
|
-
FIXEDTIME: 3,
|
|
8544
|
-
CRON: 4,
|
|
8545
|
-
BLOCK: 5,
|
|
8546
|
-
EVENT: 6
|
|
8547
|
-
};
|
|
8548
8589
|
proto.aggregator.TriggerReason.prototype.getBlockNumber = function() {
|
|
8549
8590
|
return (
|
|
8550
8591
|
/** @type {number} */
|
|
@@ -8583,7 +8624,7 @@ var require_avs_pb = __commonJS({
|
|
|
8583
8624
|
};
|
|
8584
8625
|
proto.aggregator.TriggerReason.prototype.getType = function() {
|
|
8585
8626
|
return (
|
|
8586
|
-
/** @type {!proto.aggregator.
|
|
8627
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
8587
8628
|
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
8588
8629
|
);
|
|
8589
8630
|
};
|
|
@@ -10813,7 +10854,7 @@ var require_avs_pb = __commonJS({
|
|
|
10813
10854
|
};
|
|
10814
10855
|
proto.aggregator.RunNodeWithInputsReq.toObject = function(includeInstance, msg) {
|
|
10815
10856
|
var f, obj = {
|
|
10816
|
-
nodeType: jspb.Message.getFieldWithDefault(msg, 1,
|
|
10857
|
+
nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
10817
10858
|
nodeConfigMap: (f = msg.getNodeConfigMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [],
|
|
10818
10859
|
inputVariablesMap: (f = msg.getInputVariablesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
|
|
10819
10860
|
};
|
|
@@ -10837,8 +10878,8 @@ var require_avs_pb = __commonJS({
|
|
|
10837
10878
|
switch (field) {
|
|
10838
10879
|
case 1:
|
|
10839
10880
|
var value = (
|
|
10840
|
-
/** @type {
|
|
10841
|
-
reader.
|
|
10881
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
10882
|
+
reader.readEnum()
|
|
10842
10883
|
);
|
|
10843
10884
|
msg.setNodeType(value);
|
|
10844
10885
|
break;
|
|
@@ -10869,8 +10910,8 @@ var require_avs_pb = __commonJS({
|
|
|
10869
10910
|
proto.aggregator.RunNodeWithInputsReq.serializeBinaryToWriter = function(message, writer) {
|
|
10870
10911
|
var f = void 0;
|
|
10871
10912
|
f = message.getNodeType();
|
|
10872
|
-
if (f
|
|
10873
|
-
writer.
|
|
10913
|
+
if (f !== 0) {
|
|
10914
|
+
writer.writeEnum(
|
|
10874
10915
|
1,
|
|
10875
10916
|
f
|
|
10876
10917
|
);
|
|
@@ -10886,12 +10927,12 @@ var require_avs_pb = __commonJS({
|
|
|
10886
10927
|
};
|
|
10887
10928
|
proto.aggregator.RunNodeWithInputsReq.prototype.getNodeType = function() {
|
|
10888
10929
|
return (
|
|
10889
|
-
/** @type {
|
|
10890
|
-
jspb.Message.getFieldWithDefault(this, 1,
|
|
10930
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
10931
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
10891
10932
|
);
|
|
10892
10933
|
};
|
|
10893
10934
|
proto.aggregator.RunNodeWithInputsReq.prototype.setNodeType = function(value) {
|
|
10894
|
-
return jspb.Message.
|
|
10935
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
10895
10936
|
};
|
|
10896
10937
|
proto.aggregator.RunNodeWithInputsReq.prototype.getNodeConfigMap = function(opt_noLazyCreate) {
|
|
10897
10938
|
return (
|
|
@@ -12520,6 +12561,26 @@ var require_avs_pb = __commonJS({
|
|
|
12520
12561
|
proto.aggregator.Evm.UserOp.prototype.setSignature = function(value) {
|
|
12521
12562
|
return jspb.Message.setProto3StringField(this, 11, value);
|
|
12522
12563
|
};
|
|
12564
|
+
proto.aggregator.TriggerType = {
|
|
12565
|
+
TRIGGER_TYPE_UNSPECIFIED: 0,
|
|
12566
|
+
TRIGGER_TYPE_MANUAL: 1,
|
|
12567
|
+
TRIGGER_TYPE_FIXED_TIME: 2,
|
|
12568
|
+
TRIGGER_TYPE_CRON: 3,
|
|
12569
|
+
TRIGGER_TYPE_BLOCK: 4,
|
|
12570
|
+
TRIGGER_TYPE_EVENT: 5
|
|
12571
|
+
};
|
|
12572
|
+
proto.aggregator.NodeType = {
|
|
12573
|
+
NODE_TYPE_UNSPECIFIED: 0,
|
|
12574
|
+
NODE_TYPE_ETH_TRANSFER: 1,
|
|
12575
|
+
NODE_TYPE_CONTRACT_WRITE: 2,
|
|
12576
|
+
NODE_TYPE_CONTRACT_READ: 3,
|
|
12577
|
+
NODE_TYPE_GRAPHQL_QUERY: 4,
|
|
12578
|
+
NODE_TYPE_REST_API: 5,
|
|
12579
|
+
NODE_TYPE_CUSTOM_CODE: 6,
|
|
12580
|
+
NODE_TYPE_BRANCH: 7,
|
|
12581
|
+
NODE_TYPE_FILTER: 8,
|
|
12582
|
+
NODE_TYPE_LOOP: 9
|
|
12583
|
+
};
|
|
12523
12584
|
proto.aggregator.Lang = {
|
|
12524
12585
|
JAVASCRIPT: 0
|
|
12525
12586
|
};
|
|
@@ -13993,8 +14054,8 @@ var NodeFactory = class {
|
|
|
13993
14054
|
return new filter_default(props);
|
|
13994
14055
|
case import_types17.NodeType.Loop:
|
|
13995
14056
|
return new loop_default(props);
|
|
13996
|
-
case import_types17.NodeType.
|
|
13997
|
-
throw new Error("Cannot create node with
|
|
14057
|
+
case import_types17.NodeType.Unspecified:
|
|
14058
|
+
throw new Error("Cannot create node with unspecified type");
|
|
13998
14059
|
default:
|
|
13999
14060
|
throw new Error(`Unsupported node type: ${props.type}`);
|
|
14000
14061
|
}
|
|
@@ -14149,12 +14210,12 @@ var avs_pb18 = __toESM(require_avs_pb());
|
|
|
14149
14210
|
var import_types19 = require("@avaprotocol/types");
|
|
14150
14211
|
var convertTriggerType = (grpcType) => {
|
|
14151
14212
|
const conversionMap = {
|
|
14152
|
-
[avs_pb18.
|
|
14153
|
-
[avs_pb18.
|
|
14154
|
-
[avs_pb18.
|
|
14155
|
-
[avs_pb18.
|
|
14156
|
-
[avs_pb18.
|
|
14157
|
-
[avs_pb18.
|
|
14213
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME]: import_types19.TriggerType.FixedTime,
|
|
14214
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_CRON]: import_types19.TriggerType.Cron,
|
|
14215
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK]: import_types19.TriggerType.Block,
|
|
14216
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_EVENT]: import_types19.TriggerType.Event,
|
|
14217
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL]: import_types19.TriggerType.Manual,
|
|
14218
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: import_types19.TriggerType.Unspecified
|
|
14158
14219
|
};
|
|
14159
14220
|
return conversionMap[grpcType];
|
|
14160
14221
|
};
|
|
@@ -14175,7 +14236,7 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14175
14236
|
this.txHash = props.txHash;
|
|
14176
14237
|
break;
|
|
14177
14238
|
case import_types19.TriggerType.Manual:
|
|
14178
|
-
case import_types19.TriggerType.
|
|
14239
|
+
case import_types19.TriggerType.Unspecified:
|
|
14179
14240
|
break;
|
|
14180
14241
|
default:
|
|
14181
14242
|
throw new Error("Unsupported trigger type");
|
|
@@ -14197,25 +14258,25 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14197
14258
|
const request = new avs_pb18.TriggerReason();
|
|
14198
14259
|
switch (this.type) {
|
|
14199
14260
|
case import_types19.TriggerType.FixedTime:
|
|
14200
|
-
request.setType(avs_pb18.
|
|
14261
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
14201
14262
|
if (this.epoch) {
|
|
14202
14263
|
request.setEpoch(this.epoch);
|
|
14203
14264
|
}
|
|
14204
14265
|
break;
|
|
14205
14266
|
case import_types19.TriggerType.Cron:
|
|
14206
|
-
request.setType(avs_pb18.
|
|
14267
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_CRON);
|
|
14207
14268
|
if (this.epoch) {
|
|
14208
14269
|
request.setEpoch(this.epoch);
|
|
14209
14270
|
}
|
|
14210
14271
|
break;
|
|
14211
14272
|
case import_types19.TriggerType.Block:
|
|
14212
|
-
request.setType(avs_pb18.
|
|
14273
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
14213
14274
|
if (this.blockNumber) {
|
|
14214
14275
|
request.setBlockNumber(this.blockNumber);
|
|
14215
14276
|
}
|
|
14216
14277
|
break;
|
|
14217
14278
|
case import_types19.TriggerType.Event:
|
|
14218
|
-
request.setType(avs_pb18.
|
|
14279
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_EVENT);
|
|
14219
14280
|
if (this.blockNumber) {
|
|
14220
14281
|
request.setBlockNumber(this.blockNumber);
|
|
14221
14282
|
}
|
|
@@ -14227,10 +14288,10 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14227
14288
|
}
|
|
14228
14289
|
break;
|
|
14229
14290
|
case import_types19.TriggerType.Manual:
|
|
14230
|
-
request.setType(avs_pb18.
|
|
14291
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
14231
14292
|
break;
|
|
14232
|
-
case import_types19.TriggerType.
|
|
14233
|
-
request.setType(avs_pb18.
|
|
14293
|
+
case import_types19.TriggerType.Unspecified:
|
|
14294
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
14234
14295
|
break;
|
|
14235
14296
|
default:
|
|
14236
14297
|
throw new Error("Unsupported trigger type");
|
|
@@ -15089,7 +15150,22 @@ var Client = class extends BaseClient {
|
|
|
15089
15150
|
};
|
|
15090
15151
|
}
|
|
15091
15152
|
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
15092
|
-
|
|
15153
|
+
let protobufNodeType;
|
|
15154
|
+
switch (nodeType) {
|
|
15155
|
+
// Trigger types - map to CUSTOM_CODE since they're handled specially by the backend
|
|
15156
|
+
case "blockTrigger":
|
|
15157
|
+
case "fixedTimeTrigger":
|
|
15158
|
+
case "cronTrigger":
|
|
15159
|
+
case "eventTrigger":
|
|
15160
|
+
case "manualTrigger":
|
|
15161
|
+
protobufNodeType = avs_pb22.NodeType.NODE_TYPE_CUSTOM_CODE;
|
|
15162
|
+
break;
|
|
15163
|
+
// Regular node types
|
|
15164
|
+
default:
|
|
15165
|
+
protobufNodeType = import_types20.NodeTypeGoConverter.fromGoString(nodeType);
|
|
15166
|
+
break;
|
|
15167
|
+
}
|
|
15168
|
+
request.setNodeType(protobufNodeType);
|
|
15093
15169
|
const nodeConfigMap = request.getNodeConfigMap();
|
|
15094
15170
|
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15095
15171
|
nodeConfigMap.set(key, this.convertJSValueToProtobuf(value));
|
package/dist/index.mjs
CHANGED
|
@@ -137,6 +137,7 @@ var require_avs_pb = __commonJS({
|
|
|
137
137
|
goog.exportSymbol("proto.aggregator.LoopNode.Config", null, global);
|
|
138
138
|
goog.exportSymbol("proto.aggregator.LoopNode.Output", null, global);
|
|
139
139
|
goog.exportSymbol("proto.aggregator.LoopNode.RunnerCase", null, global);
|
|
140
|
+
goog.exportSymbol("proto.aggregator.NodeType", null, global);
|
|
140
141
|
goog.exportSymbol("proto.aggregator.NonceRequest", null, global);
|
|
141
142
|
goog.exportSymbol("proto.aggregator.NonceResp", null, global);
|
|
142
143
|
goog.exportSymbol("proto.aggregator.PageInfo", null, global);
|
|
@@ -157,7 +158,7 @@ var require_avs_pb = __commonJS({
|
|
|
157
158
|
goog.exportSymbol("proto.aggregator.TaskTrigger", null, global);
|
|
158
159
|
goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global);
|
|
159
160
|
goog.exportSymbol("proto.aggregator.TriggerReason", null, global);
|
|
160
|
-
goog.exportSymbol("proto.aggregator.
|
|
161
|
+
goog.exportSymbol("proto.aggregator.TriggerType", null, global);
|
|
161
162
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskReq", null, global);
|
|
162
163
|
goog.exportSymbol("proto.aggregator.UserTriggerTaskResp", null, global);
|
|
163
164
|
proto.aggregator.IdReq = function(opt_data) {
|
|
@@ -2363,6 +2364,7 @@ var require_avs_pb = __commonJS({
|
|
|
2363
2364
|
proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) {
|
|
2364
2365
|
var f, obj = {
|
|
2365
2366
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
2367
|
+
type: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
2366
2368
|
manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
|
2367
2369
|
fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedTimeTrigger.toObject(includeInstance, f),
|
|
2368
2370
|
cron: (f = msg.getCron()) && proto.aggregator.CronTrigger.toObject(includeInstance, f),
|
|
@@ -2395,6 +2397,13 @@ var require_avs_pb = __commonJS({
|
|
|
2395
2397
|
);
|
|
2396
2398
|
msg.setName(value);
|
|
2397
2399
|
break;
|
|
2400
|
+
case 8:
|
|
2401
|
+
var value = (
|
|
2402
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
2403
|
+
reader.readEnum()
|
|
2404
|
+
);
|
|
2405
|
+
msg.setType(value);
|
|
2406
|
+
break;
|
|
2398
2407
|
case 2:
|
|
2399
2408
|
var value = (
|
|
2400
2409
|
/** @type {boolean} */
|
|
@@ -2450,6 +2459,13 @@ var require_avs_pb = __commonJS({
|
|
|
2450
2459
|
f
|
|
2451
2460
|
);
|
|
2452
2461
|
}
|
|
2462
|
+
f = message.getType();
|
|
2463
|
+
if (f !== 0) {
|
|
2464
|
+
writer.writeEnum(
|
|
2465
|
+
8,
|
|
2466
|
+
f
|
|
2467
|
+
);
|
|
2468
|
+
}
|
|
2453
2469
|
f = /** @type {boolean} */
|
|
2454
2470
|
jspb.Message.getField(message, 2);
|
|
2455
2471
|
if (f != null) {
|
|
@@ -2507,6 +2523,15 @@ var require_avs_pb = __commonJS({
|
|
|
2507
2523
|
proto.aggregator.TaskTrigger.prototype.setName = function(value) {
|
|
2508
2524
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
2509
2525
|
};
|
|
2526
|
+
proto.aggregator.TaskTrigger.prototype.getType = function() {
|
|
2527
|
+
return (
|
|
2528
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
2529
|
+
jspb.Message.getFieldWithDefault(this, 8, 0)
|
|
2530
|
+
);
|
|
2531
|
+
};
|
|
2532
|
+
proto.aggregator.TaskTrigger.prototype.setType = function(value) {
|
|
2533
|
+
return jspb.Message.setProto3EnumField(this, 8, value);
|
|
2534
|
+
};
|
|
2510
2535
|
proto.aggregator.TaskTrigger.prototype.getManual = function() {
|
|
2511
2536
|
return (
|
|
2512
2537
|
/** @type {boolean} */
|
|
@@ -5219,6 +5244,7 @@ var require_avs_pb = __commonJS({
|
|
|
5219
5244
|
var f, obj = {
|
|
5220
5245
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5221
5246
|
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
5247
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
5222
5248
|
ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f),
|
|
5223
5249
|
contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f),
|
|
5224
5250
|
contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f),
|
|
@@ -5261,6 +5287,13 @@ var require_avs_pb = __commonJS({
|
|
|
5261
5287
|
);
|
|
5262
5288
|
msg.setName(value);
|
|
5263
5289
|
break;
|
|
5290
|
+
case 1:
|
|
5291
|
+
var value = (
|
|
5292
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
5293
|
+
reader.readEnum()
|
|
5294
|
+
);
|
|
5295
|
+
msg.setType(value);
|
|
5296
|
+
break;
|
|
5264
5297
|
case 10:
|
|
5265
5298
|
var value = new proto.aggregator.ETHTransferNode();
|
|
5266
5299
|
reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader);
|
|
@@ -5334,6 +5367,13 @@ var require_avs_pb = __commonJS({
|
|
|
5334
5367
|
f
|
|
5335
5368
|
);
|
|
5336
5369
|
}
|
|
5370
|
+
f = message.getType();
|
|
5371
|
+
if (f !== 0) {
|
|
5372
|
+
writer.writeEnum(
|
|
5373
|
+
1,
|
|
5374
|
+
f
|
|
5375
|
+
);
|
|
5376
|
+
}
|
|
5337
5377
|
f = message.getEthTransfer();
|
|
5338
5378
|
if (f != null) {
|
|
5339
5379
|
writer.writeMessage(
|
|
@@ -5425,6 +5465,15 @@ var require_avs_pb = __commonJS({
|
|
|
5425
5465
|
proto.aggregator.TaskNode.prototype.setName = function(value) {
|
|
5426
5466
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
5427
5467
|
};
|
|
5468
|
+
proto.aggregator.TaskNode.prototype.getType = function() {
|
|
5469
|
+
return (
|
|
5470
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
5471
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
5472
|
+
);
|
|
5473
|
+
};
|
|
5474
|
+
proto.aggregator.TaskNode.prototype.setType = function(value) {
|
|
5475
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
5476
|
+
};
|
|
5428
5477
|
proto.aggregator.TaskNode.prototype.getEthTransfer = function() {
|
|
5429
5478
|
return (
|
|
5430
5479
|
/** @type{?proto.aggregator.ETHTransferNode} */
|
|
@@ -8482,7 +8531,7 @@ var require_avs_pb = __commonJS({
|
|
|
8482
8531
|
break;
|
|
8483
8532
|
case 5:
|
|
8484
8533
|
var value = (
|
|
8485
|
-
/** @type {!proto.aggregator.
|
|
8534
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
8486
8535
|
reader.readEnum()
|
|
8487
8536
|
);
|
|
8488
8537
|
msg.setType(value);
|
|
@@ -8537,14 +8586,6 @@ var require_avs_pb = __commonJS({
|
|
|
8537
8586
|
);
|
|
8538
8587
|
}
|
|
8539
8588
|
};
|
|
8540
|
-
proto.aggregator.TriggerReason.TriggerType = {
|
|
8541
|
-
UNSET: 0,
|
|
8542
|
-
MANUAL: 2,
|
|
8543
|
-
FIXEDTIME: 3,
|
|
8544
|
-
CRON: 4,
|
|
8545
|
-
BLOCK: 5,
|
|
8546
|
-
EVENT: 6
|
|
8547
|
-
};
|
|
8548
8589
|
proto.aggregator.TriggerReason.prototype.getBlockNumber = function() {
|
|
8549
8590
|
return (
|
|
8550
8591
|
/** @type {number} */
|
|
@@ -8583,7 +8624,7 @@ var require_avs_pb = __commonJS({
|
|
|
8583
8624
|
};
|
|
8584
8625
|
proto.aggregator.TriggerReason.prototype.getType = function() {
|
|
8585
8626
|
return (
|
|
8586
|
-
/** @type {!proto.aggregator.
|
|
8627
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
8587
8628
|
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
8588
8629
|
);
|
|
8589
8630
|
};
|
|
@@ -10813,7 +10854,7 @@ var require_avs_pb = __commonJS({
|
|
|
10813
10854
|
};
|
|
10814
10855
|
proto.aggregator.RunNodeWithInputsReq.toObject = function(includeInstance, msg) {
|
|
10815
10856
|
var f, obj = {
|
|
10816
|
-
nodeType: jspb.Message.getFieldWithDefault(msg, 1,
|
|
10857
|
+
nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
10817
10858
|
nodeConfigMap: (f = msg.getNodeConfigMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [],
|
|
10818
10859
|
inputVariablesMap: (f = msg.getInputVariablesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
|
|
10819
10860
|
};
|
|
@@ -10837,8 +10878,8 @@ var require_avs_pb = __commonJS({
|
|
|
10837
10878
|
switch (field) {
|
|
10838
10879
|
case 1:
|
|
10839
10880
|
var value = (
|
|
10840
|
-
/** @type {
|
|
10841
|
-
reader.
|
|
10881
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
10882
|
+
reader.readEnum()
|
|
10842
10883
|
);
|
|
10843
10884
|
msg.setNodeType(value);
|
|
10844
10885
|
break;
|
|
@@ -10869,8 +10910,8 @@ var require_avs_pb = __commonJS({
|
|
|
10869
10910
|
proto.aggregator.RunNodeWithInputsReq.serializeBinaryToWriter = function(message, writer) {
|
|
10870
10911
|
var f = void 0;
|
|
10871
10912
|
f = message.getNodeType();
|
|
10872
|
-
if (f
|
|
10873
|
-
writer.
|
|
10913
|
+
if (f !== 0) {
|
|
10914
|
+
writer.writeEnum(
|
|
10874
10915
|
1,
|
|
10875
10916
|
f
|
|
10876
10917
|
);
|
|
@@ -10886,12 +10927,12 @@ var require_avs_pb = __commonJS({
|
|
|
10886
10927
|
};
|
|
10887
10928
|
proto.aggregator.RunNodeWithInputsReq.prototype.getNodeType = function() {
|
|
10888
10929
|
return (
|
|
10889
|
-
/** @type {
|
|
10890
|
-
jspb.Message.getFieldWithDefault(this, 1,
|
|
10930
|
+
/** @type {!proto.aggregator.NodeType} */
|
|
10931
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
10891
10932
|
);
|
|
10892
10933
|
};
|
|
10893
10934
|
proto.aggregator.RunNodeWithInputsReq.prototype.setNodeType = function(value) {
|
|
10894
|
-
return jspb.Message.
|
|
10935
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
10895
10936
|
};
|
|
10896
10937
|
proto.aggregator.RunNodeWithInputsReq.prototype.getNodeConfigMap = function(opt_noLazyCreate) {
|
|
10897
10938
|
return (
|
|
@@ -12520,6 +12561,26 @@ var require_avs_pb = __commonJS({
|
|
|
12520
12561
|
proto.aggregator.Evm.UserOp.prototype.setSignature = function(value) {
|
|
12521
12562
|
return jspb.Message.setProto3StringField(this, 11, value);
|
|
12522
12563
|
};
|
|
12564
|
+
proto.aggregator.TriggerType = {
|
|
12565
|
+
TRIGGER_TYPE_UNSPECIFIED: 0,
|
|
12566
|
+
TRIGGER_TYPE_MANUAL: 1,
|
|
12567
|
+
TRIGGER_TYPE_FIXED_TIME: 2,
|
|
12568
|
+
TRIGGER_TYPE_CRON: 3,
|
|
12569
|
+
TRIGGER_TYPE_BLOCK: 4,
|
|
12570
|
+
TRIGGER_TYPE_EVENT: 5
|
|
12571
|
+
};
|
|
12572
|
+
proto.aggregator.NodeType = {
|
|
12573
|
+
NODE_TYPE_UNSPECIFIED: 0,
|
|
12574
|
+
NODE_TYPE_ETH_TRANSFER: 1,
|
|
12575
|
+
NODE_TYPE_CONTRACT_WRITE: 2,
|
|
12576
|
+
NODE_TYPE_CONTRACT_READ: 3,
|
|
12577
|
+
NODE_TYPE_GRAPHQL_QUERY: 4,
|
|
12578
|
+
NODE_TYPE_REST_API: 5,
|
|
12579
|
+
NODE_TYPE_CUSTOM_CODE: 6,
|
|
12580
|
+
NODE_TYPE_BRANCH: 7,
|
|
12581
|
+
NODE_TYPE_FILTER: 8,
|
|
12582
|
+
NODE_TYPE_LOOP: 9
|
|
12583
|
+
};
|
|
12523
12584
|
proto.aggregator.Lang = {
|
|
12524
12585
|
JAVASCRIPT: 0
|
|
12525
12586
|
};
|
|
@@ -13533,7 +13594,7 @@ import _3 from "lodash";
|
|
|
13533
13594
|
|
|
13534
13595
|
// src/models/node/interface.ts
|
|
13535
13596
|
var avs_pb7 = __toESM(require_avs_pb());
|
|
13536
|
-
import { NodeType } from "@avaprotocol/types";
|
|
13597
|
+
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
13537
13598
|
import _2 from "lodash";
|
|
13538
13599
|
var Node = class {
|
|
13539
13600
|
constructor(props) {
|
|
@@ -13966,8 +14027,8 @@ var NodeFactory = class {
|
|
|
13966
14027
|
return new filter_default(props);
|
|
13967
14028
|
case NodeType11.Loop:
|
|
13968
14029
|
return new loop_default(props);
|
|
13969
|
-
case NodeType11.
|
|
13970
|
-
throw new Error("Cannot create node with
|
|
14030
|
+
case NodeType11.Unspecified:
|
|
14031
|
+
throw new Error("Cannot create node with unspecified type");
|
|
13971
14032
|
default:
|
|
13972
14033
|
throw new Error(`Unsupported node type: ${props.type}`);
|
|
13973
14034
|
}
|
|
@@ -14119,15 +14180,15 @@ var avs_pb20 = __toESM(require_avs_pb());
|
|
|
14119
14180
|
|
|
14120
14181
|
// src/models/trigger/reason.ts
|
|
14121
14182
|
var avs_pb18 = __toESM(require_avs_pb());
|
|
14122
|
-
import { TriggerType as
|
|
14183
|
+
import { TriggerType as TriggerType8 } from "@avaprotocol/types";
|
|
14123
14184
|
var convertTriggerType = (grpcType) => {
|
|
14124
14185
|
const conversionMap = {
|
|
14125
|
-
[avs_pb18.
|
|
14126
|
-
[avs_pb18.
|
|
14127
|
-
[avs_pb18.
|
|
14128
|
-
[avs_pb18.
|
|
14129
|
-
[avs_pb18.
|
|
14130
|
-
[avs_pb18.
|
|
14186
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME]: TriggerType8.FixedTime,
|
|
14187
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_CRON]: TriggerType8.Cron,
|
|
14188
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK]: TriggerType8.Block,
|
|
14189
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_EVENT]: TriggerType8.Event,
|
|
14190
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL]: TriggerType8.Manual,
|
|
14191
|
+
[avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: TriggerType8.Unspecified
|
|
14131
14192
|
};
|
|
14132
14193
|
return conversionMap[grpcType];
|
|
14133
14194
|
};
|
|
@@ -14135,20 +14196,20 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14135
14196
|
constructor(props) {
|
|
14136
14197
|
this.type = props.type;
|
|
14137
14198
|
switch (props.type) {
|
|
14138
|
-
case
|
|
14139
|
-
case
|
|
14199
|
+
case TriggerType8.FixedTime:
|
|
14200
|
+
case TriggerType8.Cron:
|
|
14140
14201
|
this.epoch = props.epoch;
|
|
14141
14202
|
break;
|
|
14142
|
-
case
|
|
14203
|
+
case TriggerType8.Block:
|
|
14143
14204
|
this.blockNumber = props.blockNumber;
|
|
14144
14205
|
break;
|
|
14145
|
-
case
|
|
14206
|
+
case TriggerType8.Event:
|
|
14146
14207
|
this.blockNumber = props.blockNumber;
|
|
14147
14208
|
this.logIndex = props.logIndex;
|
|
14148
14209
|
this.txHash = props.txHash;
|
|
14149
14210
|
break;
|
|
14150
|
-
case
|
|
14151
|
-
case
|
|
14211
|
+
case TriggerType8.Manual:
|
|
14212
|
+
case TriggerType8.Unspecified:
|
|
14152
14213
|
break;
|
|
14153
14214
|
default:
|
|
14154
14215
|
throw new Error("Unsupported trigger type");
|
|
@@ -14169,26 +14230,26 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14169
14230
|
toRequest() {
|
|
14170
14231
|
const request = new avs_pb18.TriggerReason();
|
|
14171
14232
|
switch (this.type) {
|
|
14172
|
-
case
|
|
14173
|
-
request.setType(avs_pb18.
|
|
14233
|
+
case TriggerType8.FixedTime:
|
|
14234
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
14174
14235
|
if (this.epoch) {
|
|
14175
14236
|
request.setEpoch(this.epoch);
|
|
14176
14237
|
}
|
|
14177
14238
|
break;
|
|
14178
|
-
case
|
|
14179
|
-
request.setType(avs_pb18.
|
|
14239
|
+
case TriggerType8.Cron:
|
|
14240
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_CRON);
|
|
14180
14241
|
if (this.epoch) {
|
|
14181
14242
|
request.setEpoch(this.epoch);
|
|
14182
14243
|
}
|
|
14183
14244
|
break;
|
|
14184
|
-
case
|
|
14185
|
-
request.setType(avs_pb18.
|
|
14245
|
+
case TriggerType8.Block:
|
|
14246
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
14186
14247
|
if (this.blockNumber) {
|
|
14187
14248
|
request.setBlockNumber(this.blockNumber);
|
|
14188
14249
|
}
|
|
14189
14250
|
break;
|
|
14190
|
-
case
|
|
14191
|
-
request.setType(avs_pb18.
|
|
14251
|
+
case TriggerType8.Event:
|
|
14252
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_EVENT);
|
|
14192
14253
|
if (this.blockNumber) {
|
|
14193
14254
|
request.setBlockNumber(this.blockNumber);
|
|
14194
14255
|
}
|
|
@@ -14199,11 +14260,11 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14199
14260
|
request.setTxHash(this.txHash);
|
|
14200
14261
|
}
|
|
14201
14262
|
break;
|
|
14202
|
-
case
|
|
14203
|
-
request.setType(avs_pb18.
|
|
14263
|
+
case TriggerType8.Manual:
|
|
14264
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
14204
14265
|
break;
|
|
14205
|
-
case
|
|
14206
|
-
request.setType(avs_pb18.
|
|
14266
|
+
case TriggerType8.Unspecified:
|
|
14267
|
+
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
14207
14268
|
break;
|
|
14208
14269
|
default:
|
|
14209
14270
|
throw new Error("Unsupported trigger type");
|
|
@@ -14414,7 +14475,7 @@ var Secret = class {
|
|
|
14414
14475
|
var secret_default = Secret;
|
|
14415
14476
|
|
|
14416
14477
|
// src/index.ts
|
|
14417
|
-
import { NodeType as
|
|
14478
|
+
import { NodeType as NodeType13, TriggerType as TriggerType9, NodeTypeGoConverter as NodeTypeGoConverter2 } from "@avaprotocol/types";
|
|
14418
14479
|
import { AUTH_KEY_HEADER, DEFAULT_LIMIT } from "@avaprotocol/types";
|
|
14419
14480
|
var BaseClient = class {
|
|
14420
14481
|
constructor(opts) {
|
|
@@ -15062,7 +15123,22 @@ var Client = class extends BaseClient {
|
|
|
15062
15123
|
};
|
|
15063
15124
|
}
|
|
15064
15125
|
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
15065
|
-
|
|
15126
|
+
let protobufNodeType;
|
|
15127
|
+
switch (nodeType) {
|
|
15128
|
+
// Trigger types - map to CUSTOM_CODE since they're handled specially by the backend
|
|
15129
|
+
case "blockTrigger":
|
|
15130
|
+
case "fixedTimeTrigger":
|
|
15131
|
+
case "cronTrigger":
|
|
15132
|
+
case "eventTrigger":
|
|
15133
|
+
case "manualTrigger":
|
|
15134
|
+
protobufNodeType = avs_pb22.NodeType.NODE_TYPE_CUSTOM_CODE;
|
|
15135
|
+
break;
|
|
15136
|
+
// Regular node types
|
|
15137
|
+
default:
|
|
15138
|
+
protobufNodeType = NodeTypeGoConverter2.fromGoString(nodeType);
|
|
15139
|
+
break;
|
|
15140
|
+
}
|
|
15141
|
+
request.setNodeType(protobufNodeType);
|
|
15066
15142
|
const nodeConfigMap = request.getNodeConfigMap();
|
|
15067
15143
|
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15068
15144
|
nodeConfigMap.set(key, this.convertJSValueToProtobuf(value));
|
|
@@ -15143,17 +15219,17 @@ var Client = class extends BaseClient {
|
|
|
15143
15219
|
}
|
|
15144
15220
|
mapNodeTypeString(nodeType) {
|
|
15145
15221
|
const typeMap = {
|
|
15146
|
-
blockTrigger:
|
|
15222
|
+
blockTrigger: NodeType13.CustomCode,
|
|
15147
15223
|
// Handle blockTrigger as special CustomCode case
|
|
15148
|
-
restApi:
|
|
15149
|
-
contractRead:
|
|
15150
|
-
contractWrite:
|
|
15151
|
-
customCode:
|
|
15152
|
-
ethTransfer:
|
|
15153
|
-
graphqlQuery:
|
|
15154
|
-
branch:
|
|
15155
|
-
filter:
|
|
15156
|
-
loop:
|
|
15224
|
+
restApi: NodeType13.RestAPI,
|
|
15225
|
+
contractRead: NodeType13.ContractRead,
|
|
15226
|
+
contractWrite: NodeType13.ContractWrite,
|
|
15227
|
+
customCode: NodeType13.CustomCode,
|
|
15228
|
+
ethTransfer: NodeType13.ETHTransfer,
|
|
15229
|
+
graphqlQuery: NodeType13.GraphQLQuery,
|
|
15230
|
+
branch: NodeType13.Branch,
|
|
15231
|
+
filter: NodeType13.Filter,
|
|
15232
|
+
loop: NodeType13.Loop
|
|
15157
15233
|
};
|
|
15158
15234
|
return typeMap[nodeType] || null;
|
|
15159
15235
|
}
|
|
@@ -15219,7 +15295,7 @@ var Client = class extends BaseClient {
|
|
|
15219
15295
|
}
|
|
15220
15296
|
}
|
|
15221
15297
|
createTempWorkflowForNode(node, triggerId, inputVariables) {
|
|
15222
|
-
if (node.type ===
|
|
15298
|
+
if (node.type === NodeType13.CustomCode && inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15223
15299
|
const customCodeData = node.data;
|
|
15224
15300
|
if (customCodeData.config) {
|
|
15225
15301
|
const variableDefinitions = Object.entries(inputVariables).map(([key, value]) => {
|
|
@@ -15233,7 +15309,7 @@ ${customCodeData.config.source}`;
|
|
|
15233
15309
|
const trigger = factory_default.create({
|
|
15234
15310
|
id: triggerId,
|
|
15235
15311
|
name: "manual_trigger",
|
|
15236
|
-
type:
|
|
15312
|
+
type: TriggerType9.Manual,
|
|
15237
15313
|
data: inputVariables
|
|
15238
15314
|
// Store input variables in the trigger data
|
|
15239
15315
|
});
|
|
@@ -31,8 +31,8 @@ class NodeFactory {
|
|
|
31
31
|
return new FilterNode(props);
|
|
32
32
|
case NodeType.Loop:
|
|
33
33
|
return new LoopNode(props);
|
|
34
|
-
case NodeType.
|
|
35
|
-
throw new Error("Cannot create node with
|
|
34
|
+
case NodeType.Unspecified:
|
|
35
|
+
throw new Error("Cannot create node with unspecified type");
|
|
36
36
|
default:
|
|
37
37
|
throw new Error(`Unsupported node type: ${props.type}`);
|
|
38
38
|
}
|
|
@@ -2,10 +2,17 @@ import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
|
2
2
|
import { NodeType } from "@avaprotocol/types";
|
|
3
3
|
export declare function covertNodeTypeToString(status: avs_pb.TaskNode.TaskTypeCase): NodeType;
|
|
4
4
|
export type NodeData = avs_pb.ETHTransferNode.AsObject | avs_pb.ContractWriteNode.AsObject | avs_pb.ContractReadNode.AsObject | avs_pb.GraphQLQueryNode.AsObject | avs_pb.RestAPINode.AsObject | avs_pb.BranchNode.AsObject | avs_pb.FilterNode.AsObject | avs_pb.LoopNode.AsObject | avs_pb.CustomCodeNode.AsObject;
|
|
5
|
-
export type NodeProps = Omit<avs_pb.TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
|
|
5
|
+
export type NodeProps = Omit<avs_pb.TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode" | "type"> & {
|
|
6
6
|
type: NodeType;
|
|
7
7
|
data: NodeData;
|
|
8
8
|
};
|
|
9
|
+
export type ProtobufNodeProps = Omit<avs_pb.TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
|
|
10
|
+
data: NodeData;
|
|
11
|
+
};
|
|
12
|
+
export declare const ProtobufNodePropsUtils: {
|
|
13
|
+
getGoStringType: (props: ProtobufNodeProps) => string;
|
|
14
|
+
fromGoStringType: (goStringType: string, baseProps: Omit<ProtobufNodeProps, "type">) => ProtobufNodeProps;
|
|
15
|
+
};
|
|
9
16
|
declare class Node implements NodeProps {
|
|
10
17
|
id: string;
|
|
11
18
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/node/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/node/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAA0C,MAAM,oBAAoB,CAAC;AAItF,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,GACnC,QAAQ,CAeV;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CAAC,QAAQ;CAU7B;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { NodeType } from "@avaprotocol/types";
|
|
2
|
+
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
// Function to convert TaskStatus to string
|
|
5
5
|
export function covertNodeTypeToString(status) {
|
|
@@ -13,10 +13,24 @@ export function covertNodeTypeToString(status) {
|
|
|
13
13
|
[avs_pb.TaskNode.TaskTypeCase.FILTER]: NodeType.Filter,
|
|
14
14
|
[avs_pb.TaskNode.TaskTypeCase.LOOP]: NodeType.Loop,
|
|
15
15
|
[avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE]: NodeType.CustomCode,
|
|
16
|
-
[avs_pb.TaskNode.TaskTypeCase.TASK_TYPE_NOT_SET]: NodeType.
|
|
16
|
+
[avs_pb.TaskNode.TaskTypeCase.TASK_TYPE_NOT_SET]: NodeType.Unspecified,
|
|
17
17
|
};
|
|
18
18
|
return conversionMap[status];
|
|
19
19
|
}
|
|
20
|
+
// Utility functions to work with protobuf NodeProps
|
|
21
|
+
export const ProtobufNodePropsUtils = {
|
|
22
|
+
// Get the Go backend string representation of the node type
|
|
23
|
+
getGoStringType: (props) => {
|
|
24
|
+
return NodeTypeGoConverter.toGoString(props.type);
|
|
25
|
+
},
|
|
26
|
+
// Create ProtobufNodeProps from Go string type
|
|
27
|
+
fromGoStringType: (goStringType, baseProps) => {
|
|
28
|
+
return {
|
|
29
|
+
...baseProps,
|
|
30
|
+
type: NodeTypeGoConverter.fromGoString(goStringType)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
20
34
|
class Node {
|
|
21
35
|
constructor(props) {
|
|
22
36
|
this.id = props.id;
|
|
@@ -2,7 +2,7 @@ import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
|
2
2
|
import { TriggerType } from "@avaprotocol/types";
|
|
3
3
|
export type TriggerData = avs_pb.FixedTimeTrigger.AsObject | avs_pb.CronTrigger.AsObject | avs_pb.BlockTrigger.AsObject | avs_pb.EventTrigger.AsObject | Record<string, any> | null;
|
|
4
4
|
export type TriggerOutput = avs_pb.FixedTimeTrigger.Output.AsObject | avs_pb.CronTrigger.Output.AsObject | avs_pb.BlockTrigger.Output.AsObject | avs_pb.EventTrigger.Output.AsObject | null;
|
|
5
|
-
export type TriggerProps = Omit<avs_pb.TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
|
|
5
|
+
export type TriggerProps = Omit<avs_pb.TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event" | "type"> & {
|
|
6
6
|
type: TriggerType;
|
|
7
7
|
data: TriggerData;
|
|
8
8
|
output?: TriggerOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,WAAW,GACnB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAChC,MAAM,CAAC,WAAW,CAAC,QAAQ,GAC3B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,IAAI,CAAC;AAET,MAAM,MAAM,aAAa,GACrB,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,GACvC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,GAClC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,IAAI,CAAC;AAET,MAAM,MAAM,YAAY,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vB;;;OAGG;gBACS,KAAK,EAAE,YAAY;IAQ/B,SAAS,IAAI,MAAM,CAAC,WAAW;IAI/B,SAAS,IAAI,aAAa,GAAG,SAAS;CAGvC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reason.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/reason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"reason.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/reason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,WAAW,CAAC,WAAW,CAAA;CAAE,CAAC;AAoBtC,cAAM,aAAa;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEJ,KAAK,EAAE,kBAAkB;IAyBrC,MAAM,CAAC,YAAY,CACjB,IAAI,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,GACrC,aAAa,GAAG,SAAS;IAc5B,SAAS,IAAI,MAAM,CAAC,aAAa;CA8ClC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -3,12 +3,12 @@ import { TriggerType } from "@avaprotocol/types";
|
|
|
3
3
|
// Convert the number values of gRPC TriggerType to string values of TriggerType
|
|
4
4
|
const convertTriggerType = (grpcType) => {
|
|
5
5
|
const conversionMap = {
|
|
6
|
-
[avs_pb.
|
|
7
|
-
[avs_pb.
|
|
8
|
-
[avs_pb.
|
|
9
|
-
[avs_pb.
|
|
10
|
-
[avs_pb.
|
|
11
|
-
[avs_pb.
|
|
6
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_FIXED_TIME]: TriggerType.FixedTime,
|
|
7
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_CRON]: TriggerType.Cron,
|
|
8
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_BLOCK]: TriggerType.Block,
|
|
9
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_EVENT]: TriggerType.Event,
|
|
10
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_MANUAL]: TriggerType.Manual,
|
|
11
|
+
[avs_pb.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: TriggerType.Unspecified,
|
|
12
12
|
};
|
|
13
13
|
return conversionMap[grpcType];
|
|
14
14
|
};
|
|
@@ -30,7 +30,7 @@ class TriggerReason {
|
|
|
30
30
|
this.txHash = props.txHash;
|
|
31
31
|
break;
|
|
32
32
|
case TriggerType.Manual:
|
|
33
|
-
case TriggerType.
|
|
33
|
+
case TriggerType.Unspecified:
|
|
34
34
|
break;
|
|
35
35
|
default:
|
|
36
36
|
throw new Error("Unsupported trigger type");
|
|
@@ -52,25 +52,25 @@ class TriggerReason {
|
|
|
52
52
|
const request = new avs_pb.TriggerReason();
|
|
53
53
|
switch (this.type) {
|
|
54
54
|
case TriggerType.FixedTime:
|
|
55
|
-
request.setType(avs_pb.
|
|
55
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
56
56
|
if (this.epoch) {
|
|
57
57
|
request.setEpoch(this.epoch);
|
|
58
58
|
}
|
|
59
59
|
break;
|
|
60
60
|
case TriggerType.Cron:
|
|
61
|
-
request.setType(avs_pb.
|
|
61
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_CRON);
|
|
62
62
|
if (this.epoch) {
|
|
63
63
|
request.setEpoch(this.epoch);
|
|
64
64
|
}
|
|
65
65
|
break;
|
|
66
66
|
case TriggerType.Block:
|
|
67
|
-
request.setType(avs_pb.
|
|
67
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
68
68
|
if (this.blockNumber) {
|
|
69
69
|
request.setBlockNumber(this.blockNumber);
|
|
70
70
|
}
|
|
71
71
|
break;
|
|
72
72
|
case TriggerType.Event:
|
|
73
|
-
request.setType(avs_pb.
|
|
73
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_EVENT);
|
|
74
74
|
if (this.blockNumber) {
|
|
75
75
|
request.setBlockNumber(this.blockNumber);
|
|
76
76
|
}
|
|
@@ -82,10 +82,10 @@ class TriggerReason {
|
|
|
82
82
|
}
|
|
83
83
|
break;
|
|
84
84
|
case TriggerType.Manual:
|
|
85
|
-
request.setType(avs_pb.
|
|
85
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
86
86
|
break;
|
|
87
|
-
case TriggerType.
|
|
88
|
-
request.setType(avs_pb.
|
|
87
|
+
case TriggerType.Unspecified:
|
|
88
|
+
request.setType(avs_pb.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
89
89
|
break;
|
|
90
90
|
default:
|
|
91
91
|
throw new Error("Unsupported trigger type");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"clean": "rm -rf node_modules dist tsconfig.tsbuildinfo"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@avaprotocol/types": "1.0.
|
|
33
|
+
"@avaprotocol/types": "1.0.5",
|
|
34
34
|
"@grpc/grpc-js": "^1.11.3",
|
|
35
35
|
"@grpc/proto-loader": "^0.7.13",
|
|
36
36
|
"dotenv": "^16.4.5",
|