@avaprotocol/sdk-js 1.3.4-dev.2 → 1.3.4

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 CHANGED
@@ -3,9 +3,7 @@ import { Metadata } from '@grpc/grpc-js';
3
3
  import * as jspb from 'google-protobuf';
4
4
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
5
5
  import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb';
6
- import { NodeType } from '@avaprotocol/types';
7
-
8
- declare const getKeyRequestMessage: (chainId: number, address: string, issuedAt: Date, expiredAt: Date) => string;
6
+ import { NodeType, GetKeyRequestApiKey, GetKeyResponse, GetKeyRequestSignature } from '@avaprotocol/types';
9
7
 
10
8
  // package: aggregator
11
9
  // file: avs.proto
@@ -97,6 +95,10 @@ declare namespace BlockCondition {
97
95
  }
98
96
 
99
97
  declare class EventCondition extends jspb.Message {
98
+ clearMatcherList(): void;
99
+ getMatcherList(): Array<EventCondition.Matcher>;
100
+ setMatcherList(value: Array<EventCondition.Matcher>): EventCondition;
101
+ addMatcher(value?: EventCondition.Matcher, index?: number): EventCondition.Matcher;
100
102
  getExpression(): string;
101
103
  setExpression(value: string): EventCondition;
102
104
 
@@ -112,6 +114,7 @@ declare class EventCondition extends jspb.Message {
112
114
 
113
115
  declare namespace EventCondition {
114
116
  export type AsObject = {
117
+ matcherList: Array<EventCondition.Matcher.AsObject>,
115
118
  expression: string,
116
119
  }
117
120
 
@@ -264,8 +267,6 @@ declare class ContractReadNode$1 extends jspb.Message {
264
267
  setCallData(value: string): ContractReadNode$1;
265
268
  getContractAbi(): string;
266
269
  setContractAbi(value: string): ContractReadNode$1;
267
- getMethod(): string;
268
- setMethod(value: string): ContractReadNode$1;
269
270
 
270
271
  serializeBinary(): Uint8Array;
271
272
  toObject(includeInstance?: boolean): ContractReadNode$1.AsObject;
@@ -282,7 +283,6 @@ declare namespace ContractReadNode$1 {
282
283
  contractAddress: string,
283
284
  callData: string,
284
285
  contractAbi: string,
285
- method: string,
286
286
  }
287
287
  }
288
288
 
@@ -416,23 +416,23 @@ declare namespace BranchNode$1 {
416
416
  }
417
417
  }
418
418
 
419
- declare class FilterNode extends jspb.Message {
419
+ declare class FilterNode$1 extends jspb.Message {
420
420
  getExpression(): string;
421
- setExpression(value: string): FilterNode;
421
+ setExpression(value: string): FilterNode$1;
422
422
  getInput(): string;
423
- setInput(value: string): FilterNode;
423
+ setInput(value: string): FilterNode$1;
424
424
 
425
425
  serializeBinary(): Uint8Array;
426
- toObject(includeInstance?: boolean): FilterNode.AsObject;
427
- static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject;
426
+ toObject(includeInstance?: boolean): FilterNode$1.AsObject;
427
+ static toObject(includeInstance: boolean, msg: FilterNode$1): FilterNode$1.AsObject;
428
428
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
429
429
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
430
- static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void;
431
- static deserializeBinary(bytes: Uint8Array): FilterNode;
432
- static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode;
430
+ static serializeBinaryToWriter(message: FilterNode$1, writer: jspb.BinaryWriter): void;
431
+ static deserializeBinary(bytes: Uint8Array): FilterNode$1;
432
+ static deserializeBinaryFromReader(message: FilterNode$1, reader: jspb.BinaryReader): FilterNode$1;
433
433
  }
434
434
 
435
- declare namespace FilterNode {
435
+ declare namespace FilterNode$1 {
436
436
  export type AsObject = {
437
437
  expression: string,
438
438
  input: string,
@@ -578,8 +578,8 @@ declare class TaskNode extends jspb.Message {
578
578
 
579
579
  hasFilter(): boolean;
580
580
  clearFilter(): void;
581
- getFilter(): FilterNode | undefined;
582
- setFilter(value?: FilterNode): TaskNode;
581
+ getFilter(): FilterNode$1 | undefined;
582
+ setFilter(value?: FilterNode$1): TaskNode;
583
583
 
584
584
  hasLoop(): boolean;
585
585
  clearLoop(): void;
@@ -613,7 +613,7 @@ declare namespace TaskNode {
613
613
  graphqlQuery?: GraphQLQueryNode$1.AsObject,
614
614
  restApi?: RestAPINode$1.AsObject,
615
615
  branch?: BranchNode$1.AsObject,
616
- filter?: FilterNode.AsObject,
616
+ filter?: FilterNode$1.AsObject,
617
617
  loop?: LoopNode.AsObject,
618
618
  customCode?: CustomCodeNode$1.AsObject,
619
619
  }
@@ -1307,6 +1307,16 @@ declare class GetWalletResp extends jspb.Message {
1307
1307
  setSalt(value: string): GetWalletResp;
1308
1308
  getFactoryAddress(): string;
1309
1309
  setFactoryAddress(value: string): GetWalletResp;
1310
+ getTotalTaskCount(): number;
1311
+ setTotalTaskCount(value: number): GetWalletResp;
1312
+ getActiveTaskCount(): number;
1313
+ setActiveTaskCount(value: number): GetWalletResp;
1314
+ getCompletedTaskCount(): number;
1315
+ setCompletedTaskCount(value: number): GetWalletResp;
1316
+ getFailedTaskCount(): number;
1317
+ setFailedTaskCount(value: number): GetWalletResp;
1318
+ getCanceledTaskCount(): number;
1319
+ setCanceledTaskCount(value: number): GetWalletResp;
1310
1320
 
1311
1321
  serializeBinary(): Uint8Array;
1312
1322
  toObject(includeInstance?: boolean): GetWalletResp.AsObject;
@@ -1323,6 +1333,11 @@ declare namespace GetWalletResp {
1323
1333
  address: string,
1324
1334
  salt: string,
1325
1335
  factoryAddress: string,
1336
+ totalTaskCount: number,
1337
+ activeTaskCount: number,
1338
+ completedTaskCount: number,
1339
+ failedTaskCount: number,
1340
+ canceledTaskCount: number,
1326
1341
  }
1327
1342
  }
1328
1343
 
@@ -1378,6 +1393,134 @@ declare namespace UserTriggerTaskResp {
1378
1393
  }
1379
1394
  }
1380
1395
 
1396
+ declare class CreateOrUpdateSecretReq extends jspb.Message {
1397
+ getName(): string;
1398
+ setName(value: string): CreateOrUpdateSecretReq;
1399
+ getSecret(): string;
1400
+ setSecret(value: string): CreateOrUpdateSecretReq;
1401
+ getWorkflowId(): string;
1402
+ setWorkflowId(value: string): CreateOrUpdateSecretReq;
1403
+ getOrgId(): string;
1404
+ setOrgId(value: string): CreateOrUpdateSecretReq;
1405
+
1406
+ serializeBinary(): Uint8Array;
1407
+ toObject(includeInstance?: boolean): CreateOrUpdateSecretReq.AsObject;
1408
+ static toObject(includeInstance: boolean, msg: CreateOrUpdateSecretReq): CreateOrUpdateSecretReq.AsObject;
1409
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1410
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1411
+ static serializeBinaryToWriter(message: CreateOrUpdateSecretReq, writer: jspb.BinaryWriter): void;
1412
+ static deserializeBinary(bytes: Uint8Array): CreateOrUpdateSecretReq;
1413
+ static deserializeBinaryFromReader(message: CreateOrUpdateSecretReq, reader: jspb.BinaryReader): CreateOrUpdateSecretReq;
1414
+ }
1415
+
1416
+ declare namespace CreateOrUpdateSecretReq {
1417
+ export type AsObject = {
1418
+ name: string,
1419
+ secret: string,
1420
+ workflowId: string,
1421
+ orgId: string,
1422
+ }
1423
+ }
1424
+
1425
+ declare class ListSecretsReq extends jspb.Message {
1426
+ getWorkflowId(): string;
1427
+ setWorkflowId(value: string): ListSecretsReq;
1428
+
1429
+ serializeBinary(): Uint8Array;
1430
+ toObject(includeInstance?: boolean): ListSecretsReq.AsObject;
1431
+ static toObject(includeInstance: boolean, msg: ListSecretsReq): ListSecretsReq.AsObject;
1432
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1433
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1434
+ static serializeBinaryToWriter(message: ListSecretsReq, writer: jspb.BinaryWriter): void;
1435
+ static deserializeBinary(bytes: Uint8Array): ListSecretsReq;
1436
+ static deserializeBinaryFromReader(message: ListSecretsReq, reader: jspb.BinaryReader): ListSecretsReq;
1437
+ }
1438
+
1439
+ declare namespace ListSecretsReq {
1440
+ export type AsObject = {
1441
+ workflowId: string,
1442
+ }
1443
+ }
1444
+
1445
+ declare class ListSecretsResp extends jspb.Message {
1446
+ clearItemsList(): void;
1447
+ getItemsList(): Array<ListSecretsResp.ResponseSecret>;
1448
+ setItemsList(value: Array<ListSecretsResp.ResponseSecret>): ListSecretsResp;
1449
+ addItems(value?: ListSecretsResp.ResponseSecret, index?: number): ListSecretsResp.ResponseSecret;
1450
+
1451
+ serializeBinary(): Uint8Array;
1452
+ toObject(includeInstance?: boolean): ListSecretsResp.AsObject;
1453
+ static toObject(includeInstance: boolean, msg: ListSecretsResp): ListSecretsResp.AsObject;
1454
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1455
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1456
+ static serializeBinaryToWriter(message: ListSecretsResp, writer: jspb.BinaryWriter): void;
1457
+ static deserializeBinary(bytes: Uint8Array): ListSecretsResp;
1458
+ static deserializeBinaryFromReader(message: ListSecretsResp, reader: jspb.BinaryReader): ListSecretsResp;
1459
+ }
1460
+
1461
+ declare namespace ListSecretsResp {
1462
+ export type AsObject = {
1463
+ itemsList: Array<ListSecretsResp.ResponseSecret.AsObject>,
1464
+ }
1465
+
1466
+
1467
+ export class ResponseSecret extends jspb.Message {
1468
+ getName(): string;
1469
+ setName(value: string): ResponseSecret;
1470
+ getScope(): string;
1471
+ setScope(value: string): ResponseSecret;
1472
+ getWorkflowId(): string;
1473
+ setWorkflowId(value: string): ResponseSecret;
1474
+ getOrgId(): string;
1475
+ setOrgId(value: string): ResponseSecret;
1476
+
1477
+ serializeBinary(): Uint8Array;
1478
+ toObject(includeInstance?: boolean): ResponseSecret.AsObject;
1479
+ static toObject(includeInstance: boolean, msg: ResponseSecret): ResponseSecret.AsObject;
1480
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1481
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1482
+ static serializeBinaryToWriter(message: ResponseSecret, writer: jspb.BinaryWriter): void;
1483
+ static deserializeBinary(bytes: Uint8Array): ResponseSecret;
1484
+ static deserializeBinaryFromReader(message: ResponseSecret, reader: jspb.BinaryReader): ResponseSecret;
1485
+ }
1486
+
1487
+ export namespace ResponseSecret {
1488
+ export type AsObject = {
1489
+ name: string,
1490
+ scope: string,
1491
+ workflowId: string,
1492
+ orgId: string,
1493
+ }
1494
+ }
1495
+
1496
+ }
1497
+
1498
+ declare class DeleteSecretReq extends jspb.Message {
1499
+ getName(): string;
1500
+ setName(value: string): DeleteSecretReq;
1501
+ getWorkflowId(): string;
1502
+ setWorkflowId(value: string): DeleteSecretReq;
1503
+ getOrgId(): string;
1504
+ setOrgId(value: string): DeleteSecretReq;
1505
+
1506
+ serializeBinary(): Uint8Array;
1507
+ toObject(includeInstance?: boolean): DeleteSecretReq.AsObject;
1508
+ static toObject(includeInstance: boolean, msg: DeleteSecretReq): DeleteSecretReq.AsObject;
1509
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1510
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1511
+ static serializeBinaryToWriter(message: DeleteSecretReq, writer: jspb.BinaryWriter): void;
1512
+ static deserializeBinary(bytes: Uint8Array): DeleteSecretReq;
1513
+ static deserializeBinaryFromReader(message: DeleteSecretReq, reader: jspb.BinaryReader): DeleteSecretReq;
1514
+ }
1515
+
1516
+ declare namespace DeleteSecretReq {
1517
+ export type AsObject = {
1518
+ name: string,
1519
+ workflowId: string,
1520
+ orgId: string,
1521
+ }
1522
+ }
1523
+
1381
1524
  declare enum TaskStatus {
1382
1525
  ACTIVE = 0,
1383
1526
  COMPLETED = 1,
@@ -1440,6 +1583,18 @@ interface IAggregatorClient {
1440
1583
  triggerTask(request: UserTriggerTaskReq, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1441
1584
  triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1442
1585
  triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1586
+ createSecret(request: CreateOrUpdateSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1587
+ createSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1588
+ createSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1589
+ deleteSecret(request: DeleteSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1590
+ deleteSecret(request: DeleteSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1591
+ deleteSecret(request: DeleteSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1592
+ listSecrets(request: ListSecretsReq, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1593
+ listSecrets(request: ListSecretsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1594
+ listSecrets(request: ListSecretsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1595
+ updateSecret(request: CreateOrUpdateSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1596
+ updateSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1597
+ updateSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1443
1598
  }
1444
1599
 
1445
1600
  declare class AggregatorClient extends grpc.Client implements IAggregatorClient {
@@ -1483,9 +1638,21 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
1483
1638
  public triggerTask(request: UserTriggerTaskReq, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1484
1639
  public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1485
1640
  public triggerTask(request: UserTriggerTaskReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: UserTriggerTaskResp) => void): grpc.ClientUnaryCall;
1486
- }
1487
-
1488
- 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;
1641
+ public createSecret(request: CreateOrUpdateSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1642
+ public createSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1643
+ public createSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1644
+ public deleteSecret(request: DeleteSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1645
+ public deleteSecret(request: DeleteSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1646
+ public deleteSecret(request: DeleteSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1647
+ public listSecrets(request: ListSecretsReq, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1648
+ public listSecrets(request: ListSecretsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1649
+ public listSecrets(request: ListSecretsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: ListSecretsResp) => void): grpc.ClientUnaryCall;
1650
+ public updateSecret(request: CreateOrUpdateSecretReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1651
+ public updateSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1652
+ public updateSecret(request: CreateOrUpdateSecretReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall;
1653
+ }
1654
+
1655
+ type NodeData = ETHTransferNode$1.AsObject | ContractWriteNode$1.AsObject | ContractReadNode$1.AsObject | GraphQLQueryNode$1.AsObject | RestAPINode$1.AsObject | BranchNode$1.AsObject | FilterNode$1.AsObject | LoopNode.AsObject | CustomCodeNode$1.AsObject;
1489
1656
  type NodeProps = Omit<TaskNode.AsObject, "ethTransfer" | "contractWrite" | "contractRead" | "graphqlDataQuery" | "restApi" | "branch" | "filter" | "loop" | "customCode"> & {
1490
1657
  type: NodeType;
1491
1658
  data: NodeData;
@@ -1497,7 +1664,6 @@ declare class Node implements NodeProps {
1497
1664
  data: NodeData;
1498
1665
  constructor(props: NodeProps);
1499
1666
  toRequest(): TaskNode;
1500
- toJson(): Record<string, any>;
1501
1667
  }
1502
1668
 
1503
1669
  type EdgeProps = TaskEdge.AsObject;
@@ -1508,7 +1674,6 @@ declare class Edge implements EdgeProps {
1508
1674
  constructor(edge: EdgeProps);
1509
1675
  static fromResponse(edge: TaskEdge): Edge;
1510
1676
  toRequest(): TaskEdge;
1511
- toJson(): Record<string, any>;
1512
1677
  }
1513
1678
 
1514
1679
  type Environment = "production" | "development" | "staging";
@@ -1525,9 +1690,6 @@ interface GetWorkflowsRequest extends RequestOptions {
1525
1690
  cursor?: string;
1526
1691
  limit?: number;
1527
1692
  }
1528
- interface GetKeyResponse {
1529
- authKey: string;
1530
- }
1531
1693
  interface GetWalletRequest {
1532
1694
  salt: string;
1533
1695
  factoryAddress?: string;
@@ -1551,10 +1713,29 @@ declare enum TriggerType {
1551
1713
  Event = "event",
1552
1714
  Unset = "unset"
1553
1715
  }
1554
- type SmartWallet = SmartWallet$1.AsObject;
1716
+ type SmartWallet = SmartWallet$1.AsObject & {
1717
+ totalTaskCount?: number;
1718
+ activeTaskCount?: number;
1719
+ completedTaskCount?: number;
1720
+ failedTaskCount?: number;
1721
+ canceledTaskCount?: number;
1722
+ };
1555
1723
  declare const ExecutionStatus: typeof ExecutionStatus$1;
1724
+ interface ListSecretResponse {
1725
+ name: string;
1726
+ workflowId: string;
1727
+ orgId: string;
1728
+ }
1729
+ interface ListSecretRequest {
1730
+ workflowId?: string;
1731
+ }
1732
+ interface DeleteSecretRequest {
1733
+ name: string;
1734
+ workflowId: string;
1735
+ orgId: string;
1736
+ }
1556
1737
 
1557
- type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject;
1738
+ type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
1558
1739
  type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
1559
1740
  type: TriggerType;
1560
1741
  data: TriggerData;
@@ -1570,7 +1751,6 @@ declare class Trigger implements TriggerProps {
1570
1751
  */
1571
1752
  constructor(props: TriggerProps);
1572
1753
  toRequest(): TaskTrigger;
1573
- toJson(): Record<string, any>;
1574
1754
  }
1575
1755
 
1576
1756
  type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "name" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
@@ -1752,6 +1932,16 @@ declare class BranchNode extends Node {
1752
1932
  toRequest(): TaskNode;
1753
1933
  }
1754
1934
 
1935
+ type FilterNodeData = FilterNode$1.AsObject;
1936
+ type FilterNodeProps = NodeProps & {
1937
+ data: FilterNodeData;
1938
+ };
1939
+ declare class FilterNode extends Node {
1940
+ constructor(props: FilterNodeProps);
1941
+ static fromResponse(raw: TaskNode): FilterNode;
1942
+ toRequest(): TaskNode;
1943
+ }
1944
+
1755
1945
  declare class NodeFactory {
1756
1946
  static create(props: NodeProps): Node;
1757
1947
  static createNodes(props: NodeProps[]): Node[];
@@ -1778,7 +1968,13 @@ declare class CronTrigger extends Trigger {
1778
1968
  static fromResponse(raw: TaskTrigger): CronTrigger;
1779
1969
  }
1780
1970
 
1781
- type EventTriggerDataType = Pick<EventCondition.AsObject, "expression">;
1971
+ interface EventMatcher {
1972
+ type: string;
1973
+ value: string[];
1974
+ }
1975
+ type EventTriggerDataType = EventCondition.AsObject & {
1976
+ matcher?: EventMatcher[];
1977
+ };
1782
1978
  type EventTriggerProps = TriggerProps & {
1783
1979
  data: EventTriggerDataType;
1784
1980
  };
@@ -1813,6 +2009,16 @@ declare class TriggerFactory {
1813
2009
  static fromResponse(raw: TaskTrigger): Trigger;
1814
2010
  }
1815
2011
 
2012
+ type SecretProps = CreateOrUpdateSecretReq.AsObject;
2013
+ declare class Secret implements SecretProps {
2014
+ name: string;
2015
+ secret: string;
2016
+ workflowId: string;
2017
+ orgId: string;
2018
+ constructor(props: SecretProps);
2019
+ toRequest(): CreateOrUpdateSecretReq;
2020
+ }
2021
+
1816
2022
  declare class BaseClient {
1817
2023
  readonly endpoint: string;
1818
2024
  readonly rpcClient: AggregatorClient;
@@ -1828,32 +2034,24 @@ declare class BaseClient {
1828
2034
  isAuthKeyValid(key: string): boolean;
1829
2035
  /**
1830
2036
  * The API key could retrieve a wallet’s authKey by skipping its signature verification
2037
+ * @param chainId - The chain id
1831
2038
  * @param address - The address of the EOA wallet
2039
+ * @param issuedAt - The issued at timestamp
2040
+ * @param expiredAt - The expiration timestamp
1832
2041
  * @param apiKey - The API key
1833
- * @param expiredAtEpoch - The expiration epoch
1834
2042
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
1835
2043
  */
1836
- authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: {
1837
- chainId: number;
1838
- address: string;
1839
- issuedAt: Date;
1840
- expiredAt: Date;
1841
- apiKey: string;
1842
- }): Promise<GetKeyResponse>;
2044
+ authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: GetKeyRequestApiKey): Promise<GetKeyResponse>;
1843
2045
  /**
1844
2046
  * Getting an authKey from the server by verifying the signature of an EOA wallet
2047
+ * @param chainId - The chain id
1845
2048
  * @param address - The address of the EOA wallet
2049
+ * @param issuedAt - The issued at timestamp
2050
+ * @param expiredAt - The expiration timestamp
1846
2051
  * @param signature - The signature of the EOA wallet
1847
- * @param expiredAtEpoch - The expiration epoch
1848
2052
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
1849
2053
  */
1850
- authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: {
1851
- chainId: number;
1852
- address: string;
1853
- issuedAt: Date;
1854
- expiredAt: Date;
1855
- signature: string;
1856
- }): Promise<GetKeyResponse>;
2054
+ authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: GetKeyRequestSignature): Promise<GetKeyResponse>;
1857
2055
  /**
1858
2056
  * The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
1859
2057
  * The authKey can be overridden at the request level by request options
@@ -1988,6 +2186,10 @@ declare class Client extends BaseClient {
1988
2186
  * @returns {Promise<boolean>} - Whether the workflow was successfully deleted
1989
2187
  */
1990
2188
  deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
2189
+ createSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
2190
+ listSecrets(params: ListSecretRequest, options?: RequestOptions): Promise<ListSecretResponse[]>;
2191
+ deleteSecret(params: DeleteSecretRequest, options?: RequestOptions): Promise<boolean>;
2192
+ updateSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
1991
2193
  }
1992
2194
 
1993
- 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 };
2195
+ export { AUTH_KEY_HEADER, BlockTrigger, type BlockTriggerDataType, type BlockTriggerProps, BranchNode, type BranchNodeData, type BranchNodeProps, type ClientOption, ContractReadNode, type ContractReadNodeData, type ContractReadNodeProps, ContractWriteNode, type ContractWriteNodeData, type ContractWriteNodeProps, CronTrigger, type CronTriggerDataType, type CronTriggerProps, CustomCodeLangs, CustomCodeNode, type CustomCodeNodeData, type CustomCodeNodeProps, DEFAULT_LIMIT, type DeleteSecretRequest, ETHTransferNode, type ETHTransferNodeData, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerDataType, type EventTriggerProps, Execution, ExecutionStatus, FilterNode, type FilterNodeData, type FilterNodeProps, FixedTimeTrigger, type FixedTimeTriggerDataType, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeData, type GraphQLQueryNodeProps, type ListSecretRequest, type ListSecretResponse, Node, NodeFactory, type NodeProps, type RequestOptions, RestAPINode, type RestAPINodeData, type RestAPINodeProps, Secret, type SmartWallet, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default };