UNPKG

@microsoft/msgraph-sdk-core

Version:
91 lines 3.45 kB
/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ /** * @module BatchItem */ /** * @interface * Signature represents key value pair object */ import { Parsable, ParseNode, SerializationWriter, RequestInformation, RequestAdapter } from "@microsoft/kiota-abstractions"; /** * @interface * Signature represents payload structure for batch request and response */ export interface BatchRequestStep { readonly id: string; method: string; url: string; headers?: Record<string, string> | Record<string, string[]> | null; body?: ArrayBuffer | null; dependsOn?: string[]; } /** * @interface * Signature represents unwrapped payload structure for batch response */ export interface BatchResponse { id: string; headers?: Record<string, string> | null; body?: ArrayBuffer | null; status?: number; } /** * @interface * Signature representing Batch request body */ export interface BatchRequestBody { requests: BatchRequestStep[]; } /** * @interface * Signature representing Batch response body */ export interface BatchResponseBody { responses: BatchResponse[]; } /** * Serializes the batch request body * @param writer * @param batchRequestBody */ export declare const serializeBatchRequestBody: (writer: SerializationWriter, batchRequestBody?: Partial<BatchRequestBody> | undefined | null) => void; /** * Serializes the batch item * @param writer * @param batchRequestData */ export declare const serializeBatchItem: (writer: SerializationWriter, batchRequestData?: Partial<BatchRequestStep> | undefined | null) => void; /** * BatchResponseCollection ParsableFactory * @param _parseNode */ export declare const createBatchResponseContentFromDiscriminatorValue: (_parseNode: ParseNode | undefined) => ((instance?: Parsable) => Record<string, (node: ParseNode) => void>); /** * Deserializes the batch response body * @param batchResponseBody */ export declare const deserializeIntoBatchResponseContent: (batchResponseBody?: Partial<BatchResponseBody> | undefined) => Record<string, (node: ParseNode) => void>; /** * BatchRequestStep ParsableFactory * @param _parseNode */ export declare const createBatchResponseFromDiscriminatorValue: (_parseNode: ParseNode | undefined) => ((instance?: Parsable) => Record<string, (node: ParseNode) => void>); /** * Deserializes the batch item * @param batchResponse */ export declare const deserializeIntoBatchResponse: (batchResponse?: Partial<BatchResponse> | undefined) => Record<string, (node: ParseNode) => void>; /** * Converts a `RequestInformation` object to a `BatchRequestStep`. * @param {RequestAdapter} requestAdapter - The request adapter containing the base URL. * @param {RequestInformation} requestInformation - The request information to convert. * @param {string} [batchId] - Optional batch ID to use for the `BatchRequestStep`. * @returns {BatchRequestStep} The converted `BatchRequestStep`. */ export declare const convertRequestInformationToBatchItem: (requestAdapter: RequestAdapter, requestInformation: RequestInformation, batchId?: string) => BatchRequestStep; //# sourceMappingURL=BatchRequestStep.d.ts.map