@k-msg/webhook 0.27.2 → 0.28.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.
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/mini";
2
2
  export interface WebhookConfig {
3
3
  maxRetries: number;
4
4
  retryDelayMs: number;
@@ -142,83 +142,83 @@ export interface WebhookTestResult {
142
142
  error?: string;
143
143
  testedAt: Date;
144
144
  }
145
- export declare const WebhookEventSchema: z.ZodObject<{
146
- id: z.ZodString;
147
- type: z.ZodString;
148
- timestamp: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDate>;
149
- data: z.ZodAny;
150
- metadata: z.ZodObject<{
151
- providerId: z.ZodOptional<z.ZodString>;
152
- channelId: z.ZodOptional<z.ZodString>;
153
- templateId: z.ZodOptional<z.ZodString>;
154
- messageId: z.ZodOptional<z.ZodString>;
155
- userId: z.ZodOptional<z.ZodString>;
156
- organizationId: z.ZodOptional<z.ZodString>;
157
- correlationId: z.ZodOptional<z.ZodString>;
158
- retryCount: z.ZodOptional<z.ZodNumber>;
145
+ export declare const WebhookEventSchema: z.ZodMiniObject<{
146
+ id: z.ZodMiniString<string>;
147
+ type: z.ZodMiniString<string>;
148
+ timestamp: z.ZodMiniPipe<z.ZodMiniTransform<unknown, unknown>, z.ZodMiniDate<Date>>;
149
+ data: z.ZodMiniAny;
150
+ metadata: z.ZodMiniObject<{
151
+ providerId: z.ZodMiniOptional<z.ZodMiniString<string>>;
152
+ channelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
153
+ templateId: z.ZodMiniOptional<z.ZodMiniString<string>>;
154
+ messageId: z.ZodMiniOptional<z.ZodMiniString<string>>;
155
+ userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
156
+ organizationId: z.ZodMiniOptional<z.ZodMiniString<string>>;
157
+ correlationId: z.ZodMiniOptional<z.ZodMiniString<string>>;
158
+ retryCount: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
159
159
  }, z.core.$strip>;
160
- version: z.ZodString;
160
+ version: z.ZodMiniString<string>;
161
161
  }, z.core.$strip>;
162
- export declare const WebhookEndpointSchema: z.ZodObject<{
163
- id: z.ZodString;
164
- url: z.ZodString;
165
- name: z.ZodOptional<z.ZodString>;
166
- description: z.ZodOptional<z.ZodString>;
167
- active: z.ZodBoolean;
168
- events: z.ZodArray<z.ZodString>;
169
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
170
- secret: z.ZodOptional<z.ZodString>;
171
- retryConfig: z.ZodOptional<z.ZodObject<{
172
- maxRetries: z.ZodNumber;
173
- retryDelayMs: z.ZodNumber;
174
- backoffMultiplier: z.ZodNumber;
162
+ export declare const WebhookEndpointSchema: z.ZodMiniObject<{
163
+ id: z.ZodMiniString<string>;
164
+ url: z.ZodMiniURL;
165
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
166
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
167
+ active: z.ZodMiniBoolean<boolean>;
168
+ events: z.ZodMiniArray<z.ZodMiniString<string>>;
169
+ headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
170
+ secret: z.ZodMiniOptional<z.ZodMiniString<string>>;
171
+ retryConfig: z.ZodMiniOptional<z.ZodMiniObject<{
172
+ maxRetries: z.ZodMiniNumber<number>;
173
+ retryDelayMs: z.ZodMiniNumber<number>;
174
+ backoffMultiplier: z.ZodMiniNumber<number>;
175
175
  }, z.core.$strip>>;
176
- filters: z.ZodOptional<z.ZodObject<{
177
- providerId: z.ZodOptional<z.ZodArray<z.ZodString>>;
178
- channelId: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
- templateId: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
+ filters: z.ZodMiniOptional<z.ZodMiniObject<{
177
+ providerId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
178
+ channelId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
179
+ templateId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
180
180
  }, z.core.$strip>>;
181
- createdAt: z.ZodDate;
182
- updatedAt: z.ZodDate;
183
- lastTriggeredAt: z.ZodOptional<z.ZodDate>;
184
- status: z.ZodEnum<{
181
+ createdAt: z.ZodMiniDate<Date>;
182
+ updatedAt: z.ZodMiniDate<Date>;
183
+ lastTriggeredAt: z.ZodMiniOptional<z.ZodMiniDate<Date>>;
184
+ status: z.ZodMiniEnum<{
185
185
  active: "active";
186
186
  inactive: "inactive";
187
187
  error: "error";
188
188
  suspended: "suspended";
189
189
  }>;
190
190
  }, z.core.$strip>;
191
- export declare const WebhookDeliverySchema: z.ZodObject<{
192
- id: z.ZodString;
193
- endpointId: z.ZodString;
194
- eventId: z.ZodString;
195
- eventType: z.ZodOptional<z.ZodString>;
196
- url: z.ZodString;
197
- httpMethod: z.ZodEnum<{
191
+ export declare const WebhookDeliverySchema: z.ZodMiniObject<{
192
+ id: z.ZodMiniString<string>;
193
+ endpointId: z.ZodMiniString<string>;
194
+ eventId: z.ZodMiniString<string>;
195
+ eventType: z.ZodMiniOptional<z.ZodMiniString<string>>;
196
+ url: z.ZodMiniURL;
197
+ httpMethod: z.ZodMiniEnum<{
198
198
  POST: "POST";
199
199
  PUT: "PUT";
200
200
  PATCH: "PATCH";
201
201
  }>;
202
- headers: z.ZodRecord<z.ZodString, z.ZodString>;
203
- payload: z.ZodString;
204
- attempts: z.ZodArray<z.ZodObject<{
205
- attemptNumber: z.ZodNumber;
206
- timestamp: z.ZodDate;
207
- httpStatus: z.ZodOptional<z.ZodNumber>;
208
- responseBody: z.ZodOptional<z.ZodString>;
209
- responseHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
210
- error: z.ZodOptional<z.ZodString>;
211
- latencyMs: z.ZodNumber;
202
+ headers: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
203
+ payload: z.ZodMiniString<string>;
204
+ attempts: z.ZodMiniArray<z.ZodMiniObject<{
205
+ attemptNumber: z.ZodMiniNumber<number>;
206
+ timestamp: z.ZodMiniDate<Date>;
207
+ httpStatus: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
208
+ responseBody: z.ZodMiniOptional<z.ZodMiniString<string>>;
209
+ responseHeaders: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
210
+ error: z.ZodMiniOptional<z.ZodMiniString<string>>;
211
+ latencyMs: z.ZodMiniNumber<number>;
212
212
  }, z.core.$strip>>;
213
- status: z.ZodEnum<{
213
+ status: z.ZodMiniEnum<{
214
214
  pending: "pending";
215
215
  success: "success";
216
216
  failed: "failed";
217
217
  exhausted: "exhausted";
218
218
  }>;
219
- createdAt: z.ZodDate;
220
- completedAt: z.ZodOptional<z.ZodDate>;
221
- nextRetryAt: z.ZodOptional<z.ZodDate>;
219
+ createdAt: z.ZodMiniDate<Date>;
220
+ completedAt: z.ZodMiniOptional<z.ZodMiniDate<Date>>;
221
+ nextRetryAt: z.ZodMiniOptional<z.ZodMiniDate<Date>>;
222
222
  }, z.core.$strip>;
223
223
  export type WebhookEventData = z.infer<typeof WebhookEventSchema>;
224
224
  export type WebhookEndpointData = z.infer<typeof WebhookEndpointSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-msg/webhook",
3
- "version": "0.27.2",
3
+ "version": "0.28.0",
4
4
  "packageManager": "bun@1.3.8",
5
5
  "description": "Webhook system for real-time message event notifications",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "publish": "bun publish --access public"
40
40
  },
41
41
  "dependencies": {
42
- "@k-msg/core": "0.27.2",
42
+ "@k-msg/core": "0.28.0",
43
43
  "@noble/hashes": "^1.8.0",
44
44
  "zod": "^4.0.14"
45
45
  },