@solidpepper/solidpepper-service 1.0.6 → 1.0.7
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.
|
@@ -1760,7 +1760,7 @@ class CompaniesService {
|
|
|
1760
1760
|
/* ========================================================================
|
|
1761
1761
|
POST
|
|
1762
1762
|
======================================================================== */
|
|
1763
|
-
createCompany(companyName, companyAlias = null, companyLanguage = 'fr') {
|
|
1763
|
+
createCompany(companyName, companyAlias = null, companyLanguage = 'fr', isLearning = false) {
|
|
1764
1764
|
let headers = this._settingsService.getHeaders();
|
|
1765
1765
|
let options = { headers: headers };
|
|
1766
1766
|
return this.http
|
|
@@ -1768,6 +1768,7 @@ class CompaniesService {
|
|
|
1768
1768
|
companyName: companyName,
|
|
1769
1769
|
companyAlias: companyAlias,
|
|
1770
1770
|
companyLanguage: companyLanguage,
|
|
1771
|
+
isLearning: isLearning,
|
|
1771
1772
|
}, options)
|
|
1772
1773
|
.pipe(map((res) => res.success ? res : { success: false, message: 'Error' }));
|
|
1773
1774
|
}
|
|
@@ -6159,6 +6160,10 @@ class DamAssetsService {
|
|
|
6159
6160
|
this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
|
|
6160
6161
|
}));
|
|
6161
6162
|
}
|
|
6163
|
+
migrate(type) {
|
|
6164
|
+
const headers = this._settingsService.getHeaders();
|
|
6165
|
+
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Dam/migrate', { type }, { headers });
|
|
6166
|
+
}
|
|
6162
6167
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DamAssetsService, deps: [{ token: AuthService }, { token: SettingsService }, { token: i1.HttpClient }, { token: websocketService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6163
6168
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DamAssetsService, providedIn: 'root' }); }
|
|
6164
6169
|
}
|
|
@@ -8365,6 +8370,25 @@ class PublicationsService {
|
|
|
8365
8370
|
/* ========================================================================
|
|
8366
8371
|
GET
|
|
8367
8372
|
======================================================================== */
|
|
8373
|
+
getFlipbookInfo(publicationGuid, documentGuid, alias) {
|
|
8374
|
+
const baseUrl = this._settingsService.getSettings('apiUrl')?.replace(/\/$/, '') || '';
|
|
8375
|
+
let url = `${baseUrl}/Dam/flipbook`;
|
|
8376
|
+
const params = [];
|
|
8377
|
+
if (publicationGuid) {
|
|
8378
|
+
params.push(`publicationGuid=${publicationGuid}`);
|
|
8379
|
+
}
|
|
8380
|
+
else if (documentGuid) {
|
|
8381
|
+
params.push(`documentGuid=${documentGuid}`);
|
|
8382
|
+
}
|
|
8383
|
+
const resolvedAlias = alias || this._settingsService.getAlias();
|
|
8384
|
+
if (resolvedAlias) {
|
|
8385
|
+
params.push(`alias=${resolvedAlias}`);
|
|
8386
|
+
}
|
|
8387
|
+
if (params.length > 0) {
|
|
8388
|
+
url += `?${params.join('&')}`;
|
|
8389
|
+
}
|
|
8390
|
+
return this.http.get(url);
|
|
8391
|
+
}
|
|
8368
8392
|
//Is present in this page
|
|
8369
8393
|
isPresent(publicationGuid, publicationDataReference, isSku) {
|
|
8370
8394
|
let headers = this._settingsService.getHeaders();
|
|
@@ -8771,6 +8795,25 @@ class PublicationsService {
|
|
|
8771
8795
|
}
|
|
8772
8796
|
}));
|
|
8773
8797
|
}
|
|
8798
|
+
// Copy a page and its content from source publication to target publication
|
|
8799
|
+
copyPublicationPage(sourcePublicationGuid, sourcePageId, targetPublicationGuid, targetOrder = 0, name) {
|
|
8800
|
+
let headers = this._settingsService.getHeaders();
|
|
8801
|
+
let options = { headers: headers };
|
|
8802
|
+
const payload = {
|
|
8803
|
+
sourcePublicationGuid,
|
|
8804
|
+
sourcePageId,
|
|
8805
|
+
targetPublicationGuid,
|
|
8806
|
+
targetOrder,
|
|
8807
|
+
name: name || '',
|
|
8808
|
+
};
|
|
8809
|
+
return this.http
|
|
8810
|
+
.post(this._settingsService.getSettings('apiUrl') + 'Publications/pages/copy', payload, options)
|
|
8811
|
+
.pipe(finalize(() => {
|
|
8812
|
+
if (this._webSocket.connection?.state === HubConnectionState.Connected) {
|
|
8813
|
+
this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
|
|
8814
|
+
}
|
|
8815
|
+
}));
|
|
8816
|
+
}
|
|
8774
8817
|
//update publication field
|
|
8775
8818
|
updatePublicationField(publicationGuid, fieldName, fieldValue) {
|
|
8776
8819
|
let headers = this._settingsService.getHeaders();
|