mirror of https://github.com/abpframework/abp.git
47 changed files with 48535 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"$schema": "../../../node_modules/ng-packagr/ng-entrypoint.schema.json", |
||||
|
"lib": { |
||||
|
"entryFile": "src/public-api.ts" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
import * as Volo from './proxy/volo'; |
||||
|
export { Volo }; |
||||
@ -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. |
||||
File diff suppressed because it is too large
@ -0,0 +1 @@ |
|||||
|
export * from './volo'; |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './models'; |
||||
@ -0,0 +1,6 @@ |
|||||
|
|
||||
|
export interface IRemoteStreamContent { |
||||
|
fileName?: string; |
||||
|
contentType?: string; |
||||
|
contentLength?: number; |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
import * as Content from './content'; |
||||
|
export { Content }; |
||||
@ -0,0 +1,72 @@ |
|||||
|
import type { BlogDto, BlogGetListInput, CreateBlogDto, UpdateBlogDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class BlogAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (input: CreateBlogDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/blogs', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/blogs/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/blogs/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getAllList = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, ListResultDto<BlogDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/blogs/all', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (input: BlogGetListInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<BlogDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/blogs', |
||||
|
params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
moveAllBlogPosts = (blogId: string, assignToBlogId: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/blogs/${id}/move-all-blog-posts`, |
||||
|
params: { blogId, assignToBlogId }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
update = (id: string, input: UpdateBlogDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogDto>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/blogs/${id}`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
import type { BlogFeatureInputDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
import type { BlogFeatureDto } from '../../blogs/models'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class BlogFeatureAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
getList = (blogId: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogFeatureDto[]>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/blogs/${blogId}/features`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
set = (blogId: string, dto: BlogFeatureInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/blogs/${blogId}/features`, |
||||
|
body: dto, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
import type { BlogPostDto, BlogPostGetListInput, BlogPostListDto, CreateBlogPostDto, UpdateBlogPostDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class BlogPostAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (input: CreateBlogPostDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogPostDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/blogs/blog-posts', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
createAndPublish = (input: CreateBlogPostDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogPostDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/blogs/blog-posts/create-and-publish', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
createAndSendToReview = (input: CreateBlogPostDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogPostDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/blogs/blog-posts/create-and-send-to-review', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
draft = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}/draft`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogPostDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (input: BlogPostGetListInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<BlogPostListDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/blogs/blog-posts', |
||||
|
params: { filter: input.filter, blogId: input.blogId, authorId: input.authorId, tagId: input.tagId, status: input.status, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
hasBlogPostWaitingForReview = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, boolean>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/blogs/blog-posts/has-blogpost-waiting-for-review', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
publish = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}/publish`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
sendToReview = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}/send-to-review`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
update = (id: string, input: UpdateBlogPostDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, BlogPostDto>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/blogs/blog-posts/${id}`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,4 @@ |
|||||
|
export * from './blog-admin.service'; |
||||
|
export * from './blog-feature-admin.service'; |
||||
|
export * from './blog-post-admin.service'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,81 @@ |
|||||
|
import type { ExtensibleEntityDto, ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; |
||||
|
import type { BlogPostStatus } from '../../blogs/blog-post-status.enum'; |
||||
|
|
||||
|
export interface BlogDto extends ExtensibleEntityDto<string> { |
||||
|
name?: string; |
||||
|
slug?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
blogPostCount: number; |
||||
|
} |
||||
|
|
||||
|
export interface BlogFeatureInputDto { |
||||
|
featureName: string; |
||||
|
isEnabled: boolean; |
||||
|
} |
||||
|
|
||||
|
export interface BlogGetListInput extends PagedAndSortedResultRequestDto { |
||||
|
filter?: string; |
||||
|
} |
||||
|
|
||||
|
export interface BlogPostDto extends ExtensibleEntityDto<string> { |
||||
|
blogId?: string; |
||||
|
title?: string; |
||||
|
slug?: string; |
||||
|
shortDescription?: string; |
||||
|
content?: string; |
||||
|
coverImageMediaId?: string; |
||||
|
creationTime?: string; |
||||
|
lastModificationTime?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
status?: BlogPostStatus; |
||||
|
} |
||||
|
|
||||
|
export interface BlogPostGetListInput extends PagedAndSortedResultRequestDto { |
||||
|
filter?: string; |
||||
|
blogId?: string; |
||||
|
authorId?: string; |
||||
|
tagId?: string; |
||||
|
status?: BlogPostStatus; |
||||
|
} |
||||
|
|
||||
|
export interface BlogPostListDto extends ExtensibleEntityDto<string> { |
||||
|
blogId?: string; |
||||
|
blogName?: string; |
||||
|
title?: string; |
||||
|
slug?: string; |
||||
|
shortDescription?: string; |
||||
|
content?: string; |
||||
|
coverImageMediaId?: string; |
||||
|
creationTime?: string; |
||||
|
lastModificationTime?: string; |
||||
|
status?: BlogPostStatus; |
||||
|
} |
||||
|
|
||||
|
export interface CreateBlogDto extends ExtensibleObject { |
||||
|
name: string; |
||||
|
slug: string; |
||||
|
} |
||||
|
|
||||
|
export interface CreateBlogPostDto extends ExtensibleObject { |
||||
|
blogId: string; |
||||
|
title: string; |
||||
|
slug: string; |
||||
|
shortDescription?: string; |
||||
|
content?: string; |
||||
|
coverImageMediaId?: string; |
||||
|
} |
||||
|
|
||||
|
export interface UpdateBlogDto extends ExtensibleObject { |
||||
|
name: string; |
||||
|
slug: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
|
|
||||
|
export interface UpdateBlogPostDto extends ExtensibleObject { |
||||
|
title: string; |
||||
|
slug: string; |
||||
|
shortDescription?: string; |
||||
|
content?: string; |
||||
|
coverImageMediaId?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
@ -0,0 +1,63 @@ |
|||||
|
import type { CommentApprovalDto, CommentGetListInput, CommentSettingsDto, CommentWithAuthorDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class CommentAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/comments/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, CommentWithAuthorDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/comments/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (input: CommentGetListInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<CommentWithAuthorDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/comments', |
||||
|
params: { entityType: input.entityType, text: input.text, repliedCommentId: input.repliedCommentId, author: input.author, creationStartDate: input.creationStartDate, creationEndDate: input.creationEndDate, commentApproveState: input.commentApproveState, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getWaitingCount = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, number>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/comments/waiting-count', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
updateApprovalStatus = (id: string, input: CommentApprovalDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/comments/${id}/approval-status`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
updateSettings = (input: CommentSettingsDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/comments/settings', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './comment-admin.service'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,40 @@ |
|||||
|
import type { ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; |
||||
|
import type { CommentApproveState } from '../../comments/comment-approve-state.enum'; |
||||
|
|
||||
|
export interface CmsUserDto extends ExtensibleObject { |
||||
|
id?: string; |
||||
|
userName?: string; |
||||
|
name?: string; |
||||
|
surname?: string; |
||||
|
} |
||||
|
|
||||
|
export interface CommentApprovalDto { |
||||
|
isApproved: boolean; |
||||
|
} |
||||
|
|
||||
|
export interface CommentGetListInput extends PagedAndSortedResultRequestDto { |
||||
|
entityType?: string; |
||||
|
text?: string; |
||||
|
repliedCommentId?: string; |
||||
|
author?: string; |
||||
|
creationStartDate?: string; |
||||
|
creationEndDate?: string; |
||||
|
commentApproveState?: CommentApproveState; |
||||
|
} |
||||
|
|
||||
|
export interface CommentSettingsDto { |
||||
|
commentRequireApprovement: boolean; |
||||
|
} |
||||
|
|
||||
|
export interface CommentWithAuthorDto extends ExtensibleObject { |
||||
|
id?: string; |
||||
|
entityType?: string; |
||||
|
entityId?: string; |
||||
|
text?: string; |
||||
|
repliedCommentId?: string; |
||||
|
creatorId?: string; |
||||
|
creationTime?: string; |
||||
|
author: CmsUserDto; |
||||
|
url?: string; |
||||
|
isApproved?: boolean; |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
import type { GlobalResourcesDto, GlobalResourcesUpdateDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class GlobalResourceAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
get = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, GlobalResourcesDto>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/global-resources', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
setGlobalResources = (input: GlobalResourcesUpdateDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/global-resources', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './global-resource-admin.service'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,11 @@ |
|||||
|
import type { ExtensibleObject } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface GlobalResourcesDto extends ExtensibleObject { |
||||
|
styleContent?: string; |
||||
|
scriptContent?: string; |
||||
|
} |
||||
|
|
||||
|
export interface GlobalResourcesUpdateDto extends ExtensibleObject { |
||||
|
style?: string; |
||||
|
script?: string; |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
import * as Blogs from './blogs'; |
||||
|
import * as Comments from './comments'; |
||||
|
import * as GlobalResources from './global-resources'; |
||||
|
import * as MediaDescriptors from './media-descriptors'; |
||||
|
import * as Menus from './menus'; |
||||
|
import * as Pages from './pages'; |
||||
|
import * as Tags from './tags'; |
||||
|
export { Blogs, Comments, GlobalResources, MediaDescriptors, Menus, Pages, Tags }; |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './media-descriptor-admin.service'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,29 @@ |
|||||
|
import type { CreateMediaInputWithStream, MediaDescriptorDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class MediaDescriptorAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (entityType: string, inputStream: CreateMediaInputWithStream, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, MediaDescriptorDto>({ |
||||
|
method: 'POST', |
||||
|
url: `/api/cms-kit-admin/media/${entityType}`, |
||||
|
params: { name: inputStream.name }, |
||||
|
body: inputStream.file, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/media/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
import type { IRemoteStreamContent } from '../../../abp/content/models'; |
||||
|
import type { ExtensibleEntityDto } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface CreateMediaInputWithStream { |
||||
|
name: string; |
||||
|
file: IRemoteStreamContent; |
||||
|
} |
||||
|
|
||||
|
export interface MediaDescriptorDto extends ExtensibleEntityDto<string> { |
||||
|
name?: string; |
||||
|
mimeType?: string; |
||||
|
size: number; |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './menu-item-admin.service'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,91 @@ |
|||||
|
import type { MenuItemCreateInput, MenuItemMoveInput, MenuItemUpdateInput, MenuItemWithDetailsDto, PageLookupDto, PageLookupInputDto, PermissionLookupDto, PermissionLookupInputDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
import type { MenuItemDto } from '../../menus/models'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class MenuItemAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (input: MenuItemCreateInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, MenuItemDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/menu-items', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/menu-items/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, MenuItemWithDetailsDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/menu-items/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getAvailableMenuOrder = (parentId?: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, number>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/menu-items/available-order', |
||||
|
params: { parentId }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, ListResultDto<MenuItemDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/menu-items', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getPageLookup = (input: PageLookupInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<PageLookupDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/menu-items/lookup/pages', |
||||
|
params: { filter: input.filter, status: input.status, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getPermissionLookup = (inputDto: PermissionLookupInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, ListResultDto<PermissionLookupDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/menu-items/lookup/permissions', |
||||
|
params: { filter: inputDto.filter }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
moveMenuItem = (id: string, input: MenuItemMoveInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/menu-items/${id}/move`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
update = (id: string, input: MenuItemUpdateInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, MenuItemDto>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/menu-items/${id}`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,58 @@ |
|||||
|
import type { EntityDto, ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; |
||||
|
import type { MenuItemDto } from '../../menus/models'; |
||||
|
import type { PageStatus } from '../../pages/page-status.enum'; |
||||
|
|
||||
|
export interface MenuItemCreateInput extends ExtensibleObject { |
||||
|
parentId?: string; |
||||
|
displayName: string; |
||||
|
isActive: boolean; |
||||
|
url?: string; |
||||
|
icon?: string; |
||||
|
order: number; |
||||
|
target?: string; |
||||
|
elementId?: string; |
||||
|
cssClass?: string; |
||||
|
pageId?: string; |
||||
|
requiredPermissionName?: string; |
||||
|
} |
||||
|
|
||||
|
export interface MenuItemMoveInput { |
||||
|
newParentId?: string; |
||||
|
position: number; |
||||
|
} |
||||
|
|
||||
|
export interface MenuItemUpdateInput extends ExtensibleObject { |
||||
|
displayName: string; |
||||
|
isActive: boolean; |
||||
|
url?: string; |
||||
|
icon?: string; |
||||
|
target?: string; |
||||
|
elementId?: string; |
||||
|
cssClass?: string; |
||||
|
pageId?: string; |
||||
|
requiredPermissionName?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
|
|
||||
|
export interface MenuItemWithDetailsDto extends MenuItemDto { |
||||
|
pageTitle?: string; |
||||
|
} |
||||
|
|
||||
|
export interface PageLookupDto extends EntityDto<string> { |
||||
|
title?: string; |
||||
|
slug?: string; |
||||
|
} |
||||
|
|
||||
|
export interface PageLookupInputDto extends PagedAndSortedResultRequestDto { |
||||
|
filter?: string; |
||||
|
status?: PageStatus; |
||||
|
} |
||||
|
|
||||
|
export interface PermissionLookupDto { |
||||
|
name?: string; |
||||
|
displayName?: string; |
||||
|
} |
||||
|
|
||||
|
export interface PermissionLookupInputDto { |
||||
|
filter?: string; |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './models'; |
||||
|
export * from './page-admin.service'; |
||||
@ -0,0 +1,40 @@ |
|||||
|
import type { ExtensibleAuditedEntityDto, ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; |
||||
|
import type { PageStatus } from '../../pages/page-status.enum'; |
||||
|
|
||||
|
export interface CreatePageInputDto extends ExtensibleObject { |
||||
|
title: string; |
||||
|
slug: string; |
||||
|
layoutName?: string; |
||||
|
content?: string; |
||||
|
script?: string; |
||||
|
style?: string; |
||||
|
status?: PageStatus; |
||||
|
} |
||||
|
|
||||
|
export interface GetPagesInputDto extends PagedAndSortedResultRequestDto { |
||||
|
filter?: string; |
||||
|
status?: PageStatus; |
||||
|
} |
||||
|
|
||||
|
export interface PageDto extends ExtensibleAuditedEntityDto<string> { |
||||
|
title?: string; |
||||
|
slug?: string; |
||||
|
layoutName?: string; |
||||
|
content?: string; |
||||
|
script?: string; |
||||
|
style?: string; |
||||
|
isHomePage: boolean; |
||||
|
status?: PageStatus; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
|
|
||||
|
export interface UpdatePageInputDto extends ExtensibleObject { |
||||
|
title: string; |
||||
|
slug: string; |
||||
|
layoutName?: string; |
||||
|
content?: string; |
||||
|
script?: string; |
||||
|
style?: string; |
||||
|
status?: PageStatus; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
@ -0,0 +1,63 @@ |
|||||
|
import type { CreatePageInputDto, GetPagesInputDto, PageDto, UpdatePageInputDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class PageAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (input: CreatePageInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PageDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/pages', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/pages/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PageDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/pages/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (input: GetPagesInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<PageDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/pages', |
||||
|
params: { filter: input.filter, status: input.status, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
setAsHomePage = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/pages/setashomepage/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
update = (id: string, input: UpdatePageInputDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PageDto>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/pages/${id}`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
import type { EntityTagCreateDto, EntityTagRemoveDto, EntityTagSetDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class EntityTagAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
addTagToEntity = (input: EntityTagCreateDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/entity-tags', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
removeTagFromEntity = (input: EntityTagRemoveDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: '/api/cms-kit-admin/entity-tags', |
||||
|
params: { tagId: input.tagId, entityType: input.entityType, entityId: input.entityId }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
setEntityTags = (input: EntityTagSetDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'PUT', |
||||
|
url: '/api/cms-kit-admin/entity-tags', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
export * from './entity-tag-admin.service'; |
||||
|
export * from './models'; |
||||
|
export * from './tag-admin.service'; |
||||
@ -0,0 +1,38 @@ |
|||||
|
import type { ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface EntityTagCreateDto { |
||||
|
tagName: string; |
||||
|
entityType: string; |
||||
|
entityId: string; |
||||
|
} |
||||
|
|
||||
|
export interface EntityTagRemoveDto { |
||||
|
tagId: string; |
||||
|
entityType: string; |
||||
|
entityId: string; |
||||
|
} |
||||
|
|
||||
|
export interface EntityTagSetDto { |
||||
|
entityId?: string; |
||||
|
entityType?: string; |
||||
|
tags: string[]; |
||||
|
} |
||||
|
|
||||
|
export interface TagCreateDto extends ExtensibleObject { |
||||
|
entityType: string; |
||||
|
name: string; |
||||
|
} |
||||
|
|
||||
|
export interface TagDefinitionDto { |
||||
|
entityType?: string; |
||||
|
displayName?: string; |
||||
|
} |
||||
|
|
||||
|
export interface TagGetListInput extends PagedAndSortedResultRequestDto { |
||||
|
filter?: string; |
||||
|
} |
||||
|
|
||||
|
export interface TagUpdateDto extends ExtensibleObject { |
||||
|
name: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
@ -0,0 +1,64 @@ |
|||||
|
import type { TagCreateDto, TagDefinitionDto, TagGetListInput, TagUpdateDto } from './models'; |
||||
|
import { RestService, Rest } from '@abp/ng.core'; |
||||
|
import type { PagedResultDto } from '@abp/ng.core'; |
||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
import type { TagDto } from '../../tags/models'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class TagAdminService { |
||||
|
private restService = inject(RestService); |
||||
|
apiName = 'CmsKitAdmin'; |
||||
|
|
||||
|
|
||||
|
create = (input: TagCreateDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, TagDto>({ |
||||
|
method: 'POST', |
||||
|
url: '/api/cms-kit-admin/tags', |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
delete = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, void>({ |
||||
|
method: 'DELETE', |
||||
|
url: `/api/cms-kit-admin/tags/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
get = (id: string, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, TagDto>({ |
||||
|
method: 'GET', |
||||
|
url: `/api/cms-kit-admin/tags/${id}`, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getList = (input: TagGetListInput, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, PagedResultDto<TagDto>>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/tags', |
||||
|
params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
getTagDefinitions = (config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, TagDefinitionDto[]>({ |
||||
|
method: 'GET', |
||||
|
url: '/api/cms-kit-admin/tags/tag-definitions', |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
|
||||
|
|
||||
|
update = (id: string, input: TagUpdateDto, config?: Partial<Rest.Config>) => |
||||
|
this.restService.request<any, TagDto>({ |
||||
|
method: 'PUT', |
||||
|
url: `/api/cms-kit-admin/tags/${id}`, |
||||
|
body: input, |
||||
|
}, |
||||
|
{ apiName: this.apiName,...config }); |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
import { mapEnumToOptions } from '@abp/ng.core'; |
||||
|
|
||||
|
export enum BlogPostStatus { |
||||
|
Draft = 0, |
||||
|
Published = 1, |
||||
|
WaitingForReview = 2, |
||||
|
} |
||||
|
|
||||
|
export const blogPostStatusOptions = mapEnumToOptions(BlogPostStatus); |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './blog-post-status.enum'; |
||||
|
export * from './models'; |
||||
@ -0,0 +1,6 @@ |
|||||
|
import type { ExtensibleEntityDto } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface BlogFeatureDto extends ExtensibleEntityDto<string> { |
||||
|
featureName?: string; |
||||
|
isEnabled: boolean; |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
import { mapEnumToOptions } from '@abp/ng.core'; |
||||
|
|
||||
|
export enum CommentApproveState { |
||||
|
All = 0, |
||||
|
Approved = 1, |
||||
|
Disapproved = 2, |
||||
|
Waiting = 4, |
||||
|
} |
||||
|
|
||||
|
export const commentApproveStateOptions = mapEnumToOptions(CommentApproveState); |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './comment-approve-state.enum'; |
||||
@ -0,0 +1,7 @@ |
|||||
|
import * as Admin from './admin'; |
||||
|
import * as Blogs from './blogs'; |
||||
|
import * as Comments from './comments'; |
||||
|
import * as Menus from './menus'; |
||||
|
import * as Pages from './pages'; |
||||
|
import * as Tags from './tags'; |
||||
|
export { Admin, Blogs, Comments, Menus, Pages, Tags }; |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './models'; |
||||
@ -0,0 +1,16 @@ |
|||||
|
import type { ExtensibleAuditedEntityDto } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface MenuItemDto extends ExtensibleAuditedEntityDto<string> { |
||||
|
parentId?: string; |
||||
|
displayName?: string; |
||||
|
isActive: boolean; |
||||
|
url?: string; |
||||
|
icon?: string; |
||||
|
order: number; |
||||
|
target?: string; |
||||
|
elementId?: string; |
||||
|
cssClass?: string; |
||||
|
pageId?: string; |
||||
|
requiredPermissionName?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './page-status.enum'; |
||||
@ -0,0 +1,8 @@ |
|||||
|
import { mapEnumToOptions } from '@abp/ng.core'; |
||||
|
|
||||
|
export enum PageStatus { |
||||
|
Draft = 0, |
||||
|
Publish = 1, |
||||
|
} |
||||
|
|
||||
|
export const pageStatusOptions = mapEnumToOptions(PageStatus); |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './models'; |
||||
@ -0,0 +1,7 @@ |
|||||
|
import type { ExtensibleEntityDto } from '@abp/ng.core'; |
||||
|
|
||||
|
export interface TagDto extends ExtensibleEntityDto<string> { |
||||
|
entityType?: string; |
||||
|
name?: string; |
||||
|
concurrencyStamp?: string; |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
import * as Abp from './abp'; |
||||
|
import * as CmsKit from './cms-kit'; |
||||
|
export { Abp, CmsKit }; |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './lib/index'; |
||||
Loading…
Reference in new issue