@avaprotocol/sdk-js 1.2.1-dev.3 → 1.2.1-dev.5
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 +499 -145
- package/dist/index.d.ts +499 -145
- package/dist/index.js +3413 -3327
- package/dist/index.mjs +3412 -3326
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -30,23 +30,23 @@ declare namespace IdReq {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
declare class
|
|
33
|
+
declare class FixedTimeCondition extends jspb.Message {
|
|
34
34
|
clearEpochsList(): void;
|
|
35
35
|
getEpochsList(): Array<number>;
|
|
36
|
-
setEpochsList(value: Array<number>):
|
|
36
|
+
setEpochsList(value: Array<number>): FixedTimeCondition;
|
|
37
37
|
addEpochs(value: number, index?: number): number;
|
|
38
38
|
|
|
39
39
|
serializeBinary(): Uint8Array;
|
|
40
|
-
toObject(includeInstance?: boolean):
|
|
41
|
-
static toObject(includeInstance: boolean, msg:
|
|
40
|
+
toObject(includeInstance?: boolean): FixedTimeCondition.AsObject;
|
|
41
|
+
static toObject(includeInstance: boolean, msg: FixedTimeCondition): FixedTimeCondition.AsObject;
|
|
42
42
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
43
43
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
44
|
-
static serializeBinaryToWriter(message:
|
|
45
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
46
|
-
static deserializeBinaryFromReader(message:
|
|
44
|
+
static serializeBinaryToWriter(message: FixedTimeCondition, writer: jspb.BinaryWriter): void;
|
|
45
|
+
static deserializeBinary(bytes: Uint8Array): FixedTimeCondition;
|
|
46
|
+
static deserializeBinaryFromReader(message: FixedTimeCondition, reader: jspb.BinaryReader): FixedTimeCondition;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
declare namespace
|
|
49
|
+
declare namespace FixedTimeCondition {
|
|
50
50
|
export type AsObject = {
|
|
51
51
|
epochsList: Array<number>,
|
|
52
52
|
}
|
|
@@ -125,8 +125,8 @@ declare class TaskTrigger extends jspb.Message {
|
|
|
125
125
|
|
|
126
126
|
hasFixedTime(): boolean;
|
|
127
127
|
clearFixedTime(): void;
|
|
128
|
-
getFixedTime():
|
|
129
|
-
setFixedTime(value?:
|
|
128
|
+
getFixedTime(): FixedTimeCondition | undefined;
|
|
129
|
+
setFixedTime(value?: FixedTimeCondition): TaskTrigger;
|
|
130
130
|
|
|
131
131
|
hasCron(): boolean;
|
|
132
132
|
clearCron(): void;
|
|
@@ -159,7 +159,7 @@ declare namespace TaskTrigger {
|
|
|
159
159
|
export type AsObject = {
|
|
160
160
|
name: string,
|
|
161
161
|
manual: boolean,
|
|
162
|
-
fixedTime?:
|
|
162
|
+
fixedTime?: FixedTimeCondition.AsObject,
|
|
163
163
|
cron?: CronCondition.AsObject,
|
|
164
164
|
block?: BlockCondition.AsObject,
|
|
165
165
|
event?: EventCondition.AsObject,
|
|
@@ -232,6 +232,8 @@ declare class ContractReadNode$1 extends jspb.Message {
|
|
|
232
232
|
setCallData(value: string): ContractReadNode$1;
|
|
233
233
|
getContractAbi(): string;
|
|
234
234
|
setContractAbi(value: string): ContractReadNode$1;
|
|
235
|
+
getMethod(): string;
|
|
236
|
+
setMethod(value: string): ContractReadNode$1;
|
|
235
237
|
|
|
236
238
|
serializeBinary(): Uint8Array;
|
|
237
239
|
toObject(includeInstance?: boolean): ContractReadNode$1.AsObject;
|
|
@@ -248,6 +250,7 @@ declare namespace ContractReadNode$1 {
|
|
|
248
250
|
contractAddress: string,
|
|
249
251
|
callData: string,
|
|
250
252
|
contractAbi: string,
|
|
253
|
+
method: string,
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
256
|
|
|
@@ -303,6 +306,7 @@ declare class RestAPINode$1 extends jspb.Message {
|
|
|
303
306
|
declare namespace RestAPINode$1 {
|
|
304
307
|
export type AsObject = {
|
|
305
308
|
url: string,
|
|
309
|
+
|
|
306
310
|
headersMap: Array<[string, string]>,
|
|
307
311
|
body: string,
|
|
308
312
|
method: string,
|
|
@@ -522,10 +526,10 @@ declare class TaskNode extends jspb.Message {
|
|
|
522
526
|
getContractRead(): ContractReadNode$1 | undefined;
|
|
523
527
|
setContractRead(value?: ContractReadNode$1): TaskNode;
|
|
524
528
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
+
hasGraphqlQuery(): boolean;
|
|
530
|
+
clearGraphqlQuery(): void;
|
|
531
|
+
getGraphqlQuery(): GraphQLQueryNode$1 | undefined;
|
|
532
|
+
setGraphqlQuery(value?: GraphQLQueryNode$1): TaskNode;
|
|
529
533
|
|
|
530
534
|
hasRestApi(): boolean;
|
|
531
535
|
clearRestApi(): void;
|
|
@@ -571,7 +575,7 @@ declare namespace TaskNode {
|
|
|
571
575
|
ethTransfer?: ETHTransferNode$1.AsObject,
|
|
572
576
|
contractWrite?: ContractWriteNode$1.AsObject,
|
|
573
577
|
contractRead?: ContractReadNode$1.AsObject,
|
|
574
|
-
|
|
578
|
+
graphqlQuery?: GraphQLQueryNode$1.AsObject,
|
|
575
579
|
restApi?: RestAPINode$1.AsObject,
|
|
576
580
|
branch?: BranchNode$1.AsObject,
|
|
577
581
|
filter?: FilterNode.AsObject,
|
|
@@ -584,7 +588,7 @@ declare namespace TaskNode {
|
|
|
584
588
|
ETH_TRANSFER = 10,
|
|
585
589
|
CONTRACT_WRITE = 11,
|
|
586
590
|
CONTRACT_READ = 12,
|
|
587
|
-
|
|
591
|
+
GRAPHQL_QUERY = 13,
|
|
588
592
|
REST_API = 14,
|
|
589
593
|
BRANCH = 15,
|
|
590
594
|
FILTER = 16,
|
|
@@ -595,17 +599,21 @@ declare namespace TaskNode {
|
|
|
595
599
|
}
|
|
596
600
|
|
|
597
601
|
declare class Execution$1 extends jspb.Message {
|
|
598
|
-
|
|
599
|
-
|
|
602
|
+
getId(): string;
|
|
603
|
+
setId(value: string): Execution$1;
|
|
604
|
+
getStartAt(): number;
|
|
605
|
+
setStartAt(value: number): Execution$1;
|
|
606
|
+
getEndAt(): number;
|
|
607
|
+
setEndAt(value: number): Execution$1;
|
|
600
608
|
getSuccess(): boolean;
|
|
601
609
|
setSuccess(value: boolean): Execution$1;
|
|
602
610
|
getError(): string;
|
|
603
611
|
setError(value: string): Execution$1;
|
|
604
612
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
613
|
+
hasTriggerMetadata(): boolean;
|
|
614
|
+
clearTriggerMetadata(): void;
|
|
615
|
+
getTriggerMetadata(): TriggerMetadata$1 | undefined;
|
|
616
|
+
setTriggerMetadata(value?: TriggerMetadata$1): Execution$1;
|
|
609
617
|
getResult(): string;
|
|
610
618
|
setResult(value: string): Execution$1;
|
|
611
619
|
clearStepsList(): void;
|
|
@@ -625,10 +633,12 @@ declare class Execution$1 extends jspb.Message {
|
|
|
625
633
|
|
|
626
634
|
declare namespace Execution$1 {
|
|
627
635
|
export type AsObject = {
|
|
628
|
-
|
|
636
|
+
id: string,
|
|
637
|
+
startAt: number,
|
|
638
|
+
endAt: number,
|
|
629
639
|
success: boolean,
|
|
630
640
|
error: string,
|
|
631
|
-
|
|
641
|
+
triggerMetadata?: TriggerMetadata$1.AsObject,
|
|
632
642
|
result: string,
|
|
633
643
|
stepsList: Array<Execution$1.Step.AsObject>,
|
|
634
644
|
}
|
|
@@ -645,6 +655,10 @@ declare namespace Execution$1 {
|
|
|
645
655
|
setLog(value: string): Step;
|
|
646
656
|
getError(): string;
|
|
647
657
|
setError(value: string): Step;
|
|
658
|
+
getStartAt(): number;
|
|
659
|
+
setStartAt(value: number): Step;
|
|
660
|
+
getEndAt(): number;
|
|
661
|
+
setEndAt(value: number): Step;
|
|
648
662
|
|
|
649
663
|
serializeBinary(): Uint8Array;
|
|
650
664
|
toObject(includeInstance?: boolean): Step.AsObject;
|
|
@@ -663,6 +677,8 @@ declare namespace Execution$1 {
|
|
|
663
677
|
outputData: string,
|
|
664
678
|
log: string,
|
|
665
679
|
error: string,
|
|
680
|
+
startAt: number,
|
|
681
|
+
endAt: number,
|
|
666
682
|
}
|
|
667
683
|
}
|
|
668
684
|
|
|
@@ -685,6 +701,10 @@ declare class Task extends jspb.Message {
|
|
|
685
701
|
setCompletedAt(value: number): Task;
|
|
686
702
|
getMaxExecution(): number;
|
|
687
703
|
setMaxExecution(value: number): Task;
|
|
704
|
+
getTotalExecution(): number;
|
|
705
|
+
setTotalExecution(value: number): Task;
|
|
706
|
+
getLastRanAt(): number;
|
|
707
|
+
setLastRanAt(value: number): Task;
|
|
688
708
|
getStatus(): TaskStatus;
|
|
689
709
|
setStatus(value: TaskStatus): Task;
|
|
690
710
|
|
|
@@ -700,10 +720,6 @@ declare class Task extends jspb.Message {
|
|
|
700
720
|
getEdgesList(): Array<TaskEdge>;
|
|
701
721
|
setEdgesList(value: Array<TaskEdge>): Task;
|
|
702
722
|
addEdges(value?: TaskEdge, index?: number): TaskEdge;
|
|
703
|
-
clearExecutionsList(): void;
|
|
704
|
-
getExecutionsList(): Array<Execution$1>;
|
|
705
|
-
setExecutionsList(value: Array<Execution$1>): Task;
|
|
706
|
-
addExecutions(value?: Execution$1, index?: number): Execution$1;
|
|
707
723
|
|
|
708
724
|
serializeBinary(): Uint8Array;
|
|
709
725
|
toObject(includeInstance?: boolean): Task.AsObject;
|
|
@@ -725,11 +741,12 @@ declare namespace Task {
|
|
|
725
741
|
memo: string,
|
|
726
742
|
completedAt: number,
|
|
727
743
|
maxExecution: number,
|
|
728
|
-
|
|
744
|
+
totalExecution: number,
|
|
745
|
+
lastRanAt: number,
|
|
746
|
+
status: TaskStatus,
|
|
729
747
|
trigger?: TaskTrigger.AsObject,
|
|
730
748
|
nodesList: Array<TaskNode.AsObject>,
|
|
731
749
|
edgesList: Array<TaskEdge.AsObject>,
|
|
732
|
-
executionsList: Array<Execution$1.AsObject>,
|
|
733
750
|
}
|
|
734
751
|
}
|
|
735
752
|
|
|
@@ -891,10 +908,10 @@ declare namespace SmartWallet$1 {
|
|
|
891
908
|
}
|
|
892
909
|
|
|
893
910
|
declare class ListWalletResp extends jspb.Message {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
911
|
+
clearItemsList(): void;
|
|
912
|
+
getItemsList(): Array<SmartWallet$1>;
|
|
913
|
+
setItemsList(value: Array<SmartWallet$1>): ListWalletResp;
|
|
914
|
+
addItems(value?: SmartWallet$1, index?: number): SmartWallet$1;
|
|
898
915
|
|
|
899
916
|
serializeBinary(): Uint8Array;
|
|
900
917
|
toObject(includeInstance?: boolean): ListWalletResp.AsObject;
|
|
@@ -908,13 +925,17 @@ declare class ListWalletResp extends jspb.Message {
|
|
|
908
925
|
|
|
909
926
|
declare namespace ListWalletResp {
|
|
910
927
|
export type AsObject = {
|
|
911
|
-
|
|
928
|
+
itemsList: Array<SmartWallet$1.AsObject>,
|
|
912
929
|
}
|
|
913
930
|
}
|
|
914
931
|
|
|
915
932
|
declare class ListTasksReq extends jspb.Message {
|
|
916
933
|
getSmartWalletAddress(): string;
|
|
917
934
|
setSmartWalletAddress(value: string): ListTasksReq;
|
|
935
|
+
getCursor(): string;
|
|
936
|
+
setCursor(value: string): ListTasksReq;
|
|
937
|
+
getItemPerPage(): number;
|
|
938
|
+
setItemPerPage(value: number): ListTasksReq;
|
|
918
939
|
|
|
919
940
|
serializeBinary(): Uint8Array;
|
|
920
941
|
toObject(includeInstance?: boolean): ListTasksReq.AsObject;
|
|
@@ -929,14 +950,18 @@ declare class ListTasksReq extends jspb.Message {
|
|
|
929
950
|
declare namespace ListTasksReq {
|
|
930
951
|
export type AsObject = {
|
|
931
952
|
smartWalletAddress: string,
|
|
953
|
+
cursor: string,
|
|
954
|
+
itemPerPage: number,
|
|
932
955
|
}
|
|
933
956
|
}
|
|
934
957
|
|
|
935
958
|
declare class ListTasksResp extends jspb.Message {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
959
|
+
clearItemsList(): void;
|
|
960
|
+
getItemsList(): Array<ListTasksResp.Item>;
|
|
961
|
+
setItemsList(value: Array<ListTasksResp.Item>): ListTasksResp;
|
|
962
|
+
addItems(value?: ListTasksResp.Item, index?: number): ListTasksResp.Item;
|
|
963
|
+
getCursor(): string;
|
|
964
|
+
setCursor(value: string): ListTasksResp;
|
|
940
965
|
|
|
941
966
|
serializeBinary(): Uint8Array;
|
|
942
967
|
toObject(includeInstance?: boolean): ListTasksResp.AsObject;
|
|
@@ -950,7 +975,117 @@ declare class ListTasksResp extends jspb.Message {
|
|
|
950
975
|
|
|
951
976
|
declare namespace ListTasksResp {
|
|
952
977
|
export type AsObject = {
|
|
953
|
-
|
|
978
|
+
itemsList: Array<ListTasksResp.Item.AsObject>,
|
|
979
|
+
cursor: string,
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
export class Item extends jspb.Message {
|
|
984
|
+
getId(): string;
|
|
985
|
+
setId(value: string): Item;
|
|
986
|
+
getOwner(): string;
|
|
987
|
+
setOwner(value: string): Item;
|
|
988
|
+
getSmartWalletAddress(): string;
|
|
989
|
+
setSmartWalletAddress(value: string): Item;
|
|
990
|
+
getStartAt(): number;
|
|
991
|
+
setStartAt(value: number): Item;
|
|
992
|
+
getExpiredAt(): number;
|
|
993
|
+
setExpiredAt(value: number): Item;
|
|
994
|
+
getMemo(): string;
|
|
995
|
+
setMemo(value: string): Item;
|
|
996
|
+
getCompletedAt(): number;
|
|
997
|
+
setCompletedAt(value: number): Item;
|
|
998
|
+
getMaxExecution(): number;
|
|
999
|
+
setMaxExecution(value: number): Item;
|
|
1000
|
+
getTotalExecution(): number;
|
|
1001
|
+
setTotalExecution(value: number): Item;
|
|
1002
|
+
getLastRanAt(): number;
|
|
1003
|
+
setLastRanAt(value: number): Item;
|
|
1004
|
+
getStatus(): TaskStatus;
|
|
1005
|
+
setStatus(value: TaskStatus): Item;
|
|
1006
|
+
|
|
1007
|
+
hasTrigger(): boolean;
|
|
1008
|
+
clearTrigger(): void;
|
|
1009
|
+
getTrigger(): TaskTrigger | undefined;
|
|
1010
|
+
setTrigger(value?: TaskTrigger): Item;
|
|
1011
|
+
|
|
1012
|
+
serializeBinary(): Uint8Array;
|
|
1013
|
+
toObject(includeInstance?: boolean): Item.AsObject;
|
|
1014
|
+
static toObject(includeInstance: boolean, msg: Item): Item.AsObject;
|
|
1015
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1016
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1017
|
+
static serializeBinaryToWriter(message: Item, writer: jspb.BinaryWriter): void;
|
|
1018
|
+
static deserializeBinary(bytes: Uint8Array): Item;
|
|
1019
|
+
static deserializeBinaryFromReader(message: Item, reader: jspb.BinaryReader): Item;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export namespace Item {
|
|
1023
|
+
export type AsObject = {
|
|
1024
|
+
id: string,
|
|
1025
|
+
owner: string,
|
|
1026
|
+
smartWalletAddress: string,
|
|
1027
|
+
startAt: number,
|
|
1028
|
+
expiredAt: number,
|
|
1029
|
+
memo: string,
|
|
1030
|
+
completedAt: number,
|
|
1031
|
+
maxExecution: number,
|
|
1032
|
+
totalExecution: number,
|
|
1033
|
+
lastRanAt: number,
|
|
1034
|
+
status: TaskStatus,
|
|
1035
|
+
trigger?: TaskTrigger.AsObject,
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
declare class ListExecutionsReq extends jspb.Message {
|
|
1042
|
+
getId(): string;
|
|
1043
|
+
setId(value: string): ListExecutionsReq;
|
|
1044
|
+
getCursor(): string;
|
|
1045
|
+
setCursor(value: string): ListExecutionsReq;
|
|
1046
|
+
getItemPerPage(): number;
|
|
1047
|
+
setItemPerPage(value: number): ListExecutionsReq;
|
|
1048
|
+
|
|
1049
|
+
serializeBinary(): Uint8Array;
|
|
1050
|
+
toObject(includeInstance?: boolean): ListExecutionsReq.AsObject;
|
|
1051
|
+
static toObject(includeInstance: boolean, msg: ListExecutionsReq): ListExecutionsReq.AsObject;
|
|
1052
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1053
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1054
|
+
static serializeBinaryToWriter(message: ListExecutionsReq, writer: jspb.BinaryWriter): void;
|
|
1055
|
+
static deserializeBinary(bytes: Uint8Array): ListExecutionsReq;
|
|
1056
|
+
static deserializeBinaryFromReader(message: ListExecutionsReq, reader: jspb.BinaryReader): ListExecutionsReq;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
declare namespace ListExecutionsReq {
|
|
1060
|
+
export type AsObject = {
|
|
1061
|
+
id: string,
|
|
1062
|
+
cursor: string,
|
|
1063
|
+
itemPerPage: number,
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
declare class ListExecutionsResp extends jspb.Message {
|
|
1068
|
+
clearItemsList(): void;
|
|
1069
|
+
getItemsList(): Array<Execution$1>;
|
|
1070
|
+
setItemsList(value: Array<Execution$1>): ListExecutionsResp;
|
|
1071
|
+
addItems(value?: Execution$1, index?: number): Execution$1;
|
|
1072
|
+
getCursor(): string;
|
|
1073
|
+
setCursor(value: string): ListExecutionsResp;
|
|
1074
|
+
|
|
1075
|
+
serializeBinary(): Uint8Array;
|
|
1076
|
+
toObject(includeInstance?: boolean): ListExecutionsResp.AsObject;
|
|
1077
|
+
static toObject(includeInstance: boolean, msg: ListExecutionsResp): ListExecutionsResp.AsObject;
|
|
1078
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1079
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1080
|
+
static serializeBinaryToWriter(message: ListExecutionsResp, writer: jspb.BinaryWriter): void;
|
|
1081
|
+
static deserializeBinary(bytes: Uint8Array): ListExecutionsResp;
|
|
1082
|
+
static deserializeBinaryFromReader(message: ListExecutionsResp, reader: jspb.BinaryReader): ListExecutionsResp;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
declare namespace ListExecutionsResp {
|
|
1086
|
+
export type AsObject = {
|
|
1087
|
+
itemsList: Array<Execution$1.AsObject>,
|
|
1088
|
+
cursor: string,
|
|
954
1089
|
}
|
|
955
1090
|
}
|
|
956
1091
|
|
|
@@ -1000,74 +1135,77 @@ declare namespace KeyResp {
|
|
|
1000
1135
|
}
|
|
1001
1136
|
}
|
|
1002
1137
|
|
|
1003
|
-
declare class
|
|
1138
|
+
declare class TriggerMetadata$1 extends jspb.Message {
|
|
1004
1139
|
getBlockNumber(): number;
|
|
1005
|
-
setBlockNumber(value: number):
|
|
1140
|
+
setBlockNumber(value: number): TriggerMetadata$1;
|
|
1006
1141
|
getLogIndex(): number;
|
|
1007
|
-
setLogIndex(value: number):
|
|
1142
|
+
setLogIndex(value: number): TriggerMetadata$1;
|
|
1008
1143
|
getTxHash(): string;
|
|
1009
|
-
setTxHash(value: string):
|
|
1144
|
+
setTxHash(value: string): TriggerMetadata$1;
|
|
1145
|
+
getEpoch(): number;
|
|
1146
|
+
setEpoch(value: number): TriggerMetadata$1;
|
|
1010
1147
|
|
|
1011
1148
|
serializeBinary(): Uint8Array;
|
|
1012
|
-
toObject(includeInstance?: boolean):
|
|
1013
|
-
static toObject(includeInstance: boolean, msg:
|
|
1149
|
+
toObject(includeInstance?: boolean): TriggerMetadata$1.AsObject;
|
|
1150
|
+
static toObject(includeInstance: boolean, msg: TriggerMetadata$1): TriggerMetadata$1.AsObject;
|
|
1014
1151
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1015
1152
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1016
|
-
static serializeBinaryToWriter(message:
|
|
1017
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
1018
|
-
static deserializeBinaryFromReader(message:
|
|
1153
|
+
static serializeBinaryToWriter(message: TriggerMetadata$1, writer: jspb.BinaryWriter): void;
|
|
1154
|
+
static deserializeBinary(bytes: Uint8Array): TriggerMetadata$1;
|
|
1155
|
+
static deserializeBinaryFromReader(message: TriggerMetadata$1, reader: jspb.BinaryReader): TriggerMetadata$1;
|
|
1019
1156
|
}
|
|
1020
1157
|
|
|
1021
|
-
declare namespace
|
|
1158
|
+
declare namespace TriggerMetadata$1 {
|
|
1022
1159
|
export type AsObject = {
|
|
1023
1160
|
blockNumber: number,
|
|
1024
1161
|
logIndex: number,
|
|
1025
1162
|
txHash: string,
|
|
1163
|
+
epoch: number,
|
|
1026
1164
|
}
|
|
1027
1165
|
}
|
|
1028
1166
|
|
|
1029
|
-
declare class
|
|
1167
|
+
declare class GetWalletReq extends jspb.Message {
|
|
1030
1168
|
getSalt(): string;
|
|
1031
|
-
setSalt(value: string):
|
|
1169
|
+
setSalt(value: string): GetWalletReq;
|
|
1032
1170
|
getFactoryAddress(): string;
|
|
1033
|
-
setFactoryAddress(value: string):
|
|
1171
|
+
setFactoryAddress(value: string): GetWalletReq;
|
|
1034
1172
|
|
|
1035
1173
|
serializeBinary(): Uint8Array;
|
|
1036
|
-
toObject(includeInstance?: boolean):
|
|
1037
|
-
static toObject(includeInstance: boolean, msg:
|
|
1174
|
+
toObject(includeInstance?: boolean): GetWalletReq.AsObject;
|
|
1175
|
+
static toObject(includeInstance: boolean, msg: GetWalletReq): GetWalletReq.AsObject;
|
|
1038
1176
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1039
1177
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1040
|
-
static serializeBinaryToWriter(message:
|
|
1041
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
1042
|
-
static deserializeBinaryFromReader(message:
|
|
1178
|
+
static serializeBinaryToWriter(message: GetWalletReq, writer: jspb.BinaryWriter): void;
|
|
1179
|
+
static deserializeBinary(bytes: Uint8Array): GetWalletReq;
|
|
1180
|
+
static deserializeBinaryFromReader(message: GetWalletReq, reader: jspb.BinaryReader): GetWalletReq;
|
|
1043
1181
|
}
|
|
1044
1182
|
|
|
1045
|
-
declare namespace
|
|
1183
|
+
declare namespace GetWalletReq {
|
|
1046
1184
|
export type AsObject = {
|
|
1047
1185
|
salt: string,
|
|
1048
1186
|
factoryAddress: string,
|
|
1049
1187
|
}
|
|
1050
1188
|
}
|
|
1051
1189
|
|
|
1052
|
-
declare class
|
|
1190
|
+
declare class GetWalletResp extends jspb.Message {
|
|
1053
1191
|
getAddress(): string;
|
|
1054
|
-
setAddress(value: string):
|
|
1192
|
+
setAddress(value: string): GetWalletResp;
|
|
1055
1193
|
getSalt(): string;
|
|
1056
|
-
setSalt(value: string):
|
|
1194
|
+
setSalt(value: string): GetWalletResp;
|
|
1057
1195
|
getFactoryAddress(): string;
|
|
1058
|
-
setFactoryAddress(value: string):
|
|
1196
|
+
setFactoryAddress(value: string): GetWalletResp;
|
|
1059
1197
|
|
|
1060
1198
|
serializeBinary(): Uint8Array;
|
|
1061
|
-
toObject(includeInstance?: boolean):
|
|
1062
|
-
static toObject(includeInstance: boolean, msg:
|
|
1199
|
+
toObject(includeInstance?: boolean): GetWalletResp.AsObject;
|
|
1200
|
+
static toObject(includeInstance: boolean, msg: GetWalletResp): GetWalletResp.AsObject;
|
|
1063
1201
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1064
1202
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1065
|
-
static serializeBinaryToWriter(message:
|
|
1066
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
1067
|
-
static deserializeBinaryFromReader(message:
|
|
1203
|
+
static serializeBinaryToWriter(message: GetWalletResp, writer: jspb.BinaryWriter): void;
|
|
1204
|
+
static deserializeBinary(bytes: Uint8Array): GetWalletResp;
|
|
1205
|
+
static deserializeBinaryFromReader(message: GetWalletResp, reader: jspb.BinaryReader): GetWalletResp;
|
|
1068
1206
|
}
|
|
1069
1207
|
|
|
1070
|
-
declare namespace
|
|
1208
|
+
declare namespace GetWalletResp {
|
|
1071
1209
|
export type AsObject = {
|
|
1072
1210
|
address: string,
|
|
1073
1211
|
salt: string,
|
|
@@ -1075,6 +1213,61 @@ declare namespace CreateWalletResp {
|
|
|
1075
1213
|
}
|
|
1076
1214
|
}
|
|
1077
1215
|
|
|
1216
|
+
declare class UserTriggerTaskReq extends jspb.Message {
|
|
1217
|
+
getTaskId(): string;
|
|
1218
|
+
setTaskId(value: string): UserTriggerTaskReq;
|
|
1219
|
+
|
|
1220
|
+
hasTriggerMetadata(): boolean;
|
|
1221
|
+
clearTriggerMetadata(): void;
|
|
1222
|
+
getTriggerMetadata(): TriggerMetadata$1 | undefined;
|
|
1223
|
+
setTriggerMetadata(value?: TriggerMetadata$1): UserTriggerTaskReq;
|
|
1224
|
+
getIsBlocking(): boolean;
|
|
1225
|
+
setIsBlocking(value: boolean): UserTriggerTaskReq;
|
|
1226
|
+
|
|
1227
|
+
serializeBinary(): Uint8Array;
|
|
1228
|
+
toObject(includeInstance?: boolean): UserTriggerTaskReq.AsObject;
|
|
1229
|
+
static toObject(includeInstance: boolean, msg: UserTriggerTaskReq): UserTriggerTaskReq.AsObject;
|
|
1230
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1231
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1232
|
+
static serializeBinaryToWriter(message: UserTriggerTaskReq, writer: jspb.BinaryWriter): void;
|
|
1233
|
+
static deserializeBinary(bytes: Uint8Array): UserTriggerTaskReq;
|
|
1234
|
+
static deserializeBinaryFromReader(message: UserTriggerTaskReq, reader: jspb.BinaryReader): UserTriggerTaskReq;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
declare namespace UserTriggerTaskReq {
|
|
1238
|
+
export type AsObject = {
|
|
1239
|
+
taskId: string,
|
|
1240
|
+
triggerMetadata?: TriggerMetadata$1.AsObject,
|
|
1241
|
+
isBlocking: boolean,
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
declare class UserTriggerTaskResp extends jspb.Message {
|
|
1246
|
+
getResult(): boolean;
|
|
1247
|
+
setResult(value: boolean): UserTriggerTaskResp;
|
|
1248
|
+
getExecutionId(): string;
|
|
1249
|
+
setExecutionId(value: string): UserTriggerTaskResp;
|
|
1250
|
+
getJobId(): string;
|
|
1251
|
+
setJobId(value: string): UserTriggerTaskResp;
|
|
1252
|
+
|
|
1253
|
+
serializeBinary(): Uint8Array;
|
|
1254
|
+
toObject(includeInstance?: boolean): UserTriggerTaskResp.AsObject;
|
|
1255
|
+
static toObject(includeInstance: boolean, msg: UserTriggerTaskResp): UserTriggerTaskResp.AsObject;
|
|
1256
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1257
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1258
|
+
static serializeBinaryToWriter(message: UserTriggerTaskResp, writer: jspb.BinaryWriter): void;
|
|
1259
|
+
static deserializeBinary(bytes: Uint8Array): UserTriggerTaskResp;
|
|
1260
|
+
static deserializeBinaryFromReader(message: UserTriggerTaskResp, reader: jspb.BinaryReader): UserTriggerTaskResp;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
declare namespace UserTriggerTaskResp {
|
|
1264
|
+
export type AsObject = {
|
|
1265
|
+
result: boolean,
|
|
1266
|
+
executionId: string,
|
|
1267
|
+
jobId: string,
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1078
1271
|
declare enum TaskStatus {
|
|
1079
1272
|
ACTIVE = 0,
|
|
1080
1273
|
COMPLETED = 1,
|
|
@@ -1099,9 +1292,9 @@ interface IAggregatorClient {
|
|
|
1099
1292
|
getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1100
1293
|
getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1101
1294
|
getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1295
|
+
getWallet(request: GetWalletReq, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1296
|
+
getWallet(request: GetWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1297
|
+
getWallet(request: GetWalletReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1105
1298
|
listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
1106
1299
|
listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
1107
1300
|
listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
@@ -1114,12 +1307,18 @@ interface IAggregatorClient {
|
|
|
1114
1307
|
getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1115
1308
|
getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1116
1309
|
getTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1310
|
+
listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1311
|
+
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1312
|
+
listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1117
1313
|
cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1118
1314
|
cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1119
1315
|
cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1120
1316
|
deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1121
1317
|
deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1122
1318
|
deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1319
|
+
triggerTask(request: UserTriggerTaskReq, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1320
|
+
triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1321
|
+
triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1123
1322
|
}
|
|
1124
1323
|
|
|
1125
1324
|
declare class AggregatorClient extends grpc.Client implements IAggregatorClient {
|
|
@@ -1130,9 +1329,9 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1130
1329
|
public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1131
1330
|
public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1132
1331
|
public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall;
|
|
1133
|
-
public
|
|
1134
|
-
public
|
|
1135
|
-
public
|
|
1332
|
+
public getWallet(request: GetWalletReq, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1333
|
+
public getWallet(request: GetWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1334
|
+
public getWallet(request: GetWalletReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: GetWalletResp) => void): grpc.ClientUnaryCall;
|
|
1136
1335
|
public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
1137
1336
|
public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
1138
1337
|
public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall;
|
|
@@ -1145,27 +1344,18 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
|
|
|
1145
1344
|
public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1146
1345
|
public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1147
1346
|
public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: Task) => void): grpc.ClientUnaryCall;
|
|
1347
|
+
public listExecutions(request: ListExecutionsReq, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1348
|
+
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1349
|
+
public listExecutions(request: ListExecutionsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListExecutionsResp) => void): grpc.ClientUnaryCall;
|
|
1148
1350
|
public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1149
1351
|
public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1150
1352
|
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;
|
|
1151
1353
|
public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1152
1354
|
public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1153
1355
|
public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
type TriggerMarkProps = TriggerMark$1.AsObject;
|
|
1158
|
-
type StepProps = Execution$1.Step.AsObject;
|
|
1159
|
-
declare class Execution implements ExecutionProps {
|
|
1160
|
-
epoch: number;
|
|
1161
|
-
success: boolean;
|
|
1162
|
-
error: string;
|
|
1163
|
-
triggerMark?: TriggerMarkProps;
|
|
1164
|
-
result: string;
|
|
1165
|
-
stepsList: Array<StepProps>;
|
|
1166
|
-
constructor(props: ExecutionProps);
|
|
1167
|
-
static fromResponse(execution: Execution$1): Execution;
|
|
1168
|
-
toRequest(): Execution$1;
|
|
1356
|
+
public triggerTask(request: UserTriggerTaskReq, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1357
|
+
public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1358
|
+
public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
|
|
1169
1359
|
}
|
|
1170
1360
|
|
|
1171
1361
|
declare const NodeTypes: typeof TaskNode.TaskTypeCase;
|
|
@@ -1196,7 +1386,7 @@ declare class Edge implements EdgeProps {
|
|
|
1196
1386
|
|
|
1197
1387
|
declare const TriggerTypes: typeof TaskTrigger.TriggerTypeCase;
|
|
1198
1388
|
type TriggerType = TaskTrigger.TriggerTypeCase;
|
|
1199
|
-
type TriggerData =
|
|
1389
|
+
type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
|
|
1200
1390
|
type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
|
|
1201
1391
|
type: TriggerType;
|
|
1202
1392
|
data: TriggerData;
|
|
@@ -1215,7 +1405,7 @@ declare class Trigger implements TriggerProps {
|
|
|
1215
1405
|
|
|
1216
1406
|
declare const WorkflowStatuses: typeof TaskStatus;
|
|
1217
1407
|
type WorkflowStatus = TaskStatus;
|
|
1218
|
-
type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "memo" | "trigger" | "nodesList" | "edgesList"> & {
|
|
1408
|
+
type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "memo" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
|
|
1219
1409
|
id?: string;
|
|
1220
1410
|
owner?: string;
|
|
1221
1411
|
completedAt?: number;
|
|
@@ -1224,7 +1414,8 @@ type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "statu
|
|
|
1224
1414
|
trigger: Trigger;
|
|
1225
1415
|
nodes: Node[];
|
|
1226
1416
|
edges: Edge[];
|
|
1227
|
-
|
|
1417
|
+
totalExecution?: number;
|
|
1418
|
+
lastRanAt?: number;
|
|
1228
1419
|
};
|
|
1229
1420
|
declare class Workflow implements WorkflowProps {
|
|
1230
1421
|
smartWalletAddress: string;
|
|
@@ -1237,23 +1428,87 @@ declare class Workflow implements WorkflowProps {
|
|
|
1237
1428
|
id?: string;
|
|
1238
1429
|
owner?: string;
|
|
1239
1430
|
memo?: string;
|
|
1240
|
-
executions?: Execution[];
|
|
1241
1431
|
completedAt?: number;
|
|
1242
1432
|
status?: WorkflowStatus;
|
|
1433
|
+
totalExecution?: number;
|
|
1434
|
+
lastRanAt?: number;
|
|
1243
1435
|
/**
|
|
1244
1436
|
* Create an instance of Workflow from user inputs
|
|
1245
1437
|
* @param props
|
|
1246
1438
|
*/
|
|
1247
1439
|
constructor(props: WorkflowProps);
|
|
1248
1440
|
/**
|
|
1249
|
-
* Create an instance of Workflow from AVS
|
|
1441
|
+
* Create an instance of Workflow from AVS getWorkflow response
|
|
1250
1442
|
* @param res
|
|
1251
1443
|
* @returns
|
|
1252
1444
|
*/
|
|
1253
1445
|
static fromResponse(obj: Task): Workflow;
|
|
1446
|
+
/**
|
|
1447
|
+
* Create an instance of Workflow with only selected fields
|
|
1448
|
+
* @param obj
|
|
1449
|
+
*/
|
|
1450
|
+
static fromListResponse(obj: ListTasksResp.Item): Workflow;
|
|
1254
1451
|
toRequest(): CreateTaskReq;
|
|
1255
1452
|
}
|
|
1256
1453
|
|
|
1454
|
+
type TriggerMetadataProps = {
|
|
1455
|
+
type: TaskTrigger.TriggerTypeCase.FIXED_TIME;
|
|
1456
|
+
epoch: number;
|
|
1457
|
+
} | {
|
|
1458
|
+
type: TaskTrigger.TriggerTypeCase.CRON;
|
|
1459
|
+
epoch: number;
|
|
1460
|
+
} | {
|
|
1461
|
+
type: TaskTrigger.TriggerTypeCase.BLOCK;
|
|
1462
|
+
blockNumber: number;
|
|
1463
|
+
} | {
|
|
1464
|
+
type: TaskTrigger.TriggerTypeCase.EVENT;
|
|
1465
|
+
blockNumber: number;
|
|
1466
|
+
logIndex: number;
|
|
1467
|
+
txHash: string;
|
|
1468
|
+
};
|
|
1469
|
+
declare class TriggerMetadata {
|
|
1470
|
+
type: TriggerType;
|
|
1471
|
+
blockNumber?: number;
|
|
1472
|
+
epoch?: number;
|
|
1473
|
+
logIndex?: number;
|
|
1474
|
+
txHash?: string;
|
|
1475
|
+
constructor(props: TriggerMetadataProps);
|
|
1476
|
+
static fromResponse(data: TriggerMetadata$1 | undefined): TriggerMetadata | undefined;
|
|
1477
|
+
toRequest(): TriggerMetadata$1;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
type StepProps = Execution$1.Step.AsObject;
|
|
1481
|
+
declare class Step implements StepProps {
|
|
1482
|
+
nodeId: string;
|
|
1483
|
+
success: boolean;
|
|
1484
|
+
outputData: string;
|
|
1485
|
+
log: string;
|
|
1486
|
+
error: string;
|
|
1487
|
+
startAt: number;
|
|
1488
|
+
endAt: number;
|
|
1489
|
+
constructor(props: StepProps);
|
|
1490
|
+
static fromResponse(step: Execution$1.Step): Step;
|
|
1491
|
+
toRequest(): Execution$1.Step;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
type ExecutionProps = Omit<Execution$1.AsObject, "stepsList" | "triggerMetadata"> & {
|
|
1495
|
+
stepsList: Step[];
|
|
1496
|
+
triggerMetadata: TriggerMetadata | undefined;
|
|
1497
|
+
};
|
|
1498
|
+
declare class Execution implements ExecutionProps {
|
|
1499
|
+
id: string;
|
|
1500
|
+
startAt: number;
|
|
1501
|
+
endAt: number;
|
|
1502
|
+
success: boolean;
|
|
1503
|
+
error: string;
|
|
1504
|
+
triggerMetadata: TriggerMetadata | undefined;
|
|
1505
|
+
result: string;
|
|
1506
|
+
stepsList: Step[];
|
|
1507
|
+
constructor(props: ExecutionProps);
|
|
1508
|
+
static fromResponse(execution: Execution$1): Execution;
|
|
1509
|
+
toRequest(): Execution$1;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1257
1512
|
type ContractWriteNodeData = ContractWriteNode$1.AsObject;
|
|
1258
1513
|
type ContractWriteNodeProps = NodeProps & {
|
|
1259
1514
|
data: ContractWriteNodeData;
|
|
@@ -1361,7 +1616,7 @@ declare class EventTrigger extends Trigger {
|
|
|
1361
1616
|
static fromResponse(raw: TaskTrigger): EventTrigger;
|
|
1362
1617
|
}
|
|
1363
1618
|
|
|
1364
|
-
type FixedTimeTriggerDataType =
|
|
1619
|
+
type FixedTimeTriggerDataType = FixedTimeCondition.AsObject;
|
|
1365
1620
|
type FixedTimeTriggerProps = TriggerProps & {
|
|
1366
1621
|
data: FixedTimeTriggerDataType;
|
|
1367
1622
|
};
|
|
@@ -1371,13 +1626,6 @@ declare class FixedTimeTrigger extends Trigger {
|
|
|
1371
1626
|
static fromResponse(raw: TaskTrigger): FixedTimeTrigger;
|
|
1372
1627
|
}
|
|
1373
1628
|
|
|
1374
|
-
type ManualTriggerProps = TriggerProps;
|
|
1375
|
-
declare class ManualTrigger extends Trigger {
|
|
1376
|
-
constructor(props: ManualTriggerProps);
|
|
1377
|
-
toRequest(): TaskTrigger;
|
|
1378
|
-
static fromResponse(raw: TaskTrigger): ManualTrigger;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
1629
|
declare class TriggerFactory {
|
|
1382
1630
|
/**
|
|
1383
1631
|
* Static factory method to create Trigger instances
|
|
@@ -1386,7 +1634,7 @@ declare class TriggerFactory {
|
|
|
1386
1634
|
*/
|
|
1387
1635
|
static create(props: TriggerProps): Trigger;
|
|
1388
1636
|
/**
|
|
1389
|
-
* Create an instance of Trigger from AVS
|
|
1637
|
+
* Create an instance of Trigger from AVS getWorkflow or getWorkflows response
|
|
1390
1638
|
* @param trigger
|
|
1391
1639
|
* @returns
|
|
1392
1640
|
*/
|
|
@@ -1395,67 +1643,173 @@ declare class TriggerFactory {
|
|
|
1395
1643
|
|
|
1396
1644
|
type Environment = "production" | "development" | "staging";
|
|
1397
1645
|
declare const AUTH_KEY_HEADER = "authkey";
|
|
1646
|
+
declare const DEFAULT_LIMIT = 10;
|
|
1398
1647
|
interface RequestOptions {
|
|
1399
|
-
authKey
|
|
1648
|
+
authKey?: string;
|
|
1400
1649
|
}
|
|
1401
|
-
interface
|
|
1402
|
-
|
|
1650
|
+
interface GetExecutionsRequest extends RequestOptions {
|
|
1651
|
+
cursor?: string;
|
|
1652
|
+
limit?: number;
|
|
1403
1653
|
}
|
|
1404
|
-
interface
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
interface CreateTaskResponse {
|
|
1408
|
-
id: string;
|
|
1409
|
-
}
|
|
1410
|
-
interface ListTasksResponse {
|
|
1411
|
-
tasks: {
|
|
1412
|
-
id: string;
|
|
1413
|
-
status: string;
|
|
1414
|
-
}[];
|
|
1654
|
+
interface GetWorkflowsRequest extends RequestOptions {
|
|
1655
|
+
cursor?: string;
|
|
1656
|
+
limit?: number;
|
|
1415
1657
|
}
|
|
1416
|
-
interface
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
interface DeleteTaskResponse {
|
|
1420
|
-
value: boolean;
|
|
1421
|
-
}
|
|
1422
|
-
interface SmartWallet {
|
|
1423
|
-
address: string;
|
|
1424
|
-
salt: string;
|
|
1425
|
-
factory: string;
|
|
1658
|
+
interface GetKeyResponse {
|
|
1659
|
+
authKey: string;
|
|
1426
1660
|
}
|
|
1427
|
-
interface
|
|
1661
|
+
interface GetWalletRequest {
|
|
1428
1662
|
salt: string;
|
|
1429
1663
|
factoryAddress?: string;
|
|
1430
1664
|
}
|
|
1431
|
-
interface
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
txHash?: string;
|
|
1435
|
-
epoch?: number;
|
|
1665
|
+
interface ClientOption {
|
|
1666
|
+
endpoint: string;
|
|
1667
|
+
factoryAddress?: string;
|
|
1436
1668
|
}
|
|
1669
|
+
type SmartWallet = SmartWallet$1.AsObject;
|
|
1437
1670
|
|
|
1438
1671
|
declare class BaseClient {
|
|
1439
1672
|
readonly endpoint: string;
|
|
1440
1673
|
readonly rpcClient: AggregatorClient;
|
|
1441
1674
|
protected metadata: Metadata;
|
|
1675
|
+
protected factoryAddress?: string;
|
|
1676
|
+
protected authKey?: string;
|
|
1442
1677
|
constructor(opts: ClientOption);
|
|
1678
|
+
/**
|
|
1679
|
+
* Check if the auth key is valid by decoding the JWT token and checking the expiration
|
|
1680
|
+
* @param key - The auth key
|
|
1681
|
+
* @returns {boolean} - Whether the auth key is valid
|
|
1682
|
+
*/
|
|
1443
1683
|
isAuthKeyValid(key: string): boolean;
|
|
1684
|
+
/**
|
|
1685
|
+
* The API key could retrieve a wallet’s authKey by skipping its signature verification
|
|
1686
|
+
* @param address - The address of the EOA wallet
|
|
1687
|
+
* @param apiKey - The API key
|
|
1688
|
+
* @param expiredAtEpoch - The expiration epoch
|
|
1689
|
+
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
1690
|
+
*/
|
|
1444
1691
|
authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Getting an authKey from the server by verifying the signature of an EOA wallet
|
|
1694
|
+
* @param address - The address of the EOA wallet
|
|
1695
|
+
* @param signature - The signature of the EOA wallet
|
|
1696
|
+
* @param expiredAtEpoch - The expiration epoch
|
|
1697
|
+
* @returns {Promise<GetKeyResponse>} - The response from the auth call
|
|
1698
|
+
*/
|
|
1445
1699
|
authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
|
|
1446
|
-
|
|
1447
|
-
|
|
1700
|
+
/**
|
|
1701
|
+
* The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
|
|
1702
|
+
* The authKey can be overridden at the request level by request options
|
|
1703
|
+
* @param authKey - The auth key
|
|
1704
|
+
*/
|
|
1705
|
+
setAuthKey(authKey: string | undefined): void;
|
|
1706
|
+
/**
|
|
1707
|
+
* Get the auth key if it’s set in the client
|
|
1708
|
+
* @returns {string | undefined} - The auth key
|
|
1709
|
+
*/
|
|
1710
|
+
getAuthKey(): string | undefined;
|
|
1711
|
+
/**
|
|
1712
|
+
* Set the factory address of smart wallets for the client
|
|
1713
|
+
* @param address - The factory address
|
|
1714
|
+
*/
|
|
1715
|
+
setFactoryAddress(address: string): void;
|
|
1716
|
+
/**
|
|
1717
|
+
* Get the factory address if it’s set in the client
|
|
1718
|
+
* @returns {string | undefined} - The factory address
|
|
1719
|
+
*/
|
|
1720
|
+
getFactoryAddress(): string | undefined;
|
|
1721
|
+
/**
|
|
1722
|
+
* Send a gRPC request with an auth key
|
|
1723
|
+
* @param method - The method name
|
|
1724
|
+
* @param request - The request message
|
|
1725
|
+
* @param options - The request options
|
|
1726
|
+
* @returns {Promise<TResponse>} - The response from the gRPC call
|
|
1727
|
+
*/
|
|
1728
|
+
protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
1448
1729
|
}
|
|
1449
1730
|
declare class Client extends BaseClient {
|
|
1450
1731
|
constructor(config: ClientOption);
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1732
|
+
/**
|
|
1733
|
+
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
1734
|
+
* @param {RequestOptions} options - Request options
|
|
1735
|
+
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
1736
|
+
*/
|
|
1737
|
+
getWallets(options?: RequestOptions): Promise<SmartWallet[]>;
|
|
1738
|
+
/**
|
|
1739
|
+
* Add a new smart wallet address to the wallet list
|
|
1740
|
+
* @param {string} salt - The salt for the wallet
|
|
1741
|
+
* @param {string} factoryAddress - Factory address for the wallet; if not provided, the address stored in the client will be used
|
|
1742
|
+
* @param {RequestOptions} options - Request options
|
|
1743
|
+
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
1744
|
+
*/
|
|
1745
|
+
getWallet({ salt, factoryAddress }: GetWalletRequest, options?: RequestOptions): Promise<SmartWallet>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Submit a workflow to the AVS server; once the workflow is submitted, it cannot be modified
|
|
1748
|
+
* @param {Workflow} workflow - Workflow object to submit
|
|
1749
|
+
* @param {RequestOptions} options - Request options
|
|
1750
|
+
* @returns {Promise<string>} - The Id of the submitted workflow
|
|
1751
|
+
*/
|
|
1752
|
+
submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
|
|
1454
1753
|
createWorkflow(props: WorkflowProps): Workflow;
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1754
|
+
/**
|
|
1755
|
+
* Get the list of workflows; new workflows can be created by calling `submitWorkflow`
|
|
1756
|
+
* @param {string} address - The address of the smart wallet
|
|
1757
|
+
* @param {string} cursor - The cursor for the list
|
|
1758
|
+
* @param {number} limit - The limit for the list
|
|
1759
|
+
* @param {RequestOptions} options - Request options
|
|
1760
|
+
* @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
|
|
1761
|
+
*/
|
|
1762
|
+
getWorkflows(address: string, options?: GetWorkflowsRequest): Promise<{
|
|
1763
|
+
cursor: string;
|
|
1764
|
+
result: Workflow[];
|
|
1765
|
+
}>;
|
|
1766
|
+
/**
|
|
1767
|
+
* Get the list of executions for a workflow
|
|
1768
|
+
* @param {string} workflowId - The Id of the workflow
|
|
1769
|
+
* @param {GetExecutionsRequest} options - Request options
|
|
1770
|
+
* @param {string} [options.cursor] - The cursor for pagination
|
|
1771
|
+
* @param {number} [options.limit] - The page limit of the response; default is 10
|
|
1772
|
+
* @param {string} [options.authKey] - The auth key for the request
|
|
1773
|
+
* @returns {Promise<{ cursor: string; result: Execution[] }>} - The list of Executions
|
|
1774
|
+
*/
|
|
1775
|
+
getExecutions(workflowId: string, options?: GetExecutionsRequest): Promise<{
|
|
1776
|
+
cursor: string;
|
|
1777
|
+
result: Execution[];
|
|
1778
|
+
}>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Get a workflow by its Id
|
|
1781
|
+
* @param {string} id - The Id of the workflow
|
|
1782
|
+
* @param {RequestOptions} options - Request options
|
|
1783
|
+
* @returns {Promise<Workflow>} - The Workflow object
|
|
1784
|
+
*/
|
|
1785
|
+
getWorkflow(id: string, options?: RequestOptions): Promise<Workflow>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Manually trigger a workflow by its Id, and manual trigger data input
|
|
1788
|
+
* @param id - The Id of the workflow
|
|
1789
|
+
* @param triggerData - The data of the trigger
|
|
1790
|
+
* @param isBlocking - Whether the trigger is blocking
|
|
1791
|
+
* @param options - Request options
|
|
1792
|
+
* @returns {Promise<avs_pb.UserTriggerTaskResp>} - The response from the trigger workflow call
|
|
1793
|
+
*/
|
|
1794
|
+
triggerWorkflow({ id, data, isBlocking, }: {
|
|
1795
|
+
id: string;
|
|
1796
|
+
data: TriggerMetadataProps;
|
|
1797
|
+
isBlocking: boolean;
|
|
1798
|
+
}, options?: RequestOptions): Promise<UserTriggerTaskResp.AsObject>;
|
|
1799
|
+
/**
|
|
1800
|
+
* Cancel a workflow by its Id
|
|
1801
|
+
* @param {string} id - The Id of the workflow
|
|
1802
|
+
* @param {RequestOptions} options - Request options
|
|
1803
|
+
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
1804
|
+
*/
|
|
1805
|
+
cancelWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
1806
|
+
/**
|
|
1807
|
+
* Delete a workflow by its Id
|
|
1808
|
+
* @param {string} id - The Id of the workflow
|
|
1809
|
+
* @param {RequestOptions} options - Request options
|
|
1810
|
+
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
1811
|
+
*/
|
|
1812
|
+
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
1459
1813
|
}
|
|
1460
1814
|
|
|
1461
|
-
export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type
|
|
1815
|
+
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 NodeType, NodeTypes, type RequestOptions, RestAPINode, type RestAPINodeProps, type SmartWallet, Trigger, TriggerFactory, type TriggerProps, type TriggerType, TriggerTypes, Workflow, type WorkflowProps, type WorkflowStatus, WorkflowStatuses, Client as default, getKeyRequestMessage };
|