@solidpepper/solidpepper-service 1.0.5 → 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
|
}
|
|
@@ -6447,7 +6452,7 @@ class UsersService {
|
|
|
6447
6452
|
/* ========================================================================
|
|
6448
6453
|
CREATE
|
|
6449
6454
|
======================================================================== */
|
|
6450
|
-
createUser(login, password, profileguid, language, active, email) {
|
|
6455
|
+
createUser(login, password, profileguid, language, active, email, firstName = '', lastName = '') {
|
|
6451
6456
|
let headers = this._settingsService.getHeaders();
|
|
6452
6457
|
let options = { headers: headers };
|
|
6453
6458
|
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Users', {
|
|
@@ -6457,6 +6462,8 @@ class UsersService {
|
|
|
6457
6462
|
userLanguage: language,
|
|
6458
6463
|
userIsActive: active,
|
|
6459
6464
|
userEmail: email,
|
|
6465
|
+
userFirstName: firstName,
|
|
6466
|
+
userLastName: lastName,
|
|
6460
6467
|
}, options);
|
|
6461
6468
|
}
|
|
6462
6469
|
uploadProfilePicture(formData, login) {
|
|
@@ -8363,6 +8370,25 @@ class PublicationsService {
|
|
|
8363
8370
|
/* ========================================================================
|
|
8364
8371
|
GET
|
|
8365
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
|
+
}
|
|
8366
8392
|
//Is present in this page
|
|
8367
8393
|
isPresent(publicationGuid, publicationDataReference, isSku) {
|
|
8368
8394
|
let headers = this._settingsService.getHeaders();
|
|
@@ -8769,6 +8795,25 @@ class PublicationsService {
|
|
|
8769
8795
|
}
|
|
8770
8796
|
}));
|
|
8771
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
|
+
}
|
|
8772
8817
|
//update publication field
|
|
8773
8818
|
updatePublicationField(publicationGuid, fieldName, fieldValue) {
|
|
8774
8819
|
let headers = this._settingsService.getHeaders();
|