recime-bot-runtime
Version:
This runtime is intended to run inside a micro-service container with platform specific integration and module interpreter.
310 lines (309 loc) • 12.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Config = /** @class */ (function () {
function Config() {
}
Config.schema = {
"version": "1.0.1",
"bot-framework": {
"type": "object",
"properties": {
"id": { "type": "string" },
"serviceUrl": { "type": "string" },
"channelId": {
"type": "string"
},
"from": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": {
"type": "string"
}
}
},
"conversation": {
"type": "object",
"properties": {
"id": { "type": "string" }
}
},
"recipient": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" }
}
}
},
"required": ["id", "from", "conversation", "recipient"]
},
"facebook": {
"type": "object",
"properties": {
"object": { "type": "string", "default": "page" },
"entry": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": { "type": "string" },
"time": { "type": "number" },
"messaging": {
"type": "array",
"items": [{
"type": "object",
"properties": {
"timestamp": { "type": "number" },
"sender": {
"type": "object",
"properties": {
"id": { "type": "string" },
}
},
"recipient": {
"type": "object",
"properties": {
"id": { "type": "string" },
}
}
}
}]
}
},
"required": ["id", "time", "messaging"]
}
]
}
},
"required": ["object", "entry"]
},
"slack": {
"type": "object",
"properties": {
"type": { "type": "string" },
"token": { "type": "string" },
"challenge": { "type": "string" }
},
"required": ["type", "token", "challenge"]
},
"slack-command": {
"type": "object",
"properties": {
"ssl_check": { "type": "string" },
"token": { "type": "string" },
},
"required": ["ssl_check", "token"]
},
"slack-event": {
"type": "object",
"properties": {
"token": { "type": "string" },
"team_id": { "type": "string" },
"api_app_id": { "type": "string" },
"event": {
"type": "object",
"properties": {
"type": { "type": "string" },
"user": { "type": "string" },
"event_ts": { "type": "string" }
}
},
"type": { "type": "string" },
"event_id": { "type": "string" },
"event_time": { "type": "number" }
},
"required": ["token", "team_id", "api_app_id", "type", "event", "event_id", "event_time"]
},
"sendbird": {
"type": "object",
"properties": {
"app_id": { "type": "string" },
"category": { "type": "string" },
"ts": { "type": "number" },
"sender": {
"type": "object",
"properties": {
"nickname": { "type": "string" },
"user_id": { "type": "string" },
"profile_url": { "type": "string" }
}
},
"bot": {
"type": "object",
"properties": {
"bot_token": { "type": "string" },
"bot_profile_url": { "type": "string" },
"bot_nickname": { "type": "string" },
"bot_userid": { "type": "string" }
}
},
"message": {
"type": "object",
"properties": {
"text": { "type": "string" }
},
"required": ["text"]
},
"channel": {
"type": "object",
"properties": {
"channel_type": { "type": "string" },
"channel_url": { "type": "string" },
"name": { "type": "string" },
"cover_url": { "type": "string" }
},
"required": ["channel_url"]
}
},
"required": ["app_id", "sender", "message", "channel"]
},
"telegram-callback": {
"type": "object",
"properties": {
"update_id": { "type": "integer" },
"callback_query": {
"type": "object",
"properties": {
"id": { "type": "string" },
"from": {
"type": "object",
"properties": {
"id": { "type": "number" },
"is_bot": { "type": "boolean" },
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"username": { "type": "string" },
"language_code": { "type": "string" }
}
},
"message": {
"type": "object",
"properties": {
"message_id": { "type": "number" },
"date": { "type": "number" },
"text": { "type": "string" }
},
"required": ["message_id"]
}
}
}
},
"required": ["update_id", "callback_query"]
},
"telegram": {
"type": "object",
"properties": {
"update_id": { "type": "integer" },
"message": {
"type": "object",
"properties": {
"message_id": { "type": "integer" },
"from": {
"type": "object",
"properties": {
"id": { "type": "number" },
"is_bot": { "type": "boolean" },
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"username": { "type": "string" },
"language_code": { "type": "string" }
}
},
"chat": {
"type": "object",
"properties": {
"id": { "type": "number" },
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"username": { "type": "string" },
"type": { "type": "string" }
},
"required": ["id"]
},
"date": { "type": "number" },
"text": { "type": "string" }
},
"required": ["message_id", "from", "chat"]
}
},
"required": ["update_id", "message"]
},
"twilio": {
"type": "object",
"properties": {
"Body": { "type": "string" },
"SmsMessageSid": { "type": "string" },
"MessageSid": { "type": "string" },
"AccountSid": { "type": "string" },
"From": { "type": "string" },
"SmsSid": { "type": "string" }
},
"required": ["Body", "SmsMessageSid", "MessageSid", "AccountSid", "From", "SmsSid"]
},
"wechat": {
"type": "object",
"properties": {
"ToUserName": { "type": "string" },
"FromUserName": { "type": "string" },
"CreateTime": { "type": "string" },
"MsgType": { "type": "string" },
"Content": { "type": "string" },
"MsgId": { "type": "string" }
},
"required": ["ToUserName", "FromUserName", "MsgType"]
},
"viber": {
"type": "object",
"properties": {
"event": { "type": "string" },
"timestamp": { "type": "number" },
"message_token": { "type": "number" },
"sender": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"avatar": { "type": "string" },
"language": { "type": "string" },
"country": { "type": "string" },
"api_version": { "type": "number" }
}
},
"message": {
"type": "object",
"properties": {
"text": { "type": "string" },
"type": { "type": "string" }
}
}
},
"required": ["event", "timestamp", "message_token"]
},
"kik": {
"type": "object",
"properties": {
"entry": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"chatId": { "type": "string" },
"id": { "type": "string" },
"from": { "type": "string" },
"type": { "type": "string" },
"body": { "type": "string" },
"timestamp": { "type": "number" },
"chatType": { "type": "string" }
}
}
]
}
}
}
};
return Config;
}());
exports.Config = Config;