@k-msg/webhook 0.19.1 → 0.20.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 +113 -124
- package/README_ko.md +115 -125
- package/dist/adapters/cloudflare/d1-client.d.ts +21 -0
- package/dist/adapters/cloudflare/d1-delivery.store.d.ts +12 -0
- package/dist/adapters/cloudflare/d1-endpoint.store.d.ts +15 -0
- package/dist/adapters/cloudflare/index.d.ts +10 -0
- package/dist/adapters/cloudflare/index.js +82 -0
- package/dist/adapters/cloudflare/index.js.map +86 -0
- package/dist/adapters/cloudflare/index.mjs +82 -0
- package/dist/adapters/cloudflare/index.mjs.map +86 -0
- package/dist/adapters/cloudflare/sql-schema.d.ts +9 -0
- package/dist/dispatcher/load-balancer.d.ts +1 -0
- package/dist/index.d.ts +7 -14
- package/dist/index.js +23 -31
- package/dist/index.js.map +17 -24
- package/dist/index.mjs +23 -31
- package/dist/index.mjs.map +17 -24
- package/dist/runtime/endpoint-validation.d.ts +8 -0
- package/dist/runtime/event-matcher.d.ts +2 -0
- package/dist/runtime/persistence.d.ts +16 -0
- package/dist/runtime/types.d.ts +60 -0
- package/dist/runtime/webhook-runtime.service.d.ts +41 -0
- package/dist/services/webhook.dispatcher.d.ts +4 -2
- package/dist/toolkit/index.d.ts +16 -0
- package/dist/toolkit/index.js +52 -0
- package/dist/toolkit/index.js.map +100 -0
- package/dist/toolkit/index.mjs +52 -0
- package/dist/toolkit/index.mjs.map +100 -0
- package/package.json +14 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WebhookEndpointStore } from "../../runtime/types";
|
|
2
|
+
import type { WebhookEndpoint } from "../../types/webhook.types";
|
|
3
|
+
import { type D1DatabaseLike } from "./d1-client";
|
|
4
|
+
export declare class D1WebhookEndpointStore implements WebhookEndpointStore {
|
|
5
|
+
private readonly db;
|
|
6
|
+
private readonly tableName;
|
|
7
|
+
private readonly ensureInitialized;
|
|
8
|
+
constructor(db: D1DatabaseLike, tableName: string, ensureInitialized: () => Promise<void>);
|
|
9
|
+
add(endpoint: WebhookEndpoint): Promise<void>;
|
|
10
|
+
update(endpointId: string, endpoint: WebhookEndpoint): Promise<void>;
|
|
11
|
+
remove(endpointId: string): Promise<void>;
|
|
12
|
+
get(endpointId: string): Promise<WebhookEndpoint | null>;
|
|
13
|
+
list(): Promise<WebhookEndpoint[]>;
|
|
14
|
+
private toEndpoint;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WebhookPersistence } from "../../runtime/types";
|
|
2
|
+
import type { D1DatabaseLike } from "./d1-client";
|
|
3
|
+
import { buildWebhookSchemaSql, DEFAULT_WEBHOOK_DELIVERY_TABLE, DEFAULT_WEBHOOK_ENDPOINT_TABLE, initializeWebhookSchema, type WebhookSchemaOptions } from "./sql-schema";
|
|
4
|
+
export type { D1DatabaseLike, D1PreparedStatementLike } from "./d1-client";
|
|
5
|
+
export { buildWebhookSchemaSql, DEFAULT_WEBHOOK_DELIVERY_TABLE, DEFAULT_WEBHOOK_ENDPOINT_TABLE, initializeWebhookSchema, };
|
|
6
|
+
export type { WebhookSchemaOptions };
|
|
7
|
+
export interface CreateD1WebhookPersistenceOptions extends WebhookSchemaOptions {
|
|
8
|
+
initializeSchema?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function createD1WebhookPersistence(db: D1DatabaseLike, options?: CreateD1WebhookPersistenceOptions): WebhookPersistence;
|