@secondlayer/shared 13.3.0 → 13.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/archive/range-digest.d.ts +50 -0
- package/dist/src/archive/semantic-digest-builder.d.ts +50 -0
- package/dist/src/coverage/index.d.ts +50 -0
- package/dist/src/db/index.d.ts +54 -1
- package/dist/src/db/index.js +4 -1
- package/dist/src/db/index.js.map +3 -3
- package/dist/src/db/queries/chain-reorgs.d.ts +50 -0
- package/dist/src/db/queries/chain-reorgs.js +4 -1
- package/dist/src/db/queries/chain-reorgs.js.map +3 -3
- package/dist/src/db/queries/contracts.d.ts +50 -0
- package/dist/src/db/queries/instance.d.ts +50 -0
- package/dist/src/db/queries/integrity.d.ts +50 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +50 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +50 -0
- package/dist/src/db/queries/subgraphs.d.ts +50 -0
- package/dist/src/db/queries/sync-scope.d.ts +50 -0
- package/dist/src/db/queries/webhooks.d.ts +50 -0
- package/dist/src/db/schema.d.ts +51 -1
- package/dist/src/index.d.ts +169 -7
- package/dist/src/index.js +239 -87
- package/dist/src/index.js.map +6 -4
- package/dist/src/insights/index.d.ts +1540 -0
- package/dist/src/insights/index.js +2284 -0
- package/dist/src/insights/index.js.map +29 -0
- package/dist/src/insights/thresholds.d.ts +56 -0
- package/dist/src/insights/thresholds.js +86 -0
- package/dist/src/insights/thresholds.js.map +10 -0
- package/dist/src/leader.d.ts +3 -1
- package/dist/src/leader.js +3 -1
- package/dist/src/leader.js.map +3 -3
- package/dist/src/node/local-client.d.ts +50 -0
- package/dist/src/queue/listener.js +4 -1
- package/dist/src/queue/listener.js.map +3 -3
- package/dist/src/schemas/index.d.ts +95 -7
- package/dist/src/schemas/index.js +180 -87
- package/dist/src/schemas/index.js.map +4 -3
- package/dist/src/schemas/insights.d.ts +89 -0
- package/dist/src/schemas/insights.js +98 -0
- package/dist/src/schemas/insights.js.map +10 -0
- package/migrations/0169_subgraph_health_history.ts +54 -0
- package/migrations/0170_insights.ts +63 -0
- package/package.json +13 -1
|
@@ -14,8 +14,94 @@ var BILLING_PAUSED_PREFIX = "billing_paused: ";
|
|
|
14
14
|
function billingPausedCode(lastError) {
|
|
15
15
|
return lastError?.startsWith(BILLING_PAUSED_PREFIX) ? lastError.slice(BILLING_PAUSED_PREFIX.length) : null;
|
|
16
16
|
}
|
|
17
|
-
// src/schemas/
|
|
17
|
+
// src/schemas/insights.ts
|
|
18
18
|
import { z as z2 } from "zod";
|
|
19
|
+
var INSIGHT_SEVERITIES = [
|
|
20
|
+
"losing",
|
|
21
|
+
"will_fail",
|
|
22
|
+
"costs",
|
|
23
|
+
"recovered"
|
|
24
|
+
];
|
|
25
|
+
var InsightSeveritySchema = z2.enum(INSIGHT_SEVERITIES);
|
|
26
|
+
var InsightResourceKindSchema = z2.enum(["webhook", "subgraph", "account"]);
|
|
27
|
+
var InsightEvidenceSchema = z2.discriminatedUnion("kind", [
|
|
28
|
+
z2.object({
|
|
29
|
+
kind: z2.literal("series"),
|
|
30
|
+
title: z2.string(),
|
|
31
|
+
series: z2.array(z2.object({
|
|
32
|
+
name: z2.string(),
|
|
33
|
+
role: z2.enum(["a", "context", "mark"]),
|
|
34
|
+
points: z2.array(z2.number())
|
|
35
|
+
})),
|
|
36
|
+
labels: z2.array(z2.tuple([z2.number(), z2.string()])),
|
|
37
|
+
unit: z2.string().optional()
|
|
38
|
+
}),
|
|
39
|
+
z2.object({
|
|
40
|
+
kind: z2.literal("table"),
|
|
41
|
+
title: z2.string(),
|
|
42
|
+
columns: z2.array(z2.string()),
|
|
43
|
+
rows: z2.array(z2.array(z2.union([z2.string(), z2.number()]))),
|
|
44
|
+
markRow: z2.number().optional()
|
|
45
|
+
}),
|
|
46
|
+
z2.object({
|
|
47
|
+
kind: z2.literal("shapes"),
|
|
48
|
+
title: z2.string(),
|
|
49
|
+
shapes: z2.array(z2.object({
|
|
50
|
+
code: z2.string(),
|
|
51
|
+
body: z2.string(),
|
|
52
|
+
count: z2.number(),
|
|
53
|
+
isNew: z2.boolean()
|
|
54
|
+
}))
|
|
55
|
+
}),
|
|
56
|
+
z2.object({
|
|
57
|
+
kind: z2.literal("timeline"),
|
|
58
|
+
title: z2.string(),
|
|
59
|
+
steps: z2.array(z2.object({
|
|
60
|
+
what: z2.string(),
|
|
61
|
+
at: z2.string(),
|
|
62
|
+
note: z2.string().optional(),
|
|
63
|
+
failed: z2.boolean()
|
|
64
|
+
}))
|
|
65
|
+
})
|
|
66
|
+
]);
|
|
67
|
+
var InsightSchema = z2.object({
|
|
68
|
+
id: z2.string(),
|
|
69
|
+
rule: z2.string(),
|
|
70
|
+
severity: InsightSeveritySchema,
|
|
71
|
+
impact: z2.number(),
|
|
72
|
+
resource: z2.object({
|
|
73
|
+
kind: InsightResourceKindSchema,
|
|
74
|
+
id: z2.string(),
|
|
75
|
+
name: z2.string()
|
|
76
|
+
}),
|
|
77
|
+
line: z2.string(),
|
|
78
|
+
meta: z2.string().optional(),
|
|
79
|
+
lead: z2.string(),
|
|
80
|
+
body: z2.string(),
|
|
81
|
+
evidence: z2.array(InsightEvidenceSchema),
|
|
82
|
+
handoff: z2.object({
|
|
83
|
+
prompt: z2.string(),
|
|
84
|
+
commands: z2.array(z2.string())
|
|
85
|
+
}),
|
|
86
|
+
how: z2.object({
|
|
87
|
+
detector: z2.string(),
|
|
88
|
+
facts: z2.array(z2.tuple([z2.string(), z2.string()])),
|
|
89
|
+
label: z2.object({ cause: z2.string(), confidence: z2.number() }).optional()
|
|
90
|
+
}),
|
|
91
|
+
createdAt: z2.string(),
|
|
92
|
+
resolvedAt: z2.string().nullable().optional()
|
|
93
|
+
});
|
|
94
|
+
var InsightListResponseSchema = z2.object({
|
|
95
|
+
data: z2.array(InsightSchema)
|
|
96
|
+
});
|
|
97
|
+
var SEVERITY_ORDER = {
|
|
98
|
+
losing: 0,
|
|
99
|
+
will_fail: 1,
|
|
100
|
+
costs: 2,
|
|
101
|
+
recovered: 3
|
|
102
|
+
};
|
|
103
|
+
// src/schemas/webhooks.ts
|
|
104
|
+
import { z as z3 } from "zod";
|
|
19
105
|
var WEBHOOK_FORMATS = [
|
|
20
106
|
"standard-webhooks",
|
|
21
107
|
"inngest",
|
|
@@ -41,7 +127,7 @@ function webhookTimeoutMsCeiling() {
|
|
|
41
127
|
return ceilingFromEnv("WEBHOOK_TIMEOUT_MS_CEILING", WEBHOOK_TIMEOUT_MS_CEILING_DEFAULT);
|
|
42
128
|
}
|
|
43
129
|
function maxRetriesField() {
|
|
44
|
-
return
|
|
130
|
+
return z3.number().int().min(0).optional().superRefine((v, ctx) => {
|
|
45
131
|
if (v === undefined)
|
|
46
132
|
return;
|
|
47
133
|
const ceiling = webhookMaxRetriesCeiling();
|
|
@@ -54,7 +140,7 @@ function maxRetriesField() {
|
|
|
54
140
|
});
|
|
55
141
|
}
|
|
56
142
|
function timeoutMsField() {
|
|
57
|
-
return
|
|
143
|
+
return z3.number().int().min(100).optional().superRefine((v, ctx) => {
|
|
58
144
|
if (v === undefined)
|
|
59
145
|
return;
|
|
60
146
|
const ceiling = webhookTimeoutMsCeiling();
|
|
@@ -66,8 +152,8 @@ function timeoutMsField() {
|
|
|
66
152
|
}
|
|
67
153
|
});
|
|
68
154
|
}
|
|
69
|
-
var webhookUrl =
|
|
70
|
-
var name =
|
|
155
|
+
var webhookUrl = z3.string().trim().min(1).refine((value) => value.startsWith("http://") || value.startsWith("https://"), "must be an http(s) URL");
|
|
156
|
+
var name = z3.string().trim().min(1).max(128);
|
|
71
157
|
var MANAGED_NAME_PREFIXES = {
|
|
72
158
|
"sentinel:": "Sentinel"
|
|
73
159
|
};
|
|
@@ -78,8 +164,8 @@ function managedByForName(name) {
|
|
|
78
164
|
}
|
|
79
165
|
return null;
|
|
80
166
|
}
|
|
81
|
-
var WebhookStatusSchema =
|
|
82
|
-
var WebhookFormatSchema =
|
|
167
|
+
var WebhookStatusSchema = z3.enum(WEBHOOK_STATUSES);
|
|
168
|
+
var WebhookFormatSchema = z3.enum(WEBHOOK_FORMATS);
|
|
83
169
|
var CHAIN_TRIGGER_TYPES = [
|
|
84
170
|
"stx_transfer",
|
|
85
171
|
"stx_mint",
|
|
@@ -109,212 +195,212 @@ var CHAIN_TRIGGER_TYPES = [
|
|
|
109
195
|
"rune_transfer",
|
|
110
196
|
"rune_burn"
|
|
111
197
|
];
|
|
112
|
-
var runeRef =
|
|
113
|
-
var triggerAmount =
|
|
114
|
-
|
|
115
|
-
|
|
198
|
+
var runeRef = z3.string().trim().min(1);
|
|
199
|
+
var triggerAmount = z3.union([
|
|
200
|
+
z3.string().trim().regex(/^\d+$/, "must be a non-negative integer string"),
|
|
201
|
+
z3.number().int().nonnegative()
|
|
116
202
|
]);
|
|
117
|
-
var triggerPattern =
|
|
118
|
-
var trait =
|
|
119
|
-
var printWhereValue =
|
|
120
|
-
var PrintWhereSchema =
|
|
203
|
+
var triggerPattern = z3.string().trim().min(1);
|
|
204
|
+
var trait = z3.string().trim().min(1);
|
|
205
|
+
var printWhereValue = z3.string().min(1).max(256);
|
|
206
|
+
var PrintWhereSchema = z3.record(z3.string().trim().min(1).max(64), z3.union([printWhereValue, z3.array(printWhereValue).min(1).max(20)])).refine((o) => {
|
|
121
207
|
const n = Object.keys(o).length;
|
|
122
208
|
return n >= 1 && n <= 10;
|
|
123
209
|
}, "where takes 1 to 10 keys");
|
|
124
|
-
var ChainTriggerSchema =
|
|
125
|
-
|
|
126
|
-
type:
|
|
210
|
+
var ChainTriggerSchema = z3.discriminatedUnion("type", [
|
|
211
|
+
z3.object({
|
|
212
|
+
type: z3.literal("stx_transfer"),
|
|
127
213
|
sender: triggerPattern.optional(),
|
|
128
214
|
recipient: triggerPattern.optional(),
|
|
129
215
|
minAmount: triggerAmount.optional(),
|
|
130
216
|
maxAmount: triggerAmount.optional()
|
|
131
217
|
}).strict(),
|
|
132
|
-
|
|
133
|
-
type:
|
|
218
|
+
z3.object({
|
|
219
|
+
type: z3.literal("stx_mint"),
|
|
134
220
|
recipient: triggerPattern.optional(),
|
|
135
221
|
minAmount: triggerAmount.optional()
|
|
136
222
|
}).strict(),
|
|
137
|
-
|
|
138
|
-
type:
|
|
223
|
+
z3.object({
|
|
224
|
+
type: z3.literal("stx_burn"),
|
|
139
225
|
sender: triggerPattern.optional(),
|
|
140
226
|
minAmount: triggerAmount.optional()
|
|
141
227
|
}).strict(),
|
|
142
|
-
|
|
143
|
-
type:
|
|
228
|
+
z3.object({
|
|
229
|
+
type: z3.literal("stx_lock"),
|
|
144
230
|
lockedAddress: triggerPattern.optional(),
|
|
145
231
|
minAmount: triggerAmount.optional()
|
|
146
232
|
}).strict(),
|
|
147
|
-
|
|
148
|
-
type:
|
|
233
|
+
z3.object({
|
|
234
|
+
type: z3.literal("ft_transfer"),
|
|
149
235
|
assetIdentifier: triggerPattern.optional(),
|
|
150
236
|
sender: triggerPattern.optional(),
|
|
151
237
|
recipient: triggerPattern.optional(),
|
|
152
238
|
minAmount: triggerAmount.optional(),
|
|
153
239
|
trait: trait.optional()
|
|
154
240
|
}).strict(),
|
|
155
|
-
|
|
156
|
-
type:
|
|
241
|
+
z3.object({
|
|
242
|
+
type: z3.literal("ft_mint"),
|
|
157
243
|
assetIdentifier: triggerPattern.optional(),
|
|
158
244
|
recipient: triggerPattern.optional(),
|
|
159
245
|
minAmount: triggerAmount.optional(),
|
|
160
246
|
trait: trait.optional()
|
|
161
247
|
}).strict(),
|
|
162
|
-
|
|
163
|
-
type:
|
|
248
|
+
z3.object({
|
|
249
|
+
type: z3.literal("ft_burn"),
|
|
164
250
|
assetIdentifier: triggerPattern.optional(),
|
|
165
251
|
sender: triggerPattern.optional(),
|
|
166
252
|
minAmount: triggerAmount.optional(),
|
|
167
253
|
trait: trait.optional()
|
|
168
254
|
}).strict(),
|
|
169
|
-
|
|
170
|
-
type:
|
|
255
|
+
z3.object({
|
|
256
|
+
type: z3.literal("nft_transfer"),
|
|
171
257
|
assetIdentifier: triggerPattern.optional(),
|
|
172
258
|
sender: triggerPattern.optional(),
|
|
173
259
|
recipient: triggerPattern.optional(),
|
|
174
260
|
trait: trait.optional()
|
|
175
261
|
}).strict(),
|
|
176
|
-
|
|
177
|
-
type:
|
|
262
|
+
z3.object({
|
|
263
|
+
type: z3.literal("nft_mint"),
|
|
178
264
|
assetIdentifier: triggerPattern.optional(),
|
|
179
265
|
recipient: triggerPattern.optional(),
|
|
180
266
|
trait: trait.optional()
|
|
181
267
|
}).strict(),
|
|
182
|
-
|
|
183
|
-
type:
|
|
268
|
+
z3.object({
|
|
269
|
+
type: z3.literal("nft_burn"),
|
|
184
270
|
assetIdentifier: triggerPattern.optional(),
|
|
185
271
|
sender: triggerPattern.optional(),
|
|
186
272
|
trait: trait.optional()
|
|
187
273
|
}).strict(),
|
|
188
|
-
|
|
189
|
-
type:
|
|
274
|
+
z3.object({
|
|
275
|
+
type: z3.literal("contract_call"),
|
|
190
276
|
contractId: triggerPattern.optional(),
|
|
191
277
|
functionName: triggerPattern.optional(),
|
|
192
278
|
caller: triggerPattern.optional(),
|
|
193
279
|
trait: trait.optional()
|
|
194
280
|
}).strict(),
|
|
195
|
-
|
|
196
|
-
type:
|
|
281
|
+
z3.object({
|
|
282
|
+
type: z3.literal("contract_deploy"),
|
|
197
283
|
deployer: triggerPattern.optional(),
|
|
198
284
|
contractName: triggerPattern.optional()
|
|
199
285
|
}).strict(),
|
|
200
|
-
|
|
201
|
-
type:
|
|
286
|
+
z3.object({
|
|
287
|
+
type: z3.literal("print_event"),
|
|
202
288
|
contractId: triggerPattern.optional(),
|
|
203
289
|
topic: triggerPattern.optional(),
|
|
204
290
|
trait: trait.optional(),
|
|
205
291
|
where: PrintWhereSchema.optional()
|
|
206
292
|
}).strict(),
|
|
207
|
-
|
|
208
|
-
type:
|
|
293
|
+
z3.object({
|
|
294
|
+
type: z3.literal("nested_contract_call"),
|
|
209
295
|
contractId: triggerPattern.optional(),
|
|
210
296
|
functionName: triggerPattern.optional(),
|
|
211
297
|
caller: triggerPattern.optional(),
|
|
212
298
|
sender: triggerPattern.optional(),
|
|
213
299
|
trait: trait.optional()
|
|
214
300
|
}).strict(),
|
|
215
|
-
|
|
216
|
-
type:
|
|
301
|
+
z3.object({
|
|
302
|
+
type: z3.literal("var_set"),
|
|
217
303
|
contractId: triggerPattern.optional(),
|
|
218
304
|
varName: triggerPattern.optional(),
|
|
219
305
|
trait: trait.optional()
|
|
220
306
|
}).strict(),
|
|
221
|
-
|
|
222
|
-
type:
|
|
307
|
+
z3.object({
|
|
308
|
+
type: z3.literal("map_set"),
|
|
223
309
|
contractId: triggerPattern.optional(),
|
|
224
310
|
map: triggerPattern.optional(),
|
|
225
311
|
trait: trait.optional()
|
|
226
312
|
}).strict(),
|
|
227
|
-
|
|
228
|
-
type:
|
|
313
|
+
z3.object({
|
|
314
|
+
type: z3.literal("map_insert"),
|
|
229
315
|
contractId: triggerPattern.optional(),
|
|
230
316
|
map: triggerPattern.optional(),
|
|
231
317
|
trait: trait.optional()
|
|
232
318
|
}).strict(),
|
|
233
|
-
|
|
234
|
-
type:
|
|
319
|
+
z3.object({
|
|
320
|
+
type: z3.literal("map_delete"),
|
|
235
321
|
contractId: triggerPattern.optional(),
|
|
236
322
|
map: triggerPattern.optional(),
|
|
237
323
|
trait: trait.optional()
|
|
238
324
|
}).strict(),
|
|
239
|
-
|
|
240
|
-
type:
|
|
325
|
+
z3.object({
|
|
326
|
+
type: z3.literal("sbtc_deposit"),
|
|
241
327
|
sender: triggerPattern.optional(),
|
|
242
328
|
minAmount: triggerAmount.optional(),
|
|
243
329
|
maxAmount: triggerAmount.optional(),
|
|
244
330
|
bitcoinTxid: triggerPattern.optional(),
|
|
245
|
-
requestId:
|
|
331
|
+
requestId: z3.number().int().nonnegative().optional()
|
|
246
332
|
}).strict(),
|
|
247
|
-
|
|
248
|
-
type:
|
|
333
|
+
z3.object({
|
|
334
|
+
type: z3.literal("sbtc_withdrawal_create"),
|
|
249
335
|
sender: triggerPattern.optional(),
|
|
250
336
|
minAmount: triggerAmount.optional(),
|
|
251
337
|
maxAmount: triggerAmount.optional(),
|
|
252
|
-
requestId:
|
|
338
|
+
requestId: z3.number().int().nonnegative().optional()
|
|
253
339
|
}).strict(),
|
|
254
|
-
|
|
255
|
-
type:
|
|
256
|
-
requestId:
|
|
340
|
+
z3.object({
|
|
341
|
+
type: z3.literal("sbtc_withdrawal_accept"),
|
|
342
|
+
requestId: z3.number().int().nonnegative().optional(),
|
|
257
343
|
sweepTxid: triggerPattern.optional()
|
|
258
344
|
}).strict(),
|
|
259
|
-
|
|
260
|
-
type:
|
|
261
|
-
requestId:
|
|
345
|
+
z3.object({
|
|
346
|
+
type: z3.literal("sbtc_withdrawal_reject"),
|
|
347
|
+
requestId: z3.number().int().nonnegative().optional()
|
|
262
348
|
}).strict(),
|
|
263
|
-
|
|
264
|
-
type:
|
|
265
|
-
requestId:
|
|
349
|
+
z3.object({
|
|
350
|
+
type: z3.literal("sbtc_withdrawal_swept_confirmed"),
|
|
351
|
+
requestId: z3.number().int().nonnegative().optional(),
|
|
266
352
|
sweepTxid: triggerPattern.optional()
|
|
267
353
|
}).strict(),
|
|
268
|
-
|
|
269
|
-
type:
|
|
354
|
+
z3.object({
|
|
355
|
+
type: z3.literal("rune_etch"),
|
|
270
356
|
rune: runeRef.optional()
|
|
271
357
|
}).strict(),
|
|
272
|
-
|
|
273
|
-
type:
|
|
358
|
+
z3.object({
|
|
359
|
+
type: z3.literal("rune_mint"),
|
|
274
360
|
rune: runeRef.optional()
|
|
275
361
|
}).strict(),
|
|
276
|
-
|
|
277
|
-
type:
|
|
362
|
+
z3.object({
|
|
363
|
+
type: z3.literal("rune_transfer"),
|
|
278
364
|
rune: runeRef.optional(),
|
|
279
365
|
address: triggerPattern.optional(),
|
|
280
366
|
minAmount: triggerAmount.optional()
|
|
281
367
|
}).strict(),
|
|
282
|
-
|
|
283
|
-
type:
|
|
368
|
+
z3.object({
|
|
369
|
+
type: z3.literal("rune_burn"),
|
|
284
370
|
rune: runeRef.optional()
|
|
285
371
|
}).strict()
|
|
286
372
|
]);
|
|
287
|
-
var ChainTriggersSchema =
|
|
373
|
+
var ChainTriggersSchema = z3.array(ChainTriggerSchema).min(1).max(50);
|
|
288
374
|
var CHAIN_TRIGGER_FIELDS = Object.fromEntries(ChainTriggerSchema._zod.def.options.map((opt) => {
|
|
289
375
|
const shape = opt._zod.def.shape;
|
|
290
376
|
const type = shape.type._zod.def.values[0];
|
|
291
377
|
return [type, Object.keys(shape).filter((k) => k !== "type")];
|
|
292
378
|
}));
|
|
293
|
-
var CreateWebhookRequestSchema =
|
|
379
|
+
var CreateWebhookRequestSchema = z3.object({
|
|
294
380
|
name,
|
|
295
381
|
triggers: ChainTriggersSchema,
|
|
296
382
|
url: webhookUrl,
|
|
297
383
|
format: WebhookFormatSchema.default("standard-webhooks"),
|
|
298
|
-
authConfig:
|
|
384
|
+
authConfig: z3.record(z3.string(), z3.unknown()).optional(),
|
|
299
385
|
maxRetries: maxRetriesField(),
|
|
300
386
|
timeoutMs: timeoutMsField(),
|
|
301
|
-
concurrency:
|
|
387
|
+
concurrency: z3.number().int().min(1).max(100).optional()
|
|
302
388
|
});
|
|
303
|
-
var UpdateWebhookRequestSchema =
|
|
389
|
+
var UpdateWebhookRequestSchema = z3.object({
|
|
304
390
|
name: name.optional(),
|
|
305
391
|
url: webhookUrl.optional(),
|
|
306
392
|
format: WebhookFormatSchema.optional(),
|
|
307
|
-
authConfig:
|
|
393
|
+
authConfig: z3.record(z3.string(), z3.unknown()).optional(),
|
|
308
394
|
maxRetries: maxRetriesField(),
|
|
309
395
|
timeoutMs: timeoutMsField(),
|
|
310
|
-
concurrency:
|
|
396
|
+
concurrency: z3.number().int().min(1).max(100).optional()
|
|
311
397
|
}).refine((value) => Object.keys(value).length > 0, {
|
|
312
398
|
message: "At least one field must be provided"
|
|
313
399
|
});
|
|
314
|
-
var ReplayWebhookRequestSchema =
|
|
315
|
-
fromBlock:
|
|
316
|
-
toBlock:
|
|
317
|
-
force:
|
|
400
|
+
var ReplayWebhookRequestSchema = z3.object({
|
|
401
|
+
fromBlock: z3.number().int().nonnegative(),
|
|
402
|
+
toBlock: z3.number().int().nonnegative(),
|
|
403
|
+
force: z3.string().trim().min(1).max(64).optional()
|
|
318
404
|
}).refine((value) => value.fromBlock <= value.toBlock, {
|
|
319
405
|
message: "fromBlock must be less than or equal to toBlock",
|
|
320
406
|
path: ["toBlock"]
|
|
@@ -421,7 +507,14 @@ export {
|
|
|
421
507
|
CHAIN_TRIGGER_TYPES,
|
|
422
508
|
CreateWebhookRequestSchema,
|
|
423
509
|
DeploySubgraphRequestSchema,
|
|
510
|
+
INSIGHT_SEVERITIES,
|
|
511
|
+
InsightEvidenceSchema,
|
|
512
|
+
InsightListResponseSchema,
|
|
513
|
+
InsightResourceKindSchema,
|
|
514
|
+
InsightSchema,
|
|
515
|
+
InsightSeveritySchema,
|
|
424
516
|
ReplayWebhookRequestSchema,
|
|
517
|
+
SEVERITY_ORDER,
|
|
425
518
|
UpdateWebhookRequestSchema,
|
|
426
519
|
WEBHOOK_FORMATS,
|
|
427
520
|
WEBHOOK_STATUSES,
|
|
@@ -431,5 +524,5 @@ export {
|
|
|
431
524
|
formatWebhookSchemaErrors
|
|
432
525
|
};
|
|
433
526
|
|
|
434
|
-
//# debugId=
|
|
527
|
+
//# debugId=BEE017E4DD14E73764756E2164756E21
|
|
435
528
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/schemas/subgraphs.ts", "../src/schemas/webhooks.ts"],
|
|
3
|
+
"sources": ["../src/schemas/subgraphs.ts", "../src/schemas/insights.ts", "../src/schemas/webhooks.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { z } from \"zod\";\n\n// ── Deploy Subgraph Request ─────────────────────────────────────────────────\n\n/** The body for deploying a subgraph: sources, schema, and handler code. */\nexport interface DeploySubgraphRequest {\n\tname: string;\n\tdescription?: string;\n\tsources: Record<string, Record<string, unknown>>;\n\tschema: Record<string, unknown>;\n\thandlerCode: string;\n\t/** Override the definition's startBlock for this deploy only. */\n\tstartBlock?: number;\n\t/** Original TypeScript source, persisted so chat can read/diff/edit later. */\n\tsourceCode?: string;\n\t/** Validate the definition + print the DDL plan without deploying. */\n\tdryRun?: boolean;\n}\n\nexport const DeploySubgraphRequestSchema: z.ZodType<DeploySubgraphRequest> =\n\tz.object({\n\t\tname: z\n\t\t\t.string()\n\t\t\t.regex(/^[a-z0-9-]+$/, \"lowercase alphanumeric + hyphens only\")\n\t\t\t.max(63),\n\t\tdescription: z.string().optional(),\n\t\tsources: z\n\t\t\t.record(z.string(), z.record(z.string(), z.unknown()))\n\t\t\t.refine(\n\t\t\t\t(s) => Object.keys(s).length > 0,\n\t\t\t\t\"Must have at least one source\",\n\t\t\t),\n\t\tschema: z.record(z.string(), z.unknown()),\n\t\thandlerCode: z.string().max(1_048_576, \"handler code exceeds 1MB limit\"),\n\t\tstartBlock: z.number().int().nonnegative().optional(),\n\t\tsourceCode: z\n\t\t\t.string()\n\t\t\t.max(1_048_576, \"source code exceeds 1MB limit\")\n\t\t\t.optional(),\n\t\tdryRun: z.boolean().optional(),\n\t});\n\n/**\n * How far a subgraph's rows can be checked without trusting the server,\n * derived from its sources and a scan of its handler. Never configured.\n *\n * - `state`: every input is a named state write, provable from block headers.\n * Handlers run in the deterministic realm. A deployed `state` subgraph is\n * verifiable: one with any reason is refused at deploy.\n * - `events`: an input (events, prints, tx results, `ctx.client`) needs\n * re-execution proofs, which are not served yet.\n * - `none`: a source can never be proven as written (trait scope, tip-first\n * backfill).\n */\nexport interface SubgraphVerification {\n\tlevel: \"state\" | \"events\" | \"none\";\n\t/** What stands between the subgraph and checkable rows, e.g.\n\t * `print_event source \"swaps\" needs event proofs` or\n\t * `subgraph.ts:41:12 Date: wall-clock time differs per run`. */\n\treasons: string[];\n\t/** What stays unproven even at this level, e.g. tx attribution of writes. */\n\tunproven: string[];\n}\n\n/** What a deploy did, the version, and where indexing starts. */\nexport interface DeploySubgraphResponse {\n\taction: \"created\" | \"unchanged\" | \"handler_updated\" | \"updated\" | \"reindexed\";\n\tsubgraphId: string;\n\tversion: string;\n\tmessage: string;\n\t/** Effective indexing start height. */\n\tstart_block?: number;\n\toperationId?: string;\n\treindexStarted?: boolean;\n\t/** Bounded candidate-event denominator for the reindex just started, when the\n\t * op was classifiable as sparse/light. Absent for heavy ops (no upfront estimate\n\t * possible) — check `sl subgraphs status` after ~30s for a rate-based ETA instead. */\n\testimatedEvents?: number;\n\t/** Non-blocking deploy lints (e.g. handler reads a print field never observed on-chain). */\n\twarnings?: string[];\n\t/** sha256 identity of what was deployed; absent on unbundled deploys. */\n\tpin?: string;\n\tverification?: SubgraphVerification;\n\tdiff?: {\n\t\taddedTables: string[];\n\t\tremovedTables: string[];\n\t\taddedColumns: Record<string, string[]>;\n\t\tbreakingChanges: string[];\n\t};\n}\n\n// Subgraph API response types\n\n/** Prefix of the `last_error` a billing-paused subgraph carries, e.g.\n * `billing_paused: spend_cap_reached`. Stable: the processor writes it and\n * the watchdog and CLI key off it. */\nexport const BILLING_PAUSED_PREFIX = \"billing_paused: \";\n\n/** The billing code in a subgraph's `last_error`, or `null` when it isn't a\n * billing pause. */\nexport function billingPausedCode(\n\tlastError: string | null | undefined,\n): string | null {\n\treturn lastError?.startsWith(BILLING_PAUSED_PREFIX)\n\t\t? lastError.slice(BILLING_PAUSED_PREFIX.length)\n\t\t: null;\n}\n\n/** A subgraph's name, status, and indexing progress. */\nexport interface SubgraphSummary {\n\tname: string;\n\tversion: string;\n\tstatus: string;\n\tlastProcessedBlock: number;\n\ttotalProcessed: number;\n\ttotalRows?: number;\n\ttotalErrors: number;\n\ttables: string[];\n\tchainTip: number;\n\tsourceChainTip?: number;\n\ttargetBlock?: number;\n\tprogress: number;\n\tblocksRemaining?: number;\n\tsyncMode?: \"sync\" | \"reindex\";\n\tgapCount: number;\n\t/** history_filling = expected gaps while a tip-first backfill op runs. */\n\tintegrity: \"complete\" | \"gaps_detected\" | \"history_filling\";\n\t/** Most recent indexing error reason + when it occurred, if any. */\n\tlastError?: string | null;\n\tlastErrorAt?: string | null;\n\t/** Last row mutation timestamp; powers per-card freshness. */\n\tupdatedAt?: string | null;\n\tcreatedAt: string;\n}\n\nexport interface SubgraphGapRange {\n\tstart: number;\n\tend: number;\n\tsize: number;\n\treason: string;\n}\n\nexport interface SubgraphSyncInfo {\n\tstatus: \"synced\" | \"catching_up\" | \"reindexing\" | \"error\";\n\tmode?: \"sync\" | \"reindex\";\n\tstartBlock: number;\n\tlastProcessedBlock: number;\n\t/**\n\t * Backward-compatible denominator for progress displays. During reindexing,\n\t * this is the reindex target block rather than the live source chain tip.\n\t */\n\tchainTip: number;\n\tsourceChainTip?: number;\n\ttargetBlock?: number;\n\tblocksRemaining: number;\n\tprocessedBlocks?: number;\n\ttotalBlocks?: number;\n\tprogress: number;\n\t/** Present while the populating operation is queued: approximate claim\n\t * position + honest event denominator + naive start estimate. */\n\tqueue?: {\n\t\tposition: number | null;\n\t\testimatedEvents: number | null;\n\t\testimatedStartSeconds: number | null;\n\t};\n\t/** Event-based progress for sparse syncs (block pct is meaningless when\n\t * most heights are skipped). */\n\testimatedEvents?: number;\n\tprocessedEvents?: number;\n\tetaSeconds?: number | null;\n\tgaps: {\n\t\tcount: number;\n\t\ttotalMissingBlocks: number;\n\t\tranges: SubgraphGapRange[];\n\t};\n\t/** history_filling = expected gaps while a tip-first backfill op runs. */\n\tintegrity: \"complete\" | \"gaps_detected\" | \"history_filling\";\n}\n\n/** A subgraph's version, pin, status, tables, and sources. */\nexport interface SubgraphDetail {\n\tname: string;\n\tversion: string;\n\tschemaHash?: string;\n\t/** sha256 over schema, handler bundle, startBlock, network and runtime.\n\t * Null for subgraphs deployed before pins existed. */\n\tpin?: string | null;\n\t/** Null for subgraphs deployed before levels were derived. */\n\tverification?: SubgraphVerification | null;\n\tstatus: string;\n\tlastProcessedBlock: number;\n\tdescription?: string;\n\tsources?: Record<string, unknown>;\n\tdefinition?: Record<string, unknown>;\n\thealth: {\n\t\ttotalProcessed: number;\n\t\ttotalErrors: number;\n\t\terrorRate: number;\n\t\tlastError: string | null;\n\t\tlastErrorAt: string | null;\n\t\t/** True after the processor matched work but user tables still have 0 rows. */\n\t\temptyMapping: boolean;\n\t};\n\tsync: SubgraphSyncInfo;\n\ttables: Record<\n\t\tstring,\n\t\t{\n\t\t\tendpoint: string;\n\t\t\tcolumns: Record<\n\t\t\t\tstring,\n\t\t\t\t{\n\t\t\t\t\ttype: string;\n\t\t\t\t\tnullable?: boolean;\n\t\t\t\t\tindexed?: boolean;\n\t\t\t\t\tsearchable?: boolean;\n\t\t\t\t\tdefault?: string | number | boolean;\n\t\t\t\t}\n\t\t\t>;\n\t\t\trowCount: number;\n\t\t\texample: string;\n\t\t\tindexes?: readonly (readonly string[])[];\n\t\t\tuniqueKeys?: readonly (readonly string[])[];\n\t\t}\n\t>;\n\tcreatedAt: string;\n\tupdatedAt: string;\n}\n\nexport interface SubgraphGapEntry {\n\tstart: number;\n\tend: number;\n\tsize: number;\n\treason: string;\n\tdetectedAt: string;\n\tresolvedAt: string | null;\n}\n\n/** Missing block ranges in a subgraph, with totals. */\nexport interface SubgraphGapsResponse {\n\tdata: SubgraphGapEntry[];\n\tmeta: {\n\t\ttotal: number;\n\t\ttotalMissingBlocks: number;\n\t\tlimit: number;\n\t\toffset: number;\n\t};\n}\n\n/** A queued reindex and the block range it covers. */\nexport interface ReindexResponse {\n\tmessage: string;\n\tfromBlock: number;\n\ttoBlock: number | string;\n\toperationId?: string;\n\tstatus?: \"queued\" | \"running\" | \"cancel_requested\";\n}\n\nexport interface SubgraphQueryParams {\n\tsort?: string;\n\torder?: string;\n\tlimit?: number;\n\toffset?: number;\n\tfields?: string;\n\tfilters?: Record<string, string>;\n}\n\n/**\n * Request shape for `GET /v1/subgraphs/:subgraphName/:tableName/aggregate`.\n * `filters` reuses the list/count where-surface; the rest name the columns to\n * aggregate. SUM/MIN/MAX columns must be numeric (uint/int, plus `_block_height`).\n */\nexport interface SubgraphAggregateParams {\n\tfilters?: Record<string, string>;\n\tcount?: boolean;\n\tcountDistinct?: string[];\n\tsum?: string[];\n\tmin?: string[];\n\tmax?: string[];\n}\n\n/**\n * Aggregate response. Keys are present only for requested aggregates.\n * `count`/`countDistinct` are JSON numbers (counts << 2^53); `sum`/`min`/`max`\n * are lossless strings (NUMERIC `::text`). `sum` of an empty set is `\"0\"`;\n * `min`/`max` are `null` when the filtered set is empty or all-null.\n */\nexport interface SubgraphAggregateResponse {\n\tcount?: number;\n\tcountDistinct?: Record<string, number>;\n\tsum?: Record<string, string>;\n\tmin?: Record<string, string | null>;\n\tmax?: Record<string, string | null>;\n}\n",
|
|
6
|
+
"import { z } from \"zod\";\n\n/**\n * The insight contract. The tenant (`/api/insights`) and platform\n * (`/api/accounts/insights`) routes serve `Insight` verbatim. The web app keeps\n * a field-for-field copy in `apps/web/src/lib/insights.ts`; change both\n * together.\n *\n * The types are written out and the schemas annotated with them, rather than\n * inferred: the bundled `.d.ts` loses inferred zod types (they come out as\n * `unknown`), the same reason `schemas/webhooks.ts` annotates its schemas.\n */\n\nexport const INSIGHT_SEVERITIES = [\n\t\"losing\",\n\t\"will_fail\",\n\t\"costs\",\n\t\"recovered\",\n] as const;\n\nexport type InsightSeverity = (typeof INSIGHT_SEVERITIES)[number];\n\nexport type InsightResourceKind = \"webhook\" | \"subgraph\" | \"account\";\n\nexport type InsightEvidence =\n\t| {\n\t\t\tkind: \"series\";\n\t\t\ttitle: string;\n\t\t\tseries: {\n\t\t\t\tname: string;\n\t\t\t\trole: \"a\" | \"context\" | \"mark\";\n\t\t\t\tpoints: number[];\n\t\t\t}[];\n\t\t\tlabels: [number, string][];\n\t\t\tunit?: string;\n\t }\n\t| {\n\t\t\tkind: \"table\";\n\t\t\ttitle: string;\n\t\t\tcolumns: string[];\n\t\t\trows: (string | number)[][];\n\t\t\tmarkRow?: number;\n\t }\n\t| {\n\t\t\tkind: \"shapes\";\n\t\t\ttitle: string;\n\t\t\tshapes: { code: string; body: string; count: number; isNew: boolean }[];\n\t }\n\t| {\n\t\t\tkind: \"timeline\";\n\t\t\ttitle: string;\n\t\t\tsteps: { what: string; at: string; note?: string; failed: boolean }[];\n\t };\n\nexport interface Insight {\n\tid: string;\n\trule: string;\n\tseverity: InsightSeverity;\n\timpact: number;\n\tresource: {\n\t\tkind: InsightResourceKind;\n\t\tid: string;\n\t\tname: string;\n\t};\n\tline: string;\n\tmeta?: string;\n\tlead: string;\n\tbody: string;\n\tevidence: InsightEvidence[];\n\thandoff: { prompt: string; commands: string[] };\n\thow: {\n\t\tdetector: string;\n\t\tfacts: [string, string][];\n\t\tlabel?: { cause: string; confidence: number };\n\t};\n\tcreatedAt: string;\n\tresolvedAt?: string | null;\n}\n\nexport interface InsightListResponse {\n\tdata: Insight[];\n}\n\nexport const InsightSeveritySchema: z.ZodType<InsightSeverity> =\n\tz.enum(INSIGHT_SEVERITIES);\n\nexport const InsightResourceKindSchema: z.ZodType<InsightResourceKind> = z.enum(\n\t[\"webhook\", \"subgraph\", \"account\"],\n);\n\nexport const InsightEvidenceSchema: z.ZodType<InsightEvidence> =\n\tz.discriminatedUnion(\"kind\", [\n\t\tz.object({\n\t\t\tkind: z.literal(\"series\"),\n\t\t\ttitle: z.string(),\n\t\t\tseries: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\tname: z.string(),\n\t\t\t\t\trole: z.enum([\"a\", \"context\", \"mark\"]),\n\t\t\t\t\tpoints: z.array(z.number()),\n\t\t\t\t}),\n\t\t\t),\n\t\t\tlabels: z.array(z.tuple([z.number(), z.string()])),\n\t\t\tunit: z.string().optional(),\n\t\t}),\n\t\tz.object({\n\t\t\tkind: z.literal(\"table\"),\n\t\t\ttitle: z.string(),\n\t\t\tcolumns: z.array(z.string()),\n\t\t\trows: z.array(z.array(z.union([z.string(), z.number()]))),\n\t\t\tmarkRow: z.number().optional(),\n\t\t}),\n\t\tz.object({\n\t\t\tkind: z.literal(\"shapes\"),\n\t\t\ttitle: z.string(),\n\t\t\tshapes: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\tcode: z.string(),\n\t\t\t\t\tbody: z.string(),\n\t\t\t\t\tcount: z.number(),\n\t\t\t\t\tisNew: z.boolean(),\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tz.object({\n\t\t\tkind: z.literal(\"timeline\"),\n\t\t\ttitle: z.string(),\n\t\t\tsteps: z.array(\n\t\t\t\tz.object({\n\t\t\t\t\twhat: z.string(),\n\t\t\t\t\tat: z.string(),\n\t\t\t\t\tnote: z.string().optional(),\n\t\t\t\t\tfailed: z.boolean(),\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t]);\n\nexport const InsightSchema: z.ZodType<Insight> = z.object({\n\tid: z.string(),\n\trule: z.string(),\n\tseverity: InsightSeveritySchema,\n\timpact: z.number(),\n\tresource: z.object({\n\t\tkind: InsightResourceKindSchema,\n\t\tid: z.string(),\n\t\tname: z.string(),\n\t}),\n\tline: z.string(),\n\tmeta: z.string().optional(),\n\tlead: z.string(),\n\tbody: z.string(),\n\tevidence: z.array(InsightEvidenceSchema),\n\thandoff: z.object({\n\t\tprompt: z.string(),\n\t\tcommands: z.array(z.string()),\n\t}),\n\thow: z.object({\n\t\tdetector: z.string(),\n\t\tfacts: z.array(z.tuple([z.string(), z.string()])),\n\t\tlabel: z.object({ cause: z.string(), confidence: z.number() }).optional(),\n\t}),\n\tcreatedAt: z.string(),\n\tresolvedAt: z.string().nullable().optional(),\n});\n\nexport const InsightListResponseSchema: z.ZodType<InsightListResponse> =\n\tz.object({\n\t\tdata: z.array(InsightSchema),\n\t});\n\nexport const SEVERITY_ORDER: Record<InsightSeverity, number> = {\n\tlosing: 0,\n\twill_fail: 1,\n\tcosts: 2,\n\trecovered: 3,\n};\n",
|
|
6
7
|
"import { z } from \"zod\";\n\nexport const WEBHOOK_FORMATS = [\n\t\"standard-webhooks\",\n\t\"inngest\",\n\t\"trigger\",\n\t\"cloudflare\",\n\t\"cloudevents\",\n\t\"raw\",\n] as const;\n\nexport const WEBHOOK_STATUSES = [\"active\", \"paused\", \"error\"] as const;\n\n/**\n * Delivery-cap ceilings. Self-host defaults keep today's hardcoded limits\n * (100 retries, 300s timeout); an operator raises or lowers them per env.\n * Read live (not baked in at import) so a changed env var takes effect on\n * the next request without a process restart, and so tests can override\n * per-case.\n */\nexport const WEBHOOK_MAX_RETRIES_CEILING_DEFAULT = 100;\nexport const WEBHOOK_TIMEOUT_MS_CEILING_DEFAULT = 300_000;\n\nfunction ceilingFromEnv(envVar: string, fallback: number): number {\n\tconst raw = process.env[envVar];\n\tif (raw === undefined) return fallback;\n\tconst parsed = Number.parseInt(raw, 10);\n\treturn Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;\n}\n\nexport function webhookMaxRetriesCeiling(): number {\n\treturn ceilingFromEnv(\n\t\t\"WEBHOOK_MAX_RETRIES_CEILING\",\n\t\tWEBHOOK_MAX_RETRIES_CEILING_DEFAULT,\n\t);\n}\n\nexport function webhookTimeoutMsCeiling(): number {\n\treturn ceilingFromEnv(\n\t\t\"WEBHOOK_TIMEOUT_MS_CEILING\",\n\t\tWEBHOOK_TIMEOUT_MS_CEILING_DEFAULT,\n\t);\n}\n\nfunction maxRetriesField() {\n\treturn z\n\t\t.number()\n\t\t.int()\n\t\t.min(0)\n\t\t.optional()\n\t\t.superRefine((v, ctx) => {\n\t\t\tif (v === undefined) return;\n\t\t\tconst ceiling = webhookMaxRetriesCeiling();\n\t\t\tif (v > ceiling) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `maxRetries exceeds ceiling (${ceiling})`,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n}\n\nfunction timeoutMsField() {\n\treturn z\n\t\t.number()\n\t\t.int()\n\t\t.min(100)\n\t\t.optional()\n\t\t.superRefine((v, ctx) => {\n\t\t\tif (v === undefined) return;\n\t\t\tconst ceiling = webhookTimeoutMsCeiling();\n\t\t\tif (v > ceiling) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `timeoutMs exceeds ceiling (${ceiling})`,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n}\n\nconst webhookUrl = z\n\t.string()\n\t.trim()\n\t.min(1)\n\t.refine(\n\t\t(value) => value.startsWith(\"http://\") || value.startsWith(\"https://\"),\n\t\t\"must be an http(s) URL\",\n\t);\n\nconst name = z.string().trim().min(1).max(128);\n\n/** Webhook names another first-party product owns and looks up by name.\n * Renaming one breaks that product's reconcile, so the API refuses it and\n * the dashboard shows the owner instead of Rename. Prefix -> display name. */\nexport const MANAGED_NAME_PREFIXES: Readonly<Record<string, string>> = {\n\t\"sentinel:\": \"Sentinel\",\n};\n\nexport function managedByForName(name: string): string | null {\n\tfor (const [prefix, owner] of Object.entries(MANAGED_NAME_PREFIXES)) {\n\t\tif (name.startsWith(prefix)) return owner;\n\t}\n\treturn null;\n}\n\nexport const WebhookStatusSchema: z.ZodType<WebhookStatus> =\n\tz.enum(WEBHOOK_STATUSES);\nexport const WebhookFormatSchema: z.ZodType<WebhookFormat> =\n\tz.enum(WEBHOOK_FORMATS);\n\n// --- Chain triggers (direct chain-level webhooks) -----------------------\n// A chain webhook reacts to raw chain events matched directly off the\n// Index/Streams clock (no subgraph). `triggers` is an array of these filters —\n// the JSON mirror of the subgraph runtime's `SubgraphFilter` union. Defined\n// here (not imported from @secondlayer/subgraphs) to avoid a shared→subgraphs\n// cycle; the evaluator maps these to `SubgraphFilter` at match time. Amounts are\n// non-negative integer strings (uint128 can exceed JS safe-int) or numbers.\n\nexport const CHAIN_TRIGGER_TYPES = [\n\t\"stx_transfer\",\n\t\"stx_mint\",\n\t\"stx_burn\",\n\t\"stx_lock\",\n\t\"ft_transfer\",\n\t\"ft_mint\",\n\t\"ft_burn\",\n\t\"nft_transfer\",\n\t\"nft_mint\",\n\t\"nft_burn\",\n\t\"contract_call\",\n\t\"contract_deploy\",\n\t\"print_event\",\n\t\"nested_contract_call\",\n\t\"var_set\",\n\t\"map_set\",\n\t\"map_insert\",\n\t\"map_delete\",\n\t\"sbtc_deposit\",\n\t\"sbtc_withdrawal_create\",\n\t\"sbtc_withdrawal_accept\",\n\t\"sbtc_withdrawal_reject\",\n\t\"sbtc_withdrawal_swept_confirmed\",\n\t\"rune_etch\",\n\t\"rune_mint\",\n\t\"rune_transfer\",\n\t\"rune_burn\",\n] as const;\n\n/** Runes trigger types (plan 060) — matched off `chain=bitcoin` Streams events\n * (plan 059), not the Stacks Index clock. `rune` is a RuneRef (an id like\n * `840000:3` or a name like `DOG•GO•TO•THE•MOON`); the API resolves and\n * normalizes it to its canonical id at create time (see `../../routes/webhooks.ts`),\n * rejecting an unresolvable one with 400 when Bitcoin data is configured. */\nconst runeRef = z.string().trim().min(1);\n\nconst triggerAmount = z.union([\n\tz.string().trim().regex(/^\\d+$/, \"must be a non-negative integer string\"),\n\tz.number().int().nonnegative(),\n]);\n/** Principal/identifier/name patterns — `*` wildcards allowed (matched by the\n * evaluator). */\nconst triggerPattern = z.string().trim().min(1);\nconst trait = z.string().trim().min(1);\n\n/**\n * `print_event` `where`: equality on top-level keys of the decoded print\n * tuple, spelled as the contract prints them. An array is any-of; multiple\n * keys AND. Values compare against the field's JSON-normalized form.\n */\nconst printWhereValue = z.string().min(1).max(256);\nexport const PrintWhereSchema: z.ZodType<Record<string, string | string[]>> = z\n\t.record(\n\t\tz.string().trim().min(1).max(64),\n\t\tz.union([printWhereValue, z.array(printWhereValue).min(1).max(20)]),\n\t)\n\t.refine((o) => {\n\t\tconst n = Object.keys(o).length;\n\t\treturn n >= 1 && n <= 10;\n\t}, \"where takes 1 to 10 keys\");\n\nexport const ChainTriggerSchema: z.ZodType<ChainTrigger> = z.discriminatedUnion(\n\t\"type\",\n\t[\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"stx_transfer\"),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\tmaxAmount: triggerAmount.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"stx_mint\"),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"stx_burn\"),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"stx_lock\"),\n\t\t\t\tlockedAddress: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"ft_transfer\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"ft_mint\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"ft_burn\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"nft_transfer\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"nft_mint\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\trecipient: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"nft_burn\"),\n\t\t\t\tassetIdentifier: triggerPattern.optional(),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"contract_call\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tfunctionName: triggerPattern.optional(),\n\t\t\t\tcaller: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"contract_deploy\"),\n\t\t\t\tdeployer: triggerPattern.optional(),\n\t\t\t\tcontractName: triggerPattern.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"print_event\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\ttopic: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t\twhere: PrintWhereSchema.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"nested_contract_call\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tfunctionName: triggerPattern.optional(),\n\t\t\t\tcaller: triggerPattern.optional(),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"var_set\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tvarName: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"map_set\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tmap: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"map_insert\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tmap: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"map_delete\"),\n\t\t\t\tcontractId: triggerPattern.optional(),\n\t\t\t\tmap: triggerPattern.optional(),\n\t\t\t\ttrait: trait.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"sbtc_deposit\"),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\tmaxAmount: triggerAmount.optional(),\n\t\t\t\tbitcoinTxid: triggerPattern.optional(),\n\t\t\t\trequestId: z.number().int().nonnegative().optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"sbtc_withdrawal_create\"),\n\t\t\t\tsender: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t\tmaxAmount: triggerAmount.optional(),\n\t\t\t\trequestId: z.number().int().nonnegative().optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"sbtc_withdrawal_accept\"),\n\t\t\t\trequestId: z.number().int().nonnegative().optional(),\n\t\t\t\tsweepTxid: triggerPattern.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"sbtc_withdrawal_reject\"),\n\t\t\t\trequestId: z.number().int().nonnegative().optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"sbtc_withdrawal_swept_confirmed\"),\n\t\t\t\trequestId: z.number().int().nonnegative().optional(),\n\t\t\t\tsweepTxid: triggerPattern.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"rune_etch\"),\n\t\t\t\trune: runeRef.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"rune_mint\"),\n\t\t\t\trune: runeRef.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"rune_transfer\"),\n\t\t\t\trune: runeRef.optional(),\n\t\t\t\taddress: triggerPattern.optional(),\n\t\t\t\tminAmount: triggerAmount.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t\tz\n\t\t\t.object({\n\t\t\t\ttype: z.literal(\"rune_burn\"),\n\t\t\t\trune: runeRef.optional(),\n\t\t\t})\n\t\t\t.strict(),\n\t],\n);\n\nexport const ChainTriggersSchema: z.ZodType<ChainTrigger[]> = z\n\t.array(ChainTriggerSchema)\n\t.min(1)\n\t.max(50);\n\n/**\n * Per-type accepted filter fields for chain triggers, DERIVED from\n * {@link ChainTriggerSchema} so the agent-facing reference can never drift behind\n * the validator. `{ stx_transfer: [\"sender\",\"recipient\",\"minAmount\",\"maxAmount\"], ... }`.\n */\nexport const CHAIN_TRIGGER_FIELDS: Record<string, string[]> =\n\tObject.fromEntries(\n\t\t// biome-ignore lint/suspicious/noExplicitAny: zod-internal introspection of this module's own discriminated union\n\t\t((ChainTriggerSchema as any)._zod.def.options as any[]).map((opt) => {\n\t\t\tconst shape = opt._zod.def.shape as Record<string, unknown>;\n\t\t\t// biome-ignore lint/suspicious/noExplicitAny: literal value lives on the zod-internal def\n\t\t\tconst type = (shape.type as any)._zod.def.values[0] as string;\n\t\t\treturn [type, Object.keys(shape).filter((k) => k !== \"type\")];\n\t\t}),\n\t);\n\nexport const CreateWebhookRequestSchema: z.ZodType<ParsedCreateWebhookRequest> =\n\tz.object({\n\t\tname,\n\t\ttriggers: ChainTriggersSchema,\n\t\turl: webhookUrl,\n\t\tformat: WebhookFormatSchema.default(\"standard-webhooks\"),\n\t\tauthConfig: z.record(z.string(), z.unknown()).optional(),\n\t\tmaxRetries: maxRetriesField(),\n\t\ttimeoutMs: timeoutMsField(),\n\t\tconcurrency: z.number().int().min(1).max(100).optional(),\n\t});\n\nexport const UpdateWebhookRequestSchema: z.ZodType<UpdateWebhookRequest> = z\n\t.object({\n\t\tname: name.optional(),\n\t\turl: webhookUrl.optional(),\n\t\tformat: WebhookFormatSchema.optional(),\n\t\tauthConfig: z.record(z.string(), z.unknown()).optional(),\n\t\tmaxRetries: maxRetriesField(),\n\t\ttimeoutMs: timeoutMsField(),\n\t\tconcurrency: z.number().int().min(1).max(100).optional(),\n\t})\n\t.refine((value) => Object.keys(value).length > 0, {\n\t\tmessage: \"At least one field must be provided\",\n\t});\n\nexport const ReplayWebhookRequestSchema: z.ZodType<ReplayWebhookRequest> = z\n\t.object({\n\t\tfromBlock: z.number().int().nonnegative(),\n\t\ttoBlock: z.number().int().nonnegative(),\n\t\tforce: z.string().trim().min(1).max(64).optional(),\n\t})\n\t.refine((value) => value.fromBlock <= value.toBlock, {\n\t\tmessage: \"fromBlock must be less than or equal to toBlock\",\n\t\tpath: [\"toBlock\"],\n\t});\n\nexport type WebhookStatus = (typeof WEBHOOK_STATUSES)[number];\n/** Webhook kind (mirrors db/types `WebhookKind`). Chain events only. */\nexport type WebhookKind = \"chain\";\nexport type WebhookFormat = (typeof WEBHOOK_FORMATS)[number];\n\nexport type ChainTriggerType = (typeof CHAIN_TRIGGER_TYPES)[number];\n/** Non-negative integer amount over JSON (string for uint128 safety, or number). */\nexport type ChainTriggerAmount = string | number;\n\ninterface TraitScoped {\n\ttrait?: string;\n}\n\n/** JSON mirror of the subgraph runtime's `SubgraphFilter` union. */\nexport type ChainTrigger =\n\t| {\n\t\t\ttype: \"stx_transfer\";\n\t\t\tsender?: string;\n\t\t\trecipient?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t\t\tmaxAmount?: ChainTriggerAmount;\n\t }\n\t| { type: \"stx_mint\"; recipient?: string; minAmount?: ChainTriggerAmount }\n\t| { type: \"stx_burn\"; sender?: string; minAmount?: ChainTriggerAmount }\n\t| {\n\t\t\ttype: \"stx_lock\";\n\t\t\tlockedAddress?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t }\n\t| ({\n\t\t\ttype: \"ft_transfer\";\n\t\t\tassetIdentifier?: string;\n\t\t\tsender?: string;\n\t\t\trecipient?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"ft_mint\";\n\t\t\tassetIdentifier?: string;\n\t\t\trecipient?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"ft_burn\";\n\t\t\tassetIdentifier?: string;\n\t\t\tsender?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"nft_transfer\";\n\t\t\tassetIdentifier?: string;\n\t\t\tsender?: string;\n\t\t\trecipient?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"nft_mint\";\n\t\t\tassetIdentifier?: string;\n\t\t\trecipient?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"nft_burn\";\n\t\t\tassetIdentifier?: string;\n\t\t\tsender?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"contract_call\";\n\t\t\tcontractId?: string;\n\t\t\tfunctionName?: string;\n\t\t\tcaller?: string;\n\t } & TraitScoped)\n\t| { type: \"contract_deploy\"; deployer?: string; contractName?: string }\n\t| ({\n\t\t\ttype: \"print_event\";\n\t\t\tcontractId?: string;\n\t\t\ttopic?: string;\n\t\t\t/** Equality on top-level keys of the decoded print tuple; array = any-of, keys AND. */\n\t\t\twhere?: Record<string, string | readonly string[]>;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"nested_contract_call\";\n\t\t\tcontractId?: string;\n\t\t\tfunctionName?: string;\n\t\t\tcaller?: string;\n\t\t\tsender?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"var_set\";\n\t\t\tcontractId?: string;\n\t\t\tvarName?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"map_set\";\n\t\t\tcontractId?: string;\n\t\t\tmap?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"map_insert\";\n\t\t\tcontractId?: string;\n\t\t\tmap?: string;\n\t } & TraitScoped)\n\t| ({\n\t\t\ttype: \"map_delete\";\n\t\t\tcontractId?: string;\n\t\t\tmap?: string;\n\t } & TraitScoped)\n\t| {\n\t\t\ttype: \"sbtc_deposit\";\n\t\t\tsender?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t\t\tmaxAmount?: ChainTriggerAmount;\n\t\t\tbitcoinTxid?: string;\n\t\t\trequestId?: number;\n\t }\n\t| {\n\t\t\ttype: \"sbtc_withdrawal_create\";\n\t\t\tsender?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t\t\tmaxAmount?: ChainTriggerAmount;\n\t\t\trequestId?: number;\n\t }\n\t| {\n\t\t\ttype: \"sbtc_withdrawal_accept\";\n\t\t\trequestId?: number;\n\t\t\tsweepTxid?: string;\n\t }\n\t| { type: \"sbtc_withdrawal_reject\"; requestId?: number }\n\t| {\n\t\t\ttype: \"sbtc_withdrawal_swept_confirmed\";\n\t\t\trequestId?: number;\n\t\t\tsweepTxid?: string;\n\t }\n\t| { type: \"rune_etch\"; rune?: string }\n\t| { type: \"rune_mint\"; rune?: string }\n\t| {\n\t\t\ttype: \"rune_transfer\";\n\t\t\trune?: string;\n\t\t\taddress?: string;\n\t\t\tminAmount?: ChainTriggerAmount;\n\t }\n\t| { type: \"rune_burn\"; rune?: string };\n\n/** Args for a chain-trigger builder — every field of a variant except `type`. */\ntype TriggerArgs<T extends ChainTrigger[\"type\"]> = Omit<\n\tExtract<ChainTrigger, { type: T }>,\n\t\"type\"\n>;\n\n/**\n * Ergonomic chain-trigger constructors for `webhooks.create({ triggers })`.\n * Each returns a bare `ChainTrigger` (the wire shape the API expects):\n *\n * ```ts\n * client.webhooks.create({\n * url: \"https://my.app/webhook\",\n * triggers: [trigger.contractCall({ contractId: \"SP....amm\", functionName: \"swap-*\" })],\n * });\n * ```\n */\nexport const trigger = {\n\tstxTransfer: (f: TriggerArgs<\"stx_transfer\"> = {}): ChainTrigger => ({\n\t\ttype: \"stx_transfer\",\n\t\t...f,\n\t}),\n\tstxMint: (f: TriggerArgs<\"stx_mint\"> = {}): ChainTrigger => ({\n\t\ttype: \"stx_mint\",\n\t\t...f,\n\t}),\n\tstxBurn: (f: TriggerArgs<\"stx_burn\"> = {}): ChainTrigger => ({\n\t\ttype: \"stx_burn\",\n\t\t...f,\n\t}),\n\tstxLock: (f: TriggerArgs<\"stx_lock\"> = {}): ChainTrigger => ({\n\t\ttype: \"stx_lock\",\n\t\t...f,\n\t}),\n\tftTransfer: (f: TriggerArgs<\"ft_transfer\"> = {}): ChainTrigger => ({\n\t\ttype: \"ft_transfer\",\n\t\t...f,\n\t}),\n\tftMint: (f: TriggerArgs<\"ft_mint\"> = {}): ChainTrigger => ({\n\t\ttype: \"ft_mint\",\n\t\t...f,\n\t}),\n\tftBurn: (f: TriggerArgs<\"ft_burn\"> = {}): ChainTrigger => ({\n\t\ttype: \"ft_burn\",\n\t\t...f,\n\t}),\n\tnftTransfer: (f: TriggerArgs<\"nft_transfer\"> = {}): ChainTrigger => ({\n\t\ttype: \"nft_transfer\",\n\t\t...f,\n\t}),\n\tnftMint: (f: TriggerArgs<\"nft_mint\"> = {}): ChainTrigger => ({\n\t\ttype: \"nft_mint\",\n\t\t...f,\n\t}),\n\tnftBurn: (f: TriggerArgs<\"nft_burn\"> = {}): ChainTrigger => ({\n\t\ttype: \"nft_burn\",\n\t\t...f,\n\t}),\n\tcontractCall: (f: TriggerArgs<\"contract_call\"> = {}): ChainTrigger => ({\n\t\ttype: \"contract_call\",\n\t\t...f,\n\t}),\n\tcontractDeploy: (f: TriggerArgs<\"contract_deploy\"> = {}): ChainTrigger => ({\n\t\ttype: \"contract_deploy\",\n\t\t...f,\n\t}),\n\tprintEvent: (f: TriggerArgs<\"print_event\"> = {}): ChainTrigger => ({\n\t\ttype: \"print_event\",\n\t\t...f,\n\t}),\n\tsbtcDeposit: (f: TriggerArgs<\"sbtc_deposit\"> = {}): ChainTrigger => ({\n\t\ttype: \"sbtc_deposit\",\n\t\t...f,\n\t}),\n\tsbtcWithdrawalCreate: (\n\t\tf: TriggerArgs<\"sbtc_withdrawal_create\"> = {},\n\t): ChainTrigger => ({\n\t\ttype: \"sbtc_withdrawal_create\",\n\t\t...f,\n\t}),\n\tsbtcWithdrawalAccept: (\n\t\tf: TriggerArgs<\"sbtc_withdrawal_accept\"> = {},\n\t): ChainTrigger => ({\n\t\ttype: \"sbtc_withdrawal_accept\",\n\t\t...f,\n\t}),\n\tsbtcWithdrawalReject: (\n\t\tf: TriggerArgs<\"sbtc_withdrawal_reject\"> = {},\n\t): ChainTrigger => ({\n\t\ttype: \"sbtc_withdrawal_reject\",\n\t\t...f,\n\t}),\n\tsbtcWithdrawalSweptConfirmed: (\n\t\tf: TriggerArgs<\"sbtc_withdrawal_swept_confirmed\"> = {},\n\t): ChainTrigger => ({\n\t\ttype: \"sbtc_withdrawal_swept_confirmed\",\n\t\t...f,\n\t}),\n\truneEtch: (f: TriggerArgs<\"rune_etch\"> = {}): ChainTrigger => ({\n\t\ttype: \"rune_etch\",\n\t\t...f,\n\t}),\n\truneMint: (f: TriggerArgs<\"rune_mint\"> = {}): ChainTrigger => ({\n\t\ttype: \"rune_mint\",\n\t\t...f,\n\t}),\n\truneTransfer: (f: TriggerArgs<\"rune_transfer\"> = {}): ChainTrigger => ({\n\t\ttype: \"rune_transfer\",\n\t\t...f,\n\t}),\n\truneBurn: (f: TriggerArgs<\"rune_burn\"> = {}): ChainTrigger => ({\n\t\ttype: \"rune_burn\",\n\t\t...f,\n\t}),\n} as const;\n\n/** The body for creating a webhook: name, triggers, URL, delivery options. */\nexport interface CreateWebhookRequest {\n\tname: string;\n\ttriggers: ChainTrigger[];\n\turl: string;\n\tformat?: WebhookFormat;\n\tauthConfig?: Record<string, unknown>;\n\tmaxRetries?: number;\n\ttimeoutMs?: number;\n\tconcurrency?: number;\n}\n\nexport interface ParsedCreateWebhookRequest\n\textends Omit<CreateWebhookRequest, \"format\"> {\n\tformat: WebhookFormat;\n}\n\n/** The fields of a webhook you can change. */\nexport interface UpdateWebhookRequest {\n\tname?: string;\n\turl?: string;\n\tformat?: WebhookFormat;\n\tauthConfig?: Record<string, unknown>;\n\tmaxRetries?: number;\n\ttimeoutMs?: number;\n\tconcurrency?: number;\n}\n\nexport type ParsedUpdateWebhookRequest = UpdateWebhookRequest;\n\nexport interface ReplayWebhookRequest {\n\tfromBlock: number;\n\ttoBlock: number;\n\tforce?: string;\n}\n\nexport type ParsedReplayWebhookRequest = ReplayWebhookRequest;\n\n/** A webhook's name, status, format, and URL. */\nexport interface WebhookSummary {\n\tid: string;\n\tname: string;\n\tstatus: WebhookStatus;\n\tkind: WebhookKind;\n\tformat: WebhookFormat;\n\turl: string;\n\tlastDeliveryAt: string | null;\n\tlastSuccessAt: string | null;\n\t/** When the circuit breaker paused this webhook (20 straight failures);\n\t * cleared on resume. Present on the list summary (not detail-only) so a\n\t * numbers-only insight can be shown per row without a per-row fetch. */\n\tcircuitOpenedAt: string | null;\n\t/** Consecutive failed deliveries (reset to 0 on a success). On the\n\t * summary so the list can show a failing receiver per row without a\n\t * per-row fetch. */\n\tcircuitFailures: number;\n\t/** Owning product, derived from the name prefix (`MANAGED_NAME_PREFIXES`).\n\t * When non-null the API refuses to rename the webhook. */\n\tmanagedBy: string | null;\n\tcreatedAt: string;\n\tupdatedAt: string;\n}\n\n/** What a webhook's receiver credentials look like once redacted for a\n * response — never the bearer token, basic-auth string, or header values\n * themselves, only enough to show what's set. `authConfig` on create/update\n * is unaffected (write-only: the API still accepts it, just never echoes\n * it back). */\nexport interface WebhookAuth {\n\ttype: \"bearer\" | \"basic\" | \"none\";\n\t/** Keys of any extra headers the receiver expects — never their values. */\n\theaderNames: string[];\n\t/** True when a bearer token or basic-auth string is set, whatever it is. */\n\thasSecret: boolean;\n}\n\n/** A webhook with its triggers, auth, retry, and timeout settings. */\nexport interface WebhookDetail extends WebhookSummary {\n\t/** Chain-trigger filters. */\n\ttriggers: ChainTrigger[];\n\tauth: WebhookAuth;\n\tmaxRetries: number;\n\ttimeoutMs: number;\n\tconcurrency: number;\n\tlastError: string | null;\n\t/** When the receiver's TLS certificate expires, from the periodic probe.\n\t * Null for http receivers, refused or unreachable hosts, and webhooks not\n\t * probed yet. */\n\treceiverCertExpiresAt: string | null;\n\t/** Set when this instance's chain-trigger\n\t * evaluator isn't running (`SUBGRAPH_SOURCE` != `streams-index`) — the\n\t * webhook will never fire until that's fixed. Null otherwise. Surfaced\n\t * on create (so it's seen immediately) and on every read (so `secondlayer\n\t * webhooks doctor` reports it for a webhook created before the mismatch,\n\t * or on an instance whose config changed since). */\n\twarning: string | null;\n}\n\n/** The new webhook and its signing secret, shown once. */\nexport interface CreateWebhookResponse {\n\twebhook: WebhookDetail;\n\t/** Plaintext signing secret — surfaced ONCE. Store it server-side. */\n\tsigningSecret: string;\n}\n\n/** The webhook and its new signing secret. */\nexport interface RotateSecretResponse {\n\twebhook: WebhookDetail;\n\tsigningSecret: string;\n}\n\n/** One delivery attempt: status code, error, duration, and response. */\nexport interface DeliveryRow {\n\tid: string;\n\tattempt: number;\n\tstatusCode: number | null;\n\terrorMessage: string | null;\n\tdurationMs: number | null;\n\tresponseBody: string | null;\n\tdispatchedAt: string;\n\t/** Null for test deliveries and events already compacted out of the\n\t * outbox. */\n\tblockHeight: number | null;\n\t/** ISO timestamp of the delivered event's block. `null` for test\n\t * deliveries, events already compacted out of the outbox, and rows\n\t * written before this column existed. */\n\tblockTime: string | null;\n\t/** Null for test deliveries and events already compacted out of the\n\t * outbox. */\n\ttxId: string | null;\n\t/** The row's position within its block/tx, from the outbox's `row_pk`.\n\t * Null for test deliveries, compacted rows, and rows with neither shape\n\t * (a settlement or reorg outbox row). */\n\teventIndex: number | null;\n}\n\n/** One hour of `webhook_outbox` activity (`GET /:id/activity`), zero-filled\n * so the events chart always has 168 bars. */\nexport interface WebhookActivityHour {\n\t/** ISO timestamp, UTC hour start. */\n\thour: string;\n\tdelivered: number;\n\twaiting: number;\n\tgaveUp: number;\n\t/** Failed attempts in the hour (no response or non-2xx), from\n\t * `webhook_deliveries`. Attempts, not events: a retried-then-delivered\n\t * event counts here but is `delivered` above. */\n\tfailed: number;\n}\n\n/** A week of hourly delivery counts and what is waiting now. */\nexport interface WebhookActivity {\n\t/** 168 hours, oldest first. */\n\thours: WebhookActivityHour[];\n\t/** Pending rows right now, no time bound. */\n\twaiting: number;\n\tnextAttemptAt: string | null;\n\tlastSuccessAt: string | null;\n\t/** 7-day counts per `event_type` (same 168-hour window as `hours`), e.g.\n\t * `chain.stx_transfer.apply` — the config card's per-trigger volume. */\n\tbyEventType: Record<string, number>;\n\t/** Typical delivered attempts for each UTC hour of day (p10 and p90 of the\n\t * last 28 days, from `webhook_deliveries`). Null at low volume, where\n\t * \"usual\" is not meaningful. */\n\tusualByHourOfDay: Array<{ lo: number; hi: number }> | null;\n\t/** Present with `?days=30`: 30 UTC days, oldest first, from\n\t * `webhook_deliveries` (2xx is delivered, everything else failed). */\n\tdays?: WebhookActivityDay[];\n}\n\n/** One UTC day of delivery attempts (`GET /:id/activity?days=30`). */\nexport interface WebhookActivityDay {\n\t/** YYYY-MM-DD, UTC. */\n\tday: string;\n\tdelivered: number;\n\tfailed: number;\n}\n\n/** Heat data for every webhook on the account (`GET /api/webhooks/activity`),\n * from `webhook_deliveries` attempts. */\nexport interface WebhooksActivitySummary {\n\t/** 168 ISO UTC hour starts, oldest first. */\n\thours: string[];\n\t/** Arrays are aligned to `hours` and zero-filled. */\n\twebhooks: Array<{ id: string; delivered: number[]; failed: number[] }>;\n}\n\n/**\n * One delivery attempt with its outbox context.\n *\n * Serves the delivery card (`GET /:id/deliveries/:deliveryId`). `payload`,\n * `outboxId`, `eventType`, `txId`, `blockHeight`, `blockTime`, and `eventIndex`\n * are null once the outbox row is gone (compacted after 7 days) or for a test\n * delivery, which never had one.\n */\nexport interface WebhookDeliveryDetail {\n\tid: string;\n\tattempt: number;\n\tstatusCode: number | null;\n\tdurationMs: number | null;\n\tdispatchedAt: string;\n\terrorMessage: string | null;\n\tresponseBody: string | null;\n\tresponseHeaders: Record<string, string> | null;\n\toutboxId: string | null;\n\t/** The outbox row's own status — `null` once it's gone (compacted after\n\t * delivery, or never had one, e.g. a test delivery). Only `\"dead\"` means\n\t * a resend is possible: it's the one status `POST /:id/dead/:outboxId/\n\t * requeue` accepts. */\n\toutboxStatus: \"pending\" | \"delivered\" | \"dead\" | null;\n\teventType: string | null;\n\ttxId: string | null;\n\tblockHeight: number | null;\n\tblockTime: string | null;\n\t/** The row's position within its block/tx, from the outbox's `row_pk`\n\t * (`event_index` for a chain-trigger row). Null when `row_pk` carries\n\t * none — a settlement or reorg outbox row, or no outbox row at all. */\n\teventIndex: number | null;\n\tpayload: unknown | null;\n}\n\n/** How many events a replay scanned and enqueued. */\nexport interface ReplayResult {\n\treplayId: string;\n\tenqueuedCount: number;\n\tscannedCount: number;\n}\n\n/** Result of a one-off test delivery (`POST /:id/test`). Logged as a delivery\n * row (with a null outbox_id) so it shows up under the webhook's deliveries. */\nexport interface WebhookTestResult {\n\tok: boolean;\n\tstatusCode: number | null;\n\terror: string | null;\n\tdurationMs: number;\n\tdeliveryId: string;\n}\n\n/** A delivery that ran out of retries. */\nexport interface DeadRow {\n\tid: string;\n\teventType: string;\n\tattempt: number;\n\tblockHeight: number;\n\ttxId: string | null;\n\tpayload: Record<string, unknown>;\n\tfailedAt: string | null;\n\tcreatedAt: string;\n}\n\nfunction formatIssuePath(path: PropertyKey[]): string {\n\treturn path.length > 0 ? `${path.map(String).join(\".\")}: ` : \"\";\n}\n\nexport function formatWebhookSchemaErrors(error: z.ZodError): string[] {\n\treturn error.issues.map(\n\t\t(issue) => `${formatIssuePath(issue.path)}${issue.message}`,\n\t);\n}\n"
|
|
7
8
|
],
|
|
8
|
-
"mappings": ";AAAA;AAmBO,IAAM,8BACZ,EAAE,OAAO;AAAA,EACR,MAAM,EACJ,OAAO,EACP,MAAM,gBAAgB,uCAAuC,EAC7D,IAAI,EAAE;AAAA,EACR,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,SAAS,EACP,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,EACpD,OACA,CAAC,MAAM,OAAO,KAAK,CAAC,EAAE,SAAS,GAC/B,+BACD;AAAA,EACD,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AAAA,EACxC,aAAa,EAAE,OAAO,EAAE,IAAI,SAAW,gCAAgC;AAAA,EACvE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS;AAAA,EACpD,YAAY,EACV,OAAO,EACP,IAAI,SAAW,+BAA+B,EAC9C,SAAS;AAAA,EACX,QAAQ,EAAE,QAAQ,EAAE,SAAS;AAC9B,CAAC;AAwDK,IAAM,wBAAwB;AAI9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