{
  "swagger": "2.0",
  "info": {
    "description": "This is a management portal server",
    "title": "Management Portal API",
    "contact": {},
    "version": "1.0"
  },
  "schemes": ["http"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {
    "/api/v1/devops/billing-proxy/api/v1/unc/workflow": {
      "put": {
        "operationId": "updateNotificationWorkflow",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update WorkFlow",
        "parameters": [
          {
            "description": "WorkFlow",
            "name": "workflow",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      },
      "post": {
        "operationId": "createNotificationWorkflow",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create WorkFlow",
        "parameters": [
          {
            "description": "WorkFlow",
            "name": "workflow",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteNotificationWorkflow",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "DELETE WorkFlow",
        "parameters": [
          {
            "description": "WorkFlow",
            "name": "workflow",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/workflow/page/{page}/page_size/{page_size}": {
      "get": {
        "operationId": "getNotificationWorkflow",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get WorkFlows",
        "parameters": [
          {
            "type": "string",
            "description": "page",
            "name": "page",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "page_size",
            "name": "page_size",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.WorkFlows"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/workflow/workflow_id/{workflow_id}": {
      "get": {
        "operationId": "getWorkflowDetail",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Workflow",
        "parameters": [
          {
            "type": "string",
            "description": "workflow_id",
            "name": "workflow_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      },
      "post": {
        "operationId": "DuplicateWorkflow",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Duplicate Workflow",
        "parameters": [
          {
            "type": "string",
            "description": "workflow_id",
            "name": "workflow_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/bulk_trigger": {
      "post": {
        "operationId": "bulkTrigger",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Bulk Trigger event",
        "parameters": [
          {
            "description": "trigger",
            "name": "trigger",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Trigger"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Workflow"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/broadcast_trigger": {
      "post": {
        "operationId": "broadcastTrigger",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Trigger Broadcast",
        "parameters": [
          {
            "description": "trigger",
            "name": "trigger",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Trigger"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/notifications/workflow_id/{workflow_id}/page/0/page_size/0": {
      "get": {
        "operationId": "activeFeed",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Notifications By WorkflowID",
        "parameters": [
          {
            "type": "string",
            "description": "workflow_id",
            "name": "workflow_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Notifications"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/notifications/workflow_id/{workflow_id}/summary": {
      "get": {
        "operationId": "workflowNotification",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Workflow Notifications Summary By WorkflowID",
        "parameters": [
          {
            "type": "string",
            "description": "workflow_id",
            "name": "workflow_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.NotificationsSummary"
              }
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/notifications": {
      "get": {
        "operationId": "getAllNotifications",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Notifications By WorkflowID",
        "parameters": [
          {
            "type": "integer",
            "name": "org_id",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "page",
            "in": "query"
          },
          {
            "type": "string",
            "name": "transaction_id",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "user_id",
            "in": "query"
          },
          {
            "type": "string",
            "name": "work_flow_name_like",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OpsNotifications"
            }
          }
        }
      }
    },
    "/api/v1/devops/billing-proxy/api/v1/unc/broadcast_trigger/{operator}/auth": {
      "get": {
        "operationId": "broadcastTriggerAuth",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Trigger Broadcast Auth",
        "parameters": [
          {
            "type": "string",
            "description": "operator",
            "name": "operator",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "forms.Workflow": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "creator_id": {
          "type": "string"
        },
        "in_app_content": {
          "type": "string"
        },
        "notification_group": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "trigger_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Variable"
          }
        },
        "worker_flow_id": {
          "type": "string"
        },
        "worker_flow_name": {
          "type": "string"
        }
      }
    },
    "forms.Variable": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "forms.WorkFlows": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number"
        },
        "page_query": {
          "$ref": "#/definitions/forms.PageQuery"
        },
        "work_flows": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Workflow"
          }
        }
      }
    },
    "forms.Trigger": {
      "type": "object",
      "properties": {
        "is_send_now": {
          "type": "boolean"
        },
        "is_test": {
          "type": "boolean"
        },
        "operator": {
          "type": "string"
        },
        "payload": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "schedule_time": {
          "type": "string"
        },
        "scope_type": {
          "type": "string"
        },
        "target_id_list": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tenant_id": {
          "type": "integer"
        },
        "transaction_id": {
          "type": "string"
        },
        "trigger_id": {
          "type": "string"
        },
        "worker_flow_id": {
          "type": "string"
        }
      }
    },
    "forms.PageQuery": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer"
        },
        "page_size": {
          "type": "integer"
        }
      }
    },
    "forms.Notification": {
      "type": "object",
      "properties": {
        "in_app_content": {
          "type": "string"
        },
        "is_read": {
          "type": "boolean"
        },
        "notification_group": {
          "type": "string"
        },
        "notification_id": {
          "type": "string"
        },
        "send_at": {
          "type": "string"
        },
        "send_by": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "subscriber_id": {
          "type": "string"
        },
        "transaction_id": {
          "type": "string"
        },
        "worker_flow_name": {
          "type": "string"
        }
      }
    },
    "forms.Notifications": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Notification"
          }
        },
        "has_more": {
          "type": "boolean"
        },
        "page_query": {
          "$ref": "#/definitions/forms.PageQuery"
        }
      }
    },
    "forms.NotificationsSummary": {
      "type": "object",
      "properties": {
        "channels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "count": {
          "type": "integer"
        },
        "date": {
          "type": "string"
        }
      }
    },
    "forms.OKType": {
      "type": "object",
      "properties": {}
    },
    "forms.OpsNotification": {
      "type": "object",
      "properties": {
        "notification": {
          "$ref": "#/definitions/forms.Notification"
        },
        "roles": {
          "type": "string"
        }
      }
    },
    "forms.OpsNotifications": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.OpsNotification"
          }
        },
        "has_more": {
          "type": "boolean"
        },
        "page_query": {
          "$ref": "#/definitions/forms.PageQuery"
        }
      }
    }
  }
}
