import { RestService, Rest } from '@abp/ng.core'; import { Injectable } from '@angular/core'; import type { PagedResultDto } from '../abp/application/services/dto/models'; import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models'; import type { PagingSortResultDto } from '../dto/models'; @Injectable({ providedIn: 'root', }) export class AppointmentService { apiName = 'Default'; createAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial) => this.restService.request({ method: 'POST', url: '/api/app/appointment/appointment', body: input, }, { apiName: this.apiName,...config }); deleteAppointmentRecord = (id: string, config?: Partial) => this.restService.request({ method: 'DELETE', url: `/api/app/appointment/${id}/appointment-record`, }, { apiName: this.apiName,...config }); get = (config?: Partial) => this.restService.request({ method: 'GET', responseType: 'text', url: '/api/app/appointment', }, { apiName: this.apiName,...config }); getAppointmentById = (id: string, config?: Partial) => this.restService.request({ method: 'GET', url: `/api/app/appointment/${id}/appointment-by-id`, }, { apiName: this.apiName,...config }); getAppointmentList = (input: PagingSortResultDto, config?: Partial) => this.restService.request>({ method: 'GET', url: '/api/app/appointment/appointment-list', params: { search: input.search, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, }, { apiName: this.apiName,...config }); updateAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial) => this.restService.request({ method: 'PUT', url: '/api/app/appointment/appointment', body: input, }, { apiName: this.apiName,...config }); constructor(private restService: RestService) {} }