@camox/api-contract 0.74.1 → 0.76.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/router.d.ts CHANGED
@@ -4,6 +4,9 @@ import { AgentActivity, ConnectedAgentClient, ThreadSender, ThreadView } from "@
4
4
  import { PiHarness, PiHarnessOptions } from "agents/harness/pi";
5
5
  import { CapabilityStartContext, Lifecycle } from "agents/lifecycle";
6
6
  import { WebSockets } from "agents/websockets";
7
+ import "@earendil-works/pi-ai";
8
+ import "@earendil-works/pi-ai/models";
9
+ import "@earendil-works/pi-durable/tools";
7
10
  import { FileErrorCode } from "@earendil-works/pi-durable/env";
8
11
  import "camox/_internal/sdkBundleName";
9
12
  import "@camox/ai-tools";
@@ -38,6 +41,198 @@ declare class EdgeCachePurger extends DurableObject<Bindings> {
38
41
  //#region ../../apps/api/src/lib/edge-cache-purges.d.ts
39
42
  type EdgeCachePurgerNamespace = DurableObjectNamespace<EdgeCachePurger>;
40
43
  //#endregion
44
+ //#region ../../apps/api/src/domains/attachments/schema.d.ts
45
+ /**
46
+ * An Attachment (ADR 0044): an image a member's Connected Agent uploaded for Camox's agent to
47
+ * see with one of its messages. Its bytes are a blob in the files bucket, under their own
48
+ * `attachments/` key space, and its row is apart from files', so it never shows among the
49
+ * project's Files. It becomes a File only when the agent puts it on the website.
50
+ *
51
+ * An Attachment no message used yet lasts a day from `createdAt`. A used one lasts as long as any
52
+ * thread whose message used it (`attachmentUses`).
53
+ */
54
+ declare const attachments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
55
+ name: "attachments";
56
+ schema: undefined;
57
+ columns: {
58
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
59
+ name: "id";
60
+ tableName: "attachments";
61
+ dataType: "string";
62
+ columnType: "SQLiteText";
63
+ data: string;
64
+ driverParam: string;
65
+ notNull: true;
66
+ hasDefault: false;
67
+ isPrimaryKey: true;
68
+ isAutoincrement: false;
69
+ hasRuntimeDefault: false;
70
+ enumValues: [string, ...string[]];
71
+ baseColumn: never;
72
+ identity: undefined;
73
+ generated: undefined;
74
+ }, {}, {
75
+ length: undefined;
76
+ }>;
77
+ projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
78
+ name: "project_id";
79
+ tableName: "attachments";
80
+ dataType: "number";
81
+ columnType: "SQLiteInteger";
82
+ data: number;
83
+ driverParam: number;
84
+ notNull: true;
85
+ hasDefault: false;
86
+ isPrimaryKey: false;
87
+ isAutoincrement: false;
88
+ hasRuntimeDefault: false;
89
+ enumValues: undefined;
90
+ baseColumn: never;
91
+ identity: undefined;
92
+ generated: undefined;
93
+ }, {}, {}>;
94
+ memberId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
95
+ name: "member_id";
96
+ tableName: "attachments";
97
+ dataType: "string";
98
+ columnType: "SQLiteText";
99
+ data: string;
100
+ driverParam: string;
101
+ notNull: true;
102
+ hasDefault: false;
103
+ isPrimaryKey: false;
104
+ isAutoincrement: false;
105
+ hasRuntimeDefault: false;
106
+ enumValues: [string, ...string[]];
107
+ baseColumn: never;
108
+ identity: undefined;
109
+ generated: undefined;
110
+ }, {}, {
111
+ length: number | undefined;
112
+ }>;
113
+ filename: import("drizzle-orm/sqlite-core").SQLiteColumn<{
114
+ name: "filename";
115
+ tableName: "attachments";
116
+ dataType: "string";
117
+ columnType: "SQLiteText";
118
+ data: string;
119
+ driverParam: string;
120
+ notNull: true;
121
+ hasDefault: false;
122
+ isPrimaryKey: false;
123
+ isAutoincrement: false;
124
+ hasRuntimeDefault: false;
125
+ enumValues: [string, ...string[]];
126
+ baseColumn: never;
127
+ identity: undefined;
128
+ generated: undefined;
129
+ }, {}, {
130
+ length: undefined;
131
+ }>;
132
+ mimeType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
133
+ name: "mime_type";
134
+ tableName: "attachments";
135
+ dataType: "string";
136
+ columnType: "SQLiteText";
137
+ data: "image/jpeg" | "image/png" | "image/svg+xml" | "image/webp";
138
+ driverParam: string;
139
+ notNull: true;
140
+ hasDefault: false;
141
+ isPrimaryKey: false;
142
+ isAutoincrement: false;
143
+ hasRuntimeDefault: false;
144
+ enumValues: [string, ...string[]];
145
+ baseColumn: never;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }, {}, {
149
+ length: number | undefined;
150
+ $type: "image/jpeg" | "image/png" | "image/svg+xml" | "image/webp";
151
+ }>;
152
+ size: import("drizzle-orm/sqlite-core").SQLiteColumn<{
153
+ name: "size";
154
+ tableName: "attachments";
155
+ dataType: "number";
156
+ columnType: "SQLiteInteger";
157
+ data: number;
158
+ driverParam: number;
159
+ notNull: true;
160
+ hasDefault: false;
161
+ isPrimaryKey: false;
162
+ isAutoincrement: false;
163
+ hasRuntimeDefault: false;
164
+ enumValues: undefined;
165
+ baseColumn: never;
166
+ identity: undefined;
167
+ generated: undefined;
168
+ }, {}, {}>;
169
+ blobKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
170
+ name: "blob_key";
171
+ tableName: "attachments";
172
+ dataType: "string";
173
+ columnType: "SQLiteText";
174
+ data: string;
175
+ driverParam: string;
176
+ notNull: true;
177
+ hasDefault: false;
178
+ isPrimaryKey: false;
179
+ isAutoincrement: false;
180
+ hasRuntimeDefault: false;
181
+ enumValues: [string, ...string[]];
182
+ baseColumn: never;
183
+ identity: undefined;
184
+ generated: undefined;
185
+ }, {}, {
186
+ length: number | undefined;
187
+ }>;
188
+ url: import("drizzle-orm/sqlite-core").SQLiteColumn<{
189
+ name: "url";
190
+ tableName: "attachments";
191
+ dataType: "string";
192
+ columnType: "SQLiteText";
193
+ data: string;
194
+ driverParam: string;
195
+ notNull: true;
196
+ hasDefault: false;
197
+ isPrimaryKey: false;
198
+ isAutoincrement: false;
199
+ hasRuntimeDefault: false;
200
+ enumValues: [string, ...string[]];
201
+ baseColumn: never;
202
+ identity: undefined;
203
+ generated: undefined;
204
+ }, {}, {
205
+ length: undefined;
206
+ }>;
207
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
208
+ name: "created_at";
209
+ tableName: "attachments";
210
+ dataType: "number";
211
+ columnType: "SQLiteInteger";
212
+ data: number;
213
+ driverParam: number;
214
+ notNull: true;
215
+ hasDefault: false;
216
+ isPrimaryKey: false;
217
+ isAutoincrement: false;
218
+ hasRuntimeDefault: false;
219
+ enumValues: undefined;
220
+ baseColumn: never;
221
+ identity: undefined;
222
+ generated: undefined;
223
+ }, {}, {}>;
224
+ };
225
+ dialect: 'sqlite';
226
+ }>;
227
+ type Attachment = typeof attachments.$inferSelect;
228
+ //#endregion
229
+ //#region ../../apps/api/src/domains/attachments/model-input.d.ts
230
+ /**
231
+ * An Attachment as a thread message carries it: what a model's label and the studio name it by,
232
+ * and where its bytes are.
233
+ */
234
+ type MessageAttachment = Pick<Attachment, "id" | "filename" | "mimeType" | "url" | "blobKey">;
235
+ //#endregion
41
236
  //#region ../../apps/api/src/domains/code/remote-env.d.ts
42
237
  /** The operations sent as they are: every argument but the context is plain data. */
43
238
  declare const SENT: ["absolutePath", "joinPath", "readTextFile", "readTextLines", "readBinaryFile", "writeFile", "appendFile", "truncateFile", "flushFile", "renameFile", "fileInfo", "listDir", "canonicalPath", "exists", "createDir", "remove"];
@@ -267,6 +462,22 @@ declare class DraftCode extends DurableObject<Bindings> {
267
462
  repo: string;
268
463
  commit: string;
269
464
  }): Promise<string>;
465
+ /**
466
+ * Makes the branch and working copy of a draft reverting a Publication, unless they were made
467
+ * already: forked from `commit`, the Publication's commit on `main`, with one commit on top,
468
+ * `message`, putting back the tree `main` had before it. Merging the current `main` then
469
+ * applies that undo to Live's latest code, as a merge of `main` into any draft (`mergeMain`):
470
+ * code a later publish changed since clashes as merges do. Returns whether `main` moved since
471
+ * `commit`, which a merge then brings in, or null, making nothing, when `commit` is `main`'s
472
+ * first: there's no code before it to put back.
473
+ */
474
+ startReverting({ repo, commit, message }: {
475
+ repo: string;
476
+ commit: string;
477
+ message: string;
478
+ }): Promise<{
479
+ mainMoved: boolean;
480
+ } | null>;
270
481
  /** Runs one operation of the agent's environment on the working copy, and saves what it changed. */
271
482
  call(call: EnvCall): Promise<EnvAnswer>;
272
483
  /**
@@ -595,6 +806,25 @@ declare const pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
595
806
  }, {}, {
596
807
  length: number | undefined;
597
808
  }>;
809
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
810
+ name: "publication_id";
811
+ tableName: "pages";
812
+ dataType: "string";
813
+ columnType: "SQLiteText";
814
+ data: string;
815
+ driverParam: string;
816
+ notNull: false;
817
+ hasDefault: false;
818
+ isPrimaryKey: false;
819
+ isAutoincrement: false;
820
+ hasRuntimeDefault: false;
821
+ enumValues: [string, ...string[]];
822
+ baseColumn: never;
823
+ identity: undefined;
824
+ generated: undefined;
825
+ }, {}, {
826
+ length: number | undefined;
827
+ }>;
598
828
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
599
829
  name: "locale";
600
830
  tableName: "pages";
@@ -1049,6 +1279,25 @@ declare const blocks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1049
1279
  }, {}, {
1050
1280
  length: number | undefined;
1051
1281
  }>;
1282
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1283
+ name: "publication_id";
1284
+ tableName: "blocks";
1285
+ dataType: "string";
1286
+ columnType: "SQLiteText";
1287
+ data: string;
1288
+ driverParam: string;
1289
+ notNull: false;
1290
+ hasDefault: false;
1291
+ isPrimaryKey: false;
1292
+ isAutoincrement: false;
1293
+ hasRuntimeDefault: false;
1294
+ enumValues: [string, ...string[]];
1295
+ baseColumn: never;
1296
+ identity: undefined;
1297
+ generated: undefined;
1298
+ }, {}, {
1299
+ length: number | undefined;
1300
+ }>;
1052
1301
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1053
1302
  name: "locale";
1054
1303
  tableName: "blocks";
@@ -1426,6 +1675,25 @@ declare const files: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1426
1675
  }, {}, {
1427
1676
  length: number | undefined;
1428
1677
  }>;
1678
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1679
+ name: "publication_id";
1680
+ tableName: "files";
1681
+ dataType: "string";
1682
+ columnType: "SQLiteText";
1683
+ data: string;
1684
+ driverParam: string;
1685
+ notNull: false;
1686
+ hasDefault: false;
1687
+ isPrimaryKey: false;
1688
+ isAutoincrement: false;
1689
+ hasRuntimeDefault: false;
1690
+ enumValues: [string, ...string[]];
1691
+ baseColumn: never;
1692
+ identity: undefined;
1693
+ generated: undefined;
1694
+ }, {}, {
1695
+ length: number | undefined;
1696
+ }>;
1429
1697
  projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1430
1698
  name: "project_id";
1431
1699
  tableName: "files";
@@ -1682,6 +1950,14 @@ declare const files: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1682
1950
  dialect: 'sqlite';
1683
1951
  }>;
1684
1952
  //#endregion
1953
+ //#region ../../apps/api/src/domains/drafts/schema.d.ts
1954
+ /**
1955
+ * What Camox opens a draft for (`purpose`): to catch Live's translations up. A `publication` row
1956
+ * isn't a draft at all but a scope of a Publication's content (`../publications/schema.ts`),
1957
+ * which nothing lists, opens or publishes.
1958
+ */
1959
+ type CamoxDraftPurpose = "catchUp" | "publication";
1960
+ //#endregion
1685
1961
  //#region ../../apps/api/src/domains/generated-values/schema.d.ts
1686
1962
  /** What a generated value describes, named like the draft overlay's entities. */
1687
1963
  type GeneratedEntity = "block" | "sharedContent" | "repeatableItem" | "page" | "file";
@@ -2217,7 +2493,7 @@ declare const schema: {
2217
2493
  tableName: "drafts";
2218
2494
  dataType: "string";
2219
2495
  columnType: "SQLiteText";
2220
- data: "catchUp";
2496
+ data: CamoxDraftPurpose;
2221
2497
  driverParam: string;
2222
2498
  notNull: false;
2223
2499
  hasDefault: false;
@@ -2230,7 +2506,7 @@ declare const schema: {
2230
2506
  generated: undefined;
2231
2507
  }, {}, {
2232
2508
  length: undefined;
2233
- $type: "catchUp";
2509
+ $type: CamoxDraftPurpose;
2234
2510
  }>;
2235
2511
  createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2236
2512
  name: "created_at";
@@ -2561,23 +2837,16 @@ declare const schema: {
2561
2837
  length: number | undefined;
2562
2838
  $type: "blocked" | "codeDoesNotBuild" | "codeDoesNotMerge" | "conflictsChanged" | "failed" | "liveCodeMoved" | "revisionChanged";
2563
2839
  }>;
2564
- };
2565
- dialect: 'sqlite';
2566
- }>;
2567
- pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2568
- name: "pages";
2569
- schema: undefined;
2570
- columns: {
2571
- rowId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2572
- name: "row_id";
2573
- tableName: "pages";
2840
+ archivedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2841
+ name: "archived_at";
2842
+ tableName: "drafts";
2574
2843
  dataType: "number";
2575
2844
  columnType: "SQLiteInteger";
2576
2845
  data: number;
2577
2846
  driverParam: number;
2578
- notNull: true;
2579
- hasDefault: true;
2580
- isPrimaryKey: true;
2847
+ notNull: false;
2848
+ hasDefault: false;
2849
+ isPrimaryKey: false;
2581
2850
  isAutoincrement: false;
2582
2851
  hasRuntimeDefault: false;
2583
2852
  enumValues: undefined;
@@ -2585,29 +2854,89 @@ declare const schema: {
2585
2854
  identity: undefined;
2586
2855
  generated: undefined;
2587
2856
  }, {}, {}>;
2588
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2589
- name: "id";
2590
- tableName: "pages";
2857
+ archivedBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2858
+ name: "archived_by";
2859
+ tableName: "drafts";
2591
2860
  dataType: "string";
2592
2861
  columnType: "SQLiteText";
2593
2862
  data: string;
2594
2863
  driverParam: string;
2595
- notNull: true;
2596
- hasDefault: true;
2864
+ notNull: false;
2865
+ hasDefault: false;
2597
2866
  isPrimaryKey: false;
2598
2867
  isAutoincrement: false;
2599
- hasRuntimeDefault: true;
2868
+ hasRuntimeDefault: false;
2600
2869
  enumValues: [string, ...string[]];
2601
2870
  baseColumn: never;
2602
2871
  identity: undefined;
2603
2872
  generated: undefined;
2604
2873
  }, {}, {
2605
- length: undefined;
2874
+ length: number | undefined;
2606
2875
  }>;
2607
- draftId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2608
- name: "draft_id";
2609
- tableName: "pages";
2610
- dataType: "string";
2876
+ lastActivityAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2877
+ name: "last_activity_at";
2878
+ tableName: "drafts";
2879
+ dataType: "number";
2880
+ columnType: "SQLiteInteger";
2881
+ data: number;
2882
+ driverParam: number;
2883
+ notNull: false;
2884
+ hasDefault: false;
2885
+ isPrimaryKey: false;
2886
+ isAutoincrement: false;
2887
+ hasRuntimeDefault: false;
2888
+ enumValues: undefined;
2889
+ baseColumn: never;
2890
+ identity: undefined;
2891
+ generated: undefined;
2892
+ }, {}, {}>;
2893
+ };
2894
+ dialect: 'sqlite';
2895
+ }>;
2896
+ pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2897
+ name: "pages";
2898
+ schema: undefined;
2899
+ columns: {
2900
+ rowId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2901
+ name: "row_id";
2902
+ tableName: "pages";
2903
+ dataType: "number";
2904
+ columnType: "SQLiteInteger";
2905
+ data: number;
2906
+ driverParam: number;
2907
+ notNull: true;
2908
+ hasDefault: true;
2909
+ isPrimaryKey: true;
2910
+ isAutoincrement: false;
2911
+ hasRuntimeDefault: false;
2912
+ enumValues: undefined;
2913
+ baseColumn: never;
2914
+ identity: undefined;
2915
+ generated: undefined;
2916
+ }, {}, {}>;
2917
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2918
+ name: "id";
2919
+ tableName: "pages";
2920
+ dataType: "string";
2921
+ columnType: "SQLiteText";
2922
+ data: string;
2923
+ driverParam: string;
2924
+ notNull: true;
2925
+ hasDefault: true;
2926
+ isPrimaryKey: false;
2927
+ isAutoincrement: false;
2928
+ hasRuntimeDefault: true;
2929
+ enumValues: [string, ...string[]];
2930
+ baseColumn: never;
2931
+ identity: undefined;
2932
+ generated: undefined;
2933
+ }, {}, {
2934
+ length: undefined;
2935
+ }>;
2936
+ draftId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2937
+ name: "draft_id";
2938
+ tableName: "pages";
2939
+ dataType: "string";
2611
2940
  columnType: "SQLiteText";
2612
2941
  data: string;
2613
2942
  driverParam: string;
@@ -2727,6 +3056,25 @@ declare const schema: {
2727
3056
  }, {}, {
2728
3057
  length: number | undefined;
2729
3058
  }>;
3059
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3060
+ name: "publication_id";
3061
+ tableName: "pages";
3062
+ dataType: "string";
3063
+ columnType: "SQLiteText";
3064
+ data: string;
3065
+ driverParam: string;
3066
+ notNull: false;
3067
+ hasDefault: false;
3068
+ isPrimaryKey: false;
3069
+ isAutoincrement: false;
3070
+ hasRuntimeDefault: false;
3071
+ enumValues: [string, ...string[]];
3072
+ baseColumn: never;
3073
+ identity: undefined;
3074
+ generated: undefined;
3075
+ }, {}, {
3076
+ length: number | undefined;
3077
+ }>;
2730
3078
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2731
3079
  name: "locale";
2732
3080
  tableName: "pages";
@@ -3395,6 +3743,25 @@ declare const schema: {
3395
3743
  }, {}, {
3396
3744
  length: number | undefined;
3397
3745
  }>;
3746
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3747
+ name: "publication_id";
3748
+ tableName: "blocks";
3749
+ dataType: "string";
3750
+ columnType: "SQLiteText";
3751
+ data: string;
3752
+ driverParam: string;
3753
+ notNull: false;
3754
+ hasDefault: false;
3755
+ isPrimaryKey: false;
3756
+ isAutoincrement: false;
3757
+ hasRuntimeDefault: false;
3758
+ enumValues: [string, ...string[]];
3759
+ baseColumn: never;
3760
+ identity: undefined;
3761
+ generated: undefined;
3762
+ }, {}, {
3763
+ length: number | undefined;
3764
+ }>;
3398
3765
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3399
3766
  name: "locale";
3400
3767
  tableName: "blocks";
@@ -3761,6 +4128,25 @@ declare const schema: {
3761
4128
  }, {}, {
3762
4129
  length: number | undefined;
3763
4130
  }>;
4131
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4132
+ name: "publication_id";
4133
+ tableName: "repeatable_items";
4134
+ dataType: "string";
4135
+ columnType: "SQLiteText";
4136
+ data: string;
4137
+ driverParam: string;
4138
+ notNull: false;
4139
+ hasDefault: false;
4140
+ isPrimaryKey: false;
4141
+ isAutoincrement: false;
4142
+ hasRuntimeDefault: false;
4143
+ enumValues: [string, ...string[]];
4144
+ baseColumn: never;
4145
+ identity: undefined;
4146
+ generated: undefined;
4147
+ }, {}, {
4148
+ length: number | undefined;
4149
+ }>;
3764
4150
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3765
4151
  name: "locale";
3766
4152
  tableName: "repeatable_items";
@@ -4126,6 +4512,25 @@ declare const schema: {
4126
4512
  }, {}, {
4127
4513
  length: number | undefined;
4128
4514
  }>;
4515
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4516
+ name: "publication_id";
4517
+ tableName: "files";
4518
+ dataType: "string";
4519
+ columnType: "SQLiteText";
4520
+ data: string;
4521
+ driverParam: string;
4522
+ notNull: false;
4523
+ hasDefault: false;
4524
+ isPrimaryKey: false;
4525
+ isAutoincrement: false;
4526
+ hasRuntimeDefault: false;
4527
+ enumValues: [string, ...string[]];
4528
+ baseColumn: never;
4529
+ identity: undefined;
4530
+ generated: undefined;
4531
+ }, {}, {
4532
+ length: number | undefined;
4533
+ }>;
4129
4534
  projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4130
4535
  name: "project_id";
4131
4536
  tableName: "files";
@@ -5201,6 +5606,25 @@ declare const schema: {
5201
5606
  }, {}, {
5202
5607
  length: number | undefined;
5203
5608
  }>;
5609
+ publicationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5610
+ name: "publication_id";
5611
+ tableName: "collection_records";
5612
+ dataType: "string";
5613
+ columnType: "SQLiteText";
5614
+ data: string;
5615
+ driverParam: string;
5616
+ notNull: false;
5617
+ hasDefault: false;
5618
+ isPrimaryKey: false;
5619
+ isAutoincrement: false;
5620
+ hasRuntimeDefault: false;
5621
+ enumValues: [string, ...string[]];
5622
+ baseColumn: never;
5623
+ identity: undefined;
5624
+ generated: undefined;
5625
+ }, {}, {
5626
+ length: number | undefined;
5627
+ }>;
5204
5628
  locale: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5205
5629
  name: "locale";
5206
5630
  tableName: "collection_records";
@@ -9543,13 +9967,15 @@ type OpeningSender = {
9543
9967
  };
9544
9968
  /**
9545
9969
  * A message a draft's thread opens with: its text, the operation id it was sent with, and who
9546
- * sent it. A Connected Agent's message may be its answer to the agent's questions (ADR 0042).
9970
+ * sent it. A Connected Agent's message may be its answer to the agent's questions (ADR 0042), and
9971
+ * may carry Attachments, images the model sees with it (ADR 0044).
9547
9972
  */
9548
9973
  type OpeningMessage = {
9549
9974
  operationId: string;
9550
9975
  text: string;
9551
9976
  from: OpeningSender;
9552
9977
  answer?: boolean;
9978
+ attachments?: MessageAttachment[];
9553
9979
  };
9554
9980
  /**
9555
9981
  * How the API opens a draft's thread with no studio connected (`Thread.open`): what it belongs
@@ -9622,6 +10048,18 @@ declare class Thread extends DurableObject<Bindings> {
9622
10048
  * the next message (`#onYield`). Nothing of it shows in the thread.
9623
10049
  */
9624
10050
  mergeMain(): Promise<MergeEnd | "afterTheTurn" | "noCode">;
10051
+ /**
10052
+ * Lands the undo of a Publication's code on the thread's draft, which reverts it (ADR 0045),
10053
+ * starting the thread: the draft's branch, made by `DraftCode.startReverting`, holds the undo
10054
+ * on top of the Publication's commit. When `main` moved since, its merge applies the undo to
10055
+ * Live's latest code, a clash starting Camox's reconcile turn, as any merge of `main` does
10056
+ * (ADR 0020). Otherwise the undo is built as the draft's revision. Either goes on in the
10057
+ * background: the draft shows it's building, or not holding Live's code, until it lands.
10058
+ */
10059
+ revertCode({ identity, mainMoved }: {
10060
+ identity: ThreadIdentity;
10061
+ mainMoved: boolean;
10062
+ }): Promise<void>;
9625
10063
  /**
9626
10064
  * Builds the code of the thread's draft, as the end of a turn would on its last try, when
9627
10065
  * Camox's infrastructure failed the last build: changes that don't build are committed as a
@@ -9632,7 +10070,8 @@ declare class Thread extends DurableObject<Bindings> {
9632
10070
  retryBuild(): Promise<"built" | "failed" | "busy" | "noCode">;
9633
10071
  /**
9634
10072
  * Lifecycle's alarm, which wakes Pi's runs, unless the thread ended: an alarm already on its
9635
- * way when it did would look for the jobs its storage no longer has.
10073
+ * way when it did would look for the jobs its storage no longer has. A published draft's
10074
+ * thread runs nothing either.
9636
10075
  */
9637
10076
  alarm(): Promise<void>;
9638
10077
  /** Gives sockets that outlived the last isolate a new watch and a fresh snapshot. */
@@ -9700,6 +10139,28 @@ declare class Thread extends DurableObject<Bindings> {
9700
10139
  * it next.
9701
10140
  */
9702
10141
  end(): Promise<void>;
10142
+ /**
10143
+ * Keeps the thread read-only as its draft is published, for the Publication it now belongs to
10144
+ * (ADR 0045): the run going stops, the Code Agent's and Artifact Agents' memory goes with the
10145
+ * draft's code, and the thread takes no more messages. Studios still open on it keep showing
10146
+ * it as their sockets close: the draft is gone, so they don't reconnect. A socket reaching it
10147
+ * after sees it as it is, read-only, its messages refused. Studios read it from then on through
10148
+ * its Publication (`publications.get`) rather than a socket: a published thread never changes,
10149
+ * so there's nothing to keep a socket open for. Repeating it changes nothing.
10150
+ */
10151
+ keepPublished(): Promise<void>;
10152
+ /**
10153
+ * Whether the agent is mid-turn: Camox never archives a draft then (ADR 0046). A thread
10154
+ * nobody messaged has no turn, and opening Pi to check would store.
10155
+ */
10156
+ busy(): Promise<boolean>;
10157
+ /**
10158
+ * Sets the thread aside with its draft, which was archived (ADR 0046): the run going stops, as
10159
+ * `archivedBy` stopping it, and studios still open on it are disconnected without
10160
+ * reconnecting. Everything it stored stays, so it continues where it stopped once the draft
10161
+ * is restored.
10162
+ */
10163
+ archive(archivedBy: ThreadSender): Promise<void>;
9703
10164
  }
9704
10165
  //#endregion
9705
10166
  //#region ../../apps/api/src/domains/code/main-copy.d.ts
@@ -9769,12 +10230,15 @@ type ProjectDeletionParams = {
9769
10230
  name: string;
9770
10231
  /** Its drafts' IDs, which name their working copies and sandboxes: their rows are gone. */
9771
10232
  drafts?: string[];
10233
+ /** The IDs of its threads: its drafts', open or archived, its Publications' and on Live. */
10234
+ threads?: string[];
9772
10235
  };
9773
10236
  /**
9774
10237
  * A deleted project's cleanup. Deleting the project removed its rows and its host, so its site is
9775
- * already offline: this deletes what's left on Cloudflare, its Worker, its copies of its code and
9776
- * its repo, named after its Project ID and its drafts' IDs. Workflows retry a failed step, and each step is done once what it deletes
9777
- * is gone. Nothing is kept for recovery.
10238
+ * already offline: this deletes what's left on Cloudflare, its Worker, its copies of its code, its
10239
+ * threads and its repo, named after its Project ID and its drafts' and threads' IDs. Workflows
10240
+ * retry a failed step, and each step is done once what it deletes is gone. Nothing is kept for
10241
+ * recovery.
9778
10242
  *
9779
10243
  * A step that gives up doesn't stop the next one from cleaning up what it can. Once they've all
9780
10244
  * run, a cleanup with a failed step emails one alert to Camox's alerts address and fails.
@@ -9786,6 +10250,8 @@ declare class ProjectDeletionWorkflow extends WorkflowEntrypoint<Bindings, Proje
9786
10250
  * underway: a retried fork would otherwise make its repo again once this deleted it.
9787
10251
  */
9788
10252
  private stopSetup;
10253
+ /** Wipes the project's threads: each keeps only the record that it ended. */
10254
+ private deleteThreads;
9789
10255
  /**
9790
10256
  * Deletes the project's copies of its code: its copy of `main`, its drafts' working copies and
9791
10257
  * revision sandboxes and its builds in R2.
@@ -10376,6 +10842,8 @@ type DraftSummary = {
10376
10842
  changeCount: number;
10377
10843
  /** The tags of the locales the draft has pending translations into (ADR 0015). */
10378
10844
  translatingLocales: string[];
10845
+ /** Whether it's Camox's Catch-up Draft, which can't be archived (ADR 0017). */
10846
+ catchUp: boolean;
10379
10847
  };
10380
10848
  //#endregion
10381
10849
  //#region ../../apps/api/src/domains/revisions/preview.d.ts
@@ -10515,6 +10983,61 @@ type PublishResult = {
10515
10983
  publishing: true;
10516
10984
  };
10517
10985
  //#endregion
10986
+ //#region ../../apps/api/src/domains/drafts/archive.d.ts
10987
+ /** An archived draft, as the archived list shows it. */
10988
+ type ArchivedDraftSummary = {
10989
+ id: string;
10990
+ name: string | null;
10991
+ overviewHeadline: string | null;
10992
+ createdBy: Person;
10993
+ createdAt: number;
10994
+ /** When someone last worked in the draft, or when it was created if nobody did since. */
10995
+ lastActivityAt: number;
10996
+ archivedBy: Person;
10997
+ archivedAt: number;
10998
+ /** When Camox deletes it unless someone restores it first. */
10999
+ deletesAt: number;
11000
+ };
11001
+ //#endregion
11002
+ //#region ../../apps/api/src/domains/publications/service.d.ts
11003
+ /** A Publication's entity: a content row as stored, without the overlay's bookkeeping. */
11004
+ type PublicationEntity = {
11005
+ entity: EntityKind;
11006
+ id: string;
11007
+ /** A localized entity's locale, or null. */
11008
+ locale: string | null;
11009
+ row: Record<string, unknown>;
11010
+ };
11011
+ /** One of the draft's changes a Publication keeps. */
11012
+ type PublicationChange = PublicationEntity & {
11013
+ change: "created" | "changed" | "deleted";
11014
+ };
11015
+ type PublicationSummary = {
11016
+ id: string;
11017
+ name: string | null;
11018
+ overviewHeadline: string | null;
11019
+ publishedBy: Person;
11020
+ publishedAt: number;
11021
+ /** Who cleared the Publication's thread and when, or null while it's kept. */
11022
+ threadCleared: {
11023
+ by: Person;
11024
+ at: number;
11025
+ } | null;
11026
+ };
11027
+ type PublicationRead = PublicationSummary & {
11028
+ overview: {
11029
+ headline: string;
11030
+ bullets: string[];
11031
+ } | null;
11032
+ /** The squashed commit the publish put on `main`, or null when it changed no code. */
11033
+ commit: string | null;
11034
+ /** The draft's thread, read-only. */
11035
+ thread: ThreadView;
11036
+ changes: PublicationChange[];
11037
+ /** The Live content the publish overwrote or deleted, in every locale. */
11038
+ replaced: PublicationEntity[];
11039
+ };
11040
+ //#endregion
10518
11041
  //#region ../../apps/api/src/domains/code-pushes/service.d.ts
10519
11042
  /** Where a push stands, as it streams to the CLI while the push goes. */
10520
11043
  type PushStep =
@@ -11694,6 +12217,7 @@ declare const router: {
11694
12217
  parentPageId: string | null;
11695
12218
  pathSegment: string;
11696
12219
  projectId: number;
12220
+ publicationId: string | null;
11697
12221
  publishedAt: number | null;
11698
12222
  publishedBy: string | null;
11699
12223
  rowId: number;
@@ -11728,6 +12252,7 @@ declare const router: {
11728
12252
  pageId: string | null;
11729
12253
  position: string;
11730
12254
  projectId: number;
12255
+ publicationId: string | null;
11731
12256
  publishedAt: number | null;
11732
12257
  publishedBy: string | null;
11733
12258
  rowId: number;
@@ -11759,6 +12284,7 @@ declare const router: {
11759
12284
  parentItemId: string | null;
11760
12285
  position: string;
11761
12286
  projectId: number | null;
12287
+ publicationId: string | null;
11762
12288
  publishedAt: number | null;
11763
12289
  publishedBy: string | null;
11764
12290
  rowId: number;
@@ -11802,6 +12328,7 @@ declare const router: {
11802
12328
  parentPageId: string | null;
11803
12329
  pathSegment: string;
11804
12330
  projectId: number;
12331
+ publicationId: string | null;
11805
12332
  publishedAt: number | null;
11806
12333
  publishedBy: string | null;
11807
12334
  rowId: number;
@@ -11836,6 +12363,7 @@ declare const router: {
11836
12363
  pageId: string | null;
11837
12364
  position: string;
11838
12365
  projectId: number;
12366
+ publicationId: string | null;
11839
12367
  publishedAt: number | null;
11840
12368
  publishedBy: string | null;
11841
12369
  rowId: number;
@@ -11867,6 +12395,7 @@ declare const router: {
11867
12395
  parentItemId: string | null;
11868
12396
  position: string;
11869
12397
  projectId: number | null;
12398
+ publicationId: string | null;
11870
12399
  publishedAt: number | null;
11871
12400
  publishedBy: string | null;
11872
12401
  rowId: number;
@@ -11920,6 +12449,7 @@ declare const router: {
11920
12449
  parentPageId: string | null;
11921
12450
  pathSegment: string;
11922
12451
  projectId: number;
12452
+ publicationId: string | null;
11923
12453
  publishedBy: string | null;
11924
12454
  rowId: number;
11925
12455
  updatedAt: number;
@@ -11964,6 +12494,7 @@ declare const router: {
11964
12494
  parentPageId: string | null;
11965
12495
  pathSegment: string;
11966
12496
  projectId: number;
12497
+ publicationId: string | null;
11967
12498
  publishedBy: string | null;
11968
12499
  rowId: number;
11969
12500
  updatedAt: number;
@@ -12024,6 +12555,7 @@ declare const router: {
12024
12555
  parentPageId: string | null;
12025
12556
  pathSegment: string;
12026
12557
  projectId: number;
12558
+ publicationId: string | null;
12027
12559
  publishedBy: string | null;
12028
12560
  rowId: number;
12029
12561
  updatedAt: number;
@@ -12065,6 +12597,7 @@ declare const router: {
12065
12597
  parentPageId: string | null;
12066
12598
  pathSegment: string;
12067
12599
  projectId: number;
12600
+ publicationId: string | null;
12068
12601
  publishedBy: string | null;
12069
12602
  rowId: number;
12070
12603
  updatedAt: number;
@@ -12107,6 +12640,7 @@ declare const router: {
12107
12640
  parentPageId: string | null;
12108
12641
  pathSegment: string;
12109
12642
  projectId: number;
12643
+ publicationId: string | null;
12110
12644
  publishedAt: number | null;
12111
12645
  publishedBy: string | null;
12112
12646
  rowId: number;
@@ -12136,6 +12670,7 @@ declare const router: {
12136
12670
  parentPageId: string | null;
12137
12671
  pathSegment: string;
12138
12672
  projectId: number;
12673
+ publicationId: string | null;
12139
12674
  publishedAt: number | null;
12140
12675
  publishedBy: string | null;
12141
12676
  rowId: number;
@@ -12175,6 +12710,7 @@ declare const router: {
12175
12710
  parentPageId: string | null;
12176
12711
  pathSegment: string;
12177
12712
  projectId: number;
12713
+ publicationId: string | null;
12178
12714
  publishedAt: number | null;
12179
12715
  publishedBy: string | null;
12180
12716
  rowId: number;
@@ -12207,6 +12743,7 @@ declare const router: {
12207
12743
  parentPageId: string | null;
12208
12744
  pathSegment: string;
12209
12745
  projectId: number;
12746
+ publicationId: string | null;
12210
12747
  publishedAt: number | null;
12211
12748
  publishedBy: string | null;
12212
12749
  rowId: number;
@@ -12247,6 +12784,7 @@ declare const router: {
12247
12784
  parentPageId: string | null;
12248
12785
  pathSegment: string;
12249
12786
  projectId: number;
12787
+ publicationId: string | null;
12250
12788
  publishedAt: number | null;
12251
12789
  publishedBy: string | null;
12252
12790
  rowId: number;
@@ -12275,6 +12813,7 @@ declare const router: {
12275
12813
  parentPageId: string | null;
12276
12814
  pathSegment: string;
12277
12815
  projectId: number;
12816
+ publicationId: string | null;
12278
12817
  publishedAt: number | null;
12279
12818
  publishedBy: string | null;
12280
12819
  rowId: number;
@@ -12399,6 +12938,7 @@ declare const router: {
12399
12938
  parentPageId: string | null;
12400
12939
  pathSegment: string;
12401
12940
  projectId: number;
12941
+ publicationId: string | null;
12402
12942
  publishedAt: number | null;
12403
12943
  publishedBy: string | null;
12404
12944
  rowId: number;
@@ -12427,6 +12967,7 @@ declare const router: {
12427
12967
  parentPageId: string | null;
12428
12968
  pathSegment: string;
12429
12969
  projectId: number;
12970
+ publicationId: string | null;
12430
12971
  publishedAt: number | null;
12431
12972
  publishedBy: string | null;
12432
12973
  rowId: number;
@@ -12550,6 +13091,7 @@ declare const router: {
12550
13091
  parentPageId: string | null;
12551
13092
  pathSegment: string;
12552
13093
  projectId: number;
13094
+ publicationId: string | null;
12553
13095
  publishedAt: number | null;
12554
13096
  publishedBy: string | null;
12555
13097
  rowId: number;
@@ -12575,6 +13117,7 @@ declare const router: {
12575
13117
  parentPageId: string | null;
12576
13118
  pathSegment: string;
12577
13119
  projectId: number;
13120
+ publicationId: string | null;
12578
13121
  publishedAt: number | null;
12579
13122
  publishedBy: string | null;
12580
13123
  rowId: number;
@@ -12693,6 +13236,7 @@ declare const router: {
12693
13236
  parentPageId: string | null;
12694
13237
  pathSegment: string;
12695
13238
  projectId: number;
13239
+ publicationId: string | null;
12696
13240
  publishedAt: number | null;
12697
13241
  publishedBy: string | null;
12698
13242
  rowId: number;
@@ -12718,6 +13262,7 @@ declare const router: {
12718
13262
  parentPageId: string | null;
12719
13263
  pathSegment: string;
12720
13264
  projectId: number;
13265
+ publicationId: string | null;
12721
13266
  publishedAt: number | null;
12722
13267
  publishedBy: string | null;
12723
13268
  rowId: number;
@@ -12839,6 +13384,7 @@ declare const router: {
12839
13384
  parentPageId: string | null;
12840
13385
  pathSegment: string;
12841
13386
  projectId: number;
13387
+ publicationId: string | null;
12842
13388
  publishedAt: number | null;
12843
13389
  publishedBy: string | null;
12844
13390
  rowId: number;
@@ -12864,6 +13410,7 @@ declare const router: {
12864
13410
  parentPageId: string | null;
12865
13411
  pathSegment: string;
12866
13412
  projectId: number;
13413
+ publicationId: string | null;
12867
13414
  publishedAt: number | null;
12868
13415
  publishedBy: string | null;
12869
13416
  rowId: number;
@@ -12983,6 +13530,7 @@ declare const router: {
12983
13530
  parentPageId: string | null;
12984
13531
  pathSegment: string;
12985
13532
  projectId: number;
13533
+ publicationId: string | null;
12986
13534
  publishedAt: number | null;
12987
13535
  publishedBy: string | null;
12988
13536
  rowId: number;
@@ -13008,6 +13556,7 @@ declare const router: {
13008
13556
  parentPageId: string | null;
13009
13557
  pathSegment: string;
13010
13558
  projectId: number;
13559
+ publicationId: string | null;
13011
13560
  publishedAt: number | null;
13012
13561
  publishedBy: string | null;
13013
13562
  rowId: number;
@@ -13085,6 +13634,7 @@ declare const router: {
13085
13634
  parentPageId: string | null;
13086
13635
  pathSegment: string;
13087
13636
  projectId: number;
13637
+ publicationId: string | null;
13088
13638
  publishedAt: number | null;
13089
13639
  publishedBy: string | null;
13090
13640
  rowId: number;
@@ -13110,6 +13660,7 @@ declare const router: {
13110
13660
  parentPageId: string | null;
13111
13661
  pathSegment: string;
13112
13662
  projectId: number;
13663
+ publicationId: string | null;
13113
13664
  publishedAt: number | null;
13114
13665
  publishedBy: string | null;
13115
13666
  rowId: number;
@@ -13139,6 +13690,7 @@ declare const router: {
13139
13690
  pageId: string | null;
13140
13691
  position: string;
13141
13692
  projectId: number;
13693
+ publicationId: string | null;
13142
13694
  publishedAt: number | null;
13143
13695
  publishedBy: string | null;
13144
13696
  rowId: number;
@@ -13170,6 +13722,7 @@ declare const router: {
13170
13722
  parentItemId: string | null;
13171
13723
  position: string;
13172
13724
  projectId: number | null;
13725
+ publicationId: string | null;
13173
13726
  publishedAt: number | null;
13174
13727
  publishedBy: string | null;
13175
13728
  rowId: number;
@@ -13202,6 +13755,7 @@ declare const router: {
13202
13755
  pageId: string | null;
13203
13756
  position: string;
13204
13757
  projectId: number;
13758
+ publicationId: string | null;
13205
13759
  publishedAt: number | null;
13206
13760
  publishedBy: string | null;
13207
13761
  rowId: number;
@@ -13233,6 +13787,7 @@ declare const router: {
13233
13787
  parentItemId: string | null;
13234
13788
  position: string;
13235
13789
  projectId: number | null;
13790
+ publicationId: string | null;
13236
13791
  publishedAt: number | null;
13237
13792
  publishedBy: string | null;
13238
13793
  rowId: number;
@@ -13344,6 +13899,7 @@ declare const router: {
13344
13899
  pageId: string | null;
13345
13900
  position: string;
13346
13901
  projectId: number;
13902
+ publicationId: string | null;
13347
13903
  publishedAt: number | null;
13348
13904
  publishedBy: string | null;
13349
13905
  rowId: number;
@@ -13375,6 +13931,7 @@ declare const router: {
13375
13931
  parentItemId: string | null;
13376
13932
  position: string;
13377
13933
  projectId: number | null;
13934
+ publicationId: string | null;
13378
13935
  publishedAt: number | null;
13379
13936
  publishedBy: string | null;
13380
13937
  rowId: number;
@@ -13407,6 +13964,7 @@ declare const router: {
13407
13964
  pageId: string | null;
13408
13965
  position: string;
13409
13966
  projectId: number;
13967
+ publicationId: string | null;
13410
13968
  publishedAt: number | null;
13411
13969
  publishedBy: string | null;
13412
13970
  rowId: number;
@@ -13438,6 +13996,7 @@ declare const router: {
13438
13996
  parentItemId: string | null;
13439
13997
  position: string;
13440
13998
  projectId: number | null;
13999
+ publicationId: string | null;
13441
14000
  publishedAt: number | null;
13442
14001
  publishedBy: string | null;
13443
14002
  rowId: number;
@@ -13481,6 +14040,7 @@ declare const router: {
13481
14040
  pageId: string | null;
13482
14041
  position: string;
13483
14042
  projectId: number;
14043
+ publicationId: string | null;
13484
14044
  publishedAt: number | null;
13485
14045
  publishedBy: string | null;
13486
14046
  rowId: number;
@@ -13512,6 +14072,7 @@ declare const router: {
13512
14072
  parentItemId: string | null;
13513
14073
  position: string;
13514
14074
  projectId: number | null;
14075
+ publicationId: string | null;
13515
14076
  publishedAt: number | null;
13516
14077
  publishedBy: string | null;
13517
14078
  rowId: number;
@@ -13544,6 +14105,7 @@ declare const router: {
13544
14105
  pageId: string | null;
13545
14106
  position: string;
13546
14107
  projectId: number;
14108
+ publicationId: string | null;
13547
14109
  publishedAt: number | null;
13548
14110
  publishedBy: string | null;
13549
14111
  rowId: number;
@@ -13575,6 +14137,7 @@ declare const router: {
13575
14137
  parentItemId: string | null;
13576
14138
  position: string;
13577
14139
  projectId: number | null;
14140
+ publicationId: string | null;
13578
14141
  publishedAt: number | null;
13579
14142
  publishedBy: string | null;
13580
14143
  rowId: number;
@@ -13713,6 +14276,7 @@ declare const router: {
13713
14276
  pageId: string | null;
13714
14277
  position: string;
13715
14278
  projectId: number;
14279
+ publicationId: string | null;
13716
14280
  publishedAt: number | null;
13717
14281
  publishedBy: string | null;
13718
14282
  rowId: number;
@@ -13742,6 +14306,7 @@ declare const router: {
13742
14306
  pageId: string | null;
13743
14307
  position: string;
13744
14308
  projectId: number;
14309
+ publicationId: string | null;
13745
14310
  publishedAt: number | null;
13746
14311
  publishedBy: string | null;
13747
14312
  rowId: number;
@@ -14412,6 +14977,7 @@ declare const router: {
14412
14977
  pageId: string | null;
14413
14978
  position: string;
14414
14979
  projectId: number;
14980
+ publicationId: string | null;
14415
14981
  publishedAt: number | null;
14416
14982
  publishedBy: string | null;
14417
14983
  rowId: number;
@@ -14443,6 +15009,7 @@ declare const router: {
14443
15009
  parentItemId: string | null;
14444
15010
  position: string;
14445
15011
  projectId: number | null;
15012
+ publicationId: string | null;
14446
15013
  publishedAt: number | null;
14447
15014
  publishedBy: string | null;
14448
15015
  rowId: number;
@@ -14492,6 +15059,7 @@ declare const router: {
14492
15059
  pageId: string | null;
14493
15060
  position: string;
14494
15061
  projectId: number;
15062
+ publicationId: string | null;
14495
15063
  publishedAt: number | null;
14496
15064
  publishedBy: string | null;
14497
15065
  rowId: number;
@@ -14523,6 +15091,7 @@ declare const router: {
14523
15091
  parentItemId: string | null;
14524
15092
  position: string;
14525
15093
  projectId: number | null;
15094
+ publicationId: string | null;
14526
15095
  publishedAt: number | null;
14527
15096
  publishedBy: string | null;
14528
15097
  rowId: number;
@@ -14585,6 +15154,7 @@ declare const router: {
14585
15154
  pageId: string | null;
14586
15155
  position: string;
14587
15156
  projectId: number;
15157
+ publicationId: string | null;
14588
15158
  publishedAt: number | null;
14589
15159
  publishedBy: string | null;
14590
15160
  rowId: number;
@@ -14616,6 +15186,7 @@ declare const router: {
14616
15186
  parentItemId: string | null;
14617
15187
  position: string;
14618
15188
  projectId: number | null;
15189
+ publicationId: string | null;
14619
15190
  publishedAt: number | null;
14620
15191
  publishedBy: string | null;
14621
15192
  rowId: number;
@@ -14665,6 +15236,7 @@ declare const router: {
14665
15236
  pageId: string | null;
14666
15237
  position: string;
14667
15238
  projectId: number;
15239
+ publicationId: string | null;
14668
15240
  publishedAt: number | null;
14669
15241
  publishedBy: string | null;
14670
15242
  rowId: number;
@@ -14696,6 +15268,7 @@ declare const router: {
14696
15268
  parentItemId: string | null;
14697
15269
  position: string;
14698
15270
  projectId: number | null;
15271
+ publicationId: string | null;
14699
15272
  publishedAt: number | null;
14700
15273
  publishedBy: string | null;
14701
15274
  rowId: number;
@@ -15191,6 +15764,7 @@ declare const router: {
15191
15764
  optimizedSize: number | null;
15192
15765
  path: string;
15193
15766
  projectId: number;
15767
+ publicationId: string | null;
15194
15768
  publishedAt: number | null;
15195
15769
  publishedBy: string | null;
15196
15770
  rowId: number;
@@ -15215,6 +15789,7 @@ declare const router: {
15215
15789
  optimizedSize: number | null;
15216
15790
  path: string;
15217
15791
  projectId: number;
15792
+ publicationId: string | null;
15218
15793
  publishedAt: number | null;
15219
15794
  publishedBy: string | null;
15220
15795
  rowId: number;
@@ -15247,6 +15822,7 @@ declare const router: {
15247
15822
  optimizedSize: number | null;
15248
15823
  path: string;
15249
15824
  projectId: number;
15825
+ publicationId: string | null;
15250
15826
  publishedAt: number | null;
15251
15827
  publishedBy: string | null;
15252
15828
  rowId: number;
@@ -15271,6 +15847,7 @@ declare const router: {
15271
15847
  optimizedSize: number | null;
15272
15848
  path: string;
15273
15849
  projectId: number;
15850
+ publicationId: string | null;
15274
15851
  publishedAt: number | null;
15275
15852
  publishedBy: string | null;
15276
15853
  rowId: number;
@@ -15401,6 +15978,7 @@ declare const router: {
15401
15978
  optimizedSize: number | null;
15402
15979
  path: string;
15403
15980
  projectId: number;
15981
+ publicationId: string | null;
15404
15982
  publishedAt: number | null;
15405
15983
  publishedBy: string | null;
15406
15984
  rowId: number;
@@ -15425,6 +16003,7 @@ declare const router: {
15425
16003
  optimizedSize: number | null;
15426
16004
  path: string;
15427
16005
  projectId: number;
16006
+ publicationId: string | null;
15428
16007
  publishedAt: number | null;
15429
16008
  publishedBy: string | null;
15430
16009
  rowId: number;
@@ -15543,6 +16122,7 @@ declare const router: {
15543
16122
  optimizedSize: number | null;
15544
16123
  path: string;
15545
16124
  projectId: number;
16125
+ publicationId: string | null;
15546
16126
  publishedAt: number | null;
15547
16127
  publishedBy: string | null;
15548
16128
  rowId: number;
@@ -15567,6 +16147,7 @@ declare const router: {
15567
16147
  optimizedSize: number | null;
15568
16148
  path: string;
15569
16149
  projectId: number;
16150
+ publicationId: string | null;
15570
16151
  publishedAt: number | null;
15571
16152
  publishedBy: string | null;
15572
16153
  rowId: number;
@@ -15684,6 +16265,7 @@ declare const router: {
15684
16265
  optimizedSize: number | null;
15685
16266
  path: string;
15686
16267
  projectId: number;
16268
+ publicationId: string | null;
15687
16269
  publishedAt: number | null;
15688
16270
  publishedBy: string | null;
15689
16271
  rowId: number;
@@ -15708,6 +16290,7 @@ declare const router: {
15708
16290
  optimizedSize: number | null;
15709
16291
  path: string;
15710
16292
  projectId: number;
16293
+ publicationId: string | null;
15711
16294
  publishedAt: number | null;
15712
16295
  publishedBy: string | null;
15713
16296
  rowId: number;
@@ -15919,6 +16502,7 @@ declare const router: {
15919
16502
  optimizedSize: number | null;
15920
16503
  path: string;
15921
16504
  projectId: number;
16505
+ publicationId: string | null;
15922
16506
  publishedAt: number | null;
15923
16507
  publishedBy: string | null;
15924
16508
  rowId: number;
@@ -15943,6 +16527,7 @@ declare const router: {
15943
16527
  optimizedSize: number | null;
15944
16528
  path: string;
15945
16529
  projectId: number;
16530
+ publicationId: string | null;
15946
16531
  publishedAt: number | null;
15947
16532
  publishedBy: string | null;
15948
16533
  rowId: number;
@@ -16019,6 +16604,7 @@ declare const router: {
16019
16604
  optimizedSize: number | null;
16020
16605
  path: string;
16021
16606
  projectId: number;
16607
+ publicationId: string | null;
16022
16608
  publishedAt: number | null;
16023
16609
  publishedBy: string | null;
16024
16610
  rowId: number;
@@ -16043,6 +16629,7 @@ declare const router: {
16043
16629
  optimizedSize: number | null;
16044
16630
  path: string;
16045
16631
  projectId: number;
16632
+ publicationId: string | null;
16046
16633
  publishedAt: number | null;
16047
16634
  publishedBy: string | null;
16048
16635
  rowId: number;
@@ -16082,6 +16669,7 @@ declare const router: {
16082
16669
  parentItemId: string | null;
16083
16670
  position: string;
16084
16671
  projectId: number | null;
16672
+ publicationId: string | null;
16085
16673
  publishedAt: number | null;
16086
16674
  publishedBy: string | null;
16087
16675
  rowId: number;
@@ -16112,6 +16700,7 @@ declare const router: {
16112
16700
  parentItemId: string | null;
16113
16701
  position: string;
16114
16702
  projectId: number | null;
16703
+ publicationId: string | null;
16115
16704
  publishedAt: number | null;
16116
16705
  publishedBy: string | null;
16117
16706
  rowId: number;
@@ -16245,6 +16834,7 @@ declare const router: {
16245
16834
  parentItemId: string | null;
16246
16835
  position: string;
16247
16836
  projectId: number | null;
16837
+ publicationId: string | null;
16248
16838
  publishedAt: number | null;
16249
16839
  publishedBy: string | null;
16250
16840
  rowId: number;
@@ -16268,6 +16858,7 @@ declare const router: {
16268
16858
  parentItemId: string | null;
16269
16859
  position: string;
16270
16860
  projectId: number | null;
16861
+ publicationId: string | null;
16271
16862
  publishedAt: number | null;
16272
16863
  publishedBy: string | null;
16273
16864
  rowId: number;
@@ -16385,6 +16976,7 @@ declare const router: {
16385
16976
  parentItemId: string | null;
16386
16977
  position: string;
16387
16978
  projectId: number | null;
16979
+ publicationId: string | null;
16388
16980
  publishedAt: number | null;
16389
16981
  publishedBy: string | null;
16390
16982
  rowId: number;
@@ -16408,6 +17000,7 @@ declare const router: {
16408
17000
  parentItemId: string | null;
16409
17001
  position: string;
16410
17002
  projectId: number | null;
17003
+ publicationId: string | null;
16411
17004
  publishedAt: number | null;
16412
17005
  publishedBy: string | null;
16413
17006
  rowId: number;
@@ -16525,6 +17118,7 @@ declare const router: {
16525
17118
  parentItemId: string | null;
16526
17119
  position: string;
16527
17120
  projectId: number | null;
17121
+ publicationId: string | null;
16528
17122
  publishedAt: number | null;
16529
17123
  publishedBy: string | null;
16530
17124
  rowId: number;
@@ -16548,6 +17142,7 @@ declare const router: {
16548
17142
  parentItemId: string | null;
16549
17143
  position: string;
16550
17144
  projectId: number | null;
17145
+ publicationId: string | null;
16551
17146
  publishedAt: number | null;
16552
17147
  publishedBy: string | null;
16553
17148
  rowId: number;
@@ -16666,6 +17261,7 @@ declare const router: {
16666
17261
  parentItemId: string | null;
16667
17262
  position: string;
16668
17263
  projectId: number | null;
17264
+ publicationId: string | null;
16669
17265
  publishedAt: number | null;
16670
17266
  publishedBy: string | null;
16671
17267
  rowId: number;
@@ -16689,6 +17285,7 @@ declare const router: {
16689
17285
  parentItemId: string | null;
16690
17286
  position: string;
16691
17287
  projectId: number | null;
17288
+ publicationId: string | null;
16692
17289
  publishedAt: number | null;
16693
17290
  publishedBy: string | null;
16694
17291
  rowId: number;
@@ -16805,6 +17402,7 @@ declare const router: {
16805
17402
  parentItemId: string | null;
16806
17403
  position: string;
16807
17404
  projectId: number | null;
17405
+ publicationId: string | null;
16808
17406
  publishedAt: number | null;
16809
17407
  publishedBy: string | null;
16810
17408
  rowId: number;
@@ -16828,6 +17426,7 @@ declare const router: {
16828
17426
  parentItemId: string | null;
16829
17427
  position: string;
16830
17428
  projectId: number | null;
17429
+ publicationId: string | null;
16831
17430
  publishedAt: number | null;
16832
17431
  publishedBy: string | null;
16833
17432
  rowId: number;
@@ -16903,6 +17502,7 @@ declare const router: {
16903
17502
  parentItemId: string | null;
16904
17503
  position: string;
16905
17504
  projectId: number | null;
17505
+ publicationId: string | null;
16906
17506
  publishedAt: number | null;
16907
17507
  publishedBy: string | null;
16908
17508
  rowId: number;
@@ -16926,6 +17526,7 @@ declare const router: {
16926
17526
  parentItemId: string | null;
16927
17527
  position: string;
16928
17528
  projectId: number | null;
17529
+ publicationId: string | null;
16929
17530
  publishedAt: number | null;
16930
17531
  publishedBy: string | null;
16931
17532
  rowId: number;
@@ -17042,6 +17643,7 @@ declare const router: {
17042
17643
  parentItemId: string | null;
17043
17644
  position: string;
17044
17645
  projectId: number | null;
17646
+ publicationId: string | null;
17045
17647
  publishedAt: number | null;
17046
17648
  publishedBy: string | null;
17047
17649
  rowId: number;
@@ -17065,6 +17667,7 @@ declare const router: {
17065
17667
  parentItemId: string | null;
17066
17668
  position: string;
17067
17669
  projectId: number | null;
17670
+ publicationId: string | null;
17068
17671
  publishedAt: number | null;
17069
17672
  publishedBy: string | null;
17070
17673
  rowId: number;
@@ -18433,7 +19036,7 @@ declare const router: {
18433
19036
  token: import("zod").ZodOptional<import("zod").ZodString>;
18434
19037
  revision: import("zod").ZodOptional<import("zod").ZodString>;
18435
19038
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<PublishResult, PublishResult>, Record<never, never>, Record<never, never>>;
18436
- delete: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19039
+ archive: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
18437
19040
  draft: DraftRequest | null;
18438
19041
  locale: string | undefined;
18439
19042
  publishingDraft: string | undefined;
@@ -18485,11 +19088,416 @@ declare const router: {
18485
19088
  }>, import("zod").ZodObject<{
18486
19089
  projectId: import("zod").ZodNumber;
18487
19090
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
18488
- ended: import("@camox/api-contract/drafts").EndedDraft | null;
19091
+ archived: import("@camox/api-contract/drafts").ArchivedDraft;
18489
19092
  }, {
18490
- ended: import("@camox/api-contract/drafts").EndedDraft | null;
19093
+ archived: import("@camox/api-contract/drafts").ArchivedDraft;
18491
19094
  }>, Record<never, never>, Record<never, never>>;
18492
- revertToLive: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19095
+ restore: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19096
+ draft: DraftRequest | null;
19097
+ locale: string | undefined;
19098
+ publishingDraft: string | undefined;
19099
+ look: LookGrant | undefined;
19100
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19101
+ draft: DraftRequest | null;
19102
+ locale: string | undefined;
19103
+ publishingDraft: string | undefined;
19104
+ look: LookGrant | undefined;
19105
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19106
+ draft: DraftRequest | null;
19107
+ locale: string | undefined;
19108
+ publishingDraft: string | undefined;
19109
+ look: LookGrant | undefined;
19110
+ }>, {
19111
+ db: Database;
19112
+ env: Bindings;
19113
+ headers: Headers;
19114
+ client: string;
19115
+ telemetryDisabled: boolean;
19116
+ waitUntil: (promise: Promise<unknown>) => void;
19117
+ apiOrigin?: string;
19118
+ draft: DraftRequest | null;
19119
+ locale: string | undefined;
19120
+ publishingDraft: string | undefined;
19121
+ look: LookGrant | undefined;
19122
+ user: {
19123
+ id: string;
19124
+ createdAt: Date;
19125
+ updatedAt: Date;
19126
+ email: string;
19127
+ emailVerified: boolean;
19128
+ name: string;
19129
+ image?: string | null | undefined;
19130
+ };
19131
+ session: {
19132
+ id: string;
19133
+ createdAt: Date;
19134
+ updatedAt: Date;
19135
+ userId: string;
19136
+ expiresAt: Date;
19137
+ token: string;
19138
+ ipAddress?: string | null | undefined;
19139
+ userAgent?: string | null | undefined;
19140
+ activeOrganizationId?: string | null | undefined;
19141
+ local?: boolean | null | undefined;
19142
+ studio?: boolean | null | undefined;
19143
+ };
19144
+ }>, import("zod").ZodObject<{
19145
+ projectId: import("zod").ZodNumber;
19146
+ draftId: import("zod").ZodString;
19147
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19148
+ draftId: string;
19149
+ }, {
19150
+ draftId: string;
19151
+ }>, Record<never, never>, Record<never, never>>;
19152
+ listArchived: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19153
+ draft: DraftRequest | null;
19154
+ locale: string | undefined;
19155
+ publishingDraft: string | undefined;
19156
+ look: LookGrant | undefined;
19157
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19158
+ draft: DraftRequest | null;
19159
+ locale: string | undefined;
19160
+ publishingDraft: string | undefined;
19161
+ look: LookGrant | undefined;
19162
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19163
+ draft: DraftRequest | null;
19164
+ locale: string | undefined;
19165
+ publishingDraft: string | undefined;
19166
+ look: LookGrant | undefined;
19167
+ }>, {
19168
+ db: Database;
19169
+ env: Bindings;
19170
+ headers: Headers;
19171
+ client: string;
19172
+ telemetryDisabled: boolean;
19173
+ waitUntil: (promise: Promise<unknown>) => void;
19174
+ apiOrigin?: string;
19175
+ draft: DraftRequest | null;
19176
+ locale: string | undefined;
19177
+ publishingDraft: string | undefined;
19178
+ look: LookGrant | undefined;
19179
+ user: {
19180
+ id: string;
19181
+ createdAt: Date;
19182
+ updatedAt: Date;
19183
+ email: string;
19184
+ emailVerified: boolean;
19185
+ name: string;
19186
+ image?: string | null | undefined;
19187
+ };
19188
+ session: {
19189
+ id: string;
19190
+ createdAt: Date;
19191
+ updatedAt: Date;
19192
+ userId: string;
19193
+ expiresAt: Date;
19194
+ token: string;
19195
+ ipAddress?: string | null | undefined;
19196
+ userAgent?: string | null | undefined;
19197
+ activeOrganizationId?: string | null | undefined;
19198
+ local?: boolean | null | undefined;
19199
+ studio?: boolean | null | undefined;
19200
+ };
19201
+ }>, import("zod").ZodObject<{
19202
+ projectId: import("zod").ZodNumber;
19203
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19204
+ drafts: ArchivedDraftSummary[];
19205
+ }, {
19206
+ drafts: ArchivedDraftSummary[];
19207
+ }>, Record<never, never>, Record<never, never>>;
19208
+ delete: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19209
+ draft: DraftRequest | null;
19210
+ locale: string | undefined;
19211
+ publishingDraft: string | undefined;
19212
+ look: LookGrant | undefined;
19213
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19214
+ draft: DraftRequest | null;
19215
+ locale: string | undefined;
19216
+ publishingDraft: string | undefined;
19217
+ look: LookGrant | undefined;
19218
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19219
+ draft: DraftRequest | null;
19220
+ locale: string | undefined;
19221
+ publishingDraft: string | undefined;
19222
+ look: LookGrant | undefined;
19223
+ }>, {
19224
+ db: Database;
19225
+ env: Bindings;
19226
+ headers: Headers;
19227
+ client: string;
19228
+ telemetryDisabled: boolean;
19229
+ waitUntil: (promise: Promise<unknown>) => void;
19230
+ apiOrigin?: string;
19231
+ draft: DraftRequest | null;
19232
+ locale: string | undefined;
19233
+ publishingDraft: string | undefined;
19234
+ look: LookGrant | undefined;
19235
+ user: {
19236
+ id: string;
19237
+ createdAt: Date;
19238
+ updatedAt: Date;
19239
+ email: string;
19240
+ emailVerified: boolean;
19241
+ name: string;
19242
+ image?: string | null | undefined;
19243
+ };
19244
+ session: {
19245
+ id: string;
19246
+ createdAt: Date;
19247
+ updatedAt: Date;
19248
+ userId: string;
19249
+ expiresAt: Date;
19250
+ token: string;
19251
+ ipAddress?: string | null | undefined;
19252
+ userAgent?: string | null | undefined;
19253
+ activeOrganizationId?: string | null | undefined;
19254
+ local?: boolean | null | undefined;
19255
+ studio?: boolean | null | undefined;
19256
+ };
19257
+ }>, import("zod").ZodObject<{
19258
+ projectId: import("zod").ZodNumber;
19259
+ draftId: import("zod").ZodString;
19260
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19261
+ ended: import("@camox/api-contract/drafts").EndedDraft | null;
19262
+ }, {
19263
+ ended: import("@camox/api-contract/drafts").EndedDraft | null;
19264
+ }>, Record<never, never>, Record<never, never>>;
19265
+ revertToLive: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19266
+ draft: DraftRequest | null;
19267
+ locale: string | undefined;
19268
+ publishingDraft: string | undefined;
19269
+ look: LookGrant | undefined;
19270
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19271
+ draft: DraftRequest | null;
19272
+ locale: string | undefined;
19273
+ publishingDraft: string | undefined;
19274
+ look: LookGrant | undefined;
19275
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19276
+ draft: DraftRequest | null;
19277
+ locale: string | undefined;
19278
+ publishingDraft: string | undefined;
19279
+ look: LookGrant | undefined;
19280
+ }>, {
19281
+ db: Database;
19282
+ env: Bindings;
19283
+ headers: Headers;
19284
+ client: string;
19285
+ telemetryDisabled: boolean;
19286
+ waitUntil: (promise: Promise<unknown>) => void;
19287
+ apiOrigin?: string;
19288
+ draft: DraftRequest | null;
19289
+ locale: string | undefined;
19290
+ publishingDraft: string | undefined;
19291
+ look: LookGrant | undefined;
19292
+ user: {
19293
+ id: string;
19294
+ createdAt: Date;
19295
+ updatedAt: Date;
19296
+ email: string;
19297
+ emailVerified: boolean;
19298
+ name: string;
19299
+ image?: string | null | undefined;
19300
+ };
19301
+ session: {
19302
+ id: string;
19303
+ createdAt: Date;
19304
+ updatedAt: Date;
19305
+ userId: string;
19306
+ expiresAt: Date;
19307
+ token: string;
19308
+ ipAddress?: string | null | undefined;
19309
+ userAgent?: string | null | undefined;
19310
+ activeOrganizationId?: string | null | undefined;
19311
+ local?: boolean | null | undefined;
19312
+ studio?: boolean | null | undefined;
19313
+ };
19314
+ }>, import("zod").ZodObject<{
19315
+ projectId: import("zod").ZodNumber;
19316
+ entity: import("zod").ZodEnum<{
19317
+ block: "block";
19318
+ exclusion: "exclusion";
19319
+ file: "file";
19320
+ locale: "locale";
19321
+ page: "page";
19322
+ record: "record";
19323
+ repeatableItem: "repeatableItem";
19324
+ sharedContent: "sharedContent";
19325
+ }>;
19326
+ id: import("zod").ZodString;
19327
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{}, {}>, Record<never, never>, Record<never, never>>;
19328
+ };
19329
+ publications: {
19330
+ list: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19331
+ draft: DraftRequest | null;
19332
+ locale: string | undefined;
19333
+ publishingDraft: string | undefined;
19334
+ look: LookGrant | undefined;
19335
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19336
+ draft: DraftRequest | null;
19337
+ locale: string | undefined;
19338
+ publishingDraft: string | undefined;
19339
+ look: LookGrant | undefined;
19340
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19341
+ draft: DraftRequest | null;
19342
+ locale: string | undefined;
19343
+ publishingDraft: string | undefined;
19344
+ look: LookGrant | undefined;
19345
+ }>, {
19346
+ db: Database;
19347
+ env: Bindings;
19348
+ headers: Headers;
19349
+ client: string;
19350
+ telemetryDisabled: boolean;
19351
+ waitUntil: (promise: Promise<unknown>) => void;
19352
+ apiOrigin?: string;
19353
+ draft: DraftRequest | null;
19354
+ locale: string | undefined;
19355
+ publishingDraft: string | undefined;
19356
+ look: LookGrant | undefined;
19357
+ user: {
19358
+ id: string;
19359
+ createdAt: Date;
19360
+ updatedAt: Date;
19361
+ email: string;
19362
+ emailVerified: boolean;
19363
+ name: string;
19364
+ image?: string | null | undefined;
19365
+ };
19366
+ session: {
19367
+ id: string;
19368
+ createdAt: Date;
19369
+ updatedAt: Date;
19370
+ userId: string;
19371
+ expiresAt: Date;
19372
+ token: string;
19373
+ ipAddress?: string | null | undefined;
19374
+ userAgent?: string | null | undefined;
19375
+ activeOrganizationId?: string | null | undefined;
19376
+ local?: boolean | null | undefined;
19377
+ studio?: boolean | null | undefined;
19378
+ };
19379
+ }>, import("zod").ZodObject<{
19380
+ projectId: import("zod").ZodNumber;
19381
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19382
+ publications: PublicationSummary[];
19383
+ }, {
19384
+ publications: PublicationSummary[];
19385
+ }>, Record<never, never>, Record<never, never>>;
19386
+ get: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19387
+ draft: DraftRequest | null;
19388
+ locale: string | undefined;
19389
+ publishingDraft: string | undefined;
19390
+ look: LookGrant | undefined;
19391
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19392
+ draft: DraftRequest | null;
19393
+ locale: string | undefined;
19394
+ publishingDraft: string | undefined;
19395
+ look: LookGrant | undefined;
19396
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19397
+ draft: DraftRequest | null;
19398
+ locale: string | undefined;
19399
+ publishingDraft: string | undefined;
19400
+ look: LookGrant | undefined;
19401
+ }>, {
19402
+ db: Database;
19403
+ env: Bindings;
19404
+ headers: Headers;
19405
+ client: string;
19406
+ telemetryDisabled: boolean;
19407
+ waitUntil: (promise: Promise<unknown>) => void;
19408
+ apiOrigin?: string;
19409
+ draft: DraftRequest | null;
19410
+ locale: string | undefined;
19411
+ publishingDraft: string | undefined;
19412
+ look: LookGrant | undefined;
19413
+ user: {
19414
+ id: string;
19415
+ createdAt: Date;
19416
+ updatedAt: Date;
19417
+ email: string;
19418
+ emailVerified: boolean;
19419
+ name: string;
19420
+ image?: string | null | undefined;
19421
+ };
19422
+ session: {
19423
+ id: string;
19424
+ createdAt: Date;
19425
+ updatedAt: Date;
19426
+ userId: string;
19427
+ expiresAt: Date;
19428
+ token: string;
19429
+ ipAddress?: string | null | undefined;
19430
+ userAgent?: string | null | undefined;
19431
+ activeOrganizationId?: string | null | undefined;
19432
+ local?: boolean | null | undefined;
19433
+ studio?: boolean | null | undefined;
19434
+ };
19435
+ }>, import("zod").ZodObject<{
19436
+ projectId: import("zod").ZodNumber;
19437
+ id: import("zod").ZodString;
19438
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19439
+ publication: PublicationRead;
19440
+ }, {
19441
+ publication: PublicationRead;
19442
+ }>, Record<never, never>, Record<never, never>>;
19443
+ revert: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19444
+ draft: DraftRequest | null;
19445
+ locale: string | undefined;
19446
+ publishingDraft: string | undefined;
19447
+ look: LookGrant | undefined;
19448
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19449
+ draft: DraftRequest | null;
19450
+ locale: string | undefined;
19451
+ publishingDraft: string | undefined;
19452
+ look: LookGrant | undefined;
19453
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
19454
+ draft: DraftRequest | null;
19455
+ locale: string | undefined;
19456
+ publishingDraft: string | undefined;
19457
+ look: LookGrant | undefined;
19458
+ }>, {
19459
+ db: Database;
19460
+ env: Bindings;
19461
+ headers: Headers;
19462
+ client: string;
19463
+ telemetryDisabled: boolean;
19464
+ waitUntil: (promise: Promise<unknown>) => void;
19465
+ apiOrigin?: string;
19466
+ draft: DraftRequest | null;
19467
+ locale: string | undefined;
19468
+ publishingDraft: string | undefined;
19469
+ look: LookGrant | undefined;
19470
+ user: {
19471
+ id: string;
19472
+ createdAt: Date;
19473
+ updatedAt: Date;
19474
+ email: string;
19475
+ emailVerified: boolean;
19476
+ name: string;
19477
+ image?: string | null | undefined;
19478
+ };
19479
+ session: {
19480
+ id: string;
19481
+ createdAt: Date;
19482
+ updatedAt: Date;
19483
+ userId: string;
19484
+ expiresAt: Date;
19485
+ token: string;
19486
+ ipAddress?: string | null | undefined;
19487
+ userAgent?: string | null | undefined;
19488
+ activeOrganizationId?: string | null | undefined;
19489
+ local?: boolean | null | undefined;
19490
+ studio?: boolean | null | undefined;
19491
+ };
19492
+ }>, import("zod").ZodObject<{
19493
+ projectId: import("zod").ZodNumber;
19494
+ id: import("zod").ZodString;
19495
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
19496
+ draftId: string;
19497
+ }, {
19498
+ draftId: string;
19499
+ }>, Record<never, never>, Record<never, never>>;
19500
+ clearThread: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
18493
19501
  draft: DraftRequest | null;
18494
19502
  locale: string | undefined;
18495
19503
  publishingDraft: string | undefined;
@@ -18540,16 +19548,6 @@ declare const router: {
18540
19548
  };
18541
19549
  }>, import("zod").ZodObject<{
18542
19550
  projectId: import("zod").ZodNumber;
18543
- entity: import("zod").ZodEnum<{
18544
- block: "block";
18545
- exclusion: "exclusion";
18546
- file: "file";
18547
- locale: "locale";
18548
- page: "page";
18549
- record: "record";
18550
- repeatableItem: "repeatableItem";
18551
- sharedContent: "sharedContent";
18552
- }>;
18553
19551
  id: import("zod").ZodString;
18554
19552
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{}, {}>, Record<never, never>, Record<never, never>>;
18555
19553
  };