@avaprotocol/sdk-js 2.17.0 → 4.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -370
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +737 -22356
- package/dist/index.mjs +699 -22386
- package/dist/v4/auth.d.ts +54 -0
- package/dist/v4/auth.d.ts.map +1 -0
- package/dist/v4/auth.js +70 -0
- package/dist/v4/builders/nodes.d.ts +103 -0
- package/dist/v4/builders/nodes.d.ts.map +1 -0
- package/dist/v4/builders/nodes.js +132 -0
- package/dist/v4/builders/triggers.d.ts +66 -0
- package/dist/v4/builders/triggers.d.ts.map +1 -0
- package/dist/v4/builders/triggers.js +74 -0
- package/dist/v4/chains.d.ts +16 -0
- package/dist/v4/chains.d.ts.map +1 -0
- package/dist/v4/chains.js +23 -0
- package/dist/v4/client.d.ts +60 -0
- package/dist/v4/client.d.ts.map +1 -0
- package/dist/v4/client.js +53 -0
- package/dist/v4/index.d.ts +18 -0
- package/dist/v4/index.d.ts.map +1 -0
- package/dist/v4/index.js +23 -0
- package/dist/v4/internal/errors.d.ts +36 -0
- package/dist/v4/internal/errors.d.ts.map +1 -0
- package/dist/v4/internal/errors.js +32 -0
- package/dist/v4/internal/transport.d.ts +64 -0
- package/dist/v4/internal/transport.d.ts.map +1 -0
- package/dist/v4/internal/transport.js +133 -0
- package/dist/v4/resources/auth.d.ts +39 -0
- package/dist/v4/resources/auth.d.ts.map +1 -0
- package/dist/v4/resources/auth.js +53 -0
- package/dist/v4/resources/executions.d.ts +68 -0
- package/dist/v4/resources/executions.d.ts.map +1 -0
- package/dist/v4/resources/executions.js +126 -0
- package/dist/v4/resources/health.d.ts +9 -0
- package/dist/v4/resources/health.d.ts.map +1 -0
- package/dist/v4/resources/health.js +9 -0
- package/dist/v4/resources/nodes.d.ts +9 -0
- package/dist/v4/resources/nodes.d.ts.map +1 -0
- package/dist/v4/resources/nodes.js +13 -0
- package/dist/v4/resources/operators.d.ts +9 -0
- package/dist/v4/resources/operators.d.ts.map +1 -0
- package/dist/v4/resources/operators.js +9 -0
- package/dist/v4/resources/secrets.d.ts +24 -0
- package/dist/v4/resources/secrets.d.ts.map +1 -0
- package/dist/v4/resources/secrets.js +28 -0
- package/dist/v4/resources/tokens.d.ts +16 -0
- package/dist/v4/resources/tokens.d.ts.map +1 -0
- package/dist/v4/resources/tokens.js +17 -0
- package/dist/v4/resources/triggers.d.ts +9 -0
- package/dist/v4/resources/triggers.d.ts.map +1 -0
- package/dist/v4/resources/triggers.js +13 -0
- package/dist/v4/resources/wallets.d.ts +25 -0
- package/dist/v4/resources/wallets.d.ts.map +1 -0
- package/dist/v4/resources/wallets.js +45 -0
- package/dist/v4/resources/workflows.d.ts +54 -0
- package/dist/v4/resources/workflows.d.ts.map +1 -0
- package/dist/v4/resources/workflows.js +81 -0
- package/package.json +4 -12
- package/dist/auth.d.ts +0 -2
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -10
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -19
- package/dist/models/edge.d.ts +0 -12
- package/dist/models/edge.d.ts.map +0 -1
- package/dist/models/edge.js +0 -19
- package/dist/models/execution.d.ts +0 -30
- package/dist/models/execution.d.ts.map +0 -1
- package/dist/models/execution.js +0 -100
- package/dist/models/node/balance.d.ts +0 -17
- package/dist/models/node/balance.d.ts.map +0 -1
- package/dist/models/node/balance.js +0 -78
- package/dist/models/node/branch.d.ts +0 -11
- package/dist/models/node/branch.d.ts.map +0 -1
- package/dist/models/node/branch.js +0 -63
- package/dist/models/node/contractRead.d.ts +0 -17
- package/dist/models/node/contractRead.d.ts.map +0 -1
- package/dist/models/node/contractRead.js +0 -91
- package/dist/models/node/contractWrite.d.ts +0 -17
- package/dist/models/node/contractWrite.d.ts.map +0 -1
- package/dist/models/node/contractWrite.js +0 -102
- package/dist/models/node/customCode.d.ts +0 -20
- package/dist/models/node/customCode.d.ts.map +0 -1
- package/dist/models/node/customCode.js +0 -74
- package/dist/models/node/ethTransfer.d.ts +0 -20
- package/dist/models/node/ethTransfer.d.ts.map +0 -1
- package/dist/models/node/ethTransfer.js +0 -58
- package/dist/models/node/factory.d.ts +0 -24
- package/dist/models/node/factory.d.ts.map +0 -1
- package/dist/models/node/factory.js +0 -108
- package/dist/models/node/filter.d.ts +0 -11
- package/dist/models/node/filter.d.ts.map +0 -1
- package/dist/models/node/filter.js +0 -57
- package/dist/models/node/graphqlQuery.d.ts +0 -21
- package/dist/models/node/graphqlQuery.d.ts.map +0 -1
- package/dist/models/node/graphqlQuery.js +0 -74
- package/dist/models/node/interface.d.ts +0 -20
- package/dist/models/node/interface.d.ts.map +0 -1
- package/dist/models/node/interface.js +0 -58
- package/dist/models/node/loop.d.ts +0 -15
- package/dist/models/node/loop.d.ts.map +0 -1
- package/dist/models/node/loop.js +0 -235
- package/dist/models/node/restApi.d.ts +0 -23
- package/dist/models/node/restApi.d.ts.map +0 -1
- package/dist/models/node/restApi.js +0 -84
- package/dist/models/secret.d.ts +0 -16
- package/dist/models/secret.d.ts.map +0 -1
- package/dist/models/secret.js +0 -28
- package/dist/models/step.d.ts +0 -33
- package/dist/models/step.d.ts.map +0 -1
- package/dist/models/step.js +0 -287
- package/dist/models/trigger/block.d.ts +0 -21
- package/dist/models/trigger/block.d.ts.map +0 -1
- package/dist/models/trigger/block.js +0 -81
- package/dist/models/trigger/cron.d.ts +0 -23
- package/dist/models/trigger/cron.d.ts.map +0 -1
- package/dist/models/trigger/cron.js +0 -77
- package/dist/models/trigger/event.d.ts +0 -22
- package/dist/models/trigger/event.d.ts.map +0 -1
- package/dist/models/trigger/event.js +0 -244
- package/dist/models/trigger/factory.d.ts +0 -27
- package/dist/models/trigger/factory.d.ts.map +0 -1
- package/dist/models/trigger/factory.js +0 -73
- package/dist/models/trigger/fixedTime.d.ts +0 -23
- package/dist/models/trigger/fixedTime.d.ts.map +0 -1
- package/dist/models/trigger/fixedTime.js +0 -69
- package/dist/models/trigger/interface.d.ts +0 -19
- package/dist/models/trigger/interface.d.ts.map +0 -1
- package/dist/models/trigger/interface.js +0 -35
- package/dist/models/trigger/manual.d.ts +0 -16
- package/dist/models/trigger/manual.d.ts.map +0 -1
- package/dist/models/trigger/manual.js +0 -117
- package/dist/models/workflow.d.ts +0 -53
- package/dist/models/workflow.d.ts.map +0 -1
- package/dist/models/workflow.js +0 -219
- package/dist/utils.d.ts +0 -82
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -286
package/dist/models/edge.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
class Edge {
|
|
3
|
-
constructor(edge) {
|
|
4
|
-
this.id = edge.id;
|
|
5
|
-
this.source = edge.source;
|
|
6
|
-
this.target = edge.target;
|
|
7
|
-
}
|
|
8
|
-
static fromResponse(edge) {
|
|
9
|
-
return new Edge(edge.toObject());
|
|
10
|
-
}
|
|
11
|
-
toRequest() {
|
|
12
|
-
const edge = new avs_pb.TaskEdge();
|
|
13
|
-
edge.setId(this.id);
|
|
14
|
-
edge.setSource(this.source);
|
|
15
|
-
edge.setTarget(this.target);
|
|
16
|
-
return edge;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export default Edge;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { ExecutionProps, ExecutionStatus, type Fee, type NodeCOGS, type ValueFee } from "@avaprotocol/types";
|
|
3
|
-
import Step from "./step";
|
|
4
|
-
/**
|
|
5
|
-
* Convert the numeric protobuf ExecutionStatus to the string-based
|
|
6
|
-
* @avaprotocol/types enum. Legacy value 4 (retired PARTIAL_SUCCESS) maps
|
|
7
|
-
* to Failed so older aggregator responses still deserialize cleanly.
|
|
8
|
-
*/
|
|
9
|
-
export declare function convertProtobufExecutionStatus(protobufStatus: avs_pb.ExecutionStatus): ExecutionStatus;
|
|
10
|
-
export declare function convertFee(feePb: avs_pb.Fee | undefined): Fee | undefined;
|
|
11
|
-
export declare function convertNodeCOGS(cogsPb: avs_pb.NodeCOGS): NodeCOGS;
|
|
12
|
-
export declare function convertExecutionTier(tier: number): string;
|
|
13
|
-
export declare function convertValueFee(valuePb: avs_pb.ValueFee | undefined): ValueFee | undefined;
|
|
14
|
-
declare class Execution implements ExecutionProps {
|
|
15
|
-
id: string;
|
|
16
|
-
startAt: number;
|
|
17
|
-
endAt: number;
|
|
18
|
-
status: ExecutionStatus;
|
|
19
|
-
error: string;
|
|
20
|
-
index: number;
|
|
21
|
-
steps: Step[];
|
|
22
|
-
executionFee?: Fee;
|
|
23
|
-
cogs: NodeCOGS[];
|
|
24
|
-
valueFee?: ValueFee;
|
|
25
|
-
constructor(props: ExecutionProps);
|
|
26
|
-
toJson(): ExecutionProps;
|
|
27
|
-
static fromResponse(execution: avs_pb.Execution): Execution;
|
|
28
|
-
}
|
|
29
|
-
export default Execution;
|
|
30
|
-
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/models/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,cAAc,EAEd,eAAe,EACf,KAAK,GAAG,EAER,KAAK,QAAQ,EACb,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,MAAM,CAAC,eAAe,GACrC,eAAe,CAejB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS,CAMzE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAOjE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAU1F;AAED,cAAM,SAAU,YAAW,cAAc;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;gBAER,KAAK,EAAE,cAAc;IAajC,MAAM,IAAI,cAAc;IAexB,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,SAAS;CAgB5D;AAED,eAAe,SAAS,CAAC"}
|
package/dist/models/execution.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { ExecutionStatus, } from "@avaprotocol/types";
|
|
3
|
-
import Step from "./step";
|
|
4
|
-
/**
|
|
5
|
-
* Convert the numeric protobuf ExecutionStatus to the string-based
|
|
6
|
-
* @avaprotocol/types enum. Legacy value 4 (retired PARTIAL_SUCCESS) maps
|
|
7
|
-
* to Failed so older aggregator responses still deserialize cleanly.
|
|
8
|
-
*/
|
|
9
|
-
export function convertProtobufExecutionStatus(protobufStatus) {
|
|
10
|
-
switch (protobufStatus) {
|
|
11
|
-
case avs_pb.ExecutionStatus.EXECUTION_STATUS_PENDING:
|
|
12
|
-
return ExecutionStatus.Pending;
|
|
13
|
-
case avs_pb.ExecutionStatus.EXECUTION_STATUS_SUCCESS:
|
|
14
|
-
return ExecutionStatus.Success;
|
|
15
|
-
case avs_pb.ExecutionStatus.EXECUTION_STATUS_FAILED:
|
|
16
|
-
case 4: // legacy PARTIAL_SUCCESS — treat as Failed
|
|
17
|
-
return ExecutionStatus.Failed;
|
|
18
|
-
case avs_pb.ExecutionStatus.EXECUTION_STATUS_ERROR:
|
|
19
|
-
return ExecutionStatus.Error;
|
|
20
|
-
case avs_pb.ExecutionStatus.EXECUTION_STATUS_UNSPECIFIED:
|
|
21
|
-
default:
|
|
22
|
-
return ExecutionStatus.Unspecified;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export function convertFee(feePb) {
|
|
26
|
-
if (!feePb)
|
|
27
|
-
return undefined;
|
|
28
|
-
return {
|
|
29
|
-
amount: feePb.getAmount(),
|
|
30
|
-
unit: feePb.getUnit(),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export function convertNodeCOGS(cogsPb) {
|
|
34
|
-
return {
|
|
35
|
-
nodeId: cogsPb.getNodeId(),
|
|
36
|
-
costType: cogsPb.getCostType(),
|
|
37
|
-
fee: convertFee(cogsPb.getFee()) || { amount: "0", unit: "WEI" },
|
|
38
|
-
gasUnits: cogsPb.getGasUnits() || undefined,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export function convertExecutionTier(tier) {
|
|
42
|
-
return avs_pb.ExecutionTier[tier] ?? tier.toString();
|
|
43
|
-
}
|
|
44
|
-
export function convertValueFee(valuePb) {
|
|
45
|
-
if (!valuePb)
|
|
46
|
-
return undefined;
|
|
47
|
-
return {
|
|
48
|
-
fee: convertFee(valuePb.getFee()) || { amount: "0", unit: "PERCENTAGE" },
|
|
49
|
-
tier: convertExecutionTier(valuePb.getTier()),
|
|
50
|
-
valueBase: valuePb.getValueBase() || undefined,
|
|
51
|
-
classificationMethod: valuePb.getClassificationMethod(),
|
|
52
|
-
confidence: valuePb.getConfidence(),
|
|
53
|
-
reason: valuePb.getReason(),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
class Execution {
|
|
57
|
-
constructor(props) {
|
|
58
|
-
this.id = props.id;
|
|
59
|
-
this.startAt = props.startAt;
|
|
60
|
-
this.endAt = props.endAt;
|
|
61
|
-
this.status = props.status;
|
|
62
|
-
this.error = props.error;
|
|
63
|
-
this.index = props.index;
|
|
64
|
-
this.steps = props.steps.map(s => new Step(s));
|
|
65
|
-
this.executionFee = props.executionFee;
|
|
66
|
-
this.cogs = props.cogs || [];
|
|
67
|
-
this.valueFee = props.valueFee;
|
|
68
|
-
}
|
|
69
|
-
toJson() {
|
|
70
|
-
return {
|
|
71
|
-
id: this.id,
|
|
72
|
-
startAt: this.startAt,
|
|
73
|
-
endAt: this.endAt,
|
|
74
|
-
status: this.status,
|
|
75
|
-
error: this.error,
|
|
76
|
-
index: this.index,
|
|
77
|
-
steps: this.steps.map(step => step.toJson()),
|
|
78
|
-
...(this.executionFee && { executionFee: this.executionFee }),
|
|
79
|
-
cogs: this.cogs,
|
|
80
|
-
...(this.valueFee && { valueFee: this.valueFee }),
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
static fromResponse(execution) {
|
|
84
|
-
return new Execution({
|
|
85
|
-
id: execution.getId(),
|
|
86
|
-
startAt: execution.getStartAt(),
|
|
87
|
-
endAt: execution.getEndAt(),
|
|
88
|
-
status: convertProtobufExecutionStatus(execution.getStatus()),
|
|
89
|
-
error: execution.getError(),
|
|
90
|
-
index: execution.getIndex(),
|
|
91
|
-
executionFee: convertFee(execution.getExecutionFee()),
|
|
92
|
-
cogs: execution.getCogsList().map(convertNodeCOGS),
|
|
93
|
-
valueFee: convertValueFee(execution.getValueFee()),
|
|
94
|
-
steps: execution
|
|
95
|
-
.getStepsList()
|
|
96
|
-
.map((step) => Step.fromResponse(step)),
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
export default Execution;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { BalanceNodeData, BalanceNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class BalanceNode extends Node {
|
|
5
|
-
constructor(props: BalanceNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf BalanceNode from config data
|
|
8
|
-
* @param configData - The configuration data for the balance node
|
|
9
|
-
* @returns Configured avs_pb.BalanceNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: BalanceNodeData): avs_pb.BalanceNode;
|
|
12
|
-
static fromResponse(raw: avs_pb.TaskNode): BalanceNode;
|
|
13
|
-
toRequest(): avs_pb.TaskNode;
|
|
14
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown | null;
|
|
15
|
-
}
|
|
16
|
-
export default BalanceNode;
|
|
17
|
-
//# sourceMappingURL=balance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../src/models/node/balance.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAEL,eAAe,EACf,gBAAgB,EAEjB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,WAAY,SAAQ,IAAI;gBAChB,KAAK,EAAE,gBAAgB;IAInC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CAAC,WAAW;IA+B1E,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,WAAW;IAwBtD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAc5B,MAAM,CAAC,cAAc,CACnB,UAAU,EAAE,MAAM,CAAC,qBAAqB,GACvC,OAAO,GAAG,IAAI;CAWlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { NodeType, } from "@avaprotocol/types";
|
|
4
|
-
import { convertProtobufValueToJs } from "../../utils";
|
|
5
|
-
// Required props for constructor: id, name, type and data
|
|
6
|
-
class BalanceNode extends Node {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super({ ...props, type: NodeType.Balance, data: props.data });
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Create a protobuf BalanceNode from config data
|
|
12
|
-
* @param configData - The configuration data for the balance node
|
|
13
|
-
* @returns Configured avs_pb.BalanceNode
|
|
14
|
-
*/
|
|
15
|
-
static createProtobufNode(configData) {
|
|
16
|
-
const node = new avs_pb.BalanceNode();
|
|
17
|
-
const config = new avs_pb.BalanceNode.Config();
|
|
18
|
-
config.setAddress(configData.address);
|
|
19
|
-
config.setChain(configData.chain);
|
|
20
|
-
if (configData.includeSpam !== undefined) {
|
|
21
|
-
config.setIncludeSpam(configData.includeSpam);
|
|
22
|
-
}
|
|
23
|
-
if (configData.includeZeroBalances !== undefined) {
|
|
24
|
-
config.setIncludeZeroBalances(configData.includeZeroBalances);
|
|
25
|
-
}
|
|
26
|
-
if (configData.minUsdValue !== undefined) {
|
|
27
|
-
// Convert dollars to cents for protobuf (validation happens on backend)
|
|
28
|
-
config.setMinUsdValueCents(Math.round(configData.minUsdValue * 100));
|
|
29
|
-
}
|
|
30
|
-
if (configData.tokenAddresses !== undefined &&
|
|
31
|
-
configData.tokenAddresses.length > 0) {
|
|
32
|
-
config.setTokenAddressesList(configData.tokenAddresses);
|
|
33
|
-
}
|
|
34
|
-
node.setConfig(config);
|
|
35
|
-
return node;
|
|
36
|
-
}
|
|
37
|
-
static fromResponse(raw) {
|
|
38
|
-
// Convert the raw object to BalanceNodeProps, which should keep name and id
|
|
39
|
-
const obj = raw.toObject();
|
|
40
|
-
const balanceNode = raw.getBalance();
|
|
41
|
-
const config = balanceNode.getConfig();
|
|
42
|
-
const protobufData = config.toObject();
|
|
43
|
-
// Convert protobuf data to our custom interface
|
|
44
|
-
const data = {
|
|
45
|
-
address: protobufData.address,
|
|
46
|
-
chain: protobufData.chain,
|
|
47
|
-
includeSpam: protobufData.includeSpam,
|
|
48
|
-
includeZeroBalances: protobufData.includeZeroBalances,
|
|
49
|
-
minUsdValue: protobufData.minUsdValueCents / 100,
|
|
50
|
-
tokenAddresses: protobufData.tokenAddressesList,
|
|
51
|
-
};
|
|
52
|
-
return new BalanceNode({
|
|
53
|
-
...obj,
|
|
54
|
-
type: NodeType.Balance,
|
|
55
|
-
data: data,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
toRequest() {
|
|
59
|
-
const request = new avs_pb.TaskNode();
|
|
60
|
-
request.setId(this.id);
|
|
61
|
-
request.setName(this.name);
|
|
62
|
-
request.setType(avs_pb.NodeType.NODE_TYPE_BALANCE);
|
|
63
|
-
const node = BalanceNode.createProtobufNode(this.data);
|
|
64
|
-
request.setBalance(node);
|
|
65
|
-
return request;
|
|
66
|
-
}
|
|
67
|
-
static fromOutputData(outputData) {
|
|
68
|
-
const balanceOutput = outputData.getBalance();
|
|
69
|
-
if (!balanceOutput)
|
|
70
|
-
return null;
|
|
71
|
-
// Get the data from the data field (array of token balances)
|
|
72
|
-
const dataValue = balanceOutput.getData();
|
|
73
|
-
const balanceData = dataValue ? convertProtobufValueToJs(dataValue) : [];
|
|
74
|
-
// Return the array directly without wrapping
|
|
75
|
-
return balanceData;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export default BalanceNode;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BranchNodeProps } from "@avaprotocol/types";
|
|
2
|
-
import Node from "./interface";
|
|
3
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
4
|
-
declare class BranchNode extends Node {
|
|
5
|
-
constructor(props: BranchNodeProps);
|
|
6
|
-
static fromResponse(raw: avs_pb.TaskNode): BranchNode;
|
|
7
|
-
toRequest(): avs_pb.TaskNode;
|
|
8
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
9
|
-
}
|
|
10
|
-
export default BranchNode;
|
|
11
|
-
//# sourceMappingURL=branch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/models/node/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAKhD,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAsBrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAkC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAgBrE;AACD,eAAe,UAAU,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { NodeType, } from "@avaprotocol/types";
|
|
2
|
-
import Node from "./interface";
|
|
3
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
4
|
-
import { convertProtobufValueToJs } from "../../utils";
|
|
5
|
-
// Required props for constructor: id, name, type and data: { conditions }
|
|
6
|
-
class BranchNode extends Node {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super({ ...props, type: NodeType.Branch, data: props.data });
|
|
9
|
-
}
|
|
10
|
-
static fromResponse(raw) {
|
|
11
|
-
// Convert the raw object to BranchNodeProps, which should keep name and id
|
|
12
|
-
const obj = raw.toObject();
|
|
13
|
-
const protobufData = raw.getBranch().toObject().config;
|
|
14
|
-
// Convert protobuf data to our custom interface
|
|
15
|
-
const data = {
|
|
16
|
-
conditions: protobufData?.conditionsList?.map((condition) => ({
|
|
17
|
-
id: condition.id,
|
|
18
|
-
type: condition.type,
|
|
19
|
-
expression: condition.expression,
|
|
20
|
-
})) || [],
|
|
21
|
-
};
|
|
22
|
-
return new BranchNode({
|
|
23
|
-
...obj,
|
|
24
|
-
type: NodeType.Branch,
|
|
25
|
-
data: data,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
toRequest() {
|
|
29
|
-
const request = new avs_pb.TaskNode();
|
|
30
|
-
request.setId(this.id);
|
|
31
|
-
request.setName(this.name);
|
|
32
|
-
request.setType(avs_pb.NodeType.NODE_TYPE_BRANCH);
|
|
33
|
-
const node = new avs_pb.BranchNode();
|
|
34
|
-
const config = new avs_pb.BranchNode.Config();
|
|
35
|
-
if (this.data.conditions &&
|
|
36
|
-
this.data.conditions.length > 0) {
|
|
37
|
-
const conditionsList = this.data.conditions.map((condition) => {
|
|
38
|
-
const conditionObj = new avs_pb.BranchNode.Condition();
|
|
39
|
-
conditionObj.setId(condition.id);
|
|
40
|
-
conditionObj.setType(condition.type);
|
|
41
|
-
conditionObj.setExpression(condition.expression);
|
|
42
|
-
return conditionObj;
|
|
43
|
-
});
|
|
44
|
-
config.setConditionsList(conditionsList);
|
|
45
|
-
}
|
|
46
|
-
node.setConfig(config);
|
|
47
|
-
request.setBranch(node);
|
|
48
|
-
return request;
|
|
49
|
-
}
|
|
50
|
-
static fromOutputData(outputData) {
|
|
51
|
-
const branchOutput = outputData.getBranch();
|
|
52
|
-
if (!branchOutput) {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
// Use convertProtobufValueToJs to get clean JavaScript objects
|
|
56
|
-
const rawData = branchOutput.getData();
|
|
57
|
-
if (rawData) {
|
|
58
|
-
return convertProtobufValueToJs(rawData);
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
export default BranchNode;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { ContractReadNodeData, ContractReadNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class ContractReadNode extends Node {
|
|
5
|
-
constructor(props: ContractReadNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf ContractReadNode from config data
|
|
8
|
-
* @param configData - The configuration data for the contract read node
|
|
9
|
-
* @returns Configured avs_pb.ContractReadNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: ContractReadNodeData): avs_pb.ContractReadNode;
|
|
12
|
-
static fromResponse(raw: avs_pb.TaskNode): ContractReadNode;
|
|
13
|
-
toRequest(): avs_pb.TaskNode;
|
|
14
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown | null;
|
|
15
|
-
}
|
|
16
|
-
export default ContractReadNode;
|
|
17
|
-
//# sourceMappingURL=contractRead.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAEL,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CACvB,UAAU,EAAE,oBAAoB,GAC/B,MAAM,CAAC,gBAAgB;IAuC1B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IA8B3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAgB5B,MAAM,CAAC,cAAc,CACnB,UAAU,EAAE,MAAM,CAAC,qBAAqB,GACvC,OAAO,GAAG,IAAI;CAUlB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
4
|
-
import { NodeType, } from "@avaprotocol/types";
|
|
5
|
-
import { convertProtobufValueToJs } from "../../utils";
|
|
6
|
-
// Required props for constructor: id, name, type and data
|
|
7
|
-
class ContractReadNode extends Node {
|
|
8
|
-
constructor(props) {
|
|
9
|
-
super({ ...props, type: NodeType.ContractRead, data: props.data });
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Create a protobuf ContractReadNode from config data
|
|
13
|
-
* @param configData - The configuration data for the contract read node
|
|
14
|
-
* @returns Configured avs_pb.ContractReadNode
|
|
15
|
-
*/
|
|
16
|
-
static createProtobufNode(configData) {
|
|
17
|
-
const node = new avs_pb.ContractReadNode();
|
|
18
|
-
const config = new avs_pb.ContractReadNode.Config();
|
|
19
|
-
config.setContractAddress(configData.contractAddress);
|
|
20
|
-
// Convert array to protobuf Value list
|
|
21
|
-
const abiValueList = configData.contractAbi.map((item) => {
|
|
22
|
-
const value = new google_protobuf_struct_pb.Value();
|
|
23
|
-
value.setStructValue(google_protobuf_struct_pb.Struct.fromJavaScript(item));
|
|
24
|
-
return value;
|
|
25
|
-
});
|
|
26
|
-
config.setContractAbiList(abiValueList);
|
|
27
|
-
// Handle method calls array (now required)
|
|
28
|
-
const methodCalls = configData.methodCalls;
|
|
29
|
-
methodCalls.forEach((methodCall) => {
|
|
30
|
-
const methodCallMsg = new avs_pb.ContractReadNode.MethodCall();
|
|
31
|
-
methodCallMsg.setMethodName(methodCall.methodName);
|
|
32
|
-
methodCallMsg.setMethodParamsList(methodCall.methodParams);
|
|
33
|
-
// Optional: Set callData if provided
|
|
34
|
-
if (methodCall.callData) {
|
|
35
|
-
methodCallMsg.setCallData(methodCall.callData);
|
|
36
|
-
}
|
|
37
|
-
// Optional: Set applyToFields if provided
|
|
38
|
-
if (methodCall.applyToFields) {
|
|
39
|
-
methodCallMsg.setApplyToFieldsList(methodCall.applyToFields);
|
|
40
|
-
}
|
|
41
|
-
config.addMethodCalls(methodCallMsg);
|
|
42
|
-
});
|
|
43
|
-
node.setConfig(config);
|
|
44
|
-
return node;
|
|
45
|
-
}
|
|
46
|
-
static fromResponse(raw) {
|
|
47
|
-
// Convert the raw object to ContractReadNodeProps, which should keep name and id
|
|
48
|
-
const obj = raw.toObject();
|
|
49
|
-
const contractReadNode = raw.getContractRead();
|
|
50
|
-
const config = contractReadNode.getConfig();
|
|
51
|
-
const protobufData = config.toObject();
|
|
52
|
-
// Convert protobuf data to our custom interface
|
|
53
|
-
const data = {
|
|
54
|
-
contractAddress: protobufData.contractAddress,
|
|
55
|
-
contractAbi: config
|
|
56
|
-
.getContractAbiList()
|
|
57
|
-
.map((value) => convertProtobufValueToJs(value)),
|
|
58
|
-
methodCalls: protobufData.methodCallsList?.map((call) => ({
|
|
59
|
-
methodName: call.methodName,
|
|
60
|
-
applyToFields: call.applyToFieldsList || [],
|
|
61
|
-
methodParams: call.methodParamsList || [],
|
|
62
|
-
// Only include callData if present
|
|
63
|
-
...(call.callData && { callData: call.callData }),
|
|
64
|
-
})) || [],
|
|
65
|
-
};
|
|
66
|
-
return new ContractReadNode({
|
|
67
|
-
...obj,
|
|
68
|
-
type: NodeType.ContractRead,
|
|
69
|
-
data: data,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
toRequest() {
|
|
73
|
-
const request = new avs_pb.TaskNode();
|
|
74
|
-
request.setId(this.id);
|
|
75
|
-
request.setName(this.name);
|
|
76
|
-
request.setType(avs_pb.NodeType.NODE_TYPE_CONTRACT_READ);
|
|
77
|
-
const node = ContractReadNode.createProtobufNode(this.data);
|
|
78
|
-
request.setContractRead(node);
|
|
79
|
-
return request;
|
|
80
|
-
}
|
|
81
|
-
static fromOutputData(outputData) {
|
|
82
|
-
const contractReadOutput = outputData.getContractRead();
|
|
83
|
-
if (!contractReadOutput)
|
|
84
|
-
return null;
|
|
85
|
-
// Get the clean data from the data field (now a single flattened object)
|
|
86
|
-
const dataValue = contractReadOutput.getData();
|
|
87
|
-
const cleanData = dataValue ? convertProtobufValueToJs(dataValue) : {};
|
|
88
|
-
return cleanData;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export default ContractReadNode;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { ContractWriteNodeData, ContractWriteNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class ContractWriteNode extends Node {
|
|
5
|
-
constructor(props: ContractWriteNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf ContractWriteNode from config data
|
|
8
|
-
* @param configData - The configuration data for the contract write node
|
|
9
|
-
* @returns Configured avs_pb.ContractWriteNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: ContractWriteNodeData): avs_pb.ContractWriteNode;
|
|
12
|
-
static fromResponse(raw: avs_pb.TaskNode): ContractWriteNode;
|
|
13
|
-
toRequest(): avs_pb.TaskNode;
|
|
14
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
15
|
-
}
|
|
16
|
-
export default ContractWriteNode;
|
|
17
|
-
//# sourceMappingURL=contractWrite.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAEL,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAAC,iBAAiB;IA6CtF,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IAmC5D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAgB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAYrE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
4
|
-
import { NodeType, } from "@avaprotocol/types";
|
|
5
|
-
import { convertProtobufValueToJs } from "../../utils";
|
|
6
|
-
// Required props for constructor: id, name, type and data: { config: { contractAddress, callData, contractAbi, methodCallsList? } }
|
|
7
|
-
class ContractWriteNode extends Node {
|
|
8
|
-
constructor(props) {
|
|
9
|
-
super({ ...props, type: NodeType.ContractWrite, data: props.data });
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Create a protobuf ContractWriteNode from config data
|
|
13
|
-
* @param configData - The configuration data for the contract write node
|
|
14
|
-
* @returns Configured avs_pb.ContractWriteNode
|
|
15
|
-
*/
|
|
16
|
-
static createProtobufNode(configData) {
|
|
17
|
-
const node = new avs_pb.ContractWriteNode();
|
|
18
|
-
const config = new avs_pb.ContractWriteNode.Config();
|
|
19
|
-
config.setContractAddress(configData.contractAddress);
|
|
20
|
-
// Remove the top-level callData since it's no longer part of ContractWriteNodeData
|
|
21
|
-
// Convert array to protobuf Value list
|
|
22
|
-
const abiValueList = configData.contractAbi.map(item => {
|
|
23
|
-
const value = new google_protobuf_struct_pb.Value();
|
|
24
|
-
value.setStructValue(google_protobuf_struct_pb.Struct.fromJavaScript(item));
|
|
25
|
-
return value;
|
|
26
|
-
});
|
|
27
|
-
config.setContractAbiList(abiValueList);
|
|
28
|
-
// Handle method calls array (now required)
|
|
29
|
-
const methodCalls = configData.methodCalls;
|
|
30
|
-
methodCalls.forEach((methodCall) => {
|
|
31
|
-
const methodCallMsg = new avs_pb.ContractWriteNode.MethodCall();
|
|
32
|
-
// Set callData only if provided (now optional)
|
|
33
|
-
if (methodCall.callData) {
|
|
34
|
-
methodCallMsg.setCallData(methodCall.callData);
|
|
35
|
-
}
|
|
36
|
-
if (methodCall.methodName) {
|
|
37
|
-
methodCallMsg.setMethodName(methodCall.methodName);
|
|
38
|
-
}
|
|
39
|
-
if (methodCall.methodParams) {
|
|
40
|
-
methodCallMsg.setMethodParamsList(methodCall.methodParams);
|
|
41
|
-
}
|
|
42
|
-
// Note: applyToFields is not supported for ContractWrite nodes
|
|
43
|
-
config.addMethodCalls(methodCallMsg);
|
|
44
|
-
});
|
|
45
|
-
// Set isSimulated only if explicitly provided (optional field in protobuf)
|
|
46
|
-
// When unset, the backend defaults to true (simulation mode)
|
|
47
|
-
if (configData.isSimulated !== undefined) {
|
|
48
|
-
config.setIsSimulated(configData.isSimulated);
|
|
49
|
-
}
|
|
50
|
-
node.setConfig(config);
|
|
51
|
-
return node;
|
|
52
|
-
}
|
|
53
|
-
static fromResponse(raw) {
|
|
54
|
-
// Convert the raw object to ContractWriteNodeProps, which should keep name and id
|
|
55
|
-
const obj = raw.toObject();
|
|
56
|
-
const contractWriteNode = raw.getContractWrite();
|
|
57
|
-
const config = contractWriteNode.getConfig();
|
|
58
|
-
const protobufData = config.toObject();
|
|
59
|
-
// Convert protobuf data to our custom interface
|
|
60
|
-
const data = {
|
|
61
|
-
contractAddress: protobufData.contractAddress,
|
|
62
|
-
contractAbi: config.getContractAbiList().map(value => convertProtobufValueToJs(value)),
|
|
63
|
-
methodCalls: protobufData.methodCallsList?.map((call) => ({
|
|
64
|
-
methodName: call.methodName,
|
|
65
|
-
methodParams: call.methodParamsList || [],
|
|
66
|
-
// Note: applyToFields is not supported for ContractWrite nodes in protobuf
|
|
67
|
-
// callData is optional, only include if present
|
|
68
|
-
...(call.callData && { callData: call.callData }),
|
|
69
|
-
})) || [],
|
|
70
|
-
};
|
|
71
|
-
// Include isSimulated if present in protobuf
|
|
72
|
-
if (protobufData.isSimulated !== undefined) {
|
|
73
|
-
data.isSimulated = protobufData.isSimulated;
|
|
74
|
-
}
|
|
75
|
-
return new ContractWriteNode({
|
|
76
|
-
...obj,
|
|
77
|
-
type: NodeType.ContractWrite,
|
|
78
|
-
data: data,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
toRequest() {
|
|
82
|
-
const request = new avs_pb.TaskNode();
|
|
83
|
-
request.setId(this.id);
|
|
84
|
-
request.setName(this.name);
|
|
85
|
-
request.setType(avs_pb.NodeType.NODE_TYPE_CONTRACT_WRITE);
|
|
86
|
-
const node = ContractWriteNode.createProtobufNode(this.data);
|
|
87
|
-
request.setContractWrite(node);
|
|
88
|
-
return request;
|
|
89
|
-
}
|
|
90
|
-
static fromOutputData(outputData) {
|
|
91
|
-
const contractWriteOutput = outputData.getContractWrite();
|
|
92
|
-
if (!contractWriteOutput)
|
|
93
|
-
return null;
|
|
94
|
-
// ContractWrite decoded events are stored in data field (flattened object format)
|
|
95
|
-
// This contains parsed receipt logs/events, similar to ContractRead format
|
|
96
|
-
const dataValue = contractWriteOutput.getData();
|
|
97
|
-
// Convert protobuf Value to JavaScript object (decoded events object)
|
|
98
|
-
// Return empty object if no events were decoded from transaction receipts
|
|
99
|
-
return dataValue ? convertProtobufValueToJs(dataValue) : {};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
export default ContractWriteNode;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { CustomCodeNodeProps, Lang } from "@avaprotocol/types";
|
|
4
|
-
declare class CustomCodeNode extends Node {
|
|
5
|
-
constructor(props: CustomCodeNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf CustomCodeNode from config data
|
|
8
|
-
* @param configData - The configuration data for the custom code node
|
|
9
|
-
* @returns Configured avs_pb.CustomCodeNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: {
|
|
12
|
-
lang: Lang;
|
|
13
|
-
source: string;
|
|
14
|
-
}): avs_pb.CustomCodeNode;
|
|
15
|
-
static fromResponse(raw: avs_pb.TaskNode): CustomCodeNode;
|
|
16
|
-
toRequest(): avs_pb.TaskNode;
|
|
17
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
18
|
-
}
|
|
19
|
-
export default CustomCodeNode;
|
|
20
|
-
//# sourceMappingURL=customCode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAGL,mBAAmB,EAEnB,IAAI,EAEL,MAAM,oBAAoB,CAAC;AAK5B,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE;QACpC,IAAI,EAAE,IAAI,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,MAAM,CAAC,cAAc;IAazB,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IA2BzD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAgB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAqBrE;AAED,eAAe,cAAc,CAAC"}
|