@avaprotocol/sdk-js 2.6.2 → 2.6.4-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/CHANGELOG.md +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -260
- package/dist/index.mjs +185 -260
- 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/block.d.ts +2 -3
- package/dist/models/trigger/block.d.ts.map +1 -1
- package/dist/models/trigger/block.js +22 -37
- package/dist/models/trigger/cron.d.ts +2 -2
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/cron.js +18 -18
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +5 -1
- package/dist/models/trigger/fixedTime.d.ts +2 -2
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +10 -10
- 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/workflow.d.ts +0 -47
- package/dist/utils.d.ts +0 -72
|
@@ -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
|