({ id, type, text, now })
| 34 | } |
| 35 | |
| 36 | function inboundRow({ id, type, text, now }) { |
| 37 | return { |
| 38 | id, |
| 39 | channel: DEFAULT_CHANNEL, |
| 40 | direction: 'inbound', |
| 41 | type, |
| 42 | status: 'pending', |
| 43 | payload: { text }, |
| 44 | priority: 'normal', |
| 45 | ref_id: null, |
| 46 | created_at: now, |
| 47 | synced_at: null, |
| 48 | expires_at: null, |
| 49 | retry_count: 0, |
| 50 | next_retry_at: null, |
| 51 | error: null, |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | function inboundTextForLineBytes(maxBytes, { id, type, now }) { |
| 56 | const baseLine = JSON.stringify(inboundRow({ id, type, text: '', now })) + '\n'; |
no outgoing calls
no test coverage detected