gofelix 1.2.0 → 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/README.md +5 -0
- package/dist/config.js +11 -1
- package/dist/constants.js +11 -1
- package/dist/index.js +11 -1
- package/dist/queries/addFriend.js +11 -1
- package/dist/queries/addPendingFeedBackForm.js +11 -1
- package/dist/queries/addUserExperience.js +11 -1
- package/dist/queries/addUserMails.js +11 -1
- package/dist/queries/generateDiscountTokenFromUserAmount.js +11 -1
- package/dist/queries/getAllQRCodeUrl.js +11 -1
- package/dist/queries/getBiStats.js +11 -1
- package/dist/queries/getUserAccessTokenFromActivationCode.js +11 -1
- package/dist/queries/getUserBulkData.js +11 -1
- package/dist/queries/getUserMails.js +11 -1
- package/dist/queries/getUserProfiles.js +11 -1
- package/dist/queries/logError.js +11 -1
- package/dist/queries/redeemDiscountCode.js +11 -1
- package/dist/queries/removeFriend.js +11 -1
- package/dist/queries/removePendingFeedbackLink.js +11 -1
- package/dist/queries/removeUserMail.js +11 -1
- package/dist/queries/subscribeToCompany.js +11 -1
- package/dist/queries/unSubscribeToCompany.js +11 -1
- package/dist/queries/updateUserProfile.js +11 -1
- package/dist/queries/updateUserSettings.js +11 -1
- package/dist/queries/userApiLogout.js +11 -1
- package/dist/services/BI/companyNewsStats.js +11 -1
- package/dist/services/BI/discountStats.js +11 -1
- package/dist/services/BI/feedbackStats.js +11 -1
- package/dist/services/BI/getAllCompanyStats.js +11 -1
- package/dist/services/BI/getCompanyOverallStats.js +11 -1
- package/dist/services/BI/userExperienceStats.js +11 -1
- package/dist/services/OAuth/callback.js +11 -1
- package/dist/services/OAuth/index.js +11 -1
- package/dist/services/OAuth/logout.js +11 -1
- package/dist/services/Online/qrCode.js +11 -1
- package/dist/services/User/discountToken.js +11 -1
- package/dist/services/User/feedbackService.js +11 -1
- package/dist/services/User/friendService.js +11 -1
- package/dist/services/User/mailService.js +11 -1
- package/dist/services/User/subscribe.js +11 -1
- package/dist/services/User/userExperiences.js +11 -1
- package/dist/services/User/userProfile.js +11 -1
- package/dist/types/UserExperience.js +11 -1
- package/dist/types/commonTypes.js +11 -1
- package/dist/types/companyNewsTypes.js +11 -1
- package/dist/types/discountTypes.js +11 -1
- package/dist/types/feedbackTypes.js +11 -1
- package/dist/types/friendTypes.js +11 -1
- package/dist/types/mailTypes.js +11 -1
- package/dist/types/oAuthTypes.js +11 -1
- package/dist/types/qrCodes.js +11 -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 +11 -1
- package/dist/types/userTypes.js +11 -1
- package/dist/types/utilities/fetch.d.ts +1 -1
- package/dist/utilities/fetch.js +11 -1
- package/dist/utilities/mapper.js +11 -1
- package/package.json +1 -1
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,s){return new(a||(a=Promise))(function(o,r){function i(e){try{c(s.next(e))}catch(e){r(e)}}function n(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(i,n)}c((s=s.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCompanyNewsStatsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getCompanyNewsStatsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",companyNewsStats:null};let a=null;try{return e.apiKey?(e.activateMockCalls?e.mockCalls.getCompanyNewsStatsAsync?a=e.mockCalls.getCompanyNewsStatsAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyNewsStats":a=yield(0,fetch_1.default)(getBiStats_1.default,{email:e.accountEmail,commandName:constants_1.default.getBiStatsCommands.companyNewsStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api","getCompanyNewsStatsAsync"),Object.keys(a.data.getBiStats).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,a.data.getBiStats,e)}),Promise.resolve(t)):(t.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(t))}catch(a){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(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"getCompanyNewsStatsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.getCompanyNewsStatsAsync=getCompanyNewsStatsAsync,exports.default={getCompanyNewsStatsAsync:exports.getCompanyNewsStatsAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,a,o){return new(a||(a=Promise))(function(s,i){function n(t){try{c(o.next(t))}catch(t){i(t)}}function r(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof a?e:new a(function(t){t(e)})).then(n,r)}c((o=o.apply(t,e||[])).next())})},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCompanyDiscountStatsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getCompanyDiscountStatsAsync=t=>__awaiter(void 0,void 0,void 0,function*(){const e={isSuccess:!1,errorMessage:"",errorCode:"",discountStats:null};let a=null;try{return t.apiKey?(t.activateMockCalls?t.mockCalls.getCompanyDiscountStatsAsync?a=t.mockCalls.getCompanyDiscountStatsAsync():e.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyDiscountStats":a=yield(0,fetch_1.default)(getBiStats_1.default,{email:t.accountEmail,commandName:constants_1.default.getBiStatsCommands.companyDiscountStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:t.accountEmail,origin:t.origin,apiKey:t.apiKey},"go_felix_bi_api","getCompanyDiscountStatsAsync"),Object.keys(a.data.getBiStats).forEach(t=>{(0,mapper_1.MapToResponseObj)(e,a.data.getBiStats,t)}),Promise.resolve(e)):(e.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(e))}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(t),codeLocation:"getCompanyDiscountStatsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,apiKey:t.apiKey},"go_felix_bi_api"),e.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(e)}});exports.getCompanyDiscountStatsAsync=getCompanyDiscountStatsAsync,exports.default={getCompanyDiscountStatsAsync:exports.getCompanyDiscountStatsAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,o){return new(a||(a=Promise))(function(r,i){function s(e){try{c(o.next(e))}catch(e){i(e)}}function n(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(s,n)}c((o=o.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCompanyFeedbackStats=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getCompanyFeedbackStats=e=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",feedbackStats:null};try{if(!e.apiKey)return t.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(t);let a=null;return e.activateMockCalls?e.mockCalls.getCompanyFeedbackStatsAsync?a=e.mockCalls.getCompanyFeedbackStatsAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyFeedbackStats":a=yield(0,fetch_1.default)(getBiStats_1.default,{email:e.accountEmail,commandName:constants_1.default.getBiStatsCommands.companyFeedbackStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api","getCompanyFeedbackStats"),Object.keys(a.data.getBiStats).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,a.data.getBiStats,e)}),Promise.resolve(t)}catch(a){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(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"getCompanyFeedbackStatsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.getCompanyFeedbackStats=getCompanyFeedbackStats,exports.default={getCompanyFeedbackStats:exports.getCompanyFeedbackStats};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,a,o){return new(a||(a=Promise))(function(s,n){function r(t){try{l(o.next(t))}catch(t){n(t)}}function i(t){try{l(o.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof a?e:new a(function(t){t(e)})).then(r,i)}l((o=o.apply(t,e||[])).next())})},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllCompanyStatsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getAllCompanyStatsAsync=t=>__awaiter(void 0,void 0,void 0,function*(){var e,a;const o={isSuccess:!1,errorMessage:"",errorCode:"",companyUserExperienceStats:null,feedbackStats:null,companyStats:null,companyNewsStats:null,discountStats:null};let s={};try{return t.apiKey?(t.activateMockCalls?(null===(e=null==t?void 0:t.mockCalls)||void 0===e?void 0:e.getCompanyNewsStatsAsync)?s=null===(a=t.mockCalls)||void 0===a?void 0:a.getCompanyNewsStatsAsync():o.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyUserExperienceStats":s=yield(0,fetch_1.default)(getBiStats_1.default,{email:t.accountEmail,commandName:constants_1.default.getBiStatsCommands.getAllCompanyStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:t.accountEmail,origin:t.origin,apiKey:t.apiKey},"go_felix_bi_api","getAllCompanyStatsAsync"),Object.keys(s.data.getBiStats).forEach(t=>{(0,mapper_1.MapToResponseObj)(o,s.data.getBiStats,t)}),Promise.resolve(o)):(o.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(o))}catch(e){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(e),argumentsPassedIn:JSON.stringify(t),codeLocation:"getAllCompanyStatsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:t.accountEmail,origin:t.origin,apiKey:t.apiKey},"go_felix_bi_api"),o.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(o)}});exports.getAllCompanyStatsAsync=getAllCompanyStatsAsync,exports.default={getAllCompanyStatsAsync:exports.getAllCompanyStatsAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(o,s){function i(e){try{l(r.next(e))}catch(e){s(e)}}function n(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(i,n)}l((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.getCompanyOverallStatsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getCompanyOverallStatsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",companyStats:null};let a=null;try{return e.apiKey?(e.activateMockCalls?e.mockCalls.getCompanyOverallStatsAsync?a=e.mockCalls.getCompanyOverallStatsAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyOverallStats":a=yield(0,fetch_1.default)(getBiStats_1.default,{email:e.accountEmail,commandName:constants_1.default.getBiStatsCommands.companyStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api","getCompanyOverallStatsAsync"),Object.keys(a.data.getBiStats).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,a.data.getBiStats,e)}),Promise.resolve(t)):(t.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(t))}catch(a){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(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"getCompanyOverallStatsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.getCompanyOverallStatsAsync=getCompanyOverallStatsAsync,exports.default={getCompanyOverallStatsAsync:exports.getCompanyOverallStatsAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function n(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(o,n)}c((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.getCompanyUserExperienceStatsAsync=void 0;const mapper_1=require("../../utilities/mapper"),logError_1=__importDefault(require("../../queries/logError")),getBiStats_1=__importDefault(require("../../queries/getBiStats")),fetch_1=__importDefault(require("../../utilities/fetch")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),getCompanyUserExperienceStatsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){const t={isSuccess:!1,errorMessage:"",errorCode:"",companyUserExperienceStats:null};let a=null;try{return e.apiKey?(e.activateMockCalls?e.mockCalls.companyUserExperienceStatsAsync?a=e.mockCalls.companyUserExperienceStatsAsync():t.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getCompanyUserExperienceStats":a=yield(0,fetch_1.default)(getBiStats_1.default,{email:e.accountEmail,commandName:constants_1.default.getBiStatsCommands.companyUserExperienceStats},constants_1.default.graphQlCommandNames.getBiStats,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api","getCompanyUserExperienceStatsAsync"),Object.keys(a.data.getBiStats).forEach(e=>{(0,mapper_1.MapToResponseObj)(t,a.data.getBiStats,e)}),Promise.resolve(t)):(t.errorMessage="Request Failed, Please make sure you have enter the licenseKey",Promise.resolve(t))}catch(a){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(a),argumentsPassedIn:JSON.stringify(e),codeLocation:"getCompanyUserExperienceStats",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:e.origin,apiKey:e.apiKey},"go_felix_bi_api"),t.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(t)}});exports.getCompanyUserExperienceStatsAsync=getCompanyUserExperienceStatsAsync,exports.default={getCompanyUserExperienceStatsAsync:exports.getCompanyUserExperienceStatsAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
11
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,a){return new(o||(o=Promise))(function(r,i){function s(e){try{n(a.next(e))}catch(e){i(e)}}function c(e){try{n(a.throw(e))}catch(e){i(e)}}function n(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(s,c)}n((a=a.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.oauthCallbackAsync=void 0;const logError_1=__importDefault(require("../../queries/logError")),fetch_1=__importDefault(require("../../utilities/fetch")),getUserAccessTokenFromActivationCode_1=__importDefault(require("../../queries/getUserAccessTokenFromActivationCode")),constants_1=__importDefault(require("../../constants")),config_1=__importDefault(require("../../config")),oauthCallbackAsync=e=>__awaiter(void 0,void 0,void 0,function*(){var t;const o={isSuccess:!1,errorMessage:"",errorCode:"",sessionGuid:""};let a={data:{getUserAccessTokenFromActivationCode:null}};const{activationCode:r,codeVerifier:i,userConfig:s}=e;try{return r&&i&&s?(s.activateMockCalls?(null===(t=s.mockCalls)||void 0===t?void 0:t.oauthCallbackAsync)?a=yield s.mockCalls.oauthCallbackAsync():o.errorMessage="Request Failed, you set activateMockCalls to true, but you have not added a mock function for oauthCallbackAsync":a=yield(0,fetch_1.default)(getUserAccessTokenFromActivationCode_1.default,{activationCode:r,codeVerifier:i},constants_1.default.graphQlCommandNames.getUserAccessTokenFromActivationCode,{origin:s.origin,accountEmail:s.accountEmail},"go_felix_user_api"),Object.keys(a.data.getUserAccessTokenFromActivationCode).forEach(e=>{o[e]=a.data.getUserAccessTokenFromActivationCode[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==s?void 0:s.accountEmail)||"",app:constants_1.default.app,env:JSON.stringify(config_1.default),error:JSON.stringify(t),argumentsPassedIn:JSON.stringify(e),codeLocation:"gofelix, service: oauthCallbackAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:(null==s?void 0:s.accountEmail)||"",origin:(null==s?void 0:s.origin)||"",token:""},"go_felix_user_api"),o.errorMessage="Unable to process this request at this time, please try again later",o}});exports.oauthCallbackAsync=oauthCallbackAsync,exports.default={oauthCallbackAsync:exports.oauthCallbackAsync};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
'use strict';const a37_0x1d101a=a37_0x31d9;(function(_0x9a8dbf,_0x5ed46c){const _0x28248a=a37_0x31d9,_0x3b58a6=_0x9a8dbf();while(!![]){try{const _0x42ea34=-parseInt(_0x28248a(0x145))/0x1+parseInt(_0x28248a(0x135))/0x2*(parseInt(_0x28248a(0x12c))/0x3)+-parseInt(_0x28248a(0x110))/0x4+-parseInt(_0x28248a(0x141))/0x5*(parseInt(_0x28248a(0x127))/0x6)+parseInt(_0x28248a(0x128))/0x7*(-parseInt(_0x28248a(0x12f))/0x8)+parseInt(_0x28248a(0x131))/0x9+-parseInt(_0x28248a(0x138))/0xa*(-parseInt(_0x28248a(0x13b))/0xb);if(_0x42ea34===_0x5ed46c)break;else _0x3b58a6['push'](_0x3b58a6['shift']());}catch(_0x28b793){_0x3b58a6['push'](_0x3b58a6['shift']());}}}(a37_0x2b6f,0xe475b));function a37_0x31d9(_0x5f4a3f,_0x2a5701){_0x5f4a3f=_0x5f4a3f-0xff;const _0x2b6f95=a37_0x2b6f();let _0x31d915=_0x2b6f95[_0x5f4a3f];return _0x31d915;}var __awaiter=this&&this[a37_0x1d101a(0x144)]||function(_0x4d1d4b,_0x5cde52,_0x49d88d,_0x99249c){const _0x3057bb={'kVGLF':function(_0x8728c2,_0x5bb1bc){return _0x8728c2(_0x5bb1bc);},'RJdRW':function(_0x3bf1a8,_0x37e5aa){return _0x3bf1a8 instanceof _0x37e5aa;},'ZFBqL':function(_0x1a734d,_0x2fcb81){return _0x1a734d(_0x2fcb81);},'AcZBj':function(_0x3dc2fb,_0x26e971){return _0x3dc2fb(_0x26e971);}};return new(_0x49d88d||(_0x49d88d=Promise))(function(_0x110132,_0x79f2f1){const _0x1b36f1=a37_0x31d9,_0xd8b3c3={'kSHwz':function(_0x2128bb,_0x533979){const _0x42cb58=a37_0x31d9;return _0x3057bb[_0x42cb58(0x116)](_0x2128bb,_0x533979);},'gsFVP':function(_0x1aa948,_0x359466){const _0x58a059=a37_0x31d9;return _0x3057bb[_0x58a059(0x116)](_0x1aa948,_0x359466);}};function _0x48d6b5(_0x54bbaa){const _0x5111dc=a37_0x31d9;try{_0x47fe1d(_0x99249c[_0x5111dc(0x11c)](_0x54bbaa));}catch(_0x550b17){_0x79f2f1(_0x550b17);}}function _0x3f684b(_0x528df8){const _0x2997e7=a37_0x31d9;try{_0xd8b3c3[_0x2997e7(0x123)](_0x47fe1d,_0x99249c[_0x2997e7(0x113)](_0x528df8));}catch(_0x538161){_0xd8b3c3['gsFVP'](_0x79f2f1,_0x538161);}}function _0x47fe1d(_0xcf6a){const _0x1605db=a37_0x31d9;var _0x3dd091;_0xcf6a[_0x1605db(0x130)]?_0x3057bb[_0x1605db(0x11b)](_0x110132,_0xcf6a[_0x1605db(0xff)]):(_0x3dd091=_0xcf6a[_0x1605db(0xff)],_0x3057bb[_0x1605db(0x126)](_0x3dd091,_0x49d88d)?_0x3dd091:new _0x49d88d(function(_0x4a190b){_0xd8b3c3['gsFVP'](_0x4a190b,_0x3dd091);}))['then'](_0x48d6b5,_0x3f684b);}_0x3057bb[_0x1b36f1(0x13a)](_0x47fe1d,(_0x99249c=_0x99249c['apply'](_0x4d1d4b,_0x5cde52||[]))[_0x1b36f1(0x11c)]());});},__importDefault=this&&this[a37_0x1d101a(0x115)]||function(_0xed102){const _0x4be422=a37_0x1d101a;return _0xed102&&_0xed102[_0x4be422(0x117)]?_0xed102:{'default':_0xed102};};Object[a37_0x1d101a(0x139)](exports,a37_0x1d101a(0x117),{'value':!0x0}),exports[a37_0x1d101a(0x136)]=exports[a37_0x1d101a(0x10d)]=exports[a37_0x1d101a(0x129)]=void 0x0;const mapper_1=require(a37_0x1d101a(0x133)),logError_1=__importDefault(require(a37_0x1d101a(0x12e))),fetch_1=__importDefault(require(a37_0x1d101a(0x11a))),getUserMails_1=__importDefault(require(a37_0x1d101a(0x121))),removeUserMail_1=__importDefault(require(a37_0x1d101a(0x122))),addUserMails_1=__importDefault(require(a37_0x1d101a(0x134))),constants_1=__importDefault(require(a37_0x1d101a(0x104))),config_1=__importDefault(require(a37_0x1d101a(0x10e))),removeUserMailAsync=_0x111591=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x29768d=a37_0x1d101a,_0x335008={'zYMVs':function(_0x36ced2,_0x4f26ec){return _0x36ced2&&_0x4f26ec;},'DzSEk':_0x29768d(0x114),'bnNsH':_0x29768d(0x13c),'YGBtm':_0x29768d(0x106)},_0x4494f0={'isSuccess':!0x1,'errorMessage':'','errorCode':'','mailRemoved':!0x1};let _0x41d107={};const {mailId:_0x54b0f4,userConfig:_0x3b213b,accessToken:_0x28a8f5}=_0x111591;try{return _0x335008[_0x29768d(0x10b)](_0x54b0f4,_0x3b213b)?(_0x3b213b['activateMockCalls']?_0x3b213b['mockCalls']['removeUserMailAsync']?_0x41d107=_0x3b213b[_0x29768d(0x13d)][_0x29768d(0x129)]():_0x4494f0['errorMessage']=_0x29768d(0x12a):_0x41d107=yield(0x0,fetch_1[_0x29768d(0x108)])(removeUserMail_1[_0x29768d(0x108)],{'mailId':_0x54b0f4},constants_1[_0x29768d(0x108)][_0x29768d(0x100)][_0x29768d(0x112)],{'accountEmail':_0x3b213b[_0x29768d(0x107)],'origin':_0x3b213b[_0x29768d(0x120)],'token':_0x111591[_0x29768d(0x105)]},_0x335008[_0x29768d(0x111)]),Object['keys'](_0x41d107)[_0x29768d(0x11f)](_0x412509=>{(0x0,mapper_1['MapToResponseObj'])(_0x4494f0,_0x41d107,_0x412509);}),Promise['resolve'](_0x4494f0)):(_0x4494f0['errorMessage']=_0x335008[_0x29768d(0x11e)],Promise['resolve'](_0x4494f0));}catch(_0x572002){return(0x0,fetch_1[_0x29768d(0x108)])(logError_1['default'],{'errorDetails':{'userName':'','email':_0x3b213b[_0x29768d(0x107)],'app':constants_1['default'][_0x29768d(0x10a)],'env':JSON[_0x29768d(0x143)](config_1[_0x29768d(0x108)]),'error':JSON[_0x29768d(0x143)](_0x572002),'argumentsPassedIn':JSON[_0x29768d(0x143)](_0x111591),'codeLocation':_0x335008['YGBtm'],'appCode':constants_1['default'][_0x29768d(0x10f)]}},constants_1[_0x29768d(0x108)][_0x29768d(0x100)][_0x29768d(0x118)],{'accountEmail':_0x3b213b[_0x29768d(0x107)],'origin':_0x3b213b[_0x29768d(0x120)],'token':_0x28a8f5},'go_felix_user_api'),_0x4494f0['errorMessage']='Unable\x20to\x20process\x20this\x20request\x20at\x20this\x20time,\x20please\x20try\x20again\x20later',Promise[_0x29768d(0x13e)](_0x4494f0);}});exports[a37_0x1d101a(0x129)]=removeUserMailAsync;const getUserMailsAsync=(_0xce474f,_0x5f460a)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x3da0c5=a37_0x1d101a,_0x47860d={'DuDUv':_0x3da0c5(0x114),'cRQKT':_0x3da0c5(0x132),'ZgbPI':'gofelix,\x20service:\x20getUserMailsAsync','zCgSK':_0x3da0c5(0x119)},_0x20e428={'isSuccess':!0x1,'errorMessage':'','errorCode':'','mails':[]};let _0x5a1e98={};try{return _0xce474f?(_0xce474f['activateMockCalls']?_0xce474f[_0x3da0c5(0x13d)]['getUserMailsAsync']?_0x5a1e98=_0xce474f[_0x3da0c5(0x13d)][_0x3da0c5(0x10d)]():_0x20e428['errorMessage']=_0x3da0c5(0x12b):_0x5a1e98=yield(0x0,fetch_1[_0x3da0c5(0x108)])(getUserMails_1[_0x3da0c5(0x108)],{},constants_1[_0x3da0c5(0x108)][_0x3da0c5(0x100)][_0x3da0c5(0x140)],{'accountEmail':_0xce474f[_0x3da0c5(0x107)],'origin':_0xce474f[_0x3da0c5(0x120)],'token':_0x5f460a},_0x47860d[_0x3da0c5(0x142)]),Object[_0x3da0c5(0x124)](_0x5a1e98)[_0x3da0c5(0x11f)](_0x5e474a=>{const _0x5f0229=_0x3da0c5;(0x0,mapper_1[_0x5f0229(0x137)])(_0x20e428,_0x5a1e98,_0x5e474a);}),Promise[_0x3da0c5(0x13e)](_0x20e428)):(_0x20e428[_0x3da0c5(0x13f)]=_0x47860d[_0x3da0c5(0x11d)],Promise[_0x3da0c5(0x13e)](_0x20e428));}catch(_0x4eb28e){return(0x0,fetch_1[_0x3da0c5(0x108)])(logError_1[_0x3da0c5(0x108)],{'errorDetails':{'userName':'','email':_0xce474f['accountEmail'],'app':constants_1['default'][_0x3da0c5(0x10a)],'env':JSON['stringify'](config_1[_0x3da0c5(0x108)]),'error':JSON['stringify'](_0x4eb28e),'argumentsPassedIn':JSON[_0x3da0c5(0x143)](_0xce474f),'codeLocation':_0x47860d['ZgbPI'],'appCode':constants_1[_0x3da0c5(0x108)][_0x3da0c5(0x10f)]}},constants_1[_0x3da0c5(0x108)]['graphQlCommandNames'][_0x3da0c5(0x118)],{'accountEmail':_0xce474f[_0x3da0c5(0x107)],'origin':_0xce474f[_0x3da0c5(0x120)],'token':_0x5f460a},_0x47860d['DuDUv']),_0x20e428[_0x3da0c5(0x13f)]=_0x47860d[_0x3da0c5(0x103)],Promise['resolve'](_0x20e428);}});exports[a37_0x1d101a(0x10d)]=getUserMailsAsync;const addUserMailsAsync=_0x43ca7a=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x3bd156=a37_0x1d101a,_0x9c0288={'VbSOk':_0x3bd156(0x109),'CiGYq':_0x3bd156(0x114),'CKvou':'Request\x20Failed,\x20Please\x20make\x20sure\x20you\x20have\x20entered\x20the\x20accessToken','tyYRd':'gofelix,\x20service:\x20addUserMailsAsync','Bgmzu':_0x3bd156(0x119)},_0x1acea6={'isSuccess':!0x1,'errorMessage':'','errorCode':'','hasUpdated':!0x1};let _0x1bf869={};const {mails:_0xfe37e6,userConfig:_0x175092,accessToken:_0x42e503}=_0x43ca7a;try{return _0x175092&&_0xfe37e6?(_0x175092[_0x3bd156(0x125)]?_0x175092[_0x3bd156(0x13d)]['addUserMailsAsync']?_0x1bf869=_0x175092[_0x3bd156(0x13d)][_0x3bd156(0x136)]():_0x1acea6[_0x3bd156(0x13f)]=_0x9c0288[_0x3bd156(0x12d)]:_0x1bf869=yield(0x0,fetch_1[_0x3bd156(0x108)])(addUserMails_1['default'],{'mails':_0xfe37e6},constants_1[_0x3bd156(0x108)][_0x3bd156(0x100)][_0x3bd156(0x10c)],{'accountEmail':_0x175092[_0x3bd156(0x107)],'origin':_0x175092[_0x3bd156(0x120)],'token':_0x43ca7a['accessToken']},_0x9c0288[_0x3bd156(0x102)]),Object['keys'](_0x1bf869)[_0x3bd156(0x11f)](_0xc8ae7e=>{(0x0,mapper_1['MapToResponseObj'])(_0x1acea6,_0x1bf869,_0xc8ae7e);}),Promise[_0x3bd156(0x13e)](_0x1acea6)):(_0x1acea6[_0x3bd156(0x13f)]=_0x9c0288['CKvou'],Promise[_0x3bd156(0x13e)](_0x1acea6));}catch(_0x12fec2){return(0x0,fetch_1[_0x3bd156(0x108)])(logError_1[_0x3bd156(0x108)],{'errorDetails':{'userName':'','email':_0x175092[_0x3bd156(0x107)],'app':constants_1['default']['app'],'env':JSON['stringify'](config_1[_0x3bd156(0x108)]),'error':JSON[_0x3bd156(0x143)](_0x12fec2),'argumentsPassedIn':JSON[_0x3bd156(0x143)](_0x43ca7a),'codeLocation':_0x9c0288['tyYRd'],'appCode':constants_1['default']['appCode']}},constants_1['default'][_0x3bd156(0x100)][_0x3bd156(0x118)],{'accountEmail':_0x175092[_0x3bd156(0x107)],'origin':_0x175092['origin'],'token':_0x42e503},_0x9c0288[_0x3bd156(0x102)]),_0x1acea6[_0x3bd156(0x13f)]=_0x9c0288[_0x3bd156(0x101)],Promise[_0x3bd156(0x13e)](_0x1acea6);}});function a37_0x2b6f(){const _0x3a901f=['throw','go_felix_user_api','__importDefault','ZFBqL','__esModule','logError','Unable\x20to\x20process\x20this\x20request\x20at\x20this\x20time,\x20please\x20try\x20again\x20later','../../utilities/fetch','kVGLF','next','cRQKT','bnNsH','forEach','origin','../../queries/getUserMails','../../queries/removeUserMail','kSHwz','keys','activateMockCalls','RJdRW','6VEBbbt','1372511wDEQOx','removeUserMailAsync','Request\x20Failed,\x20you\x20set\x20activateMockCalls\x20to\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20but\x20you\x20have\x20not\x20added\x20a\x20mock\x20function\x20for\x20removeUserMail','Request\x20Failed,\x20you\x20set\x20activateMockCalls\x20to\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20but\x20you\x20have\x20not\x20added\x20a\x20mock\x20function\x20for\x20getUserMails','12309MZCvlI','VbSOk','../../queries/logError','72QNdykv','done','12003075UGvuDW','Request\x20Failed,\x20Please\x20make\x20sure\x20you\x20have\x20entered\x20the\x20accessToken','../../utilities/mapper','../../queries/addUserMails','812jcmnel','addUserMailsAsync','MapToResponseObj','10jcpvtS','defineProperty','AcZBj','33904101vBkLRS','Request\x20Failed,\x20Please\x20make\x20sure\x20you\x20have\x20enter\x20all\x20the\x20method\x20arguments\x20and\x20accessToken','mockCalls','resolve','errorMessage','getUserMails','4911765gpiFJM','DuDUv','stringify','__awaiter','1712913EEvKgO','value','graphQlCommandNames','Bgmzu','CiGYq','zCgSK','../../constants','accessToken','gofelix,\x20service:\x20removeUserMailAsync','accountEmail','default','Request\x20Failed,\x20you\x20set\x20activateMockCalls\x20to\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20but\x20you\x20have\x20not\x20added\x20a\x20mock\x20function\x20for\x20addUserMails','app','zYMVs','addUserMails','getUserMailsAsync','../../config','appCode','2743960KScnIO','DzSEk','removeUserMail'];a37_0x2b6f=function(){return _0x3a901f;};return a37_0x2b6f();}exports[a37_0x1d101a(0x136)]=addUserMailsAsync,exports[a37_0x1d101a(0x108)]={'removeUserMailAsync':exports['removeUserMailAsync'],'getUserMailsAsync':exports[a37_0x1d101a(0x10d)],'addUserMailsAsync':exports[a37_0x1d101a(0x136)]};
|
|
1
|
+
/*
|
|
2
|
+
/**
|
|
3
|
+
* GoFelix Project — GoFelix Limited (UK)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) GoFelix Limited (UK). All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the GoFelix License.
|
|
8
|
+
* Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
9
|
+
* Proprietary and confidential.
|
|
10
|
+
*/
|
|
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};
|