Collab

Collab · GPT-Aktionen

OpenAPI definition

  • POST /collabgpts/api/user_profileaddProfile

    Add a new profile to user's profile list

  • POST /collabgpts/api/user_profile/{userProfileId}updateProfileNameOrContent

    update the name or attributes of the profile

  • DELETE /collabgpts/api/user_profile/{userProfileId}removeByUserProfileId

    remove a profile from user profile list using its userProfileId

  • POST /collabgpts/api/send_emailssendEmails

    use this api to batch send emails

  • POST /collabgpts/api/send_emailsendEmail

    use this api to send email

  • POST /collabgpts/api/send_email/record_querygetSendRecordByQuery

    use this api to query email send result

  • POST /collabgpts/api/email_templateaddTemplate

    Add a email template to the user's template list

  • POST /collabgpts/api/email_template/{templateId}updateTemplateName

    update template name or content

  • DELETE /collabgpts/api/email_template/{templateId}removeByTemplateId

    remove a template from user template list by its id

  • POST /collabgpts/api/contactaddContact

    Add a contact to the user's contact list. If a contact with the same email already exists, it will update the name and comment for that contact.

  • DELETE /collabgpts/api/contactremoveEmailFromContact

    remove a contact from user contact list using the email

  • GET /collabgpts/api/user_profilesgetUserProfiles

    get user profile list

  • GET /collabgpts/api/user/infogetUserInfo
  • GET /collabgpts/api/email_templatesgetUserTemplates

    get user template list

  • GET /collabgpts/api/contactsgetUserContactList

    get user contact list

Ursprüngliches API-Schema
{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://www.collabgpts.com",
      "description": "Generated server url"
    }
  ],
  "paths": {
    "/collabgpts/api/user_profile": {
      "post": {
        "tags": [
          "user-profile-controller"
        ],
        "description": "Add a new profile to user's profile list",
        "operationId": "addProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/user_profile/{userProfileId}": {
      "post": {
        "tags": [
          "user-profile-controller"
        ],
        "description": "update the name or attributes of the profile",
        "operationId": "updateProfileNameOrContent",
        "parameters": [
          {
            "name": "userProfileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "user-profile-controller"
        ],
        "description": "remove a profile from user profile list using its userProfileId",
        "operationId": "removeByUserProfileId",
        "parameters": [
          {
            "name": "userProfileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/send_emails": {
      "post": {
        "tags": [
          "email-controller"
        ],
        "description": "use this api to batch send emails",
        "operationId": "sendEmails",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/send_email": {
      "post": {
        "tags": [
          "email-controller"
        ],
        "description": "use this api to send email",
        "operationId": "sendEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailRequestDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/send_email/record_query": {
      "post": {
        "tags": [
          "email-controller"
        ],
        "description": "use this api to query email send result",
        "operationId": "getSendRecordByQuery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailQueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOListEmailSendRecord"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/email_template": {
      "post": {
        "tags": [
          "user-email-template-controller"
        ],
        "description": "Add a email template to the user's template list",
        "operationId": "addTemplate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTemplateBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/email_template/{templateId}": {
      "post": {
        "tags": [
          "user-email-template-controller"
        ],
        "description": "update template name or content",
        "operationId": "updateTemplateName",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "user-email-template-controller"
        ],
        "description": "remove a template from user template list by its id",
        "operationId": "removeByTemplateId",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/contact": {
      "post": {
        "tags": [
          "user-contact-controller"
        ],
        "description": "Add a contact to the user's contact list. If a contact with the same email already exists, it will update the name and comment for that contact.",
        "operationId": "addContact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddContactBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "user-contact-controller"
        ],
        "description": "remove a contact from user contact list using the email",
        "operationId": "removeEmailFromContact",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOVoid"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/user_profiles": {
      "get": {
        "tags": [
          "user-profile-controller"
        ],
        "description": "get user profile list",
        "operationId": "getUserProfiles",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOListUserProfileVO"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/user/info": {
      "get": {
        "tags": [
          "user-controller"
        ],
        "operationId": "getUserInfo",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOUserInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/email_templates": {
      "get": {
        "tags": [
          "user-email-template-controller"
        ],
        "description": "get user template list",
        "operationId": "getUserTemplates",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOListUserEmailTemplate"
                }
              }
            }
          }
        }
      }
    },
    "/collabgpts/api/contacts": {
      "get": {
        "tags": [
          "user-contact-controller"
        ],
        "description": "get user contact list",
        "operationId": "getUserContactList",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVOListUserContact"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddProfileBody": {
        "required": [
          "profileName"
        ],
        "type": "object",
        "properties": {
          "profileName": {
            "type": "string",
            "description": "the name of profile"
          },
          "attributes": {
            "type": "string",
            "description": "A JSON string of user profile attributes",
            "format": "json",
            "example": "{\"name\":\"userName\",\"address\":\"user address\",\"company\":\"company name\"}"
          }
        }
      },
      "ResultVOVoid": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "type": "object",
            "description": "response body"
          }
        }
      },
      "UpdateProfileBody": {
        "type": "object",
        "properties": {
          "profileName": {
            "type": "string",
            "description": "the name of profile to update.don't pass it if you don't want to update name"
          },
          "attributes": {
            "type": "string",
            "description": "A JSON string of user profile attributes.don't pass it if you don't want to update attributes",
            "format": "json"
          }
        }
      },
      "BatchRequest": {
        "required": [
          "requestList"
        ],
        "type": "object",
        "properties": {
          "requestList": {
            "type": "array",
            "description": "batch body. don't send more than 100 emails at one time",
            "items": {
              "$ref": "#/components/schemas/EmailRequestDTO"
            }
          }
        }
      },
      "EmailRequestDTO": {
        "required": [
          "content",
          "dest",
          "title"
        ],
        "type": "object",
        "properties": {
          "dest": {
            "type": "string",
            "description": "Destination email address"
          },
          "title": {
            "type": "string",
            "description": "Email title"
          },
          "content": {
            "type": "string",
            "description": "The email content to send, in HTML format. Any placeholders in the template should be populated before sending."
          },
          "replyTo": {
            "type": "string",
            "description": "Reply-to email address"
          }
        },
        "description": "batch body. don't send more than 100 emails at one time"
      },
      "EmailQueryRequest": {
        "required": [
          "end",
          "start"
        ],
        "type": "object",
        "properties": {
          "emails": {
            "type": "array",
            "description": "emails to query",
            "items": {
              "type": "string",
              "description": "emails to query"
            }
          },
          "start": {
            "type": "string",
            "description": "query start time",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "query end time",
            "format": "date-time"
          }
        }
      },
      "EmailSendRecord": {
        "type": "object",
        "properties": {
          "recordId": {
            "type": "integer",
            "format": "int64"
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "email": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "sendResult": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "response body"
      },
      "ResultVOListEmailSendRecord": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "type": "array",
            "description": "response body",
            "items": {
              "$ref": "#/components/schemas/EmailSendRecord"
            }
          }
        }
      },
      "AddTemplateBody": {
        "required": [
          "templateContent",
          "templateName"
        ],
        "type": "object",
        "properties": {
          "templateName": {
            "type": "string",
            "description": "the name of template"
          },
          "templateContent": {
            "type": "string",
            "description": "the content of template"
          }
        }
      },
      "UpdateTemplateBody": {
        "type": "object",
        "properties": {
          "templateName": {
            "type": "string",
            "description": "the name of template"
          },
          "templateContent": {
            "type": "string",
            "description": "the content of template"
          }
        }
      },
      "AddContactBody": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "the email of contact"
          },
          "name": {
            "type": "string",
            "description": "the name of contact"
          },
          "comment": {
            "type": "string",
            "description": "the comment of contact"
          }
        }
      },
      "ResultVOListUserProfileVO": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "type": "array",
            "description": "response body",
            "items": {
              "$ref": "#/components/schemas/UserProfileVO"
            }
          }
        }
      },
      "UserProfileVO": {
        "type": "object",
        "properties": {
          "userProfileId": {
            "type": "integer",
            "description": "userProfileId",
            "format": "int64"
          },
          "profileName": {
            "type": "string",
            "description": "profile name"
          },
          "attributes": {
            "type": "string",
            "description": "A JSON string of user profile attributes",
            "format": "json",
            "example": "{\"name\":\"userName\",\"address\":\"user address\",\"company\":\"company name\"}"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "response body"
      },
      "ResultVOUserInfoResponse": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "$ref": "#/components/schemas/UserInfoResponse"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "userEmail": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UserInfoResponse": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "description": "response body"
      },
      "ResultVOListUserEmailTemplate": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "type": "array",
            "description": "response body",
            "items": {
              "$ref": "#/components/schemas/UserEmailTemplate"
            }
          }
        }
      },
      "UserEmailTemplate": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int64"
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "templateName": {
            "type": "string"
          },
          "templateContent": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "response body"
      },
      "ResultVOListUserContact": {
        "type": "object",
        "properties": {
          "c": {
            "type": "string",
            "description": "response code. 0 is ok, others use errorMsg to display error info",
            "example": "0"
          },
          "errorMsg": {
            "type": "string",
            "description": "error message, use it when c is not \"0\"",
            "example": "params error"
          },
          "body": {
            "type": "array",
            "description": "response body",
            "items": {
              "$ref": "#/components/schemas/UserContact"
            }
          }
        }
      },
      "UserContact": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "integer",
            "format": "int64"
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactComment": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "response body"
      }
    }
  }
}