Options
All
  • Public
  • Public/Protected
  • All
Menu

Module api/public-api

Index

Type Aliases

SearchAndSort<P>: HttpPath<HttpPath<P, HttpSearchFilter>, HttpSearchSort>

Type Parameters

  • P

Functions

  • $extendValuesInput<P, B, R, NP, NB, NR>(): HttpPipe<P, B, R, P, B, R>
  • $extendValuesInputs<P, B, R, NP, NB, NR>(): HttpPipe<P, B, R, P, B, R>
  • $forCreate<P, B, R>(apis: WithMemory, primaryKey?: string): HttpPipe<P, B, R, P, B, R>
  • 기본 생성 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    • apis: WithMemory
    • Optional primaryKey: string

      고유 식별 속성 이름

    Returns HttpPipe<P, B, R, P, B, R>

  • $forDelete<P, B, R>(apis: WithMemory, primaryKey?: string): HttpPipe<P, B, R, P, B, R>
  • 기본 삭제 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    • apis: WithMemory
    • primaryKey: string = 'seq'

      고유 식별 속성 이름

    Returns HttpPipe<P, B, R, P, B, R>

  • $forList<P, B, R>(apis: WithMemory): HttpPipe<P, B, R, HttpPath<SearchAndSort<P>, HttpSearchLimit>, B, HttpSearchListResponse<R>>
  • 기본 목록 읽기 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    Returns HttpPipe<P, B, R, HttpPath<SearchAndSort<P>, HttpSearchLimit>, B, HttpSearchListResponse<R>>

  • $forRead<P, B, R>(apis: WithMemory, primaryKey?: string): HttpPipe<P, B, R, P, B, R>
  • 기본 단일 읽기 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    • apis: WithMemory
    • primaryKey: string = 'seq'

      고유 식별 속성 이름

    Returns HttpPipe<P, B, R, P, B, R>

  • 기본 다중 읽기 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    Returns HttpPipe<P, B, R, SearchAndSort<P>, B, R>

  • $forReset<P, B, R>(apis: WithMemory): HttpPipe<P, B, R>
  • 기본 초기화 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    Returns HttpPipe<P, B, R>

  • $forUpdate<P, B, R>(apis: WithMemory, primaryKey?: string): HttpPipe<P, B, R, P, B, R>
  • 기본 단일 갱신 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    • apis: WithMemory
    • primaryKey: string = 'seq'

      고유 식별 속성 이름

    Returns HttpPipe<P, B, R, P, B, R>

  • $forUpdates<P, B, R>(apis: WithMemory): HttpPipe<P, B, R, P, B, R>
  • 기본 다중 갱신 파이프

    Type Parameters

    • P

    • B

    • R

    Parameters

    Returns HttpPipe<P, B, R, P, B, R>

  • fixFlatBodyToNest(body: Record<string, any>): Record<string, any>
  • Parameters

    • body: Record<string, any>

    Returns Record<string, any>

  • fixList(fixer: Function): ((response: any) => any)
  • 목록 읽기용 교정 함수로 전환

    example
    function fixFoo(foo: object){
    foo['fixed'] = true;
    return foo;
    }

    const $readMany = (new FetchHttp('GET', '/foo?limit&page'))
    .pipe(
    $response(fixList(fixFoo))
    );
    see

    UserAccountApi

    Parameters

    • fixer: Function

      원본 교정 함수

    Returns ((response: any) => any)

      • (response: any): any
      • Parameters

        • response: any

        Returns any

  • fixMatches(fixer: Function): ((response: any) => any)
  • 다중 일치용 교정 함수로 전환

    example
    function fixFoo(foo: object){
    foo['fixed'] = true;
    return foo;
    }

    const $readMany = (new FetchHttp('POST', '/foo/seq/matches'))
    .pipe(
    $response(fixMatches(fixFoo))
    );
    see

    UserAccountApi

    Parameters

    • fixer: Function

      원본 교정 함수

    Returns ((response: any) => any)

      • (response: any): any
      • Parameters

        • response: any

        Returns any

  • fixPaginatedBody<T>(response: any[] | Record<string, any>, parameters: Record<string, any>): PaginatedResponse<T>
  • 잘못된 쪽 분할 응답 구조를 보정

    description
    1. 쪽 분할이 되지 않은 경우, 분할 된 것 처럼 보정
    2. dataset의 첫 항목이 빈 객체인 경우 보정
    3. dataset이 객체인 경우 보정
    4. data으로 응답 하는 경우 dataset으로 보정
    5. meta 속성이 없는 경우 보정
    author

    ksm@imrbiz.co.kr

    Type Parameters

    • T = any

    Parameters

    • response: any[] | Record<string, any>
    • parameters: Record<string, any>

    Returns PaginatedResponse<T>

  • fixReads(fixer: Function): ((response: any) => any)
  • 다중 읽기용 교정 함수로 전환

    example
    function fixFoo(foo: object){
    foo['fixed'] = true;
    return foo;
    }

    const $readMany = (new FetchHttp('GET', '/foo'))
    .pipe(
    $response(fixReads(fixFoo))
    );
    see

    UserAccountApi

    Parameters

    • fixer: Function

      원본 교정 함수

    Returns ((response: any) => any)

      • (response: any): any
      • Parameters

        • response: any

        Returns any

  • getPaginatedDataset(body: any): any[]
  • 쪽분할 응답 값의 항목 반환 응답 값이 없거나, 객체가 아니거나, 구현 등급이 낮아도 언제나 배열 반환

    Parameters

    • body: any

    Returns any[]

  • getPaginatedDisplayState(body: any): boolean
  • 쪽분할 결과 출력 여부 확인 총 수량이 0보다 크거나 있거나, 검색된 결과 일때 참

    Parameters

    • body: any

    Returns boolean

  • getPaginatedTotal(body: any): number
  • 쪽분할 응답 값의 총 수량 반환 응답 값이 없거나, 객체가 아니거나, 구현 등급이 낮아도 언제나 숫자 반환

    Parameters

    • body: any

    Returns number

  • serverIssue(...args: any[]): any[]
  • Parameters

    • Rest ...args: any[]

    Returns any[]

Generated using TypeDoc