@nebius/js-sdk - v0.1.4
    Preparing search index...

    Class Request<TReq, TRes>

    Type Parameters

    • TReq
    • TRes

    Implements

    Indexable

    • [key: symbol]: (() => string) | (() => Record<string, unknown>)
    Index

    Constructors

    • Type Parameters

      • TReq
      • TRes

      Parameters

      • sdk: SDKInterface
      • serviceName: string
      • methodName: string
      • addr: string
      • serializer: (value: TReq) => Buffer
      • deserializer: (value: Buffer) => TRes
      • request: TReq
      • requestMetadata: Metadata | undefined
      • OptionalrequestOptions: Partial<CallOptions> & RetryOptions

      Returns Request<TReq, TRes>

    Properties

    $type: "nebius.sdk.Request" = 'nebius.sdk.Request'
    initialMetadata: Promise<Metadata>
    requestId: Promise<string>
    result: Promise<TRes>
    status: Promise<Status>
    traceId: Promise<string>
    trailingMetadata: Promise<Metadata>

    Methods

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = TRes
      • TResult2 = never

      Parameters

      • Optionalonfulfilled: ((value: TRes) => TResult1 | PromiseLike<TResult1>) | null

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.