@avaprotocol/sdk-js 1.2.1-dev.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1433,8 +1433,48 @@ declare class Edge implements EdgeProps {
1433
1433
  toRequest(): TaskEdge;
1434
1434
  }
1435
1435
 
1436
- declare const TriggerTypes: typeof TaskTrigger.TriggerTypeCase;
1437
- type TriggerType = TaskTrigger.TriggerTypeCase;
1436
+ type Environment = "production" | "development" | "staging";
1437
+ declare const AUTH_KEY_HEADER = "authkey";
1438
+ declare const DEFAULT_LIMIT = 10;
1439
+ interface RequestOptions {
1440
+ authKey?: string;
1441
+ }
1442
+ interface GetExecutionsRequest extends RequestOptions {
1443
+ cursor?: string;
1444
+ limit?: number;
1445
+ }
1446
+ interface GetWorkflowsRequest extends RequestOptions {
1447
+ cursor?: string;
1448
+ limit?: number;
1449
+ }
1450
+ interface GetKeyResponse {
1451
+ authKey: string;
1452
+ }
1453
+ interface GetWalletRequest {
1454
+ salt: string;
1455
+ factoryAddress?: string;
1456
+ }
1457
+ interface ClientOption {
1458
+ endpoint: string;
1459
+ factoryAddress?: string;
1460
+ }
1461
+ declare enum WorkflowStatus {
1462
+ Active = "active",
1463
+ Completed = "completed",
1464
+ Failed = "failed",
1465
+ Canceled = "canceled",
1466
+ Executing = "executing"
1467
+ }
1468
+ declare enum TriggerType {
1469
+ Manual = "manual",
1470
+ FixedTime = "fixed_time",
1471
+ Cron = "cron",
1472
+ Block = "block",
1473
+ Event = "event",
1474
+ Unset = "unset"
1475
+ }
1476
+ type SmartWallet = SmartWallet$1.AsObject;
1477
+
1438
1478
  type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
1439
1479
  type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
1440
1480
  type: TriggerType;
@@ -1452,8 +1492,6 @@ declare class Trigger implements TriggerProps {
1452
1492
  toRequest(): TaskTrigger;
1453
1493
  }
1454
1494
 
1455
- declare const WorkflowStatuses: typeof TaskStatus;
1456
- type WorkflowStatus = TaskStatus;
1457
1495
  type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "memo" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
1458
1496
  id?: string;
1459
1497
  owner?: string;
@@ -1501,19 +1539,23 @@ declare class Workflow implements WorkflowProps {
1501
1539
  }
1502
1540
 
1503
1541
  type TriggerMetadataProps = {
1504
- type: TaskTrigger.TriggerTypeCase.FIXED_TIME;
1542
+ type: TriggerType.FixedTime;
1505
1543
  epoch: number;
1506
1544
  } | {
1507
- type: TaskTrigger.TriggerTypeCase.CRON;
1545
+ type: TriggerType.Cron;
1508
1546
  epoch: number;
1509
1547
  } | {
1510
- type: TaskTrigger.TriggerTypeCase.BLOCK;
1548
+ type: TriggerType.Block;
1511
1549
  blockNumber: number;
1512
1550
  } | {
1513
- type: TaskTrigger.TriggerTypeCase.EVENT;
1551
+ type: TriggerType.Event;
1514
1552
  blockNumber: number;
1515
1553
  logIndex: number;
1516
1554
  txHash: string;
1555
+ } | {
1556
+ type: TriggerType.Manual;
1557
+ } | {
1558
+ type: TriggerType.Unset;
1517
1559
  };
1518
1560
  declare class TriggerMetadata {
1519
1561
  type: TriggerType;
@@ -1690,33 +1732,6 @@ declare class TriggerFactory {
1690
1732
  static fromResponse(raw: TaskTrigger): Trigger;
1691
1733
  }
1692
1734
 
1693
- type Environment = "production" | "development" | "staging";
1694
- declare const AUTH_KEY_HEADER = "authkey";
1695
- declare const DEFAULT_LIMIT = 10;
1696
- interface RequestOptions {
1697
- authKey?: string;
1698
- }
1699
- interface GetExecutionsRequest extends RequestOptions {
1700
- cursor?: string;
1701
- limit?: number;
1702
- }
1703
- interface GetWorkflowsRequest extends RequestOptions {
1704
- cursor?: string;
1705
- limit?: number;
1706
- }
1707
- interface GetKeyResponse {
1708
- authKey: string;
1709
- }
1710
- interface GetWalletRequest {
1711
- salt: string;
1712
- factoryAddress?: string;
1713
- }
1714
- interface ClientOption {
1715
- endpoint: string;
1716
- factoryAddress?: string;
1717
- }
1718
- type SmartWallet = SmartWallet$1.AsObject;
1719
-
1720
1735
  declare class BaseClient {
1721
1736
  readonly endpoint: string;
1722
1737
  readonly rpcClient: AggregatorClient;
@@ -1871,4 +1886,4 @@ declare class Client extends BaseClient {
1871
1886
  deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
1872
1887
  }
1873
1888
 
1874
- 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, TriggerType, TriggerTypes, Workflow, type WorkflowProps, type WorkflowStatus, WorkflowStatuses, Client as default, getKeyRequestMessage };
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 NodeType, NodeTypes, 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
@@ -1433,8 +1433,48 @@ declare class Edge implements EdgeProps {
1433
1433
  toRequest(): TaskEdge;
1434
1434
  }
1435
1435
 
1436
- declare const TriggerTypes: typeof TaskTrigger.TriggerTypeCase;
1437
- type TriggerType = TaskTrigger.TriggerTypeCase;
1436
+ type Environment = "production" | "development" | "staging";
1437
+ declare const AUTH_KEY_HEADER = "authkey";
1438
+ declare const DEFAULT_LIMIT = 10;
1439
+ interface RequestOptions {
1440
+ authKey?: string;
1441
+ }
1442
+ interface GetExecutionsRequest extends RequestOptions {
1443
+ cursor?: string;
1444
+ limit?: number;
1445
+ }
1446
+ interface GetWorkflowsRequest extends RequestOptions {
1447
+ cursor?: string;
1448
+ limit?: number;
1449
+ }
1450
+ interface GetKeyResponse {
1451
+ authKey: string;
1452
+ }
1453
+ interface GetWalletRequest {
1454
+ salt: string;
1455
+ factoryAddress?: string;
1456
+ }
1457
+ interface ClientOption {
1458
+ endpoint: string;
1459
+ factoryAddress?: string;
1460
+ }
1461
+ declare enum WorkflowStatus {
1462
+ Active = "active",
1463
+ Completed = "completed",
1464
+ Failed = "failed",
1465
+ Canceled = "canceled",
1466
+ Executing = "executing"
1467
+ }
1468
+ declare enum TriggerType {
1469
+ Manual = "manual",
1470
+ FixedTime = "fixed_time",
1471
+ Cron = "cron",
1472
+ Block = "block",
1473
+ Event = "event",
1474
+ Unset = "unset"
1475
+ }
1476
+ type SmartWallet = SmartWallet$1.AsObject;
1477
+
1438
1478
  type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
1439
1479
  type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
1440
1480
  type: TriggerType;
@@ -1452,8 +1492,6 @@ declare class Trigger implements TriggerProps {
1452
1492
  toRequest(): TaskTrigger;
1453
1493
  }
1454
1494
 
1455
- declare const WorkflowStatuses: typeof TaskStatus;
1456
- type WorkflowStatus = TaskStatus;
1457
1495
  type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "memo" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
1458
1496
  id?: string;
1459
1497
  owner?: string;
@@ -1501,19 +1539,23 @@ declare class Workflow implements WorkflowProps {
1501
1539
  }
1502
1540
 
1503
1541
  type TriggerMetadataProps = {
1504
- type: TaskTrigger.TriggerTypeCase.FIXED_TIME;
1542
+ type: TriggerType.FixedTime;
1505
1543
  epoch: number;
1506
1544
  } | {
1507
- type: TaskTrigger.TriggerTypeCase.CRON;
1545
+ type: TriggerType.Cron;
1508
1546
  epoch: number;
1509
1547
  } | {
1510
- type: TaskTrigger.TriggerTypeCase.BLOCK;
1548
+ type: TriggerType.Block;
1511
1549
  blockNumber: number;
1512
1550
  } | {
1513
- type: TaskTrigger.TriggerTypeCase.EVENT;
1551
+ type: TriggerType.Event;
1514
1552
  blockNumber: number;
1515
1553
  logIndex: number;
1516
1554
  txHash: string;
1555
+ } | {
1556
+ type: TriggerType.Manual;
1557
+ } | {
1558
+ type: TriggerType.Unset;
1517
1559
  };
1518
1560
  declare class TriggerMetadata {
1519
1561
  type: TriggerType;
@@ -1690,33 +1732,6 @@ declare class TriggerFactory {
1690
1732
  static fromResponse(raw: TaskTrigger): Trigger;
1691
1733
  }
1692
1734
 
1693
- type Environment = "production" | "development" | "staging";
1694
- declare const AUTH_KEY_HEADER = "authkey";
1695
- declare const DEFAULT_LIMIT = 10;
1696
- interface RequestOptions {
1697
- authKey?: string;
1698
- }
1699
- interface GetExecutionsRequest extends RequestOptions {
1700
- cursor?: string;
1701
- limit?: number;
1702
- }
1703
- interface GetWorkflowsRequest extends RequestOptions {
1704
- cursor?: string;
1705
- limit?: number;
1706
- }
1707
- interface GetKeyResponse {
1708
- authKey: string;
1709
- }
1710
- interface GetWalletRequest {
1711
- salt: string;
1712
- factoryAddress?: string;
1713
- }
1714
- interface ClientOption {
1715
- endpoint: string;
1716
- factoryAddress?: string;
1717
- }
1718
- type SmartWallet = SmartWallet$1.AsObject;
1719
-
1720
1735
  declare class BaseClient {
1721
1736
  readonly endpoint: string;
1722
1737
  readonly rpcClient: AggregatorClient;
@@ -1871,4 +1886,4 @@ declare class Client extends BaseClient {
1871
1886
  deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
1872
1887
  }
1873
1888
 
1874
- 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, TriggerType, TriggerTypes, Workflow, type WorkflowProps, type WorkflowStatus, WorkflowStatuses, Client as default, getKeyRequestMessage };
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 NodeType, NodeTypes, type RequestOptions, RestAPINode, type RestAPINodeProps, type SmartWallet, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default, getKeyRequestMessage };