@wavv/dialer 3.1.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/events.d.ts +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +35 -39
- package/dist/options.d.ts +3 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,13 @@ For more information, see our [documentation](https://docs.wavv.com)
|
|
|
4
4
|
|
|
5
5
|
<br />
|
|
6
6
|
|
|
7
|
+
### Version 4.0.0
|
|
8
|
+
|
|
9
|
+
- `callPhone` now requires a `contact` object
|
|
10
|
+
- `startCampaign` and `callPhone` now support `mini` property
|
|
11
|
+
|
|
12
|
+
<br />
|
|
13
|
+
|
|
7
14
|
### Version 2.5.0
|
|
8
15
|
|
|
9
16
|
- Added `openSettings`
|
package/dist/events.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as constants from './constants';
|
|
2
|
-
type Outcome = typeof constants.OUTCOME_HUNG_UP | typeof constants.OUTCOME_USER_HUNG_UP | typeof constants.OUTCOME_NO_ANSWER | typeof constants.OUTCOME_BUSY | typeof constants.OUTCOME_DISCONNECTED | typeof constants.OUTCOME_CALLBACK | typeof constants.OUTCOME_VOICEMAIL | typeof constants.OUTCOME_NO_CALLBACK | typeof constants.OUTCOME_NO_VOICEMAIL | typeof constants.OUTCOME_UNKNOWN;
|
|
3
|
-
type DncType = typeof constants.DNC_TYPE_IVR | typeof constants.DNC_TYPE_SMS | typeof constants.DNC_TYPE_MANUAL;
|
|
2
|
+
declare type Outcome = typeof constants.OUTCOME_HUNG_UP | typeof constants.OUTCOME_USER_HUNG_UP | typeof constants.OUTCOME_NO_ANSWER | typeof constants.OUTCOME_BUSY | typeof constants.OUTCOME_DISCONNECTED | typeof constants.OUTCOME_CALLBACK | typeof constants.OUTCOME_VOICEMAIL | typeof constants.OUTCOME_NO_CALLBACK | typeof constants.OUTCOME_NO_VOICEMAIL | typeof constants.OUTCOME_UNKNOWN;
|
|
3
|
+
declare type DncType = typeof constants.DNC_TYPE_IVR | typeof constants.DNC_TYPE_SMS | typeof constants.DNC_TYPE_MANUAL;
|
|
4
4
|
interface Call {
|
|
5
5
|
number: string;
|
|
6
6
|
contactId: string;
|
|
@@ -51,8 +51,8 @@ export interface MiniDialerVisible {
|
|
|
51
51
|
export interface OverlayVisible {
|
|
52
52
|
visible: boolean;
|
|
53
53
|
}
|
|
54
|
-
type DispositionTypes = 'INTERESTED' | 'NOT_INTERESTED' | 'APPOINTMENT_SET' | 'GOOD_NUMBER' | 'NEEDS_CALLBACK' | 'NONE';
|
|
55
|
-
export type Disposition = {
|
|
54
|
+
declare type DispositionTypes = 'INTERESTED' | 'NOT_INTERESTED' | 'APPOINTMENT_SET' | 'GOOD_NUMBER' | 'NEEDS_CALLBACK' | 'NONE';
|
|
55
|
+
export declare type Disposition = {
|
|
56
56
|
disposition: DispositionTypes;
|
|
57
57
|
note?: string;
|
|
58
58
|
number: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const setTheme: (options: SetThemeOps) => Promise<void>;
|
|
|
8
8
|
export declare const addDncNumber: (options: AddDncNumberOps) => Promise<void>;
|
|
9
9
|
export declare const addPhone: (options: AddPhoneOps) => Promise<void>;
|
|
10
10
|
export declare const callPhone: (options: CallPhoneOps) => Promise<void>;
|
|
11
|
-
export declare const continueCampaign: (options?: ContinueCampaignOps) => Promise<void>;
|
|
11
|
+
export declare const continueCampaign: (options?: ContinueCampaignOps | undefined) => Promise<void>;
|
|
12
12
|
export declare const load: () => Promise<void>;
|
|
13
13
|
export declare const removeContact: (options: RemoveContactOps) => Promise<void>;
|
|
14
14
|
export declare const removeDncNumber: (options: RemoveDncNumberOps) => Promise<void>;
|
|
@@ -18,7 +18,7 @@ export declare const endCampaign: (options: EndCampaignOps) => Promise<void>;
|
|
|
18
18
|
export declare const purchaseDialer: () => Promise<void>;
|
|
19
19
|
export declare const recordCall: () => Promise<void>;
|
|
20
20
|
export declare const listVoicemails: () => Promise<Voicemail[]>;
|
|
21
|
-
export declare const openSettings: (options?: OpenSettingsOps) => Promise<void>;
|
|
21
|
+
export declare const openSettings: (options?: OpenSettingsOps | undefined) => Promise<void>;
|
|
22
22
|
export declare const dropVoicemail: (options: DropVoicemailOps) => Promise<void>;
|
|
23
23
|
export declare const addCallAnsweredListener: (callback: (event: CallAnswered) => void) => Listener;
|
|
24
24
|
export declare const addCallEndedListener: (callback: (event: CallEnded) => void) => Listener;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -17,71 +13,71 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
13
|
exports.addDispositionSetListener = exports.addUpsellClickListener = exports.addManageSubscriptionListener = exports.addClosedListener = exports.addOverlayVisibleListener = exports.addWaitingForContinueListener = exports.addMiniDialerVisibleListener = exports.addLinesChangedListener = exports.addDncChangedListener = exports.addDialerVisibleListener = exports.addDialerIdleListener = exports.addCampaignEndedListener = exports.addCallStartedListener = exports.addCallRecordedListener = exports.addCallEndedListener = exports.addCallAnsweredListener = exports.dropVoicemail = exports.openSettings = exports.listVoicemails = exports.recordCall = exports.purchaseDialer = exports.endCampaign = exports.startCampaign = exports.removePhone = exports.removeDncNumber = exports.removeContact = exports.load = exports.continueCampaign = exports.callPhone = exports.addPhone = exports.addDncNumber = exports.setTheme = exports.close = exports.init = void 0;
|
|
18
14
|
const utils_1 = require("./utils");
|
|
19
15
|
__exportStar(require("./constants"), exports);
|
|
20
|
-
const init = (options) =>
|
|
16
|
+
const init = (options) => utils_1.initialize(options);
|
|
21
17
|
exports.init = init;
|
|
22
|
-
const close = () =>
|
|
18
|
+
const close = () => utils_1.execute('CLOSE_DIALER');
|
|
23
19
|
exports.close = close;
|
|
24
|
-
const setTheme = (options) =>
|
|
20
|
+
const setTheme = (options) => utils_1.execute('SET_THEME', options);
|
|
25
21
|
exports.setTheme = setTheme;
|
|
26
|
-
const addDncNumber = (options) =>
|
|
22
|
+
const addDncNumber = (options) => utils_1.execute('ADD_DNC_NUMBER', options);
|
|
27
23
|
exports.addDncNumber = addDncNumber;
|
|
28
|
-
const addPhone = (options) =>
|
|
24
|
+
const addPhone = (options) => utils_1.execute('ADD_PHONE', options);
|
|
29
25
|
exports.addPhone = addPhone;
|
|
30
|
-
const callPhone = (options) =>
|
|
26
|
+
const callPhone = (options) => utils_1.execute('CALL_PHONE', options);
|
|
31
27
|
exports.callPhone = callPhone;
|
|
32
|
-
const continueCampaign = (options) =>
|
|
28
|
+
const continueCampaign = (options) => utils_1.execute('CONTINUE', options);
|
|
33
29
|
exports.continueCampaign = continueCampaign;
|
|
34
|
-
const load = () =>
|
|
30
|
+
const load = () => utils_1.execute('LOAD_DIALER');
|
|
35
31
|
exports.load = load;
|
|
36
|
-
const removeContact = (options) =>
|
|
32
|
+
const removeContact = (options) => utils_1.execute('REMOVE_CONTACT', options);
|
|
37
33
|
exports.removeContact = removeContact;
|
|
38
|
-
const removeDncNumber = (options) =>
|
|
34
|
+
const removeDncNumber = (options) => utils_1.execute('REMOVE_DNC_NUMBER', options);
|
|
39
35
|
exports.removeDncNumber = removeDncNumber;
|
|
40
|
-
const removePhone = (options) =>
|
|
36
|
+
const removePhone = (options) => utils_1.execute('REMOVE_PHONE', options);
|
|
41
37
|
exports.removePhone = removePhone;
|
|
42
|
-
const startCampaign = (options) =>
|
|
38
|
+
const startCampaign = (options) => utils_1.execute('START_CAMPAIGN', options);
|
|
43
39
|
exports.startCampaign = startCampaign;
|
|
44
|
-
const endCampaign = (options) =>
|
|
40
|
+
const endCampaign = (options) => utils_1.execute('END_CAMPAIGN', options);
|
|
45
41
|
exports.endCampaign = endCampaign;
|
|
46
|
-
const purchaseDialer = () =>
|
|
42
|
+
const purchaseDialer = () => utils_1.execute('PURCHASE_DIALER');
|
|
47
43
|
exports.purchaseDialer = purchaseDialer;
|
|
48
|
-
const recordCall = () =>
|
|
44
|
+
const recordCall = () => utils_1.execute('RECORD_CALL');
|
|
49
45
|
exports.recordCall = recordCall;
|
|
50
|
-
const listVoicemails = () =>
|
|
46
|
+
const listVoicemails = () => utils_1.execute('LIST_VOICEMAILS');
|
|
51
47
|
exports.listVoicemails = listVoicemails;
|
|
52
|
-
const openSettings = (options) =>
|
|
48
|
+
const openSettings = (options) => utils_1.execute('OPEN_SETTINGS', { type: 'DIALER', tab: options === null || options === void 0 ? void 0 : options.tab });
|
|
53
49
|
exports.openSettings = openSettings;
|
|
54
|
-
const dropVoicemail = (options) =>
|
|
50
|
+
const dropVoicemail = (options) => utils_1.execute('DROP_VOICEMAIL');
|
|
55
51
|
exports.dropVoicemail = dropVoicemail;
|
|
56
|
-
const addCallAnsweredListener = (callback) =>
|
|
52
|
+
const addCallAnsweredListener = (callback) => utils_1.listen('CALL_ANSWERED', callback);
|
|
57
53
|
exports.addCallAnsweredListener = addCallAnsweredListener;
|
|
58
|
-
const addCallEndedListener = (callback) =>
|
|
54
|
+
const addCallEndedListener = (callback) => utils_1.listen('CALL_ENDED', callback);
|
|
59
55
|
exports.addCallEndedListener = addCallEndedListener;
|
|
60
|
-
const addCallRecordedListener = (callback) =>
|
|
56
|
+
const addCallRecordedListener = (callback) => utils_1.listen('CALL_RECORDED', callback);
|
|
61
57
|
exports.addCallRecordedListener = addCallRecordedListener;
|
|
62
|
-
const addCallStartedListener = (callback) =>
|
|
58
|
+
const addCallStartedListener = (callback) => utils_1.listen('CALL_STARTED', callback);
|
|
63
59
|
exports.addCallStartedListener = addCallStartedListener;
|
|
64
|
-
const addCampaignEndedListener = (callback) =>
|
|
60
|
+
const addCampaignEndedListener = (callback) => utils_1.listen('CAMPAIGN_ENDED', callback);
|
|
65
61
|
exports.addCampaignEndedListener = addCampaignEndedListener;
|
|
66
|
-
const addDialerIdleListener = (callback) =>
|
|
62
|
+
const addDialerIdleListener = (callback) => utils_1.listen('DIALER_IDLE', callback);
|
|
67
63
|
exports.addDialerIdleListener = addDialerIdleListener;
|
|
68
|
-
const addDialerVisibleListener = (callback) =>
|
|
64
|
+
const addDialerVisibleListener = (callback) => utils_1.listen('DIALER_VISIBLE', callback);
|
|
69
65
|
exports.addDialerVisibleListener = addDialerVisibleListener;
|
|
70
|
-
const addDncChangedListener = (callback) =>
|
|
66
|
+
const addDncChangedListener = (callback) => utils_1.listen('DNC_CHANGED', callback);
|
|
71
67
|
exports.addDncChangedListener = addDncChangedListener;
|
|
72
|
-
const addLinesChangedListener = (callback) =>
|
|
68
|
+
const addLinesChangedListener = (callback) => utils_1.listen('LINES_CHANGED', callback);
|
|
73
69
|
exports.addLinesChangedListener = addLinesChangedListener;
|
|
74
|
-
const addMiniDialerVisibleListener = (callback) =>
|
|
70
|
+
const addMiniDialerVisibleListener = (callback) => utils_1.listen('DIALER_MINI_VISIBLE', callback);
|
|
75
71
|
exports.addMiniDialerVisibleListener = addMiniDialerVisibleListener;
|
|
76
|
-
const addWaitingForContinueListener = (callback) =>
|
|
72
|
+
const addWaitingForContinueListener = (callback) => utils_1.listen('WAITING_FOR_CONTINUE', callback);
|
|
77
73
|
exports.addWaitingForContinueListener = addWaitingForContinueListener;
|
|
78
|
-
const addOverlayVisibleListener = (callback) =>
|
|
74
|
+
const addOverlayVisibleListener = (callback) => utils_1.listen('OVERLAY_VISIBLE', callback);
|
|
79
75
|
exports.addOverlayVisibleListener = addOverlayVisibleListener;
|
|
80
|
-
const addClosedListener = (callback) =>
|
|
76
|
+
const addClosedListener = (callback) => utils_1.listen('CLOSED', callback);
|
|
81
77
|
exports.addClosedListener = addClosedListener;
|
|
82
|
-
const addManageSubscriptionListener = (callback) =>
|
|
78
|
+
const addManageSubscriptionListener = (callback) => utils_1.listen('MANAGE_SUBSCRIPTION', callback);
|
|
83
79
|
exports.addManageSubscriptionListener = addManageSubscriptionListener;
|
|
84
|
-
const addUpsellClickListener = (callback) =>
|
|
80
|
+
const addUpsellClickListener = (callback) => utils_1.listen('UPSELL_CLICK', callback);
|
|
85
81
|
exports.addUpsellClickListener = addUpsellClickListener;
|
|
86
|
-
const addDispositionSetListener = (callback) =>
|
|
82
|
+
const addDispositionSetListener = (callback) => utils_1.listen('DISPOSITION_SET', callback);
|
|
87
83
|
exports.addDispositionSetListener = addDispositionSetListener;
|
package/dist/options.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export interface AddPhoneOps {
|
|
|
9
9
|
}
|
|
10
10
|
export interface CallPhoneOps {
|
|
11
11
|
number: string;
|
|
12
|
-
|
|
12
|
+
contact: Contact;
|
|
13
|
+
mini?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface ContinueCampaignOps {
|
|
15
16
|
resume?: boolean;
|
|
@@ -28,6 +29,7 @@ export interface RemovePhoneOps {
|
|
|
28
29
|
}
|
|
29
30
|
export interface StartCampaignOps {
|
|
30
31
|
contacts: Contact[];
|
|
32
|
+
mini?: boolean;
|
|
31
33
|
}
|
|
32
34
|
export interface EndCampaignOps {
|
|
33
35
|
close?: boolean;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MODULE = "@wavv/dialer";
|
|
2
|
-
export declare const VERSION = "
|
|
2
|
+
export declare const VERSION = "4.0.0";
|
package/dist/version.js
CHANGED