@useairfoil/connector-kit 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +237 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
- package/src/core/builder.ts +21 -0
- package/src/core/errors.ts +6 -0
- package/src/core/types.ts +102 -0
- package/src/index.ts +28 -0
- package/src/ingestion/engine.ts +229 -0
- package/src/ingestion/state-store.ts +36 -0
- package/src/publisher/service.ts +18 -0
- package/src/publisher/wings.ts +124 -0
- package/src/streams/pull-stream.ts +55 -0
- package/src/streams/webhook-queue.ts +15 -0
- package/src/webhook/server.ts +76 -0
- package/src/webhook/types.ts +16 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: Effect Schema encodes invariantly; `any` on the encoded type is intentional. */
|
|
2
|
+
|
|
3
|
+
import type { Effect } from "effect";
|
|
4
|
+
import type * as Schema from "effect/Schema";
|
|
5
|
+
import type { HttpRouter, HttpServerRequest } from "effect/unstable/http";
|
|
6
|
+
import type { ConnectorError } from "../core/errors";
|
|
7
|
+
|
|
8
|
+
export type WebhookRoute<TPayload> = {
|
|
9
|
+
readonly path: HttpRouter.PathInput;
|
|
10
|
+
readonly schema: Schema.Schema<TPayload>;
|
|
11
|
+
readonly handle: (
|
|
12
|
+
payload: TPayload,
|
|
13
|
+
request: HttpServerRequest.HttpServerRequest,
|
|
14
|
+
rawBody?: Uint8Array,
|
|
15
|
+
) => Effect.Effect<void, ConnectorError>;
|
|
16
|
+
};
|