openapi: 3.0.0
info:
  title: Timestreams
  version: "2023"
  description: The Timestreams service enables sales strategies and workflows to
    be modelled in a temporal manner. In a traditional D2C system, products,
    pricing and availability is fixed. In OneBasket, products, menus, and
    pricing can change based on the current time, enabling customers to create
    sales strategies that help them drive revenue, by offering the right
    products, at the best price at the most optimal time. For example, F&B sales
    strategies include pre-orders before matches and early arrival discounts.
    These can be done with an extended menu, and then once a match starts, sales
    can fall back to a smaller standard menu that is able to be serviced by a
    fixed number of operational staff on the ground.
tags:
  - name: Timestreams
  - name: Timeperiods
  - name: Timelines
paths:
  /timestreams:
    get:
      tags:
        - Timestreams
      operationId: GetTimestreams
      summary: Get a list of timestreams
      description: Get a list of timestreams with support for paging
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - $ref: "#/components/parameters/TimestampQuery"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Timestreams.TicketedEventTimestreamDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
    post:
      tags:
        - Timestreams
      operationId: SearchTimestreams
      summary: Search for timestreams
      description: Search for timestreams with support for paging
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Timestreams.TicketedEventTimestreamDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Timestreams.TicketedEventTimestreamQueryDto"
  /timestreams/{timestreamId}:
    get:
      tags:
        - Timestreams
      operationId: GetTimestream
      summary: Get a timestream
      description: Gets full details of a specific timestream
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - name: timestreamId
          in: path
          required: true
          description: The id of the timestream
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Timestreams.TicketedEventTimestreamDto"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
  /timestreams/{timestreamId}/snapshot:
    post:
      tags:
        - Timestreams
      operationId: SearchTimestreamSnapshot
      summary: Search timeperiods
      description: Search timeperiods for the specified timestream with support for paging
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - name: timestreamId
          in: path
          required: true
          description: The id of the timestream
          schema:
            type: string
        - name: now
          in: query
          required: false
          description: If true will only return timeperiods that are currently active
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: "#/components/schemas/Timeperiods.PrimaryPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.CollectionPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: "#/components/schemas/Timeperiods.PrimaryPeriodQueryDto"
                - $ref: "#/components/schemas/Timeperiods.CollectionPeriodQueryDto"
                - $ref: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodQueryDto"
    get:
      tags:
        - Timestreams
      operationId: GetTimestreamSnapshot
      summary: Get timeperiods
      description: Get timeperiods for the specified timestream with support for paging
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - $ref: "#/components/parameters/TimestampQuery"
        - name: timestreamId
          in: path
          required: true
          description: The id of the timestream
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: "#/components/schemas/Timeperiods.PrimaryPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.CollectionPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
  /timestreams/{timestreamId}/timelines:
    get:
      tags:
        - Timelines
      operationId: GetTimelines
      summary: Get a list of timelines
      description: Get a list of timelines for a specific timestream
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - name: timestreamId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: "#/components/schemas/Timelines.PrimaryTimelineDto"
                        - $ref: "#/components/schemas/Timelines.CollectionTimelineDto"
                        - $ref: "#/components/schemas/Timelines.ProductAvailabilityTimelineDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
    post:
      tags:
        - Timelines
      operationId: SearchTimelines
      summary: Search for timelines
      description: Search for timelines under a timestream with support for paging
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - name: timestreamId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: "#/components/schemas/Timelines.PrimaryTimelineDto"
                        - $ref: "#/components/schemas/Timelines.CollectionTimelineDto"
                        - $ref: "#/components/schemas/Timelines.ProductAvailabilityTimelineDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: "#/components/schemas/Timelines.PrimaryTimelineQueryDto"
                - $ref: "#/components/schemas/Timelines.CollectionTimelineQueryDto"
                - $ref: "#/components/schemas/Timelines.ProductAvailabilityTimelineQueryDto"
  /timestreams/{timestreamId}/timelines/{timelineId}:
    get:
      tags:
        - Timelines
      operationId: GetTimeline
      summary: Get a specific timeline
      description: Get full details of a specific timeline under a timestream
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - name: timestreamId
          in: path
          required: true
          schema:
            type: string
        - name: timelineId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/Timelines.PrimaryTimelineDto"
                  - $ref: "#/components/schemas/Timelines.CollectionTimelineDto"
                  - $ref: "#/components/schemas/Timelines.ProductAvailabilityTimelineDto"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
  /timestreams/{timestreamId}/timelines/{timelineId}/periods:
    get:
      tags:
        - Timeperiods
      operationId: GetTimeperiods
      summary: Get periods for a timeline
      description: Get periods for a specific timeline under a specific timestream
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - $ref: "#/components/parameters/PagedRequest.pageSize"
        - $ref: "#/components/parameters/PagedRequest.page"
        - name: timestreamId
          in: path
          required: true
          schema:
            type: string
        - name: timelineId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                description: Exposes data to page through results
                required:
                  - page
                  - pageSize
                  - pageTotal
                  - resultsTotal
                  - hasNextPage
                  - hasPreviousPage
                  - results
                properties:
                  page:
                    type: integer
                    description: The current page of results
                  pageSize:
                    type: integer
                    description: The number of results per page
                  pageTotal:
                    type: integer
                    description: The total number of pages
                  resultsTotal:
                    type: integer
                    description: The total number of results
                  hasNextPage:
                    type: boolean
                    description: True if there is a next page
                  hasPreviousPage:
                    type: boolean
                    description: True if there is a previous page
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: "#/components/schemas/Timeperiods.PrimaryPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.CollectionPeriodDto"
                        - $ref: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodDto"
                    description: The results for the current page
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
  /timestreams/{timestreamId}/timelines/{timelineId}/periods/{timeperiodId}:
    get:
      tags:
        - Timeperiods
      operationId: GetTimeperiod
      summary: Get a specific timeperiod
      description: Get full details for a specific period for a specific timeline
        under a specific timestream
      parameters:
        - $ref: "#/components/parameters/StoreFrontRequest"
        - name: timestreamId
          in: path
          required: true
          schema:
            type: string
        - name: timelineId
          in: path
          required: true
          schema:
            type: string
        - name: timeperiodId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/Timeperiods.PrimaryPeriodDto"
                  - $ref: "#/components/schemas/Timeperiods.CollectionPeriodDto"
                  - $ref: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodDto"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.BadRequestProblem"
        "401":
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.UnauthorizedProblem"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OneBasket.Rest.NotFoundProblem"
components:
  parameters:
    PagedRequest.page:
      name: page
      in: query
      required: false
      description: The page of results to return
      schema:
        type: integer
        default: 1
    PagedRequest.pageSize:
      name: pageSize
      in: query
      required: false
      description: The number of results per page
      schema:
        type: integer
        default: 50
    StoreFrontRequest:
      name: x-api-key
      in: header
      required: true
      description: OneBasket API Key
      schema:
        type: string
        format: password
    TimestampQuery:
      name: timestamp
      in: query
      required: false
      description: If not supplied, the current time is used
      schema:
        type: string
        format: date-time
  schemas:
    OneBasket.Rest.BadRequestProblem:
      type: object
      description: The response model when the request is invalid
      required:
        - errors
      allOf:
        - type: object
          description: ""
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Bad request
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 400
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
        errors:
          type: object
          additionalProperties:
            type: object
    OneBasket.Rest.NotFoundProblem:
      type: object
      description: The response model when the requested resource is not found
      allOf:
        - type: object
          description: ""
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Not Found
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 404
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
    OneBasket.Rest.UnauthorizedProblem:
      type: object
      description: The response model when the request is unauthorized
      allOf:
        - type: object
          description: ""
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          enum:
            - Unauthorized
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 401
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
    Timelines.CollectionTimelineDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
        - kioskId
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineDto"
      properties:
        type:
          type: string
          enum:
            - Collection
          description: The type of the timeline
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The unique identifier of the kiosk
    Timelines.CollectionTimelineQueryDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineQueryDto"
      properties:
        type:
          type: string
          enum:
            - Collection
          description: The type of the timeline
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The unique identifier of the kiosk
    Timelines.PrimaryTimelineDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineDto"
      properties:
        type:
          type: string
          enum:
            - Primary
          description: The type of the timeline
    Timelines.PrimaryTimelineQueryDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineQueryDto"
      properties:
        type:
          type: string
          enum:
            - Primary
          description: The type of the timeline
    Timelines.ProductAvailabilityTimelineDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
        - kioskId
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineDto"
      properties:
        type:
          type: string
          enum:
            - ProductAvailability
          description: The type of the timeline
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The unique identifier of the kiosk
    Timelines.ProductAvailabilityTimelineQueryDto:
      type: object
      description: Represents a timeline for primary events
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timelines.TimelineQueryDto"
      properties:
        type:
          type: string
          enum:
            - ProductAvailability
          description: The type of the timeline
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The unique identifier of the kiosk
    Timelines.TimelineDto:
      type: object
      description: Represents a timeline in a timestream
      discriminator:
        propertyName: type
        mapping:
          Primary: "#/components/schemas/Timelines.PrimaryTimelineDto"
          Collection: "#/components/schemas/Timelines.CollectionTimelineDto"
          ProductAvailability: "#/components/schemas/Timelines.ProductAvailabilityTimelineDto"
      required:
        - id
        - timestreamId
        - title
        - type
        - timeperiods
      properties:
        type:
          allOf:
            - $ref: "#/components/schemas/Timelines.TimelineType"
          description: The type of the timeline
        id:
          type: string
          description: The unique identifier of the timeline
        timestreamId:
          type: string
          description: The unique identifier of the parent timestream
        title:
          type: string
          description: The title of the timeline
        timeperiods:
          type: integer
          description: The timeperiods of the timeline
    Timelines.TimelineQueryDto:
      type: object
      description: Query options for timelines
      discriminator:
        propertyName: type
        mapping:
          Primary: "#/components/schemas/Timelines.PrimaryTimelineQueryDto"
          Collection: "#/components/schemas/Timelines.CollectionTimelineQueryDto"
          ProductAvailability: "#/components/schemas/Timelines.ProductAvailabilityTimelineQueryDto"
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: "#/components/schemas/Timelines.TimelineType"
          description: Query for timlines of the specific type
    Timelines.TimelineType:
      type: string
      description: Discriminator for timeline types
      enum:
        - Primary
        - ProductAvailability
        - Collection
    Timeperiods.CollectionPeriodDto:
      type: object
      description: Query model to seach for product availability timeperiods
      required:
        - type
        - capacity
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodDto"
      properties:
        type:
          type: string
          enum:
            - Collection
          description: The type of the timeline
        capacity:
          type: integer
          description: The capacity that can be served in this timeperiod
    Timeperiods.CollectionPeriodQueryDto:
      type: object
      description: Query model to seach for product availability timeperiods
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodQueryDto"
      properties:
        type:
          type: string
          enum:
            - Collection
          description: The type of the timeline
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The kiosk that is serving in this timeperiod
    Timeperiods.PrimaryPeriodDto:
      type: object
      description: Query model to seach for main event timeperiods
      required:
        - type
        - inSeatDeliveryEnabled
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodDto"
      properties:
        type:
          type: string
          enum:
            - Primary
          description: The type of the timeline
        inSeatDeliveryEnabled:
          type: boolean
          description: True if in-seat delivery is available
    Timeperiods.PrimaryPeriodQueryDto:
      type: object
      description: Query model to seach for main event timeperiods
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodQueryDto"
      properties:
        type:
          type: string
          enum:
            - Primary
          description: The type of the timeline
    Timeperiods.ProductAvailabilityPeriodDto:
      type: object
      description: Query model to seach for main event timeperiods
      required:
        - type
        - productAvailabilityGroup
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodDto"
      properties:
        type:
          type: string
          enum:
            - ProductAvailability
          description: The type of the timeline
        productAvailabilityGroup:
          type: string
          description: The availability group for this period
    Timeperiods.ProductAvailabilityPeriodQueryDto:
      type: object
      description: Query model to seach for main event timeperiods
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timeperiods.TimeperiodQueryDto"
      properties:
        type:
          type: string
          enum:
            - ProductAvailability
          description: The type of the timeline
        productAvailabilityGroup:
          type: string
          description: The availability group for this period
        kioskId:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The kiosk that is serving in this timeperiod
    Timeperiods.TimeperiodDto:
      type: object
      description: Represents a timeline in a timestream
      discriminator:
        propertyName: type
        mapping:
          Primary: "#/components/schemas/Timeperiods.PrimaryPeriodDto"
          Collection: "#/components/schemas/Timeperiods.CollectionPeriodDto"
          ProductAvailability: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodDto"
      required:
        - type
        - id
        - timestreamId
        - timelineId
        - title
        - description
        - start
        - duration
        - end
      properties:
        type:
          $ref: "#/components/schemas/Timelines.TimelineType"
        id:
          type: string
          description: The unique identifier of the timeperiod
        timestreamId:
          type: string
          description: The unique identifier of the parent timestream
        timelineId:
          type: string
          description: The unique identifier of the parent timeline
        title:
          type: string
          description: The title of the timeperiod
        description:
          type: string
          description: The description of the timeperiod
        start:
          type: string
          format: date-time
          description: The start time of the timeperiod
        duration:
          type: string
          format: duration
          description: The duration of the timeperiod
        end:
          type: string
          format: date-time
          description: The end time of the timeperiod
    Timeperiods.TimeperiodQueryDto:
      type: object
      description: Represents a timeline in a timestream
      discriminator:
        propertyName: type
        mapping:
          Primary: "#/components/schemas/Timeperiods.PrimaryPeriodQueryDto"
          Collection: "#/components/schemas/Timeperiods.CollectionPeriodQueryDto"
          ProductAvailability: "#/components/schemas/Timeperiods.ProductAvailabilityPeriodQueryDto"
      required:
        - type
      properties:
        type:
          $ref: "#/components/schemas/Timelines.TimelineType"
        start:
          type: string
          format: date-time
          description: The start time of the timeperiod
        end:
          type: string
          format: date-time
          description: The end time of the timeperiod
    Timestreams.TicketedEventTimestreamDto:
      type: object
      required:
        - type
        - ticketedEvent
        - venueName
        - competitionName
        - date
        - logoUrl
        - competitionLogoUrl
      allOf:
        - $ref: "#/components/schemas/Timestreams.TimestreamDto"
      properties:
        type:
          type: string
          enum:
            - TicketedEvent
        ticketedEvent:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The ticketed event associated with the timestream
        venueName:
          type: string
          description: The name of the venue
        competitionName:
          type: string
          description: The name of the competation
        date:
          type: string
          format: date-time
          description: The date of the event
        logoUrl:
          type: string
          description: The logo of the event
        competitionLogoUrl:
          type: string
          description: The logo of the competition
    Timestreams.TicketedEventTimestreamQueryDto:
      type: object
      required:
        - type
      allOf:
        - $ref: "#/components/schemas/Timestreams.TimestreamQueryDto"
      properties:
        type:
          type: string
          enum:
            - TicketedEvent
        ticketedEvent:
          allOf:
            - $ref: "#/components/schemas/providerIdentity"
          description: The ticketed event associated with the timestream
    Timestreams.TimestreamDto:
      type: object
      description: Represents a timestream in OneBasket
      discriminator:
        propertyName: type
        mapping:
          TicketedEvent: "#/components/schemas/Timestreams.TicketedEventTimestreamDto"
      required:
        - id
        - title
        - description
        - venue
        - type
        - timelines
      properties:
        type:
          allOf:
            - $ref: "#/components/schemas/Timestreams.TimestreamType"
          description: The type of the timestream
        id:
          type: string
          description: The unique identifier of the timestream
        title:
          type: string
          description: The title of the timestream
        description:
          type: string
          description: The description of the timestream
        venue:
          type: string
          description: The venue selected for the timestream
        timelines:
          type: object
          description: The timelines of the timestream
          additionalProperties:
            type: integer
    Timestreams.TimestreamQueryDto:
      type: object
      description: Query options for a timestream
      discriminator:
        propertyName: type
        mapping:
          TicketedEvent: "#/components/schemas/Timestreams.TicketedEventTimestreamQueryDto"
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: "#/components/schemas/Timestreams.TimestreamType"
          description: The type of the timestream
        venue:
          type: string
          description: The venue selected for the timestream
    Timestreams.TimestreamType:
      type: string
      enum:
        - TicketedEvent
    providerIdentity:
      type: string
servers:
  - url: https://storefrontapi.sandbox.onebasket.io
    description: Sandbox
    variables: {}
  - url: https://storefrontapi.live.onebasket.io
    description: Live
    variables: {}
