@avaprotocol/sdk-js 1.3.4 → 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 +32 -26
- package/dist/index.d.ts +32 -26
- package/dist/index.js +160 -141
- package/dist/index.mjs +159 -140
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1723,16 +1723,12 @@ type SmartWallet = SmartWallet$1.AsObject & {
|
|
|
1723
1723
|
declare const ExecutionStatus: typeof ExecutionStatus$1;
|
|
1724
1724
|
interface ListSecretResponse {
|
|
1725
1725
|
name: string;
|
|
1726
|
-
workflowId: string;
|
|
1727
|
-
orgId: string;
|
|
1728
|
-
}
|
|
1729
|
-
interface ListSecretRequest {
|
|
1730
1726
|
workflowId?: string;
|
|
1727
|
+
orgId?: string;
|
|
1731
1728
|
}
|
|
1732
|
-
interface
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
orgId: string;
|
|
1729
|
+
interface SecretRequestOptions extends RequestOptions {
|
|
1730
|
+
workflowId?: string;
|
|
1731
|
+
orgId?: string;
|
|
1736
1732
|
}
|
|
1737
1733
|
|
|
1738
1734
|
type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
|
|
@@ -2009,16 +2005,6 @@ declare class TriggerFactory {
|
|
|
2009
2005
|
static fromResponse(raw: TaskTrigger): Trigger;
|
|
2010
2006
|
}
|
|
2011
2007
|
|
|
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
|
-
|
|
2022
2008
|
declare class BaseClient {
|
|
2023
2009
|
readonly endpoint: string;
|
|
2024
2010
|
readonly rpcClient: AggregatorClient;
|
|
@@ -2033,7 +2019,7 @@ declare class BaseClient {
|
|
|
2033
2019
|
*/
|
|
2034
2020
|
isAuthKeyValid(key: string): boolean;
|
|
2035
2021
|
/**
|
|
2036
|
-
* The API key could retrieve a wallet
|
|
2022
|
+
* The API key could retrieve a wallet's authKey by skipping its signature verification
|
|
2037
2023
|
* @param chainId - The chain id
|
|
2038
2024
|
* @param address - The address of the EOA wallet
|
|
2039
2025
|
* @param issuedAt - The issued at timestamp
|
|
@@ -2059,7 +2045,7 @@ declare class BaseClient {
|
|
|
2059
2045
|
*/
|
|
2060
2046
|
setAuthKey(authKey: string | undefined): void;
|
|
2061
2047
|
/**
|
|
2062
|
-
* Get the auth key if it
|
|
2048
|
+
* Get the auth key if it's set in the client
|
|
2063
2049
|
* @returns {string | undefined} - The auth key
|
|
2064
2050
|
*/
|
|
2065
2051
|
getAuthKey(): string | undefined;
|
|
@@ -2069,7 +2055,7 @@ declare class BaseClient {
|
|
|
2069
2055
|
*/
|
|
2070
2056
|
setFactoryAddress(address: string): void;
|
|
2071
2057
|
/**
|
|
2072
|
-
* Get the factory address if it
|
|
2058
|
+
* Get the factory address if it's set in the client
|
|
2073
2059
|
* @returns {string | undefined} - The factory address
|
|
2074
2060
|
*/
|
|
2075
2061
|
getFactoryAddress(): string | undefined;
|
|
@@ -2186,10 +2172,30 @@ declare class Client extends BaseClient {
|
|
|
2186
2172
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
2187
2173
|
*/
|
|
2188
2174
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
2189
|
-
createSecret(
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
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>;
|
|
2193
2199
|
}
|
|
2194
2200
|
|
|
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,
|
|
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
|
@@ -1723,16 +1723,12 @@ type SmartWallet = SmartWallet$1.AsObject & {
|
|
|
1723
1723
|
declare const ExecutionStatus: typeof ExecutionStatus$1;
|
|
1724
1724
|
interface ListSecretResponse {
|
|
1725
1725
|
name: string;
|
|
1726
|
-
workflowId: string;
|
|
1727
|
-
orgId: string;
|
|
1728
|
-
}
|
|
1729
|
-
interface ListSecretRequest {
|
|
1730
1726
|
workflowId?: string;
|
|
1727
|
+
orgId?: string;
|
|
1731
1728
|
}
|
|
1732
|
-
interface
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
orgId: string;
|
|
1729
|
+
interface SecretRequestOptions extends RequestOptions {
|
|
1730
|
+
workflowId?: string;
|
|
1731
|
+
orgId?: string;
|
|
1736
1732
|
}
|
|
1737
1733
|
|
|
1738
1734
|
type TriggerData = FixedTimeCondition.AsObject | CronCondition.AsObject | BlockCondition.AsObject | EventCondition.AsObject | null;
|
|
@@ -2009,16 +2005,6 @@ declare class TriggerFactory {
|
|
|
2009
2005
|
static fromResponse(raw: TaskTrigger): Trigger;
|
|
2010
2006
|
}
|
|
2011
2007
|
|
|
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
|
-
|
|
2022
2008
|
declare class BaseClient {
|
|
2023
2009
|
readonly endpoint: string;
|
|
2024
2010
|
readonly rpcClient: AggregatorClient;
|
|
@@ -2033,7 +2019,7 @@ declare class BaseClient {
|
|
|
2033
2019
|
*/
|
|
2034
2020
|
isAuthKeyValid(key: string): boolean;
|
|
2035
2021
|
/**
|
|
2036
|
-
* The API key could retrieve a wallet
|
|
2022
|
+
* The API key could retrieve a wallet's authKey by skipping its signature verification
|
|
2037
2023
|
* @param chainId - The chain id
|
|
2038
2024
|
* @param address - The address of the EOA wallet
|
|
2039
2025
|
* @param issuedAt - The issued at timestamp
|
|
@@ -2059,7 +2045,7 @@ declare class BaseClient {
|
|
|
2059
2045
|
*/
|
|
2060
2046
|
setAuthKey(authKey: string | undefined): void;
|
|
2061
2047
|
/**
|
|
2062
|
-
* Get the auth key if it
|
|
2048
|
+
* Get the auth key if it's set in the client
|
|
2063
2049
|
* @returns {string | undefined} - The auth key
|
|
2064
2050
|
*/
|
|
2065
2051
|
getAuthKey(): string | undefined;
|
|
@@ -2069,7 +2055,7 @@ declare class BaseClient {
|
|
|
2069
2055
|
*/
|
|
2070
2056
|
setFactoryAddress(address: string): void;
|
|
2071
2057
|
/**
|
|
2072
|
-
* Get the factory address if it
|
|
2058
|
+
* Get the factory address if it's set in the client
|
|
2073
2059
|
* @returns {string | undefined} - The factory address
|
|
2074
2060
|
*/
|
|
2075
2061
|
getFactoryAddress(): string | undefined;
|
|
@@ -2186,10 +2172,30 @@ declare class Client extends BaseClient {
|
|
|
2186
2172
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
2187
2173
|
*/
|
|
2188
2174
|
deleteWorkflow(id: string, options?: RequestOptions): Promise<boolean>;
|
|
2189
|
-
createSecret(
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
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>;
|
|
2193
2199
|
}
|
|
2194
2200
|
|
|
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,
|
|
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 };
|