Kiota 이상한버그, Response Schema가 One of일 경우... 한 가지 schema 밖에 생성하지 않음

This commit is contained in:
dahyeon committed 2025-11-10 17:21:48 +00:00
1 parent e5d4ff5866
commit 712dce8391
13 files changed
+407 -448

No files matched your search

Regular → Executable
View File
File mode changed.
+33 -5
View File
@@ -7,11 +7,19 @@ import type { Guid } from '@microsoft/kiota-abstractions';
* Convert PageResponseDto to local Page type * Convert PageResponseDto to local Page type
*/ */
function mapPageResponseToPage(dto: PageResponseDto): Page { function mapPageResponseToPage(dto: PageResponseDto): Page {
// Handle content - it comes as a string from the server despite the Kiota type
const content = (dto.content as any) || '';
const contentStr = typeof content === 'string' ? content : '';
// Handle parentPageId - it comes as a Guid/string from the server despite the Kiota type
const parentPageId = (dto.parentPageId as any);
const parentIdStr = parentPageId?.toString() || null;
return { return {
id: dto.pageId?.toString() || '', id: dto.pageId?.toString() || '',
title: dto.title || '', title: dto.title || '',
content: dto.content?.toString() || '', // content is PageResponseDto_content, convert to string content: contentStr,
parentId: dto.parentPageId?.toString() || null, parentId: parentIdStr,
order: dto.sortOrder || undefined, order: dto.sortOrder || undefined,
createdAt: dto.createdAt?.toISOString() || new Date().toISOString(), createdAt: dto.createdAt?.toISOString() || new Date().toISOString(),
updatedAt: dto.updatedAt?.toISOString() || new Date().toISOString(), updatedAt: dto.updatedAt?.toISOString() || new Date().toISOString(),
@@ -37,15 +45,35 @@ export async function getPages(apiClient: ApiClient, spaceId?: string): Promise<
* Get a specific page by ID * Get a specific page by ID
*/ */
export async function getPage(apiClient: ApiClient, pageId: string): Promise<Page> { export async function getPage(apiClient: ApiClient, pageId: string): Promise<Page> {
try {
console.log('Fetching page with ID:', pageId);
const response = await apiClient.v1.page.get({ const response = await apiClient.v1.page.get({
queryParameters: { pageId: pageId as Guid }, queryParameters: { pageId: pageId as Guid },
}); });
console.log('API response:', response);
if (!response || response.length === 0) { if (!response) {
throw new Error(`Page with id ${pageId} not found`); throw new Error(`Page with id ${pageId} not found - response is undefined`);
} }
return mapPageResponseToPage(response[0]); // API always returns an array
if (!Array.isArray(response)) {
console.error('Unexpected response type:', typeof response, response);
throw new Error(`Unexpected response type for page ${pageId}`);
}
if (response.length === 0) {
throw new Error(`Page with id ${pageId} not found - empty response`);
}
const pageData = response[0];
console.log('Page data:', pageData);
return mapPageResponseToPage(pageData);
} catch (error) {
console.error('Error fetching page:', error);
throw error;
}
} }
/** /**
+5 -1
View File
@@ -7,11 +7,15 @@ import type { Guid } from '@microsoft/kiota-abstractions';
* Convert SpaceResponseDto to local Space type * Convert SpaceResponseDto to local Space type
*/ */
function mapSpaceResponseToSpace(dto: SpaceResponseDto): Space { function mapSpaceResponseToSpace(dto: SpaceResponseDto): Space {
// Handle description - it comes as a string from the server despite the Kiota type
const description = (dto.description as any);
const descriptionStr = typeof description === 'string' ? description : null;
return { return {
id: dto.spaceId?.toString() || '', id: dto.spaceId?.toString() || '',
name: dto.nameEscaped || '', name: dto.nameEscaped || '',
spaceKey: dto.spaceKey || '', spaceKey: dto.spaceKey || '',
description: dto.description?.toString() || null, description: descriptionStr,
createdAt: dto.createdAt?.toISOString() || new Date().toISOString(), createdAt: dto.createdAt?.toISOString() || new Date().toISOString(),
createdByUserId: dto.createdByUserId?.toString() || '', createdByUserId: dto.createdByUserId?.toString() || '',
}; };
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"descriptionHash": "387A7F7CE359F0D1302E6656C0BFE5F4336641679CAF00708C735BDFA093A161840AA1A12D57E66D0109E95F7F515A1595EC7C12836ACB107E2B97E2892F5709", "descriptionHash": "C64A91036F62D15D93162E3F7F5EE01034379FC42298C27FCC2D9B38675AD428119460B568D89EC1A9B819B52FD11892B94DEC504EE319DD5FDEA1A4032450A4",
"descriptionLocation": "https://wiki.dahyeon.us/v1/api-yaml", "descriptionLocation": "https://wiki.dahyeon.us/v1/api-yaml",
"lockFileVersion": "1.0.0", "lockFileVersion": "1.0.0",
"kiotaVersion": "1.28.0", "kiotaVersion": "1.28.0",
+1 -375
View File
@@ -2,35 +2,8 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createUntypedNodeFromDiscriminatorValue, type AdditionalDataHolder, type ApiError, type Guid, type Parsable, type ParseNode, type SerializationWriter, type UntypedNode } from '@microsoft/kiota-abstractions'; import { type AdditionalDataHolder, type ApiError, type Guid, type Parsable, type ParseNode, 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 {CreatePageDto}
*/
// @ts-ignore
export function createCreatePageDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoCreatePageDto;
}
/**
* 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 {CreateSpaceDto}
*/
// @ts-ignore
export function createCreateSpaceDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoCreateSpaceDto;
}
/**
* 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 {CreateTemporaryTokenDto}
*/
// @ts-ignore
export function createCreateTemporaryTokenDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoCreateTemporaryTokenDto;
}
/** /**
* Creates a new instance of the appropriate class based on discriminator value * 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 * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -40,15 +13,6 @@ export function createCreateTemporaryTokenDtoFromDiscriminatorValue(parseNode: P
export function createCreateTokenResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createCreateTokenResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoCreateTokenResponseDto; return deserializeIntoCreateTokenResponseDto;
} }
/**
* 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 {DeletePageDto}
*/
// @ts-ignore
export function createDeletePageDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoDeletePageDto;
}
/** /**
* Creates a new instance of the appropriate class based on discriminator value * 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 * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -67,41 +31,6 @@ export function createDeleteResponseDtoFromDiscriminatorValue(parseNode: ParseNo
export function createDeleteSpaceResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createDeleteSpaceResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoDeleteSpaceResponseDto; return deserializeIntoDeleteSpaceResponseDto;
} }
/**
* 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 {DeleteTokenDto}
*/
// @ts-ignore
export function createDeleteTokenDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoDeleteTokenDto;
}
export interface CreatePageDto extends AdditionalDataHolder, Parsable {
/**
* 페이지 내용 (Markdown 등)
*/
content?: string | null;
/**
* 부모 페이지 ID (계층 구조)
*/
parentPageId?: Guid | null;
/**
* 페이지 정렬 순서
*/
sortOrder?: number | null;
/**
* 페이지가 속할 스페이스 ID
*/
spaceId?: Guid | null;
/**
* 페이지 제목
*/
title?: string | null;
/**
* 현재 사용자 ID (생성자)
*/
userId?: Guid | null;
}
/** /**
* Creates a new instance of the appropriate class based on discriminator value * 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 * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -129,24 +58,6 @@ export function createPageResponseDto_parentPageIdFromDiscriminatorValue(parseNo
export function createPageResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createPageResponseDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoPageResponseDto; return deserializeIntoPageResponseDto;
} }
export interface CreateSpaceDto extends AdditionalDataHolder, Parsable {
/**
* 스페이스 설명
*/
description?: string | null;
/**
* 스페이스 이름
*/
name?: string | null;
/**
* 스페이스 키 (고유 식별자, URL에 사용)
*/
spaceKey?: string | null;
/**
* 현재 사용자 ID (생성자)
*/
userId?: Guid | null;
}
/** /**
* Creates a new instance of the appropriate class based on discriminator value * 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 * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -183,28 +94,6 @@ export function createSpaceStatisticsDto_statisticsFromDiscriminatorValue(parseN
export function createSpaceStatisticsDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createSpaceStatisticsDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoSpaceStatisticsDto; return deserializeIntoSpaceStatisticsDto;
} }
export interface CreateTemporaryTokenDto extends AdditionalDataHolder, Parsable {
/**
* 토큰 설명
*/
description?: string | null;
/**
* 토큰 만료 시간 (시간 단위). 생략하면 만료되지 않음
*/
expiresInHours?: number | null;
/**
* 접근 권한을 부여할 페이지 ID 배열
*/
pageIds?: UntypedNode[] | null;
/**
* 접근 권한을 부여할 스페이스 ID 배열
*/
spaceIds?: UntypedNode[] | null;
/**
* 현재 사용자 ID (토큰 생성자)
*/
userId?: Guid | null;
}
/** /**
* Creates a new instance of the appropriate class based on discriminator value * 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 * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -251,30 +140,6 @@ export interface CreateTokenResponseDto extends AdditionalDataHolder, ApiError,
*/ */
token?: TokenInfoDto | null; token?: TokenInfoDto | null;
} }
/**
* 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 {UpdatePageDto}
*/
// @ts-ignore
export function createUpdatePageDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoUpdatePageDto;
}
/**
* 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 {UpdateSpaceDto}
*/
// @ts-ignore
export function createUpdateSpaceDtoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoUpdateSpaceDto;
}
export interface DeletePageDto extends AdditionalDataHolder, Parsable {
/**
* 현재 사용자 ID
*/
userId?: Guid | null;
}
export interface DeleteResponseDto extends AdditionalDataHolder, ApiError, Parsable { export interface DeleteResponseDto extends AdditionalDataHolder, ApiError, Parsable {
/** /**
* 응답 메시지 * 응답 메시지
@@ -299,61 +164,6 @@ export interface DeleteSpaceResponseDto extends AdditionalDataHolder, ApiError,
*/ */
spaceId?: Guid | null; spaceId?: Guid | null;
} }
export interface DeleteTokenDto extends AdditionalDataHolder, Parsable {
/**
* 삭제할 토큰 값
*/
tokenValue?: string | null;
/**
* 현재 사용자 ID (토큰 생성자만 삭제 가능)
*/
userId?: Guid | null;
}
/**
* The deserialization information for the current model
* @param CreatePageDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoCreatePageDto(createPageDto: Partial<CreatePageDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"content": n => { createPageDto.content = n.getStringValue(); },
"parentPageId": n => { createPageDto.parentPageId = n.getGuidValue(); },
"sortOrder": n => { createPageDto.sortOrder = n.getNumberValue(); },
"spaceId": n => { createPageDto.spaceId = n.getGuidValue(); },
"title": n => { createPageDto.title = n.getStringValue(); },
"userId": n => { createPageDto.userId = n.getGuidValue(); },
}
}
/**
* The deserialization information for the current model
* @param CreateSpaceDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoCreateSpaceDto(createSpaceDto: Partial<CreateSpaceDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { createSpaceDto.description = n.getStringValue(); },
"name": n => { createSpaceDto.name = n.getStringValue(); },
"spaceKey": n => { createSpaceDto.spaceKey = n.getStringValue(); },
"userId": n => { createSpaceDto.userId = n.getGuidValue(); },
}
}
/**
* The deserialization information for the current model
* @param CreateTemporaryTokenDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoCreateTemporaryTokenDto(createTemporaryTokenDto: Partial<CreateTemporaryTokenDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { createTemporaryTokenDto.description = n.getStringValue(); },
"expiresInHours": n => { createTemporaryTokenDto.expiresInHours = n.getNumberValue(); },
"pageIds": n => { createTemporaryTokenDto.pageIds = n.getCollectionOfPrimitiveValues<UntypedNode>(); },
"spaceIds": n => { createTemporaryTokenDto.spaceIds = n.getCollectionOfPrimitiveValues<UntypedNode>(); },
"userId": n => { createTemporaryTokenDto.userId = n.getGuidValue(); },
}
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param CreateTokenResponseDto The instance to deserialize into. * @param CreateTokenResponseDto The instance to deserialize into.
@@ -366,17 +176,6 @@ export function deserializeIntoCreateTokenResponseDto(createTokenResponseDto: Pa
"token": n => { createTokenResponseDto.token = n.getObjectValue<TokenInfoDto>(createTokenInfoDtoFromDiscriminatorValue); }, "token": n => { createTokenResponseDto.token = n.getObjectValue<TokenInfoDto>(createTokenInfoDtoFromDiscriminatorValue); },
} }
} }
/**
* The deserialization information for the current model
* @param DeletePageDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoDeletePageDto(deletePageDto: Partial<DeletePageDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"userId": n => { deletePageDto.userId = n.getGuidValue(); },
}
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param DeleteResponseDto The instance to deserialize into. * @param DeleteResponseDto The instance to deserialize into.
@@ -402,18 +201,6 @@ export function deserializeIntoDeleteSpaceResponseDto(deleteSpaceResponseDto: Pa
"spaceId": n => { deleteSpaceResponseDto.spaceId = n.getGuidValue(); }, "spaceId": n => { deleteSpaceResponseDto.spaceId = n.getGuidValue(); },
} }
} }
/**
* The deserialization information for the current model
* @param DeleteTokenDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoDeleteTokenDto(deleteTokenDto: Partial<DeleteTokenDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"tokenValue": n => { deleteTokenDto.tokenValue = n.getStringValue(); },
"userId": n => { deleteTokenDto.userId = n.getGuidValue(); },
}
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param PageResponseDto The instance to deserialize into. * @param PageResponseDto The instance to deserialize into.
@@ -550,33 +337,6 @@ export function deserializeIntoTokenPermissionsDto(tokenPermissionsDto: Partial<
"spaceIds": n => { tokenPermissionsDto.spaceIds = n.getCollectionOfPrimitiveValues<string>(); }, "spaceIds": n => { tokenPermissionsDto.spaceIds = n.getCollectionOfPrimitiveValues<string>(); },
} }
} }
/**
* The deserialization information for the current model
* @param UpdatePageDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUpdatePageDto(updatePageDto: Partial<UpdatePageDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"content": n => { updatePageDto.content = n.getStringValue(); },
"parentPageId": n => { updatePageDto.parentPageId = n.getGuidValue(); },
"sortOrder": n => { updatePageDto.sortOrder = n.getNumberValue(); },
"title": n => { updatePageDto.title = n.getStringValue(); },
"userId": n => { updatePageDto.userId = n.getGuidValue(); },
}
}
/**
* The deserialization information for the current model
* @param UpdateSpaceDto The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUpdateSpaceDto(updateSpaceDto: Partial<UpdateSpaceDto> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { updateSpaceDto.description = n.getStringValue(); },
"name": n => { updateSpaceDto.name = n.getStringValue(); },
}
}
export interface PageResponseDto extends AdditionalDataHolder, ApiError, Parsable { export interface PageResponseDto extends AdditionalDataHolder, ApiError, Parsable {
/** /**
* 페이지 내용 * 페이지 내용
@@ -633,54 +393,6 @@ export interface PageResponseDto_content extends AdditionalDataHolder, Parsable
*/ */
export interface PageResponseDto_parentPageId extends AdditionalDataHolder, Parsable { export interface PageResponseDto_parentPageId extends AdditionalDataHolder, Parsable {
} }
/**
* Serializes information the current object
* @param CreatePageDto The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeCreatePageDto(writer: SerializationWriter, createPageDto: Partial<CreatePageDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!createPageDto || isSerializingDerivedType) { return; }
writer.writeStringValue("content", createPageDto.content);
writer.writeGuidValue("parentPageId", createPageDto.parentPageId);
writer.writeNumberValue("sortOrder", createPageDto.sortOrder);
writer.writeGuidValue("spaceId", createPageDto.spaceId);
writer.writeStringValue("title", createPageDto.title);
writer.writeGuidValue("userId", createPageDto.userId);
writer.writeAdditionalData(createPageDto.additionalData);
}
/**
* Serializes information the current object
* @param CreateSpaceDto The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeCreateSpaceDto(writer: SerializationWriter, createSpaceDto: Partial<CreateSpaceDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!createSpaceDto || isSerializingDerivedType) { return; }
writer.writeStringValue("description", createSpaceDto.description);
writer.writeStringValue("name", createSpaceDto.name);
writer.writeStringValue("spaceKey", createSpaceDto.spaceKey);
writer.writeGuidValue("userId", createSpaceDto.userId);
writer.writeAdditionalData(createSpaceDto.additionalData);
}
/**
* Serializes information the current object
* @param CreateTemporaryTokenDto The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeCreateTemporaryTokenDto(writer: SerializationWriter, createTemporaryTokenDto: Partial<CreateTemporaryTokenDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!createTemporaryTokenDto || isSerializingDerivedType) { return; }
writer.writeStringValue("description", createTemporaryTokenDto.description);
writer.writeNumberValue("expiresInHours", createTemporaryTokenDto.expiresInHours);
writer.writeCollectionOfPrimitiveValues<UntypedNode>("pageIds", createTemporaryTokenDto.pageIds);
writer.writeCollectionOfPrimitiveValues<UntypedNode>("spaceIds", createTemporaryTokenDto.spaceIds);
writer.writeGuidValue("userId", createTemporaryTokenDto.userId);
writer.writeAdditionalData(createTemporaryTokenDto.additionalData);
}
/** /**
* Serializes information the current object * Serializes information the current object
* @param CreateTokenResponseDto The instance to serialize from. * @param CreateTokenResponseDto The instance to serialize from.
@@ -694,18 +406,6 @@ export function serializeCreateTokenResponseDto(writer: SerializationWriter, cre
writer.writeObjectValue<TokenInfoDto>("token", createTokenResponseDto.token, serializeTokenInfoDto); writer.writeObjectValue<TokenInfoDto>("token", createTokenResponseDto.token, serializeTokenInfoDto);
writer.writeAdditionalData(createTokenResponseDto.additionalData); writer.writeAdditionalData(createTokenResponseDto.additionalData);
} }
/**
* Serializes information the current object
* @param DeletePageDto The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeDeletePageDto(writer: SerializationWriter, deletePageDto: Partial<DeletePageDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!deletePageDto || isSerializingDerivedType) { return; }
writer.writeGuidValue("userId", deletePageDto.userId);
writer.writeAdditionalData(deletePageDto.additionalData);
}
/** /**
* Serializes information the current object * Serializes information the current object
* @param DeleteResponseDto The instance to serialize from. * @param DeleteResponseDto The instance to serialize from.
@@ -733,19 +433,6 @@ export function serializeDeleteSpaceResponseDto(writer: SerializationWriter, del
writer.writeGuidValue("spaceId", deleteSpaceResponseDto.spaceId); writer.writeGuidValue("spaceId", deleteSpaceResponseDto.spaceId);
writer.writeAdditionalData(deleteSpaceResponseDto.additionalData); writer.writeAdditionalData(deleteSpaceResponseDto.additionalData);
} }
/**
* Serializes information the current object
* @param DeleteTokenDto The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeDeleteTokenDto(writer: SerializationWriter, deleteTokenDto: Partial<DeleteTokenDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!deleteTokenDto || isSerializingDerivedType) { return; }
writer.writeStringValue("tokenValue", deleteTokenDto.tokenValue);
writer.writeGuidValue("userId", deleteTokenDto.userId);
writer.writeAdditionalData(deleteTokenDto.additionalData);
}
/** /**
* Serializes information the current object * Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
@@ -893,35 +580,6 @@ export function serializeTokenPermissionsDto(writer: SerializationWriter, tokenP
writer.writeCollectionOfPrimitiveValues<string>("spaceIds", tokenPermissionsDto.spaceIds); writer.writeCollectionOfPrimitiveValues<string>("spaceIds", tokenPermissionsDto.spaceIds);
writer.writeAdditionalData(tokenPermissionsDto.additionalData); writer.writeAdditionalData(tokenPermissionsDto.additionalData);
} }
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UpdatePageDto The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUpdatePageDto(writer: SerializationWriter, updatePageDto: Partial<UpdatePageDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!updatePageDto || isSerializingDerivedType) { return; }
writer.writeStringValue("content", updatePageDto.content);
writer.writeGuidValue("parentPageId", updatePageDto.parentPageId);
writer.writeNumberValue("sortOrder", updatePageDto.sortOrder);
writer.writeStringValue("title", updatePageDto.title);
writer.writeGuidValue("userId", updatePageDto.userId);
writer.writeAdditionalData(updatePageDto.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UpdateSpaceDto The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUpdateSpaceDto(writer: SerializationWriter, updateSpaceDto: Partial<UpdateSpaceDto> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!updateSpaceDto || isSerializingDerivedType) { return; }
writer.writeStringValue("description", updateSpaceDto.description);
writer.writeStringValue("name", updateSpaceDto.name);
writer.writeAdditionalData(updateSpaceDto.additionalData);
}
export interface SpaceResponseDto extends AdditionalDataHolder, ApiError, Parsable { export interface SpaceResponseDto extends AdditionalDataHolder, ApiError, Parsable {
/** /**
* 생성 시간 * 생성 시간
@@ -1010,37 +668,5 @@ export interface TokenPermissionsDto extends AdditionalDataHolder, Parsable {
*/ */
spaceIds?: string[] | null; spaceIds?: string[] | null;
} }
export interface UpdatePageDto extends AdditionalDataHolder, Parsable {
/**
* 페이지 내용
*/
content?: string | null;
/**
* 부모 페이지 ID (null로 설정하면 루트 페이지가 됨)
*/
parentPageId?: Guid | null;
/**
* 페이지 정렬 순서
*/
sortOrder?: number | null;
/**
* 페이지 제목
*/
title?: string | null;
/**
* 현재 사용자 ID (수정자)
*/
userId?: Guid | null;
}
export interface UpdateSpaceDto extends AdditionalDataHolder, Parsable {
/**
* 스페이스 설명
*/
description?: string | null;
/**
* 스페이스 이름
*/
name?: string | null;
}
/* tslint:enable */ /* tslint:enable */
/* eslint-enable */ /* eslint-enable */
+72 -10
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createPageResponseDtoFromDiscriminatorValue, serializeCreatePageDto, serializePageResponseDto, type CreatePageDto, type PageResponseDto } from '../../models/index.js'; import { createPageResponseDtoFromDiscriminatorValue, serializePageResponseDto, type PageResponseDto } from '../../models/index.js';
// @ts-ignore // @ts-ignore
import { type WithPageItemRequestBuilder, WithPageItemRequestBuilderRequestsMetadata } from './item/index.js'; import { type WithPageItemRequestBuilder, WithPageItemRequestBuilderRequestsMetadata } from './item/index.js';
// @ts-ignore // @ts-ignore
@@ -28,6 +28,15 @@ export function createPage4XXErrorFromDiscriminatorValue(parseNode: ParseNode |
export function createPage5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createPage5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoPage5XXError; return deserializeIntoPage5XXError;
} }
/**
* 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 {PagePostRequestBody}
*/
// @ts-ignore
export function createPagePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoPagePostRequestBody;
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param Page4XXError The instance to deserialize into. * @param Page4XXError The instance to deserialize into.
@@ -48,10 +57,47 @@ export function deserializeIntoPage5XXError(page5XXError: Partial<Page5XXError>
return { return {
} }
} }
/**
* The deserialization information for the current model
* @param PagePostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPagePostRequestBody(pagePostRequestBody: Partial<PagePostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"content": n => { pagePostRequestBody.content = n.getStringValue(); },
"parentPageId": n => { pagePostRequestBody.parentPageId = n.getGuidValue(); },
"sortOrder": n => { pagePostRequestBody.sortOrder = n.getNumberValue(); },
"spaceId": n => { pagePostRequestBody.spaceId = n.getGuidValue(); },
"title": n => { pagePostRequestBody.title = n.getStringValue(); },
}
}
export interface Page4XXError extends AdditionalDataHolder, ApiError, Parsable { export interface Page4XXError extends AdditionalDataHolder, ApiError, Parsable {
} }
export interface Page5XXError extends AdditionalDataHolder, ApiError, Parsable { export interface Page5XXError extends AdditionalDataHolder, ApiError, Parsable {
} }
export interface PagePostRequestBody extends AdditionalDataHolder, Parsable {
/**
* 페이지 내용 (Markdown)
*/
content?: string | null;
/**
* 부모 페이지 ID (선택사항)
*/
parentPageId?: Guid | null;
/**
* 정렬 순서
*/
sortOrder?: number | null;
/**
* 페이지가 속할 스페이스 ID
*/
spaceId?: Guid | null;
/**
* 페이지 제목
*/
title?: string | null;
}
/** /**
* Builds and executes requests for operations under /v1/page * Builds and executes requests for operations under /v1/page
*/ */
@@ -67,37 +113,37 @@ export interface PageRequestBuilder extends BaseRequestBuilder<PageRequestBuilde
*/ */
byPageId(pageId: Guid) : WithPageItemRequestBuilder; byPageId(pageId: Guid) : WithPageItemRequestBuilder;
/** /**
* pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. * pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<PageResponseDto[]>} * @returns {Promise<PageResponseDto[]>}
* @throws {Page4XXError} error when the service returns a 4XX status code * @throws {Page4XXError} error when the service returns a 4XX status code
* @throws {Page5XXError} error when the service returns a 5XX status code * @throws {Page5XXError} error when the service returns a 5XX status code
*/ */
get(requestConfiguration?: RequestConfiguration<PageRequestBuilderGetQueryParameters> | undefined) : Promise<PageResponseDto[] | undefined>; get(requestConfiguration?: RequestConfiguration<PageRequestBuilderGetQueryParameters> | undefined) : Promise<PageResponseDto| PageResponseDto[] | undefined>;
/** /**
* 새로운 페이지를 생성합니다. 스페이스 내에서 계층 구조를 가질 수 있습니다. * 새로운 페이지를 생성합니다. 스페이스 내에서 계층 구조를 가질 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<PageResponseDto>} * @returns {Promise<PageResponseDto>}
* @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code * @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
post(body: CreatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>; post(body: PagePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>;
/** /**
* pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. * pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toGetRequestInformation(requestConfiguration?: RequestConfiguration<PageRequestBuilderGetQueryParameters> | undefined) : RequestInformation; toGetRequestInformation(requestConfiguration?: RequestConfiguration<PageRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
/** /**
* 새로운 페이지를 생성합니다. 스페이스 내에서 계층 구조를 가질 수 있습니다. * 새로운 페이지를 생성합니다. 스페이스 내에서 계층 구조를 가질 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toPostRequestInformation(body: CreatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toPostRequestInformation(body: PagePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
} }
/** /**
* pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. * pageId로 특정 페이지를 조회하거나, spaceId로 스페이스의 모든 페이지를 조회합니다. (공개 접근 가능)
*/ */
export interface PageRequestBuilderGetQueryParameters { export interface PageRequestBuilderGetQueryParameters {
/** /**
@@ -131,6 +177,22 @@ export function serializePage5XXError(writer: SerializationWriter, page5XXError:
if (!page5XXError || isSerializingDerivedType) { return; } if (!page5XXError || isSerializingDerivedType) { return; }
writer.writeAdditionalData(page5XXError.additionalData); writer.writeAdditionalData(page5XXError.additionalData);
} }
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param PagePostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePagePostRequestBody(writer: SerializationWriter, pagePostRequestBody: Partial<PagePostRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!pagePostRequestBody || isSerializingDerivedType) { return; }
writer.writeStringValue("content", pagePostRequestBody.content);
writer.writeGuidValue("parentPageId", pagePostRequestBody.parentPageId);
writer.writeNumberValue("sortOrder", pagePostRequestBody.sortOrder);
writer.writeGuidValue("spaceId", pagePostRequestBody.spaceId);
writer.writeStringValue("title", pagePostRequestBody.title);
writer.writeAdditionalData(pagePostRequestBody.additionalData);
}
/** /**
* Uri template for the request builder. * Uri template for the request builder.
*/ */
@@ -170,7 +232,7 @@ export const PageRequestBuilderRequestsMetadata: RequestsMetadata = {
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createPageResponseDtoFromDiscriminatorValue, responseBodyFactory: createPageResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeCreatePageDto, requestBodySerializer: serializePagePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
}; };
+69 -18
View File
@@ -2,44 +2,98 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createDeleteResponseDtoFromDiscriminatorValue, createPageResponseDtoFromDiscriminatorValue, serializeDeletePageDto, serializeDeleteResponseDto, serializePageResponseDto, serializeUpdatePageDto, type DeletePageDto, type DeleteResponseDto, type PageResponseDto, type UpdatePageDto } from '../../../models/index.js'; import { createDeleteResponseDtoFromDiscriminatorValue, createPageResponseDtoFromDiscriminatorValue, serializePageResponseDto, type DeleteResponseDto, type PageResponseDto } from '../../../models/index.js';
// @ts-ignore // @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; 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<string, (node: ParseNode) => void>) {
return deserializeIntoWithPagePutRequestBody;
}
/**
* The deserialization information for the current model
* @param WithPagePutRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoWithPagePutRequestBody(withPagePutRequestBody: Partial<WithPagePutRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => 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<WithPagePutRequestBody> | 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} * Builds and executes requests for operations under /v1/page/{pageId}
*/ */
export interface WithPageItemRequestBuilder extends BaseRequestBuilder<WithPageItemRequestBuilder> { export interface WithPageItemRequestBuilder extends BaseRequestBuilder<WithPageItemRequestBuilder> {
/** /**
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). * 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요)
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<DeleteResponseDto>} * @returns {Promise<DeleteResponseDto>}
* @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code * @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
delete(body: DeletePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>; delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>;
/** /**
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. * 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<PageResponseDto>} * @returns {Promise<PageResponseDto>}
* @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code * @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
put(body: UpdatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>; put(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>;
/** /**
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). * 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toDeleteRequestInformation(body: DeletePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toPutRequestInformation(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
export interface WithPagePutRequestBody extends AdditionalDataHolder, Parsable {
/** /**
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. * 페이지 내용 (Markdown)
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/ */
toPutRequestInformation(body: UpdatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; content?: string | null;
/**
* 부모 페이지 ID (null로 설정하면 루트 페이지가 됨)
*/
parentPageId?: Guid | null;
/**
* 정렬 순서
*/
sortOrder?: number | null;
/**
* 페이지 제목
*/
title?: string | null;
} }
/** /**
* Uri template for the request builder. * Uri template for the request builder.
@@ -57,9 +111,6 @@ export const WithPageItemRequestBuilderRequestsMetadata: RequestsMetadata = {
}, },
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue, responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeDeletePageDto,
requestInformationContentSetMethod: "setContentFromParsable",
}, },
put: { put: {
uriTemplate: WithPageItemRequestBuilderUriTemplate, uriTemplate: WithPageItemRequestBuilderUriTemplate,
@@ -70,7 +121,7 @@ export const WithPageItemRequestBuilderRequestsMetadata: RequestsMetadata = {
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createPageResponseDtoFromDiscriminatorValue, responseBodyFactory: createPageResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeUpdatePageDto, requestBodySerializer: serializeWithPagePutRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
}; };
+106 -12
View File
@@ -2,44 +2,138 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createCreateTokenResponseDtoFromDiscriminatorValue, createDeleteResponseDtoFromDiscriminatorValue, serializeCreateTemporaryTokenDto, serializeCreateTokenResponseDto, serializeDeleteResponseDto, serializeDeleteTokenDto, type CreateTemporaryTokenDto, type CreateTokenResponseDto, type DeleteResponseDto, type DeleteTokenDto } from '../../../models/index.js'; import { createCreateTokenResponseDtoFromDiscriminatorValue, createDeleteResponseDtoFromDiscriminatorValue, serializeCreateTokenResponseDto, serializeDeleteResponseDto, type CreateTokenResponseDto, type DeleteResponseDto } from '../../../models/index.js';
// @ts-ignore // @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; 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 {TemporaryAccessTokenDeleteRequestBody}
*/
// @ts-ignore
export function createTemporaryAccessTokenDeleteRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoTemporaryAccessTokenDeleteRequestBody;
}
/**
* 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 {TemporaryAccessTokenPostRequestBody}
*/
// @ts-ignore
export function createTemporaryAccessTokenPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoTemporaryAccessTokenPostRequestBody;
}
/**
* The deserialization information for the current model
* @param TemporaryAccessTokenDeleteRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoTemporaryAccessTokenDeleteRequestBody(temporaryAccessTokenDeleteRequestBody: Partial<TemporaryAccessTokenDeleteRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"tokenValue": n => { temporaryAccessTokenDeleteRequestBody.tokenValue = n.getStringValue(); },
}
}
/**
* The deserialization information for the current model
* @param TemporaryAccessTokenPostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoTemporaryAccessTokenPostRequestBody(temporaryAccessTokenPostRequestBody: Partial<TemporaryAccessTokenPostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { temporaryAccessTokenPostRequestBody.description = n.getStringValue(); },
"expiresInHours": n => { temporaryAccessTokenPostRequestBody.expiresInHours = n.getNumberValue(); },
"pageIds": n => { temporaryAccessTokenPostRequestBody.pageIds = n.getCollectionOfPrimitiveValues<Guid>(); },
"spaceIds": n => { temporaryAccessTokenPostRequestBody.spaceIds = n.getCollectionOfPrimitiveValues<Guid>(); },
}
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param TemporaryAccessTokenDeleteRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeTemporaryAccessTokenDeleteRequestBody(writer: SerializationWriter, temporaryAccessTokenDeleteRequestBody: Partial<TemporaryAccessTokenDeleteRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!temporaryAccessTokenDeleteRequestBody || isSerializingDerivedType) { return; }
writer.writeStringValue("tokenValue", temporaryAccessTokenDeleteRequestBody.tokenValue);
writer.writeAdditionalData(temporaryAccessTokenDeleteRequestBody.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param TemporaryAccessTokenPostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeTemporaryAccessTokenPostRequestBody(writer: SerializationWriter, temporaryAccessTokenPostRequestBody: Partial<TemporaryAccessTokenPostRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!temporaryAccessTokenPostRequestBody || isSerializingDerivedType) { return; }
writer.writeStringValue("description", temporaryAccessTokenPostRequestBody.description);
writer.writeNumberValue("expiresInHours", temporaryAccessTokenPostRequestBody.expiresInHours);
writer.writeCollectionOfPrimitiveValues<Guid>("pageIds", temporaryAccessTokenPostRequestBody.pageIds);
writer.writeCollectionOfPrimitiveValues<Guid>("spaceIds", temporaryAccessTokenPostRequestBody.spaceIds);
writer.writeAdditionalData(temporaryAccessTokenPostRequestBody.additionalData);
}
export interface TemporaryAccessTokenDeleteRequestBody extends AdditionalDataHolder, Parsable {
/**
* 삭제할 토큰 값
*/
tokenValue?: string | null;
}
export interface TemporaryAccessTokenPostRequestBody extends AdditionalDataHolder, Parsable {
/**
* 토큰 설명
*/
description?: string | null;
/**
* 토큰 만료 시간 (시간 단위)
*/
expiresInHours?: number | null;
/**
* 접근 권한을 부여할 페이지 ID 배열
*/
pageIds?: Guid[] | null;
/**
* 접근 권한을 부여할 스페이스 ID 배열
*/
spaceIds?: Guid[] | null;
}
/** /**
* Builds and executes requests for operations under /v1/page/temporary-access-token * Builds and executes requests for operations under /v1/page/temporary-access-token
*/ */
export interface TemporaryAccessTokenRequestBuilder extends BaseRequestBuilder<TemporaryAccessTokenRequestBuilder> { export interface TemporaryAccessTokenRequestBuilder extends BaseRequestBuilder<TemporaryAccessTokenRequestBuilder> {
/** /**
* 임시 액세스 토큰을 삭제합니다. 토큰 생성자만 삭제할 수 있습니다. * 임시 액세스 토큰을 삭제합니다. 토큰 생성자만 삭제할 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<DeleteResponseDto>} * @returns {Promise<DeleteResponseDto>}
* @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code * @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
delete(body: DeleteTokenDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>; delete(body: TemporaryAccessTokenDeleteRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>;
/** /**
* 특정 페이지 또는 스페이스에 대한 접근 권한을 가진 임시 토큰을 생성합니다. 토큰은 여러 페이지/스페이스에 대한 권한을 배열로 가질 수 있습니다. * 특정 페이지 또는 스페이스에 대한 접근 권한을 가진 임시 토큰을 생성합니다. 토큰은 여러 페이지/스페이스에 대한 권한을 배열로 가질 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<CreateTokenResponseDto>} * @returns {Promise<CreateTokenResponseDto>}
* @throws {CreateTokenResponseDto} error when the service returns a 4XX or 5XX status code * @throws {CreateTokenResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
post(body: CreateTemporaryTokenDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<CreateTokenResponseDto | undefined>; post(body: TemporaryAccessTokenPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<CreateTokenResponseDto | undefined>;
/** /**
* 임시 액세스 토큰을 삭제합니다. 토큰 생성자만 삭제할 수 있습니다. * 임시 액세스 토큰을 삭제합니다. 토큰 생성자만 삭제할 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toDeleteRequestInformation(body: DeleteTokenDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toDeleteRequestInformation(body: TemporaryAccessTokenDeleteRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/** /**
* 특정 페이지 또는 스페이스에 대한 접근 권한을 가진 임시 토큰을 생성합니다. 토큰은 여러 페이지/스페이스에 대한 권한을 배열로 가질 수 있습니다. * 특정 페이지 또는 스페이스에 대한 접근 권한을 가진 임시 토큰을 생성합니다. 토큰은 여러 페이지/스페이스에 대한 권한을 배열로 가질 수 있습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toPostRequestInformation(body: CreateTemporaryTokenDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toPostRequestInformation(body: TemporaryAccessTokenPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
} }
/** /**
* Uri template for the request builder. * Uri template for the request builder.
@@ -58,7 +152,7 @@ export const TemporaryAccessTokenRequestBuilderRequestsMetadata: RequestsMetadat
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue, responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeDeleteTokenDto, requestBodySerializer: serializeTemporaryAccessTokenDeleteRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
post: { post: {
@@ -70,7 +164,7 @@ export const TemporaryAccessTokenRequestBuilderRequestsMetadata: RequestsMetadat
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createCreateTokenResponseDtoFromDiscriminatorValue, responseBodyFactory: createCreateTokenResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeCreateTemporaryTokenDto, requestBodySerializer: serializeTemporaryAccessTokenPostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
}; };
+59 -9
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createSpaceResponseDtoFromDiscriminatorValue, serializeCreateSpaceDto, serializeSpaceResponseDto, type CreateSpaceDto, type SpaceResponseDto } from '../../models/index.js'; import { createSpaceResponseDtoFromDiscriminatorValue, serializeSpaceResponseDto, type SpaceResponseDto } from '../../models/index.js';
// @ts-ignore // @ts-ignore
import { type WithSpaceItemRequestBuilder, WithSpaceItemRequestBuilderNavigationMetadata, WithSpaceItemRequestBuilderRequestsMetadata } from './item/index.js'; import { type WithSpaceItemRequestBuilder, WithSpaceItemRequestBuilderNavigationMetadata, WithSpaceItemRequestBuilderRequestsMetadata } from './item/index.js';
// @ts-ignore // @ts-ignore
@@ -30,6 +30,15 @@ export function createSpace4XXErrorFromDiscriminatorValue(parseNode: ParseNode |
export function createSpace5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createSpace5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoSpace5XXError; return deserializeIntoSpace5XXError;
} }
/**
* 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 {SpacePostRequestBody}
*/
// @ts-ignore
export function createSpacePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoSpacePostRequestBody;
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param Space4XXError The instance to deserialize into. * @param Space4XXError The instance to deserialize into.
@@ -50,6 +59,19 @@ export function deserializeIntoSpace5XXError(space5XXError: Partial<Space5XXErro
return { return {
} }
} }
/**
* The deserialization information for the current model
* @param SpacePostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSpacePostRequestBody(spacePostRequestBody: Partial<SpacePostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { spacePostRequestBody.description = n.getStringValue(); },
"name": n => { spacePostRequestBody.name = n.getStringValue(); },
"spaceKey": n => { spacePostRequestBody.spaceKey = n.getStringValue(); },
}
}
/** /**
* Serializes information the current object * Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
@@ -72,10 +94,38 @@ export function serializeSpace5XXError(writer: SerializationWriter, space5XXErro
if (!space5XXError || isSerializingDerivedType) { return; } if (!space5XXError || isSerializingDerivedType) { return; }
writer.writeAdditionalData(space5XXError.additionalData); writer.writeAdditionalData(space5XXError.additionalData);
} }
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SpacePostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSpacePostRequestBody(writer: SerializationWriter, spacePostRequestBody: Partial<SpacePostRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!spacePostRequestBody || isSerializingDerivedType) { return; }
writer.writeStringValue("description", spacePostRequestBody.description);
writer.writeStringValue("name", spacePostRequestBody.name);
writer.writeStringValue("spaceKey", spacePostRequestBody.spaceKey);
writer.writeAdditionalData(spacePostRequestBody.additionalData);
}
export interface Space4XXError extends AdditionalDataHolder, ApiError, Parsable { export interface Space4XXError extends AdditionalDataHolder, ApiError, Parsable {
} }
export interface Space5XXError extends AdditionalDataHolder, ApiError, Parsable { export interface Space5XXError extends AdditionalDataHolder, ApiError, Parsable {
} }
export interface SpacePostRequestBody extends AdditionalDataHolder, Parsable {
/**
* 스페이스 설명
*/
description?: string | null;
/**
* 스페이스 이름
*/
name?: string | null;
/**
* 스페이스 키 (고유 식별자, URL에 사용, 소문자/숫자/하이픈만 허용)
*/
spaceKey?: string | null;
}
/** /**
* Builds and executes requests for operations under /v1/space * Builds and executes requests for operations under /v1/space
*/ */
@@ -95,7 +145,7 @@ export interface SpaceRequestBuilder extends BaseRequestBuilder<SpaceRequestBuil
*/ */
bySpaceId(spaceId: Guid) : WithSpaceItemRequestBuilder; bySpaceId(spaceId: Guid) : WithSpaceItemRequestBuilder;
/** /**
* 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto[]>} * @returns {Promise<SpaceResponseDto[]>}
* @throws {Space4XXError} error when the service returns a 4XX status code * @throws {Space4XXError} error when the service returns a 4XX status code
@@ -103,29 +153,29 @@ export interface SpaceRequestBuilder extends BaseRequestBuilder<SpaceRequestBuil
*/ */
get(requestConfiguration?: RequestConfiguration<SpaceRequestBuilderGetQueryParameters> | undefined) : Promise<SpaceResponseDto[] | undefined>; get(requestConfiguration?: RequestConfiguration<SpaceRequestBuilderGetQueryParameters> | undefined) : Promise<SpaceResponseDto[] | undefined>;
/** /**
* 새로운 스페이스를 생성합니다. 스페이스 키는 고유해야 하며 URL에 사용됩니다. * 새로운 스페이스를 생성합니다. 스페이스 키는 고유해야 하며 URL에 사용됩니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto>} * @returns {Promise<SpaceResponseDto>}
* @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code * @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
post(body: CreateSpaceDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>; post(body: SpacePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>;
/** /**
* 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SpaceRequestBuilderGetQueryParameters> | undefined) : RequestInformation; toGetRequestInformation(requestConfiguration?: RequestConfiguration<SpaceRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
/** /**
* 새로운 스페이스를 생성합니다. 스페이스 키는 고유해야 하며 URL에 사용됩니다. * 새로운 스페이스를 생성합니다. 스페이스 키는 고유해야 하며 URL에 사용됩니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toPostRequestInformation(body: CreateSpaceDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toPostRequestInformation(body: SpacePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
} }
/** /**
* 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 시스템의 모든 스페이스를 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
*/ */
export interface SpaceRequestBuilderGetQueryParameters { export interface SpaceRequestBuilderGetQueryParameters {
/** /**
@@ -176,7 +226,7 @@ export const SpaceRequestBuilderRequestsMetadata: RequestsMetadata = {
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createSpaceResponseDtoFromDiscriminatorValue, responseBodyFactory: createSpaceResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeCreateSpaceDto, requestBodySerializer: serializeSpacePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
}; };
+55 -11
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
// Generated by Microsoft Kiota // Generated by Microsoft Kiota
// @ts-ignore // @ts-ignore
import { createDeleteSpaceResponseDtoFromDiscriminatorValue, createSpaceResponseDtoFromDiscriminatorValue, serializeSpaceResponseDto, serializeUpdateSpaceDto, type DeleteSpaceResponseDto, type SpaceResponseDto, type UpdateSpaceDto } from '../../../models/index.js'; import { createDeleteSpaceResponseDtoFromDiscriminatorValue, createSpaceResponseDtoFromDiscriminatorValue, serializeSpaceResponseDto, type DeleteSpaceResponseDto, type SpaceResponseDto } from '../../../models/index.js';
// @ts-ignore // @ts-ignore
import { StatisticsRequestBuilderRequestsMetadata, type StatisticsRequestBuilder } from './statistics/index.js'; import { StatisticsRequestBuilderRequestsMetadata, type StatisticsRequestBuilder } from './statistics/index.js';
// @ts-ignore // @ts-ignore
@@ -26,6 +26,15 @@ export function createSpaceResponseDto4XXErrorFromDiscriminatorValue(parseNode:
export function createSpaceResponseDto5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { export function createSpaceResponseDto5XXErrorFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoSpaceResponseDto5XXError; return deserializeIntoSpaceResponseDto5XXError;
} }
/**
* 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 {WithSpacePutRequestBody}
*/
// @ts-ignore
export function createWithSpacePutRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoWithSpacePutRequestBody;
}
/** /**
* The deserialization information for the current model * The deserialization information for the current model
* @param SpaceResponseDto4XXError The instance to deserialize into. * @param SpaceResponseDto4XXError The instance to deserialize into.
@@ -46,6 +55,18 @@ export function deserializeIntoSpaceResponseDto5XXError(spaceResponseDto5XXError
return { return {
} }
} }
/**
* The deserialization information for the current model
* @param WithSpacePutRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoWithSpacePutRequestBody(withSpacePutRequestBody: Partial<WithSpacePutRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"description": n => { withSpacePutRequestBody.description = n.getStringValue(); },
"name": n => { withSpacePutRequestBody.name = n.getStringValue(); },
}
}
/** /**
* Serializes information the current object * Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
@@ -68,6 +89,19 @@ export function serializeSpaceResponseDto5XXError(writer: SerializationWriter, s
if (!spaceResponseDto5XXError || isSerializingDerivedType) { return; } if (!spaceResponseDto5XXError || isSerializingDerivedType) { return; }
writer.writeAdditionalData(spaceResponseDto5XXError.additionalData); writer.writeAdditionalData(spaceResponseDto5XXError.additionalData);
} }
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param WithSpacePutRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeWithSpacePutRequestBody(writer: SerializationWriter, withSpacePutRequestBody: Partial<WithSpacePutRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
if (!withSpacePutRequestBody || isSerializingDerivedType) { return; }
writer.writeStringValue("description", withSpacePutRequestBody.description);
writer.writeStringValue("name", withSpacePutRequestBody.name);
writer.writeAdditionalData(withSpacePutRequestBody.additionalData);
}
export interface SpaceResponseDto4XXError extends AdditionalDataHolder, ApiError, Parsable { export interface SpaceResponseDto4XXError extends AdditionalDataHolder, ApiError, Parsable {
} }
export interface SpaceResponseDto5XXError extends AdditionalDataHolder, ApiError, Parsable { export interface SpaceResponseDto5XXError extends AdditionalDataHolder, ApiError, Parsable {
@@ -81,14 +115,14 @@ export interface WithSpaceItemRequestBuilder extends BaseRequestBuilder<WithSpac
*/ */
get statistics(): StatisticsRequestBuilder; get statistics(): StatisticsRequestBuilder;
/** /**
* 스페이스를 삭제합니다. CASCADE 설정으로 해당 스페이스의 모든 페이지도 함께 삭제됩니다. * 스페이스를 삭제합니다. CASCADE 설정으로 해당 스페이스의 모든 페이지도 함께 삭제됩니다. (인증 필요)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<DeleteSpaceResponseDto>} * @returns {Promise<DeleteSpaceResponseDto>}
* @throws {DeleteSpaceResponseDto} error when the service returns a 4XX or 5XX status code * @throws {DeleteSpaceResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteSpaceResponseDto | undefined>; delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteSpaceResponseDto | undefined>;
/** /**
* 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto>} * @returns {Promise<SpaceResponseDto>}
* @throws {SpaceResponseDto4XXError} error when the service returns a 4XX status code * @throws {SpaceResponseDto4XXError} error when the service returns a 4XX status code
@@ -96,35 +130,35 @@ export interface WithSpaceItemRequestBuilder extends BaseRequestBuilder<WithSpac
*/ */
get(requestConfiguration?: RequestConfiguration<WithSpaceItemRequestBuilderGetQueryParameters> | undefined) : Promise<SpaceResponseDto | undefined>; get(requestConfiguration?: RequestConfiguration<WithSpaceItemRequestBuilderGetQueryParameters> | undefined) : Promise<SpaceResponseDto | undefined>;
/** /**
* 스페이스의 이름과 설명을 업데이트합니다. 스페이스 키는 변경할 수 없습니다. * 스페이스의 이름과 설명을 업데이트합니다. 스페이스 키는 변경할 수 없습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto>} * @returns {Promise<SpaceResponseDto>}
* @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code * @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
put(body: UpdateSpaceDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>; put(body: WithSpacePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>;
/** /**
* 스페이스를 삭제합니다. CASCADE 설정으로 해당 스페이스의 모든 페이지도 함께 삭제됩니다. * 스페이스를 삭제합니다. CASCADE 설정으로 해당 스페이스의 모든 페이지도 함께 삭제됩니다. (인증 필요)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/** /**
* 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithSpaceItemRequestBuilderGetQueryParameters> | undefined) : RequestInformation; toGetRequestInformation(requestConfiguration?: RequestConfiguration<WithSpaceItemRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
/** /**
* 스페이스의 이름과 설명을 업데이트합니다. 스페이스 키는 변경할 수 없습니다. * 스페이스의 이름과 설명을 업데이트합니다. 스페이스 키는 변경할 수 없습니다. (인증 필요)
* @param body The request body * @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
toPutRequestInformation(body: UpdateSpaceDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; toPutRequestInformation(body: WithSpacePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
} }
/** /**
* 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. * 특정 스페이스를 ID로 조회합니다. withCreator 파라미터로 생성자 정보 포함 여부를 선택할 수 있습니다. (공개 접근 가능)
*/ */
export interface WithSpaceItemRequestBuilderGetQueryParameters { export interface WithSpaceItemRequestBuilderGetQueryParameters {
/** /**
@@ -132,6 +166,16 @@ export interface WithSpaceItemRequestBuilderGetQueryParameters {
*/ */
withCreator?: boolean; withCreator?: boolean;
} }
export interface WithSpacePutRequestBody extends AdditionalDataHolder, Parsable {
/**
* 스페이스 설명
*/
description?: string | null;
/**
* 스페이스 이름
*/
name?: string | null;
}
/** /**
* Uri template for the request builder. * Uri template for the request builder.
*/ */
@@ -176,7 +220,7 @@ export const WithSpaceItemRequestBuilderRequestsMetadata: RequestsMetadata = {
adapterMethodName: "send", adapterMethodName: "send",
responseBodyFactory: createSpaceResponseDtoFromDiscriminatorValue, responseBodyFactory: createSpaceResponseDtoFromDiscriminatorValue,
requestBodyContentType: "application/json", requestBodyContentType: "application/json",
requestBodySerializer: serializeUpdateSpaceDto, requestBodySerializer: serializeWithSpacePutRequestBody,
requestInformationContentSetMethod: "setContentFromParsable", requestInformationContentSetMethod: "setContentFromParsable",
}, },
}; };
+2 -2
View File
@@ -11,14 +11,14 @@ import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type Requ
*/ */
export interface StatisticsRequestBuilder extends BaseRequestBuilder<StatisticsRequestBuilder> { export interface StatisticsRequestBuilder extends BaseRequestBuilder<StatisticsRequestBuilder> {
/** /**
* 스페이스의 통계 정보(전체 페이지 수, 루트 페이지 수 등)를 조회합니다. * 스페이스의 통계 정보(전체 페이지 수, 루트 페이지 수 등)를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceStatisticsDto>} * @returns {Promise<SpaceStatisticsDto>}
* @throws {SpaceStatisticsDto} error when the service returns a 4XX or 5XX status code * @throws {SpaceStatisticsDto} error when the service returns a 4XX or 5XX status code
*/ */
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceStatisticsDto | undefined>; get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceStatisticsDto | undefined>;
/** /**
* 스페이스의 통계 정보(전체 페이지 수, 루트 페이지 수 등)를 조회합니다. * 스페이스의 통계 정보(전체 페이지 수, 루트 페이지 수 등)를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
+2 -2
View File
@@ -11,14 +11,14 @@ import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type Requ
*/ */
export interface WithSpaceKeyItemRequestBuilder extends BaseRequestBuilder<WithSpaceKeyItemRequestBuilder> { export interface WithSpaceKeyItemRequestBuilder extends BaseRequestBuilder<WithSpaceKeyItemRequestBuilder> {
/** /**
* 특정 스페이스를 키로 조회합니다. URL 친화적인 식별자로 사용됩니다. * 특정 스페이스를 키로 조회합니다. URL 친화적인 식별자로 사용됩니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto>} * @returns {Promise<SpaceResponseDto>}
* @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code * @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>; get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto | undefined>;
/** /**
* 특정 스페이스를 키로 조회합니다. URL 친화적인 식별자로 사용됩니다. * 특정 스페이스를 키로 조회합니다. URL 친화적인 식별자로 사용됩니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */
+2 -2
View File
@@ -11,14 +11,14 @@ import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type Requ
*/ */
export interface WithUserItemRequestBuilder extends BaseRequestBuilder<WithUserItemRequestBuilder> { export interface WithUserItemRequestBuilder extends BaseRequestBuilder<WithUserItemRequestBuilder> {
/** /**
* 특정 사용자가 생성한 모든 스페이스를 조회합니다. * 특정 사용자가 생성한 모든 스페이스를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<SpaceResponseDto[]>} * @returns {Promise<SpaceResponseDto[]>}
* @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code * @throws {SpaceResponseDto} error when the service returns a 4XX or 5XX status code
*/ */
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto[] | undefined>; get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<SpaceResponseDto[] | undefined>;
/** /**
* 특정 사용자가 생성한 모든 스페이스를 조회합니다. * 특정 사용자가 생성한 모든 스페이스를 조회합니다. (공개 접근 가능)
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation} * @returns {RequestInformation}
*/ */