@anchrd/colab-sdk 0.1.11 → 0.1.13

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.
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const DocumentCreateInput: z.ZodObject<{
3
- parentId: z.ZodTemplateLiteral<`node_${string}`>;
3
+ parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
4
4
  name: z.ZodString;
5
5
  content: z.ZodString;
6
6
  idempotencyKey: z.ZodString;
@@ -12,7 +12,8 @@ const Content = z
12
12
  .string()
13
13
  .describe("The whole document as Markdown, at most 1 MB in UTF-8. A front matter at the top stays as written. Images only by URL, links to other nodes in the text (`[Name](/n/node_…)`).");
14
14
  export const DocumentCreateInput = z.strictObject({
15
- parentId: NodeId.describe("The folder to create the document in, one you can write to."),
15
+ // ⚠️ Required and nullable (trap C015): null is the top level of Shared.
16
+ parentId: NodeId.nullable().describe("The folder to create the document in, one you can write to; null creates it on the top level of Shared, visible to you until you share it. An INSTRUCTIONS document needs a folder."),
16
17
  name: z
17
18
  .string()
18
19
  .max(200)
@@ -33,7 +33,7 @@ export declare const GadgetLevel: z.ZodEnum<{
33
33
  export type GadgetLevel = z.infer<typeof GadgetLevel>;
34
34
  export declare const gadgetLogDays: readonly [7, 14, 30];
35
35
  export declare const GadgetCreateInput: z.ZodObject<{
36
- parentId: z.ZodTemplateLiteral<`node_${string}`>;
36
+ parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
37
37
  name: z.ZodString;
38
38
  files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
39
39
  idempotencyKey: z.ZodString;
@@ -58,7 +58,8 @@ const LogDays = z
58
58
  .describe("How many days the log keeps a call: 7, 14 or 30.");
59
59
  const FileContent = z.string().describe("The file's whole text.");
60
60
  export const GadgetCreateInput = z.strictObject({
61
- parentId: NodeId.describe("The folder to create the gadget in, one you can write to."),
61
+ // ⚠️ Required and nullable (trap C015): null is the top level of Shared.
62
+ parentId: NodeId.nullable().describe("The folder to create the gadget in, one you can write to; null creates it on the top level of Shared, visible to you until you share it."),
62
63
  name: z
63
64
  .string()
64
65
  .max(200)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",