{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kognitos/json-schema/kognitos-update-workspace-book-connection-body-schema.json",
  "title": "The book connection to update",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kognitos-books-api-openapi.yml#/components/schemas/UpdateWorkspaceBookConnectionBody",
  "type": "object",
  "properties": {
    "connection_name": {
      "type": "string",
      "title": "The connection name"
    },
    "authentication": {
      "$ref": "#/$defs/v2Authentication"
    },
    "config_map": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/bdkV2Value"
      },
      "title": "Input config"
    },
    "labels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/bdkV2Label"
      },
      "title": "Labels associated with the connection"
    },
    "oauth_flow": {
      "$ref": "#/$defs/v2OAuthFlow"
    }
  },
  "$defs": {
    "bdkV2Label": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "title": "The key of the key-value pair"
        },
        "value": {
          "type": "string",
          "title": "The value of the key-value pair"
        }
      }
    },
    "bdkV2ListValue": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/bdkV2Value"
          },
          "title": "All the values inside the list"
        }
      },
      "title": "A collection of values"
    },
    "bdkV2Value": {
      "type": "object",
      "properties": {
        "null_value": {
          "type": "string"
        },
        "conceptual_value": {
          "$ref": "#/$defs/v2NounPhrase"
        },
        "text_value": {
          "type": "string",
          "title": "deprecated: use offloadable_text_value (15) for new code"
        },
        "number_value": {
          "type": "number",
          "format": "double"
        },
        "boolean_value": {
          "type": "boolean"
        },
        "datetime_value": {
          "type": "string",
          "format": "date-time"
        },
        "date_value": {
          "$ref": "#/$defs/v2Date"
        },
        "time_value": {
          "$ref": "#/$defs/v2Time"
        },
        "file_value": {
          "$ref": "#/$defs/v2FileValue"
        },
        "dictionary_value": {
          "$ref": "#/$defs/v2DictionaryValue"
        },
        "list_value": {
          "$ref": "#/$defs/bdkV2ListValue"
        },
        "opaque_value": {
          "$ref": "#/$defs/v2OpaqueValue"
        },
        "table_value": {
          "$ref": "#/$defs/v2TableValue"
        },
        "sensitive_value": {
          "$ref": "#/$defs/v2SensitiveValue"
        },
        "offloadable_text_value": {
          "$ref": "#/$defs/v2OffloadableTextValue"
        },
        "offloadable_dictionary_value": {
          "$ref": "#/$defs/v2OffloadableDictionaryValue"
        },
        "offloadable_list_value": {
          "$ref": "#/$defs/v2OffloadableListValue"
        }
      },
      "title": "A union of all possible values"
    },
    "v2Authentication": {
      "type": "object",
      "properties": {
        "authentication_id": {
          "type": "string",
          "title": "Identifier of the authentication method to be used for testing the connection"
        },
        "authentication_credentials": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/v2CredentialValue"
          },
          "title": "Credentials"
        }
      }
    },
    "v2Column": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/bdkV2Value"
          }
        },
        "name": {
          "type": "string"
        }
      }
    },
    "v2CredentialValue": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "Id of the credential"
        },
        "value": {
          "$ref": "#/$defs/bdkV2Value"
        }
      }
    },
    "v2Date": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "int32",
          "title": "Year of the date"
        },
        "month": {
          "type": "integer",
          "format": "int32",
          "title": "Month of a year"
        },
        "day": {
          "type": "integer",
          "format": "int32",
          "title": "Day of a month"
        }
      }
    },
    "v2DictionaryValue": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/v2DictionaryValueField"
          },
          "title": "All the fields alongside their values in the dictionary"
        },
        "is_a": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/v2NounPhrase"
          },
          "title": "Is a replationships for the dictionary"
        }
      },
      "title": "Value to be used when the type is dictionary"
    },
    "v2DictionaryValueField": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/bdkV2Value"
        }
      },
      "title": "Each key-value pair inside a dictionary"
    },
    "v2File": {
      "type": "object",
      "properties": {
        "file_name": {
          "type": "string",
          "title": "The name of the file"
        },
        "content": {
          "type": "string",
          "format": "byte",
          "title": "Content of the file as a byte stream"
        }
      }
    },
    "v2FileValue": {
      "type": "object",
      "properties": {
        "remote": {
          "type": "string"
        },
        "inline": {
          "$ref": "#/$defs/v2File"
        }
      },
      "title": "A file value represents a file that can be either inline or remote"
    },
    "v2NounPhrase": {
      "type": "object",
      "properties": {
        "modifiers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Optional adjectives attached to the noun"
        },
        "head": {
          "type": "string",
          "title": "Noun of the phrase"
        }
      }
    },
    "v2OAuthFlow": {
      "type": "string",
      "enum": [
        "OAuthFlowAuthorizationCode",
        "OAuthFlowClientCredentials"
      ],
      "default": "OAuthFlowAuthorizationCode",
      "title": "Supported OAuth flows"
    },
    "v2OffloadableDictionaryValue": {
      "type": "object",
      "properties": {
        "remote": {
          "type": "string"
        },
        "inline": {
          "$ref": "#/$defs/v2DictionaryValue"
        }
      },
      "title": "A dictionary value that can be either inline or stored remotely"
    },
    "v2OffloadableListValue": {
      "type": "object",
      "properties": {
        "remote": {
          "type": "string"
        },
        "inline": {
          "$ref": "#/$defs/bdkV2ListValue"
        }
      },
      "title": "A list value that can be either inline or stored remotely"
    },
    "v2OffloadableTextValue": {
      "type": "object",
      "properties": {
        "remote": {
          "type": "string"
        },
        "inline": {
          "type": "string"
        }
      },
      "title": "A text value that can be either inline or stored remotely"
    },
    "v2OpaqueValue": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "format": "byte",
          "title": "Content of the opaque value"
        },
        "is_a": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/v2NounPhrase"
          },
          "title": "Is a replationships for the opaque"
        }
      }
    },
    "v2SensitiveValue": {
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/bdkV2Value"
        }
      },
      "title": "A sensitive value is any value marked as sensitive (to prevent exposure)"
    },
    "v2Table": {
      "type": "object",
      "properties": {
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/v2Column"
          }
        }
      },
      "description": "A table is a column-oriented structure. All the values inside each column must\nbe of equal length."
    },
    "v2TableValue": {
      "type": "object",
      "properties": {
        "remote": {
          "type": "string"
        },
        "inline": {
          "$ref": "#/$defs/v2Table"
        }
      },
      "title": "A table that is represented remote as an URL to a file that is Feather-formatted\nor inline via the Table message"
    },
    "v2Time": {
      "type": "object",
      "properties": {
        "hours": {
          "type": "integer",
          "format": "int32",
          "title": "Hours of day"
        },
        "minutes": {
          "type": "integer",
          "format": "int32",
          "title": "Minutes of hour of day"
        },
        "seconds": {
          "type": "integer",
          "format": "int32",
          "title": "Seconds of minutes of the time"
        },
        "nanos": {
          "type": "integer",
          "format": "int32",
          "title": "Fractions of seconds in nanoseconds"
        }
      }
    }
  }
}