From 4861582297afeaead693a0922508bd455fb505c5 Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Mon, 21 Jun 2021 09:27:39 +0800 Subject: [PATCH 1/2] Add Inbox_CallUser API function --- src/libs/API.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/libs/API.js b/src/libs/API.js index e3a7edd23895..c97e708f4e41 100644 --- a/src/libs/API.js +++ b/src/libs/API.js @@ -940,6 +940,21 @@ function Policy_Create(parameters) { return Network.post(commandName, parameters); } +/** + * @param {Object} parameters + * @param {String} parameters.taskID + * @param {String} parameters.policyID + * @param {String} parameters.firstName + * @param {String} parameters.lastName + * @param {String} parameters.phoneNumber + * @returns {Promise} + */ +function Inbox_CallUser(parameters) { + const commandName = 'Inbox_CallUser'; + requireParameters(['taskID', 'policyID', 'firstName', 'lastName', 'phoneNumber'], parameters, commandName); + return Network.post(commandName, parameters); +} + export { Authenticate, BankAccount_Create, @@ -956,6 +971,7 @@ export { GetPolicySummaryList, GetRequestCountryCode, Graphite_Timer, + Inbox_CallUser, Log, PayIOU, PayWithWallet, From 44e2b21b429e794c1cce8c9a60b0e768b9fcd68f Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Mon, 21 Jun 2021 09:30:04 +0800 Subject: [PATCH 2/2] Add requestConciergeDMCall action --- src/libs/actions/Inbox.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/libs/actions/Inbox.js diff --git a/src/libs/actions/Inbox.js b/src/libs/actions/Inbox.js new file mode 100644 index 000000000000..ad33fe8859a2 --- /dev/null +++ b/src/libs/actions/Inbox.js @@ -0,0 +1,14 @@ +import {Inbox_CallUser} from '../API'; + +function requestConciergeDMCall(policyID, firstName, lastName, phoneNumber) { + return Inbox_CallUser({ + policyID, + firstName, + lastName, + phoneNumber, + taskID: 'ExpensifyCashConciergeDM', + }); +} + +// eslint-disable-next-line import/prefer-default-export +export {requestConciergeDMCall};