UNPKG

@mochabug/adaptkit

Version:

A cmd to create, emulate and publish Mochabug Adapt plugins

198 lines 8.27 kB
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file mochabugapis/adapt/graph/signal_data.proto. */ export declare const file_mochabugapis_adapt_graph_signal_data: GenFile; /** * This represents the actual data in the system * * @generated from message mochabugapis.adapt.graph.SignalData */ export type SignalData = Message<"mochabugapis.adapt.graph.SignalData"> & { /** * An optional filename associated with the signal. * Supports international filenames with Unicode characters. * Can include extension (e.g., "document.pdf") or be extension-less (e.g., "README"). * * Supported characters: * - All Unicode characters (international support) * - All printable ASCII including special characters * - Spaces, dots, hyphens, underscores anywhere in the filename * * Blocked characters (filesystem-illegal): * - Path separators: / \ * - Windows-illegal: < > : " | ? * * - Control characters: null bytes, newlines, tabs, etc. (0x00-0x1F) * * Additional restrictions: * - Cannot start or end with whitespace (enforced by CEL) * - Maximum length: 255 characters (filesystem compatibility) * * Examples: * ✅ "document.pdf" * ✅ "my-file_v2.txt" * ✅ "Report (Final).docx" * ✅ "résumé.pdf" (French accents) * ✅ "文档.pdf" (Chinese) * ✅ "файл.txt" (Cyrillic) * ✅ "Project #2.xlsx" * ✅ ".gitignore" (hidden files allowed) * ❌ " file.txt" (starts with space) * ❌ "file.txt " (ends with space) * ❌ "path/to/file.txt" (contains path separator) * ❌ "file\0.txt" (contains null byte) * ❌ "file<name>.txt" (contains Windows-illegal char) * * @generated from field: optional string filename = 1; */ filename?: string; /** * The MIME type of the signal data. * Must be a **concrete** MIME type conforming to RFC 6838 (NO wildcards allowed). * * This field specifies the actual format of the binary data in the `data` field. * Unlike SignalFormat which can use wildcards for format families, SignalData * represents actual concrete data and must have a specific MIME type. * * Format requirements: * - Structure: type/subtype (e.g., "image/png", "application/pdf") * - Type must be concrete alphanumeric (no wildcards) * - Subtype must be concrete alphanumeric (no wildcards) * - NO parameters allowed (no semicolons or charset specifications) * - Case-insensitive but conventionally lowercase * - Maximum length: 255 characters (127 for type + "/" + 127 for subtype) * * **No wildcards**: Unlike SignalFormat, wildcards are FORBIDDEN here because * this represents actual data which must have a concrete format. * ❌ "*\/*" - Forbidden (data must have specific format) * ❌ "image/*" - Forbidden (data must be specific image format) * ❌ "*\/png" - Forbidden (semantically invalid anyway) * ✅ "image/png" - Valid (concrete format) * ✅ "application/pdf" - Valid (concrete format) * * **Character Encoding Assumption**: * All text-based formats (text/*, application/json, application/xml, etc.) are * assumed to use UTF-8 encoding. Charset parameters are forbidden. * * Examples of forbidden formats: * ❌ "text/plain; charset=utf-8" (parameters not allowed) * ❌ "image/*" (wildcards not allowed) * ❌ "*\/*" (wildcards not allowed) * * Common concrete examples: * - Images: "image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml" * - Documents: "application/pdf", "text/html", "text/markdown", "text/plain" * - Data: "application/json", "application/xml", "text/csv" * - Binary: "application/octet-stream", "application/zip" * * @generated from field: string mime_type = 2; */ mimeType: string; /** * The actual raw binary data * * @generated from field: bytes data = 3; */ data: Uint8Array; }; /** * This represents the actual data in the system * * @generated from message mochabugapis.adapt.graph.SignalData */ export type SignalDataJson = { /** * An optional filename associated with the signal. * Supports international filenames with Unicode characters. * Can include extension (e.g., "document.pdf") or be extension-less (e.g., "README"). * * Supported characters: * - All Unicode characters (international support) * - All printable ASCII including special characters * - Spaces, dots, hyphens, underscores anywhere in the filename * * Blocked characters (filesystem-illegal): * - Path separators: / \ * - Windows-illegal: < > : " | ? * * - Control characters: null bytes, newlines, tabs, etc. (0x00-0x1F) * * Additional restrictions: * - Cannot start or end with whitespace (enforced by CEL) * - Maximum length: 255 characters (filesystem compatibility) * * Examples: * ✅ "document.pdf" * ✅ "my-file_v2.txt" * ✅ "Report (Final).docx" * ✅ "résumé.pdf" (French accents) * ✅ "文档.pdf" (Chinese) * ✅ "файл.txt" (Cyrillic) * ✅ "Project #2.xlsx" * ✅ ".gitignore" (hidden files allowed) * ❌ " file.txt" (starts with space) * ❌ "file.txt " (ends with space) * ❌ "path/to/file.txt" (contains path separator) * ❌ "file\0.txt" (contains null byte) * ❌ "file<name>.txt" (contains Windows-illegal char) * * @generated from field: optional string filename = 1; */ filename?: string; /** * The MIME type of the signal data. * Must be a **concrete** MIME type conforming to RFC 6838 (NO wildcards allowed). * * This field specifies the actual format of the binary data in the `data` field. * Unlike SignalFormat which can use wildcards for format families, SignalData * represents actual concrete data and must have a specific MIME type. * * Format requirements: * - Structure: type/subtype (e.g., "image/png", "application/pdf") * - Type must be concrete alphanumeric (no wildcards) * - Subtype must be concrete alphanumeric (no wildcards) * - NO parameters allowed (no semicolons or charset specifications) * - Case-insensitive but conventionally lowercase * - Maximum length: 255 characters (127 for type + "/" + 127 for subtype) * * **No wildcards**: Unlike SignalFormat, wildcards are FORBIDDEN here because * this represents actual data which must have a concrete format. * ❌ "*\/*" - Forbidden (data must have specific format) * ❌ "image/*" - Forbidden (data must be specific image format) * ❌ "*\/png" - Forbidden (semantically invalid anyway) * ✅ "image/png" - Valid (concrete format) * ✅ "application/pdf" - Valid (concrete format) * * **Character Encoding Assumption**: * All text-based formats (text/*, application/json, application/xml, etc.) are * assumed to use UTF-8 encoding. Charset parameters are forbidden. * * Examples of forbidden formats: * ❌ "text/plain; charset=utf-8" (parameters not allowed) * ❌ "image/*" (wildcards not allowed) * ❌ "*\/*" (wildcards not allowed) * * Common concrete examples: * - Images: "image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml" * - Documents: "application/pdf", "text/html", "text/markdown", "text/plain" * - Data: "application/json", "application/xml", "text/csv" * - Binary: "application/octet-stream", "application/zip" * * @generated from field: string mime_type = 2; */ mimeType?: string; /** * The actual raw binary data * * @generated from field: bytes data = 3; */ data?: string; }; /** * Describes the message mochabugapis.adapt.graph.SignalData. * Use `create(SignalDataSchema)` to create a new message. */ export declare const SignalDataSchema: GenMessage<SignalData, { jsonType: SignalDataJson; }>; //# sourceMappingURL=signal_data_pb.d.ts.map