@breign/client 1.0.104 → 1.0.105

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.
@@ -28,6 +28,11 @@ export interface GetScheduledTaskRunRequest {
28
28
  taskId: string;
29
29
  runId: string;
30
30
  }
31
+ export interface ListAgentScheduledTaskRunsRequest {
32
+ agentId: string;
33
+ from: Date;
34
+ to: Date;
35
+ }
31
36
  export interface ListScheduledTaskRunsRequest {
32
37
  agentId: string;
33
38
  taskId: string;
@@ -91,6 +96,14 @@ export declare class ScheduledTasksApi extends runtime.BaseAPI {
91
96
  * Get a specific scheduled task run by ID
92
97
  */
93
98
  getScheduledTaskRun(agentId: string, taskId: string, runId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunUio>;
99
+ /**
100
+ * List all runs for an agent\'s scheduled tasks within a date range
101
+ */
102
+ listAgentScheduledTaskRunsRaw(requestParameters: ListAgentScheduledTaskRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScheduledTaskRunListUio>>;
103
+ /**
104
+ * List all runs for an agent\'s scheduled tasks within a date range
105
+ */
106
+ listAgentScheduledTaskRuns(agentId: string, from: Date, to: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScheduledTaskRunListUio>;
94
107
  /**
95
108
  * List runs for a scheduled task
96
109
  */
@@ -177,6 +177,45 @@ class ScheduledTasksApi extends runtime.BaseAPI {
177
177
  const response = await this.getScheduledTaskRunRaw({ agentId: agentId, taskId: taskId, runId: runId }, initOverrides);
178
178
  return await response.value();
179
179
  }
180
+ /**
181
+ * List all runs for an agent\'s scheduled tasks within a date range
182
+ */
183
+ async listAgentScheduledTaskRunsRaw(requestParameters, initOverrides) {
184
+ if (requestParameters['agentId'] == null) {
185
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling listAgentScheduledTaskRuns().');
186
+ }
187
+ if (requestParameters['from'] == null) {
188
+ throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling listAgentScheduledTaskRuns().');
189
+ }
190
+ if (requestParameters['to'] == null) {
191
+ throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling listAgentScheduledTaskRuns().');
192
+ }
193
+ const queryParameters = {};
194
+ if (requestParameters['from'] != null) {
195
+ queryParameters['from'] = requestParameters['from'].toISOString();
196
+ }
197
+ if (requestParameters['to'] != null) {
198
+ queryParameters['to'] = requestParameters['to'].toISOString();
199
+ }
200
+ const headerParameters = {};
201
+ if (this.configuration && this.configuration.apiKey) {
202
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
203
+ }
204
+ const response = await this.request({
205
+ path: `/agents/{agentId}/scheduled-tasks/runs`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
206
+ method: 'GET',
207
+ headers: headerParameters,
208
+ query: queryParameters,
209
+ }, initOverrides);
210
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScheduledTaskRunListUioFromJSON)(jsonValue));
211
+ }
212
+ /**
213
+ * List all runs for an agent\'s scheduled tasks within a date range
214
+ */
215
+ async listAgentScheduledTaskRuns(agentId, from, to, initOverrides) {
216
+ const response = await this.listAgentScheduledTaskRunsRaw({ agentId: agentId, from: from, to: to }, initOverrides);
217
+ return await response.value();
218
+ }
180
219
  /**
181
220
  * List runs for a scheduled task
182
221
  */
package/dist/openapi.json CHANGED
@@ -2163,6 +2163,62 @@
2163
2163
  "tags" : [ "scheduledTasks" ]
2164
2164
  }
2165
2165
  },
2166
+ "/agents/{agentId}/scheduled-tasks/runs" : {
2167
+ "get" : {
2168
+ "operationId" : "listAgentScheduledTaskRuns",
2169
+ "parameters" : [ {
2170
+ "description" : "ID of the agent",
2171
+ "in" : "path",
2172
+ "name" : "agentId",
2173
+ "required" : true,
2174
+ "schema" : {
2175
+ "format" : "uuid",
2176
+ "type" : "string"
2177
+ }
2178
+ }, {
2179
+ "description" : "Start of the date range (inclusive)",
2180
+ "in" : "query",
2181
+ "name" : "from",
2182
+ "required" : true,
2183
+ "schema" : {
2184
+ "format" : "date-time",
2185
+ "type" : "string"
2186
+ }
2187
+ }, {
2188
+ "description" : "End of the date range (exclusive)",
2189
+ "in" : "query",
2190
+ "name" : "to",
2191
+ "required" : true,
2192
+ "schema" : {
2193
+ "format" : "date-time",
2194
+ "type" : "string"
2195
+ }
2196
+ } ],
2197
+ "responses" : {
2198
+ "200" : {
2199
+ "content" : {
2200
+ "application/json" : {
2201
+ "schema" : {
2202
+ "$ref" : "#/components/schemas/ScheduledTaskRunList"
2203
+ }
2204
+ }
2205
+ },
2206
+ "description" : "List of runs for all tasks of the agent in the given date range"
2207
+ },
2208
+ "400" : {
2209
+ "description" : "Missing or invalid from/to parameters"
2210
+ },
2211
+ "401" : {
2212
+ "description" : "Unauthorized"
2213
+ },
2214
+ "403" : {
2215
+ "description" : "Forbidden"
2216
+ }
2217
+ },
2218
+ "summary" : "List all runs for an agent's scheduled tasks within a date range",
2219
+ "tags" : [ "scheduledTasks" ]
2220
+ }
2221
+ },
2166
2222
  "/agents/{agentId}/scheduled-tasks/{taskId}/runs" : {
2167
2223
  "get" : {
2168
2224
  "operationId" : "listScheduledTaskRuns",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.104",
3
+ "version": "1.0.105",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",