@camox/api-contract 0.76.1 → 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/drafts.js +3 -1
- package/dist/router.d.ts +206 -2
- package/dist/threads.d.ts +7 -1
- package/dist/threads.js +10 -2
- package/package.json +1 -1
- package/src/drafts.ts +2 -0
- package/src/threads.ts +8 -1
package/dist/drafts.js
CHANGED
|
@@ -209,9 +209,11 @@ const LOCALE_WRITES = {
|
|
|
209
209
|
list: false,
|
|
210
210
|
add: true,
|
|
211
211
|
remove: true,
|
|
212
|
+
setDefault: true,
|
|
212
213
|
setDefaultTag: false,
|
|
213
214
|
listMissing: false,
|
|
214
|
-
addBack: true
|
|
215
|
+
addBack: true,
|
|
216
|
+
retranslate: true
|
|
215
217
|
};
|
|
216
218
|
const SPECIALISTS_WRITES = {
|
|
217
219
|
get: false,
|
package/dist/router.d.ts
CHANGED
|
@@ -9617,6 +9617,8 @@ type TurnOutcome = TurnEnd | {
|
|
|
9617
9617
|
type OpeningSender = {
|
|
9618
9618
|
kind: "editor";
|
|
9619
9619
|
editor: ThreadSender;
|
|
9620
|
+
/** The locale the editor was in as they sent it, in the studio. */
|
|
9621
|
+
locale?: string;
|
|
9620
9622
|
} | {
|
|
9621
9623
|
kind: "connectedAgent";
|
|
9622
9624
|
member: ThreadSender;
|
|
@@ -15742,6 +15744,100 @@ declare const router: {
|
|
|
15742
15744
|
projectId: import("zod").ZodNumber;
|
|
15743
15745
|
tag: import("zod").ZodString;
|
|
15744
15746
|
}, import("zod/v4/core").$strip>, import("@orpc/server").Schema<LocaleView, LocaleView>, Record<never, never>, Record<never, never>>;
|
|
15747
|
+
setDefault: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
|
|
15748
|
+
draft: DraftRequest | null;
|
|
15749
|
+
locale: string | undefined;
|
|
15750
|
+
publishingDraft: string | undefined;
|
|
15751
|
+
look: LookGrant | undefined;
|
|
15752
|
+
}>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
15753
|
+
draft: DraftRequest | null;
|
|
15754
|
+
locale: string | undefined;
|
|
15755
|
+
publishingDraft: string | undefined;
|
|
15756
|
+
look: LookGrant | undefined;
|
|
15757
|
+
}>>, {
|
|
15758
|
+
draft: DraftRequest | null;
|
|
15759
|
+
} & Record<never, never>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
15760
|
+
draft: DraftRequest | null;
|
|
15761
|
+
locale: string | undefined;
|
|
15762
|
+
publishingDraft: string | undefined;
|
|
15763
|
+
look: LookGrant | undefined;
|
|
15764
|
+
}>, {
|
|
15765
|
+
db: Database;
|
|
15766
|
+
env: Bindings;
|
|
15767
|
+
headers: Headers;
|
|
15768
|
+
client: string;
|
|
15769
|
+
telemetryDisabled: boolean;
|
|
15770
|
+
waitUntil: (promise: Promise<unknown>) => void;
|
|
15771
|
+
apiOrigin?: string;
|
|
15772
|
+
draft: DraftRequest | null;
|
|
15773
|
+
locale: string | undefined;
|
|
15774
|
+
publishingDraft: string | undefined;
|
|
15775
|
+
look: LookGrant | undefined;
|
|
15776
|
+
user: {
|
|
15777
|
+
id: string;
|
|
15778
|
+
createdAt: Date;
|
|
15779
|
+
updatedAt: Date;
|
|
15780
|
+
email: string;
|
|
15781
|
+
emailVerified: boolean;
|
|
15782
|
+
name: string;
|
|
15783
|
+
image?: string | null | undefined;
|
|
15784
|
+
};
|
|
15785
|
+
session: {
|
|
15786
|
+
id: string;
|
|
15787
|
+
createdAt: Date;
|
|
15788
|
+
updatedAt: Date;
|
|
15789
|
+
userId: string;
|
|
15790
|
+
expiresAt: Date;
|
|
15791
|
+
token: string;
|
|
15792
|
+
ipAddress?: string | null | undefined;
|
|
15793
|
+
userAgent?: string | null | undefined;
|
|
15794
|
+
activeOrganizationId?: string | null | undefined;
|
|
15795
|
+
local?: boolean | null | undefined;
|
|
15796
|
+
studio?: boolean | null | undefined;
|
|
15797
|
+
};
|
|
15798
|
+
}>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
15799
|
+
draft: DraftRequest | null;
|
|
15800
|
+
locale: string | undefined;
|
|
15801
|
+
publishingDraft: string | undefined;
|
|
15802
|
+
look: LookGrant | undefined;
|
|
15803
|
+
}>, {
|
|
15804
|
+
db: Database;
|
|
15805
|
+
env: Bindings;
|
|
15806
|
+
headers: Headers;
|
|
15807
|
+
client: string;
|
|
15808
|
+
telemetryDisabled: boolean;
|
|
15809
|
+
waitUntil: (promise: Promise<unknown>) => void;
|
|
15810
|
+
apiOrigin?: string;
|
|
15811
|
+
draft: DraftRequest | null;
|
|
15812
|
+
locale: string | undefined;
|
|
15813
|
+
publishingDraft: string | undefined;
|
|
15814
|
+
look: LookGrant | undefined;
|
|
15815
|
+
user: {
|
|
15816
|
+
id: string;
|
|
15817
|
+
createdAt: Date;
|
|
15818
|
+
updatedAt: Date;
|
|
15819
|
+
email: string;
|
|
15820
|
+
emailVerified: boolean;
|
|
15821
|
+
name: string;
|
|
15822
|
+
image?: string | null | undefined;
|
|
15823
|
+
};
|
|
15824
|
+
session: {
|
|
15825
|
+
id: string;
|
|
15826
|
+
createdAt: Date;
|
|
15827
|
+
updatedAt: Date;
|
|
15828
|
+
userId: string;
|
|
15829
|
+
expiresAt: Date;
|
|
15830
|
+
token: string;
|
|
15831
|
+
ipAddress?: string | null | undefined;
|
|
15832
|
+
userAgent?: string | null | undefined;
|
|
15833
|
+
activeOrganizationId?: string | null | undefined;
|
|
15834
|
+
local?: boolean | null | undefined;
|
|
15835
|
+
studio?: boolean | null | undefined;
|
|
15836
|
+
};
|
|
15837
|
+
}>, Record<never, never>>, import("zod").ZodObject<{
|
|
15838
|
+
projectId: import("zod").ZodNumber;
|
|
15839
|
+
tag: import("zod").ZodString;
|
|
15840
|
+
}, import("zod/v4/core").$strip>, import("@orpc/server").Schema<LocaleView, LocaleView>, Record<never, never>, Record<never, never>>;
|
|
15745
15841
|
setDefaultTag: 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>>, {
|
|
15746
15842
|
draft: DraftRequest | null;
|
|
15747
15843
|
locale: string | undefined;
|
|
@@ -15957,6 +16053,114 @@ declare const router: {
|
|
|
15957
16053
|
entity: "page" | "record";
|
|
15958
16054
|
id: string;
|
|
15959
16055
|
}>, Record<never, never>, Record<never, never>>;
|
|
16056
|
+
retranslate: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
|
|
16057
|
+
draft: DraftRequest | null;
|
|
16058
|
+
locale: string | undefined;
|
|
16059
|
+
publishingDraft: string | undefined;
|
|
16060
|
+
look: LookGrant | undefined;
|
|
16061
|
+
}>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
16062
|
+
draft: DraftRequest | null;
|
|
16063
|
+
locale: string | undefined;
|
|
16064
|
+
publishingDraft: string | undefined;
|
|
16065
|
+
look: LookGrant | undefined;
|
|
16066
|
+
}>>, {
|
|
16067
|
+
draft: DraftRequest | null;
|
|
16068
|
+
} & Record<never, never>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
16069
|
+
draft: DraftRequest | null;
|
|
16070
|
+
locale: string | undefined;
|
|
16071
|
+
publishingDraft: string | undefined;
|
|
16072
|
+
look: LookGrant | undefined;
|
|
16073
|
+
}>, {
|
|
16074
|
+
db: Database;
|
|
16075
|
+
env: Bindings;
|
|
16076
|
+
headers: Headers;
|
|
16077
|
+
client: string;
|
|
16078
|
+
telemetryDisabled: boolean;
|
|
16079
|
+
waitUntil: (promise: Promise<unknown>) => void;
|
|
16080
|
+
apiOrigin?: string;
|
|
16081
|
+
draft: DraftRequest | null;
|
|
16082
|
+
locale: string | undefined;
|
|
16083
|
+
publishingDraft: string | undefined;
|
|
16084
|
+
look: LookGrant | undefined;
|
|
16085
|
+
user: {
|
|
16086
|
+
id: string;
|
|
16087
|
+
createdAt: Date;
|
|
16088
|
+
updatedAt: Date;
|
|
16089
|
+
email: string;
|
|
16090
|
+
emailVerified: boolean;
|
|
16091
|
+
name: string;
|
|
16092
|
+
image?: string | null | undefined;
|
|
16093
|
+
};
|
|
16094
|
+
session: {
|
|
16095
|
+
id: string;
|
|
16096
|
+
createdAt: Date;
|
|
16097
|
+
updatedAt: Date;
|
|
16098
|
+
userId: string;
|
|
16099
|
+
expiresAt: Date;
|
|
16100
|
+
token: string;
|
|
16101
|
+
ipAddress?: string | null | undefined;
|
|
16102
|
+
userAgent?: string | null | undefined;
|
|
16103
|
+
activeOrganizationId?: string | null | undefined;
|
|
16104
|
+
local?: boolean | null | undefined;
|
|
16105
|
+
studio?: boolean | null | undefined;
|
|
16106
|
+
};
|
|
16107
|
+
}>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
|
|
16108
|
+
draft: DraftRequest | null;
|
|
16109
|
+
locale: string | undefined;
|
|
16110
|
+
publishingDraft: string | undefined;
|
|
16111
|
+
look: LookGrant | undefined;
|
|
16112
|
+
}>, {
|
|
16113
|
+
db: Database;
|
|
16114
|
+
env: Bindings;
|
|
16115
|
+
headers: Headers;
|
|
16116
|
+
client: string;
|
|
16117
|
+
telemetryDisabled: boolean;
|
|
16118
|
+
waitUntil: (promise: Promise<unknown>) => void;
|
|
16119
|
+
apiOrigin?: string;
|
|
16120
|
+
draft: DraftRequest | null;
|
|
16121
|
+
locale: string | undefined;
|
|
16122
|
+
publishingDraft: string | undefined;
|
|
16123
|
+
look: LookGrant | undefined;
|
|
16124
|
+
user: {
|
|
16125
|
+
id: string;
|
|
16126
|
+
createdAt: Date;
|
|
16127
|
+
updatedAt: Date;
|
|
16128
|
+
email: string;
|
|
16129
|
+
emailVerified: boolean;
|
|
16130
|
+
name: string;
|
|
16131
|
+
image?: string | null | undefined;
|
|
16132
|
+
};
|
|
16133
|
+
session: {
|
|
16134
|
+
id: string;
|
|
16135
|
+
createdAt: Date;
|
|
16136
|
+
updatedAt: Date;
|
|
16137
|
+
userId: string;
|
|
16138
|
+
expiresAt: Date;
|
|
16139
|
+
token: string;
|
|
16140
|
+
ipAddress?: string | null | undefined;
|
|
16141
|
+
userAgent?: string | null | undefined;
|
|
16142
|
+
activeOrganizationId?: string | null | undefined;
|
|
16143
|
+
local?: boolean | null | undefined;
|
|
16144
|
+
studio?: boolean | null | undefined;
|
|
16145
|
+
};
|
|
16146
|
+
}>, Record<never, never>>, import("zod").ZodObject<{
|
|
16147
|
+
projectId: import("zod").ZodNumber;
|
|
16148
|
+
entity: import("zod").ZodEnum<{
|
|
16149
|
+
block: "block";
|
|
16150
|
+
page: "page";
|
|
16151
|
+
record: "record";
|
|
16152
|
+
repeatableItem: "repeatableItem";
|
|
16153
|
+
}>;
|
|
16154
|
+
id: import("zod").ZodUUID;
|
|
16155
|
+
}, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
|
|
16156
|
+
entity: "block" | "page" | "record" | "repeatableItem";
|
|
16157
|
+
id: string;
|
|
16158
|
+
localizations: number;
|
|
16159
|
+
}, {
|
|
16160
|
+
entity: "block" | "page" | "record" | "repeatableItem";
|
|
16161
|
+
id: string;
|
|
16162
|
+
localizations: number;
|
|
16163
|
+
}>, Record<never, never>, Record<never, never>>;
|
|
15960
16164
|
};
|
|
15961
16165
|
files: {
|
|
15962
16166
|
list: import("@orpc/server").DecoratedProcedure<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>>, {
|
|
@@ -19107,7 +19311,7 @@ declare const router: {
|
|
|
19107
19311
|
token: string;
|
|
19108
19312
|
blockers: Problem[];
|
|
19109
19313
|
changes: Change[];
|
|
19110
|
-
defaultLocale: string
|
|
19314
|
+
defaultLocale: string;
|
|
19111
19315
|
overview: {
|
|
19112
19316
|
status: "pending";
|
|
19113
19317
|
} | {
|
|
@@ -19132,7 +19336,7 @@ declare const router: {
|
|
|
19132
19336
|
token: string;
|
|
19133
19337
|
blockers: Problem[];
|
|
19134
19338
|
changes: Change[];
|
|
19135
|
-
defaultLocale: string
|
|
19339
|
+
defaultLocale: string;
|
|
19136
19340
|
overview: {
|
|
19137
19341
|
status: "pending";
|
|
19138
19342
|
} | {
|
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
|
-
/**
|
|
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
|
-
/**
|
|
225
|
-
|
|
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
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
|
-
/**
|
|
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
|