Browse Source

create setting-management proxies

pull/7869/head
mehmet-erim 5 years ago
parent
commit
d29ade9efb
  1. 17
      npm/ng-packs/packages/setting-management/config/src/proxy/README.md
  2. 27
      npm/ng-packs/packages/setting-management/config/src/proxy/email-settings.service.ts
  3. 4745
      npm/ng-packs/packages/setting-management/config/src/proxy/generate-proxy.json
  4. 2
      npm/ng-packs/packages/setting-management/config/src/proxy/index.ts
  5. 24
      npm/ng-packs/packages/setting-management/config/src/proxy/models.ts

17
npm/ng-packs/packages/setting-management/config/src/proxy/README.md

@ -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.

27
npm/ng-packs/packages/setting-management/config/src/proxy/email-settings.service.ts

@ -0,0 +1,27 @@
import type { EmailSettingsDto, UpdateEmailSettingsDto } from './models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class EmailSettingsService {
apiName = 'SettingManagement';
get = () =>
this.restService.request<any, EmailSettingsDto>({
method: 'GET',
url: `/api/setting-management/emailing`,
},
{ apiName: this.apiName });
update = (input: UpdateEmailSettingsDto) =>
this.restService.request<any, void>({
method: 'POST',
url: `/api/setting-management/emailing`,
body: input,
},
{ apiName: this.apiName });
constructor(private restService: RestService) {}
}

4745
npm/ng-packs/packages/setting-management/config/src/proxy/generate-proxy.json

File diff suppressed because it is too large

2
npm/ng-packs/packages/setting-management/config/src/proxy/index.ts

@ -0,0 +1,2 @@
export * from './email-settings.service';
export * from './models';

24
npm/ng-packs/packages/setting-management/config/src/proxy/models.ts

@ -0,0 +1,24 @@
export interface EmailSettingsDto {
smtpHost?: string;
smtpPort: number;
smtpUserName?: string;
smtpPassword?: string;
smtpDomain?: string;
smtpEnableSsl: boolean;
smtpUseDefaultCredentials: boolean;
defaultFromAddress?: string;
defaultFromDisplayName?: string;
}
export interface UpdateEmailSettingsDto {
smtpHost?: string;
smtpPort: number;
smtpUserName?: string;
smtpPassword?: string;
smtpDomain?: string;
smtpEnableSsl: boolean;
smtpUseDefaultCredentials: boolean;
defaultFromAddress: string;
defaultFromDisplayName: string;
}
Loading…
Cancel
Save