Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UpdateRequestBuilderBase<EntityT>

Abstract class to create OData query to update an entity containing methods shared for OData v2 and v4.

Type parameters

  • EntityT: EntityBase

    Type of the entity to be updated

Hierarchy

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

  • new UpdateRequestBuilderBase(_entityConstructor: Constructable<EntityT>, _entity: EntityT, oDataUri: ODataUri, entitySerializer: EntitySerializer, extractODataEtag: (json: Record<string, any>) => string | undefined, payloadManipulator: (body: Record<string, any>) => Record<string, any>): UpdateRequestBuilderBase
  • Creates an instance of UpdateRequestBuilder.

    Parameters

    • _entityConstructor: Constructable<EntityT>

      Constructor type of the entity to be updated

    • _entity: EntityT

      Entity to be updated

    • oDataUri: ODataUri

      Collection of URI conversion methods

    • entitySerializer: EntitySerializer

      Entity serializer

    • extractODataEtag: (json: Record<string, any>) => string | undefined

      Extractor for etag from payload

        • (json: Record<string, any>): string | undefined
        • Parameters

          • json: Record<string, any>

          Returns string | undefined

    • payloadManipulator: (body: Record<string, any>) => Record<string, any>

      Manipulator for the payload.

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

          • body: Record<string, any>

          Returns Record<string, any>

    Returns UpdateRequestBuilderBase

Properties

Readonly _entity

_entity: EntityT

Entity to be updated

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT>

Constructor type of the entity to be updated

Readonly entitySerializer

entitySerializer: EntitySerializer

Entity serializer

Readonly extractODataEtag

extractODataEtag: (json: Record<string, any>) => string | undefined

Extractor for etag from payload

Type declaration

    • (json: Record<string, any>): string | undefined
    • Parameters

      • json: Record<string, any>

      Returns string | undefined

Readonly oDataUri

oDataUri: ODataUri

Collection of URI conversion methods

Readonly payloadManipulator

payloadManipulator: (body: Record<string, any>) => Record<string, any>

Manipulator for the payload.

Type declaration

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

      • body: Record<string, any>

      Returns Record<string, any>

requestConfig

requestConfig: ODataUpdateRequestConfig<EntityT>

Request configuration to initialize with

Accessors

entity

  • get entity(): EntityT

Methods

build

Protected executeRequest

Protected getPayload

  • getPayload(): Record<string, any>

ignoreVersionIdentifier

  • ignoreVersionIdentifier(): this

ignoredFields

  • ignoredFields(...fields: Selectable<EntityT>[]): this
  • ignoredFields(fields: Selectable<EntityT>[]): this

Protected isEmptyObject

  • isEmptyObject(obj: any): boolean

prepare

  • prepare(): this

relativeUrl

  • relativeUrl(): string

replaceWholeEntityWithPut

  • replaceWholeEntityWithPut(): this

requiredFields

  • requiredFields(...fields: Selectable<EntityT>[]): this
  • requiredFields(fields: Selectable<EntityT>[]): this

url

withCustomHeaders

  • withCustomHeaders(headers: Record<string, string>): this

withCustomQueryParameters

  • withCustomQueryParameters(queryParameters: Record<string, string>): this

withCustomServicePath

  • withCustomServicePath(servicePath: string): this

withCustomVersionIdentifier

  • withCustomVersionIdentifier(etag: string): this