@avaprotocol/sdk-js 2.6.2 → 2.6.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 +8 -0
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/dist/models/node/filter.d.ts +1 -1
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +5 -14
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +5 -1
- package/package.json +2 -2
- 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/index.d.ts +0 -351
- package/dist/models/edge.d.ts +0 -12
- package/dist/models/execution.d.ts +0 -20
- package/dist/models/node/branch.d.ts +0 -11
- package/dist/models/node/contractRead.d.ts +0 -17
- package/dist/models/node/contractWrite.d.ts +0 -17
- package/dist/models/node/customCode.d.ts +0 -20
- package/dist/models/node/ethTransfer.d.ts +0 -20
- package/dist/models/node/factory.d.ts +0 -23
- package/dist/models/node/graphqlQuery.d.ts +0 -21
- package/dist/models/node/interface.d.ts +0 -20
- package/dist/models/node/loop.d.ts +0 -15
- package/dist/models/node/restApi.d.ts +0 -22
- package/dist/models/secret.d.ts +0 -16
- package/dist/models/step.d.ts +0 -27
- package/dist/models/trigger/block.d.ts +0 -22
- package/dist/models/trigger/cron.d.ts +0 -23
- package/dist/models/trigger/event.d.ts +0 -22
- package/dist/models/trigger/factory.d.ts +0 -27
- package/dist/models/trigger/fixedTime.d.ts +0 -23
- package/dist/models/trigger/interface.d.ts +0 -19
- package/dist/models/trigger/manual.d.ts +0 -16
- package/dist/models/workflow.d.ts +0 -47
- package/dist/utils.d.ts +0 -72
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -15756,6 +15756,9 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
15756
15756
|
query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
|
|
15757
15757
|
}
|
|
15758
15758
|
if (queryData.contractAbi) {
|
|
15759
|
+
if (!Array.isArray(queryData.contractAbi)) {
|
|
15760
|
+
throw new Error("contractAbi must be an array of ABI elements");
|
|
15761
|
+
}
|
|
15759
15762
|
const abiValueList = queryData.contractAbi.map((item) => {
|
|
15760
15763
|
const value = new google_protobuf_struct_pb.Value();
|
|
15761
15764
|
value.setStructValue(google_protobuf_struct_pb.Struct.fromJavaScript(item));
|
|
@@ -16673,15 +16676,12 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
16673
16676
|
throw new Error("FilterNode output data.getData() is missing");
|
|
16674
16677
|
}
|
|
16675
16678
|
const result = anyData.toJavaScript();
|
|
16676
|
-
if (
|
|
16677
|
-
return result
|
|
16679
|
+
if (Array.isArray(result)) {
|
|
16680
|
+
return result;
|
|
16678
16681
|
}
|
|
16679
16682
|
if (result && typeof result === "object" && !Array.isArray(result) && result.data && Array.isArray(result.data)) {
|
|
16680
16683
|
return result.data;
|
|
16681
16684
|
}
|
|
16682
|
-
if (Array.isArray(result)) {
|
|
16683
|
-
return result;
|
|
16684
|
-
}
|
|
16685
16685
|
throw new Error(
|
|
16686
16686
|
"FilterNode output data does not contain expected data structure"
|
|
16687
16687
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -15736,6 +15736,9 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
15736
15736
|
query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
|
|
15737
15737
|
}
|
|
15738
15738
|
if (queryData.contractAbi) {
|
|
15739
|
+
if (!Array.isArray(queryData.contractAbi)) {
|
|
15740
|
+
throw new Error("contractAbi must be an array of ABI elements");
|
|
15741
|
+
}
|
|
15739
15742
|
const abiValueList = queryData.contractAbi.map((item) => {
|
|
15740
15743
|
const value = new google_protobuf_struct_pb.Value();
|
|
15741
15744
|
value.setStructValue(google_protobuf_struct_pb.Struct.fromJavaScript(item));
|
|
@@ -16675,15 +16678,12 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
16675
16678
|
throw new Error("FilterNode output data.getData() is missing");
|
|
16676
16679
|
}
|
|
16677
16680
|
const result = anyData.toJavaScript();
|
|
16678
|
-
if (
|
|
16679
|
-
return result
|
|
16681
|
+
if (Array.isArray(result)) {
|
|
16682
|
+
return result;
|
|
16680
16683
|
}
|
|
16681
16684
|
if (result && typeof result === "object" && !Array.isArray(result) && result.data && Array.isArray(result.data)) {
|
|
16682
16685
|
return result.data;
|
|
16683
16686
|
}
|
|
16684
|
-
if (Array.isArray(result)) {
|
|
16685
|
-
return result;
|
|
16686
|
-
}
|
|
16687
16687
|
throw new Error(
|
|
16688
16688
|
"FilterNode output data does not contain expected data structure"
|
|
16689
16689
|
);
|
|
@@ -5,7 +5,7 @@ declare class FilterNode extends Node {
|
|
|
5
5
|
constructor(props: FilterNodeProps);
|
|
6
6
|
static fromResponse(raw: avs_pb.TaskNode): FilterNode;
|
|
7
7
|
toRequest(): avs_pb.TaskNode;
|
|
8
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp):
|
|
8
|
+
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown[];
|
|
9
9
|
}
|
|
10
10
|
export default FilterNode;
|
|
11
11
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAGL,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAM5B,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAWrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAiB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAGL,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAM5B,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAWrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAiB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,OAAO,EAAE;CAoC3E;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -36,18 +36,13 @@ class FilterNode extends Node {
|
|
|
36
36
|
if (!anyData) {
|
|
37
37
|
throw new Error("FilterNode output data.getData() is missing");
|
|
38
38
|
}
|
|
39
|
-
// The data is now directly a Value
|
|
39
|
+
// The data is now directly a Value containing the filtered array
|
|
40
40
|
const result = anyData.toJavaScript();
|
|
41
|
-
//
|
|
42
|
-
if (result
|
|
43
|
-
|
|
44
|
-
!Array.isArray(result) &&
|
|
45
|
-
result.data &&
|
|
46
|
-
result.data.data &&
|
|
47
|
-
Array.isArray(result.data.data)) {
|
|
48
|
-
return result.data.data;
|
|
41
|
+
// If result is already an array, return it directly (this should be the normal case now)
|
|
42
|
+
if (Array.isArray(result)) {
|
|
43
|
+
return result;
|
|
49
44
|
}
|
|
50
|
-
//
|
|
45
|
+
// Fallback: if result is an object with data field
|
|
51
46
|
if (result &&
|
|
52
47
|
typeof result === "object" &&
|
|
53
48
|
!Array.isArray(result) &&
|
|
@@ -55,10 +50,6 @@ class FilterNode extends Node {
|
|
|
55
50
|
Array.isArray(result.data)) {
|
|
56
51
|
return result.data;
|
|
57
52
|
}
|
|
58
|
-
// If result is already an array, return it directly
|
|
59
|
-
if (Array.isArray(result)) {
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
53
|
throw new Error("FilterNode output data does not contain expected data structure");
|
|
63
54
|
}
|
|
64
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EAIlB,MAAM,oBAAoB,CAAC;AAkD5B,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EAIlB,MAAM,oBAAoB,CAAC;AAkD5B,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IA6G/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IAwF1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CA0B9D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -86,8 +86,12 @@ class EventTrigger extends Trigger {
|
|
|
86
86
|
if (queryData.maxEventsPerBlock !== undefined) {
|
|
87
87
|
query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
|
|
88
88
|
}
|
|
89
|
-
// Set contractAbi if provided
|
|
89
|
+
// Set contractAbi if provided - must be an array like ContractRead
|
|
90
90
|
if (queryData.contractAbi) {
|
|
91
|
+
// Strictly require array format (no string support)
|
|
92
|
+
if (!Array.isArray(queryData.contractAbi)) {
|
|
93
|
+
throw new Error('contractAbi must be an array of ABI elements');
|
|
94
|
+
}
|
|
91
95
|
// Convert array to protobuf Value list
|
|
92
96
|
const abiValueList = queryData.contractAbi.map(item => {
|
|
93
97
|
const value = new google_protobuf_struct_pb.Value();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepare": "node ../../scripts/prepare-package.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@avaprotocol/types": "^2.4.
|
|
34
|
+
"@avaprotocol/types": "^2.4.3",
|
|
35
35
|
"@grpc/grpc-js": "^1.11.3",
|
|
36
36
|
"@grpc/proto-loader": "^0.7.13",
|
|
37
37
|
"dotenv": "^16.4.5",
|
package/dist/auth.d.ts
DELETED
package/dist/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,EAAE,SAAS,MAAM,EAAE,UAAU,IAAI,EAAE,WAAW,IAAI,KAAG,MAUxG,CAAA"}
|
package/dist/auth.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const getKeyRequestMessage = (chainId, address, issuedAt, expiredAt) => {
|
|
2
|
-
return `Please sign the below text for ownership verification.
|
|
3
|
-
|
|
4
|
-
URI: https://app.avaprotocol.org
|
|
5
|
-
Chain ID: ${chainId}
|
|
6
|
-
Version: 1
|
|
7
|
-
Issued At: ${issuedAt.toISOString()}
|
|
8
|
-
Expire At: ${expiredAt.toISOString()}
|
|
9
|
-
Wallet: ${address}`;
|
|
10
|
-
};
|
package/dist/config.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Environment } from "@avaprotocol/types";
|
|
2
|
-
export declare const DEFAULT_JWT_EXPIRATION: number;
|
|
3
|
-
interface Config {
|
|
4
|
-
AVS_RPC_URL: string;
|
|
5
|
-
}
|
|
6
|
-
declare const configs: Record<Environment, Config>;
|
|
7
|
-
export declare function getRpcEndpoint(env: Environment): string;
|
|
8
|
-
export { configs };
|
|
9
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/index.d.ts
DELETED
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "@grpc/grpc-js";
|
|
2
|
-
import { AggregatorClient } from "@/grpc_codegen/avs_grpc_pb";
|
|
3
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
4
|
-
import Workflow from "./models/workflow";
|
|
5
|
-
import Edge from "./models/edge";
|
|
6
|
-
import Execution from "./models/execution";
|
|
7
|
-
import Step from "./models/step";
|
|
8
|
-
import NodeFactory from "./models/node/factory";
|
|
9
|
-
import TriggerFactory from "./models/trigger/factory";
|
|
10
|
-
import Secret from "./models/secret";
|
|
11
|
-
import { type WorkflowProps, type GetKeyResponse, type RequestOptions, type ClientOption, type SmartWallet, type GetWalletRequest, type GetExecutionsOptions, type GetWorkflowsOptions, type GetSignatureFormatResponse, type RunNodeWithInputsRequest, type RunNodeWithInputsResponse, type RunTriggerRequest, type RunTriggerResponse, type SecretProps, type PageInfo, type GetSecretsOptions, type SecretOptions, type TriggerDataProps, type SimulateWorkflowRequest, type ExecutionProps, type GetTokenMetadataRequest, type GetTokenMetadataResponse, type TimeoutConfig, type CreateSecretResponse, type UpdateSecretResponse, type DeleteSecretResponse, type CancelTaskResponse, type DeleteTaskResponse, type GetExecutionStatsResponse, type GetExecutionStatsOptions } from "@avaprotocol/types";
|
|
12
|
-
import { ExecutionStatus } from "@/grpc_codegen/avs_pb";
|
|
13
|
-
import { cleanGrpcErrorMessage } from "./utils";
|
|
14
|
-
declare class BaseClient {
|
|
15
|
-
readonly endpoint: string;
|
|
16
|
-
readonly rpcClient: AggregatorClient;
|
|
17
|
-
protected metadata: Metadata;
|
|
18
|
-
protected factoryAddress?: string;
|
|
19
|
-
protected authKey?: string;
|
|
20
|
-
protected timeoutConfig: TimeoutConfig;
|
|
21
|
-
constructor(opts: ClientOption);
|
|
22
|
-
/**
|
|
23
|
-
* Set default timeout configuration for all requests
|
|
24
|
-
* @param config - The timeout configuration
|
|
25
|
-
*/
|
|
26
|
-
setTimeoutConfig(config: TimeoutConfig): void;
|
|
27
|
-
/**
|
|
28
|
-
* Get the current timeout configuration
|
|
29
|
-
* @returns {TimeoutConfig} - The current timeout configuration
|
|
30
|
-
*/
|
|
31
|
-
getTimeoutConfig(): TimeoutConfig;
|
|
32
|
-
/**
|
|
33
|
-
* Send a fast gRPC request using FAST preset (5s timeout, 2 retries)
|
|
34
|
-
* @param method - The method name to call
|
|
35
|
-
* @param request - The request object
|
|
36
|
-
* @param options - Request options
|
|
37
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
38
|
-
*/
|
|
39
|
-
protected sendFastRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Send a slow gRPC request using SLOW preset (2min timeout, 2 retries)
|
|
42
|
-
* @param method - The method name to call
|
|
43
|
-
* @param request - The request object
|
|
44
|
-
* @param options - Request options
|
|
45
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
46
|
-
*/
|
|
47
|
-
protected sendSlowRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
48
|
-
/**
|
|
49
|
-
* Send a no-retry gRPC request using NO_RETRY preset (30s timeout, no retries)
|
|
50
|
-
* @param method - The method name to call
|
|
51
|
-
* @param request - The request object
|
|
52
|
-
* @param options - Request options
|
|
53
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
54
|
-
*/
|
|
55
|
-
protected sendNoRetryRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
56
|
-
/**
|
|
57
|
-
* Check if the auth key is valid by decoding the JWT token and checking the expiration
|
|
58
|
-
* @param key - The auth key
|
|
59
|
-
* @returns {boolean} - Whether the auth key is valid
|
|
60
|
-
*/
|
|
61
|
-
isAuthKeyValid(key: string): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Get the signature format from the server
|
|
64
|
-
* @param wallet - The wallet address
|
|
65
|
-
* @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
|
|
66
|
-
*/
|
|
67
|
-
getSignatureFormat(wallet: string): Promise<GetSignatureFormatResponse>;
|
|
68
|
-
/**
|
|
69
|
-
* The API key could retrieve a wallet's authKey by skipping its signature verification
|
|
70
|
-
* @param message - The message to sign, obtained from getSignatureFormat
|
|
71
|
-
* @param apiKey - The API key used instead of a signature
|
|
72
|
-
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
73
|
-
*/
|
|
74
|
-
authWithAPIKey({ message, apiKey, }: {
|
|
75
|
-
message: string;
|
|
76
|
-
apiKey: string;
|
|
77
|
-
}): Promise<GetKeyResponse>;
|
|
78
|
-
/**
|
|
79
|
-
* Getting an authKey from the server by verifying the signature of an EOA wallet
|
|
80
|
-
* @param message - The message to sign, obtained from getSignatureFormat
|
|
81
|
-
* @param signature - The signature of the message
|
|
82
|
-
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
83
|
-
*/
|
|
84
|
-
authWithSignature({ message, signature, }: {
|
|
85
|
-
message: string;
|
|
86
|
-
signature: string;
|
|
87
|
-
}): Promise<GetKeyResponse>;
|
|
88
|
-
/**
|
|
89
|
-
* The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
|
|
90
|
-
* The authKey can be overridden at the request level by request options
|
|
91
|
-
* @param authKey - The auth key
|
|
92
|
-
*/
|
|
93
|
-
setAuthKey(authKey: string | undefined): void;
|
|
94
|
-
/**
|
|
95
|
-
* Get the auth key if it's set in the client
|
|
96
|
-
* @returns {string | undefined} - The auth key
|
|
97
|
-
*/
|
|
98
|
-
getAuthKey(): string | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Set the factory address of smart wallets for the client
|
|
101
|
-
* @param address - The factory address
|
|
102
|
-
*/
|
|
103
|
-
setFactoryAddress(address: string): void;
|
|
104
|
-
/**
|
|
105
|
-
* Get the factory address if it's set in the client
|
|
106
|
-
* @returns {string | undefined} - The factory address
|
|
107
|
-
*/
|
|
108
|
-
getFactoryAddress(): string | undefined;
|
|
109
|
-
/**
|
|
110
|
-
* Send a gRPC request with authentication, timeout support, and error handling
|
|
111
|
-
* @param method - The method name to call
|
|
112
|
-
* @param request - The request object
|
|
113
|
-
* @param options - Request options including timeout configuration
|
|
114
|
-
* @returns {Promise<TResponse>} - The response from the server
|
|
115
|
-
*/
|
|
116
|
-
protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
117
|
-
}
|
|
118
|
-
declare class Client extends BaseClient {
|
|
119
|
-
constructor(config: ClientOption);
|
|
120
|
-
/**
|
|
121
|
-
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
122
|
-
* @param {RequestOptions} options - Request options
|
|
123
|
-
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
124
|
-
*/
|
|
125
|
-
getWallets(options?: RequestOptions): Promise<SmartWallet[]>;
|
|
126
|
-
/**
|
|
127
|
-
* Add a new smart wallet address to the wallet list
|
|
128
|
-
* @param {string} salt - The salt for the wallet
|
|
129
|
-
* @param {string} factoryAddress - Factory address for the wallet; if not provided, the address stored in the client will be used
|
|
130
|
-
* @param {RequestOptions} options - Request options
|
|
131
|
-
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
132
|
-
*/
|
|
133
|
-
getWallet({ salt, factoryAddress }: GetWalletRequest, options?: RequestOptions): Promise<SmartWallet>;
|
|
134
|
-
/**
|
|
135
|
-
* Set wallet properties including hiding/unhiding a wallet
|
|
136
|
-
* @param {GetWalletRequest} walletRequest - The wallet request containing salt and optional factory address
|
|
137
|
-
* @param {object} options - Options for the wallet
|
|
138
|
-
* @param {boolean} options.isHidden - Whether the wallet should be hidden
|
|
139
|
-
* @param {RequestOptions} requestOptions - Request options
|
|
140
|
-
* @returns {Promise<SmartWallet>} - The updated SmartWallet object
|
|
141
|
-
*/
|
|
142
|
-
setWallet({ salt, factoryAddress }: GetWalletRequest, { isHidden }: {
|
|
143
|
-
isHidden: boolean;
|
|
144
|
-
}, requestOptions?: RequestOptions): Promise<SmartWallet>;
|
|
145
|
-
/**
|
|
146
|
-
* Submit a workflow to the AVS server; once the workflow is submitted, it cannot be modified
|
|
147
|
-
* @param {Workflow} workflow - Workflow object to submit
|
|
148
|
-
* @param {RequestOptions} options - Request options
|
|
149
|
-
* @returns {Promise<string>} - The Id of the submitted workflow
|
|
150
|
-
*/
|
|
151
|
-
submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
|
|
152
|
-
createWorkflow(props: WorkflowProps): Workflow;
|
|
153
|
-
/**
|
|
154
|
-
* Get the list of workflows for multiple addresses
|
|
155
|
-
* @param {string[]} addresses - The list of addresses
|
|
156
|
-
* @param {GetWorkflowsOptions} options - Request options
|
|
157
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
158
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
159
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
160
|
-
* @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
|
|
161
|
-
* @param {boolean} [options.includeEdges] - Include task edges (expensive field)
|
|
162
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
163
|
-
* @returns {Promise<{ items: WorkflowProps[]; pageInfo: PageInfo }>} - The list of WorkflowProps objects with nested pagination metadata
|
|
164
|
-
*/
|
|
165
|
-
getWorkflows(addresses: string[], options?: GetWorkflowsOptions): Promise<{
|
|
166
|
-
items: WorkflowProps[];
|
|
167
|
-
pageInfo: PageInfo;
|
|
168
|
-
}>;
|
|
169
|
-
/**
|
|
170
|
-
* Get the count of workflows for multiple addresses
|
|
171
|
-
* @param addresses - The list of addresses
|
|
172
|
-
* @param options - Request options
|
|
173
|
-
* @returns {Promise<number>} - The count of workflows
|
|
174
|
-
*/
|
|
175
|
-
getWorkflowCount(addresses: string[], options?: RequestOptions): Promise<number>;
|
|
176
|
-
/**
|
|
177
|
-
* Get the list of executions for multiple workflows
|
|
178
|
-
* @param {string[]} workflows - The list of workflow ids to fetch execution for
|
|
179
|
-
* @param {GetExecutionsOptions} options - Request options
|
|
180
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
181
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
182
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
183
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
184
|
-
* @returns {Promise<{ items: ExecutionProps[]; pageInfo: PageInfo }>} - The list of ExecutionProps objects with nested pagination metadata
|
|
185
|
-
*/
|
|
186
|
-
getExecutions(workflows: string[], options?: GetExecutionsOptions): Promise<{
|
|
187
|
-
items: ExecutionProps[];
|
|
188
|
-
pageInfo: PageInfo;
|
|
189
|
-
}>;
|
|
190
|
-
/**
|
|
191
|
-
* Get a specific execution by id
|
|
192
|
-
* @param {string} workflowId - The workflow id (taskId)
|
|
193
|
-
* @param {string} executionId - The execution id
|
|
194
|
-
* @param {RequestOptions} options - Request options
|
|
195
|
-
* @returns {Promise<ExecutionProps>} - The ExecutionProps object
|
|
196
|
-
*/
|
|
197
|
-
getExecution(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionProps>;
|
|
198
|
-
/**
|
|
199
|
-
* Get the count of executions for multiple workflows
|
|
200
|
-
* @param workflows - The list of workflow ids
|
|
201
|
-
* @param options - Request options
|
|
202
|
-
* @returns {Promise<number>} - The count of executions
|
|
203
|
-
*/
|
|
204
|
-
getExecutionCount(workflows: string[], options?: RequestOptions): Promise<number>;
|
|
205
|
-
/**
|
|
206
|
-
* Get execution statistics for a specified time period
|
|
207
|
-
* @param {GetExecutionStatsOptions} options - Request options
|
|
208
|
-
* @param {string[]} [options.workflowIds] - Optional array of workflow IDs
|
|
209
|
-
* @param {number} [options.days] - Number of days to look back (default: 7)
|
|
210
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
211
|
-
* @returns {Promise<GetExecutionStatsResponse>} - Execution statistics
|
|
212
|
-
*/
|
|
213
|
-
getExecutionStats(options?: GetExecutionStatsOptions): Promise<GetExecutionStatsResponse>;
|
|
214
|
-
/**
|
|
215
|
-
* Get the status of an execution
|
|
216
|
-
* @param {string} workflowId - The workflow id (taskId)
|
|
217
|
-
* @param {string} executionId - The execution id
|
|
218
|
-
* @param {RequestOptions} options - Request options
|
|
219
|
-
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
220
|
-
*/
|
|
221
|
-
getExecutionStatus(workflowId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus>;
|
|
222
|
-
/**
|
|
223
|
-
* Get a workflow by id
|
|
224
|
-
* @param {string} id - The workflow id
|
|
225
|
-
* @param {RequestOptions} options - Request options
|
|
226
|
-
* @returns {Promise<Workflow>} - The Workflow object
|
|
227
|
-
*/
|
|
228
|
-
getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
|
|
229
|
-
/**
|
|
230
|
-
* Trigger a workflow with the new flattened trigger data structure
|
|
231
|
-
* @param {Object} params - The trigger parameters
|
|
232
|
-
* @param {string} params.id - The workflow id
|
|
233
|
-
* @param {TriggerDataProps} params.triggerData - The trigger data
|
|
234
|
-
* @param {boolean} params.isBlocking - Whether to block until execution completes
|
|
235
|
-
* @param {RequestOptions} options - Request options
|
|
236
|
-
* @returns {Promise<avs_pb.TriggerTaskResp.AsObject>} - The response from triggering the workflow
|
|
237
|
-
*/
|
|
238
|
-
triggerWorkflow({ id, triggerData, isBlocking, }: {
|
|
239
|
-
id: string;
|
|
240
|
-
triggerData: TriggerDataProps;
|
|
241
|
-
isBlocking?: boolean;
|
|
242
|
-
}, options?: RequestOptions): Promise<avs_pb.TriggerTaskResp.AsObject>;
|
|
243
|
-
/**
|
|
244
|
-
* Cancel a workflow
|
|
245
|
-
* @param {string} id - The workflow id
|
|
246
|
-
* @param {RequestOptions} options - Request options
|
|
247
|
-
* @returns {Promise<CancelTaskResponse>} - The response from canceling the workflow
|
|
248
|
-
*/
|
|
249
|
-
cancelWorkflow(id: string, options?: RequestOptions): Promise<CancelTaskResponse>;
|
|
250
|
-
/**
|
|
251
|
-
* Delete a workflow
|
|
252
|
-
* @param {string} id - The workflow id
|
|
253
|
-
* @param {RequestOptions} options - Request options
|
|
254
|
-
* @returns {Promise<DeleteTaskResponse>} - The response from deleting the workflow
|
|
255
|
-
*/
|
|
256
|
-
deleteWorkflow(id: string, options?: RequestOptions): Promise<DeleteTaskResponse>;
|
|
257
|
-
/**
|
|
258
|
-
* Create a new secret
|
|
259
|
-
* @param {string} name - The name of the secret
|
|
260
|
-
* @param {string} value - The value of the secret
|
|
261
|
-
* @param {SecretOptions} [options] - Request options
|
|
262
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
263
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
264
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
265
|
-
* @returns {Promise<CreateSecretResponse>} - Structured response with creation details
|
|
266
|
-
*/
|
|
267
|
-
createSecret(name: string, value: string, options?: SecretOptions): Promise<CreateSecretResponse>;
|
|
268
|
-
/**
|
|
269
|
-
* Update a secret
|
|
270
|
-
* @param {string} name - The name of the secret
|
|
271
|
-
* @param {string} value - The value of the secret
|
|
272
|
-
* @param {SecretOptions} [options] - Request options
|
|
273
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
274
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
275
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
276
|
-
* @returns {Promise<UpdateSecretResponse>} - Structured response with update details
|
|
277
|
-
*/
|
|
278
|
-
updateSecret(name: string, value: string, options?: SecretOptions): Promise<UpdateSecretResponse>;
|
|
279
|
-
/**
|
|
280
|
-
* Get the list of secrets
|
|
281
|
-
* @param {GetSecretsOptions} options - Request options
|
|
282
|
-
* @param {string} [options.workflowId] - Filter secrets by workflow ID
|
|
283
|
-
* @param {string} [options.orgId] - Filter secrets by organization ID
|
|
284
|
-
* @param {string} [options.before] - Get items before this cursor value (for backward pagination)
|
|
285
|
-
* @param {string} [options.after] - Get items after this cursor value (for forward pagination)
|
|
286
|
-
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
287
|
-
* @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
|
|
288
|
-
* @param {boolean} [options.includeCreatedBy] - Include created_by field
|
|
289
|
-
* @param {boolean} [options.includeDescription] - Include description field
|
|
290
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
291
|
-
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
292
|
-
*/
|
|
293
|
-
getSecrets(options?: GetSecretsOptions): Promise<{
|
|
294
|
-
items: SecretProps[];
|
|
295
|
-
pageInfo: PageInfo;
|
|
296
|
-
}>;
|
|
297
|
-
/**
|
|
298
|
-
* Delete a secret
|
|
299
|
-
* @param {string} name - The name of the secret
|
|
300
|
-
* @param {SecretOptions} [options] - Request options
|
|
301
|
-
* @param {string} [options.workflowId] - The workflow ID to associate the secret with
|
|
302
|
-
* @param {string} [options.orgId] - The organization ID to associate the secret with
|
|
303
|
-
* @param {string} [options.authKey] - The auth key for the request
|
|
304
|
-
* @returns {Promise<DeleteSecretResponse>} - Structured response with deletion details
|
|
305
|
-
*/
|
|
306
|
-
deleteSecret(name: string, options?: SecretOptions): Promise<DeleteSecretResponse>;
|
|
307
|
-
/**
|
|
308
|
-
* Run a node with inputs for testing purposes
|
|
309
|
-
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
310
|
-
* @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
|
|
311
|
-
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
312
|
-
* @param {Record<string, any>} params.inputVariables - Variables to pass to the node
|
|
313
|
-
* @param {RequestOptions} options - Request options
|
|
314
|
-
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
315
|
-
*/
|
|
316
|
-
runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
|
|
317
|
-
/**
|
|
318
|
-
* Run a trigger for testing purposes
|
|
319
|
-
* @param {RunTriggerRequest} params - The parameters for running the trigger
|
|
320
|
-
* @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
|
|
321
|
-
* @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
|
|
322
|
-
* @param {RequestOptions} options - Request options
|
|
323
|
-
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
324
|
-
*/
|
|
325
|
-
runTrigger({ triggerType, triggerConfig }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
|
|
326
|
-
/**
|
|
327
|
-
* Simulate a complete task execution including trigger and all workflow nodes
|
|
328
|
-
* @param {SimulateWorkflowRequest} params - The parameters for simulating the task
|
|
329
|
-
* @param {Record<string, any>} params.trigger - The trigger configuration
|
|
330
|
-
* @param {Array<Record<string, any>>} params.nodes - The workflow nodes
|
|
331
|
-
* @param {Array<Record<string, any>>} params.edges - The workflow edges
|
|
332
|
-
* @param {Record<string, any>} params.inputVariables - Input variables for the simulation
|
|
333
|
-
* @param {RequestOptions} options - Request options
|
|
334
|
-
* @returns {Promise<ExecutionProps>} - The response from simulating the task
|
|
335
|
-
*/
|
|
336
|
-
simulateWorkflow({ trigger, nodes, edges, inputVariables }: SimulateWorkflowRequest, options?: RequestOptions): Promise<ExecutionProps>;
|
|
337
|
-
/**
|
|
338
|
-
* Get token metadata by contract address
|
|
339
|
-
* @param {GetTokenMetadataRequest} params - The parameters for getting token metadata
|
|
340
|
-
* @param {string} params.address - The contract address to look up
|
|
341
|
-
* @param {RequestOptions} options - Request options
|
|
342
|
-
* @returns {Promise<GetTokenMetadataResponse>} - The response containing token metadata
|
|
343
|
-
*/
|
|
344
|
-
getTokenMetadata({ address }: GetTokenMetadataRequest, options?: RequestOptions): Promise<GetTokenMetadataResponse>;
|
|
345
|
-
}
|
|
346
|
-
export * from "./models/node/factory";
|
|
347
|
-
export * from "./models/trigger/factory";
|
|
348
|
-
export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, Secret, cleanGrpcErrorMessage, };
|
|
349
|
-
export type { TokenMetadata, GetTokenMetadataRequest, GetTokenMetadataResponse, TokenSource, } from "@avaprotocol/types";
|
|
350
|
-
export { TimeoutPresets, type TimeoutConfig, type TimeoutError, } from "@avaprotocol/types";
|
|
351
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/models/edge.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { EdgeProps } from "@avaprotocol/types";
|
|
3
|
-
declare class Edge implements EdgeProps {
|
|
4
|
-
id: string;
|
|
5
|
-
source: string;
|
|
6
|
-
target: string;
|
|
7
|
-
constructor(edge: EdgeProps);
|
|
8
|
-
static fromResponse(edge: avs_pb.TaskEdge): Edge;
|
|
9
|
-
toRequest(): avs_pb.TaskEdge;
|
|
10
|
-
}
|
|
11
|
-
export default Edge;
|
|
12
|
-
//# sourceMappingURL=edge.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { ExecutionProps } from "@avaprotocol/types";
|
|
3
|
-
import Step from "./step";
|
|
4
|
-
declare class Execution implements ExecutionProps {
|
|
5
|
-
id: string;
|
|
6
|
-
startAt: number;
|
|
7
|
-
endAt: number;
|
|
8
|
-
success: boolean;
|
|
9
|
-
error: string;
|
|
10
|
-
steps: Step[];
|
|
11
|
-
constructor(props: ExecutionProps);
|
|
12
|
-
/**
|
|
13
|
-
* Convert Execution instance to plain object (ExecutionProps)
|
|
14
|
-
* This is useful for serialization, especially with Next.js Server Components
|
|
15
|
-
*/
|
|
16
|
-
toJson(): ExecutionProps;
|
|
17
|
-
static fromResponse(execution: avs_pb.Execution): Execution;
|
|
18
|
-
}
|
|
19
|
-
export default Execution;
|
|
20
|
-
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -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,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,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): unknown[] | null;
|
|
15
|
-
}
|
|
16
|
-
export default ContractWriteNode;
|
|
17
|
-
//# sourceMappingURL=contractWrite.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { CustomCodeLang, CustomCodeNodeProps } 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: CustomCodeLang | string | number;
|
|
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,20 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { ETHTransferNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class ETHTransferNode extends Node {
|
|
5
|
-
constructor(props: ETHTransferNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf ETHTransferNode from config data
|
|
8
|
-
* @param configData - The configuration data for the ETH transfer node
|
|
9
|
-
* @returns Configured avs_pb.ETHTransferNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: {
|
|
12
|
-
destination: string;
|
|
13
|
-
amount: string;
|
|
14
|
-
}): avs_pb.ETHTransferNode;
|
|
15
|
-
static fromResponse(raw: avs_pb.TaskNode): ETHTransferNode;
|
|
16
|
-
toRequest(): avs_pb.TaskNode;
|
|
17
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
18
|
-
}
|
|
19
|
-
export default ETHTransferNode;
|
|
20
|
-
//# sourceMappingURL=ethTransfer.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import ContractWriteNode from "./contractWrite";
|
|
3
|
-
import CustomCodeNode from "./customCode";
|
|
4
|
-
import GraphQLQueryNode from "./graphqlQuery";
|
|
5
|
-
import Node from "./interface";
|
|
6
|
-
import RestAPINode from "./restApi";
|
|
7
|
-
import ContractReadNode from "./contractRead";
|
|
8
|
-
import ETHTransferNode from "./ethTransfer";
|
|
9
|
-
import BranchNode from "./branch";
|
|
10
|
-
import FilterNode from "./filter";
|
|
11
|
-
import LoopNode from "./loop";
|
|
12
|
-
import { ContractWriteNodeData, ContractReadNodeData, BranchNodeData, ETHTransferNodeData, GraphQLQueryNodeData, RestAPINodeData, CustomCodeNodeData, FilterNodeData, LoopNodeData, NodeProps, ContractWriteNodeProps, ContractReadNodeProps, BranchNodeProps, ETHTransferNodeProps, GraphQLQueryNodeProps, RestAPINodeProps, CustomCodeNodeProps, FilterNodeProps, LoopNodeProps } from "@avaprotocol/types";
|
|
13
|
-
declare class NodeFactory {
|
|
14
|
-
static create(props: NodeProps): Node;
|
|
15
|
-
static createNodes(props: NodeProps[]): Node[];
|
|
16
|
-
static fromResponse(raw: avs_pb.TaskNode): Node;
|
|
17
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
18
|
-
}
|
|
19
|
-
export default NodeFactory;
|
|
20
|
-
export { Node, ContractWriteNode, ContractReadNode, BranchNode, ETHTransferNode, GraphQLQueryNode, RestAPINode, CustomCodeNode, FilterNode, LoopNode, };
|
|
21
|
-
export type { ContractWriteNodeData, ContractReadNodeData, BranchNodeData, ETHTransferNodeData, GraphQLQueryNodeData, RestAPINodeData, CustomCodeNodeData, FilterNodeData, LoopNodeData, };
|
|
22
|
-
export type { NodeProps, ContractWriteNodeProps, ContractReadNodeProps, BranchNodeProps, ETHTransferNodeProps, GraphQLQueryNodeProps, RestAPINodeProps, CustomCodeNodeProps, FilterNodeProps, LoopNodeProps, };
|
|
23
|
-
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { GraphQLQueryNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class GraphQLQueryNode extends Node {
|
|
5
|
-
constructor(props: GraphQLQueryNodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf GraphQLQueryNode from config data
|
|
8
|
-
* @param configData - The configuration data for the GraphQL query node
|
|
9
|
-
* @returns Configured avs_pb.GraphQLQueryNode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: {
|
|
12
|
-
url: string;
|
|
13
|
-
query: string;
|
|
14
|
-
variablesMap?: Array<[string, string]>;
|
|
15
|
-
}): avs_pb.GraphQLQueryNode;
|
|
16
|
-
static fromResponse(raw: avs_pb.TaskNode): GraphQLQueryNode;
|
|
17
|
-
toRequest(): avs_pb.TaskNode;
|
|
18
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): any;
|
|
19
|
-
}
|
|
20
|
-
export default GraphQLQueryNode;
|
|
21
|
-
//# sourceMappingURL=graphqlQuery.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { NodeType, NodeProps, NodeData } from "@avaprotocol/types";
|
|
3
|
-
export declare function covertNodeTypeToString(status: avs_pb.TaskNode.TaskTypeCase): NodeType;
|
|
4
|
-
export type ProtobufNodeProps = Omit<avs_pb.TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
|
|
5
|
-
data: any;
|
|
6
|
-
};
|
|
7
|
-
export declare const ProtobufNodePropsUtils: {
|
|
8
|
-
getGoStringType: (props: ProtobufNodeProps) => string;
|
|
9
|
-
fromGoStringType: (goStringType: string, baseProps: Omit<ProtobufNodeProps, "type">) => ProtobufNodeProps;
|
|
10
|
-
};
|
|
11
|
-
export default abstract class Node implements NodeProps {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
type: NodeType;
|
|
15
|
-
data: NodeData;
|
|
16
|
-
constructor(props: NodeProps);
|
|
17
|
-
toRequest(): avs_pb.TaskNode;
|
|
18
|
-
static fromResponse(raw: avs_pb.TaskNode): Node;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Node from "./interface";
|
|
3
|
-
import { LoopNodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class LoopNode extends Node {
|
|
5
|
-
constructor(props: LoopNodeProps);
|
|
6
|
-
static fromResponse(raw: avs_pb.TaskNode): LoopNode;
|
|
7
|
-
private static extractRunnerFromProtobuf;
|
|
8
|
-
private static mapExecutionModeFromProtobuf;
|
|
9
|
-
private mapExecutionModeToProtobuf;
|
|
10
|
-
toRequest(): avs_pb.TaskNode;
|
|
11
|
-
private setRunnerOnProtobuf;
|
|
12
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): unknown;
|
|
13
|
-
}
|
|
14
|
-
export default LoopNode;
|
|
15
|
-
//# sourceMappingURL=loop.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import Node from "./interface";
|
|
2
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
3
|
-
import { RestAPINodeProps } from "@avaprotocol/types";
|
|
4
|
-
declare class RestAPINode extends Node {
|
|
5
|
-
constructor(props: RestAPINodeProps);
|
|
6
|
-
/**
|
|
7
|
-
* Create a protobuf RestAPINode from config data
|
|
8
|
-
* @param configData - The configuration data for the REST API node
|
|
9
|
-
* @returns Configured avs_pb.RestAPINode
|
|
10
|
-
*/
|
|
11
|
-
static createProtobufNode(configData: {
|
|
12
|
-
url: string;
|
|
13
|
-
method: string;
|
|
14
|
-
body?: string;
|
|
15
|
-
headers?: Record<string, string>;
|
|
16
|
-
}): avs_pb.RestAPINode;
|
|
17
|
-
static fromResponse(raw: avs_pb.TaskNode): RestAPINode;
|
|
18
|
-
toRequest(): avs_pb.TaskNode;
|
|
19
|
-
static fromOutputData(outputData: avs_pb.RunNodeWithInputsResp): Record<string, unknown> | null;
|
|
20
|
-
}
|
|
21
|
-
export default RestAPINode;
|
|
22
|
-
//# sourceMappingURL=restApi.d.ts.map
|
package/dist/models/secret.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { SecretProps } from "@avaprotocol/types";
|
|
3
|
-
declare class Secret implements SecretProps {
|
|
4
|
-
name: string;
|
|
5
|
-
secret?: string;
|
|
6
|
-
workflowId?: string;
|
|
7
|
-
orgId?: string;
|
|
8
|
-
createdAt?: number;
|
|
9
|
-
updatedAt?: number;
|
|
10
|
-
createdBy?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
constructor(props: SecretProps);
|
|
13
|
-
toRequest(): avs_pb.CreateOrUpdateSecretReq;
|
|
14
|
-
}
|
|
15
|
-
export default Secret;
|
|
16
|
-
//# sourceMappingURL=secret.d.ts.map
|
package/dist/models/step.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { StepProps, OutputDataProps } from "@avaprotocol/types";
|
|
3
|
-
declare class Step implements StepProps {
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
name: string;
|
|
7
|
-
success: boolean;
|
|
8
|
-
error: string;
|
|
9
|
-
log: string;
|
|
10
|
-
inputsList: string[];
|
|
11
|
-
config?: any;
|
|
12
|
-
output: OutputDataProps;
|
|
13
|
-
startAt: number;
|
|
14
|
-
endAt: number;
|
|
15
|
-
constructor(props: StepProps);
|
|
16
|
-
/**
|
|
17
|
-
* Convert Step instance to plain object (StepProps)
|
|
18
|
-
* This is useful for serialization, especially with Next.js Server Components
|
|
19
|
-
*/
|
|
20
|
-
toJson(): StepProps;
|
|
21
|
-
static getOutput(step: avs_pb.Execution.Step): OutputDataProps;
|
|
22
|
-
private static extractOutputData;
|
|
23
|
-
private static getOutputDataCase;
|
|
24
|
-
static fromResponse(step: avs_pb.Execution.Step): Step;
|
|
25
|
-
}
|
|
26
|
-
export default Step;
|
|
27
|
-
//# sourceMappingURL=step.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Trigger from "./interface";
|
|
3
|
-
import { BlockTriggerOutput, BlockTriggerProps } from "@avaprotocol/types";
|
|
4
|
-
declare class BlockTrigger extends Trigger {
|
|
5
|
-
constructor(props: BlockTriggerProps);
|
|
6
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
7
|
-
static fromResponse(raw: avs_pb.TaskTrigger): BlockTrigger;
|
|
8
|
-
/**
|
|
9
|
-
* Convert raw data from runNodeWithInputs response to BlockOutput format
|
|
10
|
-
* @param rawData - The raw data from the gRPC response
|
|
11
|
-
* @returns {BlockTriggerOutput | undefined} - The converted data
|
|
12
|
-
*/
|
|
13
|
-
getOutput(): BlockTriggerOutput | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Extract output data from RunTriggerResp for block triggers
|
|
16
|
-
* @param outputData - The RunTriggerResp containing block trigger output
|
|
17
|
-
* @returns Plain JavaScript object with block trigger data
|
|
18
|
-
*/
|
|
19
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): any;
|
|
20
|
-
}
|
|
21
|
-
export default BlockTrigger;
|
|
22
|
-
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Trigger from "./interface";
|
|
3
|
-
import { CronTriggerOutput, CronTriggerProps } from "@avaprotocol/types";
|
|
4
|
-
declare class CronTrigger extends Trigger {
|
|
5
|
-
constructor(props: CronTriggerProps);
|
|
6
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
7
|
-
static fromResponse(raw: avs_pb.TaskTrigger): CronTrigger;
|
|
8
|
-
/**
|
|
9
|
-
* Convert raw data from runTrigger response to CronOutput format
|
|
10
|
-
* @param rawData - The raw data from the gRPC response
|
|
11
|
-
* @returns {CronTriggerOutput | undefined} - The converted data
|
|
12
|
-
*/
|
|
13
|
-
getOutput(): CronTriggerOutput | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Extract output data from RunTriggerResp for cron triggers
|
|
16
|
-
* Updated to handle timestamp and timestamp_iso instead of epoch
|
|
17
|
-
* @param outputData - The RunTriggerResp containing cron trigger output
|
|
18
|
-
* @returns Plain JavaScript object with cron trigger data
|
|
19
|
-
*/
|
|
20
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): any;
|
|
21
|
-
}
|
|
22
|
-
export default CronTrigger;
|
|
23
|
-
//# sourceMappingURL=cron.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Trigger from "./interface";
|
|
3
|
-
import { EventTriggerOutput, EventTriggerProps } from "@avaprotocol/types";
|
|
4
|
-
declare class EventTrigger extends Trigger {
|
|
5
|
-
constructor(props: EventTriggerProps);
|
|
6
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
7
|
-
static fromResponse(raw: avs_pb.TaskTrigger): EventTrigger;
|
|
8
|
-
/**
|
|
9
|
-
* Convert raw data from runTrigger response to EventOutput format
|
|
10
|
-
* @param rawData - The raw data from the gRPC response
|
|
11
|
-
* @returns {EventTriggerOutput | undefined} - The converted data
|
|
12
|
-
*/
|
|
13
|
-
getOutput(): EventTriggerOutput | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Extract output data from RunTriggerResp for event triggers
|
|
16
|
-
* @param outputData - The RunTriggerResp containing event trigger output
|
|
17
|
-
* @returns Plain JavaScript object with event trigger data
|
|
18
|
-
*/
|
|
19
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): any;
|
|
20
|
-
}
|
|
21
|
-
export default EventTrigger;
|
|
22
|
-
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import BlockTrigger from "./block";
|
|
3
|
-
import CronTrigger from "./cron";
|
|
4
|
-
import EventTrigger from "./event";
|
|
5
|
-
import FixedTimeTrigger from "./fixedTime";
|
|
6
|
-
import ManualTrigger from "./manual";
|
|
7
|
-
import Trigger from "./interface";
|
|
8
|
-
import { TriggerProps, BlockTriggerProps, CronTriggerProps, EventTriggerProps, FixedTimeTriggerProps, ManualTriggerProps } from "@avaprotocol/types";
|
|
9
|
-
declare class TriggerFactory {
|
|
10
|
-
/**
|
|
11
|
-
* Static factory method to create Trigger instances
|
|
12
|
-
* @param props
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
static create(props: TriggerProps): Trigger;
|
|
16
|
-
/**
|
|
17
|
-
* Create an instance of Trigger from AVS getWorkflow or getWorkflows response
|
|
18
|
-
* @param trigger
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
static fromResponse(raw: avs_pb.TaskTrigger): Trigger;
|
|
22
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): any;
|
|
23
|
-
}
|
|
24
|
-
export default TriggerFactory;
|
|
25
|
-
export { Trigger, BlockTrigger, CronTrigger, EventTrigger, FixedTimeTrigger, ManualTrigger, };
|
|
26
|
-
export type { TriggerProps, BlockTriggerProps, CronTriggerProps, EventTriggerProps, FixedTimeTriggerProps, ManualTriggerProps, };
|
|
27
|
-
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Trigger from "./interface";
|
|
3
|
-
import { FixedTimeTriggerOutput, FixedTimeTriggerProps } from "@avaprotocol/types";
|
|
4
|
-
declare class FixedTimeTrigger extends Trigger {
|
|
5
|
-
constructor(props: FixedTimeTriggerProps);
|
|
6
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
7
|
-
static fromResponse(raw: avs_pb.TaskTrigger): FixedTimeTrigger;
|
|
8
|
-
/**
|
|
9
|
-
* Convert raw data from runTrigger response to FixedTimeOutput format
|
|
10
|
-
* @param rawData - The raw data from the gRPC response
|
|
11
|
-
* @returns {FixedTimeTriggerOutput | undefined} - The converted data
|
|
12
|
-
*/
|
|
13
|
-
getOutput(): FixedTimeTriggerOutput | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Extract output data from RunTriggerResp for fixed time triggers
|
|
16
|
-
* Updated to handle timestamp and timestamp_iso instead of epoch
|
|
17
|
-
* @param outputData - The RunTriggerResp containing fixed time trigger output
|
|
18
|
-
* @returns Plain JavaScript object with fixed time trigger data
|
|
19
|
-
*/
|
|
20
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): any;
|
|
21
|
-
}
|
|
22
|
-
export default FixedTimeTrigger;
|
|
23
|
-
//# sourceMappingURL=fixedTime.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { TriggerType, TriggerProps, TriggerData, TriggerOutput } from "@avaprotocol/types";
|
|
3
|
-
export default abstract class Trigger implements TriggerProps {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
type: TriggerType;
|
|
7
|
-
data: TriggerData;
|
|
8
|
-
output?: TriggerOutput;
|
|
9
|
-
/**
|
|
10
|
-
* Create an instance of Trigger from user inputs
|
|
11
|
-
* @param props
|
|
12
|
-
*/
|
|
13
|
-
constructor(props: TriggerProps);
|
|
14
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
15
|
-
static fromResponse(raw: avs_pb.TaskTrigger): Trigger;
|
|
16
|
-
getOutput(): TriggerOutput | undefined;
|
|
17
|
-
toJson(): TriggerProps;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Trigger from "./interface";
|
|
3
|
-
import { ManualTriggerProps } from "@avaprotocol/types";
|
|
4
|
-
declare class ManualTrigger extends Trigger {
|
|
5
|
-
constructor(props: ManualTriggerProps);
|
|
6
|
-
toRequest(): avs_pb.TaskTrigger;
|
|
7
|
-
static fromResponse(raw: avs_pb.TaskTrigger): ManualTrigger;
|
|
8
|
-
/**
|
|
9
|
-
* Extract output data from RunTriggerResp for manual triggers
|
|
10
|
-
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
11
|
-
* @returns The parsed JSON data directly (similar to CustomCode output)
|
|
12
|
-
*/
|
|
13
|
-
static fromOutputData(outputData: avs_pb.RunTriggerResp): unknown;
|
|
14
|
-
}
|
|
15
|
-
export default ManualTrigger;
|
|
16
|
-
//# sourceMappingURL=manual.d.ts.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import Node from "./node/interface";
|
|
3
|
-
import Edge from "./edge";
|
|
4
|
-
import Trigger from "./trigger/interface";
|
|
5
|
-
export declare const DefaultExpiredAt = -1;
|
|
6
|
-
import { WorkflowStatus, WorkflowProps } from "@avaprotocol/types";
|
|
7
|
-
export declare function convertStatusToString(status: avs_pb.TaskStatus): WorkflowStatus;
|
|
8
|
-
declare class Workflow implements WorkflowProps {
|
|
9
|
-
smartWalletAddress: string;
|
|
10
|
-
trigger: Trigger;
|
|
11
|
-
nodes: Node[];
|
|
12
|
-
edges: Edge[];
|
|
13
|
-
startAt: number;
|
|
14
|
-
expiredAt: number;
|
|
15
|
-
maxExecution: number;
|
|
16
|
-
id?: string;
|
|
17
|
-
owner?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
completedAt?: number;
|
|
20
|
-
status?: WorkflowStatus;
|
|
21
|
-
lastRanAt?: number;
|
|
22
|
-
executionCount?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Create an instance of Workflow from user inputs
|
|
25
|
-
* @param props
|
|
26
|
-
*/
|
|
27
|
-
constructor(props: WorkflowProps);
|
|
28
|
-
/**
|
|
29
|
-
* Create an instance of Workflow from AVS getWorkflow response
|
|
30
|
-
* @param res
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
static fromResponse(obj: avs_pb.Task): Workflow;
|
|
34
|
-
/**
|
|
35
|
-
* Create an instance of Workflow with only selected fields
|
|
36
|
-
* @param obj
|
|
37
|
-
*/
|
|
38
|
-
static fromListResponse(obj: avs_pb.Task): Workflow;
|
|
39
|
-
toRequest(): avs_pb.CreateTaskReq;
|
|
40
|
-
/**
|
|
41
|
-
* Convert Workflow instance to plain object (WorkflowProps)
|
|
42
|
-
* This is useful for serialization, especially with Next.js Server Components
|
|
43
|
-
*/
|
|
44
|
-
toJson(): WorkflowProps;
|
|
45
|
-
}
|
|
46
|
-
export default Workflow;
|
|
47
|
-
//# sourceMappingURL=workflow.d.ts.map
|
package/dist/utils.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Value as ProtobufValue } from "google-protobuf/google/protobuf/struct_pb";
|
|
2
|
-
/**
|
|
3
|
-
* Convert a protobuf Value to a JavaScript value
|
|
4
|
-
*
|
|
5
|
-
* **🏆 RECOMMENDED for modern protobuf usage**
|
|
6
|
-
*
|
|
7
|
-
* This is the primary implementation using proper TypeScript types and getKindCase()
|
|
8
|
-
* for the latest protobuf libraries. Use this for all new code.
|
|
9
|
-
*
|
|
10
|
-
* @param value - The protobuf Value to convert
|
|
11
|
-
* @returns The converted JavaScript value
|
|
12
|
-
*/
|
|
13
|
-
export declare function convertProtobufValueToJs(value?: ProtobufValue): any;
|
|
14
|
-
/**
|
|
15
|
-
* Convert a JavaScript value to a protobuf Value
|
|
16
|
-
*
|
|
17
|
-
* Uses proper TypeScript types for modern protobuf usage.
|
|
18
|
-
*
|
|
19
|
-
* @param value - The JavaScript value to convert
|
|
20
|
-
* @returns The protobuf Value object
|
|
21
|
-
*/
|
|
22
|
-
export declare function convertJSValueToProtobuf(value: any): ProtobufValue;
|
|
23
|
-
/**
|
|
24
|
-
* Convert protobuf trigger type string to SDK trigger type string
|
|
25
|
-
*
|
|
26
|
-
* @param protobufType - The protobuf trigger type string (e.g., "TRIGGER_TYPE_MANUAL")
|
|
27
|
-
* @returns The SDK trigger type string (e.g., "manualTrigger")
|
|
28
|
-
*/
|
|
29
|
-
export declare function convertProtobufTriggerTypeToSdk(protobufType: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Convert protobuf node type string to SDK node type string
|
|
32
|
-
*
|
|
33
|
-
* @param protobufType - The protobuf node type string (e.g., "NODE_TYPE_CUSTOM_CODE")
|
|
34
|
-
* @returns The SDK node type string (e.g., "customCode")
|
|
35
|
-
*/
|
|
36
|
-
export declare function convertProtobufNodeTypeToSdk(protobufType: string): string;
|
|
37
|
-
/**
|
|
38
|
-
* Convert protobuf step type string to SDK step type string
|
|
39
|
-
*
|
|
40
|
-
* Automatically detects whether the type is a trigger or node type and converts accordingly.
|
|
41
|
-
*
|
|
42
|
-
* @param protobufType - The protobuf type string (e.g., "TRIGGER_TYPE_MANUAL" or "NODE_TYPE_CUSTOM_CODE")
|
|
43
|
-
* @returns The SDK type string (e.g., "manualTrigger" or "customCode")
|
|
44
|
-
*/
|
|
45
|
-
export declare function convertProtobufStepTypeToSdk(protobufType: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Convert input field from JavaScript object to protobuf Value format
|
|
48
|
-
*
|
|
49
|
-
* Pure utility function for converting trigger/node input data to protobuf format.
|
|
50
|
-
* Can be used by both triggers and nodes.
|
|
51
|
-
*
|
|
52
|
-
* @param input - JavaScript object with input data, or undefined
|
|
53
|
-
* @returns protobuf Value or undefined if no input
|
|
54
|
-
*/
|
|
55
|
-
export declare function convertInputToProtobuf(input?: Record<string, any>): ProtobufValue | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Extract input field from protobuf Value format to JavaScript object
|
|
58
|
-
*
|
|
59
|
-
* Pure utility function for extracting trigger/node input data from protobuf format.
|
|
60
|
-
* Can be used by both triggers and nodes.
|
|
61
|
-
*
|
|
62
|
-
* @param inputValue - protobuf Value from response, plain JavaScript object, or undefined
|
|
63
|
-
* @returns JavaScript object or undefined
|
|
64
|
-
*/
|
|
65
|
-
export declare function extractInputFromProtobuf(inputValue?: ProtobufValue | Record<string, any>): Record<string, any> | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Clean up gRPC error messages by extracting the actual message
|
|
68
|
-
* @param message - The raw gRPC error message
|
|
69
|
-
* @returns {string} - The cleaned error message
|
|
70
|
-
*/
|
|
71
|
-
export declare function cleanGrpcErrorMessage(message: string): string;
|
|
72
|
-
//# sourceMappingURL=utils.d.ts.map
|