g3-toolkit API Reference
    Preparing search index...

    Variable GRAPH_DOCUMENT_SCHEMAConst

    GRAPH_DOCUMENT_SCHEMA: {
        $id: "https://g3t.dev/schemas/graph-document.v1.json";
        $schema: "https://json-schema.org/draft/2020-12/schema";
        properties: {
            edges: {
                items: {
                    properties: {
                        data: { type: "object" };
                        id: { type: "string" };
                        kind: { type: "string" };
                        label: { type: "string" };
                        source: { type: "string" };
                        sourcePort: { type: "string" };
                        target: { type: "string" };
                        targetPort: { type: "string" };
                    };
                    required: readonly ["id", "source", "target"];
                    type: "object";
                };
                type: "array";
            };
            geometry: { type: "object" };
            nodes: {
                items: {
                    properties: {
                        data: { type: "object" };
                        height: { type: "number" };
                        id: { type: "string" };
                        label: { type: "string" };
                        layoutOptions: {
                            additionalProperties: { type: "string" };
                            type: "object";
                        };
                        parent: { type: "string" };
                        ports: {
                            items: {
                                properties: {
                                    id: { type: "string" };
                                    side: { enum: readonly ["NORTH", "SOUTH", "EAST", "WEST"] };
                                };
                                required: readonly ["id"];
                                type: "object";
                            };
                            type: "array";
                        };
                        width: { type: "number" };
                    };
                    required: readonly ["id"];
                    type: "object";
                };
                type: "array";
            };
            styleRefs: { type: "object" };
            version: { const: 1 };
        };
        required: readonly ["version", "nodes", "edges"];
        type: "object";
    } = ...

    Published JSON Schema (draft 2020-12) for the document.

    Type Declaration

    • Readonly$id: "https://g3t.dev/schemas/graph-document.v1.json"
    • Readonly$schema: "https://json-schema.org/draft/2020-12/schema"
    • Readonlyproperties: {
          edges: {
              items: {
                  properties: {
                      data: { type: "object" };
                      id: { type: "string" };
                      kind: { type: "string" };
                      label: { type: "string" };
                      source: { type: "string" };
                      sourcePort: { type: "string" };
                      target: { type: "string" };
                      targetPort: { type: "string" };
                  };
                  required: readonly ["id", "source", "target"];
                  type: "object";
              };
              type: "array";
          };
          geometry: { type: "object" };
          nodes: {
              items: {
                  properties: {
                      data: { type: "object" };
                      height: { type: "number" };
                      id: { type: "string" };
                      label: { type: "string" };
                      layoutOptions: {
                          additionalProperties: { type: "string" };
                          type: "object";
                      };
                      parent: { type: "string" };
                      ports: {
                          items: {
                              properties: {
                                  id: { type: "string" };
                                  side: { enum: readonly ["NORTH", "SOUTH", "EAST", "WEST"] };
                              };
                              required: readonly ["id"];
                              type: "object";
                          };
                          type: "array";
                      };
                      width: { type: "number" };
                  };
                  required: readonly ["id"];
                  type: "object";
              };
              type: "array";
          };
          styleRefs: { type: "object" };
          version: { const: 1 };
      }
    • Readonlyrequired: readonly ["version", "nodes", "edges"]
    • Readonlytype: "object"