components:
  responses: {}
  schemas:
    CfsExclusion:
      description: Response schema for creating a CFS exclusion
      example:
        createdAt: '2023-01-01T12:00:00Z'
        createdByOrg:
          id: 473bd688-ad6b-42dc-bbe8-8342537483cc
          name: IdPair, Inc.
        endDate: '2023-12-31'
        id: e0df5fa5-72b9-4061-b1fd-b0bc82209a41
        player:
          hashes:
            - createdAt: '2024-01-01T10:00:00Z'
              hash1: hash_value_1
              hash2: hash_value_2
              hash3: hash_value_3
        reference: REF123
        startDate: '2023-01-01'
      properties:
        createdAt:
          description: Timestamp of when the exclusion was created
          format: date-time
          type: string
        createdByOrg:
          properties:
            id:
              description: ID
              type: string
            name:
              description: Name
              type: string
          type: object
        endDate:
          description: End date for the exclusion
          type: string
        id:
          description: Unique identifier for the CFS exclusion
          type: string
        player:
          description: Player
          properties:
            hashes:
              description: Collection of hashes
              items:
                properties:
                  createdAt:
                    description: Timestamp of when the hash was created
                    format: date-time
                    type: string
                  hash1:
                    description: Player Hash 1
                    type: string
                  hash2:
                    description: Player Hash 2
                    type: string
                  hash3:
                    description: Player Hash 3
                    type: string
                required:
                  - hash1
                  - hash2
                  - hash3
                type: object
              type: array
          type: object
        reference:
          description: Internal reference for the exclusion
          type: string
        startDate:
          description: Start date for the exclusion
          type: string
      required:
        - id
        - startDate
        - player
        - createdByOrg
        - createdAt
      title: CfsExclusion
      type: object
    CfsExclusionCreateInput:
      description: CFS Exclusion Create
      example:
        endDate: '2025-12-31'
        player:
          hashes:
            - createdAt: '2024-01-01T10:00:00Z'
              hash1: hash_value_1
              hash2: hash_value_2
              hash3: hash_value_3
        reference: EXC-0001
        startDate: '2025-01-01'
      properties:
        endDate:
          description: End date for the exclusion
          type: string
        player:
          description: Player
          properties:
            hashes:
              description: Collection of hashes
              items:
                properties:
                  createdAt:
                    description: Timestamp of when the hash was created
                    format: date-time
                    type: string
                  hash1:
                    description: Player Hash 1
                    type: string
                  hash2:
                    description: Player Hash 2
                    type: string
                  hash3:
                    description: Player Hash 3
                    type: string
                required:
                  - hash1
                  - hash2
                  - hash3
                type: object
              type: array
          type: object
        reference:
          description: External reference for the exclusion
          type: string
        startDate:
          description: Start date for the exclusion
          type: string
      required:
        - startDate
        - player
      title: CfsExclusionCreateInput
      type: object
    CfsExclusionPage:
      description: 'CFS Exclusions: List all CFS exclusions'
      example:
        entries:
          - createdAt: '2023-01-01T12:00:00Z'
            createdByOrg:
              id: 473bd688-ad6b-42dc-bbe8-8342537483cc
              name: IdPair, Inc.
            endDate: '2023-12-31'
            id: 44cd42ee-1982-423a-9b76-e629f952df88
            player:
              hashes:
                - createdAt: '2024-01-01T10:00:00Z'
                  hash1: hash_value_1
                  hash2: hash_value_2
                  hash3: hash_value_3
            startDate: '2023-01-01'
        meta:
          after: eyJpZCI6MjAsImdyb3VwX2lkIjoxMCwicmVhc29uIjoiUG9saWN5IFZpb2xhdGlvbiJ9
          before: null
          limit: 25
          totalCount: 1
      properties:
        data:
          description: Collection of exclusions
          items:
            $ref: '#/components/schemas/CfsExclusion'
          type: array
        meta:
          $ref: '#/components/schemas/PaginationMetadata'
      required:
        - id
      title: CfsExclusionPage
      type: object
    CfsInquiry:
      description: >-
        Response schema for inquiring whether a player has an active exclusion
        or not
      example:
        exclusionStatus: NO_EXCLUSION_ACTIVE
        exclusions: []
        id: e0df5fa5-72b9-4061-b1fd-b0bc82209a41
      properties:
        exclusionStatus:
          description: Status indicating whether an exclusion is active or not
          enum:
            - NO_EXCLUSION_ACTIVE
            - EXCLUSION_ACTIVE
          type: string
        exclusions:
          description: Collection of exclusions
          items:
            $ref: '#/components/schemas/CfsExclusion'
          type: array
        id:
          description: Unique identifier for the CFS inquiry
          type: string
      required:
        - id
        - exclusionStatus
        - exclusions
      title: CfsInquiry
      type: object
    CfsInquiryCreateInput:
      description: CFS Inquiry Create
      example:
        player:
          hashes:
            - hash1: 97f1b7e9-58c5-4239-9436-760b8a2845de
              hash2: 3308fde1-e712-4bad-8fa5-1a9ef0cdd0e9
              hash3: 9587671e-3a6e-439c-bf13-faa9ca148059
      properties:
        player:
          properties:
            hashes:
              description: Collection of hashes
              items:
                properties:
                  hash1:
                    description: Player Hash 1
                    type: string
                  hash2:
                    description: Player Hash 2
                    type: string
                  hash3:
                    description: Player Hash 3
                    type: string
                required:
                  - hash1
                  - hash2
                  - hash3
                type: object
              type: array
          required:
            - hashes
          type: object
      required:
        - player
      title: CfsInquiryCreateInput
      type: object
    PaginationMetadata:
      properties:
        after:
          description: Cursor pointing to the next page
          type: string
        before:
          description: Cursor pointing to the previous page
          type: string
        limit:
          description: Number of items per page
          type: integer
        totalCount:
          description: Total number of items
          type: integer
      required:
        - total_pages
        - total_items
        - current_page
        - page_size
      type: object
  securitySchemes:
    authorization:
      scheme: bearer
      type: http
info:
  contact:
    email: hello@nvsep.org
    name: NVSEP
    url: https://nvsep.org
  termsOfService: https://www.nvsep.org/terms
  title: NVSEP
  version: '1.0'
openapi: 3.0.0
paths:
  /api/cfs/v1/exclusions:
    get:
      callbacks: {}
      operationId: cfs_exclusions.list
      parameters:
        - description: ''
          in: query
          name: pagination
          required: false
          schema:
            properties:
              after:
                description: Cursor pointing to the next page
                type: string
              before:
                description: Cursor pointing to the previous page
                type: string
              limit:
                description: Number of items per page
                type: integer
              totalCount:
                description: Total number of items
                type: integer
            required:
              - total_pages
              - total_items
              - current_page
              - page_size
            type: object
        - description: ''
          in: query
          name: filter
          required: false
          schema:
            properties:
              hideOwn:
                description: Filter to hide exclusions submitted by my org
                type: boolean
              sinceId:
                description: Filter to exclusions more recent than the given ID
                type: string
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CfsExclusionPage'
          description: Group response
      summary: List exclusions
      tags:
        - CFS Exclusions
    post:
      callbacks: {}
      operationId: cfs_exclusions.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CfsExclusionCreateInput'
        description: CfsExclusionCreateInput
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CfsExclusion'
          description: CfsExclusion
      summary: Create exclusion
      tags:
        - CFS Exclusions
  /api/cfs/v1/inquiries:
    post:
      callbacks: {}
      operationId: cfs_inquiries.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CfsInquiryCreateInput'
        description: CfsInquiryCreateInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CfsInquiry'
          description: CfsInquiry
      summary: Check player exclusion status
      tags:
        - CFS Exclusions
security:
  - authorization: []
servers:
  - url: https://portal.nvsep.org/api
    variables: {}
tags: []
