{"version":3,"sources":["webpack:///./src/pages/integration/ZapierIntegration.vue?d02b","webpack:///./src/pages/integration/ZapierIntegration.vue","webpack:///./src/pages/integration/ZapierIntegration.vue?1873","webpack:///./src/pages/integration/ZapierIntegration.vue?a797","webpack:///./src/pages/integration/ZapierIntegration.vue?9439"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","requestPayload","canCreate","on","onSubmit","scopedSlots","_u","key","fn","ref","isLoading","onLocationChange","model","value","callback","$$v","pulsemAccountId","expression","staticClass","_v","_s","loadInformationErrorMessage","apiKey","_e","staticRenderFns","locationValid","loadingInformation","requests","post","response","data","settings","message","Boolean","components","AccountIdInput","TechTaskCard","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,eAAe,CAACE,MAAM,CAAC,YAAY,qBAAqB,MAAQ,2BAA2B,kBAAkBN,EAAIO,eAAe,kBAAkBP,EAAIQ,WAAWC,GAAG,CAAC,YAAYT,EAAIU,UAAUC,YAAYX,EAAIY,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,SAASC,GACjV,IAAIC,EAAYD,EAAIC,UACpB,MAAO,CAACZ,EAAG,iBAAiB,CAACE,MAAM,CAAC,SAAWU,EAAU,QAAUA,GAAWP,GAAG,CAAC,cAAgBT,EAAIiB,kBAAkBC,MAAM,CAACC,MAAOnB,EAAmB,gBAAEoB,SAAS,SAAUC,GAAMrB,EAAIsB,gBAAgBD,GAAKE,WAAW,qBAAsBvB,EAA+B,4BAAEI,EAAG,KAAK,CAACoB,YAAY,2BAA2B,CAACxB,EAAIyB,GAAG,IAAIzB,EAAI0B,GAAG1B,EAAI2B,6BAA6B,OAAQ3B,EAAU,OAAE,CAACI,EAAG,MAAMA,EAAG,KAAK,CAACJ,EAAIyB,GAAG,0BAA0BzB,EAAIyB,GAAG,cAAcrB,EAAG,SAAS,CAACoB,YAAY,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Y,eACd,EACA5C,EACA+B,GACA,EACA,KACA,WACA,MAIa,aAAAa,E,kECnBf","file":"js/chunk-57fb291b.dfb8b9cd.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('TechTaskCard',{attrs:{\"task-name\":\"zapier-integration\",\"title\":\"Setup Zapier Integration\",\"request-payload\":_vm.requestPayload,\"disable-button\":!_vm.canCreate},on:{\"on-submit\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar isLoading = ref.isLoading;\nreturn [_c('AccountIdInput',{attrs:{\"disabled\":isLoading,\"loading\":isLoading},on:{\"onStateChange\":_vm.onLocationChange},model:{value:(_vm.pulsemAccountId),callback:function ($$v) {_vm.pulsemAccountId=$$v},expression:\"pulsemAccountId\"}}),(_vm.loadInformationErrorMessage)?_c('h3',{staticClass:\"load-info-error-message\"},[_vm._v(\" \"+_vm._s(_vm.loadInformationErrorMessage)+\" \")]):(_vm.apiKey)?[_c('br'),_c('h3',[_vm._v(\" Connection Details \")]),_vm._v(\" API Key: \"),_c('strong',{staticClass:\"api-key\"},[_vm._v(\" \"+_vm._s(_vm.apiKey)+\" \")]),_c('br'),_vm._v(\" pulseM Account ID: \"),_c('strong',{staticClass:\"api-key\"},[_vm._v(\" \"+_vm._s(_vm.pulsemAccountId)+\" \")]),_c('br'),_c('br'),_vm._v(\" Use these details during Zap creation when Zapier asks you \\\"Allow Zapier to access your pulseM Account?\\\" \")]:(_vm.canCreate)?[_c('br'),_vm._v(\" Click \\\"Submit\\\" to create Zapier connection details. You will enter these when Zapier asks you \\\"Allow Zapier to access your pulseM Account?\\\" \")]:_vm._e()]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\nimport AccountIdInput from '@/components/ui/AccountIdInput.vue'\nimport requests from '@/helpers/requests'\nimport TechTaskCard from '@/components/ui/TechTaskCard.vue'\n\n\ninterface RequestPayload {\n pulsemAccountId: number|null;\n}\n\n\ninterface Settings {\n id: number;\n active: 0|1;\n apiKey: {\n apiKey: string;\n };\n settings: {\n _pulsemAccountId: number;\n };\n}\n\n\ninterface LoadData {\n settings: Settings;\n}\n\n\ninterface LoadResponse {\n data: {\n settings: Settings|null;\n };\n message: string;\n status: number;\n}\n\n\n@Component({\n components: {\n AccountIdInput,\n TechTaskCard\n }\n})\nexport default class SetupSuccessWareIntegration extends Vue {\n locationValid = false\n loadingInformation = false\n loadInformationErrorMessage: string|null = null\n pulsemAccountId: number|null = null\n apiKey: string|null = null\n\n get requestPayload(): RequestPayload {\n return {\n pulsemAccountId: this.pulsemAccountId\n }\n }\n\n async onLocationChange(locationValid: boolean) {\n this.loadInformationErrorMessage = null\n if (locationValid) {\n this.loadingInformation = true\n this.apiKey = null\n try {\n const response = await requests.post('/support/zapier/load-integration', {\n pulsemAccountId: this.pulsemAccountId\n }) as LoadResponse\n this.apiKey = response.data.settings?.apiKey.apiKey || null\n this.locationValid = locationValid\n } catch(e) {\n this.loadInformationErrorMessage = e.message\n this.locationValid = false\n }\n this.loadingInformation = false\n } else {\n this.locationValid = false\n this.loadingInformation = false\n }\n }\n\n onSubmit() {\n this.onLocationChange(this.locationValid)\n }\n\n get canCreate() {\n return Boolean(!this.apiKey && this.locationValid)\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ZapierIntegration.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ZapierIntegration.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ZapierIntegration.vue?vue&type=template&id=59cd2b26&scoped=true&\"\nimport script from \"./ZapierIntegration.vue?vue&type=script&lang=ts&\"\nexport * from \"./ZapierIntegration.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ZapierIntegration.vue?vue&type=style&index=0&id=59cd2b26&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"59cd2b26\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ZapierIntegration.vue?vue&type=style&index=0&id=59cd2b26&lang=less&scoped=true&\""],"sourceRoot":""}