Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var types = require('./types');
- var externalLines = {
- type: 'object',
- required: ['_id', 'name', 'isOnline', 'useForIncoming', 'useForOutgoing',
- 'driverRedirectionType', 'rules', 'phoneNumberAutoCorrection', 'incomingPhoneNumberAutoCorrection'],
- properties: {
- _id: types.ObjectId,
- name: {type: 'string'},
- overrideOnlineStatus: {type: 'boolean'}, // Если это поле имеется, то при проверки онлайна будет учитываться его значение, а не значение поля isOnline
- isOnline: {type: 'boolean'},
- useForIncoming: {type: 'boolean'},
- useForOutgoing: {type: 'boolean'},
- port: {type: 'string'}, // Если поля нет, то поправка на порт при наборе номера не используется
- comment: {type: 'string'},
- ivrId: types.ObjectId, // Если поля нет, то IVR для данной линии не используется
- driverRedirectionType: {type: 'string', enum: ['callback', 'direct']}, // Тип редиректа пассажира на водителя
- incomingCallType: {type: 'string', enum: ['callback', 'direct']}, // Поля нет, если линия не используется для входящих
- rules: {
- type: 'object',
- required: ['regexps']
- properties: {
- regexps: {
- type: 'array',
- minItems: 1,
- uniqueItems: true,
- items: {type: 'RegExp'}
- }
- }
- },
- phoneNumberAutoCorrection: { // Автокоррекция исходящего номера
- type: 'array',
- items: {
- type: 'object',
- required: ['condition', 'modifier']
- properties: {
- condition: {type: 'RegExp'}
- modifier: {type: 'string'}
- }
- }
- },
- incomingPhoneNumberAutoCorrection: { // Автокоррекция входящего номера
- type: 'array',
- items: {
- type: 'object',
- required: ['condition', 'modifier']
- properties: {
- condition: {type: 'RegExp'}
- modifier: {type: 'string'}
- }
- }
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement