@inweb/client 25.8.16 → 25.8.19
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/README.md +33 -12
- package/dist/client.js +378 -337
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +13 -5
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +63 -61
- package/lib/Api/ClashTest.d.ts +29 -27
- package/lib/Api/Client.d.ts +85 -76
- package/lib/Api/ClientEvents.d.ts +1 -1
- package/lib/Api/File.d.ts +95 -73
- package/lib/Api/IAssembly.d.ts +26 -0
- package/lib/Api/Job.d.ts +7 -8
- package/lib/Api/Member.d.ts +9 -8
- package/lib/Api/Model.d.ts +19 -15
- package/lib/Api/Permission.d.ts +15 -15
- package/lib/Api/Project.d.ts +31 -23
- package/lib/Api/Role.d.ts +9 -8
- package/lib/Api/User.d.ts +21 -20
- package/lib/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/Api/Assembly.ts +63 -62
- package/src/Api/ClashTest.ts +40 -29
- package/src/Api/Client.ts +89 -77
- package/src/Api/ClientEvents.ts +1 -1
- package/src/Api/File.ts +94 -72
- package/src/Api/IAssembly.ts +27 -0
- package/src/Api/Job.ts +9 -13
- package/src/Api/Member.ts +9 -8
- package/src/Api/Model.ts +19 -15
- package/src/Api/Permission.ts +15 -15
- package/src/Api/Project.ts +31 -23
- package/src/Api/Role.ts +9 -8
- package/src/Api/User.ts +21 -20
- package/src/index.ts +1 -0
package/src/Api/Assembly.ts
CHANGED
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
|
|
24
24
|
import { IHttpClient } from "./IHttpClient";
|
|
25
25
|
import { FetchError } from "./FetchError";
|
|
26
|
-
import { IAssociatedFileData, IAssemblyVersionInfo } from "./IAssembly";
|
|
26
|
+
import { IAssociatedFileData, IAssemblyVersionInfo, IModelTransformMatrix } from "./IAssembly";
|
|
27
27
|
import { IShortUserDescription } from "./IUser";
|
|
28
28
|
import { Model } from "./Model";
|
|
29
29
|
import { ClashTest } from "./ClashTest";
|
|
30
30
|
import { waitFor, userFullName, userInitials } from "./Utils";
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Provides properties and methods for obtaining information about an assembly on the server
|
|
34
|
+
* and managing its data.
|
|
34
35
|
*/
|
|
35
36
|
export class Assembly {
|
|
36
37
|
private _data: any;
|
|
@@ -39,8 +40,8 @@ export class Assembly {
|
|
|
39
40
|
public path: string;
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
|
-
* @param data -
|
|
43
|
-
* @param httpClient -
|
|
43
|
+
* @param data - Raw assembly data received from the server.
|
|
44
|
+
* @param httpClient - HTTP client instance used to send REST API requests to the server.
|
|
44
45
|
*/
|
|
45
46
|
constructor(data: any, httpClient: IHttpClient) {
|
|
46
47
|
this.path = `/assemblies/${data.id}`;
|
|
@@ -130,9 +131,9 @@ export class Assembly {
|
|
|
130
131
|
/**
|
|
131
132
|
* Assembly geometry data type:
|
|
132
133
|
*
|
|
133
|
-
* - `vsfx` - VSFX, assembly can be opened in `VisualizeJS` viewer.
|
|
134
|
+
* - `vsfx` - `VSFX` format, assembly can be opened in `VisualizeJS` viewer.
|
|
134
135
|
*
|
|
135
|
-
* Returns an empty string if geometry data
|
|
136
|
+
* Returns an empty string if the geometry data is not yet ready.
|
|
136
137
|
*/
|
|
137
138
|
get geometryType(): string {
|
|
138
139
|
return this.status === "done" ? "vsfx" : "";
|
|
@@ -227,7 +228,7 @@ export class Assembly {
|
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
/**
|
|
230
|
-
*
|
|
231
|
+
* Reloads assembly data from the server.
|
|
231
232
|
*/
|
|
232
233
|
async checkout(): Promise<this> {
|
|
233
234
|
const response = await this.internalGet("");
|
|
@@ -247,7 +248,7 @@ export class Assembly {
|
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
/**
|
|
250
|
-
*
|
|
251
|
+
* Deletes an assembly from the server.
|
|
251
252
|
*
|
|
252
253
|
* @returns Returns the raw data of a deleted assembly.
|
|
253
254
|
*/
|
|
@@ -256,8 +257,8 @@ export class Assembly {
|
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
/**
|
|
259
|
-
*
|
|
260
|
-
* server after any changes.
|
|
260
|
+
* Saves assembly properties changes to the server. Call this method to update assembly data
|
|
261
|
+
* on the server after any property changes.
|
|
261
262
|
*/
|
|
262
263
|
save(): Promise<this> {
|
|
263
264
|
return this.update(this.data);
|
|
@@ -284,39 +285,22 @@ export class Assembly {
|
|
|
284
285
|
.then((array) => array.map((data: any) => new Model(data, this)));
|
|
285
286
|
}
|
|
286
287
|
|
|
287
|
-
/**
|
|
288
|
-
* Transformation matrix.
|
|
289
|
-
*
|
|
290
|
-
* @typedef {any} Transform
|
|
291
|
-
* @property {any} translate - Translation part, move along the X, Y, Z axes.
|
|
292
|
-
* @property {number} translate.x - The value for substruct for X axes.
|
|
293
|
-
* @property {number} translate.y - The value for substruct for Y axes.
|
|
294
|
-
* @property {number} translate.z - The value for substruct for Z axes.
|
|
295
|
-
* @property {any} rotation - Rotation part, rotate by the specified angle, around the
|
|
296
|
-
* specified vector.
|
|
297
|
-
* @property {number} rotation.x - X coordinate of the rotation vector.
|
|
298
|
-
* @property {number} rotation.y - Y coordinate of the rotation vector.
|
|
299
|
-
* @property {number} rotation.z - Z coordinate of the rotation vector.
|
|
300
|
-
* @property {number} rotation.angle - The angle of rotation.
|
|
301
|
-
* @property {number} scale - Scaling part, scale with multiplier, from center of extends.
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
288
|
/**
|
|
305
289
|
* Returns a model transformation.
|
|
306
290
|
*
|
|
307
|
-
* @param handle - Model handle.
|
|
291
|
+
* @param handle - Model original handle.
|
|
308
292
|
*/
|
|
309
|
-
getModelTransformMatrix(handle: string):
|
|
293
|
+
getModelTransformMatrix(handle: string): IModelTransformMatrix {
|
|
310
294
|
return this.data.transform[handle];
|
|
311
295
|
}
|
|
312
296
|
|
|
313
297
|
/**
|
|
314
|
-
*
|
|
298
|
+
* Sets or removes a model transformation.
|
|
315
299
|
*
|
|
316
|
-
* @param handle - Model handle.
|
|
317
|
-
* @param transform - Transformation matrix.
|
|
300
|
+
* @param handle - Model original handle.
|
|
301
|
+
* @param transform - Transformation matrix. Specify `undefined` to remove transformation.
|
|
318
302
|
*/
|
|
319
|
-
setModelTransformMatrix(handle: string, transform:
|
|
303
|
+
setModelTransformMatrix(handle: string, transform: IModelTransformMatrix): Promise<this> {
|
|
320
304
|
const obj = { ...this.data.transform };
|
|
321
305
|
obj[handle] = transform;
|
|
322
306
|
return this.update({ transform: obj });
|
|
@@ -325,8 +309,8 @@ export class Assembly {
|
|
|
325
309
|
/**
|
|
326
310
|
* Returns the properties for an objects in the assembly.
|
|
327
311
|
*
|
|
328
|
-
* @param handles - Object original handle or handles array.
|
|
329
|
-
*
|
|
312
|
+
* @param handles - Object original handle or handles array. Specify `undefined` to get
|
|
313
|
+
* properties for all objects in the assembly.
|
|
330
314
|
* @returns {Promise<any>}
|
|
331
315
|
*/
|
|
332
316
|
getProperties(handles?: string | string[]): Promise<any[]> {
|
|
@@ -364,7 +348,7 @@ export class Assembly {
|
|
|
364
348
|
}
|
|
365
349
|
|
|
366
350
|
/**
|
|
367
|
-
* Returns the
|
|
351
|
+
* Returns the CDA tree for an assembly.
|
|
368
352
|
*/
|
|
369
353
|
getCdaTree(): Promise<any[]> {
|
|
370
354
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
@@ -380,7 +364,7 @@ export class Assembly {
|
|
|
380
364
|
}
|
|
381
365
|
|
|
382
366
|
/**
|
|
383
|
-
*
|
|
367
|
+
* Adds a new viewpoint to the assembly. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
384
368
|
*
|
|
385
369
|
* @param viewpoint - Viewpoint.
|
|
386
370
|
*/
|
|
@@ -389,7 +373,7 @@ export class Assembly {
|
|
|
389
373
|
}
|
|
390
374
|
|
|
391
375
|
/**
|
|
392
|
-
*
|
|
376
|
+
* Deletes the specified assembly viewpoint.
|
|
393
377
|
*
|
|
394
378
|
* @param guid - Viewpoint GUID.
|
|
395
379
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
@@ -419,7 +403,7 @@ export class Assembly {
|
|
|
419
403
|
}
|
|
420
404
|
|
|
421
405
|
/**
|
|
422
|
-
*
|
|
406
|
+
* Downloads an assembly resource file. Resource files are files that contain model scene
|
|
423
407
|
* descriptions, or geometry data.
|
|
424
408
|
*
|
|
425
409
|
* @param dataId - Resource file name.
|
|
@@ -440,7 +424,7 @@ export class Assembly {
|
|
|
440
424
|
}
|
|
441
425
|
|
|
442
426
|
/**
|
|
443
|
-
*
|
|
427
|
+
* Downloads a part of assembly resource file. Resource files are files that contain model
|
|
444
428
|
* scene descriptions, or geometry data.
|
|
445
429
|
*
|
|
446
430
|
* @param dataId - Resource file name.
|
|
@@ -500,7 +484,7 @@ export class Assembly {
|
|
|
500
484
|
}
|
|
501
485
|
|
|
502
486
|
/**
|
|
503
|
-
*
|
|
487
|
+
* Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
|
|
504
488
|
*
|
|
505
489
|
* @param params - An object containing waiting parameters.
|
|
506
490
|
* @param params.timeout - The time, in milliseconds that the function should wait assembly.
|
|
@@ -531,15 +515,13 @@ export class Assembly {
|
|
|
531
515
|
/**
|
|
532
516
|
* Returns a list of assembly clash tests.
|
|
533
517
|
*
|
|
534
|
-
* @param
|
|
535
|
-
* @param
|
|
536
|
-
*
|
|
537
|
-
* @param
|
|
538
|
-
* @param
|
|
539
|
-
*
|
|
540
|
-
* @param
|
|
541
|
-
* default tests are sorted by name in ascending order.
|
|
542
|
-
* @param {string} sortField - Allows to specify sort field.
|
|
518
|
+
* @param start - The starting index in the test list. Used for paging.
|
|
519
|
+
* @param limit - The maximum number of tests that should be returned per request. Used for paging.
|
|
520
|
+
* @param name - Filter the tests by part of the name. Case sensitive.
|
|
521
|
+
* @param ids - List of tests IDs to return.
|
|
522
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default tests
|
|
523
|
+
* are sorted by name in ascending order.
|
|
524
|
+
* @param sortField - Allows to specify sort field.
|
|
543
525
|
*/
|
|
544
526
|
getClashTests(
|
|
545
527
|
start?: number,
|
|
@@ -575,7 +557,7 @@ export class Assembly {
|
|
|
575
557
|
}
|
|
576
558
|
|
|
577
559
|
/**
|
|
578
|
-
* Returns the assembly clash test
|
|
560
|
+
* Returns information about the specified assembly clash test.
|
|
579
561
|
*
|
|
580
562
|
* @param testId - Test ID.
|
|
581
563
|
*/
|
|
@@ -586,20 +568,39 @@ export class Assembly {
|
|
|
586
568
|
}
|
|
587
569
|
|
|
588
570
|
/**
|
|
589
|
-
*
|
|
571
|
+
* Creates an assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.
|
|
590
572
|
*
|
|
591
573
|
* @param name - Test name.
|
|
592
|
-
* @param selectionTypeA - The type of first selection set for clash detection. Can be
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* `
|
|
596
|
-
*
|
|
597
|
-
*
|
|
574
|
+
* @param selectionTypeA - The type of first selection set for clash detection. Can be one of:
|
|
575
|
+
*
|
|
576
|
+
* - `all` - All file/assembly objects.
|
|
577
|
+
* - `handle` - Objects with original handles specified in the `selectionSetA`.
|
|
578
|
+
* - `models` - All objects of the models with original handles specified in the `selectionSetA`.
|
|
579
|
+
* - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.
|
|
580
|
+
*
|
|
581
|
+
* @param selectionTypeB - The type of second selection set for clash detection. Can be one of:
|
|
582
|
+
*
|
|
583
|
+
* - `all` - All file/assembly objects.
|
|
584
|
+
* - `handle` - Objects with original handles specified in the `selectionSetB`.
|
|
585
|
+
* - `models` - All objects of the models with original handles specified in the `selectionSetB`.
|
|
586
|
+
* - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.
|
|
587
|
+
*
|
|
588
|
+
* @param selectionSetA - First selection set for clash detection. Objects from
|
|
589
|
+
* `selectionSetA` will be tested against each others by objects from the `selectionSetB`
|
|
590
|
+
* during the test.
|
|
591
|
+
* @param selectionSetB - Second selection set for clash detection. Objects from
|
|
592
|
+
* `selectionSetB` will be tested against each others by objects from the `selectionSetA`
|
|
593
|
+
* during the test.
|
|
598
594
|
* @param params - An object containing test parameters.
|
|
599
|
-
* @param params.tolerance - The distance of separation between
|
|
595
|
+
* @param params.tolerance - The distance of separation between objects at which test begins
|
|
600
596
|
* detecting clashes.
|
|
601
|
-
* @param params.clearance - The type of the clashes that the test detects:
|
|
602
|
-
*
|
|
597
|
+
* @param params.clearance - The type of the clashes that the test detects:
|
|
598
|
+
*
|
|
599
|
+
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
|
|
600
|
+
* object B, but comes within a distance of less than the `tolerance`.
|
|
601
|
+
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
|
|
602
|
+
* of more than the `tolerance`.
|
|
603
|
+
*
|
|
603
604
|
* @param params.waitForDone - Wait for test to complete.
|
|
604
605
|
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
605
606
|
* test is not complete during this time, the `TimeoutError` exception will be thrown.
|
|
@@ -643,7 +644,7 @@ export class Assembly {
|
|
|
643
644
|
}
|
|
644
645
|
|
|
645
646
|
/**
|
|
646
|
-
*
|
|
647
|
+
* Deletes the specified assembly clash test.
|
|
647
648
|
*
|
|
648
649
|
* @param testId - Test ID.
|
|
649
650
|
* @returns Returns the raw data of a deleted test.
|
package/src/Api/ClashTest.ts
CHANGED
|
@@ -26,7 +26,7 @@ import { IShortUserDescription } from "./IUser";
|
|
|
26
26
|
import { waitFor, userFullName, userInitials } from "./Utils";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Provides properties and methods for obtaining information about a file/assembly clash detection test.
|
|
30
30
|
*/
|
|
31
31
|
export class ClashTest {
|
|
32
32
|
private _data: any;
|
|
@@ -34,9 +34,9 @@ export class ClashTest {
|
|
|
34
34
|
public httpClient: IHttpClient;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @param data - Raw test data.
|
|
38
|
-
* @param basePath -
|
|
39
|
-
* @param httpClient -
|
|
37
|
+
* @param data - Raw test data received from the server.
|
|
38
|
+
* @param basePath - The clash test API base path of the file/assembly that owns the test.
|
|
39
|
+
* @param httpClient - HTTP client instance used to send REST API requests to the server.
|
|
40
40
|
*/
|
|
41
41
|
constructor(data: any, basePath: string, httpClient: IHttpClient) {
|
|
42
42
|
this.httpClient = httpClient;
|
|
@@ -59,10 +59,10 @@ export class ClashTest {
|
|
|
59
59
|
/**
|
|
60
60
|
* The type of the clashes that the test detects:
|
|
61
61
|
*
|
|
62
|
-
* -
|
|
63
|
-
*
|
|
64
|
-
* - `
|
|
65
|
-
*
|
|
62
|
+
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
|
|
63
|
+
* object B, but comes within a distance of less than the {@link tolerance}.
|
|
64
|
+
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
|
|
65
|
+
* of more than the {@link tolerance}.
|
|
66
66
|
*
|
|
67
67
|
* @readonly
|
|
68
68
|
*/
|
|
@@ -144,8 +144,8 @@ export class ClashTest {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* First selection set for clash detection.
|
|
148
|
-
* against each others by
|
|
147
|
+
* First selection set for clash detection. Objects from `selectionSetA` will be tested
|
|
148
|
+
* against each others by objects from the `selectionSetB` during the test.
|
|
149
149
|
*
|
|
150
150
|
* @readonly
|
|
151
151
|
*/
|
|
@@ -156,10 +156,10 @@ export class ClashTest {
|
|
|
156
156
|
/**
|
|
157
157
|
* The type of first selection set for clash detection. Can be one of:
|
|
158
158
|
*
|
|
159
|
-
* - `all` - All file/assembly
|
|
160
|
-
* - `handle` -
|
|
161
|
-
* - `models` -
|
|
162
|
-
* - `searchquery` -
|
|
159
|
+
* - `all` - All file/assembly objects.
|
|
160
|
+
* - `handle` - Objects with original handles specified in the `selectionSetA`.
|
|
161
|
+
* - `models` - All objects of the models with original handles specified in the `selectionSetA`.
|
|
162
|
+
* - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.
|
|
163
163
|
*
|
|
164
164
|
* @readonly
|
|
165
165
|
*/
|
|
@@ -168,8 +168,8 @@ export class ClashTest {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* Second selection set for clash detection.
|
|
172
|
-
* against each others by
|
|
171
|
+
* Second selection set for clash detection. Objects from `selectionSetB` will be tested
|
|
172
|
+
* against each others by objects from the `selectionSetA` during the test.
|
|
173
173
|
*
|
|
174
174
|
* @readonly
|
|
175
175
|
*/
|
|
@@ -180,10 +180,10 @@ export class ClashTest {
|
|
|
180
180
|
/**
|
|
181
181
|
* The type of second selection set for clash detection. Can be one of:
|
|
182
182
|
*
|
|
183
|
-
* - `all` - All file/assembly
|
|
184
|
-
* - `handle` -
|
|
185
|
-
* - `models` -
|
|
186
|
-
* - `searchquery` -
|
|
183
|
+
* - `all` - All file/assembly objects.
|
|
184
|
+
* - `handle` - Objects with original handles specified in the `selectionSetB`.
|
|
185
|
+
* - `models` - All objects of the models with original handles specified in the `selectionSetB`.
|
|
186
|
+
* - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.
|
|
187
187
|
*
|
|
188
188
|
* @readonly
|
|
189
189
|
*/
|
|
@@ -201,7 +201,7 @@ export class ClashTest {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
|
-
* The distance of separation between
|
|
204
|
+
* The distance of separation between objects at which test begins detecting clashes.
|
|
205
205
|
*
|
|
206
206
|
* @readonly
|
|
207
207
|
*/
|
|
@@ -210,7 +210,7 @@ export class ClashTest {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
213
|
+
* Reloads test data from the server.
|
|
214
214
|
*/
|
|
215
215
|
async checkout(): Promise<this> {
|
|
216
216
|
const response = await this.internalGet("");
|
|
@@ -219,7 +219,7 @@ export class ClashTest {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
|
-
*
|
|
222
|
+
* Updates test data on the server.
|
|
223
223
|
*
|
|
224
224
|
* @param data - Raw test data.
|
|
225
225
|
*/
|
|
@@ -230,7 +230,7 @@ export class ClashTest {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
|
-
*
|
|
233
|
+
* Deletes a test and its results report from the server.
|
|
234
234
|
*
|
|
235
235
|
* @returns Returns the raw data of a deleted test.
|
|
236
236
|
*/
|
|
@@ -239,15 +239,15 @@ export class ClashTest {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
243
|
-
* after any changes.
|
|
242
|
+
* Saves test properties changes to the server. Call this method to update test data on the
|
|
243
|
+
* server after any property changes.
|
|
244
244
|
*/
|
|
245
245
|
save(): Promise<this> {
|
|
246
246
|
return this.update(this.data);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
250
|
+
* Waits for test to complete. Test is done when it changes to `done` or `failed` status.
|
|
251
251
|
*
|
|
252
252
|
* @param params - An object containing waiting parameters.
|
|
253
253
|
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
@@ -257,9 +257,20 @@ export class ClashTest {
|
|
|
257
257
|
* @param params.signal - An
|
|
258
258
|
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
259
259
|
* signal, which can be used to abort waiting as desired.
|
|
260
|
+
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
260
261
|
*/
|
|
261
|
-
waitForDone(params?: {
|
|
262
|
-
|
|
262
|
+
waitForDone(params?: {
|
|
263
|
+
timeout?: number;
|
|
264
|
+
interval?: number;
|
|
265
|
+
signal?: AbortSignal;
|
|
266
|
+
onCheckout?: (test: ClashTest, ready: boolean) => boolean;
|
|
267
|
+
}): Promise<this> {
|
|
268
|
+
const checkDone = () =>
|
|
269
|
+
this.checkout().then((test) => {
|
|
270
|
+
const ready = ["done", "failed"].includes(test.status);
|
|
271
|
+
const cancel = params?.onCheckout?.(test, ready);
|
|
272
|
+
return cancel || ready;
|
|
273
|
+
});
|
|
263
274
|
return waitFor(checkDone, params).then(() => this);
|
|
264
275
|
}
|
|
265
276
|
|