From 6c223e2c34769fc0b2f2dbc58a398eb85442af92 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Wed, 29 Apr 2020 13:06:57 -0700 Subject: [PATCH] fix: remove d.ts types. Fixes #83 (#84) Fixes: https://github.com/cloudevents/sdk-javascript/issues/83 Signed-off-by: Grant Timmerman --- v1/index.d.ts | 80 --------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 v1/index.d.ts diff --git a/v1/index.d.ts b/v1/index.d.ts deleted file mode 100644 index 8eba8dba..00000000 --- a/v1/index.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * CloudEvent class definition - */ -export class Cloudevent { - public constructor(spec?: any, formatter?: any); - - public format(): any; - public toString(): string; - - public id(id: string): Cloudevent; - public getId(): string; - - public source(source: string): Cloudevent; - public getSource(): string; - - public getSpecversion(): string; - - public type(type: string): Cloudevent; - public getType(): string; - - public dataContentType(dct: string): Cloudevent; - public getDataContentType(): string; - - public dataschema(schema: string): Cloudevent; - public getDataschema(): string; - - public subject(subject: string): Cloudevent; - public getSubject(): string; - - public time(time: Date): Cloudevent; - public getTime(): Date; - - public data(data: any): Cloudevent; - public getData(): any; - - public addExtension(name: string, value: any): Cloudevent; - - public getExtensions(): Map; -} - -/** - * HTTP emitter for Structured mode - */ -export class StructuredHTTPEmitter { - public constructor(configuration?: any); - - public emit(event: Cloudevent): Promise; -} - -/** - * HTTP emitter for Binary mode - */ -export class BinaryHTTPEmitter { - public constructor(configuration?: any); - - public emit(event: Cloudevent): Promise; -} - -/** - * HTTP receiver for Structured mode - */ -export class StructuredHTTPReceiver { - public check(payload: any, headers: any): void; - public parse(payload: any, headers: any): Cloudevent; -} - -/** - * HTTP receiver for Structured mode - */ -export class BinaryHTTPReceiver { - public check(payload: any, headers: any): void; - public parse(payload: any, headers: any): Cloudevent; -} - -/** - * Function to create CloudEvents instances - */ -export declare function event(): Cloudevent; - -export default Cloudevent;