@yuchaocheng/yusijia 0.1.0-beta.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.
package/dist/plan.d.ts ADDED
@@ -0,0 +1,782 @@
1
+ import { z } from 'zod';
2
+ export { canonicalJson } from './core.js';
3
+ export declare const refSchema: z.ZodUnion<readonly [z.ZodObject<{
4
+ ref: z.ZodUUID;
5
+ field: z.ZodEnum<{
6
+ id: "id";
7
+ version: "version";
8
+ }>;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ ref: z.ZodUUID;
11
+ field: z.ZodLiteral<"photoId">;
12
+ localCandidateId: z.ZodString;
13
+ }, z.core.$strict>]>;
14
+ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ action: z.ZodLiteral<"albums.create">;
16
+ payload: z.ZodObject<{
17
+ name: z.ZodString;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strict>;
20
+ operationId: z.ZodUUID;
21
+ }, z.core.$strict>, z.ZodObject<{
22
+ action: z.ZodLiteral<"albums.update">;
23
+ payload: z.ZodObject<{
24
+ name: z.ZodOptional<z.ZodString>;
25
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
26
+ }, z.core.$strict>;
27
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
28
+ ref: z.ZodUUID;
29
+ field: z.ZodEnum<{
30
+ id: "id";
31
+ version: "version";
32
+ }>;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ ref: z.ZodUUID;
35
+ field: z.ZodLiteral<"photoId">;
36
+ localCandidateId: z.ZodString;
37
+ }, z.core.$strict>]>]>;
38
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
39
+ ref: z.ZodUUID;
40
+ field: z.ZodEnum<{
41
+ id: "id";
42
+ version: "version";
43
+ }>;
44
+ }, z.core.$strict>, z.ZodObject<{
45
+ ref: z.ZodUUID;
46
+ field: z.ZodLiteral<"photoId">;
47
+ localCandidateId: z.ZodString;
48
+ }, z.core.$strict>]>]>;
49
+ operationId: z.ZodUUID;
50
+ }, z.core.$strict>, z.ZodObject<{
51
+ action: z.ZodLiteral<"albums.photos">;
52
+ payload: z.ZodObject<{
53
+ add: z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
54
+ ref: z.ZodUUID;
55
+ field: z.ZodEnum<{
56
+ id: "id";
57
+ version: "version";
58
+ }>;
59
+ }, z.core.$strict>, z.ZodObject<{
60
+ ref: z.ZodUUID;
61
+ field: z.ZodLiteral<"photoId">;
62
+ localCandidateId: z.ZodString;
63
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
64
+ ref: string;
65
+ field: "id" | "version";
66
+ } | {
67
+ ref: string;
68
+ field: "photoId";
69
+ localCandidateId: string;
70
+ })[], (string | {
71
+ ref: string;
72
+ field: "id" | "version";
73
+ } | {
74
+ ref: string;
75
+ field: "photoId";
76
+ localCandidateId: string;
77
+ })[]>>;
78
+ remove: z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
79
+ ref: z.ZodUUID;
80
+ field: z.ZodEnum<{
81
+ id: "id";
82
+ version: "version";
83
+ }>;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ ref: z.ZodUUID;
86
+ field: z.ZodLiteral<"photoId">;
87
+ localCandidateId: z.ZodString;
88
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
89
+ ref: string;
90
+ field: "id" | "version";
91
+ } | {
92
+ ref: string;
93
+ field: "photoId";
94
+ localCandidateId: string;
95
+ })[], (string | {
96
+ ref: string;
97
+ field: "id" | "version";
98
+ } | {
99
+ ref: string;
100
+ field: "photoId";
101
+ localCandidateId: string;
102
+ })[]>>;
103
+ }, z.core.$strict>;
104
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
105
+ ref: z.ZodUUID;
106
+ field: z.ZodEnum<{
107
+ id: "id";
108
+ version: "version";
109
+ }>;
110
+ }, z.core.$strict>, z.ZodObject<{
111
+ ref: z.ZodUUID;
112
+ field: z.ZodLiteral<"photoId">;
113
+ localCandidateId: z.ZodString;
114
+ }, z.core.$strict>]>]>;
115
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
116
+ ref: z.ZodUUID;
117
+ field: z.ZodEnum<{
118
+ id: "id";
119
+ version: "version";
120
+ }>;
121
+ }, z.core.$strict>, z.ZodObject<{
122
+ ref: z.ZodUUID;
123
+ field: z.ZodLiteral<"photoId">;
124
+ localCandidateId: z.ZodString;
125
+ }, z.core.$strict>]>]>;
126
+ operationId: z.ZodUUID;
127
+ }, z.core.$strict>, z.ZodObject<{
128
+ action: z.ZodLiteral<"timeline.create">;
129
+ payload: z.ZodObject<{
130
+ date: z.ZodString;
131
+ title: z.ZodString;
132
+ description: z.ZodOptional<z.ZodString>;
133
+ photoIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
134
+ ref: z.ZodUUID;
135
+ field: z.ZodEnum<{
136
+ id: "id";
137
+ version: "version";
138
+ }>;
139
+ }, z.core.$strict>, z.ZodObject<{
140
+ ref: z.ZodUUID;
141
+ field: z.ZodLiteral<"photoId">;
142
+ localCandidateId: z.ZodString;
143
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
144
+ ref: string;
145
+ field: "id" | "version";
146
+ } | {
147
+ ref: string;
148
+ field: "photoId";
149
+ localCandidateId: string;
150
+ })[], (string | {
151
+ ref: string;
152
+ field: "id" | "version";
153
+ } | {
154
+ ref: string;
155
+ field: "photoId";
156
+ localCandidateId: string;
157
+ })[]>>>;
158
+ }, z.core.$strict>;
159
+ operationId: z.ZodUUID;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ action: z.ZodLiteral<"timeline.update">;
162
+ payload: z.ZodObject<{
163
+ date: z.ZodOptional<z.ZodString>;
164
+ title: z.ZodOptional<z.ZodString>;
165
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
166
+ photoIds: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
167
+ ref: z.ZodUUID;
168
+ field: z.ZodEnum<{
169
+ id: "id";
170
+ version: "version";
171
+ }>;
172
+ }, z.core.$strict>, z.ZodObject<{
173
+ ref: z.ZodUUID;
174
+ field: z.ZodLiteral<"photoId">;
175
+ localCandidateId: z.ZodString;
176
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
177
+ ref: string;
178
+ field: "id" | "version";
179
+ } | {
180
+ ref: string;
181
+ field: "photoId";
182
+ localCandidateId: string;
183
+ })[], (string | {
184
+ ref: string;
185
+ field: "id" | "version";
186
+ } | {
187
+ ref: string;
188
+ field: "photoId";
189
+ localCandidateId: string;
190
+ })[]>>>>;
191
+ }, z.core.$strict>;
192
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
193
+ ref: z.ZodUUID;
194
+ field: z.ZodEnum<{
195
+ id: "id";
196
+ version: "version";
197
+ }>;
198
+ }, z.core.$strict>, z.ZodObject<{
199
+ ref: z.ZodUUID;
200
+ field: z.ZodLiteral<"photoId">;
201
+ localCandidateId: z.ZodString;
202
+ }, z.core.$strict>]>]>;
203
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
204
+ ref: z.ZodUUID;
205
+ field: z.ZodEnum<{
206
+ id: "id";
207
+ version: "version";
208
+ }>;
209
+ }, z.core.$strict>, z.ZodObject<{
210
+ ref: z.ZodUUID;
211
+ field: z.ZodLiteral<"photoId">;
212
+ localCandidateId: z.ZodString;
213
+ }, z.core.$strict>]>]>;
214
+ operationId: z.ZodUUID;
215
+ }, z.core.$strict>, z.ZodObject<{
216
+ action: z.ZodLiteral<"diary.create">;
217
+ payload: z.ZodObject<{
218
+ blocks: z.ZodArray<z.ZodObject<{
219
+ id: z.ZodOptional<z.ZodString>;
220
+ type: z.ZodEnum<{
221
+ paragraph: "paragraph";
222
+ heading: "heading";
223
+ bulletListItem: "bulletListItem";
224
+ numberedListItem: "numberedListItem";
225
+ }>;
226
+ text: z.ZodString;
227
+ level: z.ZodOptional<z.ZodNumber>;
228
+ }, z.core.$strict>>;
229
+ status: z.ZodDefault<z.ZodEnum<{
230
+ DRAFT: "DRAFT";
231
+ PUBLISHED: "PUBLISHED";
232
+ }>>;
233
+ }, z.core.$strict>;
234
+ operationId: z.ZodUUID;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ action: z.ZodLiteral<"diary.edit">;
237
+ payload: z.ZodObject<{
238
+ edits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
239
+ type: z.ZodLiteral<"replaceText">;
240
+ blockId: z.ZodString;
241
+ text: z.ZodString;
242
+ }, z.core.$strict>, z.ZodObject<{
243
+ type: z.ZodLiteral<"append">;
244
+ blocks: z.ZodArray<z.ZodObject<{
245
+ id: z.ZodOptional<z.ZodString>;
246
+ type: z.ZodEnum<{
247
+ paragraph: "paragraph";
248
+ heading: "heading";
249
+ bulletListItem: "bulletListItem";
250
+ numberedListItem: "numberedListItem";
251
+ }>;
252
+ text: z.ZodString;
253
+ level: z.ZodOptional<z.ZodNumber>;
254
+ }, z.core.$strict>>;
255
+ }, z.core.$strict>], "type">>>;
256
+ status: z.ZodOptional<z.ZodEnum<{
257
+ DRAFT: "DRAFT";
258
+ PUBLISHED: "PUBLISHED";
259
+ }>>;
260
+ }, z.core.$strict>;
261
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
262
+ ref: z.ZodUUID;
263
+ field: z.ZodEnum<{
264
+ id: "id";
265
+ version: "version";
266
+ }>;
267
+ }, z.core.$strict>, z.ZodObject<{
268
+ ref: z.ZodUUID;
269
+ field: z.ZodLiteral<"photoId">;
270
+ localCandidateId: z.ZodString;
271
+ }, z.core.$strict>]>]>;
272
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
273
+ ref: z.ZodUUID;
274
+ field: z.ZodEnum<{
275
+ id: "id";
276
+ version: "version";
277
+ }>;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ ref: z.ZodUUID;
280
+ field: z.ZodLiteral<"photoId">;
281
+ localCandidateId: z.ZodString;
282
+ }, z.core.$strict>]>]>;
283
+ operationId: z.ZodUUID;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ action: z.ZodLiteral<"diary.publish">;
286
+ payload: z.ZodObject<{
287
+ status: z.ZodLiteral<"PUBLISHED">;
288
+ }, z.core.$strict>;
289
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
290
+ ref: z.ZodUUID;
291
+ field: z.ZodEnum<{
292
+ id: "id";
293
+ version: "version";
294
+ }>;
295
+ }, z.core.$strict>, z.ZodObject<{
296
+ ref: z.ZodUUID;
297
+ field: z.ZodLiteral<"photoId">;
298
+ localCandidateId: z.ZodString;
299
+ }, z.core.$strict>]>]>;
300
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
301
+ ref: z.ZodUUID;
302
+ field: z.ZodEnum<{
303
+ id: "id";
304
+ version: "version";
305
+ }>;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ ref: z.ZodUUID;
308
+ field: z.ZodLiteral<"photoId">;
309
+ localCandidateId: z.ZodString;
310
+ }, z.core.$strict>]>]>;
311
+ operationId: z.ZodUUID;
312
+ }, z.core.$strict>, z.ZodObject<{
313
+ action: z.ZodLiteral<"photos.import">;
314
+ payload: z.ZodObject<{
315
+ manifest: z.ZodObject<{
316
+ schemaVersion: z.ZodLiteral<1>;
317
+ sourceType: z.ZodEnum<{
318
+ DIRECTORY: "DIRECTORY";
319
+ ZIP: "ZIP";
320
+ }>;
321
+ sourceLabel: z.ZodOptional<z.ZodString>;
322
+ candidates: z.ZodArray<z.ZodObject<{
323
+ localCandidateId: z.ZodString;
324
+ contentHash: z.ZodString;
325
+ relativePathHash: z.ZodString;
326
+ originalName: z.ZodString;
327
+ mimeType: z.ZodEnum<{
328
+ "image/jpeg": "image/jpeg";
329
+ "image/png": "image/png";
330
+ "image/webp": "image/webp";
331
+ }>;
332
+ fileSize: z.ZodNumber;
333
+ status: z.ZodEnum<{
334
+ SELECTED: "SELECTED";
335
+ ALTERNATE: "ALTERNATE";
336
+ EXCLUDED: "EXCLUDED";
337
+ NEEDS_REVIEW: "NEEDS_REVIEW";
338
+ }>;
339
+ takenAt: z.ZodOptional<z.ZodISODateTime>;
340
+ gpsLatitude: z.ZodOptional<z.ZodNumber>;
341
+ gpsLongitude: z.ZodOptional<z.ZodNumber>;
342
+ width: z.ZodOptional<z.ZodNumber>;
343
+ height: z.ZodOptional<z.ZodNumber>;
344
+ deviceModel: z.ZodOptional<z.ZodString>;
345
+ groupKey: z.ZodOptional<z.ZodString>;
346
+ perceptualHash: z.ZodOptional<z.ZodString>;
347
+ recommendationScore: z.ZodOptional<z.ZodNumber>;
348
+ recommendationReason: z.ZodOptional<z.ZodString>;
349
+ exclusionReason: z.ZodOptional<z.ZodString>;
350
+ }, z.core.$strict>>;
351
+ }, z.core.$strict>;
352
+ }, z.core.$strict>;
353
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
354
+ expectations: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
355
+ mode: z.ZodLiteral<"create">;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ mode: z.ZodLiteral<"reuse">;
358
+ photoId: z.ZodString;
359
+ version: z.ZodISODateTime;
360
+ }, z.core.$strict>]>>;
361
+ operationId: z.ZodUUID;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ action: z.ZodLiteral<"photos.cancel">;
364
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
365
+ ref: z.ZodUUID;
366
+ field: z.ZodEnum<{
367
+ id: "id";
368
+ version: "version";
369
+ }>;
370
+ }, z.core.$strict>, z.ZodObject<{
371
+ ref: z.ZodUUID;
372
+ field: z.ZodLiteral<"photoId">;
373
+ localCandidateId: z.ZodString;
374
+ }, z.core.$strict>]>]>;
375
+ payload: z.ZodObject<{}, z.core.$strict>;
376
+ operationId: z.ZodUUID;
377
+ }, z.core.$strict>], "action">;
378
+ export type Action = z.infer<typeof actionSchema>;
379
+ export declare const planSchema: z.ZodObject<{
380
+ schemaVersion: z.ZodLiteral<1>;
381
+ origin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
382
+ userId: z.ZodString;
383
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
384
+ action: z.ZodLiteral<"albums.create">;
385
+ payload: z.ZodObject<{
386
+ name: z.ZodString;
387
+ description: z.ZodOptional<z.ZodString>;
388
+ }, z.core.$strict>;
389
+ operationId: z.ZodUUID;
390
+ }, z.core.$strict>, z.ZodObject<{
391
+ action: z.ZodLiteral<"albums.update">;
392
+ payload: z.ZodObject<{
393
+ name: z.ZodOptional<z.ZodString>;
394
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
395
+ }, z.core.$strict>;
396
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
397
+ ref: z.ZodUUID;
398
+ field: z.ZodEnum<{
399
+ id: "id";
400
+ version: "version";
401
+ }>;
402
+ }, z.core.$strict>, z.ZodObject<{
403
+ ref: z.ZodUUID;
404
+ field: z.ZodLiteral<"photoId">;
405
+ localCandidateId: z.ZodString;
406
+ }, z.core.$strict>]>]>;
407
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
408
+ ref: z.ZodUUID;
409
+ field: z.ZodEnum<{
410
+ id: "id";
411
+ version: "version";
412
+ }>;
413
+ }, z.core.$strict>, z.ZodObject<{
414
+ ref: z.ZodUUID;
415
+ field: z.ZodLiteral<"photoId">;
416
+ localCandidateId: z.ZodString;
417
+ }, z.core.$strict>]>]>;
418
+ operationId: z.ZodUUID;
419
+ }, z.core.$strict>, z.ZodObject<{
420
+ action: z.ZodLiteral<"albums.photos">;
421
+ payload: z.ZodObject<{
422
+ add: z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
423
+ ref: z.ZodUUID;
424
+ field: z.ZodEnum<{
425
+ id: "id";
426
+ version: "version";
427
+ }>;
428
+ }, z.core.$strict>, z.ZodObject<{
429
+ ref: z.ZodUUID;
430
+ field: z.ZodLiteral<"photoId">;
431
+ localCandidateId: z.ZodString;
432
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
433
+ ref: string;
434
+ field: "id" | "version";
435
+ } | {
436
+ ref: string;
437
+ field: "photoId";
438
+ localCandidateId: string;
439
+ })[], (string | {
440
+ ref: string;
441
+ field: "id" | "version";
442
+ } | {
443
+ ref: string;
444
+ field: "photoId";
445
+ localCandidateId: string;
446
+ })[]>>;
447
+ remove: z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
448
+ ref: z.ZodUUID;
449
+ field: z.ZodEnum<{
450
+ id: "id";
451
+ version: "version";
452
+ }>;
453
+ }, z.core.$strict>, z.ZodObject<{
454
+ ref: z.ZodUUID;
455
+ field: z.ZodLiteral<"photoId">;
456
+ localCandidateId: z.ZodString;
457
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
458
+ ref: string;
459
+ field: "id" | "version";
460
+ } | {
461
+ ref: string;
462
+ field: "photoId";
463
+ localCandidateId: string;
464
+ })[], (string | {
465
+ ref: string;
466
+ field: "id" | "version";
467
+ } | {
468
+ ref: string;
469
+ field: "photoId";
470
+ localCandidateId: string;
471
+ })[]>>;
472
+ }, z.core.$strict>;
473
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
474
+ ref: z.ZodUUID;
475
+ field: z.ZodEnum<{
476
+ id: "id";
477
+ version: "version";
478
+ }>;
479
+ }, z.core.$strict>, z.ZodObject<{
480
+ ref: z.ZodUUID;
481
+ field: z.ZodLiteral<"photoId">;
482
+ localCandidateId: z.ZodString;
483
+ }, z.core.$strict>]>]>;
484
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
485
+ ref: z.ZodUUID;
486
+ field: z.ZodEnum<{
487
+ id: "id";
488
+ version: "version";
489
+ }>;
490
+ }, z.core.$strict>, z.ZodObject<{
491
+ ref: z.ZodUUID;
492
+ field: z.ZodLiteral<"photoId">;
493
+ localCandidateId: z.ZodString;
494
+ }, z.core.$strict>]>]>;
495
+ operationId: z.ZodUUID;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ action: z.ZodLiteral<"timeline.create">;
498
+ payload: z.ZodObject<{
499
+ date: z.ZodString;
500
+ title: z.ZodString;
501
+ description: z.ZodOptional<z.ZodString>;
502
+ photoIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
503
+ ref: z.ZodUUID;
504
+ field: z.ZodEnum<{
505
+ id: "id";
506
+ version: "version";
507
+ }>;
508
+ }, z.core.$strict>, z.ZodObject<{
509
+ ref: z.ZodUUID;
510
+ field: z.ZodLiteral<"photoId">;
511
+ localCandidateId: z.ZodString;
512
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
513
+ ref: string;
514
+ field: "id" | "version";
515
+ } | {
516
+ ref: string;
517
+ field: "photoId";
518
+ localCandidateId: string;
519
+ })[], (string | {
520
+ ref: string;
521
+ field: "id" | "version";
522
+ } | {
523
+ ref: string;
524
+ field: "photoId";
525
+ localCandidateId: string;
526
+ })[]>>>;
527
+ }, z.core.$strict>;
528
+ operationId: z.ZodUUID;
529
+ }, z.core.$strict>, z.ZodObject<{
530
+ action: z.ZodLiteral<"timeline.update">;
531
+ payload: z.ZodObject<{
532
+ date: z.ZodOptional<z.ZodString>;
533
+ title: z.ZodOptional<z.ZodString>;
534
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
535
+ photoIds: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
536
+ ref: z.ZodUUID;
537
+ field: z.ZodEnum<{
538
+ id: "id";
539
+ version: "version";
540
+ }>;
541
+ }, z.core.$strict>, z.ZodObject<{
542
+ ref: z.ZodUUID;
543
+ field: z.ZodLiteral<"photoId">;
544
+ localCandidateId: z.ZodString;
545
+ }, z.core.$strict>]>]>>, z.ZodTransform<(string | {
546
+ ref: string;
547
+ field: "id" | "version";
548
+ } | {
549
+ ref: string;
550
+ field: "photoId";
551
+ localCandidateId: string;
552
+ })[], (string | {
553
+ ref: string;
554
+ field: "id" | "version";
555
+ } | {
556
+ ref: string;
557
+ field: "photoId";
558
+ localCandidateId: string;
559
+ })[]>>>>;
560
+ }, z.core.$strict>;
561
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
562
+ ref: z.ZodUUID;
563
+ field: z.ZodEnum<{
564
+ id: "id";
565
+ version: "version";
566
+ }>;
567
+ }, z.core.$strict>, z.ZodObject<{
568
+ ref: z.ZodUUID;
569
+ field: z.ZodLiteral<"photoId">;
570
+ localCandidateId: z.ZodString;
571
+ }, z.core.$strict>]>]>;
572
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
573
+ ref: z.ZodUUID;
574
+ field: z.ZodEnum<{
575
+ id: "id";
576
+ version: "version";
577
+ }>;
578
+ }, z.core.$strict>, z.ZodObject<{
579
+ ref: z.ZodUUID;
580
+ field: z.ZodLiteral<"photoId">;
581
+ localCandidateId: z.ZodString;
582
+ }, z.core.$strict>]>]>;
583
+ operationId: z.ZodUUID;
584
+ }, z.core.$strict>, z.ZodObject<{
585
+ action: z.ZodLiteral<"diary.create">;
586
+ payload: z.ZodObject<{
587
+ blocks: z.ZodArray<z.ZodObject<{
588
+ id: z.ZodOptional<z.ZodString>;
589
+ type: z.ZodEnum<{
590
+ paragraph: "paragraph";
591
+ heading: "heading";
592
+ bulletListItem: "bulletListItem";
593
+ numberedListItem: "numberedListItem";
594
+ }>;
595
+ text: z.ZodString;
596
+ level: z.ZodOptional<z.ZodNumber>;
597
+ }, z.core.$strict>>;
598
+ status: z.ZodDefault<z.ZodEnum<{
599
+ DRAFT: "DRAFT";
600
+ PUBLISHED: "PUBLISHED";
601
+ }>>;
602
+ }, z.core.$strict>;
603
+ operationId: z.ZodUUID;
604
+ }, z.core.$strict>, z.ZodObject<{
605
+ action: z.ZodLiteral<"diary.edit">;
606
+ payload: z.ZodObject<{
607
+ edits: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
608
+ type: z.ZodLiteral<"replaceText">;
609
+ blockId: z.ZodString;
610
+ text: z.ZodString;
611
+ }, z.core.$strict>, z.ZodObject<{
612
+ type: z.ZodLiteral<"append">;
613
+ blocks: z.ZodArray<z.ZodObject<{
614
+ id: z.ZodOptional<z.ZodString>;
615
+ type: z.ZodEnum<{
616
+ paragraph: "paragraph";
617
+ heading: "heading";
618
+ bulletListItem: "bulletListItem";
619
+ numberedListItem: "numberedListItem";
620
+ }>;
621
+ text: z.ZodString;
622
+ level: z.ZodOptional<z.ZodNumber>;
623
+ }, z.core.$strict>>;
624
+ }, z.core.$strict>], "type">>>;
625
+ status: z.ZodOptional<z.ZodEnum<{
626
+ DRAFT: "DRAFT";
627
+ PUBLISHED: "PUBLISHED";
628
+ }>>;
629
+ }, z.core.$strict>;
630
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
631
+ ref: z.ZodUUID;
632
+ field: z.ZodEnum<{
633
+ id: "id";
634
+ version: "version";
635
+ }>;
636
+ }, z.core.$strict>, z.ZodObject<{
637
+ ref: z.ZodUUID;
638
+ field: z.ZodLiteral<"photoId">;
639
+ localCandidateId: z.ZodString;
640
+ }, z.core.$strict>]>]>;
641
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
642
+ ref: z.ZodUUID;
643
+ field: z.ZodEnum<{
644
+ id: "id";
645
+ version: "version";
646
+ }>;
647
+ }, z.core.$strict>, z.ZodObject<{
648
+ ref: z.ZodUUID;
649
+ field: z.ZodLiteral<"photoId">;
650
+ localCandidateId: z.ZodString;
651
+ }, z.core.$strict>]>]>;
652
+ operationId: z.ZodUUID;
653
+ }, z.core.$strict>, z.ZodObject<{
654
+ action: z.ZodLiteral<"diary.publish">;
655
+ payload: z.ZodObject<{
656
+ status: z.ZodLiteral<"PUBLISHED">;
657
+ }, z.core.$strict>;
658
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
659
+ ref: z.ZodUUID;
660
+ field: z.ZodEnum<{
661
+ id: "id";
662
+ version: "version";
663
+ }>;
664
+ }, z.core.$strict>, z.ZodObject<{
665
+ ref: z.ZodUUID;
666
+ field: z.ZodLiteral<"photoId">;
667
+ localCandidateId: z.ZodString;
668
+ }, z.core.$strict>]>]>;
669
+ expectedVersion: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodUnion<readonly [z.ZodObject<{
670
+ ref: z.ZodUUID;
671
+ field: z.ZodEnum<{
672
+ id: "id";
673
+ version: "version";
674
+ }>;
675
+ }, z.core.$strict>, z.ZodObject<{
676
+ ref: z.ZodUUID;
677
+ field: z.ZodLiteral<"photoId">;
678
+ localCandidateId: z.ZodString;
679
+ }, z.core.$strict>]>]>;
680
+ operationId: z.ZodUUID;
681
+ }, z.core.$strict>, z.ZodObject<{
682
+ action: z.ZodLiteral<"photos.import">;
683
+ payload: z.ZodObject<{
684
+ manifest: z.ZodObject<{
685
+ schemaVersion: z.ZodLiteral<1>;
686
+ sourceType: z.ZodEnum<{
687
+ DIRECTORY: "DIRECTORY";
688
+ ZIP: "ZIP";
689
+ }>;
690
+ sourceLabel: z.ZodOptional<z.ZodString>;
691
+ candidates: z.ZodArray<z.ZodObject<{
692
+ localCandidateId: z.ZodString;
693
+ contentHash: z.ZodString;
694
+ relativePathHash: z.ZodString;
695
+ originalName: z.ZodString;
696
+ mimeType: z.ZodEnum<{
697
+ "image/jpeg": "image/jpeg";
698
+ "image/png": "image/png";
699
+ "image/webp": "image/webp";
700
+ }>;
701
+ fileSize: z.ZodNumber;
702
+ status: z.ZodEnum<{
703
+ SELECTED: "SELECTED";
704
+ ALTERNATE: "ALTERNATE";
705
+ EXCLUDED: "EXCLUDED";
706
+ NEEDS_REVIEW: "NEEDS_REVIEW";
707
+ }>;
708
+ takenAt: z.ZodOptional<z.ZodISODateTime>;
709
+ gpsLatitude: z.ZodOptional<z.ZodNumber>;
710
+ gpsLongitude: z.ZodOptional<z.ZodNumber>;
711
+ width: z.ZodOptional<z.ZodNumber>;
712
+ height: z.ZodOptional<z.ZodNumber>;
713
+ deviceModel: z.ZodOptional<z.ZodString>;
714
+ groupKey: z.ZodOptional<z.ZodString>;
715
+ perceptualHash: z.ZodOptional<z.ZodString>;
716
+ recommendationScore: z.ZodOptional<z.ZodNumber>;
717
+ recommendationReason: z.ZodOptional<z.ZodString>;
718
+ exclusionReason: z.ZodOptional<z.ZodString>;
719
+ }, z.core.$strict>>;
720
+ }, z.core.$strict>;
721
+ }, z.core.$strict>;
722
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
723
+ expectations: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
724
+ mode: z.ZodLiteral<"create">;
725
+ }, z.core.$strict>, z.ZodObject<{
726
+ mode: z.ZodLiteral<"reuse">;
727
+ photoId: z.ZodString;
728
+ version: z.ZodISODateTime;
729
+ }, z.core.$strict>]>>;
730
+ operationId: z.ZodUUID;
731
+ }, z.core.$strict>, z.ZodObject<{
732
+ action: z.ZodLiteral<"photos.cancel">;
733
+ target: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
734
+ ref: z.ZodUUID;
735
+ field: z.ZodEnum<{
736
+ id: "id";
737
+ version: "version";
738
+ }>;
739
+ }, z.core.$strict>, z.ZodObject<{
740
+ ref: z.ZodUUID;
741
+ field: z.ZodLiteral<"photoId">;
742
+ localCandidateId: z.ZodString;
743
+ }, z.core.$strict>]>]>;
744
+ payload: z.ZodObject<{}, z.core.$strict>;
745
+ operationId: z.ZodUUID;
746
+ }, z.core.$strict>], "action">>;
747
+ planHash: z.ZodString;
748
+ }, z.core.$strict>;
749
+ export type Plan = z.infer<typeof planSchema>;
750
+ export declare const resultSchema: z.ZodObject<{
751
+ type: z.ZodOptional<z.ZodString>;
752
+ id: z.ZodString;
753
+ version: z.ZodOptional<z.ZodString>;
754
+ status: z.ZodOptional<z.ZodString>;
755
+ replayed: z.ZodOptional<z.ZodBoolean>;
756
+ candidateId: z.ZodOptional<z.ZodString>;
757
+ candidates: z.ZodOptional<z.ZodArray<z.ZodObject<{
758
+ localCandidateId: z.ZodString;
759
+ id: z.ZodString;
760
+ }, z.core.$strip>>>;
761
+ photoIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
762
+ }, z.core.$strip>;
763
+ export type ResultRefs = z.infer<typeof resultSchema>;
764
+ export type RequestSpec = {
765
+ path: string;
766
+ method: 'POST' | 'PATCH';
767
+ body: unknown;
768
+ version?: string;
769
+ };
770
+ export declare function refsIn(v: unknown): z.infer<typeof refSchema>[];
771
+ export declare function buildPlan(input: unknown): Plan;
772
+ export declare function verifyPlan(input: unknown, confirmed: string, identity: {
773
+ origin: string;
774
+ userId: string;
775
+ }): Plan;
776
+ export declare function resolveRefs(v: unknown, results: Record<string, ResultRefs>): unknown;
777
+ export declare function actionRequest(item: Action, results: Record<string, ResultRefs>): RequestSpec;
778
+ export declare function textBlocks(text: string): {
779
+ type: "paragraph";
780
+ text: string;
781
+ }[];
782
+ export declare function revisePlan(previous: Plan, input: unknown, sent: Set<string>): Plan;