@shipstatic/types 2.23.0-beta.1 → 2.24.0-beta.1

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/index.d.ts CHANGED
@@ -851,6 +851,47 @@ export declare const DEPLOY_FIELDS: {
851
851
  /** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
852
852
  readonly CAPTCHA: "captcha";
853
853
  };
854
+ /**
855
+ * The JSON deploy body's file grammar: the OTHER body `POST /upload` accepts,
856
+ * beside the multipart one {@link DEPLOY_FIELDS} names. A JSON caller sends
857
+ * `{ files: [{ path, content, encoding? }] }`, and this is the whole of what
858
+ * one entry may say: three field names, two encodings, one default.
859
+ *
860
+ * Declared once because the grammar has three independent holders that the
861
+ * wire forces to restate it: the API's zod schema (the original), the hosted
862
+ * MCP's tool input, and the n8n community node, which cannot import this
863
+ * under n8n Cloud's zero-dependency rule and fences its copy against this
864
+ * object instead. Each had its own literal table until 2.24.0; the last two
865
+ * types convoys walked without minting the owner, which is exactly the drift
866
+ * the No-Fourth-Category Law's deferral clause names.
867
+ *
868
+ * `content` is the file's bytes as text: raw for `utf-8` (the default, and
869
+ * the right choice for HTML, CSS, JS, JSON and SVG), base64 for binary.
870
+ */
871
+ export declare const DEPLOY_FILE_GRAMMAR: {
872
+ /** Relative path within the site, no leading slash. */
873
+ readonly PATH: "path";
874
+ /** The file's bytes, as text in the entry's encoding. */
875
+ readonly CONTENT: "content";
876
+ /** Optional; one of {@link DEPLOY_FILE_GRAMMAR.ENCODINGS}. */
877
+ readonly ENCODING: "encoding";
878
+ /** What an entry that names no encoding means. */
879
+ readonly DEFAULT_ENCODING: "utf-8";
880
+ /** The closed set. `utf-8` is raw text; `base64` is for binary only. */
881
+ readonly ENCODINGS: readonly ["utf-8", "base64"];
882
+ };
883
+ /** One of the two encodings a JSON deploy entry may name. */
884
+ export type DeployFileEncoding = (typeof DEPLOY_FILE_GRAMMAR.ENCODINGS)[number];
885
+ /**
886
+ * One file entry of a JSON deploy, in the grammar above. The wire shape the
887
+ * API parses and the hosted MCP's tool input decodes; `encoding` absent means
888
+ * {@link DEPLOY_FILE_GRAMMAR.DEFAULT_ENCODING}.
889
+ */
890
+ export interface DeployFileSpec {
891
+ path: string;
892
+ content: string;
893
+ encoding?: DeployFileEncoding;
894
+ }
854
895
  /**
855
896
  * All possible error types in the ShipStatic platform.
856
897
  *
package/dist/index.js CHANGED
@@ -313,6 +313,35 @@ export const DEPLOY_FIELDS = {
313
313
  /** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
314
314
  CAPTCHA: 'captcha',
315
315
  };
316
+ /**
317
+ * The JSON deploy body's file grammar: the OTHER body `POST /upload` accepts,
318
+ * beside the multipart one {@link DEPLOY_FIELDS} names. A JSON caller sends
319
+ * `{ files: [{ path, content, encoding? }] }`, and this is the whole of what
320
+ * one entry may say: three field names, two encodings, one default.
321
+ *
322
+ * Declared once because the grammar has three independent holders that the
323
+ * wire forces to restate it: the API's zod schema (the original), the hosted
324
+ * MCP's tool input, and the n8n community node, which cannot import this
325
+ * under n8n Cloud's zero-dependency rule and fences its copy against this
326
+ * object instead. Each had its own literal table until 2.24.0; the last two
327
+ * types convoys walked without minting the owner, which is exactly the drift
328
+ * the No-Fourth-Category Law's deferral clause names.
329
+ *
330
+ * `content` is the file's bytes as text: raw for `utf-8` (the default, and
331
+ * the right choice for HTML, CSS, JS, JSON and SVG), base64 for binary.
332
+ */
333
+ export const DEPLOY_FILE_GRAMMAR = {
334
+ /** Relative path within the site, no leading slash. */
335
+ PATH: 'path',
336
+ /** The file's bytes, as text in the entry's encoding. */
337
+ CONTENT: 'content',
338
+ /** Optional; one of {@link DEPLOY_FILE_GRAMMAR.ENCODINGS}. */
339
+ ENCODING: 'encoding',
340
+ /** What an entry that names no encoding means. */
341
+ DEFAULT_ENCODING: 'utf-8',
342
+ /** The closed set. `utf-8` is raw text; `base64` is for binary only. */
343
+ ENCODINGS: ['utf-8', 'base64'],
344
+ };
316
345
  // =============================================================================
317
346
  // ERROR SYSTEM
318
347
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "2.23.0-beta.1",
3
+ "version": "2.24.0-beta.1",
4
4
  "description": "Shared TypeScript types for the ShipStatic platform.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -936,6 +936,50 @@ export const DEPLOY_FIELDS = {
936
936
  CAPTCHA: 'captcha',
937
937
  } as const;
938
938
 
939
+ /**
940
+ * The JSON deploy body's file grammar: the OTHER body `POST /upload` accepts,
941
+ * beside the multipart one {@link DEPLOY_FIELDS} names. A JSON caller sends
942
+ * `{ files: [{ path, content, encoding? }] }`, and this is the whole of what
943
+ * one entry may say: three field names, two encodings, one default.
944
+ *
945
+ * Declared once because the grammar has three independent holders that the
946
+ * wire forces to restate it: the API's zod schema (the original), the hosted
947
+ * MCP's tool input, and the n8n community node, which cannot import this
948
+ * under n8n Cloud's zero-dependency rule and fences its copy against this
949
+ * object instead. Each had its own literal table until 2.24.0; the last two
950
+ * types convoys walked without minting the owner, which is exactly the drift
951
+ * the No-Fourth-Category Law's deferral clause names.
952
+ *
953
+ * `content` is the file's bytes as text: raw for `utf-8` (the default, and
954
+ * the right choice for HTML, CSS, JS, JSON and SVG), base64 for binary.
955
+ */
956
+ export const DEPLOY_FILE_GRAMMAR = {
957
+ /** Relative path within the site, no leading slash. */
958
+ PATH: 'path',
959
+ /** The file's bytes, as text in the entry's encoding. */
960
+ CONTENT: 'content',
961
+ /** Optional; one of {@link DEPLOY_FILE_GRAMMAR.ENCODINGS}. */
962
+ ENCODING: 'encoding',
963
+ /** What an entry that names no encoding means. */
964
+ DEFAULT_ENCODING: 'utf-8',
965
+ /** The closed set. `utf-8` is raw text; `base64` is for binary only. */
966
+ ENCODINGS: ['utf-8', 'base64'],
967
+ } as const;
968
+
969
+ /** One of the two encodings a JSON deploy entry may name. */
970
+ export type DeployFileEncoding = (typeof DEPLOY_FILE_GRAMMAR.ENCODINGS)[number];
971
+
972
+ /**
973
+ * One file entry of a JSON deploy, in the grammar above. The wire shape the
974
+ * API parses and the hosted MCP's tool input decodes; `encoding` absent means
975
+ * {@link DEPLOY_FILE_GRAMMAR.DEFAULT_ENCODING}.
976
+ */
977
+ export interface DeployFileSpec {
978
+ path: string;
979
+ content: string;
980
+ encoding?: DeployFileEncoding;
981
+ }
982
+
939
983
  // =============================================================================
940
984
  // ERROR SYSTEM
941
985
  // =============================================================================