quiq-chat
Advanced tools
Comparing version 1.18.2 to 1.18.100
@@ -274,3 +274,3 @@ 'use strict'; | ||
var version = "1.18.2"; | ||
var version = "1.18.100"; | ||
@@ -1058,3 +1058,4 @@ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
}).catch(function (err) { | ||
log$7.warn('Couldn\'t parse API response from ' + parsedUrl); | ||
Raven.captureException(err); | ||
log$7.info('Couldn\'t parse API response from ' + parsedUrl); | ||
return err; | ||
@@ -1091,6 +1092,2 @@ }); | ||
var getChatConfiguration = function getChatConfiguration() { | ||
return quiqFetch(getUrlForContactPoint() + '/configuration', undefined, { responseType: 'JSON' }); | ||
}; | ||
var addMessage = function addMessage(text) { | ||
@@ -1429,6 +1426,2 @@ return quiqFetch(getUrlForContactPoint() + '/send-message', { | ||
this.getChatConfiguration = function () { | ||
return getChatConfiguration(); | ||
}; | ||
this.joinChat = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() { | ||
@@ -1435,0 +1428,0 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) { |
{ | ||
"name": "quiq-chat", | ||
"version": "1.18.2", | ||
"version": "1.18.100", | ||
"description": | ||
@@ -5,0 +5,0 @@ "Library to help with network requests to create a webchat client for Quiq Messaging", |
@@ -12,3 +12,3 @@ // @flow | ||
import {setAccessToken, getAccessToken, setTrackingId, getTrackingId} from './storage'; | ||
import type {Conversation, ChatMetadata} from 'types'; | ||
import type {Conversation} from 'types'; | ||
import logger from './logging'; | ||
@@ -31,5 +31,2 @@ import Raven from 'raven-js'; | ||
export const getChatConfiguration = (): Promise<ChatMetadata> => | ||
quiqFetch(`${getUrlForContactPoint()}/configuration`, undefined, {responseType: 'JSON'}); | ||
export const addMessage = (text: string) => | ||
@@ -36,0 +33,0 @@ quiqFetch(`${getUrlForContactPoint()}/send-message`, { |
@@ -190,5 +190,2 @@ // @flow | ||
// This is specific to our chat client. Don't document it. | ||
getChatConfiguration = () => API.getChatConfiguration(); | ||
/** API wrappers: these return Promises around the API response * */ | ||
@@ -195,0 +192,0 @@ joinChat = async () => { |
@@ -9,2 +9,3 @@ // @flow | ||
import logger from './logging'; | ||
import Raven from 'raven-js'; | ||
@@ -76,3 +77,4 @@ const log = logger('QuiqFetch'); | ||
.catch(err => { | ||
log.warn(`Couldn't parse API response from ${parsedUrl}`); | ||
Raven.captureException(err); | ||
log.info(`Couldn't parse API response from ${parsedUrl}`); | ||
return err; | ||
@@ -79,0 +81,0 @@ }); |
@@ -179,16 +179,2 @@ // @flow | ||
export type ChatMetadata = { | ||
registrationForm?: { | ||
headerText: string, | ||
fields: Array<{ | ||
type: 'text' | 'number' | 'email' | 'tel' | 'textarea', | ||
label: string, | ||
id: string, | ||
required?: boolean, | ||
rows?: number, | ||
isInitialMessage?: boolean, | ||
}>, | ||
}, | ||
}; | ||
export type WebsocketCallbacks = { | ||
@@ -195,0 +181,0 @@ onConnectionLoss?: () => void, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1843943
138
11047