@avaprotocol/sdk-js 1.6.5 → 1.6.7
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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +19 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1201 -741
- package/dist/index.mjs +1213 -743
- package/dist/models/node/branch.d.ts +1 -0
- package/dist/models/node/branch.d.ts.map +1 -1
- package/dist/models/node/branch.js +4 -0
- package/dist/models/node/contractRead.d.ts +1 -0
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +11 -0
- package/dist/models/node/contractWrite.d.ts +1 -0
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/contractWrite.js +4 -0
- package/dist/models/node/customCode.d.ts +1 -0
- package/dist/models/node/customCode.d.ts.map +1 -1
- package/dist/models/node/customCode.js +9 -0
- package/dist/models/node/ethTransfer.d.ts +1 -0
- package/dist/models/node/ethTransfer.d.ts.map +1 -1
- package/dist/models/node/ethTransfer.js +4 -0
- package/dist/models/node/factory.d.ts +1 -0
- package/dist/models/node/factory.d.ts.map +1 -1
- package/dist/models/node/factory.js +54 -0
- package/dist/models/node/filter.d.ts +1 -0
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +4 -0
- package/dist/models/node/graphqlQuery.d.ts +1 -0
- package/dist/models/node/graphqlQuery.d.ts.map +1 -1
- package/dist/models/node/graphqlQuery.js +4 -0
- package/dist/models/node/loop.d.ts +1 -0
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +4 -0
- package/dist/models/node/restApi.d.ts +1 -0
- package/dist/models/node/restApi.d.ts.map +1 -1
- package/dist/models/node/restApi.js +15 -1
- package/dist/models/trigger/block.d.ts +6 -0
- package/dist/models/trigger/block.d.ts.map +1 -1
- package/dist/models/trigger/block.js +9 -0
- package/dist/models/trigger/cron.d.ts +7 -1
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/cron.js +10 -1
- package/dist/models/trigger/event.d.ts +7 -1
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +10 -1
- package/dist/models/trigger/factory.d.ts +1 -0
- package/dist/models/trigger/factory.d.ts.map +1 -1
- package/dist/models/trigger/factory.js +42 -0
- package/dist/models/trigger/fixedTime.d.ts +7 -1
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +10 -1
- package/dist/models/trigger/interface.d.ts +1 -1
- package/dist/models/trigger/interface.d.ts.map +1 -1
- package/dist/models/trigger/manual.d.ts +13 -0
- package/dist/models/trigger/manual.d.ts.map +1 -1
- package/dist/models/trigger/manual.js +17 -0
- package/dist/utils.d.ts +34 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +116 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 1.6.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ca68e9c: Updated output data to Value type for json and runTrigger logic
|
|
8
|
+
- Updated dependencies [ca68e9c]
|
|
9
|
+
- @avaprotocol/types@1.0.7
|
|
10
|
+
|
|
11
|
+
## 1.6.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 491ae98: Added runTrigger method and refactored enums
|
|
16
|
+
- Updated dependencies [491ae98]
|
|
17
|
+
- @avaprotocol/types@1.0.6
|
|
18
|
+
|
|
3
19
|
## 1.6.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import Step, { StepProps } from "./models/step";
|
|
|
8
8
|
import NodeFactory from "./models/node/factory";
|
|
9
9
|
import TriggerFactory from "./models/trigger/factory";
|
|
10
10
|
import Secret from "./models/secret";
|
|
11
|
-
import type { GetKeyResponse, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsOptions, GetWorkflowsOptions, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, SecretProps, PageInfo, GetSecretsOptions, SecretOptions } from "@avaprotocol/types";
|
|
11
|
+
import type { GetKeyResponse, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsOptions, GetWorkflowsOptions, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, RunTriggerRequest, RunTriggerResponse, SecretProps, PageInfo, GetSecretsOptions, SecretOptions } from "@avaprotocol/types";
|
|
12
12
|
import { ExecutionStatus } from "@/grpc_codegen/avs_pb";
|
|
13
13
|
import TriggerReason, { TriggerReasonProps } from "./models/trigger/reason";
|
|
14
14
|
declare class BaseClient {
|
|
@@ -72,25 +72,13 @@ declare class BaseClient {
|
|
|
72
72
|
*/
|
|
73
73
|
getFactoryAddress(): string | undefined;
|
|
74
74
|
/**
|
|
75
|
-
* Send a gRPC request with
|
|
76
|
-
* @param method - The method name
|
|
77
|
-
* @param request - The request
|
|
78
|
-
* @param options -
|
|
79
|
-
* @returns {Promise<TResponse>} - The response from the
|
|
75
|
+
* Send a gRPC request with authentication and error handling
|
|
76
|
+
* @param method - The method name to call
|
|
77
|
+
* @param request - The request object
|
|
78
|
+
* @param options - Request options
|
|
79
|
+
* @returns {Promise<TResponse>} - The response from the server
|
|
80
80
|
*/
|
|
81
81
|
protected sendGrpcRequest<TResponse, TRequest>(method: string, request: TRequest | any, options?: RequestOptions): Promise<TResponse>;
|
|
82
|
-
/**
|
|
83
|
-
* Convert a protobuf Value to a JavaScript value
|
|
84
|
-
* @param value - The protobuf Value object
|
|
85
|
-
* @returns {any} - The converted JavaScript value
|
|
86
|
-
*/
|
|
87
|
-
protected convertProtobufValueToJS(value: any): any;
|
|
88
|
-
/**
|
|
89
|
-
* Convert a JavaScript value to a protobuf Value
|
|
90
|
-
* @param value - The JavaScript value to convert
|
|
91
|
-
* @returns {any} - The protobuf Value object
|
|
92
|
-
*/
|
|
93
|
-
protected convertJSValueToProtobuf(value: any): any;
|
|
94
82
|
}
|
|
95
83
|
declare class Client extends BaseClient {
|
|
96
84
|
constructor(config: ClientOption);
|
|
@@ -273,24 +261,27 @@ declare class Client extends BaseClient {
|
|
|
273
261
|
*/
|
|
274
262
|
deleteSecret(name: string, options?: SecretOptions): Promise<boolean>;
|
|
275
263
|
/**
|
|
276
|
-
* Run a node with inputs
|
|
264
|
+
* Run a node with inputs for testing purposes
|
|
277
265
|
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
278
|
-
* @param {string} params.nodeType - The type of the node
|
|
266
|
+
* @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
|
|
279
267
|
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
280
|
-
* @param {Record<string, any>} params.inputVariables -
|
|
281
|
-
* @param {string} params.walletAddress - The wallet address to use for the node
|
|
268
|
+
* @param {Record<string, any>} params.inputVariables - Variables to pass to the node
|
|
282
269
|
* @param {RequestOptions} options - Request options
|
|
283
270
|
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
284
271
|
*/
|
|
285
272
|
runNodeWithInputs({ nodeType, nodeConfig, inputVariables }: RunNodeWithInputsRequest, options?: RequestOptions): Promise<RunNodeWithInputsResponse>;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
273
|
+
/**
|
|
274
|
+
* Run a trigger for testing purposes
|
|
275
|
+
* @param {RunTriggerRequest} params - The parameters for running the trigger
|
|
276
|
+
* @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
|
|
277
|
+
* @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
|
|
278
|
+
* @param {RequestOptions} options - Request options
|
|
279
|
+
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
280
|
+
*/
|
|
281
|
+
runTrigger({ triggerType, triggerConfig }: RunTriggerRequest, options?: RequestOptions): Promise<RunTriggerResponse>;
|
|
291
282
|
}
|
|
292
283
|
export * from "./models/node/factory";
|
|
293
284
|
export * from "./models/trigger/factory";
|
|
294
285
|
export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, TriggerReason, Secret, };
|
|
295
|
-
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps, RunNodeWithInputsRequest, RunNodeWithInputsResponse, };
|
|
286
|
+
export type { WorkflowProps, EdgeProps, ExecutionProps, StepProps, TriggerReasonProps, OutputDataProps, RunNodeWithInputsRequest, RunNodeWithInputsResponse, RunTriggerRequest, RunTriggerResponse, };
|
|
296
287
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK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