@medipass/utils 11.84.6-test-remove-intercom.0 → 11.84.6

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/constants.d.ts CHANGED
@@ -257,7 +257,7 @@ export declare const MEDICARE_FORMS: {
257
257
  export declare const HICAPS_FORMS: {
258
258
  readonly CLAIMING_PROVIDER_APPLICATION: "HICAPS Claiming Application";
259
259
  };
260
- export declare const PMS: readonly ["Best Practice (Allied)", "Best Practice (Premier)", "Clinic to Cloud", "Cliniko", "Coreplus", "Coviu", "Dental4Windows", "Doctors on Demand", "Exact", "Front Desk", "Genie", "Gensolve", "Gentu", "Halaxy / HealthKit", "Iconpractice", "Kalysys", "Lysn", "Medical Director", "Medilink", "Medirecords", "MedTech", "My Appointments", "Myhealth1st", "Nookal", "Oasis", "Owner.health", "Optomate", "Powerdiary", "PPMP", "PracSuite", "Shexie", "Splose", "Sunix", "TM2", "VisitBase", "ZedMed", "Zurili", "Other"];
260
+ export declare const PMS: readonly ["Best Practice (Allied)", "Best Practice (Premier)", "Case Manager", "Clinic to Cloud", "Cliniko", "Coreplus", "Coviu", "Dental4Windows", "Doctors on Demand", "Exact", "Front Desk", "Genie", "Gensolve", "Gentu", "Halaxy / HealthKit", "Iconpractice", "Kalysys", "Lysn", "Medical Director", "Medilink", "Medirecords", "MedTech", "My Appointments", "Myhealth1st", "Nookal", "Oasis", "Owner.health", "Optomate", "Powerdiary", "PPMP", "PracSuite", "Shexie", "Splose", "Sunix", "TM2", "Vinci", "VisitBase", "ZedMed", "Zurili", "Other"];
261
261
  export declare const VERIFY_MEMBER_HEALTH_FUNDS_CODES: readonly ["BUP"];
262
262
  export declare const INVOICE_ORIGINATING_FLOW: {
263
263
  readonly ALLIED_PHI: "allied-phi";
package/constants.js CHANGED
@@ -314,7 +314,7 @@ var HICAPS_FORMS = {
314
314
 
315
315
  /* ====== START: PMS ======= */
316
316
 
317
- var PMS = ['Best Practice (Allied)', 'Best Practice (Premier)', 'Clinic to Cloud', 'Cliniko', 'Coreplus', 'Coviu', 'Dental4Windows', 'Doctors on Demand', 'Exact', 'Front Desk', 'Genie', 'Gensolve', 'Gentu', 'Halaxy / HealthKit', 'Iconpractice', 'Kalysys', 'Lysn', 'Medical Director', 'Medilink', 'Medirecords', 'MedTech', 'My Appointments', 'Myhealth1st', 'Nookal', 'Oasis', 'Owner.health', 'Optomate', 'Powerdiary', 'PPMP', 'PracSuite', 'Shexie', 'Splose', 'Sunix', 'TM2', 'VisitBase', 'ZedMed', 'Zurili', 'Other'];
317
+ var PMS = ['Best Practice (Allied)', 'Best Practice (Premier)', 'Case Manager', 'Clinic to Cloud', 'Cliniko', 'Coreplus', 'Coviu', 'Dental4Windows', 'Doctors on Demand', 'Exact', 'Front Desk', 'Genie', 'Gensolve', 'Gentu', 'Halaxy / HealthKit', 'Iconpractice', 'Kalysys', 'Lysn', 'Medical Director', 'Medilink', 'Medirecords', 'MedTech', 'My Appointments', 'Myhealth1st', 'Nookal', 'Oasis', 'Owner.health', 'Optomate', 'Powerdiary', 'PPMP', 'PracSuite', 'Shexie', 'Splose', 'Sunix', 'TM2', 'Vinci', 'VisitBase', 'ZedMed', 'Zurili', 'Other'];
318
318
  /* ====== END: PMS ======= */
319
319
 
320
320
  /* ====== START: VERIFY MEMBER HEALTH FUNDS ======= */
package/intercom.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- export declare const bootIntercom: (data: any) => Promise<void>;
2
- export declare const showNewMessage: (message?: string) => void;
3
- export declare const shutdownIntercom: () => void;
4
- export declare const trackEvent: (name: any, data: any) => void;
5
- export declare const trackCreateDVAInvoice: (data: any) => void;
6
- export declare const trackCreateHICAPSInvoice: (data: any) => void;
7
- export declare const trackCreateMedicareInvoice: (data: any) => void;
8
- export declare const trackCreatePatientFundedInvoice: (data: any) => void;
9
- export declare const trackCreateNDISInvoice: (data: any) => void;
10
- export declare const trackCreateOHCInvoice: (data: any) => void;
11
- export declare const trackCreateVirtualTerminalInvoice: (data: any) => void;
12
- export declare const trackCreateQuote: (data: any) => void;
13
- export declare const updateIntercom: (data: any) => void;
1
+ export declare const bootIntercom: (data: any) => Promise<any>;
2
+ export declare const showNewMessage: (message?: string) => any;
3
+ export declare const shutdownIntercom: () => any;
4
+ export declare const trackEvent: (name: any, data: any) => any;
5
+ export declare const trackCreateDVAInvoice: (data: any) => any;
6
+ export declare const trackCreateHICAPSInvoice: (data: any) => any;
7
+ export declare const trackCreateMedicareInvoice: (data: any) => any;
8
+ export declare const trackCreatePatientFundedInvoice: (data: any) => any;
9
+ export declare const trackCreateNDISInvoice: (data: any) => any;
10
+ export declare const trackCreateOHCInvoice: (data: any) => any;
11
+ export declare const trackCreateVirtualTerminalInvoice: (data: any) => any;
12
+ export declare const trackCreateQuote: (data: any) => any;
13
+ export declare const updateIntercom: (data: any) => any;
14
14
  declare const intercom: {};
15
15
  export default intercom;
package/intercom.js CHANGED
@@ -2,21 +2,37 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
6
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
6
7
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
8
+ var getEnv = require('./get-env.js');
9
+ require('lodash/get');
10
+ require('lodash/omitBy');
11
+ require('lodash/isEmpty');
7
12
 
8
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
14
 
15
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
10
16
  var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
11
17
  var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
12
18
 
13
- // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
19
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
+
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+
14
23
  var bootIntercom = /*#__PURE__*/function () {
15
24
  var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(data) {
16
25
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
17
26
  while (1) {
18
27
  switch (_context.prev = _context.next) {
19
28
  case 0:
29
+ return _context.abrupt("return", window.Intercom('boot', _objectSpread({}, data, {
30
+ app_id: getEnv["default"].INTERCOM_APP_ID,
31
+ // eslint-disable-line camelcase
32
+ user_hash: data.intercomHash
33
+ })));
34
+
35
+ case 1:
20
36
  case "end":
21
37
  return _context.stop();
22
38
  }
@@ -28,32 +44,58 @@ var bootIntercom = /*#__PURE__*/function () {
28
44
  return _ref.apply(this, arguments);
29
45
  };
30
46
  }();
31
- var showNewMessage = function showNewMessage(message) {}; // // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
32
- // window.Intercom('showNewMessage', typeof message === 'string' ? message : ''); // eslint-disable-line new-cap
47
+ var showNewMessage = function showNewMessage(message) {
48
+ return (// @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
49
+ window.Intercom('showNewMessage', typeof message === 'string' ? message : '')
50
+ );
51
+ }; // eslint-disable-line new-cap
52
+ // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
33
53
 
34
- var shutdownIntercom = function shutdownIntercom() {}; // eslint-disable-line new-cap
54
+ var shutdownIntercom = function shutdownIntercom() {
55
+ return window.Intercom('shutdown');
56
+ }; // eslint-disable-line new-cap
35
57
  // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
36
58
 
37
- var trackEvent = function trackEvent(name, data) {}; // eslint-disable-line new-cap
59
+ var trackEvent = function trackEvent(name, data) {
60
+ return window.Intercom('trackEvent', name, data);
61
+ }; // eslint-disable-line new-cap
38
62
  // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
39
63
 
40
- var trackCreateDVAInvoice = function trackCreateDVAInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
64
+ var trackCreateDVAInvoice = function trackCreateDVAInvoice(data) {
65
+ return trackEvent('created-dva-invoice', data);
66
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
41
67
 
42
- var trackCreateHICAPSInvoice = function trackCreateHICAPSInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
68
+ var trackCreateHICAPSInvoice = function trackCreateHICAPSInvoice(data) {
69
+ return trackEvent('created-hicaps-invoice', data);
70
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
43
71
 
44
- var trackCreateMedicareInvoice = function trackCreateMedicareInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
72
+ var trackCreateMedicareInvoice = function trackCreateMedicareInvoice(data) {
73
+ return trackEvent('created-medicare-invoice', data);
74
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
45
75
 
46
- var trackCreatePatientFundedInvoice = function trackCreatePatientFundedInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
76
+ var trackCreatePatientFundedInvoice = function trackCreatePatientFundedInvoice(data) {
77
+ return trackEvent('created-patient-funded-invoice', data);
78
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
47
79
 
48
- var trackCreateNDISInvoice = function trackCreateNDISInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
80
+ var trackCreateNDISInvoice = function trackCreateNDISInvoice(data) {
81
+ return trackEvent('created-ndis-invoice', data);
82
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
49
83
 
50
- var trackCreateOHCInvoice = function trackCreateOHCInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
84
+ var trackCreateOHCInvoice = function trackCreateOHCInvoice(data) {
85
+ return trackEvent('created-ohc-invoice', data);
86
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
51
87
 
52
- var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoice(data) {}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
88
+ var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoice(data) {
89
+ return trackEvent('created-virtual-terminal-invoice', data);
90
+ }; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
53
91
 
54
- var trackCreateQuote = function trackCreateQuote(data) {}; // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
92
+ var trackCreateQuote = function trackCreateQuote(data) {
93
+ return trackEvent('created-quote', data);
94
+ }; // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
55
95
 
56
- var updateIntercom = function updateIntercom(data) {}; // eslint-disable-line new-cap
96
+ var updateIntercom = function updateIntercom(data) {
97
+ return window.Intercom('update', data);
98
+ }; // eslint-disable-line new-cap
57
99
 
58
100
  var intercom = {};
59
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/utils",
3
- "version": "11.84.6-test-remove-intercom.0",
3
+ "version": "11.84.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -48,5 +48,5 @@
48
48
  "rimraf": "^2.6.2",
49
49
  "typescript": "4.8.4"
50
50
  },
51
- "gitHead": "eaf70ef81c621ed74132f8b22182e97d18559590"
51
+ "gitHead": "19dafc4a21d7441152997842d098808db8dcf024"
52
52
  }