@avaprotocol/sdk-js 1.6.2 → 1.6.4

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.d.ts +37 -25
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +83 -98
  5. package/dist/index.mjs +87 -99
  6. package/dist/models/node/branch.d.ts +1 -1
  7. package/dist/models/node/branch.d.ts.map +1 -1
  8. package/dist/models/node/contractRead.d.ts +1 -1
  9. package/dist/models/node/contractRead.d.ts.map +1 -1
  10. package/dist/models/node/contractRead.js +6 -8
  11. package/dist/models/node/contractWrite.d.ts +1 -1
  12. package/dist/models/node/contractWrite.d.ts.map +1 -1
  13. package/dist/models/node/customCode.d.ts +1 -5
  14. package/dist/models/node/customCode.d.ts.map +1 -1
  15. package/dist/models/node/customCode.js +5 -11
  16. package/dist/models/node/ethTransfer.d.ts +1 -1
  17. package/dist/models/node/ethTransfer.d.ts.map +1 -1
  18. package/dist/models/node/factory.d.ts +10 -9
  19. package/dist/models/node/factory.d.ts.map +1 -1
  20. package/dist/models/node/factory.js +2 -2
  21. package/dist/models/node/filter.d.ts +1 -1
  22. package/dist/models/node/filter.d.ts.map +1 -1
  23. package/dist/models/node/filter.js +5 -7
  24. package/dist/models/node/graphqlQuery.d.ts +1 -1
  25. package/dist/models/node/graphqlQuery.d.ts.map +1 -1
  26. package/dist/models/node/graphqlQuery.js +11 -13
  27. package/dist/models/node/loop.d.ts +1 -1
  28. package/dist/models/node/loop.d.ts.map +1 -1
  29. package/dist/models/node/loop.js +20 -38
  30. package/dist/models/node/restApi.d.ts +1 -2
  31. package/dist/models/node/restApi.d.ts.map +1 -1
  32. package/dist/models/node/restApi.js +12 -14
  33. package/dist/models/trigger/block.d.ts +1 -2
  34. package/dist/models/trigger/block.d.ts.map +1 -1
  35. package/dist/models/trigger/cron.d.ts +1 -2
  36. package/dist/models/trigger/cron.d.ts.map +1 -1
  37. package/dist/models/trigger/event.d.ts +1 -2
  38. package/dist/models/trigger/event.d.ts.map +1 -1
  39. package/dist/models/trigger/fixedTime.d.ts +1 -2
  40. package/dist/models/trigger/fixedTime.d.ts.map +1 -1
  41. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -13588,10 +13588,6 @@ var contractWrite_default = ContractWriteNode2;
13588
13588
  // src/models/node/customCode.ts
13589
13589
  var avs_pb9 = __toESM(require_avs_pb());
13590
13590
  import { NodeType as NodeType3 } from "@avaprotocol/types";
13591
- var CustomCodeLangs = {
13592
- JAVASCRIPT: 0,
13593
- PYTHON: 1
13594
- };
13595
13591
  var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
13596
13592
  constructor(props) {
13597
13593
  super({ ...props, type: NodeType3.CustomCode, data: props.data });
@@ -13601,7 +13597,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
13601
13597
  return new _CustomCodeNode({
13602
13598
  ...obj,
13603
13599
  type: NodeType3.CustomCode,
13604
- data: raw.getCustomCode().toObject()
13600
+ data: raw.getCustomCode().getConfig().toObject()
13605
13601
  });
13606
13602
  }
13607
13603
  toRequest() {
@@ -13609,12 +13605,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
13609
13605
  request.setId(this.id);
13610
13606
  request.setName(this.name);
13611
13607
  const nodeData = new avs_pb9.CustomCodeNode();
13612
- if (this.data.config) {
13613
- const config = new avs_pb9.CustomCodeNode.Config();
13614
- config.setLang(this.data.config.lang);
13615
- config.setSource(this.data.config.source);
13616
- nodeData.setConfig(config);
13617
- }
13608
+ const config = new avs_pb9.CustomCodeNode.Config();
13609
+ config.setLang(this.data.lang);
13610
+ config.setSource(this.data.source);
13611
+ nodeData.setConfig(config);
13618
13612
  request.setCustomCode(nodeData);
13619
13613
  return request;
13620
13614
  }
@@ -13637,7 +13631,7 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
13637
13631
  return new _GraphQLQueryNode({
13638
13632
  ...obj,
13639
13633
  type: NodeType4.GraphQLQuery,
13640
- data: raw.getGraphqlQuery().toObject()
13634
+ data: raw.getGraphqlQuery().getConfig().toObject()
13641
13635
  });
13642
13636
  }
13643
13637
  toRequest() {
@@ -13645,18 +13639,16 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
13645
13639
  request.setId(this.id);
13646
13640
  request.setName(this.name);
13647
13641
  const nodeData = new avs_pb10.GraphQLQueryNode();
13648
- if (this.data.config) {
13649
- const config = new avs_pb10.GraphQLQueryNode.Config();
13650
- config.setUrl(this.data.config.url);
13651
- config.setQuery(this.data.config.query);
13652
- if (this.data.config.variablesMap && this.data.config.variablesMap.length > 0) {
13653
- const variablesMap = config.getVariablesMap();
13654
- this.data.config.variablesMap.forEach(([key, value]) => {
13655
- variablesMap.set(key, value);
13656
- });
13657
- }
13658
- nodeData.setConfig(config);
13642
+ const config = new avs_pb10.GraphQLQueryNode.Config();
13643
+ config.setUrl(this.data.url);
13644
+ config.setQuery(this.data.query);
13645
+ if (this.data.variablesMap && this.data.variablesMap.length > 0) {
13646
+ const variablesMap = config.getVariablesMap();
13647
+ this.data.variablesMap.forEach(([key, value]) => {
13648
+ variablesMap.set(key, value);
13649
+ });
13659
13650
  }
13651
+ nodeData.setConfig(config);
13660
13652
  request.setGraphqlQuery(nodeData);
13661
13653
  return request;
13662
13654
  }
@@ -13675,7 +13667,7 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
13675
13667
  return new _RestAPINode({
13676
13668
  ...obj,
13677
13669
  type: NodeType5.RestAPI,
13678
- data: raw.getRestApi().toObject()
13670
+ data: raw.getRestApi().getConfig().toObject()
13679
13671
  });
13680
13672
  }
13681
13673
  toRequest() {
@@ -13683,19 +13675,17 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
13683
13675
  request.setId(this.id);
13684
13676
  request.setName(this.name);
13685
13677
  const nodeData = new avs_pb11.RestAPINode();
13686
- if (this.data.config) {
13687
- const config = new avs_pb11.RestAPINode.Config();
13688
- config.setUrl(this.data.config.url);
13689
- config.setMethod(this.data.config.method);
13690
- config.setBody(this.data.config.body || "");
13691
- if (this.data.config.headersMap && this.data.config.headersMap.length > 0) {
13692
- const headersMap = config.getHeadersMap();
13693
- this.data.config.headersMap.forEach(([key, value]) => {
13694
- headersMap.set(key, value);
13695
- });
13696
- }
13697
- nodeData.setConfig(config);
13678
+ const config = new avs_pb11.RestAPINode.Config();
13679
+ config.setUrl(this.data.url);
13680
+ config.setMethod(this.data.method);
13681
+ config.setBody(this.data.body || "");
13682
+ if (this.data.headersMap && this.data.headersMap.length > 0) {
13683
+ const headersMap = config.getHeadersMap();
13684
+ this.data.headersMap.forEach(([key, value]) => {
13685
+ headersMap.set(key, value);
13686
+ });
13698
13687
  }
13688
+ nodeData.setConfig(config);
13699
13689
  request.setRestApi(nodeData);
13700
13690
  return request;
13701
13691
  }
@@ -13714,7 +13704,7 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
13714
13704
  return new _ContractReadNode({
13715
13705
  ...obj,
13716
13706
  type: NodeType6.ContractRead,
13717
- data: raw.getContractRead().toObject()
13707
+ data: raw.getContractRead().getConfig().toObject()
13718
13708
  });
13719
13709
  }
13720
13710
  toRequest() {
@@ -13722,13 +13712,11 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
13722
13712
  request.setId(this.id);
13723
13713
  request.setName(this.name);
13724
13714
  const nodeData = new avs_pb12.ContractReadNode();
13725
- if (this.data.config) {
13726
- const config = new avs_pb12.ContractReadNode.Config();
13727
- config.setContractAddress(this.data.config.contractAddress);
13728
- config.setCallData(this.data.config.callData);
13729
- config.setContractAbi(this.data.config.contractAbi);
13730
- nodeData.setConfig(config);
13731
- }
13715
+ const config = new avs_pb12.ContractReadNode.Config();
13716
+ config.setContractAddress(this.data.contractAddress);
13717
+ config.setCallData(this.data.callData);
13718
+ config.setContractAbi(this.data.contractAbi);
13719
+ nodeData.setConfig(config);
13732
13720
  request.setContractRead(nodeData);
13733
13721
  return request;
13734
13722
  }
@@ -13818,7 +13806,7 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
13818
13806
  return new _FilterNode({
13819
13807
  ...obj,
13820
13808
  type: NodeType9.Filter,
13821
- data: raw.getFilter().toObject()
13809
+ data: raw.getFilter().getConfig().toObject()
13822
13810
  });
13823
13811
  }
13824
13812
  toRequest() {
@@ -13826,12 +13814,10 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
13826
13814
  request.setId(this.id);
13827
13815
  request.setName(this.name);
13828
13816
  const nodeData = new avs_pb15.FilterNode();
13829
- if (this.data.config) {
13830
- const config = new avs_pb15.FilterNode.Config();
13831
- config.setExpression(this.data.config.expression);
13832
- config.setSourceId(this.data.config.sourceId || "");
13833
- nodeData.setConfig(config);
13834
- }
13817
+ const config = new avs_pb15.FilterNode.Config();
13818
+ config.setExpression(this.data.expression);
13819
+ config.setSourceId(this.data.sourceId || "");
13820
+ nodeData.setConfig(config);
13835
13821
  request.setFilter(nodeData);
13836
13822
  return request;
13837
13823
  }
@@ -13850,30 +13836,23 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
13850
13836
  if (!loopNode) {
13851
13837
  throw new Error("Response does not contain a Loop node");
13852
13838
  }
13839
+ const configData = loopNode.getConfig()?.toObject();
13853
13840
  const loopNodeData = loopNode.toObject();
13854
- if (loopNodeData.config) {
13855
- loopNodeData.input = loopNodeData.config.sourceId;
13856
- loopNodeData.iterVal = loopNodeData.config.iterVal;
13857
- loopNodeData.iterKey = loopNodeData.config.iterKey;
13858
- if (loopNodeData.restApi) {
13859
- loopNodeData.runnerType = NodeType10.RestAPI;
13860
- } else if (loopNodeData.customCode) {
13861
- loopNodeData.runnerType = NodeType10.CustomCode;
13862
- } else if (loopNodeData.ethTransfer) {
13863
- loopNodeData.runnerType = NodeType10.ETHTransfer;
13864
- } else if (loopNodeData.contractRead) {
13865
- loopNodeData.runnerType = NodeType10.ContractRead;
13866
- } else if (loopNodeData.contractWrite) {
13867
- loopNodeData.runnerType = NodeType10.ContractWrite;
13868
- } else if (loopNodeData.graphqlDataQuery) {
13869
- loopNodeData.runnerType = NodeType10.GraphQLQuery;
13870
- }
13871
- }
13841
+ const data = {
13842
+ ...configData,
13843
+ // Keep the nested node structures from the full object
13844
+ restApi: loopNodeData.restApi,
13845
+ customCode: loopNodeData.customCode,
13846
+ ethTransfer: loopNodeData.ethTransfer,
13847
+ contractRead: loopNodeData.contractRead,
13848
+ contractWrite: loopNodeData.contractWrite,
13849
+ graphqlDataQuery: loopNodeData.graphqlDataQuery
13850
+ };
13872
13851
  return new _LoopNode({
13873
13852
  id: raw.getId(),
13874
13853
  name: raw.getName(),
13875
13854
  type: NodeType10.Loop,
13876
- data: loopNodeData
13855
+ data
13877
13856
  });
13878
13857
  }
13879
13858
  toRequest() {
@@ -13883,15 +13862,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
13883
13862
  node.setName(this.name);
13884
13863
  const data = this.data;
13885
13864
  const config = new avs_pb16.LoopNode.Config();
13886
- if (data.config) {
13887
- config.setSourceId(data.config.sourceId || "");
13888
- config.setIterVal(data.config.iterVal || "");
13889
- config.setIterKey(data.config.iterKey || "");
13890
- } else {
13891
- config.setSourceId(data.input || data.sourceId || "");
13892
- config.setIterVal(data.iterVal || "");
13893
- config.setIterKey(data.iterKey || "");
13894
- }
13865
+ config.setSourceId(data.sourceId || "");
13866
+ config.setIterVal(data.iterVal || "");
13867
+ config.setIterKey(data.iterKey || "");
13895
13868
  loopNode.setConfig(config);
13896
13869
  if (data.ethTransfer) {
13897
13870
  const ethTransfer = new avs_pb16.ETHTransferNode();
@@ -13968,7 +13941,10 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
13968
13941
  var loop_default = LoopNode2;
13969
13942
 
13970
13943
  // src/models/node/factory.ts
13971
- import { NodeType as NodeType11 } from "@avaprotocol/types";
13944
+ import {
13945
+ NodeType as NodeType11,
13946
+ CustomCodeLangs as CustomCodeLangs2
13947
+ } from "@avaprotocol/types";
13972
13948
  var NodeFactory = class {
13973
13949
  static create(props) {
13974
13950
  switch (props.type) {
@@ -14735,23 +14711,17 @@ var Client = class extends BaseClient {
14735
14711
  createWorkflow(props) {
14736
14712
  return new workflow_default(props);
14737
14713
  }
14738
- /**
14739
- * Get the list of workflows; new workflows can be created by calling `submitWorkflow`
14740
- * @param {string} address - The address of the smart wallet
14741
- * @param {string} cursor - The cursor for the list
14742
- * @param {number} limit - The limit for the list
14743
- * @param {RequestOptions} options - Request options
14744
- * @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
14745
- */
14746
14714
  /**
14747
14715
  * Get the list of workflows for multiple addresses
14748
14716
  * @param {string[]} addresses - The list of addresses
14749
- * @param {GetWorkflowsRequest} options - Request options
14717
+ * @param {GetWorkflowsOptions} options - Request options
14750
14718
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14751
14719
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14752
14720
  * @param {number} [options.limit] - The page limit of the response; default is 10
14721
+ * @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
14722
+ * @param {boolean} [options.includeEdges] - Include task edges (expensive field)
14753
14723
  * @param {string} [options.authKey] - The auth key for the request
14754
- * @returns {Promise<{ cursor: string; result: Workflow[]; hasMore: boolean }>} - The list of Workflow objects with pagination metadata
14724
+ * @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
14755
14725
  */
14756
14726
  async getWorkflows(addresses, options) {
14757
14727
  const request = new avs_pb22.ListTasksReq();
@@ -14799,14 +14769,14 @@ var Client = class extends BaseClient {
14799
14769
  return result.getTotal();
14800
14770
  }
14801
14771
  /**
14802
- * Get the list of executions for multiple workflow given in the workflows argument.
14772
+ * Get the list of executions for multiple workflows
14803
14773
  * @param {string[]} workflows - The list of workflow ids to fetch execution for
14804
- * @param {GetExecutionsRequest} options - Request options
14774
+ * @param {GetExecutionsOptions} options - Request options
14805
14775
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14806
14776
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14807
14777
  * @param {number} [options.limit] - The page limit of the response; default is 10
14808
14778
  * @param {string} [options.authKey] - The auth key for the request
14809
- * @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
14779
+ * @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
14810
14780
  */
14811
14781
  async getExecutions(workflows, options) {
14812
14782
  const request = new avs_pb22.ListExecutionsReq();
@@ -14948,7 +14918,10 @@ var Client = class extends BaseClient {
14948
14918
  * Create a new secret
14949
14919
  * @param {string} name - The name of the secret
14950
14920
  * @param {string} value - The value of the secret
14951
- * @param {SecretRequestOptions} options - Request options
14921
+ * @param {SecretOptions} [options] - Request options
14922
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
14923
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
14924
+ * @param {string} [options.authKey] - The auth key for the request
14952
14925
  * @returns {Promise<boolean>} - True if the secret was created successfully
14953
14926
  */
14954
14927
  async createSecret(name, value, options) {
@@ -14968,7 +14941,10 @@ var Client = class extends BaseClient {
14968
14941
  * Update a secret
14969
14942
  * @param {string} name - The name of the secret
14970
14943
  * @param {string} value - The value of the secret
14971
- * @param {SecretRequestOptions} options - Request options
14944
+ * @param {SecretOptions} [options] - Request options
14945
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
14946
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
14947
+ * @param {string} [options.authKey] - The auth key for the request
14972
14948
  * @returns {Promise<boolean>} - True if the secret was updated successfully
14973
14949
  */
14974
14950
  async updateSecret(name, value, options) {
@@ -14986,8 +14962,17 @@ var Client = class extends BaseClient {
14986
14962
  }
14987
14963
  /**
14988
14964
  * Get the list of secrets
14989
- * @param {SecretRequestOptions} options - Request options
14990
- * @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
14965
+ * @param {GetSecretsOptions} options - Request options
14966
+ * @param {string} [options.workflowId] - Filter secrets by workflow ID
14967
+ * @param {string} [options.orgId] - Filter secrets by organization ID
14968
+ * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14969
+ * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14970
+ * @param {number} [options.limit] - The page limit of the response; default is 10
14971
+ * @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
14972
+ * @param {boolean} [options.includeCreatedBy] - Include created_by field
14973
+ * @param {boolean} [options.includeDescription] - Include description field
14974
+ * @param {string} [options.authKey] - The auth key for the request
14975
+ * @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
14991
14976
  */
14992
14977
  async getSecrets(options) {
14993
14978
  const request = new avs_pb22.ListSecretsReq();
@@ -15038,7 +15023,10 @@ var Client = class extends BaseClient {
15038
15023
  /**
15039
15024
  * Delete a secret
15040
15025
  * @param {string} name - The name of the secret
15041
- * @param {SecretRequestOptions} options - Request options
15026
+ * @param {SecretOptions} [options] - Request options
15027
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
15028
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
15029
+ * @param {string} [options.authKey] - The auth key for the request
15042
15030
  * @returns {Promise<boolean>} - True if the secret was deleted successfully
15043
15031
  */
15044
15032
  async deleteSecret(name, options) {
@@ -15280,7 +15268,7 @@ export {
15280
15268
  contractRead_default as ContractReadNode,
15281
15269
  contractWrite_default as ContractWriteNode,
15282
15270
  cron_default as CronTrigger,
15283
- CustomCodeLangs,
15271
+ CustomCodeLangs2 as CustomCodeLangs,
15284
15272
  customCode_default as CustomCodeNode,
15285
15273
  ethTransfer_default as ETHTransferNode,
15286
15274
  edge_default as Edge,
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
+ import { BranchNodeData } from "@avaprotocol/types";
2
3
  import Node from "./interface";
3
4
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type BranchNodeData = avs_pb.BranchNode.Config.AsObject;
5
5
  export type BranchNodeProps = NodeProps & {
6
6
  data: BranchNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/models/node/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAGhD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAUrD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAgC7B;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/models/node/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAY,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAGhD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAUrD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAgC7B;AACD,eAAe,UAAU,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type ContractReadNodeData = avs_pb.ContractReadNode.AsObject;
4
+ import { ContractReadNodeData } from "@avaprotocol/types";
5
5
  export type ContractReadNodeProps = NodeProps & {
6
6
  data: ContractReadNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAoB7B;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAkB7B;AAED,eAAe,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ class ContractReadNode extends Node {
11
11
  return new ContractReadNode({
12
12
  ...obj,
13
13
  type: NodeType.ContractRead,
14
- data: raw.getContractRead().toObject(),
14
+ data: raw.getContractRead().getConfig().toObject(),
15
15
  });
16
16
  }
17
17
  toRequest() {
@@ -19,13 +19,11 @@ class ContractReadNode extends Node {
19
19
  request.setId(this.id);
20
20
  request.setName(this.name);
21
21
  const nodeData = new avs_pb.ContractReadNode();
22
- if (this.data.config) {
23
- const config = new avs_pb.ContractReadNode.Config();
24
- config.setContractAddress(this.data.config.contractAddress);
25
- config.setCallData(this.data.config.callData);
26
- config.setContractAbi(this.data.config.contractAbi);
27
- nodeData.setConfig(config);
28
- }
22
+ const config = new avs_pb.ContractReadNode.Config();
23
+ config.setContractAddress(this.data.contractAddress);
24
+ config.setCallData(this.data.callData);
25
+ config.setContractAbi(this.data.contractAbi);
26
+ nodeData.setConfig(config);
29
27
  request.setContractRead(nodeData);
30
28
  return request;
31
29
  }
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type ContractWriteNodeData = avs_pb.ContractWriteNode.Config.AsObject;
4
+ import { ContractWriteNodeData } from "@avaprotocol/types";
5
5
  export type ContractWriteNodeProps = NodeProps & {
6
6
  data: ContractWriteNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG;IAC/C,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IAU5D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAkB7B;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGrE,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG;IAC/C,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IAU5D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAkB7B;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,11 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type CustomCodeNodeData = avs_pb.CustomCodeNode.AsObject;
5
- export declare const CustomCodeLangs: {
6
- JAVASCRIPT: number;
7
- PYTHON: number;
8
- };
4
+ import { CustomCodeNodeData } from "@avaprotocol/types";
9
5
  export type CustomCodeNodeProps = NodeProps & {
10
6
  data: CustomCodeNodeData;
11
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC;AAChE,eAAO,MAAM,eAAe;;;CAG3B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IAUzD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAmB7B;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,kBAAkB,EAAmB,MAAM,oBAAoB,CAAC;AAGnF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IAUzD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAiB7B;AAED,eAAe,cAAc,CAAC"}
@@ -1,10 +1,6 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
- export const CustomCodeLangs = {
5
- JAVASCRIPT: 0,
6
- PYTHON: 1
7
- };
8
4
  class CustomCodeNode extends Node {
9
5
  constructor(props) {
10
6
  super({ ...props, type: NodeType.CustomCode, data: props.data });
@@ -15,7 +11,7 @@ class CustomCodeNode extends Node {
15
11
  return new CustomCodeNode({
16
12
  ...obj,
17
13
  type: NodeType.CustomCode,
18
- data: raw.getCustomCode().toObject(),
14
+ data: raw.getCustomCode().getConfig().toObject(),
19
15
  });
20
16
  }
21
17
  toRequest() {
@@ -23,12 +19,10 @@ class CustomCodeNode extends Node {
23
19
  request.setId(this.id);
24
20
  request.setName(this.name);
25
21
  const nodeData = new avs_pb.CustomCodeNode();
26
- if (this.data.config) {
27
- const config = new avs_pb.CustomCodeNode.Config();
28
- config.setLang(this.data.config.lang);
29
- config.setSource(this.data.config.source);
30
- nodeData.setConfig(config);
31
- }
22
+ const config = new avs_pb.CustomCodeNode.Config();
23
+ config.setLang(this.data.lang);
24
+ config.setSource(this.data.source);
25
+ nodeData.setConfig(config);
32
26
  request.setCustomCode(nodeData);
33
27
  return request;
34
28
  }
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type ETHTransferNodeData = avs_pb.ETHTransferNode.Config.AsObject;
4
+ import { ETHTransferNodeData } from "@avaprotocol/types";
5
5
  export type ETHTransferNodeProps = NodeProps & {
6
6
  data: ETHTransferNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ethTransfer.d.ts","sourceRoot":"","sources":["../../../src/models/node/ethTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG;IAC7C,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF,cAAM,eAAgB,SAAQ,IAAI;gBACpB,KAAK,EAAE,oBAAoB;IAIvC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,eAAe;IAU1D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAiB7B;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ethTransfer.d.ts","sourceRoot":"","sources":["../../../src/models/node/ethTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG;IAC7C,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF,cAAM,eAAgB,SAAQ,IAAI;gBACpB,KAAK,EAAE,oBAAoB;IAIvC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,eAAe;IAU1D,SAAS,IAAI,MAAM,CAAC,QAAQ;CAiB7B;AAED,eAAe,eAAe,CAAC"}
@@ -1,14 +1,15 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
- import ContractWriteNode, { ContractWriteNodeData, ContractWriteNodeProps } from "./contractWrite";
3
- import CustomCodeNode, { CustomCodeLangs, CustomCodeNodeData, CustomCodeNodeProps } from "./customCode";
4
- import GraphQLQueryNode, { GraphQLQueryNodeData, GraphQLQueryNodeProps } from "./graphqlQuery";
2
+ import ContractWriteNode, { ContractWriteNodeProps } from "./contractWrite";
3
+ import CustomCodeNode, { CustomCodeNodeProps } from "./customCode";
4
+ import GraphQLQueryNode, { GraphQLQueryNodeProps } from "./graphqlQuery";
5
5
  import Node, { NodeProps } from "./interface";
6
- import RestAPINode, { RestAPINodeData, RestAPINodeProps } from "./restApi";
7
- import ContractReadNode, { ContractReadNodeData, ContractReadNodeProps } from "./contractRead";
8
- import ETHTransferNode, { ETHTransferNodeData, ETHTransferNodeProps } from "./ethTransfer";
9
- import BranchNode, { BranchNodeProps, BranchNodeData } from "./branch";
10
- import FilterNode, { FilterNodeData, FilterNodeProps } from "./filter";
11
- import LoopNode, { LoopNodeData, LoopNodeProps } from "./loop";
6
+ import RestAPINode, { RestAPINodeProps } from "./restApi";
7
+ import ContractReadNode, { ContractReadNodeProps } from "./contractRead";
8
+ import ETHTransferNode, { ETHTransferNodeProps } from "./ethTransfer";
9
+ import BranchNode, { BranchNodeProps } from "./branch";
10
+ import FilterNode, { FilterNodeProps } from "./filter";
11
+ import LoopNode, { LoopNodeProps } from "./loop";
12
+ import { CustomCodeLangs, ContractWriteNodeData, ContractReadNodeData, BranchNodeData, ETHTransferNodeData, GraphQLQueryNodeData, RestAPINodeData, CustomCodeNodeData, FilterNodeData, LoopNodeData } from "@avaprotocol/types";
12
13
  declare class NodeFactory {
13
14
  static create(props: NodeProps): Node;
14
15
  static createNodes(props: NodeProps[]): Node[];
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/models/node/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,iBAAiB,EAAE,EACxB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,cAAc,EAAE,EACrB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,EAAE,EACvB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,WAAW,EAAE,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,gBAAgB,EAAE,EACvB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,eAAe,EAAE,EACtB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,UAAU,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,QAAQ,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG/D,cAAM,WAAW;IACf,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IA2BrC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE;IAI9C,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAwBhD;AAED,eAAe,WAAW,CAAC;AAG3B,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,QAAQ,GACT,CAAC;AAGF,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,CAAC;AAGF,YAAY,EACV,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/models/node/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,iBAAiB,EAAE,EACxB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,cAAc,EAAE,EACrB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,EAAE,EACvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,WAAW,EAAE,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,gBAAgB,EAAE,EACvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,eAAe,EAAE,EACtB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAEL,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B,cAAM,WAAW;IACf,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IA2BrC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE;IAI9C,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAwBhD;AAED,eAAe,WAAW,CAAC;AAG3B,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,QAAQ,GACT,CAAC;AAGF,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,CAAC;AAGF,YAAY,EACV,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import _ from "lodash";
2
2
  import ContractWriteNode from "./contractWrite";
3
- import CustomCodeNode, { CustomCodeLangs, } from "./customCode";
3
+ import CustomCodeNode from "./customCode";
4
4
  import GraphQLQueryNode from "./graphqlQuery";
5
5
  import Node from "./interface";
6
6
  import RestAPINode from "./restApi";
@@ -9,7 +9,7 @@ import ETHTransferNode from "./ethTransfer";
9
9
  import BranchNode from "./branch";
10
10
  import FilterNode from "./filter";
11
11
  import LoopNode from "./loop";
12
- import { NodeType } from "@avaprotocol/types";
12
+ import { NodeType, CustomCodeLangs } from "@avaprotocol/types";
13
13
  class NodeFactory {
14
14
  static create(props) {
15
15
  switch (props.type) {
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type FilterNodeData = avs_pb.FilterNode.AsObject;
4
+ import { FilterNodeData } from "@avaprotocol/types";
5
5
  export type FilterNodeProps = NodeProps & {
6
6
  data: FilterNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAUrD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAkB7B;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAG9D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAUrD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAgB7B;AAED,eAAe,UAAU,CAAC"}
@@ -11,7 +11,7 @@ class FilterNode extends Node {
11
11
  return new FilterNode({
12
12
  ...obj,
13
13
  type: NodeType.Filter,
14
- data: raw.getFilter().toObject(),
14
+ data: raw.getFilter().getConfig().toObject(),
15
15
  });
16
16
  }
17
17
  toRequest() {
@@ -19,12 +19,10 @@ class FilterNode extends Node {
19
19
  request.setId(this.id);
20
20
  request.setName(this.name);
21
21
  const nodeData = new avs_pb.FilterNode();
22
- if (this.data.config) {
23
- const config = new avs_pb.FilterNode.Config();
24
- config.setExpression(this.data.config.expression);
25
- config.setSourceId(this.data.config.sourceId || '');
26
- nodeData.setConfig(config);
27
- }
22
+ const config = new avs_pb.FilterNode.Config();
23
+ config.setExpression(this.data.expression);
24
+ config.setSourceId(this.data.sourceId || '');
25
+ nodeData.setConfig(config);
28
26
  request.setFilter(nodeData);
29
27
  return request;
30
28
  }
@@ -1,7 +1,7 @@
1
1
  import { NodeProps } from "./interface";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
- export type GraphQLQueryNodeData = avs_pb.GraphQLQueryNode.AsObject;
4
+ import { GraphQLQueryNodeData } from "@avaprotocol/types";
5
5
  export type GraphQLQueryNodeProps = NodeProps & {
6
6
  data: GraphQLQueryNodeData;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"graphqlQuery.d.ts","sourceRoot":"","sources":["../../../src/models/node/graphqlQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAIhD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAQxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;CA4B7B;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"graphqlQuery.d.ts","sourceRoot":"","sources":["../../../src/models/node/graphqlQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAY,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGpE,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG;IAC9C,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAQxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;CA0B7B;AAED,eAAe,gBAAgB,CAAC"}