@avaprotocol/sdk-js 1.3.0 → 1.3.1
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.mts +67 -25
- package/dist/index.d.ts +67 -25
- package/dist/index.js +340 -216
- package/dist/index.mjs +339 -215
- package/package.json +4 -16
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
2
2
|
import { Metadata } from '@grpc/grpc-js';
|
|
3
3
|
import * as jspb from 'google-protobuf';
|
|
4
4
|
import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb';
|
|
5
|
+
import { NodeType } from '@avaprotocol/types';
|
|
5
6
|
|
|
6
7
|
declare const getKeyRequestMessage: (address: string, expiredAt: number) => string;
|
|
7
8
|
|
|
@@ -859,8 +860,8 @@ declare namespace NonceResp {
|
|
|
859
860
|
}
|
|
860
861
|
|
|
861
862
|
declare class ListWalletReq extends jspb.Message {
|
|
862
|
-
|
|
863
|
-
|
|
863
|
+
getFactoryAddress(): string;
|
|
864
|
+
setFactoryAddress(value: string): ListWalletReq;
|
|
864
865
|
getSalt(): string;
|
|
865
866
|
setSalt(value: string): ListWalletReq;
|
|
866
867
|
|
|
@@ -876,7 +877,7 @@ declare class ListWalletReq extends jspb.Message {
|
|
|
876
877
|
|
|
877
878
|
declare namespace ListWalletReq {
|
|
878
879
|
export type AsObject = {
|
|
879
|
-
|
|
880
|
+
factoryAddress: string,
|
|
880
881
|
salt: string,
|
|
881
882
|
}
|
|
882
883
|
}
|
|
@@ -1099,29 +1100,49 @@ declare namespace ListExecutionsResp {
|
|
|
1099
1100
|
}
|
|
1100
1101
|
}
|
|
1101
1102
|
|
|
1102
|
-
declare class
|
|
1103
|
+
declare class ExecutionReq extends jspb.Message {
|
|
1103
1104
|
getTaskId(): string;
|
|
1104
|
-
setTaskId(value: string):
|
|
1105
|
+
setTaskId(value: string): ExecutionReq;
|
|
1105
1106
|
getExecutionId(): string;
|
|
1106
|
-
setExecutionId(value: string):
|
|
1107
|
+
setExecutionId(value: string): ExecutionReq;
|
|
1107
1108
|
|
|
1108
1109
|
serializeBinary(): Uint8Array;
|
|
1109
|
-
toObject(includeInstance?: boolean):
|
|
1110
|
-
static toObject(includeInstance: boolean, msg:
|
|
1110
|
+
toObject(includeInstance?: boolean): ExecutionReq.AsObject;
|
|
1111
|
+
static toObject(includeInstance: boolean, msg: ExecutionReq): ExecutionReq.AsObject;
|
|
1111
1112
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1112
1113
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1113
|
-
static serializeBinaryToWriter(message:
|
|
1114
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
1115
|
-
static deserializeBinaryFromReader(message:
|
|
1114
|
+
static serializeBinaryToWriter(message: ExecutionReq, writer: jspb.BinaryWriter): void;
|
|
1115
|
+
static deserializeBinary(bytes: Uint8Array): ExecutionReq;
|
|
1116
|
+
static deserializeBinaryFromReader(message: ExecutionReq, reader: jspb.BinaryReader): ExecutionReq;
|
|
1116
1117
|
}
|
|
1117
1118
|
|
|
1118
|
-
declare namespace
|
|
1119
|
+
declare namespace ExecutionReq {
|
|
1119
1120
|
export type AsObject = {
|
|
1120
1121
|
taskId: string,
|
|
1121
1122
|
executionId: string,
|
|
1122
1123
|
}
|
|
1123
1124
|
}
|
|
1124
1125
|
|
|
1126
|
+
declare class ExecutionStatusResp extends jspb.Message {
|
|
1127
|
+
getStatus(): ExecutionStatus$1;
|
|
1128
|
+
setStatus(value: ExecutionStatus$1): ExecutionStatusResp;
|
|
1129
|
+
|
|
1130
|
+
serializeBinary(): Uint8Array;
|
|
1131
|
+
toObject(includeInstance?: boolean): ExecutionStatusResp.AsObject;
|
|
1132
|
+
static toObject(includeInstance: boolean, msg: ExecutionStatusResp): ExecutionStatusResp.AsObject;
|
|
1133
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1134
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1135
|
+
static serializeBinaryToWriter(message: ExecutionStatusResp, writer: jspb.BinaryWriter): void;
|
|
1136
|
+
static deserializeBinary(bytes: Uint8Array): ExecutionStatusResp;
|
|
1137
|
+
static deserializeBinaryFromReader(message: ExecutionStatusResp, reader: jspb.BinaryReader): ExecutionStatusResp;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
declare namespace ExecutionStatusResp {
|
|
1141
|
+
export type AsObject = {
|
|
1142
|
+
status: ExecutionStatus$1,
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1125
1146
|
declare class GetKeyReq extends jspb.Message {
|
|
1126
1147
|
getOwner(): string;
|
|
1127
1148
|
setOwner(value: string): GetKeyReq;
|
|
@@ -1289,10 +1310,10 @@ declare namespace UserTriggerTaskReq {
|
|
|
1289
1310
|
}
|
|
1290
1311
|
|
|
1291
1312
|
declare class UserTriggerTaskResp extends jspb.Message {
|
|
1292
|
-
getResult(): boolean;
|
|
1293
|
-
setResult(value: boolean): UserTriggerTaskResp;
|
|
1294
1313
|
getExecutionId(): string;
|
|
1295
1314
|
setExecutionId(value: string): UserTriggerTaskResp;
|
|
1315
|
+
getStatus(): ExecutionStatus$1;
|
|
1316
|
+
setStatus(value: ExecutionStatus$1): UserTriggerTaskResp;
|
|
1296
1317
|
|
|
1297
1318
|
serializeBinary(): Uint8Array;
|
|
1298
1319
|
toObject(includeInstance?: boolean): UserTriggerTaskResp.AsObject;
|
|
@@ -1306,8 +1327,8 @@ declare class UserTriggerTaskResp extends jspb.Message {
|
|
|
1306
1327
|
|
|
1307
1328
|
declare namespace UserTriggerTaskResp {
|
|
1308
1329
|
export type AsObject = {
|
|
1309
|
-
result: boolean,
|
|
1310
1330
|
executionId: string,
|
|
1331
|
+
status: ExecutionStatus$1,
|
|
1311
1332
|
}
|
|
1312
1333
|
}
|
|
1313
1334
|
|
|
@@ -1319,6 +1340,11 @@ declare enum TaskStatus {
|
|
|
1319
1340
|
EXECUTING = 4,
|
|
1320
1341
|
}
|
|
1321
1342
|
|
|
1343
|
+
declare enum ExecutionStatus$1 {
|
|
1344
|
+
QUEUED = 0,
|
|
1345
|
+
FINISHED = 2,
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1322
1348
|
declare enum CustomCodeLang {
|
|
1323
1349
|
JAVASCRIPT = 0,
|
|
1324
1350
|
}
|
|
@@ -1353,9 +1379,12 @@ interface IAggregatorClient {
|
|
|
1353
1379
|
listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1354
1380
|
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1355
1381
|
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1356
|
-
getExecution(request:
|
|
1357
|
-
getExecution(request:
|
|
1358
|
-
getExecution(request:
|
|
1382
|
+
getExecution(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1383
|
+
getExecution(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1384
|
+
getExecution(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1385
|
+
getExecutionStatus(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1386
|
+
getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1387
|
+
getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1359
1388
|
cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1360
1389
|
cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1361
1390
|
cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
@@ -1393,9 +1422,12 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1393
1422
|
public listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1394
1423
|
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1395
1424
|
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1396
|
-
public getExecution(request:
|
|
1397
|
-
public getExecution(request:
|
|
1398
|
-
public getExecution(request:
|
|
1425
|
+
public getExecution(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1426
|
+
public getExecution(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1427
|
+
public getExecution(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1428
|
+
public getExecutionStatus(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1429
|
+
public getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1430
|
+
public getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1399
1431
|
public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1400
1432
|
public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1401
1433
|
public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
@@ -1407,11 +1439,9 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1407
1439
|
public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1408
1440
|
}
|
|
1409
1441
|
|
|
1410
|
-
declare const NodeTypes: typeof TaskNode.TaskTypeCase;
|
|
1411
|
-
type NodeType = TaskNode.TaskTypeCase;
|
|
1412
1442
|
type NodeData = ETHTransferNode$1.AsObject | ContractWriteNode$1.AsObject | ContractReadNode$1.AsObject | GraphQLQueryNode$1.AsObject | RestAPINode$1.AsObject | BranchNode$1.AsObject | FilterNode.AsObject | LoopNode.AsObject | CustomCodeNode$1.AsObject;
|
|
1413
1443
|
type NodeProps = Omit<TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
|
|
1414
|
-
type:
|
|
1444
|
+
type: NodeType;
|
|
1415
1445
|
data: NodeData;
|
|
1416
1446
|
};
|
|
1417
1447
|
declare class Node implements NodeProps {
|
|
@@ -1474,6 +1504,7 @@ declare enum TriggerType {
|
|
|
1474
1504
|
Unset = "unset"
|
|
1475
1505
|
}
|
|
1476
1506
|
type SmartWallet = SmartWallet$1.AsObject;
|
|
1507
|
+
declare const ExecutionStatus: typeof ExecutionStatus$1;
|
|
1477
1508
|
|
|
1478
1509
|
type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
|
|
1479
1510
|
type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
|
|
@@ -1850,6 +1881,17 @@ declare class Client extends BaseClient {
|
|
|
1850
1881
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
1851
1882
|
*/
|
|
1852
1883
|
getExecution(taskId: string, executionId: string, options?: RequestOptions): Promise<Execution>;
|
|
1884
|
+
/**
|
|
1885
|
+
* Get status of an execution.
|
|
1886
|
+
*
|
|
1887
|
+
* When a task is trigger in async manner, it has not run yet, so the data isn't available to return in GetExecution. Calling GetExecution will return in execution not found. We can instad call getExecutionStatus to check whether the execution is finished or not.
|
|
1888
|
+
*
|
|
1889
|
+
* @param {string} workflowId - The workflow id
|
|
1890
|
+
* @param {string} executionId - The exectuion id
|
|
1891
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
1892
|
+
* @returns {Promise<ExecutionStatus>} - The result execution if it is existed
|
|
1893
|
+
*/
|
|
1894
|
+
getExecutionStatus(taskId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus$1>;
|
|
1853
1895
|
/**
|
|
1854
1896
|
* Get a workflow by its Id
|
|
1855
1897
|
* @param {string} id - The Id of the workflow
|
|
@@ -1886,4 +1928,4 @@ declare class Client extends BaseClient {
|
|
|
1886
1928
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
1887
1929
|
}
|
|
1888
1930
|
|
|
1889
|
-
export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type ClientOption, ContractReadNode, type ContractReadNodeProps, ContractWriteNode, type ContractWriteNodeProps, CronTrigger, type CronTriggerProps, CustomCodeLangs, CustomCodeNode, type CustomCodeNodeProps, DEFAULT_LIMIT, ETHTransferNode, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerProps, Execution, FixedTimeTrigger, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetKeyResponse, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeProps, Node, NodeFactory, type NodeProps, type
|
|
1931
|
+
export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type ClientOption, ContractReadNode, type ContractReadNodeProps, ContractWriteNode, type ContractWriteNodeProps, CronTrigger, type CronTriggerProps, CustomCodeLangs, CustomCodeNode, type CustomCodeNodeProps, DEFAULT_LIMIT, ETHTransferNode, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerProps, Execution, ExecutionStatus, FixedTimeTrigger, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetKeyResponse, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeProps, Node, NodeFactory, type NodeProps, type RequestOptions, RestAPINode, type RestAPINodeProps, type SmartWallet, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default, getKeyRequestMessage };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
2
2
|
import { Metadata } from '@grpc/grpc-js';
|
|
3
3
|
import * as jspb from 'google-protobuf';
|
|
4
4
|
import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb';
|
|
5
|
+
import { NodeType } from '@avaprotocol/types';
|
|
5
6
|
|
|
6
7
|
declare const getKeyRequestMessage: (address: string, expiredAt: number) => string;
|
|
7
8
|
|
|
@@ -859,8 +860,8 @@ declare namespace NonceResp {
|
|
|
859
860
|
}
|
|
860
861
|
|
|
861
862
|
declare class ListWalletReq extends jspb.Message {
|
|
862
|
-
|
|
863
|
-
|
|
863
|
+
getFactoryAddress(): string;
|
|
864
|
+
setFactoryAddress(value: string): ListWalletReq;
|
|
864
865
|
getSalt(): string;
|
|
865
866
|
setSalt(value: string): ListWalletReq;
|
|
866
867
|
|
|
@@ -876,7 +877,7 @@ declare class ListWalletReq extends jspb.Message {
|
|
|
876
877
|
|
|
877
878
|
declare namespace ListWalletReq {
|
|
878
879
|
export type AsObject = {
|
|
879
|
-
|
|
880
|
+
factoryAddress: string,
|
|
880
881
|
salt: string,
|
|
881
882
|
}
|
|
882
883
|
}
|
|
@@ -1099,29 +1100,49 @@ declare namespace ListExecutionsResp {
|
|
|
1099
1100
|
}
|
|
1100
1101
|
}
|
|
1101
1102
|
|
|
1102
|
-
declare class
|
|
1103
|
+
declare class ExecutionReq extends jspb.Message {
|
|
1103
1104
|
getTaskId(): string;
|
|
1104
|
-
setTaskId(value: string):
|
|
1105
|
+
setTaskId(value: string): ExecutionReq;
|
|
1105
1106
|
getExecutionId(): string;
|
|
1106
|
-
setExecutionId(value: string):
|
|
1107
|
+
setExecutionId(value: string): ExecutionReq;
|
|
1107
1108
|
|
|
1108
1109
|
serializeBinary(): Uint8Array;
|
|
1109
|
-
toObject(includeInstance?: boolean):
|
|
1110
|
-
static toObject(includeInstance: boolean, msg:
|
|
1110
|
+
toObject(includeInstance?: boolean): ExecutionReq.AsObject;
|
|
1111
|
+
static toObject(includeInstance: boolean, msg: ExecutionReq): ExecutionReq.AsObject;
|
|
1111
1112
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1112
1113
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1113
|
-
static serializeBinaryToWriter(message:
|
|
1114
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
1115
|
-
static deserializeBinaryFromReader(message:
|
|
1114
|
+
static serializeBinaryToWriter(message: ExecutionReq, writer: jspb.BinaryWriter): void;
|
|
1115
|
+
static deserializeBinary(bytes: Uint8Array): ExecutionReq;
|
|
1116
|
+
static deserializeBinaryFromReader(message: ExecutionReq, reader: jspb.BinaryReader): ExecutionReq;
|
|
1116
1117
|
}
|
|
1117
1118
|
|
|
1118
|
-
declare namespace
|
|
1119
|
+
declare namespace ExecutionReq {
|
|
1119
1120
|
export type AsObject = {
|
|
1120
1121
|
taskId: string,
|
|
1121
1122
|
executionId: string,
|
|
1122
1123
|
}
|
|
1123
1124
|
}
|
|
1124
1125
|
|
|
1126
|
+
declare class ExecutionStatusResp extends jspb.Message {
|
|
1127
|
+
getStatus(): ExecutionStatus$1;
|
|
1128
|
+
setStatus(value: ExecutionStatus$1): ExecutionStatusResp;
|
|
1129
|
+
|
|
1130
|
+
serializeBinary(): Uint8Array;
|
|
1131
|
+
toObject(includeInstance?: boolean): ExecutionStatusResp.AsObject;
|
|
1132
|
+
static toObject(includeInstance: boolean, msg: ExecutionStatusResp): ExecutionStatusResp.AsObject;
|
|
1133
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1134
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1135
|
+
static serializeBinaryToWriter(message: ExecutionStatusResp, writer: jspb.BinaryWriter): void;
|
|
1136
|
+
static deserializeBinary(bytes: Uint8Array): ExecutionStatusResp;
|
|
1137
|
+
static deserializeBinaryFromReader(message: ExecutionStatusResp, reader: jspb.BinaryReader): ExecutionStatusResp;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
declare namespace ExecutionStatusResp {
|
|
1141
|
+
export type AsObject = {
|
|
1142
|
+
status: ExecutionStatus$1,
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1125
1146
|
declare class GetKeyReq extends jspb.Message {
|
|
1126
1147
|
getOwner(): string;
|
|
1127
1148
|
setOwner(value: string): GetKeyReq;
|
|
@@ -1289,10 +1310,10 @@ declare namespace UserTriggerTaskReq {
|
|
|
1289
1310
|
}
|
|
1290
1311
|
|
|
1291
1312
|
declare class UserTriggerTaskResp extends jspb.Message {
|
|
1292
|
-
getResult(): boolean;
|
|
1293
|
-
setResult(value: boolean): UserTriggerTaskResp;
|
|
1294
1313
|
getExecutionId(): string;
|
|
1295
1314
|
setExecutionId(value: string): UserTriggerTaskResp;
|
|
1315
|
+
getStatus(): ExecutionStatus$1;
|
|
1316
|
+
setStatus(value: ExecutionStatus$1): UserTriggerTaskResp;
|
|
1296
1317
|
|
|
1297
1318
|
serializeBinary(): Uint8Array;
|
|
1298
1319
|
toObject(includeInstance?: boolean): UserTriggerTaskResp.AsObject;
|
|
@@ -1306,8 +1327,8 @@ declare class UserTriggerTaskResp extends jspb.Message {
|
|
|
1306
1327
|
|
|
1307
1328
|
declare namespace UserTriggerTaskResp {
|
|
1308
1329
|
export type AsObject = {
|
|
1309
|
-
result: boolean,
|
|
1310
1330
|
executionId: string,
|
|
1331
|
+
status: ExecutionStatus$1,
|
|
1311
1332
|
}
|
|
1312
1333
|
}
|
|
1313
1334
|
|
|
@@ -1319,6 +1340,11 @@ declare enum TaskStatus {
|
|
|
1319
1340
|
EXECUTING = 4,
|
|
1320
1341
|
}
|
|
1321
1342
|
|
|
1343
|
+
declare enum ExecutionStatus$1 {
|
|
1344
|
+
QUEUED = 0,
|
|
1345
|
+
FINISHED = 2,
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1322
1348
|
declare enum CustomCodeLang {
|
|
1323
1349
|
JAVASCRIPT = 0,
|
|
1324
1350
|
}
|
|
@@ -1353,9 +1379,12 @@ interface IAggregatorClient {
|
|
|
1353
1379
|
listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1354
1380
|
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1355
1381
|
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1356
|
-
getExecution(request:
|
|
1357
|
-
getExecution(request:
|
|
1358
|
-
getExecution(request:
|
|
1382
|
+
getExecution(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1383
|
+
getExecution(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1384
|
+
getExecution(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1385
|
+
getExecutionStatus(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1386
|
+
getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1387
|
+
getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1359
1388
|
cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1360
1389
|
cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1361
1390
|
cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
@@ -1393,9 +1422,12 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1393
1422
|
public listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1394
1423
|
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1395
1424
|
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1396
|
-
public getExecution(request:
|
|
1397
|
-
public getExecution(request:
|
|
1398
|
-
public getExecution(request:
|
|
1425
|
+
public getExecution(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1426
|
+
public getExecution(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1427
|
+
public getExecution(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Execution$1) => void): grpc.ClientUnaryCall;
|
|
1428
|
+
public getExecutionStatus(request: ExecutionReq, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1429
|
+
public getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1430
|
+
public getExecutionStatus(request: ExecutionReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ExecutionStatusResp) => void): grpc.ClientUnaryCall;
|
|
1399
1431
|
public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1400
1432
|
public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1401
1433
|
public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
@@ -1407,11 +1439,9 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1407
1439
|
public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1408
1440
|
}
|
|
1409
1441
|
|
|
1410
|
-
declare const NodeTypes: typeof TaskNode.TaskTypeCase;
|
|
1411
|
-
type NodeType = TaskNode.TaskTypeCase;
|
|
1412
1442
|
type NodeData = ETHTransferNode$1.AsObject | ContractWriteNode$1.AsObject | ContractReadNode$1.AsObject | GraphQLQueryNode$1.AsObject | RestAPINode$1.AsObject | BranchNode$1.AsObject | FilterNode.AsObject | LoopNode.AsObject | CustomCodeNode$1.AsObject;
|
|
1413
1443
|
type NodeProps = Omit<TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
|
|
1414
|
-
type:
|
|
1444
|
+
type: NodeType;
|
|
1415
1445
|
data: NodeData;
|
|
1416
1446
|
};
|
|
1417
1447
|
declare class Node implements NodeProps {
|
|
@@ -1474,6 +1504,7 @@ declare enum TriggerType {
|
|
|
1474
1504
|
Unset = "unset"
|
|
1475
1505
|
}
|
|
1476
1506
|
type SmartWallet = SmartWallet$1.AsObject;
|
|
1507
|
+
declare const ExecutionStatus: typeof ExecutionStatus$1;
|
|
1477
1508
|
|
|
1478
1509
|
type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
|
|
1479
1510
|
type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
|
|
@@ -1850,6 +1881,17 @@ declare class Client extends BaseClient {
|
|
|
1850
1881
|
* @returns {Promise<Execution>} - The result execution if it is existed
|
|
1851
1882
|
*/
|
|
1852
1883
|
getExecution(taskId: string, executionId: string, options?: RequestOptions): Promise<Execution>;
|
|
1884
|
+
/**
|
|
1885
|
+
* Get status of an execution.
|
|
1886
|
+
*
|
|
1887
|
+
* When a task is trigger in async manner, it has not run yet, so the data isn't available to return in GetExecution. Calling GetExecution will return in execution not found. We can instad call getExecutionStatus to check whether the execution is finished or not.
|
|
1888
|
+
*
|
|
1889
|
+
* @param {string} workflowId - The workflow id
|
|
1890
|
+
* @param {string} executionId - The exectuion id
|
|
1891
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
1892
|
+
* @returns {Promise<ExecutionStatus>} - The result execution if it is existed
|
|
1893
|
+
*/
|
|
1894
|
+
getExecutionStatus(taskId: string, executionId: string, options?: RequestOptions): Promise<ExecutionStatus$1>;
|
|
1853
1895
|
/**
|
|
1854
1896
|
* Get a workflow by its Id
|
|
1855
1897
|
* @param {string} id - The Id of the workflow
|
|
@@ -1886,4 +1928,4 @@ declare class Client extends BaseClient {
|
|
|
1886
1928
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
1887
1929
|
}
|
|
1888
1930
|
|
|
1889
|
-
export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type ClientOption, ContractReadNode, type ContractReadNodeProps, ContractWriteNode, type ContractWriteNodeProps, CronTrigger, type CronTriggerProps, CustomCodeLangs, CustomCodeNode, type CustomCodeNodeProps, DEFAULT_LIMIT, ETHTransferNode, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerProps, Execution, FixedTimeTrigger, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetKeyResponse, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeProps, Node, NodeFactory, type NodeProps, type
|
|
1931
|
+
export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type ClientOption, ContractReadNode, type ContractReadNodeProps, ContractWriteNode, type ContractWriteNodeProps, CronTrigger, type CronTriggerProps, CustomCodeLangs, CustomCodeNode, type CustomCodeNodeProps, DEFAULT_LIMIT, ETHTransferNode, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerProps, Execution, ExecutionStatus, FixedTimeTrigger, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetKeyResponse, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeProps, Node, NodeFactory, type NodeProps, type RequestOptions, RestAPINode, type RestAPINodeProps, type SmartWallet, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default, getKeyRequestMessage };
|