@camox/api-contract 0.76.0 → 0.77.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/threads.d.ts CHANGED
@@ -251,13 +251,19 @@ export declare const pushDataSchema: z.ZodObject<{
251
251
  }>;
252
252
  }, z.core.$strip>;
253
253
  export type PushData = z.infer<typeof pushDataSchema>;
254
- /** What an editor's message entry records: who sent it, and the operation id it was sent with. */
254
+ /**
255
+ * What an editor's message entry records: who sent it, the operation id it was sent with, and the
256
+ * locale they were in as they sent it, which lets the agent change that locale's localizations
257
+ * (ADR 0048).
258
+ */
255
259
  export declare const editorMessageDataSchema: z.ZodObject<{
256
260
  id: z.ZodString;
257
261
  name: z.ZodString;
258
262
  image: z.ZodNullable<z.ZodString>;
259
263
  operationId: z.ZodOptional<z.ZodString>;
264
+ locale: z.ZodOptional<z.ZodString>;
260
265
  }, z.core.$strip>;
266
+ export type EditorMessageData = z.infer<typeof editorMessageDataSchema>;
261
267
  /**
262
268
  * A draft the agent on Live started with `startDraft`, or restored with `restoreDraft`, and the
263
269
  * operation ids of the messages of the run that did: the studio that sent one of them enters the draft, if it still shows
package/dist/threads.js CHANGED
@@ -157,6 +157,7 @@ const CHANGING_TOOLS = /* @__PURE__ */ new Set([
157
157
  "editCollectionRecord",
158
158
  "moveBlock",
159
159
  "removeLocale",
160
+ "retranslateLocalization",
160
161
  "setPageLayout",
161
162
  "setPageSeo",
162
163
  "updateFile",
@@ -221,8 +222,15 @@ const pushDataSchema = z.object({
221
222
  subjects: z.array(z.string()),
222
223
  outcome: pushOutcomeSchema
223
224
  });
224
- /** What an editor's message entry records: who sent it, and the operation id it was sent with. */
225
- const editorMessageDataSchema = threadSenderSchema.extend({ operationId: z.string().optional() });
225
+ /**
226
+ * What an editor's message entry records: who sent it, the operation id it was sent with, and the
227
+ * locale they were in as they sent it, which lets the agent change that locale's localizations
228
+ * (ADR 0048).
229
+ */
230
+ const editorMessageDataSchema = threadSenderSchema.extend({
231
+ operationId: z.string().optional(),
232
+ locale: z.string().optional()
233
+ });
226
234
  /**
227
235
  * A draft the agent on Live started with `startDraft`, or restored with `restoreDraft`, and the
228
236
  * operation ids of the messages of the run that did: the studio that sent one of them enters the draft, if it still shows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/api-contract",
3
- "version": "0.76.0",
3
+ "version": "0.77.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "src",
package/src/drafts.ts CHANGED
@@ -320,9 +320,11 @@ const LOCALE_WRITES: Record<keyof Router["locales"], boolean> = {
320
320
  list: false,
321
321
  add: true,
322
322
  remove: true,
323
+ setDefault: true,
323
324
  setDefaultTag: false,
324
325
  listMissing: false,
325
326
  addBack: true,
327
+ retranslate: true,
326
328
  };
327
329
 
328
330
  // Applying a finding's fix edits content as the member would; dismissing one is the project's,
package/src/threads.ts CHANGED
@@ -191,6 +191,7 @@ export const CHANGING_TOOLS: ReadonlySet<string> = new Set([
191
191
  "editCollectionRecord",
192
192
  "moveBlock",
193
193
  "removeLocale",
194
+ "retranslateLocalization",
194
195
  "setPageLayout",
195
196
  "setPageSeo",
196
197
  "updateFile",
@@ -284,10 +285,16 @@ export const pushDataSchema = z.object({
284
285
  });
285
286
  export type PushData = z.infer<typeof pushDataSchema>;
286
287
 
287
- /** What an editor's message entry records: who sent it, and the operation id it was sent with. */
288
+ /**
289
+ * What an editor's message entry records: who sent it, the operation id it was sent with, and the
290
+ * locale they were in as they sent it, which lets the agent change that locale's localizations
291
+ * (ADR 0048).
292
+ */
288
293
  export const editorMessageDataSchema = threadSenderSchema.extend({
289
294
  operationId: z.string().optional(),
295
+ locale: z.string().optional(),
290
296
  });
297
+ export type EditorMessageData = z.infer<typeof editorMessageDataSchema>;
291
298
 
292
299
  /**
293
300
  * A draft the agent on Live started with `startDraft`, or restored with `restoreDraft`, and the