UNPKG

2.31 kBTypeScriptView Raw
1import { MethodRequestBuilder } from '../request-builder-base';
2import { BatchChangeSet } from './batch-change-set';
3import { BatchRequestSerializationOptions } from './batch-request-options';
4import type { BatchRequestBuilder } from './batch-request-builder';
5/**
6 * Serialize change set to string.
7 * @param changeSet - Change set containing a collection of write operations.
8 * @param options - Request serialization options.
9 * @returns The serialized string representation of a change set.
10 */
11export declare function serializeChangeSet(changeSet: BatchChangeSet, options?: BatchRequestSerializationOptions): string | undefined;
12/**
13 * Serialize a multipart request to string.
14 * @param request - One of [[GetAllRequestBuilder | getAll]], [[GetByKeyRequestBuilder | getByKey]], [[CreateRequestBuilder | create]], [[UpdateRequestBuilder | update]] or [[DeleteRequestBuilder | delete]] request builder.
15 * @param options - Request serialization options.
16 * @returns The serialized string representation of a multipart request, including the multipart headers.
17 */
18export declare function serializeRequest(request: MethodRequestBuilder, options?: BatchRequestSerializationOptions): string;
19/**
20 * Serialize a batch request to string. This is used for the batch request payload when executing the request.
21 * @param request - Batch request to serialize.
22 * @param options - Request serialization options.
23 * @returns String representation of the batch request.
24 */
25export declare function serializeBatchRequest(request: BatchRequestBuilder, options?: BatchRequestSerializationOptions): string;
26/**
27 * @deprecated Since v1.30.0. This function won't be replaced.
28 * Serialize a request to a one line string containing the HTTP method, URL and HTTP version.
29 * For Example:
30 * `GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartnerAddress?$format=json&$top=1 HTTP/1.1`
31 * @param request - One of [[GetAllRequestBuilder | getAll]], [[GetByKeyRequestBuilder | getByKey]], [[CreateRequestBuilder | create]], [[UpdateRequestBuilder | update]] or [[DeleteRequestBuilder | delete]] request builder.
32 * @returns The serialized request as `<HTTP method> <URL> <HTTP version>`.
33 */
34export declare function getLine(request: MethodRequestBuilder): string;
35//# sourceMappingURL=batch-request-serializer.d.ts.map
\No newline at end of file