Files
azuredatastudio/src/sql/workbench/services/notebook/common/contracts.ts
Chris LaFreniere 48a63e1f50 Notebooks: Add Support for Cell Attachment Images (#14449)
* Add to interfaces

* Works E2E

* Consolidate interface

* Add comments, cleanup

* Add some tests

* Cleanup

* interface cleanup

* Add more tests

* Add comments

* Add type for cell attachment

* wip
2021-02-28 16:40:41 -08:00

54 lines
1.5 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export type CellType = 'code' | 'markdown' | 'raw';
export class CellTypes {
public static readonly Code = 'code';
public static readonly Markdown = 'markdown';
}
// to do: add all mime types
export type MimeType = 'text/plain' | 'text/html';
// to do: add all mime types
export class MimeTypes {
public static readonly PlainText = 'text/plain';
public static readonly HTML = 'text/html';
}
export type OutputType =
| 'execute_result'
| 'display_data'
| 'stream'
| 'error'
| 'update_display_data';
export class OutputTypes {
public static readonly ExecuteResult = 'execute_result';
public static readonly DisplayData = 'display_data';
public static readonly Stream = 'stream';
public static readonly Error = 'error';
public static readonly UpdateDisplayData = 'update_display_data';
}
export enum NotebookChangeType {
CellsModified,
CellSourceUpdated,
CellOutputUpdated,
DirtyStateChanged,
KernelChanged,
MetadataChanged,
TrustChanged,
Saved,
CellExecuted,
CellInputVisibilityChanged,
CellOutputCleared,
CellMetadataUpdated
}
export const ImageMimeTypes = ['image/bmp', 'image/png', 'image/jpeg', 'image/gif'];