intelica-library-components 1.1.88 → 1.1.89
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.
|
@@ -10778,29 +10778,32 @@ class NotificationService {
|
|
|
10778
10778
|
http;
|
|
10779
10779
|
configService = inject(ConfigService);
|
|
10780
10780
|
path = `${this.configService.environment?.notificationsPath}/Notifications`;
|
|
10781
|
-
|
|
10781
|
+
/*
|
|
10782
|
+
private readonly defaultHeaders = new HttpHeaders({
|
|
10782
10783
|
refreshtoken: "f06c110a-ea4e-44a9-896f-210f3b387e57",
|
|
10783
10784
|
languagecode: "EN",
|
|
10784
10785
|
pageRoot: "",
|
|
10785
|
-
authorization:
|
|
10786
|
+
authorization:
|
|
10787
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmVmZXJyZWRfdXNlcm5hbWUiOiJBbGV4YW5kZXIiLCJmdWxsTmFtZSI6IkFsZXhhbmRlciBUb3JyZSIsInN1YiI6Ijg3ZTQxYzZlLWNmN2EtNDk4MC05YTQ1LThjZjllNWMwOGMzZCIsImVtYWlsIjoiam9oYW4uY2FyYm9uZWxAaW50ZWxpY2EuY29tIiwiYnVzaW5lc3NVc2VyQ2xpZW50R3JvdXBJRCI6ImNlMjE5NDAyLWQyMDAtNGU1Yy1iNzE0LWJkNDJiMjZhNzNkNSIsImJhbmtzSUQiOiJnUlZPUEt6V3BNbHQ2NFE3OWdDcUxlQ1pFeWp2RjVFQVo0TmNMVTQvZlhJMVlvbERPeEFOV0NWTUpFYkJYRDJQUHkvUi8xdDVQVHBFZ08vcFFPcnMwVnNNeWRONkVocEY5MzRCRDJFRXhlelVyakZWWVduWitrcCtObGRLOU56VWg4VjZaRjBVTzEyN0JIaG12aGhUNzZMRm51Zm9nSndUTHVuOW5qMFpEaSsxV3MxTHkzZytzWkNYSVdTelR3QjBEc1g5Y2tXSTJrWmFHeWhHVlFhTlliT3hGYzU5UU9xV0pxQUJqdmVBdFNEaGNQdFZta3RIOXFaaEJ5Tkphdkh5R1pkWWJScXovcUZPOW1HUC92NjVScFZ5djNwejhCZUtvMVlJVW5vSUFqSU9udzRTMEkzcmxaSTNrTExBRFFOdnhBSk81NjgvZTVvdWlVZFd3SDlJd2c9PSIsImlzSW50ZWxpY2EiOiIxIiwiY2xpZW50R3JvdXBJRCI6ImU5ZDc1ODY3LTZkMDQtNGNiMC1iZjMxLTE5MmI5Y2VjMzVkYSIsImNsaWVudElEIjoiMDYzMGU0MDEtMzk1Ny00OTU5LTljYTUtYjM1MGVkNmU5Yjk2IiwiYm5rR3JvdXBJRCI6IjAiLCJpbXJwUHJvamVjdElEIjoiMTAwNjMyIiwiZXhwIjoxNzY4ODU3MTUwLCJpc3MiOiJpbnRlbGljYS5jb20iLCJhdWQiOiJpbnRlbGljYS5jb20ifQ.n0BGAUHrp6BiA_XpgTw6WdresOk_C3aaON7V7AcF5uo",
|
|
10786
10788
|
});
|
|
10789
|
+
*/
|
|
10787
10790
|
constructor(http) {
|
|
10788
10791
|
this.http = http;
|
|
10789
10792
|
}
|
|
10790
10793
|
getUserNotificacions() {
|
|
10791
|
-
return this.http.get(`${this.path}/users/notifications
|
|
10794
|
+
return this.http.get(`${this.path}/users/notifications`);
|
|
10792
10795
|
}
|
|
10793
10796
|
markAsRead(recipientId) {
|
|
10794
|
-
return this.http.put(`${this.path}/users/recipients/${recipientId}/read`, {}
|
|
10797
|
+
return this.http.put(`${this.path}/users/recipients/${recipientId}/read`, {});
|
|
10795
10798
|
}
|
|
10796
10799
|
markAllAsRead() {
|
|
10797
|
-
return this.http.put(`${this.path}/users/recipients/read/all`, {}
|
|
10800
|
+
return this.http.put(`${this.path}/users/recipients/read/all`, {});
|
|
10798
10801
|
}
|
|
10799
10802
|
markAsHidden(recipientId) {
|
|
10800
|
-
return this.http.put(`${this.path}/users/recipients/${recipientId}/hidden`, {}
|
|
10803
|
+
return this.http.put(`${this.path}/users/recipients/${recipientId}/hidden`, {});
|
|
10801
10804
|
}
|
|
10802
10805
|
htmlPreview(request) {
|
|
10803
|
-
return this.http.post(`${this.path}/html/preview`, request, {
|
|
10806
|
+
return this.http.post(`${this.path}/html/preview`, request, { responseType: "text" });
|
|
10804
10807
|
}
|
|
10805
10808
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationService, deps: [{ token: i1$4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10806
10809
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationService, providedIn: "root" });
|
|
@@ -10814,43 +10817,42 @@ class NotificationJobService {
|
|
|
10814
10817
|
http;
|
|
10815
10818
|
configService = inject(ConfigService);
|
|
10816
10819
|
path = `${this.configService.environment?.notificationsPath}/NotificationJobs`;
|
|
10817
|
-
|
|
10820
|
+
/*
|
|
10821
|
+
private readonly defaultHeaders = new HttpHeaders({
|
|
10818
10822
|
refreshtoken: "f06c110a-ea4e-44a9-896f-210f3b387e57",
|
|
10819
10823
|
languagecode: "EN",
|
|
10820
10824
|
pageRoot: "",
|
|
10821
|
-
authorization:
|
|
10825
|
+
authorization:
|
|
10826
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmVmZXJyZWRfdXNlcm5hbWUiOiJBbGV4YW5kZXIiLCJmdWxsTmFtZSI6IkFsZXhhbmRlciBUb3JyZSIsInN1YiI6Ijg3ZTQxYzZlLWNmN2EtNDk4MC05YTQ1LThjZjllNWMwOGMzZCIsImVtYWlsIjoiam9oYW4uY2FyYm9uZWxAaW50ZWxpY2EuY29tIiwiYnVzaW5lc3NVc2VyQ2xpZW50R3JvdXBJRCI6ImNlMjE5NDAyLWQyMDAtNGU1Yy1iNzE0LWJkNDJiMjZhNzNkNSIsImJhbmtzSUQiOiJnUlZPUEt6V3BNbHQ2NFE3OWdDcUxlQ1pFeWp2RjVFQVo0TmNMVTQvZlhJMVlvbERPeEFOV0NWTUpFYkJYRDJQUHkvUi8xdDVQVHBFZ08vcFFPcnMwVnNNeWRONkVocEY5MzRCRDJFRXhlelVyakZWWVduWitrcCtObGRLOU56VWg4VjZaRjBVTzEyN0JIaG12aGhUNzZMRm51Zm9nSndUTHVuOW5qMFpEaSsxV3MxTHkzZytzWkNYSVdTelR3QjBEc1g5Y2tXSTJrWmFHeWhHVlFhTlliT3hGYzU5UU9xV0pxQUJqdmVBdFNEaGNQdFZta3RIOXFaaEJ5Tkphdkh5R1pkWWJScXovcUZPOW1HUC92NjVScFZ5djNwejhCZUtvMVlJVW5vSUFqSU9udzRTMEkzcmxaSTNrTExBRFFOdnhBSk81NjgvZTVvdWlVZFd3SDlJd2c9PSIsImlzSW50ZWxpY2EiOiIxIiwiY2xpZW50R3JvdXBJRCI6ImU5ZDc1ODY3LTZkMDQtNGNiMC1iZjMxLTE5MmI5Y2VjMzVkYSIsImNsaWVudElEIjoiMDYzMGU0MDEtMzk1Ny00OTU5LTljYTUtYjM1MGVkNmU5Yjk2IiwiYm5rR3JvdXBJRCI6IjAiLCJpbXJwUHJvamVjdElEIjoiMTAwNjMyIiwiZXhwIjoxNzY4ODU3MTUwLCJpc3MiOiJpbnRlbGljYS5jb20iLCJhdWQiOiJpbnRlbGljYS5jb20ifQ.n0BGAUHrp6BiA_XpgTw6WdresOk_C3aaON7V7AcF5uo",
|
|
10822
10827
|
});
|
|
10828
|
+
*/
|
|
10823
10829
|
constructor(http) {
|
|
10824
10830
|
this.http = http;
|
|
10825
10831
|
}
|
|
10826
10832
|
createJobNotifications(payload) {
|
|
10827
|
-
return this.http.post(`${this.path}/notifications`, payload, {
|
|
10828
|
-
headers: this.defaultHeaders,
|
|
10829
|
-
});
|
|
10833
|
+
return this.http.post(`${this.path}/notifications`, payload, {});
|
|
10830
10834
|
}
|
|
10831
10835
|
createJob(payload) {
|
|
10832
|
-
return this.http.post(`${this.path}`, payload, {
|
|
10833
|
-
headers: this.defaultHeaders,
|
|
10834
|
-
});
|
|
10836
|
+
return this.http.post(`${this.path}`, payload, {});
|
|
10835
10837
|
}
|
|
10836
10838
|
getJob(jobId) {
|
|
10837
10839
|
return this.http.get(`${this.path}/${jobId}`);
|
|
10838
10840
|
}
|
|
10839
10841
|
createNotifications(jobId, payload) {
|
|
10840
|
-
return this.http.post(`${this.path}/${jobId}/notifications`, payload, {
|
|
10842
|
+
return this.http.post(`${this.path}/${jobId}/notifications`, payload, {});
|
|
10841
10843
|
}
|
|
10842
10844
|
getActiveJob(featureCode, origin) {
|
|
10843
10845
|
let url = `${this.path}/active?featureCode=${encodeURIComponent(featureCode)}`;
|
|
10844
10846
|
if (origin) {
|
|
10845
10847
|
url += `&origin=${encodeURIComponent(origin)}`;
|
|
10846
10848
|
}
|
|
10847
|
-
return this.http.get(url, {
|
|
10849
|
+
return this.http.get(url, {}).pipe(map(list => (Array.isArray(list) && list.length > 0 ? list[0] : null)), catchError(err => {
|
|
10848
10850
|
console.error("Error obteniendo active jobs", err);
|
|
10849
10851
|
return of(null);
|
|
10850
10852
|
}));
|
|
10851
10853
|
}
|
|
10852
10854
|
getRecipients(jobId) {
|
|
10853
|
-
return this.http.get(`${this.path}/${jobId}/recipients`, {
|
|
10855
|
+
return this.http.get(`${this.path}/${jobId}/recipients`, {});
|
|
10854
10856
|
}
|
|
10855
10857
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationJobService, deps: [{ token: i1$4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10856
10858
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotificationJobService, providedIn: "root" });
|