@k-msg/webhook 0.27.1 → 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.
- package/dist/adapters/cloudflare/index.js +31 -31
- package/dist/adapters/cloudflare/index.mjs +31 -31
- package/dist/index.js +24 -24
- package/dist/index.mjs +24 -24
- package/dist/toolkit/index.js +32 -32
- package/dist/toolkit/index.mjs +32 -32
- package/dist/types/webhook.types.d.ts +58 -58
- package/package.json +2 -2
|
@@ -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.
|
|
146
|
-
id: z.
|
|
147
|
-
type: z.
|
|
148
|
-
timestamp: z.
|
|
149
|
-
data: z.
|
|
150
|
-
metadata: z.
|
|
151
|
-
providerId: z.
|
|
152
|
-
channelId: z.
|
|
153
|
-
templateId: z.
|
|
154
|
-
messageId: z.
|
|
155
|
-
userId: z.
|
|
156
|
-
organizationId: z.
|
|
157
|
-
correlationId: z.
|
|
158
|
-
retryCount: z.
|
|
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.
|
|
160
|
+
version: z.ZodMiniString<string>;
|
|
161
161
|
}, z.core.$strip>;
|
|
162
|
-
export declare const WebhookEndpointSchema: z.
|
|
163
|
-
id: z.
|
|
164
|
-
url: z.
|
|
165
|
-
name: z.
|
|
166
|
-
description: z.
|
|
167
|
-
active: z.
|
|
168
|
-
events: z.
|
|
169
|
-
headers: z.
|
|
170
|
-
secret: z.
|
|
171
|
-
retryConfig: z.
|
|
172
|
-
maxRetries: z.
|
|
173
|
-
retryDelayMs: z.
|
|
174
|
-
backoffMultiplier: z.
|
|
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.
|
|
177
|
-
providerId: z.
|
|
178
|
-
channelId: z.
|
|
179
|
-
templateId: z.
|
|
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.
|
|
182
|
-
updatedAt: z.
|
|
183
|
-
lastTriggeredAt: z.
|
|
184
|
-
status: z.
|
|
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.
|
|
192
|
-
id: z.
|
|
193
|
-
endpointId: z.
|
|
194
|
-
eventId: z.
|
|
195
|
-
eventType: z.
|
|
196
|
-
url: z.
|
|
197
|
-
httpMethod: z.
|
|
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.
|
|
203
|
-
payload: z.
|
|
204
|
-
attempts: z.
|
|
205
|
-
attemptNumber: z.
|
|
206
|
-
timestamp: z.
|
|
207
|
-
httpStatus: z.
|
|
208
|
-
responseBody: z.
|
|
209
|
-
responseHeaders: z.
|
|
210
|
-
error: z.
|
|
211
|
-
latencyMs: z.
|
|
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.
|
|
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.
|
|
220
|
-
completedAt: z.
|
|
221
|
-
nextRetryAt: z.
|
|
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.
|
|
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.
|
|
42
|
+
"@k-msg/core": "0.28.0",
|
|
43
43
|
"@noble/hashes": "^1.8.0",
|
|
44
44
|
"zod": "^4.0.14"
|
|
45
45
|
},
|