@heynixie/contract 0.81.0 → 0.82.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.
|
@@ -2174,6 +2174,27 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2174
2174
|
};
|
|
2175
2175
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
2176
2176
|
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
2177
|
+
files: {
|
|
2178
|
+
read: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
2179
|
+
file: string;
|
|
2180
|
+
}, import("zod/v4/core").File, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2181
|
+
UNAUTHORIZED: {
|
|
2182
|
+
message: string;
|
|
2183
|
+
status: number;
|
|
2184
|
+
};
|
|
2185
|
+
}>, {
|
|
2186
|
+
FILE_NOT_FOUND: {
|
|
2187
|
+
message: string;
|
|
2188
|
+
status: number;
|
|
2189
|
+
};
|
|
2190
|
+
FILE_FORGOTTEN: {
|
|
2191
|
+
message: string;
|
|
2192
|
+
status: number;
|
|
2193
|
+
};
|
|
2194
|
+
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
2195
|
+
file: string;
|
|
2196
|
+
}>;
|
|
2197
|
+
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
2177
2198
|
nixie: {
|
|
2178
2199
|
read: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
|
|
2179
2200
|
paused: {
|
|
@@ -2533,6 +2533,25 @@ export declare const contract: {
|
|
|
2533
2533
|
};
|
|
2534
2534
|
}>, Record<never, never>>;
|
|
2535
2535
|
};
|
|
2536
|
+
files: {
|
|
2537
|
+
read: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2538
|
+
file: z.ZodString;
|
|
2539
|
+
}, z.core.$strip>, z.ZodFile, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2540
|
+
UNAUTHORIZED: {
|
|
2541
|
+
message: string;
|
|
2542
|
+
status: number;
|
|
2543
|
+
};
|
|
2544
|
+
}>, {
|
|
2545
|
+
FILE_NOT_FOUND: {
|
|
2546
|
+
message: string;
|
|
2547
|
+
status: number;
|
|
2548
|
+
};
|
|
2549
|
+
FILE_FORGOTTEN: {
|
|
2550
|
+
message: string;
|
|
2551
|
+
status: number;
|
|
2552
|
+
};
|
|
2553
|
+
}>, Record<never, never>>;
|
|
2554
|
+
};
|
|
2536
2555
|
nixie: {
|
|
2537
2556
|
read: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
2538
2557
|
paused: z.ZodNullable<z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export { pickSpanSource } from './span/pick-span-source.js';
|
|
|
23
23
|
export { renderSessionCookie } from './contract/render-session-cookie.js';
|
|
24
24
|
export { sessionCookieName } from './contract/session-cookie-name.js';
|
|
25
25
|
export { spanSchema } from './span/span-schema.js';
|
|
26
|
+
export { fileSendInputSchema } from './file/file-send-input-schema.js';
|
|
27
|
+
export { fileSendResultSchema } from './file/file-send-result-schema.js';
|
|
26
28
|
export { taskMessageInputSchema } from './message/task-message-input-schema.js';
|
|
27
29
|
export { taskMessageKindSchema } from './message/task-message-kind-schema.js';
|
|
28
30
|
export { taskMessageResultSchema } from './message/task-message-result-schema.js';
|
package/dist/index.js
CHANGED
|
@@ -1772,6 +1772,12 @@ var contract = {
|
|
|
1772
1772
|
})),
|
|
1773
1773
|
...memoryViewContract
|
|
1774
1774
|
},
|
|
1775
|
+
files: {
|
|
1776
|
+
read: signedIn.errors({
|
|
1777
|
+
FILE_NOT_FOUND: { message: "No code-run file has this ID", status: 404 },
|
|
1778
|
+
FILE_FORGOTTEN: { message: "A forget made this file unreadable", status: 410 }
|
|
1779
|
+
}).input(z39.object({ file: z39.string().min(1).max(100) })).output(z39.file())
|
|
1780
|
+
},
|
|
1775
1781
|
nixie: {
|
|
1776
1782
|
read: signedIn.output(z39.object({ paused: pauseStateSchema })),
|
|
1777
1783
|
pause: nixieControl,
|
|
@@ -2555,12 +2561,26 @@ function renderSessionCookie(token) {
|
|
|
2555
2561
|
const maxAgeS = token === null ? 0 : MAX_AGE_S;
|
|
2556
2562
|
return `${sessionCookieName}=${token ?? ""}; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=${maxAgeS}`;
|
|
2557
2563
|
}
|
|
2558
|
-
// src/
|
|
2564
|
+
// src/file/file-send-input-schema.ts
|
|
2565
|
+
import { z as z51 } from "zod";
|
|
2566
|
+
var fileSendInputSchema = z51.object({
|
|
2567
|
+
file: z51.string().min(1).max(100),
|
|
2568
|
+
caption: z51.string().min(1).max(1000).optional()
|
|
2569
|
+
});
|
|
2570
|
+
// src/file/file-send-result-schema.ts
|
|
2559
2571
|
import { z as z52 } from "zod";
|
|
2572
|
+
var fileSendResultSchema = z52.object({
|
|
2573
|
+
file: z52.string(),
|
|
2574
|
+
name: z52.string(),
|
|
2575
|
+
bytes: z52.int().nonnegative(),
|
|
2576
|
+
mediaType: z52.string()
|
|
2577
|
+
});
|
|
2578
|
+
// src/message/task-message-input-schema.ts
|
|
2579
|
+
import { z as z54 } from "zod";
|
|
2560
2580
|
|
|
2561
2581
|
// src/message/task-message-kind-schema.ts
|
|
2562
|
-
import { z as
|
|
2563
|
-
var taskMessageKindSchema =
|
|
2582
|
+
import { z as z53 } from "zod";
|
|
2583
|
+
var taskMessageKindSchema = z53.enum([
|
|
2564
2584
|
"progress",
|
|
2565
2585
|
"question",
|
|
2566
2586
|
"request",
|
|
@@ -2570,21 +2590,21 @@ var taskMessageKindSchema = z51.enum([
|
|
|
2570
2590
|
]);
|
|
2571
2591
|
|
|
2572
2592
|
// src/message/task-message-input-schema.ts
|
|
2573
|
-
var taskMessageInputSchema =
|
|
2574
|
-
to:
|
|
2593
|
+
var taskMessageInputSchema = z54.object({
|
|
2594
|
+
to: z54.string(),
|
|
2575
2595
|
kind: taskMessageKindSchema,
|
|
2576
|
-
body:
|
|
2577
|
-
replyTo:
|
|
2578
|
-
onBehalfOf:
|
|
2579
|
-
wake:
|
|
2596
|
+
body: z54.string(),
|
|
2597
|
+
replyTo: z54.string().optional(),
|
|
2598
|
+
onBehalfOf: z54.string().array().optional(),
|
|
2599
|
+
wake: z54.boolean().optional()
|
|
2580
2600
|
});
|
|
2581
2601
|
// src/message/task-message-result-schema.ts
|
|
2582
|
-
import { z as
|
|
2583
|
-
var taskMessageResultSchema =
|
|
2584
|
-
messageID:
|
|
2585
|
-
woke:
|
|
2586
|
-
hop:
|
|
2587
|
-
note:
|
|
2602
|
+
import { z as z55 } from "zod";
|
|
2603
|
+
var taskMessageResultSchema = z55.object({
|
|
2604
|
+
messageID: z55.string(),
|
|
2605
|
+
woke: z55.boolean(),
|
|
2606
|
+
hop: z55.int().nonnegative(),
|
|
2607
|
+
note: z55.string().optional()
|
|
2588
2608
|
});
|
|
2589
2609
|
export {
|
|
2590
2610
|
buildPendingInput,
|
|
@@ -2593,6 +2613,8 @@ export {
|
|
|
2593
2613
|
clientHeaderName,
|
|
2594
2614
|
clipRecordPayloads,
|
|
2595
2615
|
contract,
|
|
2616
|
+
fileSendInputSchema,
|
|
2617
|
+
fileSendResultSchema,
|
|
2596
2618
|
forgettableKinds,
|
|
2597
2619
|
hostContract,
|
|
2598
2620
|
imageLimits,
|