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

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: string, expiredAt: string) => 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
 
@@ -238,8 +241,6 @@ declare class ContractWriteNode$1 extends jspb.Message {
238
241
  setCallData(value: string): ContractWriteNode$1;
239
242
  getContractAbi(): string;
240
243
  setContractAbi(value: string): ContractWriteNode$1;
241
- getMethod(): string;
242
- setMethod(value: string): ContractWriteNode$1;
243
244
 
244
245
  serializeBinary(): Uint8Array;
245
246
  toObject(includeInstance?: boolean): ContractWriteNode$1.AsObject;
@@ -256,7 +257,6 @@ declare namespace ContractWriteNode$1 {
256
257
  contractAddress: string,
257
258
  callData: string,
258
259
  contractAbi: string,
259
- method: string,
260
260
  }
261
261
  }
262
262
 
@@ -267,8 +267,6 @@ declare class ContractReadNode$1 extends jspb.Message {
267
267
  setCallData(value: string): ContractReadNode$1;
268
268
  getContractAbi(): string;
269
269
  setContractAbi(value: string): ContractReadNode$1;
270
- getMethod(): string;
271
- setMethod(value: string): ContractReadNode$1;
272
270
 
273
271
  serializeBinary(): Uint8Array;
274
272
  toObject(includeInstance?: boolean): ContractReadNode$1.AsObject;
@@ -285,7 +283,6 @@ declare namespace ContractReadNode$1 {
285
283
  contractAddress: string,
286
284
  callData: string,
287
285
  contractAbi: string,
288
- method: string,
289
286
  }
290
287
  }
291
288
 
@@ -1667,7 +1664,6 @@ declare class Node implements NodeProps {
1667
1664
  data: NodeData;
1668
1665
  constructor(props: NodeProps);
1669
1666
  toRequest(): TaskNode;
1670
- toJson(): Record<string, any>;
1671
1667
  }
1672
1668
 
1673
1669
  type EdgeProps = TaskEdge.AsObject;
@@ -1678,7 +1674,6 @@ declare class Edge implements EdgeProps {
1678
1674
  constructor(edge: EdgeProps);
1679
1675
  static fromResponse(edge: TaskEdge): Edge;
1680
1676
  toRequest(): TaskEdge;
1681
- toJson(): Record<string, any>;
1682
1677
  }
1683
1678
 
1684
1679
  type Environment = "production" | "development" | "staging";
@@ -1695,9 +1690,6 @@ interface GetWorkflowsRequest extends RequestOptions {
1695
1690
  cursor?: string;
1696
1691
  limit?: number;
1697
1692
  }
1698
- interface GetKeyResponse {
1699
- authKey: string;
1700
- }
1701
1693
  interface GetWalletRequest {
1702
1694
  salt: string;
1703
1695
  factoryAddress?: string;
@@ -1731,19 +1723,15 @@ type SmartWallet = SmartWallet$1.AsObject & {
1731
1723
  declare const ExecutionStatus: typeof ExecutionStatus$1;
1732
1724
  interface ListSecretResponse {
1733
1725
  name: string;
1734
- workflowId: string;
1735
- orgId: string;
1736
- }
1737
- interface ListSecretRequest {
1738
1726
  workflowId?: string;
1727
+ orgId?: string;
1739
1728
  }
1740
- interface DeleteSecretRequest {
1741
- name: string;
1742
- workflowId: string;
1743
- orgId: string;
1729
+ interface SecretRequestOptions extends RequestOptions {
1730
+ workflowId?: string;
1731
+ orgId?: string;
1744
1732
  }
1745
1733
 
1746
- type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject;
1734
+ type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
1747
1735
  type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
1748
1736
  type: TriggerType;
1749
1737
  data: TriggerData;
@@ -1759,7 +1747,6 @@ declare class Trigger implements TriggerProps {
1759
1747
  */
1760
1748
  constructor(props: TriggerProps);
1761
1749
  toRequest(): TaskTrigger;
1762
- toJson(): Record<string, any>;
1763
1750
  }
1764
1751
 
1765
1752
  type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "name" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
@@ -1977,7 +1964,13 @@ declare class CronTrigger extends Trigger {
1977
1964
  static fromResponse(raw: TaskTrigger): CronTrigger;
1978
1965
  }
1979
1966
 
1980
- type EventTriggerDataType = Pick<EventCondition.AsObject, "expression">;
1967
+ interface EventMatcher {
1968
+ type: string;
1969
+ value: string[];
1970
+ }
1971
+ type EventTriggerDataType = EventCondition.AsObject & {
1972
+ matcher?: EventMatcher[];
1973
+ };
1981
1974
  type EventTriggerProps = TriggerProps & {
1982
1975
  data: EventTriggerDataType;
1983
1976
  };
@@ -2012,16 +2005,6 @@ declare class TriggerFactory {
2012
2005
  static fromResponse(raw: TaskTrigger): Trigger;
2013
2006
  }
2014
2007
 
2015
- type SecretProps = CreateOrUpdateSecretReq.AsObject;
2016
- declare class Secret implements SecretProps {
2017
- name: string;
2018
- secret: string;
2019
- workflowId: string;
2020
- orgId: string;
2021
- constructor(props: SecretProps);
2022
- toRequest(): CreateOrUpdateSecretReq;
2023
- }
2024
-
2025
2008
  declare class BaseClient {
2026
2009
  readonly endpoint: string;
2027
2010
  readonly rpcClient: AggregatorClient;
@@ -2036,33 +2019,25 @@ declare class BaseClient {
2036
2019
  */
2037
2020
  isAuthKeyValid(key: string): boolean;
2038
2021
  /**
2039
- * The API key could retrieve a wallets authKey by skipping its signature verification
2022
+ * The API key could retrieve a wallet's authKey by skipping its signature verification
2023
+ * @param chainId - The chain id
2040
2024
  * @param address - The address of the EOA wallet
2025
+ * @param issuedAt - The issued at timestamp
2026
+ * @param expiredAt - The expiration timestamp
2041
2027
  * @param apiKey - The API key
2042
- * @param expiredAtEpoch - The expiration epoch
2043
2028
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
2044
2029
  */
2045
- authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: {
2046
- chainId: number;
2047
- address: string;
2048
- issuedAt: Date;
2049
- expiredAt: Date;
2050
- apiKey: string;
2051
- }): Promise<GetKeyResponse>;
2030
+ authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: GetKeyRequestApiKey): Promise<GetKeyResponse>;
2052
2031
  /**
2053
2032
  * Getting an authKey from the server by verifying the signature of an EOA wallet
2033
+ * @param chainId - The chain id
2054
2034
  * @param address - The address of the EOA wallet
2035
+ * @param issuedAt - The issued at timestamp
2036
+ * @param expiredAt - The expiration timestamp
2055
2037
  * @param signature - The signature of the EOA wallet
2056
- * @param expiredAtEpoch - The expiration epoch
2057
2038
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
2058
2039
  */
2059
- authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: {
2060
- chainId: number;
2061
- address: string;
2062
- issuedAt: Date;
2063
- expiredAt: Date;
2064
- signature: string;
2065
- }): Promise<GetKeyResponse>;
2040
+ authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: GetKeyRequestSignature): Promise<GetKeyResponse>;
2066
2041
  /**
2067
2042
  * The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
2068
2043
  * The authKey can be overridden at the request level by request options
@@ -2070,7 +2045,7 @@ declare class BaseClient {
2070
2045
  */
2071
2046
  setAuthKey(authKey: string | undefined): void;
2072
2047
  /**
2073
- * Get the auth key if its set in the client
2048
+ * Get the auth key if it's set in the client
2074
2049
  * @returns {string | undefined} - The auth key
2075
2050
  */
2076
2051
  getAuthKey(): string | undefined;
@@ -2080,7 +2055,7 @@ declare class BaseClient {
2080
2055
  */
2081
2056
  setFactoryAddress(address: string): void;
2082
2057
  /**
2083
- * Get the factory address if its set in the client
2058
+ * Get the factory address if it's set in the client
2084
2059
  * @returns {string | undefined} - The factory address
2085
2060
  */
2086
2061
  getFactoryAddress(): string | undefined;
@@ -2197,10 +2172,30 @@ declare class Client extends BaseClient {
2197
2172
  * @returns {Promise<boolean>} - Whether the workflow was successfully deleted
2198
2173
  */
2199
2174
  deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
2200
- createSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
2201
- listSecrets(params: ListSecretRequest, options?: RequestOptions): Promise<ListSecretResponse[]>;
2202
- deleteSecret(params: DeleteSecretRequest, options?: RequestOptions): Promise<boolean>;
2203
- updateSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
2175
+ createSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
2176
+ /**
2177
+ * Update an existing secret; the secret is updated in the user scope by default, derived from the auth key.
2178
+ * @param secret - The secret object containing updated information
2179
+ * @param options - Request options, including workflowId and orgId for scoping
2180
+ * @returns {Promise<boolean>} - Whether the secret was successfully updated
2181
+ */
2182
+ updateSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
2183
+ /**
2184
+ * Retrieve a list of secrets; secrets can be filtered by workflowId or orgId.
2185
+ * @param params - Parameters for listing secrets
2186
+ * @param options - Request options, including workflowId and orgId for filtering
2187
+ * @returns {Promise<ListSecretResponse[]>} - The list of secrets
2188
+ */
2189
+ listSecrets(options?: SecretRequestOptions): Promise<ListSecretResponse[]>;
2190
+ /**
2191
+ * Delete a secret by its name; by default, the secret is deleted from the user scope, derived from the auth key
2192
+ * @param name - The name of the secret
2193
+ * @param options - Request options
2194
+ * @param options.workflowId - The workflow id; if specified, the secret will be deleted from the workflow scope
2195
+ * @param options.orgId - The organization id; if specified, the secret will be deleted from the organization scope
2196
+ * @returns {Promise<boolean>} - Whether the secret was successfully deleted
2197
+ */
2198
+ deleteSecret(name: string, options?: SecretRequestOptions): Promise<boolean>;
2204
2199
  }
2205
2200
 
2206
- 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 GetKeyResponse, 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, getKeyRequestMessage };
2201
+ 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, ETHTransferNode, type ETHTransferNodeData, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerDataType, type EventTriggerProps, Execution, type ExecutionProps, ExecutionStatus, FilterNode, type FilterNodeData, type FilterNodeProps, FixedTimeTrigger, type FixedTimeTriggerDataType, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeData, type GraphQLQueryNodeProps, type ListSecretResponse, Node, NodeFactory, type NodeProps, type RequestOptions, RestAPINode, type RestAPINodeData, type RestAPINodeProps, type SecretRequestOptions, type SmartWallet, Step, type StepProps, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default };
package/dist/index.d.ts 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: string, expiredAt: string) => 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
 
@@ -238,8 +241,6 @@ declare class ContractWriteNode$1 extends jspb.Message {
238
241
  setCallData(value: string): ContractWriteNode$1;
239
242
  getContractAbi(): string;
240
243
  setContractAbi(value: string): ContractWriteNode$1;
241
- getMethod(): string;
242
- setMethod(value: string): ContractWriteNode$1;
243
244
 
244
245
  serializeBinary(): Uint8Array;
245
246
  toObject(includeInstance?: boolean): ContractWriteNode$1.AsObject;
@@ -256,7 +257,6 @@ declare namespace ContractWriteNode$1 {
256
257
  contractAddress: string,
257
258
  callData: string,
258
259
  contractAbi: string,
259
- method: string,
260
260
  }
261
261
  }
262
262
 
@@ -267,8 +267,6 @@ declare class ContractReadNode$1 extends jspb.Message {
267
267
  setCallData(value: string): ContractReadNode$1;
268
268
  getContractAbi(): string;
269
269
  setContractAbi(value: string): ContractReadNode$1;
270
- getMethod(): string;
271
- setMethod(value: string): ContractReadNode$1;
272
270
 
273
271
  serializeBinary(): Uint8Array;
274
272
  toObject(includeInstance?: boolean): ContractReadNode$1.AsObject;
@@ -285,7 +283,6 @@ declare namespace ContractReadNode$1 {
285
283
  contractAddress: string,
286
284
  callData: string,
287
285
  contractAbi: string,
288
- method: string,
289
286
  }
290
287
  }
291
288
 
@@ -1667,7 +1664,6 @@ declare class Node implements NodeProps {
1667
1664
  data: NodeData;
1668
1665
  constructor(props: NodeProps);
1669
1666
  toRequest(): TaskNode;
1670
- toJson(): Record<string, any>;
1671
1667
  }
1672
1668
 
1673
1669
  type EdgeProps = TaskEdge.AsObject;
@@ -1678,7 +1674,6 @@ declare class Edge implements EdgeProps {
1678
1674
  constructor(edge: EdgeProps);
1679
1675
  static fromResponse(edge: TaskEdge): Edge;
1680
1676
  toRequest(): TaskEdge;
1681
- toJson(): Record<string, any>;
1682
1677
  }
1683
1678
 
1684
1679
  type Environment = "production" | "development" | "staging";
@@ -1695,9 +1690,6 @@ interface GetWorkflowsRequest extends RequestOptions {
1695
1690
  cursor?: string;
1696
1691
  limit?: number;
1697
1692
  }
1698
- interface GetKeyResponse {
1699
- authKey: string;
1700
- }
1701
1693
  interface GetWalletRequest {
1702
1694
  salt: string;
1703
1695
  factoryAddress?: string;
@@ -1731,19 +1723,15 @@ type SmartWallet = SmartWallet$1.AsObject & {
1731
1723
  declare const ExecutionStatus: typeof ExecutionStatus$1;
1732
1724
  interface ListSecretResponse {
1733
1725
  name: string;
1734
- workflowId: string;
1735
- orgId: string;
1736
- }
1737
- interface ListSecretRequest {
1738
1726
  workflowId?: string;
1727
+ orgId?: string;
1739
1728
  }
1740
- interface DeleteSecretRequest {
1741
- name: string;
1742
- workflowId: string;
1743
- orgId: string;
1729
+ interface SecretRequestOptions extends RequestOptions {
1730
+ workflowId?: string;
1731
+ orgId?: string;
1744
1732
  }
1745
1733
 
1746
- type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject;
1734
+ type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
1747
1735
  type TriggerProps = Omit<TaskTrigger.AsObject, "manual" | "fixedTime" | "cron" | "block" | "event"> & {
1748
1736
  type: TriggerType;
1749
1737
  data: TriggerData;
@@ -1759,7 +1747,6 @@ declare class Trigger implements TriggerProps {
1759
1747
  */
1760
1748
  constructor(props: TriggerProps);
1761
1749
  toRequest(): TaskTrigger;
1762
- toJson(): Record<string, any>;
1763
1750
  }
1764
1751
 
1765
1752
  type WorkflowProps = Omit<Task.AsObject, "id" | "owner" | "completedAt" | "status" | "executionsList" | "name" | "trigger" | "nodesList" | "edgesList" | "totalExecution" | "lastRanAt"> & {
@@ -1977,7 +1964,13 @@ declare class CronTrigger extends Trigger {
1977
1964
  static fromResponse(raw: TaskTrigger): CronTrigger;
1978
1965
  }
1979
1966
 
1980
- type EventTriggerDataType = Pick<EventCondition.AsObject, "expression">;
1967
+ interface EventMatcher {
1968
+ type: string;
1969
+ value: string[];
1970
+ }
1971
+ type EventTriggerDataType = EventCondition.AsObject & {
1972
+ matcher?: EventMatcher[];
1973
+ };
1981
1974
  type EventTriggerProps = TriggerProps & {
1982
1975
  data: EventTriggerDataType;
1983
1976
  };
@@ -2012,16 +2005,6 @@ declare class TriggerFactory {
2012
2005
  static fromResponse(raw: TaskTrigger): Trigger;
2013
2006
  }
2014
2007
 
2015
- type SecretProps = CreateOrUpdateSecretReq.AsObject;
2016
- declare class Secret implements SecretProps {
2017
- name: string;
2018
- secret: string;
2019
- workflowId: string;
2020
- orgId: string;
2021
- constructor(props: SecretProps);
2022
- toRequest(): CreateOrUpdateSecretReq;
2023
- }
2024
-
2025
2008
  declare class BaseClient {
2026
2009
  readonly endpoint: string;
2027
2010
  readonly rpcClient: AggregatorClient;
@@ -2036,33 +2019,25 @@ declare class BaseClient {
2036
2019
  */
2037
2020
  isAuthKeyValid(key: string): boolean;
2038
2021
  /**
2039
- * The API key could retrieve a wallets authKey by skipping its signature verification
2022
+ * The API key could retrieve a wallet's authKey by skipping its signature verification
2023
+ * @param chainId - The chain id
2040
2024
  * @param address - The address of the EOA wallet
2025
+ * @param issuedAt - The issued at timestamp
2026
+ * @param expiredAt - The expiration timestamp
2041
2027
  * @param apiKey - The API key
2042
- * @param expiredAtEpoch - The expiration epoch
2043
2028
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
2044
2029
  */
2045
- authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: {
2046
- chainId: number;
2047
- address: string;
2048
- issuedAt: Date;
2049
- expiredAt: Date;
2050
- apiKey: string;
2051
- }): Promise<GetKeyResponse>;
2030
+ authWithAPIKey({ chainId, address, issuedAt, expiredAt, apiKey, }: GetKeyRequestApiKey): Promise<GetKeyResponse>;
2052
2031
  /**
2053
2032
  * Getting an authKey from the server by verifying the signature of an EOA wallet
2033
+ * @param chainId - The chain id
2054
2034
  * @param address - The address of the EOA wallet
2035
+ * @param issuedAt - The issued at timestamp
2036
+ * @param expiredAt - The expiration timestamp
2055
2037
  * @param signature - The signature of the EOA wallet
2056
- * @param expiredAtEpoch - The expiration epoch
2057
2038
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
2058
2039
  */
2059
- authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: {
2060
- chainId: number;
2061
- address: string;
2062
- issuedAt: Date;
2063
- expiredAt: Date;
2064
- signature: string;
2065
- }): Promise<GetKeyResponse>;
2040
+ authWithSignature({ chainId, address, issuedAt, expiredAt, signature, }: GetKeyRequestSignature): Promise<GetKeyResponse>;
2066
2041
  /**
2067
2042
  * The client could choose to store the authKey and use it for all requests; setting it to undefined will unset the authKey
2068
2043
  * The authKey can be overridden at the request level by request options
@@ -2070,7 +2045,7 @@ declare class BaseClient {
2070
2045
  */
2071
2046
  setAuthKey(authKey: string | undefined): void;
2072
2047
  /**
2073
- * Get the auth key if its set in the client
2048
+ * Get the auth key if it's set in the client
2074
2049
  * @returns {string | undefined} - The auth key
2075
2050
  */
2076
2051
  getAuthKey(): string | undefined;
@@ -2080,7 +2055,7 @@ declare class BaseClient {
2080
2055
  */
2081
2056
  setFactoryAddress(address: string): void;
2082
2057
  /**
2083
- * Get the factory address if its set in the client
2058
+ * Get the factory address if it's set in the client
2084
2059
  * @returns {string | undefined} - The factory address
2085
2060
  */
2086
2061
  getFactoryAddress(): string | undefined;
@@ -2197,10 +2172,30 @@ declare class Client extends BaseClient {
2197
2172
  * @returns {Promise<boolean>} - Whether the workflow was successfully deleted
2198
2173
  */
2199
2174
  deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
2200
- createSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
2201
- listSecrets(params: ListSecretRequest, options?: RequestOptions): Promise<ListSecretResponse[]>;
2202
- deleteSecret(params: DeleteSecretRequest, options?: RequestOptions): Promise<boolean>;
2203
- updateSecret(secret: Secret, options?: RequestOptions): Promise<boolean>;
2175
+ createSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
2176
+ /**
2177
+ * Update an existing secret; the secret is updated in the user scope by default, derived from the auth key.
2178
+ * @param secret - The secret object containing updated information
2179
+ * @param options - Request options, including workflowId and orgId for scoping
2180
+ * @returns {Promise<boolean>} - Whether the secret was successfully updated
2181
+ */
2182
+ updateSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
2183
+ /**
2184
+ * Retrieve a list of secrets; secrets can be filtered by workflowId or orgId.
2185
+ * @param params - Parameters for listing secrets
2186
+ * @param options - Request options, including workflowId and orgId for filtering
2187
+ * @returns {Promise<ListSecretResponse[]>} - The list of secrets
2188
+ */
2189
+ listSecrets(options?: SecretRequestOptions): Promise<ListSecretResponse[]>;
2190
+ /**
2191
+ * Delete a secret by its name; by default, the secret is deleted from the user scope, derived from the auth key
2192
+ * @param name - The name of the secret
2193
+ * @param options - Request options
2194
+ * @param options.workflowId - The workflow id; if specified, the secret will be deleted from the workflow scope
2195
+ * @param options.orgId - The organization id; if specified, the secret will be deleted from the organization scope
2196
+ * @returns {Promise<boolean>} - Whether the secret was successfully deleted
2197
+ */
2198
+ deleteSecret(name: string, options?: SecretRequestOptions): Promise<boolean>;
2204
2199
  }
2205
2200
 
2206
- 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 GetKeyResponse, 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, getKeyRequestMessage };
2201
+ 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, ETHTransferNode, type ETHTransferNodeData, type ETHTransferNodeProps, Edge, type EdgeProps, type Environment, EventTrigger, type EventTriggerDataType, type EventTriggerProps, Execution, type ExecutionProps, ExecutionStatus, FilterNode, type FilterNodeData, type FilterNodeProps, FixedTimeTrigger, type FixedTimeTriggerDataType, type FixedTimeTriggerProps, type GetExecutionsRequest, type GetWalletRequest, type GetWorkflowsRequest, GraphQLQueryNode, type GraphQLQueryNodeData, type GraphQLQueryNodeProps, type ListSecretResponse, Node, NodeFactory, type NodeProps, type RequestOptions, RestAPINode, type RestAPINodeData, type RestAPINodeProps, type SecretRequestOptions, type SmartWallet, Step, type StepProps, Trigger, TriggerFactory, type TriggerProps, TriggerType, Workflow, type WorkflowProps, WorkflowStatus, Client as default };