noodl-types
Advanced tools
Comparing version 1.0.64 to 1.0.65
@@ -1,42 +0,86 @@ | ||
export interface EcosDocument<NameField extends NameFieldBase = NameFieldBase> { | ||
id: null | string; | ||
ctime: null | number; | ||
mtime: null | number; | ||
atime: null | number; | ||
atimes: null | number; | ||
tage: null | number; | ||
subtype: { | ||
isOnServer: null | boolean; | ||
isZipped: null | boolean; | ||
isBinary: null | boolean; | ||
isEncrypted: null | boolean; | ||
isEditable: null | boolean; | ||
applicationDataType: null | number; | ||
mediaType: null | number; | ||
size: null | number; | ||
}; | ||
type: null | number; | ||
name: null | NameField; | ||
export interface EcosDocument<N extends NameField.Base = NameField.Base> { | ||
id: string; | ||
ctime: number; | ||
mtime: number; | ||
atime: number; | ||
atimes: number; | ||
tage: number; | ||
type: number; | ||
name: N | undefined | null; | ||
deat: Deat; | ||
size: null | number; | ||
fid: null | string; | ||
eid: null | string; | ||
bsig: null | string; | ||
esig: null | string; | ||
created_at: null | number; | ||
modified_at: null | number; | ||
size: number; | ||
fid: string; | ||
eid: string; | ||
bsig: string; | ||
esig: string; | ||
created_at: number; | ||
modified_at: number; | ||
subtype: SubtypeObject; | ||
} | ||
export declare type Deat = DeatObject | number | null; | ||
export declare type Deat = DeatObject | number; | ||
export interface DeatObject { | ||
url?: string; | ||
sig?: string; | ||
exptime?: string; | ||
url: string; | ||
sig: string; | ||
exptime: string; | ||
} | ||
export interface NameFieldBase<Data = any> { | ||
data?: Data; | ||
title?: string; | ||
content?: string; | ||
tags?: string[]; | ||
type: string; | ||
user?: string; | ||
export declare namespace NameField { | ||
interface Base<Type extends string = string> { | ||
tags?: string[]; | ||
type: Type; | ||
user?: string; | ||
} | ||
interface DocBase<Type extends string = string> extends Base<Type> { | ||
data: string; | ||
} | ||
interface MediaBase<Type extends string = string> extends Base<Type> { | ||
data: string; | ||
} | ||
interface TextBase<Type extends string = string> extends Base<Type> { | ||
title?: string; | ||
content?: string; | ||
} | ||
namespace Doc { | ||
type Epub = DocBase<'application/epub+zip'>; | ||
type Excel = DocBase<`application/${'vnd.ms-excel' | 'vnd.openxmlformats-officedocument.spreadsheetml.sheet'}`>; | ||
type Json = DocBase<'application/json'>; | ||
type Pdf = DocBase<'application/pdf'>; | ||
type PowerPoint = DocBase<`application/${'vnd.ms-powerpoint' | 'vnd.openxmlformats-officedocument.presentationml.presentatio'}`>; | ||
type Zipped = DocBase<`application/${'vnd.rar' | 'x-7z-compressed' | 'x-tar' | 'zip'}`>; | ||
type Word = DocBase<`application/${'msword' | 'vnd.openxmlformats-officedocument.wordprocessingml.document'}`>; | ||
type RichTxt = DocBase<'application/rtf'>; | ||
} | ||
namespace Media { | ||
type Audio = MediaBase<`audio/${'3gp' | 'flac' | 'm4a' | 'mp3' | 'ogg' | 'wav' | 'wma' | 'webm'}`>; | ||
type Image = MediaBase<`image/${'ai' | 'bmp' | 'eps' | 'gif' | 'jpg' | 'jpeg' | 'png' | 'psd' | 'svg' | 'tiff' | 'webp'}`>; | ||
type Video = MediaBase<`video/${'avi' | 'flv' | 'mkv' | 'mov' | 'mpg' | 'mp4' | 'ogg' | 'webm' | 'wmv'}`>; | ||
} | ||
namespace Text { | ||
type Csv = TextBase<`text/csv`>; | ||
type Html = TextBase<`text/html`>; | ||
type JavaScript = TextBase<`text/javascript`>; | ||
type Plain = TextBase<`text/plain`>; | ||
type Markdown = TextBase<`text/markdown`>; | ||
type Xml = TextBase<`text/xml`>; | ||
} | ||
} | ||
export interface SubtypeObject { | ||
isOnServer: null | boolean; | ||
isZipped: null | boolean; | ||
isBinary: null | boolean; | ||
isEncrypted: null | boolean; | ||
isEditable: null | boolean; | ||
applicationDataType: null | number; | ||
mediaType: null | MediaType; | ||
size: null | number; | ||
} | ||
export declare type MediaType = AudioMediaType | DocMediaType | FontMediaType | ImageMediaType | MessageMediaType | ModelMediaType | MultipartMediaType | OtherMediaType | TextMediaType | VideoMediaType; | ||
export declare type OtherMediaType = 0; | ||
export declare type DocMediaType = 1; | ||
export declare type AudioMediaType = 2; | ||
export declare type FontMediaType = 3; | ||
export declare type ImageMediaType = 4; | ||
export declare type MessageMediaType = 5; | ||
export declare type ModelMediaType = 6; | ||
export declare type MultipartMediaType = 7; | ||
export declare type TextMediaType = 8; | ||
export declare type VideoMediaType = 9; |
@@ -150,5 +150,29 @@ import { StyleObject } from './styleTypes'; | ||
}; | ||
ecosObj: { | ||
audio(v: unknown): void; | ||
doc(v: unknown): void; | ||
font(v: unknown): void; | ||
image(v: unknown): void; | ||
message(v: unknown): void; | ||
model(v: unknown): void; | ||
multipart(v: unknown): void; | ||
other(v: unknown): void; | ||
text(v: unknown): void; | ||
video(v: unknown): void; | ||
}; | ||
emit(v: unknown): v is T.EmitObject; | ||
goto(v: unknown): v is T.GotoObject; | ||
if(v: unknown): v is T.IfObject; | ||
mediaType: { | ||
audio(v: unknown): v is 2; | ||
doc(v: unknown): v is 1; | ||
font(v: unknown): v is 3; | ||
image(v: unknown): v is 4; | ||
message(v: unknown): v is 5; | ||
model(v: unknown): v is 6; | ||
multipart(v: unknown): v is 7; | ||
other(v: unknown): v is 0; | ||
text(v: unknown): v is 8; | ||
video(v: unknown): v is 9; | ||
}; | ||
reference(value: unknown): value is string; | ||
@@ -155,0 +179,0 @@ textBoard(v: unknown): boolean; |
@@ -174,2 +174,14 @@ "use strict"; | ||
}, | ||
ecosObj: { | ||
audio: function (v) { }, | ||
doc: function (v) { }, | ||
font: function (v) { }, | ||
image: function (v) { }, | ||
message: function (v) { }, | ||
model: function (v) { }, | ||
multipart: function (v) { }, | ||
other: function (v) { }, | ||
text: function (v) { }, | ||
video: function (v) { }, | ||
}, | ||
emit: function (v) { | ||
@@ -184,2 +196,34 @@ return u.isObj(v) && 'emit' in v; | ||
}, | ||
mediaType: { | ||
audio: function (v) { | ||
return v == 2; | ||
}, | ||
doc: function (v) { | ||
return v == 1; | ||
}, | ||
font: function (v) { | ||
return v == 3; | ||
}, | ||
image: function (v) { | ||
return v == 4; | ||
}, | ||
message: function (v) { | ||
return v == 5; | ||
}, | ||
model: function (v) { | ||
return v == 6; | ||
}, | ||
multipart: function (v) { | ||
return v == 7; | ||
}, | ||
other: function (v) { | ||
return v == 0; | ||
}, | ||
text: function (v) { | ||
return v == 8; | ||
}, | ||
video: function (v) { | ||
return v == 9; | ||
}, | ||
}, | ||
reference: function (value) { | ||
@@ -186,0 +230,0 @@ if (typeof value !== 'string') |
{ | ||
"name": "noodl-types", | ||
"version": "1.0.64", | ||
"version": "1.0.65", | ||
"description": "NOODL TypeScript Definitions", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80349
1473