openapi: "3.0.0"
info:
  description: "Please add description"
  version: "0.1.2_inProgress"
  title: "Trouble_ticketing"
tags:
- name: "TroubleTicket"
- name: "Product"
- name: "Status"
paths:
  /troubleTicket:
    post:
      tags:
      - "TroubleTicket"
      operationId: "troubleTicketCreate"
      summary: "create troubleTicket_Retrieve"
      requestBody:
        required: true
        content:
          application/json;charset=utf-8:
            schema:
              $ref: "#/components/schemas/TroubleTicket_Create"
      responses:
        "201":
          description: "Created"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/TroubleTicket_Create_Resp"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
    get:
      tags:
      - "TroubleTicket"
      operationId: "troubleTicketFind"
      summary: "find troubleTicket_Retrieve"
      parameters:
      - name: "offset"
        required: true
        in: "header"
        schema:
          type: "integer"
          format: "int32"
      - name: "sortAsc"
        required: true
        in: "query"
        schema:
          $ref: "#/components/schemas/SortAsc"
      - name: "sortColumn"
        required: true
        in: "query"
        schema:
          $ref: "#/components/schemas/SortColumn"
      - name: "creationDateFrom"
        required: false
        in: "query"
        schema:
          type: "string"
          format: "date-time"
      - name: "creationDateTo"
        required: false
        in: "query"
        schema:
          type: "string"
          format: "date-time"
      - name: "orangeServiceNumber"
        required: false
        in: "query"
        schema:
          type: "string"
      - name: "reportedBy"
        required: false
        in: "query"
        schema:
          type: "string"
      - name: "id"
        required: false
        in: "query"
        schema:
          type: "string"
      - name: "status"
        required: false
        in: "query"
        schema:
          $ref: "#/components/schemas/TicketStatus"
      responses:
        "200":
          description: "Ok"
          headers:
            X_Page_Count:
              schema:
                type: "integer"
                format: "int32"
            X_Total_Count:
              schema:
                type: "integer"
                format: "int32"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/TroubleTicket_Retrieve"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
  /troubleTicket/{id}:
    get:
      tags:
      - "TroubleTicket"
      operationId: "troubleTicketGet"
      summary: "get troubleTicket_Retrieve"
      parameters:
      - name: "id"
        required: true
        in: "path"
        schema:
          type: "string"
      responses:
        "200":
          description: "Ok"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/TroubleTicket_Show"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
    patch:
      tags:
      - "TroubleTicket"
      operationId: "troubleTicketPatch"
      summary: "patch troubleTicket_Retrieve"
      parameters:
      - name: "id"
        required: true
        in: "path"
        schema:
          type: "string"
      requestBody:
        required: true
        content:
          application/json;charset=utf-8:
            schema:
              $ref: "#/components/schemas/TroubleTicket_Update"
      responses:
        "200":
          description: "Ok"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
  /product:
    get:
      tags:
      - "Product"
      operationId: "productFind"
      summary: "find product"
      responses:
        "200":
          description: "Ok"
          content:
            application/json;charset=utf-8:
              schema:
                type: "array"
                items:
                  $ref: "#/components/schemas/Product"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
  /status:
    get:
      tags:
      - "Status"
      operationId: "statusGet"
      summary: "get status"
      description: "See [Orange recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)"
      responses:
        "200":
          description: "Ok"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiStatus"
        "400":
          description: "Bad Request\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "404":
          description: "Not Found\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "405":
          description: "Method Not Allowed\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "422":
          description: "Unprocessable entity\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "500":
          description: "Internal Server Error\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
        "503":
          description: "Service Unavailable\n\n"
          content:
            application/json;charset=utf-8:
              schema:
                $ref: "#/components/schemas/OrangeApiError"
servers:
- url: "/tmf-api/troubleTicket/v4"
components:
  schemas:
    Attachment:
      required:
      - "id"
      type: "object"
      properties:
        id:
          type: "string"
        name:
          type: "string"
        size:
          $ref: "#/components/schemas/Quantity"
    Characteristic:
      type: "object"
      properties:
        id:
          type: "string"
        name:
          $ref: "#/components/schemas/CharacteristicName"
        value:
          type: "string"
    CharacteristicName:
      type: "string"
      enum:
      - "customerReference"
      - "email"
      - "firstName"
      - "lastName"
      - "phone"
    ClassType:
      type: "string"
      enum:
      - "RelatedPartyTtContactMedium"
      - "TtEscalationLevel"
    ContactMedium:
      required:
      - "id"
      - "contactType"
      type: "object"
      properties:
        id:
          type: "string"
        contactType:
          $ref: "#/components/schemas/ContactType"
    ContactType:
      type: "string"
      enum:
      - "email"
      - "phone"
    CreationDate:
      type: "object"
      properties:
        from:
          type: "string"
          format: "date-time"
        to:
          type: "string"
          format: "date-time"
    Level: {}
    Note:
      type: "object"
      properties:
        date:
          type: "string"
          format: "date-time"
        type:
          $ref: "#/components/schemas/NoteType"
        text:
          type: "string"
        '@type':
          $ref: "#/components/schemas/NoteTtType"
    NoteTtType:
      type: "string"
      enum:
      - "NoteTtType"
    NoteType:
      type: "string"
      enum:
      - "Comments"
      - "Inward customer comments"
    Note_Patch:
      required:
      - "text"
      type: "object"
      properties:
        date:
          type: "string"
          format: "date-time"
        type:
          $ref: "#/components/schemas/NoteType"
        text:
          type: "string"
    OrangeServiceNumber:
      required:
      - "orangeServiceNumber"
      - "technicalNumbers"
      type: "object"
      properties:
        orangeServiceNumber:
          type: "string"
        technicalNumbers:
          type: "array"
          items:
            type: "string"
    PartyRole:
      type: "string"
      enum:
      - "csc"
      - "depositor"
    Priority:
      type: "string"
      enum:
      - "1"
      - "2"
      - "3"
      - "4"
    Product:
      required:
      - "productCharacteristic"
      - "orangeServiceNumbers"
      type: "object"
      properties:
        productCharacteristic:
          type: "array"
          items:
            $ref: "#/components/schemas/ProductCharacteristic"
        orangeServiceNumbers:
          type: "array"
          items:
            $ref: "#/components/schemas/OrangeServiceNumber"
    ProductCharacteristic:
      required:
      - "name"
      - "value"
      type: "object"
      properties:
        name:
          type: "string"
        value:
          type: "string"
    Quantity:
      type: "object"
      properties:
        amount:
          type: "number"
          format: "float"
        units:
          type: "string"
    RelatedEntity:
      required:
      - "id"
      - "role"
      type: "object"
      properties:
        id:
          type: "string"
        role:
          $ref: "#/components/schemas/relatedEntityRole"
    RelatedParty:
      type: "object"
      properties:
        contactMedium:
          type: "array"
          items:
            $ref: "#/components/schemas/ContactMedium"
        name:
          type: "string"
        role:
          $ref: "#/components/schemas/PartyRole"
        '@type':
          $ref: "#/components/schemas/ClassType"
    RelatedParty_create:
      type: "object"
      properties:
        contactMedium:
          type: "array"
          items:
            $ref: "#/components/schemas/ContactMedium"
        name:
          type: "string"
        role:
          $ref: "#/components/schemas/PartyRole"
        characteristic:
          type: "array"
          items:
            $ref: "#/components/schemas/Characteristic"
        '@type':
          $ref: "#/components/schemas/ClassType"
    Size:
      required:
      - "amount"
      - "units"
      type: "object"
      properties:
        amount:
          type: "number"
          format: "float"
        units:
          $ref: "#/components/schemas/SizeUnits"
    SizeUnits:
      type: "string"
      enum:
      - "Byte"
      - "MegaByte"
    SortAsc:
      type: "string"
      enum:
      - "false"
      - "true"
    SortColumn:
      type: "string"
      enum:
      - "CUSTOMER_REF"
      - "ORANGE_SERVICE_NUMBER"
      - "REPORTED_BY"
      - "STATUS START_DATE"
      - "TICKET_NUMBER"
    StatusChange:
      required:
      - "changeDate"
      - "changeReason"
      type: "object"
      properties:
        changeDate:
          type: "string"
          format: "date-time"
        changeReason:
          $ref: "#/components/schemas/changeReason"
    TicketStatus:
      type: "string"
      enum:
      - "-1"
      - "Closed"
      - "Errored"
      - "Frozen"
      - "In qualification"
      - "Ongoing"
      - "Repaired"
      - "Restored"
      - "Submitted"
    TroubleTicket_Create:
      required:
      - "description"
      type: "object"
      properties:
        attachment:
          type: "array"
          items:
            $ref: "#/components/schemas/Attachment"
        relatedParty:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedParty_create"
        relatedEntity:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedEntity"
        externalId:
          type: "string"
        description:
          type: "string"
    TroubleTicket_Create_Resp:
      type: "object"
      properties:
        ticketId:
          $ref: "#/components/schemas/TroubleTicket_Create_Resp_Id"
    TroubleTicket_Create_Resp_Id:
      type: "object"
      properties:
        id:
          type: "string"
    TroubleTicket_Find:
      type: "object"
      properties:
        tickets:
          type: "array"
          items:
            $ref: "#/components/schemas/TroubleTicket_Retrieve_search_id"
    TroubleTicket_Retrieve:
      description: "\n\n**Inheritance**\n\n  Children:\n  - TroubleTicket_Search"
      type: "object"
      properties:
        search:
          $ref: "#/components/schemas/TroubleTicket_Find"
    TroubleTicket_Retrieve_id:
      required:
      - "id"
      - "description"
      - "note"
      - "creationDate"
      - "status"
      - "relatedentity"
      - "resolutionDate"
      - "statusChange"
      - "externalId"
      - "relatedParty"
      - "attachment"
      - "priority"
      - "escalationLevel"
      - "@Type"
      type: "object"
      properties:
        id:
          type: "string"
        description:
          type: "string"
        note:
          type: "array"
          items:
            $ref: "#/components/schemas/Note"
        creationDate:
          type: "string"
          format: "date-time"
        status:
          $ref: "#/components/schemas/TicketStatus"
        relatedentity:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedEntity"
        resolutionDate:
          type: "string"
          format: "date-time"
        statusChange:
          $ref: "#/components/schemas/TroubleTicket_Retrieve_id_statusChange"
        externalId:
          type: "string"
        relatedParty:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedParty"
        attachment:
          $ref: "#/components/schemas/attachment_ticket"
        priority:
          $ref: "#/components/schemas/Priority"
        escalationLevel:
          $ref: "#/components/schemas/Level"
        '@Type':
          $ref: "#/components/schemas/TypeLevel"
    TroubleTicket_Retrieve_id_statusChange:
      required:
      - "changeDate"
      - "changeReason"
      type: "object"
      properties:
        changeDate:
          type: "string"
          format: "date-time"
        changeReason:
          $ref: "#/components/schemas/changeReason"
    TroubleTicket_Retrieve_search_id:
      required:
      - "id"
      - "description"
      - "creationDate"
      - "status"
      - "relatedentity"
      - "resolutionDate"
      - "statusChange"
      - "externalId"
      - "relatedParty"
      - "priority"
      - "escalationLevel"
      - "@Type"
      type: "object"
      properties:
        id:
          type: "string"
        description:
          type: "string"
        creationDate:
          type: "string"
          format: "date-time"
        status:
          $ref: "#/components/schemas/TicketStatus"
        relatedentity:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedEntity"
        resolutionDate:
          type: "string"
          format: "date-time"
        statusChange:
          $ref: "#/components/schemas/TroubleTicket_Retrieve_id_statusChange"
        externalId:
          type: "string"
        relatedParty:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedParty"
        priority:
          $ref: "#/components/schemas/Priority"
        escalationLevel:
          $ref: "#/components/schemas/Level"
        '@Type':
          $ref: "#/components/schemas/TypeLevel"
    TroubleTicket_Search:
      description: "\n\n**Inheritance**\n\n  Parent: TroubleTicket_Retrieve"
      allOf:
      - $ref: "#/components/schemas/TroubleTicket_Retrieve"
      - required:
        - "X_Page_Count"
        - "X_Total_Count"
        type: "object"
        properties:
          X_Page_Count:
            type: "integer"
            format: "int32"
          X_Total_Count:
            type: "integer"
            format: "int32"
    TroubleTicket_Show:
      type: "object"
      properties:
        ticket:
          $ref: "#/components/schemas/TroubleTicket_Retrieve_id"
    TroubleTicket_Update:
      required:
      - "attachment"
      - "note"
      - "relatedEntity"
      - "externalId"
      type: "object"
      properties:
        attachment:
          type: "array"
          items:
            $ref: "#/components/schemas/attachment_ticket"
        note:
          $ref: "#/components/schemas/Note_Patch"
        relatedEntity:
          $ref: "#/components/schemas/RelatedEntity"
        externalId:
          type: "string"
    Troubleticket_Find:
      type: "object"
      properties:
        id:
          type: "string"
        creationDate:
          $ref: "#/components/schemas/CreationDate"
        relatedEntity:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedEntity"
        relatedParty:
          type: "array"
          items:
            $ref: "#/components/schemas/RelatedParty"
        status:
          $ref: "#/components/schemas/TicketStatus"
    TypeLevel:
      type: "string"
      enum:
      - "TtEscalationLevel"
    attachment_ticket:
      type: "object"
      properties:
        name:
          type: "string"
    changeReason:
      type: "string"
      enum:
      - "Closure"
    relatedEntityRole:
      type: "string"
      enum:
      - "additionalTechnicalInformation"
      - "orangeServiceNumber"
      - "product"
      - "technicalNumber"
    OrangeApiComponent:
      description: "A component your service requires (other web service, database,\
        \ etc) to be fully functional.  See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)"
      required:
      - "status"
      - "name"
      - "version"
      type: "object"
      properties:
        status:
          $ref: "#/components/schemas/OrangeApiStatusValue"
        name:
          description: "Component internal name."
          type: "string"
        version:
          description: "major.minor.patch see [semver.org](https://semver.org/) or\
            \ G00R00C00"
          type: "string"
    OrangeApiError:
      description: "See [Orange recommendation](https://recommendations.innov.intraorange/designing-orange-api/#error-format)"
      required:
      - "code"
      - "message"
      type: "object"
      properties:
        code:
          description: "An integer coding the error type. This is given to caller\
            \ so he can translate them if required."
          type: "integer"
          format: "int32"
        message:
          description: "A short localized string that describes the error."
          type: "string"
        description:
          description: "(optional) A long localized error description if needed. It\
            \ can contain precise information about which parameter is missing, or\
            \ what are the identifier acceptable values."
          type: "string"
        infoURL:
          description: "(optional) A URL to online documentation that provides more\
            \ information about the error."
          type: "string"
    OrangeApiStatus:
      description: "Reflect service or component health. See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)"
      required:
      - "status"
      - "name"
      - "version"
      type: "object"
      properties:
        status:
          $ref: "#/components/schemas/OrangeApiStatusValue"
        name:
          description: "Your service internal name."
          type: "string"
        version:
          description: "major.minor.patch see [semver.org](https://semver.org/) or\
            \ G00R00C00"
          type: "string"
        components:
          description: "Each array entry represents a component your service requires\
            \ (other web service, database, etc) to be fully functional"
          type: "array"
          items:
            $ref: "#/components/schemas/OrangeApiComponent"
    OrangeApiStatusValue:
      description: "status ok | ko.  See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)"
      type: "string"
      enum:
      - "ko"
      - "ok"