@scalemule/nextjs 0.0.36 → 0.0.38

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,779 +0,0 @@
1
- import { $ as RegisterRequest, p as ClientContext, U as User, v as LoginRequest, L as LoginResponse, c as ListFilesParams, t as ListFilesResponse, a9 as StorageFile, af as UploadResponse } from './index-BIIUrnPr.mjs';
2
-
3
- /**
4
- * Server-Side ScaleMule Client
5
- *
6
- * Stateless client for use in Next.js API routes.
7
- * Does not manage sessions - that's handled by cookies.
8
- */
9
-
10
- type ScaleMuleEnvironment = 'dev' | 'prod';
11
- interface ServerConfig {
12
- /** Your ScaleMule API key (use env var, never hardcode) */
13
- apiKey: string;
14
- /** Environment: 'dev' or 'prod' - automatically sets gateway URL */
15
- environment?: ScaleMuleEnvironment;
16
- /** Custom gateway URL (overrides environment preset) */
17
- gatewayUrl?: string;
18
- /** Enable debug logging */
19
- debug?: boolean;
20
- }
21
- declare function resolveGatewayUrl(config: ServerConfig): string;
22
- declare class ScaleMuleServer {
23
- private apiKey;
24
- private gatewayUrl;
25
- private debug;
26
- constructor(config: ServerConfig);
27
- /**
28
- * Make a request to the ScaleMule API
29
- *
30
- * @param method - HTTP method
31
- * @param path - API path (e.g., /v1/auth/login)
32
- * @param options - Request options
33
- * @param options.body - Request body (will be JSON stringified)
34
- * @param options.userId - User ID (passed through for storage operations)
35
- * @param options.sessionToken - Session token sent as Authorization: Bearer header
36
- * @param options.clientContext - End user context to forward (IP, user agent, etc.)
37
- */
38
- private request;
39
- auth: {
40
- /**
41
- * Register a new user
42
- */
43
- register: (data: RegisterRequest, options?: {
44
- clientContext?: ClientContext;
45
- }) => Promise<User>;
46
- /**
47
- * Login user - returns session token (store in HTTP-only cookie)
48
- */
49
- login: (data: LoginRequest, options?: {
50
- clientContext?: ClientContext;
51
- }) => Promise<LoginResponse>;
52
- /**
53
- * Logout user
54
- */
55
- logout: (sessionToken: string) => Promise<void>;
56
- /**
57
- * Get current user from session token
58
- */
59
- me: (sessionToken: string) => Promise<User>;
60
- /**
61
- * Refresh session token
62
- */
63
- refresh: (sessionToken: string) => Promise<{
64
- session_token: string;
65
- expires_at: string;
66
- }>;
67
- /**
68
- * Request password reset email
69
- */
70
- forgotPassword: (email: string, options?: {
71
- clientContext?: ClientContext;
72
- }) => Promise<{
73
- message: string;
74
- }>;
75
- /**
76
- * Reset password with token
77
- */
78
- resetPassword: (token: string, newPassword: string, options?: {
79
- clientContext?: ClientContext;
80
- }) => Promise<{
81
- message: string;
82
- }>;
83
- /**
84
- * Verify email with token
85
- */
86
- verifyEmail: (token: string) => Promise<{
87
- message?: string;
88
- verified?: boolean;
89
- session_token?: string;
90
- user?: User;
91
- expires_at?: string;
92
- }>;
93
- /**
94
- * Resend verification email.
95
- * Can be called with a session token (authenticated) or email (unauthenticated).
96
- */
97
- resendVerification: (sessionTokenOrEmail: string, options?: {
98
- email?: string;
99
- }) => Promise<{
100
- message: string;
101
- }>;
102
- };
103
- user: {
104
- /**
105
- * Update user profile
106
- */
107
- update: (sessionToken: string, data: {
108
- full_name?: string;
109
- avatar_url?: string;
110
- }) => Promise<User>;
111
- /**
112
- * Change password
113
- */
114
- changePassword: (sessionToken: string, currentPassword: string, newPassword: string) => Promise<{
115
- message: string;
116
- }>;
117
- /**
118
- * Change email
119
- */
120
- changeEmail: (sessionToken: string, newEmail: string, password: string) => Promise<{
121
- message: string;
122
- }>;
123
- /**
124
- * Delete account
125
- */
126
- deleteAccount: (sessionToken: string, password: string) => Promise<{
127
- message: string;
128
- }>;
129
- };
130
- secrets: {
131
- /**
132
- * Get a secret from the tenant vault
133
- *
134
- * @example
135
- * ```typescript
136
- * const result = await scalemule.secrets.get('ANONYMOUS_USER_SALT')
137
- * if (result.success) {
138
- * console.log('Salt:', result.data.value)
139
- * }
140
- * ```
141
- */
142
- get: (key: string) => Promise<{
143
- value: string;
144
- version: number;
145
- }>;
146
- /**
147
- * Set a secret in the tenant vault
148
- *
149
- * @example
150
- * ```typescript
151
- * await scalemule.secrets.set('ANONYMOUS_USER_SALT', 'my-secret-salt')
152
- * ```
153
- */
154
- set: (key: string, value: string) => Promise<{
155
- value: string;
156
- version: number;
157
- }>;
158
- /**
159
- * Delete a secret from the tenant vault
160
- */
161
- delete: (key: string) => Promise<void>;
162
- /**
163
- * List all secrets in the tenant vault
164
- */
165
- list: () => Promise<{
166
- secrets: Array<{
167
- path: string;
168
- version: number;
169
- }>;
170
- }>;
171
- /**
172
- * Get secret version history
173
- */
174
- versions: (key: string) => Promise<{
175
- versions: Array<{
176
- version: number;
177
- created_at: string;
178
- }>;
179
- }>;
180
- /**
181
- * Rollback to a specific version
182
- */
183
- rollback: (key: string, version: number) => Promise<{
184
- value: string;
185
- version: number;
186
- }>;
187
- /**
188
- * Rotate a secret (copy current version as new version)
189
- */
190
- rotate: (key: string, newValue: string) => Promise<{
191
- value: string;
192
- version: number;
193
- }>;
194
- };
195
- bundles: {
196
- /**
197
- * Get a bundle (structured secret like database credentials)
198
- *
199
- * @param key - Bundle key (e.g., 'database/prod')
200
- * @param resolve - Whether to resolve inheritance (default: true)
201
- *
202
- * @example
203
- * ```typescript
204
- * const result = await scalemule.bundles.get('database/prod')
205
- * if (result.success) {
206
- * console.log('DB Host:', result.data.data.host)
207
- * }
208
- * ```
209
- */
210
- get: <T = Record<string, unknown>>(key: string, resolve?: boolean) => Promise<{
211
- type: string;
212
- data: T;
213
- version: number;
214
- inherits_from?: string;
215
- }>;
216
- /**
217
- * Set a bundle (structured secret)
218
- *
219
- * @param key - Bundle key
220
- * @param type - Bundle type: 'mysql', 'postgres', 'redis', 's3', 'oauth', 'smtp', 'generic'
221
- * @param data - Bundle data (structure depends on type)
222
- * @param inheritsFrom - Optional parent bundle key for inheritance
223
- *
224
- * @example
225
- * ```typescript
226
- * // Create a MySQL bundle
227
- * await scalemule.bundles.set('database/prod', 'mysql', {
228
- * host: 'db.example.com',
229
- * port: 3306,
230
- * username: 'app',
231
- * password: 'secret',
232
- * database: 'myapp'
233
- * })
234
- *
235
- * // Create a bundle that inherits from another
236
- * await scalemule.bundles.set('database/staging', 'mysql', {
237
- * host: 'staging-db.example.com', // Override just the host
238
- * }, 'database/prod')
239
- * ```
240
- */
241
- set: <T = Record<string, unknown>>(key: string, type: string, data: T, inheritsFrom?: string) => Promise<{
242
- type: string;
243
- data: T;
244
- version: number;
245
- }>;
246
- /**
247
- * Delete a bundle
248
- */
249
- delete: (key: string) => Promise<void>;
250
- /**
251
- * List all bundles
252
- */
253
- list: () => Promise<{
254
- bundles: Array<{
255
- path: string;
256
- type: string;
257
- version: number;
258
- inherits_from?: string;
259
- }>;
260
- }>;
261
- /**
262
- * Get connection URL for a database bundle
263
- *
264
- * @example
265
- * ```typescript
266
- * const result = await scalemule.bundles.connectionUrl('database/prod')
267
- * if (result.success) {
268
- * const client = mysql.createConnection(result.data.url)
269
- * }
270
- * ```
271
- */
272
- connectionUrl: (key: string) => Promise<{
273
- url: string;
274
- }>;
275
- };
276
- vaultAudit: {
277
- /**
278
- * Query audit logs for your tenant's vault operations
279
- *
280
- * @example
281
- * ```typescript
282
- * const result = await scalemule.vaultAudit.query({
283
- * action: 'read',
284
- * path: 'database/*',
285
- * since: '2026-01-01'
286
- * })
287
- * ```
288
- */
289
- query: (options?: {
290
- action?: "read" | "write" | "delete" | "list";
291
- path?: string;
292
- since?: string;
293
- until?: string;
294
- limit?: number;
295
- }) => Promise<{
296
- logs: Array<{
297
- timestamp: string;
298
- action: string;
299
- resource_path: string;
300
- success: boolean;
301
- error_message?: string;
302
- }>;
303
- }>;
304
- };
305
- storage: {
306
- /**
307
- * List user's files
308
- */
309
- list: (userId: string, params?: ListFilesParams) => Promise<ListFilesResponse>;
310
- /**
311
- * Get file info
312
- */
313
- get: (fileId: string) => Promise<StorageFile>;
314
- /**
315
- * Delete file
316
- */
317
- delete: (userId: string, fileId: string) => Promise<void>;
318
- /**
319
- * Upload file (from server - use FormData)
320
- *
321
- * @param userId - The user ID who owns this file
322
- * @param file - File data to upload
323
- * @param options - Upload options
324
- * @param options.clientContext - End user context to forward (IP, user agent, etc.)
325
- *
326
- * @example
327
- * ```typescript
328
- * // Forward end user context for proper attribution
329
- * const result = await scalemule.storage.upload(
330
- * userId,
331
- * { buffer, filename, contentType },
332
- * { clientContext: extractClientContext(request) }
333
- * )
334
- * ```
335
- */
336
- upload: (userId: string, file: {
337
- buffer: BlobPart;
338
- filename: string;
339
- contentType: string;
340
- }, options?: {
341
- clientContext?: ClientContext;
342
- }) => Promise<UploadResponse>;
343
- };
344
- webhooks: {
345
- /**
346
- * Create a new webhook subscription
347
- *
348
- * @example
349
- * ```typescript
350
- * const result = await scalemule.webhooks.create({
351
- * webhook_name: 'Video Status Webhook',
352
- * url: 'https://myapp.com/api/webhooks/scalemule',
353
- * events: ['video.ready', 'video.failed']
354
- * })
355
- *
356
- * // Store the secret for signature verification
357
- * console.log('Webhook secret:', result.secret)
358
- * ```
359
- */
360
- create: (data: {
361
- webhook_name: string;
362
- url: string;
363
- events: string[];
364
- }) => Promise<{
365
- id: string;
366
- secret: string;
367
- url: string;
368
- events: string[];
369
- }>;
370
- /**
371
- * List all webhook subscriptions
372
- */
373
- list: () => Promise<{
374
- webhooks: Array<{
375
- id: string;
376
- webhook_name: string;
377
- url: string;
378
- events: string[];
379
- is_enabled: boolean;
380
- }>;
381
- }>;
382
- /**
383
- * Delete a webhook subscription
384
- */
385
- delete: (id: string) => Promise<void>;
386
- /**
387
- * Update a webhook subscription
388
- */
389
- update: (id: string, data: {
390
- url?: string;
391
- events?: string[];
392
- is_enabled?: boolean;
393
- }) => Promise<{
394
- id: string;
395
- url: string;
396
- events: string[];
397
- }>;
398
- /**
399
- * Get available webhook event types
400
- */
401
- eventTypes: () => Promise<{
402
- events: Array<{
403
- event_name: string;
404
- event_description: string;
405
- payload_schema: Record<string, unknown>;
406
- }>;
407
- }>;
408
- };
409
- analytics: {
410
- /**
411
- * Track an analytics event
412
- *
413
- * IMPORTANT: When calling from server-side code (API routes), always pass
414
- * clientContext to ensure the real end user's IP is recorded, not the server's IP.
415
- *
416
- * @example
417
- * ```typescript
418
- * // In an API route
419
- * import { extractClientContext, createServerClient } from '@scalemule/nextjs/server'
420
- *
421
- * export async function POST(request: NextRequest) {
422
- * const clientContext = extractClientContext(request)
423
- * const scalemule = createServerClient()
424
- *
425
- * await scalemule.analytics.trackEvent({
426
- * event_name: 'button_clicked',
427
- * properties: { button_id: 'signup' }
428
- * }, { clientContext })
429
- * }
430
- * ```
431
- */
432
- trackEvent: (event: {
433
- event_name: string;
434
- event_category?: string;
435
- properties?: Record<string, unknown>;
436
- user_id?: string;
437
- session_id?: string;
438
- anonymous_id?: string;
439
- session_duration_seconds?: number;
440
- page_url?: string;
441
- page_title?: string;
442
- referrer?: string;
443
- landing_page?: string;
444
- device_type?: string;
445
- device_brand?: string;
446
- device_model?: string;
447
- browser?: string;
448
- browser_version?: string;
449
- os?: string;
450
- os_version?: string;
451
- screen_resolution?: string;
452
- viewport_size?: string;
453
- utm_source?: string;
454
- utm_medium?: string;
455
- utm_campaign?: string;
456
- utm_term?: string;
457
- utm_content?: string;
458
- client_timestamp?: string;
459
- timestamp?: string;
460
- }, options?: {
461
- clientContext?: ClientContext;
462
- }) => Promise<{
463
- tracked: number;
464
- session_id?: string;
465
- }>;
466
- /**
467
- * Track a page view
468
- *
469
- * @example
470
- * ```typescript
471
- * await scalemule.analytics.trackPageView({
472
- * page_url: 'https://example.com/products',
473
- * page_title: 'Products',
474
- * referrer: 'https://google.com'
475
- * }, { clientContext })
476
- * ```
477
- */
478
- trackPageView: (data: {
479
- page_url: string;
480
- page_title?: string;
481
- referrer?: string;
482
- session_id?: string;
483
- user_id?: string;
484
- }, options?: {
485
- clientContext?: ClientContext;
486
- }) => Promise<{
487
- tracked: number;
488
- session_id?: string;
489
- }>;
490
- /**
491
- * Track multiple events in a batch (max 100)
492
- *
493
- * @example
494
- * ```typescript
495
- * await scalemule.analytics.trackBatch([
496
- * { event_name: 'item_viewed', properties: { item_id: '123' } },
497
- * { event_name: 'item_added_to_cart', properties: { item_id: '123' } }
498
- * ], { clientContext })
499
- * ```
500
- */
501
- trackBatch: (events: Array<{
502
- event_name: string;
503
- event_category?: string;
504
- properties?: Record<string, unknown>;
505
- user_id?: string;
506
- session_id?: string;
507
- anonymous_id?: string;
508
- session_duration_seconds?: number;
509
- page_url?: string;
510
- page_title?: string;
511
- referrer?: string;
512
- landing_page?: string;
513
- device_type?: string;
514
- browser?: string;
515
- os?: string;
516
- screen_resolution?: string;
517
- viewport_size?: string;
518
- utm_source?: string;
519
- utm_medium?: string;
520
- utm_campaign?: string;
521
- utm_term?: string;
522
- utm_content?: string;
523
- client_timestamp?: string;
524
- timestamp?: string;
525
- }>, options?: {
526
- clientContext?: ClientContext;
527
- }) => Promise<{
528
- tracked: number;
529
- }>;
530
- };
531
- flags: {
532
- evaluate: <T = unknown>(flagKey: string, context?: Record<string, unknown>, environment?: string, options?: {
533
- clientContext?: ClientContext;
534
- }) => Promise<{
535
- flag_id: string;
536
- flag_key: string;
537
- environment: string;
538
- value: T;
539
- reason: string;
540
- matched_rule_id?: string | null;
541
- variant_key?: string | null;
542
- bucket?: number | null;
543
- }>;
544
- evaluateBatch: (flagKeys: string[], context?: Record<string, unknown>, environment?: string, options?: {
545
- clientContext?: ClientContext;
546
- }) => Promise<Record<string, {
547
- flag_id: string;
548
- flag_key: string;
549
- environment: string;
550
- value: unknown;
551
- reason: string;
552
- matched_rule_id?: string | null;
553
- variant_key?: string | null;
554
- bucket?: number | null;
555
- }>>;
556
- evaluateAll: (context?: Record<string, unknown>, environment?: string, options?: {
557
- clientContext?: ClientContext;
558
- }) => Promise<Record<string, {
559
- flag_id: string;
560
- flag_key: string;
561
- environment: string;
562
- value: unknown;
563
- reason: string;
564
- matched_rule_id?: string | null;
565
- variant_key?: string | null;
566
- bucket?: number | null;
567
- }>>;
568
- };
569
- }
570
- /**
571
- * Create a server client with environment-based defaults
572
- */
573
- declare function createServerClient(config?: Partial<ServerConfig>): ScaleMuleServer;
574
-
575
- /**
576
- * ScaleMule Webhook Helpers
577
- *
578
- * Provides utilities for webhook signature verification and route handlers
579
- * for video processing events and other ScaleMule webhooks.
580
- *
581
- * @example
582
- * ```typescript
583
- * // app/api/webhooks/scalemule/route.ts
584
- * import { createWebhookRoutes } from '@scalemule/nextjs/server'
585
- *
586
- * export const { POST } = createWebhookRoutes({
587
- * secret: process.env.SCALEMULE_WEBHOOK_SECRET,
588
- * onVideoReady: async (event) => {
589
- * console.log('Video ready:', event.video_id)
590
- * await updateDocument('videos', event.video_id, { status: 'ready' })
591
- * },
592
- * onVideoFailed: async (event) => {
593
- * console.log('Video failed:', event.video_id, event.reason)
594
- * }
595
- * })
596
- * ```
597
- */
598
-
599
- interface WebhookEvent<T = Record<string, unknown>> {
600
- event: string;
601
- timestamp: number;
602
- data: T;
603
- }
604
- interface VideoReadyEvent {
605
- video_id: string;
606
- application_id: string;
607
- duration_seconds?: number;
608
- width?: number;
609
- height?: number;
610
- thumbnail_url?: string;
611
- playlist_url?: string;
612
- }
613
- interface VideoFailedEvent {
614
- video_id: string;
615
- application_id: string;
616
- reason: string;
617
- }
618
- interface VideoUploadedEvent {
619
- video_id: string;
620
- application_id: string;
621
- filename?: string;
622
- size_bytes?: number;
623
- }
624
- interface VideoTranscodedEvent {
625
- video_id: string;
626
- application_id: string;
627
- derivative_count: number;
628
- }
629
- interface WebhookRoutesConfig {
630
- /** ScaleMule client configuration (optional, uses env vars by default) */
631
- client?: Partial<ServerConfig>;
632
- /** Webhook secret for signature verification (recommended for security) */
633
- secret?: string;
634
- /** Handler for video.ready events */
635
- onVideoReady?: (event: VideoReadyEvent) => void | Promise<void>;
636
- /** Handler for video.failed events */
637
- onVideoFailed?: (event: VideoFailedEvent) => void | Promise<void>;
638
- /** Handler for video.uploaded events */
639
- onVideoUploaded?: (event: VideoUploadedEvent) => void | Promise<void>;
640
- /** Handler for video.transcoded events */
641
- onVideoTranscoded?: (event: VideoTranscodedEvent) => void | Promise<void>;
642
- /** Generic handler for any webhook event */
643
- onEvent?: (event: WebhookEvent) => void | Promise<void>;
644
- }
645
- /**
646
- * Verify webhook signature using HMAC-SHA256
647
- *
648
- * ScaleMule webhooks include a signature header in the format: sha256=<hex_signature>
649
- *
650
- * @param payload - Raw request body as string
651
- * @param signature - Value of X-Webhook-Signature header
652
- * @param secret - Your webhook secret
653
- * @returns true if signature is valid
654
- *
655
- * @example
656
- * ```typescript
657
- * const isValid = verifyWebhookSignature(body, signature, secret)
658
- * if (!isValid) {
659
- * return new Response('Invalid signature', { status: 401 })
660
- * }
661
- * ```
662
- */
663
- declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
664
- /**
665
- * Parse a webhook event from the raw payload
666
- *
667
- * @param payload - Raw request body as string
668
- * @returns Parsed webhook event
669
- */
670
- declare function parseWebhookEvent<T = Record<string, unknown>>(payload: string): WebhookEvent<T>;
671
- /**
672
- * Register a webhook for video events
673
- *
674
- * @param url - The URL to receive webhook notifications
675
- * @param options - Registration options
676
- * @returns The webhook ID and secret for signature verification
677
- *
678
- * @example
679
- * ```typescript
680
- * const { id, secret } = await registerVideoWebhook(
681
- * 'https://myapp.com/api/webhooks/scalemule',
682
- * { events: ['video.ready', 'video.failed'] }
683
- * )
684
- *
685
- * // Store the secret securely for signature verification
686
- * await saveToEnv('SCALEMULE_WEBHOOK_SECRET', secret)
687
- * ```
688
- */
689
- declare function registerVideoWebhook(url: string, options?: {
690
- /** Events to subscribe to (defaults to video.ready and video.failed) */
691
- events?: ('video.ready' | 'video.failed' | 'video.uploaded' | 'video.transcoded')[];
692
- /** Human-readable webhook name */
693
- name?: string;
694
- /** Client configuration */
695
- clientConfig?: Partial<ServerConfig>;
696
- }): Promise<{
697
- id: string;
698
- secret: string;
699
- }>;
700
- type RouteHandler$1 = (request: Request, context: {
701
- params: Promise<{
702
- scalemule?: string[];
703
- }>;
704
- }) => Promise<Response>;
705
- /**
706
- * Create Next.js App Router route handlers for ScaleMule webhooks
707
- *
708
- * Returns a POST handler that:
709
- * - Verifies webhook signature (if secret provided)
710
- * - Parses the event payload
711
- * - Calls appropriate event handlers
712
- * - Returns proper responses
713
- *
714
- * @param config - Webhook routes configuration
715
- * @returns Object with POST handler for use in route.ts
716
- *
717
- * @example
718
- * ```typescript
719
- * // app/api/webhooks/scalemule/route.ts
720
- * import { createWebhookRoutes } from '@scalemule/nextjs/server'
721
- *
722
- * export const { POST } = createWebhookRoutes({
723
- * secret: process.env.SCALEMULE_WEBHOOK_SECRET,
724
- * onVideoReady: async (event) => {
725
- * // Update your database when video is ready
726
- * await db.videos.update({
727
- * where: { id: event.video_id },
728
- * data: {
729
- * status: 'ready',
730
- * duration: event.duration_seconds,
731
- * thumbnailUrl: event.thumbnail_url,
732
- * }
733
- * })
734
- * },
735
- * onVideoFailed: async (event) => {
736
- * // Handle failed video processing
737
- * await notifyUser(event.video_id, event.reason)
738
- * }
739
- * })
740
- * ```
741
- */
742
- declare function createWebhookRoutes(config?: WebhookRoutesConfig): {
743
- POST: RouteHandler$1;
744
- };
745
-
746
- /**
747
- * Simplified webhook handler for 1-line setup.
748
- *
749
- * Usage in your Next.js app:
750
- * ```ts
751
- * // app/api/webhooks/scalemule/route.ts
752
- * import { createWebhookHandler } from '@scalemule/nextjs/server/webhooks'
753
- *
754
- * export const POST = createWebhookHandler({
755
- * secret: process.env.SCALEMULE_WEBHOOK_SECRET,
756
- * onEvent: {
757
- * 'video.transcoding.completed': async (event) => { ... },
758
- * 'storage.file.uploaded': async (event) => { ... },
759
- * }
760
- * })
761
- * ```
762
- */
763
-
764
- interface WebhookHandlerConfig {
765
- /** Webhook secret for signature verification */
766
- secret?: string;
767
- /** Map of event name → handler function */
768
- onEvent?: Record<string, (event: WebhookEvent) => void | Promise<void>>;
769
- }
770
- type RouteHandler = (request: Request) => Promise<Response>;
771
- /**
772
- * Create a webhook handler for ScaleMule events.
773
- *
774
- * Simpler alternative to createWebhookRoutes() — uses an event map
775
- * instead of separate onVideoReady, onVideoFailed, etc. callbacks.
776
- */
777
- declare function createWebhookHandler(config?: WebhookHandlerConfig): RouteHandler;
778
-
779
- export { type ServerConfig as S, type VideoFailedEvent as V, type WebhookEvent as W, ScaleMuleServer as a, type VideoReadyEvent as b, type VideoTranscodedEvent as c, type VideoUploadedEvent as d, type WebhookRoutesConfig as e, createServerClient as f, createWebhookHandler as g, createWebhookRoutes as h, resolveGatewayUrl as i, parseWebhookEvent as p, registerVideoWebhook as r, verifyWebhookSignature as v };