UNPKG

ngx-drupal7-services

Version:

# Angular 2+/Ionic 2+ Drupal 7 Services #### Typescript angular module for [Drupal Services 3.x](https://www.drupal.org/project/services)

58 lines (57 loc) 2.01 kB
import { Observable } from 'rxjs'; import { MainService } from '../main/main.service'; import { CommentEntity, CreatedComment } from '../models/comment'; import * as i0 from "@angular/core"; /** * comment service for drupal * @see BACK_END/admin/structure/services/list/END_POINT/resources for more details */ export declare class CommentService extends MainService { /** * entity type is comment */ entityType: string; /** * implement comment index resource * @return list of comments */ getAllComments(): Observable<CommentEntity[]>; /** * implement comment retrive method * @param cid comment id * @return drupal comment entity */ getCommentById(cid: number): Observable<CommentEntity>; /** * implement create resource * @param comment the comment to create * @return created comment details */ createComment(comment: CommentEntity): Observable<CreatedComment>; /** * implement update resource * @param comment comment to update * @return array of comment id */ updateComment(comment: CommentEntity): Observable<number[]>; /** * implement delete resource * @param cid comment id to delete * @return array of boolean, if comment deleted the array will will contains true */ deleteComment(cid: number): Observable<boolean[]>; /** * implement countAll resource * @param nid host node id of the comments * @return number of comments on the node */ countAllCommentsByNodeId(nid: number): Observable<number>; /** * implement countNew resource. * @param nid host node id of the new comments * @return number of the new comments for the giving node id */ countNewCommentsByNodeId(nid: number): Observable<number>; static ɵfac: i0.ɵɵFactoryDeclaration<CommentService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CommentService>; }