@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.
@@ -0,0 +1,9 @@
1
+ import { type D1DatabaseLike } from "./d1-client";
2
+ export declare const DEFAULT_WEBHOOK_ENDPOINT_TABLE = "kmsg_webhook_endpoints";
3
+ export declare const DEFAULT_WEBHOOK_DELIVERY_TABLE = "kmsg_webhook_deliveries";
4
+ export interface WebhookSchemaOptions {
5
+ endpointTableName?: string;
6
+ deliveryTableName?: string;
7
+ }
8
+ export declare function buildWebhookSchemaSql(options?: WebhookSchemaOptions): string[];
9
+ export declare function initializeWebhookSchema(db: D1DatabaseLike, options?: WebhookSchemaOptions): Promise<void>;
@@ -16,6 +16,7 @@ interface EndpointHealth {
16
16
  export declare class LoadBalancer extends EventEmitter {
17
17
  private config;
18
18
  private endpointHealth;
19
+ private endpoints;
19
20
  private circuitBreakers;
20
21
  private connectionCounts;
21
22
  private roundRobinIndex;
package/dist/index.d.ts CHANGED
@@ -1,20 +1,13 @@
1
1
  /**
2
- * Webhook System
3
- * 실시간 메시지 이벤트 알림 시스템
2
+ * Runtime webhook APIs
4
3
  */
5
- export { BatchDispatcher } from "./dispatcher/batch.dispatcher";
6
- export { LoadBalancer } from "./dispatcher/load-balancer";
7
- export { QueueManager } from "./dispatcher/queue.manager";
8
- export type { BatchConfig, CircuitBreakerState, DispatchConfig, DispatchJob, LoadBalancerConfig, QueueConfig, } from "./dispatcher/types";
9
- export { DeliveryStore } from "./registry/delivery.store";
10
- export { EndpointManager } from "./registry/endpoint.manager";
11
- export { EventStore } from "./registry/event.store";
12
- export type { DeliveryFilter, EndpointFilter, EventFilter, PaginationOptions, SearchResult, StorageConfig, } from "./registry/types";
13
4
  export { RetryManager } from "./retry/retry.manager";
5
+ export { DEFAULT_ENDPOINT_VALIDATION_OPTIONS, type EndpointValidationOptions, resolveEndpointValidationOptions, validateEndpointUrl, } from "./runtime/endpoint-validation";
6
+ export { endpointMatchesEvent } from "./runtime/event-matcher";
7
+ export { createInMemoryWebhookPersistence } from "./runtime/persistence";
8
+ export type { WebhookDeliveryListOptions, WebhookDeliveryStore, WebhookEndpointInput, WebhookEndpointStore, WebhookPersistence, WebhookRuntime, WebhookRuntimeConfig, WebhookRuntimeSecurityOptions, WebhookRuntimeTestPayload, } from "./runtime/types";
9
+ export { addEndpoints, type HttpClient, probeEndpoint, resolveWebhookSecurityOptions, WebhookRuntimeService, } from "./runtime/webhook-runtime.service";
14
10
  export { SecurityManager } from "./security/security.manager";
15
- export { DefaultHttpClient, type HttpClient, MockHttpClient, WebhookDispatcher, } from "./services/webhook.dispatcher";
16
- export { WebhookRegistry } from "./services/webhook.registry";
17
- export { WebhookService } from "./services/webhook.service";
18
- export type { FileStorageAdapter } from "./shared/file-storage";
11
+ export { DefaultHttpClient, WebhookDispatcher, } from "./services/webhook.dispatcher";
19
12
  export type { WebhookAttempt, WebhookBatch, WebhookConfig, WebhookDelivery, WebhookDeliveryData, WebhookEndpoint, WebhookEndpointData, WebhookEvent, WebhookEventData, WebhookSecurity, WebhookStats, WebhookTestResult, } from "./types/webhook.types";
20
13
  export { WebhookDeliverySchema, WebhookEndpointSchema, WebhookEventSchema, WebhookEventType, } from "./types/webhook.types";