mirror of https://github.com/abpframework/abp.git
8 changed files with 4840 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
# Proxy Generation Output |
|||
|
|||
This directory includes the output of the latest proxy generation. |
|||
The files and folders in it will be overwritten when proxy generation is run again. |
|||
Therefore, please do not place your own content in this folder. |
|||
|
|||
In addition, `generate-proxy.json` works like a lock file. |
|||
It includes information used by the proxy generator, so please do not delete or modify it. |
|||
|
|||
Finally, the name of the files and folders should not be changed for two reasons: |
|||
- Proxy generator will keep creating them at those paths and you will have multiple copies of the same content. |
|||
- ABP Suite generates files which include imports from this folder. |
|||
|
|||
> **Important Notice:** If you are building a module and are planning to publish to npm, |
|||
> some of the generated proxies are likely to be exported from public-api.ts file. In such a case, |
|||
> please make sure you export files directly and not from barrel exports. In other words, |
|||
> do not include index.ts exports in your public-api.ts exports. |
|||
@ -0,0 +1,37 @@ |
|||
import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models'; |
|||
import { RestService } from '@abp/ng.core'; |
|||
import { Injectable } from '@angular/core'; |
|||
import type { IdentityUserDto } from '../identity/models'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class AccountService { |
|||
apiName = 'AbpAccount'; |
|||
|
|||
register = (input: RegisterDto) => |
|||
this.restService.request<any, IdentityUserDto>({ |
|||
method: 'POST', |
|||
url: `/api/account/register`, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
resetPassword = (input: ResetPasswordDto) => |
|||
this.restService.request<any, void>({ |
|||
method: 'POST', |
|||
url: `/api/account/reset-password`, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
sendPasswordResetCode = (input: SendPasswordResetCodeDto) => |
|||
this.restService.request<any, void>({ |
|||
method: 'POST', |
|||
url: `/api/account/send-password-reset-code`, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
constructor(private restService: RestService) {} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
export * from './account.service'; |
|||
export * from './models'; |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
export interface RegisterDto { |
|||
userName: string; |
|||
emailAddress: string; |
|||
password: string; |
|||
appName: string; |
|||
} |
|||
|
|||
export interface ResetPasswordDto { |
|||
userId?: string; |
|||
resetToken: string; |
|||
password: string; |
|||
} |
|||
|
|||
export interface SendPasswordResetCodeDto { |
|||
email: string; |
|||
appName: string; |
|||
returnUrl?: string; |
|||
returnUrlHash?: string; |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1 @@ |
|||
export * from './models'; |
|||
@ -0,0 +1,15 @@ |
|||
import type { ExtensibleFullAuditedEntityDto } from '@abp/ng.core'; |
|||
|
|||
export interface IdentityUserDto extends ExtensibleFullAuditedEntityDto<string> { |
|||
tenantId?: string; |
|||
userName?: string; |
|||
name?: string; |
|||
surname?: string; |
|||
email?: string; |
|||
emailConfirmed: boolean; |
|||
phoneNumber?: string; |
|||
phoneNumberConfirmed: boolean; |
|||
lockoutEnabled: boolean; |
|||
lockoutEnd?: string; |
|||
concurrencyStamp?: string; |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
import * as Account from './account'; |
|||
import * as Identity from './identity'; |
|||
export { Account, Identity }; |
|||
Loading…
Reference in new issue