@solidpepper/solidpepper-service 1.0.3 → 1.0.5
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.
|
@@ -99,7 +99,13 @@ class SettingsService {
|
|
|
99
99
|
year: '2019',
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
+
setToken(token) {
|
|
103
|
+
this.customToken = token;
|
|
104
|
+
}
|
|
102
105
|
getToken() {
|
|
106
|
+
if (this.customToken) {
|
|
107
|
+
return this.customToken;
|
|
108
|
+
}
|
|
103
109
|
if (this.tokenGetter) {
|
|
104
110
|
return this.tokenGetter();
|
|
105
111
|
}
|
|
@@ -132,11 +138,14 @@ class SettingsService {
|
|
|
132
138
|
getHeaders() {
|
|
133
139
|
let token = this.getToken();
|
|
134
140
|
let language = this.getLanguage();
|
|
135
|
-
|
|
136
|
-
Authorization: 'Bearer ' + token,
|
|
141
|
+
let headersObj = {
|
|
137
142
|
'Content-Type': 'application/json',
|
|
138
143
|
'Accept-Language': language,
|
|
139
144
|
};
|
|
145
|
+
if (token && token !== 'undefined' && token !== 'null') {
|
|
146
|
+
headersObj['Authorization'] = 'Bearer ' + token;
|
|
147
|
+
}
|
|
148
|
+
this.headers = headersObj;
|
|
140
149
|
return this.headers;
|
|
141
150
|
}
|
|
142
151
|
getPrimoTexto(name) {
|
|
@@ -6431,6 +6440,10 @@ class UsersService {
|
|
|
6431
6440
|
let headers = this._settingsService.getHeaders();
|
|
6432
6441
|
return this.http.get(this._settingsService.getSettings('apiUrl') + 'Users/' + login, { headers });
|
|
6433
6442
|
}
|
|
6443
|
+
getUserAvatar(userGuid) {
|
|
6444
|
+
let headers = this._settingsService.getHeaders();
|
|
6445
|
+
return this.http.get(this._settingsService.getSettings('apiUrl') + 'Users/' + userGuid + '/avatar', { headers });
|
|
6446
|
+
}
|
|
6434
6447
|
/* ========================================================================
|
|
6435
6448
|
CREATE
|
|
6436
6449
|
======================================================================== */
|
|
@@ -6487,15 +6500,50 @@ class UsersService {
|
|
|
6487
6500
|
newPassword: newPassword,
|
|
6488
6501
|
}, options);
|
|
6489
6502
|
}
|
|
6503
|
+
confirmUser(param, alias) {
|
|
6504
|
+
let headers = this._settingsService.getHeaders();
|
|
6505
|
+
let options = { headers: headers };
|
|
6506
|
+
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Users/confirm-account', {
|
|
6507
|
+
parameter: param,
|
|
6508
|
+
alias: alias,
|
|
6509
|
+
}, options);
|
|
6510
|
+
}
|
|
6511
|
+
forgotPassword(login, alias, isStudio) {
|
|
6512
|
+
let headers = this._settingsService.getHeaders();
|
|
6513
|
+
let options = { headers: headers };
|
|
6514
|
+
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Users/forgotpassword', {
|
|
6515
|
+
login: login,
|
|
6516
|
+
alias: alias,
|
|
6517
|
+
isStudio: isStudio,
|
|
6518
|
+
initPassword: false
|
|
6519
|
+
}, options);
|
|
6520
|
+
}
|
|
6521
|
+
checkForgotPassword(param, alias) {
|
|
6522
|
+
let headers = this._settingsService.getHeaders();
|
|
6523
|
+
let options = { headers: headers };
|
|
6524
|
+
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Users/forgotpassword/check', {
|
|
6525
|
+
parameter: param,
|
|
6526
|
+
alias: alias,
|
|
6527
|
+
}, options);
|
|
6528
|
+
}
|
|
6529
|
+
changeForgotenPassword(param, alias, newPassword) {
|
|
6530
|
+
let headers = this._settingsService.getHeaders();
|
|
6531
|
+
let options = { headers: headers };
|
|
6532
|
+
return this.http.post(this._settingsService.getSettings('apiUrl') + 'Users/initializepassword', {
|
|
6533
|
+
parameter: param,
|
|
6534
|
+
alias: alias,
|
|
6535
|
+
newPassword: newPassword,
|
|
6536
|
+
}, options);
|
|
6537
|
+
}
|
|
6490
6538
|
/* ========================================================================
|
|
6491
6539
|
DELETE
|
|
6492
6540
|
======================================================================== */
|
|
6493
|
-
deleteUsers(
|
|
6541
|
+
deleteUsers(listGuid) {
|
|
6494
6542
|
let headers = this._settingsService.getHeaders();
|
|
6495
6543
|
return this.http.request('delete', this._settingsService.getSettings('apiUrl') + 'Users', {
|
|
6496
6544
|
headers: headers,
|
|
6497
6545
|
body: {
|
|
6498
|
-
listingUsersToDelete:
|
|
6546
|
+
listingUsersToDelete: listGuid,
|
|
6499
6547
|
},
|
|
6500
6548
|
});
|
|
6501
6549
|
}
|
|
@@ -9870,6 +9918,45 @@ class Document {
|
|
|
9870
9918
|
}
|
|
9871
9919
|
}
|
|
9872
9920
|
|
|
9921
|
+
class DocumentCommentService {
|
|
9922
|
+
constructor(http, settingsService) {
|
|
9923
|
+
this.http = http;
|
|
9924
|
+
this.settingsService = settingsService;
|
|
9925
|
+
}
|
|
9926
|
+
getAliasQuery() {
|
|
9927
|
+
const alias = this.settingsService.getSettings('alias') || this.settingsService.getAppSetting('alias');
|
|
9928
|
+
return alias ? `?alias=${alias}` : '';
|
|
9929
|
+
}
|
|
9930
|
+
getComments(documentGuid) {
|
|
9931
|
+
const headers = this.settingsService.getHeaders();
|
|
9932
|
+
const apiUrl = this.settingsService.getSettings('apiUrl');
|
|
9933
|
+
return this.http.get(`${apiUrl}dam/documents/${documentGuid}/comments${this.getAliasQuery()}`, { headers });
|
|
9934
|
+
}
|
|
9935
|
+
addComment(comment) {
|
|
9936
|
+
const headers = this.settingsService.getHeaders();
|
|
9937
|
+
const apiUrl = this.settingsService.getSettings('apiUrl');
|
|
9938
|
+
return this.http.post(`${apiUrl}dam/documents/comments${this.getAliasQuery()}`, comment, { headers });
|
|
9939
|
+
}
|
|
9940
|
+
deleteComment(commentGuid) {
|
|
9941
|
+
const headers = this.settingsService.getHeaders();
|
|
9942
|
+
const apiUrl = this.settingsService.getSettings('apiUrl');
|
|
9943
|
+
return this.http.delete(`${apiUrl}dam/documents/comments/${commentGuid}${this.getAliasQuery()}`, { headers });
|
|
9944
|
+
}
|
|
9945
|
+
updateComment(commentGuid, updates) {
|
|
9946
|
+
const headers = this.settingsService.getHeaders();
|
|
9947
|
+
const apiUrl = this.settingsService.getSettings('apiUrl');
|
|
9948
|
+
return this.http.put(`${apiUrl}dam/documents/comments/${commentGuid}${this.getAliasQuery()}`, updates, { headers });
|
|
9949
|
+
}
|
|
9950
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DocumentCommentService, deps: [{ token: i1.HttpClient }, { token: SettingsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9951
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DocumentCommentService, providedIn: 'root' }); }
|
|
9952
|
+
}
|
|
9953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DocumentCommentService, decorators: [{
|
|
9954
|
+
type: Injectable,
|
|
9955
|
+
args: [{
|
|
9956
|
+
providedIn: 'root'
|
|
9957
|
+
}]
|
|
9958
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: SettingsService }] });
|
|
9959
|
+
|
|
9873
9960
|
class StripeService {
|
|
9874
9961
|
constructor(http, _settingsService) {
|
|
9875
9962
|
this.http = http;
|
|
@@ -9920,5 +10007,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
9920
10007
|
* Generated bundle index. Do not edit.
|
|
9921
10008
|
*/
|
|
9922
10009
|
|
|
9923
|
-
export { AccountsService, AttributesService, AuthService, CategoriesService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, Document, DocumentsService, EasypiechartDirective, ExportsService, FrameworkagreementsService, GenerationService, LocaleNumberPipe, LoginService, MasksService, MediaSelectionService, MenuService, NotificationServiceService, PricesTaxService, ProductSheetsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, RightsService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SearchService, SettingsService, SidebarRightService, SkusService, StatusService, StripeService, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, ViewsService, WorkflowsDesksService, WorkflowsHistoricalService, websocketService };
|
|
10010
|
+
export { AccountsService, AttributesService, AuthService, CategoriesService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, Document, DocumentCommentService, DocumentsService, EasypiechartDirective, ExportsService, FrameworkagreementsService, GenerationService, LocaleNumberPipe, LoginService, MasksService, MediaSelectionService, MenuService, NotificationServiceService, PricesTaxService, ProductSheetsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, RightsService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SearchService, SettingsService, SidebarRightService, SkusService, StatusService, StripeService, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, ViewsService, WorkflowsDesksService, WorkflowsHistoricalService, websocketService };
|
|
9924
10011
|
//# sourceMappingURL=solidpepper-solidpepper-service.mjs.map
|