openapi: 3.1.0
info:
  title: Grid Squid
  version: 1.0.0
tags:
  - name: Companies
    description: group of users pointing to a specific CRM instance
  - name: Users
    description: >-
      individual associated with a company in Grid Squid. Each user must
      authenticate with their individual CRM credentials (e.g., username and
      password or access tokens) to access CRM data, objects, and activities.
      Users share access to mappings and bulk imports created within their
      company.
  - name: Mappings
    description: >-
      customizable workflow designed to extract, transform, and prepare CRM data
      for integration with other applications. Users can specify the CRM object
      (e.g., leads, opportunities) and define the fields required by the target
      system. Advanced transformations, such as validations, filtering and data
      quality checks, can be implemented using custom JavaScript. Mappings are
      created within a company and shared among all its users. The data
      retrieved through a mapping respects the access level and permissions of
      the individual user in the CRM.
  - name: Events
    description: Notifications of changes occurring on the CRM side.
  - name: Records - Transformed
    description: Manage CRM records applying your own mappings
  - name: Records - Raw
    description: Manage CRM records without applying your own mappings
  - name: Bulks
    description: retrieval of large volumes of data from a CRM for a specific object.
  - name: Authentication
    description: Connect your users to access the CRM on their behalf.
  - name: Mass Update
    description: Update several records with just one API call using your mappings.
  - name: Metadata
    description: Retrieve CRM metadata such as Objects, fields and users.
  - name: Netsuite Integration Credentials
    description: Authenticate your Netsuite users.
  - name: Insightly Integration Credentials
    description: Authenticate your Insightly users.
  - name: Netsuite Saved Search
    description: Set up your Netsuite saved searches so you can retrieve records.
  - name: Netsuite Script Deployment
    description: Set up your Netsuite Scripts to be run on mappings.
servers:
  - url: https://{yourDomain}.gridsquid.io
    variables:
      yourDomain:
        default: demo
        description: Domain ID assigned by the service provider
paths:
  /companies/{company_id}:
    get:
      tags:
        - Companies
      summary: Get company
      operationId: get_company_companies__company_id__get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Companies
      summary: Delete company
      operationId: delete_company_companies__company_id__delete
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Companies
      summary: Update company
      operationId: update_company_companies__company_id__patch
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewCompany'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies:
    get:
      tags:
        - Companies
      summary: Get all companies
      operationId: get_all_companies_companies_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_Company_'
    post:
      tags:
        - Companies
      summary: Create new company
      operationId: create_new_company_companies_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewCompany'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/users:
    get:
      tags:
        - Users
      summary: Get all users
      operationId: get_all_users_companies__company_id__users_get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_User_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Users
      summary: Create new user
      operationId: create_new_user_companies__company_id__users_post
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewUser'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/users/{user_id}:
    get:
      tags:
        - Users
      summary: Get user
      operationId: get_user_companies__company_id__users__user_id__get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Users
      summary: Delete user
      operationId: delete_user_companies__company_id__users__user_id__delete
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/users/batch:
    post:
      tags:
        - Users
      summary: Create batch users
      operationId: create_batch_users_companies__company_id__users_batch_post
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewUsersPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCreateUsersResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/mappings:
    get:
      tags:
        - Mappings
      summary: Get all mappings
      operationId: get_all_mappings_companies__company_id__mappings_get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_Mapping_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Mappings
      summary: Create mapping
      operationId: create_mapping_companies__company_id__mappings_post
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMappingAPI'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mapping'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/mappings/{mapping_id}:
    patch:
      tags:
        - Mappings
      summary: Update mapping
      operationId: update_mapping_companies__company_id__mappings__mapping_id__patch
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
        - name: mapping_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Mapping Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMappingAPI'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mapping'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/mappings/{badger_object_name}:
    delete:
      tags:
        - Mappings
      summary: Delete mapping
      operationId: >-
        delete_mapping_companies__company_id__mappings__badger_object_name__delete
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /event-configurations:
    post:
      tags:
        - Events
      summary: Create event configuration
      operationId: create_event_configuration_event_configurations__post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewEventConfiguration'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventConfiguration'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Events
      summary: Get all
      operationId: get_all_event_configurations__get
      parameters:
        - name: user_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_EventConfiguration_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /event-configurations/{event_configuration_id}:
    patch:
      tags:
        - Events
      summary: Update
      operationId: update_event_configurations__event_configuration_id__patch
      parameters:
        - name: event_configuration_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Configuration Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewEventConfiguration'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventConfiguration'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Events
      summary: Delete
      operationId: delete_event_configurations__event_configuration_id__delete
      parameters:
        - name: event_configuration_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Configuration Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/records/unified/{badger_object_name}:
    post:
      tags:
        - Records - Transformed
      summary: Create record
      operationId: create_record_users__user_id__records_unified__badger_object_name__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Create Record Users  User Id  Records Unified  Badger
                  Object Name  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Records - Transformed
      summary: Get records
      operationId: get_records_users__user_id__records_unified__badger_object_name__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_dict_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/records/unified/{badger_object_name}/{record_id}:
    get:
      tags:
        - Records - Transformed
      summary: Get record
      operationId: >-
        get_record_users__user_id__records_unified__badger_object_name___record_id__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Get Record Users  User Id  Records Unified  Badger
                  Object Name   Record Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Records - Transformed
      summary: Update record
      operationId: >-
        update_record_users__user_id__records_unified__badger_object_name___record_id__patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Update Record Users  User Id  Records Unified  Badger
                  Object Name   Record Id  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Records - Transformed
      summary: Delete record
      operationId: >-
        delete_record_users__user_id__records_unified__badger_object_name___record_id__delete
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/records/raw/{crm_object_name}:
    post:
      tags:
        - Records - Raw
      summary: Create raw record
      operationId: create_raw_record_users__user_id__records_raw__crm_object_name__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Create Raw Record Users  User Id  Records Raw  Crm
                  Object Name  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Records - Raw
      summary: Get raw records
      operationId: get_raw_records_users__user_id__records_raw__crm_object_name__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                title: >-
                  Response Get Raw Records Users  User Id  Records Raw  Crm
                  Object Name  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/records/raw/{crm_object_name}/{record_id}:
    get:
      tags:
        - Records - Raw
      summary: Get raw record
      operationId: >-
        get_raw_record_users__user_id__records_raw__crm_object_name___record_id__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Get Raw Record Users  User Id  Records Raw  Crm
                  Object Name   Record Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Records - Raw
      summary: Update raw record
      operationId: >-
        update_raw_record_users__user_id__records_raw__crm_object_name___record_id__patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: >-
                  Response Update Raw Record Users  User Id  Records Raw  Crm
                  Object Name   Record Id  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Records - Raw
      summary: Delete raw record
      operationId: >-
        delete_raw_record_users__user_id__records_raw__crm_object_name___record_id__delete
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
        - name: record_id
          in: path
          required: true
          schema:
            type: string
            title: Record Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/bulks:
    post:
      tags:
        - Bulks
      summary: Create bulk job
      operationId: create_bulk_job_users__user_id__bulks_post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RawBulkJobRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkJob'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/bulks/{bulk_job_id}/status:
    get:
      tags:
        - Bulks
      summary: Get job status
      operationId: get_job_status_users__user_id__bulks__bulk_job_id__status_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: bulk_job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Bulk Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkJobStatus'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/bulks/{bulk_job_id}/result:
    get:
      tags:
        - Bulks
      summary: Get job result
      operationId: get_job_result_users__user_id__bulks__bulk_job_id__result_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: bulk_job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Bulk Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkJob'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/bulks:
    get:
      tags:
        - Bulks
      summary: Get bulk jobs
      operationId: get_bulk_jobs_companies__company_id__bulks_get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_BulkJob_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/status:
    get:
      tags:
        - Bulks
      summary: Get bulk status jobs
      operationId: get_bulk_status_jobs_companies__company_id__status_get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_BulkJobStatus_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/login:
    get:
      tags:
        - Authentication
      summary: Login
      operationId: login_users__user_id__login__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/auth-credentials:
    post:
      tags:
        - Authentication
      summary: Create new auth credentials
      operationId: create_new_auth_credentials_users__user_id__auth_credentials__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewAuthInformationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthInformation'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Authentication
      summary: Delete auth credentials
      operationId: delete_auth_credentials_users__user_id__auth_credentials__delete
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /crm/callback/oauth:
    get:
      tags:
        - Authentication
      summary: Login redirect
      operationId: login_redirect_crm_callback_oauth__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /users/{user_id}/connection-health:
    get:
      tags:
        - Authentication
      summary: Check connection health
      operationId: check_connection_health_users__user_id__connection_health__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionHealth'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /companies/{company_id}/connection-health:
    get:
      tags:
        - Authentication
      summary: Get company connection health
      operationId: >-
        get_company_connection_health_companies__company_id__connection_health__get
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnList_UserConnectionStatus_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/mass-update/{badger_object_name}:
    patch:
      tags:
        - Mass Update
      summary: Mass update records
      operationId: >-
        mass_update_records_users__user_id__mass_update__badger_object_name__patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: badger_object_name
          in: path
          required: true
          schema:
            type: string
            title: Badger Object Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BadgerMassUpdateRequestData'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassUpdateCreationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/mass-update/jobs/{mass_update_job_id}/status:
    get:
      tags:
        - Mass Update
      summary: Get mass update status
      operationId: >-
        get_mass_update_status_users__user_id__mass_update_jobs__mass_update_job_id__status_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: mass_update_job_id
          in: path
          required: true
          schema:
            type: string
            title: Mass Update Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MassUpdateStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/metadata/objects:
    get:
      tags:
        - Metadata
      summary: Get objects
      operationId: get_objects_users__user_id__metadata_objects_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CRMAPIObject'
                title: Response Get Objects Users  User Id  Metadata Objects Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/metadata/objects/{crm_object_name}/fields:
    get:
      tags:
        - Metadata
      summary: Get object fields
      operationId: >-
        get_object_fields_users__user_id__metadata_objects__crm_object_name__fields_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: crm_object_name
          in: path
          required: true
          schema:
            type: string
            title: Crm Object Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldMetadata'
                title: >-
                  Response Get Object Fields Users  User Id  Metadata Objects 
                  Crm Object Name  Fields Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /users/{user_id}/metadata/crm-users:
    get:
      tags:
        - Metadata
      summary: Get crm users
      operationId: get_crm_users_users__user_id__metadata_crm_users_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CRMUserMetadata'
                title: Response Get Crm Users Users  User Id  Metadata Crm Users Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /netsuite/{company_id}/integration-credentials:
    post:
      tags:
        - Netsuite Integration Credentials
      summary: Create netsuite integration credentials
      operationId: >-
        create_netsuite_integration_credentials_netsuite__company_id__integration_credentials__post
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewNetsuiteIntegrationCredentials'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetsuiteIntegrationCredentials'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /insightly/login:
    get:
      tags:
        - Insightly Integration Credentials
      summary: Insightly login page
      operationId: insightly_login_page_insightly_login_get
      parameters:
        - name: user_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /insightly/integration-credentials:
    post:
      tags:
        - Insightly Integration Credentials
      summary: Create integration credentials
      operationId: create_integration_credentials_insightly_integration_credentials__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewInsightlyIntegrationCredentials'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightlyIntegrationCredentials'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /netsuite/mappings/{mapping_id}/saved-search:
    post:
      tags:
        - Netsuite Saved Search
      summary: Create netsuite saved search
      operationId: >-
        create_netsuite_saved_search_netsuite_mappings__mapping_id__saved_search__post
      parameters:
        - name: mapping_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Mapping Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewSearch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearch'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /netsuite/{company_id}/script-deployment:
    post:
      tags:
        - Netsuite Script Deployment
      summary: Create netsuite script deployment
      operationId: >-
        create_netsuite_script_deployment_netsuite__company_id__script_deployment__post
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Company Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewScriptDeployment'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScriptDeployment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AuthInformation:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        auth_type:
          $ref: '#/components/schemas/AuthTypes'
        token_information:
          anyOf:
            - $ref: '#/components/schemas/TokenInformation'
            - type: 'null'
      type: object
      required:
        - user_id
        - auth_type
        - token_information
      title: AuthInformation
    AuthTypes:
      type: string
      const: OAUTH_2
      title: AuthTypes
      example: OAUTH_2
    BadgerFieldToMassUpdate:
      properties:
        badger_field_name:
          example: first_name
          type: string
          title: Badger Field Name
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: 'null'
          title: Value
      type: object
      required:
        - badger_field_name
        - value
      title: BadgerFieldToMassUpdate
    BadgerMassUpdateRequestData:
      properties:
        identifier_field_name:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Identifier Field Name
        records_to_update:
          items:
            type: string
          type: array
          title: Records To Update
        fields_to_update:
          items:
            $ref: '#/components/schemas/BadgerFieldToMassUpdate'
          type: array
          title: Fields To Update
      type: object
      required:
        - identifier_field_name
        - records_to_update
        - fields_to_update
      title: BadgerMassUpdateRequestData
    BatchCreateUsersResult:
      properties:
        has_errors:
          example: false
          type: boolean
          title: Has Errors
        results:
          items:
            $ref: '#/components/schemas/User'
          type: array
          title: Results
      type: object
      required:
        - has_errors
        - results
      title: BatchCreateUsersResult
    BulkJob:
      properties:
        company_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Company Id
        mapping_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Mapping Id
        requester_user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Requester User Id
        provider_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Provider Id
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Id
        file_path:
          example: https://hosting.com/file.json
          type: string
          title: File Path
        raw_file_path:
          example: https://hosting.com/file.json
          type: string
          title: Raw File Path
        created_at:
          example: '2025-01-14T14:15:22Z'
          type: string
          format: date-time
          title: Created At
        updated_at:
          example: '2025-01-14T14:15:22Z'
          type: string
          format: date-time
          title: Updated At
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        raw_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Raw Url
      type: object
      required:
        - company_id
        - mapping_id
        - requester_user_id
        - provider_id
        - webhook_url
        - id
        - file_path
        - raw_file_path
        - created_at
        - updated_at
      title: BulkJob
    BulkJobStatus:
      type: object
      title: BulkJobStatus
      properties:
        bulk_job_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Bulk Job Id
        state:
          example: PENDING
          $ref: '#/components/schemas/BulkState'
        number_records_processed:
          example: 67523675
          type: integer
          title: Number Records Processed
        error_message:
          example: Failed
          type: string
          title: Error Message
          default: ''
      required:
        - bulk_job_id
        - state
        - number_records_processed
    BulkState:
      example: PENDING
      type: string
      title: BulkState
      description: Represents the various states of a bulk operation
      default: PENDING
      enum:
        - PENDING
        - PROVIDER_IN_PROGRESS
        - PROVIDER_FINISHED
        - MAPPING
        - ABORTED
        - COMPLETED
        - FAILED
    CRMAPIObject:
      properties:
        name:
          example: Full Name
          type: string
          title: Name
        api_name:
          example: Full_Name__c
          type: string
          title: Api Name
      type: object
      required:
        - name
        - api_name
      title: CRMAPIObject
    CRMUserMetadata:
      properties:
        id:
          example: 009676723FFA
          type: string
          title: Id
        name:
          example: John Smith
          type: string
          title: Name
        username:
          example: john_smith
          type: string
          title: Username
        email:
          example: john_smith@acme.com
          type: string
          title: Email
      type: object
      required:
        - id
        - name
        - username
        - email
      title: CRMUserMetadata
    CRMs:
      example: SALESFORCE
      type: string
      enum:
        - SALESFORCE
        - HUBSPOT
        - DYNAMICS
        - ZOHO
        - INSIGHTLY
        - NETSUITE
      title: CRMs
    Company:
      properties:
        crm:
          example: SALESFORCE
          $ref: '#/components/schemas/CRMs'
        login_url:
          example: https://domain.my.salesforce.com
          type: string
          title: Login Url
        api_url:
          example: https://domain.my.salesforce.com
          type: string
          title: Api Url
        login_redirect_url:
          example: https://my-app.com
          type: string
          title: Login Redirect Url
        name:
          example: Acme INC.
          type: string
          title: Name
        environment:
          example: PRODUCTION
          $ref: '#/components/schemas/Environment'
        id:
          example: https://domain.my.salesforce.com
          type: string
          format: uuid
          title: Id
        created_at:
          example: '2024-10-17T10:40:37.928681'
          type: string
          format: date-time
          title: Created At
          default: '2024-10-17T10:40:37.928681'
      type: object
      required:
        - crm
        - login_url
        - api_url
        - login_redirect_url
        - name
        - environment
        - id
      title: Company
    ConnectionHealth:
      properties:
        connection_health:
          example: true
          type: boolean
          title: Connection Health
      type: object
      required:
        - connection_health
      title: ConnectionHealth
    Environment:
      example: PRODUCTION
      type: string
      enum:
        - PRODUCTION
        - SANDBOX
      title: Environment
    EventConfiguration:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        mapping_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Mapping Id
        polling_time_minutes:
          example: 5
          type: integer
          title: Polling Time Minutes
        notification_webhook_url:
          example: https://mydomain.com/my-webhook
          type: string
          title: Notification Webhook Url
        enabled:
          example: true
          type: boolean
          title: Enabled
          default: true
        id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - user_id
        - mapping_id
        - polling_time_minutes
        - notification_webhook_url
        - id
      title: EventConfiguration
    Field:
      properties:
        key:
          example: field
          type: string
          title: Key
      type: object
      required:
        - key
      title: Field
    FieldMetadata:
      properties:
        name:
          example: Full Name
          type: string
          title: Name
        api_name:
          example: Full_Name__c
          type: string
          title: Api Name
        type:
          example: string
          type: string
          title: Type
        is_required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Required
        is_read_only:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Read Only
        options:
          anyOf:
            - items:
                $ref: '#/components/schemas/FieldOption'
              type: array
            - type: 'null'
          title: Options
          default: []
      type: object
      required:
        - name
        - api_name
        - type
        - is_required
        - is_read_only
      title: FieldMetadata
    FieldOption:
      properties:
        label:
          example: Full Name
          type: string
          title: Label
        value:
          example: full_name
          type: string
          title: Value
      type: object
      required:
        - label
        - value
      title: FieldOption
    FieldType:
      example: string
      type: string
      enum:
        - string
        - number
        - boolean
      title: FieldType
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InsightlyIntegrationCredentials:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        api_key:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Api Key
      type: object
      required:
        - user_id
        - api_key
      title: InsightlyIntegrationCredentials
    Mapping:
      properties:
        company_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Company Id
        crm_object_name:
          example: customers
          type: string
          title: Crm Object Name
        badger_object_name:
          example: Account
          type: string
          title: Badger Object Name
        fields:
          items:
            $ref: '#/components/schemas/MappingField'
          type: array
          title: Fields
        custom_js:
          example: ''
          type: string
          title: Custom Js
          default: done(transformedObject)
        id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - company_id
        - crm_object_name
        - badger_object_name
        - fields
        - id
      title: Mapping
    MappingField:
      properties:
        crm_field:
          $ref: '#/components/schemas/Field'
        badger_field:
          $ref: '#/components/schemas/Field'
        type:
          $ref: '#/components/schemas/FieldType'
      type: object
      required:
        - crm_field
        - badger_field
        - type
      title: MappingField
      description: >-
        MappingField is a pair of Fields that represent a mapping between a
        field of

        two objects (the transformed object and the crm object).
    MassUpdateCreationResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid
          title: Id
        status:
          example: PENDING
          $ref: '#/components/schemas/MassUpdateStatus'
      type: object
      required:
        - id
        - status
      title: MassUpdateCreationResponse
    MassUpdateRecordError:
      properties:
        record_id:
          example: 0010000083821D
          type: string
          title: Record Id
        error_message:
          example: Error
          type: string
          title: Error Message
      type: object
      required:
        - record_id
        - error_message
      title: MassUpdateRecordError
    MassUpdateStatus:
      example: IN_PROGRESS
      type: string
      enum:
        - CREATED
        - FAILED
        - COMPLETED
        - IN_PROGRESS
      title: MassUpdateStatus
    MassUpdateStatusResponse:
      properties:
        id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Id
        status:
          example: PENDING
          type: string
          title: Status
        errors:
          items:
            $ref: '#/components/schemas/MassUpdateRecordError'
          type: array
          title: Errors
      type: object
      required:
        - id
        - status
        - errors
      title: MassUpdateStatusResponse
    NetsuiteIntegrationCredentials:
      properties:
        client_credentials_id:
          example: '87654321'
          type: string
          title: Client Credentials Id
        client_credentials_secret:
          example: '12345678'
          type: string
          title: Client Credentials Secret
        company_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Company Id
      type: object
      required:
        - client_credentials_id
        - client_credentials_secret
        - company_id
      title: NetsuiteIntegrationCredentials
    NewAuthInformationRequest:
      properties:
        auth_type:
          example: OAUTH_2
          $ref: '#/components/schemas/AuthTypes'
        token_information:
          $ref: '#/components/schemas/TokenInformation'
      type: object
      required:
        - auth_type
        - token_information
      title: NewAuthInformationRequest
    NewCompany:
      properties:
        crm:
          example: SALESFORCE
          $ref: '#/components/schemas/CRMs'
        login_url:
          example: https://domain.my.salesforce.com
          type: string
          title: Login Url
        api_url:
          example: https://domain.my.salesforce.com
          type: string
          title: Api Url
        login_redirect_url:
          example: https://mydomain.com
          type: string
          title: Login Redirect Url
        name:
          example: My Company
          type: string
          title: Name
        environment:
          example: PRODUCTION
          $ref: '#/components/schemas/Environment'
      type: object
      required:
        - crm
        - login_url
        - api_url
        - login_redirect_url
        - name
        - environment
      title: NewCompany
    NewEventConfiguration:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        mapping_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Mapping Id
        polling_time_minutes:
          example: 5
          type: integer
          title: Polling Time Minutes
        notification_webhook_url:
          example: https://mydomain.com/my-webhook
          type: string
          title: Notification Webhook Url
        enabled:
          example: true
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
        - user_id
        - mapping_id
        - polling_time_minutes
        - notification_webhook_url
      title: NewEventConfiguration
    NewInsightlyIntegrationCredentials:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        api_key:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Api Key
      type: object
      required:
        - user_id
        - api_key
      title: NewInsightlyIntegrationCredentials
    NewMappingAPI:
      properties:
        badger_object_name:
          example: customer
          type: string
          title: Badger Object Name
        crm_object_name:
          example: Account
          type: string
          title: Crm Object Name
        fields:
          items:
            $ref: '#/components/schemas/MappingField'
          type: array
          title: Fields
        custom_js:
          example: ''
          type: string
          title: Custom Js
          default: done(transformedObject)
      type: object
      required:
        - badger_object_name
        - crm_object_name
        - fields
      title: NewMappingAPI
    NewNetsuiteIntegrationCredentials:
      properties:
        client_credentials_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Client Credentials Id
        client_credentials_secret:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          title: Client Credentials Secret
      type: object
      required:
        - client_credentials_id
        - client_credentials_secret
      title: NewNetsuiteIntegrationCredentials
    NewScriptDeployment:
      properties:
        script_deployment_url:
          example: https://url.com
          type: string
          title: Script Deployment Url
      type: object
      required:
        - script_deployment_url
      title: NewScriptDeployment
    NewSearch:
      properties:
        saved_search_id:
          example: '46327'
          type: string
          title: Saved Search Id
      type: object
      required:
        - saved_search_id
      title: NewSearch
    NewUser:
      properties:
        username:
          example: john_smith
          type: string
          title: Username
      type: object
      required:
        - username
      title: NewUser
    NewUsersPayload:
      properties:
        users:
          items:
            $ref: '#/components/schemas/NewUser'
          type: array
          title: Users
      type: object
      required:
        - users
      title: NewUsersPayload
    RawBulkJobRequest:
      properties:
        badger_object_name:
          example: customers
          type: string
          title: Badger Object Name
        where:
          anyOf:
            - type: string
            - type: 'null'
          title: Where
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
      type: object
      required:
        - badger_object_name
      title: RawBulkJobRequest
    ReturnList_BulkJobStatus_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BulkJobStatus'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[BulkJobStatus]
    ReturnList_BulkJob_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BulkJob'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[BulkJob]
    ReturnList_Company_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Company'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[Company]
    ReturnList_EventConfiguration_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/EventConfiguration'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[EventConfiguration]
    ReturnList_Mapping_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Mapping'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[Mapping]
    ReturnList_UserConnectionStatus_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/UserConnectionStatus'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[UserConnectionStatus]
    ReturnList_User_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/User'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[User]
    ReturnList_dict_:
      properties:
        items:
          items:
            type: object
          type: array
          title: Items
      type: object
      required:
        - items
      title: ReturnList[dict]
    SavedSearch:
      properties:
        mapping_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Mapping Id
        saved_search_id:
          example: '323423'
          type: string
          title: Saved Search Id
      type: object
      required:
        - mapping_id
        - saved_search_id
      title: SavedSearch
    ScriptDeployment:
      properties:
        company_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Company Id
        script_deployment_url:
          example: https://deploymenturl.com
          type: string
          title: Script Deployment Url
      type: object
      required:
        - company_id
        - script_deployment_url
      title: ScriptDeployment
    TokenInformation:
      properties:
        access_token:
          example: SOMETOKEN
          type: string
          title: Access Token
        refresh_token:
          example: SOMETOKEN
          type: string
          title: Refresh Token
      type: object
      required:
        - access_token
        - refresh_token
      title: TokenInformation
    User:
      properties:
        id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Id
        company_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: Company Id
        username:
          example: john_smith
          type: string
          title: Username
      type: object
      required:
        - id
        - company_id
        - username
      title: User
    UserConnectionStatus:
      properties:
        user_id:
          example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
          type: string
          format: uuid
          title: User Id
        connection_health:
          example: true
          type: boolean
          title: Connection Health
      type: object
      required:
        - user_id
        - connection_health
      title: UserConnectionStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          example: Something went wrong
          type: string
          title: Message
        type:
          example: Client Error
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    JWTtoken:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - JWTtoken: []
