@yuuvis/client-core 3.6.0 → 3.7.0
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/package.json
CHANGED
|
@@ -1647,7 +1647,21 @@ declare class DmsService {
|
|
|
1647
1647
|
*/
|
|
1648
1648
|
getDmsObjectVersions(id: string): Observable<DmsObject[]>;
|
|
1649
1649
|
getDmsObjectVersion(id: string, version: number): Observable<DmsObject>;
|
|
1650
|
-
|
|
1650
|
+
/**
|
|
1651
|
+
* Transforms a Core-API response holding one or more objects (`{ objects: [...] }`) into DmsObjects.
|
|
1652
|
+
* Unwraps each property `value`, folds in the content stream and tags, just like a regular fetch.
|
|
1653
|
+
* @param response The Core-API response (e.g. fetch, batch or lock/unlock response)
|
|
1654
|
+
* @returns Array of DmsObjects (empty array if the response has no objects)
|
|
1655
|
+
*/
|
|
1656
|
+
coreResponseToDmsObjects(response: {
|
|
1657
|
+
objects: CoreApiObject[];
|
|
1658
|
+
}): DmsObject[];
|
|
1659
|
+
/**
|
|
1660
|
+
* Transforms a single Core-API object response into a DmsObject.
|
|
1661
|
+
* @param res The Core-API object response (`{ properties, contentStreams }`)
|
|
1662
|
+
* @returns The mapped DmsObject
|
|
1663
|
+
*/
|
|
1664
|
+
coreApiResponseToDmsObject(res: CoreApiObject): DmsObject;
|
|
1651
1665
|
/**
|
|
1652
1666
|
* Transforms a plain data object to a DmsObject.
|
|
1653
1667
|
* @param data The plain data object
|
|
@@ -2542,18 +2556,11 @@ interface LockOptions {
|
|
|
2542
2556
|
}
|
|
2543
2557
|
declare const DEFAULT_LOCK_OPTIONS: LockOptions;
|
|
2544
2558
|
/**
|
|
2545
|
-
* Response payload returned by the lock
|
|
2546
|
-
*
|
|
2559
|
+
* Response payload returned by the lock/unlock endpoints. Contains the affected
|
|
2560
|
+
* object(s) as core-API responses, including the updated `LockField.LOCK_TAG` tag rows.
|
|
2547
2561
|
*/
|
|
2548
2562
|
interface ObjectLockingResponse {
|
|
2549
|
-
objects:
|
|
2550
|
-
properties: {
|
|
2551
|
-
'system:tags': {
|
|
2552
|
-
value: (number | string)[][];
|
|
2553
|
-
columnNames: string[];
|
|
2554
|
-
};
|
|
2555
|
-
};
|
|
2556
|
-
}[];
|
|
2563
|
+
objects: CoreApiResponse[];
|
|
2557
2564
|
}
|
|
2558
2565
|
|
|
2559
2566
|
/**
|
|
@@ -2573,19 +2580,31 @@ interface LockState {
|
|
|
2573
2580
|
declare class ObjectLockingService {
|
|
2574
2581
|
#private;
|
|
2575
2582
|
/**
|
|
2576
|
-
* Lock a DMS object by setting a lock tag
|
|
2583
|
+
* Lock a DMS object by setting a lock tag and resolve to the raw lock response.
|
|
2577
2584
|
* @param id ID of the object to lock
|
|
2578
|
-
* @returns Observable emitting the
|
|
2579
|
-
|
|
2585
|
+
* @returns Observable emitting the raw {@link ObjectLockingResponse}
|
|
2586
|
+
*/
|
|
2587
|
+
lock(id: string, includeObjects?: false): Observable<ObjectLockingResponse>;
|
|
2588
|
+
/**
|
|
2589
|
+
* Lock a DMS object and resolve to the updated {@link DmsObject}.
|
|
2590
|
+
* @param id ID of the object to lock
|
|
2591
|
+
* @param includeObjects Pass `true` to receive the mapped `DmsObject` instead of the raw response
|
|
2592
|
+
*/
|
|
2593
|
+
lock(id: string, includeObjects: true): Observable<DmsObject>;
|
|
2594
|
+
/**
|
|
2595
|
+
* Remove the lock tag from a DMS object and resolve to the raw lock response.
|
|
2596
|
+
* @param id ID of the object to unlock
|
|
2597
|
+
* @param lockTag Tag identifier to remove; defaults to `LockField.LOCK_TAG`
|
|
2598
|
+
* @returns Observable emitting the raw {@link ObjectLockingResponse}
|
|
2580
2599
|
*/
|
|
2581
|
-
|
|
2600
|
+
unlock(id: string, lockTag?: string, includeObjects?: false): Observable<ObjectLockingResponse>;
|
|
2582
2601
|
/**
|
|
2583
|
-
* Remove the lock tag from a DMS object.
|
|
2602
|
+
* Remove the lock tag from a DMS object and resolve to the updated {@link DmsObject}.
|
|
2584
2603
|
* @param id ID of the object to unlock
|
|
2585
2604
|
* @param lockTag Tag identifier to remove; defaults to `LockField.LOCK_TAG`
|
|
2586
|
-
* @
|
|
2605
|
+
* @param includeObjects Pass `true` to receive the mapped `DmsObject` instead of the raw response
|
|
2587
2606
|
*/
|
|
2588
|
-
unlock(id: string, lockTag
|
|
2607
|
+
unlock(id: string, lockTag: string | undefined, includeObjects: true): Observable<DmsObject>;
|
|
2589
2608
|
/**
|
|
2590
2609
|
* Inspect the lock state of a DMS object relative to the current user.
|
|
2591
2610
|
* @param dmsObject Object to inspect
|