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CACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,sCACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAIzBS,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAO/B,EAAAA,EAAA,GACpB2C,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaC,mBAAqB,GACzCF,OAAOC,aAAaC,mBAA8B,UAAC7C,EAAA,GAC5C8B,EAAQE,iCC/KvBc,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://sheikh-zayed-festival/./src/actions/create-order-for-payment.action.ts?6f87","webpack://sheikh-zayed-festival/./src/actions/get-categories.action.ts?9592","webpack://sheikh-zayed-festival/./src/actions/get-category-details.action.ts?7427","webpack://sheikh-zayed-festival/./src/actions/get-crm-category-ids-for-tefanawwal.action.ts?ca67","webpack://sheikh-zayed-festival/./src/actions/get-crm-existing-category-record-for-tefanawwal.action.ts?3239","webpack://sheikh-zayed-festival/./src/actions/get-crm-nationality-ids-for-tefanawwal.action.ts?acf1","webpack://sheikh-zayed-festival/./src/actions/get-crm-token-for-tefan-awaal-category.action.ts?2b19","webpack://sheikh-zayed-festival/./src/actions/get-crm-token.action.ts?4b61","webpack://sheikh-zayed-festival/./src/actions/get-existing-contact.action.ts?edd7","webpack://sheikh-zayed-festival/./src/actions/get-fatoorah-payment-state.action.ts?3e35","webpack://sheikh-zayed-festival/./src/actions/get-inquery-options.action.ts?f268","webpack://sheikh-zayed-festival/./src/actions/MyFatoorahPaymentDataServiceEntities.g.ts?3d50","webpack://sheikh-zayed-festival/./src/actions/MyFatoorahPaymentDataActionExtension.g.ts?84dc","webpack://sheikh-zayed-festival/./src/actions/get-my-fatoorah-payment-methods.action.ts?bf9d","webpack://sheikh-zayed-festival/./src/actions/get-payment-access-token.action.ts?eba9","webpack://sheikh-zayed-festival/./src/actions/get-payment-status.action.ts?1b24","webpack://sheikh-zayed-festival/./src/actions/get-sharepoint-token.action.ts?52b8","webpack://sheikh-zayed-festival/./src/actions/post-business-op-case.action.ts?0df1","webpack://sheikh-zayed-festival/./src/actions/post-checkout-data-to-crm.action.ts?4763","webpack://sheikh-zayed-festival/./src/actions/post-contact-us-form.action.ts?6c16","webpack://sheikh-zayed-festival/./src/actions/post-new-contact.action.ts?8117","webpack://sheikh-zayed-festival/./src/actions/post-tefanawwal-form.action.ts?5636","webpack://sheikh-zayed-festival/./lib/__local__/module-registration.js?8a42","webpack://sheikh-zayed-festival/external var \"React\"?0d3b","webpack://sheikh-zayed-festival/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * CreateOrderForPayment Input Action\r\n */\r\nexport class CreateOrderForPaymentInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public LariToken: string;\r\n public amount: number;\r\n public emailAddress: string;\r\n public merchantAttributesRedirectUrl: string;\r\n constructor(data:any) {\r\n this.LariToken= data.token;\r\n this.amount= data.amount;\r\n this.emailAddress= data.email;\r\n this.merchantAttributesRedirectUrl= data.url;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `LARICREATEPAYMENTORDER`;\r\n public getCacheObjectType = () => 'LARICREATEPAYMENTORDER';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface ICreateOrderForPaymentData {\r\n URL: string | undefined;\r\n success: boolean;\r\n error: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext,inputData:any): Msdyn365.IActionInput => {\r\n return new CreateOrderForPaymentInput(inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function createOrderForPayment(input: CreateOrderForPaymentInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n // const { szfPaymentDomain, szfPaymentOutletReference } = ctx.requestContext.app.config;\r\n const szfPaymentDomain = \"https://api-gateway.sandbox.ngenius-payments.com\";\r\n const szfPaymentOutletReference = \"OGNjZWM1YmMtMWUzNi00NDkyLWFlNmItMGQ4NDQ5MDdkMTAxOmVmNDQ2NGYxLWI0MTctNDlkOC05ZmZmLTA1YzA1YWQ1Nzk0YQ==\";\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n const data = { \r\n \"action\": \"PURCHASE\", \r\n \"amount\" : { \"currencyCode\" : \"AED\", \"value\" : input.amount },\r\n \"emailAddress\" : input.emailAddress,\r\n \"merchantAttributes\":{\r\n \"redirectUrl\": input.merchantAttributesRedirectUrl\r\n }\r\n }\r\n try{\r\n const response = await Msdyn365.sendRequest(`${szfPaymentDomain}/transactions/outlets/${szfPaymentOutletReference}/orders`, \"post\", data, {\r\n headers: {\r\n 'Content-Type': 'application/vnd.ni-identity.v1+json',\r\n 'authorization': `Basic ${input.LariToken}`\r\n }\r\n });\r\n if(response && (response.status===200 || response.data)){\r\n return {\r\n URL: 'Static data from action',\r\n success: true,\r\n error: undefined\r\n };\r\n }else{\r\n return { \r\n URL: undefined, \r\n success: false,\r\n error: \"Something went Wrong, Please try again later\"\r\n };\r\n }\r\n }catch(err){\r\n console.log(\"Payment error\",err)\r\n return { \r\n URL: undefined, \r\n success: false,\r\n error: \"Something went Wrong, Please try again later\"\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >createOrderForPayment,\r\n // TODO: Give your data action a unique id\r\n id: 'CreateOrderForPayment',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCategoriesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CategoriesDataActions.g';\r\nimport { Category } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport class GetCategoriesInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `Get-Categories`;\r\n public getCacheObjectType = () => 'Get-Categories';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\nexport interface IGetCategoriesData {\r\n filteredCategories: Category[];\r\n parentCategory?: Category | undefined;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCategoriesInput();\r\n};\r\n\r\nasync function action(input: GetCategoriesInput, ctx: Msdyn365.IActionContext): Promise {\r\n const recId = Number(ctx.requestContext.urlTokens.recordId);\r\n const getCategories: Category[] = await getCategoriesAsync(\r\n { callerContext: ctx },\r\n ctx.requestContext.apiSettings.channelId\r\n );\r\n\r\n const filteredCategories = recId ? getCategories.filter((item: Category) => item.ParentCategory === recId) : getCategories;\r\n const category = getCategories.find((item: Category) => item.RecordId === recId);\r\n\r\n return { filteredCategories: filteredCategories, parentCategory: category };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'GetCategories',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCategoriesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CategoriesDataActions.g';\r\nimport { Category } from '@msdyn365-commerce/retail-proxy';\r\n/**\r\n * GetCategoryDetails Input Action\r\n */\r\nexport class GetCategoryDetailsInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `get-category-details`;\r\n public getCacheObjectType = () => 'get-category-details';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\nexport interface IGetCategoryDetailsData {\r\n categoryDetails: Category | undefined;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCategoryDetailsInput();\r\n};\r\n\r\nasync function action(input: GetCategoryDetailsInput, ctx: Msdyn365.IActionContext): Promise {\r\n const categoryId = Number(ctx.requestContext.query?.categoryId);\r\n const getCategories = await getCategoriesAsync(\r\n { callerContext: ctx },\r\n ctx.requestContext.apiSettings.channelId\r\n );\r\n const getCategoryDetails: Category | undefined = getCategories?.find((item: Category) => item.RecordId === categoryId);\r\n return {\r\n categoryDetails: getCategoryDetails\r\n };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'GetCategoryDetails',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetCrmCategoryIdsForTefanawwal Input Action\r\n */\r\nexport class GetCrmCategoryIdsForTefanawwalInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n constructor(token : string | undefined) {\r\n this.token = token;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMCATEGORYIDS`;\r\n public getCacheObjectType = () => 'CRMCATEGORYIDS';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmCategoryIdsForTefanawwalData {\r\n szf_tefanalawwalcategoryid: string;\r\n szf_hqid: string;\r\n szf_name: string;\r\n szf_arabicname: string;\r\n\r\n}\r\nexport interface IGetTefanCategoryOptionsData {\r\n status: boolean,\r\n data: IGetCrmCategoryIdsForTefanawwalData[] | undefined,\r\n}\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createCategoryIdsInput = (args: Msdyn365.ICreateActionContext, token: string): Msdyn365.IActionInput => {\r\n return new GetCrmCategoryIdsForTefanawwalInput(token);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function categoryIdsDataAction(input: GetCrmCategoryIdsForTefanawwalInput, ctx: Msdyn365.IActionContext): Promise {\r\n const token = input.token;\r\n const szfCRMDomainForTefanAwwal = ctx.requestContext.app.config.szfCRMDomainForTefanAwwal;\r\n\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomainForTefanAwwal}/api/data/v9.1/szf_tefanalawwalcategories?$select=szf_tefanalawwalcategoryid,szf_name,szf_arabicname`, \"get\", {}, {\r\n headers: {\r\n 'Authorization':`Bearer ${token}`\r\n }\r\n });\r\n if(response && response.data && response.data.value && response.data.value.length > 0){\r\n return {\r\n status: true,\r\n data: response.data.value\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n data: undefined\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >categoryIdsDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmCategoryIdsForTefanawwal',\r\n input: createCategoryIdsInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetCrmExistingCategoryRecordForTefanawwal Input Action\r\n */\r\n\r\nexport interface IExistingCategoryDataActionInput {\r\n token: string,\r\n emiratesID: string,\r\n}\r\nexport interface IGetCrmCategoryIdsForTefanawwalData {\r\n categoryID: string;\r\n categoryNameArabic: string;\r\n categoryNameEnglish: string;\r\n emiratesID: string;\r\n hqID: string\r\n\r\n}\r\nexport class GetCrmExistingCategoryRecordForTefanawwalInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n public emiratesID: string | undefined;\r\n constructor(data: IExistingCategoryDataActionInput) {\r\n this.token = data.token;\r\n this.emiratesID = data.emiratesID;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `GETEXISTINGCATEGORYRECORD`;\r\n public getCacheObjectType = () => 'GETEXISTINGCATEGORYRECORD';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmExistingCategoryRecordForTefanawwalData {\r\n status: boolean,\r\n data: IGetCrmCategoryIdsForTefanawwalData[] | undefined,\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createExistingCategoryRecordInput = (args: Msdyn365.ICreateActionContext,inputData:IExistingCategoryDataActionInput ): Msdyn365.IActionInput => {\r\n return new GetCrmExistingCategoryRecordForTefanawwalInput(inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getExistingCategoryRecordAction(input: GetCrmExistingCategoryRecordForTefanawwalInput, ctx: Msdyn365.IActionContext): Promise {\r\n const token = input.token;\r\n const szfCRMDomainForTefanAwwal = ctx.requestContext.app.config.szfCRMDomainForTefanAwwal;\r\n const data = { \r\n \"ActionName\": \"GetEmiratesById\",\r\n \"EmiratesID\": input.emiratesID ? `${input.emiratesID}` : ''\r\n }\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomainForTefanAwwal}/api/data/v9.2/sys_Invoke`, \"post\", data, {\r\n headers: {\r\n 'Authorization':`Bearer ${token}`\r\n }\r\n });\r\n console.log('response',response)\r\n \r\n if(response && response.data && response.data.ResponseMessage && response.data.ResponseMessage.length > 0){\r\n const responseInJson = JSON.parse(response.data.ResponseMessage)\r\n return {\r\n status: true,\r\n data: responseInJson\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n data: undefined\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getExistingCategoryRecordAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmExistingCategoryRecordForTefanawwal',\r\n input: createExistingCategoryRecordInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetCrmNationalityIdsForTefanawwal Input Action\r\n */\r\nexport class GetCrmNationalityIdsForTefanawwalInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n constructor(token : string | undefined) {\r\n this.token = token;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMNATIONALITYIDS`;\r\n public getCacheObjectType = () => 'CRMNATIONALITYIDS';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmNationalityIdsForTefanawwalData {\r\n szf_nationalityid: string;\r\n szf_name: string;\r\n szf_name_arabic: string;\r\n\r\n}\r\n\r\nexport interface IGetTefanNationalityOptionsData {\r\n status: boolean,\r\n data: IGetCrmNationalityIdsForTefanawwalData[] | undefined,\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createNationalityIdsInput = (args: Msdyn365.ICreateActionContext,token:string): Msdyn365.IActionInput => {\r\n return new GetCrmNationalityIdsForTefanawwalInput(token);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function nationalityIdsDataAction(input: GetCrmNationalityIdsForTefanawwalInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const token = input.token;\r\n const szfCRMDomainForTefanAwwal = ctx.requestContext.app.config.szfCRMDomainForTefanAwwal;\r\n\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomainForTefanAwwal}/api/data/v9.1/szf_nationalities?$select=szf_nationalityid,szf_name,szf_name_arabic`, \"get\", {}, {\r\n headers: {\r\n 'Authorization':`Bearer ${token}`\r\n }\r\n });\r\n if(response && response.data && response.data.value && response.data.value.length > 0){\r\n return {\r\n status: true,\r\n data: response.data.value\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n data: undefined\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >nationalityIdsDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmNationalityIdsForTefanawwal',\r\n input: createNationalityIdsInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport qs from 'querystring';\r\nimport { IToken } from './get-crm-token.action';\r\n\r\n\r\n/**\r\n * GetCrmTokenForTefanAwaalCategory Input Action\r\n */\r\n\r\nexport class GetCrmTokenForTefanAwaalCategoryInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMTOKEN1`;\r\n public getCacheObjectType = () => 'CRMTOKEN1';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmTokenForTefanAwaalCategoryData {\r\n token: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCrmTokenForTefanAwaalCategoryInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(\r\n input: GetCrmTokenForTefanAwaalCategoryInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n \r\n const { szfCRMDomainForTefanAwwal, szfCRMClientSecretForTefanAwwal, szfCRMClientIdForTefanAwwal } = ctx.requestContext.app.config;\r\n\r\n const data = qs.stringify({\r\n client_id: szfCRMClientIdForTefanAwwal && szfCRMClientIdForTefanAwwal,\r\n client_secret: szfCRMClientSecretForTefanAwwal && szfCRMClientSecretForTefanAwwal,\r\n grant_type: 'client_credentials',\r\n resource: `${szfCRMDomainForTefanAwwal && szfCRMDomainForTefanAwwal}/`\r\n });\r\n\r\n const response = await Msdyn365.sendRequest(\"https://login.microsoftonline.com/c03a7c9b-0691-48f2-a884-93fe49a74786/oauth2/token\", \"get\", data, {\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Cookie': 'fpc=AtsmsMTTjZxGgn3xxGhR2NIkPfoRAQAAAMaXLd0OAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd'\r\n }\r\n });\r\n if(response && response.status===200){\r\n return {\r\n token : response.data.access_token\r\n };\r\n }else{\r\n return {token : ''};\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmTokenForTefanAwaalCategory',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport qs from 'querystring';\r\n/**\r\n * GetCrmToken Input Action\r\n */\r\n\r\n export interface IToken {\r\n token_type: string;\r\n expires_in: string;\r\n ext_expires_in: string;\r\n expires_on: string;\r\n not_before: string;\r\n resource: string;\r\n access_token: string;\r\n}\r\n\r\nexport class GetCrmTokenInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMTOKEN`;\r\n public getCacheObjectType = () => 'CRMTOKEN';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmTokenData {\r\n token: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCrmTokenInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetCrmTokenInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n const { szfCRMDomain, szfCRMClientSecret} = ctx.requestContext.app.config;\r\n const data = qs.stringify({\r\n 'resource': `${szfCRMDomain}`,\r\n 'client_id': '1d4d5b5c-c710-472d-b8ac-104788da8da1',\r\n 'client_secret': `${szfCRMClientSecret}`,\r\n 'grant_type': 'client_credentials'\r\n });\r\n const response = await Msdyn365.sendRequest(\"https://login.microsoftonline.com/c03a7c9b-0691-48f2-a884-93fe49a74786/oauth2/token\", \"post\", data, {\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Cookie': 'fpc=AopThjyphGZIqV8tMvZOskskZZdbAQAAAETfudgOAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd'\r\n }\r\n });\r\n if(response && response.status===200){\r\n return {\r\n token : response.data.access_token\r\n };\r\n }else{\r\n return {token : ''};\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmToken',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetExistingContact Input Action\r\n */\r\n\r\nexport class GetExistingContactInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n public email: string | undefined;\r\n public phone: string | undefined;\r\n constructor(token : string | undefined, email: string | undefined,phone:string | undefined) {\r\n this.phone = phone;\r\n this.email = email;\r\n this.token = token;\r\n }\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SZFEXISTINGCONTACT`;\r\n public getCacheObjectType = () => 'SZFEXISTINGCONTACT';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetExistingContactData {\r\n status: boolean;\r\n id: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createExistingContactInput = (args: Msdyn365.ICreateActionContext, token: string, email: string,phone: string): Msdyn365.IActionInput => {\r\n return new GetExistingContactInput(token, email,phone);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function existingContactDataAction(input: GetExistingContactInput, ctx: Msdyn365.IActionContext): Promise {\r\n const token = input.token;\r\n const email = input.email;\r\n const phone = input.phone;\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomain}/api/data/v9.2//contacts?$select=emailaddress1,firstname,lastname,mobilephone &$filter=emailaddress1 eq \\'${email}\\' or mobilephone eq \\'%2B${phone}\\'`, \"get\", {}, {\r\n headers: {\r\n 'Authorization':`Bearer ${token}`\r\n }\r\n });\r\n if(response && response.data && response.data.value && response.data.value.length > 0 && response.data.value[0].contactid){\r\n return {\r\n status: true,\r\n id: response.data.value[0].contactid\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n id: undefined\r\n };\r\n }\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >existingContactDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetExistingContact',\r\n input: createExistingContactInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetFatoorahPaymentState Input Action\r\n */\r\nexport class GetFatoorahPaymentStateInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `FATOORAHPAYMENTSTATE`;\r\n public getCacheObjectType = () => 'FATOORAHPAYMENTSTATE';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetFatoorahPaymentStateData {\r\n paymentState: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetFatoorahPaymentStateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetFatoorahPaymentStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { paymentState: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetFatoorahPaymentState',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetInqueryOptions Input Action\r\n */\r\nexport class GetInqueryOptionsInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n constructor(token: string| undefined) {\r\n this.token = token;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SZFCONTACTUSINQUERYOPTIONS`;\r\n public getCacheObjectType = () => 'SZFCONTACTUSINQUERYOPTIONS';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetInqueryOptionsData {\r\n status: boolean,\r\n data: any[] | undefined,\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInqueryOptionInput = (args: Msdyn365.ICreateActionContext,token:string): Msdyn365.IActionInput => {\r\n return new GetInqueryOptionsInput(token);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getInqueryOptionsDataAction(input: GetInqueryOptionsInput, ctx: Msdyn365.IActionContext): Promise {\r\n const token = input.token;\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomain}/api/data/v9.2//szf_casetypes?$select=szf_name,szf_arabic`, \"get\", {}, {\r\n headers: {\r\n 'Authorization':`Bearer ${token}`\r\n }\r\n });\r\n if(response && response.data && response.data.value && response.data.value.length > 0){\r\n return {\r\n status: true,\r\n data: response.data.value\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n data: undefined\r\n };\r\n }\r\n\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getInqueryOptionsDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetInqueryOptions',\r\n input: createInqueryOptionInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","// @ts-ignore -- Unused import\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n// @ts-ignore -- Unused import\r\nimport { jsonLightReadStringPropertyValue } from '@msdyn365-commerce/retail-proxy/dist/externals';\r\n\r\n/**\r\n * VSICategoryEXT entity interface.\r\n */\r\nexport interface IVSICategoryEXT {\r\n RecordId: number;\r\n Id: number;\r\n Name?: string;\r\n ParentCategory: number;\r\n DisplayOrder: number;\r\n Description?: string;\r\n TextValueTranslation?: Entities.TextValueTranslation[];\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * PaymentMethod entity interface.\r\n */\r\nexport interface IPaymentMethod {\r\n PaymentMethodId: number;\r\n PaymentMethodAr?: string;\r\n PaymentMethodEn?: string;\r\n PaymentMethodCode?: string;\r\n IsDirectPayment: boolean;\r\n ServiceCharge: number;\r\n TotalAmount: number;\r\n CurrencyIso?: string;\r\n ImageUrl?: string;\r\n IsEmbeddedSupported: boolean;\r\n PaymentCurrencyIso?: string;\r\n}\r\n\r\n/**\r\n * Data entity interface.\r\n */\r\nexport interface IData {\r\n PaymentMethods?: IPaymentMethod[];\r\n}\r\n\r\n/**\r\n * InitiatePaymentResponse entity interface.\r\n */\r\nexport interface IInitiatePaymentResponse {\r\n IsSuccess?: boolean;\r\n Message?: string;\r\n Data?: IData;\r\n}\r\n\r\n/**\r\n * InvoiceTransaction entity interface.\r\n */\r\nexport interface IInvoiceTransaction {\r\n TransactionDate: Date;\r\n PaymentGateway?: string;\r\n ReferenceId?: string;\r\n TrackId?: string;\r\n TransactionId?: string;\r\n PaymentId?: string;\r\n AuthorizationId?: string;\r\n TransactionStatus?: string;\r\n TransationValue?: string;\r\n CustomerServiceCharge?: string;\r\n TotalServiceCharge?: string;\r\n DueValue?: string;\r\n PaidCurrency?: string;\r\n PaidCurrencyValue?: string;\r\n VatAmount?: string;\r\n IpAddress?: string;\r\n Country?: string;\r\n Currency?: string;\r\n CardNumber?: string;\r\n ErrorCode?: string;\r\n}\r\n\r\n/**\r\n * GetPaymentStatusResponseData entity interface.\r\n */\r\nexport interface IGetPaymentStatusResponseData {\r\n InvoiceId: number;\r\n InvoiceStatus?: string;\r\n InvoiceReference?: string;\r\n CustomerReference?: string;\r\n CreatedDate: Date;\r\n ExpiryDate?: string;\r\n ExpiryTime?: string;\r\n InvoiceValue: number;\r\n CustomerName?: string;\r\n CustomerMobile?: string;\r\n CustomerEmail?: string;\r\n InvoiceDisplayValue?: string;\r\n DueDeposit: number;\r\n DepositStatus?: string;\r\n InvoiceTransactions?: IInvoiceTransaction[];\r\n}\r\n\r\n/**\r\n * GetPaymentStatusResponse entity interface.\r\n */\r\nexport interface IGetPaymentStatusResponse {\r\n IsSuccess?: boolean;\r\n Message?: string;\r\n Data?: IGetPaymentStatusResponseData;\r\n}\r\n\r\n/**\r\n * ExecutePaymentResponseData entity interface.\r\n */\r\nexport interface IExecutePaymentResponseData {\r\n InvoiceId: number;\r\n IsDirectPayment: boolean;\r\n PaymentURL?: string;\r\n CustomerReference?: string;\r\n RecurringId?: string;\r\n}\r\n\r\n/**\r\n * ExecutePaymentResponse entity interface.\r\n */\r\nexport interface IExecutePaymentResponse {\r\n IsSuccess?: boolean;\r\n Message?: string;\r\n Data?: IExecutePaymentResponseData;\r\n}\r\n\r\n/**\r\n * VSICategoryEXT entity class.\r\n */\r\nexport class VSICategoryEXTExtensionClass implements IVSICategoryEXT {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public RecordId: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Name: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ParentCategory: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DisplayOrder: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Description: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TextValueTranslation: Entities.TextValueTranslation[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.RecordId = odataObject.RecordId ? parseInt(odataObject.RecordId, 10) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id ? parseInt(odataObject.Id, 10) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Name = odataObject.Name;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ParentCategory = odataObject.ParentCategory ? parseInt(odataObject.ParentCategory, 10) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DisplayOrder = odataObject.DisplayOrder ? parseFloat(odataObject.DisplayOrder) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Description = odataObject.Description;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TextValueTranslation = undefined;\r\n if (odataObject.TextValueTranslation) {\r\n this.TextValueTranslation = [];\r\n for (var i = 0; i < odataObject.TextValueTranslation.length; i++) {\r\n if (odataObject.TextValueTranslation[i]) {\r\n if (odataObject.TextValueTranslation[i]['@odata.type']) {\r\n var className: string = odataObject.TextValueTranslation[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.TextValueTranslation[i] = new EntityClasses[className](odataObject.TextValueTranslation[i]);\r\n }\r\n } else {\r\n this.TextValueTranslation[i] = new EntityClasses.TextValueTranslationClass(odataObject.TextValueTranslation[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TextValueTranslation[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var ij = 0; ij < odataObject.ExtensionProperties.length; ij++) {\r\n if (odataObject.ExtensionProperties[ij]) {\r\n if (odataObject.ExtensionProperties[ij]['@odata.type']) {\r\n var className1: string = odataObject.ExtensionProperties[ij]['@odata.type'];\r\n className1 = className1.substr(className1.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className1]) {\r\n this.ExtensionProperties[ij] = new EntityClasses[className1](odataObject.ExtensionProperties[ij]);\r\n }\r\n } else {\r\n this.ExtensionProperties[ij] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[ij]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[ij] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * PaymentMethod entity class.\r\n */\r\nexport class PaymentMethodExtensionClass implements IPaymentMethod {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentMethodId: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentMethodAr: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentMethodEn: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentMethodCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsDirectPayment: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ServiceCharge: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TotalAmount: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CurrencyIso: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ImageUrl: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsEmbeddedSupported: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentCurrencyIso: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethodId = odataObject.PaymentMethodId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethodAr = odataObject.PaymentMethodAr;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethodEn = odataObject.PaymentMethodEn;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethodCode = odataObject.PaymentMethodCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsDirectPayment = odataObject.IsDirectPayment;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ServiceCharge = odataObject.ServiceCharge ? parseFloat(odataObject.ServiceCharge) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TotalAmount = odataObject.TotalAmount ? parseFloat(odataObject.TotalAmount) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CurrencyIso = odataObject.CurrencyIso;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ImageUrl = odataObject.ImageUrl;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsEmbeddedSupported = odataObject.IsEmbeddedSupported;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentCurrencyIso = odataObject.PaymentCurrencyIso;\r\n }\r\n}\r\n\r\n/**\r\n * Data entity class.\r\n */\r\nexport class DataExtensionClass implements IData {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentMethods: IPaymentMethod[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethods = undefined;\r\n if (odataObject.PaymentMethods) {\r\n this.PaymentMethods = [];\r\n for (var i = 0; i < odataObject.PaymentMethods.length; i++) {\r\n if (odataObject.PaymentMethods[i]) {\r\n if (odataObject.PaymentMethods[i]['@odata.type']) {\r\n var className: string = odataObject.PaymentMethods[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.PaymentMethods[i] = new EntityClasses[className](odataObject.PaymentMethods[i]);\r\n }\r\n } else {\r\n this.PaymentMethods[i] = new PaymentMethodExtensionClass(odataObject.PaymentMethods[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentMethods[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * InitiatePaymentResponse entity class.\r\n */\r\nexport class InitiatePaymentResponseExtensionClass implements IInitiatePaymentResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsSuccess: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Data: IData;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsSuccess = odataObject.IsSuccess;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n if (odataObject.Data === null) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Data = undefined;\r\n } else if (odataObject.Data['@odata.type'] === null) {\r\n this.Data = new DataExtensionClass(odataObject.Data);\r\n } else {\r\n this.Data = odataObject?.Data!;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * InvoiceTransaction entity class.\r\n */\r\nexport class InvoiceTransactionExtensionClass implements IInvoiceTransaction {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TransactionDate: Date;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentGateway: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ReferenceId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TrackId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TransactionId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public AuthorizationId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TransactionStatus: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TransationValue: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerServiceCharge: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TotalServiceCharge: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DueValue: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaidCurrency: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaidCurrencyValue: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public VatAmount: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IpAddress: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Country: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Currency: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CardNumber: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ErrorCode: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TransactionDate =\r\n odataObject.TransactionDate instanceof Date\r\n ? odataObject.TransactionDate\r\n : odataObject.TransactionDate\r\n ? jsonLightReadStringPropertyValue(odataObject.TransactionDate, 'Edm.DateTimeOffset', false)\r\n : undefined;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentGateway = odataObject.PaymentGateway;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ReferenceId = odataObject.ReferenceId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TrackId = odataObject.TrackId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TransactionId = odataObject.TransactionId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentId = odataObject.PaymentId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AuthorizationId = odataObject.AuthorizationId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TransactionStatus = odataObject.TransactionStatus;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TransationValue = odataObject.TransationValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerServiceCharge = odataObject.CustomerServiceCharge;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TotalServiceCharge = odataObject.TotalServiceCharge;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DueValue = odataObject.DueValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaidCurrency = odataObject.PaidCurrency;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaidCurrencyValue = odataObject.PaidCurrencyValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.VatAmount = odataObject.VatAmount;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IpAddress = odataObject.IpAddress;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Country = odataObject.Country;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Currency = odataObject.Currency;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CardNumber = odataObject.CardNumber;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ErrorCode = odataObject.ErrorCode;\r\n }\r\n}\r\n\r\n/**\r\n * GetPaymentStatusResponseData entity class.\r\n */\r\nexport class GetPaymentStatusResponseDataExtensionClass implements IGetPaymentStatusResponseData {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceId: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceStatus: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceReference: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerReference: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CreatedDate: Date;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExpiryDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExpiryTime: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceValue: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerMobile: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerEmail: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceDisplayValue: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DueDeposit: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DepositStatus: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceTransactions: IInvoiceTransaction[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceId = odataObject.InvoiceId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceStatus = odataObject.InvoiceStatus;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceReference = odataObject.InvoiceReference;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerReference = odataObject.CustomerReference;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CreatedDate =\r\n odataObject.CreatedDate instanceof Date\r\n ? odataObject.CreatedDate\r\n : odataObject.CreatedDate\r\n ? jsonLightReadStringPropertyValue(odataObject.CreatedDate, 'Edm.DateTimeOffset', false)\r\n : undefined;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExpiryDate = odataObject.ExpiryDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExpiryTime = odataObject.ExpiryTime;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceValue = odataObject.InvoiceValue ? parseFloat(odataObject.InvoiceValue) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerName = odataObject.CustomerName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerMobile = odataObject.CustomerMobile;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerEmail = odataObject.CustomerEmail;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceDisplayValue = odataObject.InvoiceDisplayValue;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DueDeposit = odataObject.DueDeposit ? parseFloat(odataObject.DueDeposit) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DepositStatus = odataObject.DepositStatus;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceTransactions = undefined;\r\n if (odataObject.InvoiceTransactions) {\r\n this.InvoiceTransactions = [];\r\n for (var i = 0; i < odataObject.InvoiceTransactions.length; i++) {\r\n if (odataObject.InvoiceTransactions[i]) {\r\n if (odataObject.InvoiceTransactions[i]['@odata.type']) {\r\n var className: string = odataObject.InvoiceTransactions[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.InvoiceTransactions[i] = new EntityClasses[className](odataObject.InvoiceTransactions[i]);\r\n }\r\n } else {\r\n this.InvoiceTransactions[i] = new InvoiceTransactionExtensionClass(odataObject.InvoiceTransactions[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceTransactions[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * GetPaymentStatusResponse entity class.\r\n */\r\nexport class GetPaymentStatusResponseExtensionClass implements IGetPaymentStatusResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsSuccess: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Data: IGetPaymentStatusResponseData;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsSuccess = odataObject.IsSuccess;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n if (odataObject.Data === null) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Data = undefined;\r\n } else if (odataObject.Data['@odata.type'] === null) {\r\n this.Data = new GetPaymentStatusResponseDataExtensionClass(odataObject.Data);\r\n } else {\r\n this.Data = odataObject?.Data!;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * ExecutePaymentResponseData entity class.\r\n */\r\nexport class ExecutePaymentResponseDataExtensionClass implements IExecutePaymentResponseData {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public InvoiceId: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsDirectPayment: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PaymentURL: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CustomerReference: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public RecurringId: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.InvoiceId = odataObject.InvoiceId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsDirectPayment = odataObject.IsDirectPayment;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PaymentURL = odataObject.PaymentURL;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CustomerReference = odataObject.CustomerReference;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.RecurringId = odataObject.RecurringId;\r\n }\r\n}\r\n\r\n/**\r\n * ExecutePaymentResponse entity class.\r\n */\r\nexport class ExecutePaymentResponseExtensionClass implements IExecutePaymentResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public IsSuccess: boolean;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Data: IExecutePaymentResponseData;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.IsSuccess = odataObject.IsSuccess;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n if (odataObject.Data === null) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Data = undefined;\r\n } else if (odataObject.Data['@odata.type'] === null) {\r\n this.Data = new ExecutePaymentResponseDataExtensionClass(odataObject.Data);\r\n } else {\r\n this.Data = odataObject?.Data!;\r\n }\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\nimport {\r\n AsyncResult,\r\n callActionOrExecute,\r\n DataServiceQuery,\r\n IContext,\r\n IDataServiceRequest,\r\n // IQueryResultSettings,\r\n // @ts-ignore -- Unused import\r\n NullResult\r\n} from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore -- Unused import\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n// @ts-ignore -- Unused import\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport * as DataServiceEntities from './MyFatoorahPaymentDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction orderExtControllerQuery(id?: number): DataServiceQuery {\r\n const key = id ? { Id: id } : null;\r\n return new DataServiceQuery('OrderExtController', 'VSICategoryEXT', DataServiceEntities.VSICategoryEXTExtensionClass, key);\r\n}\r\n\r\nexport function createInitiatePaymentInput(invoiceAmount: number, currencyIso: string): IDataServiceRequest {\r\n const query = orderExtControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'InitiatePayment',\r\n true,\r\n DataServiceEntities.InitiatePaymentResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IInitiatePaymentResponse' },\r\n { invoiceAmount: invoiceAmount, currencyIso: currencyIso }\r\n );\r\n}\r\n\r\nexport function initiatePaymentAsync(\r\n context: IContext,\r\n invoiceAmount: number,\r\n currencyIso: string\r\n): AsyncResult {\r\n const request = createInitiatePaymentInput(invoiceAmount, currencyIso);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createGetPaymentStatusInput(key: string, keyType: string): IDataServiceRequest {\r\n const query = orderExtControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetPaymentStatus',\r\n true,\r\n DataServiceEntities.GetPaymentStatusResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'none', returnEntity: 'DataServiceEntities.IGetPaymentStatusResponse' },\r\n { key: key, keyType: keyType }\r\n );\r\n}\r\n\r\nexport function getPaymentStatusAsync(\r\n context: IContext,\r\n key: string,\r\n keyType: string\r\n): AsyncResult {\r\n const request = createGetPaymentStatusInput(key, keyType);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createExecutePaymentInput(\r\n paymentMethodId: number,\r\n customerName: string,\r\n displayCurrencyIso: string,\r\n mobileCountryCode: string,\r\n customerMobile: string,\r\n customerEmail: string,\r\n invoiceValue: number,\r\n callBackUrl: string,\r\n errorUrl: string,\r\n language: string,\r\n customerReference: string\r\n): IDataServiceRequest {\r\n const query = orderExtControllerQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'ExecutePayment',\r\n true,\r\n DataServiceEntities.ExecutePaymentResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IExecutePaymentResponse' },\r\n {\r\n paymentMethodId: paymentMethodId,\r\n customerName: customerName,\r\n displayCurrencyIso: displayCurrencyIso,\r\n mobileCountryCode: mobileCountryCode,\r\n customerMobile: customerMobile,\r\n customerEmail: customerEmail,\r\n invoiceValue: invoiceValue,\r\n callBackUrl: callBackUrl,\r\n errorUrl: errorUrl,\r\n language: language,\r\n customerReference: customerReference\r\n }\r\n );\r\n}\r\n\r\nexport function executePaymentAsync(\r\n context: IContext,\r\n paymentMethodId: number,\r\n customerName: string,\r\n displayCurrencyIso: string,\r\n mobileCountryCode: string,\r\n customerMobile: string,\r\n customerEmail: string,\r\n invoiceValue: number,\r\n callBackUrl: string,\r\n errorUrl: string,\r\n language: string,\r\n customerReference: string\r\n): AsyncResult {\r\n const request = createExecutePaymentInput(\r\n paymentMethodId,\r\n customerName,\r\n displayCurrencyIso,\r\n mobileCountryCode,\r\n customerMobile,\r\n customerEmail,\r\n invoiceValue,\r\n callBackUrl,\r\n errorUrl,\r\n language,\r\n customerReference\r\n );\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { initiatePaymentAsync } from './MyFatoorahPaymentDataActionExtension.g';\r\nimport { IInitiatePaymentResponse } from './MyFatoorahPaymentDataServiceEntities.g';\r\n/**\r\n * GetMyFatoorahPaymentMethods Input Action\r\n */\r\nexport class GetMyFatoorahPaymentMethodsInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `MYFATOORAHPAYMENTMETHODS`;\r\n public getCacheObjectType = () => 'MYFATOORAHPAYMENTMETHODS';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetMyFatoorahPaymentMethodsData extends IInitiatePaymentResponse {\r\n text?: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetMyFatoorahPaymentMethodsInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetMyFatoorahPaymentMethodsInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n try{\r\n const paymentCurrencyISO = ctx.requestContext.app.config.paymentCurrencyISO || \"AED\" ;\r\n const paymentMethodList = await initiatePaymentAsync({callerContext: ctx},1,paymentCurrencyISO)\r\n return paymentMethodList;\r\n }catch(error){\r\n console.log(error)\r\n return { \r\n IsSuccess: false,\r\n Message: \"Something went wrong.\",\r\n Data: {},\r\n }\r\n }\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetMyFatoorahPaymentMethods',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetPaymentAccessToken Input Action\r\n */\r\nexport class GetPaymentAccessTokenInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `LARIPAYMENTACCESSTOKEN`;\r\n public getCacheObjectType = () => 'LARIPAYMENTACCESSTOKEN';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetPaymentAccessTokenData {\r\n token: string | undefined;\r\n success: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetPaymentAccessTokenInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getPaymentAPIToken(input: GetPaymentAccessTokenInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // const { szfPaymentDomain, szfPaymentAPIKey} = ctx.requestContext.app.config;\r\n const szfPaymentDomain = \"https://api-gateway.sandbox.ngenius-payments.com\";\r\n const szfPaymentAPIKey = \"OGNjZWM1YmMtMWUzNi00NDkyLWFlNmItMGQ4NDQ5MDdkMTAxOmVmNDQ2NGYxLWI0MTctNDlkOC05ZmZmLTA1YzA1YWQ1Nzk0YQ==\";\r\n try{\r\n const response = await Msdyn365.sendRequest(`${szfPaymentDomain}/identity/auth/access-token`, \"post\", {}, {\r\n headers: {\r\n 'Content-Type': 'application/vnd.ni-identity.v1+json',\r\n 'authorization': `Basic ${szfPaymentAPIKey}`\r\n }\r\n });\r\n if(response && (response.status===200 || response.data)){\r\n return {\r\n token : response.data?.access_token!,\r\n success: true\r\n };\r\n }else{\r\n return { token : undefined, success: false };\r\n }\r\n }catch(err){\r\n console.log(\"Payment error\",err)\r\n return { token: undefined, success: false };\r\n }\r\n \r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getPaymentAPIToken,\r\n // TODO: Give your data action a unique id\r\n id: 'GetPaymentAccessToken',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetPaymentStatus Input Action\r\n */\r\nexport class GetPaymentStatusInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `LARIPAYMENTSTATUS`;\r\n public getCacheObjectType = () => 'LARIPAYMENTSTATUS';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetPaymentStatusData {\r\n text: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetPaymentStatusInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetPaymentStatusInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetPaymentStatus',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from \"@msdyn365-commerce/core\";\r\nimport axios from \"axios\";\r\nimport querystring from 'querystring';\r\n// const querystring = require('querystring');\r\n\r\n/**\r\n * GetAtpToken Input Action\r\n */\r\n// interface IToken {\r\n// token_type: string;\r\n// expires_in: string;\r\n// ext_expires_in: string;\r\n// expires_on: string;\r\n// not_before: string;\r\n// resource: string;\r\n// access_token: string;\r\n// }\r\n\r\nexport class GetTokenInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() { }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `GetSharePointToken`;\r\n public getCacheObjectType = () => \"GetSharePointToken\";\r\n public dataCacheType = (): Msdyn365.CacheType => \"none\";\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (\r\n args: Msdyn365.ICreateActionContext\r\n): Msdyn365.IActionInput => {\r\n return new GetTokenInput();\r\n};\r\n\r\nconst fetchResourceAndTenant = async (domain: any, siteName: any): Promise<{ tenatId: string , resource: string }> => {\r\n try {\r\n await axios(\r\n `https://${domain}.sharepoint.com/sites/${siteName}/_vti_bin/client.svc/`,\r\n {\r\n method: \"GET\",\r\n headers: {\r\n Authorization: `Bearer`,\r\n }\r\n }\r\n );\r\n } catch (error) {\r\n // @ts-ignore\r\n const response = error?.response?.headers?.[\"www-authenticate\"];\r\n const regex = /realm=\"([^\"]*)\".*client_id=\"([^\"]*)\"/;\r\n const matches = response.match(regex);\r\n const tenatId = matches[1];\r\n const resource = matches[2];\r\n return { tenatId, resource };\r\n }\r\n return { tenatId: '', resource: '' }; \r\n};\r\n\r\nconst fetchToken = async (tenatId: string | undefined, resource: string | undefined, clientId: string, secret: string, domain: string): Promise => {\r\n if (tenatId && resource) {\r\n\r\n\r\n const url = `https://accounts.accesscontrol.windows.net/${tenatId}/tokens/OAuth/2`;\r\n const headers = {\r\n Authorization: 'Bearer',\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n };\r\n\r\n const data = {\r\n grant_type: 'client_credentials',\r\n client_id: `${clientId}@${tenatId}`,\r\n client_secret: `${secret}`,\r\n resource: `${resource}/${domain}.sharepoint.com@${tenatId}`,\r\n };\r\n\r\n const requestBody = querystring.stringify(data);\r\n\r\n return axios.post(url, requestBody, { headers })\r\n .then((response) => {\r\n return response?.data?.access_token\r\n })\r\n .catch((error) => {\r\n console.error('Error getting token:', error);\r\n });\r\n }\r\n return undefined;\r\n};\r\n\r\n\r\nasync function getToken(ctx: Msdyn365.IRequestContext) {\r\n let token: string | undefined;\r\n\r\n /**\r\n * we need to create sharepoint site first \r\n * and then needs to generate client id and it's secret and give all permisions\r\n * Register Add-In using the AppRegNew form\r\n * try to get token SSR\r\n */\r\n if (process.env.CURRENT_ENVIRONMENT === \"node\") {\r\n // const siteName = \"SZF\";\r\n // const domain = \"visionetsys\";\r\n // const secret = \"gWq9FCsXH2VA06zh28N/2L9SeVw1qJTe1pwxTZHe/VU=\";\r\n // const clientId = '24c715c7-8a12-4dd6-80a6-902efba3667b';\r\n\r\n // const siteName = \"SZFEcommerce\";\r\n // const domain = \"zayedfestival\";\r\n // const secret = \"j/hcvlz0kWhvlVHhlDbGwSN/VdD855DPqeFN3CO6tNk=\";\r\n // const clientId = '6a1e8d91-af56-4d02-a7d1-b601df3cbb71';\r\n\r\n const siteName = \"SZF-Ecommerce\";\r\n const domain = \"zayedfestival\";\r\n const secret = \"UFvBGJ3TdJYQ8DmIlGEe9nxNmQJYZyw4LPsfTUYT4y4=\";\r\n const clientId = '95ba8411-3d62-4e2d-95c9-dcf08f6473f1';\r\n\r\n const { tenatId, resource } = await fetchResourceAndTenant(domain, siteName);\r\n token = await fetchToken(tenatId, resource, clientId, secret, domain);\r\n }\r\n\r\n return { token: token };\r\n}\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getTokenAction(\r\n input: GetTokenInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n const response = await getToken(ctx.requestContext);\r\n return response;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getTokenAction,\r\n // TODO: Give your data action a unique id\r\n id: \"GetToken\",\r\n input: createInput,\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {IPostBOInput} from './../modules/szf-business-op-form/szf-business-op-form.view';\r\nimport axios from 'axios';\r\n/**\r\n * PostBusinessOpCase Input Action\r\n */\r\nexport interface IFile{\r\n fileData: File | undefined;\r\n base64: string | ArrayBuffer | null | undefined;\r\n}\r\nexport interface IBOCaseAPIPayLoad {\r\n szf_name: string;\r\n szf_organizationname: string;\r\n szf_email: string;\r\n szf_phoneno: string;\r\n szf_participatedwithszfpreviously: boolean;\r\n szf_typeofparticipation: string | null;\r\n szf_heardaboutus: string | null;\r\n szf_heardaboutusother: string | null;\r\n szf_categories: number;\r\n szf_countrypavilion: string | null;\r\n szf_productsshowcase: string | null;\r\n szf_type: string | null;\r\n szf_source: number;\r\n szf_kioskactivity: string | null;\r\n szf_serviceactivity: string | null;\r\n new_governmententities: string | null;\r\n new_sponsor: string | null;\r\n szf_description: string;\r\n szf_businessopportunity_Annotations?: {\r\n filename: string;\r\n isdocument: boolean;\r\n subject: string;\r\n documentbody: string;\r\n }[];\r\n \"szf_Customer_contact@odata.bind\": string;\r\n}\r\nexport class PostBusinessOpCaseInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public szf_name: string;\r\n public szf_organizationname: string;\r\n public szf_email: string;\r\n public szf_phoneno: string;\r\n public szf_participatedwithszfpreviously: boolean;\r\n public szf_typeofparticipation: string;\r\n public szf_heardaboutus: string;\r\n public szf_heardaboutusother: string;\r\n public szf_categories: number;\r\n public szf_countrypavilion: string;\r\n public szf_productsshowcase: string;\r\n public szf_type: string;\r\n public szf_kioskactivity: string;\r\n public szf_serviceactivity: string;\r\n public new_governmententities: string;\r\n public new_sponsor: string;\r\n public szf_description: string;\r\n public tradeLicenseFile: IFile;\r\n public presentationFile: IFile;\r\n public CRMtoken: string | undefined;\r\n public contactID: string | undefined;\r\n // public termNcondition: boolean;\r\n // public updateNpromotion: boolean;\r\n constructor(data:IPostBOInput) {\r\n this.szf_name = data.fullName;\r\n this.szf_organizationname= data.organizationName;\r\n this.szf_email= data.email;\r\n this.szf_phoneno= `${data.countryCode}${data.phone}`;\r\n this.szf_participatedwithszfpreviously= data.previousParticipant ==='1' ? true: false;\r\n this.szf_typeofparticipation= data.previousParticipantType;\r\n this.szf_heardaboutus= data.hearAbout;\r\n this.szf_heardaboutusother= data.others;\r\n this.szf_categories= data.categories;\r\n this.szf_countrypavilion= data.listOfCountryPavilions.toString();\r\n this.szf_productsshowcase= data.typeOfProducts.toString();\r\n this.szf_type= data.typeOfRestaurantsCoffeeShops ? data.typeOfRestaurantsCoffeeShops : data.typeOfKiosksFoodTrucks;\r\n this.szf_kioskactivity= data.kioskActivity;\r\n this.szf_serviceactivity= data.serviceActivity;\r\n this.new_governmententities= data.listOfGovernmentEntities.toString();\r\n this.new_sponsor= data.typeOfSponsor;\r\n this.szf_description= data.description;\r\n this.CRMtoken= data.CRMtoken;\r\n this.contactID= data.contactID;\r\n this.tradeLicenseFile = {\r\n fileData: data.tradeLicenseFile,\r\n base64: data.tradeLicensefileBase64Code\r\n };\r\n this.presentationFile = {\r\n fileData: data.presentationFile,\r\n base64: data.presentationfileBase64Code\r\n };\r\n // this.termNcondition= data.termNcondition;\r\n // this.updateNpromotion= data.updateNpromotion;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SZFBUSINESSOPPCASE`;\r\n public getCacheObjectType = () => 'SZFBUSINESSOPPCASE';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPostBusinessOpCaseData {\r\n status: boolean;\r\n msg:string | undefined;\r\n id: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createBOCaseInput = (args: Msdyn365.ICreateActionContext,inputData:IPostBOInput): Msdyn365.IActionInput => {\r\n return new PostBusinessOpCaseInput(inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function BOCaseDataAction(input: PostBusinessOpCaseInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n let data: IBOCaseAPIPayLoad = {\r\n \"szf_name\": input.szf_name,\r\n \"szf_organizationname\": input.szf_organizationname,\r\n \"szf_email\": input.szf_email,\r\n \"szf_phoneno\": input.szf_phoneno,\r\n \"szf_participatedwithszfpreviously\": input.szf_participatedwithszfpreviously,\r\n \"szf_typeofparticipation\": input.szf_typeofparticipation ? input.szf_typeofparticipation : null,\r\n \"szf_heardaboutus\": input.szf_heardaboutus ? input.szf_heardaboutus : null,\r\n \"szf_heardaboutusother\": input.szf_heardaboutusother ? input.szf_heardaboutusother : null,\r\n \"szf_categories\": input.szf_categories,\r\n \"szf_countrypavilion\": input.szf_countrypavilion ? input.szf_countrypavilion : null,\r\n \"szf_productsshowcase\": input.szf_productsshowcase ? input.szf_productsshowcase : null,\r\n \"szf_type\": input.szf_type ? input.szf_type : null,\r\n \"szf_source\": 1,\r\n \"szf_kioskactivity\": input.szf_kioskactivity ? input.szf_kioskactivity : null,\r\n \"szf_serviceactivity\": input.szf_serviceactivity ? input.szf_serviceactivity : null,\r\n \"new_governmententities\": input.new_governmententities ? input.new_governmententities : null,\r\n \"new_sponsor\": input.new_sponsor ? input.new_sponsor : null,\r\n \"szf_description\": input.szf_description,\r\n \"szf_Customer_contact@odata.bind\": `/contacts(${input.contactID})` //test contact\r\n };\r\n if(input.tradeLicenseFile && input.tradeLicenseFile.fileData && input.tradeLicenseFile.fileData?.name){\r\n if(data.szf_businessopportunity_Annotations){\r\n data = {\r\n ...data,\r\n \"szf_businessopportunity_Annotations\": [\r\n ...data.szf_businessopportunity_Annotations,\r\n {\r\n \"filename\" :`${input.tradeLicenseFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Trade License`,\r\n \"documentbody\" : `${input.tradeLicenseFile.base64}`\r\n }\r\n ]\r\n }\r\n }else{\r\n data = {\r\n ...data,\r\n \"szf_businessopportunity_Annotations\": [\r\n {\r\n \"filename\" :`${input.tradeLicenseFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Trade License`,\r\n \"documentbody\" : `${input.tradeLicenseFile.base64}`\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n if(input.presentationFile && input.presentationFile.fileData && input.presentationFile.fileData?.name){\r\n if(data.szf_businessopportunity_Annotations){\r\n data = {\r\n ...data,\r\n \"szf_businessopportunity_Annotations\": [\r\n ...data.szf_businessopportunity_Annotations,\r\n {\r\n \"filename\" :`${input.presentationFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Presentation`,\r\n \"documentbody\" : `${input.presentationFile.base64}`\r\n }\r\n ]\r\n }\r\n }else{\r\n data = {\r\n ...data,\r\n \"szf_businessopportunity_Annotations\": [\r\n {\r\n \"filename\" :`${input.presentationFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Presentation`,\r\n \"documentbody\" : `${input.presentationFile.base64}`\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n const response = await axios.post(`${szfCRMDomain}/api/data/v9.2//szf_businessopportunities`,data,{\r\n headers: { \r\n 'Prefer': 'return=representation', \r\n 'Content-Type': 'application/json', \r\n 'Authorization': `Bearer ${input.CRMtoken}`,\r\n 'Cookie': 'ARRAffinity=a0cabaca1e89d18f0f4123d056dbb9e1cefb17d8da01b66962b2dc7ffb4a189deb29bb4b19df1459d2ea781b605f33064b9fea1f144b525b9d7676625c4ffb5408DB5EAB3C80FFDC613303632; ReqClientId=797635cc-3220-4d23-95ab-4c1fd0f38f88; orgId=df0699dc-bf43-4643-8928-2934590e2913'\r\n },\r\n timeout: 25000\r\n })\r\n\r\n // const response = await Msdyn365.sendRequest(`https://operations-szf-uat.crm15.dynamics.com/api/data/v9.2//szf_businessopportunities`, \"post\", data, {\r\n // headers: {\r\n // 'Prefer': 'return=representation',\r\n // 'Content-Type': 'application/json',\r\n // 'content-length': '999999999999',\r\n // 'Authorization': `Bearer ${input.CRMtoken}`,\r\n // 'Cookie': 'ARRAffinity=a0cabaca1e89d18f0f4123d056dbb9e1cefb17d8da01b66962b2dc7ffb4a189deb29bb4b19df1459d2ea781b605f33064b9fea1f144b525b9d7676625c4ffb5408DB5EAB3C80FFDC613303632; ReqClientId=797635cc-3220-4d23-95ab-4c1fd0f38f88; orgId=df0699dc-bf43-4643-8928-2934590e2913'\r\n // }\r\n // });\r\n if(response && response.data && response.data.szf_businessopportunityid){\r\n return {\r\n status: true,\r\n msg: 'success',\r\n id: response.data.szf_businessopportunityid\r\n };\r\n }else if (response && response.data && response.data.error){\r\n return {\r\n status: false,\r\n msg: response.data.error.message,\r\n id: undefined\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n msg: undefined,\r\n id: undefined\r\n };\r\n }\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >BOCaseDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'PostBusinessOpCase',\r\n input: createBOCaseInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {IPostBOInput} from './../modules/szf-business-op-form/szf-business-op-form.view';\r\nimport axios from 'axios';\r\n\r\n\r\nexport interface IFile{\r\n fileData: File | undefined;\r\n base64: string | ArrayBuffer | null | undefined;\r\n}\r\n\r\n/**\r\n * PostCheckoutDataToCrm Input Action\r\n */\r\nexport class PostCheckoutDataToCrmInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public szf_name: string;\r\n public szf_organizationname: string;\r\n public szf_email: string;\r\n public szf_phoneno: string;\r\n public szf_participatedwithszfpreviously: boolean;\r\n public szf_typeofparticipation: string;\r\n public szf_heardaboutus: string;\r\n public szf_heardaboutusother: string;\r\n public szf_categories: number;\r\n public szf_countrypavilion: string;\r\n public szf_productsshowcase: string;\r\n public szf_type: string;\r\n public szf_kioskactivity: string;\r\n public szf_serviceactivity: string;\r\n public szf_description: string;\r\n public tradeLicenseFile: IFile;\r\n public presentationFile: IFile;\r\n public CRMtoken: string | undefined;\r\n public contactID: string | undefined;\r\n // public termNcondition: boolean;\r\n // public updateNpromotion: boolean;\r\n constructor(data:IPostBOInput) {\r\n this.szf_name = data.fullName;\r\n this.szf_organizationname= data.organizationName;\r\n this.szf_email= data.email;\r\n this.szf_phoneno= `${data.countryCode}${data.phone}`;\r\n this.szf_participatedwithszfpreviously= data.previousParticipant ==='1' ? true: false;\r\n this.szf_typeofparticipation= data.previousParticipantType;\r\n this.szf_heardaboutus= data.hearAbout;\r\n this.szf_heardaboutusother= data.others;\r\n this.szf_categories= data.categories;\r\n this.szf_countrypavilion= data.listOfCountryPavilions.toString();\r\n this.szf_productsshowcase= data.typeOfProducts.toString();\r\n this.szf_type= data.typeOfRestaurantsCoffeeShops ? data.typeOfRestaurantsCoffeeShops : data.typeOfKiosksFoodTrucks;\r\n this.szf_kioskactivity= data.kioskActivity;\r\n this.szf_serviceactivity= data.serviceActivity;\r\n this.szf_description= data.description;\r\n this.CRMtoken= data.CRMtoken;\r\n this.contactID= data.contactID;\r\n this.tradeLicenseFile = {\r\n fileData: data.tradeLicenseFile,\r\n base64: data.tradeLicensefileBase64Code\r\n };\r\n this.presentationFile = {\r\n fileData: data.presentationFile,\r\n base64: data.presentationfileBase64Code\r\n };\r\n // this.termNcondition= data.termNcondition;\r\n // this.updateNpromotion= data.updateNpromotion;\r\n }\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMCHECKOUT`;\r\n public getCacheObjectType = () => 'CRMCHECKOUT';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPostCheckoutDataToCrmData {\r\n status: boolean;\r\n msg:string | undefined;\r\n id: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (\r\n args: Msdyn365.ICreateActionContext,\r\n inputData:IPostBOInput\r\n ): Msdyn365.IActionInput => {\r\n return new PostCheckoutDataToCrmInput(inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: PostCheckoutDataToCrmInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // return { text: 'Static data from action' };\r\n\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n const data = {\r\n \"szf_name\": input.szf_name,\r\n \"szf_organizationname\": input.szf_organizationname,\r\n \"szf_email\": input.szf_email,\r\n \"szf_phoneno\": input.szf_phoneno,\r\n \"szf_participatedwithszfpreviously\": input.szf_participatedwithszfpreviously,\r\n \"szf_typeofparticipation\": input.szf_typeofparticipation ? input.szf_typeofparticipation : null,\r\n \"szf_heardaboutus\": input.szf_heardaboutus ? input.szf_heardaboutus : null,\r\n \"szf_heardaboutusother\": input.szf_heardaboutusother ? input.szf_heardaboutusother : null,\r\n \"szf_categories\": input.szf_categories,\r\n \"szf_countrypavilion\": input.szf_countrypavilion ? input.szf_countrypavilion : null,\r\n \"szf_productsshowcase\": input.szf_productsshowcase ? input.szf_productsshowcase : null,\r\n \"szf_type\": input.szf_type ? input.szf_type : null,\r\n \"szf_source\": 1,\r\n \"szf_kioskactivity\": input.szf_kioskactivity ? input.szf_kioskactivity : null,\r\n \"szf_serviceactivity\": input.szf_serviceactivity ? input.szf_serviceactivity : null,\r\n \"szf_description\": input.szf_description,\r\n \"szf_businessopportunity_Annotations\": [\r\n {\r\n \"filename\" :`${input.tradeLicenseFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Trade License`,\r\n \"documentbody\" : `${input.tradeLicenseFile.base64}`\r\n },\r\n {\r\n \"filename\" :`${input.presentationFile.fileData?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`Presentation`,\r\n \"documentbody\" : `${input.presentationFile.base64}`\r\n }\r\n ],\r\n \"szf_Customer_contact@odata.bind\": `/contacts(${input.contactID})` //test contact\r\n };\r\n const response = await axios.post(`${szfCRMDomain}/api/data/v9.2//szf_businessopportunities`,data,{\r\n headers: { \r\n 'Prefer': 'return=representation', \r\n 'Content-Type': 'application/json', \r\n 'Authorization': `Bearer ${input.CRMtoken}`,\r\n 'Cookie': 'ARRAffinity=a0cabaca1e89d18f0f4123d056dbb9e1cefb17d8da01b66962b2dc7ffb4a189deb29bb4b19df1459d2ea781b605f33064b9fea1f144b525b9d7676625c4ffb5408DB5EAB3C80FFDC613303632; ReqClientId=797635cc-3220-4d23-95ab-4c1fd0f38f88; orgId=df0699dc-bf43-4643-8928-2934590e2913'\r\n },\r\n timeout: 25000\r\n })\r\n\r\n if( response \r\n && response.data \r\n // && response.data.szf_businessopportunityid\r\n ){\r\n return {\r\n status: true,\r\n msg: 'success',\r\n id: undefined\r\n // id: response.data.szf_businessopportunityid\r\n };\r\n }else if (response && response.data && response.data.error){\r\n return {\r\n status: false,\r\n msg: response.data.error.message,\r\n id: undefined\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n msg: undefined,\r\n id: undefined\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'PostCheckoutDataToCrm',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * PostContactUsForm Input Action\r\n */\r\n\r\nimport { IPostContactUsFormInput } from './../modules/szf-contact-us/szf-contact-us.view';\r\nexport class PostContactUsFormInput implements Msdyn365.IActionInput {\r\n public Inquiry:string;\r\n public description: string;\r\n public email: string;\r\n public firstName: string;\r\n public lastName: string;\r\n public phone: string;\r\n // public termNcondition: boolean;\r\n public updateNpromotion: boolean;\r\n public fileBase64Code: string | ArrayBuffer | null | undefined;\r\n public file: File | undefined | null;\r\n public token: string | undefined;\r\n public contactID: string | undefined;\r\n constructor(\r\n data:IPostContactUsFormInput,\r\n file: File | undefined | null,\r\n fileBase64Code: string | ArrayBuffer | null | undefined,\r\n CRMtoken: string | undefined,\r\n contactID: string | undefined\r\n ) {\r\n this.Inquiry = data.Inquiry;\r\n this.description = data.description;\r\n this.email = data.email;\r\n this.firstName = data.firstName;\r\n this.lastName = data.lastName;\r\n this.phone = `+${data.countryCode}${data.phone}`;\r\n // this.termNcondition = data.termNcondition;\r\n this.updateNpromotion = data.updateNpromotion;\r\n this.file = file;\r\n this.fileBase64Code = fileBase64Code;\r\n this.token = CRMtoken;\r\n this.contactID = contactID;\r\n }\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CONTACTUSFORM`;\r\n public getCacheObjectType = () => 'CONTACTUSFORM';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPostContactUsFormData {\r\n status: boolean;\r\n msg:string | undefined;\r\n id: string | undefined;\r\n}\r\n\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst contactFormInput = (args: Msdyn365.ICreateActionContext,inputData:IPostContactUsFormInput,file: File | undefined | null,fileBase64Code: string | ArrayBuffer | null | undefined , CRMtoken: string | undefined, contactID:string|undefined ): Msdyn365.IActionInput => {\r\n return new PostContactUsFormInput(inputData,file,fileBase64Code,CRMtoken,contactID);\r\n};\r\n\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function contactFormDataAction(input: PostContactUsFormInput, ctx: Msdyn365.IActionContext): Promise {\r\n try{\r\n const token = input.token;\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n let data = {};\r\n if(input.file && input.file.name){\r\n data = {\r\n \"title\" : `Case by {${input.firstName} ${input.lastName}_${input.email}}`,\r\n \"customerid_contact@odata.bind\": `/contacts(${input.contactID})`, //Contact, to be replaced by contact created\r\n \"szf_CaseType@odata.bind\": `/szf_casetypes(${input.Inquiry})`, //Get case type first, then replace it with the ID\r\n \"caseorigincode\":3, //Website, will remain hardcoded\r\n \"prioritycode\": 2, //Normal, will remain hardcoded\r\n \"szf_description\":`${input.description}`, // Details of case\r\n \"Incident_Annotation\":[{ //File\r\n \"filename\" :`${input.file?.name}`,\r\n \"isdocument\" : true,\r\n \"subject\":`${input.file?.name}`,\r\n \"documentbody\" : `${input.fileBase64Code}`\r\n }]\r\n };\r\n }else{\r\n data = {\r\n \"title\" : `Case by {${input.firstName} ${input.lastName}_${input.email}}`,\r\n \"customerid_contact@odata.bind\": `/contacts(${input.contactID})`, //Contact, to be replaced by contact created\r\n \"szf_CaseType@odata.bind\": `/szf_casetypes(${input.Inquiry})`, //Get case type first, then replace it with the ID\r\n \"caseorigincode\":3, //Website, will remain hardcoded\r\n \"prioritycode\": 2, //Normal, will remain hardcoded\r\n \"szf_description\":`${input.description}`, // Details of case\r\n };\r\n }\r\n \r\n const response = await Msdyn365.sendRequest(`${szfCRMDomain}/api/data/v9.2//incidents`, \"post\", data, {\r\n timeout: 15000,\r\n headers: {\r\n 'Prefer': 'return=representation',\r\n 'Authorization':`Bearer ${token}`,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n if(response && response.data && response.data.incidentid){\r\n return {\r\n status: true,\r\n msg: 'success',\r\n id: response.data.incidentid\r\n };\r\n }else if (response && response.data && response.data.error){\r\n return {\r\n status: false,\r\n msg: response.data.error.message,\r\n id: undefined\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n msg: undefined,\r\n id: undefined\r\n };\r\n }\r\n }catch(error){\r\n return {\r\n status: false,\r\n id: undefined,\r\n msg: 'Something went wrong, Please try again later.'\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >contactFormDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'PostContactUsForm',\r\n input: contactFormInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INewContactCreation } from './../modules/szf-contact-us/szf-contact-us.view';\r\n/**\r\n * PostNewContact Input Action\r\n */\r\nexport class PostNewContactInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string;\r\n public firstName: string;\r\n public lastName: string;\r\n public email: string;\r\n public phone: string;\r\n public countryCode: string;\r\n public updateNpromotion: boolean;\r\n constructor(token:string,data:INewContactCreation) {\r\n this.token= token;\r\n this.email= data.email;\r\n this.firstName= data.firstName;\r\n this.lastName= data.lastName;\r\n this.phone= data.phone;\r\n this.countryCode= data.countryCode;\r\n this.updateNpromotion= data.updateNpromotion;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SZFCREATECONTACT`;\r\n public getCacheObjectType = () => 'SZFCREATECONTACT';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPostNewContactData {\r\n status: boolean;\r\n msg:string | undefined;\r\n id: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createNewContactInput = (args: Msdyn365.ICreateActionContext,token:string, inputData:INewContactCreation): Msdyn365.IActionInput => {\r\n return new PostNewContactInput(token, inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function createNewContactDataAction(input: PostNewContactInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n const token = input.token;\r\n const szfCRMDomain = ctx.requestContext.app.config.szfCRMDomain;\r\n const data = {\r\n \"firstname\": input.firstName,\r\n \"lastname\": input.lastName,\r\n \"emailaddress1\": input.email,\r\n \"szf_mblregion\": input.countryCode,\r\n \"szf_mbllocalnumber\": input.phone,\r\n \"donotsendmm\": !input.updateNpromotion\r\n };\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomain}/api/data/v9.2//contacts`, \"post\", data, {\r\n headers: {\r\n 'Prefer': 'return=representation',\r\n 'MSCRM.SuppressDuplicateDetection': 'false',\r\n 'Authorization':`Bearer ${token}`,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n if(response && response.data && response.data.contactid){\r\n return {\r\n status: true,\r\n msg: 'success',\r\n id: response.data.contactid\r\n };\r\n }else if (response && response.data && response.data.error){\r\n return {\r\n status: false,\r\n msg: response.data.error.message,\r\n id: undefined\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n msg: undefined,\r\n id: undefined\r\n };\r\n }\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n // return { text: 'Static data from action' };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >createNewContactDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'PostNewContact',\r\n input: createNewContactInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ITefanAwwalCaseInput } from './../modules/szf-tefan-awal-form/szf-tefan-awal-form.view';\r\n/**\r\n * PostTefanawwalForm Input Action\r\n */\r\n\r\n export interface ICategoryDataActionInput {\r\n fullName: string;\r\n contactNumber: string;\r\n email: string;\r\n emiratesID: string;\r\n nationality: string;\r\n categoryId: string;\r\n termsAndCondition: boolean;\r\n categories?: string[];\r\n}\r\nexport class PostTefanawwalFormInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n public token: string | undefined;\r\n public target: ICategoryDataActionInput[]\r\n constructor(data: ITefanAwwalCaseInput) {\r\n this.token=data.token;\r\n this.target = data.target;\r\n }\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `TEFANAWWALCASE`;\r\n public getCacheObjectType = () => 'TEFANAWWALCASE';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IPostTefanawwalFormData {\r\n status: boolean;\r\n msg: string | undefined;\r\n id: string | undefined;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst tefanAwwalCaseCreateInput = (args: Msdyn365.ICreateActionContext, inputData: ITefanAwwalCaseInput): Msdyn365.IActionInput => {\r\n return new PostTefanawwalFormInput(inputData);\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function tefanAwwalDataAction(input: PostTefanawwalFormInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n try{\r\n const token = input.token;\r\n const szfCRMDomainForTefanAwwal = ctx.requestContext.app.config.szfCRMDomainForTefanAwwal;\r\n const data = {\r\n Targets : input.target.map((i) => {\r\n return {\r\n \"szf_name\" : i.fullName ? i.fullName : '',\r\n \"szf_Nationality@odata.bind\" : `/szf_nationalities(${i.nationality ? i.nationality : ''})`,\r\n \"szf_Category@odata.bind\" : `/szf_tefanalawwalcategories(${i.categoryId ? i.categoryId : ''})`,\r\n \"szf_emiratesid\" : i.emiratesID ? i.emiratesID : '',\r\n \"szf_email\" : i.email ? i.email : '',\r\n \"szf_contactnumber\" : i.contactNumber ? i.contactNumber : '',\r\n \"szf_iacceptfield\" : i.termsAndCondition ? i.termsAndCondition : '',\r\n \"@odata.type\": \"Microsoft.Dynamics.CRM.szf_tefanalawwal\"\r\n };\r\n })\r\n }\r\n const response = await Msdyn365.sendRequest(`${szfCRMDomainForTefanAwwal}/api/data/v9.1/szf_tefanalawwals/Microsoft.Dynamics.CRM.CreateMultiple`, \"post\", data, {\r\n timeout: 15000,\r\n headers: {\r\n 'Prefer': 'return=representation',\r\n 'Authorization':`Bearer ${token}`,\r\n 'Content-Type': 'application/json'\r\n }\r\n }); \r\n if(response && response.data && response.data.Ids && response.data.Ids.length > 0){\r\n return {\r\n status: true,\r\n msg: 'success',\r\n id: response.data.Ids[0]\r\n };\r\n }else if (response && response.data && response.data.error){\r\n return {\r\n status: false,\r\n msg: response.data.error.message,\r\n id: undefined\r\n };\r\n }else{\r\n return {\r\n status: false,\r\n msg: undefined,\r\n id: undefined\r\n };\r\n }\r\n }catch(error){\r\n return {\r\n status: false,\r\n id: undefined,\r\n msg: 'Something went wrong, Please try again later.'\r\n };\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >tefanAwwalDataAction,\r\n // TODO: Give your data action a unique id\r\n id: 'PostTefanawwalForm',\r\n input: tefanAwwalCaseCreateInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n { \n const actionPath = 'actions/create-order-for-payment.action';\n binding.dataActions[actionPath] = require('partner/actions/create-order-for-payment.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-categories.action';\n binding.dataActions[actionPath] = require('partner/actions/get-categories.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-category-details.action';\n binding.dataActions[actionPath] = require('partner/actions/get-category-details.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-crm-category-ids-for-tefanawwal.action';\n binding.dataActions[actionPath] = require('partner/actions/get-crm-category-ids-for-tefanawwal.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-crm-existing-category-record-for-tefanawwal.action';\n binding.dataActions[actionPath] = require('partner/actions/get-crm-existing-category-record-for-tefanawwal.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-crm-nationality-ids-for-tefanawwal.action';\n binding.dataActions[actionPath] = require('partner/actions/get-crm-nationality-ids-for-tefanawwal.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-crm-token-for-tefan-awaal-category.action';\n binding.dataActions[actionPath] = require('partner/actions/get-crm-token-for-tefan-awaal-category.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-crm-token.action';\n binding.dataActions[actionPath] = require('partner/actions/get-crm-token.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-existing-contact.action';\n binding.dataActions[actionPath] = require('partner/actions/get-existing-contact.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-fatoorah-payment-state.action';\n binding.dataActions[actionPath] = require('partner/actions/get-fatoorah-payment-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-inquery-options.action';\n binding.dataActions[actionPath] = require('partner/actions/get-inquery-options.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-my-fatoorah-payment-methods.action';\n binding.dataActions[actionPath] = require('partner/actions/get-my-fatoorah-payment-methods.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-payment-access-token.action';\n binding.dataActions[actionPath] = require('partner/actions/get-payment-access-token.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-payment-status.action';\n binding.dataActions[actionPath] = require('partner/actions/get-payment-status.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-sharepoint-token.action';\n binding.dataActions[actionPath] = require('partner/actions/get-sharepoint-token.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-business-op-case.action';\n binding.dataActions[actionPath] = require('partner/actions/post-business-op-case.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-checkout-data-to-crm.action';\n binding.dataActions[actionPath] = require('partner/actions/post-checkout-data-to-crm.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-contact-us-form.action';\n binding.dataActions[actionPath] = require('partner/actions/post-contact-us-form.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-gates.action';\n binding.dataActions[actionPath] = require('partner/actions/post-gates.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-new-contact.action';\n binding.dataActions[actionPath] = require('partner/actions/post-new-contact.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/post-tefanawwal-form.action';\n binding.dataActions[actionPath] = require('partner/actions/post-tefanawwal-form.action');\n registerActionId(actionPath);\n }\n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.packageDataActions = {};\n window.__bindings__.packageDataActions['__local__'] = {\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["CreateOrderForPaymentInput","constructor","data","getCacheKey","getCacheObjectType","dataCacheType","this","LariToken","token","amount","emailAddress","email","merchantAttributesRedirectUrl","url","Msdyn365","action","async","input","ctx","response","headers","status","URL","success","error","undefined","err","console","log","id","createInput","args","inputData","GetCategoriesInput","recId","Number","requestContext","urlTokens","recordId","getCategories","getCategoriesAsync","callerContext","apiSettings","channelId","filteredCategories","filter","item","ParentCategory","parentCategory","find","RecordId","GetCategoryDetailsInput","_ctx$requestContext$q","categoryId","query","categoryDetails","GetCrmCategoryIdsForTefanawwalInput","szfCRMDomainForTefanAwwal","app","config","value","length","createCategoryIdsInput","GetCrmExistingCategoryRecordForTefanawwalInput","emiratesID","ResponseMessage","JSON","parse","createExistingCategoryRecordInput","GetCrmNationalityIdsForTefanawwalInput","createNationalityIdsInput","GetCrmTokenForTefanAwaalCategoryInput","szfCRMClientSecretForTefanAwwal","szfCRMClientIdForTefanAwwal","qs","client_id","client_secret","grant_type","resource","access_token","GetCrmTokenInput","szfCRMDomain","szfCRMClientSecret","GetExistingContactInput","phone","contactid","createExistingContactInput","GetFatoorahPaymentStateInput","paymentState","GetInqueryOptionsInput","createInqueryOptionInput","VSICategoryEXTExtensionClass","odataObject","parseInt","Id","Name","DisplayOrder","parseFloat","Description","TextValueTranslation","i","className","substr","lastIndexOf","concat","EntityClasses","ExtensionProperties","ij","className1","PaymentMethodExtensionClass","PaymentMethodId","PaymentMethodAr","PaymentMethodEn","PaymentMethodCode","IsDirectPayment","ServiceCharge","TotalAmount","CurrencyIso","ImageUrl","IsEmbeddedSupported","PaymentCurrencyIso","DataExtensionClass","PaymentMethods","InitiatePaymentResponseExtensionClass","IsSuccess","Message","Data","_odataObject","orderExtControllerQuery","key","DataServiceQuery","DataServiceEntities","initiatePaymentAsync","context","invoiceAmount","currencyIso","request","createDataServiceRequestForOperation","bypassCache","returnEntity","createInitiatePaymentInput","callActionOrExecute","GetMyFatoorahPaymentMethodsInput","paymentCurrencyISO","GetPaymentAccessTokenInput","_response$data","GetPaymentStatusInput","text","GetTokenInput","getToken","PostBusinessOpCaseInput","szf_name","fullName","szf_organizationname","organizationName","szf_email","szf_phoneno","countryCode","szf_participatedwithszfpreviously","previousParticipant","szf_typeofparticipation","previousParticipantType","szf_heardaboutus","hearAbout","szf_heardaboutusother","others","szf_categories","categories","szf_countrypavilion","listOfCountryPavilions","toString","szf_productsshowcase","typeOfProducts","szf_type","typeOfRestaurantsCoffeeShops","typeOfKiosksFoodTrucks","szf_kioskactivity","kioskActivity","szf_serviceactivity","serviceActivity","new_governmententities","listOfGovernmentEntities","new_sponsor","typeOfSponsor","szf_description","description","CRMtoken","contactID","tradeLicenseFile","fileData","base64","tradeLicensefileBase64Code","presentationFile","presentationfileBase64Code","_input$tradeLicenseFi","_input$presentationFi","_input$tradeLicenseFi2","_input$tradeLicenseFi3","_input$presentationFi2","_input$presentationFi3","name","szf_businessopportunity_Annotations","_objectSpread","axios","timeout","szf_businessopportunityid","msg","message","createBOCaseInput","PostCheckoutDataToCrmInput","PostContactUsFormInput","file","fileBase64Code","Inquiry","firstName","lastName","updateNpromotion","_input$file","_input$file2","incidentid","contactFormInput","PostNewContactInput","createNewContactInput","PostTefanawwalFormInput","target","Targets","map","nationality","contactNumber","termsAndCondition","Ids","tefanAwwalCaseCreateInput","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","forEach","exportName","Action","require","window","__bindings__","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}