@hasna/todos 0.11.75 → 0.11.81
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/README.md +8 -0
- package/dist/cli/cloud-router.d.ts +71 -0
- package/dist/cli/cloud-router.d.ts.map +1 -0
- package/dist/cli/commands/project-commands.d.ts.map +1 -1
- package/dist/cli/commands/storage-commands.d.ts.map +1 -1
- package/dist/cli/commands/task-commands.d.ts.map +1 -1
- package/dist/cli/helpers.d.ts +22 -0
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.js +72374 -62374
- package/dist/contracts.js +314 -14
- package/dist/db/database.d.ts.map +1 -1
- package/dist/index.js +1158 -236
- package/dist/lib/shadow-status.d.ts +38 -0
- package/dist/lib/shadow-status.d.ts.map +1 -0
- package/dist/mcp/index.js +10249 -340
- package/dist/mcp/tools/task-adv-tools.d.ts.map +1 -1
- package/dist/mcp/tools/task-crud.d.ts.map +1 -1
- package/dist/mcp/tools/task-project-tools.d.ts.map +1 -1
- package/dist/mcp/tools/task-workflow-tools.d.ts.map +1 -1
- package/dist/registry.js +314 -14
- package/dist/release-provenance.json +3 -3
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +135 -0
- package/dist/sdk/v1.generated.d.ts +124 -0
- package/dist/sdk/v1.generated.d.ts.map +1 -0
- package/dist/server/cloud.d.ts +50 -0
- package/dist/server/cloud.d.ts.map +1 -0
- package/dist/server/index.js +11944 -2012
- package/dist/server/openapi.d.ts +628 -0
- package/dist/server/openapi.d.ts.map +1 -0
- package/dist/server/serve.d.ts.map +1 -1
- package/dist/server/v1.d.ts +19 -0
- package/dist/server/v1.d.ts.map +1 -0
- package/dist/storage/cloud-client.d.ts +30 -0
- package/dist/storage/cloud-client.d.ts.map +1 -0
- package/dist/storage/config.d.ts +12 -0
- package/dist/storage/config.d.ts.map +1 -1
- package/dist/storage/factory.d.ts +2 -0
- package/dist/storage/factory.d.ts.map +1 -1
- package/dist/storage/index.d.ts +8 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/postgres-adapter.d.ts.map +1 -1
- package/dist/storage/postgres-sync.d.ts.map +1 -1
- package/dist/storage/shadow-outbox-schema.d.ts +21 -0
- package/dist/storage/shadow-outbox-schema.d.ts.map +1 -0
- package/dist/storage/shadow-outbox.d.ts +125 -0
- package/dist/storage/shadow-outbox.d.ts.map +1 -0
- package/dist/storage/shadow-runtime.d.ts +29 -0
- package/dist/storage/shadow-runtime.d.ts.map +1 -0
- package/dist/storage/shadow.d.ts +118 -0
- package/dist/storage/shadow.d.ts.map +1 -0
- package/dist/storage.d.ts +2 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1157 -220
- package/package.json +6 -2
- package/vendor/hasna-contracts-0.5.1.tgz +0 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
export declare function buildV1OpenApiDocument(version?: string): {
|
|
2
|
+
openapi: string;
|
|
3
|
+
info: {
|
|
4
|
+
title: string;
|
|
5
|
+
version: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
servers: {
|
|
9
|
+
url: string;
|
|
10
|
+
}[];
|
|
11
|
+
components: {
|
|
12
|
+
securitySchemes: {
|
|
13
|
+
apiKey: {
|
|
14
|
+
type: string;
|
|
15
|
+
in: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
schemas: {
|
|
20
|
+
Task: {
|
|
21
|
+
readonly type: "object";
|
|
22
|
+
readonly properties: {
|
|
23
|
+
readonly id: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
};
|
|
26
|
+
readonly title: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
};
|
|
29
|
+
readonly description: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
};
|
|
32
|
+
readonly status: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
};
|
|
35
|
+
readonly priority: {
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
};
|
|
38
|
+
readonly project_id: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly nullable: true;
|
|
41
|
+
};
|
|
42
|
+
readonly assigned_to: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly nullable: true;
|
|
45
|
+
};
|
|
46
|
+
readonly agent_id: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly nullable: true;
|
|
49
|
+
};
|
|
50
|
+
readonly tags: {
|
|
51
|
+
readonly type: "array";
|
|
52
|
+
readonly items: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly version: {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
};
|
|
59
|
+
readonly created_at: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
};
|
|
62
|
+
readonly updated_at: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
Project: {
|
|
68
|
+
readonly type: "object";
|
|
69
|
+
readonly properties: {
|
|
70
|
+
readonly id: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
};
|
|
73
|
+
readonly name: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
};
|
|
76
|
+
readonly path: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
};
|
|
79
|
+
readonly description: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly nullable: true;
|
|
82
|
+
};
|
|
83
|
+
readonly created_at: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
};
|
|
86
|
+
readonly updated_at: {
|
|
87
|
+
readonly type: "string";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
CreateTaskInput: {
|
|
92
|
+
type: string;
|
|
93
|
+
required: string[];
|
|
94
|
+
properties: {
|
|
95
|
+
title: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
description: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
status: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
priority: {
|
|
105
|
+
type: string;
|
|
106
|
+
};
|
|
107
|
+
project_id: {
|
|
108
|
+
type: string;
|
|
109
|
+
};
|
|
110
|
+
assigned_to: {
|
|
111
|
+
type: string;
|
|
112
|
+
};
|
|
113
|
+
agent_id: {
|
|
114
|
+
type: string;
|
|
115
|
+
};
|
|
116
|
+
tags: {
|
|
117
|
+
type: string;
|
|
118
|
+
items: {
|
|
119
|
+
type: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
UpdateTaskInput: {
|
|
125
|
+
type: string;
|
|
126
|
+
properties: {
|
|
127
|
+
title: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
description: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
status: {
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
priority: {
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
assigned_to: {
|
|
140
|
+
type: string;
|
|
141
|
+
};
|
|
142
|
+
version: {
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
CreateProjectInput: {
|
|
148
|
+
type: string;
|
|
149
|
+
required: string[];
|
|
150
|
+
properties: {
|
|
151
|
+
name: {
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
path: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
description: {
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
task_prefix: {
|
|
161
|
+
type: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
security: {
|
|
168
|
+
apiKey: never[];
|
|
169
|
+
}[];
|
|
170
|
+
paths: {
|
|
171
|
+
"/v1/tasks": {
|
|
172
|
+
get: {
|
|
173
|
+
operationId: string;
|
|
174
|
+
summary: string;
|
|
175
|
+
parameters: {
|
|
176
|
+
name: string;
|
|
177
|
+
in: string;
|
|
178
|
+
schema: {
|
|
179
|
+
type: string;
|
|
180
|
+
};
|
|
181
|
+
}[];
|
|
182
|
+
responses: {
|
|
183
|
+
"200": {
|
|
184
|
+
content: {
|
|
185
|
+
"application/json": {
|
|
186
|
+
schema: {
|
|
187
|
+
type: string;
|
|
188
|
+
properties: {
|
|
189
|
+
tasks: {
|
|
190
|
+
type: string;
|
|
191
|
+
items: {
|
|
192
|
+
$ref: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
count: {
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
post: {
|
|
206
|
+
operationId: string;
|
|
207
|
+
summary: string;
|
|
208
|
+
requestBody: {
|
|
209
|
+
required: boolean;
|
|
210
|
+
content: {
|
|
211
|
+
"application/json": {
|
|
212
|
+
schema: {
|
|
213
|
+
$ref: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
responses: {
|
|
219
|
+
"201": {
|
|
220
|
+
content: {
|
|
221
|
+
"application/json": {
|
|
222
|
+
schema: {
|
|
223
|
+
type: string;
|
|
224
|
+
properties: {
|
|
225
|
+
task: {
|
|
226
|
+
$ref: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
"/v1/tasks/{id}": {
|
|
237
|
+
get: {
|
|
238
|
+
operationId: string;
|
|
239
|
+
summary: string;
|
|
240
|
+
parameters: {
|
|
241
|
+
name: string;
|
|
242
|
+
in: string;
|
|
243
|
+
required: boolean;
|
|
244
|
+
schema: {
|
|
245
|
+
type: string;
|
|
246
|
+
};
|
|
247
|
+
}[];
|
|
248
|
+
responses: {
|
|
249
|
+
"200": {
|
|
250
|
+
content: {
|
|
251
|
+
"application/json": {
|
|
252
|
+
schema: {
|
|
253
|
+
type: string;
|
|
254
|
+
properties: {
|
|
255
|
+
task: {
|
|
256
|
+
$ref: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
patch: {
|
|
266
|
+
operationId: string;
|
|
267
|
+
summary: string;
|
|
268
|
+
parameters: {
|
|
269
|
+
name: string;
|
|
270
|
+
in: string;
|
|
271
|
+
required: boolean;
|
|
272
|
+
schema: {
|
|
273
|
+
type: string;
|
|
274
|
+
};
|
|
275
|
+
}[];
|
|
276
|
+
requestBody: {
|
|
277
|
+
required: boolean;
|
|
278
|
+
content: {
|
|
279
|
+
"application/json": {
|
|
280
|
+
schema: {
|
|
281
|
+
$ref: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
responses: {
|
|
287
|
+
"200": {
|
|
288
|
+
content: {
|
|
289
|
+
"application/json": {
|
|
290
|
+
schema: {
|
|
291
|
+
type: string;
|
|
292
|
+
properties: {
|
|
293
|
+
task: {
|
|
294
|
+
$ref: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
delete: {
|
|
304
|
+
operationId: string;
|
|
305
|
+
summary: string;
|
|
306
|
+
parameters: {
|
|
307
|
+
name: string;
|
|
308
|
+
in: string;
|
|
309
|
+
required: boolean;
|
|
310
|
+
schema: {
|
|
311
|
+
type: string;
|
|
312
|
+
};
|
|
313
|
+
}[];
|
|
314
|
+
responses: {
|
|
315
|
+
"200": {
|
|
316
|
+
content: {
|
|
317
|
+
"application/json": {
|
|
318
|
+
schema: {
|
|
319
|
+
type: string;
|
|
320
|
+
properties: {
|
|
321
|
+
deleted: {
|
|
322
|
+
type: string;
|
|
323
|
+
};
|
|
324
|
+
id: {
|
|
325
|
+
type: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
"/v1/tasks/{id}/start": {
|
|
336
|
+
post: {
|
|
337
|
+
operationId: string;
|
|
338
|
+
summary: string;
|
|
339
|
+
parameters: {
|
|
340
|
+
name: string;
|
|
341
|
+
in: string;
|
|
342
|
+
required: boolean;
|
|
343
|
+
schema: {
|
|
344
|
+
type: string;
|
|
345
|
+
};
|
|
346
|
+
}[];
|
|
347
|
+
responses: {
|
|
348
|
+
"200": {
|
|
349
|
+
content: {
|
|
350
|
+
"application/json": {
|
|
351
|
+
schema: {
|
|
352
|
+
type: string;
|
|
353
|
+
properties: {
|
|
354
|
+
task: {
|
|
355
|
+
$ref: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
"/v1/tasks/{id}/complete": {
|
|
366
|
+
post: {
|
|
367
|
+
operationId: string;
|
|
368
|
+
summary: string;
|
|
369
|
+
parameters: {
|
|
370
|
+
name: string;
|
|
371
|
+
in: string;
|
|
372
|
+
required: boolean;
|
|
373
|
+
schema: {
|
|
374
|
+
type: string;
|
|
375
|
+
};
|
|
376
|
+
}[];
|
|
377
|
+
responses: {
|
|
378
|
+
"200": {
|
|
379
|
+
content: {
|
|
380
|
+
"application/json": {
|
|
381
|
+
schema: {
|
|
382
|
+
type: string;
|
|
383
|
+
properties: {
|
|
384
|
+
task: {
|
|
385
|
+
$ref: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
"/v1/projects": {
|
|
396
|
+
get: {
|
|
397
|
+
operationId: string;
|
|
398
|
+
summary: string;
|
|
399
|
+
responses: {
|
|
400
|
+
"200": {
|
|
401
|
+
content: {
|
|
402
|
+
"application/json": {
|
|
403
|
+
schema: {
|
|
404
|
+
type: string;
|
|
405
|
+
properties: {
|
|
406
|
+
projects: {
|
|
407
|
+
type: string;
|
|
408
|
+
items: {
|
|
409
|
+
$ref: string;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
count: {
|
|
413
|
+
type: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
post: {
|
|
423
|
+
operationId: string;
|
|
424
|
+
summary: string;
|
|
425
|
+
requestBody: {
|
|
426
|
+
required: boolean;
|
|
427
|
+
content: {
|
|
428
|
+
"application/json": {
|
|
429
|
+
schema: {
|
|
430
|
+
$ref: string;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
responses: {
|
|
436
|
+
"201": {
|
|
437
|
+
content: {
|
|
438
|
+
"application/json": {
|
|
439
|
+
schema: {
|
|
440
|
+
type: string;
|
|
441
|
+
properties: {
|
|
442
|
+
project: {
|
|
443
|
+
$ref: string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
"/v1/projects/{id}": {
|
|
454
|
+
get: {
|
|
455
|
+
operationId: string;
|
|
456
|
+
summary: string;
|
|
457
|
+
parameters: {
|
|
458
|
+
name: string;
|
|
459
|
+
in: string;
|
|
460
|
+
required: boolean;
|
|
461
|
+
schema: {
|
|
462
|
+
type: string;
|
|
463
|
+
};
|
|
464
|
+
}[];
|
|
465
|
+
responses: {
|
|
466
|
+
"200": {
|
|
467
|
+
content: {
|
|
468
|
+
"application/json": {
|
|
469
|
+
schema: {
|
|
470
|
+
type: string;
|
|
471
|
+
properties: {
|
|
472
|
+
project: {
|
|
473
|
+
$ref: string;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
"/v1/stats": {
|
|
484
|
+
get: {
|
|
485
|
+
operationId: string;
|
|
486
|
+
summary: string;
|
|
487
|
+
responses: {
|
|
488
|
+
"200": {
|
|
489
|
+
content: {
|
|
490
|
+
"application/json": {
|
|
491
|
+
schema: {
|
|
492
|
+
type: string;
|
|
493
|
+
properties: {
|
|
494
|
+
tasks: {
|
|
495
|
+
type: string;
|
|
496
|
+
};
|
|
497
|
+
projects: {
|
|
498
|
+
type: string;
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
"/v1/import": {
|
|
509
|
+
post: {
|
|
510
|
+
operationId: string;
|
|
511
|
+
summary: string;
|
|
512
|
+
description: string;
|
|
513
|
+
requestBody: {
|
|
514
|
+
required: boolean;
|
|
515
|
+
content: {
|
|
516
|
+
"application/json": {
|
|
517
|
+
schema: {
|
|
518
|
+
type: string;
|
|
519
|
+
properties: {
|
|
520
|
+
exportedAt: {
|
|
521
|
+
type: string;
|
|
522
|
+
};
|
|
523
|
+
source: {
|
|
524
|
+
type: string;
|
|
525
|
+
};
|
|
526
|
+
tasks: {
|
|
527
|
+
type: string;
|
|
528
|
+
items: {
|
|
529
|
+
$ref: string;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
projects: {
|
|
533
|
+
type: string;
|
|
534
|
+
items: {
|
|
535
|
+
$ref: string;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
projectMachinePaths: {
|
|
539
|
+
type: string;
|
|
540
|
+
items: {
|
|
541
|
+
type: string;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
plans: {
|
|
545
|
+
type: string;
|
|
546
|
+
items: {
|
|
547
|
+
type: string;
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
agents: {
|
|
551
|
+
type: string;
|
|
552
|
+
items: {
|
|
553
|
+
type: string;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
taskLists: {
|
|
557
|
+
type: string;
|
|
558
|
+
items: {
|
|
559
|
+
type: string;
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
templates: {
|
|
563
|
+
type: string;
|
|
564
|
+
items: {
|
|
565
|
+
type: string;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
auditHistory: {
|
|
569
|
+
type: string;
|
|
570
|
+
items: {
|
|
571
|
+
type: string;
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
tombstones: {
|
|
575
|
+
type: string;
|
|
576
|
+
items: {
|
|
577
|
+
type: string;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
responses: {
|
|
586
|
+
"200": {
|
|
587
|
+
content: {
|
|
588
|
+
"application/json": {
|
|
589
|
+
schema: {
|
|
590
|
+
type: string;
|
|
591
|
+
properties: {
|
|
592
|
+
received: {
|
|
593
|
+
type: string;
|
|
594
|
+
};
|
|
595
|
+
result: {
|
|
596
|
+
type: string;
|
|
597
|
+
properties: {
|
|
598
|
+
inserted: {
|
|
599
|
+
type: string;
|
|
600
|
+
};
|
|
601
|
+
updated: {
|
|
602
|
+
type: string;
|
|
603
|
+
};
|
|
604
|
+
deleted: {
|
|
605
|
+
type: string;
|
|
606
|
+
};
|
|
607
|
+
skipped: {
|
|
608
|
+
type: string;
|
|
609
|
+
};
|
|
610
|
+
errors: {
|
|
611
|
+
type: string;
|
|
612
|
+
items: {
|
|
613
|
+
type: string;
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"AAqCA,wBAAgB,sBAAsB,CAAC,OAAO,SAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2QnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AA+B9C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMnD,CAAC;AAwEF,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,SAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CASjF;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAYjE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;EA0B1D;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AA+B9C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMnD,CAAC;AAwEF,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,SAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CASjF;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAYjE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;EA0B1D;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAue3H"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TodosStorageSnapshot } from "../storage/interfaces.js";
|
|
2
|
+
/**
|
|
3
|
+
* Coerce an arbitrary request body into a well-formed {@link TodosStorageSnapshot}.
|
|
4
|
+
*
|
|
5
|
+
* Every record array is optional and defaults to `[]`, so a caller can backfill a
|
|
6
|
+
* single object type (e.g. just `tasks`) or a full snapshot. Non-array values for
|
|
7
|
+
* a record key are treated as empty rather than throwing, keeping partial-chunk
|
|
8
|
+
* ingest robust. The returned snapshot is safe to hand straight to
|
|
9
|
+
* `storage.sync.importSnapshot`, which upserts every row by primary key (idempotent).
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeImportSnapshot(raw: unknown): TodosStorageSnapshot;
|
|
12
|
+
/** Total number of records (across every object type) carried by a snapshot. */
|
|
13
|
+
export declare function countSnapshotRecords(s: TodosStorageSnapshot): number;
|
|
14
|
+
/**
|
|
15
|
+
* Handle a `/v1/*` request. Returns `null` when the path is not a `/v1` route so
|
|
16
|
+
* the caller can fall through to other handlers.
|
|
17
|
+
*/
|
|
18
|
+
export declare function handleV1Request(req: Request, url: URL): Promise<Response | null>;
|
|
19
|
+
//# sourceMappingURL=v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AA4B1F;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB,CAgB1E;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAYpE;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuPtF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TodosPostgresQueryClient } from "./postgres-sync.js";
|
|
2
|
+
import { type TodosStorageEnv } from "./config.js";
|
|
3
|
+
/**
|
|
4
|
+
* A live Postgres query client for the shadow mirror and divergence diagnostics.
|
|
5
|
+
*
|
|
6
|
+
* This uses Bun's built-in SQL driver (`Bun.SQL`) so the OSS package keeps ZERO
|
|
7
|
+
* cloud/database runtime dependencies — the driver is only touched when the
|
|
8
|
+
* caller explicitly opens a connection (shadow mode or `storage shadow-status`).
|
|
9
|
+
* SSL/TLS behaviour is taken verbatim from the connection string (e.g.
|
|
10
|
+
* `?sslmode=require`); we never disable certificate verification.
|
|
11
|
+
*/
|
|
12
|
+
export interface TodosCloudQueryClient extends TodosPostgresQueryClient {
|
|
13
|
+
close(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateTodosCloudQueryClientOptions {
|
|
16
|
+
/** Maximum pooled connections. Shadow mirror is low-volume, so keep it tiny. */
|
|
17
|
+
max?: number;
|
|
18
|
+
/** Connection idle timeout in seconds. */
|
|
19
|
+
idleTimeout?: number;
|
|
20
|
+
/** Statement/connection timeout in seconds. */
|
|
21
|
+
connectionTimeout?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function createTodosCloudQueryClient(url: string, options?: CreateTodosCloudQueryClientOptions): TodosCloudQueryClient;
|
|
24
|
+
/**
|
|
25
|
+
* Build a live cloud client from the configured database URL, or return `null`
|
|
26
|
+
* when no remote DSN is present. Never reads from the remote store on its own —
|
|
27
|
+
* callers decide what to run.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createTodosCloudQueryClientFromEnv(env?: TodosStorageEnv, options?: CreateTodosCloudQueryClientOptions): TodosCloudQueryClient | null;
|
|
30
|
+
//# sourceMappingURL=cloud-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-client.d.ts","sourceRoot":"","sources":["../../src/storage/cloud-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAA4B,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/E;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IACrE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA6BD,MAAM,WAAW,kCAAkC;IACjD,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,kCAAuC,GAC/C,qBAAqB,CAqBvB;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,GAAG,GAAE,eAA6B,EAClC,OAAO,GAAE,kCAAuC,GAC/C,qBAAqB,GAAG,IAAI,CAI9B"}
|