Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Files = map[string]string{
"api.swagger.json": `{
"swagger": "2.0",
"info": {
"title": "Notification Project",
"version": "0.0.1",
"contact": {
"name": "Notification Project",
"url": "https://github.com/openpitrix/notification"
}
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/addresses": {
"get": {
"summary": "Query a list of addresses that meet the query criteria.",
"operationId": "DescribeAddresses",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDescribeAddressesResponse"
}
}
},
"parameters": [
{
"name": "address_id",
"description": "address id.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "address_list_id",
"description": "address list id.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "address",
"description": "address details, could be email address for email, user id for websocket, mobile number for sms.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "notify_type",
"description": "the notification type , eg:[email|websocket|sms|wechat].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "status",
"description": "address status, eg:[active|disabled|deleted].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "limit",
"description": "data limit per page, default value 20, max value 200.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "offset",
"description": "beginning data offset of this page, default 0.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "search_word",
"description": "query key, support these fields(address_id,address,notify_type,remarks).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "sort_key",
"description": "sort key, order by sort_key, default create_time.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reverse",
"description": "value = 0 sort ASC, value = 1 sort DESC.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "display_columns",
"description": "select columns to display, currently not support.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
}
],
"tags": [
"notification"
]
},
"delete": {
"summary": "Delete a list of addresses.",
"operationId": "DeleteAddresses",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDeleteAddressesResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbDeleteAddressesRequest"
}
}
],
"tags": [
"notification"
]
},
"post": {
"summary": "Create a recipient address.",
"operationId": "CreateAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbCreateAddressResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbCreateAddressRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/addresses/{address}": {
"put": {
"summary": "Modify one address.",
"operationId": "ModifyAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbModifyAddressResponse"
}
}
},
"parameters": [
{
"name": "address",
"description": "required, address id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbModifyAddressRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/addresslists": {
"get": {
"summary": "Query a list of addresslists that meet the query criteria.",
"operationId": "DescribeAddressList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDescribeAddressListResponse"
}
}
},
"parameters": [
{
"name": "address_list_id",
"description": "address list id.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "address_list_name",
"description": "the name of the address list.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "extra",
"description": "the extra info of the address.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "status",
"description": "address list status, eg:[active|disabled|deleted].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "limit",
"description": "data limit per page, default value 20, max value 200.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "offset",
"description": "beginning data offset of this page, default 0.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "search_word",
"description": "query key, support these fields(address_list_id,address_list_name,address_list_name,extra).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "sort_key",
"description": "sort key, order by sort_key, default create_time.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reverse",
"description": "value = 0 sort ASC, value = 1 sort DESC.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "display_columns",
"description": "select columns to display, currently not support.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
}
],
"tags": [
"notification"
]
},
"delete": {
"summary": "Delete a list of addresslist.",
"operationId": "DeleteAddressList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDeleteAddressListResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbDeleteAddressListRequest"
}
}
],
"tags": [
"notification"
]
},
"post": {
"summary": "Create a list of addresses of the recipients.",
"operationId": "CreateAddressList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbCreateAddressListResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbCreateAddressListRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/addresslists/{addresslist}": {
"put": {
"summary": "Modify one address list.",
"operationId": "ModifyAddressList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbModifyAddressListResponse"
}
}
},
"parameters": [
{
"name": "addresslist",
"description": "required, address list id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbModifyAddressListRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/notifications": {
"get": {
"summary": "Describe notifications",
"operationId": "DescribeNotifications",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDescribeNotificationsResponse"
}
}
},
"parameters": [
{
"name": "notification_id",
"description": "notification id.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "content_type",
"description": "notification content type, eg:[invite|verify|fee|business|alert|other|event].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "owner",
"description": "notification owner.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "status",
"description": "notification status, eg:[pending|sending|successful|failed].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "limit",
"description": "data limit per page, default value 20, max value 200.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "offset",
"description": "beginning data offset of this page, default 0.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "search_word",
"description": "query key, support these fields(notification_id,content_type,title,short_content,address_info,status,owner).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "sort_key",
"description": "sort key, order by sort_key, default create_time.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reverse",
"description": "value = 0 sort ASC, value = 1 sort DESC.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "display_columns",
"description": "select columns to display, currently not support.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
}
],
"tags": [
"notification"
]
},
"post": {
"summary": "Create notification",
"operationId": "CreateNotification",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbCreateNotificationResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbCreateNotificationRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/notifications/retry": {
"post": {
"summary": "Retry notifications",
"operationId": "RetryNotifications",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbRetryNotificationsResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbRetryNotificationsRequest"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/serviceconfigs": {
"get": {
"summary": "Get service configration",
"operationId": "GetServiceConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbServiceConfig"
}
}
},
"parameters": [
{
"name": "service_type",
"description": "required, service type.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
}
],
"tags": [
"notification"
]
},
"post": {
"summary": "Set service configration",
"operationId": "SetServiceConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbSetServiceConfigResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbServiceConfig"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/serviceconfigs/validation": {
"post": {
"summary": "Validate email service",
"operationId": "ValidateEmailService",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbValidateEmailServiceResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbServiceConfig"
}
}
],
"tags": [
"notification"
]
}
},
"/v1/tasks": {
"get": {
"summary": "Describe tasks",
"operationId": "DescribeTasks",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbDescribeTasksResponse"
}
}
},
"parameters": [
{
"name": "task_id",
"description": "task id.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "notification_id",
"description": "the notification id of the task, one notification may send out by serval tasks.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "error_code",
"description": "error code, if task run failed will return a error code.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "status",
"description": "the task execution status, eg:[pending|sending|successful|failed].",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
},
{
"name": "limit",
"description": "data limit per page, default value 20, max value 200.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "offset",
"description": "beginning data offset of this page, default 0.",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "search_word",
"description": "query key, support these fields(task_id,notification_id,status,error_code).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "sort_key",
"description": "sort key, order by sort_key, default create_time.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reverse",
"description": "value = 0 sort ASC, value = 1 sort DESC.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "display_columns",
"description": "select columns to display, currently not support.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multimulti"
}
],
"tags": [
"notification"
]
}
},
"/v1/tasks/retry": {
"post": {
"summary": "Retry tasks",
"operationId": "RetryTasks",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbRetryTasksResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbRetryTasksRequest"
}
}
],
"tags": [
"notification"
]
}
}
},
"definitions": {
"pbAddress": {
"type": "object",
"properties": {
"address_id": {
"type": "string",
"title": "address id"
},
"address_list_id": {
"type": "string",
"title": "address list id"
},
"address": {
"type": "string",
"description": "address details, could be email address for email, user id for websocket, mobile number for sms."
},
"remarks": {
"type": "string",
"title": "remarks for address"
},
"verification_code": {
"type": "string",
"title": "verification code for register address at the first time"
},
"status": {
"type": "string",
"title": "address status, eg:[active|disabled|deleted]"
},
"create_time": {
"type": "string",
"format": "date-time",
"title": "create time of the address"
},
"verify_time": {
"type": "string",
"format": "date-time",
"title": "verify time when verify the address"
},
"status_time": {
"type": "string",
"format": "date-time",
"title": "the status changed time of the address"
},
"notify_type": {
"type": "string",
"title": "the notification type , eg:[email|websocket|sms|wechat]"
}
}
},
"pbAddressList": {
"type": "object",
"properties": {
"address_list_id": {
"type": "string",
"title": "address list id"
},
"address_list_name": {
"type": "string",
"title": "the name of the address list"
},
"extra": {
"type": "string",
"title": "the extra info of the address"
},
"status": {
"type": "string",
"title": "address list status, eg:[active|disabled|deleted]"
},
"create_time": {
"type": "string",
"format": "date-time",
"title": "create time of the address list"
},
"status_time": {
"type": "string",
"format": "date-time",
"title": "the status changed time of the address list"
},
"address_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbAddress"
},
"title": "address list"
}
}
},
"pbCreateAddressListRequest": {
"type": "object",
"properties": {
"address_list_name": {
"type": "string",
"title": "the name of the address list"
},
"extra": {
"type": "string",
"title": "the extra info of the address"
},
"address_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "required, the address ids for the address list to create"
}
}
},
"pbCreateAddressListResponse": {
"type": "object",
"properties": {
"address_list_id": {
"type": "string",
"title": "address list id"
}
}
},
"pbCreateAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "required, address details, could be email address for email, user id for websocket, mobile number for sms."
},
"remarks": {
"type": "string",
"title": "remarks for address"
},
"verification_code": {
"type": "string",
"title": "verification code for register address at the first time"
},
"notify_type": {
"type": "string",
"title": "required, the notification type , eg:[email|websocket|sms|wechat]"
}
}
},
"pbCreateAddressResponse": {
"type": "object",
"properties": {
"address_id": {
"type": "string",
"title": "id of address created"
}
}
},
"pbCreateNotificationRequest": {
"type": "object",
"properties": {
"content_type": {
"type": "string",
"title": "required, notification content type, eg:[invite|verify|fee|business|alert|other|event]"
},
"title": {
"type": "string",
"title": "required, notification title"
},
"content": {
"type": "string",
"title": "notification content, json fmt, eg:{\"html\":\"test_content_html\", \"normal\":\"test_content_normal\"}"
},
"short_content": {
"type": "string",
"title": "notification short content"
},
"expired_days": {
"type": "integer",
"format": "int64",
"description": "notification expired days, 0 is for never expired."
},
"owner": {
"type": "string",
"title": "notification owner"
},
"address_info": {
"type": "string",
"description": "the address to send the notification, json fmt, currently support 2 kinds types.\n1.key/value Type, key is the notification send Type,the value is the list of address,\neg:{\"email\": [\"xxx1@163.com\", \"xxx2@163.com\"],\"websocket\": [\"system\", \"user1\"]}\n2.Array Type, eg:[\"adl-xxxx1\", \"adl-xxxx2\"],\nthe item is the address list id which is already created in advance."
},
"available_start_time": {
"type": "string",
"title": "the available start time to receive notification"
},
"available_end_time": {
"type": "string",
"title": "the available end time to receive notification"
},
"extra": {
"type": "string",
"title": "extra info is only used for websocket notification,to show which websocket client could accept it.\neg:\"{\"ws_service\": \"ks\",\"ws_message_type\": \"event\"}\""
}
}
},
"pbCreateNotificationResponse": {
"type": "object",
"properties": {
"notification_id": {
"type": "string",
"title": "id of notification created"
}
}
},
"pbDeleteAddressListRequest": {
"type": "object",
"properties": {
"address_list_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "required, address list id"
}
}
},
"pbDeleteAddressListResponse": {
"type": "object",
"properties": {
"address_list_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "address list id"
}
}
},
"pbDeleteAddressesRequest": {
"type": "object",
"properties": {
"address_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "required, address id"
}
}
},
"pbDeleteAddressesResponse": {
"type": "object",
"properties": {
"address_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "address id"
}
}
},
"pbDescribeAddressListResponse": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"format": "int64",
"title": "total count of qualified address lists"
},
"address_list_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbAddressList"
},
"title": "list of address lists"
}
}
},
"pbDescribeAddressesResponse": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"format": "int64",
"title": "total count of qualified address"
},
"address_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbAddress"
},
"title": "list of address"
}
}
},
"pbDescribeNotificationsResponse": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"format": "int64",
"title": "total count of qualified notifications"
},
"notification_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbNotification"
},
"title": "list of notification"
}
}
},
"pbDescribeTasksResponse": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"format": "int64",
"title": "total count of qualified tasks"
},
"task_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbTask"
},
"title": "list of task"
}
}
},
"pbEmailServiceConfig": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"title": "email server protocol"
},
"email_host": {
"type": "string",
"title": "email server host"
},
"port": {
"type": "integer",
"format": "int64",
"title": "email server send port"
},
"display_sender": {
"type": "string",
"title": "notification display sender"
},
"email": {
"type": "string",
"title": "send email address"
},
"password": {
"type": "string",
"title": "send email address password"
},
"ssl_enable": {
"type": "boolean",
"format": "boolean",
"title": "is ssl enabled or not"
},
"validation_icon": {
"type": "string",
"title": "icon in validation email"
},
"validation_title": {
"type": "string",
"title": "email title for validation email"
}
}
},
"pbMessageDetail": {
"type": "object",
"properties": {
"message_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"service": {
"type": "string"
},
"message_type": {
"type": "string"
},
"message_content": {
"type": "string"
}
}
},
"pbModifyAddressListRequest": {
"type": "object",
"properties": {
"addresslist": {
"type": "string",
"title": "required, address list id"
},
"address_list_name": {
"type": "string",
"title": "address list name"
},
"extra": {
"type": "string",
"title": "the extra info of the address list"
},
"status": {
"type": "string",
"title": "address list status, eg:[active|disabled|deleted]"
},
"address_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "address ids of the address list"
}
}
},
"pbModifyAddressListResponse": {
"type": "object",
"properties": {
"address_list_id": {
"type": "string",
"title": "address list id"
}
}
},
"pbModifyAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string",
"title": "required, address id"
},
"address_detail": {
"type": "string",
"description": "address details, could be email address for email, user id for websocket, mobile number for sms."
},
"remarks": {
"type": "string",
"title": "remarks for address"
},
"verification_code": {
"type": "string",
"title": "verification code for register address at the first time"
},
"notify_type": {
"type": "string",
"title": "the notification type, eg:[email|websocket|sms|wechat]"
}
}
},
"pbModifyAddressResponse": {
"type": "object",
"properties": {
"address_id": {
"type": "string",
"title": "address id"
}
}
},
"pbNotification": {
"type": "object",
"properties": {
"notification_id": {
"type": "string",
"title": "notification id"
},
"content_type": {
"type": "string",
"title": "notification content type, eg:[invite|verify|fee|business|alert|other|event]"
},
"title": {
"type": "string",
"title": "notification title"
},
"content": {
"type": "string",
"title": "notification content, json fmt, eg:{\"html\":\"test_content_html\", \"normal\":\"test_content_normal\"}"
},
"short_content": {
"type": "string",
"title": "notification short content"
},
"expired_days": {
"type": "integer",
"format": "int64",
"description": "notification expired days, 0 is for never expired."
},
"status": {
"type": "string",
"title": "notification status, eg:[pending|sending|successful|failed]"
},
"create_time": {
"type": "string",
"format": "date-time",
"title": "create time of the notification"
},
"status_time": {
"type": "string",
"format": "date-time",
"title": "the status changed time of the notification"
},
"owner": {
"type": "string",
"title": "the owner of the notification"
},
"address_info": {
"type": "string",
"description": "the address to send the notification, json fmt, currently support 2 kinds types.\n1.key/value Type, key is the notification send Type,the value is the list of address, eg:{\"email\": [\"openpitrix@163.com\", \"openpitrix@163.com\"],\"websocket\": [\"system\", \"jo\"]}\n2.Array Type, eg:[\"adl-xxxx1\", \"adl-xxxx2\"], the item is the address list id which is already created in advance."
},
"available_start_time": {
"type": "string",
"title": "the available start time to receive notification"
},
"available_end_time": {
"type": "string",
"title": "the available end time to receive notification"
},
"extra": {
"type": "string",
"title": "extra info is only used for websocket notification,to show which websocket client could accept it.\neg:\"{\"ws_service\": \"ks\",\"ws_message_type\": \"event\"}\""
}
}
},
"pbRetryNotificationsRequest": {
"type": "object",
"properties": {
"notification_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "required, notification ids to retry"
}
}
},
"pbRetryNotificationsResponse": {
"type": "object",
"properties": {
"notification_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbNotification"
},
"title": "notifications retried"
}
}
},
"pbRetryTasksRequest": {
"type": "object",
"properties": {
"task_id": {
"type": "array",
"items": {
"type": "string"
},
"title": "required, task ids to retry"
}
}
},
"pbRetryTasksResponse": {
"type": "object",
"properties": {
"task_set": {
"type": "array",
"items": {
"$ref": "#/definitions/pbTask"
},
"title": "tasks retried"
}
}
},
"pbServiceConfig": {
"type": "object",
"properties": {
"email_service_config": {
"$ref": "#/definitions/pbEmailServiceConfig",
"title": "email service config information"
}
}
},
"pbSetServiceConfigResponse": {
"type": "object",
"properties": {
"is_succ": {
"type": "boolean",
"format": "boolean",
"title": "set service config successfully or not"
}
}
},
"pbStreamRespData": {
"type": "object",
"properties": {
"user_msg": {
"$ref": "#/definitions/pbUserMessage"
}
}
},
"pbTask": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"title": "task id"
},
"notification_id": {
"type": "string",
"title": "the notification id of the task, one notification may send out by serval tasks"
},
"error_code": {
"type": "integer",
"format": "int64",
"title": "error code, if task run failed will return a error code"
},
"status": {
"type": "string",
"title": "the task execution status, eg:[pending|sending|successful|failed]"
},
"create_time": {
"type": "string",
"format": "date-time",
"title": "create time of the task"
},
"status_time": {
"type": "string",
"format": "date-time",
"title": "the status changed time of the notification"
},
"directive": {
"type": "string",
"title": "the details of notification, json format,\neg:{\"Title\": \"Title_test.\", \"Address\": \"openpitrix@163.com\", \"Content\": \"{\\\"html\\\":\\\"test_content_html\\\", \\\"normal\\\":\\\"test_content_normal\\\"}\", \"NotifyType\": \"email\", \"ContentType\": \"other\", \"ExpiredDays\": 0, \"ShortContent\": \"ShortContent_test\", \"NotificationId\": \"nf-zZq6G4A7v9YK\", \"AvailableEndTime\": \"\", \"AvailableStartTime\": \"\"}"
}
}
},
"pbUserMessage": {
"type": "object",
"properties": {
"user_id": {
"type": "string"
},
"service": {
"type": "string"
},
"message_type": {
"type": "string"
},
"msg_detail": {
"$ref": "#/definitions/pbMessageDetail"
}
}
},
"pbValidateEmailServiceResponse": {
"type": "object",
"properties": {
"is_succ": {
"type": "boolean",
"format": "boolean",
"title": "validate service config ok or not"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string",
"description": "A URL/resource name whose content describes the type of the\nserialized protocol buffer message.\n\nFor URLs which use the scheme ` + "`" + `http` + "`" + `, ` + "`" + `https` + "`" + `, or no scheme, the\nfollowing restrictions and interpretations apply:\n\n* If no scheme is provided, ` + "`" + `https` + "`" + ` is assumed.\n* The last segment of the URL's path must represent the fully\n qualified name of the type (as in ` + "`" + `path/google.protobuf.Duration` + "`" + `).\n The name should be in a canonical form (e.g., leading \".\" is\n not accepted).\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nSchemes other than ` + "`" + `http` + "`" + `, ` + "`" + `https` + "`" + ` (or the empty scheme) might be\nused with implementation specific semantics."
},
"value": {
"type": "string",
"format": "byte",
"description": "Must be a valid serialized protocol buffer of the above specified type."
}
},
"description": "` + "`" + `Any` + "`" + ` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := &pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an ` + "`" + `Any` + "`" + ` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field ` + "`" + `@type` + "`" + ` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": <string>,\n \"lastName\": <string>\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n` + "`" + `value` + "`" + ` which holds the custom JSON in addition to the ` + "`" + `@type` + "`" + `\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
},
"runtimeStreamError": {
"type": "object",
"properties": {
"grpc_code": {
"type": "integer",
"format": "int32"
},
"http_code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"http_status": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"description": "The Authorization header must be set to Bearer followed by a space and a token. For example, 'Bearer vHUabiBEIKi8n1RdvWOjGFulGSM6zunb'.",
"name": "Authorization",
"in": "header"
}
},
"security": [
{
"BearerAuth": []
}
],
"x-stream-definitions": {
"pbStreamRespData": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/pbStreamRespData"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of pbStreamRespData"
}
}
}
`,
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.