9
9
CreateResultRequest ,
10
10
UpdateResultRequest ,
11
11
)
12
- from uplink import Field , Query , retry , returns
12
+ from uplink import Field , Path , Query , retry , returns
13
13
14
14
from . import models
15
15
@@ -31,7 +31,7 @@ def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
31
31
is used to obtain the configuration.
32
32
33
33
Raises:
34
- ApiException: if unable to communicate with the Spec Service.
34
+ ApiException: if unable to communicate with the TestMonitor Service.
35
35
"""
36
36
if configuration is None :
37
37
configuration = core .HttpConfigurationManager .get_configuration ()
@@ -197,3 +197,190 @@ def delete_results(
197
197
or provided an invalid argument.
198
198
"""
199
199
...
200
+
201
+ @post (
202
+ "steps" ,
203
+ args = [Field ("steps" ), Field ("updateResultTotalTime" )],
204
+ )
205
+ def create_steps (
206
+ self ,
207
+ steps : List [models .CreateStepRequest ],
208
+ update_result_total_time : bool = False ,
209
+ ) -> models .CreateStepsPartialSuccess :
210
+ """Creates one or more steps.
211
+
212
+ Args:
213
+ steps: A list of steps to create.
214
+ update_result_total_time: Determine test result total time from the step total times.
215
+ Defaults to False.
216
+
217
+ Returns:
218
+ A list of steps that were successfully created and ones that failed to be created.
219
+
220
+ Raises:
221
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
222
+ invalid arguments.
223
+ """
224
+ ...
225
+
226
+ @post ("delete-steps" , args = [Field ("steps" )])
227
+ def delete_steps (
228
+ self , steps : List [models .StepIdResultIdPair ]
229
+ ) -> Optional [models .DeleteStepsPartialSuccess ]:
230
+ """Deletes one or more steps by global ID.
231
+
232
+ Args:
233
+ steps: A list of step IDs and result IDs. Note that these are the global IDs and not the
234
+ `step_id` that is local to a product and workspace.
235
+
236
+ Returns:
237
+ None if all deletes succeed otherwise a list of which IDs failed and which succeeded.
238
+
239
+ Raises:
240
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there
241
+ invalid arguments.
242
+ """
243
+ ...
244
+
245
+ @delete (
246
+ "results/{resultId}/steps/{stepId}" ,
247
+ args = [Path ("resultId" ), Path ("stepId" ), Query ("updateResultTotalTime" )],
248
+ )
249
+ def delete_step (
250
+ self ,
251
+ result_id : str ,
252
+ step_id : str ,
253
+ update_result_total_time : Optional [bool ] = False ,
254
+ ) -> None :
255
+ """Deletes a single step.
256
+
257
+ Args:
258
+ result_id: The resultId of the step to delete.
259
+ step_id: The stepId of the step to delete.
260
+ update_result_total_time: Determine test result total time from the step total times.
261
+ Defaults to False.
262
+
263
+ Returns:
264
+ None
265
+
266
+ Raises:
267
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
268
+ invalid arguments.
269
+ """
270
+ ...
271
+
272
+ @post ("query-steps" )
273
+ def query_steps (self , query : models .QueryStepsRequest ) -> models .PagedSteps :
274
+ """Queries for steps that match the filters.
275
+
276
+ Args:
277
+ query: The query contains a product ID as well as a filter for steps under that product.
278
+
279
+ Returns:
280
+ A list of steps that match the filter.
281
+
282
+ Raises:
283
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
284
+ invalid arguments.
285
+ """
286
+ ...
287
+
288
+ @post (
289
+ "update-steps" ,
290
+ args = [
291
+ Field ("steps" ),
292
+ Field ("updateResultTotalTime" ),
293
+ Field ("replaceKeywords" ),
294
+ Field ("replaceProperties" ),
295
+ ],
296
+ )
297
+ def update_steps (
298
+ self ,
299
+ steps : List [models .UpdateStepRequest ],
300
+ update_result_total_time : bool = False ,
301
+ replace_keywords : bool = False ,
302
+ replace_properties : bool = False ,
303
+ ) -> models .UpdateStepsPartialSuccess :
304
+ """Updates one or more steps.
305
+
306
+ Update requires that the version field matches the version being updated from.
307
+
308
+ Args:
309
+ steps: a list of steps that are to be updated. Must include the global ID and
310
+ each step being updated must match the version currently on the server.
311
+ update_result_total_time: Determine test result total time from the step total times.
312
+ Defaults to False.
313
+ replace_keywords: Replace with existing keywords instead of merging them.
314
+ Defaults to False.
315
+ replace_properties: Replace with existing properties instead of merging them.
316
+ Defaults to False.
317
+
318
+ Returns
319
+ A list of steps that were successfully updated and a list of ones that were not along
320
+ with error messages for updates that failed.
321
+
322
+ Raises:
323
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
324
+ invalid arguments.
325
+ """
326
+ ...
327
+
328
+ @get (
329
+ "steps" ,
330
+ args = [Query ("continuationToken" ), Query ("take" ), Query ("returnCount" )],
331
+ )
332
+ def get_steps (
333
+ self ,
334
+ continuation_token : Optional [str ] = None ,
335
+ take : Optional [int ] = None ,
336
+ return_count : Optional [bool ] = None ,
337
+ ) -> models .PagedSteps :
338
+ """Reads a list of steps.
339
+
340
+ Args:
341
+ continuation_token: The token used to paginate steps.
342
+ take: The number of steps to get in this request.
343
+ return_count: Whether or not to return the total number of steps available.
344
+
345
+ Returns:
346
+ A list of steps.
347
+
348
+ Raises:
349
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
350
+ invalid arguments..
351
+ """
352
+ ...
353
+
354
+ @get ("results/{resultId}/steps/{stepId}" , args = [Path ("resultId" ), Path ("stepId" )])
355
+ def get_step (self , result_id : str , step_id : str ) -> models .Step :
356
+ """Gets a single step.
357
+
358
+ Args:
359
+ result_id: The resultId of the step to get.
360
+ step_id: The stepId of the step to get.
361
+
362
+ Returns:
363
+ The step.
364
+
365
+ Raises:
366
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
367
+ invalid arguments.
368
+ """
369
+ ...
370
+
371
+ @returns .json # type: ignore
372
+ @post ("query-step-values" )
373
+ def query_step_values (self , query : models .QueryStepValuesRequest ) -> List [str ]:
374
+ """Queries values for a step field.
375
+
376
+ Args:
377
+ query: The query parameters.
378
+
379
+ Returns:
380
+ A list of values for the specified step field.
381
+
382
+ Raises:
383
+ ApiException: if unable to communicate with the `/nitestmonitor` service or if there are
384
+ invalid arguments.
385
+ """
386
+ ...
0 commit comments