@tridion-sites/models 2.1.0 → 2.2.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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +274 -9
- package/dist/index.js +1509 -705
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -156,8 +156,7 @@ class SecurityDescriptor {
|
|
|
156
156
|
configurable: true,
|
|
157
157
|
writable: true,
|
|
158
158
|
value: (right) => {
|
|
159
|
-
|
|
160
|
-
return !!((_a = this._rights) === null || _a === void 0 ? void 0 : _a.includes('all')) || !!((_b = this._rights) === null || _b === void 0 ? void 0 : _b.includes(right));
|
|
159
|
+
return !!this._rights?.includes('all') || !!this._rights?.includes(right);
|
|
161
160
|
}
|
|
162
161
|
});
|
|
163
162
|
/**
|
|
@@ -170,8 +169,7 @@ class SecurityDescriptor {
|
|
|
170
169
|
configurable: true,
|
|
171
170
|
writable: true,
|
|
172
171
|
value: (permission) => {
|
|
173
|
-
|
|
174
|
-
return !!((_a = this._permissions) === null || _a === void 0 ? void 0 : _a.includes('all')) || !!((_b = this._permissions) === null || _b === void 0 ? void 0 : _b.includes(permission));
|
|
172
|
+
return !!this._permissions?.includes('all') || !!this._permissions?.includes(permission);
|
|
175
173
|
}
|
|
176
174
|
});
|
|
177
175
|
Object.defineProperty(this, "getInternalModel", {
|
|
@@ -200,40 +198,6 @@ class SecurityDescriptor {
|
|
|
200
198
|
}
|
|
201
199
|
}
|
|
202
200
|
|
|
203
|
-
/******************************************************************************
|
|
204
|
-
Copyright (c) Microsoft Corporation.
|
|
205
|
-
|
|
206
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
207
|
-
purpose with or without fee is hereby granted.
|
|
208
|
-
|
|
209
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
210
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
211
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
212
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
213
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
214
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
215
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
216
|
-
***************************************************************************** */
|
|
217
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
function __rest(s, e) {
|
|
221
|
-
var t = {};
|
|
222
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
223
|
-
t[p] = s[p];
|
|
224
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
225
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
226
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
227
|
-
t[p[i]] = s[p[i]];
|
|
228
|
-
}
|
|
229
|
-
return t;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
233
|
-
var e = new Error(message);
|
|
234
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
|
-
};
|
|
236
|
-
|
|
237
201
|
const applicableActions = {
|
|
238
202
|
view: 'tcm:view',
|
|
239
203
|
edit: 'tcm:edit',
|
|
@@ -259,9 +223,17 @@ const applicableActions = {
|
|
|
259
223
|
assignActivity: 'tcm:assignactivity',
|
|
260
224
|
startActivity: 'tcm:startactivity',
|
|
261
225
|
finishActivity: 'tcm:finishactivity',
|
|
226
|
+
finishProcess: 'tcm:finishprocess',
|
|
262
227
|
restartActivity: 'tcm:restartactivity',
|
|
228
|
+
// Translation Manager
|
|
263
229
|
pushTranslation: 'tm:pushtranslation',
|
|
264
230
|
pullTranslation: 'tm:pulltranslation',
|
|
231
|
+
deleteTranslation: 'tm:delete',
|
|
232
|
+
retryTranslation: 'tm:retry',
|
|
233
|
+
viewTranslation: 'tm:view',
|
|
234
|
+
editTranslation: 'tm:edit',
|
|
235
|
+
copyTranslation: 'tm:copy',
|
|
236
|
+
sendTranslation: 'tm:send',
|
|
265
237
|
};
|
|
266
238
|
|
|
267
239
|
/**
|
|
@@ -370,7 +342,7 @@ const parseItemType = (itemType) => {
|
|
|
370
342
|
return itemTypeIdToItemType.get(itemTypeId);
|
|
371
343
|
};
|
|
372
344
|
|
|
373
|
-
var _a$
|
|
345
|
+
var _a$2;
|
|
374
346
|
/**
|
|
375
347
|
* Represents a native Tridion Content Manager URI which uniquely identifies a resource in the system.
|
|
376
348
|
*
|
|
@@ -415,7 +387,7 @@ class TcmUri {
|
|
|
415
387
|
value: () => {
|
|
416
388
|
if (this._itemType === 'publication')
|
|
417
389
|
return this;
|
|
418
|
-
return _a$
|
|
390
|
+
return _a$2.createPublicationUri(this._publicationId);
|
|
419
391
|
}
|
|
420
392
|
});
|
|
421
393
|
Object.defineProperty(this, "getVersionlessUri", {
|
|
@@ -423,7 +395,7 @@ class TcmUri {
|
|
|
423
395
|
configurable: true,
|
|
424
396
|
writable: true,
|
|
425
397
|
value: () => {
|
|
426
|
-
return _a$
|
|
398
|
+
return _a$2.create(this._publicationId, this._itemId, this._itemType);
|
|
427
399
|
}
|
|
428
400
|
});
|
|
429
401
|
Object.defineProperty(this, "getUriWithVersion", {
|
|
@@ -431,7 +403,7 @@ class TcmUri {
|
|
|
431
403
|
configurable: true,
|
|
432
404
|
writable: true,
|
|
433
405
|
value: (version) => {
|
|
434
|
-
return _a$
|
|
406
|
+
return _a$2.create(this._publicationId, this._itemId, this._itemType, version);
|
|
435
407
|
}
|
|
436
408
|
});
|
|
437
409
|
Object.defineProperty(this, "getUriInPublication", {
|
|
@@ -439,7 +411,7 @@ class TcmUri {
|
|
|
439
411
|
configurable: true,
|
|
440
412
|
writable: true,
|
|
441
413
|
value: (publicationUri) => {
|
|
442
|
-
return _a$
|
|
414
|
+
return _a$2.create(publicationUri._itemId, this._itemId, this._itemType, this._itemVersion);
|
|
443
415
|
}
|
|
444
416
|
});
|
|
445
417
|
this._publicationId = publicationId;
|
|
@@ -477,17 +449,17 @@ class TcmUri {
|
|
|
477
449
|
return this._itemId === 0;
|
|
478
450
|
}
|
|
479
451
|
get isNullUri() {
|
|
480
|
-
return (this._publicationId === _a$
|
|
481
|
-
this._itemId === _a$
|
|
482
|
-
this._itemType === _a$
|
|
452
|
+
return (this._publicationId === _a$2.null.publicationId &&
|
|
453
|
+
this._itemId === _a$2.null.itemId &&
|
|
454
|
+
this._itemType === _a$2.null.itemType);
|
|
483
455
|
}
|
|
484
456
|
get isSystemUri() {
|
|
485
|
-
return (this._publicationId === _a$
|
|
486
|
-
this._itemId === _a$
|
|
487
|
-
this._itemType === _a$
|
|
457
|
+
return (this._publicationId === _a$2.system.publicationId &&
|
|
458
|
+
this._itemId === _a$2.system.itemId &&
|
|
459
|
+
this._itemType === _a$2.system.itemType);
|
|
488
460
|
}
|
|
489
461
|
get isEditableVersion() {
|
|
490
|
-
return this.isNullUri || this._itemVersion === _a$
|
|
462
|
+
return this.isNullUri || this._itemVersion === _a$2._editableVersion;
|
|
491
463
|
}
|
|
492
464
|
get isDynamic() {
|
|
493
465
|
return this._itemVersion === 0;
|
|
@@ -496,7 +468,7 @@ class TcmUri {
|
|
|
496
468
|
return this._asString;
|
|
497
469
|
}
|
|
498
470
|
}
|
|
499
|
-
_a$
|
|
471
|
+
_a$2 = TcmUri;
|
|
500
472
|
Object.defineProperty(TcmUri, "_tcmUriCache", {
|
|
501
473
|
enumerable: true,
|
|
502
474
|
configurable: true,
|
|
@@ -526,11 +498,11 @@ Object.defineProperty(TcmUri, "create", {
|
|
|
526
498
|
configurable: true,
|
|
527
499
|
writable: true,
|
|
528
500
|
value: (publicationId, itemId, itemType, itemVersion) => {
|
|
529
|
-
const tcmUri = new _a$
|
|
530
|
-
const cachedTcmUri = _a$
|
|
501
|
+
const tcmUri = new _a$2(publicationId, itemId, itemType, itemVersion);
|
|
502
|
+
const cachedTcmUri = _a$2._tcmUriCache.get(tcmUri.asString);
|
|
531
503
|
if (cachedTcmUri)
|
|
532
504
|
return cachedTcmUri;
|
|
533
|
-
_a$
|
|
505
|
+
_a$2._tcmUriCache.set(tcmUri.asString, tcmUri);
|
|
534
506
|
return tcmUri;
|
|
535
507
|
}
|
|
536
508
|
});
|
|
@@ -538,23 +510,23 @@ Object.defineProperty(TcmUri, "null", {
|
|
|
538
510
|
enumerable: true,
|
|
539
511
|
configurable: true,
|
|
540
512
|
writable: true,
|
|
541
|
-
value: _a$
|
|
513
|
+
value: _a$2.create(0, 0, 'none')
|
|
542
514
|
});
|
|
543
515
|
Object.defineProperty(TcmUri, "system", {
|
|
544
516
|
enumerable: true,
|
|
545
517
|
configurable: true,
|
|
546
518
|
writable: true,
|
|
547
|
-
value: _a$
|
|
519
|
+
value: _a$2.create(0, 0, 'system')
|
|
548
520
|
});
|
|
549
521
|
Object.defineProperty(TcmUri, "parse", {
|
|
550
522
|
enumerable: true,
|
|
551
523
|
configurable: true,
|
|
552
524
|
writable: true,
|
|
553
525
|
value: (input) => {
|
|
554
|
-
const cachedTcmUri = _a$
|
|
526
|
+
const cachedTcmUri = _a$2._tcmUriCache.get(input);
|
|
555
527
|
if (cachedTcmUri)
|
|
556
528
|
return cachedTcmUri;
|
|
557
|
-
const result = _a$
|
|
529
|
+
const result = _a$2._tcmUriRegExp.exec(input);
|
|
558
530
|
if (!result)
|
|
559
531
|
return undefined;
|
|
560
532
|
const pubIdPart = result[1];
|
|
@@ -585,7 +557,7 @@ Object.defineProperty(TcmUri, "parse", {
|
|
|
585
557
|
if (isNaN(version) || version < 0)
|
|
586
558
|
return undefined;
|
|
587
559
|
}
|
|
588
|
-
return _a$
|
|
560
|
+
return _a$2.create(publicationId, itemId, itemType, version);
|
|
589
561
|
}
|
|
590
562
|
});
|
|
591
563
|
Object.defineProperty(TcmUri, "createPublicationUri", {
|
|
@@ -593,11 +565,11 @@ Object.defineProperty(TcmUri, "createPublicationUri", {
|
|
|
593
565
|
configurable: true,
|
|
594
566
|
writable: true,
|
|
595
567
|
value: (publicationId) => {
|
|
596
|
-
return _a$
|
|
568
|
+
return _a$2.create(0, publicationId, 'publication');
|
|
597
569
|
}
|
|
598
570
|
});
|
|
599
571
|
|
|
600
|
-
var _a;
|
|
572
|
+
var _a$1;
|
|
601
573
|
class EclUri {
|
|
602
574
|
constructor(publicationId, mountPointId, itemId, itemType, subType, itemVersion) {
|
|
603
575
|
/**
|
|
@@ -676,7 +648,7 @@ class EclUri {
|
|
|
676
648
|
configurable: true,
|
|
677
649
|
writable: true,
|
|
678
650
|
value: () => {
|
|
679
|
-
return _a.create(this._publicationId, this._mountPointId, this._itemId, this._itemType, this._subType);
|
|
651
|
+
return _a$1.create(this._publicationId, this._mountPointId, this._itemId, this._itemType, this._subType);
|
|
680
652
|
}
|
|
681
653
|
});
|
|
682
654
|
Object.defineProperty(this, "getMountPointUri", {
|
|
@@ -686,7 +658,7 @@ class EclUri {
|
|
|
686
658
|
value: () => {
|
|
687
659
|
if (this._itemType === 'mountpoint')
|
|
688
660
|
return this;
|
|
689
|
-
return _a.create(this._publicationId, this._mountPointId, 'root', 'mountpoint', 'mp');
|
|
661
|
+
return _a$1.create(this._publicationId, this._mountPointId, 'root', 'mountpoint', 'mp');
|
|
690
662
|
}
|
|
691
663
|
});
|
|
692
664
|
Object.defineProperty(this, "getUriWithVersion", {
|
|
@@ -694,7 +666,7 @@ class EclUri {
|
|
|
694
666
|
configurable: true,
|
|
695
667
|
writable: true,
|
|
696
668
|
value: (version) => {
|
|
697
|
-
return _a.create(this._publicationId, this._mountPointId, this._itemId, this._itemType, this._subType, version);
|
|
669
|
+
return _a$1.create(this._publicationId, this._mountPointId, this._itemId, this._itemType, this._subType, version);
|
|
698
670
|
}
|
|
699
671
|
});
|
|
700
672
|
Object.defineProperty(this, "getUriInPublication", {
|
|
@@ -702,7 +674,7 @@ class EclUri {
|
|
|
702
674
|
configurable: true,
|
|
703
675
|
writable: true,
|
|
704
676
|
value: (publicationUri) => {
|
|
705
|
-
return _a.create(publicationUri.itemId, this._mountPointId, this._itemId, this._itemType, this._subType, this._itemVersion);
|
|
677
|
+
return _a$1.create(publicationUri.itemId, this._mountPointId, this._itemId, this._itemType, this._subType, this._itemVersion);
|
|
706
678
|
}
|
|
707
679
|
});
|
|
708
680
|
this._publicationId = publicationId;
|
|
@@ -754,7 +726,7 @@ class EclUri {
|
|
|
754
726
|
return this._asString;
|
|
755
727
|
}
|
|
756
728
|
}
|
|
757
|
-
_a = EclUri;
|
|
729
|
+
_a$1 = EclUri;
|
|
758
730
|
Object.defineProperty(EclUri, "_eclUriCache", {
|
|
759
731
|
enumerable: true,
|
|
760
732
|
configurable: true,
|
|
@@ -778,11 +750,11 @@ Object.defineProperty(EclUri, "create", {
|
|
|
778
750
|
configurable: true,
|
|
779
751
|
writable: true,
|
|
780
752
|
value: (publicationId, mountPointId, itemId, itemType, subType, itemVersion) => {
|
|
781
|
-
const eclUri = new _a(publicationId, mountPointId, itemId, itemType, subType, itemVersion);
|
|
782
|
-
const cachedEclUri = _a._eclUriCache.get(eclUri.asString);
|
|
753
|
+
const eclUri = new _a$1(publicationId, mountPointId, itemId, itemType, subType, itemVersion);
|
|
754
|
+
const cachedEclUri = _a$1._eclUriCache.get(eclUri.asString);
|
|
783
755
|
if (cachedEclUri)
|
|
784
756
|
return cachedEclUri;
|
|
785
|
-
_a._eclUriCache.set(eclUri.asString, eclUri);
|
|
757
|
+
_a$1._eclUriCache.set(eclUri.asString, eclUri);
|
|
786
758
|
return eclUri;
|
|
787
759
|
}
|
|
788
760
|
});
|
|
@@ -791,7 +763,7 @@ Object.defineProperty(EclUri, "parse", {
|
|
|
791
763
|
configurable: true,
|
|
792
764
|
writable: true,
|
|
793
765
|
value: (input) => {
|
|
794
|
-
const result = _a._eclUriRegExp.exec(input);
|
|
766
|
+
const result = _a$1._eclUriRegExp.exec(input);
|
|
795
767
|
if (!result)
|
|
796
768
|
return undefined;
|
|
797
769
|
const pubIdPart = result[1];
|
|
@@ -821,10 +793,128 @@ Object.defineProperty(EclUri, "parse", {
|
|
|
821
793
|
if (isNaN(version) || version < 0)
|
|
822
794
|
return undefined;
|
|
823
795
|
}
|
|
824
|
-
return _a.create(publicationId, mountPointId, itemId, itemType, subType, version);
|
|
796
|
+
return _a$1.create(publicationId, mountPointId, itemId, itemType, subType, version);
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
|
|
800
|
+
var _a;
|
|
801
|
+
class TmUri {
|
|
802
|
+
constructor(itemId) {
|
|
803
|
+
/**
|
|
804
|
+
* TM-specified item id.
|
|
805
|
+
*/
|
|
806
|
+
Object.defineProperty(this, "_itemId", {
|
|
807
|
+
enumerable: true,
|
|
808
|
+
configurable: true,
|
|
809
|
+
writable: true,
|
|
810
|
+
value: void 0
|
|
811
|
+
});
|
|
812
|
+
Object.defineProperty(this, "_asString", {
|
|
813
|
+
enumerable: true,
|
|
814
|
+
configurable: true,
|
|
815
|
+
writable: true,
|
|
816
|
+
value: void 0
|
|
817
|
+
});
|
|
818
|
+
/**
|
|
819
|
+
* Don't use it, will be removed later. Added to align api with other uris.
|
|
820
|
+
*
|
|
821
|
+
* @deprecated
|
|
822
|
+
*/
|
|
823
|
+
Object.defineProperty(this, "getPublicationUri", {
|
|
824
|
+
enumerable: true,
|
|
825
|
+
configurable: true,
|
|
826
|
+
writable: true,
|
|
827
|
+
value: () => {
|
|
828
|
+
return TcmUri.createPublicationUri(0);
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
/**
|
|
832
|
+
* Don't use it, will be removed later. Added to align api with other uris.
|
|
833
|
+
*
|
|
834
|
+
* @deprecated
|
|
835
|
+
*/
|
|
836
|
+
Object.defineProperty(this, "getUriInPublication", {
|
|
837
|
+
enumerable: true,
|
|
838
|
+
configurable: true,
|
|
839
|
+
writable: true,
|
|
840
|
+
value: (publicationUri) => {
|
|
841
|
+
return _a.create(this._itemId);
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
this._itemId = itemId;
|
|
845
|
+
this._asString = `tm:0-${this._itemId}-2`;
|
|
846
|
+
}
|
|
847
|
+
static get uriPrefix() {
|
|
848
|
+
return this._tmUriPrefix;
|
|
849
|
+
}
|
|
850
|
+
get itemType() {
|
|
851
|
+
return 'translationJob';
|
|
852
|
+
}
|
|
853
|
+
get itemId() {
|
|
854
|
+
return this._itemId;
|
|
855
|
+
}
|
|
856
|
+
get asString() {
|
|
857
|
+
return this._asString;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Don't use it, will be removed later. Added to align api with other uris.
|
|
861
|
+
*
|
|
862
|
+
* @deprecated
|
|
863
|
+
*/
|
|
864
|
+
get isDynamic() {
|
|
865
|
+
return false;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
_a = TmUri;
|
|
869
|
+
Object.defineProperty(TmUri, "_tmUriCache", {
|
|
870
|
+
enumerable: true,
|
|
871
|
+
configurable: true,
|
|
872
|
+
writable: true,
|
|
873
|
+
value: new Map()
|
|
874
|
+
});
|
|
875
|
+
Object.defineProperty(TmUri, "_tmUriPrefix", {
|
|
876
|
+
enumerable: true,
|
|
877
|
+
configurable: true,
|
|
878
|
+
writable: true,
|
|
879
|
+
value: 'tm'
|
|
880
|
+
});
|
|
881
|
+
Object.defineProperty(TmUri, "_tmUriRegExp", {
|
|
882
|
+
enumerable: true,
|
|
883
|
+
configurable: true,
|
|
884
|
+
writable: true,
|
|
885
|
+
value: new RegExp(/^tm:0-(\d+)-2$/)
|
|
886
|
+
});
|
|
887
|
+
Object.defineProperty(TmUri, "create", {
|
|
888
|
+
enumerable: true,
|
|
889
|
+
configurable: true,
|
|
890
|
+
writable: true,
|
|
891
|
+
value: (itemId) => {
|
|
892
|
+
const tmUri = new _a(itemId);
|
|
893
|
+
const cachedTmUri = _a._tmUriCache.get(tmUri.asString);
|
|
894
|
+
if (cachedTmUri)
|
|
895
|
+
return cachedTmUri;
|
|
896
|
+
_a._tmUriCache.set(tmUri.asString, tmUri);
|
|
897
|
+
return tmUri;
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
Object.defineProperty(TmUri, "parse", {
|
|
901
|
+
enumerable: true,
|
|
902
|
+
configurable: true,
|
|
903
|
+
writable: true,
|
|
904
|
+
value: (input) => {
|
|
905
|
+
const result = _a._tmUriRegExp.exec(input);
|
|
906
|
+
if (!result)
|
|
907
|
+
return undefined;
|
|
908
|
+
const itemIdPart = result[1];
|
|
909
|
+
if (itemIdPart === undefined)
|
|
910
|
+
return undefined;
|
|
911
|
+
const itemId = parseInt(itemIdPart);
|
|
912
|
+
return _a.create(itemId);
|
|
825
913
|
}
|
|
826
914
|
});
|
|
827
915
|
|
|
916
|
+
const BUSINESS_PROCESS_TYPES_NAMESPACE = 'bptman-';
|
|
917
|
+
const TAXONOMIES_NAMESPACE = 'catman-';
|
|
828
918
|
class VirtualUri {
|
|
829
919
|
constructor(publicationUri, itemType) {
|
|
830
920
|
Object.defineProperty(this, "_publicationUri", {
|
|
@@ -866,6 +956,9 @@ class VirtualUri {
|
|
|
866
956
|
const namespace = this._itemType === 'businessProcessTypes' ? 'bptman-' : 'catman-';
|
|
867
957
|
this._asString = `${namespace}${this._publicationUri.asString}`;
|
|
868
958
|
}
|
|
959
|
+
get itemId() {
|
|
960
|
+
return this._publicationUri.asString;
|
|
961
|
+
}
|
|
869
962
|
get itemType() {
|
|
870
963
|
return this._itemType;
|
|
871
964
|
}
|
|
@@ -902,12 +995,12 @@ Object.defineProperty(VirtualUri, "parse", {
|
|
|
902
995
|
value: (input) => {
|
|
903
996
|
let itemIdPart;
|
|
904
997
|
let itemType;
|
|
905
|
-
if (input.startsWith(
|
|
906
|
-
itemIdPart = input.replace(
|
|
998
|
+
if (input.startsWith(BUSINESS_PROCESS_TYPES_NAMESPACE)) {
|
|
999
|
+
itemIdPart = input.replace(BUSINESS_PROCESS_TYPES_NAMESPACE, '');
|
|
907
1000
|
itemType = 'businessProcessTypes';
|
|
908
1001
|
}
|
|
909
|
-
if (input.startsWith(
|
|
910
|
-
itemIdPart = input.replace(
|
|
1002
|
+
if (input.startsWith(TAXONOMIES_NAMESPACE)) {
|
|
1003
|
+
itemIdPart = input.replace(TAXONOMIES_NAMESPACE, '');
|
|
911
1004
|
itemType = 'taxonomies';
|
|
912
1005
|
}
|
|
913
1006
|
if (!itemIdPart || !itemType)
|
|
@@ -929,6 +1022,9 @@ const tryParseItemUri = (backendId) => {
|
|
|
929
1022
|
const virtualUri = VirtualUri.parse(backendId);
|
|
930
1023
|
if (virtualUri)
|
|
931
1024
|
return virtualUri;
|
|
1025
|
+
const tmUri = TmUri.parse(backendId);
|
|
1026
|
+
if (tmUri)
|
|
1027
|
+
return tmUri;
|
|
932
1028
|
return undefined;
|
|
933
1029
|
};
|
|
934
1030
|
const parseItemUri = (backendId) => {
|
|
@@ -1198,7 +1294,7 @@ class IdentifiableObject {
|
|
|
1198
1294
|
value: (applicableAction) => {
|
|
1199
1295
|
if (!this._applicableActions)
|
|
1200
1296
|
return false;
|
|
1201
|
-
return this._applicableActions.some(action =>
|
|
1297
|
+
return this._applicableActions.some(action => action.relationType?.toLowerCase() === applicableActions[applicableAction]);
|
|
1202
1298
|
}
|
|
1203
1299
|
});
|
|
1204
1300
|
Object.defineProperty(this, "hasListLink", {
|
|
@@ -1208,7 +1304,7 @@ class IdentifiableObject {
|
|
|
1208
1304
|
value: (listLink) => {
|
|
1209
1305
|
if (!this._listLinks)
|
|
1210
1306
|
return false;
|
|
1211
|
-
return this._listLinks.some(link =>
|
|
1307
|
+
return this._listLinks.some(link => link.relationType?.toLowerCase() === listLinks[listLink]);
|
|
1212
1308
|
}
|
|
1213
1309
|
});
|
|
1214
1310
|
Object.defineProperty(this, "hasLoadError", {
|
|
@@ -1216,8 +1312,7 @@ class IdentifiableObject {
|
|
|
1216
1312
|
configurable: true,
|
|
1217
1313
|
writable: true,
|
|
1218
1314
|
value: (specificError) => {
|
|
1219
|
-
|
|
1220
|
-
if (!((_a = this.loadInfo) === null || _a === void 0 ? void 0 : _a.errorType) || this.loadInfo.errorType === 'none') {
|
|
1315
|
+
if (!this.loadInfo?.errorType || this.loadInfo.errorType === 'none') {
|
|
1221
1316
|
return false;
|
|
1222
1317
|
}
|
|
1223
1318
|
if (specificError) {
|
|
@@ -1481,9 +1576,8 @@ class MultimediaType extends SystemWideObject {
|
|
|
1481
1576
|
* Represents a Repository: a context for BluePrinting.
|
|
1482
1577
|
*/
|
|
1483
1578
|
class Repository extends SystemWideObject {
|
|
1484
|
-
constructor(
|
|
1485
|
-
|
|
1486
|
-
super(Object.assign({ backendModel }, systemWideObjectArgs));
|
|
1579
|
+
constructor({ backendModel, accessControlList, businessProcessType, contentSecurityDescriptor, defaultMultimediaSchema, locationInfo, metadataSchema, minimalLocalizeApprovalStatus, parents, rootFolder, taskProcess, versionInfo, ...systemWideObjectArgs }) {
|
|
1580
|
+
super({ backendModel, ...systemWideObjectArgs });
|
|
1487
1581
|
Object.defineProperty(this, "_accessControlList", {
|
|
1488
1582
|
enumerable: true,
|
|
1489
1583
|
configurable: true,
|
|
@@ -1621,9 +1715,8 @@ class Repository extends SystemWideObject {
|
|
|
1621
1715
|
* Publication: a "Repository" used for publishing.
|
|
1622
1716
|
*/
|
|
1623
1717
|
class Publication extends Repository {
|
|
1624
|
-
constructor(
|
|
1625
|
-
|
|
1626
|
-
super(Object.assign({ backendModel }, repositoryArgs));
|
|
1718
|
+
constructor({ backendModel, componentSnapshotTemplate, componentTemplateProcess, defaultComponentTemplate, defaultPageTemplate, defaultTemplateBuildingBlock, pageSnapshotTemplate, pageTemplateProcess, rootStructureGroup, templateBundleProcess, ...repositoryArgs }) {
|
|
1719
|
+
super({ backendModel, ...repositoryArgs });
|
|
1627
1720
|
Object.defineProperty(this, "_componentSnapshotTemplate", {
|
|
1628
1721
|
enumerable: true,
|
|
1629
1722
|
configurable: true,
|
|
@@ -1817,9 +1910,8 @@ class PublishingTarget extends SystemWideObject {
|
|
|
1817
1910
|
* Represents the data of a Target Type used as a target for publishing.
|
|
1818
1911
|
*/
|
|
1819
1912
|
class TargetType extends PublishingTarget {
|
|
1820
|
-
constructor(
|
|
1821
|
-
|
|
1822
|
-
super(Object.assign({ backendModel }, publishingTargetArgs));
|
|
1913
|
+
constructor({ backendModel, accessControlList, businessProcessType, contentSecurityDescriptor, minimalApprovalStatus, priority, ...publishingTargetArgs }) {
|
|
1914
|
+
super({ backendModel, ...publishingTargetArgs });
|
|
1823
1915
|
Object.defineProperty(this, "_accessControlList", {
|
|
1824
1916
|
enumerable: true,
|
|
1825
1917
|
configurable: true,
|
|
@@ -1918,9 +2010,8 @@ class TargetType extends PublishingTarget {
|
|
|
1918
2010
|
* Represents the data of a Batch.
|
|
1919
2011
|
*/
|
|
1920
2012
|
class Batch extends SystemWideObject {
|
|
1921
|
-
constructor(
|
|
1922
|
-
|
|
1923
|
-
super(Object.assign({ backendModel }, systemWideObjectArgs));
|
|
2013
|
+
constructor({ backendModel, backendBatchOperation, operations, performer, status, type, ...systemWideObjectArgs }) {
|
|
2014
|
+
super({ backendModel, ...systemWideObjectArgs });
|
|
1924
2015
|
Object.defineProperty(this, "_backendBatchOperation", {
|
|
1925
2016
|
enumerable: true,
|
|
1926
2017
|
configurable: true,
|
|
@@ -1978,8 +2069,7 @@ class Batch extends SystemWideObject {
|
|
|
1978
2069
|
* Additional parameters for invoking operation.
|
|
1979
2070
|
*/
|
|
1980
2071
|
get parameters() {
|
|
1981
|
-
|
|
1982
|
-
return (_a = this._backendBatchOperation) === null || _a === void 0 ? void 0 : _a.Parameters;
|
|
2072
|
+
return this._backendBatchOperation?.Parameters;
|
|
1983
2073
|
}
|
|
1984
2074
|
/**
|
|
1985
2075
|
* Whether all batch operations are finished.
|
|
@@ -2146,7 +2236,6 @@ class ValidationWarning extends ValidationResult {
|
|
|
2146
2236
|
|
|
2147
2237
|
class ValidationApiError extends ApiError {
|
|
2148
2238
|
constructor(backendModel) {
|
|
2149
|
-
var _a, _b;
|
|
2150
2239
|
super(backendModel);
|
|
2151
2240
|
Object.defineProperty(this, "_backendModel", {
|
|
2152
2241
|
enumerable: true,
|
|
@@ -2167,8 +2256,8 @@ class ValidationApiError extends ApiError {
|
|
|
2167
2256
|
value: void 0
|
|
2168
2257
|
});
|
|
2169
2258
|
this._backendModel = backendModel;
|
|
2170
|
-
this._validationErrors =
|
|
2171
|
-
this._validationWarnings =
|
|
2259
|
+
this._validationErrors = backendModel.body.Data.ValidationErrors?.map(e => new ValidationError(e)) || [];
|
|
2260
|
+
this._validationWarnings = backendModel.body.Data.ValidationWarnings?.map(w => new ValidationWarning(w)) || [];
|
|
2172
2261
|
}
|
|
2173
2262
|
get validationWarnings() {
|
|
2174
2263
|
return this._validationWarnings;
|
|
@@ -2204,7 +2293,6 @@ const mapBatchOperationState = (backendModel) => {
|
|
|
2204
2293
|
|
|
2205
2294
|
class BatchOperation {
|
|
2206
2295
|
constructor(backendModel, subject) {
|
|
2207
|
-
var _a, _b;
|
|
2208
2296
|
Object.defineProperty(this, "_backendModel", {
|
|
2209
2297
|
enumerable: true,
|
|
2210
2298
|
configurable: true,
|
|
@@ -2243,8 +2331,8 @@ class BatchOperation {
|
|
|
2243
2331
|
});
|
|
2244
2332
|
this._backendModel = backendModel;
|
|
2245
2333
|
this._state = backendModel.State ? mapBatchOperationState(backendModel.State) : undefined;
|
|
2246
|
-
this._validationErrors =
|
|
2247
|
-
this._validationWarnings =
|
|
2334
|
+
this._validationErrors = backendModel.ValidationErrors?.map(e => new ValidationError(e));
|
|
2335
|
+
this._validationWarnings = backendModel.ValidationWarnings?.map(w => new ValidationWarning(w));
|
|
2248
2336
|
this._subject = subject;
|
|
2249
2337
|
this._createdItems = backendModel.CreatedItems
|
|
2250
2338
|
? backendModel.CreatedItems.map(i => parseItemUri(i))
|
|
@@ -2516,12 +2604,104 @@ class MappingRegistry {
|
|
|
2516
2604
|
this._mappings.push(mapping);
|
|
2517
2605
|
}
|
|
2518
2606
|
map(fromModel) {
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2607
|
+
const modelMapper = this._mappings.find(map => map.identifier(fromModel))?.mapper;
|
|
2608
|
+
return modelMapper?.(this, fromModel);
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
const mapDate = (rawDate) => {
|
|
2613
|
+
const date = new Date(rawDate);
|
|
2614
|
+
// If called with an invalid date string, it returns a Date object whose `toString()` method returns the literal string `Invalid Date`.
|
|
2615
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
|
|
2616
|
+
if (date.toString() === 'Invalid Date')
|
|
2617
|
+
return undefined;
|
|
2618
|
+
return date;
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
const contentMapping = (mappingRegistry, contentObject) => {
|
|
2622
|
+
if (typeof contentObject !== 'object' || contentObject === null) {
|
|
2623
|
+
throw new Error('Please make sure that content property is of type `Record<string, any>`');
|
|
2624
|
+
}
|
|
2625
|
+
const mappedContent = {};
|
|
2626
|
+
for (const key in contentObject) {
|
|
2627
|
+
const value = contentObject[key];
|
|
2628
|
+
if (typeof value === 'object' && value !== null) {
|
|
2629
|
+
if (Array.isArray(value)) {
|
|
2630
|
+
mappedContent[key] = value.map(itemValue => {
|
|
2631
|
+
if (typeof itemValue !== 'object' || itemValue === null) {
|
|
2632
|
+
return itemValue;
|
|
2633
|
+
}
|
|
2634
|
+
if ('$type' in itemValue) {
|
|
2635
|
+
return mappingRegistry.map(itemValue);
|
|
2636
|
+
}
|
|
2637
|
+
return contentMapping(mappingRegistry, itemValue);
|
|
2638
|
+
});
|
|
2639
|
+
continue;
|
|
2640
|
+
}
|
|
2641
|
+
// Map to a Model if object has `$type`
|
|
2642
|
+
if ('$type' in value) {
|
|
2643
|
+
mappedContent[key] = mappingRegistry.map(value);
|
|
2644
|
+
continue;
|
|
2645
|
+
}
|
|
2646
|
+
if (mappedContent[key] === undefined) {
|
|
2647
|
+
// Otherwise it is just another level of properties and we should go deeper (Or such type is not in our mapping registry, e.g. EmbeddedFieldDefinition)
|
|
2648
|
+
mappedContent[key] = contentMapping(mappingRegistry, value);
|
|
2649
|
+
continue;
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
else {
|
|
2653
|
+
// Value is a primitive (e.g. string, number, boolean)
|
|
2654
|
+
mappedContent[key] = value;
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
return mappedContent;
|
|
2658
|
+
};
|
|
2659
|
+
|
|
2660
|
+
class Settings {
|
|
2661
|
+
constructor({ backendModel, data }) {
|
|
2662
|
+
Object.defineProperty(this, "_backendModel", {
|
|
2663
|
+
enumerable: true,
|
|
2664
|
+
configurable: true,
|
|
2665
|
+
writable: true,
|
|
2666
|
+
value: void 0
|
|
2667
|
+
});
|
|
2668
|
+
Object.defineProperty(this, "_data", {
|
|
2669
|
+
enumerable: true,
|
|
2670
|
+
configurable: true,
|
|
2671
|
+
writable: true,
|
|
2672
|
+
value: void 0
|
|
2673
|
+
});
|
|
2674
|
+
Object.defineProperty(this, "getInternalModel", {
|
|
2675
|
+
enumerable: true,
|
|
2676
|
+
configurable: true,
|
|
2677
|
+
writable: true,
|
|
2678
|
+
value: () => {
|
|
2679
|
+
return this._backendModel;
|
|
2680
|
+
}
|
|
2681
|
+
});
|
|
2682
|
+
this._backendModel = backendModel;
|
|
2683
|
+
this._data = data;
|
|
2684
|
+
}
|
|
2685
|
+
get data() {
|
|
2686
|
+
return this._data;
|
|
2522
2687
|
}
|
|
2523
2688
|
}
|
|
2524
2689
|
|
|
2690
|
+
const mapSettingsConstructorArgs = (registry, backendModel) => {
|
|
2691
|
+
const data = contentMapping(registry, backendModel.Data);
|
|
2692
|
+
return { data };
|
|
2693
|
+
};
|
|
2694
|
+
const settingsMapping = {
|
|
2695
|
+
identifier: backendModel => backendModel?.$type === 'Settings',
|
|
2696
|
+
mapper: (registry, backendModel) => {
|
|
2697
|
+
const { data } = mapSettingsConstructorArgs(registry, backendModel);
|
|
2698
|
+
return new Settings({
|
|
2699
|
+
backendModel,
|
|
2700
|
+
data,
|
|
2701
|
+
});
|
|
2702
|
+
},
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2525
2705
|
const permissionMapping = (backendModel) => {
|
|
2526
2706
|
switch (backendModel) {
|
|
2527
2707
|
case Permissions.ALL:
|
|
@@ -2593,13 +2773,12 @@ const rightMapping = (backendModel) => {
|
|
|
2593
2773
|
};
|
|
2594
2774
|
|
|
2595
2775
|
const accessControlEntryMapping = {
|
|
2596
|
-
identifier: backendModel =>
|
|
2776
|
+
identifier: backendModel => backendModel?.$type === 'AccessControlEntry',
|
|
2597
2777
|
mapper: (mappingRegistry, backendModel) => {
|
|
2598
|
-
|
|
2599
|
-
const
|
|
2600
|
-
const
|
|
2601
|
-
const
|
|
2602
|
-
const deniedRights = (_d = backendModel.DeniedRights) === null || _d === void 0 ? void 0 : _d.map(r => rightMapping(r));
|
|
2778
|
+
const allowedPermissions = backendModel.AllowedPermissions?.map(p => permissionMapping(p));
|
|
2779
|
+
const allowedRights = backendModel.AllowedRights?.map(r => rightMapping(r));
|
|
2780
|
+
const deniedPermissions = backendModel.DeniedPermissions?.map(p => permissionMapping(p));
|
|
2781
|
+
const deniedRights = backendModel.DeniedRights?.map(r => rightMapping(r));
|
|
2603
2782
|
const trustee = backendModel.Trustee ? mappingRegistry.map(backendModel.Trustee) : undefined;
|
|
2604
2783
|
return new AccessControlEntry({
|
|
2605
2784
|
allowedPermissions,
|
|
@@ -2631,20 +2810,18 @@ const isExactInstanceOf = (value, ctor) => {
|
|
|
2631
2810
|
};
|
|
2632
2811
|
|
|
2633
2812
|
const accessControlListMapping = {
|
|
2634
|
-
identifier: backendModel =>
|
|
2813
|
+
identifier: backendModel => backendModel?.$type === 'AccessControlList',
|
|
2635
2814
|
mapper: (mappingRegistry, backendModel) => {
|
|
2636
|
-
|
|
2637
|
-
const accessControlEntries = (_a = backendModel.AccessControlEntries) === null || _a === void 0 ? void 0 : _a.map(e => mappingRegistry.map(e)).filter(isDefined);
|
|
2815
|
+
const accessControlEntries = backendModel.AccessControlEntries?.map(e => mappingRegistry.map(e)).filter(isDefined);
|
|
2638
2816
|
return new AccessControlList({ accessControlEntries, backendModel });
|
|
2639
2817
|
},
|
|
2640
2818
|
};
|
|
2641
2819
|
|
|
2642
2820
|
const securityDescriptorMapping = {
|
|
2643
|
-
identifier: backendModel =>
|
|
2821
|
+
identifier: backendModel => backendModel?.$type === 'SecurityDescriptor',
|
|
2644
2822
|
mapper: (mappingRegistry, backendModel) => {
|
|
2645
|
-
|
|
2646
|
-
const
|
|
2647
|
-
const rights = (_b = backendModel.Rights) === null || _b === void 0 ? void 0 : _b.map(r => rightMapping(r));
|
|
2823
|
+
const permissions = backendModel.Permissions?.map(p => permissionMapping(p));
|
|
2824
|
+
const rights = backendModel.Rights?.map(r => rightMapping(r));
|
|
2648
2825
|
return new SecurityDescriptor({ backendModel, permissions, rights });
|
|
2649
2826
|
},
|
|
2650
2827
|
};
|
|
@@ -2662,47 +2839,13 @@ const mapStringSearchModeToBackend = (backendModel) => {
|
|
|
2662
2839
|
}
|
|
2663
2840
|
};
|
|
2664
2841
|
|
|
2665
|
-
const mapDate = (rawDate) => {
|
|
2666
|
-
const date = new Date(rawDate);
|
|
2667
|
-
// If called with an invalid date string, it returns a Date object whose `toString()` method returns the literal string `Invalid Date`.
|
|
2668
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
|
|
2669
|
-
if (date.toString() === 'Invalid Date')
|
|
2670
|
-
return undefined;
|
|
2671
|
-
return date;
|
|
2672
|
-
};
|
|
2673
|
-
|
|
2674
|
-
const contentMapping = (mappingRegistry, contentObject) => {
|
|
2675
|
-
if (typeof contentObject !== 'object' || contentObject === null) {
|
|
2676
|
-
throw new Error('Please make sure that content property is of type `Record<string, any>`');
|
|
2677
|
-
}
|
|
2678
|
-
const mappedContent = {};
|
|
2679
|
-
for (const key in contentObject) {
|
|
2680
|
-
const value = contentObject[key];
|
|
2681
|
-
if (typeof value === 'object' && value !== null) {
|
|
2682
|
-
// Map to a Model if object has `$type`
|
|
2683
|
-
if ('$type' in value) {
|
|
2684
|
-
mappedContent[key] = mappingRegistry.map(value);
|
|
2685
|
-
}
|
|
2686
|
-
if (mappedContent[key] === undefined) {
|
|
2687
|
-
// Otherwise it is just another level of properties and we should go deeper (Or such type is not in our mapping registry, e.g. EmbeddedFieldDefinition)
|
|
2688
|
-
mappedContent[key] = contentMapping(mappingRegistry, value);
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
else {
|
|
2692
|
-
// Value is a primitive (e.g. string, number, boolean)
|
|
2693
|
-
mappedContent[key] = value;
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
return mappedContent;
|
|
2697
|
-
};
|
|
2698
|
-
|
|
2699
2842
|
const mapBasicVersionInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
2700
2843
|
const creationDate = backendModel.CreationDate ? mapDate(backendModel.CreationDate) : undefined;
|
|
2701
2844
|
const revisionDate = backendModel.RevisionDate ? mapDate(backendModel.RevisionDate) : undefined;
|
|
2702
2845
|
return { creationDate, revisionDate };
|
|
2703
2846
|
};
|
|
2704
2847
|
const basicVersionInfoMapping = {
|
|
2705
|
-
identifier: backendModel =>
|
|
2848
|
+
identifier: backendModel => backendModel?.$type === 'BasicVersionInfo',
|
|
2706
2849
|
mapper: (mappingRegistry, backendModel) => {
|
|
2707
2850
|
const { creationDate, revisionDate } = mapBasicVersionInfoConstructorArgs(mappingRegistry, backendModel);
|
|
2708
2851
|
return new BasicVersionInfo({ backendModel, creationDate, revisionDate });
|
|
@@ -2737,14 +2880,13 @@ const mapErrorTypeToBackend = (errorType) => {
|
|
|
2737
2880
|
};
|
|
2738
2881
|
|
|
2739
2882
|
const mapIdentifiableObjectConstructorArgs = (mappingRegistry, backendModel) => {
|
|
2740
|
-
var _a, _b;
|
|
2741
2883
|
const id = parseItemUri(backendModel.Id);
|
|
2742
2884
|
const loadInfo = backendModel.LoadInfo ? mappingRegistry.map(backendModel.LoadInfo) : undefined;
|
|
2743
2885
|
const basicVersionInfo = backendModel.VersionInfo
|
|
2744
2886
|
? mappingRegistry.map(backendModel.VersionInfo)
|
|
2745
2887
|
: undefined;
|
|
2746
|
-
const applicableActions =
|
|
2747
|
-
const listLinks =
|
|
2888
|
+
const applicableActions = backendModel.ApplicableActions?.map(action => mappingRegistry.map(action)).filter(isDefined);
|
|
2889
|
+
const listLinks = backendModel.ListLinks?.map(link => mappingRegistry.map(link)).filter(isDefined);
|
|
2748
2890
|
const securityDescriptor = backendModel.SecurityDescriptor
|
|
2749
2891
|
? mappingRegistry.map(backendModel.SecurityDescriptor)
|
|
2750
2892
|
: undefined;
|
|
@@ -2787,7 +2929,7 @@ const mapLoadInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2787
2929
|
return { errorType, state };
|
|
2788
2930
|
};
|
|
2789
2931
|
const loadInfoMapping = {
|
|
2790
|
-
identifier: backendModel =>
|
|
2932
|
+
identifier: backendModel => backendModel?.$type === 'LoadInfo',
|
|
2791
2933
|
mapper: (mappingRegistry, backendModel) => {
|
|
2792
2934
|
const { errorType, state } = mapLoadInfoConstructorArgs(mappingRegistry, backendModel);
|
|
2793
2935
|
return new LoadInfo({ backendModel, errorType, state });
|
|
@@ -2814,7 +2956,7 @@ const mapWhereUsedListInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2814
2956
|
return { commentToken };
|
|
2815
2957
|
};
|
|
2816
2958
|
const whereUsedListInfoMapping = {
|
|
2817
|
-
identifier: backendModel =>
|
|
2959
|
+
identifier: backendModel => backendModel?.$type === 'WhereUsedListInfo',
|
|
2818
2960
|
mapper: (mappingRegistry, backendModel) => {
|
|
2819
2961
|
const { commentToken } = mapWhereUsedListInfoConstructorArgs(mappingRegistry, backendModel);
|
|
2820
2962
|
return new WhereUsedListInfo({ backendModel, commentToken });
|
|
@@ -2825,22 +2967,28 @@ const mapSystemWideObjectConstructorArgs = mapIdentifiableObjectConstructorArgs;
|
|
|
2825
2967
|
|
|
2826
2968
|
const mapApprovalStatusConstructorArgs = mapSystemWideObjectConstructorArgs;
|
|
2827
2969
|
const approvalStatusMapping = {
|
|
2828
|
-
identifier: backendModel =>
|
|
2970
|
+
identifier: backendModel => backendModel?.$type === 'ApprovalStatus',
|
|
2829
2971
|
mapper: (mappingRegistry, backendModel) => {
|
|
2830
|
-
return new ApprovalStatus(
|
|
2972
|
+
return new ApprovalStatus({
|
|
2973
|
+
...mapApprovalStatusConstructorArgs(mappingRegistry, backendModel),
|
|
2974
|
+
backendModel,
|
|
2975
|
+
});
|
|
2831
2976
|
},
|
|
2832
2977
|
};
|
|
2833
2978
|
|
|
2834
2979
|
const mapMultimediaTypeConstructorArgs = mapSystemWideObjectConstructorArgs;
|
|
2835
2980
|
const multimediaTypeMapping = {
|
|
2836
|
-
identifier: backendModel =>
|
|
2981
|
+
identifier: backendModel => backendModel?.$type === 'MultimediaType',
|
|
2837
2982
|
mapper: (mappingRegistry, backendModel) => {
|
|
2838
|
-
return new MultimediaType(
|
|
2983
|
+
return new MultimediaType({
|
|
2984
|
+
...mapMultimediaTypeConstructorArgs(mappingRegistry, backendModel),
|
|
2985
|
+
backendModel,
|
|
2986
|
+
});
|
|
2839
2987
|
},
|
|
2840
2988
|
};
|
|
2841
2989
|
|
|
2842
2990
|
const hateoasLinkMapping = {
|
|
2843
|
-
identifier: backendModel =>
|
|
2991
|
+
identifier: backendModel => backendModel?.$type === 'HateoasLink',
|
|
2844
2992
|
mapper: (mappingRegistry, backendModel) => {
|
|
2845
2993
|
return new HateoasLink(backendModel);
|
|
2846
2994
|
},
|
|
@@ -2849,7 +2997,7 @@ const hateoasLinkMapping = {
|
|
|
2849
2997
|
const mapLinkConstructorArgs = (mappingRegistry, backendModel) => {
|
|
2850
2998
|
let idRef = backendModel && tryParseItemUri(backendModel.IdRef);
|
|
2851
2999
|
let isDynamicTarget = false;
|
|
2852
|
-
if ((idRef
|
|
3000
|
+
if ((idRef instanceof TcmUri || idRef instanceof EclUri) && idRef?.isDynamic) {
|
|
2853
3001
|
idRef = idRef.getVersionlessUri();
|
|
2854
3002
|
isDynamicTarget = true;
|
|
2855
3003
|
}
|
|
@@ -2858,7 +3006,7 @@ const mapLinkConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2858
3006
|
return { idRef, isDynamicTarget };
|
|
2859
3007
|
};
|
|
2860
3008
|
const linkMapping = {
|
|
2861
|
-
identifier: backendModel =>
|
|
3009
|
+
identifier: backendModel => backendModel?.$type === 'Link',
|
|
2862
3010
|
mapper: (mappingRegistry, backendModel) => {
|
|
2863
3011
|
const linkConstructorArgs = mapLinkConstructorArgs(mappingRegistry, backendModel);
|
|
2864
3012
|
if (!linkConstructorArgs) {
|
|
@@ -2892,7 +3040,7 @@ const mapLinks = (mappingRegistry, backendLinks) => {
|
|
|
2892
3040
|
|
|
2893
3041
|
const mapLinkWithIsEditableConstructorArgs = mapLinkConstructorArgs;
|
|
2894
3042
|
const linkWithEditableMapping = {
|
|
2895
|
-
identifier: backendModel =>
|
|
3043
|
+
identifier: backendModel => backendModel?.$type === 'LinkWithIsEditable',
|
|
2896
3044
|
mapper: (mappingRegistry, backendModel) => {
|
|
2897
3045
|
const linkWithIsEditableConstructorArgs = mapLinkWithIsEditableConstructorArgs(mappingRegistry, backendModel);
|
|
2898
3046
|
if (!linkWithIsEditableConstructorArgs)
|
|
@@ -2931,7 +3079,9 @@ const mapRepositoryConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2931
3079
|
const versionInfo = backendModel.VersionInfo
|
|
2932
3080
|
? mappingRegistry.map(backendModel.VersionInfo)
|
|
2933
3081
|
: undefined;
|
|
2934
|
-
return
|
|
3082
|
+
return {
|
|
3083
|
+
...systemWideObjectConstructorArgs,
|
|
3084
|
+
accessControlList,
|
|
2935
3085
|
businessProcessType,
|
|
2936
3086
|
contentSecurityDescriptor,
|
|
2937
3087
|
defaultMultimediaSchema,
|
|
@@ -2941,12 +3091,16 @@ const mapRepositoryConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2941
3091
|
parents,
|
|
2942
3092
|
rootFolder,
|
|
2943
3093
|
taskProcess,
|
|
2944
|
-
versionInfo
|
|
3094
|
+
versionInfo,
|
|
3095
|
+
};
|
|
2945
3096
|
};
|
|
2946
3097
|
const repositoryMapping = {
|
|
2947
|
-
identifier: backendModel =>
|
|
3098
|
+
identifier: backendModel => backendModel?.$type === 'Repository',
|
|
2948
3099
|
mapper: (mappingRegistry, backendModel) => {
|
|
2949
|
-
return new Repository(
|
|
3100
|
+
return new Repository({
|
|
3101
|
+
...mapRepositoryConstructorArgs(mappingRegistry, backendModel),
|
|
3102
|
+
backendModel,
|
|
3103
|
+
});
|
|
2950
3104
|
},
|
|
2951
3105
|
};
|
|
2952
3106
|
|
|
@@ -2979,7 +3133,9 @@ const mapPublicationConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2979
3133
|
const templateBundleProcess = backendModel.TemplateBundleProcess
|
|
2980
3134
|
? mappingRegistry.map(backendModel.TemplateBundleProcess)
|
|
2981
3135
|
: undefined;
|
|
2982
|
-
return
|
|
3136
|
+
return {
|
|
3137
|
+
...repositoryLocalObjectConstructorArgs,
|
|
3138
|
+
componentSnapshotTemplate,
|
|
2983
3139
|
componentTemplateProcess,
|
|
2984
3140
|
defaultComponentTemplate,
|
|
2985
3141
|
defaultPageTemplate,
|
|
@@ -2987,12 +3143,16 @@ const mapPublicationConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
2987
3143
|
pageSnapshotTemplate,
|
|
2988
3144
|
pageTemplateProcess,
|
|
2989
3145
|
rootStructureGroup,
|
|
2990
|
-
templateBundleProcess
|
|
3146
|
+
templateBundleProcess,
|
|
3147
|
+
};
|
|
2991
3148
|
};
|
|
2992
3149
|
const publicationMapping = {
|
|
2993
|
-
identifier: backendModel =>
|
|
3150
|
+
identifier: backendModel => backendModel?.$type === 'Publication',
|
|
2994
3151
|
mapper: (mappingRegistry, backendModel) => {
|
|
2995
|
-
return new Publication(
|
|
3152
|
+
return new Publication({
|
|
3153
|
+
...mapPublicationConstructorArgs(mappingRegistry, backendModel),
|
|
3154
|
+
backendModel,
|
|
3155
|
+
});
|
|
2996
3156
|
},
|
|
2997
3157
|
};
|
|
2998
3158
|
|
|
@@ -3018,7 +3178,7 @@ const mapPublishPriorityToBackend = (model) => {
|
|
|
3018
3178
|
};
|
|
3019
3179
|
|
|
3020
3180
|
const targetTypeMapping = {
|
|
3021
|
-
identifier: backendModel =>
|
|
3181
|
+
identifier: backendModel => backendModel?.$type === 'TargetType',
|
|
3022
3182
|
mapper: (mappingRegistry, backendModel) => {
|
|
3023
3183
|
const { applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo } = mapSystemWideObjectConstructorArgs(mappingRegistry, backendModel);
|
|
3024
3184
|
const accessControlList = backendModel.AccessControlList
|
|
@@ -3056,8 +3216,7 @@ const batchOperationMapping = (mappingRegistry, backendModel) => {
|
|
|
3056
3216
|
if (!backendModel.Statuses)
|
|
3057
3217
|
return undefined;
|
|
3058
3218
|
return backendModel.Statuses.map(status => {
|
|
3059
|
-
|
|
3060
|
-
const subjectLink = (_a = backendModel.SubjectLinks) === null || _a === void 0 ? void 0 : _a.find(s => s.IdRef === status.SubjectId);
|
|
3219
|
+
const subjectLink = backendModel.SubjectLinks?.find(s => s.IdRef === status.SubjectId);
|
|
3061
3220
|
const link = mappingRegistry.map(subjectLink);
|
|
3062
3221
|
return new BatchOperation(status, link);
|
|
3063
3222
|
});
|
|
@@ -3087,25 +3246,30 @@ const batchTypeMapping = (backendType) => {
|
|
|
3087
3246
|
};
|
|
3088
3247
|
|
|
3089
3248
|
const mapBatchConstructorArgs = (mappingRegistry, backendModel) => {
|
|
3090
|
-
var _a;
|
|
3091
3249
|
const systemWideObjectConstructorArgs = mapSystemWideObjectConstructorArgs(mappingRegistry, backendModel);
|
|
3092
3250
|
const performer = backendModel.Performer ? mappingRegistry.map(backendModel.Performer) : undefined;
|
|
3093
|
-
const backendBatchOperation =
|
|
3094
|
-
const type =
|
|
3251
|
+
const backendBatchOperation = backendModel.Operations?.[0];
|
|
3252
|
+
const type = backendBatchOperation?.Operation ? batchTypeMapping(backendBatchOperation.Operation) : undefined;
|
|
3095
3253
|
const operations = backendBatchOperation
|
|
3096
3254
|
? batchOperationMapping(mappingRegistry, backendBatchOperation)
|
|
3097
3255
|
: undefined;
|
|
3098
3256
|
const status = operations ? determineBatchStatus(operations) : undefined;
|
|
3099
|
-
return
|
|
3257
|
+
return {
|
|
3258
|
+
...systemWideObjectConstructorArgs,
|
|
3259
|
+
performer,
|
|
3100
3260
|
type,
|
|
3101
3261
|
operations,
|
|
3102
3262
|
status,
|
|
3103
|
-
backendBatchOperation
|
|
3263
|
+
backendBatchOperation,
|
|
3264
|
+
};
|
|
3104
3265
|
};
|
|
3105
3266
|
const batchMapping = {
|
|
3106
|
-
identifier: backendModel =>
|
|
3267
|
+
identifier: backendModel => backendModel?.$type === 'Batch',
|
|
3107
3268
|
mapper: (mappingRegistry, backendModel) => {
|
|
3108
|
-
return new Batch(
|
|
3269
|
+
return new Batch({
|
|
3270
|
+
...mapBatchConstructorArgs(mappingRegistry, backendModel),
|
|
3271
|
+
backendModel,
|
|
3272
|
+
});
|
|
3109
3273
|
},
|
|
3110
3274
|
};
|
|
3111
3275
|
|
|
@@ -3218,7 +3382,7 @@ const mapBinaryContentConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
3218
3382
|
return { multimediaType };
|
|
3219
3383
|
};
|
|
3220
3384
|
const binaryContentMapping = {
|
|
3221
|
-
identifier: backendModel =>
|
|
3385
|
+
identifier: backendModel => backendModel?.$type === 'BinaryContent',
|
|
3222
3386
|
mapper: (mappingRegistry, backendModel) => {
|
|
3223
3387
|
const { multimediaType } = mapBinaryContentConstructorArgs(mappingRegistry, backendModel);
|
|
3224
3388
|
return new BinaryContent({ backendModel, multimediaType });
|
|
@@ -3295,7 +3459,7 @@ const mapClassificationDetailConstructorArgs = (mappingRegistry, backendModel) =
|
|
|
3295
3459
|
return { category, keywords };
|
|
3296
3460
|
};
|
|
3297
3461
|
const classificationDetailMapping = {
|
|
3298
|
-
identifier: backendModel =>
|
|
3462
|
+
identifier: backendModel => backendModel?.$type === 'ClassificationDetail',
|
|
3299
3463
|
mapper: (mappingRegistry, backendModel) => {
|
|
3300
3464
|
const { category, keywords } = mapClassificationDetailConstructorArgs(mappingRegistry, backendModel);
|
|
3301
3465
|
return new ClassificationDetail({ backendModel, category, keywords });
|
|
@@ -3352,13 +3516,12 @@ class ClassificationInfo {
|
|
|
3352
3516
|
}
|
|
3353
3517
|
|
|
3354
3518
|
const mapClassificationInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
3355
|
-
|
|
3356
|
-
const details = (_a = backendModel.Details) === null || _a === void 0 ? void 0 : _a.map(c => mappingRegistry.map(c)).filter(isDefined);
|
|
3519
|
+
const details = backendModel.Details?.map(c => mappingRegistry.map(c)).filter(isDefined);
|
|
3357
3520
|
const item = backendModel.Item ? mappingRegistry.map(backendModel.Item) : undefined;
|
|
3358
3521
|
return { details, item };
|
|
3359
3522
|
};
|
|
3360
3523
|
const classificationInfoMapping = {
|
|
3361
|
-
identifier: backendModel =>
|
|
3524
|
+
identifier: backendModel => backendModel?.$type === 'ClassificationInfo',
|
|
3362
3525
|
mapper: (mappingRegistry, backendModel) => {
|
|
3363
3526
|
const { details, item } = mapClassificationInfoConstructorArgs(mappingRegistry, backendModel);
|
|
3364
3527
|
return new ClassificationInfo({ backendModel, details, item });
|
|
@@ -3485,8 +3648,7 @@ class BlueprintInfo {
|
|
|
3485
3648
|
* Limited version info for Repository-Local Objects.
|
|
3486
3649
|
*/
|
|
3487
3650
|
class LimitedVersionInfo extends BasicVersionInfo {
|
|
3488
|
-
constructor(
|
|
3489
|
-
var { creator } = _a, basicVersionInfoArgs = __rest(_a, ["creator"]);
|
|
3651
|
+
constructor({ creator, ...basicVersionInfoArgs }) {
|
|
3490
3652
|
super(basicVersionInfoArgs);
|
|
3491
3653
|
Object.defineProperty(this, "_creator", {
|
|
3492
3654
|
enumerable: true,
|
|
@@ -3642,9 +3804,8 @@ class LockInfo {
|
|
|
3642
3804
|
* Abstract base class for the data of repository-local data objects: data objects that reside in a "Repository".
|
|
3643
3805
|
*/
|
|
3644
3806
|
class RepositoryLocalObject extends IdentifiableObject {
|
|
3645
|
-
constructor(
|
|
3646
|
-
|
|
3647
|
-
super(Object.assign({ backendModel }, identifiableObjectArgs));
|
|
3807
|
+
constructor({ backendModel, blueprintInfo, isLocked, limitedVersionInfo, locationInfo, lockInfo, metadata, metadataSchema, ...identifiableObjectArgs }) {
|
|
3808
|
+
super({ backendModel, ...identifiableObjectArgs });
|
|
3648
3809
|
Object.defineProperty(this, "_limitedVersionInfo", {
|
|
3649
3810
|
enumerable: true,
|
|
3650
3811
|
configurable: true,
|
|
@@ -3692,8 +3853,7 @@ class RepositoryLocalObject extends IdentifiableObject {
|
|
|
3692
3853
|
configurable: true,
|
|
3693
3854
|
writable: true,
|
|
3694
3855
|
value: (lockType) => {
|
|
3695
|
-
|
|
3696
|
-
return !!((_a = this._lockInfo) === null || _a === void 0 ? void 0 : _a.lockType.includes(lockType));
|
|
3856
|
+
return !!this._lockInfo?.lockType.includes(lockType);
|
|
3697
3857
|
}
|
|
3698
3858
|
});
|
|
3699
3859
|
Object.defineProperty(this, "isLockedByCurrentUser", {
|
|
@@ -3701,10 +3861,9 @@ class RepositoryLocalObject extends IdentifiableObject {
|
|
|
3701
3861
|
configurable: true,
|
|
3702
3862
|
writable: true,
|
|
3703
3863
|
value: (currentUser) => {
|
|
3704
|
-
var _a, _b;
|
|
3705
3864
|
if (!currentUser.user)
|
|
3706
3865
|
return false;
|
|
3707
|
-
return
|
|
3866
|
+
return this._lockInfo?.lockUser?.idRef === currentUser.user.id;
|
|
3708
3867
|
}
|
|
3709
3868
|
});
|
|
3710
3869
|
Object.defineProperty(this, "getInternalModel", {
|
|
@@ -3762,9 +3921,8 @@ class RepositoryLocalObject extends IdentifiableObject {
|
|
|
3762
3921
|
* Limited version info for Repository-Local Objects.
|
|
3763
3922
|
*/
|
|
3764
3923
|
class FullVersionInfo extends LimitedVersionInfo {
|
|
3765
|
-
constructor(
|
|
3766
|
-
|
|
3767
|
-
super(Object.assign({ backendModel }, limitedVersionInfoArgs));
|
|
3924
|
+
constructor({ backendModel, checkoutUser, lockType, revisor, checkOutDate, ...limitedVersionInfoArgs }) {
|
|
3925
|
+
super({ backendModel, ...limitedVersionInfoArgs });
|
|
3768
3926
|
Object.defineProperty(this, "_checkoutUser", {
|
|
3769
3927
|
enumerable: true,
|
|
3770
3928
|
configurable: true,
|
|
@@ -3862,9 +4020,8 @@ class FullVersionInfo extends LimitedVersionInfo {
|
|
|
3862
4020
|
* Abstract base class for Versioned Items.
|
|
3863
4021
|
*/
|
|
3864
4022
|
class VersionedItem extends RepositoryLocalObject {
|
|
3865
|
-
constructor(
|
|
3866
|
-
|
|
3867
|
-
super(Object.assign({ backendModel }, rloArgs));
|
|
4023
|
+
constructor({ backendModel, dynamicVersionInfo, fullVersionInfo, isDynamic, ...rloArgs }) {
|
|
4024
|
+
super({ backendModel, ...rloArgs });
|
|
3868
4025
|
Object.defineProperty(this, "_dynamicVersionInfo", {
|
|
3869
4026
|
enumerable: true,
|
|
3870
4027
|
configurable: true,
|
|
@@ -3896,8 +4053,7 @@ class VersionedItem extends RepositoryLocalObject {
|
|
|
3896
4053
|
this._fullVersionInfo = fullVersionInfo;
|
|
3897
4054
|
}
|
|
3898
4055
|
get isAwaitingFirstCheckIn() {
|
|
3899
|
-
|
|
3900
|
-
return ((_a = this._fullVersionInfo) === null || _a === void 0 ? void 0 : _a.isNew) || false;
|
|
4056
|
+
return this._fullVersionInfo?.isNew || false;
|
|
3901
4057
|
}
|
|
3902
4058
|
get isDynamic() {
|
|
3903
4059
|
return this._isDynamic;
|
|
@@ -3922,9 +4078,8 @@ class VersionedItem extends RepositoryLocalObject {
|
|
|
3922
4078
|
* Represents the data of a Component: a generic holder of content and metadata.
|
|
3923
4079
|
*/
|
|
3924
4080
|
class ComponentBase extends VersionedItem {
|
|
3925
|
-
constructor(
|
|
3926
|
-
|
|
3927
|
-
super(Object.assign({ backendModel }, componentBaseArgs));
|
|
4081
|
+
constructor({ backendModel, approvalStatus, componentType, schema, workflowInfo, ...componentBaseArgs }) {
|
|
4082
|
+
super({ backendModel, ...componentBaseArgs });
|
|
3928
4083
|
Object.defineProperty(this, "_approvalStatus", {
|
|
3929
4084
|
enumerable: true,
|
|
3930
4085
|
configurable: true,
|
|
@@ -4006,9 +4161,8 @@ class ComponentBase extends VersionedItem {
|
|
|
4006
4161
|
* Represents the data of a regular Component: content and metadata fields.
|
|
4007
4162
|
*/
|
|
4008
4163
|
class Component extends ComponentBase {
|
|
4009
|
-
constructor(
|
|
4010
|
-
|
|
4011
|
-
super(Object.assign({ backendModel }, componentBaseArgs));
|
|
4164
|
+
constructor({ content, backendModel, ...componentBaseArgs }) {
|
|
4165
|
+
super({ backendModel, ...componentBaseArgs });
|
|
4012
4166
|
Object.defineProperty(this, "_content", {
|
|
4013
4167
|
enumerable: true,
|
|
4014
4168
|
configurable: true,
|
|
@@ -4026,8 +4180,7 @@ class Component extends ComponentBase {
|
|
|
4026
4180
|
* Represents the data of a Multimedia Component: binary content data and metadata fields.
|
|
4027
4181
|
*/
|
|
4028
4182
|
class MultimediaComponent extends ComponentBase {
|
|
4029
|
-
constructor(
|
|
4030
|
-
var { binaryContent } = _a, componentBaseArgs = __rest(_a, ["binaryContent"]);
|
|
4183
|
+
constructor({ binaryContent, ...componentBaseArgs }) {
|
|
4031
4184
|
super(componentBaseArgs);
|
|
4032
4185
|
Object.defineProperty(this, "_binaryContent", {
|
|
4033
4186
|
enumerable: true,
|
|
@@ -4049,8 +4202,7 @@ class MultimediaComponent extends ComponentBase {
|
|
|
4049
4202
|
* Represents an External Multimedia Component: an item provided from external system.
|
|
4050
4203
|
*/
|
|
4051
4204
|
class ExternalMultimediaComponent extends MultimediaComponent {
|
|
4052
|
-
constructor(
|
|
4053
|
-
var { externalMetadataSchemaFields } = _a, multimediaComponentArgs = __rest(_a, ["externalMetadataSchemaFields"]);
|
|
4205
|
+
constructor({ externalMetadataSchemaFields, ...multimediaComponentArgs }) {
|
|
4054
4206
|
super(multimediaComponentArgs);
|
|
4055
4207
|
Object.defineProperty(this, "_externalMetadataSchemaFields", {
|
|
4056
4208
|
enumerable: true,
|
|
@@ -4134,9 +4286,12 @@ const mapDynamicVersionInfoConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
4134
4286
|
return { revisor, revisionDate };
|
|
4135
4287
|
};
|
|
4136
4288
|
const dynamicVersionInfoMapping = {
|
|
4137
|
-
identifier: backendModel =>
|
|
4289
|
+
identifier: backendModel => backendModel?.$type === 'DynamicVersionInfo',
|
|
4138
4290
|
mapper: (mappingRegistry, backendModel) => {
|
|
4139
|
-
return new DynamicVersionInfo(
|
|
4291
|
+
return new DynamicVersionInfo({
|
|
4292
|
+
...mapDynamicVersionInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4293
|
+
backendModel,
|
|
4294
|
+
});
|
|
4140
4295
|
},
|
|
4141
4296
|
};
|
|
4142
4297
|
|
|
@@ -4150,21 +4305,27 @@ const mapBlueprintInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
4150
4305
|
return { owningRepository, primaryBlueprintParentItem };
|
|
4151
4306
|
};
|
|
4152
4307
|
const blueprintInfoMapping = {
|
|
4153
|
-
identifier: backendModel =>
|
|
4308
|
+
identifier: backendModel => backendModel?.$type === 'BlueprintInfo',
|
|
4154
4309
|
mapper: (mappingRegistry, backendModel) => {
|
|
4155
|
-
return new BlueprintInfo(
|
|
4310
|
+
return new BlueprintInfo({
|
|
4311
|
+
...mapBlueprintInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4312
|
+
backendModel,
|
|
4313
|
+
});
|
|
4156
4314
|
},
|
|
4157
4315
|
};
|
|
4158
4316
|
|
|
4159
4317
|
const mapLimitedVersionInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
4160
4318
|
const basicVersionInfoConstructorArgs = mapBasicVersionInfoConstructorArgs(mappingRegistry, backendModel);
|
|
4161
4319
|
const creator = backendModel.Creator ? mappingRegistry.map(backendModel.Creator) : undefined;
|
|
4162
|
-
return
|
|
4320
|
+
return { ...basicVersionInfoConstructorArgs, creator };
|
|
4163
4321
|
};
|
|
4164
4322
|
const limitedVersionInfoMapping = {
|
|
4165
|
-
identifier: backendModel =>
|
|
4323
|
+
identifier: backendModel => backendModel?.$type === 'LimitedVersionInfo',
|
|
4166
4324
|
mapper: (mappingRegistry, backendModel) => {
|
|
4167
|
-
return new LimitedVersionInfo(
|
|
4325
|
+
return new LimitedVersionInfo({
|
|
4326
|
+
...mapLimitedVersionInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4327
|
+
backendModel,
|
|
4328
|
+
});
|
|
4168
4329
|
},
|
|
4169
4330
|
};
|
|
4170
4331
|
|
|
@@ -4178,9 +4339,12 @@ const mapLocationInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
4178
4339
|
return { contextRepository, organizationalItem };
|
|
4179
4340
|
};
|
|
4180
4341
|
const locationInfoMapping = {
|
|
4181
|
-
identifier: backendModel =>
|
|
4342
|
+
identifier: backendModel => backendModel?.$type === 'LocationInfo',
|
|
4182
4343
|
mapper: (mappingRegistry, backendModel) => {
|
|
4183
|
-
return new LocationInfo(
|
|
4344
|
+
return new LocationInfo({
|
|
4345
|
+
...mapLocationInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4346
|
+
backendModel,
|
|
4347
|
+
});
|
|
4184
4348
|
},
|
|
4185
4349
|
};
|
|
4186
4350
|
|
|
@@ -4222,16 +4386,18 @@ const mapLockTypeToBackend = (model) => {
|
|
|
4222
4386
|
};
|
|
4223
4387
|
|
|
4224
4388
|
const mapLockInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
4225
|
-
var _a;
|
|
4226
4389
|
const lockUser = backendModel.LockUser ? mappingRegistry.map(backendModel.LockUser) : undefined;
|
|
4227
|
-
const lockType =
|
|
4390
|
+
const lockType = backendModel.LockType?.map(l => mapLockType(l)) || [];
|
|
4228
4391
|
const lockDate = backendModel.LockDate ? mapDate(backendModel.LockDate) : undefined;
|
|
4229
4392
|
return { lockUser, lockType, lockDate };
|
|
4230
4393
|
};
|
|
4231
4394
|
const lockInfoMapping = {
|
|
4232
|
-
identifier: backendModel =>
|
|
4395
|
+
identifier: backendModel => backendModel?.$type === 'LockInfo',
|
|
4233
4396
|
mapper: (mappingRegistry, backendModel) => {
|
|
4234
|
-
return new LockInfo(
|
|
4397
|
+
return new LockInfo({
|
|
4398
|
+
...mapLockInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4399
|
+
backendModel,
|
|
4400
|
+
});
|
|
4235
4401
|
},
|
|
4236
4402
|
};
|
|
4237
4403
|
|
|
@@ -4250,15 +4416,18 @@ const mapRepositoryLocalObjectConstructorArgs = (mappingRegistry, backendModel)
|
|
|
4250
4416
|
? mappingRegistry.map(backendModel.LocationInfo)
|
|
4251
4417
|
: undefined;
|
|
4252
4418
|
const lockInfo = backendModel.LockInfo ? mappingRegistry.map(backendModel.LockInfo) : undefined;
|
|
4253
|
-
const isLocked = !!
|
|
4419
|
+
const isLocked = !!lockInfo?.lockType.length && !lockInfo?.lockType.includes('none');
|
|
4254
4420
|
const metadata = backendModel.Metadata ? contentMapping(mappingRegistry, backendModel.Metadata) : undefined;
|
|
4255
|
-
return
|
|
4421
|
+
return {
|
|
4422
|
+
...identifiableObjectConstructorArgs,
|
|
4423
|
+
blueprintInfo,
|
|
4256
4424
|
isLocked,
|
|
4257
4425
|
limitedVersionInfo,
|
|
4258
4426
|
locationInfo,
|
|
4259
4427
|
lockInfo,
|
|
4260
4428
|
metadataSchema,
|
|
4261
|
-
metadata
|
|
4429
|
+
metadata,
|
|
4430
|
+
};
|
|
4262
4431
|
};
|
|
4263
4432
|
|
|
4264
4433
|
const mapRloItemTypeToBackend = (rloItemType) => {
|
|
@@ -4308,35 +4477,43 @@ const mapVersionedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
4308
4477
|
: undefined;
|
|
4309
4478
|
let isDynamic = false;
|
|
4310
4479
|
// If id of an item passed is dynamic, sets versionless uri to _id prop instead.
|
|
4311
|
-
if (repositoryLocalObjectConstructorArgs.id
|
|
4312
|
-
|
|
4313
|
-
|
|
4480
|
+
if ((repositoryLocalObjectConstructorArgs.id instanceof TcmUri ||
|
|
4481
|
+
repositoryLocalObjectConstructorArgs.id instanceof EclUri) &&
|
|
4482
|
+
repositoryLocalObjectConstructorArgs.id.isDynamic) {
|
|
4314
4483
|
repositoryLocalObjectConstructorArgs.id = repositoryLocalObjectConstructorArgs.id.getVersionlessUri();
|
|
4315
4484
|
isDynamic = true;
|
|
4316
4485
|
}
|
|
4317
|
-
return
|
|
4486
|
+
return {
|
|
4487
|
+
...repositoryLocalObjectConstructorArgs,
|
|
4488
|
+
dynamicVersionInfo,
|
|
4318
4489
|
fullVersionInfo,
|
|
4319
|
-
isDynamic
|
|
4490
|
+
isDynamic,
|
|
4491
|
+
};
|
|
4320
4492
|
};
|
|
4321
4493
|
|
|
4322
4494
|
const mapFullVersionInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
4323
|
-
var _a;
|
|
4324
4495
|
const limitedVersionInfoConstructorArgs = mapLimitedVersionInfoConstructorArgs(mappingRegistry, backendModel);
|
|
4325
4496
|
const checkoutUser = backendModel.CheckOutUser ? mappingRegistry.map(backendModel.CheckOutUser) : undefined;
|
|
4326
|
-
const lockType =
|
|
4497
|
+
const lockType = backendModel.LockType?.map(l => mapLockType(l));
|
|
4327
4498
|
const revisor = backendModel.Revisor ? mappingRegistry.map(backendModel.Revisor) : undefined;
|
|
4328
4499
|
const checkOutDate = backendModel.CheckOutDate ? mapDate(backendModel.CheckOutDate) : undefined;
|
|
4329
4500
|
const revisionDate = backendModel.RevisionDate ? mapDate(backendModel.RevisionDate) : undefined;
|
|
4330
|
-
return
|
|
4501
|
+
return {
|
|
4502
|
+
...limitedVersionInfoConstructorArgs,
|
|
4503
|
+
checkOutDate,
|
|
4331
4504
|
checkoutUser,
|
|
4332
4505
|
lockType,
|
|
4333
4506
|
revisor,
|
|
4334
|
-
revisionDate
|
|
4507
|
+
revisionDate,
|
|
4508
|
+
};
|
|
4335
4509
|
};
|
|
4336
4510
|
const fullVersionInfoMapping = {
|
|
4337
|
-
identifier: backendModel =>
|
|
4511
|
+
identifier: backendModel => backendModel?.$type === 'FullVersionInfo',
|
|
4338
4512
|
mapper: (mappingRegistry, backendModel) => {
|
|
4339
|
-
return new FullVersionInfo(
|
|
4513
|
+
return new FullVersionInfo({
|
|
4514
|
+
...mapFullVersionInfoConstructorArgs(mappingRegistry, backendModel),
|
|
4515
|
+
backendModel,
|
|
4516
|
+
});
|
|
4340
4517
|
},
|
|
4341
4518
|
};
|
|
4342
4519
|
|
|
@@ -4363,20 +4540,26 @@ const mapComponentBaseConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
4363
4540
|
const workflowInfo = backendModel.WorkflowInfo
|
|
4364
4541
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
4365
4542
|
: undefined;
|
|
4366
|
-
return
|
|
4543
|
+
return {
|
|
4544
|
+
...versionedItemConstructorArgs,
|
|
4545
|
+
approvalStatus,
|
|
4367
4546
|
componentType,
|
|
4368
4547
|
schema,
|
|
4369
|
-
workflowInfo
|
|
4548
|
+
workflowInfo,
|
|
4549
|
+
};
|
|
4370
4550
|
};
|
|
4371
4551
|
|
|
4372
4552
|
const mapComponentConstructorArgs = mapComponentBaseConstructorArgs;
|
|
4373
4553
|
// Maps multimedia component as a fallback
|
|
4374
4554
|
const componentMapping = {
|
|
4375
|
-
identifier: backendModel =>
|
|
4555
|
+
identifier: backendModel => backendModel?.$type === 'Component',
|
|
4376
4556
|
mapper: (mappingRegistry, backendModel) => {
|
|
4377
4557
|
const content = backendModel.Content ? contentMapping(mappingRegistry, backendModel.Content) : undefined;
|
|
4378
|
-
return new Component(
|
|
4379
|
-
|
|
4558
|
+
return new Component({
|
|
4559
|
+
...mapComponentConstructorArgs(mappingRegistry, backendModel),
|
|
4560
|
+
backendModel,
|
|
4561
|
+
content,
|
|
4562
|
+
});
|
|
4380
4563
|
},
|
|
4381
4564
|
};
|
|
4382
4565
|
|
|
@@ -4656,8 +4839,7 @@ class ListDefinition {
|
|
|
4656
4839
|
* Provides information about whether/how to present a list of allowed date field values.
|
|
4657
4840
|
*/
|
|
4658
4841
|
class DateListDefinition extends ListDefinition {
|
|
4659
|
-
constructor(
|
|
4660
|
-
var { entries: entires } = _a, listProps = __rest(_a, ["entries"]);
|
|
4842
|
+
constructor({ entries: entires, ...listProps }) {
|
|
4661
4843
|
super(listProps);
|
|
4662
4844
|
Object.defineProperty(this, "_entries", {
|
|
4663
4845
|
enumerable: true,
|
|
@@ -5159,9 +5341,8 @@ class XhtmlFieldDefinition extends TextFieldDefinition {
|
|
|
5159
5341
|
* Schema defines structure of content and/or metadata.
|
|
5160
5342
|
*/
|
|
5161
5343
|
class Schema extends VersionedItem {
|
|
5162
|
-
constructor(
|
|
5163
|
-
|
|
5164
|
-
super(Object.assign({ backendModel }, versionedItemProps));
|
|
5344
|
+
constructor({ backendModel, allowedMultimediaTypes, bundleProcess, componentProcess, fields, metadataFields, purpose, ...versionedItemProps }) {
|
|
5345
|
+
super({ backendModel, ...versionedItemProps });
|
|
5165
5346
|
Object.defineProperty(this, "_allowedMultimediaTypes", {
|
|
5166
5347
|
enumerable: true,
|
|
5167
5348
|
configurable: true,
|
|
@@ -5279,28 +5460,28 @@ class Schema extends VersionedItem {
|
|
|
5279
5460
|
}
|
|
5280
5461
|
|
|
5281
5462
|
const externalLinkFieldDefinitionMapping = {
|
|
5282
|
-
identifier: backendModel =>
|
|
5463
|
+
identifier: backendModel => backendModel?.$type === 'ExternalLinkFieldDefinition',
|
|
5283
5464
|
mapper: (mappingRegistry, backendModel) => {
|
|
5284
5465
|
return new ExternalLinkFieldDefinition(backendModel);
|
|
5285
5466
|
},
|
|
5286
5467
|
};
|
|
5287
5468
|
|
|
5288
5469
|
const formattingFeaturesMapping = {
|
|
5289
|
-
identifier: backendModel =>
|
|
5470
|
+
identifier: backendModel => backendModel?.$type === 'FormattingFeatures',
|
|
5290
5471
|
mapper: (mappingRegistry, backendModel) => {
|
|
5291
5472
|
return new FormattingFeatures(backendModel);
|
|
5292
5473
|
},
|
|
5293
5474
|
};
|
|
5294
5475
|
|
|
5295
5476
|
const multilineTextFieldDefinitionMapping = {
|
|
5296
|
-
identifier: backendModel =>
|
|
5477
|
+
identifier: backendModel => backendModel?.$type === 'MultiLineTextFieldDefinition',
|
|
5297
5478
|
mapper: (mappingRegistry, backendModel) => {
|
|
5298
5479
|
return new MultiLineTextFieldDefinition(backendModel);
|
|
5299
5480
|
},
|
|
5300
5481
|
};
|
|
5301
5482
|
|
|
5302
5483
|
const singleLineTextFieldDefinitionMapping = {
|
|
5303
|
-
identifier: backendModel =>
|
|
5484
|
+
identifier: backendModel => backendModel?.$type === 'SingleLineTextFieldDefinition',
|
|
5304
5485
|
mapper: (mappingRegistry, backendModel) => {
|
|
5305
5486
|
const list = backendModel.List
|
|
5306
5487
|
? mappingRegistry.map(backendModel.List)
|
|
@@ -5310,7 +5491,7 @@ const singleLineTextFieldDefinitionMapping = {
|
|
|
5310
5491
|
};
|
|
5311
5492
|
|
|
5312
5493
|
const singleLineTextListDefinitionMapping = {
|
|
5313
|
-
identifier: backendModel =>
|
|
5494
|
+
identifier: backendModel => backendModel?.$type === 'SingleLineTextListDefinition',
|
|
5314
5495
|
mapper: (mappingRegistry, backendModel) => {
|
|
5315
5496
|
const type = backendModel.Type ? mappingRegistry.map(backendModel.Type) : undefined;
|
|
5316
5497
|
return new SingleLineTextListDefinition({ backendModel, type });
|
|
@@ -5318,7 +5499,7 @@ const singleLineTextListDefinitionMapping = {
|
|
|
5318
5499
|
};
|
|
5319
5500
|
|
|
5320
5501
|
const xhtmlFieldDefinitionMapping = {
|
|
5321
|
-
identifier: backendModel =>
|
|
5502
|
+
identifier: backendModel => backendModel?.$type === 'XhtmlFieldDefinition',
|
|
5322
5503
|
mapper: (mappingRegistry, backendModel) => {
|
|
5323
5504
|
const formattingFeatures = backendModel.FormattingFeatures
|
|
5324
5505
|
? mappingRegistry.map(backendModel.FormattingFeatures)
|
|
@@ -5333,7 +5514,7 @@ const mapComponentLinkFieldDefinitionConstructorArgs = (mappingRegistry, backend
|
|
|
5333
5514
|
return { allowedTargetSchemas, defaultValue };
|
|
5334
5515
|
};
|
|
5335
5516
|
const componentLinkFieldDefinitionMapping = {
|
|
5336
|
-
identifier: backendModel =>
|
|
5517
|
+
identifier: backendModel => backendModel?.$type === 'ComponentLinkFieldDefinition',
|
|
5337
5518
|
mapper: (mappingRegistry, backendModel) => {
|
|
5338
5519
|
const { allowedTargetSchemas, defaultValue } = mapComponentLinkFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
5339
5520
|
return new ComponentLinkFieldDefinition({ backendModel, allowedTargetSchemas, defaultValue });
|
|
@@ -5347,7 +5528,7 @@ const mapDateFieldDefinitionConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
5347
5528
|
return { list, maxValue, minValue };
|
|
5348
5529
|
};
|
|
5349
5530
|
const dateFieldDefinitionMapping = {
|
|
5350
|
-
identifier: backendModel =>
|
|
5531
|
+
identifier: backendModel => backendModel?.$type === 'DateFieldDefinition',
|
|
5351
5532
|
mapper: (mappingRegistry, backendModel) => {
|
|
5352
5533
|
const { list, maxValue, minValue } = mapDateFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
5353
5534
|
return new DateFieldDefinition({ backendModel, list, maxValue, minValue });
|
|
@@ -5355,13 +5536,12 @@ const dateFieldDefinitionMapping = {
|
|
|
5355
5536
|
};
|
|
5356
5537
|
|
|
5357
5538
|
const mapDateListDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
5358
|
-
var _a;
|
|
5359
5539
|
const type = backendModel.Type ? mappingRegistry.map(backendModel.Type) : undefined;
|
|
5360
|
-
const entries =
|
|
5540
|
+
const entries = backendModel.Entries?.map(mapDate).filter(isDefined);
|
|
5361
5541
|
return { type, entries };
|
|
5362
5542
|
};
|
|
5363
5543
|
const dateListDefinitionMapping = {
|
|
5364
|
-
identifier: backendModel =>
|
|
5544
|
+
identifier: backendModel => backendModel?.$type === 'DateListDefinition',
|
|
5365
5545
|
mapper: (mappingRegistry, backendModel) => {
|
|
5366
5546
|
const { type, entries } = mapDateListDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
5367
5547
|
return new DateListDefinition({ backendModel, type, entries });
|
|
@@ -7233,7 +7413,7 @@ const mapObject = (object, mappingFunction) => {
|
|
|
7233
7413
|
};
|
|
7234
7414
|
|
|
7235
7415
|
const mapFieldsDefinitionDictionary = (mappingRegistry, backendModel) => {
|
|
7236
|
-
const modelToMap =
|
|
7416
|
+
const { $type, ...modelToMap } = backendModel;
|
|
7237
7417
|
if (Object.keys(modelToMap).length === 0) {
|
|
7238
7418
|
return undefined;
|
|
7239
7419
|
}
|
|
@@ -7252,7 +7432,7 @@ const mapEmbeddedSchemaFieldDefinitionConstructorArgs = (mappingRegistry, backen
|
|
|
7252
7432
|
return { embeddedFields, embeddedSchema };
|
|
7253
7433
|
};
|
|
7254
7434
|
const embeddedSchemaFieldDefinitionMapping = {
|
|
7255
|
-
identifier: backendModel =>
|
|
7435
|
+
identifier: backendModel => backendModel?.$type === 'EmbeddedSchemaFieldDefinition',
|
|
7256
7436
|
mapper: (mappingRegistry, backendModel) => {
|
|
7257
7437
|
const { embeddedFields, embeddedSchema } = mapEmbeddedSchemaFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
7258
7438
|
return new EmbeddedSchemaFieldDefinition({ backendModel, embeddedFields, embeddedSchema });
|
|
@@ -7266,7 +7446,7 @@ const mapKeywordFieldDefinitionConstructorArgs = (mappingRegistry, backendModel)
|
|
|
7266
7446
|
return { category, defaultValue, list };
|
|
7267
7447
|
};
|
|
7268
7448
|
const keywordFieldDefinitionMapping = {
|
|
7269
|
-
identifier: backendModel =>
|
|
7449
|
+
identifier: backendModel => backendModel?.$type === 'KeywordFieldDefinition',
|
|
7270
7450
|
mapper: (mappingRegistry, backendModel) => {
|
|
7271
7451
|
const { category, defaultValue, list } = mapKeywordFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
7272
7452
|
return new KeywordFieldDefinition({ backendModel, category, defaultValue, list });
|
|
@@ -7278,7 +7458,7 @@ const mapListDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
7278
7458
|
return { type };
|
|
7279
7459
|
};
|
|
7280
7460
|
const listDefinitionMapping = {
|
|
7281
|
-
identifier: backendModel =>
|
|
7461
|
+
identifier: backendModel => backendModel?.$type === 'ListDefinition',
|
|
7282
7462
|
mapper: (mappingRegistry, backendModel) => {
|
|
7283
7463
|
const { type } = mapListDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
7284
7464
|
return new ListDefinition({ backendModel, type });
|
|
@@ -7291,7 +7471,7 @@ const mapMultimediaLinkFieldDefinitionConstructorArgs = (mappingRegistry, backen
|
|
|
7291
7471
|
return { allowedTargetSchemas, defaultValue };
|
|
7292
7472
|
};
|
|
7293
7473
|
const multimediaLinkFieldDefinitionMapping = {
|
|
7294
|
-
identifier: backendModel =>
|
|
7474
|
+
identifier: backendModel => backendModel?.$type === 'MultimediaLinkFieldDefinition',
|
|
7295
7475
|
mapper: (mappingRegistry, backendModel) => {
|
|
7296
7476
|
const { allowedTargetSchemas, defaultValue } = mapMultimediaLinkFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
7297
7477
|
return new MultimediaLinkFieldDefinition({ backendModel, allowedTargetSchemas, defaultValue });
|
|
@@ -7303,7 +7483,7 @@ const mapNumberFieldDefinitionConstructorArgs = (mappingRegistry, backendModel)
|
|
|
7303
7483
|
return { list };
|
|
7304
7484
|
};
|
|
7305
7485
|
const numberFieldDefinitionMapping = {
|
|
7306
|
-
identifier: backendModel =>
|
|
7486
|
+
identifier: backendModel => backendModel?.$type === 'NumberFieldDefinition',
|
|
7307
7487
|
mapper: (mappingRegistry, backendModel) => {
|
|
7308
7488
|
const { list } = mapNumberFieldDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
7309
7489
|
return new NumberFieldDefinition({ backendModel, list });
|
|
@@ -7375,17 +7555,23 @@ const mapSchemaConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
7375
7555
|
? mapFieldsDefinitionDictionary(mappingRegistry, backendModel.MetadataFields)
|
|
7376
7556
|
: undefined;
|
|
7377
7557
|
const purpose = backendModel.Purpose ? mapSchemaPurpose(backendModel.Purpose) : undefined;
|
|
7378
|
-
return
|
|
7558
|
+
return {
|
|
7559
|
+
...versionedItemConstructorArgs,
|
|
7560
|
+
allowedMultimediaTypes,
|
|
7379
7561
|
bundleProcess,
|
|
7380
7562
|
componentProcess,
|
|
7381
7563
|
fields,
|
|
7382
7564
|
metadataFields,
|
|
7383
|
-
purpose
|
|
7565
|
+
purpose,
|
|
7566
|
+
};
|
|
7384
7567
|
};
|
|
7385
7568
|
const schemaMapping = {
|
|
7386
|
-
identifier: backendModel =>
|
|
7569
|
+
identifier: backendModel => backendModel?.$type === 'Schema',
|
|
7387
7570
|
mapper: (mappingRegistry, backendModel) => {
|
|
7388
|
-
return new Schema(
|
|
7571
|
+
return new Schema({
|
|
7572
|
+
...mapSchemaConstructorArgs(mappingRegistry, backendModel),
|
|
7573
|
+
backendModel,
|
|
7574
|
+
});
|
|
7389
7575
|
},
|
|
7390
7576
|
};
|
|
7391
7577
|
|
|
@@ -7394,12 +7580,18 @@ const mapMultimediaComponentConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
7394
7580
|
const binaryContent = backendModel.BinaryContent
|
|
7395
7581
|
? mappingRegistry.map(backendModel.BinaryContent)
|
|
7396
7582
|
: undefined;
|
|
7397
|
-
return
|
|
7583
|
+
return {
|
|
7584
|
+
...componentBaseConstructorArgs,
|
|
7585
|
+
binaryContent,
|
|
7586
|
+
};
|
|
7398
7587
|
};
|
|
7399
7588
|
const multimediaComponentMapping = {
|
|
7400
|
-
identifier: backendModel =>
|
|
7589
|
+
identifier: backendModel => backendModel?.$type === 'Component' && backendModel?.ComponentType === ComponentType.MULTIMEDIA,
|
|
7401
7590
|
mapper: (mappingRegistry, backendModel) => {
|
|
7402
|
-
return new MultimediaComponent(
|
|
7591
|
+
return new MultimediaComponent({
|
|
7592
|
+
...mapMultimediaComponentConstructorArgs(mappingRegistry, backendModel),
|
|
7593
|
+
backendModel,
|
|
7594
|
+
});
|
|
7403
7595
|
},
|
|
7404
7596
|
};
|
|
7405
7597
|
|
|
@@ -7408,20 +7600,29 @@ const mapExternalMultimediaComponentConstructorArgs = (mappingRegistry, backendM
|
|
|
7408
7600
|
const externalMetadataSchemaFields = backendModel.ExternalMetadataSchemaFields
|
|
7409
7601
|
? mapFieldsDefinitionDictionary(mappingRegistry, backendModel.ExternalMetadataSchemaFields)
|
|
7410
7602
|
: undefined;
|
|
7411
|
-
return
|
|
7603
|
+
return {
|
|
7604
|
+
...multimediaComponentConstructorArgs,
|
|
7605
|
+
externalMetadataSchemaFields,
|
|
7606
|
+
};
|
|
7412
7607
|
};
|
|
7413
7608
|
const externalMultimediaComponentMapping = {
|
|
7414
|
-
identifier: backendModel =>
|
|
7609
|
+
identifier: backendModel => backendModel?.$type === 'ExternalComponent',
|
|
7415
7610
|
mapper: (mappingRegistry, backendModel) => {
|
|
7416
|
-
return new ExternalMultimediaComponent(
|
|
7611
|
+
return new ExternalMultimediaComponent({
|
|
7612
|
+
...mapExternalMultimediaComponentConstructorArgs(mappingRegistry, backendModel),
|
|
7613
|
+
backendModel,
|
|
7614
|
+
});
|
|
7417
7615
|
},
|
|
7418
7616
|
};
|
|
7419
7617
|
|
|
7420
7618
|
const mapExternalVersionInfoConstructorArgs = mapFullVersionInfoConstructorArgs;
|
|
7421
7619
|
const externalVersionInfoMapping = {
|
|
7422
|
-
identifier: backendModel =>
|
|
7620
|
+
identifier: backendModel => backendModel?.$type === 'ExternalVersionInfo',
|
|
7423
7621
|
mapper: (mappingRegistry, backendModel) => {
|
|
7424
|
-
return new ExternalVersionInfo(
|
|
7622
|
+
return new ExternalVersionInfo({
|
|
7623
|
+
...mapExternalVersionInfoConstructorArgs(mappingRegistry, backendModel),
|
|
7624
|
+
backendModel,
|
|
7625
|
+
});
|
|
7425
7626
|
},
|
|
7426
7627
|
};
|
|
7427
7628
|
|
|
@@ -7493,13 +7694,12 @@ class DependencyGraphNode {
|
|
|
7493
7694
|
}
|
|
7494
7695
|
|
|
7495
7696
|
const mapDependencyGraphNodeConstructorArgs = (mappingRegistry, backendModel) => {
|
|
7496
|
-
|
|
7497
|
-
const dependencies = (_a = backendModel.Dependencies) === null || _a === void 0 ? void 0 : _a.map(c => mappingRegistry.map(c)).filter(isDefined);
|
|
7697
|
+
const dependencies = backendModel.Dependencies?.map(c => mappingRegistry.map(c)).filter(isDefined);
|
|
7498
7698
|
const item = backendModel.Item ? mappingRegistry.map(backendModel.Item) : undefined;
|
|
7499
7699
|
return { dependencies, item };
|
|
7500
7700
|
};
|
|
7501
7701
|
const dependencyGraphNodeMapping = {
|
|
7502
|
-
identifier: backendModel =>
|
|
7702
|
+
identifier: backendModel => backendModel?.$type === 'DependencyGraphNode',
|
|
7503
7703
|
mapper: (mappingRegistry, backendModel) => {
|
|
7504
7704
|
const { dependencies, item } = mapDependencyGraphNodeConstructorArgs(mappingRegistry, backendModel);
|
|
7505
7705
|
return new DependencyGraphNode({ backendModel, dependencies, item });
|
|
@@ -7510,9 +7710,8 @@ const dependencyGraphNodeMapping = {
|
|
|
7510
7710
|
* Represents the data of a Keyword used to classify items.
|
|
7511
7711
|
*/
|
|
7512
7712
|
class Keyword extends RepositoryLocalObject {
|
|
7513
|
-
constructor(
|
|
7514
|
-
|
|
7515
|
-
super(Object.assign({ backendModel }, rloArgs));
|
|
7713
|
+
constructor({ backendModel, parentKeywords, relatedKeywords, ...rloArgs }) {
|
|
7714
|
+
super({ backendModel, ...rloArgs });
|
|
7516
7715
|
Object.defineProperty(this, "_parentKeywords", {
|
|
7517
7716
|
enumerable: true,
|
|
7518
7717
|
configurable: true,
|
|
@@ -7589,9 +7788,8 @@ class Keyword extends RepositoryLocalObject {
|
|
|
7589
7788
|
* Represents an External Keyword (mapped to an external Taxonomy Management System).
|
|
7590
7789
|
*/
|
|
7591
7790
|
class ExternalKeyword extends Keyword {
|
|
7592
|
-
constructor(
|
|
7593
|
-
|
|
7594
|
-
super(Object.assign({ backendModel }, keywordArgs));
|
|
7791
|
+
constructor({ backendModel, externalMetadataSchemaFields, ...keywordArgs }) {
|
|
7792
|
+
super({ backendModel, ...keywordArgs });
|
|
7595
7793
|
Object.defineProperty(this, "_externalMetadataSchemaFields", {
|
|
7596
7794
|
enumerable: true,
|
|
7597
7795
|
configurable: true,
|
|
@@ -7654,11 +7852,14 @@ const mapKeywordConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
7654
7852
|
const versionedItemConstructorArgs = mapVersionedItemConstructorArgs(mappingRegistry, backendModel);
|
|
7655
7853
|
const parentKeywords = mapLinks(mappingRegistry, backendModel.ParentKeywords);
|
|
7656
7854
|
const relatedKeywords = mapLinks(mappingRegistry, backendModel.RelatedKeywords);
|
|
7657
|
-
return
|
|
7658
|
-
|
|
7855
|
+
return {
|
|
7856
|
+
...versionedItemConstructorArgs,
|
|
7857
|
+
parentKeywords,
|
|
7858
|
+
relatedKeywords,
|
|
7859
|
+
};
|
|
7659
7860
|
};
|
|
7660
7861
|
const keywordMapping = {
|
|
7661
|
-
identifier: backendModel =>
|
|
7862
|
+
identifier: backendModel => backendModel?.$type === 'Keyword',
|
|
7662
7863
|
mapper: (mappingRegistry, backendModel) => {
|
|
7663
7864
|
const { applicableActions, basicVersionInfo, blueprintInfo, id, isLocked, limitedVersionInfo, listLinks, loadInfo, locationInfo, lockInfo, metadata, metadataSchema, parentKeywords, relatedKeywords, securityDescriptor, listInfo, } = mapKeywordConstructorArgs(mappingRegistry, backendModel);
|
|
7664
7865
|
return new Keyword({
|
|
@@ -7688,10 +7889,13 @@ const mapExternalKeywordConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
7688
7889
|
const externalMetadataSchemaFields = backendModel.ExternalMetadataSchemaFields
|
|
7689
7890
|
? mapFieldsDefinitionDictionary(mappingRegistry, backendModel.ExternalMetadataSchemaFields)
|
|
7690
7891
|
: undefined;
|
|
7691
|
-
return
|
|
7892
|
+
return {
|
|
7893
|
+
...keywordConstructorArgs,
|
|
7894
|
+
externalMetadataSchemaFields,
|
|
7895
|
+
};
|
|
7692
7896
|
};
|
|
7693
7897
|
const externalKeywordMapping = {
|
|
7694
|
-
identifier: backendModel =>
|
|
7898
|
+
identifier: backendModel => backendModel?.$type === 'ExternalKeyword',
|
|
7695
7899
|
mapper: (mappingRegistry, backendModel) => {
|
|
7696
7900
|
const { applicableActions, basicVersionInfo, blueprintInfo, externalMetadataSchemaFields, id, isLocked, limitedVersionInfo, listLinks, loadInfo, locationInfo, lockInfo, metadata, metadataSchema, parentKeywords, relatedKeywords, securityDescriptor, listInfo, } = mapExternalKeywordConstructorArgs(mappingRegistry, backendModel);
|
|
7697
7901
|
return new ExternalKeyword({
|
|
@@ -7721,9 +7925,8 @@ const externalKeywordMapping = {
|
|
|
7721
7925
|
* Abstract base class for the data of "organizational items": items used to organize the items in a Repository.
|
|
7722
7926
|
*/
|
|
7723
7927
|
class OrganizationalItem extends RepositoryLocalObject {
|
|
7724
|
-
constructor(
|
|
7725
|
-
|
|
7726
|
-
super(Object.assign({ backendModel }, rloArgs));
|
|
7928
|
+
constructor({ backendModel, accessControlList, contentSecurityDescriptor, ...rloArgs }) {
|
|
7929
|
+
super({ backendModel, ...rloArgs });
|
|
7727
7930
|
Object.defineProperty(this, "_accessControlList", {
|
|
7728
7931
|
enumerable: true,
|
|
7729
7932
|
configurable: true,
|
|
@@ -7779,9 +7982,8 @@ class OrganizationalItem extends RepositoryLocalObject {
|
|
|
7779
7982
|
* Organizational Item that dynamically collects its contents.
|
|
7780
7983
|
*/
|
|
7781
7984
|
class VirtualFolder extends OrganizationalItem {
|
|
7782
|
-
constructor(
|
|
7783
|
-
|
|
7784
|
-
super(Object.assign({ backendModel }, orgItemArgs));
|
|
7985
|
+
constructor({ backendModel, approvalStatus, typeSchema, workflowInfo, ...orgItemArgs }) {
|
|
7986
|
+
super({ backendModel, ...orgItemArgs });
|
|
7785
7987
|
Object.defineProperty(this, "_approvalStatus", {
|
|
7786
7988
|
enumerable: true,
|
|
7787
7989
|
configurable: true,
|
|
@@ -7845,9 +8047,8 @@ class VirtualFolder extends OrganizationalItem {
|
|
|
7845
8047
|
* Represents a Bundle which is used to group Repository Local Objects for Release Management purposes.
|
|
7846
8048
|
*/
|
|
7847
8049
|
class Bundle extends VirtualFolder {
|
|
7848
|
-
constructor(
|
|
7849
|
-
|
|
7850
|
-
super(Object.assign({ backendModel }, bundleArgs));
|
|
8050
|
+
constructor({ backendModel, items, ...bundleArgs }) {
|
|
8051
|
+
super({ backendModel, ...bundleArgs });
|
|
7851
8052
|
Object.defineProperty(this, "_items", {
|
|
7852
8053
|
enumerable: true,
|
|
7853
8054
|
configurable: true,
|
|
@@ -7885,9 +8086,8 @@ class Bundle extends VirtualFolder {
|
|
|
7885
8086
|
* then, the Business Process Type should be loaded with LoadFlags.Expanded.
|
|
7886
8087
|
*/
|
|
7887
8088
|
class BusinessProcessType extends OrganizationalItem {
|
|
7888
|
-
constructor(
|
|
7889
|
-
|
|
7890
|
-
super(Object.assign({ backendModel }, orgItemArgs));
|
|
8089
|
+
constructor({ backendModel, bundleSchemas, targetTypes, ...orgItemArgs }) {
|
|
8090
|
+
super({ backendModel, ...orgItemArgs });
|
|
7891
8091
|
Object.defineProperty(this, "_bundleSchemas", {
|
|
7892
8092
|
enumerable: true,
|
|
7893
8093
|
configurable: true,
|
|
@@ -7963,9 +8163,11 @@ class BusinessProcessType extends OrganizationalItem {
|
|
|
7963
8163
|
* An item used to organize the business process types in a Repository.
|
|
7964
8164
|
*/
|
|
7965
8165
|
class BusinessProcessTypes extends OrganizationalItem {
|
|
7966
|
-
constructor(
|
|
7967
|
-
|
|
7968
|
-
|
|
8166
|
+
constructor({ backendModel, ...organizationalItemArgs }) {
|
|
8167
|
+
super({
|
|
8168
|
+
backendModel,
|
|
8169
|
+
...organizationalItemArgs,
|
|
8170
|
+
});
|
|
7969
8171
|
}
|
|
7970
8172
|
}
|
|
7971
8173
|
|
|
@@ -8010,9 +8212,8 @@ const createBackendTaxonomies = (publicationId) => {
|
|
|
8010
8212
|
* An item used to organize the items in a Repository.
|
|
8011
8213
|
*/
|
|
8012
8214
|
class Folder extends OrganizationalItem {
|
|
8013
|
-
constructor(
|
|
8014
|
-
|
|
8015
|
-
super(Object.assign({ backendModel }, orgItemArgs));
|
|
8215
|
+
constructor({ backendModel, linkedSchema, ...orgItemArgs }) {
|
|
8216
|
+
super({ backendModel, ...orgItemArgs });
|
|
8016
8217
|
Object.defineProperty(this, "_linkedSchema", {
|
|
8017
8218
|
enumerable: true,
|
|
8018
8219
|
configurable: true,
|
|
@@ -8090,9 +8291,8 @@ class ExternalContainer extends Folder {
|
|
|
8090
8291
|
* Represents the data of a Category of Keywords.
|
|
8091
8292
|
*/
|
|
8092
8293
|
class KeywordCategory extends OrganizationalItem {
|
|
8093
|
-
constructor(
|
|
8094
|
-
|
|
8095
|
-
super(Object.assign({ backendModel }, orgItemArgs));
|
|
8294
|
+
constructor({ backendModel, allowedParentCategories, keywordMetadataSchema, ...orgItemArgs }) {
|
|
8295
|
+
super({ backendModel, ...orgItemArgs });
|
|
8096
8296
|
Object.defineProperty(this, "_allowedParentCategories", {
|
|
8097
8297
|
enumerable: true,
|
|
8098
8298
|
configurable: true,
|
|
@@ -8181,9 +8381,8 @@ class KeywordCategory extends OrganizationalItem {
|
|
|
8181
8381
|
* Represents an External Category (mapped to an external Taxonomy Management System).
|
|
8182
8382
|
*/
|
|
8183
8383
|
class ExternalKeywordCategory extends KeywordCategory {
|
|
8184
|
-
constructor(
|
|
8185
|
-
|
|
8186
|
-
super(Object.assign({ backendModel }, keywordCategoryArgs));
|
|
8384
|
+
constructor({ backendModel, ...keywordCategoryArgs }) {
|
|
8385
|
+
super({ backendModel, ...keywordCategoryArgs });
|
|
8187
8386
|
Object.defineProperty(this, "getInternalModel", {
|
|
8188
8387
|
enumerable: true,
|
|
8189
8388
|
configurable: true,
|
|
@@ -8211,9 +8410,8 @@ class ExternalKeywordCategory extends KeywordCategory {
|
|
|
8211
8410
|
* Represents a publishing location information for the objects that reside in Structure Groups.
|
|
8212
8411
|
*/
|
|
8213
8412
|
class PublishLocationInfo extends LocationInfo {
|
|
8214
|
-
constructor(
|
|
8215
|
-
|
|
8216
|
-
super(Object.assign({ backendModel }, locationInfoArgs));
|
|
8413
|
+
constructor({ backendModel, ...locationInfoArgs }) {
|
|
8414
|
+
super({ backendModel, ...locationInfoArgs });
|
|
8217
8415
|
Object.defineProperty(this, "getInternalModel", {
|
|
8218
8416
|
enumerable: true,
|
|
8219
8417
|
configurable: true,
|
|
@@ -8274,9 +8472,8 @@ class SearchFolder extends VirtualFolder {
|
|
|
8274
8472
|
* Organizational Item used to build the Publication's target structure.
|
|
8275
8473
|
*/
|
|
8276
8474
|
class StructureGroup extends OrganizationalItem {
|
|
8277
|
-
constructor(
|
|
8278
|
-
|
|
8279
|
-
super(Object.assign({ backendModel }, orgItemArgs));
|
|
8475
|
+
constructor({ backendModel, defaultPageTemplate, publishLocationInfo, pageBundleProcess, pageProcess, ...orgItemArgs }) {
|
|
8476
|
+
super({ backendModel, ...orgItemArgs });
|
|
8280
8477
|
Object.defineProperty(this, "_defaultPageTemplate", {
|
|
8281
8478
|
enumerable: true,
|
|
8282
8479
|
configurable: true,
|
|
@@ -8397,9 +8594,11 @@ class StructureGroup extends OrganizationalItem {
|
|
|
8397
8594
|
* An item used to organize the categories and keywords in a Repository.
|
|
8398
8595
|
*/
|
|
8399
8596
|
class Taxonomies extends OrganizationalItem {
|
|
8400
|
-
constructor(
|
|
8401
|
-
|
|
8402
|
-
|
|
8597
|
+
constructor({ backendModel, ...organizationalItemArgs }) {
|
|
8598
|
+
super({
|
|
8599
|
+
backendModel,
|
|
8600
|
+
...organizationalItemArgs,
|
|
8601
|
+
});
|
|
8403
8602
|
}
|
|
8404
8603
|
}
|
|
8405
8604
|
|
|
@@ -8411,8 +8610,11 @@ const mapOrganizationalItemConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
8411
8610
|
const contentSecurityDescriptor = backendModel.ContentSecurityDescriptor
|
|
8412
8611
|
? mappingRegistry.map(backendModel.ContentSecurityDescriptor)
|
|
8413
8612
|
: undefined;
|
|
8414
|
-
return
|
|
8415
|
-
|
|
8613
|
+
return {
|
|
8614
|
+
...versionedItemConstructorArgs,
|
|
8615
|
+
accessControlList,
|
|
8616
|
+
contentSecurityDescriptor,
|
|
8617
|
+
};
|
|
8416
8618
|
};
|
|
8417
8619
|
|
|
8418
8620
|
const mapVirtualFolderConstructorArgs = (mappingRegistry, backendModel) => {
|
|
@@ -8424,27 +8626,35 @@ const mapVirtualFolderConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
8424
8626
|
const workflowInfo = backendModel.WorkflowInfo
|
|
8425
8627
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
8426
8628
|
: undefined;
|
|
8427
|
-
return
|
|
8428
|
-
|
|
8429
|
-
|
|
8629
|
+
return {
|
|
8630
|
+
...organizationalItemConstructorArgs,
|
|
8631
|
+
approvalStatus,
|
|
8632
|
+
typeSchema,
|
|
8633
|
+
workflowInfo,
|
|
8634
|
+
};
|
|
8430
8635
|
};
|
|
8431
8636
|
|
|
8432
8637
|
const mapBundleConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8433
8638
|
const virtualFolderConstructorArgs = mapVirtualFolderConstructorArgs(mappingRegistry, backendModel);
|
|
8434
8639
|
const items = mapLinks(mappingRegistry, backendModel.Items);
|
|
8435
|
-
return
|
|
8640
|
+
return {
|
|
8641
|
+
...virtualFolderConstructorArgs,
|
|
8642
|
+
items,
|
|
8643
|
+
};
|
|
8436
8644
|
};
|
|
8437
8645
|
const bundleMapping = {
|
|
8438
|
-
identifier: backendModel =>
|
|
8646
|
+
identifier: backendModel => backendModel?.$type === 'Bundle',
|
|
8439
8647
|
mapper: (mappingRegistry, backendModel) => {
|
|
8440
|
-
return new Bundle(
|
|
8648
|
+
return new Bundle({
|
|
8649
|
+
...mapBundleConstructorArgs(mappingRegistry, backendModel),
|
|
8650
|
+
backendModel,
|
|
8651
|
+
});
|
|
8441
8652
|
},
|
|
8442
8653
|
};
|
|
8443
8654
|
|
|
8444
8655
|
const changeOrgItemToBusinessProcessTypes = (item) => {
|
|
8445
8656
|
return produce(item, draft => {
|
|
8446
|
-
|
|
8447
|
-
if ((_b = (_a = draft.LocationInfo) === null || _a === void 0 ? void 0 : _a.ContextRepository) === null || _b === void 0 ? void 0 : _b.IdRef) {
|
|
8657
|
+
if (draft.LocationInfo?.ContextRepository?.IdRef) {
|
|
8448
8658
|
const publicationId = TcmUri.parse(draft.LocationInfo.ContextRepository.IdRef);
|
|
8449
8659
|
if (!publicationId)
|
|
8450
8660
|
return;
|
|
@@ -8454,33 +8664,40 @@ const changeOrgItemToBusinessProcessTypes = (item) => {
|
|
|
8454
8664
|
};
|
|
8455
8665
|
|
|
8456
8666
|
const mapBusinessProcessTypeConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8457
|
-
var _a;
|
|
8458
8667
|
const backendModelWithProperOrgItem = changeOrgItemToBusinessProcessTypes(backendModel);
|
|
8459
8668
|
const organizationalItemConstructorArgs = mapOrganizationalItemConstructorArgs(mappingRegistry, backendModelWithProperOrgItem);
|
|
8460
8669
|
const bundleSchemas = mapLinks(mappingRegistry, backendModelWithProperOrgItem.BundleSchemas);
|
|
8461
|
-
const targetTypes =
|
|
8462
|
-
return
|
|
8463
|
-
|
|
8670
|
+
const targetTypes = backendModelWithProperOrgItem.TargetTypes?.map(t => mappingRegistry.map(t)).filter(isDefined);
|
|
8671
|
+
return {
|
|
8672
|
+
...organizationalItemConstructorArgs,
|
|
8673
|
+
bundleSchemas,
|
|
8674
|
+
targetTypes,
|
|
8675
|
+
};
|
|
8464
8676
|
};
|
|
8465
8677
|
const businessProcessTypeMapping = {
|
|
8466
|
-
identifier: backendModel =>
|
|
8678
|
+
identifier: backendModel => backendModel?.$type === 'BusinessProcessType',
|
|
8467
8679
|
mapper: (mappingRegistry, backendModel) => {
|
|
8468
|
-
return new BusinessProcessType(
|
|
8680
|
+
return new BusinessProcessType({
|
|
8681
|
+
...mapBusinessProcessTypeConstructorArgs(mappingRegistry, backendModel),
|
|
8682
|
+
backendModel: changeOrgItemToBusinessProcessTypes(backendModel),
|
|
8683
|
+
});
|
|
8469
8684
|
},
|
|
8470
8685
|
};
|
|
8471
8686
|
|
|
8472
8687
|
const mapBusinessProcessTypesConstructorArgs = mapOrganizationalItemConstructorArgs;
|
|
8473
8688
|
const businessProcessTypesMapping = {
|
|
8474
|
-
identifier: backendModel =>
|
|
8689
|
+
identifier: backendModel => backendModel?.$type === 'BusinessProcessTypes',
|
|
8475
8690
|
mapper: (mappingRegistry, backendModel) => {
|
|
8476
|
-
return new BusinessProcessTypes(
|
|
8691
|
+
return new BusinessProcessTypes({
|
|
8692
|
+
...mapBusinessProcessTypesConstructorArgs(mappingRegistry, backendModel),
|
|
8693
|
+
backendModel,
|
|
8694
|
+
});
|
|
8477
8695
|
},
|
|
8478
8696
|
};
|
|
8479
8697
|
|
|
8480
8698
|
const changeOrgItemToTaxonomies = (item) => {
|
|
8481
8699
|
return produce(item, draft => {
|
|
8482
|
-
|
|
8483
|
-
if ((_b = (_a = draft.LocationInfo) === null || _a === void 0 ? void 0 : _a.ContextRepository) === null || _b === void 0 ? void 0 : _b.IdRef) {
|
|
8700
|
+
if (draft.LocationInfo?.ContextRepository?.IdRef) {
|
|
8484
8701
|
const publicationId = TcmUri.parse(draft.LocationInfo.ContextRepository.IdRef);
|
|
8485
8702
|
if (!publicationId)
|
|
8486
8703
|
return;
|
|
@@ -8492,20 +8709,29 @@ const changeOrgItemToTaxonomies = (item) => {
|
|
|
8492
8709
|
const mapFolderConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8493
8710
|
const organizationalItemConstructorArgs = mapOrganizationalItemConstructorArgs(mappingRegistry, backendModel);
|
|
8494
8711
|
const linkedSchema = backendModel.LinkedSchema ? mappingRegistry.map(backendModel.LinkedSchema) : undefined;
|
|
8495
|
-
return
|
|
8712
|
+
return {
|
|
8713
|
+
...organizationalItemConstructorArgs,
|
|
8714
|
+
linkedSchema,
|
|
8715
|
+
};
|
|
8496
8716
|
};
|
|
8497
8717
|
const folderMapping = {
|
|
8498
|
-
identifier: backendModel =>
|
|
8718
|
+
identifier: backendModel => backendModel?.$type === 'Folder',
|
|
8499
8719
|
mapper: (mappingRegistry, backendModel) => {
|
|
8500
|
-
return new Folder(
|
|
8720
|
+
return new Folder({
|
|
8721
|
+
...mapFolderConstructorArgs(mappingRegistry, backendModel),
|
|
8722
|
+
backendModel,
|
|
8723
|
+
});
|
|
8501
8724
|
},
|
|
8502
8725
|
};
|
|
8503
8726
|
|
|
8504
8727
|
const mapExternalContainerConstructorArgs = mapFolderConstructorArgs;
|
|
8505
8728
|
const externalContainerMapping = {
|
|
8506
|
-
identifier: backendModel =>
|
|
8729
|
+
identifier: backendModel => backendModel?.$type === 'ExternalContainer',
|
|
8507
8730
|
mapper: (mappingRegistry, backendModel) => {
|
|
8508
|
-
return new ExternalContainer(
|
|
8731
|
+
return new ExternalContainer({
|
|
8732
|
+
...mapExternalContainerConstructorArgs(mappingRegistry, backendModel),
|
|
8733
|
+
backendModel,
|
|
8734
|
+
});
|
|
8509
8735
|
},
|
|
8510
8736
|
};
|
|
8511
8737
|
|
|
@@ -8516,37 +8742,52 @@ const mapKeywordCategoryConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
8516
8742
|
const keywordMetadataSchema = backendModelWithProperOrgItem.KeywordMetadataSchema
|
|
8517
8743
|
? mappingRegistry.map(backendModelWithProperOrgItem.KeywordMetadataSchema)
|
|
8518
8744
|
: undefined;
|
|
8519
|
-
return
|
|
8520
|
-
|
|
8745
|
+
return {
|
|
8746
|
+
...organizationalItemConstructorArgs,
|
|
8747
|
+
allowedParentCategories,
|
|
8748
|
+
keywordMetadataSchema,
|
|
8749
|
+
};
|
|
8521
8750
|
};
|
|
8522
8751
|
const keywordCategoryMapping = {
|
|
8523
|
-
identifier: backendModel =>
|
|
8752
|
+
identifier: backendModel => backendModel?.$type === 'Category',
|
|
8524
8753
|
mapper: (mappingRegistry, backendModel) => {
|
|
8525
|
-
return new KeywordCategory(
|
|
8754
|
+
return new KeywordCategory({
|
|
8755
|
+
...mapKeywordCategoryConstructorArgs(mappingRegistry, backendModel),
|
|
8756
|
+
backendModel: changeOrgItemToTaxonomies(backendModel),
|
|
8757
|
+
});
|
|
8526
8758
|
},
|
|
8527
8759
|
};
|
|
8528
8760
|
|
|
8529
8761
|
const mapExternalKeywordCategoryConstructorArgs = mapKeywordCategoryConstructorArgs;
|
|
8530
8762
|
const externalKeywordCategoryMapping = {
|
|
8531
|
-
identifier: backendModel =>
|
|
8763
|
+
identifier: backendModel => backendModel?.$type === 'ExternalCategory',
|
|
8532
8764
|
mapper: (mappingRegistry, backendModel) => {
|
|
8533
|
-
return new ExternalKeywordCategory(
|
|
8765
|
+
return new ExternalKeywordCategory({
|
|
8766
|
+
...mapExternalKeywordCategoryConstructorArgs(mappingRegistry, backendModel),
|
|
8767
|
+
backendModel: changeOrgItemToTaxonomies(backendModel),
|
|
8768
|
+
});
|
|
8534
8769
|
},
|
|
8535
8770
|
};
|
|
8536
8771
|
|
|
8537
8772
|
const mapPublishLocationInfoConstructorArgs = mapLocationInfoConstructorArgs;
|
|
8538
8773
|
const publishLocationInfoMapping = {
|
|
8539
|
-
identifier: backendModel =>
|
|
8774
|
+
identifier: backendModel => backendModel?.$type === 'PublishLocationInfo',
|
|
8540
8775
|
mapper: (mappingRegistry, backendModel) => {
|
|
8541
|
-
return new PublishLocationInfo(
|
|
8776
|
+
return new PublishLocationInfo({
|
|
8777
|
+
...mapPublishLocationInfoConstructorArgs(mappingRegistry, backendModel),
|
|
8778
|
+
backendModel,
|
|
8779
|
+
});
|
|
8542
8780
|
},
|
|
8543
8781
|
};
|
|
8544
8782
|
|
|
8545
8783
|
const mapSearchFolderConstructorArgs = mapVirtualFolderConstructorArgs;
|
|
8546
8784
|
const searchFolderMapping = {
|
|
8547
|
-
identifier: backendModel =>
|
|
8785
|
+
identifier: backendModel => backendModel?.$type === 'SearchFolder',
|
|
8548
8786
|
mapper: (mappingRegistry, backendModel) => {
|
|
8549
|
-
return new SearchFolder(
|
|
8787
|
+
return new SearchFolder({
|
|
8788
|
+
...mapSearchFolderConstructorArgs(mappingRegistry, backendModel),
|
|
8789
|
+
backendModel,
|
|
8790
|
+
});
|
|
8550
8791
|
},
|
|
8551
8792
|
};
|
|
8552
8793
|
|
|
@@ -8562,23 +8803,29 @@ const mapStructureGroupConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
8562
8803
|
? mappingRegistry.map(backendModel.PageBundleProcess)
|
|
8563
8804
|
: undefined;
|
|
8564
8805
|
const pageProcess = backendModel.PageProcess ? mappingRegistry.map(backendModel.PageProcess) : undefined;
|
|
8565
|
-
return
|
|
8806
|
+
return {
|
|
8807
|
+
...organizationalItemConstructorArgs,
|
|
8808
|
+
defaultPageTemplate,
|
|
8566
8809
|
pageBundleProcess,
|
|
8567
8810
|
pageProcess,
|
|
8568
|
-
publishLocationInfo
|
|
8811
|
+
publishLocationInfo,
|
|
8812
|
+
};
|
|
8569
8813
|
};
|
|
8570
8814
|
const structureGroupMapping = {
|
|
8571
|
-
identifier: backendModel =>
|
|
8815
|
+
identifier: backendModel => backendModel?.$type === 'StructureGroup',
|
|
8572
8816
|
mapper: (mappingRegistry, backendModel) => {
|
|
8573
|
-
return new StructureGroup(
|
|
8817
|
+
return new StructureGroup({
|
|
8818
|
+
...mapStructureGroupConstructorArgs(mappingRegistry, backendModel),
|
|
8819
|
+
backendModel,
|
|
8820
|
+
});
|
|
8574
8821
|
},
|
|
8575
8822
|
};
|
|
8576
8823
|
|
|
8577
8824
|
const mapTaxonomiesConstructorArgs = mapOrganizationalItemConstructorArgs;
|
|
8578
8825
|
const taxonomiesMapping = {
|
|
8579
|
-
identifier: backendModel =>
|
|
8826
|
+
identifier: backendModel => backendModel?.$type === 'Taxonomies',
|
|
8580
8827
|
mapper: (mappingRegistry, backendModel) => {
|
|
8581
|
-
return new Taxonomies(
|
|
8828
|
+
return new Taxonomies({ ...mapTaxonomiesConstructorArgs(mappingRegistry, backendModel), backendModel });
|
|
8582
8829
|
},
|
|
8583
8830
|
};
|
|
8584
8831
|
|
|
@@ -8724,9 +8971,8 @@ class EmbeddedRegion extends Region {
|
|
|
8724
8971
|
* Represents the data of a Page: an artifact in the Publication's target structure.
|
|
8725
8972
|
*/
|
|
8726
8973
|
class Page extends VersionedItem {
|
|
8727
|
-
constructor(
|
|
8728
|
-
|
|
8729
|
-
super(Object.assign({ backendModel }, versionedItemArgs));
|
|
8974
|
+
constructor({ backendModel, approvalStatus, componentPresentations, pageTemplate, publishLocationInfo, regionSchema, regions, workflowInfo, ...versionedItemArgs }) {
|
|
8975
|
+
super({ backendModel, ...versionedItemArgs });
|
|
8730
8976
|
Object.defineProperty(this, "_approvalStatus", {
|
|
8731
8977
|
enumerable: true,
|
|
8732
8978
|
configurable: true,
|
|
@@ -8896,18 +9142,20 @@ class TargetGroupCondition {
|
|
|
8896
9142
|
}
|
|
8897
9143
|
|
|
8898
9144
|
const mapComponentPresentationConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8899
|
-
var _a;
|
|
8900
9145
|
const component = backendModel.Component ? mappingRegistry.map(backendModel.Component) : undefined;
|
|
8901
9146
|
const componentTemplate = backendModel.ComponentTemplate
|
|
8902
9147
|
? mappingRegistry.map(backendModel.ComponentTemplate)
|
|
8903
9148
|
: undefined;
|
|
8904
|
-
const conditions =
|
|
9149
|
+
const conditions = backendModel.Conditions?.map(c => mappingRegistry.map(c)).filter(isDefined);
|
|
8905
9150
|
return { component, componentTemplate, conditions };
|
|
8906
9151
|
};
|
|
8907
9152
|
const componentPresentationMapping = {
|
|
8908
|
-
identifier: backendModel =>
|
|
9153
|
+
identifier: backendModel => backendModel?.$type === 'ComponentPresentation',
|
|
8909
9154
|
mapper: (mappingRegistry, backendModel) => {
|
|
8910
|
-
return new ComponentPresentation(
|
|
9155
|
+
return new ComponentPresentation({
|
|
9156
|
+
...mapComponentPresentationConstructorArgs(mappingRegistry, backendModel),
|
|
9157
|
+
backendModel,
|
|
9158
|
+
});
|
|
8911
9159
|
},
|
|
8912
9160
|
};
|
|
8913
9161
|
|
|
@@ -8920,26 +9168,27 @@ const mapRegions = (backendRegions, mappingRegistry) => {
|
|
|
8920
9168
|
};
|
|
8921
9169
|
|
|
8922
9170
|
const mapEmbeddedRegionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8923
|
-
|
|
8924
|
-
const componentPresentations = (_a = backendModel.ComponentPresentations) === null || _a === void 0 ? void 0 : _a.map(cp => mappingRegistry.map(cp)).filter(isDefined);
|
|
9171
|
+
const componentPresentations = backendModel.ComponentPresentations?.map(cp => mappingRegistry.map(cp)).filter(isDefined);
|
|
8925
9172
|
const regions = backendModel.Regions ? mapRegions(backendModel.Regions, mappingRegistry) : undefined;
|
|
8926
9173
|
const regionSchema = backendModel.RegionSchema ? mappingRegistry.map(backendModel.RegionSchema) : undefined;
|
|
8927
9174
|
return { componentPresentations, regions, regionSchema };
|
|
8928
9175
|
};
|
|
8929
9176
|
const embeddedRegionMapping = {
|
|
8930
|
-
identifier: backendModel =>
|
|
9177
|
+
identifier: backendModel => backendModel?.$type === 'EmbeddedRegion',
|
|
8931
9178
|
mapper: (mappingRegistry, backendModel) => {
|
|
8932
|
-
return new EmbeddedRegion(
|
|
9179
|
+
return new EmbeddedRegion({
|
|
9180
|
+
...mapEmbeddedRegionConstructorArgs(mappingRegistry, backendModel),
|
|
9181
|
+
backendModel,
|
|
9182
|
+
});
|
|
8933
9183
|
},
|
|
8934
9184
|
};
|
|
8935
9185
|
|
|
8936
9186
|
const mapPageConstructorArgs = (mappingRegistry, backendModel) => {
|
|
8937
|
-
var _a;
|
|
8938
9187
|
const versionedItemConstructorArgs = mapVersionedItemConstructorArgs(mappingRegistry, backendModel);
|
|
8939
9188
|
const approvalStatus = backendModel.ApprovalStatus
|
|
8940
9189
|
? mappingRegistry.map(backendModel.ApprovalStatus)
|
|
8941
9190
|
: undefined;
|
|
8942
|
-
const componentPresentations =
|
|
9191
|
+
const componentPresentations = backendModel.ComponentPresentations?.map(cp => mappingRegistry.map(cp)).filter(isDefined);
|
|
8943
9192
|
const publishLocationInfo = mappingRegistry.map(backendModel.LocationInfo);
|
|
8944
9193
|
const pageTemplate = mappingRegistry.map(backendModel.PageTemplate);
|
|
8945
9194
|
const regions = backendModel.Regions ? mapRegions(backendModel.Regions, mappingRegistry) : undefined;
|
|
@@ -8947,18 +9196,24 @@ const mapPageConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
8947
9196
|
const workflowInfo = backendModel.WorkflowInfo
|
|
8948
9197
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
8949
9198
|
: undefined;
|
|
8950
|
-
return
|
|
9199
|
+
return {
|
|
9200
|
+
...versionedItemConstructorArgs,
|
|
9201
|
+
approvalStatus,
|
|
8951
9202
|
componentPresentations,
|
|
8952
9203
|
pageTemplate,
|
|
8953
9204
|
publishLocationInfo,
|
|
8954
9205
|
regions,
|
|
8955
9206
|
regionSchema,
|
|
8956
|
-
workflowInfo
|
|
9207
|
+
workflowInfo,
|
|
9208
|
+
};
|
|
8957
9209
|
};
|
|
8958
9210
|
const pageMapping = {
|
|
8959
|
-
identifier: backendModel =>
|
|
9211
|
+
identifier: backendModel => backendModel?.$type === 'Page',
|
|
8960
9212
|
mapper: (mappingRegistry, backendModel) => {
|
|
8961
|
-
return new Page(
|
|
9213
|
+
return new Page({
|
|
9214
|
+
...mapPageConstructorArgs(mappingRegistry, backendModel),
|
|
9215
|
+
backendModel,
|
|
9216
|
+
});
|
|
8962
9217
|
},
|
|
8963
9218
|
};
|
|
8964
9219
|
|
|
@@ -8967,9 +9222,12 @@ const mapTargetGroupConditionConstructorArgs = (mappingRegistry, backendModel) =
|
|
|
8967
9222
|
return { targetGroup };
|
|
8968
9223
|
};
|
|
8969
9224
|
const targetGroupConditionMapping = {
|
|
8970
|
-
identifier: backendModel =>
|
|
9225
|
+
identifier: backendModel => backendModel?.$type === 'TargetGroupCondition',
|
|
8971
9226
|
mapper: (mappingRegistry, backendModel) => {
|
|
8972
|
-
return new TargetGroupCondition(
|
|
9227
|
+
return new TargetGroupCondition({
|
|
9228
|
+
...mapTargetGroupConditionConstructorArgs(mappingRegistry, backendModel),
|
|
9229
|
+
backendModel,
|
|
9230
|
+
});
|
|
8973
9231
|
},
|
|
8974
9232
|
};
|
|
8975
9233
|
|
|
@@ -9269,9 +9527,8 @@ class PublishInstruction extends PublishInstructionBase {
|
|
|
9269
9527
|
}
|
|
9270
9528
|
|
|
9271
9529
|
class PublishTransaction extends SystemWideObject {
|
|
9272
|
-
constructor(
|
|
9273
|
-
|
|
9274
|
-
super(Object.assign({ backendModel }, systemWideObjectConstructorArgs));
|
|
9530
|
+
constructor({ backendModel, creator, deployerAction, instruction, items, priority, publishContexts, state, targetType, stateChangeDateTime, ...systemWideObjectConstructorArgs }) {
|
|
9531
|
+
super({ backendModel, ...systemWideObjectConstructorArgs });
|
|
9275
9532
|
Object.defineProperty(this, "_backendModel", {
|
|
9276
9533
|
enumerable: true,
|
|
9277
9534
|
configurable: true,
|
|
@@ -9556,6 +9813,64 @@ class PublishUrlInfo {
|
|
|
9556
9813
|
}
|
|
9557
9814
|
}
|
|
9558
9815
|
|
|
9816
|
+
class RenderedItem {
|
|
9817
|
+
constructor({ backendModel, item, template }) {
|
|
9818
|
+
Object.defineProperty(this, "_backendModel", {
|
|
9819
|
+
enumerable: true,
|
|
9820
|
+
configurable: true,
|
|
9821
|
+
writable: true,
|
|
9822
|
+
value: void 0
|
|
9823
|
+
});
|
|
9824
|
+
Object.defineProperty(this, "_item", {
|
|
9825
|
+
enumerable: true,
|
|
9826
|
+
configurable: true,
|
|
9827
|
+
writable: true,
|
|
9828
|
+
value: void 0
|
|
9829
|
+
});
|
|
9830
|
+
Object.defineProperty(this, "_template", {
|
|
9831
|
+
enumerable: true,
|
|
9832
|
+
configurable: true,
|
|
9833
|
+
writable: true,
|
|
9834
|
+
value: void 0
|
|
9835
|
+
});
|
|
9836
|
+
Object.defineProperty(this, "getInternalModel", {
|
|
9837
|
+
enumerable: true,
|
|
9838
|
+
configurable: true,
|
|
9839
|
+
writable: true,
|
|
9840
|
+
value: () => {
|
|
9841
|
+
return this._backendModel;
|
|
9842
|
+
}
|
|
9843
|
+
});
|
|
9844
|
+
this._backendModel = backendModel;
|
|
9845
|
+
this._item = item;
|
|
9846
|
+
this._template = template;
|
|
9847
|
+
}
|
|
9848
|
+
/**
|
|
9849
|
+
* Gets the data pipeline JSON (if any)
|
|
9850
|
+
*/
|
|
9851
|
+
get dataPipelineJson() {
|
|
9852
|
+
return this._backendModel.DataPipelineJson;
|
|
9853
|
+
}
|
|
9854
|
+
/**
|
|
9855
|
+
* Gets a link to the item that was rendered.
|
|
9856
|
+
*/
|
|
9857
|
+
get item() {
|
|
9858
|
+
return this._item;
|
|
9859
|
+
}
|
|
9860
|
+
/**
|
|
9861
|
+
* Gets the rendered output of the template (if any)
|
|
9862
|
+
*/
|
|
9863
|
+
get renderedOutput() {
|
|
9864
|
+
return this._backendModel.RenderedOutput;
|
|
9865
|
+
}
|
|
9866
|
+
/**
|
|
9867
|
+
* Gets a link to the template with which the item was rendered (if any).
|
|
9868
|
+
*/
|
|
9869
|
+
get template() {
|
|
9870
|
+
return this._template;
|
|
9871
|
+
}
|
|
9872
|
+
}
|
|
9873
|
+
|
|
9559
9874
|
class ResolvedItem {
|
|
9560
9875
|
constructor({ backendModel, item, publication, targetType, template }) {
|
|
9561
9876
|
Object.defineProperty(this, "_backendModel", {
|
|
@@ -9693,9 +10008,8 @@ class ResolveInstructionBase {
|
|
|
9693
10008
|
}
|
|
9694
10009
|
|
|
9695
10010
|
class ResolveInstruction extends ResolveInstructionBase {
|
|
9696
|
-
constructor(
|
|
9697
|
-
|
|
9698
|
-
super(Object.assign({ backendModel }, resolveInstructionBaseConstructorArgs));
|
|
10011
|
+
constructor({ backendModel, ...resolveInstructionBaseConstructorArgs }) {
|
|
10012
|
+
super({ backendModel, ...resolveInstructionBaseConstructorArgs });
|
|
9699
10013
|
Object.defineProperty(this, "_backendModel", {
|
|
9700
10014
|
enumerable: true,
|
|
9701
10015
|
configurable: true,
|
|
@@ -9794,24 +10108,29 @@ const mapProcessedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
9794
10108
|
return { resolvedItem };
|
|
9795
10109
|
};
|
|
9796
10110
|
const processedItemMapping = {
|
|
9797
|
-
identifier: backendModel =>
|
|
10111
|
+
identifier: backendModel => backendModel?.$type === 'ProcessedItem',
|
|
9798
10112
|
mapper: (mappingRegistry, backendModel) => {
|
|
9799
|
-
return new ProcessedItem(
|
|
10113
|
+
return new ProcessedItem({
|
|
10114
|
+
...mapProcessedItemConstructorArgs(mappingRegistry, backendModel),
|
|
10115
|
+
backendModel,
|
|
10116
|
+
});
|
|
9800
10117
|
},
|
|
9801
10118
|
};
|
|
9802
10119
|
|
|
9803
10120
|
const mapPublishContextConstructorArgs = (mappingRegistry, backendModel) => {
|
|
9804
|
-
|
|
9805
|
-
const processedItems = (_a = backendModel.ProcessedItems) === null || _a === void 0 ? void 0 : _a.map(i => mappingRegistry.map(i)).filter(isDefined);
|
|
10121
|
+
const processedItems = backendModel.ProcessedItems?.map(i => mappingRegistry.map(i)).filter(isDefined);
|
|
9806
10122
|
const publication = backendModel.Publication ? mappingRegistry.map(backendModel.Publication) : undefined;
|
|
9807
|
-
const resolvedItems =
|
|
10123
|
+
const resolvedItems = backendModel.ResolvedItems?.map(i => mappingRegistry.map(i)).filter(isDefined);
|
|
9808
10124
|
const targetType = backendModel.TargetType ? mappingRegistry.map(backendModel.Publication) : undefined;
|
|
9809
10125
|
return { processedItems, publication, resolvedItems, targetType };
|
|
9810
10126
|
};
|
|
9811
10127
|
const publishContextMapping = {
|
|
9812
|
-
identifier: backendModel =>
|
|
10128
|
+
identifier: backendModel => backendModel?.$type === 'PublishContext',
|
|
9813
10129
|
mapper: (mappingRegistry, backendModel) => {
|
|
9814
|
-
return new PublishContext(
|
|
10130
|
+
return new PublishContext({
|
|
10131
|
+
...mapPublishContextConstructorArgs(mappingRegistry, backendModel),
|
|
10132
|
+
backendModel,
|
|
10133
|
+
});
|
|
9815
10134
|
},
|
|
9816
10135
|
};
|
|
9817
10136
|
|
|
@@ -9823,9 +10142,12 @@ const mapPublishInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
9823
10142
|
return { renderedWith, repository, targetType, user };
|
|
9824
10143
|
};
|
|
9825
10144
|
const publishInfoMapping = {
|
|
9826
|
-
identifier: backendModel =>
|
|
10145
|
+
identifier: backendModel => backendModel?.$type === 'PublishInfo',
|
|
9827
10146
|
mapper: (mappingRegistry, backendModel) => {
|
|
9828
|
-
return new PublishInfo(
|
|
10147
|
+
return new PublishInfo({
|
|
10148
|
+
...mapPublishInfoConstructorArgs(mappingRegistry, backendModel),
|
|
10149
|
+
backendModel,
|
|
10150
|
+
});
|
|
9829
10151
|
},
|
|
9830
10152
|
};
|
|
9831
10153
|
|
|
@@ -9837,9 +10159,12 @@ const mapPublishInstructionConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
9837
10159
|
return { deployAt, resolveInstruction };
|
|
9838
10160
|
};
|
|
9839
10161
|
const publishInstructionMapping = {
|
|
9840
|
-
identifier: backendModel =>
|
|
10162
|
+
identifier: backendModel => backendModel?.$type === 'PublishInstruction',
|
|
9841
10163
|
mapper: (mappingRegistry, backendModel) => {
|
|
9842
|
-
return new PublishInstruction(
|
|
10164
|
+
return new PublishInstruction({
|
|
10165
|
+
...mapPublishInstructionConstructorArgs(mappingRegistry, backendModel),
|
|
10166
|
+
backendModel,
|
|
10167
|
+
});
|
|
9843
10168
|
},
|
|
9844
10169
|
};
|
|
9845
10170
|
|
|
@@ -9858,7 +10183,7 @@ const mapPublishTransactionInfoConstructorArgs = (mappingRegistry, backendModel)
|
|
|
9858
10183
|
return { publishAction, scheduleTime };
|
|
9859
10184
|
};
|
|
9860
10185
|
const publishTransactionListInfoMapping = {
|
|
9861
|
-
identifier: backendModel =>
|
|
10186
|
+
identifier: backendModel => backendModel?.$type === 'PublishTransactionListInfo',
|
|
9862
10187
|
mapper: (mappingRegistry, backendModel) => {
|
|
9863
10188
|
const { publishAction, scheduleTime } = mapPublishTransactionInfoConstructorArgs(mappingRegistry, backendModel);
|
|
9864
10189
|
return new PublishTransactionListInfo({ backendModel, publishAction, scheduleTime });
|
|
@@ -9951,7 +10276,6 @@ const mapPublishTransactionStateToBackend = (model) => {
|
|
|
9951
10276
|
};
|
|
9952
10277
|
|
|
9953
10278
|
const mapPublishTransactionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
9954
|
-
var _a;
|
|
9955
10279
|
const systemWideObjectConstructorArgs = mapSystemWideObjectConstructorArgs(mappingRegistry, backendModel);
|
|
9956
10280
|
const creator = backendModel.Creator ? mappingRegistry.map(backendModel.Creator) : undefined;
|
|
9957
10281
|
const deployerAction = backendModel.DeployerAction ? mapDeployerAction(backendModel.DeployerAction) : undefined;
|
|
@@ -9960,13 +10284,15 @@ const mapPublishTransactionConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
9960
10284
|
: undefined;
|
|
9961
10285
|
const items = mapLinks(mappingRegistry, backendModel.Items);
|
|
9962
10286
|
const priority = backendModel.Priority ? mapPublishPriority(backendModel.Priority) : undefined;
|
|
9963
|
-
const publishContexts =
|
|
10287
|
+
const publishContexts = backendModel.PublishContexts?.map(p => mappingRegistry.map(p)).filter(isDefined);
|
|
9964
10288
|
const state = backendModel.State ? mapPublishTransactionState(backendModel.State) : undefined;
|
|
9965
10289
|
const targetType = backendModel.TargetType ? mappingRegistry.map(backendModel.TargetType) : undefined;
|
|
9966
10290
|
const stateChangeDateTime = backendModel.StateChangeDateTime
|
|
9967
10291
|
? mapDate(backendModel.StateChangeDateTime)
|
|
9968
10292
|
: undefined;
|
|
9969
|
-
return
|
|
10293
|
+
return {
|
|
10294
|
+
...systemWideObjectConstructorArgs,
|
|
10295
|
+
creator,
|
|
9970
10296
|
deployerAction,
|
|
9971
10297
|
instruction,
|
|
9972
10298
|
items,
|
|
@@ -9974,34 +10300,55 @@ const mapPublishTransactionConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
9974
10300
|
publishContexts,
|
|
9975
10301
|
state,
|
|
9976
10302
|
targetType,
|
|
9977
|
-
stateChangeDateTime
|
|
10303
|
+
stateChangeDateTime,
|
|
10304
|
+
};
|
|
9978
10305
|
};
|
|
9979
10306
|
const publishTransactionMapping = {
|
|
9980
|
-
identifier: backendModel =>
|
|
10307
|
+
identifier: backendModel => backendModel?.$type === 'PublishTransaction',
|
|
9981
10308
|
mapper: (mappingRegistry, backendModel) => {
|
|
9982
|
-
return new PublishTransaction(
|
|
10309
|
+
return new PublishTransaction({
|
|
10310
|
+
...mapPublishTransactionConstructorArgs(mappingRegistry, backendModel),
|
|
10311
|
+
backendModel,
|
|
10312
|
+
});
|
|
9983
10313
|
},
|
|
9984
10314
|
};
|
|
9985
10315
|
|
|
9986
10316
|
const mapPublishTransactionsCreationResultConstructorArgs = (mappingRegistry, backendModel) => {
|
|
9987
|
-
|
|
9988
|
-
const publishTransactionIds = (_a = backendModel.PublishTransactionIds) === null || _a === void 0 ? void 0 : _a.map(id => tryParseItemUri(id)).filter(isDefined);
|
|
10317
|
+
const publishTransactionIds = backendModel.PublishTransactionIds?.map(id => tryParseItemUri(id)).filter(isDefined);
|
|
9989
10318
|
return { publishTransactionIds };
|
|
9990
10319
|
};
|
|
9991
10320
|
const publishTransactionsCreationResultMapping = {
|
|
9992
|
-
identifier: backendModel =>
|
|
10321
|
+
identifier: backendModel => backendModel?.$type === 'PublishTransactionsCreationResult',
|
|
9993
10322
|
mapper: (mappingRegistry, backendModel) => {
|
|
9994
|
-
return new PublishTransactionsCreationResult(
|
|
10323
|
+
return new PublishTransactionsCreationResult({
|
|
10324
|
+
...mapPublishTransactionsCreationResultConstructorArgs(mappingRegistry, backendModel),
|
|
10325
|
+
backendModel,
|
|
10326
|
+
});
|
|
9995
10327
|
},
|
|
9996
10328
|
};
|
|
9997
10329
|
|
|
9998
10330
|
const publishUrlInfoMapping = {
|
|
9999
|
-
identifier: backendModel =>
|
|
10331
|
+
identifier: backendModel => backendModel?.$type === 'PublishInfo',
|
|
10000
10332
|
mapper: (mappingRegistry, backendModel) => {
|
|
10001
10333
|
return new PublishUrlInfo(backendModel);
|
|
10002
10334
|
},
|
|
10003
10335
|
};
|
|
10004
10336
|
|
|
10337
|
+
const mapRenderedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
10338
|
+
const item = backendModel.Item ? mappingRegistry.map(backendModel.Item) : undefined;
|
|
10339
|
+
const template = backendModel.Template ? mappingRegistry.map(backendModel.Template) : undefined;
|
|
10340
|
+
return { item, template };
|
|
10341
|
+
};
|
|
10342
|
+
const renderedItemMapping = {
|
|
10343
|
+
identifier: backendModel => backendModel?.$type === 'RenderedItem',
|
|
10344
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
10345
|
+
return new RenderedItem({
|
|
10346
|
+
...mapRenderedItemConstructorArgs(mappingRegistry, backendModel),
|
|
10347
|
+
backendModel,
|
|
10348
|
+
});
|
|
10349
|
+
},
|
|
10350
|
+
};
|
|
10351
|
+
|
|
10005
10352
|
const mapResolvedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
10006
10353
|
const item = backendModel.Item ? mappingRegistry.map(backendModel.Item) : undefined;
|
|
10007
10354
|
const publication = backendModel.Publication ? mappingRegistry.map(backendModel.Publication) : undefined;
|
|
@@ -10010,9 +10357,12 @@ const mapResolvedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
10010
10357
|
return { item, publication, targetType, template };
|
|
10011
10358
|
};
|
|
10012
10359
|
const resolvedItemMapping = {
|
|
10013
|
-
identifier: backendModel =>
|
|
10360
|
+
identifier: backendModel => backendModel?.$type === 'ResolvedItem',
|
|
10014
10361
|
mapper: (mappingRegistry, backendModel) => {
|
|
10015
|
-
return new ResolvedItem(
|
|
10362
|
+
return new ResolvedItem({
|
|
10363
|
+
...mapResolvedItemConstructorArgs(mappingRegistry, backendModel),
|
|
10364
|
+
backendModel,
|
|
10365
|
+
});
|
|
10016
10366
|
},
|
|
10017
10367
|
};
|
|
10018
10368
|
|
|
@@ -10042,19 +10392,21 @@ const mapStructureResolveOptionToBackend = (model) => {
|
|
|
10042
10392
|
};
|
|
10043
10393
|
|
|
10044
10394
|
const mapResolveInstructionBaseConstructorArgs = (mappingRegistry, backendModel) => {
|
|
10045
|
-
var _a;
|
|
10046
10395
|
const structureResolveOption = backendModel.StructureResolveOption
|
|
10047
10396
|
? mapStructureResolveOption(backendModel.StructureResolveOption)
|
|
10048
10397
|
: undefined;
|
|
10049
|
-
const publishInChildPublications =
|
|
10398
|
+
const publishInChildPublications = backendModel.PublishInChildPublications?.map(id => parseItemUri(id));
|
|
10050
10399
|
return { structureResolveOption, publishInChildPublications };
|
|
10051
10400
|
};
|
|
10052
10401
|
|
|
10053
10402
|
const mapResolveInstructionConstructorArgs = mapResolveInstructionBaseConstructorArgs;
|
|
10054
10403
|
const resolveInstructionMapping = {
|
|
10055
|
-
identifier: backendModel =>
|
|
10404
|
+
identifier: backendModel => backendModel?.$type === 'ResolveInstruction',
|
|
10056
10405
|
mapper: (mappingRegistry, backendModel) => {
|
|
10057
|
-
return new ResolveInstruction(
|
|
10406
|
+
return new ResolveInstruction({
|
|
10407
|
+
...mapResolveInstructionConstructorArgs(mappingRegistry, backendModel),
|
|
10408
|
+
backendModel,
|
|
10409
|
+
});
|
|
10058
10410
|
},
|
|
10059
10411
|
};
|
|
10060
10412
|
|
|
@@ -10066,9 +10418,12 @@ const mapUnpublishInstructionConstructorArgs = (mappingRegistry, backendModel) =
|
|
|
10066
10418
|
return { startAt, resolveInstruction };
|
|
10067
10419
|
};
|
|
10068
10420
|
const unpublishInstructionMapping = {
|
|
10069
|
-
identifier: backendModel =>
|
|
10421
|
+
identifier: backendModel => backendModel?.$type === 'UnPublishInstruction',
|
|
10070
10422
|
mapper: (mappingRegistry, backendModel) => {
|
|
10071
|
-
return new UnpublishInstruction(
|
|
10423
|
+
return new UnpublishInstruction({
|
|
10424
|
+
...mapUnpublishInstructionConstructorArgs(mappingRegistry, backendModel),
|
|
10425
|
+
backendModel,
|
|
10426
|
+
});
|
|
10072
10427
|
},
|
|
10073
10428
|
};
|
|
10074
10429
|
|
|
@@ -10085,8 +10440,7 @@ class SynchronizationAction {
|
|
|
10085
10440
|
configurable: true,
|
|
10086
10441
|
writable: true,
|
|
10087
10442
|
value: (synchronizationAction) => {
|
|
10088
|
-
|
|
10089
|
-
return !!((_a = this.synchronizationActionApplied) === null || _a === void 0 ? void 0 : _a.includes(synchronizationAction));
|
|
10443
|
+
return !!this.synchronizationActionApplied?.includes(synchronizationAction);
|
|
10090
10444
|
}
|
|
10091
10445
|
});
|
|
10092
10446
|
Object.defineProperty(this, "getInternalModel", {
|
|
@@ -10194,10 +10548,9 @@ const mapSynchronizeFlagsToBackend = (model) => {
|
|
|
10194
10548
|
};
|
|
10195
10549
|
|
|
10196
10550
|
const synchronizationActionMapping = {
|
|
10197
|
-
identifier: backendModel =>
|
|
10551
|
+
identifier: backendModel => backendModel?.$type === 'SynchronizationAction',
|
|
10198
10552
|
mapper: (mappingRegistry, backendModel) => {
|
|
10199
|
-
|
|
10200
|
-
const synchronizationActionApplied = (_a = backendModel.SynchronizationActionApplied) === null || _a === void 0 ? void 0 : _a.map(p => mapSynchronizeFlags(p));
|
|
10553
|
+
const synchronizationActionApplied = backendModel.SynchronizationActionApplied?.map(p => mapSynchronizeFlags(p));
|
|
10201
10554
|
return new SynchronizationAction({
|
|
10202
10555
|
backendModel,
|
|
10203
10556
|
synchronizationActionApplied,
|
|
@@ -10246,10 +10599,9 @@ class SynchronizationResult {
|
|
|
10246
10599
|
}
|
|
10247
10600
|
|
|
10248
10601
|
const synchronizationResultMapping = {
|
|
10249
|
-
identifier: backendModel =>
|
|
10602
|
+
identifier: backendModel => backendModel?.$type === 'SynchronizationResult',
|
|
10250
10603
|
mapper: (mappingRegistry, backendModel) => {
|
|
10251
|
-
|
|
10252
|
-
const synchronizationActions = (_a = backendModel.SynchronizationActions) === null || _a === void 0 ? void 0 : _a.map(p => mappingRegistry.map(p)).filter(isDefined);
|
|
10604
|
+
const synchronizationActions = backendModel.SynchronizationActions?.map(p => mappingRegistry.map(p)).filter(isDefined);
|
|
10253
10605
|
const synchronizedItem = backendModel.SynchronizedItem
|
|
10254
10606
|
? mappingRegistry.map(backendModel.SynchronizedItem)
|
|
10255
10607
|
: undefined;
|
|
@@ -10303,16 +10655,16 @@ class SystemPrivilege {
|
|
|
10303
10655
|
}
|
|
10304
10656
|
|
|
10305
10657
|
const systemPrivilegeMapping = {
|
|
10306
|
-
identifier: backendModel =>
|
|
10658
|
+
identifier: backendModel => backendModel?.$type === 'SystemPrivilege',
|
|
10307
10659
|
mapper: (mappingRegistry, backendModel) => {
|
|
10308
10660
|
return new SystemPrivilege(backendModel);
|
|
10309
10661
|
},
|
|
10310
10662
|
};
|
|
10311
10663
|
|
|
10312
10664
|
const systemPrivilegesDictionaryMapping = {
|
|
10313
|
-
identifier: backendModel =>
|
|
10665
|
+
identifier: backendModel => backendModel?.$type === 'SystemPrivilegesDictionary',
|
|
10314
10666
|
mapper: (mappingRegistry, backendModel) => {
|
|
10315
|
-
const dictionary =
|
|
10667
|
+
const { $type, ...dictionary } = backendModel;
|
|
10316
10668
|
return mapObject(dictionary, (value) => mapLinks(mappingRegistry, value) || []);
|
|
10317
10669
|
},
|
|
10318
10670
|
};
|
|
@@ -10343,7 +10695,7 @@ class TargetGroup extends RepositoryLocalObject {
|
|
|
10343
10695
|
|
|
10344
10696
|
const mapTargetGroupConstructorArgs = mapRepositoryLocalObjectConstructorArgs;
|
|
10345
10697
|
const targetGroupMapping = {
|
|
10346
|
-
identifier: backendModel =>
|
|
10698
|
+
identifier: backendModel => backendModel?.$type === 'TargetGroup',
|
|
10347
10699
|
mapper: (mappingRegistry, backendModel) => {
|
|
10348
10700
|
const { applicableActions, basicVersionInfo, blueprintInfo, id, isLocked, limitedVersionInfo, listLinks, loadInfo, locationInfo, lockInfo, metadata, metadataSchema, securityDescriptor, listInfo, } = mapTargetGroupConstructorArgs(mappingRegistry, backendModel);
|
|
10349
10701
|
return new TargetGroup({
|
|
@@ -10370,9 +10722,8 @@ const targetGroupMapping = {
|
|
|
10370
10722
|
* Abstract base class for the data of Templates.
|
|
10371
10723
|
*/
|
|
10372
10724
|
class Template extends VersionedItem {
|
|
10373
|
-
constructor(
|
|
10374
|
-
|
|
10375
|
-
super(Object.assign({ backendModel }, versionedItemArgs));
|
|
10725
|
+
constructor({ backendModel, binaryContent, parameterSchema, ...versionedItemArgs }) {
|
|
10726
|
+
super({ backendModel, ...versionedItemArgs });
|
|
10376
10727
|
Object.defineProperty(this, "_binaryContent", {
|
|
10377
10728
|
enumerable: true,
|
|
10378
10729
|
configurable: true,
|
|
@@ -10439,9 +10790,8 @@ class Template extends VersionedItem {
|
|
|
10439
10790
|
* Represents a Component Template: a template used to render a Component into a Component Presentation.
|
|
10440
10791
|
*/
|
|
10441
10792
|
class ComponentTemplate extends Template {
|
|
10442
|
-
constructor(
|
|
10443
|
-
|
|
10444
|
-
super(Object.assign({ backendModel }, templateArgs));
|
|
10793
|
+
constructor({ backendModel, approvalStatus, relatedSchemas, trackingCategories, workflowInfo, ...templateArgs }) {
|
|
10794
|
+
super({ backendModel, ...templateArgs });
|
|
10445
10795
|
Object.defineProperty(this, "_approvalStatus", {
|
|
10446
10796
|
enumerable: true,
|
|
10447
10797
|
configurable: true,
|
|
@@ -10572,9 +10922,8 @@ class ComponentTemplate extends Template {
|
|
|
10572
10922
|
* Represents a Page Template: a template used to render a Page.
|
|
10573
10923
|
*/
|
|
10574
10924
|
class PageTemplate extends Template {
|
|
10575
|
-
constructor(
|
|
10576
|
-
|
|
10577
|
-
super(Object.assign({ backendModel }, templateArgs));
|
|
10925
|
+
constructor({ backendModel, approvalStatus, pageSchema, workflowInfo, ...templateArgs }) {
|
|
10926
|
+
super({ backendModel, ...templateArgs });
|
|
10578
10927
|
Object.defineProperty(this, "_approvalStatus", {
|
|
10579
10928
|
enumerable: true,
|
|
10580
10929
|
configurable: true,
|
|
@@ -10639,9 +10988,8 @@ class PageTemplate extends Template {
|
|
|
10639
10988
|
* Represents a Template Building Block: a re-usable template module.
|
|
10640
10989
|
*/
|
|
10641
10990
|
class TemplateBuildingBlock extends Template {
|
|
10642
|
-
constructor(
|
|
10643
|
-
|
|
10644
|
-
super(Object.assign({ backendModel }, templateArgs));
|
|
10991
|
+
constructor({ backendModel, approvalStatus, workflowInfo, ...templateArgs }) {
|
|
10992
|
+
super({ backendModel, ...templateArgs });
|
|
10645
10993
|
Object.defineProperty(this, "_approvalStatus", {
|
|
10646
10994
|
enumerable: true,
|
|
10647
10995
|
configurable: true,
|
|
@@ -10684,8 +11032,11 @@ const mapTemplateConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
10684
11032
|
const parameterSchema = backendModel.ParameterSchema
|
|
10685
11033
|
? mappingRegistry.map(backendModel.ParameterSchema)
|
|
10686
11034
|
: undefined;
|
|
10687
|
-
return
|
|
10688
|
-
|
|
11035
|
+
return {
|
|
11036
|
+
...mapVersionedItemConstructorArgs(mappingRegistry, backendModel),
|
|
11037
|
+
binaryContent,
|
|
11038
|
+
parameterSchema,
|
|
11039
|
+
};
|
|
10689
11040
|
};
|
|
10690
11041
|
|
|
10691
11042
|
const mapPageTemplateConstructorArgs = (mappingRegistry, backendModel) => {
|
|
@@ -10697,14 +11048,20 @@ const mapPageTemplateConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
10697
11048
|
const workflowInfo = backendModel.WorkflowInfo
|
|
10698
11049
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
10699
11050
|
: undefined;
|
|
10700
|
-
return
|
|
11051
|
+
return {
|
|
11052
|
+
...templateConstructorArgs,
|
|
11053
|
+
approvalStatus,
|
|
10701
11054
|
pageSchema,
|
|
10702
|
-
workflowInfo
|
|
11055
|
+
workflowInfo,
|
|
11056
|
+
};
|
|
10703
11057
|
};
|
|
10704
11058
|
const pageTemplateMapping = {
|
|
10705
|
-
identifier: backendModel =>
|
|
11059
|
+
identifier: backendModel => backendModel?.$type === 'PageTemplate',
|
|
10706
11060
|
mapper: (mappingRegistry, backendModel) => {
|
|
10707
|
-
return new PageTemplate(
|
|
11061
|
+
return new PageTemplate({
|
|
11062
|
+
...mapPageTemplateConstructorArgs(mappingRegistry, backendModel),
|
|
11063
|
+
backendModel,
|
|
11064
|
+
});
|
|
10708
11065
|
},
|
|
10709
11066
|
};
|
|
10710
11067
|
|
|
@@ -10718,15 +11075,21 @@ const mapComponentTemplateConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
10718
11075
|
const workflowInfo = backendModel.WorkflowInfo
|
|
10719
11076
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
10720
11077
|
: undefined;
|
|
10721
|
-
return
|
|
11078
|
+
return {
|
|
11079
|
+
...templateConstructorArgs,
|
|
11080
|
+
approvalStatus,
|
|
10722
11081
|
workflowInfo,
|
|
10723
11082
|
relatedSchemas,
|
|
10724
|
-
trackingCategories
|
|
11083
|
+
trackingCategories,
|
|
11084
|
+
};
|
|
10725
11085
|
};
|
|
10726
11086
|
const componentTemplateMapping = {
|
|
10727
|
-
identifier: backendModel =>
|
|
11087
|
+
identifier: backendModel => backendModel?.$type === 'ComponentTemplate',
|
|
10728
11088
|
mapper: (mappingRegistry, backendModel) => {
|
|
10729
|
-
return new ComponentTemplate(
|
|
11089
|
+
return new ComponentTemplate({
|
|
11090
|
+
...mapComponentTemplateConstructorArgs(mappingRegistry, backendModel),
|
|
11091
|
+
backendModel,
|
|
11092
|
+
});
|
|
10730
11093
|
},
|
|
10731
11094
|
};
|
|
10732
11095
|
|
|
@@ -10738,13 +11101,19 @@ const mapTemplateBuildingBlockConstructorArgs = (mappingRegistry, backendModel)
|
|
|
10738
11101
|
const workflowInfo = backendModel.WorkflowInfo
|
|
10739
11102
|
? mappingRegistry.map(backendModel.WorkflowInfo)
|
|
10740
11103
|
: undefined;
|
|
10741
|
-
return
|
|
10742
|
-
|
|
11104
|
+
return {
|
|
11105
|
+
...templateConstructorArgs,
|
|
11106
|
+
approvalStatus,
|
|
11107
|
+
workflowInfo,
|
|
11108
|
+
};
|
|
10743
11109
|
};
|
|
10744
11110
|
const templateBuildingBlockMapping = {
|
|
10745
|
-
identifier: backendModel =>
|
|
11111
|
+
identifier: backendModel => backendModel?.$type === 'TemplateBuildingBlock',
|
|
10746
11112
|
mapper: (mappingRegistry, backendModel) => {
|
|
10747
|
-
return new TemplateBuildingBlock(
|
|
11113
|
+
return new TemplateBuildingBlock({
|
|
11114
|
+
...mapTemplateBuildingBlockConstructorArgs(mappingRegistry, backendModel),
|
|
11115
|
+
backendModel,
|
|
11116
|
+
});
|
|
10748
11117
|
},
|
|
10749
11118
|
};
|
|
10750
11119
|
|
|
@@ -11375,7 +11744,7 @@ class TranslationInfo {
|
|
|
11375
11744
|
}
|
|
11376
11745
|
|
|
11377
11746
|
class TranslationJob {
|
|
11378
|
-
constructor({ addedItems, backendModel, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, requiredDate, revisionDate, revisor, state, targetLanguages, type, workflowStatus, }) {
|
|
11747
|
+
constructor({ addedItems, backendModel, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, requiredDate, revisionDate, revisor, state, targetLanguages, type, workflowStatus, contextRepository, }) {
|
|
11379
11748
|
Object.defineProperty(this, "_backendModel", {
|
|
11380
11749
|
enumerable: true,
|
|
11381
11750
|
configurable: true,
|
|
@@ -11478,6 +11847,12 @@ class TranslationJob {
|
|
|
11478
11847
|
writable: true,
|
|
11479
11848
|
value: void 0
|
|
11480
11849
|
});
|
|
11850
|
+
Object.defineProperty(this, "_contextRepository", {
|
|
11851
|
+
enumerable: true,
|
|
11852
|
+
configurable: true,
|
|
11853
|
+
writable: true,
|
|
11854
|
+
value: void 0
|
|
11855
|
+
});
|
|
11481
11856
|
Object.defineProperty(this, "getInternalModel", {
|
|
11482
11857
|
enumerable: true,
|
|
11483
11858
|
configurable: true,
|
|
@@ -11503,6 +11878,7 @@ class TranslationJob {
|
|
|
11503
11878
|
this._creationDate = creationDate;
|
|
11504
11879
|
this._requiredDate = requiredDate;
|
|
11505
11880
|
this._revisionDate = revisionDate;
|
|
11881
|
+
this._contextRepository = contextRepository;
|
|
11506
11882
|
}
|
|
11507
11883
|
get id() {
|
|
11508
11884
|
return this._backendModel.Id;
|
|
@@ -11525,10 +11901,10 @@ class TranslationJob {
|
|
|
11525
11901
|
return this._configurationItemUri;
|
|
11526
11902
|
}
|
|
11527
11903
|
/**
|
|
11528
|
-
*
|
|
11904
|
+
* Link to the Context Repository.
|
|
11529
11905
|
*/
|
|
11530
|
-
get
|
|
11531
|
-
return this.
|
|
11906
|
+
get contextRepository() {
|
|
11907
|
+
return this._contextRepository;
|
|
11532
11908
|
}
|
|
11533
11909
|
/**
|
|
11534
11910
|
* The date the Translation Job was created (in UTC).
|
|
@@ -12047,115 +12423,458 @@ class TranslationWorkflowStatus {
|
|
|
12047
12423
|
}
|
|
12048
12424
|
}
|
|
12049
12425
|
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12426
|
+
/**
|
|
12427
|
+
* `TranslationJob` class that extends `IdentifiableObject`, that uses `ItemUri` instead of number as an id.
|
|
12428
|
+
*
|
|
12429
|
+
* @note
|
|
12430
|
+
* Please note that the rest of `IdentifiableObject` props will be undefined always.
|
|
12431
|
+
*
|
|
12432
|
+
* To get original object use `getOriginalInternalModel()`, as `getInternalModel()` result will include `Id` in a format `tm:0-1234`.
|
|
12433
|
+
*
|
|
12434
|
+
* @example
|
|
12435
|
+
* TranslationJob.id: number | undefined;
|
|
12436
|
+
* IdentifiableTranslationJob.id: ItemUri;
|
|
12437
|
+
*/
|
|
12438
|
+
class IdentifiableTranslationJob extends IdentifiableObject {
|
|
12439
|
+
constructor({ addedItems, backendModel, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, requiredDate, revisionDate, revisor, state, targetLanguages, type, workflowStatus, contextRepository, ...identifiableObjectArgs }) {
|
|
12440
|
+
super({ backendModel, ...identifiableObjectArgs });
|
|
12441
|
+
Object.defineProperty(this, "_backendModel", {
|
|
12442
|
+
enumerable: true,
|
|
12443
|
+
configurable: true,
|
|
12444
|
+
writable: true,
|
|
12445
|
+
value: void 0
|
|
12068
12446
|
});
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12447
|
+
Object.defineProperty(this, "_addedItems", {
|
|
12448
|
+
enumerable: true,
|
|
12449
|
+
configurable: true,
|
|
12450
|
+
writable: true,
|
|
12451
|
+
value: void 0
|
|
12452
|
+
});
|
|
12453
|
+
Object.defineProperty(this, "_creator", {
|
|
12454
|
+
enumerable: true,
|
|
12455
|
+
configurable: true,
|
|
12456
|
+
writable: true,
|
|
12457
|
+
value: void 0
|
|
12458
|
+
});
|
|
12459
|
+
Object.defineProperty(this, "_configurationItemUri", {
|
|
12460
|
+
enumerable: true,
|
|
12461
|
+
configurable: true,
|
|
12462
|
+
writable: true,
|
|
12463
|
+
value: void 0
|
|
12464
|
+
});
|
|
12465
|
+
Object.defineProperty(this, "_displayState", {
|
|
12466
|
+
enumerable: true,
|
|
12467
|
+
configurable: true,
|
|
12468
|
+
writable: true,
|
|
12469
|
+
value: void 0
|
|
12470
|
+
});
|
|
12471
|
+
Object.defineProperty(this, "_errors", {
|
|
12472
|
+
enumerable: true,
|
|
12473
|
+
configurable: true,
|
|
12474
|
+
writable: true,
|
|
12475
|
+
value: void 0
|
|
12476
|
+
});
|
|
12477
|
+
Object.defineProperty(this, "_errorSeverityLevel", {
|
|
12478
|
+
enumerable: true,
|
|
12479
|
+
configurable: true,
|
|
12480
|
+
writable: true,
|
|
12481
|
+
value: void 0
|
|
12482
|
+
});
|
|
12483
|
+
Object.defineProperty(this, "_language", {
|
|
12484
|
+
enumerable: true,
|
|
12485
|
+
configurable: true,
|
|
12486
|
+
writable: true,
|
|
12487
|
+
value: void 0
|
|
12488
|
+
});
|
|
12489
|
+
Object.defineProperty(this, "_priority", {
|
|
12490
|
+
enumerable: true,
|
|
12491
|
+
configurable: true,
|
|
12492
|
+
writable: true,
|
|
12493
|
+
value: void 0
|
|
12494
|
+
});
|
|
12495
|
+
Object.defineProperty(this, "_revisor", {
|
|
12496
|
+
enumerable: true,
|
|
12497
|
+
configurable: true,
|
|
12498
|
+
writable: true,
|
|
12499
|
+
value: void 0
|
|
12500
|
+
});
|
|
12501
|
+
Object.defineProperty(this, "_state", {
|
|
12502
|
+
enumerable: true,
|
|
12503
|
+
configurable: true,
|
|
12504
|
+
writable: true,
|
|
12505
|
+
value: void 0
|
|
12506
|
+
});
|
|
12507
|
+
Object.defineProperty(this, "_targetLanguages", {
|
|
12508
|
+
enumerable: true,
|
|
12509
|
+
configurable: true,
|
|
12510
|
+
writable: true,
|
|
12511
|
+
value: void 0
|
|
12512
|
+
});
|
|
12513
|
+
Object.defineProperty(this, "_type", {
|
|
12514
|
+
enumerable: true,
|
|
12515
|
+
configurable: true,
|
|
12516
|
+
writable: true,
|
|
12517
|
+
value: void 0
|
|
12518
|
+
});
|
|
12519
|
+
Object.defineProperty(this, "_workflowStatus", {
|
|
12520
|
+
enumerable: true,
|
|
12521
|
+
configurable: true,
|
|
12522
|
+
writable: true,
|
|
12523
|
+
value: void 0
|
|
12524
|
+
});
|
|
12525
|
+
Object.defineProperty(this, "_creationDate", {
|
|
12526
|
+
enumerable: true,
|
|
12527
|
+
configurable: true,
|
|
12528
|
+
writable: true,
|
|
12529
|
+
value: void 0
|
|
12530
|
+
});
|
|
12531
|
+
Object.defineProperty(this, "_requiredDate", {
|
|
12532
|
+
enumerable: true,
|
|
12533
|
+
configurable: true,
|
|
12534
|
+
writable: true,
|
|
12535
|
+
value: void 0
|
|
12536
|
+
});
|
|
12537
|
+
Object.defineProperty(this, "_revisionDate", {
|
|
12538
|
+
enumerable: true,
|
|
12539
|
+
configurable: true,
|
|
12540
|
+
writable: true,
|
|
12541
|
+
value: void 0
|
|
12542
|
+
});
|
|
12543
|
+
Object.defineProperty(this, "_contextRepository", {
|
|
12544
|
+
enumerable: true,
|
|
12545
|
+
configurable: true,
|
|
12546
|
+
writable: true,
|
|
12547
|
+
value: void 0
|
|
12548
|
+
});
|
|
12549
|
+
Object.defineProperty(this, "getOriginalInternalModel", {
|
|
12550
|
+
enumerable: true,
|
|
12551
|
+
configurable: true,
|
|
12552
|
+
writable: true,
|
|
12553
|
+
value: () => {
|
|
12554
|
+
const originalId = typeof this._id.itemId === 'number' ? this._id.itemId : undefined;
|
|
12555
|
+
return {
|
|
12556
|
+
...this._backendModel,
|
|
12557
|
+
$type: 'TranslationJob',
|
|
12558
|
+
Id: originalId,
|
|
12559
|
+
};
|
|
12560
|
+
}
|
|
12561
|
+
});
|
|
12562
|
+
Object.defineProperty(this, "getInternalModel", {
|
|
12563
|
+
enumerable: true,
|
|
12564
|
+
configurable: true,
|
|
12565
|
+
writable: true,
|
|
12566
|
+
value: () => {
|
|
12567
|
+
return this._backendModel;
|
|
12568
|
+
}
|
|
12569
|
+
});
|
|
12570
|
+
this._backendModel = backendModel;
|
|
12571
|
+
this._addedItems = addedItems;
|
|
12572
|
+
this._creator = creator;
|
|
12573
|
+
this._configurationItemUri = configurationItemUri;
|
|
12574
|
+
this._displayState = displayState;
|
|
12575
|
+
this._errors = errors;
|
|
12576
|
+
this._errorSeverityLevel = errorSeverityLevel;
|
|
12577
|
+
this._language = language;
|
|
12578
|
+
this._priority = priority;
|
|
12579
|
+
this._revisor = revisor;
|
|
12580
|
+
this._state = state;
|
|
12581
|
+
this._targetLanguages = targetLanguages;
|
|
12582
|
+
this._type = type;
|
|
12583
|
+
this._workflowStatus = workflowStatus;
|
|
12584
|
+
this._creationDate = creationDate;
|
|
12585
|
+
this._requiredDate = requiredDate;
|
|
12586
|
+
this._revisionDate = revisionDate;
|
|
12587
|
+
this._contextRepository = contextRepository;
|
|
12588
|
+
}
|
|
12589
|
+
get title() {
|
|
12590
|
+
return this._backendModel.Title;
|
|
12591
|
+
}
|
|
12592
|
+
/**
|
|
12593
|
+
* Collection containing the `AddedItem`s that have been added to this Translation Job.
|
|
12594
|
+
* The `AddedItem`s represent either an Item that will be translated (for example a Component) or
|
|
12595
|
+
* an Item that contains the Items that will be translated (for example a Folder).
|
|
12596
|
+
*/
|
|
12597
|
+
get addedItems() {
|
|
12598
|
+
return this._addedItems;
|
|
12599
|
+
}
|
|
12600
|
+
/**
|
|
12601
|
+
* TCM URI of the item containing the `TranslationConfiguration` used for this Translation Job.
|
|
12602
|
+
*/
|
|
12603
|
+
get configurationItemUri() {
|
|
12604
|
+
return this._configurationItemUri;
|
|
12605
|
+
}
|
|
12606
|
+
/**
|
|
12607
|
+
* Link to the Context Repository.
|
|
12608
|
+
*/
|
|
12609
|
+
get contextRepository() {
|
|
12610
|
+
return this._contextRepository;
|
|
12611
|
+
}
|
|
12612
|
+
/**
|
|
12613
|
+
* The date the Translation Job was created (in UTC).
|
|
12614
|
+
*/
|
|
12615
|
+
get creationDate() {
|
|
12616
|
+
return this._creationDate;
|
|
12617
|
+
}
|
|
12618
|
+
/**
|
|
12619
|
+
* A link to the user who created the Translation Job.
|
|
12620
|
+
*/
|
|
12621
|
+
get creator() {
|
|
12622
|
+
return this._creator;
|
|
12623
|
+
}
|
|
12624
|
+
get displayState() {
|
|
12625
|
+
return this._displayState;
|
|
12626
|
+
}
|
|
12627
|
+
/**
|
|
12628
|
+
* Collection of errors registered to this job.
|
|
12629
|
+
*/
|
|
12630
|
+
get errors() {
|
|
12631
|
+
return this._errors;
|
|
12632
|
+
}
|
|
12633
|
+
get errorSeverityLevel() {
|
|
12634
|
+
return this._errorSeverityLevel;
|
|
12635
|
+
}
|
|
12636
|
+
get hasError() {
|
|
12637
|
+
return this._backendModel.HasError || false;
|
|
12638
|
+
}
|
|
12639
|
+
/**
|
|
12640
|
+
* Value indicating whether items that have already been translated should be included in the job.
|
|
12641
|
+
*/
|
|
12642
|
+
get includeItemsAlreadyTranslated() {
|
|
12643
|
+
return this._backendModel.IncludeItemsAlreadyTranslated || false;
|
|
12644
|
+
}
|
|
12645
|
+
/**
|
|
12646
|
+
* Value indicating if the Translation Job currently have one or more `TranslationJobQuote`s awaiting authorization (see remarks).
|
|
12647
|
+
*/
|
|
12648
|
+
get isAwaitingAuthorization() {
|
|
12649
|
+
return this._backendModel.IsAwaitingAuthorization || false;
|
|
12650
|
+
}
|
|
12651
|
+
get language() {
|
|
12652
|
+
return this._language;
|
|
12653
|
+
}
|
|
12654
|
+
/**
|
|
12655
|
+
* Metadata associated with the Translation Job.
|
|
12656
|
+
*/
|
|
12657
|
+
get metadata() {
|
|
12658
|
+
return this._backendModel.Metadata;
|
|
12659
|
+
}
|
|
12660
|
+
/**
|
|
12661
|
+
* TCM URI of the metadata schema used for this Translation Job.
|
|
12662
|
+
*/
|
|
12663
|
+
get metadataSchemaUri() {
|
|
12664
|
+
return this._backendModel.MetadataSchemaUri;
|
|
12665
|
+
}
|
|
12666
|
+
/**
|
|
12667
|
+
* The priority of the Translation Job. This value will only have an affect if `SupportsPriority` returns true.
|
|
12668
|
+
*/
|
|
12669
|
+
get priority() {
|
|
12670
|
+
return this._priority;
|
|
12671
|
+
}
|
|
12672
|
+
get progressPercentage() {
|
|
12673
|
+
return this._backendModel.ProgressPercentage;
|
|
12674
|
+
}
|
|
12675
|
+
/**
|
|
12676
|
+
* The due date for this job.
|
|
12677
|
+
*/
|
|
12678
|
+
get requiredDate() {
|
|
12679
|
+
return this._requiredDate;
|
|
12680
|
+
}
|
|
12681
|
+
get revisionDate() {
|
|
12682
|
+
return this._revisionDate;
|
|
12683
|
+
}
|
|
12684
|
+
/**
|
|
12685
|
+
* A link to the user who last modified the Translation Job.
|
|
12686
|
+
*/
|
|
12687
|
+
get revisor() {
|
|
12688
|
+
return this._revisor;
|
|
12689
|
+
}
|
|
12690
|
+
get state() {
|
|
12691
|
+
return this._state;
|
|
12692
|
+
}
|
|
12693
|
+
/**
|
|
12694
|
+
* Show if `TranslationJob` support setting of priority.
|
|
12695
|
+
*/
|
|
12696
|
+
get supportsPriority() {
|
|
12697
|
+
return this._backendModel.SupportsPriority || false;
|
|
12698
|
+
}
|
|
12699
|
+
/**
|
|
12700
|
+
* Show if `TranslationJob` support setting required rate.
|
|
12701
|
+
*/
|
|
12702
|
+
get supportsRequiredDate() {
|
|
12703
|
+
return this._backendModel.SupportsRequiredDate || false;
|
|
12704
|
+
}
|
|
12705
|
+
/**
|
|
12706
|
+
* List of target languages available for this `TranslationJob`.
|
|
12707
|
+
*/
|
|
12708
|
+
get targetLanguages() {
|
|
12709
|
+
return this._targetLanguages;
|
|
12710
|
+
}
|
|
12711
|
+
/**
|
|
12712
|
+
* Value indicating if the Translation Job is a translation to the Publication of the `ConfigurationItemUri`
|
|
12713
|
+
* (Pull job) or from the Publication (Push job).
|
|
12714
|
+
*/
|
|
12715
|
+
get type() {
|
|
12716
|
+
return this._type;
|
|
12717
|
+
}
|
|
12718
|
+
/**
|
|
12719
|
+
* Item count of language/workflowstep pairs.
|
|
12720
|
+
*/
|
|
12721
|
+
get workflowStatus() {
|
|
12722
|
+
return this._workflowStatus;
|
|
12723
|
+
}
|
|
12724
|
+
}
|
|
12725
|
+
|
|
12726
|
+
class TranslationResolvedItem {
|
|
12727
|
+
constructor({ backendModel, sourceItem, targetLanguages }) {
|
|
12728
|
+
Object.defineProperty(this, "_backendModel", {
|
|
12729
|
+
enumerable: true,
|
|
12730
|
+
configurable: true,
|
|
12731
|
+
writable: true,
|
|
12732
|
+
value: void 0
|
|
12733
|
+
});
|
|
12734
|
+
Object.defineProperty(this, "_sourceItem", {
|
|
12735
|
+
enumerable: true,
|
|
12736
|
+
configurable: true,
|
|
12737
|
+
writable: true,
|
|
12738
|
+
value: void 0
|
|
12739
|
+
});
|
|
12740
|
+
Object.defineProperty(this, "_targetLanguages", {
|
|
12741
|
+
enumerable: true,
|
|
12742
|
+
configurable: true,
|
|
12743
|
+
writable: true,
|
|
12744
|
+
value: void 0
|
|
12745
|
+
});
|
|
12746
|
+
Object.defineProperty(this, "getInternalModel", {
|
|
12747
|
+
enumerable: true,
|
|
12748
|
+
configurable: true,
|
|
12749
|
+
writable: true,
|
|
12750
|
+
value: () => {
|
|
12751
|
+
return this._backendModel;
|
|
12752
|
+
}
|
|
12753
|
+
});
|
|
12754
|
+
this._backendModel = backendModel;
|
|
12755
|
+
this._targetLanguages = targetLanguages;
|
|
12756
|
+
this._sourceItem = sourceItem;
|
|
12757
|
+
}
|
|
12758
|
+
get isValidForTranslation() {
|
|
12759
|
+
return !!this._backendModel.IsValidForTranslation;
|
|
12760
|
+
}
|
|
12761
|
+
get comment() {
|
|
12762
|
+
return this._backendModel.Comment;
|
|
12763
|
+
}
|
|
12764
|
+
get sourceItem() {
|
|
12765
|
+
return this._sourceItem;
|
|
12766
|
+
}
|
|
12767
|
+
get targetLanguages() {
|
|
12768
|
+
return this._targetLanguages;
|
|
12769
|
+
}
|
|
12770
|
+
}
|
|
12771
|
+
|
|
12772
|
+
const mapTargetLanguageConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12773
|
+
const availableWorkflows = backendModel.AvailableWorkflows?.map(w => mappingRegistry.map(w)).filter(isDefined);
|
|
12774
|
+
const selectedWorkflow = backendModel.SelectedWorkflow
|
|
12775
|
+
? mappingRegistry.map(backendModel.SelectedWorkflow)
|
|
12776
|
+
: undefined;
|
|
12777
|
+
const targetPublications = backendModel.TargetPublications?.map(p => mappingRegistry.map(p)).filter(isDefined);
|
|
12778
|
+
return { availableWorkflows, selectedWorkflow, targetPublications };
|
|
12779
|
+
};
|
|
12780
|
+
const targetLanguageMapping = {
|
|
12781
|
+
identifier: backendModel => backendModel?.$type === 'TargetLanguage' || backendModel?.$type === 'ResolvedItemTargetLanguage',
|
|
12782
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
12783
|
+
const { availableWorkflows, selectedWorkflow, targetPublications } = mapTargetLanguageConstructorArgs(mappingRegistry, backendModel);
|
|
12784
|
+
return new TargetLanguage({
|
|
12785
|
+
availableWorkflows,
|
|
12786
|
+
backendModel,
|
|
12787
|
+
selectedWorkflow,
|
|
12788
|
+
targetPublications,
|
|
12789
|
+
});
|
|
12790
|
+
},
|
|
12791
|
+
};
|
|
12792
|
+
|
|
12793
|
+
const tmsLanguageMapping = {
|
|
12794
|
+
identifier: backendModel => backendModel?.$type === 'TmsLanguage',
|
|
12795
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
12796
|
+
return new TmsLanguage(backendModel);
|
|
12797
|
+
},
|
|
12798
|
+
};
|
|
12799
|
+
|
|
12800
|
+
const mapTmsWorkflowConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12801
|
+
const steps = backendModel.Steps?.map(s => mappingRegistry.map(s)).filter(isDefined);
|
|
12802
|
+
return { steps };
|
|
12803
|
+
};
|
|
12804
|
+
const tmsWorkflowMapping = {
|
|
12805
|
+
identifier: backendModel => backendModel?.$type === 'TmsWorkflow',
|
|
12806
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
12807
|
+
const { steps } = mapTmsWorkflowConstructorArgs(mappingRegistry, backendModel);
|
|
12808
|
+
return new TmsWorkflow({ backendModel, steps });
|
|
12809
|
+
},
|
|
12810
|
+
};
|
|
12811
|
+
|
|
12812
|
+
const tmsWorkflowStepMapping = {
|
|
12813
|
+
identifier: backendModel => backendModel?.$type === 'TmsWorkflowStep',
|
|
12814
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
12815
|
+
return new TmsWorkflowStep(backendModel);
|
|
12816
|
+
},
|
|
12817
|
+
};
|
|
12818
|
+
|
|
12819
|
+
const mapTranslationStatus = (backendModel) => {
|
|
12820
|
+
switch (backendModel) {
|
|
12821
|
+
case TranslationStatus.NOT_TRANSLATED:
|
|
12822
|
+
return 'notTranslated';
|
|
12823
|
+
case TranslationStatus.IN_PROGRESS:
|
|
12824
|
+
return 'inProgress';
|
|
12825
|
+
case TranslationStatus.UP_TO_DATE:
|
|
12826
|
+
return 'upToDate';
|
|
12827
|
+
case TranslationStatus.NEW_SOURCE_VERSION_EXISTS:
|
|
12828
|
+
return 'newSourceVersionExists';
|
|
12829
|
+
case TranslationStatus.NEW_TARGET_VERSION_EXISTS:
|
|
12830
|
+
return 'newTargetVersionExists';
|
|
12831
|
+
case TranslationStatus.UNKNOWN_BY_CLIENT:
|
|
12832
|
+
return 'unknownByClient';
|
|
12833
|
+
}
|
|
12834
|
+
};
|
|
12835
|
+
const mapTranslationStatusToBackend = (model) => {
|
|
12836
|
+
switch (model) {
|
|
12837
|
+
case 'notTranslated':
|
|
12838
|
+
return TranslationStatus.NOT_TRANSLATED;
|
|
12839
|
+
case 'inProgress':
|
|
12840
|
+
return TranslationStatus.IN_PROGRESS;
|
|
12841
|
+
case 'upToDate':
|
|
12842
|
+
return TranslationStatus.UP_TO_DATE;
|
|
12843
|
+
case 'newSourceVersionExists':
|
|
12844
|
+
return TranslationStatus.NEW_SOURCE_VERSION_EXISTS;
|
|
12845
|
+
case 'newTargetVersionExists':
|
|
12846
|
+
return TranslationStatus.NEW_TARGET_VERSION_EXISTS;
|
|
12847
|
+
case 'unknownByClient':
|
|
12848
|
+
return TranslationStatus.UNKNOWN_BY_CLIENT;
|
|
12849
|
+
}
|
|
12850
|
+
};
|
|
12851
|
+
|
|
12852
|
+
const mapTranslationDetailsConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12853
|
+
const completedTranslationInfo = backendModel.CompletedTranslationInfo
|
|
12854
|
+
? mappingRegistry.map(backendModel.CompletedTranslationInfo)
|
|
12855
|
+
: undefined;
|
|
12856
|
+
const inProgressTranslationInfo = backendModel.InProgressTranslationInfo?.map(tji => mappingRegistry.map(tji)).filter(isDefined);
|
|
12857
|
+
const sourceItemUri = backendModel.SourceItemUri ? parseItemUri(backendModel.SourceItemUri) : undefined;
|
|
12858
|
+
const sourcePublicationUri = backendModel.SourcePublicationUri
|
|
12859
|
+
? parseItemUri(backendModel.SourcePublicationUri)
|
|
12860
|
+
: undefined;
|
|
12861
|
+
const status = backendModel.Status ? mapTranslationStatus(backendModel.Status) : undefined;
|
|
12862
|
+
const targetItemUri = backendModel.TargetItemUri ? parseItemUri(backendModel.TargetItemUri) : undefined;
|
|
12863
|
+
const targetPublicationUri = backendModel.TargetPublicationUri
|
|
12864
|
+
? parseItemUri(backendModel.TargetPublicationUri)
|
|
12865
|
+
: undefined;
|
|
12866
|
+
return {
|
|
12867
|
+
completedTranslationInfo,
|
|
12868
|
+
inProgressTranslationInfo,
|
|
12869
|
+
sourceItemUri,
|
|
12870
|
+
sourcePublicationUri,
|
|
12871
|
+
status,
|
|
12872
|
+
targetItemUri,
|
|
12873
|
+
targetPublicationUri,
|
|
12155
12874
|
};
|
|
12156
12875
|
};
|
|
12157
12876
|
const translationDetailsMapping = {
|
|
12158
|
-
identifier: backendModel =>
|
|
12877
|
+
identifier: backendModel => backendModel?.$type === 'TranslationDetails',
|
|
12159
12878
|
mapper: (mappingRegistry, backendModel) => {
|
|
12160
12879
|
const { completedTranslationInfo, inProgressTranslationInfo, sourceItemUri, sourcePublicationUri, status, targetItemUri, targetPublicationUri, } = mapTranslationDetailsConstructorArgs(mappingRegistry, backendModel);
|
|
12161
12880
|
return new TranslationDetails({
|
|
@@ -12203,7 +12922,7 @@ const mapTranslationErrorDetailsConstructorArgs = (mappingRegistry, backendModel
|
|
|
12203
12922
|
const severity = backendModel.Severity ? mapTranslationErrorSeverity(backendModel.Severity) : undefined;
|
|
12204
12923
|
const itemSourceUri = backendModel.TcmItemSourceUri ? parseItemUri(backendModel.TcmItemSourceUri) : undefined;
|
|
12205
12924
|
const itemTargetUri = backendModel.TcmItemTargetUri ? parseItemUri(backendModel.TcmItemTargetUri) : undefined;
|
|
12206
|
-
const jobUri = backendModel.
|
|
12925
|
+
const jobUri = backendModel.JobId ? TmUri.create(backendModel.JobId) : undefined;
|
|
12207
12926
|
return {
|
|
12208
12927
|
exceptionDetails,
|
|
12209
12928
|
itemSourceUri,
|
|
@@ -12213,7 +12932,7 @@ const mapTranslationErrorDetailsConstructorArgs = (mappingRegistry, backendModel
|
|
|
12213
12932
|
};
|
|
12214
12933
|
};
|
|
12215
12934
|
const translationErrorDetailsMapping = {
|
|
12216
|
-
identifier: backendModel =>
|
|
12935
|
+
identifier: backendModel => backendModel?.$type === 'ErrorDetails',
|
|
12217
12936
|
mapper: (mappingRegistry, backendModel) => {
|
|
12218
12937
|
const { exceptionDetails, itemSourceUri, itemTargetUri, jobUri, severity } = mapTranslationErrorDetailsConstructorArgs(mappingRegistry, backendModel);
|
|
12219
12938
|
return new TranslationErrorDetails({
|
|
@@ -12234,7 +12953,7 @@ const mapTranslationExceptionDetailsConstructorArgs = (mappingRegistry, backendM
|
|
|
12234
12953
|
return { innerException };
|
|
12235
12954
|
};
|
|
12236
12955
|
const translationExceptionDetailsMapping = {
|
|
12237
|
-
identifier: backendModel =>
|
|
12956
|
+
identifier: backendModel => backendModel?.$type === 'ExceptionDetails',
|
|
12238
12957
|
mapper: (mappingRegistry, backendModel) => {
|
|
12239
12958
|
const { innerException } = mapTranslationExceptionDetailsConstructorArgs(mappingRegistry, backendModel);
|
|
12240
12959
|
return new TranslationExceptionDetails({ backendModel, innerException });
|
|
@@ -12242,18 +12961,17 @@ const translationExceptionDetailsMapping = {
|
|
|
12242
12961
|
};
|
|
12243
12962
|
|
|
12244
12963
|
const mapTranslationInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12245
|
-
var _a;
|
|
12246
12964
|
const contextLanguage = backendModel.ContextLanguage
|
|
12247
12965
|
? mappingRegistry.map(backendModel.ContextLanguage)
|
|
12248
12966
|
: undefined;
|
|
12249
12967
|
const translationFrom = backendModel.TranslationFrom
|
|
12250
12968
|
? mappingRegistry.map(backendModel.TranslationFrom)
|
|
12251
12969
|
: undefined;
|
|
12252
|
-
const translationTo =
|
|
12970
|
+
const translationTo = backendModel.TranslationTo?.map(td => mappingRegistry.map(td)).filter(isDefined);
|
|
12253
12971
|
return { contextLanguage, translationFrom, translationTo };
|
|
12254
12972
|
};
|
|
12255
12973
|
const translationInfoMapping = {
|
|
12256
|
-
identifier: backendModel =>
|
|
12974
|
+
identifier: backendModel => backendModel?.$type === 'TranslationInfo',
|
|
12257
12975
|
mapper: (mappingRegistry, backendModel) => {
|
|
12258
12976
|
const { contextLanguage, translationFrom, translationTo } = mapTranslationInfoConstructorArgs(mappingRegistry, backendModel);
|
|
12259
12977
|
return new TranslationInfo({ backendModel, contextLanguage, translationFrom, translationTo });
|
|
@@ -12318,7 +13036,7 @@ const mapTranslationJobInfoConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
12318
13036
|
};
|
|
12319
13037
|
};
|
|
12320
13038
|
const translationJobInfoMapping = {
|
|
12321
|
-
identifier: backendModel =>
|
|
13039
|
+
identifier: backendModel => backendModel?.$type === 'TranslationJobInfo',
|
|
12322
13040
|
mapper: (mappingRegistry, backendModel) => {
|
|
12323
13041
|
const { retrievedFromTranslationDate, retrieveReason, sendForTranslationDate, sourceItemUri, sourcePublicationUri, sourceRevisionDate, targetItemUri, targetRevisionDate, } = mapTranslationJobInfoConstructorArgs(mappingRegistry, backendModel);
|
|
12324
13042
|
return new TranslationJobInfo({
|
|
@@ -12336,13 +13054,12 @@ const translationJobInfoMapping = {
|
|
|
12336
13054
|
};
|
|
12337
13055
|
|
|
12338
13056
|
const mapTranslationJobItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12339
|
-
var _a;
|
|
12340
13057
|
const idRef = backendModel.IdRef ? parseItemUri(backendModel.IdRef) : undefined;
|
|
12341
|
-
const resolveOptions =
|
|
13058
|
+
const resolveOptions = backendModel.ResolveOptions?.map(o => mapResolveOptions(o));
|
|
12342
13059
|
return { idRef, resolveOptions };
|
|
12343
13060
|
};
|
|
12344
13061
|
const translationJobItemMapping = {
|
|
12345
|
-
identifier: backendModel =>
|
|
13062
|
+
identifier: backendModel => backendModel?.$type === 'AddedItem',
|
|
12346
13063
|
mapper: (mappingRegistry, backendModel) => {
|
|
12347
13064
|
const { idRef, resolveOptions } = mapTranslationJobItemConstructorArgs(mappingRegistry, backendModel);
|
|
12348
13065
|
return new TranslationJobItem({ backendModel, idRef, resolveOptions });
|
|
@@ -12449,8 +13166,7 @@ const mapTranslationJobTypeToBackend = (model) => {
|
|
|
12449
13166
|
};
|
|
12450
13167
|
|
|
12451
13168
|
const mapTranslationJobConstructorArgs = (mappingRegistry, backendModel) => {
|
|
12452
|
-
|
|
12453
|
-
const addedItems = (_a = backendModel.AddedItems) === null || _a === void 0 ? void 0 : _a.map(i => mappingRegistry.map(i)).filter(isDefined);
|
|
13169
|
+
const addedItems = backendModel.AddedItems?.map(i => mappingRegistry.map(i)).filter(isDefined);
|
|
12454
13170
|
const creator = backendModel.Creator ? mappingRegistry.map(backendModel.Creator) : undefined;
|
|
12455
13171
|
const configurationItemUri = backendModel.ConfigurationItemUri
|
|
12456
13172
|
? parseItemUri(backendModel.ConfigurationItemUri)
|
|
@@ -12458,7 +13174,7 @@ const mapTranslationJobConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
12458
13174
|
const displayState = backendModel.DisplayState
|
|
12459
13175
|
? mapTranslationJobDisplayState(backendModel.DisplayState)
|
|
12460
13176
|
: undefined;
|
|
12461
|
-
const errors =
|
|
13177
|
+
const errors = backendModel.Errors?.map(e => mappingRegistry.map(e)).filter(isDefined);
|
|
12462
13178
|
const errorSeverityLevel = backendModel.ErrorSeverityLevel
|
|
12463
13179
|
? mapTranslationErrorSeverity(backendModel.ErrorSeverityLevel)
|
|
12464
13180
|
: undefined;
|
|
@@ -12466,12 +13182,15 @@ const mapTranslationJobConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
12466
13182
|
const priority = backendModel.Priority ? mapTranslationJobPriority(backendModel.Priority) : undefined;
|
|
12467
13183
|
const revisor = backendModel.Revisor ? mappingRegistry.map(backendModel.Revisor) : undefined;
|
|
12468
13184
|
const state = backendModel.State ? mapTranslationJobState(backendModel.State) : undefined;
|
|
12469
|
-
const targetLanguages =
|
|
12470
|
-
const type =
|
|
12471
|
-
const workflowStatus =
|
|
13185
|
+
const targetLanguages = backendModel.TargetLanguages?.map(l => mappingRegistry.map(l)).filter(isDefined);
|
|
13186
|
+
const type = backendModel.Type?.map(t => mapTranslationJobType(t));
|
|
13187
|
+
const workflowStatus = backendModel.WorkflowStatus?.map(s => mappingRegistry.map(s)).filter(isDefined);
|
|
12472
13188
|
const creationDate = backendModel.CreationDate ? mapDate(backendModel.CreationDate) : undefined;
|
|
12473
13189
|
const requiredDate = backendModel.RequiredDate ? mapDate(backendModel.RequiredDate) : undefined;
|
|
12474
13190
|
const revisionDate = backendModel.RevisionDate ? mapDate(backendModel.RevisionDate) : undefined;
|
|
13191
|
+
const contextRepository = backendModel.ContextRepository
|
|
13192
|
+
? mappingRegistry.map(backendModel.ContextRepository)
|
|
13193
|
+
: undefined;
|
|
12475
13194
|
return {
|
|
12476
13195
|
addedItems,
|
|
12477
13196
|
configurationItemUri,
|
|
@@ -12489,12 +13208,13 @@ const mapTranslationJobConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
12489
13208
|
targetLanguages,
|
|
12490
13209
|
type,
|
|
12491
13210
|
workflowStatus,
|
|
13211
|
+
contextRepository,
|
|
12492
13212
|
};
|
|
12493
13213
|
};
|
|
12494
13214
|
const translationJobMapping = {
|
|
12495
|
-
identifier: backendModel =>
|
|
13215
|
+
identifier: backendModel => backendModel?.$type === 'TranslationJob',
|
|
12496
13216
|
mapper: (mappingRegistry, backendModel) => {
|
|
12497
|
-
const { addedItems, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, revisor, state, targetLanguages, type, workflowStatus, requiredDate, revisionDate, } = mapTranslationJobConstructorArgs(mappingRegistry, backendModel);
|
|
13217
|
+
const { addedItems, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, revisor, state, targetLanguages, type, workflowStatus, requiredDate, revisionDate, contextRepository, } = mapTranslationJobConstructorArgs(mappingRegistry, backendModel);
|
|
12498
13218
|
return new TranslationJob({
|
|
12499
13219
|
addedItems,
|
|
12500
13220
|
backendModel,
|
|
@@ -12513,6 +13233,7 @@ const translationJobMapping = {
|
|
|
12513
13233
|
targetLanguages,
|
|
12514
13234
|
type,
|
|
12515
13235
|
workflowStatus,
|
|
13236
|
+
contextRepository,
|
|
12516
13237
|
});
|
|
12517
13238
|
},
|
|
12518
13239
|
};
|
|
@@ -12525,7 +13246,7 @@ const mapTranslationTargetPublicationConstructorArgs = (mappingRegistry, backend
|
|
|
12525
13246
|
return { configurationItemUri, idRef };
|
|
12526
13247
|
};
|
|
12527
13248
|
const translationTargetPublicationMapping = {
|
|
12528
|
-
identifier: backendModel =>
|
|
13249
|
+
identifier: backendModel => backendModel?.$type === 'TargetPublication',
|
|
12529
13250
|
mapper: (mappingRegistry, backendModel) => {
|
|
12530
13251
|
const { configurationItemUri, idRef } = mapTranslationTargetPublicationConstructorArgs(mappingRegistry, backendModel);
|
|
12531
13252
|
return new TranslationTargetPublication({ backendModel, configurationItemUri, idRef });
|
|
@@ -12540,20 +13261,79 @@ const mapTranslationWorkflowStatusConstructorArgs = (mappingRegistry, backendMod
|
|
|
12540
13261
|
return { language, workflowStep };
|
|
12541
13262
|
};
|
|
12542
13263
|
const translationWorkflowStatusMapping = {
|
|
12543
|
-
identifier: backendModel =>
|
|
13264
|
+
identifier: backendModel => backendModel?.$type === 'TranslationWorkflowStatus',
|
|
12544
13265
|
mapper: (mappingRegistry, backendModel) => {
|
|
12545
13266
|
const { language, workflowStep } = mapTranslationWorkflowStatusConstructorArgs(mappingRegistry, backendModel);
|
|
12546
13267
|
return new TranslationWorkflowStatus({ backendModel, language, workflowStep });
|
|
12547
13268
|
},
|
|
12548
13269
|
};
|
|
12549
13270
|
|
|
13271
|
+
const mapIdentifiableTranslationJobConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13272
|
+
const virtualId = backendModel.Id ? TmUri.create(backendModel.Id) : TcmUri.null;
|
|
13273
|
+
const backendTranslationJobWithId = {
|
|
13274
|
+
...backendModel,
|
|
13275
|
+
Id: virtualId.asString,
|
|
13276
|
+
};
|
|
13277
|
+
return {
|
|
13278
|
+
...mapTranslationJobConstructorArgs(mappingRegistry, backendModel),
|
|
13279
|
+
...mapIdentifiableObjectConstructorArgs(mappingRegistry, backendTranslationJobWithId),
|
|
13280
|
+
};
|
|
13281
|
+
};
|
|
13282
|
+
const identifiableTranslationJobMapping = {
|
|
13283
|
+
identifier: backendModel => backendModel?.$type === 'IdentifiableTranslationJob',
|
|
13284
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
13285
|
+
const { addedItems, configurationItemUri, creationDate, creator, displayState, errors, errorSeverityLevel, language, priority, revisor, state, targetLanguages, type, workflowStatus, requiredDate, revisionDate, ...identifiableObjectProps } = mapIdentifiableTranslationJobConstructorArgs(mappingRegistry, backendModel);
|
|
13286
|
+
return new IdentifiableTranslationJob({
|
|
13287
|
+
...identifiableObjectProps,
|
|
13288
|
+
addedItems,
|
|
13289
|
+
backendModel: {
|
|
13290
|
+
...backendModel,
|
|
13291
|
+
Id: identifiableObjectProps.id.asString,
|
|
13292
|
+
},
|
|
13293
|
+
configurationItemUri,
|
|
13294
|
+
creationDate,
|
|
13295
|
+
creator,
|
|
13296
|
+
displayState,
|
|
13297
|
+
errors,
|
|
13298
|
+
errorSeverityLevel,
|
|
13299
|
+
language,
|
|
13300
|
+
priority,
|
|
13301
|
+
requiredDate,
|
|
13302
|
+
revisionDate,
|
|
13303
|
+
revisor,
|
|
13304
|
+
state,
|
|
13305
|
+
targetLanguages,
|
|
13306
|
+
type,
|
|
13307
|
+
workflowStatus,
|
|
13308
|
+
});
|
|
13309
|
+
},
|
|
13310
|
+
};
|
|
13311
|
+
|
|
13312
|
+
const mapTranslationResolvedItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13313
|
+
const sourceItem = backendModel.SourceItem
|
|
13314
|
+
? mappingRegistry.map(backendModel.SourceItem)
|
|
13315
|
+
: undefined;
|
|
13316
|
+
const targetLanguages = backendModel.TargetLanguages?.map(tl => mappingRegistry.map(tl)).filter(isDefined);
|
|
13317
|
+
return { sourceItem, targetLanguages };
|
|
13318
|
+
};
|
|
13319
|
+
const translationResolvedItemMapping = {
|
|
13320
|
+
identifier: backendModel => backendModel?.$type === 'TmResolvedItem',
|
|
13321
|
+
mapper: (mappingRegistry, backendModel) => {
|
|
13322
|
+
const { sourceItem, targetLanguages } = mapTranslationResolvedItemConstructorArgs(mappingRegistry, backendModel);
|
|
13323
|
+
return new TranslationResolvedItem({
|
|
13324
|
+
backendModel,
|
|
13325
|
+
sourceItem,
|
|
13326
|
+
targetLanguages,
|
|
13327
|
+
});
|
|
13328
|
+
},
|
|
13329
|
+
};
|
|
13330
|
+
|
|
12550
13331
|
/**
|
|
12551
13332
|
* Abstract base class for the data of "Trustees": the data of Users or Groups.
|
|
12552
13333
|
*/
|
|
12553
13334
|
class Trustee extends SystemWideObject {
|
|
12554
|
-
constructor(
|
|
12555
|
-
|
|
12556
|
-
super(Object.assign({ backendModel }, systemWideObjectArgs));
|
|
13335
|
+
constructor({ backendModel, groupMemberships, ...systemWideObjectArgs }) {
|
|
13336
|
+
super({ backendModel, ...systemWideObjectArgs });
|
|
12557
13337
|
Object.defineProperty(this, "_groupMemberships", {
|
|
12558
13338
|
enumerable: true,
|
|
12559
13339
|
configurable: true,
|
|
@@ -12591,9 +13371,8 @@ class Trustee extends SystemWideObject {
|
|
|
12591
13371
|
}
|
|
12592
13372
|
|
|
12593
13373
|
class User extends Trustee {
|
|
12594
|
-
constructor(
|
|
12595
|
-
|
|
12596
|
-
super(Object.assign({ backendModel }, trusteeArgs));
|
|
13374
|
+
constructor({ backendModel, ...trusteeArgs }) {
|
|
13375
|
+
super({ backendModel, ...trusteeArgs });
|
|
12597
13376
|
Object.defineProperty(this, "getInternalModel", {
|
|
12598
13377
|
enumerable: true,
|
|
12599
13378
|
configurable: true,
|
|
@@ -12630,9 +13409,8 @@ class User extends Trustee {
|
|
|
12630
13409
|
}
|
|
12631
13410
|
|
|
12632
13411
|
class AccessToken extends User {
|
|
12633
|
-
constructor(
|
|
12634
|
-
|
|
12635
|
-
super(Object.assign({ backendModel }, userArgs));
|
|
13412
|
+
constructor({ backendModel, inheritedSystemPrivileges, ...userArgs }) {
|
|
13413
|
+
super({ backendModel, ...userArgs });
|
|
12636
13414
|
Object.defineProperty(this, "_backendModel", {
|
|
12637
13415
|
enumerable: true,
|
|
12638
13416
|
configurable: true,
|
|
@@ -12779,9 +13557,8 @@ class UserFavoriteLink {
|
|
|
12779
13557
|
* Represents a data of Group of Users.
|
|
12780
13558
|
*/
|
|
12781
13559
|
class UserGroup extends Trustee {
|
|
12782
|
-
constructor(
|
|
12783
|
-
|
|
12784
|
-
super(Object.assign({ backendModel }, trusteeArgs));
|
|
13560
|
+
constructor({ backendModel, inheritedSystemPrivileges, scope, systemPrivileges, ...trusteeArgs }) {
|
|
13561
|
+
super({ backendModel, ...trusteeArgs });
|
|
12785
13562
|
Object.defineProperty(this, "_scope", {
|
|
12786
13563
|
enumerable: true,
|
|
12787
13564
|
configurable: true,
|
|
@@ -13105,9 +13882,8 @@ class UserRuntimeInfo {
|
|
|
13105
13882
|
}
|
|
13106
13883
|
|
|
13107
13884
|
const mapTrusteeConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13108
|
-
var _a;
|
|
13109
13885
|
const { applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo } = mapSystemWideObjectConstructorArgs(mappingRegistry, backendModel);
|
|
13110
|
-
const groupMemberships =
|
|
13886
|
+
const groupMemberships = backendModel.GroupMemberships?.map(m => mappingRegistry.map(m)).filter(isDefined);
|
|
13111
13887
|
return {
|
|
13112
13888
|
applicableActions,
|
|
13113
13889
|
basicVersionInfo,
|
|
@@ -13122,7 +13898,7 @@ const mapTrusteeConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
13122
13898
|
|
|
13123
13899
|
const mapUserConstructorArgs = mapTrusteeConstructorArgs;
|
|
13124
13900
|
const userMapping = {
|
|
13125
|
-
identifier: backendModel =>
|
|
13901
|
+
identifier: backendModel => backendModel?.$type === 'User',
|
|
13126
13902
|
mapper: (mappingRegistry, backendModel) => {
|
|
13127
13903
|
const { groupMemberships, applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo, } = mapUserConstructorArgs(mappingRegistry, backendModel);
|
|
13128
13904
|
return new User({
|
|
@@ -13144,10 +13920,13 @@ const mapAccessTokenConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
13144
13920
|
const inheritedSystemPrivileges = backendModel.InheritedSystemPrivileges
|
|
13145
13921
|
? mappingRegistry.map(backendModel.InheritedSystemPrivileges)
|
|
13146
13922
|
: undefined;
|
|
13147
|
-
return
|
|
13923
|
+
return {
|
|
13924
|
+
...userProps,
|
|
13925
|
+
inheritedSystemPrivileges,
|
|
13926
|
+
};
|
|
13148
13927
|
};
|
|
13149
13928
|
const accessTokenMapping = {
|
|
13150
|
-
identifier: backendModel =>
|
|
13929
|
+
identifier: backendModel => backendModel?.$type === 'AccessToken',
|
|
13151
13930
|
mapper: (mappingRegistry, backendModel) => {
|
|
13152
13931
|
const { applicableActions, basicVersionInfo, groupMemberships, id, inheritedSystemPrivileges, listLinks, loadInfo, securityDescriptor, listInfo, } = mapAccessTokenConstructorArgs(mappingRegistry, backendModel);
|
|
13153
13932
|
return new AccessToken({
|
|
@@ -13166,13 +13945,12 @@ const accessTokenMapping = {
|
|
|
13166
13945
|
};
|
|
13167
13946
|
|
|
13168
13947
|
const mapGroupMembershipConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13169
|
-
var _a;
|
|
13170
13948
|
const group = backendModel.Group ? mappingRegistry.map(backendModel.Group) : undefined;
|
|
13171
|
-
const scope =
|
|
13949
|
+
const scope = backendModel.Scope?.map(s => mappingRegistry.map(s)).filter(isDefined);
|
|
13172
13950
|
return { group, scope };
|
|
13173
13951
|
};
|
|
13174
13952
|
const groupMembershipMapping = {
|
|
13175
|
-
identifier: backendModel =>
|
|
13953
|
+
identifier: backendModel => backendModel?.$type === 'GroupMembership',
|
|
13176
13954
|
mapper: (mappingRegistry, backendModel) => {
|
|
13177
13955
|
const { group, scope } = mapGroupMembershipConstructorArgs(mappingRegistry, backendModel);
|
|
13178
13956
|
return new GroupMembership({ backendModel, group, scope });
|
|
@@ -13184,7 +13962,7 @@ const mapUserFavoriteLinkConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
13184
13962
|
return { idRef };
|
|
13185
13963
|
};
|
|
13186
13964
|
const userFavoriteLinkMapping = {
|
|
13187
|
-
identifier: backendModel =>
|
|
13965
|
+
identifier: backendModel => backendModel?.$type === 'FavoriteLink',
|
|
13188
13966
|
mapper: (mappingRegistry, backendModel) => {
|
|
13189
13967
|
const { idRef } = mapUserFavoriteLinkConstructorArgs(mappingRegistry, backendModel);
|
|
13190
13968
|
return new UserFavoriteLink({ backendModel, idRef });
|
|
@@ -13192,19 +13970,21 @@ const userFavoriteLinkMapping = {
|
|
|
13192
13970
|
};
|
|
13193
13971
|
|
|
13194
13972
|
const mapUserGroupConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13195
|
-
var _a, _b;
|
|
13196
13973
|
const trusteeConstructorArgs = mapTrusteeConstructorArgs(mappingRegistry, backendModel);
|
|
13197
|
-
const scope =
|
|
13198
|
-
const systemPrivileges =
|
|
13974
|
+
const scope = backendModel.Scope?.map(k => mappingRegistry.map(k)).filter(isDefined);
|
|
13975
|
+
const systemPrivileges = backendModel.SystemPrivileges?.map(k => mappingRegistry.map(k)).filter(isDefined);
|
|
13199
13976
|
const inheritedSystemPrivileges = backendModel.InheritedSystemPrivileges
|
|
13200
13977
|
? mappingRegistry.map(backendModel.InheritedSystemPrivileges)
|
|
13201
13978
|
: undefined;
|
|
13202
|
-
return
|
|
13979
|
+
return {
|
|
13980
|
+
...trusteeConstructorArgs,
|
|
13981
|
+
scope,
|
|
13203
13982
|
systemPrivileges,
|
|
13204
|
-
inheritedSystemPrivileges
|
|
13983
|
+
inheritedSystemPrivileges,
|
|
13984
|
+
};
|
|
13205
13985
|
};
|
|
13206
13986
|
const userGroupMapping = {
|
|
13207
|
-
identifier: backendModel =>
|
|
13987
|
+
identifier: backendModel => backendModel?.$type === 'Group',
|
|
13208
13988
|
mapper: (mappingRegistry, backendModel) => {
|
|
13209
13989
|
const { applicableActions, basicVersionInfo, groupMemberships, id, inheritedSystemPrivileges, listLinks, loadInfo, scope, securityDescriptor, systemPrivileges, listInfo, } = mapUserGroupConstructorArgs(mappingRegistry, backendModel);
|
|
13210
13990
|
return new UserGroup({
|
|
@@ -13225,7 +14005,7 @@ const userGroupMapping = {
|
|
|
13225
14005
|
};
|
|
13226
14006
|
|
|
13227
14007
|
const userLocaleInfoMapping = {
|
|
13228
|
-
identifier: backendModel =>
|
|
14008
|
+
identifier: backendModel => backendModel?.$type === 'UserLocaleInfo',
|
|
13229
14009
|
mapper: (mappingRegistry, backendModel) => new UserLocaleInfo(backendModel),
|
|
13230
14010
|
};
|
|
13231
14011
|
|
|
@@ -13238,12 +14018,13 @@ const isValidFavoriteLink = (link) => {
|
|
|
13238
14018
|
return true;
|
|
13239
14019
|
};
|
|
13240
14020
|
const mapUserPreferencesConstructorArgs = (mappingRegistry, backendModel) => {
|
|
13241
|
-
|
|
13242
|
-
|
|
14021
|
+
const favorites = backendModel.Favorites?.filter(isValidFavoriteLink)
|
|
14022
|
+
.map(link => mappingRegistry.map(link))
|
|
14023
|
+
.filter(isDefined) || [];
|
|
13243
14024
|
return { favorites };
|
|
13244
14025
|
};
|
|
13245
14026
|
const userPreferencesMapping = {
|
|
13246
|
-
identifier: backendModel =>
|
|
14027
|
+
identifier: backendModel => backendModel?.$type === 'UserPreferences',
|
|
13247
14028
|
mapper: (mappingRegistry, backendModel) => {
|
|
13248
14029
|
const { favorites } = mapUserPreferencesConstructorArgs(mappingRegistry, backendModel);
|
|
13249
14030
|
return new UserPreferences({ backendModel, favorites });
|
|
@@ -13259,7 +14040,7 @@ const mapUserProfileConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
13259
14040
|
return { preferences, runtimeInfo, user };
|
|
13260
14041
|
};
|
|
13261
14042
|
const userProfileMapping = {
|
|
13262
|
-
identifier: backendModel =>
|
|
14043
|
+
identifier: backendModel => backendModel?.$type === 'UserProfile',
|
|
13263
14044
|
mapper: (mappingRegistry, backendModel) => {
|
|
13264
14045
|
const { preferences, runtimeInfo, user } = mapUserProfileConstructorArgs(mappingRegistry, backendModel);
|
|
13265
14046
|
return new UserProfile({ backendModel, preferences, runtimeInfo, user });
|
|
@@ -13271,7 +14052,7 @@ const mapUserRuntimeInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
13271
14052
|
return { locale };
|
|
13272
14053
|
};
|
|
13273
14054
|
const userUserRuntimeInfoMapping = {
|
|
13274
|
-
identifier: backendModel =>
|
|
14055
|
+
identifier: backendModel => backendModel?.$type === 'UserRuntimeInfo',
|
|
13275
14056
|
mapper: (mappingRegistry, backendModel) => {
|
|
13276
14057
|
const { locale } = mapUserRuntimeInfoConstructorArgs(mappingRegistry, backendModel);
|
|
13277
14058
|
return new UserRuntimeInfo({ backendModel, locale });
|
|
@@ -13297,9 +14078,8 @@ const mapActivityConstraints = (backendModel) => {
|
|
|
13297
14078
|
* Abstract Base class for the data of workflow items except for "ProcessDefinition" and "ApprovalStatus".
|
|
13298
14079
|
*/
|
|
13299
14080
|
class WorkflowObject extends IdentifiableObject {
|
|
13300
|
-
constructor(
|
|
13301
|
-
|
|
13302
|
-
super(Object.assign({ backendModel }, identifiableObjectArgs));
|
|
14081
|
+
constructor({ backendModel, contextRepository, ...identifiableObjectArgs }) {
|
|
14082
|
+
super({ backendModel, ...identifiableObjectArgs });
|
|
13303
14083
|
Object.defineProperty(this, "_contextRepository", {
|
|
13304
14084
|
enumerable: true,
|
|
13305
14085
|
configurable: true,
|
|
@@ -13328,9 +14108,8 @@ class WorkflowObject extends IdentifiableObject {
|
|
|
13328
14108
|
* Abstract base class for the data of Activities.
|
|
13329
14109
|
*/
|
|
13330
14110
|
class Activity extends WorkflowObject {
|
|
13331
|
-
constructor(
|
|
13332
|
-
|
|
13333
|
-
super(Object.assign({ backendModel }, workflowObjectArgs));
|
|
14111
|
+
constructor({ assignee, assignmentDate, backendModel, dueDate, finishDate, owner, primarySubject, process, startDate, suspendDate, workItems, ...workflowObjectArgs }) {
|
|
14112
|
+
super({ backendModel, ...workflowObjectArgs });
|
|
13334
14113
|
Object.defineProperty(this, "_assignee", {
|
|
13335
14114
|
enumerable: true,
|
|
13336
14115
|
configurable: true,
|
|
@@ -13499,9 +14278,8 @@ class Activity extends WorkflowObject {
|
|
|
13499
14278
|
}
|
|
13500
14279
|
|
|
13501
14280
|
class ActivityDefinition extends WorkflowObject {
|
|
13502
|
-
constructor(
|
|
13503
|
-
|
|
13504
|
-
super(Object.assign({ backendModel }, workflowObjectArgs));
|
|
14281
|
+
constructor({ backendModel, activityConstraints, assignee, processDefinition, ...workflowObjectArgs }) {
|
|
14282
|
+
super({ backendModel, ...workflowObjectArgs });
|
|
13505
14283
|
Object.defineProperty(this, "_activityConstraints", {
|
|
13506
14284
|
enumerable: true,
|
|
13507
14285
|
configurable: true,
|
|
@@ -13569,9 +14347,8 @@ class ActivityDefinition extends WorkflowObject {
|
|
|
13569
14347
|
* Representing data of the Activity History. This is the part of "ProcessHistory".
|
|
13570
14348
|
*/
|
|
13571
14349
|
class ActivityHistory extends Activity {
|
|
13572
|
-
constructor(
|
|
13573
|
-
|
|
13574
|
-
super(Object.assign({ backendModel }, activityArgs));
|
|
14350
|
+
constructor({ activityType, approvalStatus, backendModel, ...activityArgs }) {
|
|
14351
|
+
super({ backendModel, ...activityArgs });
|
|
13575
14352
|
Object.defineProperty(this, "_activityType", {
|
|
13576
14353
|
enumerable: true,
|
|
13577
14354
|
configurable: true,
|
|
@@ -13625,9 +14402,8 @@ class ActivityHistory extends Activity {
|
|
|
13625
14402
|
* Represents an Activity Instance: a current Activity which is part of a Process Instance.
|
|
13626
14403
|
*/
|
|
13627
14404
|
class ActivityInstance extends Activity {
|
|
13628
|
-
constructor(
|
|
13629
|
-
|
|
13630
|
-
super(Object.assign({ backendModel }, activityArgs));
|
|
14405
|
+
constructor({ backendModel, activityConstraints, activityDefinition, activityState, approvalStatus, processDefinition, workflowType, ...activityArgs }) {
|
|
14406
|
+
super({ backendModel, ...activityArgs });
|
|
13631
14407
|
Object.defineProperty(this, "_activityConstraints", {
|
|
13632
14408
|
enumerable: true,
|
|
13633
14409
|
configurable: true,
|
|
@@ -13766,9 +14542,8 @@ class FinishActivityResult {
|
|
|
13766
14542
|
* Abstract base class for the data of Processes.
|
|
13767
14543
|
*/
|
|
13768
14544
|
class Process extends WorkflowObject {
|
|
13769
|
-
constructor(
|
|
13770
|
-
|
|
13771
|
-
super(Object.assign({ backendModel }, workflowObjectArgs));
|
|
14545
|
+
constructor({ backendModel, activities, creator, subjects, workflowType, ...workflowObjectArgs }) {
|
|
14546
|
+
super({ backendModel, ...workflowObjectArgs });
|
|
13772
14547
|
Object.defineProperty(this, "_activities", {
|
|
13773
14548
|
enumerable: true,
|
|
13774
14549
|
configurable: true,
|
|
@@ -13846,9 +14621,8 @@ class Process extends WorkflowObject {
|
|
|
13846
14621
|
}
|
|
13847
14622
|
|
|
13848
14623
|
class ProcessDefinition extends RepositoryLocalObject {
|
|
13849
|
-
constructor(
|
|
13850
|
-
|
|
13851
|
-
super(Object.assign({ backendModel }, rloArgs));
|
|
14624
|
+
constructor({ backendModel, activityDefinitions, ...rloArgs }) {
|
|
14625
|
+
super({ backendModel, ...rloArgs });
|
|
13852
14626
|
Object.defineProperty(this, "_activityDefinitions", {
|
|
13853
14627
|
enumerable: true,
|
|
13854
14628
|
configurable: true,
|
|
@@ -13884,9 +14658,8 @@ class ProcessDefinition extends RepositoryLocalObject {
|
|
|
13884
14658
|
* Representing data of a Process History.
|
|
13885
14659
|
*/
|
|
13886
14660
|
class ProcessHistory extends Process {
|
|
13887
|
-
constructor(
|
|
13888
|
-
|
|
13889
|
-
super(Object.assign({ backendModel }, processArgs));
|
|
14661
|
+
constructor({ backendModel, finishReason, finishDate, ...processArgs }) {
|
|
14662
|
+
super({ backendModel, ...processArgs });
|
|
13890
14663
|
Object.defineProperty(this, "_finishReason", {
|
|
13891
14664
|
enumerable: true,
|
|
13892
14665
|
configurable: true,
|
|
@@ -13934,9 +14707,8 @@ class ProcessHistory extends Process {
|
|
|
13934
14707
|
* Represents the data of a Process Instance: a current Process.
|
|
13935
14708
|
*/
|
|
13936
14709
|
class ProcessInstance extends Process {
|
|
13937
|
-
constructor(
|
|
13938
|
-
|
|
13939
|
-
super(Object.assign({ backendModel }, processArgs));
|
|
14710
|
+
constructor({ backendModel, processDefinition, ...processArgs }) {
|
|
14711
|
+
super({ backendModel, ...processArgs });
|
|
13940
14712
|
Object.defineProperty(this, "_processDefinition", {
|
|
13941
14713
|
enumerable: true,
|
|
13942
14714
|
configurable: true,
|
|
@@ -13971,9 +14743,8 @@ class ProcessInstance extends Process {
|
|
|
13971
14743
|
* Represents the data of a Tridion proprietary Activity Definition.
|
|
13972
14744
|
*/
|
|
13973
14745
|
class TridionActivityDefinition extends ActivityDefinition {
|
|
13974
|
-
constructor(
|
|
13975
|
-
|
|
13976
|
-
super(Object.assign({ backendModel }, activityDefinitionArgs));
|
|
14746
|
+
constructor({ backendModel, activityType, finishApprovalStatus, nextActivityDefinitions, ...activityDefinitionArgs }) {
|
|
14747
|
+
super({ backendModel, ...activityDefinitionArgs });
|
|
13977
14748
|
Object.defineProperty(this, "_activityType", {
|
|
13978
14749
|
enumerable: true,
|
|
13979
14750
|
configurable: true,
|
|
@@ -14098,8 +14869,7 @@ class TridionProcessDefinition extends ProcessDefinition {
|
|
|
14098
14869
|
* A Microsoft Visio diagram, or an empty byte array.
|
|
14099
14870
|
*/
|
|
14100
14871
|
get diagram() {
|
|
14101
|
-
|
|
14102
|
-
if ((_a = this._backendModel.Diagram) === null || _a === void 0 ? void 0 : _a.length) {
|
|
14872
|
+
if (this._backendModel.Diagram?.length) {
|
|
14103
14873
|
return this._backendModel.Diagram;
|
|
14104
14874
|
}
|
|
14105
14875
|
return undefined;
|
|
@@ -14290,9 +15060,8 @@ class WorkflowInfo {
|
|
|
14290
15060
|
* Represents the data of a Work Item: the association between an item participating in workflow and an Activity.
|
|
14291
15061
|
*/
|
|
14292
15062
|
class WorkItem extends WorkflowObject {
|
|
14293
|
-
constructor(
|
|
14294
|
-
|
|
14295
|
-
super(Object.assign({ backendModel }, workflowObjectArgs));
|
|
15063
|
+
constructor({ backendModel, activity, owner, process, subject, subjectOwningRepository, ...workflowObjectArgs }) {
|
|
15064
|
+
super({ backendModel, ...workflowObjectArgs });
|
|
14296
15065
|
Object.defineProperty(this, "_activity", {
|
|
14297
15066
|
enumerable: true,
|
|
14298
15067
|
configurable: true,
|
|
@@ -14391,7 +15160,10 @@ const mapWorkflowObjectConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14391
15160
|
const contextRepository = backendModel.ContextRepository
|
|
14392
15161
|
? mappingRegistry.map(backendModel.ContextRepository)
|
|
14393
15162
|
: undefined;
|
|
14394
|
-
return
|
|
15163
|
+
return {
|
|
15164
|
+
...identifiableObjectConstructorArgs,
|
|
15165
|
+
contextRepository,
|
|
15166
|
+
};
|
|
14395
15167
|
};
|
|
14396
15168
|
|
|
14397
15169
|
const mapActivityDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
@@ -14418,14 +15190,16 @@ const mapActivityDefinitionConstructorArgs = (mappingRegistry, backendModel) =>
|
|
|
14418
15190
|
};
|
|
14419
15191
|
};
|
|
14420
15192
|
const activityDefinitionMapping = {
|
|
14421
|
-
identifier: backendModel =>
|
|
15193
|
+
identifier: backendModel => backendModel?.$type === 'ActivityDefinition',
|
|
14422
15194
|
mapper: (mappingRegistry, backendModel) => {
|
|
14423
|
-
return new ActivityDefinition(
|
|
15195
|
+
return new ActivityDefinition({
|
|
15196
|
+
...mapActivityDefinitionConstructorArgs(mappingRegistry, backendModel),
|
|
15197
|
+
backendModel,
|
|
15198
|
+
});
|
|
14424
15199
|
},
|
|
14425
15200
|
};
|
|
14426
15201
|
|
|
14427
15202
|
const mapActivityConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14428
|
-
var _a;
|
|
14429
15203
|
const { contextRepository, applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo, } = mapWorkflowObjectConstructorArgs(mappingRegistry, backendModel);
|
|
14430
15204
|
const assignee = backendModel.Assignee ? mappingRegistry.map(backendModel.Assignee) : undefined;
|
|
14431
15205
|
const owner = backendModel.Owner ? mappingRegistry.map(backendModel.Owner) : undefined;
|
|
@@ -14433,7 +15207,7 @@ const mapActivityConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14433
15207
|
? mappingRegistry.map(backendModel.PrimarySubject)
|
|
14434
15208
|
: undefined;
|
|
14435
15209
|
const process = backendModel.Process ? mappingRegistry.map(backendModel.Process) : undefined;
|
|
14436
|
-
const workItems =
|
|
15210
|
+
const workItems = backendModel.WorkItems?.map(k => mappingRegistry.map(k)).filter(isDefined);
|
|
14437
15211
|
const assignmentDate = backendModel.AssignmentDate ? mapDate(backendModel.AssignmentDate) : undefined;
|
|
14438
15212
|
const dueDate = backendModel.DueDate ? mapDate(backendModel.DueDate) : undefined;
|
|
14439
15213
|
const finishDate = backendModel.FinishDate ? mapDate(backendModel.FinishDate) : undefined;
|
|
@@ -14476,11 +15250,14 @@ const mapActivityHistoryConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14476
15250
|
const approvalStatus = backendModel.ApprovalStatus
|
|
14477
15251
|
? mappingRegistry.map(backendModel.ApprovalStatus)
|
|
14478
15252
|
: undefined;
|
|
14479
|
-
return
|
|
14480
|
-
|
|
15253
|
+
return {
|
|
15254
|
+
...activityConstructorArgs,
|
|
15255
|
+
activityType,
|
|
15256
|
+
approvalStatus,
|
|
15257
|
+
};
|
|
14481
15258
|
};
|
|
14482
15259
|
const activityHistoryMapping = {
|
|
14483
|
-
identifier: backendModel =>
|
|
15260
|
+
identifier: backendModel => backendModel?.$type === 'ActivityHistory',
|
|
14484
15261
|
mapper: (mappingRegistry, backendModel) => {
|
|
14485
15262
|
const { activityType, applicableActions, approvalStatus, assignee, assignmentDate, basicVersionInfo, contextRepository, dueDate, finishDate, id, listLinks, loadInfo, owner, primarySubject, process, securityDescriptor, startDate, suspendDate, workItems, listInfo, } = mapActivityHistoryConstructorArgs(mappingRegistry, backendModel);
|
|
14486
15263
|
return new ActivityHistory({
|
|
@@ -14547,9 +15324,8 @@ const mapActivityStateToBackend = (model) => {
|
|
|
14547
15324
|
};
|
|
14548
15325
|
|
|
14549
15326
|
const mapActivityInstanceConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14550
|
-
var _a;
|
|
14551
15327
|
const activityConstructorArgs = mapActivityConstructorArgs(mappingRegistry, backendModel);
|
|
14552
|
-
const activityConstraints =
|
|
15328
|
+
const activityConstraints = backendModel.ActivityConstraints?.map(c => mapActivityConstraints(c));
|
|
14553
15329
|
const activityDefinition = backendModel.ActivityDefinition
|
|
14554
15330
|
? mappingRegistry.map(backendModel.ActivityDefinition)
|
|
14555
15331
|
: undefined;
|
|
@@ -14561,15 +15337,18 @@ const mapActivityInstanceConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14561
15337
|
const approvalStatus = backendModel.ApprovalStatus
|
|
14562
15338
|
? mappingRegistry.map(backendModel.ApprovalStatus)
|
|
14563
15339
|
: undefined;
|
|
14564
|
-
return
|
|
15340
|
+
return {
|
|
15341
|
+
...activityConstructorArgs,
|
|
15342
|
+
activityConstraints,
|
|
14565
15343
|
activityDefinition,
|
|
14566
15344
|
activityState,
|
|
14567
15345
|
approvalStatus,
|
|
14568
15346
|
processDefinition,
|
|
14569
|
-
workflowType
|
|
15347
|
+
workflowType,
|
|
15348
|
+
};
|
|
14570
15349
|
};
|
|
14571
15350
|
const activityInstanceMapping = {
|
|
14572
|
-
identifier: backendModel =>
|
|
15351
|
+
identifier: backendModel => backendModel?.$type === 'ActivityInstance',
|
|
14573
15352
|
mapper: (mappingRegistry, backendModel) => {
|
|
14574
15353
|
const { activityConstraints, activityDefinition, activityState, applicableActions, approvalStatus, assignee, assignmentDate, basicVersionInfo, contextRepository, dueDate, finishDate, id, listLinks, loadInfo, owner, primarySubject, process, processDefinition, securityDescriptor, startDate, suspendDate, workflowType, workItems, listInfo, } = mapActivityInstanceConstructorArgs(mappingRegistry, backendModel);
|
|
14575
15354
|
return new ActivityInstance({
|
|
@@ -14609,7 +15388,7 @@ const mapFinishActivityResultConstructorArgs = (mappingRegistry, backendModel) =
|
|
|
14609
15388
|
return { nextActivityInstance };
|
|
14610
15389
|
};
|
|
14611
15390
|
const finishActivityResultMapping = {
|
|
14612
|
-
identifier: backendModel =>
|
|
15391
|
+
identifier: backendModel => backendModel?.$type === 'FinishActivityResult',
|
|
14613
15392
|
mapper: (mappingRegistry, backendModel) => {
|
|
14614
15393
|
const { nextActivityInstance } = mapFinishActivityResultConstructorArgs(mappingRegistry, backendModel);
|
|
14615
15394
|
return new FinishActivityResult({ backendModel, nextActivityInstance });
|
|
@@ -14617,13 +15396,15 @@ const finishActivityResultMapping = {
|
|
|
14617
15396
|
};
|
|
14618
15397
|
|
|
14619
15398
|
const mapProcessDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14620
|
-
var _a;
|
|
14621
15399
|
const repositoryLocalObjectConstructorArgs = mapRepositoryLocalObjectConstructorArgs(mappingRegistry, backendModel);
|
|
14622
|
-
const activityDefinitions =
|
|
14623
|
-
return
|
|
15400
|
+
const activityDefinitions = backendModel.ActivityDefinitions?.map(k => mappingRegistry.map(k)).filter(isDefined);
|
|
15401
|
+
return {
|
|
15402
|
+
...repositoryLocalObjectConstructorArgs,
|
|
15403
|
+
activityDefinitions,
|
|
15404
|
+
};
|
|
14624
15405
|
};
|
|
14625
15406
|
const processDefinitionMapping = {
|
|
14626
|
-
identifier: backendModel =>
|
|
15407
|
+
identifier: backendModel => backendModel?.$type === 'ProcessDefinition',
|
|
14627
15408
|
mapper: (mappingRegistry, backendModel) => {
|
|
14628
15409
|
const { activityDefinitions, applicableActions, basicVersionInfo, blueprintInfo, id, isLocked, limitedVersionInfo, listLinks, loadInfo, locationInfo, lockInfo, metadata, metadataSchema, securityDescriptor, listInfo, } = mapProcessDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
14629
15410
|
return new ProcessDefinition({
|
|
@@ -14661,9 +15442,8 @@ const mapProcessFinishReason = (backendModel) => {
|
|
|
14661
15442
|
};
|
|
14662
15443
|
|
|
14663
15444
|
const mapProcessConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14664
|
-
var _a;
|
|
14665
15445
|
const { contextRepository, applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo, } = mapWorkflowObjectConstructorArgs(mappingRegistry, backendModel);
|
|
14666
|
-
const activities =
|
|
15446
|
+
const activities = backendModel.Activities?.map(k => mappingRegistry.map(k)).filter(isDefined);
|
|
14667
15447
|
const creator = backendModel.Creator ? mappingRegistry.map(backendModel.Creator) : undefined;
|
|
14668
15448
|
const subjects = mapLinks(mappingRegistry, backendModel.Subjects);
|
|
14669
15449
|
const workflowType = backendModel.WorkflowType ? mappingRegistry.map(backendModel.WorkflowType) : undefined;
|
|
@@ -14687,11 +15467,14 @@ const mapProcessHistoryConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14687
15467
|
const processConstructorArgs = mapProcessConstructorArgs(mappingRegistry, backendModel);
|
|
14688
15468
|
const finishReason = backendModel.FinishReason ? mapProcessFinishReason(backendModel.FinishReason) : undefined;
|
|
14689
15469
|
const finishDate = backendModel.FinishDate ? mapDate(backendModel.FinishDate) : undefined;
|
|
14690
|
-
return
|
|
14691
|
-
|
|
15470
|
+
return {
|
|
15471
|
+
...processConstructorArgs,
|
|
15472
|
+
finishReason,
|
|
15473
|
+
finishDate,
|
|
15474
|
+
};
|
|
14692
15475
|
};
|
|
14693
15476
|
const processHistoryMapping = {
|
|
14694
|
-
identifier: backendModel =>
|
|
15477
|
+
identifier: backendModel => backendModel?.$type === 'ProcessHistory',
|
|
14695
15478
|
mapper: (mappingRegistry, backendModel) => {
|
|
14696
15479
|
const { activities, applicableActions, basicVersionInfo, contextRepository, creator, finishDate, finishReason, id, listLinks, loadInfo, securityDescriptor, subjects, workflowType, listInfo, } = mapProcessHistoryConstructorArgs(mappingRegistry, backendModel);
|
|
14697
15480
|
return new ProcessHistory({
|
|
@@ -14719,10 +15502,13 @@ const mapProcessInstanceConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14719
15502
|
const processDefinition = backendModel.ProcessDefinition
|
|
14720
15503
|
? mappingRegistry.map(backendModel.ProcessDefinition)
|
|
14721
15504
|
: undefined;
|
|
14722
|
-
return
|
|
15505
|
+
return {
|
|
15506
|
+
...processConstructorArgs,
|
|
15507
|
+
processDefinition,
|
|
15508
|
+
};
|
|
14723
15509
|
};
|
|
14724
15510
|
const processInstanceMapping = {
|
|
14725
|
-
identifier: backendModel =>
|
|
15511
|
+
identifier: backendModel => backendModel?.$type === 'ProcessInstance',
|
|
14726
15512
|
mapper: (mappingRegistry, backendModel) => {
|
|
14727
15513
|
const { activities, applicableActions, basicVersionInfo, contextRepository, creator, id, listLinks, loadInfo, processDefinition, securityDescriptor, subjects, workflowType, listInfo, } = mapProcessInstanceConstructorArgs(mappingRegistry, backendModel);
|
|
14728
15514
|
return new ProcessInstance({
|
|
@@ -14745,23 +15531,25 @@ const processInstanceMapping = {
|
|
|
14745
15531
|
};
|
|
14746
15532
|
|
|
14747
15533
|
const mapTridionActivityDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14748
|
-
var _a, _b, _c;
|
|
14749
15534
|
const activityDefinition = mapActivityDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
14750
15535
|
const activityType = backendModel.ActivityType ? mapActivityType(backendModel.ActivityType) : undefined;
|
|
14751
15536
|
const finishApprovalStatus = backendModel.FinishApprovalStatus
|
|
14752
15537
|
? mappingRegistry.map(backendModel.FinishApprovalStatus)
|
|
14753
15538
|
: undefined;
|
|
14754
|
-
const activityDefinitionsToHide = new Set(
|
|
14755
|
-
const filteredActivityDefinitions =
|
|
15539
|
+
const activityDefinitionsToHide = new Set(backendModel.ExtensionProperties?.['tm_ActivityTransitionsToHide']?.split(',') || []);
|
|
15540
|
+
const filteredActivityDefinitions = backendModel.NextActivityDefinitions?.filter(activityDefinition => {
|
|
14756
15541
|
return !activityDefinitionsToHide.has(activityDefinition.IdRef);
|
|
14757
15542
|
});
|
|
14758
15543
|
const nextActivityDefinitions = mapLinks(mappingRegistry, filteredActivityDefinitions);
|
|
14759
|
-
return
|
|
15544
|
+
return {
|
|
15545
|
+
...activityDefinition,
|
|
15546
|
+
activityType,
|
|
14760
15547
|
finishApprovalStatus,
|
|
14761
|
-
nextActivityDefinitions
|
|
15548
|
+
nextActivityDefinitions,
|
|
15549
|
+
};
|
|
14762
15550
|
};
|
|
14763
15551
|
const tridionActivityDefinitionMapping = {
|
|
14764
|
-
identifier: backendModel =>
|
|
15552
|
+
identifier: backendModel => backendModel?.$type === 'TridionActivityDefinition',
|
|
14765
15553
|
mapper: (mappingRegistry, backendModel) => {
|
|
14766
15554
|
const { activityConstraints, activityType, applicableActions, assignee, basicVersionInfo, contextRepository, finishApprovalStatus, id, listLinks, loadInfo, nextActivityDefinitions, processDefinition, securityDescriptor, listInfo, } = mapTridionActivityDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
14767
15555
|
return new TridionActivityDefinition({
|
|
@@ -14786,10 +15574,10 @@ const tridionActivityDefinitionMapping = {
|
|
|
14786
15574
|
|
|
14787
15575
|
const mapTridionProcessDefinitionConstructorArgs = (mappingRegistry, backendModel) => {
|
|
14788
15576
|
const processDefinitionArgs = mapProcessDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
14789
|
-
return
|
|
15577
|
+
return { ...processDefinitionArgs };
|
|
14790
15578
|
};
|
|
14791
15579
|
const tridionProcessDefinitionMapping = {
|
|
14792
|
-
identifier: backendModel =>
|
|
15580
|
+
identifier: backendModel => backendModel?.$type === 'TridionProcessDefinition',
|
|
14793
15581
|
mapper: (mappingRegistry, backendModel) => {
|
|
14794
15582
|
const { activityDefinitions, applicableActions, id, isLocked, listLinks, loadInfo, securityDescriptor, basicVersionInfo, limitedVersionInfo, blueprintInfo, locationInfo, lockInfo, metadata, metadataSchema, listInfo, } = mapTridionProcessDefinitionConstructorArgs(mappingRegistry, backendModel);
|
|
14795
15583
|
return new TridionProcessDefinition({
|
|
@@ -14848,7 +15636,7 @@ const mapWorkflowInfoConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14848
15636
|
};
|
|
14849
15637
|
};
|
|
14850
15638
|
const workflowInfoMapping = {
|
|
14851
|
-
identifier: backendModel =>
|
|
15639
|
+
identifier: backendModel => backendModel?.$type === 'WorkflowInfo',
|
|
14852
15640
|
mapper: (mappingRegistry, backendModel) => {
|
|
14853
15641
|
const { activityConstraints, activityInstance, activityState, assignee, assignmentDate, creationDate, dueDate, finishDate, performer, processInstance, startDate, } = mapWorkflowInfoConstructorArgs(mappingRegistry, backendModel);
|
|
14854
15642
|
return new WorkflowInfo({
|
|
@@ -14877,14 +15665,17 @@ const mapWorkflowItemConstructorArgs = (mappingRegistry, backendModel) => {
|
|
|
14877
15665
|
const subjectOwningRepository = backendModel.SubjectOwningRepository
|
|
14878
15666
|
? mappingRegistry.map(backendModel.SubjectOwningRepository)
|
|
14879
15667
|
: undefined;
|
|
14880
|
-
return
|
|
15668
|
+
return {
|
|
15669
|
+
...workflowObjectConstructorArgs,
|
|
15670
|
+
activity,
|
|
14881
15671
|
owner,
|
|
14882
15672
|
process,
|
|
14883
15673
|
subject,
|
|
14884
|
-
subjectOwningRepository
|
|
15674
|
+
subjectOwningRepository,
|
|
15675
|
+
};
|
|
14885
15676
|
};
|
|
14886
15677
|
const workflowItemMapping = {
|
|
14887
|
-
identifier: backendModel =>
|
|
15678
|
+
identifier: backendModel => backendModel?.$type === 'WorkItem',
|
|
14888
15679
|
mapper: (mappingRegistry, backendModel) => {
|
|
14889
15680
|
const { activity, contextRepository, owner, process, subject, subjectOwningRepository, applicableActions, basicVersionInfo, id, listLinks, loadInfo, securityDescriptor, listInfo, } = mapWorkflowItemConstructorArgs(mappingRegistry, backendModel);
|
|
14890
15681
|
return new WorkItem({
|
|
@@ -14945,6 +15736,7 @@ const registerMappings = (mappingRegistry) => {
|
|
|
14945
15736
|
mappingRegistry.register(fullVersionInfoMapping);
|
|
14946
15737
|
mappingRegistry.register(groupMembershipMapping);
|
|
14947
15738
|
mappingRegistry.register(hateoasLinkMapping);
|
|
15739
|
+
mappingRegistry.register(identifiableTranslationJobMapping);
|
|
14948
15740
|
mappingRegistry.register(keywordCategoryMapping);
|
|
14949
15741
|
mappingRegistry.register(keywordFieldDefinitionMapping);
|
|
14950
15742
|
mappingRegistry.register(keywordMapping);
|
|
@@ -14974,6 +15766,7 @@ const registerMappings = (mappingRegistry) => {
|
|
|
14974
15766
|
mappingRegistry.register(publishTransactionListInfoMapping);
|
|
14975
15767
|
mappingRegistry.register(publishTransactionsCreationResultMapping);
|
|
14976
15768
|
mappingRegistry.register(publishUrlInfoMapping);
|
|
15769
|
+
mappingRegistry.register(renderedItemMapping);
|
|
14977
15770
|
mappingRegistry.register(repositoryMapping);
|
|
14978
15771
|
mappingRegistry.register(resolvedItemMapping);
|
|
14979
15772
|
mappingRegistry.register(resolveInstructionMapping);
|
|
@@ -15003,6 +15796,7 @@ const registerMappings = (mappingRegistry) => {
|
|
|
15003
15796
|
mappingRegistry.register(translationJobInfoMapping);
|
|
15004
15797
|
mappingRegistry.register(translationJobItemMapping);
|
|
15005
15798
|
mappingRegistry.register(translationJobMapping);
|
|
15799
|
+
mappingRegistry.register(translationResolvedItemMapping);
|
|
15006
15800
|
mappingRegistry.register(translationTargetPublicationMapping);
|
|
15007
15801
|
mappingRegistry.register(translationWorkflowStatusMapping);
|
|
15008
15802
|
mappingRegistry.register(tridionActivityDefinitionMapping);
|
|
@@ -15019,6 +15813,7 @@ const registerMappings = (mappingRegistry) => {
|
|
|
15019
15813
|
mappingRegistry.register(workflowInfoMapping);
|
|
15020
15814
|
mappingRegistry.register(workflowItemMapping);
|
|
15021
15815
|
mappingRegistry.register(xhtmlFieldDefinitionMapping);
|
|
15816
|
+
mappingRegistry.register(settingsMapping);
|
|
15022
15817
|
};
|
|
15023
15818
|
|
|
15024
15819
|
const mappingRegistry = new MappingRegistry();
|
|
@@ -15031,7 +15826,7 @@ const tryMapToModel = (backendItem) => {
|
|
|
15031
15826
|
const mapToModel = (backendItem) => {
|
|
15032
15827
|
const model = tryMapToModel(backendItem);
|
|
15033
15828
|
if (!model) {
|
|
15034
|
-
throw new Error(`Unknown model type: ${backendItem
|
|
15829
|
+
throw new Error(`Unknown model type: ${backendItem?.$type}`);
|
|
15035
15830
|
}
|
|
15036
15831
|
return model;
|
|
15037
15832
|
};
|
|
@@ -15140,17 +15935,16 @@ const linkGraphNodes$1 = (graph, backendNodes) => {
|
|
|
15140
15935
|
* Connect repositoryLocalObjects inside every node with each other (shared/localized from etc.)
|
|
15141
15936
|
*/
|
|
15142
15937
|
const linkItems = (graph) => {
|
|
15143
|
-
var _a, _b, _c, _d, _e;
|
|
15144
15938
|
for (const node of graph.nodes) {
|
|
15145
15939
|
if (!isRloNode(node))
|
|
15146
15940
|
continue;
|
|
15147
|
-
if (
|
|
15941
|
+
if (node.data.item.blueprintInfo?.isShared || node.data.item.blueprintInfo?.isLocalized) {
|
|
15148
15942
|
for (const ancestor of graph.ancestorsByPriority(node.id)) {
|
|
15149
15943
|
if (!isRloNode(ancestor.node))
|
|
15150
15944
|
continue;
|
|
15151
|
-
if (
|
|
15152
|
-
(!
|
|
15153
|
-
!
|
|
15945
|
+
if (ancestor.node.data.item.blueprintInfo?.isLocalized ||
|
|
15946
|
+
(!ancestor.node.data.item.blueprintInfo?.isShared &&
|
|
15947
|
+
!ancestor.node.data.item.blueprintInfo?.isLocalized)) {
|
|
15154
15948
|
const nodeData = node.data;
|
|
15155
15949
|
const ancestorNodeData = ancestor.node.data;
|
|
15156
15950
|
nodeData.linkSourceItem(ancestorNodeData);
|
|
@@ -15452,6 +16246,7 @@ const itemLinkTypes = [
|
|
|
15452
16246
|
'user',
|
|
15453
16247
|
'userGroup',
|
|
15454
16248
|
'virtualFolder',
|
|
16249
|
+
'translationJob',
|
|
15455
16250
|
];
|
|
15456
16251
|
const itemLinkType = createEnumObject(itemLinkTypes);
|
|
15457
16252
|
const itemTypes = [
|
|
@@ -15466,12 +16261,11 @@ const itemTypes = [
|
|
|
15466
16261
|
const itemType = createEnumObject(itemTypes);
|
|
15467
16262
|
|
|
15468
16263
|
const getItemContainerId = (item) => {
|
|
15469
|
-
|
|
15470
|
-
if (item instanceof Keyword && ((_a = item.parentKeywords) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
16264
|
+
if (item instanceof Keyword && item.parentKeywords?.length) {
|
|
15471
16265
|
return item.parentKeywords[0].idRef;
|
|
15472
16266
|
}
|
|
15473
16267
|
if (item instanceof RepositoryLocalObject) {
|
|
15474
|
-
return
|
|
16268
|
+
return item.locationInfo?.organizationalItem?.idRef || item.locationInfo?.contextRepository?.idRef;
|
|
15475
16269
|
}
|
|
15476
16270
|
return undefined;
|
|
15477
16271
|
};
|
|
@@ -15537,6 +16331,12 @@ const getItemLinkType = (itemLink) => {
|
|
|
15537
16331
|
return 'externalKeyword';
|
|
15538
16332
|
}
|
|
15539
16333
|
}
|
|
16334
|
+
if (itemLink.idRef instanceof TmUri) {
|
|
16335
|
+
switch (itemLink.idRef.itemType) {
|
|
16336
|
+
case 'translationJob':
|
|
16337
|
+
return 'translationJob';
|
|
16338
|
+
}
|
|
16339
|
+
}
|
|
15540
16340
|
if (itemLink.idRef instanceof VirtualUri) {
|
|
15541
16341
|
switch (itemLink.idRef.itemType) {
|
|
15542
16342
|
case 'businessProcessTypes':
|
|
@@ -15609,7 +16409,11 @@ const getItemType = (item) => {
|
|
|
15609
16409
|
return 'publication';
|
|
15610
16410
|
if (isExactInstanceOf(item, TemplateBuildingBlock))
|
|
15611
16411
|
return 'templateBuildingBlock';
|
|
16412
|
+
if (isExactInstanceOf(item, TranslationJob))
|
|
16413
|
+
return 'translationJob';
|
|
16414
|
+
if (isExactInstanceOf(item, IdentifiableTranslationJob))
|
|
16415
|
+
return 'translationJob';
|
|
15612
16416
|
return undefined;
|
|
15613
16417
|
};
|
|
15614
16418
|
|
|
15615
|
-
export { AccessControlEntry, AccessControlList, AccessToken, Activity, ActivityDefinition, ActivityHistory, ActivityInstance, ApiError, ApprovalStatus, BasicVersionInfo, Batch, BatchOperation, BinaryContent, BlueprintGraph, BlueprintGraphNode, BlueprintInfo, Bundle, BusinessProcessType, BusinessProcessTypes, ClaimMapping, ClassificationDetail, ClassificationInfo, Component, ComponentBase, ComponentLinkFieldDefinition, ComponentPresentation, ComponentTemplate, DateFieldDefinition, DateListDefinition, DependencyGraphNode, DynamicVersionInfo, EclUri, EmbeddedRegion, EmbeddedSchemaFieldDefinition, ExternalContainer, ExternalKeyword, ExternalKeywordCategory, ExternalLinkFieldDefinition, ExternalMultimediaComponent, ExternalVersionInfo, FinishActivityResult, Folder, FormattingFeatures, FullVersionInfo, GroupMembership, HateoasLink, IdentifiableObject, ItemBlueprintHierarchy, ItemBlueprintRloNodeData, ItemFieldDefinition, ItemPublishableFieldDefinition, Keyword, KeywordCategory, KeywordFieldDefinition, LimitedVersionInfo, Link, LinkWithIsEditable, ListDefinition, LoadInfo, LocationInfo, LockInfo, MultiLineTextFieldDefinition, MultimediaComponent, MultimediaLinkFieldDefinition, MultimediaType, NumberFieldDefinition, NumberListDefinition, OrganizationalItem, Page, PageTemplate, Process, ProcessDefinition, ProcessHistory, ProcessInstance, ProcessedItem, Publication, PublicationBlueprintHierarchy, PublishContext, PublishInfo, PublishInstruction, PublishInstructionBase, PublishLocationInfo, PublishTransaction, PublishTransactionListInfo, PublishTransactionsCreationResult, PublishUrlInfo, PublishingTarget, Region, Repository, RepositoryLocalObject, ResolveInstruction, ResolveInstructionBase, ResolvedItem, Schema, SearchFolder, SecurityDescriptor, SingleLineTextFieldDefinition, SingleLineTextListDefinition, StructureGroup, SynchronizationAction, SynchronizationResult, SystemPrivilege, SystemWideObject, TargetGroup, TargetGroupCondition, TargetLanguage, TargetType, Taxonomies, TcmUri, Template, TemplateBuildingBlock, TextFieldDefinition, TmsLanguage, TmsWorkflow, TmsWorkflowStep, TranslationDetails, TranslationErrorDetails, TranslationExceptionDetails, TranslationInfo, TranslationJob, TranslationJobInfo, TranslationJobItem, TranslationTargetPublication, TranslationWorkflowStatus, TridionActivityDefinition, TridionProcessDefinition, Trustee, UnpublishInstruction, User, UserFavoriteLink, UserGroup, UserLocaleInfo, UserPreferences, UserProfile, UserRuntimeInfo, ValidationApiError, ValidationError, ValidationResult, ValidationWarning, VersionedItem, VirtualFolder, VirtualUri, WhereUsedListInfo, WorkItem, WorkflowInfo, WorkflowObject, XhtmlFieldDefinition, applicableActions, configureLocale, createBackendBusinessProcessTypes, createBackendHateoasLink, createBackendLink, createBackendTaxonomies, determineBatchStatus, getItemContainerId, getItemLinkType, getItemType, isRloNode, itemLinkType, itemLinkTypes, itemType, itemTypes, listLinks, mapActivityStateToBackend, mapBatchOperationState, mapDependencyDirectionToBackend, mapErrorTypeToBackend, mapListDetailsLevelToBackend, mapLoadInfoStateToBackend, mapLockTypeToBackend, mapPublishPriorityToBackend, mapPublishTransactionStateToBackend, mapRetrieveReasonToBackend, mapRloItemTypeToBackend, mapSchemaPurposeBackend, mapSearchBlueprintStatus, mapSearchBlueprintStatusToBackend, mapStringSearchModeToBackend, mapStructureResolveOptionToBackend, mapSynchronizeFlagsToBackend, mapToModel, mapToModels, mapTranslationErrorSeverityToBackend, mapTranslationJobPriorityToBackend, mapTranslationJobStateToBackend, mapTranslationJobTypeToBackend, mapTranslationStatusToBackend, parseItemUri, tryMapToModel, tryParseItemUri };
|
|
16419
|
+
export { AccessControlEntry, AccessControlList, AccessToken, Activity, ActivityDefinition, ActivityHistory, ActivityInstance, ApiError, ApprovalStatus, BasicVersionInfo, Batch, BatchOperation, BinaryContent, BlueprintGraph, BlueprintGraphNode, BlueprintInfo, Bundle, BusinessProcessType, BusinessProcessTypes, ClaimMapping, ClassificationDetail, ClassificationInfo, Component, ComponentBase, ComponentLinkFieldDefinition, ComponentPresentation, ComponentTemplate, DateFieldDefinition, DateListDefinition, DependencyGraphNode, DynamicVersionInfo, EclUri, EmbeddedRegion, EmbeddedSchemaFieldDefinition, ExternalContainer, ExternalKeyword, ExternalKeywordCategory, ExternalLinkFieldDefinition, ExternalMultimediaComponent, ExternalVersionInfo, FinishActivityResult, Folder, FormattingFeatures, FullVersionInfo, GroupMembership, HateoasLink, IdentifiableObject, IdentifiableTranslationJob, ItemBlueprintHierarchy, ItemBlueprintRloNodeData, ItemFieldDefinition, ItemPublishableFieldDefinition, Keyword, KeywordCategory, KeywordFieldDefinition, LimitedVersionInfo, Link, LinkWithIsEditable, ListDefinition, LoadInfo, LocationInfo, LockInfo, MultiLineTextFieldDefinition, MultimediaComponent, MultimediaLinkFieldDefinition, MultimediaType, NumberFieldDefinition, NumberListDefinition, OrganizationalItem, Page, PageTemplate, Process, ProcessDefinition, ProcessHistory, ProcessInstance, ProcessedItem, Publication, PublicationBlueprintHierarchy, PublishContext, PublishInfo, PublishInstruction, PublishInstructionBase, PublishLocationInfo, PublishTransaction, PublishTransactionListInfo, PublishTransactionsCreationResult, PublishUrlInfo, PublishingTarget, Region, RenderedItem, Repository, RepositoryLocalObject, ResolveInstruction, ResolveInstructionBase, ResolvedItem, Schema, SearchFolder, SecurityDescriptor, Settings, SingleLineTextFieldDefinition, SingleLineTextListDefinition, StructureGroup, SynchronizationAction, SynchronizationResult, SystemPrivilege, SystemWideObject, TargetGroup, TargetGroupCondition, TargetLanguage, TargetType, Taxonomies, TcmUri, Template, TemplateBuildingBlock, TextFieldDefinition, TmUri, TmsLanguage, TmsWorkflow, TmsWorkflowStep, TranslationDetails, TranslationErrorDetails, TranslationExceptionDetails, TranslationInfo, TranslationJob, TranslationJobInfo, TranslationJobItem, TranslationResolvedItem, TranslationTargetPublication, TranslationWorkflowStatus, TridionActivityDefinition, TridionProcessDefinition, Trustee, UnpublishInstruction, User, UserFavoriteLink, UserGroup, UserLocaleInfo, UserPreferences, UserProfile, UserRuntimeInfo, ValidationApiError, ValidationError, ValidationResult, ValidationWarning, VersionedItem, VirtualFolder, VirtualUri, WhereUsedListInfo, WorkItem, WorkflowInfo, WorkflowObject, XhtmlFieldDefinition, applicableActions, configureLocale, createBackendBusinessProcessTypes, createBackendHateoasLink, createBackendLink, createBackendTaxonomies, determineBatchStatus, getItemContainerId, getItemLinkType, getItemType, isRloNode, itemLinkType, itemLinkTypes, itemType, itemTypes, listLinks, mapActivityStateToBackend, mapBatchOperationState, mapDependencyDirectionToBackend, mapErrorTypeToBackend, mapListDetailsLevelToBackend, mapLoadInfoStateToBackend, mapLockTypeToBackend, mapPublishPriorityToBackend, mapPublishTransactionStateToBackend, mapRetrieveReasonToBackend, mapRloItemTypeToBackend, mapSchemaPurposeBackend, mapSearchBlueprintStatus, mapSearchBlueprintStatusToBackend, mapStringSearchModeToBackend, mapStructureResolveOptionToBackend, mapSynchronizeFlagsToBackend, mapToModel, mapToModels, mapTranslationErrorSeverityToBackend, mapTranslationJobPriorityToBackend, mapTranslationJobStateToBackend, mapTranslationJobTypeToBackend, mapTranslationStatusToBackend, parseItemUri, tryMapToModel, tryParseItemUri };
|