@solidpepper/solidpepper-service 1.0.6 → 1.0.8

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
  }
@@ -3641,6 +3642,23 @@ class SkusService {
3641
3642
  return this.http.get(this._settingsService.getSettings('apiUrl') + 'SkusArchive/filters', { headers });
3642
3643
  }
3643
3644
  }
3645
+ getSkuFilterFields(categoryGuid = '', archive = false) {
3646
+ let headers = this._settingsService.getHeaders();
3647
+ const controller = archive
3648
+ ? 'SkusArchive'
3649
+ : 'Skus';
3650
+ let url = this._settingsService.getSettings('apiUrl') +
3651
+ controller +
3652
+ '/filters?allFields=true';
3653
+ if (categoryGuid) {
3654
+ url +=
3655
+ '&categoryGuid=' +
3656
+ encodeURIComponent(categoryGuid);
3657
+ }
3658
+ return this.http.get(url, {
3659
+ headers
3660
+ });
3661
+ }
3644
3662
  getSkuGroups(start, limit, filters) {
3645
3663
  let headers = this._settingsService.getHeaders();
3646
3664
  if (filters) {
@@ -5331,6 +5349,13 @@ class AttributesService {
5331
5349
  'Attributes/groups/' +
5332
5350
  attributeGroupGuid, { headers });
5333
5351
  }
5352
+ getMediaSystemFields() {
5353
+ const headers = this._settingsService.getHeaders();
5354
+ return this.http.get(this._settingsService.getSettings('apiUrl') +
5355
+ 'Attributes/media/systemfields', {
5356
+ headers
5357
+ });
5358
+ }
5334
5359
  /* ========================================================================
5335
5360
  CREATE
5336
5361
  ======================================================================== */
@@ -6159,6 +6184,10 @@ class DamAssetsService {
6159
6184
  this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
6160
6185
  }));
6161
6186
  }
6187
+ migrate(type) {
6188
+ const headers = this._settingsService.getHeaders();
6189
+ return this.http.post(this._settingsService.getSettings('apiUrl') + 'Dam/migrate', { type }, { headers });
6190
+ }
6162
6191
  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
6192
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DamAssetsService, providedIn: 'root' }); }
6164
6193
  }
@@ -8365,6 +8394,25 @@ class PublicationsService {
8365
8394
  /* ========================================================================
8366
8395
  GET
8367
8396
  ======================================================================== */
8397
+ getFlipbookInfo(publicationGuid, documentGuid, alias) {
8398
+ const baseUrl = this._settingsService.getSettings('apiUrl')?.replace(/\/$/, '') || '';
8399
+ let url = `${baseUrl}/Dam/flipbook`;
8400
+ const params = [];
8401
+ if (publicationGuid) {
8402
+ params.push(`publicationGuid=${publicationGuid}`);
8403
+ }
8404
+ else if (documentGuid) {
8405
+ params.push(`documentGuid=${documentGuid}`);
8406
+ }
8407
+ const resolvedAlias = alias || this._settingsService.getAlias();
8408
+ if (resolvedAlias) {
8409
+ params.push(`alias=${resolvedAlias}`);
8410
+ }
8411
+ if (params.length > 0) {
8412
+ url += `?${params.join('&')}`;
8413
+ }
8414
+ return this.http.get(url);
8415
+ }
8368
8416
  //Is present in this page
8369
8417
  isPresent(publicationGuid, publicationDataReference, isSku) {
8370
8418
  let headers = this._settingsService.getHeaders();
@@ -8771,6 +8819,25 @@ class PublicationsService {
8771
8819
  }
8772
8820
  }));
8773
8821
  }
8822
+ // Copy a page and its content from source publication to target publication
8823
+ copyPublicationPage(sourcePublicationGuid, sourcePageId, targetPublicationGuid, targetOrder = 0, name) {
8824
+ let headers = this._settingsService.getHeaders();
8825
+ let options = { headers: headers };
8826
+ const payload = {
8827
+ sourcePublicationGuid,
8828
+ sourcePageId,
8829
+ targetPublicationGuid,
8830
+ targetOrder,
8831
+ name: name || '',
8832
+ };
8833
+ return this.http
8834
+ .post(this._settingsService.getSettings('apiUrl') + 'Publications/pages/copy', payload, options)
8835
+ .pipe(finalize(() => {
8836
+ if (this._webSocket.connection?.state === HubConnectionState.Connected) {
8837
+ this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
8838
+ }
8839
+ }));
8840
+ }
8774
8841
  //update publication field
8775
8842
  updatePublicationField(publicationGuid, fieldName, fieldValue) {
8776
8843
  let headers = this._settingsService.getHeaders();