@magicpages/ghost-typesense-webhook 1.0.1 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicpages/ghost-typesense-webhook",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Webhook handler for real-time Ghost content synchronization with Typesense",
5
5
  "author": "MagicPages",
6
6
  "license": "MIT",
@@ -127,6 +127,8 @@ describe('Webhook Handler', () => {
127
127
  visibility: 'public',
128
128
  updated_at: '2024-02-09T12:00:00.000Z',
129
129
  published_at: '2024-02-09T12:00:00.000Z',
130
+ url: 'https://test.com/test-post-1',
131
+ excerpt: 'Test excerpt',
130
132
  custom_excerpt: 'Test excerpt',
131
133
  feature_image: null
132
134
  }
@@ -157,6 +159,8 @@ describe('Webhook Handler', () => {
157
159
  visibility: 'public',
158
160
  updated_at: '2024-02-09T12:00:00.000Z',
159
161
  published_at: '2024-02-09T12:00:00.000Z',
162
+ url: 'https://test.com/test-post-1',
163
+ excerpt: 'Test excerpt',
160
164
  custom_excerpt: 'Test excerpt',
161
165
  feature_image: null
162
166
  }
package/src/handler.ts CHANGED
@@ -20,11 +20,13 @@ const WebhookSchema = z.object({
20
20
  id: z.string(),
21
21
  title: z.string(),
22
22
  slug: z.string(),
23
+ url: z.string().url(),
23
24
  html: z.string(),
24
25
  status: z.string(),
25
26
  visibility: z.string(),
26
27
  updated_at: z.string(),
27
28
  published_at: z.string().nullable(),
29
+ excerpt: z.string().nullable(),
28
30
  custom_excerpt: z.string().nullable().optional(),
29
31
  feature_image: z.string().nullable().optional(),
30
32
  tags: z.array(z.object({