gofelix 1.2.1 → 1.2.2
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/dist/config.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.js +1 -1
- package/dist/queries/addFriend.js +1 -1
- package/dist/queries/addPendingFeedBackForm.js +1 -1
- package/dist/queries/addUserExperience.js +1 -1
- package/dist/queries/addUserMails.js +1 -1
- package/dist/queries/generateDiscountTokenFromUserAmount.js +1 -1
- package/dist/queries/getAllQRCodeUrl.js +1 -1
- package/dist/queries/getBiStats.js +1 -1
- package/dist/queries/getUserAccessTokenFromActivationCode.js +1 -1
- package/dist/queries/getUserBulkData.js +1 -1
- package/dist/queries/getUserMails.js +1 -1
- package/dist/queries/getUserProfiles.js +1 -1
- package/dist/queries/logError.js +1 -1
- package/dist/queries/redeemDiscountCode.js +1 -1
- package/dist/queries/removeFriend.js +1 -1
- package/dist/queries/removePendingFeedbackLink.js +1 -1
- package/dist/queries/removeUserMail.js +1 -1
- package/dist/queries/subscribeToCompany.js +1 -1
- package/dist/queries/unSubscribeToCompany.js +1 -1
- package/dist/queries/updateUserProfile.js +1 -1
- package/dist/queries/updateUserSettings.js +1 -1
- package/dist/queries/userApiLogout.js +1 -1
- package/dist/services/BI/companyNewsStats.js +1 -1
- package/dist/services/BI/discountStats.js +1 -1
- package/dist/services/BI/feedbackStats.js +1 -1
- package/dist/services/BI/getAllCompanyStats.js +1 -1
- package/dist/services/BI/getCompanyOverallStats.js +1 -1
- package/dist/services/BI/userExperienceStats.js +1 -1
- package/dist/services/OAuth/callback.js +1 -1
- package/dist/services/OAuth/index.js +1 -1
- package/dist/services/OAuth/logout.js +1 -1
- package/dist/services/Online/qrCode.js +1 -1
- package/dist/services/User/discountToken.js +1 -1
- package/dist/services/User/feedbackService.js +1 -1
- package/dist/services/User/friendService.js +1 -1
- package/dist/services/User/mailService.js +1 -1
- package/dist/services/User/subscribe.js +1 -1
- package/dist/services/User/userExperiences.js +1 -1
- package/dist/services/User/userProfile.js +1 -1
- package/dist/types/UserExperience.js +1 -1
- package/dist/types/commonTypes.js +1 -1
- package/dist/types/companyNewsTypes.js +1 -1
- package/dist/types/discountTypes.js +1 -1
- package/dist/types/feedbackTypes.js +1 -1
- package/dist/types/friendTypes.js +1 -1
- package/dist/types/mailTypes.js +1 -1
- package/dist/types/oAuthTypes.js +1 -1
- package/dist/types/qrCodes.js +1 -1
- package/dist/types/services/BI/companyNewsStats.d.ts +2 -2
- package/dist/types/services/BI/discountStats.d.ts +2 -2
- package/dist/types/services/BI/feedbackStats.d.ts +2 -2
- package/dist/types/services/BI/getAllCompanyStats.d.ts +2 -2
- package/dist/types/services/BI/getCompanyOverallStats.d.ts +2 -2
- package/dist/types/services/BI/userExperienceStats.d.ts +2 -2
- package/dist/types/subscribeTypes.js +1 -1
- package/dist/types/userTypes.js +1 -1
- package/dist/types/utilities/fetch.d.ts +1 -1
- package/dist/utilities/fetch.js +1 -1
- package/dist/utilities/mapper.js +1 -1
- package/package.json +1 -1
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,s,o,t){return new(o||(o=Promise))(function(r,i){function n(e){try{c(t.next(e))}catch(e){i(e)}}function a(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var s;e.done?r(e.value):(s=e.value,s instanceof o?s:new o(function(e){e(s)})).then(n,a)}c((t=t.apply(e,s||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.oAuth=void 0;const callback_1=require("./callback"),logout_1=require("./logout");exports.oAuth={callbackAsync:e=>(0,callback_1.oauthCallbackAsync)(Object.assign(Object.assign({},e),{userConfig:e.userConfig})),userApiLogoutAsync:e=>(0,logout_1.userApiLogoutAsync)({accessToken:e.accessToken,userConfig:e.userConfig}),logoutExpressCallback:e=>(s,o)=>__awaiter(void 0,void 0,void 0,function*(){try{const t=s.cookies.go_felix_user_api_token;if(!t)return o.status(400).json({isSuccess:!1,errorMessage:"No active GoFelix session found"});const r=yield exports.oAuth.userApiLogoutAsync({accessToken:t,userConfig:e});return r.hasLoggedOut?(o.clearCookie("go_felix_user_api_token",{httpOnly:!0,secure:!0,sameSite:"none",path:"/"}),o.json({isSuccess:!0,hasLoggedOut:!0,errorMessage:"",errorCode:""})):o.status(400).json(r)}catch(e){return o.status(500).json({isSuccess:!1,errorMessage:"Logout failed"})}}),expressCallback:e=>(s,o)=>__awaiter(void 0,void 0,void 0,function*(){try{const{activationCode:t,codeVerifier:r}=s.body.variables,i=yield exports.oAuth.callbackAsync({activationCode:t,codeVerifier:r,userConfig:e});return i.isSuccess?(o.cookie("go_felix_user_api_token",i.sessionGuid,{httpOnly:!0,secure:!0,sameSite:"none",path:"/",maxAge:108e5}),o.json({isSuccess:!0,errorMessage:"",errorCode:"",loggedIn:!0,sessionGuid:i.sessionGuid})):o.status(400).json(i)}catch(e){return o.status(500).json({isSuccess:!1,errorMessage:"OAuth callback failed"})}})},exports.default=exports.oAuth;
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";var
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,r){return new(o||(o=Promise))(function(s,i){function a(e){try{n(r.next(e))}catch(e){i(e)}}function u(e){try{n(r.throw(e))}catch(e){i(e)}}function n(e){var t;e.done?s(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,u)}n((r=r.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.userApiLogoutAsync=void 0;const logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),userApiLogout_1=__importDefault(require("../../queries/userApiLogout")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),userApiLogoutAsync=e=>__awaiter(void 0,void 0,void 0,function*(){var t;const o={isSuccess:!1,errorMessage:"",errorCode:"",hasLoggedOut:!1};let r={data:{userApiLogout:null}};const{accessToken:s,userConfig:i}=e;try{return s&&i?(i.activateMockCalls?(null===(t=i.mockCalls)||void 0===t?void 0:t.userApiLogoutAsync)?r=yield i.mockCalls.userApiLogoutAsync():o.errorMessage="Request Failed, you set activateMockCalls to true, but you have not added a mock function for userApiLogoutAsync":r=yield(0,fetch_1.default)(userApiLogout_1.default,{},constants_1.default.graphQlCommandNames.userApiLogout,{origin:i.origin,token:e.accessToken,accountEmail:i.accountEmail},"go_felix_user_api"),Object.keys(r.data.userApiLogout).forEach(e=>{o[e]=r.data.userApiLogout[e]}),o.isSuccess||(o.errorMessage=o.errorMessage||"Unable to retrieve access token"),o):(o.errorMessage="Request Failed, please make sure activationCode, codeVerifier and userConfig are supplied",o)}catch(t){return yield(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:(null==i?void 0:i.accountEmail)||"",app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(t),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: userApiLogoutAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:(null==i?void 0:i.accountEmail)||"",origin:(null==i?void 0:i.origin)||"",token:""},"go_felix_user_api"),o.errorMessage="Unable to process this request at this time, please try again later",o}});exports.userApiLogoutAsync=userApiLogoutAsync,exports.default={userApiLogoutAsync:exports.userApiLogoutAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))(function(a,s){function i(e){try{l(t.next(e))}catch(e){s(e)}}function n(e){try{l(t.throw(e))}catch(e){s(e)}}function l(e){var o;e.done?a(e.value):(o=e.value,o instanceof r?o:new r(function(e){e(o)})).then(i,n)}l((t=t.apply(e,o||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.redeemDiscountCodeAsync=exports.getAllQRCodeUrlsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),getAllQRCodeUrl_1=__importDefault(require("../../queries/getAllQRCodeUrl")),redeemDiscountCode_1=__importDefault(require("../../queries/redeemDiscountCode")),config_1=__importDefault(require("../../config")),getAllQRCodeUrlsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let o={isSuccess:!1,errorMessage:"",errorCode:"",qrUrls:[]},r={};const{onlineConfig:t,hashVariables:a}=e;try{return t.apiKey?(t.activateMockCalls?t.mockCalls.getAllQRCodeUrlsAsync?o=t.mockCalls.getAllQRCodeUrlsAsync():o.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getAllQRCodeUrls":r=yield(0,fetch_1.default)(getAllQRCodeUrl_1.default,{hashVariables:a},constants_1.default.graphQlCommandNames.getAllQRCodeUrls,{accountEmail:e.accountEmail,origin:t.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),Object.keys(r).forEach(e=>{(0,mapper_1.MapToResponseObj)(o,r,e)}),Promise.resolve(o)):(o.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(o))}catch(r){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(r),argumentsPassedIn:JSON.stringify(t),codeLocation:"getAllQRCodeUrlsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,apiKey:e.apiKey,origin:t.origin,appName:"GoFelixOnlineLibrary"},"GoFelixOnlineLibrary"),o.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(o)}});exports.getAllQRCodeUrlsAsync=getAllQRCodeUrlsAsync;const redeemDiscountCodeAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let o={isSuccess:!1,errorMessage:"",errorCode:"",discountTokenHasBeenRedeemed:!1},r={};const{onlineConfig:t,hashVariables:a}=e;try{return t.apiKey?(t.activateMockCalls?t.mockCalls.redeemDiscountCodeAsync?o=t.mockCalls.redeemDiscountCodeAsync():o.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for redeemDiscountCode":r=yield(0,fetch_1.default)(redeemDiscountCode_1.default,{discountToken:"",discountCode:"",customerUserName:"",discountInputType:"TOKEN",hashVariables:a,discountedAmount:0},constants_1.default.graphQlCommandNames.redeemDiscountCode,{accountEmail:e.accountEmail,origin:t.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),Object.keys(r).forEach(e=>{(0,mapper_1.MapToResponseObj)(o,r,e)}),Promise.resolve(o)):(o.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(o))}catch(r){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,env:JSON.stringify(config_1.default),error:JSON.stringify(r),argumentsPassedIn:JSON.stringify(t),codeLocation:"redeemDiscountCodeAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:t.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),o.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(o)}});exports.redeemDiscountCodeAsync=redeemDiscountCodeAsync,exports.default={getAllQRCodeUrlsAsync:exports.getAllQRCodeUrlsAsync,redeemDiscountCodeAsync:exports.redeemDiscountCodeAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,r){return new(o||(o=Promise))(function(n,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function i(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,i)}u((r=r.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateDiscountTokenFromUserAmountAsync=void 0;const mapper_1=require("../..//utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),generateDiscountTokenFromUserAmount_1=__importDefault(require("../../queries/generateDiscountTokenFromUserAmount")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),generateDiscountTokenFromUserAmountAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",discountGenerated:!1,discount:null};let o={};const{adjustedAmount:r,companyName:n,userConfig:s,branchName:a}=e;try{return r&&s&&n?(s.activateMockCalls?s.mockCalls.generateDiscountTokenFromUserAmountAsync?o=s.mockCalls.generateDiscountTokenFromUserAmountAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for generateDiscountTokenFromUserAmount":o=yield(0,fetch_1.default)(generateDiscountTokenFromUserAmount_1.default,{adjustedAmount:r,companyName:n,branchName:a},constants_1.default.graphQlCommandNames.generateDiscountTokenFromUserAmount,{accountEmail:s.accountEmail,token:e.accessToken,origin:s.origin},"go_felix_user_api"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,o,e)}),Promise.resolve(t)):(t.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(t))}catch(o){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:s.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(o),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: generateDiscountTokenFromUserAmountAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:s.accountEmail,origin:s.origin,token:e.accessToken},"go_felix_user_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.generateDiscountTokenFromUserAmountAsync=generateDiscountTokenFromUserAmountAsync,exports.default={generateDiscountTokenFromUserAmountAsync:exports.generateDiscountTokenFromUserAmountAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,a,n,o){return new(n||(n=Promise))(function(r,t){function i(e){try{c(o.next(e))}catch(e){t(e)}}function s(e){try{c(o.throw(e))}catch(e){t(e)}}function c(e){var a;e.done?r(e.value):(a=e.value,a instanceof n?a:new n(function(e){e(a)})).then(i,s)}c((o=o.apply(e,a||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addPendingFeedBackFormAsync=exports.removePendingFeedbackLinkAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),removePendingFeedbackLink_1=__importDefault(require("../../queries/removePendingFeedbackLink")),addPendingFeedBackForm_1=__importDefault(require("../../queries/addPendingFeedBackForm")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),removePendingFeedbackLinkAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const a={isSuccess:!1,errorMessage:"",errorCode:"",pendingFeedbackRemoved:!1};let n={};const{advertId:o,userConfig:r,accessToken:t}=e;try{return o&&r?(r.activateMockCalls?r.mockCalls.removePendingFeedbackLinkAsync?n=r.mockCalls.removePendingFeedbackLinkAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for removePendingFeedbackLink":n=yield(0,fetch_1.default)(removePendingFeedbackLink_1.default,{advertId:o},constants_1.default.graphQlCommandNames.removePendingFeedbackLink,{accountEmail:r.accountEmail,origin:r.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(n).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,n,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(a))}catch(n){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:r.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(n),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: removePendingFeedbackLinkAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:r.accountEmail,origin:r.origin,token:e.accessToken},"go_felix_user_api"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.removePendingFeedbackLinkAsync=removePendingFeedbackLinkAsync;const addPendingFeedBackFormAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const a={isSuccess:!1,errorMessage:"",errorCode:"",pendingFeedbackAdded:!1,pendingFeedbackLink:null};let n={};const{advertId:o,companyName:r,userConfig:t,accessToken:i}=e;try{return r&&t&&o?(t.activateMockCalls?t.mockCalls.addPendingFeedBackFormAsync?n=t.mockCalls.addPendingFeedBackFormAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for addPendingFeedBackForm":n=yield(0,fetch_1.default)(addPendingFeedBackForm_1.default,{advertId:o,companyName:r},constants_1.default.graphQlCommandNames.addPendingFeedBackForm,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(n).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,n,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(a))}catch(n){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(n),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: addPendingFeedBackFormAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.addPendingFeedBackFormAsync=addPendingFeedBackFormAsync,exports.default={removePendingFeedbackLinkAsync:exports.removePendingFeedbackLinkAsync,addPendingFeedBackFormAsync:exports.addPendingFeedBackFormAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,r,a,o){return new(a||(a=Promise))(function(t,s){function n(e){try{c(o.next(e))}catch(e){s(e)}}function i(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof a?r:new a(function(e){e(r)})).then(n,i)}c((o=o.apply(e,r||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.removeFriendAsync=exports.addFriendAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),addFriend_1=__importDefault(require("../../queries/addFriend")),removeFriend_1=__importDefault(require("../../queries/removeFriend")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),addFriendAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const r={isSuccess:!1,errorMessage:"",errorCode:"",isAddFriendSuccess:!1,friendProfile:null};let a={};const{friendUserName:o,userConfig:t,accessToken:s}=e;try{return t&&o?(t.activateMockCalls?t.mockCalls.addFriendAsync?a=t.mockCalls.addFriendAsync():r.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for addFriend":a=yield(0,fetch_1.default)(addFriend_1.default,{friendUserName:o},constants_1.default.graphQlCommandNames.addFriend,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(r,a,e)}),Promise.resolve(r)):(r.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(r))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: addFriendAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,token:s},"go_felix_user_api"),r.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(r)}});exports.addFriendAsync=addFriendAsync;const removeFriendAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const r={isSuccess:!1,errorMessage:"",errorCode:"",isRemoveFriendSuccess:!1};let a={};const{friendUserName:o,userConfig:t,accessToken:s}=e;try{return o&&t?(t.activateMockCalls?t.mockCalls.removeFriendAsync?a=t.mockCalls.removeFriendAsync():r.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for removeFriend":a=yield(0,fetch_1.default)(removeFriend_1.default,{friendUserName:o},constants_1.default.graphQlCommandNames.removeFriend,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(r,a,e)}),Promise.resolve(r)):(r.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(r))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: removeFriendAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,token:s},"go_felix_user_api"),r.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(r)}});exports.removeFriendAsync=removeFriendAsync,exports.default={addFriendAsync:exports.addFriendAsync,removeFriendAsync:exports.removeFriendAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,s,a,r){return new(a||(a=Promise))(function(t,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function n(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var s;e.done?t(e.value):(s=e.value,s instanceof a?s:new a(function(e){e(s)})).then(i,n)}l((r=r.apply(e,s||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addUserMailsAsync=exports.getUserMailsAsync=exports.removeUserMailAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),getUserMails_1=__importDefault(require("../../queries/getUserMails")),removeUserMail_1=__importDefault(require("../../queries/removeUserMail")),addUserMails_1=__importDefault(require("../../queries/addUserMails")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),removeUserMailAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const s={isSuccess:!1,errorMessage:"",errorCode:"",mailRemoved:!1};let a={};const{mailId:r,userConfig:t,accessToken:o}=e;try{return r&&t?(t.activateMockCalls?t.mockCalls.removeUserMailAsync?a=t.mockCalls.removeUserMailAsync():s.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for removeUserMail":a=yield(0,fetch_1.default)(removeUserMail_1.default,{mailId:r},constants_1.default.graphQlCommandNames.removeUserMail,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(s,a,e)}),Promise.resolve(s)):(s.errorMessage="Request Failed, Please make sure you have enter all the method arguments and accessToken",Promise.resolve(s))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: removeUserMailAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,token:o},"go_felix_user_api"),s.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(s)}});exports.removeUserMailAsync=removeUserMailAsync;const getUserMailsAsync=(e,s)=>__awaiter(void 0,void 0,void 0,function*(){const a={isSuccess:!1,errorMessage:"",errorCode:"",mails:[]};let r={};try{return e?(e.activateMockCalls?e.mockCalls.getUserMailsAsync?r=e.mockCalls.getUserMailsAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getUserMails":r=yield(0,fetch_1.default)(getUserMails_1.default,{},constants_1.default.graphQlCommandNames.getUserMails,{accountEmail:e.accountEmail,origin:e.origin,token:s},"go_felix_user_api"),Object.keys(r).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,r,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have entered the accessToken",Promise.resolve(a))}catch(r){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:e.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(r),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: getUserMailsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,token:s},"go_felix_user_api"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.getUserMailsAsync=getUserMailsAsync;const addUserMailsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const s={isSuccess:!1,errorMessage:"",errorCode:"",hasUpdated:!1};let a={};const{mails:r,userConfig:t,accessToken:o}=e;try{return t&&r?(t.activateMockCalls?t.mockCalls.addUserMailsAsync?a=t.mockCalls.addUserMailsAsync():s.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for addUserMails":a=yield(0,fetch_1.default)(addUserMails_1.default,{mails:r},constants_1.default.graphQlCommandNames.addUserMails,{accountEmail:t.accountEmail,origin:t.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(s,a,e)}),Promise.resolve(s)):(s.errorMessage="Request Failed, Please make sure you have entered the accessToken",Promise.resolve(s))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:t.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: addUserMailsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,token:o},"go_felix_user_api"),s.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(s)}});exports.addUserMailsAsync=addUserMailsAsync,exports.default={removeUserMailAsync:exports.removeUserMailAsync,getUserMailsAsync:exports.getUserMailsAsync,addUserMailsAsync:exports.addUserMailsAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,o,a,s){return new(a||(a=Promise))(function(r,n){function t(e){try{c(s.next(e))}catch(e){n(e)}}function i(e){try{c(s.throw(e))}catch(e){n(e)}}function c(e){var o;e.done?r(e.value):(o=e.value,o instanceof a?o:new a(function(e){e(o)})).then(t,i)}c((s=s.apply(e,o||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.unSubscribeToCompanyAsync=exports.subscribeToCompanyAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),subscribeToCompany_1=__importDefault(require("../../queries/subscribeToCompany")),unSubscribeToCompany_1=__importDefault(require("../../queries/unSubscribeToCompany")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),subscribeToCompanyAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const o={isSuccess:!1,errorMessage:"",errorCode:"",isSubscribe:!1};let a={};const{companyName:s,userConfig:r,accessToken:n,branchName:t}=e;try{return e&&s?(r.activateMockCalls?r.mockCalls.subscribeToCompanyAsync?a=r.mockCalls.subscribeToCompanyAsync():o.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for subscribeToCompany":a=yield(0,fetch_1.default)(subscribeToCompany_1.default,{companyName:s,branchName:t,expoToken:""},constants_1.default.graphQlCommandNames.subscribeToCompany,{accountEmail:r.accountEmail,origin:r.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(o,a,e)}),Promise.resolve(o)):(o.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(o))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:r.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: subscribeToCompanyAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:r.accountEmail,origin:r.origin,token:n},"go_felix_user_api"),o.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(o)}});exports.subscribeToCompanyAsync=subscribeToCompanyAsync;const unSubscribeToCompanyAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const o={isSuccess:!1,errorMessage:"",errorCode:"",isUnSubscribe:!1};let a={};const{companyName:s,userConfig:r,accessToken:n,branchName:t}=e;try{return e&&s?(r.activateMockCalls?r.mockCalls.unSubscribeToCompanyAsync?a=r.mockCalls.unSubscribeToCompanyAsync():o.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for unSubscribeToCompany":a=yield(0,fetch_1.default)(unSubscribeToCompany_1.default,{companyName:s,branchName:t,expoToken:""},constants_1.default.graphQlCommandNames.unSubscribeToCompany,{accountEmail:r.accountEmail,origin:r.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(o,a,e)}),Promise.resolve(o)):(o.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(o))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:r.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: unSubscribeToCompanyAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:r.accountEmail,origin:r.origin,token:n},"go_felix_user_api"),o.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(o)}});exports.unSubscribeToCompanyAsync=unSubscribeToCompanyAsync,exports.default={subscribeToCompanyAsync:exports.subscribeToCompanyAsync,unSubscribeToCompanyAsync:exports.unSubscribeToCompanyAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,r,a,t){return new(a||(a=Promise))(function(s,n){function o(e){try{c(t.next(e))}catch(e){n(e)}}function i(e){try{c(t.throw(e))}catch(e){n(e)}}function c(e){var r;e.done?s(e.value):(r=e.value,r instanceof a?r:new a(function(e){e(r)})).then(o,i)}c((t=t.apply(e,r||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addUserExperienceAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),addUserExperience_1=__importDefault(require("../../queries/addUserExperience")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),addUserExperienceAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const r={isSuccess:!1,errorMessage:"",errorCode:"",isUserExperienceAdded:!1};let a={};const{experience:t,experienceCategory:s,rate:n,updateIntervalHours:o,userConfig:i,accessToken:c,companyName:d,advertId:u,branchName:l}=e;try{return e&&i?(i.activateMockCalls?i.mockCalls.addUserExperienceAsync?a=i.mockCalls.addUserExperienceAsync():r.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for addUserExperience":a=yield(0,fetch_1.default)(addUserExperience_1.default,{experience:t,experienceCate:s,rate:n,updateIntervalHours:o,companyName:d,advertId:u,branchName:l},constants_1.default.graphQlCommandNames.addUserExperience,{accountEmail:i.accountEmail,origin:i.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(a).forEach(e=>{(0,mapper_1.MapToResponseObj)(r,a,e)}),Promise.resolve(r)):(r.errorMessage="Request Failed, Please make sure you have entered all the method arguments and accessToken",Promise.resolve(r))}catch(a){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:i.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: addUserExperienceAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:i.accountEmail,origin:i.origin,token:c},"go_felix_user_api"),r.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(r)}});exports.addUserExperienceAsync=addUserExperienceAsync,exports.default={addUserExperienceAsync:exports.addUserExperienceAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,s,t,r){return new(t||(t=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function n(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var s;e.done?a(e.value):(s=e.value,s instanceof t?s:new t(function(e){e(s)})).then(i,n)}l((r=r.apply(e,s||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.updateUserSettingsAsync=exports.updateUserProfileAsync=exports.getUserBulkDataAsync=exports.getUserProfilesAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),getUserProfiles_1=__importDefault(require("../../queries/getUserProfiles")),updateUserProfile_1=__importDefault(require("../../queries/updateUserProfile")),getUserBulkData_1=__importDefault(require("../../queries/getUserBulkData")),updateUserSettings_1=__importDefault(require("../../queries/updateUserSettings")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getUserProfilesAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const s={isSuccess:!1,errorMessage:"",errorCode:"",hasUserProfiles:!1,userProfiles:[]};let t={};const{index:r=0,value:a,accessToken:o,userConfig:i}=e;try{return a&&o?(i.activateMockCalls?i.mockCalls.getUserProfilesAsync?t=i.mockCalls.getUserProfilesAsync():s.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getUserProfiles":t=yield(0,fetch_1.default)(getUserProfiles_1.default,{index:r,value:a},constants_1.default.graphQlCommandNames.getUserProfiles,{accountEmail:i.accountEmail,origin:i.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(t).forEach(e=>{(0,mapper_1.MapToResponseObj)(s,t,e)}),Promise.resolve(s)):(s.errorMessage="Request Failed, Please make sure you have enter all the method arguments and accessToken",Promise.resolve(s))}catch(t){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:i.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(t),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: getUserProfilesAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:i.accountEmail,origin:i.origin,token:o},"go_felix_user_api"),s.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(s)}});exports.getUserProfilesAsync=getUserProfilesAsync;const getUserBulkDataAsync=(e,s)=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",hasUserData:!1,userMailDiscountAdverts:[],userMailFeedbacksAdverts:[],userMailCompanyNewsAdverts:[],userExperiences:[],userDiscountTokens:null,userDiscountAmountList:[],pendingFeedbackLinks:[],mails:[],companySubscribeList:[],userProfile:null,friends:[],userSettings:null};let r={};try{return e?(e.activateMockCalls?e.mockCalls.getUserBulkDataAsync?r=e.mockCalls.getUserBulkDataAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getUserBulkData":r=yield(0,fetch_1.default)(getUserBulkData_1.default,{},constants_1.default.graphQlCommandNames.getUserBulkData,{accountEmail:e.accountEmail,origin:e.origin,token:s},"go_felix_user_api"),Object.keys(r).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,r,e)}),Promise.resolve(t)):(t.errorMessage="Request Failed, Please make sure you have enter all the method arguments and accessToken",Promise.resolve(t))}catch(r){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:e.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(r),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: getUserBulkDataAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,token:s},"go_felix_user_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.getUserBulkDataAsync=getUserBulkDataAsync;const updateUserProfileAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const s={isSuccess:!1,errorMessage:"",errorCode:"",isUserProfileUpdated:!1};let t={};const{userProfile:r,userConfig:a,accessToken:o}=e;try{return r&&a?(a.activateMockCalls?a.mockCalls.updateUserProfileAsync?t=a.mockCalls.updateUserProfileAsync():s.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for updateUserProfile":t=yield(0,fetch_1.default)(updateUserProfile_1.default,{userProfileInput:r},constants_1.default.graphQlCommandNames.updateUserProfile,{accountEmail:a.accountEmail,origin:a.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(t).forEach(e=>{(0,mapper_1.MapToResponseObj)(s,t,e)}),Promise.resolve(s)):(s.errorMessage="Request Failed, Please make sure you have enter all the method arguments and accessToken",Promise.resolve(s))}catch(t){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:a.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(t),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: updateUserProfileAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:a.accountEmail,origin:a.origin,token:o},"go_felix_user_api"),s.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(s)}});exports.updateUserProfileAsync=updateUserProfileAsync;const updateUserSettingsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const s={isSuccess:!1,errorMessage:"",errorCode:"",hasUpdatedSuccess:!1};let t={};const{settings:r,userConfig:a,accessToken:o}=e;try{return r&&a?(a.activateMockCalls?a.mockCalls.updateUserSettingsAsync?t=a.mockCalls.updateUserSettingsAsync():s.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for updateUserSettings":t=yield(0,fetch_1.default)(updateUserSettings_1.default,{settings:r},constants_1.default.graphQlCommandNames.updateUserSettings,{accountEmail:a.accountEmail,origin:a.origin,token:e.accessToken},"go_felix_user_api"),Object.keys(t).forEach(e=>{(0,mapper_1.MapToResponseObj)(s,t,e)}),Promise.resolve(s)):(s.errorMessage="Request Failed, Please make sure you have enter all the method arguments and accessToken",Promise.resolve(s))}catch(t){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:a.accountEmail,app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(t),args:JSON.stringify(e),codeLocation:"gofelix, service: updateUserSettingsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:a.accountEmail,origin:a.origin,token:o},"go_felix_user_api"),s.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(s)}});exports.updateUserSettingsAsync=updateUserSettingsAsync,exports.default={getUserProfilesAsync:exports.getUserProfilesAsync,getUserBulkDataAsync:exports.getUserBulkDataAsync,updateUserProfileAsync:exports.updateUserProfileAsync,updateUserSettingsAsync:exports.updateUserSettingsAsync};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/types/mailTypes.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/types/oAuthTypes.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/types/qrCodes.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetCompanyNewsStatsResponse } from
|
|
2
|
-
import { BiConfig } from
|
|
1
|
+
import { GetCompanyNewsStatsResponse } from "../../types/companyNewsTypes";
|
|
2
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
3
3
|
export declare const getCompanyNewsStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyNewsStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getCompanyNewsStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyNewsStatsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BiConfig } from
|
|
2
|
-
import { GetCompanyDiscountStatsResponse } from
|
|
1
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
2
|
+
import { GetCompanyDiscountStatsResponse } from "../../types/discountTypes";
|
|
3
3
|
export declare const getCompanyDiscountStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyDiscountStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getCompanyDiscountStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyDiscountStatsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BiConfig } from
|
|
2
|
-
import { GetCompanyFeedbackStatsResponse } from
|
|
1
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
2
|
+
import { GetCompanyFeedbackStatsResponse } from "../../types/feedbackTypes";
|
|
3
3
|
export declare const getCompanyFeedbackStats: (biConfig: BiConfig) => Promise<GetCompanyFeedbackStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getCompanyFeedbackStats: (biConfig: BiConfig) => Promise<GetCompanyFeedbackStatsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BiConfig } from
|
|
2
|
-
import { GetAllCompanyStatsResponse } from
|
|
1
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
2
|
+
import { GetAllCompanyStatsResponse } from "../../types/userTypes";
|
|
3
3
|
export declare const getAllCompanyStatsAsync: (biConfig: BiConfig) => Promise<GetAllCompanyStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getAllCompanyStatsAsync: (biConfig: BiConfig) => Promise<GetAllCompanyStatsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BiConfig } from
|
|
2
|
-
import { GetCompanyOverallStatsResponse } from
|
|
1
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
2
|
+
import { GetCompanyOverallStatsResponse } from "../../types/companyNewsTypes";
|
|
3
3
|
export declare const getCompanyOverallStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyOverallStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getCompanyOverallStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyOverallStatsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BiConfig } from
|
|
2
|
-
import { GetCompanyUserExperienceStatsResponse } from
|
|
1
|
+
import { BiConfig } from "../../types/commonTypes";
|
|
2
|
+
import { GetCompanyUserExperienceStatsResponse } from "../../types/userTypes";
|
|
3
3
|
export declare const getCompanyUserExperienceStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyUserExperienceStatsResponse>;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
getCompanyUserExperienceStatsAsync: (biConfig: BiConfig) => Promise<GetCompanyUserExperienceStatsResponse>;
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/types/userTypes.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const fetchAsync: (query: string, variables: any, commandName: string, additionalHeaders: any, appName?: string) => Promise<any>;
|
|
1
|
+
declare const fetchAsync: (query: string, variables: any, commandName: string, additionalHeaders: any, appName?: string, biApiName?: string) => Promise<any>;
|
|
2
2
|
export default fetchAsync;
|
package/dist/utilities/fetch.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(i,a){function r(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,s)}u((n=n.apply(t,e||[])).next())})},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const axios_1=__importDefault(require("axios")),config_1=__importDefault(require("../config")),constants_1=__importDefault(require("../constants")),https_1=__importDefault(require("https")),fetchAsync=(t,e,o,n,i="",a="")=>__awaiter(void 0,void 0,void 0,function*(){if(!n.accountEmail)throw new Error("No account email found");const o={"Content-Type":"application/json",appCode:constants_1.default.appCode,appName:i,apiName:i,biApiName:a};for(const[t,e]of Object.entries(n))o[t]=e;const r=yield axios_1.default.post(config_1.default.GATEWAY_URL,{query:t,variables:e},{headers:o,httpsAgent:void 0});return Promise.resolve(r.data)});exports.default=fetchAsync;
|
package/dist/utilities/mapper.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
9
|
* Proprietary and confidential.
|
|
10
10
|
*/
|
|
11
|
-
"use strict";
|
|
11
|
+
"use strict";function MapToResponseObj(e,o,s){e[s]=o[s]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MapToResponseObj=void 0,exports.MapToResponseObj=MapToResponseObj,exports.default={MapToResponseObj:MapToResponseObj};
|