Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InternshipsService

The internships service

extends

{BaseService}

Hierarchy

Index

Constructors

constructor

Methods

create

  • create(internship: Internship): Promise<ApiResponseDto<Internship>>

delete

  • delete(id: string): Promise<ApiResponseDto<boolean>>

Protected deleteVerb

  • deleteVerb(path: string): Promise<any>

getAll

  • getAll(): Promise<ApiResponseDto<Array<Internship>>>

getApproved

  • getApproved(): Promise<ApiResponseDto<Array<Internship>>>

getAvailableStates

  • getAvailableStates(newState: InternshipStatusType): Promise<Array<object>>
  • Get all the available state based on the current token role

    Parameters

    • newState: InternshipStatusType

      The current state

    Returns Promise<Array<object>>

getByCompanyOwnerId

  • getByCompanyOwnerId(id: string): Promise<ApiResponseDto<Array<Internship>>>
  • Return all the internships created by the given company id

    Parameters

    • id: string

      The company id

    Returns Promise<ApiResponseDto<Array<Internship>>>

getById

  • getById(id: string): Promise<ApiResponseDto<Internship>>

getNotApproved

  • getNotApproved(): Promise<ApiResponseDto<Array<Internship>>>

Protected getVerb

  • getVerb(path: string, options?: any): Promise<any>

Protected postVerb

  • postVerb(path: string, body: any): Promise<any>

Protected postVerbObservable

  • postVerbObservable(path: string, body: any): Observable<any>

Protected putVerb

  • putVerb(path: string, body: any): Promise<any>

update

  • update(internship: Internship): Promise<ApiResponseDto<Internship>>

updateStatus

  • updateStatus(internshipId: string, newState: InternshipStatusType, rejectReason?: string): Promise<ApiResponseDto<Internship>>
  • Update the status af an internship following the state machine transition function

    Parameters

    • internshipId: string

      The internship identifier

    • newState: InternshipStatusType

      The new state

    • Optional rejectReason: string

    Returns Promise<ApiResponseDto<Internship>>

Generated using TypeDoc