openapi: 3.0.1
info:
  title: Terms & Conditions
  version: v0
  description: API to manage users terms and conditions
servers: []
paths:
  /tandcs/templates/{id}/processsample:
    post:
      operationId: processSample
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
      responses:
        '200':
          description: OK
          content:
            text/html:
              schema:
                type: string
      tags:
        - template
      summary: ''
  /tandcs/templates:
    get:
      summary: Get items
      operationId: getItems_1
      parameters:
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
        - name: target
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultTemplate'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '300'
      tags:
        - template
    post:
      summary: Create an item
      operationId: createItem
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Template'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '300'
      tags:
        - template
  /tandcs/templates/{id}:
    get:
      summary: Get item
      operationId: getItem_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '200'
      tags:
        - template
    put:
      summary: Update item
      operationId: updateItem
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Template'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '400'
      tags:
        - template
    delete:
      summary: Delete item
      operationId: deleteItem
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '500'
      tags:
        - template
  /tandcs/templates/distinct:
    get:
      summary: Get distinct values for a given field
      operationId: distinct_1
      parameters:
        - name: target
          in: query
          required: false
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '100'
      tags:
        - template
  /tandcs/templates/recap:
    get:
      summary: Get recap quantities for a given field
      operationId: recap_1
      parameters:
        - name: target
          in: query
          required: true
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '150'
      tags:
        - template
  /tandcs/templates/unwind:
    get:
      summary: Search unwind for a given field
      operationId: unwind_1
      parameters:
        - name: target
          in: query
          required: true
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '150'
      tags:
        - template
  /tandcs/variables:
    get:
      summary: Get items
      operationId: getItems_2
      parameters:
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
        - name: target
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultTemplateVariable'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '300'
      tags:
        - variable
    post:
      summary: Create an item
      operationId: createItem_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateVariable'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateVariable'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '300'
      tags:
        - variable
  /tandcs/variables/{id}:
    get:
      summary: Get item
      operationId: getItem_2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateVariable'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '200'
      tags:
        - variable
    put:
      summary: Update item
      operationId: updateItem_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateVariable'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateVariable'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '400'
      tags:
        - variable
    delete:
      summary: Delete item
      operationId: deleteItem_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '500'
      tags:
        - variable
      description: ''
  /tandcs/variables/distinct:
    get:
      summary: Get distinct values for a given field
      operationId: distinct_2
      parameters:
        - name: target
          in: query
          required: false
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '100'
      tags:
        - variable
  /tandcs/variables/recap:
    get:
      summary: Get recap quantities for a given field
      operationId: recap_2
      parameters:
        - name: target
          in: query
          required: true
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '150'
      tags:
        - variable
  /tandcs/variables/unwind:
    get:
      summary: Search unwind for a given field
      operationId: unwind_2
      parameters:
        - name: target
          in: query
          required: true
          schema:
            type: string
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - name: predicate
          in: query
          required: true
          schema:
            type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
      x-operationWeight: '150'
      tags:
        - variable
components:
  schemas:
    TermsAndConditions:
      type: object
      properties:
        id:
          type: string
          deprecated: true
        customerId:
          type: string
        createDate:
          type: string
          format: date-time
          deprecated: true
        updateDate:
          type: string
          format: date-time
          deprecated: true
        modelVersion:
          type: string
          deprecated: true
        dbVersion:
          type: integer
          format: int64
        lastUpdateReason:
          type: string
        originalId:
          type: string
          writeOnly: true
        html:
          type: string
        platform:
          type: string
        templateId:
          type: string
        templateVariableId:
          type: string
        locale:
          type: string
        cancelPeriod:
          type: string
        corporateUrl:
          type: string
        contactForm:
          type: string
    Pageable:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        sort:
          $ref: '#/components/schemas/Sort'
        pageSize:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        paged:
          type: boolean
        unpaged:
          type: boolean
    Sort:
      type: object
      properties:
        sorted:
          type: boolean
        unsorted:
          type: boolean
        empty:
          type: boolean
    ExceptionDetail:
      type: object
      properties:
        errorType:
          type: string
        resourceType:
          type: string
        resourceId:
          type: string
        resourceDisplayName:
          type: string
        specific:
          type: object
    NormalizeException:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
        status:
          type: integer
          format: int32
        error:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ExceptionDetail'
    SearchResultObject:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    SearchResultTermsAndConditions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TermsAndConditions'
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    RecapEntry:
      type: object
      properties:
        targetValue:
          type: string
        count:
          type: integer
          format: int32
    SearchResultRecapEntry:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RecapEntry'
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    Document:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        type: object
    SearchResultDocument:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Document'
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    Template:
      required:
        - model
        - startDate
        - template
      type: object
      properties:
        id:
          type: string
          deprecated: true
        createDate:
          type: string
          format: date-time
          deprecated: true
        updateDate:
          type: string
          format: date-time
          deprecated: true
        modelVersion:
          type: string
          deprecated: true
        dbVersion:
          type: integer
          format: int64
        lastUpdateReason:
          type: string
        originalId:
          type: string
          writeOnly: true
        startingDate:
          type: string
          writeOnly: true
        startDate:
          type: string
          format: date-time
        locale:
          type: string
        template:
          type: string
        model:
          type: string
          enum:
            - MOR
            - PAYFAC
        status:
          type: string
          enum:
            - RUNNING
            - ARCHIVED
            - DRAFT
        lastUpdater:
          type: string
    SearchResultTemplate:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Template'
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    TemplateVariable:
      required:
        - cancelPeriod
        - contactForm
        - corporateUrl
        - nexwaySasCapital
        - startDate
      type: object
      properties:
        id:
          type: string
          deprecated: true
        createDate:
          type: string
          format: date-time
          deprecated: true
        updateDate:
          type: string
          format: date-time
          deprecated: true
        modelVersion:
          type: string
          deprecated: true
        dbVersion:
          type: integer
          format: int64
        lastUpdateReason:
          type: string
        originalId:
          type: string
          writeOnly: true
        startingDate:
          type: string
          writeOnly: true
        startDate:
          type: string
          format: date-time
        cancelPeriod:
          type: string
        corporateUrl:
          type: string
        contactForm:
          type: string
        nexwaySasCapital:
          type: string
        cancelPeriodI18nConfiguration:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: string
    SearchResultTemplateVariable:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TemplateVariable'
        last:
          type: boolean
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    JsonNode:
      type: object
      properties:
        array:
          type: boolean
        empty:
          type: boolean
        'null':
          type: boolean
        float:
          type: boolean
        number:
          type: boolean
        containerNode:
          type: boolean
        valueNode:
          type: boolean
        bigInteger:
          type: boolean
        long:
          type: boolean
        short:
          type: boolean
        binary:
          type: boolean
        textual:
          type: boolean
        double:
          type: boolean
        integralNumber:
          type: boolean
        missingNode:
          type: boolean
        boolean:
          type: boolean
        pojo:
          type: boolean
        int:
          type: boolean
        bigDecimal:
          type: boolean
        object:
          type: boolean
        floatingPointNumber:
          type: boolean
        nodeType:
          type: string
          enum:
            - ARRAY
            - BINARY
            - BOOLEAN
            - MISSING
            - 'NULL'
            - NUMBER
            - OBJECT
            - POJO
            - STRING
    KeyDefinition:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
        defaultValue:
          type: object
        required:
          type: boolean
tags:
  - name: template
  - name: variable
