/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { UserProfilePublic } from './UserProfilePublic'; import { UserProfilePublicFromJSON, UserProfilePublicFromJSONTyped, UserProfilePublicToJSON, UserProfilePublicToJSONTyped, } from './UserProfilePublic'; import type { ResourceThumbnail } from './ResourceThumbnail'; import { ResourceThumbnailFromJSON, ResourceThumbnailFromJSONTyped, ResourceThumbnailToJSON, ResourceThumbnailToJSONTyped, } from './ResourceThumbnail'; import type { ResourceLabel } from './ResourceLabel'; import { ResourceLabelFromJSON, ResourceLabelFromJSONTyped, ResourceLabelToJSON, ResourceLabelToJSONTyped, } from './ResourceLabel'; import type { PresignedImage } from './PresignedImage'; import { PresignedImageFromJSON, PresignedImageFromJSONTyped, PresignedImageToJSON, PresignedImageToJSONTyped, } from './PresignedImage'; import type { ResourcePublishedAncestorsInner } from './ResourcePublishedAncestorsInner'; import { ResourcePublishedAncestorsInnerFromJSON, ResourcePublishedAncestorsInnerFromJSONTyped, ResourcePublishedAncestorsInnerToJSON, ResourcePublishedAncestorsInnerToJSONTyped, } from './ResourcePublishedAncestorsInner'; import type { ResourceParent } from './ResourceParent'; import { ResourceParentFromJSON, ResourceParentFromJSONTyped, ResourceParentToJSON, ResourceParentToJSONTyped, } from './ResourceParent'; import type { CommentWithAuthor } from './CommentWithAuthor'; import { CommentWithAuthorFromJSON, CommentWithAuthorFromJSONTyped, CommentWithAuthorToJSON, CommentWithAuthorToJSONTyped, } from './CommentWithAuthor'; import type { DocumentMetadataBlock } from './DocumentMetadataBlock'; import { DocumentMetadataBlockFromJSON, DocumentMetadataBlockFromJSONTyped, DocumentMetadataBlockToJSON, DocumentMetadataBlockToJSONTyped, } from './DocumentMetadataBlock'; import type { ResourceRoot } from './ResourceRoot'; import { ResourceRootFromJSON, ResourceRootFromJSONTyped, ResourceRootToJSON, ResourceRootToJSONTyped, } from './ResourceRoot'; import type { ResourceTagsInner } from './ResourceTagsInner'; import { ResourceTagsInnerFromJSON, ResourceTagsInnerFromJSONTyped, ResourceTagsInnerToJSON, ResourceTagsInnerToJSONTyped, } from './ResourceTagsInner'; import type { ResourceDetailBookmark } from './ResourceDetailBookmark'; import { ResourceDetailBookmarkFromJSON, ResourceDetailBookmarkFromJSONTyped, ResourceDetailBookmarkToJSON, ResourceDetailBookmarkToJSONTyped, } from './ResourceDetailBookmark'; import type { AssistantChat } from './AssistantChat'; import { AssistantChatFromJSON, AssistantChatFromJSONTyped, AssistantChatToJSON, AssistantChatToJSONTyped, } from './AssistantChat'; import type { ResourceDetailDocument } from './ResourceDetailDocument'; import { ResourceDetailDocumentFromJSON, ResourceDetailDocumentFromJSONTyped, ResourceDetailDocumentToJSON, ResourceDetailDocumentToJSONTyped, } from './ResourceDetailDocument'; import type { ProcessingState } from './ProcessingState'; import { ProcessingStateFromJSON, ProcessingStateFromJSONTyped, ProcessingStateToJSON, ProcessingStateToJSONTyped, } from './ProcessingState'; /** * * @export * @interface BookmarkCreationResponse */ export interface BookmarkCreationResponse { /** * * @type {string} * @memberof BookmarkCreationResponse */ 'id': string; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'kind': BookmarkCreationResponseKindEnum; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'mimeType': string | null; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'extension': string | null; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'name': string | null; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'description': string | null; /** * * @type {number} * @memberof BookmarkCreationResponse */ 'size': number | null; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'url': string; /** * * @type {CommentWithAuthor} * @memberof BookmarkCreationResponse */ 'commentPinned': CommentWithAuthor | null; /** * * @type {ResourceLabel} * @memberof BookmarkCreationResponse */ 'label': ResourceLabel | null; /** * * @type {ResourceParent} * @memberof BookmarkCreationResponse */ 'parent': ResourceParent | null; /** * * @type {PresignedImage} * @memberof BookmarkCreationResponse */ 'cover': PresignedImage | null; /** * * @type {UserProfilePublic} * @memberof BookmarkCreationResponse */ 'user': UserProfilePublic | null; /** * * @type {ResourceRoot} * @memberof BookmarkCreationResponse */ 'root': ResourceRoot | null; /** * * @type {ProcessingState} * @memberof BookmarkCreationResponse */ 'stateProcessing': ProcessingState; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'originUrl': string | null; /** * * @type {Array} * @memberof BookmarkCreationResponse */ 'tags': Array; /** * * @type {Array} * @memberof BookmarkCreationResponse */ 'chats': Array; /** * * @type {ResourceThumbnail} * @memberof BookmarkCreationResponse */ 'thumbnail': ResourceThumbnail | null; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'fileUrl': string | null; /** * * @type {{ [key: string]: object | null; }} * @memberof BookmarkCreationResponse */ 'preferences': { [key: string]: object | null; } | null; /** * * @type {boolean} * @memberof BookmarkCreationResponse */ 'isPasswordProtected'?: boolean; /** * * @type {boolean} * @memberof BookmarkCreationResponse */ 'isLocked'?: boolean; /** * * @type {Array} * @memberof BookmarkCreationResponse */ 'publishedAncestors'?: Array; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'createdAt': string; /** * * @type {string} * @memberof BookmarkCreationResponse */ 'modifiedAt': string; /** * * @type {DocumentMetadataBlock} * @memberof BookmarkCreationResponse */ 'data': DocumentMetadataBlock; } /** * @export */ export const BookmarkCreationResponseKindEnum = { Document: 'document' } as const; export type BookmarkCreationResponseKindEnum = typeof BookmarkCreationResponseKindEnum[keyof typeof BookmarkCreationResponseKindEnum]; /** * Check if a given object implements the BookmarkCreationResponse interface. */ export function instanceOfBookmarkCreationResponse(value: object): value is BookmarkCreationResponse { if (!('id' in value) || value['id'] === undefined) return false; if (!('kind' in value) || value['kind'] === undefined) return false; if (!('mimeType' in value) || value['mimeType'] === undefined) return false; if (!('extension' in value) || value['extension'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('size' in value) || value['size'] === undefined) return false; if (!('url' in value) || value['url'] === undefined) return false; if (!('commentPinned' in value) || value['commentPinned'] === undefined) return false; if (!('label' in value) || value['label'] === undefined) return false; if (!('parent' in value) || value['parent'] === undefined) return false; if (!('cover' in value) || value['cover'] === undefined) return false; if (!('user' in value) || value['user'] === undefined) return false; if (!('root' in value) || value['root'] === undefined) return false; if (!('stateProcessing' in value) || value['stateProcessing'] === undefined) return false; if (!('originUrl' in value) || value['originUrl'] === undefined) return false; if (!('tags' in value) || value['tags'] === undefined) return false; if (!('chats' in value) || value['chats'] === undefined) return false; if (!('thumbnail' in value) || value['thumbnail'] === undefined) return false; if (!('fileUrl' in value) || value['fileUrl'] === undefined) return false; if (!('preferences' in value) || value['preferences'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false; if (!('data' in value) || value['data'] === undefined) return false; return true; } export function BookmarkCreationResponseFromJSON(json: any): BookmarkCreationResponse { return BookmarkCreationResponseFromJSONTyped(json, false); } export function BookmarkCreationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkCreationResponse { if (json == null) { return json; } const result = { } as BookmarkCreationResponse; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['kind'] !== undefined) { result['kind'] = json['kind']; } if (json['mimeType'] !== undefined) { if (json['mimeType'] === null) { result['mimeType'] = null; } else { result['mimeType'] = json['mimeType']; } } if (json['extension'] !== undefined) { if (json['extension'] === null) { result['extension'] = null; } else { result['extension'] = json['extension']; } } if (json['name'] !== undefined) { if (json['name'] === null) { result['name'] = null; } else { result['name'] = json['name']; } } if (json['description'] !== undefined) { if (json['description'] === null) { result['description'] = null; } else { result['description'] = json['description']; } } if (json['size'] !== undefined) { if (json['size'] === null) { result['size'] = null; } else { result['size'] = json['size']; } } if (json['url'] !== undefined) { result['url'] = json['url']; } if (json['commentPinned'] !== undefined) { if (json['commentPinned'] === null) { result['commentPinned'] = null; } else { result['commentPinned'] = CommentWithAuthorFromJSON(json['commentPinned']); } } if (json['label'] !== undefined) { if (json['label'] === null) { result['label'] = null; } else { result['label'] = ResourceLabelFromJSON(json['label']); } } if (json['parent'] !== undefined) { if (json['parent'] === null) { result['parent'] = null; } else { result['parent'] = ResourceParentFromJSON(json['parent']); } } if (json['cover'] !== undefined) { if (json['cover'] === null) { result['cover'] = null; } else { result['cover'] = PresignedImageFromJSON(json['cover']); } } if (json['user'] !== undefined) { if (json['user'] === null) { result['user'] = null; } else { result['user'] = UserProfilePublicFromJSON(json['user']); } } if (json['root'] !== undefined) { if (json['root'] === null) { result['root'] = null; } else { result['root'] = ResourceRootFromJSON(json['root']); } } if (json['stateProcessing'] !== undefined) { result['stateProcessing'] = ProcessingStateFromJSON(json['stateProcessing']); } if (json['originUrl'] !== undefined) { if (json['originUrl'] === null) { result['originUrl'] = null; } else { result['originUrl'] = json['originUrl']; } } if (json['tags'] !== undefined) { result['tags'] = (json['tags'] as Array).map(ResourceTagsInnerFromJSON); } if (json['chats'] !== undefined) { result['chats'] = (json['chats'] as Array).map(AssistantChatFromJSON); } if (json['thumbnail'] !== undefined) { if (json['thumbnail'] === null) { result['thumbnail'] = null; } else { result['thumbnail'] = ResourceThumbnailFromJSON(json['thumbnail']); } } if (json['fileUrl'] !== undefined) { if (json['fileUrl'] === null) { result['fileUrl'] = null; } else { result['fileUrl'] = json['fileUrl']; } } if (json['preferences'] !== undefined) { if (json['preferences'] === null) { result['preferences'] = null; } else { result['preferences'] = json['preferences']; } } if (json['isPasswordProtected'] !== undefined) { result['isPasswordProtected'] = json['isPasswordProtected']; } if (json['isLocked'] !== undefined) { result['isLocked'] = json['isLocked']; } if (json['publishedAncestors'] !== undefined) { result['publishedAncestors'] = (json['publishedAncestors'] as Array).map(ResourcePublishedAncestorsInnerFromJSON); } if (json['createdAt'] !== undefined) { result['createdAt'] = json['createdAt']; } if (json['modifiedAt'] !== undefined) { result['modifiedAt'] = json['modifiedAt']; } if (json['data'] !== undefined) { result['data'] = DocumentMetadataBlockFromJSON(json['data']); } return result; } export function BookmarkCreationResponseToJSON(json: any): BookmarkCreationResponse { return BookmarkCreationResponseToJSONTyped(json, false); } export function BookmarkCreationResponseToJSONTyped(value?: BookmarkCreationResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'kind': value['kind'], 'mimeType': value['mimeType'], 'extension': value['extension'], 'name': value['name'], 'description': value['description'], 'size': value['size'], 'url': value['url'], 'commentPinned': CommentWithAuthorToJSON(value['commentPinned']), 'label': ResourceLabelToJSON(value['label']), 'parent': ResourceParentToJSON(value['parent']), 'cover': PresignedImageToJSON(value['cover']), 'user': UserProfilePublicToJSON(value['user']), 'root': ResourceRootToJSON(value['root']), 'stateProcessing': ProcessingStateToJSON(value['stateProcessing']), 'originUrl': value['originUrl'], 'tags': ((value['tags'] as Array).map(ResourceTagsInnerToJSON)), 'chats': ((value['chats'] as Array).map(AssistantChatToJSON)), 'thumbnail': ResourceThumbnailToJSON(value['thumbnail']), 'fileUrl': value['fileUrl'], 'preferences': value['preferences'], 'isPasswordProtected': value['isPasswordProtected'], 'isLocked': value['isLocked'], 'publishedAncestors': value['publishedAncestors'] == null ? undefined : ((value['publishedAncestors'] as Array).map(ResourcePublishedAncestorsInnerToJSON)), 'createdAt': value['createdAt'], 'modifiedAt': value['modifiedAt'], 'data': DocumentMetadataBlockToJSON(value['data']), }; }