/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createDeleteResponseDtoFromDiscriminatorValue, createErrorResponseDtoFromDiscriminatorValue, createPageResponseDtoFromDiscriminatorValue, serializePageResponseDto, type DeleteResponseDto, type ErrorResponseDto, type PageResponseDto } from '../../../models/index.js'; // @ts-ignore import { type AdditionalDataHolder, type BaseRequestBuilder, type Guid, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions'; /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object * @returns {WithPagePutRequestBody} */ // @ts-ignore export function createWithPagePutRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoWithPagePutRequestBody; } /** * The deserialization information for the current model * @param WithPagePutRequestBody The instance to deserialize into. * @returns {Record void>} */ // @ts-ignore export function deserializeIntoWithPagePutRequestBody(withPagePutRequestBody: Partial | undefined = {}) : Record void> { return { "content": n => { withPagePutRequestBody.content = n.getStringValue(); }, "parentPageId": n => { withPagePutRequestBody.parentPageId = n.getGuidValue(); }, "sortOrder": n => { withPagePutRequestBody.sortOrder = n.getNumberValue(); }, "title": n => { withPagePutRequestBody.title = n.getStringValue(); }, } } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param WithPagePutRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeWithPagePutRequestBody(writer: SerializationWriter, withPagePutRequestBody: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!withPagePutRequestBody || isSerializingDerivedType) { return; } writer.writeStringValue("content", withPagePutRequestBody.content); writer.writeGuidValue("parentPageId", withPagePutRequestBody.parentPageId); writer.writeNumberValue("sortOrder", withPagePutRequestBody.sortOrder); writer.writeStringValue("title", withPagePutRequestBody.title); writer.writeAdditionalData(withPagePutRequestBody.additionalData); } /** * Builds and executes requests for operations under /v1/page/{pageId} */ export interface WithPageItemRequestBuilder extends BaseRequestBuilder { /** * 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요) * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise} * @throws {ErrorResponseDto} error when the service returns a 401 status code * @throws {ErrorResponseDto} error when the service returns a 404 status code * @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code */ delete(requestConfiguration?: RequestConfiguration | undefined) : Promise; /** * 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요) * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise} * @throws {ErrorResponseDto} error when the service returns a 400 status code * @throws {ErrorResponseDto} error when the service returns a 401 status code * @throws {ErrorResponseDto} error when the service returns a 404 status code * @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code */ put(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise; /** * 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요) * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; /** * 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요) * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toPutRequestInformation(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; } export interface WithPagePutRequestBody extends AdditionalDataHolder, Parsable { /** * 페이지 내용 (Markdown) */ content?: string | null; /** * 부모 페이지 ID (null로 설정하면 루트 페이지가 됨) */ parentPageId?: Guid | null; /** * 정렬 순서 */ sortOrder?: number | null; /** * 페이지 제목 */ title?: string | null; } /** * Uri template for the request builder. */ export const WithPageItemRequestBuilderUriTemplate = "{+baseurl}/v1/page/{pageId}"; /** * Metadata for all the requests in the request builder. */ export const WithPageItemRequestBuilderRequestsMetadata: RequestsMetadata = { delete: { uriTemplate: WithPageItemRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { 401: createErrorResponseDtoFromDiscriminatorValue as ParsableFactory, 404: createErrorResponseDtoFromDiscriminatorValue as ParsableFactory, XXX: createDeleteResponseDtoFromDiscriminatorValue as ParsableFactory, }, adapterMethodName: "send", responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue, }, put: { uriTemplate: WithPageItemRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { 400: createErrorResponseDtoFromDiscriminatorValue as ParsableFactory, 401: createErrorResponseDtoFromDiscriminatorValue as ParsableFactory, 404: createErrorResponseDtoFromDiscriminatorValue as ParsableFactory, XXX: createPageResponseDtoFromDiscriminatorValue as ParsableFactory, }, adapterMethodName: "send", responseBodyFactory: createPageResponseDtoFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeWithPagePutRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */