gofelix 1.2.1 → 1.2.3
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/addRedeemAccessClientCompanyName.js +11 -0
- 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/removeRedeemAccessClientCompanyName.js +11 -0
- 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/queries/viewRedeemAccessClientCompanies.js +11 -0
- 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/constants.d.ts +3 -0
- package/dist/types/discountTypes.js +1 -1
- package/dist/types/feedbackTypes.js +1 -1
- package/dist/types/friendTypes.js +1 -1
- package/dist/types/index.d.ts +12 -0
- package/dist/types/mailTypes.js +1 -1
- package/dist/types/oAuthTypes.js +1 -1
- package/dist/types/qrCodes.js +1 -1
- package/dist/types/queries/addRedeemAccessClientCompanyName.d.ts +2 -0
- package/dist/types/queries/removeRedeemAccessClientCompanyName.d.ts +2 -0
- package/dist/types/queries/viewRedeemAccessClientCompanies.d.ts +2 -0
- 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/services/Online/qrCode.d.ts +7 -1
- package/dist/types/subscribeTypes.js +1 -1
- package/dist/types/types/commonTypes.d.ts +3 -0
- package/dist/types/types/qrCodes.d.ts +23 -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";var
|
|
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};
|
|
@@ -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,a,o,s){return new(o||(o=Promise))(function(n,t){function i(e){try{c(s.next(e))}catch(e){t(e)}}function r(e){try{c(s.throw(e))}catch(e){t(e)}}function c(e){var a;e.done?n(e.value):(a=e.value,a instanceof o?a:new o(function(e){e(a)})).then(i,r)}c((s=s.apply(e,a||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.redeemDiscountCodeAsync=exports.removeRedeemAccessClientCompanyNameAsync=exports.viewRedeemAccessClientCompaniesAsync=exports.addRedeemAccessClientCompanyNameAsync=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")),addRedeemAccessClientCompanyName_1=__importDefault(require("../../queries/addRedeemAccessClientCompanyName")),viewRedeemAccessClientCompanies_1=__importDefault(require("../../queries/viewRedeemAccessClientCompanies")),removeRedeemAccessClientCompanyName_1=__importDefault(require("../../queries/removeRedeemAccessClientCompanyName")),config_1=__importDefault(require("../../config")),getAllQRCodeUrlsAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let a={isSuccess:!1,errorMessage:"",errorCode:"",qrUrls:[]},o={};const{onlineConfig:s,hashVariables:n}=e;try{return s.apiKey?(s.activateMockCalls?s.mockCalls.getAllQRCodeUrlsAsync?a=s.mockCalls.getAllQRCodeUrlsAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for getAllQRCodeUrls":o=yield(0,fetch_1.default)(getAllQRCodeUrl_1.default,{hashVariables:n},constants_1.default.graphQlCommandNames.getAllQRCodeUrls,{accountEmail:e.accountEmail,origin:s.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,o,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(a))}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(s),codeLocation:"getAllQRCodeUrlsAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,apiKey:e.apiKey,origin:s.origin,appName:"GoFelixOnlineLibrary"},"GoFelixOnlineLibrary"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.getAllQRCodeUrlsAsync=getAllQRCodeUrlsAsync;const addRedeemAccessClientCompanyNameAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let a={isSuccess:!1,errorMessage:"",errorCode:"",IsAdded:!1},o={};const{onlineConfig:s}=e;try{return s.apiKey?(s.activateMockCalls?s.mockCalls.addRedeemAccessClientCompanyNameAsync?a=s.mockCalls.addRedeemAccessClientCompanyNameAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for addRedeemAccessClientCompanyNameAsync":o=yield(0,fetch_1.default)(addRedeemAccessClientCompanyName_1.default,{clientCompanyName:e.clientCompanyName},constants_1.default.graphQlCommandNames.addRedeemAccessClientCompanyName,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,o,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(a))}catch(o){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:s.accountEmail,env:JSON.stringify(config_1.default),error:JSON.stringify(o),argumentsPassedIn:JSON.stringify(s),codeLocation:"addRedeemAccessClientCompanyNameAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.addRedeemAccessClientCompanyNameAsync=addRedeemAccessClientCompanyNameAsync;const viewRedeemAccessClientCompaniesAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let a={isSuccess:!1,errorMessage:"",errorCode:"",clientCompanies:[]},o={};const{onlineConfig:s}=e;try{return s.apiKey?(s.activateMockCalls?s.mockCalls.viewRedeemAccessClientCompaniesAsync?a=s.mockCalls.viewRedeemAccessClientCompaniesAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for viewRedeemAccessClientCompaniesAsync":o=yield(0,fetch_1.default)(viewRedeemAccessClientCompanies_1.default,{},constants_1.default.graphQlCommandNames.viewRedeemAccessClientCompanies,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,o,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(a))}catch(o){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:s.accountEmail,env:JSON.stringify(config_1.default),error:JSON.stringify(o),argumentsPassedIn:JSON.stringify(s),codeLocation:"viewRedeemAccessClientCompanies",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.viewRedeemAccessClientCompaniesAsync=viewRedeemAccessClientCompaniesAsync;const removeRedeemAccessClientCompanyNameAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let a={isSuccess:!1,errorMessage:"",errorCode:"",IsRemoved:!1},o={};const{onlineConfig:s}=e;try{return s.apiKey?(s.activateMockCalls?s.mockCalls.removeRedeemAccessClientCompanyNameAsync?a=s.mockCalls.removeRedeemAccessClientCompanyNameAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for removeRedeemAccessClientCompanyNameAsync":o=yield(0,fetch_1.default)(removeRedeemAccessClientCompanyName_1.default,{clientCompanyName:e.clientCompanyName},constants_1.default.graphQlCommandNames.removeRedeemAccessClientCompanyName,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,o,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(a))}catch(o){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:s.accountEmail,env:JSON.stringify(config_1.default),error:JSON.stringify(o),argumentsPassedIn:JSON.stringify(s),codeLocation:"removeRedeemAccessClientCompanyNameAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.onlineConfig.accountEmail,origin:s.origin,apiKey:e.onlineConfig.apiKey},"GoFelixOnlineLibrary"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.removeRedeemAccessClientCompanyNameAsync=removeRedeemAccessClientCompanyNameAsync;const redeemDiscountCodeAsync=e=>__awaiter(void 0,void 0,void 0,function*(){let a={isSuccess:!1,errorMessage:"",errorCode:"",discountTokenHasBeenRedeemed:!1},o={};const{onlineConfig:s,hashVariables:n}=e;try{return s.apiKey?(s.activateMockCalls?s.mockCalls.redeemDiscountCodeAsync?a=s.mockCalls.redeemDiscountCodeAsync():a.errorMessage="Request Failed, you set activateMockCalls to true,\n but you have not added a mock function for redeemDiscountCode":o=yield(0,fetch_1.default)(redeemDiscountCode_1.default,{discountToken:"",discountCode:"",customerUserName:"",discountInputType:"TOKEN",hashVariables:n,discountedAmount:0},constants_1.default.graphQlCommandNames.redeemDiscountCode,{accountEmail:e.accountEmail,origin:s.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),Object.keys(o).forEach(e=>{(0,mapper_1.MapToResponseObj)(a,o,e)}),Promise.resolve(a)):(a.errorMessage="Request Failed, Please make sure you have enter the apiKey",Promise.resolve(a))}catch(o){return(0,fetch_1.default)(logError_1.default,{errorDetails:{userName:"",email:s.accountEmail,env:JSON.stringify(config_1.default),error:JSON.stringify(o),argumentsPassedIn:JSON.stringify(s),codeLocation:"redeemDiscountCodeAsync",appCode:constants_1.default.appCode}},constants_1.default.graphQlCommandNames.logError,{accountEmail:e.accountEmail,origin:s.origin,apiKey:e.apiKey},"GoFelixOnlineLibrary"),a.errorMessage="Unable to process this request at this time, please try again later",Promise.resolve(a)}});exports.redeemDiscountCodeAsync=redeemDiscountCodeAsync,exports.default={getAllQRCodeUrlsAsync:exports.getAllQRCodeUrlsAsync,redeemDiscountCodeAsync:exports.redeemDiscountCodeAsync,addRedeemAccessClientCompanyNameAsync:exports.addRedeemAccessClientCompanyNameAsync,viewRedeemAccessClientCompaniesAsync:exports.viewRedeemAccessClientCompaniesAsync,removeRedeemAccessClientCompanyNameAsync:exports.removeRedeemAccessClientCompanyNameAsync};
|
|
@@ -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});
|
|
@@ -3,6 +3,9 @@ declare const _default: {
|
|
|
3
3
|
hashKey: string;
|
|
4
4
|
graphQlCommandNames: {
|
|
5
5
|
getBiStats: string;
|
|
6
|
+
addRedeemAccessClientCompanyName: string;
|
|
7
|
+
viewRedeemAccessClientCompanies: string;
|
|
8
|
+
removeRedeemAccessClientCompanyName: string;
|
|
6
9
|
removeUserMail: string;
|
|
7
10
|
getAllQRCodeUrls: string;
|
|
8
11
|
redeemDiscountCode: string;
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -35,6 +35,9 @@ export declare const settings: {
|
|
|
35
35
|
online: {
|
|
36
36
|
redeemDiscountCodeAsync: () => void;
|
|
37
37
|
getAllQRCodeUrlsAsync: () => void;
|
|
38
|
+
addRedeemAccessClientCompanyNameAsync: () => void;
|
|
39
|
+
viewRedeemAccessClientCompaniesAsync: () => void;
|
|
40
|
+
removeRedeemAccessClientCompanyNameAsync: () => void;
|
|
38
41
|
};
|
|
39
42
|
};
|
|
40
43
|
};
|
|
@@ -52,6 +55,9 @@ export declare const user: any;
|
|
|
52
55
|
export declare const online: {
|
|
53
56
|
getAllQRCodeUrlsAsync: (hashVariables: string) => Promise<import("./types/qrCodes").GetAllQRCodeUrlsResponse>;
|
|
54
57
|
redeemDiscountCodeAsync: (hashVariables: string) => Promise<import("./types/qrCodes").RedeemDiscountCodeResponse>;
|
|
58
|
+
addRedeemAccessClientCompanyNameAsync: (clientCompanyName: string) => Promise<import("./types/qrCodes").AddRedeemAccessClientCompanyNameResponse>;
|
|
59
|
+
removeedeemAccessClientCompanyNameAsync: (clientCompanyName: string) => Promise<import("./types/qrCodes").RemoveRedeemAccessClientCompanyNameResponse>;
|
|
60
|
+
viewRedeemAccessClientCompaniesAsync: () => Promise<import("./types/qrCodes").ViewRedeemAccessClientCompaniesResponse>;
|
|
55
61
|
};
|
|
56
62
|
declare const _default: {
|
|
57
63
|
config: Config;
|
|
@@ -67,6 +73,9 @@ declare const _default: {
|
|
|
67
73
|
online: {
|
|
68
74
|
getAllQRCodeUrlsAsync: (hashVariables: string) => Promise<import("./types/qrCodes").GetAllQRCodeUrlsResponse>;
|
|
69
75
|
redeemDiscountCodeAsync: (hashVariables: string) => Promise<import("./types/qrCodes").RedeemDiscountCodeResponse>;
|
|
76
|
+
addRedeemAccessClientCompanyNameAsync: (clientCompanyName: string) => Promise<import("./types/qrCodes").AddRedeemAccessClientCompanyNameResponse>;
|
|
77
|
+
removeedeemAccessClientCompanyNameAsync: (clientCompanyName: string) => Promise<import("./types/qrCodes").RemoveRedeemAccessClientCompanyNameResponse>;
|
|
78
|
+
viewRedeemAccessClientCompaniesAsync: () => Promise<import("./types/qrCodes").ViewRedeemAccessClientCompaniesResponse>;
|
|
70
79
|
};
|
|
71
80
|
settings: {
|
|
72
81
|
env: string;
|
|
@@ -99,6 +108,9 @@ declare const _default: {
|
|
|
99
108
|
online: {
|
|
100
109
|
redeemDiscountCodeAsync: () => void;
|
|
101
110
|
getAllQRCodeUrlsAsync: () => void;
|
|
111
|
+
addRedeemAccessClientCompanyNameAsync: () => void;
|
|
112
|
+
viewRedeemAccessClientCompaniesAsync: () => void;
|
|
113
|
+
removeRedeemAccessClientCompanyNameAsync: () => void;
|
|
102
114
|
};
|
|
103
115
|
};
|
|
104
116
|
};
|
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});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const addRedeemAccessClientCompanyName = "\n mutation addRedeemAccessClientCompanyName(\n $clientCompanyName: String!\n ) {\n addRedeemAccessClientCompanyName(\n clientCompanyName: $clientCompanyName\n ) {\n IsAdded\n isSuccess\n errorCode\n errorMessage\n }\n }\n";
|
|
2
|
+
export default addRedeemAccessClientCompanyName;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const removeRedeemAccessClientCompanyName = "\n mutation removeRedeemAccessClientCompanyName(\n $clientCompanyName: String!\n ) {\n removeRedeemAccessClientCompanyName(\n clientCompanyName: $clientCompanyName\n ) {\n IsRemoved\n isSuccess\n errorCode\n errorMessage\n }\n }\n";
|
|
2
|
+
export default removeRedeemAccessClientCompanyName;
|