@fragno-dev/api-fragment 0.0.0-stage → 0.0.1

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.
Files changed (79) hide show
  1. package/LICENSE.md +16 -0
  2. package/README.md +249 -2
  3. package/dist/browser/client/client-3ZV9sw3i.js +2580 -0
  4. package/dist/browser/client/client-3ZV9sw3i.js.map +1 -0
  5. package/dist/browser/client/client-DPjmoaJQ.d.ts +711 -0
  6. package/dist/browser/client/client-DPjmoaJQ.d.ts.map +1 -0
  7. package/dist/browser/client/client.d.ts +1645 -0
  8. package/dist/browser/client/client.d.ts.map +1 -0
  9. package/dist/browser/client/client.js +2 -0
  10. package/dist/browser/client/react.d.ts +1665 -0
  11. package/dist/browser/client/react.d.ts.map +1 -0
  12. package/dist/browser/client/react.js +194 -0
  13. package/dist/browser/client/react.js.map +1 -0
  14. package/dist/browser/client/solid.d.ts +1668 -0
  15. package/dist/browser/client/solid.d.ts.map +1 -0
  16. package/dist/browser/client/solid.js +129 -0
  17. package/dist/browser/client/solid.js.map +1 -0
  18. package/dist/browser/client/svelte.d.ts +1668 -0
  19. package/dist/browser/client/svelte.d.ts.map +1 -0
  20. package/dist/browser/client/svelte.js +131 -0
  21. package/dist/browser/client/svelte.js.map +1 -0
  22. package/dist/browser/client/vanilla.d.ts +1695 -0
  23. package/dist/browser/client/vanilla.d.ts.map +1 -0
  24. package/dist/browser/client/vanilla.js +159 -0
  25. package/dist/browser/client/vanilla.js.map +1 -0
  26. package/dist/browser/client/vue.d.ts +1668 -0
  27. package/dist/browser/client/vue.d.ts.map +1 -0
  28. package/dist/browser/client/vue.js +127 -0
  29. package/dist/browser/client/vue.js.map +1 -0
  30. package/dist/browser/client-D4NnY-zV.d.ts +713 -0
  31. package/dist/browser/client-D4NnY-zV.d.ts.map +1 -0
  32. package/dist/browser/client-DQE0c7GI.d.ts +711 -0
  33. package/dist/browser/client-DQE0c7GI.d.ts.map +1 -0
  34. package/dist/browser/index.d.ts +3130 -0
  35. package/dist/browser/index.d.ts.map +1 -0
  36. package/dist/browser/index.js +2 -0
  37. package/dist/browser/src-BrYPVbAN.js +2404 -0
  38. package/dist/browser/src-BrYPVbAN.js.map +1 -0
  39. package/dist/browser/src-t-4wp9-f.js +2400 -0
  40. package/dist/browser/src-t-4wp9-f.js.map +1 -0
  41. package/dist/node/api-types.d.ts +731 -0
  42. package/dist/node/api-types.d.ts.map +1 -0
  43. package/dist/node/api-types.js +281 -0
  44. package/dist/node/api-types.js.map +1 -0
  45. package/dist/node/crypto.d.ts +6 -0
  46. package/dist/node/crypto.d.ts.map +1 -0
  47. package/dist/node/crypto.js +103 -0
  48. package/dist/node/crypto.js.map +1 -0
  49. package/dist/node/definition.d.ts +638 -0
  50. package/dist/node/definition.d.ts.map +1 -0
  51. package/dist/node/definition.js +315 -0
  52. package/dist/node/definition.js.map +1 -0
  53. package/dist/node/oauth.js +124 -0
  54. package/dist/node/oauth.js.map +1 -0
  55. package/dist/node/routes.d.ts +1585 -0
  56. package/dist/node/routes.d.ts.map +1 -0
  57. package/dist/node/routes.js +1100 -0
  58. package/dist/node/routes.js.map +1 -0
  59. package/dist/node/schema.d.ts +99 -0
  60. package/dist/node/schema.d.ts.map +1 -0
  61. package/dist/node/schema.js +16 -0
  62. package/dist/node/schema.js.map +1 -0
  63. package/dist/node/server.d.ts +1585 -0
  64. package/dist/node/server.d.ts.map +1 -0
  65. package/dist/node/server.js +12 -0
  66. package/dist/node/server.js.map +1 -0
  67. package/dist/node/services.d.ts +10 -0
  68. package/dist/node/services.d.ts.map +1 -0
  69. package/dist/node/services.js +304 -0
  70. package/dist/node/services.js.map +1 -0
  71. package/dist/node/webhooks/auth.d.ts +133 -0
  72. package/dist/node/webhooks/auth.d.ts.map +1 -0
  73. package/dist/node/webhooks/auth.js +268 -0
  74. package/dist/node/webhooks/auth.js.map +1 -0
  75. package/dist/node/webhooks/verification.d.ts +102 -0
  76. package/dist/node/webhooks/verification.d.ts.map +1 -0
  77. package/dist/node/webhooks/verification.js +119 -0
  78. package/dist/node/webhooks/verification.js.map +1 -0
  79. package/package.json +136 -3
@@ -0,0 +1,3130 @@
1
+ import { n as FragnoClientMutatorData, o as NonGetHTTPMethod, s as FragnoPublicClientConfig, t as FragnoClientHookData } from "./client-D4NnY-zV.js";
2
+ import { FragnoPublicConfigWithDatabase, HookContext, HookFn } from "@fragno-dev/db";
3
+ import { z } from "zod";
4
+ import { Column } from "@fragno-dev/db/schema";
5
+ //#region src/api-types.d.ts
6
+ interface ApiFragmentConfig$1 {
7
+ /** Public URL where this fragment is mounted; used to build OAuth redirects. */
8
+ publicBaseUrl: string;
9
+ /** Optional URL allow-list. If omitted, only http(s) URL syntax is checked. */
10
+ allowedBaseUrls?: (url: URL) => boolean;
11
+ /** Optional fetch implementation for tests/custom runtimes. */
12
+ fetch?: typeof fetch;
13
+ }
14
+ declare const authConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ type: z.ZodLiteral<"none">;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ type: z.ZodLiteral<"bearer">;
18
+ token: z.ZodString;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<"client_credentials">;
21
+ tokenEndpoint: z.ZodURL;
22
+ clientId: z.ZodString;
23
+ clientSecret: z.ZodString;
24
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ audience: z.ZodOptional<z.ZodString>;
26
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
27
+ client_secret_basic: "client_secret_basic";
28
+ client_secret_post: "client_secret_post";
29
+ }>>;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ type: z.ZodLiteral<"oauth">;
32
+ authorizationEndpoint: z.ZodURL;
33
+ tokenEndpoint: z.ZodURL;
34
+ clientId: z.ZodString;
35
+ clientSecret: z.ZodOptional<z.ZodString>;
36
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
38
+ none: "none";
39
+ client_secret_basic: "client_secret_basic";
40
+ client_secret_post: "client_secret_post";
41
+ }>>;
42
+ extraAuthorizationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
43
+ extraTokenParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
44
+ }, z.core.$strip>], "type">;
45
+ declare const createApiConnectionInputSchema: z.ZodObject<{
46
+ name: z.ZodOptional<z.ZodString>;
47
+ baseUrl: z.ZodURL;
48
+ auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
49
+ type: z.ZodLiteral<"none">;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<"bearer">;
52
+ token: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ type: z.ZodLiteral<"client_credentials">;
55
+ tokenEndpoint: z.ZodURL;
56
+ clientId: z.ZodString;
57
+ clientSecret: z.ZodString;
58
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ audience: z.ZodOptional<z.ZodString>;
60
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
61
+ client_secret_basic: "client_secret_basic";
62
+ client_secret_post: "client_secret_post";
63
+ }>>;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ type: z.ZodLiteral<"oauth">;
66
+ authorizationEndpoint: z.ZodURL;
67
+ tokenEndpoint: z.ZodURL;
68
+ clientId: z.ZodString;
69
+ clientSecret: z.ZodOptional<z.ZodString>;
70
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
72
+ none: "none";
73
+ client_secret_basic: "client_secret_basic";
74
+ client_secret_post: "client_secret_post";
75
+ }>>;
76
+ extraAuthorizationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
77
+ extraTokenParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
78
+ }, z.core.$strip>], "type">>;
79
+ }, z.core.$strip>;
80
+ declare const apiConnectionOutputSchema: z.ZodObject<{
81
+ slug: z.ZodString;
82
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ baseUrl: z.ZodString;
84
+ authMode: z.ZodString;
85
+ status: z.ZodString;
86
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
87
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
88
+ }, z.core.$strip>;
89
+ declare const apiRequestInputSchema: z.ZodObject<{
90
+ method: z.ZodEnum<{
91
+ GET: "GET";
92
+ POST: "POST";
93
+ PUT: "PUT";
94
+ PATCH: "PATCH";
95
+ DELETE: "DELETE";
96
+ }>;
97
+ path: z.ZodString;
98
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
99
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
100
+ json: z.ZodOptional<z.ZodUnknown>;
101
+ body: z.ZodOptional<z.ZodString>;
102
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
103
+ }, z.core.$strip>;
104
+ declare const webhookDeliveryIdentitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ type: z.ZodLiteral<"header">;
106
+ name: z.ZodString;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ type: z.ZodLiteral<"query">;
109
+ name: z.ZodString;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ type: z.ZodLiteral<"jsonBodyPath">;
112
+ path: z.ZodArray<z.ZodString>;
113
+ }, z.core.$strip>], "type">;
114
+ declare const webhookEndpointAuthInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ type: z.ZodLiteral<"none">;
116
+ }, z.core.$strip>, z.ZodObject<{
117
+ type: z.ZodLiteral<"bearer">;
118
+ token: z.ZodString;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ type: z.ZodLiteral<"apiKey">;
121
+ location: z.ZodEnum<{
122
+ header: "header";
123
+ query: "query";
124
+ }>;
125
+ name: z.ZodString;
126
+ secret: z.ZodString;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ type: z.ZodLiteral<"basic">;
129
+ username: z.ZodString;
130
+ password: z.ZodString;
131
+ }, z.core.$strip>, z.ZodObject<{
132
+ type: z.ZodLiteral<"hmac">;
133
+ secret: z.ZodString;
134
+ algorithm: z.ZodEnum<{
135
+ sha1: "sha1";
136
+ sha256: "sha256";
137
+ sha512: "sha512";
138
+ }>;
139
+ signature: z.ZodObject<{
140
+ location: z.ZodEnum<{
141
+ header: "header";
142
+ query: "query";
143
+ }>;
144
+ name: z.ZodString;
145
+ encoding: z.ZodEnum<{
146
+ hex: "hex";
147
+ base64: "base64";
148
+ base64url: "base64url";
149
+ }>;
150
+ prefix: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strip>;
152
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
153
+ type: z.ZodLiteral<"rawBody">;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ type: z.ZodLiteral<"timestampBody">;
156
+ timestampHeader: z.ZodString;
157
+ delimiter: z.ZodString;
158
+ toleranceSeconds: z.ZodNumber;
159
+ }, z.core.$strip>], "type">;
160
+ }, z.core.$strip>], "type">;
161
+ declare const webhookEndpointOutputSchema: z.ZodObject<{
162
+ id: z.ZodString;
163
+ name: z.ZodString;
164
+ status: z.ZodEnum<{
165
+ draft: "draft";
166
+ active: "active";
167
+ disabled: "disabled";
168
+ }>;
169
+ authConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
170
+ type: z.ZodLiteral<"none">;
171
+ }, z.core.$strip>, z.ZodObject<{
172
+ type: z.ZodLiteral<"bearer">;
173
+ tokenRef: z.ZodString;
174
+ }, z.core.$strip>, z.ZodObject<{
175
+ type: z.ZodLiteral<"apiKey">;
176
+ location: z.ZodEnum<{
177
+ header: "header";
178
+ query: "query";
179
+ }>;
180
+ name: z.ZodString;
181
+ secretRef: z.ZodString;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ type: z.ZodLiteral<"basic">;
184
+ usernameRef: z.ZodString;
185
+ passwordRef: z.ZodString;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ type: z.ZodLiteral<"hmac">;
188
+ secretRef: z.ZodString;
189
+ algorithm: z.ZodEnum<{
190
+ sha1: "sha1";
191
+ sha256: "sha256";
192
+ sha512: "sha512";
193
+ }>;
194
+ signature: z.ZodObject<{
195
+ location: z.ZodEnum<{
196
+ header: "header";
197
+ query: "query";
198
+ }>;
199
+ name: z.ZodString;
200
+ encoding: z.ZodEnum<{
201
+ hex: "hex";
202
+ base64: "base64";
203
+ base64url: "base64url";
204
+ }>;
205
+ prefix: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strip>;
207
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
208
+ type: z.ZodLiteral<"rawBody">;
209
+ }, z.core.$strip>, z.ZodObject<{
210
+ type: z.ZodLiteral<"timestampBody">;
211
+ timestampHeader: z.ZodString;
212
+ delimiter: z.ZodString;
213
+ toleranceSeconds: z.ZodNumber;
214
+ }, z.core.$strip>], "type">;
215
+ }, z.core.$strip>], "type">;
216
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
217
+ type: z.ZodLiteral<"header">;
218
+ name: z.ZodString;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ type: z.ZodLiteral<"query">;
221
+ name: z.ZodString;
222
+ }, z.core.$strip>, z.ZodObject<{
223
+ type: z.ZodLiteral<"jsonBodyPath">;
224
+ path: z.ZodArray<z.ZodString>;
225
+ }, z.core.$strip>], "type">;
226
+ secretRefs: z.ZodArray<z.ZodString>;
227
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
228
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
229
+ }, z.core.$strip>;
230
+ declare const createWebhookEndpointInputSchema: z.ZodObject<{
231
+ name: z.ZodString;
232
+ status: z.ZodDefault<z.ZodEnum<{
233
+ draft: "draft";
234
+ active: "active";
235
+ disabled: "disabled";
236
+ }>>;
237
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
238
+ type: z.ZodLiteral<"header">;
239
+ name: z.ZodString;
240
+ }, z.core.$strip>, z.ZodObject<{
241
+ type: z.ZodLiteral<"query">;
242
+ name: z.ZodString;
243
+ }, z.core.$strip>, z.ZodObject<{
244
+ type: z.ZodLiteral<"jsonBodyPath">;
245
+ path: z.ZodArray<z.ZodString>;
246
+ }, z.core.$strip>], "type">;
247
+ auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
248
+ type: z.ZodLiteral<"none">;
249
+ }, z.core.$strip>, z.ZodObject<{
250
+ type: z.ZodLiteral<"bearer">;
251
+ token: z.ZodString;
252
+ }, z.core.$strip>, z.ZodObject<{
253
+ type: z.ZodLiteral<"apiKey">;
254
+ location: z.ZodEnum<{
255
+ header: "header";
256
+ query: "query";
257
+ }>;
258
+ name: z.ZodString;
259
+ secret: z.ZodString;
260
+ }, z.core.$strip>, z.ZodObject<{
261
+ type: z.ZodLiteral<"basic">;
262
+ username: z.ZodString;
263
+ password: z.ZodString;
264
+ }, z.core.$strip>, z.ZodObject<{
265
+ type: z.ZodLiteral<"hmac">;
266
+ secret: z.ZodString;
267
+ algorithm: z.ZodEnum<{
268
+ sha1: "sha1";
269
+ sha256: "sha256";
270
+ sha512: "sha512";
271
+ }>;
272
+ signature: z.ZodObject<{
273
+ location: z.ZodEnum<{
274
+ header: "header";
275
+ query: "query";
276
+ }>;
277
+ name: z.ZodString;
278
+ encoding: z.ZodEnum<{
279
+ hex: "hex";
280
+ base64: "base64";
281
+ base64url: "base64url";
282
+ }>;
283
+ prefix: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strip>;
285
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
286
+ type: z.ZodLiteral<"rawBody">;
287
+ }, z.core.$strip>, z.ZodObject<{
288
+ type: z.ZodLiteral<"timestampBody">;
289
+ timestampHeader: z.ZodString;
290
+ delimiter: z.ZodString;
291
+ toleranceSeconds: z.ZodNumber;
292
+ }, z.core.$strip>], "type">;
293
+ }, z.core.$strip>], "type">;
294
+ }, z.core.$strip>;
295
+ declare const updateWebhookEndpointInputSchema: z.ZodObject<{
296
+ name: z.ZodOptional<z.ZodString>;
297
+ status: z.ZodOptional<z.ZodEnum<{
298
+ draft: "draft";
299
+ active: "active";
300
+ disabled: "disabled";
301
+ }>>;
302
+ deliveryIdentity: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
303
+ type: z.ZodLiteral<"header">;
304
+ name: z.ZodString;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ type: z.ZodLiteral<"query">;
307
+ name: z.ZodString;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ type: z.ZodLiteral<"jsonBodyPath">;
310
+ path: z.ZodArray<z.ZodString>;
311
+ }, z.core.$strip>], "type">>;
312
+ auth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
313
+ type: z.ZodLiteral<"none">;
314
+ }, z.core.$strip>, z.ZodObject<{
315
+ type: z.ZodLiteral<"bearer">;
316
+ token: z.ZodString;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ type: z.ZodLiteral<"apiKey">;
319
+ location: z.ZodEnum<{
320
+ header: "header";
321
+ query: "query";
322
+ }>;
323
+ name: z.ZodString;
324
+ secret: z.ZodString;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<"basic">;
327
+ username: z.ZodString;
328
+ password: z.ZodString;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<"hmac">;
331
+ secret: z.ZodString;
332
+ algorithm: z.ZodEnum<{
333
+ sha1: "sha1";
334
+ sha256: "sha256";
335
+ sha512: "sha512";
336
+ }>;
337
+ signature: z.ZodObject<{
338
+ location: z.ZodEnum<{
339
+ header: "header";
340
+ query: "query";
341
+ }>;
342
+ name: z.ZodString;
343
+ encoding: z.ZodEnum<{
344
+ hex: "hex";
345
+ base64: "base64";
346
+ base64url: "base64url";
347
+ }>;
348
+ prefix: z.ZodOptional<z.ZodString>;
349
+ }, z.core.$strip>;
350
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
351
+ type: z.ZodLiteral<"rawBody">;
352
+ }, z.core.$strip>, z.ZodObject<{
353
+ type: z.ZodLiteral<"timestampBody">;
354
+ timestampHeader: z.ZodString;
355
+ delimiter: z.ZodString;
356
+ toleranceSeconds: z.ZodNumber;
357
+ }, z.core.$strip>], "type">;
358
+ }, z.core.$strip>], "type">>;
359
+ }, z.core.$strip>;
360
+ type AuthConfig = z.infer<typeof authConfigSchema>;
361
+ type ApiConnectionInput = z.infer<typeof createApiConnectionInputSchema>;
362
+ type ApiConnection = z.infer<typeof apiConnectionOutputSchema>;
363
+ type ApiRequestInput = z.infer<typeof apiRequestInputSchema>;
364
+ type WebhookDeliveryIdentity = z.infer<typeof webhookDeliveryIdentitySchema>;
365
+ type WebhookEndpointAuthInput = z.infer<typeof webhookEndpointAuthInputSchema>;
366
+ type WebhookEndpointInput = z.infer<typeof createWebhookEndpointInputSchema>;
367
+ type UpdateWebhookEndpointInput = z.infer<typeof updateWebhookEndpointInputSchema>;
368
+ type WebhookEndpoint = z.infer<typeof webhookEndpointOutputSchema>;
369
+ //#endregion
370
+ //#region src/services.d.ts
371
+ interface AuthPersistenceChanges {
372
+ authPayload?: string;
373
+ authExpiresAt?: Date | null;
374
+ }
375
+ //#endregion
376
+ //#region src/definition.d.ts
377
+ interface ApiConnectionHookSnapshot {
378
+ slug: string;
379
+ name: string | null;
380
+ baseUrl: string;
381
+ authMode: string;
382
+ status: string;
383
+ }
384
+ interface ApiConnectionChangedPayload {
385
+ connectionId: string;
386
+ connection: ApiConnectionHookSnapshot;
387
+ }
388
+ interface ApiConnectionDeletedPayload {
389
+ connectionId: string;
390
+ previous: ApiConnectionHookSnapshot;
391
+ }
392
+ interface ApiConnectionAvailablePayload {
393
+ connectionId: string;
394
+ connection: ApiConnectionHookSnapshot;
395
+ authMode: string;
396
+ }
397
+ interface InternalWebhookReceivedPayload {
398
+ endpointId: string;
399
+ deliveryId: string;
400
+ hookId: string;
401
+ receivedAt: string;
402
+ headers: Record<string, string>;
403
+ query: Record<string, string>;
404
+ rawBody: string;
405
+ body: Record<string, unknown>;
406
+ contentType: string | null;
407
+ }
408
+ interface WebhookReceivedPayload {
409
+ endpointId: string;
410
+ deliveryId: string;
411
+ hookId: string;
412
+ receivedAt: string;
413
+ headers: Record<string, string>;
414
+ query: Record<string, string>;
415
+ body: Record<string, unknown>;
416
+ contentType: string | null;
417
+ }
418
+ interface ApiFragmentHooksConfig {
419
+ onConnectionChanged?: (payload: ApiConnectionChangedPayload, context: HookContext) => Promise<void> | void;
420
+ onConnectionDeleted?: (payload: ApiConnectionDeletedPayload, context: HookContext) => Promise<void> | void;
421
+ onConnectionAvailable?: (payload: ApiConnectionAvailablePayload, context: HookContext) => Promise<void> | void;
422
+ onWebhookReceived?: (payload: WebhookReceivedPayload, context: HookContext) => Promise<void> | void;
423
+ }
424
+ type ApiFragmentConfig = ApiFragmentConfig$1 & ApiFragmentHooksConfig;
425
+ type ApiHooksMap = {
426
+ onConnectionChanged: HookFn<ApiConnectionChangedPayload>;
427
+ onConnectionDeleted: HookFn<ApiConnectionDeletedPayload>;
428
+ onConnectionAvailable: HookFn<ApiConnectionAvailablePayload>;
429
+ onWebhookReceived: HookFn<InternalWebhookReceivedPayload>;
430
+ };
431
+ declare const apiFragmentDefinition: import("@fragno-dev/core").FragmentDefinition<ApiFragmentConfig, import("@fragno-dev/db").FragnoPublicConfigWithDatabase, import("@fragno-dev/db").ImplicitDatabaseDependencies, {
432
+ startOAuth: (input: {
433
+ connectionId: string;
434
+ stateId: string;
435
+ scopes?: string[];
436
+ extraAuthorizationParams?: Record<string, string>;
437
+ }) => import("@fragno-dev/db").TxResult<{
438
+ found: false;
439
+ reason: "connection_not_found";
440
+ authorizationUrl?: undefined;
441
+ oauthState?: undefined;
442
+ } | {
443
+ found: false;
444
+ reason: "auth_not_configured";
445
+ authorizationUrl?: undefined;
446
+ oauthState?: undefined;
447
+ } | {
448
+ found: false;
449
+ reason: "auth_not_oauth";
450
+ authorizationUrl?: undefined;
451
+ oauthState?: undefined;
452
+ } | {
453
+ found: true;
454
+ authorizationUrl: string;
455
+ oauthState: {
456
+ id: string;
457
+ connectionId: string;
458
+ codeVerifier: string;
459
+ redirectUri: string;
460
+ scope: string | null;
461
+ expiresAt: Date;
462
+ };
463
+ reason?: undefined;
464
+ }, {
465
+ found: false;
466
+ reason: "connection_not_found";
467
+ authorizationUrl?: undefined;
468
+ oauthState?: undefined;
469
+ } | {
470
+ found: false;
471
+ reason: "auth_not_configured";
472
+ authorizationUrl?: undefined;
473
+ oauthState?: undefined;
474
+ } | {
475
+ found: false;
476
+ reason: "auth_not_oauth";
477
+ authorizationUrl?: undefined;
478
+ oauthState?: undefined;
479
+ } | {
480
+ found: true;
481
+ authorizationUrl: string;
482
+ oauthState: {
483
+ id: string;
484
+ connectionId: string;
485
+ codeVerifier: string;
486
+ redirectUri: string;
487
+ scope: string | null;
488
+ expiresAt: Date;
489
+ };
490
+ reason?: undefined;
491
+ }>;
492
+ completeOAuthCallback: (input: {
493
+ stateId: string;
494
+ code: string;
495
+ }) => import("@fragno-dev/db").TxResult<{
496
+ found: false;
497
+ reason: "invalid_state";
498
+ connection?: undefined;
499
+ changes?: undefined;
500
+ } | {
501
+ found: false;
502
+ reason: "connection_not_found";
503
+ connection?: undefined;
504
+ changes?: undefined;
505
+ } | {
506
+ found: false;
507
+ reason: "auth_not_configured";
508
+ connection?: undefined;
509
+ changes?: undefined;
510
+ } | {
511
+ found: false;
512
+ reason: "auth_not_oauth";
513
+ connection?: undefined;
514
+ changes?: undefined;
515
+ } | {
516
+ found: true;
517
+ connection: {
518
+ id: import("@fragno-dev/db/schema").FragnoId;
519
+ name: string | null;
520
+ baseUrl: string;
521
+ authMode: string;
522
+ status: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ };
526
+ changes: {
527
+ authPayload: string;
528
+ authExpiresAt: Date | null;
529
+ };
530
+ reason?: undefined;
531
+ }, {
532
+ found: false;
533
+ reason: "invalid_state";
534
+ connection?: undefined;
535
+ changes?: undefined;
536
+ } | {
537
+ found: false;
538
+ reason: "connection_not_found";
539
+ connection?: undefined;
540
+ changes?: undefined;
541
+ } | {
542
+ found: false;
543
+ reason: "auth_not_configured";
544
+ connection?: undefined;
545
+ changes?: undefined;
546
+ } | {
547
+ found: false;
548
+ reason: "auth_not_oauth";
549
+ connection?: undefined;
550
+ changes?: undefined;
551
+ } | {
552
+ found: true;
553
+ connection: {
554
+ id: import("@fragno-dev/db/schema").FragnoId;
555
+ name: string | null;
556
+ baseUrl: string;
557
+ authMode: string;
558
+ status: string;
559
+ createdAt: Date;
560
+ updatedAt: Date;
561
+ };
562
+ changes: {
563
+ authPayload: string;
564
+ authExpiresAt: Date | null;
565
+ };
566
+ reason?: undefined;
567
+ }>;
568
+ executeApiRequest: (input: {
569
+ connectionId: string;
570
+ request: ApiRequestInput;
571
+ }) => import("@fragno-dev/db").TxResult<{
572
+ found: false;
573
+ reason?: undefined;
574
+ connection?: undefined;
575
+ secrets?: undefined;
576
+ authChanges?: undefined;
577
+ response?: undefined;
578
+ } | {
579
+ found: false;
580
+ reason: "connection_disabled";
581
+ connection?: undefined;
582
+ secrets?: undefined;
583
+ authChanges?: undefined;
584
+ response?: undefined;
585
+ } | {
586
+ found: true;
587
+ response: {
588
+ status: number;
589
+ statusText: string;
590
+ headers: {
591
+ [k: string]: string;
592
+ };
593
+ body: any;
594
+ };
595
+ }, {
596
+ found: false;
597
+ reason?: undefined;
598
+ connection?: undefined;
599
+ secrets?: undefined;
600
+ authChanges?: undefined;
601
+ response?: undefined;
602
+ } | {
603
+ found: false;
604
+ reason: "connection_disabled";
605
+ connection?: undefined;
606
+ secrets?: undefined;
607
+ authChanges?: undefined;
608
+ response?: undefined;
609
+ } | {
610
+ found: true;
611
+ connection: {
612
+ id: import("@fragno-dev/db/schema").FragnoId;
613
+ name: string | null;
614
+ baseUrl: string;
615
+ authMode: string;
616
+ status: string;
617
+ createdAt: Date;
618
+ updatedAt: Date;
619
+ };
620
+ secrets: {
621
+ id: import("@fragno-dev/db/schema").FragnoId;
622
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
623
+ kind: string;
624
+ payload: string;
625
+ expiresAt: Date | null;
626
+ updatedAt: Date;
627
+ }[];
628
+ authChanges: AuthPersistenceChanges | undefined;
629
+ response: {
630
+ status: number;
631
+ statusText: string;
632
+ headers: {
633
+ [k: string]: string;
634
+ };
635
+ body: any;
636
+ };
637
+ reason?: undefined;
638
+ }>;
639
+ refreshClientCredentialsToken: (input: {
640
+ connectionId: string;
641
+ }) => import("@fragno-dev/db").TxResult<{
642
+ found: false;
643
+ connection?: undefined;
644
+ secrets?: undefined;
645
+ authChanges?: undefined;
646
+ tokenPresent?: undefined;
647
+ } | {
648
+ found: true;
649
+ tokenPresent: boolean;
650
+ }, {
651
+ found: false;
652
+ connection?: undefined;
653
+ secrets?: undefined;
654
+ authChanges?: undefined;
655
+ tokenPresent?: undefined;
656
+ } | {
657
+ found: true;
658
+ connection: {
659
+ id: import("@fragno-dev/db/schema").FragnoId;
660
+ name: string | null;
661
+ baseUrl: string;
662
+ authMode: string;
663
+ status: string;
664
+ createdAt: Date;
665
+ updatedAt: Date;
666
+ };
667
+ secrets: {
668
+ id: import("@fragno-dev/db/schema").FragnoId;
669
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
670
+ kind: string;
671
+ payload: string;
672
+ expiresAt: Date | null;
673
+ updatedAt: Date;
674
+ }[];
675
+ authChanges: AuthPersistenceChanges | undefined;
676
+ tokenPresent: boolean;
677
+ }>;
678
+ }, {}, {}, {}, import("@fragno-dev/db").DatabaseServiceContext<ApiHooksMap>, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>, import("@fragno-dev/db/fragment-definition-builder").DatabaseRequestStorage, []>;
679
+ //#endregion
680
+ //#region src/routes.d.ts
681
+ declare const apiRoutesFactory: import("@fragno-dev/core").RouteFactory<ApiFragmentConfig$1 & ApiFragmentHooksConfig, import("@fragno-dev/db").ImplicitDatabaseDependencies, import("@fragno-dev/core").BoundServices<{
682
+ startOAuth: (input: {
683
+ connectionId: string;
684
+ stateId: string;
685
+ scopes?: string[];
686
+ extraAuthorizationParams?: Record<string, string>;
687
+ }) => import("@fragno-dev/db").TxResult<{
688
+ found: false;
689
+ reason: "connection_not_found";
690
+ authorizationUrl?: undefined;
691
+ oauthState?: undefined;
692
+ } | {
693
+ found: false;
694
+ reason: "auth_not_configured";
695
+ authorizationUrl?: undefined;
696
+ oauthState?: undefined;
697
+ } | {
698
+ found: false;
699
+ reason: "auth_not_oauth";
700
+ authorizationUrl?: undefined;
701
+ oauthState?: undefined;
702
+ } | {
703
+ found: true;
704
+ authorizationUrl: string;
705
+ oauthState: {
706
+ id: string;
707
+ connectionId: string;
708
+ codeVerifier: string;
709
+ redirectUri: string;
710
+ scope: string | null;
711
+ expiresAt: Date;
712
+ };
713
+ reason?: undefined;
714
+ }, {
715
+ found: false;
716
+ reason: "connection_not_found";
717
+ authorizationUrl?: undefined;
718
+ oauthState?: undefined;
719
+ } | {
720
+ found: false;
721
+ reason: "auth_not_configured";
722
+ authorizationUrl?: undefined;
723
+ oauthState?: undefined;
724
+ } | {
725
+ found: false;
726
+ reason: "auth_not_oauth";
727
+ authorizationUrl?: undefined;
728
+ oauthState?: undefined;
729
+ } | {
730
+ found: true;
731
+ authorizationUrl: string;
732
+ oauthState: {
733
+ id: string;
734
+ connectionId: string;
735
+ codeVerifier: string;
736
+ redirectUri: string;
737
+ scope: string | null;
738
+ expiresAt: Date;
739
+ };
740
+ reason?: undefined;
741
+ }>;
742
+ completeOAuthCallback: (input: {
743
+ stateId: string;
744
+ code: string;
745
+ }) => import("@fragno-dev/db").TxResult<{
746
+ found: false;
747
+ reason: "invalid_state";
748
+ connection?: undefined;
749
+ changes?: undefined;
750
+ } | {
751
+ found: false;
752
+ reason: "connection_not_found";
753
+ connection?: undefined;
754
+ changes?: undefined;
755
+ } | {
756
+ found: false;
757
+ reason: "auth_not_configured";
758
+ connection?: undefined;
759
+ changes?: undefined;
760
+ } | {
761
+ found: false;
762
+ reason: "auth_not_oauth";
763
+ connection?: undefined;
764
+ changes?: undefined;
765
+ } | {
766
+ found: true;
767
+ connection: {
768
+ id: import("@fragno-dev/db/schema").FragnoId;
769
+ name: string | null;
770
+ baseUrl: string;
771
+ authMode: string;
772
+ status: string;
773
+ createdAt: Date;
774
+ updatedAt: Date;
775
+ };
776
+ changes: {
777
+ authPayload: string;
778
+ authExpiresAt: Date | null;
779
+ };
780
+ reason?: undefined;
781
+ }, {
782
+ found: false;
783
+ reason: "invalid_state";
784
+ connection?: undefined;
785
+ changes?: undefined;
786
+ } | {
787
+ found: false;
788
+ reason: "connection_not_found";
789
+ connection?: undefined;
790
+ changes?: undefined;
791
+ } | {
792
+ found: false;
793
+ reason: "auth_not_configured";
794
+ connection?: undefined;
795
+ changes?: undefined;
796
+ } | {
797
+ found: false;
798
+ reason: "auth_not_oauth";
799
+ connection?: undefined;
800
+ changes?: undefined;
801
+ } | {
802
+ found: true;
803
+ connection: {
804
+ id: import("@fragno-dev/db/schema").FragnoId;
805
+ name: string | null;
806
+ baseUrl: string;
807
+ authMode: string;
808
+ status: string;
809
+ createdAt: Date;
810
+ updatedAt: Date;
811
+ };
812
+ changes: {
813
+ authPayload: string;
814
+ authExpiresAt: Date | null;
815
+ };
816
+ reason?: undefined;
817
+ }>;
818
+ executeApiRequest: (input: {
819
+ connectionId: string;
820
+ request: ApiRequestInput;
821
+ }) => import("@fragno-dev/db").TxResult<{
822
+ found: false;
823
+ reason?: undefined;
824
+ connection?: undefined;
825
+ secrets?: undefined;
826
+ authChanges?: undefined;
827
+ response?: undefined;
828
+ } | {
829
+ found: false;
830
+ reason: "connection_disabled";
831
+ connection?: undefined;
832
+ secrets?: undefined;
833
+ authChanges?: undefined;
834
+ response?: undefined;
835
+ } | {
836
+ found: true;
837
+ response: {
838
+ status: number;
839
+ statusText: string;
840
+ headers: {
841
+ [k: string]: string;
842
+ };
843
+ body: any;
844
+ };
845
+ }, {
846
+ found: false;
847
+ reason?: undefined;
848
+ connection?: undefined;
849
+ secrets?: undefined;
850
+ authChanges?: undefined;
851
+ response?: undefined;
852
+ } | {
853
+ found: false;
854
+ reason: "connection_disabled";
855
+ connection?: undefined;
856
+ secrets?: undefined;
857
+ authChanges?: undefined;
858
+ response?: undefined;
859
+ } | {
860
+ found: true;
861
+ connection: {
862
+ id: import("@fragno-dev/db/schema").FragnoId;
863
+ name: string | null;
864
+ baseUrl: string;
865
+ authMode: string;
866
+ status: string;
867
+ createdAt: Date;
868
+ updatedAt: Date;
869
+ };
870
+ secrets: {
871
+ id: import("@fragno-dev/db/schema").FragnoId;
872
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
873
+ kind: string;
874
+ payload: string;
875
+ expiresAt: Date | null;
876
+ updatedAt: Date;
877
+ }[];
878
+ authChanges: AuthPersistenceChanges | undefined;
879
+ response: {
880
+ status: number;
881
+ statusText: string;
882
+ headers: {
883
+ [k: string]: string;
884
+ };
885
+ body: any;
886
+ };
887
+ reason?: undefined;
888
+ }>;
889
+ refreshClientCredentialsToken: (input: {
890
+ connectionId: string;
891
+ }) => import("@fragno-dev/db").TxResult<{
892
+ found: false;
893
+ connection?: undefined;
894
+ secrets?: undefined;
895
+ authChanges?: undefined;
896
+ tokenPresent?: undefined;
897
+ } | {
898
+ found: true;
899
+ tokenPresent: boolean;
900
+ }, {
901
+ found: false;
902
+ connection?: undefined;
903
+ secrets?: undefined;
904
+ authChanges?: undefined;
905
+ tokenPresent?: undefined;
906
+ } | {
907
+ found: true;
908
+ connection: {
909
+ id: import("@fragno-dev/db/schema").FragnoId;
910
+ name: string | null;
911
+ baseUrl: string;
912
+ authMode: string;
913
+ status: string;
914
+ createdAt: Date;
915
+ updatedAt: Date;
916
+ };
917
+ secrets: {
918
+ id: import("@fragno-dev/db/schema").FragnoId;
919
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
920
+ kind: string;
921
+ payload: string;
922
+ expiresAt: Date | null;
923
+ updatedAt: Date;
924
+ }[];
925
+ authChanges: AuthPersistenceChanges | undefined;
926
+ tokenPresent: boolean;
927
+ }>;
928
+ }>, {}, readonly [import("@fragno-dev/core").FragnoRouteConfig<"PUT", "/webhooks/endpoints/:endpointId", z.ZodObject<{
929
+ name: z.ZodString;
930
+ status: z.ZodDefault<z.ZodEnum<{
931
+ draft: "draft";
932
+ active: "active";
933
+ disabled: "disabled";
934
+ }>>;
935
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
936
+ type: z.ZodLiteral<"header">;
937
+ name: z.ZodString;
938
+ }, z.core.$strip>, z.ZodObject<{
939
+ type: z.ZodLiteral<"query">;
940
+ name: z.ZodString;
941
+ }, z.core.$strip>, z.ZodObject<{
942
+ type: z.ZodLiteral<"jsonBodyPath">;
943
+ path: z.ZodArray<z.ZodString>;
944
+ }, z.core.$strip>], "type">;
945
+ auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
946
+ type: z.ZodLiteral<"none">;
947
+ }, z.core.$strip>, z.ZodObject<{
948
+ type: z.ZodLiteral<"bearer">;
949
+ token: z.ZodString;
950
+ }, z.core.$strip>, z.ZodObject<{
951
+ type: z.ZodLiteral<"apiKey">;
952
+ location: z.ZodEnum<{
953
+ header: "header";
954
+ query: "query";
955
+ }>;
956
+ name: z.ZodString;
957
+ secret: z.ZodString;
958
+ }, z.core.$strip>, z.ZodObject<{
959
+ type: z.ZodLiteral<"basic">;
960
+ username: z.ZodString;
961
+ password: z.ZodString;
962
+ }, z.core.$strip>, z.ZodObject<{
963
+ type: z.ZodLiteral<"hmac">;
964
+ secret: z.ZodString;
965
+ algorithm: z.ZodEnum<{
966
+ sha1: "sha1";
967
+ sha256: "sha256";
968
+ sha512: "sha512";
969
+ }>;
970
+ signature: z.ZodObject<{
971
+ location: z.ZodEnum<{
972
+ header: "header";
973
+ query: "query";
974
+ }>;
975
+ name: z.ZodString;
976
+ encoding: z.ZodEnum<{
977
+ hex: "hex";
978
+ base64: "base64";
979
+ base64url: "base64url";
980
+ }>;
981
+ prefix: z.ZodOptional<z.ZodString>;
982
+ }, z.core.$strip>;
983
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
984
+ type: z.ZodLiteral<"rawBody">;
985
+ }, z.core.$strip>, z.ZodObject<{
986
+ type: z.ZodLiteral<"timestampBody">;
987
+ timestampHeader: z.ZodString;
988
+ delimiter: z.ZodString;
989
+ toleranceSeconds: z.ZodNumber;
990
+ }, z.core.$strip>], "type">;
991
+ }, z.core.$strip>], "type">;
992
+ }, z.core.$strip>, z.ZodObject<{
993
+ id: z.ZodString;
994
+ name: z.ZodString;
995
+ status: z.ZodEnum<{
996
+ draft: "draft";
997
+ active: "active";
998
+ disabled: "disabled";
999
+ }>;
1000
+ authConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
1001
+ type: z.ZodLiteral<"none">;
1002
+ }, z.core.$strip>, z.ZodObject<{
1003
+ type: z.ZodLiteral<"bearer">;
1004
+ tokenRef: z.ZodString;
1005
+ }, z.core.$strip>, z.ZodObject<{
1006
+ type: z.ZodLiteral<"apiKey">;
1007
+ location: z.ZodEnum<{
1008
+ header: "header";
1009
+ query: "query";
1010
+ }>;
1011
+ name: z.ZodString;
1012
+ secretRef: z.ZodString;
1013
+ }, z.core.$strip>, z.ZodObject<{
1014
+ type: z.ZodLiteral<"basic">;
1015
+ usernameRef: z.ZodString;
1016
+ passwordRef: z.ZodString;
1017
+ }, z.core.$strip>, z.ZodObject<{
1018
+ type: z.ZodLiteral<"hmac">;
1019
+ secretRef: z.ZodString;
1020
+ algorithm: z.ZodEnum<{
1021
+ sha1: "sha1";
1022
+ sha256: "sha256";
1023
+ sha512: "sha512";
1024
+ }>;
1025
+ signature: z.ZodObject<{
1026
+ location: z.ZodEnum<{
1027
+ header: "header";
1028
+ query: "query";
1029
+ }>;
1030
+ name: z.ZodString;
1031
+ encoding: z.ZodEnum<{
1032
+ hex: "hex";
1033
+ base64: "base64";
1034
+ base64url: "base64url";
1035
+ }>;
1036
+ prefix: z.ZodOptional<z.ZodString>;
1037
+ }, z.core.$strip>;
1038
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1039
+ type: z.ZodLiteral<"rawBody">;
1040
+ }, z.core.$strip>, z.ZodObject<{
1041
+ type: z.ZodLiteral<"timestampBody">;
1042
+ timestampHeader: z.ZodString;
1043
+ delimiter: z.ZodString;
1044
+ toleranceSeconds: z.ZodNumber;
1045
+ }, z.core.$strip>], "type">;
1046
+ }, z.core.$strip>], "type">;
1047
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1048
+ type: z.ZodLiteral<"header">;
1049
+ name: z.ZodString;
1050
+ }, z.core.$strip>, z.ZodObject<{
1051
+ type: z.ZodLiteral<"query">;
1052
+ name: z.ZodString;
1053
+ }, z.core.$strip>, z.ZodObject<{
1054
+ type: z.ZodLiteral<"jsonBodyPath">;
1055
+ path: z.ZodArray<z.ZodString>;
1056
+ }, z.core.$strip>], "type">;
1057
+ secretRefs: z.ZodArray<z.ZodString>;
1058
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1059
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1060
+ }, z.core.$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/webhooks/endpoints", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1061
+ endpoints: z.ZodArray<z.ZodObject<{
1062
+ id: z.ZodString;
1063
+ name: z.ZodString;
1064
+ status: z.ZodEnum<{
1065
+ draft: "draft";
1066
+ active: "active";
1067
+ disabled: "disabled";
1068
+ }>;
1069
+ authConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
1070
+ type: z.ZodLiteral<"none">;
1071
+ }, z.core.$strip>, z.ZodObject<{
1072
+ type: z.ZodLiteral<"bearer">;
1073
+ tokenRef: z.ZodString;
1074
+ }, z.core.$strip>, z.ZodObject<{
1075
+ type: z.ZodLiteral<"apiKey">;
1076
+ location: z.ZodEnum<{
1077
+ header: "header";
1078
+ query: "query";
1079
+ }>;
1080
+ name: z.ZodString;
1081
+ secretRef: z.ZodString;
1082
+ }, z.core.$strip>, z.ZodObject<{
1083
+ type: z.ZodLiteral<"basic">;
1084
+ usernameRef: z.ZodString;
1085
+ passwordRef: z.ZodString;
1086
+ }, z.core.$strip>, z.ZodObject<{
1087
+ type: z.ZodLiteral<"hmac">;
1088
+ secretRef: z.ZodString;
1089
+ algorithm: z.ZodEnum<{
1090
+ sha1: "sha1";
1091
+ sha256: "sha256";
1092
+ sha512: "sha512";
1093
+ }>;
1094
+ signature: z.ZodObject<{
1095
+ location: z.ZodEnum<{
1096
+ header: "header";
1097
+ query: "query";
1098
+ }>;
1099
+ name: z.ZodString;
1100
+ encoding: z.ZodEnum<{
1101
+ hex: "hex";
1102
+ base64: "base64";
1103
+ base64url: "base64url";
1104
+ }>;
1105
+ prefix: z.ZodOptional<z.ZodString>;
1106
+ }, z.core.$strip>;
1107
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1108
+ type: z.ZodLiteral<"rawBody">;
1109
+ }, z.core.$strip>, z.ZodObject<{
1110
+ type: z.ZodLiteral<"timestampBody">;
1111
+ timestampHeader: z.ZodString;
1112
+ delimiter: z.ZodString;
1113
+ toleranceSeconds: z.ZodNumber;
1114
+ }, z.core.$strip>], "type">;
1115
+ }, z.core.$strip>], "type">;
1116
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1117
+ type: z.ZodLiteral<"header">;
1118
+ name: z.ZodString;
1119
+ }, z.core.$strip>, z.ZodObject<{
1120
+ type: z.ZodLiteral<"query">;
1121
+ name: z.ZodString;
1122
+ }, z.core.$strip>, z.ZodObject<{
1123
+ type: z.ZodLiteral<"jsonBodyPath">;
1124
+ path: z.ZodArray<z.ZodString>;
1125
+ }, z.core.$strip>], "type">;
1126
+ secretRefs: z.ZodArray<z.ZodString>;
1127
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1128
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1129
+ }, z.core.$strip>>;
1130
+ }, z.core.$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1131
+ id: z.ZodString;
1132
+ name: z.ZodString;
1133
+ status: z.ZodEnum<{
1134
+ draft: "draft";
1135
+ active: "active";
1136
+ disabled: "disabled";
1137
+ }>;
1138
+ authConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
1139
+ type: z.ZodLiteral<"none">;
1140
+ }, z.core.$strip>, z.ZodObject<{
1141
+ type: z.ZodLiteral<"bearer">;
1142
+ tokenRef: z.ZodString;
1143
+ }, z.core.$strip>, z.ZodObject<{
1144
+ type: z.ZodLiteral<"apiKey">;
1145
+ location: z.ZodEnum<{
1146
+ header: "header";
1147
+ query: "query";
1148
+ }>;
1149
+ name: z.ZodString;
1150
+ secretRef: z.ZodString;
1151
+ }, z.core.$strip>, z.ZodObject<{
1152
+ type: z.ZodLiteral<"basic">;
1153
+ usernameRef: z.ZodString;
1154
+ passwordRef: z.ZodString;
1155
+ }, z.core.$strip>, z.ZodObject<{
1156
+ type: z.ZodLiteral<"hmac">;
1157
+ secretRef: z.ZodString;
1158
+ algorithm: z.ZodEnum<{
1159
+ sha1: "sha1";
1160
+ sha256: "sha256";
1161
+ sha512: "sha512";
1162
+ }>;
1163
+ signature: z.ZodObject<{
1164
+ location: z.ZodEnum<{
1165
+ header: "header";
1166
+ query: "query";
1167
+ }>;
1168
+ name: z.ZodString;
1169
+ encoding: z.ZodEnum<{
1170
+ hex: "hex";
1171
+ base64: "base64";
1172
+ base64url: "base64url";
1173
+ }>;
1174
+ prefix: z.ZodOptional<z.ZodString>;
1175
+ }, z.core.$strip>;
1176
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1177
+ type: z.ZodLiteral<"rawBody">;
1178
+ }, z.core.$strip>, z.ZodObject<{
1179
+ type: z.ZodLiteral<"timestampBody">;
1180
+ timestampHeader: z.ZodString;
1181
+ delimiter: z.ZodString;
1182
+ toleranceSeconds: z.ZodNumber;
1183
+ }, z.core.$strip>], "type">;
1184
+ }, z.core.$strip>], "type">;
1185
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1186
+ type: z.ZodLiteral<"header">;
1187
+ name: z.ZodString;
1188
+ }, z.core.$strip>, z.ZodObject<{
1189
+ type: z.ZodLiteral<"query">;
1190
+ name: z.ZodString;
1191
+ }, z.core.$strip>, z.ZodObject<{
1192
+ type: z.ZodLiteral<"jsonBodyPath">;
1193
+ path: z.ZodArray<z.ZodString>;
1194
+ }, z.core.$strip>], "type">;
1195
+ secretRefs: z.ZodArray<z.ZodString>;
1196
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1197
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1198
+ }, z.core.$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/webhooks/endpoints/:endpointId/events", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1199
+ accepted: z.ZodBoolean;
1200
+ }, z.core.$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND" | "WEBHOOK_ENDPOINT_DISABLED" | "WEBHOOK_ENDPOINT_DRAFT" | "WEBHOOK_AUTH_FAILED" | "WEBHOOK_BODY_INVALID" | "WEBHOOK_DELIVERY_ID_MISSING" | "WEBHOOK_DELIVERY_ID_INVALID", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"PATCH", "/webhooks/endpoints/:endpointId", z.ZodObject<{
1201
+ name: z.ZodOptional<z.ZodString>;
1202
+ status: z.ZodOptional<z.ZodEnum<{
1203
+ draft: "draft";
1204
+ active: "active";
1205
+ disabled: "disabled";
1206
+ }>>;
1207
+ deliveryIdentity: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1208
+ type: z.ZodLiteral<"header">;
1209
+ name: z.ZodString;
1210
+ }, z.core.$strip>, z.ZodObject<{
1211
+ type: z.ZodLiteral<"query">;
1212
+ name: z.ZodString;
1213
+ }, z.core.$strip>, z.ZodObject<{
1214
+ type: z.ZodLiteral<"jsonBodyPath">;
1215
+ path: z.ZodArray<z.ZodString>;
1216
+ }, z.core.$strip>], "type">>;
1217
+ auth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1218
+ type: z.ZodLiteral<"none">;
1219
+ }, z.core.$strip>, z.ZodObject<{
1220
+ type: z.ZodLiteral<"bearer">;
1221
+ token: z.ZodString;
1222
+ }, z.core.$strip>, z.ZodObject<{
1223
+ type: z.ZodLiteral<"apiKey">;
1224
+ location: z.ZodEnum<{
1225
+ header: "header";
1226
+ query: "query";
1227
+ }>;
1228
+ name: z.ZodString;
1229
+ secret: z.ZodString;
1230
+ }, z.core.$strip>, z.ZodObject<{
1231
+ type: z.ZodLiteral<"basic">;
1232
+ username: z.ZodString;
1233
+ password: z.ZodString;
1234
+ }, z.core.$strip>, z.ZodObject<{
1235
+ type: z.ZodLiteral<"hmac">;
1236
+ secret: z.ZodString;
1237
+ algorithm: z.ZodEnum<{
1238
+ sha1: "sha1";
1239
+ sha256: "sha256";
1240
+ sha512: "sha512";
1241
+ }>;
1242
+ signature: z.ZodObject<{
1243
+ location: z.ZodEnum<{
1244
+ header: "header";
1245
+ query: "query";
1246
+ }>;
1247
+ name: z.ZodString;
1248
+ encoding: z.ZodEnum<{
1249
+ hex: "hex";
1250
+ base64: "base64";
1251
+ base64url: "base64url";
1252
+ }>;
1253
+ prefix: z.ZodOptional<z.ZodString>;
1254
+ }, z.core.$strip>;
1255
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1256
+ type: z.ZodLiteral<"rawBody">;
1257
+ }, z.core.$strip>, z.ZodObject<{
1258
+ type: z.ZodLiteral<"timestampBody">;
1259
+ timestampHeader: z.ZodString;
1260
+ delimiter: z.ZodString;
1261
+ toleranceSeconds: z.ZodNumber;
1262
+ }, z.core.$strip>], "type">;
1263
+ }, z.core.$strip>], "type">>;
1264
+ }, z.core.$strip>, z.ZodObject<{
1265
+ id: z.ZodString;
1266
+ name: z.ZodString;
1267
+ status: z.ZodEnum<{
1268
+ draft: "draft";
1269
+ active: "active";
1270
+ disabled: "disabled";
1271
+ }>;
1272
+ authConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
1273
+ type: z.ZodLiteral<"none">;
1274
+ }, z.core.$strip>, z.ZodObject<{
1275
+ type: z.ZodLiteral<"bearer">;
1276
+ tokenRef: z.ZodString;
1277
+ }, z.core.$strip>, z.ZodObject<{
1278
+ type: z.ZodLiteral<"apiKey">;
1279
+ location: z.ZodEnum<{
1280
+ header: "header";
1281
+ query: "query";
1282
+ }>;
1283
+ name: z.ZodString;
1284
+ secretRef: z.ZodString;
1285
+ }, z.core.$strip>, z.ZodObject<{
1286
+ type: z.ZodLiteral<"basic">;
1287
+ usernameRef: z.ZodString;
1288
+ passwordRef: z.ZodString;
1289
+ }, z.core.$strip>, z.ZodObject<{
1290
+ type: z.ZodLiteral<"hmac">;
1291
+ secretRef: z.ZodString;
1292
+ algorithm: z.ZodEnum<{
1293
+ sha1: "sha1";
1294
+ sha256: "sha256";
1295
+ sha512: "sha512";
1296
+ }>;
1297
+ signature: z.ZodObject<{
1298
+ location: z.ZodEnum<{
1299
+ header: "header";
1300
+ query: "query";
1301
+ }>;
1302
+ name: z.ZodString;
1303
+ encoding: z.ZodEnum<{
1304
+ hex: "hex";
1305
+ base64: "base64";
1306
+ base64url: "base64url";
1307
+ }>;
1308
+ prefix: z.ZodOptional<z.ZodString>;
1309
+ }, z.core.$strip>;
1310
+ signedPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1311
+ type: z.ZodLiteral<"rawBody">;
1312
+ }, z.core.$strip>, z.ZodObject<{
1313
+ type: z.ZodLiteral<"timestampBody">;
1314
+ timestampHeader: z.ZodString;
1315
+ delimiter: z.ZodString;
1316
+ toleranceSeconds: z.ZodNumber;
1317
+ }, z.core.$strip>], "type">;
1318
+ }, z.core.$strip>], "type">;
1319
+ deliveryIdentity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1320
+ type: z.ZodLiteral<"header">;
1321
+ name: z.ZodString;
1322
+ }, z.core.$strip>, z.ZodObject<{
1323
+ type: z.ZodLiteral<"query">;
1324
+ name: z.ZodString;
1325
+ }, z.core.$strip>, z.ZodObject<{
1326
+ type: z.ZodLiteral<"jsonBodyPath">;
1327
+ path: z.ZodArray<z.ZodString>;
1328
+ }, z.core.$strip>], "type">;
1329
+ secretRefs: z.ZodArray<z.ZodString>;
1330
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1331
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1332
+ }, z.core.$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"PUT", "/connections/:slug", z.ZodObject<{
1333
+ name: z.ZodOptional<z.ZodString>;
1334
+ baseUrl: z.ZodURL;
1335
+ auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1336
+ type: z.ZodLiteral<"none">;
1337
+ }, z.core.$strip>, z.ZodObject<{
1338
+ type: z.ZodLiteral<"bearer">;
1339
+ token: z.ZodString;
1340
+ }, z.core.$strip>, z.ZodObject<{
1341
+ type: z.ZodLiteral<"client_credentials">;
1342
+ tokenEndpoint: z.ZodURL;
1343
+ clientId: z.ZodString;
1344
+ clientSecret: z.ZodString;
1345
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1346
+ audience: z.ZodOptional<z.ZodString>;
1347
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
1348
+ client_secret_basic: "client_secret_basic";
1349
+ client_secret_post: "client_secret_post";
1350
+ }>>;
1351
+ }, z.core.$strip>, z.ZodObject<{
1352
+ type: z.ZodLiteral<"oauth">;
1353
+ authorizationEndpoint: z.ZodURL;
1354
+ tokenEndpoint: z.ZodURL;
1355
+ clientId: z.ZodString;
1356
+ clientSecret: z.ZodOptional<z.ZodString>;
1357
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1358
+ tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
1359
+ none: "none";
1360
+ client_secret_basic: "client_secret_basic";
1361
+ client_secret_post: "client_secret_post";
1362
+ }>>;
1363
+ extraAuthorizationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1364
+ extraTokenParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1365
+ }, z.core.$strip>], "type">>;
1366
+ }, z.core.$strip>, z.ZodObject<{
1367
+ slug: z.ZodString;
1368
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1369
+ baseUrl: z.ZodString;
1370
+ authMode: z.ZodString;
1371
+ status: z.ZodString;
1372
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1373
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1374
+ }, z.core.$strip>, "CONNECTION_EXISTS" | "BASE_URL_NOT_ALLOWED", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1375
+ connections: z.ZodArray<z.ZodObject<{
1376
+ slug: z.ZodString;
1377
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1378
+ baseUrl: z.ZodString;
1379
+ authMode: z.ZodString;
1380
+ status: z.ZodString;
1381
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1382
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1383
+ }, z.core.$strip>>;
1384
+ }, z.core.$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1385
+ slug: z.ZodString;
1386
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1387
+ baseUrl: z.ZodString;
1388
+ authMode: z.ZodString;
1389
+ status: z.ZodString;
1390
+ createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1391
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1392
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections/:slug/auth/status", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1393
+ authenticated: z.ZodBoolean;
1394
+ mode: z.ZodString;
1395
+ tokenPresent: z.ZodOptional<z.ZodBoolean>;
1396
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
1397
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/auth/token", z.ZodObject<{
1398
+ token: z.ZodString;
1399
+ }, z.core.$strip>, z.ZodObject<{
1400
+ authenticated: z.ZodBoolean;
1401
+ mode: z.ZodString;
1402
+ tokenPresent: z.ZodOptional<z.ZodBoolean>;
1403
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
1404
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/auth/oauth/start", z.ZodObject<{
1405
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1406
+ extraAuthorizationParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1407
+ }, z.core.$strip>, z.ZodObject<{
1408
+ authorizationUrl: z.ZodString;
1409
+ state: z.ZodString;
1410
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND" | "AUTH_NOT_CONFIGURED" | "AUTH_NOT_OAUTH" | "OAUTH_ERROR", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/oauth/callback", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1411
+ authenticated: z.ZodBoolean;
1412
+ mode: z.ZodString;
1413
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND" | "AUTH_NOT_CONFIGURED" | "AUTH_NOT_OAUTH" | "OAUTH_ERROR" | "INVALID_OAUTH_STATE", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/connections/:slug/auth", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
1414
+ authenticated: z.ZodBoolean;
1415
+ mode: z.ZodString;
1416
+ tokenPresent: z.ZodOptional<z.ZodBoolean>;
1417
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
1418
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/request", z.ZodObject<{
1419
+ method: z.ZodEnum<{
1420
+ GET: "GET";
1421
+ POST: "POST";
1422
+ PUT: "PUT";
1423
+ PATCH: "PATCH";
1424
+ DELETE: "DELETE";
1425
+ }>;
1426
+ path: z.ZodString;
1427
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1428
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1429
+ json: z.ZodOptional<z.ZodUnknown>;
1430
+ body: z.ZodOptional<z.ZodString>;
1431
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1432
+ }, z.core.$strip>, z.ZodObject<{
1433
+ status: z.ZodNumber;
1434
+ statusText: z.ZodString;
1435
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
1436
+ body: z.ZodUnknown;
1437
+ }, z.core.$strip>, "CONNECTION_NOT_FOUND" | "CONNECTION_DISABLED" | "API_REQUEST_ERROR", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>]>;
1438
+ //#endregion
1439
+ //#region src/schema.d.ts
1440
+ type JsonColumn<T> = Column<"json", T, T>;
1441
+ declare const apiSchema: import("@fragno-dev/db/schema").Schema<Record<"api_connection", import("@fragno-dev/db/schema").Table<Record<"id", import("@fragno-dev/db/schema").IdColumn<"varchar(128)", string | import("@fragno-dev/db/schema").FragnoId | null, import("@fragno-dev/db/schema").FragnoId>> & Record<"name", Column<"string", string | null, string | null>> & Record<"baseUrl", Column<"string", string, string>> & Record<"authMode", Column<"string", string, string>> & Record<"status", Column<"string", string, string>> & Record<"createdAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>> & Record<"updatedAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>>, Record<string, import("@fragno-dev/db/schema").Index<import("@fragno-dev/db/schema").AnyColumn[], readonly string[]>>>> & Record<"secret", import("@fragno-dev/db/schema").Table<Record<"id", import("@fragno-dev/db/schema").IdColumn<"varchar(128)", string | import("@fragno-dev/db/schema").FragnoId | null, import("@fragno-dev/db/schema").FragnoId>> & Record<"connectionId", Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>> & Record<"kind", Column<"string", string, string>> & Record<"payload", Column<"text", string, string>> & Record<"expiresAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date | null>> & Record<"updatedAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>>, Record<string, import("@fragno-dev/db/schema").Index<import("@fragno-dev/db/schema").AnyColumn[], readonly string[]>> & Record<"idx_secret_connection_kind", import("@fragno-dev/db/schema").Index<readonly [Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>, Column<"string", string, string>] & import("@fragno-dev/db/schema").AnyColumn[], readonly ["connectionId", "kind"]>>>> & Record<"oauthState", import("@fragno-dev/db/schema").Table<Record<"id", import("@fragno-dev/db/schema").IdColumn<"varchar(128)", string | import("@fragno-dev/db/schema").FragnoId | null, import("@fragno-dev/db/schema").FragnoId>> & Record<"connectionId", Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>> & Record<"codeVerifier", Column<"text", string, string>> & Record<"redirectUri", Column<"string", string, string>> & Record<"scope", Column<"string", string | null, string | null>> & Record<"expiresAt", Column<"timestamp", Date | import("@fragno-dev/db").DbNow, Date>> & Record<"consumedAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date | null>>, Record<string, import("@fragno-dev/db/schema").Index<import("@fragno-dev/db/schema").AnyColumn[], readonly string[]>> & Record<"idx_oauth_state_connection", import("@fragno-dev/db/schema").Index<readonly [Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>] & import("@fragno-dev/db/schema").AnyColumn[], readonly ["connectionId"]>>>> & Record<"webhookEndpoint", import("@fragno-dev/db/schema").Table<Record<"id", import("@fragno-dev/db/schema").IdColumn<"varchar(128)", string | import("@fragno-dev/db/schema").FragnoId | null, import("@fragno-dev/db/schema").FragnoId>> & Record<"name", Column<"string", string, string>> & Record<"status", Column<"string", string, string>> & Record<"authConfig", JsonColumn<{
1442
+ type: "none";
1443
+ } | {
1444
+ type: "bearer";
1445
+ tokenRef: string;
1446
+ } | {
1447
+ type: "apiKey";
1448
+ location: "header" | "query";
1449
+ name: string;
1450
+ secretRef: string;
1451
+ } | {
1452
+ type: "basic";
1453
+ usernameRef: string;
1454
+ passwordRef: string;
1455
+ } | {
1456
+ type: "hmac";
1457
+ secretRef: string;
1458
+ algorithm: "sha1" | "sha256" | "sha512";
1459
+ signature: {
1460
+ location: "header" | "query";
1461
+ name: string;
1462
+ encoding: "hex" | "base64" | "base64url";
1463
+ prefix?: string | undefined;
1464
+ };
1465
+ signedPayload: {
1466
+ type: "rawBody";
1467
+ } | {
1468
+ type: "timestampBody";
1469
+ timestampHeader: string;
1470
+ delimiter: string;
1471
+ toleranceSeconds: number;
1472
+ };
1473
+ }>> & Record<"deliveryIdentity", JsonColumn<{
1474
+ type: "header";
1475
+ name: string;
1476
+ } | {
1477
+ type: "query";
1478
+ name: string;
1479
+ } | {
1480
+ type: "jsonBodyPath";
1481
+ path: string[];
1482
+ }>> & Record<"createdAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>> & Record<"updatedAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>>, Record<string, import("@fragno-dev/db/schema").Index<import("@fragno-dev/db/schema").AnyColumn[], readonly string[]>>>> & Record<"webhookSecret", import("@fragno-dev/db/schema").Table<Record<"id", import("@fragno-dev/db/schema").IdColumn<"varchar(128)", string | import("@fragno-dev/db/schema").FragnoId | null, import("@fragno-dev/db/schema").FragnoId>> & Record<"endpointId", Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>> & Record<"ref", Column<"string", string, string>> & Record<"payload", Column<"text", string, string>> & Record<"updatedAt", Column<"timestamp", (Date | import("@fragno-dev/db").DbNow) | null, Date>>, Record<string, import("@fragno-dev/db/schema").Index<import("@fragno-dev/db/schema").AnyColumn[], readonly string[]>> & Record<"idx_webhook_secret_endpoint_ref", import("@fragno-dev/db/schema").Index<readonly [Column<"bigint", string | bigint | import("@fragno-dev/db/schema").FragnoId | import("@fragno-dev/db/schema").FragnoReference, import("@fragno-dev/db/schema").FragnoReference>, Column<"string", string, string>] & import("@fragno-dev/db/schema").AnyColumn[], readonly ["endpointId", "ref"]>>>>>;
1483
+ //#endregion
1484
+ //#region src/index.d.ts
1485
+ declare function createApiFragment(config: ApiFragmentConfig, fragnoConfig: FragnoPublicConfigWithDatabase): import("@fragno-dev/core").FragnoInstantiatedFragment<readonly [import("@fragno-dev/core").FragnoRouteConfig<"PUT", "/webhooks/endpoints/:endpointId", import("zod").ZodObject<{
1486
+ name: import("zod").ZodString;
1487
+ status: import("zod").ZodDefault<import("zod").ZodEnum<{
1488
+ draft: "draft";
1489
+ active: "active";
1490
+ disabled: "disabled";
1491
+ }>>;
1492
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1493
+ type: import("zod").ZodLiteral<"header">;
1494
+ name: import("zod").ZodString;
1495
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1496
+ type: import("zod").ZodLiteral<"query">;
1497
+ name: import("zod").ZodString;
1498
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1499
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1500
+ path: import("zod").ZodArray<import("zod").ZodString>;
1501
+ }, import("zod/v4/core").$strip>], "type">;
1502
+ auth: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1503
+ type: import("zod").ZodLiteral<"none">;
1504
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1505
+ type: import("zod").ZodLiteral<"bearer">;
1506
+ token: import("zod").ZodString;
1507
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1508
+ type: import("zod").ZodLiteral<"apiKey">;
1509
+ location: import("zod").ZodEnum<{
1510
+ header: "header";
1511
+ query: "query";
1512
+ }>;
1513
+ name: import("zod").ZodString;
1514
+ secret: import("zod").ZodString;
1515
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1516
+ type: import("zod").ZodLiteral<"basic">;
1517
+ username: import("zod").ZodString;
1518
+ password: import("zod").ZodString;
1519
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1520
+ type: import("zod").ZodLiteral<"hmac">;
1521
+ secret: import("zod").ZodString;
1522
+ algorithm: import("zod").ZodEnum<{
1523
+ sha1: "sha1";
1524
+ sha256: "sha256";
1525
+ sha512: "sha512";
1526
+ }>;
1527
+ signature: import("zod").ZodObject<{
1528
+ location: import("zod").ZodEnum<{
1529
+ header: "header";
1530
+ query: "query";
1531
+ }>;
1532
+ name: import("zod").ZodString;
1533
+ encoding: import("zod").ZodEnum<{
1534
+ hex: "hex";
1535
+ base64: "base64";
1536
+ base64url: "base64url";
1537
+ }>;
1538
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1539
+ }, import("zod/v4/core").$strip>;
1540
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1541
+ type: import("zod").ZodLiteral<"rawBody">;
1542
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1543
+ type: import("zod").ZodLiteral<"timestampBody">;
1544
+ timestampHeader: import("zod").ZodString;
1545
+ delimiter: import("zod").ZodString;
1546
+ toleranceSeconds: import("zod").ZodNumber;
1547
+ }, import("zod/v4/core").$strip>], "type">;
1548
+ }, import("zod/v4/core").$strip>], "type">;
1549
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1550
+ id: import("zod").ZodString;
1551
+ name: import("zod").ZodString;
1552
+ status: import("zod").ZodEnum<{
1553
+ draft: "draft";
1554
+ active: "active";
1555
+ disabled: "disabled";
1556
+ }>;
1557
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1558
+ type: import("zod").ZodLiteral<"none">;
1559
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1560
+ type: import("zod").ZodLiteral<"bearer">;
1561
+ tokenRef: import("zod").ZodString;
1562
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1563
+ type: import("zod").ZodLiteral<"apiKey">;
1564
+ location: import("zod").ZodEnum<{
1565
+ header: "header";
1566
+ query: "query";
1567
+ }>;
1568
+ name: import("zod").ZodString;
1569
+ secretRef: import("zod").ZodString;
1570
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1571
+ type: import("zod").ZodLiteral<"basic">;
1572
+ usernameRef: import("zod").ZodString;
1573
+ passwordRef: import("zod").ZodString;
1574
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1575
+ type: import("zod").ZodLiteral<"hmac">;
1576
+ secretRef: import("zod").ZodString;
1577
+ algorithm: import("zod").ZodEnum<{
1578
+ sha1: "sha1";
1579
+ sha256: "sha256";
1580
+ sha512: "sha512";
1581
+ }>;
1582
+ signature: import("zod").ZodObject<{
1583
+ location: import("zod").ZodEnum<{
1584
+ header: "header";
1585
+ query: "query";
1586
+ }>;
1587
+ name: import("zod").ZodString;
1588
+ encoding: import("zod").ZodEnum<{
1589
+ hex: "hex";
1590
+ base64: "base64";
1591
+ base64url: "base64url";
1592
+ }>;
1593
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1594
+ }, import("zod/v4/core").$strip>;
1595
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1596
+ type: import("zod").ZodLiteral<"rawBody">;
1597
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1598
+ type: import("zod").ZodLiteral<"timestampBody">;
1599
+ timestampHeader: import("zod").ZodString;
1600
+ delimiter: import("zod").ZodString;
1601
+ toleranceSeconds: import("zod").ZodNumber;
1602
+ }, import("zod/v4/core").$strip>], "type">;
1603
+ }, import("zod/v4/core").$strip>], "type">;
1604
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1605
+ type: import("zod").ZodLiteral<"header">;
1606
+ name: import("zod").ZodString;
1607
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1608
+ type: import("zod").ZodLiteral<"query">;
1609
+ name: import("zod").ZodString;
1610
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1611
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1612
+ path: import("zod").ZodArray<import("zod").ZodString>;
1613
+ }, import("zod/v4/core").$strip>], "type">;
1614
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
1615
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1616
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1617
+ }, import("zod/v4/core").$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/webhooks/endpoints", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1618
+ endpoints: import("zod").ZodArray<import("zod").ZodObject<{
1619
+ id: import("zod").ZodString;
1620
+ name: import("zod").ZodString;
1621
+ status: import("zod").ZodEnum<{
1622
+ draft: "draft";
1623
+ active: "active";
1624
+ disabled: "disabled";
1625
+ }>;
1626
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1627
+ type: import("zod").ZodLiteral<"none">;
1628
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1629
+ type: import("zod").ZodLiteral<"bearer">;
1630
+ tokenRef: import("zod").ZodString;
1631
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1632
+ type: import("zod").ZodLiteral<"apiKey">;
1633
+ location: import("zod").ZodEnum<{
1634
+ header: "header";
1635
+ query: "query";
1636
+ }>;
1637
+ name: import("zod").ZodString;
1638
+ secretRef: import("zod").ZodString;
1639
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1640
+ type: import("zod").ZodLiteral<"basic">;
1641
+ usernameRef: import("zod").ZodString;
1642
+ passwordRef: import("zod").ZodString;
1643
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1644
+ type: import("zod").ZodLiteral<"hmac">;
1645
+ secretRef: import("zod").ZodString;
1646
+ algorithm: import("zod").ZodEnum<{
1647
+ sha1: "sha1";
1648
+ sha256: "sha256";
1649
+ sha512: "sha512";
1650
+ }>;
1651
+ signature: import("zod").ZodObject<{
1652
+ location: import("zod").ZodEnum<{
1653
+ header: "header";
1654
+ query: "query";
1655
+ }>;
1656
+ name: import("zod").ZodString;
1657
+ encoding: import("zod").ZodEnum<{
1658
+ hex: "hex";
1659
+ base64: "base64";
1660
+ base64url: "base64url";
1661
+ }>;
1662
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1663
+ }, import("zod/v4/core").$strip>;
1664
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1665
+ type: import("zod").ZodLiteral<"rawBody">;
1666
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1667
+ type: import("zod").ZodLiteral<"timestampBody">;
1668
+ timestampHeader: import("zod").ZodString;
1669
+ delimiter: import("zod").ZodString;
1670
+ toleranceSeconds: import("zod").ZodNumber;
1671
+ }, import("zod/v4/core").$strip>], "type">;
1672
+ }, import("zod/v4/core").$strip>], "type">;
1673
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1674
+ type: import("zod").ZodLiteral<"header">;
1675
+ name: import("zod").ZodString;
1676
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1677
+ type: import("zod").ZodLiteral<"query">;
1678
+ name: import("zod").ZodString;
1679
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1680
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1681
+ path: import("zod").ZodArray<import("zod").ZodString>;
1682
+ }, import("zod/v4/core").$strip>], "type">;
1683
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
1684
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1685
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1686
+ }, import("zod/v4/core").$strip>>;
1687
+ }, import("zod/v4/core").$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1688
+ id: import("zod").ZodString;
1689
+ name: import("zod").ZodString;
1690
+ status: import("zod").ZodEnum<{
1691
+ draft: "draft";
1692
+ active: "active";
1693
+ disabled: "disabled";
1694
+ }>;
1695
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1696
+ type: import("zod").ZodLiteral<"none">;
1697
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1698
+ type: import("zod").ZodLiteral<"bearer">;
1699
+ tokenRef: import("zod").ZodString;
1700
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1701
+ type: import("zod").ZodLiteral<"apiKey">;
1702
+ location: import("zod").ZodEnum<{
1703
+ header: "header";
1704
+ query: "query";
1705
+ }>;
1706
+ name: import("zod").ZodString;
1707
+ secretRef: import("zod").ZodString;
1708
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1709
+ type: import("zod").ZodLiteral<"basic">;
1710
+ usernameRef: import("zod").ZodString;
1711
+ passwordRef: import("zod").ZodString;
1712
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1713
+ type: import("zod").ZodLiteral<"hmac">;
1714
+ secretRef: import("zod").ZodString;
1715
+ algorithm: import("zod").ZodEnum<{
1716
+ sha1: "sha1";
1717
+ sha256: "sha256";
1718
+ sha512: "sha512";
1719
+ }>;
1720
+ signature: import("zod").ZodObject<{
1721
+ location: import("zod").ZodEnum<{
1722
+ header: "header";
1723
+ query: "query";
1724
+ }>;
1725
+ name: import("zod").ZodString;
1726
+ encoding: import("zod").ZodEnum<{
1727
+ hex: "hex";
1728
+ base64: "base64";
1729
+ base64url: "base64url";
1730
+ }>;
1731
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1732
+ }, import("zod/v4/core").$strip>;
1733
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1734
+ type: import("zod").ZodLiteral<"rawBody">;
1735
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1736
+ type: import("zod").ZodLiteral<"timestampBody">;
1737
+ timestampHeader: import("zod").ZodString;
1738
+ delimiter: import("zod").ZodString;
1739
+ toleranceSeconds: import("zod").ZodNumber;
1740
+ }, import("zod/v4/core").$strip>], "type">;
1741
+ }, import("zod/v4/core").$strip>], "type">;
1742
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1743
+ type: import("zod").ZodLiteral<"header">;
1744
+ name: import("zod").ZodString;
1745
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1746
+ type: import("zod").ZodLiteral<"query">;
1747
+ name: import("zod").ZodString;
1748
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1749
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1750
+ path: import("zod").ZodArray<import("zod").ZodString>;
1751
+ }, import("zod/v4/core").$strip>], "type">;
1752
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
1753
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1754
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1755
+ }, import("zod/v4/core").$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/webhooks/endpoints/:endpointId/events", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1756
+ accepted: import("zod").ZodBoolean;
1757
+ }, import("zod/v4/core").$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND" | "WEBHOOK_ENDPOINT_DISABLED" | "WEBHOOK_ENDPOINT_DRAFT" | "WEBHOOK_AUTH_FAILED" | "WEBHOOK_BODY_INVALID" | "WEBHOOK_DELIVERY_ID_MISSING" | "WEBHOOK_DELIVERY_ID_INVALID", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"PATCH", "/webhooks/endpoints/:endpointId", import("zod").ZodObject<{
1758
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1759
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
1760
+ draft: "draft";
1761
+ active: "active";
1762
+ disabled: "disabled";
1763
+ }>>;
1764
+ deliveryIdentity: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1765
+ type: import("zod").ZodLiteral<"header">;
1766
+ name: import("zod").ZodString;
1767
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1768
+ type: import("zod").ZodLiteral<"query">;
1769
+ name: import("zod").ZodString;
1770
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1771
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1772
+ path: import("zod").ZodArray<import("zod").ZodString>;
1773
+ }, import("zod/v4/core").$strip>], "type">>;
1774
+ auth: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1775
+ type: import("zod").ZodLiteral<"none">;
1776
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1777
+ type: import("zod").ZodLiteral<"bearer">;
1778
+ token: import("zod").ZodString;
1779
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1780
+ type: import("zod").ZodLiteral<"apiKey">;
1781
+ location: import("zod").ZodEnum<{
1782
+ header: "header";
1783
+ query: "query";
1784
+ }>;
1785
+ name: import("zod").ZodString;
1786
+ secret: import("zod").ZodString;
1787
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1788
+ type: import("zod").ZodLiteral<"basic">;
1789
+ username: import("zod").ZodString;
1790
+ password: import("zod").ZodString;
1791
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1792
+ type: import("zod").ZodLiteral<"hmac">;
1793
+ secret: import("zod").ZodString;
1794
+ algorithm: import("zod").ZodEnum<{
1795
+ sha1: "sha1";
1796
+ sha256: "sha256";
1797
+ sha512: "sha512";
1798
+ }>;
1799
+ signature: import("zod").ZodObject<{
1800
+ location: import("zod").ZodEnum<{
1801
+ header: "header";
1802
+ query: "query";
1803
+ }>;
1804
+ name: import("zod").ZodString;
1805
+ encoding: import("zod").ZodEnum<{
1806
+ hex: "hex";
1807
+ base64: "base64";
1808
+ base64url: "base64url";
1809
+ }>;
1810
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1811
+ }, import("zod/v4/core").$strip>;
1812
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1813
+ type: import("zod").ZodLiteral<"rawBody">;
1814
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1815
+ type: import("zod").ZodLiteral<"timestampBody">;
1816
+ timestampHeader: import("zod").ZodString;
1817
+ delimiter: import("zod").ZodString;
1818
+ toleranceSeconds: import("zod").ZodNumber;
1819
+ }, import("zod/v4/core").$strip>], "type">;
1820
+ }, import("zod/v4/core").$strip>], "type">>;
1821
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1822
+ id: import("zod").ZodString;
1823
+ name: import("zod").ZodString;
1824
+ status: import("zod").ZodEnum<{
1825
+ draft: "draft";
1826
+ active: "active";
1827
+ disabled: "disabled";
1828
+ }>;
1829
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1830
+ type: import("zod").ZodLiteral<"none">;
1831
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1832
+ type: import("zod").ZodLiteral<"bearer">;
1833
+ tokenRef: import("zod").ZodString;
1834
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1835
+ type: import("zod").ZodLiteral<"apiKey">;
1836
+ location: import("zod").ZodEnum<{
1837
+ header: "header";
1838
+ query: "query";
1839
+ }>;
1840
+ name: import("zod").ZodString;
1841
+ secretRef: import("zod").ZodString;
1842
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1843
+ type: import("zod").ZodLiteral<"basic">;
1844
+ usernameRef: import("zod").ZodString;
1845
+ passwordRef: import("zod").ZodString;
1846
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1847
+ type: import("zod").ZodLiteral<"hmac">;
1848
+ secretRef: import("zod").ZodString;
1849
+ algorithm: import("zod").ZodEnum<{
1850
+ sha1: "sha1";
1851
+ sha256: "sha256";
1852
+ sha512: "sha512";
1853
+ }>;
1854
+ signature: import("zod").ZodObject<{
1855
+ location: import("zod").ZodEnum<{
1856
+ header: "header";
1857
+ query: "query";
1858
+ }>;
1859
+ name: import("zod").ZodString;
1860
+ encoding: import("zod").ZodEnum<{
1861
+ hex: "hex";
1862
+ base64: "base64";
1863
+ base64url: "base64url";
1864
+ }>;
1865
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
1866
+ }, import("zod/v4/core").$strip>;
1867
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1868
+ type: import("zod").ZodLiteral<"rawBody">;
1869
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1870
+ type: import("zod").ZodLiteral<"timestampBody">;
1871
+ timestampHeader: import("zod").ZodString;
1872
+ delimiter: import("zod").ZodString;
1873
+ toleranceSeconds: import("zod").ZodNumber;
1874
+ }, import("zod/v4/core").$strip>], "type">;
1875
+ }, import("zod/v4/core").$strip>], "type">;
1876
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1877
+ type: import("zod").ZodLiteral<"header">;
1878
+ name: import("zod").ZodString;
1879
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1880
+ type: import("zod").ZodLiteral<"query">;
1881
+ name: import("zod").ZodString;
1882
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1883
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
1884
+ path: import("zod").ZodArray<import("zod").ZodString>;
1885
+ }, import("zod/v4/core").$strip>], "type">;
1886
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
1887
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1888
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1889
+ }, import("zod/v4/core").$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"PUT", "/connections/:slug", import("zod").ZodObject<{
1890
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1891
+ baseUrl: import("zod").ZodURL;
1892
+ auth: import("zod").ZodDefault<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1893
+ type: import("zod").ZodLiteral<"none">;
1894
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1895
+ type: import("zod").ZodLiteral<"bearer">;
1896
+ token: import("zod").ZodString;
1897
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1898
+ type: import("zod").ZodLiteral<"client_credentials">;
1899
+ tokenEndpoint: import("zod").ZodURL;
1900
+ clientId: import("zod").ZodString;
1901
+ clientSecret: import("zod").ZodString;
1902
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1903
+ audience: import("zod").ZodOptional<import("zod").ZodString>;
1904
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
1905
+ client_secret_basic: "client_secret_basic";
1906
+ client_secret_post: "client_secret_post";
1907
+ }>>;
1908
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1909
+ type: import("zod").ZodLiteral<"oauth">;
1910
+ authorizationEndpoint: import("zod").ZodURL;
1911
+ tokenEndpoint: import("zod").ZodURL;
1912
+ clientId: import("zod").ZodString;
1913
+ clientSecret: import("zod").ZodOptional<import("zod").ZodString>;
1914
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1915
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
1916
+ none: "none";
1917
+ client_secret_basic: "client_secret_basic";
1918
+ client_secret_post: "client_secret_post";
1919
+ }>>;
1920
+ extraAuthorizationParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
1921
+ extraTokenParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
1922
+ }, import("zod/v4/core").$strip>], "type">>;
1923
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1924
+ slug: import("zod").ZodString;
1925
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1926
+ baseUrl: import("zod").ZodString;
1927
+ authMode: import("zod").ZodString;
1928
+ status: import("zod").ZodString;
1929
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1930
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1931
+ }, import("zod/v4/core").$strip>, "CONNECTION_EXISTS" | "BASE_URL_NOT_ALLOWED", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1932
+ connections: import("zod").ZodArray<import("zod").ZodObject<{
1933
+ slug: import("zod").ZodString;
1934
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1935
+ baseUrl: import("zod").ZodString;
1936
+ authMode: import("zod").ZodString;
1937
+ status: import("zod").ZodString;
1938
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1939
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1940
+ }, import("zod/v4/core").$strip>>;
1941
+ }, import("zod/v4/core").$strip>, string, string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1942
+ slug: import("zod").ZodString;
1943
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1944
+ baseUrl: import("zod").ZodString;
1945
+ authMode: import("zod").ZodString;
1946
+ status: import("zod").ZodString;
1947
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1948
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
1949
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/connections/:slug/auth/status", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1950
+ authenticated: import("zod").ZodBoolean;
1951
+ mode: import("zod").ZodString;
1952
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
1953
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
1954
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/auth/token", import("zod").ZodObject<{
1955
+ token: import("zod").ZodString;
1956
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1957
+ authenticated: import("zod").ZodBoolean;
1958
+ mode: import("zod").ZodString;
1959
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
1960
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
1961
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/auth/oauth/start", import("zod").ZodObject<{
1962
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1963
+ extraAuthorizationParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
1964
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1965
+ authorizationUrl: import("zod").ZodString;
1966
+ state: import("zod").ZodString;
1967
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND" | "AUTH_NOT_CONFIGURED" | "AUTH_NOT_OAUTH" | "OAUTH_ERROR", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"GET", "/oauth/callback", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1968
+ authenticated: import("zod").ZodBoolean;
1969
+ mode: import("zod").ZodString;
1970
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND" | "AUTH_NOT_CONFIGURED" | "AUTH_NOT_OAUTH" | "OAUTH_ERROR" | "INVALID_OAUTH_STATE", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"DELETE", "/connections/:slug/auth", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
1971
+ authenticated: import("zod").ZodBoolean;
1972
+ mode: import("zod").ZodString;
1973
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
1974
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
1975
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>, import("@fragno-dev/core").FragnoRouteConfig<"POST", "/connections/:slug/request", import("zod").ZodObject<{
1976
+ method: import("zod").ZodEnum<{
1977
+ GET: "GET";
1978
+ POST: "POST";
1979
+ PUT: "PUT";
1980
+ PATCH: "PATCH";
1981
+ DELETE: "DELETE";
1982
+ }>;
1983
+ path: import("zod").ZodString;
1984
+ query: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
1985
+ headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
1986
+ json: import("zod").ZodOptional<import("zod").ZodUnknown>;
1987
+ body: import("zod").ZodOptional<import("zod").ZodString>;
1988
+ timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
1989
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1990
+ status: import("zod").ZodNumber;
1991
+ statusText: import("zod").ZodString;
1992
+ headers: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
1993
+ body: import("zod").ZodUnknown;
1994
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND" | "CONNECTION_DISABLED" | "API_REQUEST_ERROR", string, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>>], import("@fragno-dev/db").ImplicitDatabaseDependencies, import("@fragno-dev/core").BoundServices<{
1995
+ startOAuth: (input: {
1996
+ connectionId: string;
1997
+ stateId: string;
1998
+ scopes?: string[];
1999
+ extraAuthorizationParams?: Record<string, string>;
2000
+ }) => import("@fragno-dev/db").TxResult<{
2001
+ found: false;
2002
+ reason: "connection_not_found";
2003
+ authorizationUrl?: undefined;
2004
+ oauthState?: undefined;
2005
+ } | {
2006
+ found: false;
2007
+ reason: "auth_not_configured";
2008
+ authorizationUrl?: undefined;
2009
+ oauthState?: undefined;
2010
+ } | {
2011
+ found: false;
2012
+ reason: "auth_not_oauth";
2013
+ authorizationUrl?: undefined;
2014
+ oauthState?: undefined;
2015
+ } | {
2016
+ found: true;
2017
+ authorizationUrl: string;
2018
+ oauthState: {
2019
+ id: string;
2020
+ connectionId: string;
2021
+ codeVerifier: string;
2022
+ redirectUri: string;
2023
+ scope: string | null;
2024
+ expiresAt: Date;
2025
+ };
2026
+ reason?: undefined;
2027
+ }, {
2028
+ found: false;
2029
+ reason: "connection_not_found";
2030
+ authorizationUrl?: undefined;
2031
+ oauthState?: undefined;
2032
+ } | {
2033
+ found: false;
2034
+ reason: "auth_not_configured";
2035
+ authorizationUrl?: undefined;
2036
+ oauthState?: undefined;
2037
+ } | {
2038
+ found: false;
2039
+ reason: "auth_not_oauth";
2040
+ authorizationUrl?: undefined;
2041
+ oauthState?: undefined;
2042
+ } | {
2043
+ found: true;
2044
+ authorizationUrl: string;
2045
+ oauthState: {
2046
+ id: string;
2047
+ connectionId: string;
2048
+ codeVerifier: string;
2049
+ redirectUri: string;
2050
+ scope: string | null;
2051
+ expiresAt: Date;
2052
+ };
2053
+ reason?: undefined;
2054
+ }>;
2055
+ completeOAuthCallback: (input: {
2056
+ stateId: string;
2057
+ code: string;
2058
+ }) => import("@fragno-dev/db").TxResult<{
2059
+ found: false;
2060
+ reason: "invalid_state";
2061
+ connection?: undefined;
2062
+ changes?: undefined;
2063
+ } | {
2064
+ found: false;
2065
+ reason: "connection_not_found";
2066
+ connection?: undefined;
2067
+ changes?: undefined;
2068
+ } | {
2069
+ found: false;
2070
+ reason: "auth_not_configured";
2071
+ connection?: undefined;
2072
+ changes?: undefined;
2073
+ } | {
2074
+ found: false;
2075
+ reason: "auth_not_oauth";
2076
+ connection?: undefined;
2077
+ changes?: undefined;
2078
+ } | {
2079
+ found: true;
2080
+ connection: {
2081
+ id: import("@fragno-dev/db/schema").FragnoId;
2082
+ name: string | null;
2083
+ baseUrl: string;
2084
+ authMode: string;
2085
+ status: string;
2086
+ createdAt: Date;
2087
+ updatedAt: Date;
2088
+ };
2089
+ changes: {
2090
+ authPayload: string;
2091
+ authExpiresAt: Date | null;
2092
+ };
2093
+ reason?: undefined;
2094
+ }, {
2095
+ found: false;
2096
+ reason: "invalid_state";
2097
+ connection?: undefined;
2098
+ changes?: undefined;
2099
+ } | {
2100
+ found: false;
2101
+ reason: "connection_not_found";
2102
+ connection?: undefined;
2103
+ changes?: undefined;
2104
+ } | {
2105
+ found: false;
2106
+ reason: "auth_not_configured";
2107
+ connection?: undefined;
2108
+ changes?: undefined;
2109
+ } | {
2110
+ found: false;
2111
+ reason: "auth_not_oauth";
2112
+ connection?: undefined;
2113
+ changes?: undefined;
2114
+ } | {
2115
+ found: true;
2116
+ connection: {
2117
+ id: import("@fragno-dev/db/schema").FragnoId;
2118
+ name: string | null;
2119
+ baseUrl: string;
2120
+ authMode: string;
2121
+ status: string;
2122
+ createdAt: Date;
2123
+ updatedAt: Date;
2124
+ };
2125
+ changes: {
2126
+ authPayload: string;
2127
+ authExpiresAt: Date | null;
2128
+ };
2129
+ reason?: undefined;
2130
+ }>;
2131
+ executeApiRequest: (input: {
2132
+ connectionId: string;
2133
+ request: ApiRequestInput;
2134
+ }) => import("@fragno-dev/db").TxResult<{
2135
+ found: false;
2136
+ reason?: undefined;
2137
+ connection?: undefined;
2138
+ secrets?: undefined;
2139
+ authChanges?: undefined;
2140
+ response?: undefined;
2141
+ } | {
2142
+ found: false;
2143
+ reason: "connection_disabled";
2144
+ connection?: undefined;
2145
+ secrets?: undefined;
2146
+ authChanges?: undefined;
2147
+ response?: undefined;
2148
+ } | {
2149
+ found: true;
2150
+ response: {
2151
+ status: number;
2152
+ statusText: string;
2153
+ headers: {
2154
+ [k: string]: string;
2155
+ };
2156
+ body: any;
2157
+ };
2158
+ }, {
2159
+ found: false;
2160
+ reason?: undefined;
2161
+ connection?: undefined;
2162
+ secrets?: undefined;
2163
+ authChanges?: undefined;
2164
+ response?: undefined;
2165
+ } | {
2166
+ found: false;
2167
+ reason: "connection_disabled";
2168
+ connection?: undefined;
2169
+ secrets?: undefined;
2170
+ authChanges?: undefined;
2171
+ response?: undefined;
2172
+ } | {
2173
+ found: true;
2174
+ connection: {
2175
+ id: import("@fragno-dev/db/schema").FragnoId;
2176
+ name: string | null;
2177
+ baseUrl: string;
2178
+ authMode: string;
2179
+ status: string;
2180
+ createdAt: Date;
2181
+ updatedAt: Date;
2182
+ };
2183
+ secrets: {
2184
+ id: import("@fragno-dev/db/schema").FragnoId;
2185
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
2186
+ kind: string;
2187
+ payload: string;
2188
+ expiresAt: Date | null;
2189
+ updatedAt: Date;
2190
+ }[];
2191
+ authChanges: AuthPersistenceChanges | undefined;
2192
+ response: {
2193
+ status: number;
2194
+ statusText: string;
2195
+ headers: {
2196
+ [k: string]: string;
2197
+ };
2198
+ body: any;
2199
+ };
2200
+ reason?: undefined;
2201
+ }>;
2202
+ refreshClientCredentialsToken: (input: {
2203
+ connectionId: string;
2204
+ }) => import("@fragno-dev/db").TxResult<{
2205
+ found: false;
2206
+ connection?: undefined;
2207
+ secrets?: undefined;
2208
+ authChanges?: undefined;
2209
+ tokenPresent?: undefined;
2210
+ } | {
2211
+ found: true;
2212
+ tokenPresent: boolean;
2213
+ }, {
2214
+ found: false;
2215
+ connection?: undefined;
2216
+ secrets?: undefined;
2217
+ authChanges?: undefined;
2218
+ tokenPresent?: undefined;
2219
+ } | {
2220
+ found: true;
2221
+ connection: {
2222
+ id: import("@fragno-dev/db/schema").FragnoId;
2223
+ name: string | null;
2224
+ baseUrl: string;
2225
+ authMode: string;
2226
+ status: string;
2227
+ createdAt: Date;
2228
+ updatedAt: Date;
2229
+ };
2230
+ secrets: {
2231
+ id: import("@fragno-dev/db/schema").FragnoId;
2232
+ connectionId: import("@fragno-dev/db/schema").FragnoReference;
2233
+ kind: string;
2234
+ payload: string;
2235
+ expiresAt: Date | null;
2236
+ updatedAt: Date;
2237
+ }[];
2238
+ authChanges: AuthPersistenceChanges | undefined;
2239
+ tokenPresent: boolean;
2240
+ }>;
2241
+ }>, import("@fragno-dev/db").DatabaseServiceContext<ApiHooksMap>, import("@fragno-dev/db").DatabaseRequestContext<ApiHooksMap>, import("@fragno-dev/db/fragment-definition-builder").DatabaseRequestStorage, FragnoPublicConfigWithDatabase, never>;
2242
+ declare function createApiFragmentClients(fragnoConfig?: FragnoPublicClientConfig): {
2243
+ useConnections: FragnoClientHookData<"GET", "/connections", import("zod").ZodObject<{
2244
+ connections: import("zod").ZodArray<import("zod").ZodObject<{
2245
+ slug: import("zod").ZodString;
2246
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2247
+ baseUrl: import("zod").ZodString;
2248
+ authMode: import("zod").ZodString;
2249
+ status: import("zod").ZodString;
2250
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2251
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2252
+ }, import("zod/v4/core").$strip>>;
2253
+ }, import("zod/v4/core").$strip>, string, string>;
2254
+ useConnection: FragnoClientHookData<"GET", "/connections/:slug", import("zod").ZodObject<{
2255
+ slug: import("zod").ZodString;
2256
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2257
+ baseUrl: import("zod").ZodString;
2258
+ authMode: import("zod").ZodString;
2259
+ status: import("zod").ZodString;
2260
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2261
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2262
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string>;
2263
+ useAuthStatus: FragnoClientHookData<"GET", "/connections/:slug/auth/status", import("zod").ZodObject<{
2264
+ authenticated: import("zod").ZodBoolean;
2265
+ mode: import("zod").ZodString;
2266
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
2267
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
2268
+ }, import("zod/v4/core").$strip>, "CONNECTION_NOT_FOUND", string>;
2269
+ createConnection: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2270
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2271
+ baseUrl: import("zod").ZodURL;
2272
+ auth: import("zod").ZodDefault<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2273
+ type: import("zod").ZodLiteral<"none">;
2274
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2275
+ type: import("zod").ZodLiteral<"bearer">;
2276
+ token: import("zod").ZodString;
2277
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2278
+ type: import("zod").ZodLiteral<"client_credentials">;
2279
+ tokenEndpoint: import("zod").ZodURL;
2280
+ clientId: import("zod").ZodString;
2281
+ clientSecret: import("zod").ZodString;
2282
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2283
+ audience: import("zod").ZodOptional<import("zod").ZodString>;
2284
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
2285
+ client_secret_basic: "client_secret_basic";
2286
+ client_secret_post: "client_secret_post";
2287
+ }>>;
2288
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2289
+ type: import("zod").ZodLiteral<"oauth">;
2290
+ authorizationEndpoint: import("zod").ZodURL;
2291
+ tokenEndpoint: import("zod").ZodURL;
2292
+ clientId: import("zod").ZodString;
2293
+ clientSecret: import("zod").ZodOptional<import("zod").ZodString>;
2294
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2295
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
2296
+ none: "none";
2297
+ client_secret_basic: "client_secret_basic";
2298
+ client_secret_post: "client_secret_post";
2299
+ }>>;
2300
+ extraAuthorizationParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2301
+ extraTokenParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2302
+ }, import("zod/v4/core").$strip>], "type">>;
2303
+ }, import("zod/v4/core").$strip> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2304
+ slug: import("zod").ZodString;
2305
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2306
+ baseUrl: import("zod").ZodString;
2307
+ authMode: import("zod").ZodString;
2308
+ status: import("zod").ZodString;
2309
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2310
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2311
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_EXISTS" | "BASE_URL_NOT_ALLOWED" | "CONNECTION_NOT_FOUND", string>;
2312
+ deleteConnection: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2313
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2314
+ baseUrl: import("zod").ZodURL;
2315
+ auth: import("zod").ZodDefault<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2316
+ type: import("zod").ZodLiteral<"none">;
2317
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2318
+ type: import("zod").ZodLiteral<"bearer">;
2319
+ token: import("zod").ZodString;
2320
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2321
+ type: import("zod").ZodLiteral<"client_credentials">;
2322
+ tokenEndpoint: import("zod").ZodURL;
2323
+ clientId: import("zod").ZodString;
2324
+ clientSecret: import("zod").ZodString;
2325
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2326
+ audience: import("zod").ZodOptional<import("zod").ZodString>;
2327
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
2328
+ client_secret_basic: "client_secret_basic";
2329
+ client_secret_post: "client_secret_post";
2330
+ }>>;
2331
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2332
+ type: import("zod").ZodLiteral<"oauth">;
2333
+ authorizationEndpoint: import("zod").ZodURL;
2334
+ tokenEndpoint: import("zod").ZodURL;
2335
+ clientId: import("zod").ZodString;
2336
+ clientSecret: import("zod").ZodOptional<import("zod").ZodString>;
2337
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2338
+ tokenEndpointAuthMethod: import("zod").ZodDefault<import("zod").ZodEnum<{
2339
+ none: "none";
2340
+ client_secret_basic: "client_secret_basic";
2341
+ client_secret_post: "client_secret_post";
2342
+ }>>;
2343
+ extraAuthorizationParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2344
+ extraTokenParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2345
+ }, import("zod/v4/core").$strip>], "type">>;
2346
+ }, import("zod/v4/core").$strip> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2347
+ slug: import("zod").ZodString;
2348
+ name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2349
+ baseUrl: import("zod").ZodString;
2350
+ authMode: import("zod").ZodString;
2351
+ status: import("zod").ZodString;
2352
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2353
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2354
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_EXISTS" | "BASE_URL_NOT_ALLOWED" | "CONNECTION_NOT_FOUND", string>;
2355
+ setBearerToken: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug/auth/token", import("zod").ZodObject<{
2356
+ token: import("zod").ZodString;
2357
+ }, import("zod/v4/core").$strip> | undefined, import("zod").ZodObject<{
2358
+ authenticated: import("zod").ZodBoolean;
2359
+ mode: import("zod").ZodString;
2360
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
2361
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
2362
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_NOT_FOUND", string>;
2363
+ startOAuth: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug/auth/oauth/start", import("zod").ZodObject<{
2364
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2365
+ extraAuthorizationParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2366
+ }, import("zod/v4/core").$strip> | undefined, import("zod").ZodObject<{
2367
+ authorizationUrl: import("zod").ZodString;
2368
+ state: import("zod").ZodString;
2369
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_NOT_FOUND" | "AUTH_NOT_CONFIGURED" | "AUTH_NOT_OAUTH" | "OAUTH_ERROR", string>;
2370
+ deleteAuth: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug/auth", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | undefined, import("zod").ZodObject<{
2371
+ authenticated: import("zod").ZodBoolean;
2372
+ mode: import("zod").ZodString;
2373
+ tokenPresent: import("zod").ZodOptional<import("zod").ZodBoolean>;
2374
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>>;
2375
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_NOT_FOUND", string>;
2376
+ request: FragnoClientMutatorData<NonGetHTTPMethod, "/connections/:slug/request", import("zod").ZodObject<{
2377
+ method: import("zod").ZodEnum<{
2378
+ GET: "GET";
2379
+ POST: "POST";
2380
+ PUT: "PUT";
2381
+ PATCH: "PATCH";
2382
+ DELETE: "DELETE";
2383
+ }>;
2384
+ path: import("zod").ZodString;
2385
+ query: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2386
+ headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
2387
+ json: import("zod").ZodOptional<import("zod").ZodUnknown>;
2388
+ body: import("zod").ZodOptional<import("zod").ZodString>;
2389
+ timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>;
2390
+ }, import("zod/v4/core").$strip> | undefined, import("zod").ZodObject<{
2391
+ status: import("zod").ZodNumber;
2392
+ statusText: import("zod").ZodString;
2393
+ headers: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
2394
+ body: import("zod").ZodUnknown;
2395
+ }, import("zod/v4/core").$strip> | undefined, "CONNECTION_NOT_FOUND" | "CONNECTION_DISABLED" | "API_REQUEST_ERROR", string>;
2396
+ useWebhookEndpoints: FragnoClientHookData<"GET", "/webhooks/endpoints", import("zod").ZodObject<{
2397
+ endpoints: import("zod").ZodArray<import("zod").ZodObject<{
2398
+ id: import("zod").ZodString;
2399
+ name: import("zod").ZodString;
2400
+ status: import("zod").ZodEnum<{
2401
+ draft: "draft";
2402
+ active: "active";
2403
+ disabled: "disabled";
2404
+ }>;
2405
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2406
+ type: import("zod").ZodLiteral<"none">;
2407
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2408
+ type: import("zod").ZodLiteral<"bearer">;
2409
+ tokenRef: import("zod").ZodString;
2410
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2411
+ type: import("zod").ZodLiteral<"apiKey">;
2412
+ location: import("zod").ZodEnum<{
2413
+ header: "header";
2414
+ query: "query";
2415
+ }>;
2416
+ name: import("zod").ZodString;
2417
+ secretRef: import("zod").ZodString;
2418
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2419
+ type: import("zod").ZodLiteral<"basic">;
2420
+ usernameRef: import("zod").ZodString;
2421
+ passwordRef: import("zod").ZodString;
2422
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2423
+ type: import("zod").ZodLiteral<"hmac">;
2424
+ secretRef: import("zod").ZodString;
2425
+ algorithm: import("zod").ZodEnum<{
2426
+ sha1: "sha1";
2427
+ sha256: "sha256";
2428
+ sha512: "sha512";
2429
+ }>;
2430
+ signature: import("zod").ZodObject<{
2431
+ location: import("zod").ZodEnum<{
2432
+ header: "header";
2433
+ query: "query";
2434
+ }>;
2435
+ name: import("zod").ZodString;
2436
+ encoding: import("zod").ZodEnum<{
2437
+ hex: "hex";
2438
+ base64: "base64";
2439
+ base64url: "base64url";
2440
+ }>;
2441
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2442
+ }, import("zod/v4/core").$strip>;
2443
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2444
+ type: import("zod").ZodLiteral<"rawBody">;
2445
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2446
+ type: import("zod").ZodLiteral<"timestampBody">;
2447
+ timestampHeader: import("zod").ZodString;
2448
+ delimiter: import("zod").ZodString;
2449
+ toleranceSeconds: import("zod").ZodNumber;
2450
+ }, import("zod/v4/core").$strip>], "type">;
2451
+ }, import("zod/v4/core").$strip>], "type">;
2452
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2453
+ type: import("zod").ZodLiteral<"header">;
2454
+ name: import("zod").ZodString;
2455
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2456
+ type: import("zod").ZodLiteral<"query">;
2457
+ name: import("zod").ZodString;
2458
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2459
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2460
+ path: import("zod").ZodArray<import("zod").ZodString>;
2461
+ }, import("zod/v4/core").$strip>], "type">;
2462
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
2463
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2464
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2465
+ }, import("zod/v4/core").$strip>>;
2466
+ }, import("zod/v4/core").$strip>, string, string>;
2467
+ useWebhookEndpoint: FragnoClientHookData<"GET", "/webhooks/endpoints/:endpointId", import("zod").ZodObject<{
2468
+ id: import("zod").ZodString;
2469
+ name: import("zod").ZodString;
2470
+ status: import("zod").ZodEnum<{
2471
+ draft: "draft";
2472
+ active: "active";
2473
+ disabled: "disabled";
2474
+ }>;
2475
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2476
+ type: import("zod").ZodLiteral<"none">;
2477
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2478
+ type: import("zod").ZodLiteral<"bearer">;
2479
+ tokenRef: import("zod").ZodString;
2480
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2481
+ type: import("zod").ZodLiteral<"apiKey">;
2482
+ location: import("zod").ZodEnum<{
2483
+ header: "header";
2484
+ query: "query";
2485
+ }>;
2486
+ name: import("zod").ZodString;
2487
+ secretRef: import("zod").ZodString;
2488
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2489
+ type: import("zod").ZodLiteral<"basic">;
2490
+ usernameRef: import("zod").ZodString;
2491
+ passwordRef: import("zod").ZodString;
2492
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2493
+ type: import("zod").ZodLiteral<"hmac">;
2494
+ secretRef: import("zod").ZodString;
2495
+ algorithm: import("zod").ZodEnum<{
2496
+ sha1: "sha1";
2497
+ sha256: "sha256";
2498
+ sha512: "sha512";
2499
+ }>;
2500
+ signature: import("zod").ZodObject<{
2501
+ location: import("zod").ZodEnum<{
2502
+ header: "header";
2503
+ query: "query";
2504
+ }>;
2505
+ name: import("zod").ZodString;
2506
+ encoding: import("zod").ZodEnum<{
2507
+ hex: "hex";
2508
+ base64: "base64";
2509
+ base64url: "base64url";
2510
+ }>;
2511
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2512
+ }, import("zod/v4/core").$strip>;
2513
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2514
+ type: import("zod").ZodLiteral<"rawBody">;
2515
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2516
+ type: import("zod").ZodLiteral<"timestampBody">;
2517
+ timestampHeader: import("zod").ZodString;
2518
+ delimiter: import("zod").ZodString;
2519
+ toleranceSeconds: import("zod").ZodNumber;
2520
+ }, import("zod/v4/core").$strip>], "type">;
2521
+ }, import("zod/v4/core").$strip>], "type">;
2522
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2523
+ type: import("zod").ZodLiteral<"header">;
2524
+ name: import("zod").ZodString;
2525
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2526
+ type: import("zod").ZodLiteral<"query">;
2527
+ name: import("zod").ZodString;
2528
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2529
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2530
+ path: import("zod").ZodArray<import("zod").ZodString>;
2531
+ }, import("zod/v4/core").$strip>], "type">;
2532
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
2533
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2534
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2535
+ }, import("zod/v4/core").$strip>, "WEBHOOK_ENDPOINT_NOT_FOUND", string>;
2536
+ createWebhookEndpoint: FragnoClientMutatorData<NonGetHTTPMethod, "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2537
+ name: import("zod").ZodString;
2538
+ status: import("zod").ZodDefault<import("zod").ZodEnum<{
2539
+ draft: "draft";
2540
+ active: "active";
2541
+ disabled: "disabled";
2542
+ }>>;
2543
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2544
+ type: import("zod").ZodLiteral<"header">;
2545
+ name: import("zod").ZodString;
2546
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2547
+ type: import("zod").ZodLiteral<"query">;
2548
+ name: import("zod").ZodString;
2549
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2550
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2551
+ path: import("zod").ZodArray<import("zod").ZodString>;
2552
+ }, import("zod/v4/core").$strip>], "type">;
2553
+ auth: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2554
+ type: import("zod").ZodLiteral<"none">;
2555
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2556
+ type: import("zod").ZodLiteral<"bearer">;
2557
+ token: import("zod").ZodString;
2558
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2559
+ type: import("zod").ZodLiteral<"apiKey">;
2560
+ location: import("zod").ZodEnum<{
2561
+ header: "header";
2562
+ query: "query";
2563
+ }>;
2564
+ name: import("zod").ZodString;
2565
+ secret: import("zod").ZodString;
2566
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2567
+ type: import("zod").ZodLiteral<"basic">;
2568
+ username: import("zod").ZodString;
2569
+ password: import("zod").ZodString;
2570
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2571
+ type: import("zod").ZodLiteral<"hmac">;
2572
+ secret: import("zod").ZodString;
2573
+ algorithm: import("zod").ZodEnum<{
2574
+ sha1: "sha1";
2575
+ sha256: "sha256";
2576
+ sha512: "sha512";
2577
+ }>;
2578
+ signature: import("zod").ZodObject<{
2579
+ location: import("zod").ZodEnum<{
2580
+ header: "header";
2581
+ query: "query";
2582
+ }>;
2583
+ name: import("zod").ZodString;
2584
+ encoding: import("zod").ZodEnum<{
2585
+ hex: "hex";
2586
+ base64: "base64";
2587
+ base64url: "base64url";
2588
+ }>;
2589
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2590
+ }, import("zod/v4/core").$strip>;
2591
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2592
+ type: import("zod").ZodLiteral<"rawBody">;
2593
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2594
+ type: import("zod").ZodLiteral<"timestampBody">;
2595
+ timestampHeader: import("zod").ZodString;
2596
+ delimiter: import("zod").ZodString;
2597
+ toleranceSeconds: import("zod").ZodNumber;
2598
+ }, import("zod/v4/core").$strip>], "type">;
2599
+ }, import("zod/v4/core").$strip>], "type">;
2600
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
2601
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2602
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
2603
+ draft: "draft";
2604
+ active: "active";
2605
+ disabled: "disabled";
2606
+ }>>;
2607
+ deliveryIdentity: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2608
+ type: import("zod").ZodLiteral<"header">;
2609
+ name: import("zod").ZodString;
2610
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2611
+ type: import("zod").ZodLiteral<"query">;
2612
+ name: import("zod").ZodString;
2613
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2614
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2615
+ path: import("zod").ZodArray<import("zod").ZodString>;
2616
+ }, import("zod/v4/core").$strip>], "type">>;
2617
+ auth: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2618
+ type: import("zod").ZodLiteral<"none">;
2619
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2620
+ type: import("zod").ZodLiteral<"bearer">;
2621
+ token: import("zod").ZodString;
2622
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2623
+ type: import("zod").ZodLiteral<"apiKey">;
2624
+ location: import("zod").ZodEnum<{
2625
+ header: "header";
2626
+ query: "query";
2627
+ }>;
2628
+ name: import("zod").ZodString;
2629
+ secret: import("zod").ZodString;
2630
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2631
+ type: import("zod").ZodLiteral<"basic">;
2632
+ username: import("zod").ZodString;
2633
+ password: import("zod").ZodString;
2634
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2635
+ type: import("zod").ZodLiteral<"hmac">;
2636
+ secret: import("zod").ZodString;
2637
+ algorithm: import("zod").ZodEnum<{
2638
+ sha1: "sha1";
2639
+ sha256: "sha256";
2640
+ sha512: "sha512";
2641
+ }>;
2642
+ signature: import("zod").ZodObject<{
2643
+ location: import("zod").ZodEnum<{
2644
+ header: "header";
2645
+ query: "query";
2646
+ }>;
2647
+ name: import("zod").ZodString;
2648
+ encoding: import("zod").ZodEnum<{
2649
+ hex: "hex";
2650
+ base64: "base64";
2651
+ base64url: "base64url";
2652
+ }>;
2653
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2654
+ }, import("zod/v4/core").$strip>;
2655
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2656
+ type: import("zod").ZodLiteral<"rawBody">;
2657
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2658
+ type: import("zod").ZodLiteral<"timestampBody">;
2659
+ timestampHeader: import("zod").ZodString;
2660
+ delimiter: import("zod").ZodString;
2661
+ toleranceSeconds: import("zod").ZodNumber;
2662
+ }, import("zod/v4/core").$strip>], "type">;
2663
+ }, import("zod/v4/core").$strip>], "type">>;
2664
+ }, import("zod/v4/core").$strip> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2665
+ id: import("zod").ZodString;
2666
+ name: import("zod").ZodString;
2667
+ status: import("zod").ZodEnum<{
2668
+ draft: "draft";
2669
+ active: "active";
2670
+ disabled: "disabled";
2671
+ }>;
2672
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2673
+ type: import("zod").ZodLiteral<"none">;
2674
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2675
+ type: import("zod").ZodLiteral<"bearer">;
2676
+ tokenRef: import("zod").ZodString;
2677
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2678
+ type: import("zod").ZodLiteral<"apiKey">;
2679
+ location: import("zod").ZodEnum<{
2680
+ header: "header";
2681
+ query: "query";
2682
+ }>;
2683
+ name: import("zod").ZodString;
2684
+ secretRef: import("zod").ZodString;
2685
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2686
+ type: import("zod").ZodLiteral<"basic">;
2687
+ usernameRef: import("zod").ZodString;
2688
+ passwordRef: import("zod").ZodString;
2689
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2690
+ type: import("zod").ZodLiteral<"hmac">;
2691
+ secretRef: import("zod").ZodString;
2692
+ algorithm: import("zod").ZodEnum<{
2693
+ sha1: "sha1";
2694
+ sha256: "sha256";
2695
+ sha512: "sha512";
2696
+ }>;
2697
+ signature: import("zod").ZodObject<{
2698
+ location: import("zod").ZodEnum<{
2699
+ header: "header";
2700
+ query: "query";
2701
+ }>;
2702
+ name: import("zod").ZodString;
2703
+ encoding: import("zod").ZodEnum<{
2704
+ hex: "hex";
2705
+ base64: "base64";
2706
+ base64url: "base64url";
2707
+ }>;
2708
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2709
+ }, import("zod/v4/core").$strip>;
2710
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2711
+ type: import("zod").ZodLiteral<"rawBody">;
2712
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2713
+ type: import("zod").ZodLiteral<"timestampBody">;
2714
+ timestampHeader: import("zod").ZodString;
2715
+ delimiter: import("zod").ZodString;
2716
+ toleranceSeconds: import("zod").ZodNumber;
2717
+ }, import("zod/v4/core").$strip>], "type">;
2718
+ }, import("zod/v4/core").$strip>], "type">;
2719
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2720
+ type: import("zod").ZodLiteral<"header">;
2721
+ name: import("zod").ZodString;
2722
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2723
+ type: import("zod").ZodLiteral<"query">;
2724
+ name: import("zod").ZodString;
2725
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2726
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2727
+ path: import("zod").ZodArray<import("zod").ZodString>;
2728
+ }, import("zod/v4/core").$strip>], "type">;
2729
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
2730
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2731
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2732
+ }, import("zod/v4/core").$strip> | undefined, string, string>;
2733
+ updateWebhookEndpoint: FragnoClientMutatorData<NonGetHTTPMethod, "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2734
+ name: import("zod").ZodString;
2735
+ status: import("zod").ZodDefault<import("zod").ZodEnum<{
2736
+ draft: "draft";
2737
+ active: "active";
2738
+ disabled: "disabled";
2739
+ }>>;
2740
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2741
+ type: import("zod").ZodLiteral<"header">;
2742
+ name: import("zod").ZodString;
2743
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2744
+ type: import("zod").ZodLiteral<"query">;
2745
+ name: import("zod").ZodString;
2746
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2747
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2748
+ path: import("zod").ZodArray<import("zod").ZodString>;
2749
+ }, import("zod/v4/core").$strip>], "type">;
2750
+ auth: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2751
+ type: import("zod").ZodLiteral<"none">;
2752
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2753
+ type: import("zod").ZodLiteral<"bearer">;
2754
+ token: import("zod").ZodString;
2755
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2756
+ type: import("zod").ZodLiteral<"apiKey">;
2757
+ location: import("zod").ZodEnum<{
2758
+ header: "header";
2759
+ query: "query";
2760
+ }>;
2761
+ name: import("zod").ZodString;
2762
+ secret: import("zod").ZodString;
2763
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2764
+ type: import("zod").ZodLiteral<"basic">;
2765
+ username: import("zod").ZodString;
2766
+ password: import("zod").ZodString;
2767
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2768
+ type: import("zod").ZodLiteral<"hmac">;
2769
+ secret: import("zod").ZodString;
2770
+ algorithm: import("zod").ZodEnum<{
2771
+ sha1: "sha1";
2772
+ sha256: "sha256";
2773
+ sha512: "sha512";
2774
+ }>;
2775
+ signature: import("zod").ZodObject<{
2776
+ location: import("zod").ZodEnum<{
2777
+ header: "header";
2778
+ query: "query";
2779
+ }>;
2780
+ name: import("zod").ZodString;
2781
+ encoding: import("zod").ZodEnum<{
2782
+ hex: "hex";
2783
+ base64: "base64";
2784
+ base64url: "base64url";
2785
+ }>;
2786
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2787
+ }, import("zod/v4/core").$strip>;
2788
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2789
+ type: import("zod").ZodLiteral<"rawBody">;
2790
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2791
+ type: import("zod").ZodLiteral<"timestampBody">;
2792
+ timestampHeader: import("zod").ZodString;
2793
+ delimiter: import("zod").ZodString;
2794
+ toleranceSeconds: import("zod").ZodNumber;
2795
+ }, import("zod/v4/core").$strip>], "type">;
2796
+ }, import("zod/v4/core").$strip>], "type">;
2797
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
2798
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2799
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
2800
+ draft: "draft";
2801
+ active: "active";
2802
+ disabled: "disabled";
2803
+ }>>;
2804
+ deliveryIdentity: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2805
+ type: import("zod").ZodLiteral<"header">;
2806
+ name: import("zod").ZodString;
2807
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2808
+ type: import("zod").ZodLiteral<"query">;
2809
+ name: import("zod").ZodString;
2810
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2811
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2812
+ path: import("zod").ZodArray<import("zod").ZodString>;
2813
+ }, import("zod/v4/core").$strip>], "type">>;
2814
+ auth: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2815
+ type: import("zod").ZodLiteral<"none">;
2816
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2817
+ type: import("zod").ZodLiteral<"bearer">;
2818
+ token: import("zod").ZodString;
2819
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2820
+ type: import("zod").ZodLiteral<"apiKey">;
2821
+ location: import("zod").ZodEnum<{
2822
+ header: "header";
2823
+ query: "query";
2824
+ }>;
2825
+ name: import("zod").ZodString;
2826
+ secret: import("zod").ZodString;
2827
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2828
+ type: import("zod").ZodLiteral<"basic">;
2829
+ username: import("zod").ZodString;
2830
+ password: import("zod").ZodString;
2831
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2832
+ type: import("zod").ZodLiteral<"hmac">;
2833
+ secret: import("zod").ZodString;
2834
+ algorithm: import("zod").ZodEnum<{
2835
+ sha1: "sha1";
2836
+ sha256: "sha256";
2837
+ sha512: "sha512";
2838
+ }>;
2839
+ signature: import("zod").ZodObject<{
2840
+ location: import("zod").ZodEnum<{
2841
+ header: "header";
2842
+ query: "query";
2843
+ }>;
2844
+ name: import("zod").ZodString;
2845
+ encoding: import("zod").ZodEnum<{
2846
+ hex: "hex";
2847
+ base64: "base64";
2848
+ base64url: "base64url";
2849
+ }>;
2850
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2851
+ }, import("zod/v4/core").$strip>;
2852
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2853
+ type: import("zod").ZodLiteral<"rawBody">;
2854
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2855
+ type: import("zod").ZodLiteral<"timestampBody">;
2856
+ timestampHeader: import("zod").ZodString;
2857
+ delimiter: import("zod").ZodString;
2858
+ toleranceSeconds: import("zod").ZodNumber;
2859
+ }, import("zod/v4/core").$strip>], "type">;
2860
+ }, import("zod/v4/core").$strip>], "type">>;
2861
+ }, import("zod/v4/core").$strip> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2862
+ id: import("zod").ZodString;
2863
+ name: import("zod").ZodString;
2864
+ status: import("zod").ZodEnum<{
2865
+ draft: "draft";
2866
+ active: "active";
2867
+ disabled: "disabled";
2868
+ }>;
2869
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2870
+ type: import("zod").ZodLiteral<"none">;
2871
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2872
+ type: import("zod").ZodLiteral<"bearer">;
2873
+ tokenRef: import("zod").ZodString;
2874
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2875
+ type: import("zod").ZodLiteral<"apiKey">;
2876
+ location: import("zod").ZodEnum<{
2877
+ header: "header";
2878
+ query: "query";
2879
+ }>;
2880
+ name: import("zod").ZodString;
2881
+ secretRef: import("zod").ZodString;
2882
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2883
+ type: import("zod").ZodLiteral<"basic">;
2884
+ usernameRef: import("zod").ZodString;
2885
+ passwordRef: import("zod").ZodString;
2886
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2887
+ type: import("zod").ZodLiteral<"hmac">;
2888
+ secretRef: import("zod").ZodString;
2889
+ algorithm: import("zod").ZodEnum<{
2890
+ sha1: "sha1";
2891
+ sha256: "sha256";
2892
+ sha512: "sha512";
2893
+ }>;
2894
+ signature: import("zod").ZodObject<{
2895
+ location: import("zod").ZodEnum<{
2896
+ header: "header";
2897
+ query: "query";
2898
+ }>;
2899
+ name: import("zod").ZodString;
2900
+ encoding: import("zod").ZodEnum<{
2901
+ hex: "hex";
2902
+ base64: "base64";
2903
+ base64url: "base64url";
2904
+ }>;
2905
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2906
+ }, import("zod/v4/core").$strip>;
2907
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2908
+ type: import("zod").ZodLiteral<"rawBody">;
2909
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2910
+ type: import("zod").ZodLiteral<"timestampBody">;
2911
+ timestampHeader: import("zod").ZodString;
2912
+ delimiter: import("zod").ZodString;
2913
+ toleranceSeconds: import("zod").ZodNumber;
2914
+ }, import("zod/v4/core").$strip>], "type">;
2915
+ }, import("zod/v4/core").$strip>], "type">;
2916
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2917
+ type: import("zod").ZodLiteral<"header">;
2918
+ name: import("zod").ZodString;
2919
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2920
+ type: import("zod").ZodLiteral<"query">;
2921
+ name: import("zod").ZodString;
2922
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2923
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2924
+ path: import("zod").ZodArray<import("zod").ZodString>;
2925
+ }, import("zod/v4/core").$strip>], "type">;
2926
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
2927
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2928
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
2929
+ }, import("zod/v4/core").$strip> | undefined, string, string>;
2930
+ deleteWebhookEndpoint: FragnoClientMutatorData<NonGetHTTPMethod, "/webhooks/endpoints/:endpointId", import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
2931
+ name: import("zod").ZodString;
2932
+ status: import("zod").ZodDefault<import("zod").ZodEnum<{
2933
+ draft: "draft";
2934
+ active: "active";
2935
+ disabled: "disabled";
2936
+ }>>;
2937
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2938
+ type: import("zod").ZodLiteral<"header">;
2939
+ name: import("zod").ZodString;
2940
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2941
+ type: import("zod").ZodLiteral<"query">;
2942
+ name: import("zod").ZodString;
2943
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2944
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
2945
+ path: import("zod").ZodArray<import("zod").ZodString>;
2946
+ }, import("zod/v4/core").$strip>], "type">;
2947
+ auth: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2948
+ type: import("zod").ZodLiteral<"none">;
2949
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2950
+ type: import("zod").ZodLiteral<"bearer">;
2951
+ token: import("zod").ZodString;
2952
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2953
+ type: import("zod").ZodLiteral<"apiKey">;
2954
+ location: import("zod").ZodEnum<{
2955
+ header: "header";
2956
+ query: "query";
2957
+ }>;
2958
+ name: import("zod").ZodString;
2959
+ secret: import("zod").ZodString;
2960
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2961
+ type: import("zod").ZodLiteral<"basic">;
2962
+ username: import("zod").ZodString;
2963
+ password: import("zod").ZodString;
2964
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2965
+ type: import("zod").ZodLiteral<"hmac">;
2966
+ secret: import("zod").ZodString;
2967
+ algorithm: import("zod").ZodEnum<{
2968
+ sha1: "sha1";
2969
+ sha256: "sha256";
2970
+ sha512: "sha512";
2971
+ }>;
2972
+ signature: import("zod").ZodObject<{
2973
+ location: import("zod").ZodEnum<{
2974
+ header: "header";
2975
+ query: "query";
2976
+ }>;
2977
+ name: import("zod").ZodString;
2978
+ encoding: import("zod").ZodEnum<{
2979
+ hex: "hex";
2980
+ base64: "base64";
2981
+ base64url: "base64url";
2982
+ }>;
2983
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
2984
+ }, import("zod/v4/core").$strip>;
2985
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2986
+ type: import("zod").ZodLiteral<"rawBody">;
2987
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2988
+ type: import("zod").ZodLiteral<"timestampBody">;
2989
+ timestampHeader: import("zod").ZodString;
2990
+ delimiter: import("zod").ZodString;
2991
+ toleranceSeconds: import("zod").ZodNumber;
2992
+ }, import("zod/v4/core").$strip>], "type">;
2993
+ }, import("zod/v4/core").$strip>], "type">;
2994
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
2995
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2996
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
2997
+ draft: "draft";
2998
+ active: "active";
2999
+ disabled: "disabled";
3000
+ }>>;
3001
+ deliveryIdentity: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3002
+ type: import("zod").ZodLiteral<"header">;
3003
+ name: import("zod").ZodString;
3004
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3005
+ type: import("zod").ZodLiteral<"query">;
3006
+ name: import("zod").ZodString;
3007
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3008
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
3009
+ path: import("zod").ZodArray<import("zod").ZodString>;
3010
+ }, import("zod/v4/core").$strip>], "type">>;
3011
+ auth: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3012
+ type: import("zod").ZodLiteral<"none">;
3013
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3014
+ type: import("zod").ZodLiteral<"bearer">;
3015
+ token: import("zod").ZodString;
3016
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3017
+ type: import("zod").ZodLiteral<"apiKey">;
3018
+ location: import("zod").ZodEnum<{
3019
+ header: "header";
3020
+ query: "query";
3021
+ }>;
3022
+ name: import("zod").ZodString;
3023
+ secret: import("zod").ZodString;
3024
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3025
+ type: import("zod").ZodLiteral<"basic">;
3026
+ username: import("zod").ZodString;
3027
+ password: import("zod").ZodString;
3028
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3029
+ type: import("zod").ZodLiteral<"hmac">;
3030
+ secret: import("zod").ZodString;
3031
+ algorithm: import("zod").ZodEnum<{
3032
+ sha1: "sha1";
3033
+ sha256: "sha256";
3034
+ sha512: "sha512";
3035
+ }>;
3036
+ signature: import("zod").ZodObject<{
3037
+ location: import("zod").ZodEnum<{
3038
+ header: "header";
3039
+ query: "query";
3040
+ }>;
3041
+ name: import("zod").ZodString;
3042
+ encoding: import("zod").ZodEnum<{
3043
+ hex: "hex";
3044
+ base64: "base64";
3045
+ base64url: "base64url";
3046
+ }>;
3047
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
3048
+ }, import("zod/v4/core").$strip>;
3049
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3050
+ type: import("zod").ZodLiteral<"rawBody">;
3051
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3052
+ type: import("zod").ZodLiteral<"timestampBody">;
3053
+ timestampHeader: import("zod").ZodString;
3054
+ delimiter: import("zod").ZodString;
3055
+ toleranceSeconds: import("zod").ZodNumber;
3056
+ }, import("zod/v4/core").$strip>], "type">;
3057
+ }, import("zod/v4/core").$strip>], "type">>;
3058
+ }, import("zod/v4/core").$strip> | undefined, import("@standard-schema/spec").StandardSchemaV1<unknown, unknown> | import("zod").ZodObject<{
3059
+ id: import("zod").ZodString;
3060
+ name: import("zod").ZodString;
3061
+ status: import("zod").ZodEnum<{
3062
+ draft: "draft";
3063
+ active: "active";
3064
+ disabled: "disabled";
3065
+ }>;
3066
+ authConfig: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3067
+ type: import("zod").ZodLiteral<"none">;
3068
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3069
+ type: import("zod").ZodLiteral<"bearer">;
3070
+ tokenRef: import("zod").ZodString;
3071
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3072
+ type: import("zod").ZodLiteral<"apiKey">;
3073
+ location: import("zod").ZodEnum<{
3074
+ header: "header";
3075
+ query: "query";
3076
+ }>;
3077
+ name: import("zod").ZodString;
3078
+ secretRef: import("zod").ZodString;
3079
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3080
+ type: import("zod").ZodLiteral<"basic">;
3081
+ usernameRef: import("zod").ZodString;
3082
+ passwordRef: import("zod").ZodString;
3083
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3084
+ type: import("zod").ZodLiteral<"hmac">;
3085
+ secretRef: import("zod").ZodString;
3086
+ algorithm: import("zod").ZodEnum<{
3087
+ sha1: "sha1";
3088
+ sha256: "sha256";
3089
+ sha512: "sha512";
3090
+ }>;
3091
+ signature: import("zod").ZodObject<{
3092
+ location: import("zod").ZodEnum<{
3093
+ header: "header";
3094
+ query: "query";
3095
+ }>;
3096
+ name: import("zod").ZodString;
3097
+ encoding: import("zod").ZodEnum<{
3098
+ hex: "hex";
3099
+ base64: "base64";
3100
+ base64url: "base64url";
3101
+ }>;
3102
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
3103
+ }, import("zod/v4/core").$strip>;
3104
+ signedPayload: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3105
+ type: import("zod").ZodLiteral<"rawBody">;
3106
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3107
+ type: import("zod").ZodLiteral<"timestampBody">;
3108
+ timestampHeader: import("zod").ZodString;
3109
+ delimiter: import("zod").ZodString;
3110
+ toleranceSeconds: import("zod").ZodNumber;
3111
+ }, import("zod/v4/core").$strip>], "type">;
3112
+ }, import("zod/v4/core").$strip>], "type">;
3113
+ deliveryIdentity: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3114
+ type: import("zod").ZodLiteral<"header">;
3115
+ name: import("zod").ZodString;
3116
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3117
+ type: import("zod").ZodLiteral<"query">;
3118
+ name: import("zod").ZodString;
3119
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
3120
+ type: import("zod").ZodLiteral<"jsonBodyPath">;
3121
+ path: import("zod").ZodArray<import("zod").ZodString>;
3122
+ }, import("zod/v4/core").$strip>], "type">;
3123
+ secretRefs: import("zod").ZodArray<import("zod").ZodString>;
3124
+ createdAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
3125
+ updatedAt: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodDate]>>;
3126
+ }, import("zod/v4/core").$strip> | undefined, string, string>;
3127
+ };
3128
+ //#endregion
3129
+ export { type ApiConnection, type ApiConnectionInput, type ApiFragmentConfig, type ApiRequestInput, type AuthConfig, type UpdateWebhookEndpointInput, type WebhookDeliveryIdentity, type WebhookEndpoint, type WebhookEndpointAuthInput, type WebhookEndpointInput, type WebhookReceivedPayload, apiFragmentDefinition, apiRoutesFactory, apiSchema, createApiFragment, createApiFragmentClients };
3130
+ //# sourceMappingURL=index.d.ts.map