diff --git a/v1/index.d.ts b/v1/index.d.ts index f4a1ff6..72a1ed0 100644 --- a/v1/index.d.ts +++ b/v1/index.d.ts @@ -34,6 +34,15 @@ export class Cloudevent { public getData(): any; } +/** + * HTTP emitter for Structured mode + */ +export class StructuredHTTPEmitter { + public constructor(configuration?: any); + + public emit(event: Cloudevent): Promise; +} + /** * Function to create CloudEvents instances */ diff --git a/v1/index.js b/v1/index.js index b2b407c..803c626 100644 --- a/v1/index.js +++ b/v1/index.js @@ -1,5 +1,7 @@ const Cloudevent = require("../lib/cloudevent.js"); const Spec = require("../lib/specs/spec_1.js"); +const StructuredHTTPEmitter = + require("../lib/bindings/http/emitter_structured.js"); function event() { return new Cloudevent(Spec); @@ -7,5 +9,6 @@ function event() { module.exports = { Spec, + StructuredHTTPEmitter, event };