@avaprotocol/sdk-js 2.10.1 → 2.10.3

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 2.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - e1fb04e: chore: define LoopRunnerType type in the types package
8
+ - Updated dependencies [e1fb04e]
9
+ - @avaprotocol/types@2.8.3
10
+
11
+ ## 2.10.2
12
+
13
+ ### Patch Changes
14
+
15
+ - 9167174: fix: updated runNodeImmediate and runTrigger request inputs to be consistent with simulateWorkflow"
16
+ - Updated dependencies [9167174]
17
+ - @avaprotocol/types@2.8.2
18
+
3
19
  ## 2.10.1
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -316,23 +316,21 @@ declare class Client extends BaseClient {
316
316
  /**
317
317
  * Run a node with inputs for testing purposes
318
318
  * @param {RunNodeWithInputsRequest} params - The parameters for running the node
319
- * @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
320
- * @param {Record<string, any>} params.nodeConfig - The configuration for the node
321
- * @param {Record<string, any>} params.inputVariables - Variables to pass to the node
319
+ * @param {NodeProps} params.node - Complete node definition (id, name, type, data)
320
+ * @param {Record<string, any>} params.inputVariables - Variables to pass to the node (settings, data from previous nodes, etc.)
322
321
  * @param {RequestOptions} options - Request options
323
322
  * @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
324
323
  */
325
- runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
324
+ runNodeWithInputs({ node, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
326
325
  /**
327
326
  * Run a trigger for testing purposes
328
327
  * @param {RunTriggerRequest} params - The parameters for running the trigger
329
- * @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
330
- * @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
331
- * @param {Record<string, any>} params.inputVariables - Optional input variables for template resolution
328
+ * @param {TriggerProps} params.trigger - Complete trigger definition (id, name, type, data)
329
+ * @param {Record<string, any>} params.triggerInput - Optional input variables for template resolution
332
330
  * @param {RequestOptions} options - Request options
333
331
  * @returns {Promise<RunTriggerResponse>} - The response from running the trigger
334
332
  */
335
- runTrigger({ triggerType, triggerConfig, inputVariables }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
333
+ runTrigger({ trigger, triggerInput }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
336
334
  /**
337
335
  * Simulate a complete task execution including trigger and all workflow nodes
338
336
  * @param {SimulateWorkflowRequest} params - The parameters for simulating the task
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAU,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAOL,SAAS,EAGT,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB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vB,OAAO,CAAC,oBAAoB,CAAC;IA0ChC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAgHnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAQzB;AAED,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,MAAM,EACN,SAAS,EACT,qBAAqB,GACtB,CAAC"}
package/dist/index.js CHANGED
@@ -3467,7 +3467,9 @@ var require_avs_pb = __commonJS({
3467
3467
  proto.aggregator.ContractWriteNode.MethodCall.toObject,
3468
3468
  includeInstance
3469
3469
  ),
3470
- isSimulated: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
3470
+ isSimulated: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
3471
+ value: jspb.Message.getFieldWithDefault(msg, 6, ""),
3472
+ gasLimit: jspb.Message.getFieldWithDefault(msg, 7, "")
3471
3473
  };
3472
3474
  if (includeInstance) {
3473
3475
  obj.$jspbMessageInstance = msg;
@@ -3518,6 +3520,20 @@ var require_avs_pb = __commonJS({
3518
3520
  );
3519
3521
  msg.setIsSimulated(value);
3520
3522
  break;
3523
+ case 6:
3524
+ var value = (
3525
+ /** @type {string} */
3526
+ reader.readString()
3527
+ );
3528
+ msg.setValue(value);
3529
+ break;
3530
+ case 7:
3531
+ var value = (
3532
+ /** @type {string} */
3533
+ reader.readString()
3534
+ );
3535
+ msg.setGasLimit(value);
3536
+ break;
3521
3537
  default:
3522
3538
  reader.skipField();
3523
3539
  break;
@@ -3570,6 +3586,22 @@ var require_avs_pb = __commonJS({
3570
3586
  f
3571
3587
  );
3572
3588
  }
3589
+ f = /** @type {string} */
3590
+ jspb.Message.getField(message, 6);
3591
+ if (f != null) {
3592
+ writer.writeString(
3593
+ 6,
3594
+ f
3595
+ );
3596
+ }
3597
+ f = /** @type {string} */
3598
+ jspb.Message.getField(message, 7);
3599
+ if (f != null) {
3600
+ writer.writeString(
3601
+ 7,
3602
+ f
3603
+ );
3604
+ }
3573
3605
  };
3574
3606
  proto.aggregator.ContractWriteNode.Config.prototype.getContractAddress = function() {
3575
3607
  return (
@@ -3634,6 +3666,36 @@ var require_avs_pb = __commonJS({
3634
3666
  proto.aggregator.ContractWriteNode.Config.prototype.hasIsSimulated = function() {
3635
3667
  return jspb.Message.getField(this, 5) != null;
3636
3668
  };
3669
+ proto.aggregator.ContractWriteNode.Config.prototype.getValue = function() {
3670
+ return (
3671
+ /** @type {string} */
3672
+ jspb.Message.getFieldWithDefault(this, 6, "")
3673
+ );
3674
+ };
3675
+ proto.aggregator.ContractWriteNode.Config.prototype.setValue = function(value) {
3676
+ return jspb.Message.setField(this, 6, value);
3677
+ };
3678
+ proto.aggregator.ContractWriteNode.Config.prototype.clearValue = function() {
3679
+ return jspb.Message.setField(this, 6, void 0);
3680
+ };
3681
+ proto.aggregator.ContractWriteNode.Config.prototype.hasValue = function() {
3682
+ return jspb.Message.getField(this, 6) != null;
3683
+ };
3684
+ proto.aggregator.ContractWriteNode.Config.prototype.getGasLimit = function() {
3685
+ return (
3686
+ /** @type {string} */
3687
+ jspb.Message.getFieldWithDefault(this, 7, "")
3688
+ );
3689
+ };
3690
+ proto.aggregator.ContractWriteNode.Config.prototype.setGasLimit = function(value) {
3691
+ return jspb.Message.setField(this, 7, value);
3692
+ };
3693
+ proto.aggregator.ContractWriteNode.Config.prototype.clearGasLimit = function() {
3694
+ return jspb.Message.setField(this, 7, void 0);
3695
+ };
3696
+ proto.aggregator.ContractWriteNode.Config.prototype.hasGasLimit = function() {
3697
+ return jspb.Message.getField(this, 7) != null;
3698
+ };
3637
3699
  proto.aggregator.ContractWriteNode.MethodCall.repeatedFields_ = [3, 4];
3638
3700
  if (jspb.Message.GENERATE_TO_OBJECT) {
3639
3701
  proto.aggregator.ContractWriteNode.MethodCall.prototype.toObject = function(opt_includeInstance) {
@@ -14600,8 +14662,7 @@ var require_avs_pb = __commonJS({
14600
14662
  };
14601
14663
  proto.aggregator.RunNodeWithInputsReq.toObject = function(includeInstance, msg) {
14602
14664
  var f, obj = {
14603
- nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0),
14604
- nodeConfigMap: (f = msg.getNodeConfigMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [],
14665
+ node: (f = msg.getNode()) && proto.aggregator.TaskNode.toObject(includeInstance, f),
14605
14666
  inputVariablesMap: (f = msg.getInputVariablesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
14606
14667
  };
14607
14668
  if (includeInstance) {
@@ -14623,17 +14684,9 @@ var require_avs_pb = __commonJS({
14623
14684
  var field = reader.getFieldNumber();
14624
14685
  switch (field) {
14625
14686
  case 1:
14626
- var value = (
14627
- /** @type {!proto.aggregator.NodeType} */
14628
- reader.readEnum()
14629
- );
14630
- msg.setNodeType(value);
14631
- break;
14632
- case 2:
14633
- var value = msg.getNodeConfigMap();
14634
- reader.readMessage(value, function(message, reader2) {
14635
- jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
14636
- });
14687
+ var value = new proto.aggregator.TaskNode();
14688
+ reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader);
14689
+ msg.setNode(value);
14637
14690
  break;
14638
14691
  case 3:
14639
14692
  var value = msg.getInputVariablesMap();
@@ -14655,45 +14708,33 @@ var require_avs_pb = __commonJS({
14655
14708
  };
14656
14709
  proto.aggregator.RunNodeWithInputsReq.serializeBinaryToWriter = function(message, writer) {
14657
14710
  var f = void 0;
14658
- f = message.getNodeType();
14659
- if (f !== 0) {
14660
- writer.writeEnum(
14711
+ f = message.getNode();
14712
+ if (f != null) {
14713
+ writer.writeMessage(
14661
14714
  1,
14662
- f
14715
+ f,
14716
+ proto.aggregator.TaskNode.serializeBinaryToWriter
14663
14717
  );
14664
14718
  }
14665
- f = message.getNodeConfigMap(true);
14666
- if (f && f.getLength() > 0) {
14667
- f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
14668
- }
14669
14719
  f = message.getInputVariablesMap(true);
14670
14720
  if (f && f.getLength() > 0) {
14671
14721
  f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
14672
14722
  }
14673
14723
  };
14674
- proto.aggregator.RunNodeWithInputsReq.prototype.getNodeType = function() {
14724
+ proto.aggregator.RunNodeWithInputsReq.prototype.getNode = function() {
14675
14725
  return (
14676
- /** @type {!proto.aggregator.NodeType} */
14677
- jspb.Message.getFieldWithDefault(this, 1, 0)
14726
+ /** @type{?proto.aggregator.TaskNode} */
14727
+ jspb.Message.getWrapperField(this, proto.aggregator.TaskNode, 1)
14678
14728
  );
14679
14729
  };
14680
- proto.aggregator.RunNodeWithInputsReq.prototype.setNodeType = function(value) {
14681
- return jspb.Message.setProto3EnumField(this, 1, value);
14730
+ proto.aggregator.RunNodeWithInputsReq.prototype.setNode = function(value) {
14731
+ return jspb.Message.setWrapperField(this, 1, value);
14682
14732
  };
14683
- proto.aggregator.RunNodeWithInputsReq.prototype.getNodeConfigMap = function(opt_noLazyCreate) {
14684
- return (
14685
- /** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */
14686
- jspb.Message.getMapField(
14687
- this,
14688
- 2,
14689
- opt_noLazyCreate,
14690
- proto.google.protobuf.Value
14691
- )
14692
- );
14733
+ proto.aggregator.RunNodeWithInputsReq.prototype.clearNode = function() {
14734
+ return this.setNode(void 0);
14693
14735
  };
14694
- proto.aggregator.RunNodeWithInputsReq.prototype.clearNodeConfigMap = function() {
14695
- this.getNodeConfigMap().clear();
14696
- return this;
14736
+ proto.aggregator.RunNodeWithInputsReq.prototype.hasNode = function() {
14737
+ return jspb.Message.getField(this, 1) != null;
14697
14738
  };
14698
14739
  proto.aggregator.RunNodeWithInputsReq.prototype.getInputVariablesMap = function(opt_noLazyCreate) {
14699
14740
  return (
@@ -15196,8 +15237,7 @@ var require_avs_pb = __commonJS({
15196
15237
  };
15197
15238
  proto.aggregator.RunTriggerReq.toObject = function(includeInstance, msg) {
15198
15239
  var f, obj = {
15199
- triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0),
15200
- triggerConfigMap: (f = msg.getTriggerConfigMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [],
15240
+ trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f),
15201
15241
  triggerInputMap: (f = msg.getTriggerInputMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
15202
15242
  };
15203
15243
  if (includeInstance) {
@@ -15219,17 +15259,9 @@ var require_avs_pb = __commonJS({
15219
15259
  var field = reader.getFieldNumber();
15220
15260
  switch (field) {
15221
15261
  case 1:
15222
- var value = (
15223
- /** @type {!proto.aggregator.TriggerType} */
15224
- reader.readEnum()
15225
- );
15226
- msg.setTriggerType(value);
15227
- break;
15228
- case 2:
15229
- var value = msg.getTriggerConfigMap();
15230
- reader.readMessage(value, function(message, reader2) {
15231
- jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
15232
- });
15262
+ var value = new proto.aggregator.TaskTrigger();
15263
+ reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader);
15264
+ msg.setTrigger(value);
15233
15265
  break;
15234
15266
  case 3:
15235
15267
  var value = msg.getTriggerInputMap();
@@ -15251,45 +15283,33 @@ var require_avs_pb = __commonJS({
15251
15283
  };
15252
15284
  proto.aggregator.RunTriggerReq.serializeBinaryToWriter = function(message, writer) {
15253
15285
  var f = void 0;
15254
- f = message.getTriggerType();
15255
- if (f !== 0) {
15256
- writer.writeEnum(
15286
+ f = message.getTrigger();
15287
+ if (f != null) {
15288
+ writer.writeMessage(
15257
15289
  1,
15258
- f
15290
+ f,
15291
+ proto.aggregator.TaskTrigger.serializeBinaryToWriter
15259
15292
  );
15260
15293
  }
15261
- f = message.getTriggerConfigMap(true);
15262
- if (f && f.getLength() > 0) {
15263
- f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
15264
- }
15265
15294
  f = message.getTriggerInputMap(true);
15266
15295
  if (f && f.getLength() > 0) {
15267
15296
  f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
15268
15297
  }
15269
15298
  };
15270
- proto.aggregator.RunTriggerReq.prototype.getTriggerType = function() {
15299
+ proto.aggregator.RunTriggerReq.prototype.getTrigger = function() {
15271
15300
  return (
15272
- /** @type {!proto.aggregator.TriggerType} */
15273
- jspb.Message.getFieldWithDefault(this, 1, 0)
15301
+ /** @type{?proto.aggregator.TaskTrigger} */
15302
+ jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)
15274
15303
  );
15275
15304
  };
15276
- proto.aggregator.RunTriggerReq.prototype.setTriggerType = function(value) {
15277
- return jspb.Message.setProto3EnumField(this, 1, value);
15305
+ proto.aggregator.RunTriggerReq.prototype.setTrigger = function(value) {
15306
+ return jspb.Message.setWrapperField(this, 1, value);
15278
15307
  };
15279
- proto.aggregator.RunTriggerReq.prototype.getTriggerConfigMap = function(opt_noLazyCreate) {
15280
- return (
15281
- /** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */
15282
- jspb.Message.getMapField(
15283
- this,
15284
- 2,
15285
- opt_noLazyCreate,
15286
- proto.google.protobuf.Value
15287
- )
15288
- );
15308
+ proto.aggregator.RunTriggerReq.prototype.clearTrigger = function() {
15309
+ return this.setTrigger(void 0);
15289
15310
  };
15290
- proto.aggregator.RunTriggerReq.prototype.clearTriggerConfigMap = function() {
15291
- this.getTriggerConfigMap().clear();
15292
- return this;
15311
+ proto.aggregator.RunTriggerReq.prototype.hasTrigger = function() {
15312
+ return jspb.Message.getField(this, 1) != null;
15293
15313
  };
15294
15314
  proto.aggregator.RunTriggerReq.prototype.getTriggerInputMap = function(opt_noLazyCreate) {
15295
15315
  return (
@@ -19049,12 +19069,6 @@ function convertProtobufStepTypeToSdk(protobufType) {
19049
19069
  return protobufType;
19050
19070
  }
19051
19071
  }
19052
- function convertInputToProtobuf(input) {
19053
- if (!input) {
19054
- return void 0;
19055
- }
19056
- return convertJSValueToProtobuf(input);
19057
- }
19058
19072
  function extractInputFromProtobuf(inputValue) {
19059
19073
  if (!inputValue) {
19060
19074
  return void 0;
@@ -19375,12 +19389,7 @@ var ManualTrigger2 = class _ManualTrigger extends Trigger {
19375
19389
  lang = dataObj.lang || import_types6.Lang.JSON;
19376
19390
  }
19377
19391
  }
19378
- const dataValue = convertInputToProtobuf(actualData);
19379
- if (!dataValue) {
19380
- throw new Error(
19381
- "Failed to convert ManualTrigger data to protobuf format"
19382
- );
19383
- }
19392
+ const dataValue = convertJSValueToProtobuf(actualData);
19384
19393
  config.setData(dataValue);
19385
19394
  if (Object.keys(headers).length > 0) {
19386
19395
  const headersMap = config.getHeadersMap();
@@ -19621,6 +19630,7 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
19621
19630
  const request = new avs_pb9.TaskNode();
19622
19631
  request.setId(this.id);
19623
19632
  request.setName(this.name);
19633
+ request.setType(avs_pb9.NodeType.NODE_TYPE_CONTRACT_WRITE);
19624
19634
  const node = _ContractWriteNode.createProtobufNode(
19625
19635
  this.data
19626
19636
  );
@@ -19681,6 +19691,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends Node {
19681
19691
  const request = new avs_pb10.TaskNode();
19682
19692
  request.setId(this.id);
19683
19693
  request.setName(this.name);
19694
+ request.setType(avs_pb10.NodeType.NODE_TYPE_CUSTOM_CODE);
19684
19695
  const node = _CustomCodeNode.createProtobufNode(
19685
19696
  this.data
19686
19697
  );
@@ -19753,6 +19764,7 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends Node {
19753
19764
  const request = new avs_pb11.TaskNode();
19754
19765
  request.setId(this.id);
19755
19766
  request.setName(this.name);
19767
+ request.setType(avs_pb11.NodeType.NODE_TYPE_GRAPHQL_QUERY);
19756
19768
  const node = _GraphQLQueryNode.createProtobufNode(
19757
19769
  this.data
19758
19770
  );
@@ -19835,6 +19847,7 @@ var RestAPINode2 = class _RestAPINode extends Node {
19835
19847
  const request = new avs_pb12.TaskNode();
19836
19848
  request.setId(this.id);
19837
19849
  request.setName(this.name);
19850
+ request.setType(avs_pb12.NodeType.NODE_TYPE_REST_API);
19838
19851
  const nodeData = _RestAPINode.createProtobufNode(
19839
19852
  this.data
19840
19853
  );
@@ -19922,6 +19935,7 @@ var ContractReadNode2 = class _ContractReadNode extends Node {
19922
19935
  const request = new avs_pb13.TaskNode();
19923
19936
  request.setId(this.id);
19924
19937
  request.setName(this.name);
19938
+ request.setType(avs_pb13.NodeType.NODE_TYPE_CONTRACT_READ);
19925
19939
  const node = _ContractReadNode.createProtobufNode(
19926
19940
  this.data
19927
19941
  );
@@ -19971,6 +19985,7 @@ var ETHTransferNode2 = class _ETHTransferNode extends Node {
19971
19985
  const request = new avs_pb14.TaskNode();
19972
19986
  request.setId(this.id);
19973
19987
  request.setName(this.name);
19988
+ request.setType(avs_pb14.NodeType.NODE_TYPE_ETH_TRANSFER);
19974
19989
  const node = _ETHTransferNode.createProtobufNode(
19975
19990
  this.data
19976
19991
  );
@@ -20018,6 +20033,7 @@ var BranchNode2 = class _BranchNode extends Node {
20018
20033
  const request = new avs_pb15.TaskNode();
20019
20034
  request.setId(this.id);
20020
20035
  request.setName(this.name);
20036
+ request.setType(avs_pb15.NodeType.NODE_TYPE_BRANCH);
20021
20037
  const node = new avs_pb15.BranchNode();
20022
20038
  const config = new avs_pb15.BranchNode.Config();
20023
20039
  if (this.data.conditions && this.data.conditions.length > 0) {
@@ -20070,6 +20086,7 @@ var FilterNode2 = class _FilterNode extends Node {
20070
20086
  const request = new avs_pb16.TaskNode();
20071
20087
  request.setId(this.id);
20072
20088
  request.setName(this.name);
20089
+ request.setType(avs_pb16.NodeType.NODE_TYPE_FILTER);
20073
20090
  const node = new avs_pb16.FilterNode();
20074
20091
  const config = new avs_pb16.FilterNode.Config();
20075
20092
  config.setExpression(this.data.expression);
@@ -20184,6 +20201,7 @@ var LoopNode2 = class _LoopNode extends Node {
20184
20201
  const loopNode = new avs_pb17.LoopNode();
20185
20202
  node.setId(this.id);
20186
20203
  node.setName(this.name);
20204
+ node.setType(avs_pb17.NodeType.NODE_TYPE_LOOP);
20187
20205
  const data = this.data;
20188
20206
  const config = new avs_pb17.LoopNode.Config();
20189
20207
  config.setInputNodeName(data.inputNodeName || "");
@@ -20365,6 +20383,7 @@ var BalanceNode2 = class _BalanceNode extends Node {
20365
20383
  const request = new avs_pb18.TaskNode();
20366
20384
  request.setId(this.id);
20367
20385
  request.setName(this.name);
20386
+ request.setType(avs_pb18.NodeType.NODE_TYPE_BALANCE);
20368
20387
  const node = _BalanceNode.createProtobufNode(this.data);
20369
20388
  request.setBalance(node);
20370
20389
  return request;
@@ -21856,40 +21875,18 @@ var Client = class extends BaseClient {
21856
21875
  /**
21857
21876
  * Run a node with inputs for testing purposes
21858
21877
  * @param {RunNodeWithInputsRequest} params - The parameters for running the node
21859
- * @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
21860
- * @param {Record<string, any>} params.nodeConfig - The configuration for the node
21861
- * @param {Record<string, any>} params.inputVariables - Variables to pass to the node
21878
+ * @param {NodeProps} params.node - Complete node definition (id, name, type, data)
21879
+ * @param {Record<string, any>} params.inputVariables - Variables to pass to the node (settings, data from previous nodes, etc.)
21862
21880
  * @param {RequestOptions} options - Request options
21863
21881
  * @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
21864
21882
  */
21865
- async runNodeWithInputs({ nodeType, nodeConfig, inputVariables = {} }, options) {
21866
- const triggerTypes = [
21867
- import_types22.TriggerType.Block,
21868
- import_types22.TriggerType.FixedTime,
21869
- import_types22.TriggerType.Cron,
21870
- import_types22.TriggerType.Event,
21871
- import_types22.TriggerType.Manual
21872
- ];
21873
- if (triggerTypes.includes(nodeType)) {
21874
- return {
21875
- success: false,
21876
- error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
21877
- errorCode: import_types22.ErrorCode.INVALID_REQUEST,
21878
- data: null
21879
- };
21880
- }
21883
+ async runNodeWithInputs({ node, inputVariables = {} }, options) {
21881
21884
  const request = new avs_pb24.RunNodeWithInputsReq();
21882
- const protobufNodeType = import_types22.NodeTypeGoConverter.fromGoString(nodeType);
21883
- request.setNodeType(protobufNodeType);
21884
- const nodeConfigMap = request.getNodeConfigMap();
21885
- for (const [key, value] of Object.entries(nodeConfig)) {
21886
- nodeConfigMap.set(key, convertJSValueToProtobuf(value));
21887
- }
21888
- if (inputVariables && Object.keys(inputVariables).length > 0) {
21889
- const inputVarsMap = request.getInputVariablesMap();
21890
- for (const [key, value] of Object.entries(inputVariables)) {
21891
- inputVarsMap.set(key, convertJSValueToProtobuf(value));
21892
- }
21885
+ const nodeSdk = factory_default2.create(node);
21886
+ request.setNode(nodeSdk.toRequest());
21887
+ const inputVarsMap = request.getInputVariablesMap();
21888
+ for (const [key, value] of Object.entries(inputVariables)) {
21889
+ inputVarsMap.set(key, convertJSValueToProtobuf(value));
21893
21890
  }
21894
21891
  const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
21895
21892
  return {
@@ -21906,43 +21903,26 @@ var Client = class extends BaseClient {
21906
21903
  /**
21907
21904
  * Run a trigger for testing purposes
21908
21905
  * @param {RunTriggerRequest} params - The parameters for running the trigger
21909
- * @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
21910
- * @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
21911
- * @param {Record<string, any>} params.inputVariables - Optional input variables for template resolution
21906
+ * @param {TriggerProps} params.trigger - Complete trigger definition (id, name, type, data)
21907
+ * @param {Record<string, any>} params.triggerInput - Optional input variables for template resolution
21912
21908
  * @param {RequestOptions} options - Request options
21913
21909
  * @returns {Promise<RunTriggerResponse>} - The response from running the trigger
21914
21910
  */
21915
- async runTrigger({ triggerType, triggerConfig, inputVariables }, options) {
21911
+ async runTrigger({ trigger, triggerInput = {} }, options) {
21916
21912
  const request = new avs_pb24.RunTriggerReq();
21917
- const protobufTriggerType = import_types22.TriggerTypeGoConverter.fromGoString(triggerType);
21918
- request.setTriggerType(protobufTriggerType);
21919
- const triggerConfigMap = request.getTriggerConfigMap();
21920
- for (const [key, value] of Object.entries(triggerConfig)) {
21921
- triggerConfigMap.set(key, convertJSValueToProtobuf(value));
21922
- }
21923
- if (inputVariables) {
21924
- const triggerInputMap = request.getTriggerInputMap();
21925
- for (const [key, value] of Object.entries(inputVariables)) {
21926
- triggerInputMap.set(key, convertJSValueToProtobuf(value));
21927
- }
21913
+ const triggerSdk = factory_default.create(trigger);
21914
+ request.setTrigger(triggerSdk.toRequest());
21915
+ const triggerInputMap = request.getTriggerInputMap();
21916
+ for (const [key, value] of Object.entries(triggerInput)) {
21917
+ triggerInputMap.set(key, convertJSValueToProtobuf(value));
21928
21918
  }
21929
21919
  const result = await this.sendGrpcRequest("runTrigger", request, options);
21930
- let metadata = void 0;
21931
- const metadataValue = result.getMetadata();
21932
- if (metadataValue) {
21933
- try {
21934
- metadata = convertProtobufValueToJs(metadataValue);
21935
- } catch (error) {
21936
- console.warn("Failed to convert metadata from protobuf Value:", error);
21937
- metadata = metadataValue;
21938
- }
21939
- }
21940
21920
  return {
21941
21921
  success: result.getSuccess(),
21942
21922
  data: toCamelCaseKeys(factory_default.fromOutputData(result)),
21943
21923
  error: result.getError(),
21944
21924
  errorCode: result.getErrorCode() || void 0,
21945
- metadata: toCamelCaseKeys(metadata),
21925
+ metadata: result.hasMetadata() ? toCamelCaseKeys(convertProtobufValueToJs(result.getMetadata())) : void 0,
21946
21926
  executionContext: result.hasExecutionContext() ? toCamelCaseKeys(
21947
21927
  convertProtobufValueToJs(result.getExecutionContext())
21948
21928
  ) : void 0