@solidpepper/solidpepper-service 1.1.0 → 1.1.2

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.
@@ -1665,6 +1665,12 @@ class ExchangesConfigurationsService {
1665
1665
  overwrite: overwrite,
1666
1666
  }, options);
1667
1667
  }
1668
+ DeleteExchangeConfiguration(exchangeConfigurationGuid) {
1669
+ let headers = this._settings.getHeaders();
1670
+ return this.http.delete(this._settings.getSettings('apiUrl') +
1671
+ 'exchangesconfigurations/' +
1672
+ exchangeConfigurationGuid, { headers });
1673
+ }
1668
1674
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ExchangesConfigurationsService, deps: [{ token: i1.HttpClient }, { token: SettingsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1669
1675
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ExchangesConfigurationsService, providedIn: 'root' }); }
1670
1676
  }
@@ -1720,8 +1726,9 @@ var ModuleType;
1720
1726
  var SubModuleType;
1721
1727
  (function (SubModuleType) {
1722
1728
  // Publications
1729
+ SubModuleType["PUBLICATIONS"] = "Projects";
1723
1730
  SubModuleType["PROJECTS"] = "Projects";
1724
- SubModuleType["DOCUMENTS"] = "Documents";
1731
+ SubModuleType["CATALOGS"] = "Catalogs";
1725
1732
  SubModuleType["MODELS"] = "Models";
1726
1733
  SubModuleType["PUBLICATION_IMPORTS"] = "PublicationImports";
1727
1734
  SubModuleType["PUBLICATION_EXPORTS"] = "PublicationExports";
@@ -2273,6 +2280,12 @@ class MenuService {
2273
2280
  link: '/media/assets-selections',
2274
2281
  icon: 'fas fa-file-zipper',
2275
2282
  };
2283
+ const AssetsConversions = {
2284
+ rights: this.rightsAccesModule['rights']?.['Products']?.['Products']?.['MassUpdate']?.['functionIsActive'] ?? false,
2285
+ text: this.assetsConversionsLabel,
2286
+ link: '/media/conversions',
2287
+ icon: 'fas fa-wand-magic-sparkles',
2288
+ };
2276
2289
  // const WorkFlows = {
2277
2290
  // rights: this.rightsAccesModule['rights']['Workflows']['Workflows']['subModuleIsActive'],
2278
2291
  // text: this.workFlowsLabel,
@@ -2298,6 +2311,7 @@ class MenuService {
2298
2311
  RecentlyDeleted,
2299
2312
  AssetsProfiles,
2300
2313
  AssetsSelections,
2314
+ AssetsConversions,
2301
2315
  // WorkFlows,
2302
2316
  //AssetsOnHold,
2303
2317
  //AssetsFavorites,
@@ -2793,6 +2807,9 @@ class MenuService {
2793
2807
  tr.get('menu.media.ASSETSSELECTION').subscribe((res) => {
2794
2808
  this.assetsSelectionsLabel = res;
2795
2809
  });
2810
+ tr.get('menu.media.CONVERSIONS').subscribe((res) => {
2811
+ this.assetsConversionsLabel = res;
2812
+ });
2796
2813
  tr.get('menu.workflows.WORKFLOWS').subscribe((res) => {
2797
2814
  this.workFlowsLabel = res;
2798
2815
  });
@@ -2937,22 +2954,42 @@ var FunctionType;
2937
2954
  // Documents
2938
2955
  FunctionType["REVIEW"] = "Review";
2939
2956
  // Publications Projects
2940
- FunctionType["ADD_PUBLICATION"] = "AddPublication";
2941
- FunctionType["DELETE_PUBLICATION"] = "DeletePublication";
2942
- FunctionType["DUPLICATE_PUBLICATION"] = "DuplicatePublication";
2943
- FunctionType["RENAME_PUBLICATION"] = "RenamePublication";
2944
- FunctionType["MOVE_PUBLICATION"] = "MovePublication";
2945
- FunctionType["ADD_SECTION"] = "AddSection";
2946
- FunctionType["DELETE_SECTION"] = "DeleteSection";
2947
- FunctionType["ADD_PRODUCTS"] = "AddProducts";
2948
- FunctionType["REMOVE_PRODUCTS"] = "RemoveProducts";
2949
- FunctionType["MOVE_PRODUCTS"] = "MoveProducts";
2957
+ FunctionType["ADD_YOUBOOKY"] = "AddYouBooky";
2958
+ FunctionType["ADD_DOCUMENT"] = "AddDocument";
2959
+ FunctionType["ADD_TECHNICAL_SHEETS"] = "AddTechnicalSheets";
2960
+ FunctionType["ADD_CATALOG"] = "AddCatalog";
2961
+ FunctionType["CONFIGURE_PROJECT"] = "ConfigureProject";
2950
2962
  FunctionType["GENERATE_CATALOG"] = "GenerateCatalog";
2951
2963
  FunctionType["GENERATE_DATA_SHEET"] = "GenerateDataSheet";
2952
- FunctionType["GENERATE_XML"] = "GenerateXML";
2964
+ FunctionType["GENERATE_HD"] = "GenerateHD";
2965
+ FunctionType["GENERATE_CMYK"] = "GenerateCMYK";
2953
2966
  FunctionType["FLIPBOOK"] = "Flipbook";
2954
- FunctionType["PREVIEW"] = "Preview";
2967
+ FunctionType["REVIEWER"] = "Reviewer";
2968
+ FunctionType["MANAGE_FONTS"] = "ManageFonts";
2955
2969
  FunctionType["YOU_BOOKY"] = "YouBooky";
2970
+ // Publications Catalogs
2971
+ FunctionType["AUTO_GENERATION"] = "AutoGeneration";
2972
+ FunctionType["PREVIEW_AUTO_GENERATION"] = "PreviewAutoGeneration";
2973
+ FunctionType["CREATE_VERSION"] = "CreateVersion";
2974
+ FunctionType["GENERATE_XML"] = "GenerateXML";
2975
+ FunctionType["EXPORT_EXCEL_DATA"] = "ExportExcelData";
2976
+ FunctionType["ADD_SECTION"] = "AddSection";
2977
+ FunctionType["DUPLICATE_SECTION"] = "DuplicateSection";
2978
+ FunctionType["CONFIGURE_SECTION"] = "ConfigureSection";
2979
+ FunctionType["DELETE_SECTION"] = "DeleteSection";
2980
+ FunctionType["ADD_PRODUCT"] = "AddProduct";
2981
+ FunctionType["ADD_PRODUCTS"] = "AddProduct";
2982
+ FunctionType["CONFIGURE_PRODUCT"] = "ConfigureProduct";
2983
+ FunctionType["REMOVE_PRODUCT"] = "RemoveProduct";
2984
+ FunctionType["REMOVE_PRODUCTS"] = "RemoveProduct";
2985
+ FunctionType["MOVE_PRODUCTS"] = "MoveProducts";
2986
+ FunctionType["REORDER_PRODUCTS"] = "ReorderProducts";
2987
+ FunctionType["MASS_ADD_PRODUCTS"] = "MassAddProducts";
2988
+ FunctionType["MASS_EXCLUDE_PRODUCTS"] = "MassExcludeProducts";
2989
+ FunctionType["MASS_EDIT_PRICES"] = "MassEditPrices";
2990
+ FunctionType["ADD_LINE_BREAK"] = "AddLineBreak";
2991
+ FunctionType["ADD_PAGE_BREAK"] = "AddPageBreak";
2992
+ FunctionType["ADD_CALLOUT_ELEMENT"] = "AddCalloutElement";
2956
2993
  // Product Sheets (Publication Submodule)
2957
2994
  FunctionType["ADD_PRODUCT_SHEET"] = "AddProductSheet";
2958
2995
  FunctionType["EDIT_PRODUCT_SHEET"] = "EditProductSheet";
@@ -4727,6 +4764,7 @@ class ExportsService {
4727
4764
  channelGuid: exchangeObject.channelGuid,
4728
4765
  exchangeOrder: exchangeObject.exchangeOrder,
4729
4766
  exportColumns: exchangeObject.exportColumns,
4767
+ attributesWithCode: exchangeObject.attributesWithCode
4730
4768
  }, options);
4731
4769
  }
4732
4770
  exportDownloadCate(exchangeObject) {
@@ -12804,7 +12842,10 @@ class GenerationService {
12804
12842
  // CHUNKS
12805
12843
  const CHUNK_SIZE = 5 * 1024 * 1024;
12806
12844
  const totalChunks = Math.ceil(zipBlob.size / CHUNK_SIZE);
12807
- const uploadId = `${objectGeneratePDF.sourceGuid}_${Date.now()}`;
12845
+ const cleanSourceGuid = (objectGeneratePDF.sourceGuid || '')
12846
+ .toString()
12847
+ .replace(/[^a-zA-Z0-9_-]/g, '_');
12848
+ const uploadId = `${cleanSourceGuid}_${Date.now()}`;
12808
12849
  // CHUNKS LOOP
12809
12850
  for (let chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) {
12810
12851
  const start = chunkIndex * CHUNK_SIZE;
@@ -12915,6 +12956,13 @@ class ProductSheetsService {
12915
12956
  'Dam/product-sheets/asset/' +
12916
12957
  assetGuid, { headers });
12917
12958
  }
12959
+ exportProductSheetAsset(assetGuid) {
12960
+ let headers = this._settingsService.getHeaders();
12961
+ return this.http.get(this._settingsService.getSettings('apiUrl') +
12962
+ 'Dam/product-sheets/asset/' +
12963
+ assetGuid +
12964
+ '/export', { headers, responseType: 'blob' });
12965
+ }
12918
12966
  getProductSheetLines(productSheetGuid, start = 0, limit = 10000, summary = false) {
12919
12967
  let headers = this._settingsService.getHeaders();
12920
12968
  return this.http.get(this._settingsService.getSettings('apiUrl') +
@@ -13082,13 +13130,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
13082
13130
  var ProjectType;
13083
13131
  (function (ProjectType) {
13084
13132
  // DEPRECATED
13085
- ProjectType["STATIC"] = "static";
13086
- ProjectType["DYNAMIC"] = "dynamic";
13133
+ ProjectType["STATIC"] = "STATIC";
13134
+ ProjectType["DYNAMIC"] = "DYNAMIC";
13087
13135
  // CURRENT
13088
- ProjectType["YOUBOOKY"] = "youbooky";
13089
- ProjectType["DOCUMENT"] = "document";
13090
- ProjectType["CATALOGUE"] = "catalogue";
13091
- ProjectType["TECHNICAL_SHEET"] = "technicalSheet";
13136
+ ProjectType["YOUBOOKY"] = "YOUBOOKY";
13137
+ ProjectType["DOCUMENT"] = "DOCUMENT";
13138
+ ProjectType["CATALOG"] = "CATALOG";
13139
+ ProjectType["TECHNICAL_SHEET"] = "DATASHEET";
13092
13140
  })(ProjectType || (ProjectType = {}));
13093
13141
 
13094
13142
  class PublicationPage {
@@ -13098,6 +13146,7 @@ class PublicationPage {
13098
13146
  this._name = '';
13099
13147
  this._status = 0; // PageStatus enum: Draft = 0, Waiting = 1, Ready = 2, InProcess = 3
13100
13148
  this._background = '';
13149
+ this._gabarit = '';
13101
13150
  this._order = 0;
13102
13151
  this._modifiedAt = null;
13103
13152
  this._type = 'SKUS';
@@ -13108,6 +13157,7 @@ class PublicationPage {
13108
13157
  this.name = data.name ?? '';
13109
13158
  this.status = data.status ?? 0;
13110
13159
  this.background = data.background ?? '';
13160
+ this.gabarit = data.gabarit ?? '';
13111
13161
  this.order = data.order ?? 0;
13112
13162
  this.modifiedAt = data.modifiedAt ?? null;
13113
13163
  this.type = data.type ?? 'SKUS';
@@ -13144,6 +13194,12 @@ class PublicationPage {
13144
13194
  set background(value) {
13145
13195
  this._background = value || '';
13146
13196
  }
13197
+ get gabarit() {
13198
+ return this._gabarit;
13199
+ }
13200
+ set gabarit(value) {
13201
+ this._gabarit = value || '';
13202
+ }
13147
13203
  get order() {
13148
13204
  return this._order;
13149
13205
  }
@@ -13181,6 +13237,7 @@ class PublicationPage {
13181
13237
  name: this.name,
13182
13238
  status: this.status,
13183
13239
  background: this.background,
13240
+ gabarit: this.gabarit,
13184
13241
  order: this.order,
13185
13242
  modifiedAt: this.modifiedAt,
13186
13243
  type: this.type,
@@ -14489,8 +14546,10 @@ class PublicationsService {
14489
14546
  publicationPriceListGuid: publication.publicationPriceListGuid,
14490
14547
  publicationAccountGuid: publication.publicationAccountGuid,
14491
14548
  publicationLanguage: publication.publicationLanguage,
14549
+ publicationType: publication.publicationType,
14492
14550
  publicationProductSheetGuid: publication.publicationProductSheetGuid,
14493
14551
  publicationProductSheetAssetGuid: publication.publicationProductSheetAssetGuid,
14552
+ publicationPages: publication.publicationPages?.map((p) => typeof p.toJSON === 'function' ? p.toJSON() : p) || [],
14494
14553
  }, options)
14495
14554
  .pipe(finalize(() => {
14496
14555
  if (this._webSocket.connection?.state === HubConnectionState.Connected) {
@@ -15084,6 +15143,31 @@ class PublicationsService {
15084
15143
  this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
15085
15144
  }));
15086
15145
  }
15146
+ // ***********************************************************************************
15147
+ // * DATASHEET / TECHNICAL SHEET
15148
+ // ***********************************************************************************
15149
+ getPublicationDatasheetStatus(publicationGuid, options) {
15150
+ const headers = this._settingsService.getHeaders();
15151
+ const queryParams = [];
15152
+ if (options?.page)
15153
+ queryParams.push(`page=${options.page}`);
15154
+ if (options?.pageSize)
15155
+ queryParams.push(`pageSize=${options.pageSize}`);
15156
+ if (options?.search)
15157
+ queryParams.push(`search=${encodeURIComponent(options.search)}`);
15158
+ if (options?.filterStatus)
15159
+ queryParams.push(`filterStatus=${options.filterStatus}`);
15160
+ if (options?.level)
15161
+ queryParams.push(`level=${options.level}`);
15162
+ const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
15163
+ const url = `${this._settingsService.getSettings('apiUrl')}Publications/${publicationGuid}/datasheet-status${queryString}`;
15164
+ return this.http.get(url, { headers });
15165
+ }
15166
+ checkDatasheetSkuDocumentExists(publicationGuid, sku) {
15167
+ const headers = this._settingsService.getHeaders();
15168
+ const url = `${this._settingsService.getSettings('apiUrl')}Publications/${publicationGuid}/datasheet-sku-exists?sku=${encodeURIComponent(sku)}`;
15169
+ return this.http.get(url, { headers });
15170
+ }
15087
15171
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PublicationsService, deps: [{ token: SettingsService }, { token: i1.HttpClient }, { token: websocketService }], target: i0.ɵɵFactoryTarget.Injectable }); }
15088
15172
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PublicationsService, providedIn: 'root' }); }
15089
15173
  }
@@ -15831,13 +15915,13 @@ class DocumentsService {
15831
15915
  '/' +
15832
15916
  version, { headers });
15833
15917
  }
15834
- createDocument(assetName, folderGuid) {
15918
+ createDocument(assetName, folderGuid, documentType = 'document') {
15835
15919
  let headers = this._settingsService.getHeaders();
15836
15920
  let options = { headers: headers };
15837
15921
  return this.http.post(this._settingsService.getSettings('apiUrl') + 'Dam/documents', {
15838
15922
  documentName: assetName,
15839
15923
  folderGuid: folderGuid,
15840
- documentType: 'document',
15924
+ documentType: documentType,
15841
15925
  }, options);
15842
15926
  }
15843
15927
  duplicateDocument(assetGuid, documentName, publicationGuid, folderGuid) {
@@ -16197,6 +16281,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
16197
16281
  }]
16198
16282
  }], ctorParameters: () => [{ type: SettingsService }, { type: i1.HttpClient }, { type: websocketService }] });
16199
16283
 
16284
+ var AssetType;
16285
+ (function (AssetType) {
16286
+ AssetType["IMAGE"] = "image";
16287
+ AssetType["IMAGE_MULTILANG"] = "imagemultilang";
16288
+ AssetType["AUDIO"] = "audio";
16289
+ AssetType["VIDEO"] = "video";
16290
+ AssetType["FILE"] = "file";
16291
+ AssetType["PRODUCTSHEET"] = "productSheet";
16292
+ AssetType["DATASHEETFILE"] = "datasheetfile";
16293
+ AssetType["YOUBOOKY"] = "youbooky";
16294
+ AssetType["DOCUMENT"] = "document";
16295
+ AssetType["PUBLICATION"] = "publication";
16296
+ AssetType["TEMPLATE"] = "template";
16297
+ AssetType["CALLOUT"] = "callout";
16298
+ AssetType["PROJECT"] = "project";
16299
+ AssetType["FILE_MULTILANG"] = "filemultilang";
16300
+ AssetType["FILE_TRAD"] = "filetrad";
16301
+ AssetType["FILES"] = "files";
16302
+ AssetType["FILES_TRAD"] = "filestrad";
16303
+ })(AssetType || (AssetType = {}));
16304
+
16200
16305
  class DashboardService {
16201
16306
  constructor(_settings, http) {
16202
16307
  this._settings = _settings;
@@ -16361,5 +16466,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
16361
16466
  * Generated bundle index. Do not edit.
16362
16467
  */
16363
16468
 
16364
- export { AccountsService, AllLanguagesService, AttributesService, AuthService, AuthTwoFactorService, BatchService, BomService, BomsitemsService, CataloguesService, CategoriesService, ChannelsService, CmsService, ColorsService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, DashboardService, Document, DocumentCommentService, DocumentsService, EasypiechartDirective, EcoTaxService, ExchangesConfigurationsService, ExportsService, FrameworkagreementsService, FunctionType, GenerationService, ImportsService, InformationsService, LocaleNumberPipe, LoginService, MappingsService, MasksService, MediaSelectionDeclinaisonService, MediaSelectionService, MenuService, ModuleType, NotificationServiceService, OpenAiService, OrdersService, OrganizationsService, PresetsService, PricesTaxService, ProductSheetsService, ProfilesService, ProjectType, PromotionsService, PromptsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, QuotesService, ReportsService, RequestsService, RightsService, RoleService, RouterExtServiceService, RulesCompletenessService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SalersService, SearchDamAssetsService, SearchService, SearchsService, SettingsService, SidebarRightService, SkusDeclinaisonsService, SkusPricesService, SkusService, SkusSuppliersService, SkusTrackingService, StatusService, StocksService, StripeService, SubModuleType, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, UtilsService, ViewsService, WorkflowsDesksService, WorkflowsGlobalStepsService, WorkflowsHistoricalService, WorkflowsRulesService, websocketService };
16469
+ export { AccountsService, AllLanguagesService, AssetType, AttributesService, AuthService, AuthTwoFactorService, BatchService, BomService, BomsitemsService, CataloguesService, CategoriesService, ChannelsService, CmsService, ColorsService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, DashboardService, Document, DocumentCommentService, DocumentsService, EasypiechartDirective, EcoTaxService, ExchangesConfigurationsService, ExportsService, FrameworkagreementsService, FunctionType, GenerationService, ImportsService, InformationsService, LocaleNumberPipe, LoginService, MappingsService, MasksService, MediaSelectionDeclinaisonService, MediaSelectionService, MenuService, ModuleType, NotificationServiceService, OpenAiService, OrdersService, OrganizationsService, PresetsService, PricesTaxService, ProductSheetsService, ProfilesService, ProjectType, PromotionsService, PromptsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, QuotesService, ReportsService, RequestsService, RightsService, RoleService, RouterExtServiceService, RulesCompletenessService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SalersService, SearchDamAssetsService, SearchService, SearchsService, SettingsService, SidebarRightService, SkusDeclinaisonsService, SkusPricesService, SkusService, SkusSuppliersService, SkusTrackingService, StatusService, StocksService, StripeService, SubModuleType, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, UtilsService, ViewsService, WorkflowsDesksService, WorkflowsGlobalStepsService, WorkflowsHistoricalService, WorkflowsRulesService, websocketService };
16365
16470
  //# sourceMappingURL=solidpepper-solidpepper-service.mjs.map