diff --git a/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/profile.service.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/profile.service.ts new file mode 100644 index 0000000000..0cea6b8cfb --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/profile.service.ts @@ -0,0 +1,35 @@ +import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class ProfileService { + apiName = 'AbpAccount'; + + changePassword = (input: ChangePasswordInput) => + this.restService.request({ + method: 'POST', + url: '/api/account/my-profile/change-password', + body: input, + }, + { apiName: this.apiName }); + + get = () => + this.restService.request({ + method: 'GET', + url: '/api/account/my-profile', + }, + { apiName: this.apiName }); + + update = (input: UpdateProfileDto) => + this.restService.request({ + method: 'PUT', + url: '/api/account/my-profile', + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +}