@avaprotocol/sdk-js 1.6.2 → 1.6.3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 1.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 6e9069f: Make type definitions more consistent
8
+ - Updated dependencies [6e9069f]
9
+ - @avaprotocol/types@1.0.3
10
+
3
11
  ## 1.6.2
4
12
 
5
13
  ### 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, SecretRequestOptions, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsRequest, GetWorkflowsRequest, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, SecretProps, PageInfo } from "@avaprotocol/types";
11
+ import type { GetKeyResponse, RequestOptions, ClientOption, SmartWallet, GetWalletRequest, GetExecutionsOptions, GetWorkflowsOptions, GetSignatureFormatResponse, RunNodeWithInputsRequest, RunNodeWithInputsResponse, 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 {
@@ -127,25 +127,19 @@ declare class Client extends BaseClient {
127
127
  */
128
128
  submitWorkflow(workflow: Workflow, options?: RequestOptions): Promise<string>;
129
129
  createWorkflow(props: WorkflowProps): Workflow;
130
- /**
131
- * Get the list of workflows; new workflows can be created by calling `submitWorkflow`
132
- * @param {string} address - The address of the smart wallet
133
- * @param {string} cursor - The cursor for the list
134
- * @param {number} limit - The limit for the list
135
- * @param {RequestOptions} options - Request options
136
- * @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
137
- */
138
130
  /**
139
131
  * Get the list of workflows for multiple addresses
140
132
  * @param {string[]} addresses - The list of addresses
141
- * @param {GetWorkflowsRequest} options - Request options
133
+ * @param {GetWorkflowsOptions} options - Request options
142
134
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
143
135
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
144
136
  * @param {number} [options.limit] - The page limit of the response; default is 10
137
+ * @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
138
+ * @param {boolean} [options.includeEdges] - Include task edges (expensive field)
145
139
  * @param {string} [options.authKey] - The auth key for the request
146
- * @returns {Promise<{ cursor: string; result: Workflow[]; hasMore: boolean }>} - The list of Workflow objects with pagination metadata
140
+ * @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
147
141
  */
148
- getWorkflows(addresses: string[], options?: GetWorkflowsRequest): Promise<{
142
+ getWorkflows(addresses: string[], options?: GetWorkflowsOptions): Promise<{
149
143
  items: Workflow[];
150
144
  pageInfo: PageInfo;
151
145
  }>;
@@ -157,16 +151,16 @@ declare class Client extends BaseClient {
157
151
  */
158
152
  getWorkflowCount(addresses: string[], options?: RequestOptions): Promise<number>;
159
153
  /**
160
- * Get the list of executions for multiple workflow given in the workflows argument.
154
+ * Get the list of executions for multiple workflows
161
155
  * @param {string[]} workflows - The list of workflow ids to fetch execution for
162
- * @param {GetExecutionsRequest} options - Request options
156
+ * @param {GetExecutionsOptions} options - Request options
163
157
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
164
158
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
165
159
  * @param {number} [options.limit] - The page limit of the response; default is 10
166
160
  * @param {string} [options.authKey] - The auth key for the request
167
- * @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
161
+ * @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
168
162
  */
169
- getExecutions(workflows: string[], options?: GetExecutionsRequest): Promise<{
163
+ getExecutions(workflows: string[], options?: GetExecutionsOptions): Promise<{
170
164
  items: Execution[];
171
165
  pageInfo: PageInfo;
172
166
  }>;
@@ -232,34 +226,52 @@ declare class Client extends BaseClient {
232
226
  * Create a new secret
233
227
  * @param {string} name - The name of the secret
234
228
  * @param {string} value - The value of the secret
235
- * @param {SecretRequestOptions} options - Request options
229
+ * @param {SecretOptions} [options] - Request options
230
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
231
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
232
+ * @param {string} [options.authKey] - The auth key for the request
236
233
  * @returns {Promise<boolean>} - True if the secret was created successfully
237
234
  */
238
- createSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
235
+ createSecret(name: string, value: string, options?: SecretOptions): Promise<boolean>;
239
236
  /**
240
237
  * Update a secret
241
238
  * @param {string} name - The name of the secret
242
239
  * @param {string} value - The value of the secret
243
- * @param {SecretRequestOptions} options - Request options
240
+ * @param {SecretOptions} [options] - Request options
241
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
242
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
243
+ * @param {string} [options.authKey] - The auth key for the request
244
244
  * @returns {Promise<boolean>} - True if the secret was updated successfully
245
245
  */
246
- updateSecret(name: string, value: string, options?: SecretRequestOptions): Promise<boolean>;
246
+ updateSecret(name: string, value: string, options?: SecretOptions): Promise<boolean>;
247
247
  /**
248
248
  * Get the list of secrets
249
- * @param {SecretRequestOptions} options - Request options
250
- * @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
249
+ * @param {GetSecretsOptions} options - Request options
250
+ * @param {string} [options.workflowId] - Filter secrets by workflow ID
251
+ * @param {string} [options.orgId] - Filter secrets by organization ID
252
+ * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
253
+ * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
254
+ * @param {number} [options.limit] - The page limit of the response; default is 10
255
+ * @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
256
+ * @param {boolean} [options.includeCreatedBy] - Include created_by field
257
+ * @param {boolean} [options.includeDescription] - Include description field
258
+ * @param {string} [options.authKey] - The auth key for the request
259
+ * @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
251
260
  */
252
- getSecrets(options?: SecretRequestOptions): Promise<{
261
+ getSecrets(options?: GetSecretsOptions): Promise<{
253
262
  items: SecretProps[];
254
263
  pageInfo: PageInfo;
255
264
  }>;
256
265
  /**
257
266
  * Delete a secret
258
267
  * @param {string} name - The name of the secret
259
- * @param {SecretRequestOptions} options - Request options
268
+ * @param {SecretOptions} [options] - Request options
269
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
270
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
271
+ * @param {string} [options.authKey] - The auth key for the request
260
272
  * @returns {Promise<boolean>} - True if the secret was deleted successfully
261
273
  */
262
- deleteSecret(name: string, options?: SecretRequestOptions): Promise<boolean>;
274
+ deleteSecret(name: string, options?: SecretOptions): Promise<boolean>;
263
275
  /**
264
276
  * Run a node with inputs
265
277
  * @param {RunNodeWithInputsRequest} params - The parameters for running the node
@@ -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,CAA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M,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC;IAqBnB;;;;;;;;;;;;;OAaG;IACG,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;QACrD,KAAK,EAAE,WAAW,EAAE,CAAC;QACrB,QAAQ,EAAE,QAAQ,CAAC;KACpB,CAAC;IA4DF;;;;;;;;OAQG;IACG,YAAY,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC;IAoBnB;;;;;;;;;OASG;IACG,iBAAiB,CACrB,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAmB,EAAE,EAAE,wBAAwB,EACvE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,yBAAyB,CAAC;IAsGrC,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,cAAc;IAiEtB,OAAO,CAAC,yBAAyB;IAmDjC,OAAO,CAAC,wBAAwB;CAMjC;AAED,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,MAAM,GACP,CAAC;AAEF,YAAY,EACV,aAAa,EACb,SAAS,EACT,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,yBAAyB,GAC1B,CAAC"}
package/dist/index.js CHANGED
@@ -14765,23 +14765,17 @@ var Client = class extends BaseClient {
14765
14765
  createWorkflow(props) {
14766
14766
  return new workflow_default(props);
14767
14767
  }
14768
- /**
14769
- * Get the list of workflows; new workflows can be created by calling `submitWorkflow`
14770
- * @param {string} address - The address of the smart wallet
14771
- * @param {string} cursor - The cursor for the list
14772
- * @param {number} limit - The limit for the list
14773
- * @param {RequestOptions} options - Request options
14774
- * @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
14775
- */
14776
14768
  /**
14777
14769
  * Get the list of workflows for multiple addresses
14778
14770
  * @param {string[]} addresses - The list of addresses
14779
- * @param {GetWorkflowsRequest} options - Request options
14771
+ * @param {GetWorkflowsOptions} options - Request options
14780
14772
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14781
14773
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14782
14774
  * @param {number} [options.limit] - The page limit of the response; default is 10
14775
+ * @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
14776
+ * @param {boolean} [options.includeEdges] - Include task edges (expensive field)
14783
14777
  * @param {string} [options.authKey] - The auth key for the request
14784
- * @returns {Promise<{ cursor: string; result: Workflow[]; hasMore: boolean }>} - The list of Workflow objects with pagination metadata
14778
+ * @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
14785
14779
  */
14786
14780
  async getWorkflows(addresses, options) {
14787
14781
  const request = new avs_pb22.ListTasksReq();
@@ -14829,14 +14823,14 @@ var Client = class extends BaseClient {
14829
14823
  return result.getTotal();
14830
14824
  }
14831
14825
  /**
14832
- * Get the list of executions for multiple workflow given in the workflows argument.
14826
+ * Get the list of executions for multiple workflows
14833
14827
  * @param {string[]} workflows - The list of workflow ids to fetch execution for
14834
- * @param {GetExecutionsRequest} options - Request options
14828
+ * @param {GetExecutionsOptions} options - Request options
14835
14829
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14836
14830
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14837
14831
  * @param {number} [options.limit] - The page limit of the response; default is 10
14838
14832
  * @param {string} [options.authKey] - The auth key for the request
14839
- * @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
14833
+ * @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
14840
14834
  */
14841
14835
  async getExecutions(workflows, options) {
14842
14836
  const request = new avs_pb22.ListExecutionsReq();
@@ -14978,7 +14972,10 @@ var Client = class extends BaseClient {
14978
14972
  * Create a new secret
14979
14973
  * @param {string} name - The name of the secret
14980
14974
  * @param {string} value - The value of the secret
14981
- * @param {SecretRequestOptions} options - Request options
14975
+ * @param {SecretOptions} [options] - Request options
14976
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
14977
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
14978
+ * @param {string} [options.authKey] - The auth key for the request
14982
14979
  * @returns {Promise<boolean>} - True if the secret was created successfully
14983
14980
  */
14984
14981
  async createSecret(name, value, options) {
@@ -14998,7 +14995,10 @@ var Client = class extends BaseClient {
14998
14995
  * Update a secret
14999
14996
  * @param {string} name - The name of the secret
15000
14997
  * @param {string} value - The value of the secret
15001
- * @param {SecretRequestOptions} options - Request options
14998
+ * @param {SecretOptions} [options] - Request options
14999
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
15000
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
15001
+ * @param {string} [options.authKey] - The auth key for the request
15002
15002
  * @returns {Promise<boolean>} - True if the secret was updated successfully
15003
15003
  */
15004
15004
  async updateSecret(name, value, options) {
@@ -15016,8 +15016,17 @@ var Client = class extends BaseClient {
15016
15016
  }
15017
15017
  /**
15018
15018
  * Get the list of secrets
15019
- * @param {SecretRequestOptions} options - Request options
15020
- * @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
15019
+ * @param {GetSecretsOptions} options - Request options
15020
+ * @param {string} [options.workflowId] - Filter secrets by workflow ID
15021
+ * @param {string} [options.orgId] - Filter secrets by organization ID
15022
+ * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
15023
+ * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
15024
+ * @param {number} [options.limit] - The page limit of the response; default is 10
15025
+ * @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
15026
+ * @param {boolean} [options.includeCreatedBy] - Include created_by field
15027
+ * @param {boolean} [options.includeDescription] - Include description field
15028
+ * @param {string} [options.authKey] - The auth key for the request
15029
+ * @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
15021
15030
  */
15022
15031
  async getSecrets(options) {
15023
15032
  const request = new avs_pb22.ListSecretsReq();
@@ -15068,7 +15077,10 @@ var Client = class extends BaseClient {
15068
15077
  /**
15069
15078
  * Delete a secret
15070
15079
  * @param {string} name - The name of the secret
15071
- * @param {SecretRequestOptions} options - Request options
15080
+ * @param {SecretOptions} [options] - Request options
15081
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
15082
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
15083
+ * @param {string} [options.authKey] - The auth key for the request
15072
15084
  * @returns {Promise<boolean>} - True if the secret was deleted successfully
15073
15085
  */
15074
15086
  async deleteSecret(name, options) {
package/dist/index.mjs CHANGED
@@ -14735,23 +14735,17 @@ var Client = class extends BaseClient {
14735
14735
  createWorkflow(props) {
14736
14736
  return new workflow_default(props);
14737
14737
  }
14738
- /**
14739
- * Get the list of workflows; new workflows can be created by calling `submitWorkflow`
14740
- * @param {string} address - The address of the smart wallet
14741
- * @param {string} cursor - The cursor for the list
14742
- * @param {number} limit - The limit for the list
14743
- * @param {RequestOptions} options - Request options
14744
- * @returns {Promise<{ cursor: string; result: Workflow[] }>} - The list of Workflow objects
14745
- */
14746
14738
  /**
14747
14739
  * Get the list of workflows for multiple addresses
14748
14740
  * @param {string[]} addresses - The list of addresses
14749
- * @param {GetWorkflowsRequest} options - Request options
14741
+ * @param {GetWorkflowsOptions} options - Request options
14750
14742
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14751
14743
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14752
14744
  * @param {number} [options.limit] - The page limit of the response; default is 10
14745
+ * @param {boolean} [options.includeNodes] - Include task nodes (expensive field)
14746
+ * @param {boolean} [options.includeEdges] - Include task edges (expensive field)
14753
14747
  * @param {string} [options.authKey] - The auth key for the request
14754
- * @returns {Promise<{ cursor: string; result: Workflow[]; hasMore: boolean }>} - The list of Workflow objects with pagination metadata
14748
+ * @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
14755
14749
  */
14756
14750
  async getWorkflows(addresses, options) {
14757
14751
  const request = new avs_pb22.ListTasksReq();
@@ -14799,14 +14793,14 @@ var Client = class extends BaseClient {
14799
14793
  return result.getTotal();
14800
14794
  }
14801
14795
  /**
14802
- * Get the list of executions for multiple workflow given in the workflows argument.
14796
+ * Get the list of executions for multiple workflows
14803
14797
  * @param {string[]} workflows - The list of workflow ids to fetch execution for
14804
- * @param {GetExecutionsRequest} options - Request options
14798
+ * @param {GetExecutionsOptions} options - Request options
14805
14799
  * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14806
14800
  * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14807
14801
  * @param {number} [options.limit] - The page limit of the response; default is 10
14808
14802
  * @param {string} [options.authKey] - The auth key for the request
14809
- * @returns {Promise<{ cursor: string; result: Execution[]; hasMore: boolean }>} - The list of Execution objects with pagination metadata
14803
+ * @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
14810
14804
  */
14811
14805
  async getExecutions(workflows, options) {
14812
14806
  const request = new avs_pb22.ListExecutionsReq();
@@ -14948,7 +14942,10 @@ var Client = class extends BaseClient {
14948
14942
  * Create a new secret
14949
14943
  * @param {string} name - The name of the secret
14950
14944
  * @param {string} value - The value of the secret
14951
- * @param {SecretRequestOptions} options - Request options
14945
+ * @param {SecretOptions} [options] - Request options
14946
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
14947
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
14948
+ * @param {string} [options.authKey] - The auth key for the request
14952
14949
  * @returns {Promise<boolean>} - True if the secret was created successfully
14953
14950
  */
14954
14951
  async createSecret(name, value, options) {
@@ -14968,7 +14965,10 @@ var Client = class extends BaseClient {
14968
14965
  * Update a secret
14969
14966
  * @param {string} name - The name of the secret
14970
14967
  * @param {string} value - The value of the secret
14971
- * @param {SecretRequestOptions} options - Request options
14968
+ * @param {SecretOptions} [options] - Request options
14969
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
14970
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
14971
+ * @param {string} [options.authKey] - The auth key for the request
14972
14972
  * @returns {Promise<boolean>} - True if the secret was updated successfully
14973
14973
  */
14974
14974
  async updateSecret(name, value, options) {
@@ -14986,8 +14986,17 @@ var Client = class extends BaseClient {
14986
14986
  }
14987
14987
  /**
14988
14988
  * Get the list of secrets
14989
- * @param {SecretRequestOptions} options - Request options
14990
- * @returns {Promise<{ cursor: string; result: Secret[]; hasMore: boolean }>} - The list of Secret objects with pagination metadata
14989
+ * @param {GetSecretsOptions} options - Request options
14990
+ * @param {string} [options.workflowId] - Filter secrets by workflow ID
14991
+ * @param {string} [options.orgId] - Filter secrets by organization ID
14992
+ * @param {string} [options.before] - Get items before this cursor value (for backward pagination)
14993
+ * @param {string} [options.after] - Get items after this cursor value (for forward pagination)
14994
+ * @param {number} [options.limit] - The page limit of the response; default is 10
14995
+ * @param {boolean} [options.includeTimestamps] - Include created_at and updated_at fields
14996
+ * @param {boolean} [options.includeCreatedBy] - Include created_by field
14997
+ * @param {boolean} [options.includeDescription] - Include description field
14998
+ * @param {string} [options.authKey] - The auth key for the request
14999
+ * @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
14991
15000
  */
14992
15001
  async getSecrets(options) {
14993
15002
  const request = new avs_pb22.ListSecretsReq();
@@ -15038,7 +15047,10 @@ var Client = class extends BaseClient {
15038
15047
  /**
15039
15048
  * Delete a secret
15040
15049
  * @param {string} name - The name of the secret
15041
- * @param {SecretRequestOptions} options - Request options
15050
+ * @param {SecretOptions} [options] - Request options
15051
+ * @param {string} [options.workflowId] - The workflow ID to associate the secret with
15052
+ * @param {string} [options.orgId] - The organization ID to associate the secret with
15053
+ * @param {string} [options.authKey] - The auth key for the request
15042
15054
  * @returns {Promise<boolean>} - True if the secret was deleted successfully
15043
15055
  */
15044
15056
  async deleteSecret(name, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "clean": "rm -rf node_modules dist tsconfig.tsbuildinfo"
31
31
  },
32
32
  "dependencies": {
33
- "@avaprotocol/types": "1.0.2",
33
+ "@avaprotocol/types": "1.0.3",
34
34
  "@grpc/grpc-js": "^1.11.3",
35
35
  "@grpc/proto-loader": "^0.7.13",
36
36
  "dotenv": "^16.4.5",