shepherd-plugin-interfaces
Advanced tools
Comparing version 0.3.2 to 0.3.3
13
index.ts
@@ -1,3 +0,3 @@ | ||
import { Readable } from "stream" | ||
import * as Types from "./types" | ||
import { Readable } from 'stream' | ||
import * as Types from './types' | ||
@@ -14,4 +14,4 @@ export interface FilterResult extends Types.TxFlaggedOptions { | ||
flagged: undefined | ||
data_reason: | ||
'oversized' // oversized compressed png files that cannot be opened by most image libraries. | ||
data_reason: | ||
'oversized' // oversized compressed png files that cannot be opened by most image libraries. | ||
| 'partial' // partial image that library cannnot open | ||
@@ -23,7 +23,6 @@ | 'unsupported' // unsupported file type (your plugin is expected to handle jpeg/png/gif at a minimum) | ||
| 'retry' // clean up and retry | ||
| (string & {}) | ||
| 'mimetype' // mimetype mismatch | ||
err_message?: string // optional error message | ||
} | ||
export interface FilterPluginInterface { | ||
@@ -50,3 +49,3 @@ /** | ||
export interface StreamPluginInterface { | ||
checkStream(read: Readable, mimetype: string, txid: string):Promise<string | Error> | ||
checkStream(read: Readable, mimetype: string, txid: string):Promise<string | Error> | ||
} |
{ | ||
"name": "shepherd-plugin-interfaces", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
# shepherd-plugin-interfaces | ||
This is the interface to use when developing plugins for [shepherd](https://github.com/shepherd-media-classifier/shepherd). | ||
This is the interface to use when developing plugins/addons for [shepherd](https://github.com/shepherd-media-classifier/shepherd). | ||
See the [docs in shepherd](https://github.com/shepherd-media-classifier/shepherd/tree/master#shepherd-plugin-interfaces) for more information. |
27
types.ts
@@ -13,2 +13,3 @@ /** | ||
parents?: string[] | undefined | ||
owner: string | null | ||
} | ||
@@ -18,14 +19,16 @@ export interface TxRecord extends TxScanned, TxFlaggedOptions { | ||
valid_data: boolean | ||
data_reason: | ||
'oversized' | ||
| 'partial' | ||
| 'timeout' | ||
| '404' | ||
| 'corrupt' | ||
| 'corrupt-maybe' | ||
| 'unsupported' | ||
data_reason: | ||
'oversized' | ||
| 'partial' | ||
| 'partial-seed' //these vids have never occurred? | ||
| 'timeout' | ||
| '404' | ||
| 'corrupt' | ||
| 'corrupt-maybe' | ||
| 'unsupported' | ||
| 'noop' | ||
| 'mime-type' | ||
| 'mimetype' | ||
| 'negligible-data' | ||
| (string & {}) //intellisense hack | ||
| 'nodata' | ||
| 'MalformedXML-data' | ||
@@ -38,3 +41,3 @@ byteStart?: string // convert to BigInt | ||
export interface TxFlaggedOptions { | ||
flag_type?: 'test' | 'matched' | 'classified' | (string & {}) | ||
flag_type?: 'test' | 'matched' | 'classified' | ||
top_score_name?: string | ||
@@ -45,3 +48,3 @@ top_score_value?: number | ||
export interface StateRecord { | ||
pname: 'indexer_pass1' | 'indexer_pass2' | 'seed_position' | (string & {}) | ||
pname: 'indexer_pass1' | 'indexer_pass2' | 'seed_position' | 'owner_ingest' | ||
value: number | ||
@@ -48,0 +51,0 @@ } |
30532
5
102