{
  "openapi": "3.1.0",
  "info": {
    "title": "Org Management",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/org/{org_id}/team": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List Teams In Org",
        "operationId": "list_teams_in_org_v1_org__org_id__team_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Team Id"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "enum": [
                      "us",
                      "eu"
                    ],
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "search_query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9(),/:'|&_\\- ’]{0,80}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search Query"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgTeamListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Create Team In Org",
        "operationId": "create_team_in_org_v1_org__org_id__team_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrgTeamBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgTeam"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationTeamIDConflictResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get Team In Org",
        "operationId": "get_team_in_org_v1_org__org_id__team__team_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "include_environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Env"
              },
              "default": [],
              "title": "Include Environment"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgTeam"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Team"
        ],
        "summary": "Update Team In Org",
        "operationId": "update_team_in_org_v1_org__org_id__team__team_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgTeamBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgTeam"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationTeamIDConflictResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team"
        ],
        "summary": "Delete Team In Org",
        "operationId": "delete_team_in_org_v1_org__org_id__team__team_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/scope_requirements": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get Team Scope Requirements",
        "operationId": "get_team_scope_requirements_v1_org__org_id__team__team_id__scope_requirements_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/OAuthProviders"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeRequirementsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Upsert Team Scope Requirements",
        "operationId": "upsert_team_scope_requirements_v1_org__org_id__team__team_id__scope_requirements_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTeamScopeRequirementsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/create_api_access_token": {
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Create Team Api Access Token",
        "operationId": "create_team_api_access_token_v1_org__org_id__team__team_id__create_api_access_token_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessTokenBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTeamAccessTokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/ehr_integration/create_dashboard_url": {
      "post": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Create Dashboard Url",
        "operationId": "create_dashboard_url_v1_org__org_id__ehr_integration_create_dashboard_url_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDashboardURLBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDashboardURLResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/resolve_team": {
      "post": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Resolve Team",
        "operationId": "resolve_team_v1_org__org_id__resolve_team_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveTeamBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveTeamResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/ehr_integration/member": {
      "post": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Create Integration Managed Member",
        "operationId": "create_integration_managed_member_v1_org__org_id__ehr_integration_member_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIntegrationManagedMemberBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationManagedMember"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMemberIDConflictResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "List Integration Managed Members",
        "operationId": "list_integration_managed_members_v1_org__org_id__ehr_integration_member_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListIntegrationManagedMembersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/ehr_integration/resolve_member": {
      "post": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Resolve Integration Managed Member",
        "operationId": "resolve_integration_managed_member_v1_org__org_id__ehr_integration_resolve_member_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveIntegrationManagedMemberBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationManagedMember"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/ehr_integration/member/{member_id}": {
      "get": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Get Integration Managed Member",
        "operationId": "get_integration_managed_member_v1_org__org_id__ehr_integration_member__member_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationManagedMember"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Update Integration Managed Member",
        "operationId": "update_integration_managed_member_v1_org__org_id__ehr_integration_member__member_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIntegrationManagedMemberBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationManagedMember"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMemberIDConflictResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Delete Integration Managed Member",
        "operationId": "delete_integration_managed_member_v1_org__org_id__ehr_integration_member__member_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/ehr_integration/configuration": {
      "get": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Get Ehr Integration Configuration",
        "operationId": "get_ehr_integration_configuration_v1_org__org_id__ehr_integration_configuration_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EhrIntegrationConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "EHR Integration"
        ],
        "summary": "Upsert Ehr Integration Configuration",
        "operationId": "upsert_ehr_integration_configuration_v1_org__org_id__ehr_integration_configuration_put",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertEhrIntegrationConfigBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EhrIntegrationConfig"
                }
              }
            }
          },
          "409": {
            "description": "Slug is already in use"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query": {
      "get": {
        "tags": [
          "Team Continuous Query"
        ],
        "summary": "Get Continuous Queries",
        "operationId": "get_continuous_queries_v1_org__org_id__team__team_id___environment__continuous_query_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContinuousQueryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Continuous Query"
        ],
        "summary": "Create Continuous Query",
        "operationId": "create_continuous_query_v1_org__org_id__team__team_id___environment__continuous_query_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "query_type",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "team",
                "platform"
              ],
              "type": "string",
              "default": "team",
              "title": "Query Type"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContinuousQueryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContinuousQuery"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/validate_continuous_query": {
      "post": {
        "tags": [
          "Team Continuous Query"
        ],
        "summary": "Validate Continuous Query",
        "operationId": "validate_continuous_query_v1_org__org_id__team__team_id___environment__validate_continuous_query_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "query_type",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "team",
                "platform"
              ],
              "type": "string",
              "default": "team",
              "title": "Query Type"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContinuousQueryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateContinuousQueryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query/{query_id}": {
      "patch": {
        "tags": [
          "Team Continuous Query"
        ],
        "summary": "Update Continuous Query",
        "operationId": "update_continuous_query_v1_org__org_id__team__team_id___environment__continuous_query__query_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "query_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Query Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContinuousQueryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContinuousQuery"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team Continuous Query"
        ],
        "summary": "Archive Continuous Query",
        "operationId": "archive_continuous_query_v1_org__org_id__team__team_id___environment__continuous_query__query_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "query_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Query Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team_ehr_pipelines/{environment}/{region}": {
      "get": {
        "tags": [
          "Team EHR Pipeline"
        ],
        "summary": "Get Team Ehr Pipelines",
        "operationId": "get_team_ehr_pipelines_v1_org__org_id__team_ehr_pipelines__environment___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Team Id"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamEHRPipelineResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team EHR Pipeline"
        ],
        "summary": "Upsert Team Ehr Pipelines",
        "operationId": "upsert_team_ehr_pipelines_v1_org__org_id__team_ehr_pipelines__environment___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTeamEHRPipelinesBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamEHRPipeline"
                  },
                  "title": "Response Upsert Team Ehr Pipelines V1 Org  Org Id  Team Ehr Pipelines  Environment   Region  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team EHR Pipeline"
        ],
        "summary": "Delete Team Ehr Pipelines",
        "operationId": "delete_team_ehr_pipelines_v1_org__org_id__team_ehr_pipelines__environment___region__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Team Id"
            }
          },
          {
            "name": "ehr_type",
            "in": "query",
            "required": true,
            "schema": {
              "enum": [
                "fhir",
                "hint_health"
              ],
              "type": "string",
              "title": "Ehr Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/event_delivery_metric": {
      "get": {
        "summary": "Get Team Event Delivery Metric",
        "operationId": "get_team_event_delivery_metric_v1_org__org_id__team__team_id___environment__event_delivery_metric_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "5m",
                "15m",
                "1h",
                "1d"
              ],
              "type": "string",
              "default": "1h",
              "title": "Interval"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrometheusQueryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/member": {
      "get": {
        "tags": [
          "Org Member"
        ],
        "summary": "List Members In Org",
        "operationId": "list_members_in_org_v1_org__org_id__member_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "search_query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search Query"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgMemberListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/member/{member_id}": {
      "patch": {
        "tags": [
          "Org Member"
        ],
        "summary": "Update Member",
        "operationId": "update_member_v1_org__org_id__member__member_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgMemberBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Org Member"
        ],
        "summary": "Remove Member From Org",
        "operationId": "remove_member_from_org_v1_org__org_id__member__member_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/invite": {
      "get": {
        "tags": [
          "Org Invite"
        ],
        "summary": "List Invites In Org",
        "operationId": "list_invites_in_org_v1_org__org_id__invite_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "search_query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search Query"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgInviteListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Org Invite"
        ],
        "summary": "Create Or Resend Invite In Org",
        "operationId": "create_or_resend_invite_in_org_v1_org__org_id__invite_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgInviteAPICreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgInviteAPICreateResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/invite/{invite_id}": {
      "delete": {
        "tags": [
          "Org Invite"
        ],
        "summary": "Revoke Invite In Org",
        "operationId": "revoke_invite_in_org_v1_org__org_id__invite__invite_id__delete",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Invite Id"
            }
          },
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/webhook": {
      "get": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "List Webhooks",
        "operationId": "list_webhooks_v1_org__org_id__team__team_id___environment__webhook_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Create Webhook",
        "operationId": "create_webhook_v1_org__org_id__team__team_id___environment__webhook_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}": {
      "get": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Get Webhook",
        "operationId": "get_webhook_v1_org__org_id__team__team_id___environment__webhook__webhook_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Patch Webhook",
        "operationId": "patch_webhook_v1_org__org_id__team__team_id___environment__webhook__webhook_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchWebhookBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Delete Webhook",
        "operationId": "delete_webhook_v1_org__org_id__team__team_id___environment__webhook__webhook_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}/headers": {
      "get": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Get Webhook Headers",
        "operationId": "get_webhook_headers_v1_org__org_id__team__team_id___environment__webhook__webhook_id__headers_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookHeadersResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Update Webhook Headers",
        "operationId": "update_webhook_headers_v1_org__org_id__team__team_id___environment__webhook__webhook_id__headers_put",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookHeadersBody"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}/secret": {
      "get": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Get Webhook Secret",
        "operationId": "get_webhook_secret_v1_org__org_id__team__team_id___environment__webhook__webhook_id__secret_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecretResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}/secret/rotate": {
      "post": {
        "tags": [
          "Team Webhook"
        ],
        "summary": "Rotate Webhook Secret",
        "operationId": "rotate_webhook_secret_v1_org__org_id__team__team_id___environment__webhook__webhook_id__secret_rotate_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Team Id"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateWebhookSecretBody"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/lab_account/{env}/{region}": {
      "get": {
        "tags": [
          "Team Lab Accounts"
        ],
        "summary": "Get Lab Accounts",
        "operationId": "get_lab_accounts_v1_org__org_id__lab_account__env___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "lab_account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lab Account Id"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Team Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/LabAccountStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabAccountsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/lab_account/{env}/{region}/{account_id}": {
      "patch": {
        "tags": [
          "Team Lab Accounts"
        ],
        "summary": "Update Lab Account Team Id Allowlist",
        "operationId": "update_lab_account_team_id_allowlist_v1_org__org_id__lab_account__env___region___account_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Account Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabAccountTeamIdAllowlistUpdateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/domain/{domain_id}": {
      "get": {
        "tags": [
          "Org Domains"
        ],
        "summary": "Get Org Domain",
        "operationId": "get_org_domain_v1_org__org_id__domain__domain_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgDomain"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Org Domains"
        ],
        "summary": "Delete Org Domain",
        "operationId": "delete_org_domain_v1_org__org_id__domain__domain_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/domain": {
      "get": {
        "tags": [
          "Org Domains"
        ],
        "summary": "List Org Domains",
        "operationId": "list_org_domains_v1_org__org_id__domain_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListOrgDomainResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Org Domains"
        ],
        "summary": "Create Org Domain",
        "operationId": "create_org_domain_v1_org__org_id__domain_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrgDomainBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrgDomain"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/domain/{domain_id}/verify": {
      "post": {
        "tags": [
          "Org Domains"
        ],
        "summary": "Verify Org Domain",
        "operationId": "verify_org_domain_v1_org__org_id__domain__domain_id__verify_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyOrgDomainResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/domain/{domain_id}/send_domain_instructions": {
      "post": {
        "tags": [
          "Org Domains"
        ],
        "summary": "Send Org Domain Instructions",
        "description": "Sends white labelling domain setup instructions email using SendGrid dynamic template.\nExpects body.to_email (recipient), uses a template_id, and fills all required fields.",
        "operationId": "send_org_domain_instructions_v1_org__org_id__domain__domain_id__send_domain_instructions_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Domain Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendOrgDomainInstructionsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendOrgDomainInstructionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}": {
      "get": {
        "tags": [
          "Org"
        ],
        "summary": "Get Org",
        "operationId": "get_org_v1_org__org_id__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrg"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Org"
        ],
        "summary": "Update Org",
        "operationId": "update_org_v1_org__org_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingOrg"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/management_key": {
      "get": {
        "tags": [
          "Management Key"
        ],
        "summary": "List Management Key",
        "operationId": "list_management_key_v1_org__org_id__management_key_get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "description": "If specified, the endpoint returns only team_admin Management Keys that are bound to this team.",
              "title": "Team Id"
            },
            "description": "If specified, the endpoint returns only team_admin Management Keys that are bound to this team."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "org_admin",
                    "team_admin"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "If specified, the endpoint returns only Management Keys of the specified role.",
              "title": "Role"
            },
            "description": "If specified, the endpoint returns only Management Keys of the specified role."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingManagementKeyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Management Key"
        ],
        "summary": "Create Management Key",
        "operationId": "create_management_key_v1_org__org_id__management_key_post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManagementKeyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingManagementKeyUnhashed"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/management_key/{key_id}": {
      "patch": {
        "tags": [
          "Management Key"
        ],
        "summary": "Patch Management Key",
        "operationId": "patch_management_key_v1_org__org_id__management_key__key_id__patch",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchManagementKeyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingManagementKey"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Management Key"
        ],
        "summary": "Remove Management Key",
        "operationId": "remove_management_key_v1_org__org_id__management_key__key_id__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ClientFacingManagementKey"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Remove Management Key V1 Org  Org Id  Management Key  Key Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team_api_keys/{env}/{region}": {
      "get": {
        "tags": [
          "Team API Keys"
        ],
        "summary": "List Team Api Keys",
        "operationId": "list_team_api_keys_v1_org__org_id__team_api_keys__env___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Team Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingTeamAPIKeyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team API Keys"
        ],
        "summary": "Create Team Api Key",
        "operationId": "create_team_api_key_v1_org__org_id__team_api_keys__env___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamAPIKeyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingTeamAPIKey"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team API Keys"
        ],
        "summary": "Delete Team Api Keys",
        "operationId": "delete_team_api_keys_v1_org__org_id__team_api_keys__env___region__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "api_key_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Api Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTeamApiKeysResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team_custom_credentials/{env}/{region}": {
      "get": {
        "tags": [
          "Team Custom Credentials"
        ],
        "summary": "Get Team Custom Credentials",
        "operationId": "get_team_custom_credentials_v1_org__org_id__team_custom_credentials__env___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Team Id"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/OAuthProviders"
                },
                {
                  "$ref": "#/components/schemas/Labs"
                },
                {
                  "const": "freestyle_libre",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCredentialsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Custom Credentials"
        ],
        "summary": "Upsert Team Custom Credentials",
        "operationId": "upsert_team_custom_credentials_v1_org__org_id__team_custom_credentials__env___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTeamCustomCredentialsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFacingTeamProviderCredentials"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team Custom Credentials"
        ],
        "summary": "Delete Team Custom Credentials",
        "operationId": "delete_team_custom_credentials_v1_org__org_id__team_custom_credentials__env___region__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "credential_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Credential Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTeamCustomCredentialsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/prepare_team_custom_credentials/{env}/{region}": {
      "post": {
        "tags": [
          "Team Custom Credentials"
        ],
        "summary": "Prepare Team Custom Credentials",
        "operationId": "prepare_team_custom_credentials_v1_org__org_id__prepare_team_custom_credentials__env___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareTeamCustomCredentialsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepareTeamCustomCredentialsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team_etl_pipelines/{env}/{region}": {
      "get": {
        "tags": [
          "Team ETL Pipeline"
        ],
        "summary": "Get Team Etl Pipelines",
        "operationId": "get_team_etl_pipelines_v1_org__org_id__team_etl_pipelines__env___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Team Id"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamETLPipelinesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team ETL Pipeline"
        ],
        "summary": "Upsert Team Etl Pipelines",
        "operationId": "upsert_team_etl_pipelines_v1_org__org_id__team_etl_pipelines__env___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTeamETLPipelinesBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClientFacingETLPipeline"
                  },
                  "title": "Response Upsert Team Etl Pipelines V1 Org  Org Id  Team Etl Pipelines  Env   Region  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team ETL Pipeline"
        ],
        "summary": "Delete Team Etl Pipelines",
        "operationId": "delete_team_etl_pipelines_v1_org__org_id__team_etl_pipelines__env___region__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Team Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClientFacingETLPipeline"
                  },
                  "title": "Response Delete Team Etl Pipelines V1 Org  Org Id  Team Etl Pipelines  Env   Region  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/org/{org_id}/team_data_pull_preferences/{env}/{region}": {
      "get": {
        "tags": [
          "Team Data Pull Preferences"
        ],
        "summary": "Get Team Data Pull Preferences",
        "operationId": "get_team_data_pull_preferences_v1_org__org_id__team_data_pull_preferences__env___region__get",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Team Id"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "oura",
                  "fitbit",
                  "garmin",
                  "strava",
                  "withings",
                  "peloton",
                  "wahoo",
                  "zwift",
                  "freestyle_libre",
                  "abbott_libreview",
                  "eight_sleep",
                  "renpho",
                  "omron",
                  "dexcom_v3",
                  "hammerhead",
                  "polar",
                  "cronometer",
                  "kardia",
                  "whoop_v2",
                  "my_fitness_pal_v2",
                  "map_my_fitness",
                  "runkeeper",
                  "apple_health_kit",
                  "google_fit",
                  "beurer_api",
                  "ultrahuman",
                  "google_health"
                ],
                "type": "string"
              },
              "title": "Provider"
            }
          },
          {
            "name": "next_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDataPullPreferencesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Data Pull Preferences"
        ],
        "summary": "Upsert Team Data Pull Preferences",
        "operationId": "upsert_team_data_pull_preferences_v1_org__org_id__team_data_pull_preferences__env___region__post",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertTeamDataPullPreferencesBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDataPullPreferencesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team Data Pull Preferences"
        ],
        "summary": "Delete Team Data Pull Preferences",
        "operationId": "delete_team_data_pull_preferences_v1_org__org_id__team_data_pull_preferences__env___region__delete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Org Id"
            }
          },
          {
            "name": "env",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Env"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "us",
                "eu"
              ],
              "type": "string",
              "title": "Region"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "title": "Team Id"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "oura",
                  "fitbit",
                  "garmin",
                  "strava",
                  "withings",
                  "peloton",
                  "wahoo",
                  "zwift",
                  "freestyle_libre",
                  "abbott_libreview",
                  "eight_sleep",
                  "renpho",
                  "omron",
                  "dexcom_v3",
                  "hammerhead",
                  "polar",
                  "cronometer",
                  "kardia",
                  "whoop_v2",
                  "my_fitness_pal_v2",
                  "map_my_fitness",
                  "runkeeper",
                  "apple_health_kit",
                  "google_fit",
                  "beurer_api",
                  "ultrahuman",
                  "google_health"
                ],
                "type": "string"
              },
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActivityColumnExpr": {
        "properties": {
          "activity": {
            "type": "string",
            "enum": [
              "date",
              "calories_total",
              "calories_active",
              "steps",
              "distance_meter",
              "floors_climbed",
              "duration_active_second",
              "intensity_sedentary_second",
              "intensity_low_second",
              "intensity_medium_second",
              "intensity_high_second",
              "heart_rate_mean",
              "heart_rate_minimum",
              "heart_rate_maximum",
              "heart_rate_resting",
              "heart_rate_mean_walking",
              "wheelchair_use",
              "wheelchair_push",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id",
              "time_zone",
              "time_zone_offset"
            ],
            "title": "Activity"
          }
        },
        "type": "object",
        "required": [
          "activity"
        ],
        "title": "ActivityColumnExpr"
      },
      "AggregateExpr-Input": {
        "properties": {
          "arg": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SleepColumnExpr"
              },
              {
                "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ActivityColumnExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutColumnExpr"
              },
              {
                "$ref": "#/components/schemas/BodyColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MealColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ProfileColumnExpr"
              },
              {
                "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/IntervalTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/NoteTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/IndexColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ScalarOutputSubqueryExpr-Input"
              }
            ],
            "title": "Arg"
          },
          "func": {
            "type": "string",
            "enum": [
              "mean",
              "min",
              "max",
              "sum",
              "count",
              "median",
              "stddev",
              "oldest",
              "newest"
            ],
            "title": "Func"
          }
        },
        "type": "object",
        "required": [
          "arg",
          "func"
        ],
        "title": "AggregateExpr"
      },
      "AggregateExpr-Output": {
        "properties": {
          "arg": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SleepColumnExpr"
              },
              {
                "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ActivityColumnExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutColumnExpr"
              },
              {
                "$ref": "#/components/schemas/BodyColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MealColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ProfileColumnExpr"
              },
              {
                "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/IntervalTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/NoteTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/IndexColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ScalarOutputSubqueryExpr-Output"
              }
            ],
            "title": "Arg"
          },
          "func": {
            "type": "string",
            "enum": [
              "mean",
              "min",
              "max",
              "sum",
              "count",
              "median",
              "stddev",
              "oldest",
              "newest"
            ],
            "title": "Func"
          }
        },
        "type": "object",
        "required": [
          "arg",
          "func"
        ],
        "title": "AggregateExpr"
      },
      "AggregateFieldExpr": {
        "properties": {
          "func": {
            "type": "string",
            "enum": [
              "mean",
              "min",
              "max",
              "sum",
              "count",
              "median",
              "stddev",
              "oldest",
              "newest"
            ],
            "title": "Func"
          },
          "arg": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCMenstrualFlowFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCCervicalMucusFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCIntermenstrualBleedingFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCContraceptiveFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCDetectedDeviationsFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCOvulationTestFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCHomePregnancyTestFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCHomeProgesteroneTestFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCSexualActivityFieldExpr"
              },
              {
                "$ref": "#/components/schemas/MCBasalBodyTemperatureFieldExpr"
              },
              {
                "$ref": "#/components/schemas/ElementFieldExpr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arg"
          }
        },
        "type": "object",
        "required": [
          "func"
        ],
        "title": "AggregateFieldExpr",
        "description": "Aggregate over unnested list elements, optionally targeting a struct field.\n\nWhen arg is None, the aggregate operates on the list elements directly\n(e.g., count-all, or mean/sum on a scalar numeric list).\nWhen arg is a FieldExpr, the struct field is extracted before aggregating."
      },
      "AlignExpr-Input": {
        "properties": {
          "carry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CarryForwardExpr"
              },
              {
                "$ref": "#/components/schemas/CarryBackwardExpr"
              },
              {
                "$ref": "#/components/schemas/CarryNearestExpr"
              }
            ],
            "title": "Carry"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "carry"
        ],
        "title": "AlignExpr",
        "description": "Post-aggregation alignment clause for a CQ query.\n\n`carry` runs after group_by+aggregate, implicitly materialising missing\ndatetime buckets before filling them. Omitting `.align()` entirely preserves\nhonest-null behaviour; the `carry` field is required when `align` is present."
      },
      "AlignExpr-Output": {
        "properties": {
          "carry": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CarryForwardExpr"
              },
              {
                "$ref": "#/components/schemas/CarryBackwardExpr"
              },
              {
                "$ref": "#/components/schemas/CarryNearestExpr"
              }
            ],
            "title": "Carry"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "carry"
        ],
        "title": "AlignExpr",
        "description": "Post-aggregation alignment clause for a CQ query.\n\n`carry` runs after group_by+aggregate, implicitly materialising missing\ndatetime buckets before filling them. Omitting `.align()` entirely preserves\nhonest-null behaviour; the `carry` field is required when `align` is present."
      },
      "AllowedOriginConfig": {
        "properties": {
          "origin": {
            "type": "string",
            "title": "Origin"
          },
          "session_continuation_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Continuation Url"
          }
        },
        "type": "object",
        "required": [
          "origin"
        ],
        "title": "AllowedOriginConfig"
      },
      "AppointmentProvider": {
        "type": "string",
        "enum": [
          "getlabs",
          "phlebfinders",
          "quest",
          "sonora_quest"
        ],
        "title": "AppointmentProvider"
      },
      "AsleepAtValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "const": "asleep_at",
            "title": "Value Macro"
          },
          "version": {
            "type": "string",
            "const": "automatic",
            "title": "Version",
            "default": "automatic"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "AsleepAtValueMacroExpr"
      },
      "AwakeAtValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "const": "awake_at",
            "title": "Value Macro"
          },
          "version": {
            "type": "string",
            "const": "automatic",
            "title": "Version",
            "default": "automatic"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "AwakeAtValueMacroExpr"
      },
      "AwakeningsValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "const": "awakenings",
            "title": "Value Macro"
          },
          "version": {
            "type": "string",
            "const": "automatic",
            "title": "Version",
            "default": "automatic"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "AwakeningsValueMacroExpr"
      },
      "Billing": {
        "type": "string",
        "enum": [
          "client_bill",
          "commercial_insurance",
          "patient_bill_passthrough",
          "patient_bill"
        ],
        "title": "Billing"
      },
      "BioReferenceProviderDetails": {
        "properties": {
          "sub_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Id"
          },
          "sub_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Name"
          },
          "allowed_billing_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Billing Types"
          },
          "disallowed_billing_states": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "propertyNames": {
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disallowed Billing States"
          },
          "bioreference": {
            "additionalProperties": true,
            "type": "object",
            "title": "Bioreference"
          }
        },
        "type": "object",
        "required": [
          "bioreference"
        ],
        "title": "BioReferenceProviderDetails"
      },
      "BloodPressureTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "const": "blood_pressure",
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "systolic",
                  "diastolic"
                ]
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "BloodPressureTimeseriesExpr"
      },
      "BodyColumnExpr": {
        "properties": {
          "body": {
            "type": "string",
            "enum": [
              "measured_at",
              "weight_kilogram",
              "fat_mass_percentage",
              "water_percentage",
              "muscle_mass_percentage",
              "visceral_fat_index",
              "bone_mass_percentage",
              "body_mass_index",
              "lean_body_mass_kilogram",
              "waist_circumference_centimeter",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id",
              "time_zone"
            ],
            "title": "Body"
          }
        },
        "type": "object",
        "required": [
          "body"
        ],
        "title": "BodyColumnExpr"
      },
      "BrandInformation": {
        "properties": {
          "company_name": {
            "type": "string",
            "title": "Company Name"
          },
          "company_website": {
            "type": "string",
            "title": "Company Website",
            "default": ""
          },
          "support_email": {
            "type": "string",
            "format": "email",
            "title": "Support Email",
            "default": "help@tryvital.io"
          },
          "support_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Contact",
            "default": ""
          },
          "company_address": {
            "type": "string",
            "title": "Company Address",
            "default": ""
          },
          "brand_color": {
            "type": "string",
            "title": "Brand Color",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "company_name"
        ],
        "title": "BrandInformation"
      },
      "CarryBackwardExpr": {
        "properties": {
          "mode": {
            "type": "string",
            "const": "carry_backward",
            "title": "Mode"
          },
          "max_age": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Period"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "CarryBackwardExpr",
        "description": "Post-aggregation carry operator: carry-backward.\n\nFor each empty bucket, carries the nearest subsequent non-empty bucket's\naggregate backward in time. `max_age=None` means no cap; when set,\nenforced >= group_by_period at CQ validation time."
      },
      "CarryForwardExpr": {
        "properties": {
          "mode": {
            "type": "string",
            "const": "carry_forward",
            "title": "Mode"
          },
          "max_age": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Period"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "CarryForwardExpr",
        "description": "Post-aggregation carry operator: last-observation-carried-forward.\n\nFor each empty bucket, carries the most recent prior non-empty bucket's\naggregate forward. `max_age=None` means no cap (carry indefinitely);\nwhen set, enforced >= group_by_period at CQ validation time."
      },
      "CarryNearestExpr": {
        "properties": {
          "mode": {
            "type": "string",
            "const": "carry_nearest",
            "title": "Mode"
          },
          "span": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Period"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "CarryNearestExpr",
        "description": "Post-aggregation carry operator: carry from the nearest non-empty bucket.\n\nFor each empty bucket, borrows the nearest non-empty adjacent bucket's\naggregate — past or future, whichever is closer. On a tie the past value\nis preferred. `span=None` means no cap; when set, enforced >=\ngroup_by_period at CQ validation time."
      },
      "ChronotypeValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "const": "chronotype",
            "title": "Value Macro"
          },
          "version": {
            "type": "string",
            "const": "automatic",
            "title": "Version",
            "default": "automatic"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "ChronotypeValueMacroExpr"
      },
      "ClientFacingETLPipeline": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "push_historical_data": {
            "type": "boolean",
            "title": "Push Historical Data",
            "default": false
          },
          "provider_raw_data": {
            "type": "boolean",
            "title": "Provider Raw Data",
            "default": false
          },
          "preferences": {
            "$ref": "#/components/schemas/EventDestinationPreferences"
          },
          "cloud_pubsub": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationCloudPubSubAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "rabbitmq": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationRabbitMQAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "svix": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationSvixAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "azure_amqp": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationAzureAMQPAttributes-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_type_prefixes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Prefixes",
            "description": "An allowlist of event type prefixes.             Note that both an empty list and null are interpreted as allow-all."
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "preferences"
        ],
        "title": "ClientFacingETLPipeline"
      },
      "ClientFacingLabAccount": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "lab": {
            "$ref": "#/components/schemas/Labs"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "status": {
            "$ref": "#/components/schemas/LabAccountStatus"
          },
          "delegated_flow": {
            "$ref": "#/components/schemas/LabAccountDelegatedFlow"
          },
          "provider_account_id": {
            "type": "string",
            "title": "Provider Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "default_clinical_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Clinical Notes"
          },
          "business_units": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Units"
          },
          "allowed_billing": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/USState"
              },
              "type": "array"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/Billing"
            },
            "type": "object",
            "title": "Allowed Billing"
          },
          "team_id_allowlist": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Team Id Allowlist"
          }
        },
        "type": "object",
        "required": [
          "id",
          "lab",
          "status",
          "delegated_flow",
          "provider_account_id",
          "allowed_billing",
          "team_id_allowlist"
        ],
        "title": "ClientFacingLabAccount"
      },
      "ClientFacingManagementKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "creator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreatorOrgMember"
              },
              {
                "$ref": "#/components/schemas/CreatorOrgMemberRemoved"
              },
              {
                "$ref": "#/components/schemas/CreatorVitalStaff"
              },
              {
                "$ref": "#/components/schemas/CreatorManagementKey"
              }
            ],
            "title": "Creator"
          },
          "role": {
            "type": "string",
            "enum": [
              "org_admin",
              "team_admin"
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "created_at",
          "creator",
          "role",
          "team_role_bindings"
        ],
        "title": "ClientFacingManagementKey"
      },
      "ClientFacingManagementKeyResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingManagementKey"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "ClientFacingManagementKeyResponse"
      },
      "ClientFacingManagementKeyUnhashed": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "creator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreatorOrgMember"
              },
              {
                "$ref": "#/components/schemas/CreatorOrgMemberRemoved"
              },
              {
                "$ref": "#/components/schemas/CreatorVitalStaff"
              },
              {
                "$ref": "#/components/schemas/CreatorManagementKey"
              }
            ],
            "title": "Creator"
          },
          "role": {
            "type": "string",
            "enum": [
              "org_admin",
              "team_admin"
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          },
          "key": {
            "type": "string",
            "title": "Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "created_at",
          "creator",
          "role",
          "team_role_bindings",
          "key"
        ],
        "title": "ClientFacingManagementKeyUnhashed"
      },
      "ClientFacingOrg": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "expires_at"
        ],
        "title": "ClientFacingOrg"
      },
      "ClientFacingOrgDomain": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain",
            "description": "Domain name, e.g. example.com"
          },
          "is_verified": {
            "type": "boolean",
            "title": "Is Verified"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "title": "Created On"
          },
          "dns_records": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dns Records"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "domain",
          "is_verified",
          "created_on",
          "id"
        ],
        "title": "ClientFacingOrgDomain"
      },
      "ClientFacingOrgInvite": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "invited_at": {
            "type": "string",
            "format": "date-time",
            "title": "Invited At"
          },
          "resent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resent At"
          },
          "creator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreatorOrgMember"
              },
              {
                "$ref": "#/components/schemas/CreatorOrgMemberRemoved"
              },
              {
                "$ref": "#/components/schemas/CreatorVitalStaff"
              },
              {
                "$ref": "#/components/schemas/CreatorManagementKey"
              }
            ],
            "title": "Creator"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "org_admin",
                  "team_admin"
                ]
              },
              {
                "type": "string",
                "const": "no_role"
              }
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "invited_at",
          "resent_at",
          "creator",
          "role",
          "team_role_bindings"
        ],
        "title": "ClientFacingOrgInvite"
      },
      "ClientFacingOrgInviteListResponse": {
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingOrgInvite"
            },
            "type": "array",
            "title": "Invites"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "invites",
          "next_cursor"
        ],
        "title": "ClientFacingOrgInviteListResponse"
      },
      "ClientFacingOrgMember": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "title": "Created On"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "org_admin",
                  "team_admin"
                ]
              },
              {
                "type": "string",
                "const": "no_role"
              }
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "email",
          "created_on",
          "role",
          "team_role_bindings"
        ],
        "title": "ClientFacingOrgMember"
      },
      "ClientFacingOrgMemberListResponse": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingOrgMember"
            },
            "type": "array",
            "title": "Members"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "members",
          "next_cursor"
        ],
        "title": "ClientFacingOrgMemberListResponse"
      },
      "ClientFacingOrgTeam": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "title": "Created On"
          },
          "region": {
            "type": "string",
            "enum": [
              "us",
              "eu"
            ],
            "title": "Region"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          },
          "environments": {
            "items": {
              "$ref": "#/components/schemas/Env"
            },
            "type": "array",
            "title": "Environments"
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientFacingOrgTeamEnvironment"
              },
              {
                "type": "null"
              }
            ]
          },
          "production": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientFacingOrgTeamEnvironment"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_on",
          "region",
          "sandbox",
          "production"
        ],
        "title": "ClientFacingOrgTeam"
      },
      "ClientFacingOrgTeamEnvironment": {
        "properties": {
          "lab_tests_patient_sms_communication_enabled": {
            "type": "boolean",
            "title": "Lab Tests Patient Sms Communication Enabled",
            "default": true
          },
          "lab_tests_patient_email_communication_enabled": {
            "type": "boolean",
            "title": "Lab Tests Patient Email Communication Enabled",
            "default": true
          },
          "critical_result_notification_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Critical Result Notification Email"
          },
          "brand_information": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrandInformation"
              },
              {
                "type": "null"
              }
            ],
            "description": "\nInformation of your brand.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you configure Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "reject_duplicate_connection": {
            "type": "boolean",
            "title": "Reject Duplicate Connection",
            "default": false
          },
          "sdk_per_device_activity_timeseries": {
            "type": "boolean",
            "title": "Sdk Per Device Activity Timeseries",
            "default": false
          },
          "partial_webhooks_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Partial Webhooks Enabled",
            "default": false
          },
          "minor_ordering_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minor Ordering Enabled",
            "default": false
          }
        },
        "type": "object",
        "title": "ClientFacingOrgTeamEnvironment"
      },
      "ClientFacingOrgTeamListItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "\nA human readable name of this Team. It is primarily used by Vital Dashboard.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you have set Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n\nSee also: `sandbox.brand_information` and `production.brand_information`.\n"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "title": "Created On"
          },
          "region": {
            "type": "string",
            "enum": [
              "us",
              "eu"
            ],
            "title": "Region"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_on",
          "region"
        ],
        "title": "ClientFacingOrgTeamListItem"
      },
      "ClientFacingOrgTeamListResponse": {
        "properties": {
          "teams": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingOrgTeamListItem"
            },
            "type": "array",
            "title": "Teams"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "teams",
          "next_cursor"
        ],
        "title": "ClientFacingOrgTeamListResponse"
      },
      "ClientFacingTeamAPIKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "value": {
            "type": "string",
            "title": "Value"
          },
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "value",
          "team_id",
          "created_at"
        ],
        "title": "ClientFacingTeamAPIKey"
      },
      "ClientFacingTeamAPIKeyResponse": {
        "properties": {
          "api_keys": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingTeamAPIKey"
            },
            "type": "array",
            "title": "Api Keys"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "api_keys"
        ],
        "title": "ClientFacingTeamAPIKeyResponse"
      },
      "ClientFacingTeamProviderCredentials": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret Hash"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Providers"
              },
              {
                "$ref": "#/components/schemas/Labs"
              },
              {
                "$ref": "#/components/schemas/LabsProviders"
              },
              {
                "$ref": "#/components/schemas/AppointmentProvider"
              }
            ],
            "title": "Source"
          },
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FitbitTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GoogleFitTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GoogleHealthTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/BioReferenceProviderDetails"
              },
              {
                "$ref": "#/components/schemas/LabCorpTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/QuestProviderDetails"
              },
              {
                "$ref": "#/components/schemas/PolarTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GetLabsTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/PhlebFindersTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/LabcorpProviderDetails"
              },
              {
                "$ref": "#/components/schemas/MyFitnessPalV2TeamProviderDetails"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "app_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Url"
          },
          "redirect_url_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Url Override"
          }
        },
        "type": "object",
        "required": [
          "id",
          "source",
          "team_id",
          "created_at",
          "updated_at"
        ],
        "title": "ClientFacingTeamProviderCredentials"
      },
      "ContinuousQuery": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/ContinuousQueryStatus"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "query": {
            "$ref": "#/components/schemas/Query-Output"
          },
          "query_config": {
            "$ref": "#/components/schemas/QueryConfig"
          },
          "scheduling_preferences": {
            "$ref": "#/components/schemas/ContinuousQuerySchedulingPreferences"
          },
          "result_table_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Result Table Schema"
          },
          "resource_dependencies": {
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "type": "array",
            "title": "Resource Dependencies"
          },
          "export_preferences": {
            "$ref": "#/components/schemas/ContinuousQueryExportPreferences"
          },
          "fhir_observation_mappers": {
            "items": {
              "type": "string",
              "enum": [
                "vital-signs#29463-7#junction-body-weight-1",
                "vital-signs#8867-4#junction-heart-rate-1",
                "vital-signs#9279-1#junction-respiration-rate-1"
              ]
            },
            "type": "array",
            "title": "Fhir Observation Mappers",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "slug",
          "title",
          "query",
          "scheduling_preferences",
          "result_table_schema",
          "resource_dependencies",
          "export_preferences"
        ],
        "title": "ContinuousQuery",
        "example": {
          "export_preferences": {
            "data_events": {
              "enabled": true
            }
          },
          "id": "d25f4472-c679-4e7a-9442-2bce8c12afb1",
          "query": {
            "group_by": [
              {
                "arg": {
                  "index": "sleep"
                },
                "date_trunc": {
                  "unit": "month",
                  "value": 1
                }
              }
            ],
            "select": [
              {
                "group_key": "*"
              },
              {
                "arg": {
                  "value_macro": "sleep_score",
                  "version": "automatic"
                },
                "func": "mean"
              }
            ]
          },
          "query_config": {
            "provider_priority_overrides": [
              "oura"
            ]
          },
          "resource_dependencies": [
            "sleep"
          ],
          "result_table_schema": {
            "group_key.0": "string",
            "sleep_score": "int64"
          },
          "scheduling_preferences": {
            "minimum_gap_duration_second": 3600
          },
          "slug": "weekly_mean_sleep_score",
          "title": "Weekly Mean Sleep Score"
        }
      },
      "ContinuousQueryDataEventPreferences": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "title": "ContinuousQueryDataEventPreferences"
      },
      "ContinuousQueryExportPreferences": {
        "properties": {
          "data_events": {
            "$ref": "#/components/schemas/ContinuousQueryDataEventPreferences"
          },
          "fhir_observations": {
            "type": "boolean",
            "title": "Fhir Observations",
            "default": false
          }
        },
        "type": "object",
        "title": "ContinuousQueryExportPreferences"
      },
      "ContinuousQueryResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContinuousQuery"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "ContinuousQueryResponse"
      },
      "ContinuousQuerySchedulingPreferences": {
        "properties": {
          "minimum_gap_duration_second": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1800
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum Gap Duration Second"
          }
        },
        "type": "object",
        "title": "ContinuousQuerySchedulingPreferences"
      },
      "ContinuousQueryStatus": {
        "type": "string",
        "enum": [
          "active",
          "archived"
        ],
        "title": "ContinuousQueryStatus"
      },
      "CreateAccessTokenBody": {
        "properties": {
          "env": {
            "$ref": "#/components/schemas/Env"
          }
        },
        "type": "object",
        "required": [
          "env"
        ],
        "title": "CreateAccessTokenBody"
      },
      "CreateContinuousQueryBody": {
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^(?!.*--)(?!.*-$)(?!-.*$)[a-z0-9-]{1,128}$",
            "title": "Slug"
          },
          "title": {
            "type": "string",
            "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9()&_\\-.\\s]{0,50}$",
            "title": "Title"
          },
          "query": {
            "$ref": "#/components/schemas/Query-Input"
          },
          "query_config": {
            "$ref": "#/components/schemas/QueryConfig"
          },
          "scheduling_preferences": {
            "$ref": "#/components/schemas/ContinuousQuerySchedulingPreferences"
          },
          "export_preferences": {
            "$ref": "#/components/schemas/ContinuousQueryExportPreferences"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "title",
          "query"
        ],
        "title": "CreateContinuousQueryBody",
        "example": {
          "export_preferences": {
            "data_events": {
              "enabled": true
            }
          },
          "query": {
            "group_by": [
              {
                "arg": {
                  "index": "sleep"
                },
                "date_trunc": {
                  "unit": "month",
                  "value": 1
                }
              }
            ],
            "select": [
              {
                "group_key": "*"
              },
              {
                "arg": {
                  "value_macro": "sleep_score",
                  "version": "automatic"
                },
                "func": "mean"
              }
            ]
          },
          "query_config": {
            "provider_priority_overrides": [
              "oura"
            ]
          },
          "scheduling_preferences": {
            "minimum_gap_duration_second": 3600
          },
          "slug": "weekly_mean_sleep_score",
          "title": "Weekly Mean Sleep Score"
        }
      },
      "CreateDashboardURLBody": {
        "properties": {
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "integration_member_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Member Id"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          },
          "feature": {
            "type": "string",
            "title": "Feature"
          },
          "modality": {
            "type": "string",
            "enum": [
              "feature_embed",
              "link_out"
            ],
            "title": "Modality"
          },
          "environment": {
            "$ref": "#/components/schemas/Env"
          }
        },
        "type": "object",
        "required": [
          "feature",
          "modality",
          "environment"
        ],
        "title": "CreateDashboardURLBody"
      },
      "CreateDashboardURLResponse": {
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Url"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In"
          }
        },
        "type": "object",
        "required": [
          "url",
          "expires_in"
        ],
        "title": "CreateDashboardURLResponse"
      },
      "CreateIntegrationManagedMemberBody": {
        "properties": {
          "integration_member_id": {
            "type": "string",
            "maxLength": 256,
            "title": "Integration Member Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "integration_member_id",
          "name",
          "email"
        ],
        "title": "CreateIntegrationManagedMemberBody"
      },
      "CreateManagementKeyBody": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "role": {
            "type": "string",
            "enum": [
              "org_admin",
              "team_admin"
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "label",
          "role"
        ],
        "title": "CreateManagementKeyBody"
      },
      "CreateOrgDomainBody": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain",
            "description": "Domain name, e.g. example.com"
          }
        },
        "type": "object",
        "required": [
          "domain"
        ],
        "title": "CreateOrgDomainBody"
      },
      "CreateOrgTeamBody": {
        "properties": {
          "lab_tests_patient_sms_communication_enabled": {
            "type": "boolean",
            "title": "Lab Tests Patient Sms Communication Enabled",
            "default": true
          },
          "lab_tests_patient_email_communication_enabled": {
            "type": "boolean",
            "title": "Lab Tests Patient Email Communication Enabled",
            "default": true
          },
          "critical_result_notification_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Critical Result Notification Email"
          },
          "brand_information": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrandInformation"
              },
              {
                "type": "null"
              }
            ],
            "description": "\nInformation of your brand.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you configure Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "reject_duplicate_connection": {
            "type": "boolean",
            "title": "Reject Duplicate Connection",
            "default": false
          },
          "sdk_per_device_activity_timeseries": {
            "type": "boolean",
            "title": "Sdk Per Device Activity Timeseries",
            "default": false
          },
          "partial_webhooks_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Partial Webhooks Enabled",
            "default": false
          },
          "minor_ordering_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minor Ordering Enabled",
            "default": false
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9(),/:'|&_\\- ’]{0,80}$",
            "title": "Name",
            "description": "\nA human readable name of this Team. It is primarily used by Vital Dashboard.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you have set Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n\nSee also: `sandbox.brand_information` and `production.brand_information`.\n"
          },
          "region": {
            "type": "string",
            "enum": [
              "us",
              "eu"
            ],
            "title": "Region"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "region"
        ],
        "title": "CreateOrgTeamBody"
      },
      "CreateTeamAPIKeyBody": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          }
        },
        "type": "object",
        "required": [
          "label",
          "team_id"
        ],
        "title": "CreateTeamAPIKeyBody"
      },
      "CreateTeamAccessTokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "expires_in"
        ],
        "title": "CreateTeamAccessTokenResponse"
      },
      "CreateWebhookBody": {
        "properties": {
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled",
            "default": false
          },
          "filter_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Types",
            "description": "For the complete list of events, check out the [Event Catalog](https://docs.junction.com/event-catalog).",
            "examples": [
              "daily.data.activity.created"
            ]
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "CreateWebhookBody"
      },
      "CreatorManagementKey": {
        "properties": {
          "type": {
            "type": "string",
            "const": "management_key",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CreatorManagementKey"
      },
      "CreatorOrgMember": {
        "properties": {
          "type": {
            "type": "string",
            "const": "org_member",
            "title": "Type"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "avatar": {
            "type": "string",
            "title": "Avatar"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "name",
          "email",
          "avatar"
        ],
        "title": "CreatorOrgMember"
      },
      "CreatorOrgMemberRemoved": {
        "properties": {
          "type": {
            "type": "string",
            "const": "removed_org_member",
            "title": "Type"
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "title": "CreatorOrgMemberRemoved"
      },
      "CreatorVitalStaff": {
        "properties": {
          "type": {
            "type": "string",
            "const": "vital_staff",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CreatorVitalStaff"
      },
      "CustomCredentialPreparationStep": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "redirect_uri",
              "webhook_uri",
              "iam_principal"
            ],
            "title": "Type"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "value": {
            "type": "string",
            "title": "Value"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "type",
          "key",
          "value",
          "description"
        ],
        "title": "CustomCredentialPreparationStep"
      },
      "CustomCredentialsResponse": {
        "properties": {
          "credentials": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingTeamProviderCredentials"
            },
            "type": "array",
            "title": "Credentials"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "credentials"
        ],
        "title": "CustomCredentialsResponse"
      },
      "DatePartExpr": {
        "properties": {
          "arg": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexColumnExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "Arg"
          },
          "date_part": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "minute",
                  "hour",
                  "day",
                  "week",
                  "month",
                  "year"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "weekday",
                  "week_of_year",
                  "day_of_year"
                ]
              }
            ],
            "title": "Date Part"
          }
        },
        "type": "object",
        "required": [
          "arg",
          "date_part"
        ],
        "title": "DatePartExpr"
      },
      "DateTruncExpr": {
        "properties": {
          "date_trunc": {
            "$ref": "#/components/schemas/Period"
          },
          "arg": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndexColumnExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "Arg"
          }
        },
        "type": "object",
        "required": [
          "date_trunc",
          "arg"
        ],
        "title": "DateTruncExpr"
      },
      "DefaultConfiguration": {
        "properties": {
          "historical_days_to_pull": {
            "type": "integer",
            "title": "Historical Days To Pull"
          }
        },
        "type": "object",
        "required": [
          "historical_days_to_pull"
        ],
        "title": "DefaultConfiguration"
      },
      "DefaultConfigurationWithLimit": {
        "properties": {
          "historical_days_to_pull": {
            "type": "integer",
            "title": "Historical Days To Pull"
          },
          "historical_days_to_pull_limit": {
            "type": "integer",
            "title": "Historical Days To Pull Limit"
          }
        },
        "type": "object",
        "required": [
          "historical_days_to_pull",
          "historical_days_to_pull_limit"
        ],
        "title": "DefaultConfigurationWithLimit"
      },
      "DeleteTeamApiKeysResponse": {
        "properties": {
          "success": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Success"
          },
          "failure": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Failure"
          },
          "not_found": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Not Found"
          }
        },
        "type": "object",
        "required": [
          "success",
          "failure",
          "not_found"
        ],
        "title": "DeleteTeamApiKeysResponse"
      },
      "DeleteTeamCustomCredentialsResponse": {
        "properties": {
          "success": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Success"
          },
          "failure": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Failure"
          },
          "not_found": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Not Found"
          }
        },
        "type": "object",
        "required": [
          "success",
          "failure",
          "not_found"
        ],
        "title": "DeleteTeamCustomCredentialsResponse"
      },
      "DerivedReadinessColumnExpr": {
        "properties": {
          "derived_readiness": {
            "type": "string",
            "enum": [
              "date",
              "chronotype",
              "sleep_score",
              "recovery_score",
              "recovery_zone",
              "stress_score",
              "strain_score",
              "strain_zone"
            ],
            "title": "Derived Readiness"
          }
        },
        "type": "object",
        "required": [
          "derived_readiness"
        ],
        "title": "DerivedReadinessColumnExpr"
      },
      "DiscreteTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "enum": [
              "glucose",
              "heartrate",
              "hrv",
              "ige",
              "igg",
              "cholesterol",
              "weight",
              "fat",
              "blood_oxygen",
              "electrocardiogram_voltage",
              "respiratory_rate",
              "stress_level"
            ],
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "const": "value"
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "DiscreteTimeseriesExpr"
      },
      "EHRPipelineAPIKey": {
        "properties": {
          "type": {
            "type": "string",
            "const": "api_key",
            "title": "Type"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "type",
          "api_key"
        ],
        "title": "EHRPipelineAPIKey"
      },
      "EHRPipelineGoogleIAM": {
        "properties": {
          "type": {
            "type": "string",
            "const": "google_iam",
            "title": "Type"
          },
          "service_account_email": {
            "type": "string",
            "title": "Service Account Email"
          },
          "audience": {
            "type": "string",
            "const": "https://healthcare.googleapis.com/",
            "title": "Audience"
          }
        },
        "type": "object",
        "required": [
          "type",
          "service_account_email",
          "audience"
        ],
        "title": "EHRPipelineGoogleIAM"
      },
      "EHRPipelineOAuth2ClientCredentials": {
        "properties": {
          "type": {
            "type": "string",
            "const": "client_credentials",
            "title": "Type"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_secret": {
            "type": "string",
            "format": "password",
            "title": "Client Secret",
            "writeOnly": true
          },
          "token_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Token Url"
          }
        },
        "type": "object",
        "required": [
          "type",
          "client_id",
          "client_secret",
          "token_url"
        ],
        "title": "EHRPipelineOAuth2ClientCredentials"
      },
      "EhrIntegrationConfig": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "modalities": {
            "items": {
              "type": "string",
              "enum": [
                "feature_embed",
                "link_out"
              ]
            },
            "type": "array",
            "title": "Modalities"
          },
          "origin_configs": {
            "items": {
              "$ref": "#/components/schemas/AllowedOriginConfig"
            },
            "type": "array",
            "title": "Origin Configs"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "modalities",
          "origin_configs"
        ],
        "title": "EhrIntegrationConfig"
      },
      "ElementFieldExpr": {
        "properties": {
          "element": {
            "type": "boolean",
            "const": true,
            "title": "Element"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "element"
        ],
        "title": "ElementFieldExpr",
        "description": "References the element itself in a scalar-element list subquery arg.\n\nSymmetric with the reserved ``element`` keyword in WHERE predicates.\nOnly valid when the UNNEST source is a ``List[scalar]``."
      },
      "Env": {
        "type": "string",
        "enum": [
          "production",
          "sandbox"
        ],
        "title": "Env"
      },
      "EventDestinationAzureAMQPAttributes-Input": {
        "properties": {
          "connection_string": {
            "type": "string",
            "title": "Connection String"
          },
          "default_event_hub": {
            "type": "string",
            "title": "Default Event Hub",
            "description": "The default Event Hub to use when none of the `event_hub_matchers` matches."
          },
          "event_hub_matchers": {
            "items": {
              "$ref": "#/components/schemas/EventDestinationEventHubMatcher"
            },
            "type": "array",
            "title": "Event Hub Matchers",
            "description": "A list of matchers to route event types to specific Event Hubs.\n\nString prefix matching is used, and the matchers are evaluated in array order.\nIf an event matches none of the matchers, it falls back to `default_event_hub`."
          },
          "compression": {
            "type": "string",
            "enum": [
              "always",
              "auto"
            ],
            "title": "Compression",
            "description": "`auto` mode compresses only payload blobs above a threshold (currently 1 KiB).\nFor all compressed payloads, Vital adds `Content-Encoding: gzip` to the\n`EventData.Properties` of the event.\n\n`always` mode compresses all blobs regardless of their size.",
            "default": "auto"
          }
        },
        "type": "object",
        "required": [
          "connection_string",
          "default_event_hub"
        ],
        "title": "EventDestinationAzureAMQPAttributes"
      },
      "EventDestinationAzureAMQPAttributes-Output": {
        "properties": {
          "connection_string": {
            "type": "string",
            "title": "Connection String"
          },
          "default_event_hub": {
            "type": "string",
            "title": "Default Event Hub",
            "description": "The default Event Hub to use when none of the `event_hub_matchers` matches."
          },
          "event_hub_matchers": {
            "items": {
              "$ref": "#/components/schemas/EventDestinationEventHubMatcher"
            },
            "type": "array",
            "title": "Event Hub Matchers",
            "description": "A list of matchers to route event types to specific Event Hubs.\n\nString prefix matching is used, and the matchers are evaluated in array order.\nIf an event matches none of the matchers, it falls back to `default_event_hub`."
          },
          "compression": {
            "type": "string",
            "enum": [
              "always",
              "auto"
            ],
            "title": "Compression",
            "description": "`auto` mode compresses only payload blobs above a threshold (currently 1 KiB).\nFor all compressed payloads, Vital adds `Content-Encoding: gzip` to the\n`EventData.Properties` of the event.\n\n`always` mode compresses all blobs regardless of their size.",
            "default": "auto"
          }
        },
        "type": "object",
        "required": [
          "connection_string",
          "default_event_hub"
        ],
        "title": "EventDestinationAzureAMQPAttributes"
      },
      "EventDestinationAzureBlobStorage": {
        "properties": {
          "connection_string": {
            "type": "string",
            "title": "Connection String"
          },
          "container_name": {
            "type": "string",
            "title": "Container Name"
          }
        },
        "type": "object",
        "required": [
          "connection_string",
          "container_name"
        ],
        "title": "EventDestinationAzureBlobStorage"
      },
      "EventDestinationCloudPubSubAttributes": {
        "properties": {
          "project": {
            "type": "string",
            "title": "Project"
          },
          "topic": {
            "type": "string",
            "title": "Topic"
          },
          "message_ordering": {
            "type": "boolean",
            "title": "Message Ordering"
          }
        },
        "type": "object",
        "required": [
          "project",
          "topic",
          "message_ordering"
        ],
        "title": "EventDestinationCloudPubSubAttributes"
      },
      "EventDestinationEventHubMatcher": {
        "properties": {
          "event_type_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Prefix",
            "description": "Match event types by prefix. If set, `event_type_regex` must not be specified."
          },
          "event_type_regex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Regex",
            "description": "Match event types by Google RE2. If set, `event_type_prefix` must not be specified."
          },
          "event_hub": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Hub",
            "description": "The destination event hub for matched event types. If set, `blob_storage` must not be specified"
          },
          "blob_storage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationAzureBlobStorage"
              },
              {
                "type": "null"
              }
            ],
            "description": "The destination blob storage for matched event types. If set, `event_hub` must not be specified"
          }
        },
        "type": "object",
        "title": "EventDestinationEventHubMatcher"
      },
      "EventDestinationPreferences": {
        "properties": {
          "preferred": {
            "type": "string",
            "enum": [
              "cloud_pubsub",
              "rabbitmq",
              "svix",
              "azure_amqp"
            ],
            "title": "Preferred"
          },
          "enabled": {
            "items": {
              "type": "string",
              "enum": [
                "cloud_pubsub",
                "rabbitmq",
                "svix",
                "azure_amqp"
              ]
            },
            "type": "array",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "preferred",
          "enabled"
        ],
        "title": "EventDestinationPreferences"
      },
      "EventDestinationRabbitMQAttributes": {
        "properties": {
          "uri": {
            "type": "string",
            "title": "Uri"
          },
          "exchange": {
            "type": "string",
            "title": "Exchange"
          }
        },
        "type": "object",
        "required": [
          "uri",
          "exchange"
        ],
        "title": "EventDestinationRabbitMQAttributes"
      },
      "EventDestinationSvixAttributes": {
        "properties": {
          "regional": {
            "type": "boolean",
            "const": true,
            "title": "Regional",
            "default": true,
            "deprecated": true
          }
        },
        "type": "object",
        "title": "EventDestinationSvixAttributes"
      },
      "FitbitMetadata": {
        "properties": {
          "is_hr_enabled": {
            "type": "boolean",
            "title": "Is Hr Enabled",
            "default": false
          },
          "workout_verify_token": {
            "type": "string",
            "title": "Workout Verify Token"
          },
          "sleep_verify_token": {
            "type": "string",
            "title": "Sleep Verify Token"
          },
          "body_verify_token": {
            "type": "string",
            "title": "Body Verify Token"
          },
          "foods_verify_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Foods Verify Token"
          }
        },
        "type": "object",
        "required": [
          "workout_verify_token",
          "sleep_verify_token",
          "body_verify_token"
        ],
        "title": "FitbitMetadata"
      },
      "FitbitScope": {
        "type": "string",
        "enum": [
          "heartrate",
          "oxygen_saturation",
          "cardio_fitness",
          "respiratory_rate",
          "activity",
          "location",
          "nutrition",
          "profile",
          "settings",
          "sleep",
          "social",
          "weight",
          "temperature"
        ],
        "title": "FitbitScope"
      },
      "FitbitTeamProviderDetails": {
        "properties": {
          "fitbit": {
            "$ref": "#/components/schemas/FitbitMetadata"
          }
        },
        "type": "object",
        "required": [
          "fitbit"
        ],
        "title": "FitbitTeamProviderDetails"
      },
      "GetLabsMetadata": {
        "properties": {
          "webhook_secret_key": {
            "type": "string",
            "title": "Webhook Secret Key"
          },
          "webhook_secret_token": {
            "type": "string",
            "title": "Webhook Secret Token"
          }
        },
        "type": "object",
        "required": [
          "webhook_secret_key",
          "webhook_secret_token"
        ],
        "title": "GetLabsMetadata"
      },
      "GetLabsTeamProviderDetails": {
        "properties": {
          "getlabs": {
            "$ref": "#/components/schemas/GetLabsMetadata"
          }
        },
        "type": "object",
        "required": [
          "getlabs"
        ],
        "title": "GetLabsTeamProviderDetails"
      },
      "GoogleFitScope": {
        "type": "string",
        "enum": [
          "openid",
          "email",
          "https://www.googleapis.com/auth/fitness.activity.read",
          "https://www.googleapis.com/auth/fitness.body.read",
          "https://www.googleapis.com/auth/fitness.sleep.read",
          "https://www.googleapis.com/auth/fitness.blood_glucose.read",
          "https://www.googleapis.com/auth/fitness.blood_pressure.read",
          "https://www.googleapis.com/auth/fitness.heart_rate.read",
          "https://www.googleapis.com/auth/fitness.nutrition.read",
          "https://www.googleapis.com/auth/fitness.location.read"
        ],
        "title": "GoogleFitScope"
      },
      "GoogleFitTeamProviderDetails": {
        "properties": {
          "redirect_uri": {
            "type": "string",
            "title": "Redirect Uri"
          },
          "data_scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Data Scopes"
          }
        },
        "type": "object",
        "required": [
          "redirect_uri",
          "data_scopes"
        ],
        "title": "GoogleFitTeamProviderDetails"
      },
      "GoogleHealthScope": {
        "type": "string",
        "enum": [
          "openid",
          "email",
          "https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly",
          "https://www.googleapis.com/auth/googlehealth.sleep.readonly",
          "https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly",
          "https://www.googleapis.com/auth/googlehealth.nutrition.readonly",
          "https://www.googleapis.com/auth/googlehealth.ecg.readonly",
          "https://www.googleapis.com/auth/googlehealth.irn.readonly",
          "https://www.googleapis.com/auth/googlehealth.location.readonly",
          "https://www.googleapis.com/auth/googlehealth.profile.readonly",
          "https://www.googleapis.com/auth/googlehealth.settings.readonly"
        ],
        "title": "GoogleHealthScope"
      },
      "GoogleHealthTeamProviderDetails": {
        "properties": {
          "project_number": {
            "type": "string",
            "title": "Project Number"
          },
          "service_account_email": {
            "type": "string",
            "title": "Service Account Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_number",
          "service_account_email"
        ],
        "title": "GoogleHealthTeamProviderDetails"
      },
      "GroupKeyColumnExpr": {
        "properties": {
          "group_key": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string",
                "const": "*"
              }
            ],
            "title": "Group Key"
          }
        },
        "type": "object",
        "required": [
          "group_key"
        ],
        "title": "GroupKeyColumnExpr"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IndexColumnExpr": {
        "properties": {
          "index": {
            "type": "string",
            "enum": [
              "sleep",
              "derived_readiness",
              "activity",
              "workout",
              "body",
              "meal",
              "menstrual_cycle",
              "profile",
              "timeseries"
            ],
            "title": "Index"
          }
        },
        "type": "object",
        "required": [
          "index"
        ],
        "title": "IndexColumnExpr"
      },
      "InsulinInjectionTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "const": "insulin_injection",
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "duration",
                  "value"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "delivery_mode",
                  "delivery_form",
                  "bolus_purpose"
                ]
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "InsulinInjectionTimeseriesExpr"
      },
      "IntegrationManagedMember": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "integration_member_id": {
            "type": "string",
            "title": "Integration Member Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "id",
          "integration_member_id",
          "name",
          "email",
          "avatar",
          "team_role_bindings"
        ],
        "title": "IntegrationManagedMember"
      },
      "IntegrationMemberIDConflictResponse": {
        "properties": {
          "member_id": {
            "type": "string",
            "format": "uuid",
            "title": "Member Id"
          }
        },
        "type": "object",
        "required": [
          "member_id"
        ],
        "title": "IntegrationMemberIDConflictResponse"
      },
      "IntegrationTeamIDConflictResponse": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          }
        },
        "type": "object",
        "required": [
          "team_id"
        ],
        "title": "IntegrationTeamIDConflictResponse"
      },
      "IntervalTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "enum": [
              "steps",
              "distance",
              "vo2_max",
              "heart_rate_alert",
              "stand_hour",
              "sleep_breathing_disturbance",
              "water",
              "caffeine",
              "mindfulness_minutes",
              "calories_active",
              "floors_climbed",
              "calories_basal",
              "afib_burden",
              "stand_duration",
              "sleep_apnea_alert",
              "wheelchair_push",
              "forced_expiratory_volume_1",
              "forced_vital_capacity",
              "peak_expiratory_flow_rate",
              "inhaler_usage",
              "fall",
              "uv_exposure",
              "daylight_exposure",
              "handwashing",
              "basal_body_temperature",
              "body_mass_index",
              "lean_body_mass",
              "waist_circumference",
              "heart_rate_recovery_one_minute",
              "workout_swimming_stroke",
              "workout_distance",
              "carbohydrates"
            ],
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "duration",
                  "value"
                ]
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "IntervalTimeseriesExpr"
      },
      "LabAccountDelegatedFlow": {
        "type": "string",
        "enum": [
          "order_delegated",
          "result_delegated",
          "fully_delegated",
          "not_delegated"
        ],
        "title": "LabAccountDelegatedFlow",
        "description": "Describes which parts of the lab testing flow are delegated to the customer.\n\n- ORDER_DELEGATED: Ordering using client's physicians, critical result follow up via Junction\n- RESULT_DELEGATED: Ordering using Junction's Physician Network, critical results handled by client\n- FULLY_DELEGATED: Order and critical results handled by client\n- NOT_DELEGATED: Junction handles both ordering and results"
      },
      "LabAccountResponse": {
        "properties": {
          "lab_account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientFacingLabAccount"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "LabAccountResponse"
      },
      "LabAccountStatus": {
        "type": "string",
        "enum": [
          "active",
          "pending",
          "suspended",
          "ready_to_launch"
        ],
        "title": "LabAccountStatus"
      },
      "LabAccountTeamIdAllowlistUpdateBody": {
        "properties": {
          "team_id_allowlist": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Team Id Allowlist"
          }
        },
        "type": "object",
        "required": [
          "team_id_allowlist"
        ],
        "title": "LabAccountTeamIdAllowlistUpdateBody"
      },
      "LabAccountsResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingLabAccount"
            },
            "type": "array",
            "title": "Data",
            "default": []
          }
        },
        "type": "object",
        "title": "LabAccountsResponse"
      },
      "LabCorpMetadata": {
        "properties": {
          "account_number": {
            "type": "string",
            "title": "Account Number"
          },
          "billing_method": {
            "type": "string",
            "enum": [
              "CM",
              "PT",
              "PI"
            ],
            "title": "Billing Method"
          }
        },
        "type": "object",
        "required": [
          "account_number",
          "billing_method"
        ],
        "title": "LabCorpMetadata"
      },
      "LabCorpTeamProviderDetails": {
        "properties": {
          "sub_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Id"
          },
          "sub_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Name"
          },
          "allowed_billing_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Billing Types"
          },
          "disallowed_billing_states": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "propertyNames": {
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disallowed Billing States"
          },
          "labcorp": {
            "$ref": "#/components/schemas/LabCorpMetadata"
          }
        },
        "type": "object",
        "required": [
          "labcorp"
        ],
        "title": "LabCorpTeamProviderDetails"
      },
      "LabcorpProviderDetails": {
        "properties": {
          "sub_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Id"
          },
          "sub_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Name"
          },
          "allowed_billing_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Billing Types"
          },
          "disallowed_billing_states": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "propertyNames": {
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disallowed Billing States"
          },
          "sending_facility": {
            "type": "string",
            "title": "Sending Facility"
          },
          "sending_application": {
            "type": "string",
            "title": "Sending Application"
          },
          "receiving_facility": {
            "type": "string",
            "title": "Receiving Facility"
          },
          "receiving_application": {
            "type": "string",
            "title": "Receiving Application"
          }
        },
        "type": "object",
        "required": [
          "sending_facility",
          "sending_application",
          "receiving_facility",
          "receiving_application"
        ],
        "title": "LabcorpProviderDetails"
      },
      "Labs": {
        "type": "string",
        "enum": [
          "ayumetrix",
          "spiriplex",
          "ussl",
          "quest",
          "sonora_quest",
          "labcorp",
          "bioreference",
          "us_biotek",
          "manual",
          "sanocardio",
          "ihd",
          "nexus",
          "my_uti",
          "crl",
          "mtl"
        ],
        "title": "Labs"
      },
      "LabsProviders": {
        "type": "string",
        "enum": [
          "shippo",
          "sanocardio",
          "supera",
          "twilio",
          "telnyx",
          "mtl"
        ],
        "title": "LabsProviders"
      },
      "ListIntegrationManagedMembersResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IntegrationManagedMember"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "ListIntegrationManagedMembersResponse"
      },
      "ListOrgDomainResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingOrgDomain"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ListOrgDomainResponse"
      },
      "MCBasalBodyTemperatureFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "basal_body_temperature": {
            "type": "string",
            "enum": [
              "date",
              "value"
            ],
            "title": "Basal Body Temperature"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "basal_body_temperature"
        ],
        "title": "MCBasalBodyTemperatureFieldExpr"
      },
      "MCCervicalMucusFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "cervical_mucus": {
            "type": "string",
            "enum": [
              "date",
              "quality"
            ],
            "title": "Cervical Mucus"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cervical_mucus"
        ],
        "title": "MCCervicalMucusFieldExpr"
      },
      "MCContraceptiveFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "contraceptive": {
            "type": "string",
            "enum": [
              "date",
              "type"
            ],
            "title": "Contraceptive"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "contraceptive"
        ],
        "title": "MCContraceptiveFieldExpr"
      },
      "MCDetectedDeviationsFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "detected_deviations": {
            "type": "string",
            "enum": [
              "date",
              "deviation"
            ],
            "title": "Detected Deviations"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "detected_deviations"
        ],
        "title": "MCDetectedDeviationsFieldExpr"
      },
      "MCHomePregnancyTestFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "home_pregnancy_test": {
            "type": "string",
            "enum": [
              "date",
              "test_result"
            ],
            "title": "Home Pregnancy Test"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "home_pregnancy_test"
        ],
        "title": "MCHomePregnancyTestFieldExpr"
      },
      "MCHomeProgesteroneTestFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "home_progesterone_test": {
            "type": "string",
            "enum": [
              "date",
              "test_result"
            ],
            "title": "Home Progesterone Test"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "home_progesterone_test"
        ],
        "title": "MCHomeProgesteroneTestFieldExpr"
      },
      "MCIntermenstrualBleedingFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "intermenstrual_bleeding": {
            "type": "string",
            "const": "date",
            "title": "Intermenstrual Bleeding"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "intermenstrual_bleeding"
        ],
        "title": "MCIntermenstrualBleedingFieldExpr"
      },
      "MCMenstrualFlowFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "menstrual_flow": {
            "type": "string",
            "enum": [
              "date",
              "flow"
            ],
            "title": "Menstrual Flow"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "menstrual_flow"
        ],
        "title": "MCMenstrualFlowFieldExpr"
      },
      "MCOvulationTestFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "ovulation_test": {
            "type": "string",
            "enum": [
              "date",
              "test_result"
            ],
            "title": "Ovulation Test"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "ovulation_test"
        ],
        "title": "MCOvulationTestFieldExpr"
      },
      "MCSexualActivityFieldExpr": {
        "properties": {
          "field_for": {
            "type": "string",
            "const": "menstrual_cycle",
            "title": "Field For",
            "default": "menstrual_cycle"
          },
          "sexual_activity": {
            "type": "string",
            "enum": [
              "date",
              "protection_used"
            ],
            "title": "Sexual Activity"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sexual_activity"
        ],
        "title": "MCSexualActivityFieldExpr"
      },
      "MealColumnExpr": {
        "properties": {
          "meal": {
            "type": "string",
            "enum": [
              "calories",
              "carbohydrate_gram",
              "protein_gram",
              "alcohol_gram",
              "water_gram",
              "fibre_gram",
              "sugar_gram",
              "cholesterol_gram",
              "saturated_fat_gram",
              "monounsaturated_fat_gram",
              "polyunsaturated_fat_gram",
              "omega3_fat_gram",
              "omega6_fat_gram",
              "total_fat_gram",
              "sodium_milligram",
              "potassium_milligram",
              "calcium_milligram",
              "phosphorus_milligram",
              "magnesium_milligram",
              "iron_milligram",
              "zinc_milligram",
              "fluoride_milligram",
              "chloride_milligram",
              "vitamin_a_milligram",
              "vitamin_b1_milligram",
              "riboflavin_milligram",
              "niacin_milligram",
              "pantothenic_acid_milligram",
              "vitamin_b6_milligram",
              "biotin_microgram",
              "vitamin_b12_microgram",
              "vitamin_c_milligram",
              "vitamin_d_microgram",
              "vitamin_e_milligram",
              "vitamin_k_microgram",
              "folic_acid_microgram",
              "chromium_microgram",
              "copper_milligram",
              "iodine_microgram",
              "manganese_milligram",
              "molybdenum_microgram",
              "selenium_microgram",
              "date",
              "name",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id"
            ],
            "title": "Meal"
          }
        },
        "type": "object",
        "required": [
          "meal"
        ],
        "title": "MealColumnExpr"
      },
      "MenstrualCycleColumnExpr": {
        "properties": {
          "menstrual_cycle": {
            "type": "string",
            "enum": [
              "period_start",
              "period_end",
              "cycle_end",
              "is_predicted",
              "menstrual_flow",
              "cervical_mucus",
              "intermenstrual_bleeding",
              "contraceptive",
              "detected_deviations",
              "ovulation_test",
              "home_pregnancy_test",
              "home_progesterone_test",
              "sexual_activity",
              "basal_body_temperature",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id"
            ],
            "title": "Menstrual Cycle"
          }
        },
        "type": "object",
        "required": [
          "menstrual_cycle"
        ],
        "title": "MenstrualCycleColumnExpr"
      },
      "MyFitnessPalScope": {
        "type": "string",
        "enum": [
          "diary",
          "measurements",
          "private-exercises",
          "subscriptions"
        ],
        "title": "MyFitnessPalScope"
      },
      "MyFitnessPalV2TeamProviderDetails": {
        "properties": {
          "client": {
            "type": "string",
            "title": "Client"
          }
        },
        "type": "object",
        "required": [
          "client"
        ],
        "title": "MyFitnessPalV2TeamProviderDetails"
      },
      "NoteTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "const": "note",
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "tags",
                  "content"
                ]
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "NoteTimeseriesExpr"
      },
      "OAuthProviders": {
        "type": "string",
        "enum": [
          "oura",
          "fitbit",
          "garmin",
          "strava",
          "wahoo",
          "ihealth",
          "withings",
          "google_fit",
          "dexcom_v3",
          "polar",
          "cronometer",
          "omron",
          "whoop_v2",
          "my_fitness_pal_v2",
          "ultrahuman",
          "runkeeper",
          "google_health"
        ],
        "title": "OAuthProviders"
      },
      "OrgInviteAPICreate": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "org_admin",
                  "team_admin"
                ]
              },
              {
                "type": "string",
                "const": "no_role"
              }
            ],
            "title": "Role",
            "default": "org_admin"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "OrgInviteAPICreate"
      },
      "OrgInviteAPICreateResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "invite_created",
              "invite_resent",
              "already_in_org"
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "OrgInviteAPICreateResponse"
      },
      "OuraScope": {
        "type": "string",
        "enum": [
          "email",
          "personal",
          "daily",
          "heartrate",
          "workout",
          "tag",
          "session"
        ],
        "title": "OuraScope"
      },
      "PatchManagementKeyBody": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "title": "PatchManagementKeyBody"
      },
      "PatchWebhookBody": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "disabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled"
          },
          "filter_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Types",
            "description": "For the complete list of events, check out the [Event Catalog](https://docs.junction.com/event-catalog).",
            "examples": [
              "daily.data.activity.created"
            ]
          }
        },
        "type": "object",
        "title": "PatchWebhookBody"
      },
      "Period": {
        "properties": {
          "value": {
            "type": "integer",
            "minimum": 1,
            "title": "Value",
            "default": 1
          },
          "unit": {
            "type": "string",
            "enum": [
              "minute",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "title": "Unit"
          }
        },
        "type": "object",
        "required": [
          "unit"
        ],
        "title": "Period"
      },
      "PhlebFindersMetadata": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "account_name": {
            "type": "string",
            "title": "Account Name"
          },
          "team_id": {
            "type": "string",
            "title": "Team Id"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "webhook_token": {
            "type": "string",
            "title": "Webhook Token"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "account_name",
          "team_id",
          "team_name",
          "webhook_token",
          "email"
        ],
        "title": "PhlebFindersMetadata"
      },
      "PhlebFindersTeamProviderDetails": {
        "properties": {
          "phlebfinders": {
            "$ref": "#/components/schemas/PhlebFindersMetadata"
          }
        },
        "type": "object",
        "required": [
          "phlebfinders"
        ],
        "title": "PhlebFindersTeamProviderDetails"
      },
      "Placeholder": {
        "properties": {
          "placeholder": {
            "type": "boolean",
            "const": true,
            "title": "Placeholder"
          }
        },
        "type": "object",
        "required": [
          "placeholder"
        ],
        "title": "Placeholder"
      },
      "PolarTeamProviderDetails": {
        "properties": {
          "webhook_secret": {
            "type": "string",
            "title": "Webhook Secret"
          }
        },
        "type": "object",
        "required": [
          "webhook_secret"
        ],
        "title": "PolarTeamProviderDetails"
      },
      "PrepareTeamCustomCredentialsBody": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Providers"
              },
              {
                "$ref": "#/components/schemas/Labs"
              }
            ],
            "title": "Provider"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "provider"
        ],
        "title": "PrepareTeamCustomCredentialsBody"
      },
      "PrepareTeamCustomCredentialsResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "no_action_needed",
              "preparations_required"
            ],
            "title": "Status",
            "description": "### `no_action_needed`\nNo preparation needs to be done.\nYou can apply the custom credential using the Set Team Custom Credentials API\nright away.\n\n### `preparations_required`\nYou should configure your OAuth application in accordance to the preparation steps\nprovided, before calling the Set Team Custom Credentials API to\napply the custom credential to your team."
          },
          "preparation_steps": {
            "items": {
              "$ref": "#/components/schemas/CustomCredentialPreparationStep"
            },
            "type": "array",
            "title": "Preparation Steps",
            "description": "A list of steps which must be completed before applying the custom\ncredential to your team through the Set Team Custom Credentials API."
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PrepareTeamCustomCredentialsResponse"
      },
      "ProfileColumnExpr": {
        "properties": {
          "profile": {
            "type": "string",
            "enum": [
              "height_centimeter",
              "birth_date",
              "wheelchair_use",
              "gender",
              "sex",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id",
              "created_at",
              "updated_at"
            ],
            "title": "Profile"
          }
        },
        "type": "object",
        "required": [
          "profile"
        ],
        "title": "ProfileColumnExpr"
      },
      "PrometheusQueryData": {
        "properties": {
          "resultType": {
            "type": "string",
            "const": "matrix",
            "title": "Resulttype"
          },
          "result": {
            "items": {
              "$ref": "#/components/schemas/PrometheusQueryResult"
            },
            "type": "array",
            "title": "Result"
          }
        },
        "type": "object",
        "required": [
          "resultType",
          "result"
        ],
        "title": "PrometheusQueryData"
      },
      "PrometheusQueryResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "success",
            "title": "Status"
          },
          "data": {
            "$ref": "#/components/schemas/PrometheusQueryData"
          }
        },
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "title": "PrometheusQueryResponse",
        "description": "ref: https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries"
      },
      "PrometheusQueryResult": {
        "properties": {
          "metric": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Metric"
          },
          "values": {
            "items": {
              "prefixItems": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "type": "array",
              "maxItems": 2,
              "minItems": 2
            },
            "type": "array",
            "title": "Values"
          }
        },
        "type": "object",
        "required": [
          "metric",
          "values"
        ],
        "title": "PrometheusQueryResult"
      },
      "Providers": {
        "type": "string",
        "enum": [
          "oura",
          "fitbit",
          "garmin",
          "whoop",
          "strava",
          "renpho",
          "peloton",
          "wahoo",
          "zwift",
          "freestyle_libre",
          "abbott_libreview",
          "tandem_source",
          "freestyle_libre_ble",
          "eight_sleep",
          "withings",
          "apple_health_kit",
          "manual",
          "ihealth",
          "google_fit",
          "beurer_api",
          "beurer_ble",
          "omron",
          "omron_ble",
          "onetouch_ble",
          "accuchek_ble",
          "contour_ble",
          "dexcom",
          "dexcom_v3",
          "hammerhead",
          "my_fitness_pal",
          "health_connect",
          "samsung_health",
          "polar",
          "cronometer",
          "kardia",
          "whoop_v2",
          "ultrahuman",
          "my_fitness_pal_v2",
          "map_my_fitness",
          "runkeeper",
          "google_health"
        ],
        "title": "Providers"
      },
      "Query-Input": {
        "properties": {
          "select": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AggregateExpr-Input"
                },
                {
                  "$ref": "#/components/schemas/GroupKeyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ActivityColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/BodyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MealColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ProfileColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IntervalTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/NoteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IndexColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ScalarOutputSubqueryExpr-Input"
                },
                {
                  "$ref": "#/components/schemas/SourceColumnExpr"
                }
              ]
            },
            "type": "array",
            "title": "Select"
          },
          "group_by": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateTruncExpr"
                },
                {
                  "$ref": "#/components/schemas/DatePartExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ActivityColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/BodyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MealColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ProfileColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IntervalTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/NoteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/SourceColumnExpr"
                }
              ]
            },
            "type": "array",
            "title": "Group By"
          },
          "where": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Where",
            "description": "A WHERE clause filtering the input data. If a GROUP BY clause is present, filtering happens prior to GROUP BY evaluation.\n\nWHERE clause uses SQL Expression syntax to describe the filtering criteria:\n* Available operators: `>`, `>=`, `<`, `<=`, `=`, `!=`, `NOT`, `AND` and `OR`.\n* Parentheses is supported."
          },
          "align": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlignExpr-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "Post-aggregation alignment clause. When a carry operator is set, missing\ndatetime buckets are materialised and filled after group_by+aggregate.\nOmitting this field preserves honest-null behaviour."
          }
        },
        "type": "object",
        "required": [
          "select"
        ],
        "title": "Query"
      },
      "Query-Output": {
        "properties": {
          "select": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AggregateExpr-Output"
                },
                {
                  "$ref": "#/components/schemas/GroupKeyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ActivityColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/BodyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MealColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ProfileColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IntervalTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/NoteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IndexColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ScalarOutputSubqueryExpr-Output"
                },
                {
                  "$ref": "#/components/schemas/SourceColumnExpr"
                }
              ]
            },
            "type": "array",
            "title": "Select"
          },
          "group_by": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateTruncExpr"
                },
                {
                  "$ref": "#/components/schemas/DatePartExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ActivityColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/BodyColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MealColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/ProfileColumnExpr"
                },
                {
                  "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
                },
                {
                  "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/IntervalTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/NoteTimeseriesExpr"
                },
                {
                  "$ref": "#/components/schemas/SourceColumnExpr"
                }
              ]
            },
            "type": "array",
            "title": "Group By"
          },
          "where": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Where",
            "description": "A WHERE clause filtering the input data. If a GROUP BY clause is present, filtering happens prior to GROUP BY evaluation.\n\nWHERE clause uses SQL Expression syntax to describe the filtering criteria:\n* Available operators: `>`, `>=`, `<`, `<=`, `=`, `!=`, `NOT`, `AND` and `OR`.\n* Parentheses is supported."
          },
          "align": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlignExpr-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "Post-aggregation alignment clause. When a carry operator is set, missing\ndatetime buckets are materialised and filled after group_by+aggregate.\nOmitting this field preserves honest-null behaviour."
          }
        },
        "type": "object",
        "required": [
          "select"
        ],
        "title": "Query"
      },
      "QueryConfig": {
        "properties": {
          "provider_priority_overrides": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Providers"
                    },
                    {
                      "$ref": "#/components/schemas/Labs"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Priority Overrides"
          }
        },
        "type": "object",
        "title": "QueryConfig"
      },
      "QuestProviderDetails": {
        "properties": {
          "sub_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Id"
          },
          "sub_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sub Account Name"
          },
          "allowed_billing_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Billing Types"
          },
          "disallowed_billing_states": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "propertyNames": {
                  "enum": [
                    "client_bill",
                    "commercial_insurance",
                    "patient_bill_passthrough",
                    "patient_bill"
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disallowed Billing States"
          },
          "quest": {
            "additionalProperties": true,
            "type": "object",
            "title": "Quest"
          },
          "allowed_business_units": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Business Units"
          }
        },
        "type": "object",
        "required": [
          "quest"
        ],
        "title": "QuestProviderDetails"
      },
      "ResolveIntegrationManagedMemberBody": {
        "properties": {
          "integration_member_id": {
            "type": "string",
            "maxLength": 256,
            "title": "Integration Member Id"
          }
        },
        "type": "object",
        "required": [
          "integration_member_id"
        ],
        "title": "ResolveIntegrationManagedMemberBody"
      },
      "ResolveTeamBody": {
        "properties": {
          "integration_team_id": {
            "type": "string",
            "maxLength": 256,
            "title": "Integration Team Id"
          }
        },
        "type": "object",
        "required": [
          "integration_team_id"
        ],
        "title": "ResolveTeamBody"
      },
      "ResolveTeamResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "created_on": {
            "type": "string",
            "format": "date-time",
            "title": "Created On"
          },
          "region": {
            "type": "string",
            "enum": [
              "us",
              "eu"
            ],
            "title": "Region"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          },
          "environments": {
            "items": {
              "$ref": "#/components/schemas/Env"
            },
            "type": "array",
            "title": "Environments"
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientFacingOrgTeamEnvironment"
              },
              {
                "type": "null"
              }
            ]
          },
          "production": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientFacingOrgTeamEnvironment"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_on",
          "region",
          "sandbox",
          "production"
        ],
        "title": "ResolveTeamResponse"
      },
      "Resource": {
        "type": "string",
        "enum": [
          "profile",
          "activity",
          "sleep",
          "body",
          "workouts",
          "workout_stream",
          "connection",
          "order",
          "result",
          "match_review",
          "appointment",
          "result_table",
          "glucose",
          "heartrate",
          "hrv",
          "hrv",
          "ige",
          "igg",
          "blood_oxygen",
          "blood_pressure",
          "cholesterol",
          "device",
          "device_legacy",
          "weight",
          "fat",
          "body_temperature",
          "body_temperature_delta",
          "meal",
          "water",
          "caffeine",
          "mindfulness_minutes",
          "steps",
          "calories_active",
          "distance",
          "floors_climbed",
          "respiratory_rate",
          "vo2_max",
          "calories_basal",
          "stress_level",
          "menstrual_cycle",
          "sleep_cycle",
          "electrocardiogram",
          "electrocardiogram_voltage",
          "afib_burden",
          "heart_rate_alert",
          "stand_hour",
          "stand_duration",
          "sleep_apnea_alert",
          "sleep_breathing_disturbance",
          "wheelchair_push",
          "forced_expiratory_volume_1",
          "forced_vital_capacity",
          "peak_expiratory_flow_rate",
          "inhaler_usage",
          "fall",
          "uv_exposure",
          "daylight_exposure",
          "handwashing",
          "basal_body_temperature",
          "heart_rate_recovery_one_minute",
          "body_mass_index",
          "lean_body_mass",
          "waist_circumference",
          "workout_distance",
          "workout_swimming_stroke",
          "workout_duration",
          "insulin_injection",
          "carbohydrates",
          "note",
          "sleep_stream",
          "hypnogram"
        ],
        "title": "ClientFacingResource",
        "x-fern-type-name": "ClientFacingResource"
      },
      "RotateWebhookSecretBody": {
        "properties": {
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          }
        },
        "type": "object",
        "title": "RotateWebhookSecretBody"
      },
      "ScalarOutputSubqueryExpr-Input": {
        "properties": {
          "select": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregateFieldExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "Select"
          },
          "from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnnestExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "From"
          },
          "where": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Where"
          }
        },
        "type": "object",
        "required": [
          "select",
          "from"
        ],
        "title": "ScalarOutputSubqueryExpr",
        "description": "A subquery that produces a single scalar value per row."
      },
      "ScalarOutputSubqueryExpr-Output": {
        "properties": {
          "select": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregateFieldExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "Select"
          },
          "from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnnestExpr"
              },
              {
                "$ref": "#/components/schemas/Placeholder"
              }
            ],
            "title": "From"
          },
          "where": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Where"
          }
        },
        "type": "object",
        "required": [
          "select",
          "from"
        ],
        "title": "ScalarOutputSubqueryExpr",
        "description": "A subquery that produces a single scalar value per row."
      },
      "SendOrgDomainInstructionsBody": {
        "properties": {
          "to_email": {
            "type": "string",
            "title": "To Email"
          }
        },
        "type": "object",
        "required": [
          "to_email"
        ],
        "title": "SendOrgDomainInstructionsBody"
      },
      "SendOrgDomainInstructionsResponse": {
        "properties": {
          "sent": {
            "type": "boolean",
            "title": "Sent"
          },
          "sendgrid_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendgrid Message Id"
          }
        },
        "type": "object",
        "required": [
          "sent"
        ],
        "title": "SendOrgDomainInstructionsResponse"
      },
      "SingleProviderDataPullPreferences": {
        "properties": {
          "default": {
            "$ref": "#/components/schemas/DefaultConfiguration"
          },
          "resource_overrides": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/SingleResourceOverride"
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/Resource"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Overrides"
          }
        },
        "type": "object",
        "required": [
          "default"
        ],
        "title": "SingleProviderDataPullPreferences"
      },
      "SingleProviderDataPullPreferencesWithLimit": {
        "properties": {
          "default": {
            "$ref": "#/components/schemas/DefaultConfigurationWithLimit"
          },
          "resource_overrides": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/SingleResourceOverrideWithLimit"
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/Resource"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Overrides"
          }
        },
        "type": "object",
        "required": [
          "default"
        ],
        "title": "SingleProviderDataPullPreferencesWithLimit"
      },
      "SingleResourceOverride": {
        "properties": {
          "historical_days_to_pull": {
            "type": "integer",
            "title": "Historical Days To Pull"
          }
        },
        "type": "object",
        "required": [
          "historical_days_to_pull"
        ],
        "title": "SingleResourceOverride"
      },
      "SingleResourceOverrideWithLimit": {
        "properties": {
          "historical_days_to_pull": {
            "type": "integer",
            "title": "Historical Days To Pull"
          },
          "historical_days_to_pull_limit": {
            "type": "integer",
            "title": "Historical Days To Pull Limit"
          }
        },
        "type": "object",
        "required": [
          "historical_days_to_pull",
          "historical_days_to_pull_limit"
        ],
        "title": "SingleResourceOverrideWithLimit"
      },
      "SleepColumnExpr": {
        "properties": {
          "sleep": {
            "type": "string",
            "enum": [
              "id",
              "session_start",
              "session_end",
              "state",
              "type",
              "duration_second",
              "stage_asleep_second",
              "stage_awake_second",
              "stage_light_second",
              "stage_rem_second",
              "stage_deep_second",
              "stage_unknown_second",
              "latency_second",
              "heart_rate_minimum",
              "heart_rate_mean",
              "heart_rate_maximum",
              "heart_rate_dip",
              "heart_rate_resting",
              "efficiency",
              "hrv_mean_rmssd",
              "hrv_mean_sdnn",
              "skin_temperature",
              "skin_temperature_delta",
              "respiratory_rate",
              "score",
              "recovery_readiness_score",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id",
              "time_zone"
            ],
            "title": "Sleep"
          }
        },
        "type": "object",
        "required": [
          "sleep"
        ],
        "title": "SleepColumnExpr"
      },
      "SleepScoreValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "const": "sleep_score",
            "title": "Value Macro"
          },
          "version": {
            "type": "string",
            "const": "automatic",
            "title": "Version",
            "default": "automatic"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "SleepScoreValueMacroExpr"
      },
      "SourceColumnExpr": {
        "properties": {
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              }
            ],
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "SourceColumnExpr"
      },
      "StravaScope": {
        "type": "string",
        "enum": [
          "activity:read_all",
          "activity:write",
          "profile:write",
          "profile:read_all"
        ],
        "title": "StravaScope"
      },
      "TeamDataPullPreferencesResponse": {
        "properties": {
          "data_pull_preferences": {
            "items": {
              "$ref": "#/components/schemas/TeamDataPullPreferencesWithLimit"
            },
            "type": "array",
            "title": "Data Pull Preferences"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "data_pull_preferences"
        ],
        "title": "TeamDataPullPreferencesResponse"
      },
      "TeamDataPullPreferencesWithLimit": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "providers": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SingleProviderDataPullPreferencesWithLimit"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/Providers"
            },
            "type": "object",
            "title": "Providers"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "providers"
        ],
        "title": "TeamDataPullPreferencesWithLimit"
      },
      "TeamEHRPipeline": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "type": {
            "type": "string",
            "enum": [
              "native",
              "ehr_linked"
            ],
            "title": "Type"
          },
          "ehr_type": {
            "type": "string",
            "enum": [
              "fhir",
              "hint_health"
            ],
            "title": "Ehr Type"
          },
          "base_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Base Url"
          },
          "authentication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EHRPipelineOAuth2ClientCredentials"
              },
              {
                "$ref": "#/components/schemas/EHRPipelineGoogleIAM"
              },
              {
                "$ref": "#/components/schemas/EHRPipelineAPIKey"
              }
            ],
            "title": "Authentication",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "api_key": "#/components/schemas/EHRPipelineAPIKey",
                "client_credentials": "#/components/schemas/EHRPipelineOAuth2ClientCredentials",
                "google_iam": "#/components/schemas/EHRPipelineGoogleIAM"
              }
            }
          },
          "allowed_mappers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Mappers"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "type",
          "ehr_type",
          "base_url",
          "authentication"
        ],
        "title": "TeamEHRPipeline"
      },
      "TeamEHRPipelineResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TeamEHRPipeline"
            },
            "type": "array",
            "title": "Data"
          },
          "next_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Token"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_token"
        ],
        "title": "TeamEHRPipelineResponse"
      },
      "TeamETLPipelinesResponse": {
        "properties": {
          "pipelines": {
            "items": {
              "$ref": "#/components/schemas/ClientFacingETLPipeline"
            },
            "type": "array",
            "title": "Pipelines"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "pipelines"
        ],
        "title": "TeamETLPipelinesResponse"
      },
      "TeamRoleBinding": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          }
        },
        "type": "object",
        "required": [
          "team_id"
        ],
        "title": "TeamRoleBinding"
      },
      "TeamScopeRequirements": {
        "properties": {
          "user_must_grant": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          },
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "provider": {
            "$ref": "#/components/schemas/OAuthProviders"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant",
          "team_id",
          "provider"
        ],
        "title": "TeamScopeRequirements"
      },
      "TeamScopeRequirementsBase_FitbitScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/FitbitScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/FitbitScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[FitbitScope]"
      },
      "TeamScopeRequirementsBase_GoogleFitScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/GoogleFitScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/GoogleFitScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[GoogleFitScope]"
      },
      "TeamScopeRequirementsBase_GoogleHealthScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/GoogleHealthScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/GoogleHealthScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[GoogleHealthScope]"
      },
      "TeamScopeRequirementsBase_MyFitnessPalScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/MyFitnessPalScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/MyFitnessPalScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[MyFitnessPalScope]"
      },
      "TeamScopeRequirementsBase_OuraScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/OuraScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/OuraScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[OuraScope]"
      },
      "TeamScopeRequirementsBase_StravaScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/StravaScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/StravaScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[StravaScope]"
      },
      "TeamScopeRequirementsBase_WahooScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/WahooScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/WahooScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[WahooScope]"
      },
      "TeamScopeRequirementsBase_WhoopScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/WhoopScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/WhoopScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[WhoopScope]"
      },
      "TeamScopeRequirementsBase_WithingsScope_": {
        "properties": {
          "user_must_grant": {
            "items": {
              "$ref": "#/components/schemas/WithingsScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User Must Grant"
          },
          "user_may_grant": {
            "items": {
              "$ref": "#/components/schemas/WithingsScope"
            },
            "type": "array",
            "uniqueItems": true,
            "title": "User May Grant"
          }
        },
        "type": "object",
        "required": [
          "user_must_grant",
          "user_may_grant"
        ],
        "title": "TeamScopeRequirementsBase[WithingsScope]"
      },
      "TeamScopeRequirementsResponse": {
        "properties": {
          "requirements": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeRequirements"
            },
            "type": "array",
            "title": "Requirements"
          }
        },
        "type": "object",
        "required": [
          "requirements"
        ],
        "title": "TeamScopeRequirementsResponse"
      },
      "TemperatureTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "enum": [
              "body_temperature",
              "body_temperature_delta"
            ],
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "duration",
                  "value"
                ]
              },
              {
                "type": "string",
                "const": "sensor_location"
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "TemperatureTimeseriesExpr"
      },
      "USState": {
        "type": "string",
        "enum": [
          "AL",
          "AK",
          "AZ",
          "AR",
          "CA",
          "CO",
          "CT",
          "DE",
          "FL",
          "GA",
          "HI",
          "ID",
          "IL",
          "IN",
          "IA",
          "KS",
          "KY",
          "LA",
          "ME",
          "MD",
          "MA",
          "MI",
          "MN",
          "MS",
          "MO",
          "MT",
          "NE",
          "NV",
          "NH",
          "NJ",
          "NM",
          "NY",
          "NC",
          "ND",
          "OH",
          "OK",
          "OR",
          "PA",
          "RI",
          "SC",
          "SD",
          "TN",
          "TX",
          "UT",
          "VT",
          "VA",
          "WA",
          "WV",
          "WI",
          "WY"
        ],
        "title": "USState"
      },
      "UnnestExpr": {
        "properties": {
          "unnest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SleepColumnExpr"
              },
              {
                "$ref": "#/components/schemas/DerivedReadinessColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ActivityColumnExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutColumnExpr"
              },
              {
                "$ref": "#/components/schemas/BodyColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MealColumnExpr"
              },
              {
                "$ref": "#/components/schemas/MenstrualCycleColumnExpr"
              },
              {
                "$ref": "#/components/schemas/ProfileColumnExpr"
              },
              {
                "$ref": "#/components/schemas/SleepScoreValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/ChronotypeValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AsleepAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeAtValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/AwakeningsValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/UnrecognizedValueMacroExpr"
              },
              {
                "$ref": "#/components/schemas/DiscreteTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/IntervalTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/InsulinInjectionTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/BloodPressureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/TemperatureTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/WorkoutDurationTimeseriesExpr"
              },
              {
                "$ref": "#/components/schemas/NoteTimeseriesExpr"
              }
            ],
            "title": "Unnest"
          }
        },
        "type": "object",
        "required": [
          "unnest"
        ],
        "title": "UnnestExpr",
        "description": "FROM clause variant: unnest a list column into elements."
      },
      "UnrecognizedValueMacroExpr": {
        "properties": {
          "value_macro": {
            "type": "string",
            "title": "Value Macro"
          }
        },
        "type": "object",
        "required": [
          "value_macro"
        ],
        "title": "UnrecognizedValueMacroExpr"
      },
      "UpdateBrandInformationBody": {
        "properties": {
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Website"
          },
          "support_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Email"
          },
          "support_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Contact"
          },
          "company_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Address"
          },
          "brand_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Color"
          }
        },
        "type": "object",
        "title": "UpdateBrandInformationBody"
      },
      "UpdateContinuousQueryBody": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9()&_\\-.\\s]{0,50}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "scheduling_preferences": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContinuousQuerySchedulingPreferences"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "UpdateContinuousQueryBody",
        "example": {
          "scheduling_preferences": {
            "minimum_gap_duration_second": 3600
          },
          "title": "Updated Weekly Mean Sleep Score"
        }
      },
      "UpdateIntegrationManagedMemberBody": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "title": "UpdateIntegrationManagedMemberBody"
      },
      "UpdateOrgBody": {
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9(),/:'|&_\\- ’]{0,80}$",
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "UpdateOrgBody"
      },
      "UpdateOrgMemberBody": {
        "properties": {
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "org_admin",
                  "team_admin"
                ]
              },
              {
                "type": "string",
                "const": "no_role"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "team_role_bindings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TeamRoleBinding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Role Bindings"
          }
        },
        "type": "object",
        "required": [
          "role",
          "team_role_bindings"
        ],
        "title": "UpdateOrgMemberBody"
      },
      "UpdateOrgTeamBody": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-zÀ-ÖØ-öø-ÿ0-9(),/:'|&_\\- ’]{0,80}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "\nA human readable name of this Team. It is primarily used by Vital Dashboard.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you have set Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n\nSee also: `sandbox.brand_information` and `production.brand_information`.\n"
          },
          "integration_team_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration Team Id"
          },
          "sandbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UpdateOrgTeamEnvironmentBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "production": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UpdateOrgTeamEnvironmentBody"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateOrgTeamBody"
      },
      "UpdateOrgTeamEnvironmentBody": {
        "properties": {
          "lab_tests_patient_sms_communication_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lab Tests Patient Sms Communication Enabled"
          },
          "lab_tests_patient_email_communication_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lab Tests Patient Email Communication Enabled"
          },
          "critical_result_notification_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Critical Result Notification Email"
          },
          "partial_webhooks_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Partial Webhooks Enabled"
          },
          "minor_ordering_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minor Ordering Enabled"
          },
          "reject_duplicate_connection": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reject Duplicate Connection"
          },
          "sdk_per_device_activity_timeseries": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdk Per Device Activity Timeseries"
          },
          "patient_experience": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Patient Experience"
          },
          "brand_information": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UpdateBrandInformationBody"
              },
              {
                "type": "null"
              }
            ],
            "description": "\nInformation of your brand.\n\nIn the Vital Link widget, you are by default represented as the Team name.\nHowever, if you configure Brand Information for the environment, the Company\nName takes precedence.\n\nIn Vital Lab Testing, all communications use only Brand Information. Team\nname is ignored.\n"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url",
            "description": "Required if `brand_information.company_name` is set."
          }
        },
        "type": "object",
        "title": "UpdateOrgTeamEnvironmentBody"
      },
      "UpdateWebhookHeadersBody": {
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers"
          }
        },
        "type": "object",
        "required": [
          "headers"
        ],
        "title": "UpdateWebhookHeadersBody"
      },
      "UpsertEhrIntegrationConfigBody": {
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 3,
            "title": "Slug"
          },
          "modalities": {
            "items": {
              "type": "string",
              "enum": [
                "feature_embed",
                "link_out"
              ]
            },
            "type": "array",
            "title": "Modalities"
          },
          "origin_configs": {
            "items": {
              "$ref": "#/components/schemas/AllowedOriginConfig"
            },
            "type": "array",
            "title": "Origin Configs"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "modalities",
          "origin_configs"
        ],
        "title": "UpsertEhrIntegrationConfigBody"
      },
      "UpsertTeamCustomCredentialsBody": {
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid",
            "title": "Team Id"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Providers"
              },
              {
                "$ref": "#/components/schemas/Labs"
              },
              {
                "$ref": "#/components/schemas/LabsProviders"
              },
              {
                "$ref": "#/components/schemas/AppointmentProvider"
              }
            ],
            "title": "Provider"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FitbitTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GoogleFitTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GoogleHealthTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/BioReferenceProviderDetails"
              },
              {
                "$ref": "#/components/schemas/LabCorpTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/QuestProviderDetails"
              },
              {
                "$ref": "#/components/schemas/PolarTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/GetLabsTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/PhlebFindersTeamProviderDetails"
              },
              {
                "$ref": "#/components/schemas/LabcorpProviderDetails"
              },
              {
                "$ref": "#/components/schemas/MyFitnessPalV2TeamProviderDetails"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "redirect_url_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Url Override"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "provider"
        ],
        "title": "UpsertTeamCustomCredentialsBody"
      },
      "UpsertTeamDataPullPreferencesBody": {
        "properties": {
          "team_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Team Ids"
          },
          "providers": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SingleProviderDataPullPreferences"
            },
            "propertyNames": {
              "enum": [
                "oura",
                "fitbit",
                "garmin",
                "strava",
                "withings",
                "peloton",
                "wahoo",
                "zwift",
                "freestyle_libre",
                "abbott_libreview",
                "eight_sleep",
                "renpho",
                "omron",
                "dexcom_v3",
                "hammerhead",
                "polar",
                "cronometer",
                "kardia",
                "whoop_v2",
                "my_fitness_pal_v2",
                "map_my_fitness",
                "runkeeper",
                "apple_health_kit",
                "google_fit",
                "beurer_api",
                "ultrahuman",
                "google_health"
              ]
            },
            "type": "object",
            "title": "Providers"
          }
        },
        "type": "object",
        "required": [
          "team_ids",
          "providers"
        ],
        "title": "UpsertTeamDataPullPreferencesBody"
      },
      "UpsertTeamEHRPipelinesBody": {
        "properties": {
          "team_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Ids"
          },
          "ehr_type": {
            "type": "string",
            "enum": [
              "fhir",
              "hint_health"
            ],
            "title": "Ehr Type"
          },
          "base_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Base Url"
          },
          "authentication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EHRPipelineOAuth2ClientCredentials"
              },
              {
                "$ref": "#/components/schemas/EHRPipelineGoogleIAM"
              },
              {
                "$ref": "#/components/schemas/EHRPipelineAPIKey"
              }
            ],
            "title": "Authentication",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "api_key": "#/components/schemas/EHRPipelineAPIKey",
                "client_credentials": "#/components/schemas/EHRPipelineOAuth2ClientCredentials",
                "google_iam": "#/components/schemas/EHRPipelineGoogleIAM"
              }
            }
          },
          "allowed_mappers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Mappers"
          }
        },
        "type": "object",
        "required": [
          "ehr_type",
          "base_url",
          "authentication"
        ],
        "title": "UpsertTeamEHRPipelinesBody"
      },
      "UpsertTeamETLPipelinesBody": {
        "properties": {
          "team_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Team Ids"
          },
          "push_historical_data": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Push Historical Data"
          },
          "provider_raw_data": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Raw Data"
          },
          "preferences": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationPreferences"
              },
              {
                "type": "null"
              }
            ]
          },
          "cloud_pubsub": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationCloudPubSubAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "rabbitmq": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationRabbitMQAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "svix": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationSvixAttributes"
              },
              {
                "type": "null"
              }
            ]
          },
          "azure_amqp": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventDestinationAzureAMQPAttributes-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_type_prefixes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Event Type Prefixes"
          }
        },
        "type": "object",
        "title": "UpsertTeamETLPipelinesBody"
      },
      "UpsertTeamScopeRequirementsBody": {
        "properties": {
          "fitbit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_FitbitScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "google_fit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_GoogleFitScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "google_health": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_GoogleHealthScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "oura": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_OuraScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "strava": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_StravaScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "withings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_WithingsScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "wahoo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_WahooScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "whoop_v2": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_WhoopScope_"
              },
              {
                "type": "null"
              }
            ]
          },
          "my_fitness_pal_v2": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamScopeRequirementsBase_MyFitnessPalScope_"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "UpsertTeamScopeRequirementsBody"
      },
      "ValidateContinuousQueryResponse": {
        "properties": {
          "result_table_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Result Table Schema"
          },
          "resource_dependencies": {
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "type": "array",
            "title": "Resource Dependencies"
          },
          "fhir_observation_previews": {
            "anyOf": [
              {
                "additionalProperties": true,
                "propertyNames": {
                  "enum": [
                    "vital-signs#29463-7#junction-body-weight-1",
                    "vital-signs#8867-4#junction-heart-rate-1",
                    "vital-signs#9279-1#junction-respiration-rate-1"
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fhir Observation Previews"
          }
        },
        "type": "object",
        "required": [
          "result_table_schema",
          "resource_dependencies"
        ],
        "title": "ValidateContinuousQueryResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerifyOrgDomainResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "verified",
              "pending"
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "VerifyOrgDomainResponse"
      },
      "WahooScope": {
        "type": "string",
        "enum": [
          "email",
          "user_read",
          "workouts_read",
          "offline_data"
        ],
        "title": "WahooScope"
      },
      "Webhook": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "disabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled",
            "default": false
          },
          "filter_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Types",
            "description": "For the complete list of events, check out the [Event Catalog](https://docs.junction.com/event-catalog).",
            "examples": [
              "daily.data.activity.created"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "created_at",
          "updated_at"
        ],
        "title": "Webhook"
      },
      "WebhookHeadersResponse": {
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers"
          },
          "sensitive": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sensitive"
          }
        },
        "type": "object",
        "required": [
          "headers",
          "sensitive"
        ],
        "title": "WebhookHeadersResponse"
      },
      "WebhookListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Webhook"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "WebhookListResponse"
      },
      "WebhookSecretResponse": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          }
        },
        "type": "object",
        "required": [
          "key"
        ],
        "title": "WebhookSecretResponse"
      },
      "WhoopScope": {
        "type": "string",
        "enum": [
          "read:recovery",
          "read:cycles",
          "read:workout",
          "read:sleep",
          "read:profile",
          "read:body_measurement",
          "offline"
        ],
        "title": "WhoopScope"
      },
      "WithingsScope": {
        "type": "string",
        "enum": [
          "user.activity",
          "user.metrics",
          "user.sleepevents"
        ],
        "title": "WithingsScope"
      },
      "WorkoutColumnExpr": {
        "properties": {
          "workout": {
            "type": "string",
            "enum": [
              "session_start",
              "session_end",
              "title",
              "sport_name",
              "sport_slug",
              "duration_active_second",
              "heart_rate_mean",
              "heart_rate_minimum",
              "heart_rate_maximum",
              "heart_rate_zone_1",
              "heart_rate_zone_2",
              "heart_rate_zone_3",
              "heart_rate_zone_4",
              "heart_rate_zone_5",
              "heart_rate_zone_6",
              "distance_meter",
              "calories",
              "elevation_gain_meter",
              "elevation_maximum_meter",
              "elevation_minimum_meter",
              "speed_mean",
              "speed_maximum",
              "power_source",
              "power_mean",
              "power_maximum",
              "power_weighted_mean",
              "steps",
              "map_polyline",
              "map_summary_polyline",
              "source_type",
              "source_provider",
              "source_app_id",
              "source_device_id",
              "external_id",
              "time_zone"
            ],
            "title": "Workout"
          }
        },
        "type": "object",
        "required": [
          "workout"
        ],
        "title": "WorkoutColumnExpr"
      },
      "WorkoutDurationTimeseriesExpr": {
        "properties": {
          "timeseries": {
            "type": "string",
            "const": "workout_duration",
            "title": "Timeseries"
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "source_provider",
                  "source_type"
                ]
              },
              {
                "type": "string",
                "const": "source_app_id"
              },
              {
                "type": "string",
                "enum": [
                  "source_workout_id",
                  "source_sport"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "timezone_offset",
                  "type"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "duration",
                  "value"
                ]
              },
              {
                "type": "string",
                "const": "intensity"
              }
            ],
            "title": "Field"
          }
        },
        "type": "object",
        "required": [
          "timeseries",
          "field"
        ],
        "title": "WorkoutDurationTimeseriesExpr"
      }
    },
    "securitySchemes": {
      "ManagementKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Management-Key"
      }
    }
  },
  "security": [
    {
      "ManagementKey": []
    }
  ],
  "servers": [
    {
      "url": "https://api.management.junction.com",
      "description": "Production Management API server"
    }
  ]
}