@bigbinary/neeto-email-delivery-frontend 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +77 -6
  2. package/app/javascript/src/translations/en.json +24 -0
  3. package/dist/EmailDeliveryScreen.js +225 -45
  4. package/dist/EmailDeliveryScreen.js.map +1 -1
  5. package/dist/SparkpostDomainSetup.js +2 -2
  6. package/dist/SparkpostDomainVerify.js +2 -2
  7. package/dist/cjs/EmailDeliveryScreen.js +245 -46
  8. package/dist/cjs/EmailDeliveryScreen.js.map +1 -1
  9. package/dist/cjs/SparkpostDomainSetup.js +2 -2
  10. package/dist/cjs/SparkpostDomainVerify.js +2 -2
  11. package/dist/cjs/hooks.js +7 -2
  12. package/dist/cjs/hooks.js.map +1 -1
  13. package/dist/cjs/index.js +13 -11
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/hooks.js +7 -2
  16. package/dist/hooks.js.map +1 -1
  17. package/dist/index.js +13 -11
  18. package/dist/index.js.map +1 -1
  19. package/dist/{useOutlookIntegrationApi-CtHj_BzG.js → useOutlookIntegrationApi-BC-RPHmJ.js} +59 -2
  20. package/dist/useOutlookIntegrationApi-BC-RPHmJ.js.map +1 -0
  21. package/dist/{useOutlookIntegrationApi-ZgRWrUQN.js → useOutlookIntegrationApi-b_mNVfRE.js} +58 -4
  22. package/dist/useOutlookIntegrationApi-b_mNVfRE.js.map +1 -0
  23. package/dist/{useSparkpostApi-pa64NIl6.js → useSparkpostApi-D9NOjTNA.js} +18 -2
  24. package/dist/useSparkpostApi-D9NOjTNA.js.map +1 -0
  25. package/dist/{useSparkpostApi-W7XibjIp.js → useSparkpostApi-qpRhsK7H.js} +17 -3
  26. package/dist/useSparkpostApi-qpRhsK7H.js.map +1 -0
  27. package/dist/{useSparkpostDomain-CK-k6Xrr.js → useSparkpostDomain-Brk7SmL4.js} +3 -15
  28. package/dist/useSparkpostDomain-Brk7SmL4.js.map +1 -0
  29. package/dist/{useSparkpostDomain-DDI4pHcZ.js → useSparkpostDomain-CuX-Gl5a.js} +3 -14
  30. package/dist/useSparkpostDomain-CuX-Gl5a.js.map +1 -0
  31. package/package.json +7 -7
  32. package/dist/useOutlookIntegrationApi-CtHj_BzG.js.map +0 -1
  33. package/dist/useOutlookIntegrationApi-ZgRWrUQN.js.map +0 -1
  34. package/dist/useSparkpostApi-W7XibjIp.js.map +0 -1
  35. package/dist/useSparkpostApi-pa64NIl6.js.map +0 -1
  36. package/dist/useSparkpostDomain-CK-k6Xrr.js.map +0 -1
  37. package/dist/useSparkpostDomain-DDI4pHcZ.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EmailDeliveryScreen.js","sources":["../../app/javascript/src/hooks/integrations/useGmail.js","../../app/javascript/src/hooks/integrations/useOutlook.js","../../app/javascript/src/components/EmailDeliveryScreen/constants.js","../../app/javascript/src/components/EmailDeliveryScreen/IntegrationCard.jsx","../../app/javascript/src/components/EmailDeliveryScreen/index.jsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { showThumbsUpToastr } from \"neetocommons/utils\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchGmail,\n useDestroyGmail,\n} from \"hooks/reactQuery/integrations/useGmailIntegrationApi\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useGmail = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const {\n isLoading,\n data = {},\n isSuccess: isGmailFetched,\n } = useFetchGmail(ownerId, { enabled: canManageIntegrations });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyGmail({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n showThumbsUpToastr();\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n useEffect(() => {\n if (isGmailFetched) {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return key === QUERY_KEYS.INTEGRATION_GMAIL && id !== ownerId;\n },\n });\n }\n }, [isGmailFetched, queryClient, ownerId]);\n\n return {\n data,\n isLoading,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useGmail;\n","import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { showThumbsUpToastr } from \"neetocommons/utils\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchOutlook,\n useDestroyOutlook,\n} from \"hooks/reactQuery/integrations/useOutlookIntegrationApi\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useOutlook = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const {\n isLoading,\n data = {},\n isSuccess: isOutlookFetched,\n } = useFetchOutlook(ownerId, { enabled: canManageIntegrations });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyOutlook({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n showThumbsUpToastr();\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n useEffect(() => {\n if (isOutlookFetched) {\n queryClient.invalidateQueries({\n predicate: query => {\n const [key, id] = query.queryKey;\n\n return key === QUERY_KEYS.INTEGRATION_OUTLOOK && id !== ownerId;\n },\n });\n }\n }, [isOutlookFetched, queryClient, ownerId]);\n\n return {\n data,\n isLoading,\n exists: data?.exists,\n status: data?.status,\n shadowAccount: data?.shadowAccount,\n isWaitingForTestEmail: data?.status === \"inactive\" && !data?.connected,\n isDestroying,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useOutlook;\n","import { t } from \"i18next\";\n\nexport const ERROR_MESSAGES = {\n gmail_permission_not_given: t(\"neetoEmailDelivery.gmail.permissionNotGiven\"),\n outlook_permission_not_given: t(\n \"neetoEmailDelivery.outlook.permissionNotGiven\"\n ),\n outlook_invalid_client: t(\"neetoEmailDelivery.outlook.invalidClient\"),\n outlook_nil_json_web_token: t(\"neetoEmailDelivery.outlook.nilJsonWebToken\"),\n};\n","import { Button, Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n isConnected,\n isDisconnecting,\n onConnect,\n onDisconnect,\n connectButtonText,\n disconnectButtonText = \"neetoEmailDelivery.sparkpost.emailDelivery.disconnect\",\n connectedTagText = \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n showDisconnect = false,\n}) => {\n const { t } = useTranslation();\n\n const shouldShowDisconnect = isConnected || showDisconnect;\n\n return (\n <div className=\"neeto-ui-rounded-lg neeto-ui-shadow-xs neeto-ui-border-gray-300 translate flex flex-col gap-y-4 border p-6 no-underline transition-transform duration-300 ease-in-out outline-none hover:-translate-y-1\">\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-3\">\n <Icon className=\"shrink-0\" size={32} />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <Typography style=\"h4\" weight=\"semibold\">\n {title}\n </Typography>\n {isConnected && <Tag label={t(connectedTagText)} />}\n </div>\n </div>\n </div>\n <Typography style=\"body2\">{description}</Typography>\n {connectButtonText && (\n <div className=\"flex gap-2\">\n {shouldShowDisconnect ? (\n <Button\n data-cy=\"disconnect-button\"\n label={t(disconnectButtonText)}\n loading={isDisconnecting}\n size=\"small\"\n style=\"danger\"\n onClick={onDisconnect}\n />\n ) : (\n <Button\n data-cy=\"connect-button\"\n label={t(connectButtonText)}\n size=\"small\"\n style=\"primary\"\n onClick={onConnect}\n />\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default IntegrationCard;\n","import { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Callout, Toastr } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n GMAIL_OAUTH_CONNECT_URL,\n OUTLOOK_OAUTH_CONNECT_URL,\n} from \"apis/integrations/constants\";\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport { ERROR_MESSAGES } from \"./constants\";\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n ownDomainSetupRoute,\n canManageIntegrations,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription } = useQueryParams();\n\n if (isPresent(error)) {\n let errorMessage = ERROR_MESSAGES[error];\n if (errorDescription) {\n errorMessage = `${errorMessage} ${errorDescription}`;\n }\n Toastr.error(errorMessage ?? humanize(error));\n\n history.replace(indexRoute);\n }\n\n const gmailIntegration = useGmail({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const outlookIntegration = useOutlook({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const sparkpostIntegration = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const {\n data: gmailData = {},\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n isDestroying: isGmailDisconnecting,\n onDisconnect: onGmailDisconnect,\n exists: isGmailExists,\n } = gmailIntegration;\n\n const {\n data: outlookData = {},\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isDestroying: isOutlookDisconnecting,\n isWaitingForTestEmail: isOutlookWaitingForTestEmail,\n shadowAccount: isOutlookShadowAccount,\n onDisconnect: onOutlookDisconnect,\n exists: isOutlookExists,\n } = outlookIntegration;\n\n const {\n data: sparkpostData = {},\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n onDisconnect: onSparkpostDisconnect,\n isDestroying: isSparkpostDisconnecting,\n exists: isSparkpostExists,\n } = sparkpostIntegration;\n\n const isLoading = isGmailLoading || isOutlookLoading || isSparkpostLoading;\n const noneExists = !isGmailExists && !isOutlookExists && !isSparkpostExists;\n const showGmail = noneExists || isGmailExists;\n const showOutlook = noneExists || isOutlookExists;\n const showSparkpost = noneExists || isSparkpostExists;\n\n const handleGmailConnect = () => {\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOutlookConnect = () => {\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOwnDomainConnect = () => {\n history.push(ownDomainSetupRoute);\n };\n\n const gmailEmail = prop(\"email\", gmailData);\n const outlookEmail = prop(\"email\", outlookData);\n const sparkpostEmail = prop(\"email\", sparkpostData);\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = isGmailConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: gmailEmail,\n })\n : t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = isOutlookConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: outlookEmail,\n })\n : t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = isSparkpostConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: sparkpostEmail,\n })\n : t(\"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\");\n\n if (isLoading) {\n return (\n <div className=\"flex grow items-center justify-center w-full\">\n <Spinner />\n </div>\n );\n }\n\n const activeMessage =\n (isGmailConnected && t(\"neetoEmailDelivery.gmail.gmailConfigured\")) ||\n (isOutlookConnected && t(\"neetoEmailDelivery.outlook.outlookConfigured\")) ||\n (isSparkpostConnected &&\n t(\"neetoEmailDelivery.sparkpost.ownDomainConfigured\"));\n\n return (\n <div className=\"min-h-0 w-full grow\">\n <div className=\"@container mx-auto space-y-6\">\n <div className=\"grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4\">\n {/* Gmail Option */}\n {showGmail && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.gmail.connectGmail\"\n description={gmailDescription}\n icon={GmailIcon}\n isConnected={isGmailConnected}\n isDisconnecting={isGmailDisconnecting}\n title={gmailTitle}\n onConnect={handleGmailConnect}\n onDisconnect={onGmailDisconnect}\n />\n )}\n {/* Outlook Option */}\n {showOutlook && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.outlook.connectOutlook\"\n description={outlookDescription}\n icon={OutlookIcon}\n isConnected={isOutlookConnected}\n isDisconnecting={isOutlookDisconnecting}\n title={outlookTitle}\n showDisconnect={\n isOutlookWaitingForTestEmail || isOutlookShadowAccount\n }\n onConnect={handleOutlookConnect}\n onDisconnect={onOutlookDisconnect}\n />\n )}\n {/* Own Domain (Sparkpost) Option */}\n {showSparkpost && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.sparkpost.emailDelivery.setupDomain\"\n description={ownDomainDescription}\n icon={MailSend}\n isConnected={isSparkpostConnected}\n isDisconnecting={isSparkpostDisconnecting}\n title={ownDomainTitle}\n onConnect={handleOwnDomainConnect}\n onDisconnect={onSparkpostDisconnect}\n />\n )}\n </div>\n {activeMessage && <Callout style=\"success\">{activeMessage}</Callout>}\n {isOutlookWaitingForTestEmail && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n {isOutlookShadowAccount && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.shadowAccountMessage\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n </div>\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["useGmail","_ref","ownerId","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","isGmailFetched","isSuccess","_useDestroyGmail","useDestroyGmail","isDestroying","isPending","destroyIntegration","mutate","onClose","replace","onDisconnect","onSuccess","showThumbsUpToastr","invalidateAllIntegrationQueries","useEffect","invalidateQueries","predicate","query","_query$queryKey","queryKey","key","id","QUERY_KEYS","INTEGRATION_GMAIL","exists","isConnected","connected","errorMessage","error","useOutlook","_useFetchOutlook","useFetchOutlook","_useFetchOutlook$data","isOutlookFetched","_useDestroyOutlook","useDestroyOutlook","INTEGRATION_OUTLOOK","status","shadowAccount","isWaitingForTestEmail","ERROR_MESSAGES","gmail_permission_not_given","t","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","IntegrationCard","Icon","icon","title","description","isDisconnecting","onConnect","connectButtonText","_ref$disconnectButton","disconnectButtonText","_ref$connectedTagText","connectedTagText","_ref$showDisconnect","showDisconnect","_useTranslation","useTranslation","shouldShowDisconnect","_jsx","className","children","_jsxs","size","Typography","style","weight","Tag","label","Button","loading","onClick","EmailDeliveryScreen","ownDomainSetupRoute","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","_gmailIntegration$dat","gmailData","isGmailConnected","isGmailLoading","isGmailDisconnecting","onGmailDisconnect","isGmailExists","_outlookIntegration$d","outlookData","isOutlookConnected","isOutlookLoading","isOutlookDisconnecting","isOutlookWaitingForTestEmail","isOutlookShadowAccount","onOutlookDisconnect","isOutlookExists","_sparkpostIntegration","sparkpostData","isSparkpostConnected","isSparkpostLoading","onSparkpostDisconnect","isSparkpostDisconnecting","isSparkpostExists","noneExists","showGmail","showOutlook","showSparkpost","handleGmailConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","handleOutlookConnect","OUTLOOK_OAUTH_CONNECT_URL","handleOwnDomainConnect","push","gmailEmail","prop","outlookEmail","sparkpostEmail","gmailTitle","gmailDescription","email","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","Spinner","activeMessage","GmailIcon","OutlookIcon","MailSend","Callout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAuD;AAAA,EAAA,IAAjDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAEC,qBAAqB,GAAAH,IAAA,CAArBG,qBAAqB;AAC5D,EAAA,IAAAC,SAAA,GAA0DC,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAMI,OAAO,GAAGC,yBAAU,EAAE;AAE5B,EAAA,IAAMC,WAAW,GAAGC,yBAAc,EAAE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H,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"EmailDeliveryScreen.js","sources":["../../app/javascript/src/components/Smtp/constants.js","../../app/javascript/src/components/Smtp/Setup.jsx","../../app/javascript/src/hooks/integrations/useGmail.js","../../app/javascript/src/hooks/integrations/useOutlook.js","../../app/javascript/src/hooks/integrations/useSmtp.js","../../app/javascript/src/components/EmailDeliveryScreen/constants.js","../../app/javascript/src/components/EmailDeliveryScreen/IntegrationCard.jsx","../../app/javascript/src/components/EmailDeliveryScreen/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const ENCRYPTION_OPTIONS = [\n { label: \"None\", value: \"none\" },\n { label: \"StartTLS\", value: \"starttls\" },\n { label: \"SSL\", value: \"ssl\" },\n];\n\nexport const SMTP_ACCOUNT_INITIAL_VALUES = {\n host: \"\",\n port: 587,\n username: \"\",\n password: \"\",\n email: \"\",\n encryption: \"starttls\",\n display_name: \"\",\n};\n\nexport const SMTP_ACCOUNT_VALIDATION_SCHEMA = yup.object().shape({\n host: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.hostLabel\"),\n })\n ),\n port: yup.number().required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.portLabel\"),\n })\n ),\n username: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.usernameLabel\"),\n })\n ),\n password: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.passwordLabel\"),\n })\n ),\n email: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.emailLabel\"),\n })\n )\n .email(t(\"neetoEmailDelivery.smtp.setup.emailInvalid\")),\n displayName: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\"),\n })\n ),\n encryption: yup\n .string()\n .trim()\n .required(\n t(\"neetoEmailDelivery.smtp.setup.requiredField\", {\n field: t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\"),\n })\n ),\n});\n","import { Callout, Pane, Typography } from \"neetoui\";\nimport { Form, Input, Radio, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateSmtp } from \"hooks/reactQuery/integrations/useSmtpIntegrationApi\";\n\nimport {\n SMTP_ACCOUNT_INITIAL_VALUES,\n SMTP_ACCOUNT_VALIDATION_SCHEMA,\n ENCRYPTION_OPTIONS,\n} from \"./constants\";\n\nconst SmtpSetup = ({ ownerId, onDone, onCancel }) => {\n const { t } = useTranslation();\n\n const { isPending: isCreating, mutate: createSmtp } = useCreateSmtp({\n ownerId,\n });\n\n const handleSubmit = values => {\n createSmtp({ smtp_account: values }, { onSuccess: onDone });\n };\n\n return (\n <Pane isOpen size=\"lg\" onClose={onCancel}>\n <Pane.Header>\n <Typography style=\"h2\" weight=\"semibold\">\n {t(\"neetoEmailDelivery.smtp.setup.title\")}\n </Typography>\n </Pane.Header>\n <Form\n className=\"w-full\"\n formikProps={{\n initialValues: SMTP_ACCOUNT_INITIAL_VALUES,\n validationSchema: SMTP_ACCOUNT_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <Pane.Body className=\"space-y-4\">\n <div className=\"flex flex-col gap-6\">\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.smtp.setup.note\")}\n </Callout>\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.hostLabel\")}\n name=\"host\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.portLabel\")}\n name=\"port\"\n type=\"number\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.usernameLabel\")}\n name=\"username\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.passwordLabel\")}\n name=\"password\"\n type=\"password\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.emailLabel\")}\n name=\"email\"\n type=\"email\"\n />\n <Input\n required\n label={t(\"neetoEmailDelivery.smtp.setup.displayNameLabel\")}\n name=\"displayName\"\n />\n <Radio\n label={t(\"neetoEmailDelivery.smtp.setup.encryptionLabel\")}\n name=\"encryption\"\n >\n {ENCRYPTION_OPTIONS.map(option => (\n <Radio.Item\n key={option.value}\n label={option.label}\n value={option.value}\n />\n ))}\n </Radio>\n </div>\n </Pane.Body>\n <Pane.Footer>\n <ActionBlock\n cancelButtonProps={{ onClick: onCancel }}\n isSubmitting={isCreating}\n submitButtonProps={{\n label: t(\"neetoEmailDelivery.smtp.setup.saveAndActivate\"),\n }}\n />\n </Pane.Footer>\n </Form>\n </Pane>\n );\n};\n\nexport default SmtpSetup;\n","import { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchGmail,\n useDestroyGmail,\n} from \"hooks/reactQuery/integrations/useGmailIntegrationApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useGmail = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchGmail(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyGmail({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n return {\n data,\n isLoading,\n isDestroying,\n exists: data?.exists,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useGmail;\n","import { useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n useFetchOutlook,\n useDestroyOutlook,\n} from \"hooks/reactQuery/integrations/useOutlookIntegrationApi\";\nimport { invalidateAllIntegrationQueries } from \"src/utils\";\n\nconst useOutlook = ({ ownerId, indexRoute, canManageIntegrations }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const history = useHistory();\n\n const queryClient = useQueryClient();\n\n const { isLoading, data = {} } = useFetchOutlook(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: destroyIntegration } =\n useDestroyOutlook({ ownerId });\n\n const onClose = () => history.replace(indexRoute);\n\n const onDisconnect = () => {\n destroyIntegration(false, {\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n invalidateAllIntegrationQueries(queryClient, ownerId);\n history.replace(indexRoute);\n },\n });\n };\n\n return {\n data,\n isLoading,\n exists: data?.exists,\n status: data?.status,\n shadowAccount: data?.shadowAccount,\n isWaitingForTestEmail: data?.status === \"inactive\" && !data?.connected,\n isDestroying,\n isConnected: data?.connected,\n isDisconnectAlertOpen,\n setIsDisconnectAlertOpen,\n onDisconnect,\n onClose,\n errorMessage: data?.error,\n };\n};\n\nexport default useOutlook;\n","import {\n useFetchSmtp,\n useDestroySmtp,\n} from \"hooks/reactQuery/integrations/useSmtpIntegrationApi\";\n\nconst useSmtp = ({ ownerId, canManageIntegrations }) => {\n const { isLoading, data = {} } = useFetchSmtp(ownerId, {\n enabled: canManageIntegrations,\n });\n\n const { isPending: isDestroying, mutate: onDisconnect } = useDestroySmtp({\n ownerId,\n });\n\n return {\n data,\n isConnected: data?.connected,\n isLoading,\n isDestroying,\n onDisconnect,\n exists: data?.exists,\n };\n};\n\nexport default useSmtp;\n","import { t } from \"i18next\";\n\nexport const ERROR_MESSAGES = {\n gmail_permission_not_given: t(\"neetoEmailDelivery.gmail.permissionNotGiven\"),\n outlook_permission_not_given: t(\n \"neetoEmailDelivery.outlook.permissionNotGiven\"\n ),\n outlook_invalid_client: t(\"neetoEmailDelivery.outlook.invalidClient\"),\n outlook_nil_json_web_token: t(\"neetoEmailDelivery.outlook.nilJsonWebToken\"),\n};\n","import { Button, Tag, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationCard = ({\n icon: Icon,\n title,\n description,\n isConnected,\n isDisconnecting,\n onConnect,\n onDisconnect,\n connectButtonText,\n disconnectButtonText = \"neetoEmailDelivery.sparkpost.emailDelivery.disconnect\",\n connectedTagText = \"neetoEmailDelivery.sparkpost.emailDelivery.connected\",\n showDisconnect = false,\n}) => {\n const { t } = useTranslation();\n\n const shouldShowDisconnect = isConnected || showDisconnect;\n\n return (\n <div className=\"neeto-ui-rounded-lg neeto-ui-shadow-xs neeto-ui-border-gray-300 translate flex flex-col gap-y-4 border p-6 no-underline transition-transform duration-300 ease-in-out outline-none hover:-translate-y-1\">\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-3\">\n <Icon className=\"shrink-0\" size={32} />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <Typography style=\"h4\" weight=\"semibold\">\n {title}\n </Typography>\n {isConnected && <Tag label={t(connectedTagText)} />}\n </div>\n </div>\n </div>\n <Typography style=\"body2\">{description}</Typography>\n {connectButtonText && (\n <div className=\"flex gap-2\">\n {shouldShowDisconnect ? (\n <Button\n data-cy=\"disconnect-button\"\n label={t(disconnectButtonText)}\n loading={isDisconnecting}\n size=\"small\"\n style=\"danger\"\n onClick={onDisconnect}\n />\n ) : (\n <Button\n data-cy=\"connect-button\"\n label={t(connectButtonText)}\n size=\"small\"\n style=\"primary\"\n onClick={onConnect}\n />\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default IntegrationCard;\n","import { useState } from \"react\";\n\nimport { humanize, isPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { MailSend } from \"neetoicons\";\nimport { Gmail as GmailIcon, Outlook as OutlookIcon } from \"neetoicons/misc\";\nimport { Spinner, Callout, Toastr } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n GMAIL_OAUTH_CONNECT_URL,\n OUTLOOK_OAUTH_CONNECT_URL,\n} from \"apis/integrations/constants\";\nimport SmtpSetup from \"components/Smtp/Setup\";\nimport useGmail from \"hooks/integrations/useGmail\";\nimport useOutlook from \"hooks/integrations/useOutlook\";\nimport useSmtp from \"hooks/integrations/useSmtp\";\nimport useSparkpostDomain from \"hooks/integrations/useSparkpostDomain\";\n\nimport { ERROR_MESSAGES } from \"./constants\";\nimport IntegrationCard from \"./IntegrationCard\";\n\nconst EmailDeliveryScreen = ({\n indexRoute,\n ownerId,\n ownDomainSetupRoute,\n canManageIntegrations,\n}) => {\n const { t } = useTranslation();\n const history = useHistory();\n const [isSmtpPaneOpen, setIsSmtpPaneOpen] = useState(false);\n const { error, errorDescription } = useQueryParams();\n\n if (isPresent(error)) {\n let errorMessage = ERROR_MESSAGES[error];\n if (errorDescription) {\n errorMessage = `${errorMessage} ${errorDescription}`;\n }\n Toastr.error(errorMessage ?? humanize(error));\n\n history.replace(indexRoute);\n }\n\n const gmailIntegration = useGmail({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const outlookIntegration = useOutlook({\n ownerId,\n indexRoute,\n canManageIntegrations,\n });\n\n const sparkpostIntegration = useSparkpostDomain({\n ownerId,\n canManageIntegrations,\n });\n\n const smtpIntegration = useSmtp({ ownerId, canManageIntegrations });\n\n const {\n data: gmailData = {},\n isConnected: isGmailConnected,\n isLoading: isGmailLoading,\n isDestroying: isGmailDisconnecting,\n onDisconnect: onGmailDisconnect,\n exists: isGmailExists,\n } = gmailIntegration;\n\n const {\n data: outlookData = {},\n isConnected: isOutlookConnected,\n isLoading: isOutlookLoading,\n isDestroying: isOutlookDisconnecting,\n isWaitingForTestEmail: isOutlookWaitingForTestEmail,\n shadowAccount: isOutlookShadowAccount,\n onDisconnect: onOutlookDisconnect,\n exists: isOutlookExists,\n } = outlookIntegration;\n\n const {\n data: sparkpostData = {},\n isConnected: isSparkpostConnected,\n isLoading: isSparkpostLoading,\n onDisconnect: onSparkpostDisconnect,\n isDestroying: isSparkpostDisconnecting,\n exists: isSparkpostExists,\n } = sparkpostIntegration;\n\n const {\n data: smtpData = {},\n isConnected: isSmtpConnected,\n isLoading: isSmtpLoading,\n isDestroying: isSmtpDisconnecting,\n onDisconnect: onSmtpDisconnect,\n exists: isSmtpExists,\n } = smtpIntegration;\n\n const isLoading =\n isGmailLoading || isOutlookLoading || isSparkpostLoading || isSmtpLoading;\n\n const noneExists =\n !isGmailExists && !isOutlookExists && !isSparkpostExists && !isSmtpExists;\n const showGmail = noneExists || isGmailExists;\n const showOutlook = noneExists || isOutlookExists;\n const showSparkpost = noneExists || isSparkpostExists;\n const showSmtp = noneExists || isSmtpExists;\n\n const handleGmailConnect = () => {\n window.location.href = buildUrl(GMAIL_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOutlookConnect = () => {\n window.location.href = buildUrl(OUTLOOK_OAUTH_CONNECT_URL, { ownerId });\n };\n\n const handleOwnDomainConnect = () => {\n history.push(ownDomainSetupRoute);\n };\n\n const handleSmtpConnect = () => {\n setIsSmtpPaneOpen(true);\n };\n\n const handleSmtpPaneClose = () => {\n setIsSmtpPaneOpen(false);\n };\n\n const gmailEmail = prop(\"email\", gmailData);\n const outlookEmail = prop(\"email\", outlookData);\n const sparkpostEmail = prop(\"email\", sparkpostData);\n const smtpEmail = prop(\"email\", smtpData);\n\n const gmailTitle = t(\"neetoEmailDelivery.gmail.title\");\n const gmailDescription = isGmailConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: gmailEmail,\n })\n : t(\"neetoEmailDelivery.gmail.description\");\n\n const outlookTitle = t(\"neetoEmailDelivery.outlook.title\");\n const outlookDescription = isOutlookConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: outlookEmail,\n })\n : t(\"neetoEmailDelivery.outlook.description\");\n\n const ownDomainTitle = t(\n \"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainTitle\"\n );\n\n const ownDomainDescription = isSparkpostConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: sparkpostEmail,\n })\n : t(\"neetoEmailDelivery.sparkpost.emailDelivery.ownDomainDescription\");\n\n const smtpTitle = t(\"neetoEmailDelivery.smtp.title\");\n const smtpDescription = isSmtpConnected\n ? t(\"neetoEmailDelivery.sparkpost.emailDelivery.connectedEmail\", {\n email: smtpEmail,\n })\n : t(\"neetoEmailDelivery.smtp.description\");\n\n if (isLoading) {\n return (\n <div className=\"flex grow items-center justify-center w-full\">\n <Spinner />\n </div>\n );\n }\n\n const activeMessage =\n (isGmailConnected && t(\"neetoEmailDelivery.gmail.gmailConfigured\")) ||\n (isOutlookConnected && t(\"neetoEmailDelivery.outlook.outlookConfigured\")) ||\n (isSparkpostConnected &&\n t(\"neetoEmailDelivery.sparkpost.ownDomainConfigured\")) ||\n (isSmtpConnected && t(\"neetoEmailDelivery.smtp.smtpConfigured\"));\n\n return (\n <div className=\"min-h-0 w-full grow\">\n <div className=\"@container mx-auto space-y-6\">\n <div className=\"grid grid-cols-1 gap-3 py-1 @lg:grid-cols-2 @lg:gap-6 @3xl:grid-cols-3 @7xl:grid-cols-4\">\n {/* Gmail Option */}\n {showGmail && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.gmail.connectGmail\"\n description={gmailDescription}\n icon={GmailIcon}\n isConnected={isGmailConnected}\n isDisconnecting={isGmailDisconnecting}\n title={gmailTitle}\n onConnect={handleGmailConnect}\n onDisconnect={onGmailDisconnect}\n />\n )}\n {/* Outlook Option */}\n {showOutlook && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.outlook.connectOutlook\"\n description={outlookDescription}\n icon={OutlookIcon}\n isConnected={isOutlookConnected}\n isDisconnecting={isOutlookDisconnecting}\n title={outlookTitle}\n showDisconnect={\n isOutlookWaitingForTestEmail || isOutlookShadowAccount\n }\n onConnect={handleOutlookConnect}\n onDisconnect={onOutlookDisconnect}\n />\n )}\n {/* Own Domain (Sparkpost) Option */}\n {showSparkpost && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.sparkpost.emailDelivery.setupDomain\"\n description={ownDomainDescription}\n icon={MailSend}\n isConnected={isSparkpostConnected}\n isDisconnecting={isSparkpostDisconnecting}\n title={ownDomainTitle}\n onConnect={handleOwnDomainConnect}\n onDisconnect={onSparkpostDisconnect}\n />\n )}\n {/* SMTP Option */}\n {showSmtp && (\n <IntegrationCard\n connectButtonText=\"neetoEmailDelivery.smtp.connectSmtp\"\n description={smtpDescription}\n icon={MailSend}\n isConnected={isSmtpConnected}\n isDisconnecting={isSmtpDisconnecting}\n title={smtpTitle}\n onConnect={handleSmtpConnect}\n onDisconnect={onSmtpDisconnect}\n />\n )}\n </div>\n {activeMessage && <Callout style=\"success\">{activeMessage}</Callout>}\n {isOutlookWaitingForTestEmail && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.waitingForTestEmail\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n {isOutlookShadowAccount && (\n <Callout style=\"warning\">\n {t(\"neetoEmailDelivery.outlook.shadowAccountMessage\", {\n email: outlookEmail,\n })}\n </Callout>\n )}\n </div>\n {isSmtpPaneOpen && (\n <SmtpSetup\n {...{ ownerId }}\n onCancel={handleSmtpPaneClose}\n onDone={handleSmtpPaneClose}\n />\n )}\n </div>\n );\n};\n\nexport default EmailDeliveryScreen;\n"],"names":["ENCRYPTION_OPTIONS","label","value","SMTP_ACCOUNT_INITIAL_VALUES","host","port","username","password","email","encryption","display_name","SMTP_ACCOUNT_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","field","number","displayName","SmtpSetup","_ref","ownerId","onDone","onCancel","_useTranslation","useTranslation","_useCreateSmtp","useCreateSmtp","isCreating","isPending","createSmtp","mutate","handleSubmit","values","smtp_account","onSuccess","_jsxs","Pane","isOpen","size","onClose","children","_jsx","Header","Typography","style","weight","Form","className","formikProps","initialValues","validationSchema","onSubmit","Body","Callout","Input","name","type","Radio","map","option","Item","Footer","ActionBlock","cancelButtonProps","onClick","isSubmitting","submitButtonProps","useGmail","indexRoute","canManageIntegrations","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","history","useHistory","queryClient","useQueryClient","_useFetchGmail","useFetchGmail","enabled","isLoading","_useFetchGmail$data","data","_useDestroyGmail","useDestroyGmail","isDestroying","destroyIntegration","replace","onDisconnect","invalidateAllIntegrationQueries","exists","isConnected","connected","errorMessage","error","useOutlook","_useFetchOutlook","useFetchOutlook","_useFetchOutlook$data","_useDestroyOutlook","useDestroyOutlook","status","shadowAccount","isWaitingForTestEmail","useSmtp","_useFetchSmtp","useFetchSmtp","_useFetchSmtp$data","_useDestroySmtp","useDestroySmtp","ERROR_MESSAGES","gmail_permission_not_given","outlook_permission_not_given","outlook_invalid_client","outlook_nil_json_web_token","IntegrationCard","Icon","icon","title","description","isDisconnecting","onConnect","connectButtonText","_ref$disconnectButton","disconnectButtonText","_ref$connectedTagText","connectedTagText","_ref$showDisconnect","showDisconnect","shouldShowDisconnect","Tag","Button","loading","EmailDeliveryScreen","ownDomainSetupRoute","isSmtpPaneOpen","setIsSmtpPaneOpen","_useQueryParams","useQueryParams","errorDescription","isPresent","_errorMessage","concat","Toastr","humanize","gmailIntegration","outlookIntegration","sparkpostIntegration","useSparkpostDomain","smtpIntegration","_gmailIntegration$dat","gmailData","isGmailConnected","isGmailLoading","isGmailDisconnecting","onGmailDisconnect","isGmailExists","_outlookIntegration$d","outlookData","isOutlookConnected","isOutlookLoading","isOutlookDisconnecting","isOutlookWaitingForTestEmail","isOutlookShadowAccount","onOutlookDisconnect","isOutlookExists","_sparkpostIntegration","sparkpostData","isSparkpostConnected","isSparkpostLoading","onSparkpostDisconnect","isSparkpostDisconnecting","isSparkpostExists","_smtpIntegration$data","smtpData","isSmtpConnected","isSmtpLoading","isSmtpDisconnecting","onSmtpDisconnect","isSmtpExists","noneExists","showGmail","showOutlook","showSparkpost","showSmtp","handleGmailConnect","window","location","href","buildUrl","GMAIL_OAUTH_CONNECT_URL","handleOutlookConnect","OUTLOOK_OAUTH_CONNECT_URL","handleOwnDomainConnect","push","handleSmtpConnect","handleSmtpPaneClose","gmailEmail","prop","outlookEmail","sparkpostEmail","smtpEmail","gmailTitle","gmailDescription","outlookTitle","outlookDescription","ownDomainTitle","ownDomainDescription","smtpTitle","smtpDescription","Spinner","activeMessage","GmailIcon","OutlookIcon","MailSend"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,kBAAkB,GAAG,CAChC;AAAEC,EAAAA,KAAK,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE;AAAO,CAAC,EAChC;AAAED,EAAAA,KAAK,EAAE,UAAU;AAAEC,EAAAA,KAAK,EAAE;AAAW,CAAC,EACxC;AAAED,EAAAA,KAAK,EAAE,KAAK;AAAEC,EAAAA,KAAK,EAAE;AAAM,CAAC,CAC/B;AAEM,IAAMC,2BAA2B,GAAG;AACzCC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,KAAK,EAAE,EAAE;AACTC,EAAAA,UAAU,EAAE,UAAU;AACtBC,EAAAA,YAAY,EAAE;AAChB,CAAC;AAEM,IAAMC,8BAA8B,GAAGC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AAAA,SAAS,EAAE0E,iBAAkB;AAC7B3G,UAAAA,YAAY,EAAE0F;AAAiB,SAChC,CACF;AAAA,OACE,CAAC,EACLiC,aAAa,iBAAI7K,cAAA,CAACY,OAAO,EAAA;AAACT,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EAAE8K;AAAa,OAAU,CAAC,EACnEjD,4BAA4B,iBAC3B5H,cAAA,CAACY,OAAO,EAAA;AAACT,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrB1B,CAAC,CAAC,gDAAgD,EAAE;AACnDV,UAAAA,KAAK,EAAEsM;SACR;AAAC,OACK,CACV,EACApC,sBAAsB,iBACrB7H,cAAA,CAACY,OAAO,EAAA;AAACT,QAAAA,KAAK,EAAC,SAAS;AAAAJ,QAAAA,QAAA,EACrB1B,CAAC,CAAC,iDAAiD,EAAE;AACpDV,UAAAA,KAAK,EAAEsM;SACR;AAAC,OACK,CACV;AAAA,KACE,CAAC,EACLhE,cAAc,iBACbjG,cAAA,CAACvB,SAAS,EAAA;AACFE,MAAAA,OAAO,EAAPA,OAAO;AACbE,MAAAA,QAAQ,EAAEiL,mBAAoB;AAC9BlL,MAAAA,MAAM,EAAEkL;AAAoB,KAC7B,CACF;AAAA,GACE,CAAC;AAEV;;;;"}
@@ -9,7 +9,7 @@ var Form = require('@bigbinary/neetoui/formik/Form');
9
9
  var reactI18next = require('react-i18next');
10
10
  var reactRouterDom = require('react-router-dom');
11
11
  var constants = require('../constants-D3nzz3Te.js');
12
- var useSparkpostDomain = require('../useSparkpostDomain-CK-k6Xrr.js');
12
+ var useSparkpostDomain = require('../useSparkpostDomain-Brk7SmL4.js');
13
13
  var jsxRuntime = require('react/jsx-runtime');
14
14
  require('@babel/runtime/helpers/defineProperty');
15
15
  require('@babel/runtime/helpers/objectWithoutProperties');
@@ -22,7 +22,7 @@ require('yup');
22
22
  require('@babel/runtime/helpers/slicedToArray');
23
23
  require('@tanstack/react-query');
24
24
  require('@bigbinary/neetoui/Toastr');
25
- require('../useSparkpostApi-pa64NIl6.js');
25
+ require('../useSparkpostApi-D9NOjTNA.js');
26
26
  require('@bigbinary/neeto-commons-frontend/react-utils');
27
27
  require('axios');
28
28
 
@@ -9,8 +9,8 @@ var ramda = require('ramda');
9
9
  var reactI18next = require('react-i18next');
10
10
  var reactRouterDom = require('react-router-dom');
11
11
  var constants = require('../constants-D3nzz3Te.js');
12
- var useSparkpostDomain = require('../useSparkpostDomain-CK-k6Xrr.js');
13
- var useSparkpostApi = require('../useSparkpostApi-pa64NIl6.js');
12
+ var useSparkpostDomain = require('../useSparkpostDomain-Brk7SmL4.js');
13
+ var useSparkpostApi = require('../useSparkpostApi-D9NOjTNA.js');
14
14
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
15
15
  var Typography = require('@bigbinary/neetoui/Typography');
16
16
  var Tag = require('@bigbinary/neetoui/Tag');
package/dist/cjs/hooks.js CHANGED
@@ -2,19 +2,21 @@
2
2
 
3
3
  var neetoCist = require('@bigbinary/neeto-cist');
4
4
  var ramda = require('ramda');
5
- var useOutlookIntegrationApi = require('../useOutlookIntegrationApi-CtHj_BzG.js');
6
- var useSparkpostApi = require('../useSparkpostApi-pa64NIl6.js');
5
+ var useOutlookIntegrationApi = require('../useOutlookIntegrationApi-BC-RPHmJ.js');
6
+ var useSparkpostApi = require('../useSparkpostApi-D9NOjTNA.js');
7
7
  require('@babel/runtime/helpers/defineProperty');
8
8
  require('@tanstack/react-query');
9
9
  require('@bigbinary/neeto-commons-frontend/react-utils');
10
10
  require('axios');
11
11
  require('@bigbinary/neeto-commons-frontend/utils');
12
+ require('@babel/runtime/helpers/slicedToArray');
12
13
 
13
14
  var useFetchConnectedIntegration = function useFetchConnectedIntegration(ownerId) {
14
15
  var _connectedIntegration;
15
16
  var gmail = useOutlookIntegrationApi.useFetchGmail(ownerId);
16
17
  var outlook = useOutlookIntegrationApi.useFetchOutlook(ownerId);
17
18
  var sparkpost = useSparkpostApi.useFetchSparkpostDomain(ownerId);
19
+ var smtp = useOutlookIntegrationApi.useFetchSmtp(ownerId);
18
20
  var integrations = [{
19
21
  type: "gmail",
20
22
  hook: gmail
@@ -24,6 +26,9 @@ var useFetchConnectedIntegration = function useFetchConnectedIntegration(ownerId
24
26
  }, {
25
27
  type: "sparkpost",
26
28
  hook: sparkpost
29
+ }, {
30
+ type: "smtp",
31
+ hook: smtp
27
32
  }];
28
33
  var hooks = ramda.pluck("hook", integrations);
29
34
  var isLoading = neetoCist.existsBy({
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sources":["../../app/javascript/src/hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi.js"],"sourcesContent":["import { existsBy } from \"neetocist\";\nimport { pluck } from \"ramda\";\n\nimport { useFetchGmail } from \"./useGmailIntegrationApi\";\nimport { useFetchOutlook } from \"./useOutlookIntegrationApi\";\nimport { useFetchSparkpostDomain } from \"./useSparkpostApi\";\n\nexport const useFetchConnectedIntegration = ownerId => {\n const gmail = useFetchGmail(ownerId);\n const outlook = useFetchOutlook(ownerId);\n const sparkpost = useFetchSparkpostDomain(ownerId);\n\n const integrations = [\n { type: \"gmail\", hook: gmail },\n { type: \"outlook\", hook: outlook },\n { type: \"sparkpost\", hook: sparkpost },\n ];\n\n const hooks = pluck(\"hook\", integrations);\n\n const isLoading = existsBy({ isLoading: true }, hooks);\n const isError = existsBy({ isError: true }, hooks);\n\n const connectedIntegration = integrations.find(\n ({ hook }) => hook.isSuccess && hook?.data?.connected\n );\n\n const integration = connectedIntegration\n ? {\n type: connectedIntegration.type,\n data: connectedIntegration.hook?.data,\n }\n : null;\n\n return { integration, isLoading, isError };\n};\n"],"names":["useFetchConnectedIntegration","ownerId","_connectedIntegration","gmail","useFetchGmail","outlook","useFetchOutlook","sparkpost","useFetchSparkpostDomain","integrations","type","hook","hooks","pluck","isLoading","existsBy","isError","connectedIntegration","find","_ref","_hook$data","isSuccess","data","connected","integration"],"mappings":";;;;;;;;;;;;IAOaA,4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GACpC;IACEP,IAAI,EAAEO,oBAAoB,CAACP,IAAI;IAC/BY,IAAI,EAAA,CAAApB,qBAAA,GAAEe,oBAAoB,CAACN,IAAI,MAAAT,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BoB;AACnC,GAAC,GACD,IAAI;EAER,OAAO;AAAEE,IAAAA,WAAW,EAAXA,WAAW;AAAEV,IAAAA,SAAS,EAATA,SAAS;AAAEE,IAAAA,OAAO,EAAPA;GAAS;AAC5C;;;;"}
1
+ {"version":3,"file":"hooks.js","sources":["../../app/javascript/src/hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi.js"],"sourcesContent":["import { existsBy } from \"neetocist\";\nimport { pluck } from \"ramda\";\n\nimport { useFetchGmail } from \"./useGmailIntegrationApi\";\nimport { useFetchOutlook } from \"./useOutlookIntegrationApi\";\nimport { useFetchSmtp } from \"./useSmtpIntegrationApi\";\nimport { useFetchSparkpostDomain } from \"./useSparkpostApi\";\n\nexport const useFetchConnectedIntegration = ownerId => {\n const gmail = useFetchGmail(ownerId);\n const outlook = useFetchOutlook(ownerId);\n const sparkpost = useFetchSparkpostDomain(ownerId);\n const smtp = useFetchSmtp(ownerId);\n\n const integrations = [\n { type: \"gmail\", hook: gmail },\n { type: \"outlook\", hook: outlook },\n { type: \"sparkpost\", hook: sparkpost },\n { type: \"smtp\", hook: smtp },\n ];\n\n const hooks = pluck(\"hook\", integrations);\n\n const isLoading = existsBy({ isLoading: true }, hooks);\n const isError = existsBy({ isError: true }, hooks);\n\n const connectedIntegration = integrations.find(\n ({ hook }) => hook.isSuccess && hook?.data?.connected\n );\n\n const integration = connectedIntegration\n ? {\n type: connectedIntegration.type,\n data: connectedIntegration.hook?.data,\n }\n : null;\n\n return { integration, isLoading, isError };\n};\n"],"names":["useFetchConnectedIntegration","ownerId","_connectedIntegration","gmail","useFetchGmail","outlook","useFetchOutlook","sparkpost","useFetchSparkpostDomain","smtp","useFetchSmtp","integrations","type","hook","hooks","pluck","isLoading","existsBy","isError","connectedIntegration","find","_ref","_hook$data","isSuccess","data","connected","integration"],"mappings":";;;;;;;;;;;;;IAQaA,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,qBAAA;AACrD,EAAA,IAAMC,KAAK,GAAGC,sCAAa,CAACH,OAAO,CAAC;AACpC,EAAA,IAAMI,OAAO,GAAGC,wCAAe,CAACL,OAAO,CAAC;AACxC,EAAA,IAAMM,SAAS,GAAGC,uCAAuB,CAACP,OAAO,CAAC;AAClD,EAAA,IAAMQ,IAAI,GAAGC,qCAAY,CAACT,OAAO,CAAC;EAElC,IAAMU,YAAY,GAAG,CACnB;AAAEC,IAAAA,IAAI,EAAE,OAAO;AAAEC,IAAAA,IAAI,EAAEV;AAAM,GAAC,EAC9B;AAAES,IAAAA,IAAI,EAAE,SAAS;AAAEC,IAAAA,IAAI,EAAER;AAAQ,GAAC,EAClC;AAAEO,IAAAA,IAAI,EAAE,WAAW;AAAEC,IAAAA,IAAI,EAAEN;AAAU,GAAC,EACtC;AAAEK,IAAAA,IAAI,EAAE,MAAM;AAAEC,IAAAA,IAAI,EAAEJ;AAAK,GAAC,CAC7B;AAED,EAAA,IAAMK,KAAK,GAAGC,WAAK,CAAC,MAAM,EAAEJ,YAAY,CAAC;EAEzC,IAAMK,SAAS,GAAGC,kBAAQ,CAAC;AAAED,IAAAA,SAAS,EAAE;GAAM,EAAEF,KAAK,CAAC;EACtD,IAAMI,OAAO,GAAGD,kBAAQ,CAAC;AAAEC,IAAAA,OAAO,EAAE;GAAM,EAAEJ,KAAK,CAAC;AAElD,EAAA,IAAMK,oBAAoB,GAAGR,YAAY,CAACS,IAAI,CAC5C,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAAC,UAAA;AAAA,IAAA,IAAGT,IAAI,GAAAQ,IAAA,CAAJR,IAAI;AAAA,IAAA,OAAOA,IAAI,CAACU,SAAS,KAAIV,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAAS,KAAAA,CAAAA,IAAAA,CAAAA,UAAA,GAAJT,IAAI,CAAEW,IAAI,MAAA,IAAA,IAAAF,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYG,SAAS,CAAA;AAAA,GACvD,CAAC;EAED,IAAMC,WAAW,GAAGP,oBAAoB,GACpC;IACEP,IAAI,EAAEO,oBAAoB,CAACP,IAAI;IAC/BY,IAAI,EAAA,CAAAtB,qBAAA,GAAEiB,oBAAoB,CAACN,IAAI,MAAAX,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BsB;AACnC,GAAC,GACD,IAAI;EAER,OAAO;AAAEE,IAAAA,WAAW,EAAXA,WAAW;AAAEV,IAAAA,SAAS,EAATA,SAAS;AAAEE,IAAAA,OAAO,EAAPA;GAAS;AAC5C;;;;"}
package/dist/cjs/index.js CHANGED
@@ -3,6 +3,8 @@
3
3
  var EmailDeliveryScreen = require('./EmailDeliveryScreen.js');
4
4
  var SparkpostDomainSetup = require('./SparkpostDomainSetup.js');
5
5
  var SparkpostDomainVerify = require('./SparkpostDomainVerify.js');
6
+ require('@babel/runtime/helpers/slicedToArray');
7
+ require('react');
6
8
  require('@bigbinary/neeto-cist');
7
9
  require('@bigbinary/neeto-commons-frontend/react-utils');
8
10
  require('@bigbinary/neeto-commons-frontend/utils');
@@ -15,29 +17,29 @@ require('@bigbinary/neetoui/Toastr');
15
17
  require('ramda');
16
18
  require('react-i18next');
17
19
  require('react-router-dom');
18
- require('../useSparkpostApi-pa64NIl6.js');
20
+ require('../useSparkpostApi-D9NOjTNA.js');
19
21
  require('@babel/runtime/helpers/defineProperty');
20
22
  require('@tanstack/react-query');
21
23
  require('axios');
22
- require('@babel/runtime/helpers/slicedToArray');
23
- require('react');
24
- require('../useOutlookIntegrationApi-CtHj_BzG.js');
25
- require('../useSparkpostDomain-CK-k6Xrr.js');
24
+ require('@bigbinary/neetoui/Pane');
25
+ require('@bigbinary/neetoui/Typography');
26
+ require('@bigbinary/neetoui/formik/Form');
27
+ require('@bigbinary/neetoui/formik/Input');
28
+ require('@bigbinary/neetoui/formik/Radio');
29
+ require('@bigbinary/neetoui/formik/ActionBlock');
30
+ require('../useOutlookIntegrationApi-BC-RPHmJ.js');
26
31
  require('i18next');
32
+ require('yup');
33
+ require('react/jsx-runtime');
34
+ require('../useSparkpostDomain-Brk7SmL4.js');
27
35
  require('@bigbinary/neetoui/Button');
28
36
  require('@bigbinary/neetoui/Tag');
29
- require('@bigbinary/neetoui/Typography');
30
- require('react/jsx-runtime');
31
37
  require('@bigbinary/neeto-molecules/CardLayout');
32
- require('@bigbinary/neetoui/formik/Input');
33
- require('@bigbinary/neetoui/formik/ActionBlock');
34
- require('@bigbinary/neetoui/formik/Form');
35
38
  require('../constants-D3nzz3Te.js');
36
39
  require('@babel/runtime/helpers/objectWithoutProperties');
37
40
  require('classnames');
38
41
  require('@bigbinary/neeto-molecules/Container');
39
42
  require('@bigbinary/neeto-molecules/Header');
40
- require('yup');
41
43
  require('@babel/runtime/helpers/toConsumableArray');
42
44
  require('@bigbinary/neeto-molecules/CopyToClipboardButton');
43
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/hooks.js CHANGED
@@ -1,18 +1,20 @@
1
1
  import { existsBy } from '@bigbinary/neeto-cist';
2
2
  import { pluck } from 'ramda';
3
- import { u as useFetchGmail, a as useFetchOutlook } from './useOutlookIntegrationApi-ZgRWrUQN.js';
4
- import { u as useFetchSparkpostDomain } from './useSparkpostApi-W7XibjIp.js';
3
+ import { u as useFetchGmail, a as useFetchOutlook, b as useFetchSmtp } from './useOutlookIntegrationApi-b_mNVfRE.js';
4
+ import { u as useFetchSparkpostDomain } from './useSparkpostApi-qpRhsK7H.js';
5
5
  import '@babel/runtime/helpers/defineProperty';
6
6
  import '@tanstack/react-query';
7
7
  import '@bigbinary/neeto-commons-frontend/react-utils';
8
8
  import 'axios';
9
9
  import '@bigbinary/neeto-commons-frontend/utils';
10
+ import '@babel/runtime/helpers/slicedToArray';
10
11
 
11
12
  var useFetchConnectedIntegration = function useFetchConnectedIntegration(ownerId) {
12
13
  var _connectedIntegration;
13
14
  var gmail = useFetchGmail(ownerId);
14
15
  var outlook = useFetchOutlook(ownerId);
15
16
  var sparkpost = useFetchSparkpostDomain(ownerId);
17
+ var smtp = useFetchSmtp(ownerId);
16
18
  var integrations = [{
17
19
  type: "gmail",
18
20
  hook: gmail
@@ -22,6 +24,9 @@ var useFetchConnectedIntegration = function useFetchConnectedIntegration(ownerId
22
24
  }, {
23
25
  type: "sparkpost",
24
26
  hook: sparkpost
27
+ }, {
28
+ type: "smtp",
29
+ hook: smtp
25
30
  }];
26
31
  var hooks = pluck("hook", integrations);
27
32
  var isLoading = existsBy({
package/dist/hooks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sources":["../app/javascript/src/hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi.js"],"sourcesContent":["import { existsBy } from \"neetocist\";\nimport { pluck } from \"ramda\";\n\nimport { useFetchGmail } from \"./useGmailIntegrationApi\";\nimport { useFetchOutlook } from \"./useOutlookIntegrationApi\";\nimport { useFetchSparkpostDomain } from \"./useSparkpostApi\";\n\nexport const useFetchConnectedIntegration = ownerId => {\n const gmail = useFetchGmail(ownerId);\n const outlook = useFetchOutlook(ownerId);\n const sparkpost = useFetchSparkpostDomain(ownerId);\n\n const integrations = [\n { type: \"gmail\", hook: gmail },\n { type: \"outlook\", hook: outlook },\n { type: \"sparkpost\", hook: sparkpost },\n ];\n\n const hooks = pluck(\"hook\", integrations);\n\n const isLoading = existsBy({ isLoading: true }, hooks);\n const isError = existsBy({ isError: true }, hooks);\n\n const connectedIntegration = integrations.find(\n ({ hook }) => hook.isSuccess && hook?.data?.connected\n );\n\n const integration = connectedIntegration\n ? {\n type: connectedIntegration.type,\n data: connectedIntegration.hook?.data,\n }\n : null;\n\n return { integration, isLoading, isError };\n};\n"],"names":["useFetchConnectedIntegration","ownerId","_connectedIntegration","gmail","useFetchGmail","outlook","useFetchOutlook","sparkpost","useFetchSparkpostDomain","integrations","type","hook","hooks","pluck","isLoading","existsBy","isError","connectedIntegration","find","_ref","_hook$data","isSuccess","data","connected","integration"],"mappings":";;;;;;;;;;IAOaA,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,qBAAA;AACrD,EAAA,IAAMC,KAAK,GAAGC,aAAa,CAACH,OAAO,CAAC;AACpC,EAAA,IAAMI,OAAO,GAAGC,eAAe,CAACL,OAAO,CAAC;AACxC,EAAA,IAAMM,SAAS,GAAGC,uBAAuB,CAACP,OAAO,CAAC;EAElD,IAAMQ,YAAY,GAAG,CACnB;AAAEC,IAAAA,IAAI,EAAE,OAAO;AAAEC,IAAAA,IAAI,EAAER;AAAM,GAAC,EAC9B;AAAEO,IAAAA,IAAI,EAAE,SAAS;AAAEC,IAAAA,IAAI,EAAEN;AAAQ,GAAC,EAClC;AAAEK,IAAAA,IAAI,EAAE,WAAW;AAAEC,IAAAA,IAAI,EAAEJ;AAAU,GAAC,CACvC;AAED,EAAA,IAAMK,KAAK,GAAGC,KAAK,CAAC,MAAM,EAAEJ,YAAY,CAAC;EAEzC,IAAMK,SAAS,GAAGC,QAAQ,CAAC;AAAED,IAAAA,SAAS,EAAE;GAAM,EAAEF,KAAK,CAAC;EACtD,IAAMI,OAAO,GAAGD,QAAQ,CAAC;AAAEC,IAAAA,OAAO,EAAE;GAAM,EAAEJ,KAAK,CAAC;AAElD,EAAA,IAAMK,oBAAoB,GAAGR,YAAY,CAACS,IAAI,CAC5C,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAAC,UAAA;AAAA,IAAA,IAAGT,IAAI,GAAAQ,IAAA,CAAJR,IAAI;AAAA,IAAA,OAAOA,IAAI,CAACU,SAAS,KAAIV,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAAS,KAAAA,CAAAA,IAAAA,CAAAA,UAAA,GAAJT,IAAI,CAAEW,IAAI,MAAA,IAAA,IAAAF,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYG,SAAS,CAAA;AAAA,GACvD,CAAC;EAED,IAAMC,WAAW,GAAGP,oBAAoB,GACpC;IACEP,IAAI,EAAEO,oBAAoB,CAACP,IAAI;IAC/BY,IAAI,EAAA,CAAApB,qBAAA,GAAEe,oBAAoB,CAACN,IAAI,MAAAT,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BoB;AACnC,GAAC,GACD,IAAI;EAER,OAAO;AAAEE,IAAAA,WAAW,EAAXA,WAAW;AAAEV,IAAAA,SAAS,EAATA,SAAS;AAAEE,IAAAA,OAAO,EAAPA;GAAS;AAC5C;;;;"}
1
+ {"version":3,"file":"hooks.js","sources":["../app/javascript/src/hooks/reactQuery/integrations/useEmailDeliveryIntegrationApi.js"],"sourcesContent":["import { existsBy } from \"neetocist\";\nimport { pluck } from \"ramda\";\n\nimport { useFetchGmail } from \"./useGmailIntegrationApi\";\nimport { useFetchOutlook } from \"./useOutlookIntegrationApi\";\nimport { useFetchSmtp } from \"./useSmtpIntegrationApi\";\nimport { useFetchSparkpostDomain } from \"./useSparkpostApi\";\n\nexport const useFetchConnectedIntegration = ownerId => {\n const gmail = useFetchGmail(ownerId);\n const outlook = useFetchOutlook(ownerId);\n const sparkpost = useFetchSparkpostDomain(ownerId);\n const smtp = useFetchSmtp(ownerId);\n\n const integrations = [\n { type: \"gmail\", hook: gmail },\n { type: \"outlook\", hook: outlook },\n { type: \"sparkpost\", hook: sparkpost },\n { type: \"smtp\", hook: smtp },\n ];\n\n const hooks = pluck(\"hook\", integrations);\n\n const isLoading = existsBy({ isLoading: true }, hooks);\n const isError = existsBy({ isError: true }, hooks);\n\n const connectedIntegration = integrations.find(\n ({ hook }) => hook.isSuccess && hook?.data?.connected\n );\n\n const integration = connectedIntegration\n ? {\n type: connectedIntegration.type,\n data: connectedIntegration.hook?.data,\n }\n : null;\n\n return { integration, isLoading, isError };\n};\n"],"names":["useFetchConnectedIntegration","ownerId","_connectedIntegration","gmail","useFetchGmail","outlook","useFetchOutlook","sparkpost","useFetchSparkpostDomain","smtp","useFetchSmtp","integrations","type","hook","hooks","pluck","isLoading","existsBy","isError","connectedIntegration","find","_ref","_hook$data","isSuccess","data","connected","integration"],"mappings":";;;;;;;;;;;IAQaA,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,qBAAA;AACrD,EAAA,IAAMC,KAAK,GAAGC,aAAa,CAACH,OAAO,CAAC;AACpC,EAAA,IAAMI,OAAO,GAAGC,eAAe,CAACL,OAAO,CAAC;AACxC,EAAA,IAAMM,SAAS,GAAGC,uBAAuB,CAACP,OAAO,CAAC;AAClD,EAAA,IAAMQ,IAAI,GAAGC,YAAY,CAACT,OAAO,CAAC;EAElC,IAAMU,YAAY,GAAG,CACnB;AAAEC,IAAAA,IAAI,EAAE,OAAO;AAAEC,IAAAA,IAAI,EAAEV;AAAM,GAAC,EAC9B;AAAES,IAAAA,IAAI,EAAE,SAAS;AAAEC,IAAAA,IAAI,EAAER;AAAQ,GAAC,EAClC;AAAEO,IAAAA,IAAI,EAAE,WAAW;AAAEC,IAAAA,IAAI,EAAEN;AAAU,GAAC,EACtC;AAAEK,IAAAA,IAAI,EAAE,MAAM;AAAEC,IAAAA,IAAI,EAAEJ;AAAK,GAAC,CAC7B;AAED,EAAA,IAAMK,KAAK,GAAGC,KAAK,CAAC,MAAM,EAAEJ,YAAY,CAAC;EAEzC,IAAMK,SAAS,GAAGC,QAAQ,CAAC;AAAED,IAAAA,SAAS,EAAE;GAAM,EAAEF,KAAK,CAAC;EACtD,IAAMI,OAAO,GAAGD,QAAQ,CAAC;AAAEC,IAAAA,OAAO,EAAE;GAAM,EAAEJ,KAAK,CAAC;AAElD,EAAA,IAAMK,oBAAoB,GAAGR,YAAY,CAACS,IAAI,CAC5C,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAAC,UAAA;AAAA,IAAA,IAAGT,IAAI,GAAAQ,IAAA,CAAJR,IAAI;AAAA,IAAA,OAAOA,IAAI,CAACU,SAAS,KAAIV,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAAS,KAAAA,CAAAA,IAAAA,CAAAA,UAAA,GAAJT,IAAI,CAAEW,IAAI,MAAA,IAAA,IAAAF,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYG,SAAS,CAAA;AAAA,GACvD,CAAC;EAED,IAAMC,WAAW,GAAGP,oBAAoB,GACpC;IACEP,IAAI,EAAEO,oBAAoB,CAACP,IAAI;IAC/BY,IAAI,EAAA,CAAAtB,qBAAA,GAAEiB,oBAAoB,CAACN,IAAI,MAAAX,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BsB;AACnC,GAAC,GACD,IAAI;EAER,OAAO;AAAEE,IAAAA,WAAW,EAAXA,WAAW;AAAEV,IAAAA,SAAS,EAATA,SAAS;AAAEE,IAAAA,OAAO,EAAPA;GAAS;AAC5C;;;;"}
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export { default as EmailDeliveryScreen } from './EmailDeliveryScreen.js';
2
2
  export { default as SparkpostDomainSetup } from './SparkpostDomainSetup.js';
3
3
  export { default as SparkpostDomainVerify } from './SparkpostDomainVerify.js';
4
+ import '@babel/runtime/helpers/slicedToArray';
5
+ import 'react';
4
6
  import '@bigbinary/neeto-cist';
5
7
  import '@bigbinary/neeto-commons-frontend/react-utils';
6
8
  import '@bigbinary/neeto-commons-frontend/utils';
@@ -13,29 +15,29 @@ import '@bigbinary/neetoui/Toastr';
13
15
  import 'ramda';
14
16
  import 'react-i18next';
15
17
  import 'react-router-dom';
16
- import './useSparkpostApi-W7XibjIp.js';
18
+ import './useSparkpostApi-qpRhsK7H.js';
17
19
  import '@babel/runtime/helpers/defineProperty';
18
20
  import '@tanstack/react-query';
19
21
  import 'axios';
20
- import '@babel/runtime/helpers/slicedToArray';
21
- import 'react';
22
- import './useOutlookIntegrationApi-ZgRWrUQN.js';
23
- import './useSparkpostDomain-DDI4pHcZ.js';
22
+ import '@bigbinary/neetoui/Pane';
23
+ import '@bigbinary/neetoui/Typography';
24
+ import '@bigbinary/neetoui/formik/Form';
25
+ import '@bigbinary/neetoui/formik/Input';
26
+ import '@bigbinary/neetoui/formik/Radio';
27
+ import '@bigbinary/neetoui/formik/ActionBlock';
28
+ import './useOutlookIntegrationApi-b_mNVfRE.js';
24
29
  import 'i18next';
30
+ import 'yup';
31
+ import 'react/jsx-runtime';
32
+ import './useSparkpostDomain-CuX-Gl5a.js';
25
33
  import '@bigbinary/neetoui/Button';
26
34
  import '@bigbinary/neetoui/Tag';
27
- import '@bigbinary/neetoui/Typography';
28
- import 'react/jsx-runtime';
29
35
  import '@bigbinary/neeto-molecules/CardLayout';
30
- import '@bigbinary/neetoui/formik/Input';
31
- import '@bigbinary/neetoui/formik/ActionBlock';
32
- import '@bigbinary/neetoui/formik/Form';
33
36
  import './constants-Cvxv8ly7.js';
34
37
  import '@babel/runtime/helpers/objectWithoutProperties';
35
38
  import 'classnames';
36
39
  import '@bigbinary/neeto-molecules/Container';
37
40
  import '@bigbinary/neeto-molecules/Header';
38
- import 'yup';
39
41
  import '@babel/runtime/helpers/toConsumableArray';
40
42
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
41
43
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,7 +5,61 @@ var reactQuery = require('@tanstack/react-query');
5
5
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
6
6
  var axios = require('axios');
7
7
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
8
- var useSparkpostApi = require('./useSparkpostApi-pa64NIl6.js');
8
+ var useSparkpostApi = require('./useSparkpostApi-D9NOjTNA.js');
9
+
10
+ var get$2 = function get(ownerId) {
11
+ return axios.get(utils.buildUrl(useSparkpostApi.SMTP_URL, {
12
+ ownerId: ownerId
13
+ }), {
14
+ showToastr: false
15
+ });
16
+ };
17
+ var create = function create(ownerId, payload) {
18
+ return axios.post(utils.buildUrl(useSparkpostApi.SMTP_URL, {
19
+ ownerId: ownerId
20
+ }), payload);
21
+ };
22
+ var destroy$2 = function destroy(ownerId) {
23
+ return axios["delete"](utils.buildUrl(useSparkpostApi.SMTP_URL, {
24
+ ownerId: ownerId
25
+ }));
26
+ };
27
+ var smtpApi = {
28
+ get: get$2,
29
+ create: create,
30
+ destroy: destroy$2
31
+ };
32
+
33
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
35
+ var useFetchSmtp = function useFetchSmtp(ownerId, options) {
36
+ return reactQuery.useQuery(_objectSpread$2({
37
+ queryKey: [useSparkpostApi.QUERY_KEYS.INTEGRATION_SMTP, ownerId],
38
+ queryFn: function queryFn() {
39
+ return smtpApi.get(ownerId);
40
+ },
41
+ retry: 1
42
+ }, options));
43
+ };
44
+ var useCreateSmtp = function useCreateSmtp(_ref) {
45
+ var ownerId = _ref.ownerId;
46
+ return reactUtils.useMutationWithInvalidation(function (payload) {
47
+ return smtpApi.create(ownerId, payload);
48
+ }, {
49
+ keysToInvalidate: [[useSparkpostApi.QUERY_KEYS.INTEGRATION_SMTP, ownerId]]
50
+ });
51
+ };
52
+ var useDestroySmtp = function useDestroySmtp(_ref2) {
53
+ var ownerId = _ref2.ownerId;
54
+ var queryClient = reactQuery.useQueryClient();
55
+ return reactUtils.useMutationWithInvalidation(function () {
56
+ return smtpApi.destroy(ownerId);
57
+ }, {
58
+ keysToInvalidate: [[useSparkpostApi.QUERY_KEYS.INTEGRATION_SMTP, ownerId], function () {
59
+ return useSparkpostApi.invalidateAllIntegrationQueries(queryClient, ownerId);
60
+ }]
61
+ });
62
+ };
9
63
 
10
64
  var get$1 = function get(ownerId) {
11
65
  return axios.get(utils.buildUrl(useSparkpostApi.GMAIL_URL, {
@@ -85,8 +139,11 @@ var useDestroyOutlook = function useDestroyOutlook(_ref) {
85
139
  });
86
140
  };
87
141
 
142
+ exports.useCreateSmtp = useCreateSmtp;
88
143
  exports.useDestroyGmail = useDestroyGmail;
89
144
  exports.useDestroyOutlook = useDestroyOutlook;
145
+ exports.useDestroySmtp = useDestroySmtp;
90
146
  exports.useFetchGmail = useFetchGmail;
91
147
  exports.useFetchOutlook = useFetchOutlook;
92
- //# sourceMappingURL=useOutlookIntegrationApi-CtHj_BzG.js.map
148
+ exports.useFetchSmtp = useFetchSmtp;
149
+ //# sourceMappingURL=useOutlookIntegrationApi-BC-RPHmJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOutlookIntegrationApi-BC-RPHmJ.js","sources":["../app/javascript/src/apis/integrations/smtp.js","../app/javascript/src/hooks/reactQuery/integrations/useSmtpIntegrationApi.js","../app/javascript/src/apis/integrations/gmail.js","../app/javascript/src/hooks/reactQuery/integrations/useGmailIntegrationApi.js","../app/javascript/src/apis/integrations/outlook.js","../app/javascript/src/hooks/reactQuery/integrations/useOutlookIntegrationApi.js"],"sourcesContent":["import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { SMTP_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(SMTP_URL, { ownerId }), { showToastr: false });\n\nconst create = (ownerId, payload) =>\n axios.post(buildUrl(SMTP_URL, { ownerId }), payload);\n\nconst destroy = ownerId => axios.delete(buildUrl(SMTP_URL, { ownerId }));\n\nconst smtpApi = { get, create, destroy };\n\nexport default smtpApi;\n","import { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport smtpApi from \"apis/integrations/smtp\";\nimport { QUERY_KEYS } from \"src/constants/query\";\nimport { invalidateAllIntegrationQueries } from \"utils\";\n\nexport const useFetchSmtp = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n queryFn: () => smtpApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useCreateSmtp = ({ ownerId }) =>\n useMutationWithInvalidation(payload => smtpApi.create(ownerId, payload), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SMTP, ownerId]],\n });\n\nexport const useDestroySmtp = ({ ownerId }) => {\n const queryClient = useQueryClient();\n\n return useMutationWithInvalidation(() => smtpApi.destroy(ownerId), {\n keysToInvalidate: [\n [QUERY_KEYS.INTEGRATION_SMTP, ownerId],\n () => invalidateAllIntegrationQueries(queryClient, ownerId),\n ],\n });\n};\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { GMAIL_URL, GMAIL_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(GMAIL_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(GMAIL_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst gmailApi = { get, destroy };\n\nexport default gmailApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport gmailApi from \"apis/integrations/gmail\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchGmail = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_GMAIL, ownerId],\n queryFn: () => gmailApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyGmail = ({ ownerId }) =>\n useMutationWithInvalidation(() => gmailApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_GMAIL, ownerId]],\n });\n","import axios from \"axios\";\nimport { buildUrl } from \"neetocommons/utils\";\n\nimport { OUTLOOK_URL, OUTLOOK_OAUTH_URL } from \"./constants\";\n\nconst get = ownerId =>\n axios.get(buildUrl(OUTLOOK_URL, { ownerId }), { showToastr: false });\n\nconst destroy = ownerId => {\n axios.delete(buildUrl(OUTLOOK_OAUTH_URL, { ownerId }), { showToastr: false });\n};\n\nconst outlookApi = { get, destroy };\n\nexport default outlookApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport outlookApi from \"apis/integrations/outlook\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchOutlook = (ownerId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId],\n queryFn: () => outlookApi.get(ownerId),\n retry: 1,\n ...options,\n });\n\nexport const useDestroyOutlook = ({ ownerId }) =>\n useMutationWithInvalidation(() => outlookApi.destroy(ownerId), {\n keysToInvalidate: [[QUERY_KEYS.INTEGRATION_OUTLOOK, ownerId]],\n });\n"],"names":["get","ownerId","axios","buildUrl","SMTP_URL","showToastr","create","payload","post","destroy","smtpApi","useFetchSmtp","options","useQuery","_objectSpread","queryKey","QUERY_KEYS","INTEGRATION_SMTP","queryFn","retry","useCreateSmtp","_ref","useMutationWithInvalidation","keysToInvalidate","useDestroySmtp","_ref2","queryClient","useQueryClient","invalidateAllIntegrationQueries","GMAIL_URL","GMAIL_OAUTH_URL","gmailApi","useFetchGmail","INTEGRATION_GMAIL","useDestroyGmail","OUTLOOK_URL","OUTLOOK_OAUTH_URL","outlookApi","useFetchOutlook","INTEGRATION_OUTLOOK","useDestroyOutlook"],"mappings":";;;;;;;;;AAKA,IAAMA,KAAG,GAAG,SAANA,GAAGA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACjBC,KAAK,CAACF,GAAG,CAACG,cAAQ,CAACC,wBAAQ,EAAE;AAAEH,IAAAA,OAAO,EAAPA;AAAQ,GAAC,CAAC,EAAE;AAAEI,IAAAA,UAAU,EAAE;AAAM,GAAC,CAAC;AAAA,CAAA;AAEnE,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAIL,OAAO,EAAEM,OAAO,EAAA;AAAA,EAAA,OAC9BL,KAAK,CAACM,IAAI,CAACL,cAAQ,CAACC,wBAAQ,EAAE;AAAEH,IAAAA,OAAO,EAAPA;GAAS,CAAC,EAAEM,OAAO,CAAC;AAAA,CAAA;AAEtD,IAAME,SAAO,GAAG,SAAVA,OAAOA,CAAGR,OAAO,EAAA;AAAA,EAAA,OAAIC,KAAK,CAAO,QAAA,CAAA,CAACC,cAAQ,CAACC,wBAAQ,EAAE;AAAEH,IAAAA,OAAO,EAAPA;AAAQ,GAAC,CAAC,CAAC;AAAA,CAAA;AAExE,IAAMS,OAAO,GAAG;AAAEV,EAA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AACR,OAAO,CAAC;GAAE,EAAA;IAC7DsB,gBAAgB,EAAE,CAAC,CAACP,0BAAU,CAACuB,mBAAmB,EAAEtC,OAAO,CAAC;AAC9D,GAAC,CAAC;AAAA;;;;;;;;;;"}
@@ -1,9 +1,63 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import { useQuery } from '@tanstack/react-query';
2
+ import { useQuery, useQueryClient } from '@tanstack/react-query';
3
3
  import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
4
4
  import axios from 'axios';
5
5
  import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
6
- import { G as GMAIL_URL, d as GMAIL_OAUTH_URL, Q as QUERY_KEYS, O as OUTLOOK_URL, e as OUTLOOK_OAUTH_URL } from './useSparkpostApi-W7XibjIp.js';
6
+ import { S as SMTP_URL, Q as QUERY_KEYS, i as invalidateAllIntegrationQueries, G as GMAIL_URL, d as GMAIL_OAUTH_URL, O as OUTLOOK_URL, e as OUTLOOK_OAUTH_URL } from './useSparkpostApi-qpRhsK7H.js';
7
+
8
+ var get$2 = function get(ownerId) {
9
+ return axios.get(buildUrl(SMTP_URL, {
10
+ ownerId: ownerId
11
+ }), {
12
+ showToastr: false
13
+ });
14
+ };
15
+ var create = function create(ownerId, payload) {
16
+ return axios.post(buildUrl(SMTP_URL, {
17
+ ownerId: ownerId
18
+ }), payload);
19
+ };
20
+ var destroy$2 = function destroy(ownerId) {
21
+ return axios["delete"](buildUrl(SMTP_URL, {
22
+ ownerId: ownerId
23
+ }));
24
+ };
25
+ var smtpApi = {
26
+ get: get$2,
27
+ create: create,
28
+ destroy: destroy$2
29
+ };
30
+
31
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
32
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
33
+ var useFetchSmtp = function useFetchSmtp(ownerId, options) {
34
+ return useQuery(_objectSpread$2({
35
+ queryKey: [QUERY_KEYS.INTEGRATION_SMTP, ownerId],
36
+ queryFn: function queryFn() {
37
+ return smtpApi.get(ownerId);
38
+ },
39
+ retry: 1
40
+ }, options));
41
+ };
42
+ var useCreateSmtp = function useCreateSmtp(_ref) {
43
+ var ownerId = _ref.ownerId;
44
+ return useMutationWithInvalidation(function (payload) {
45
+ return smtpApi.create(ownerId, payload);
46
+ }, {
47
+ keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SMTP, ownerId]]
48
+ });
49
+ };
50
+ var useDestroySmtp = function useDestroySmtp(_ref2) {
51
+ var ownerId = _ref2.ownerId;
52
+ var queryClient = useQueryClient();
53
+ return useMutationWithInvalidation(function () {
54
+ return smtpApi.destroy(ownerId);
55
+ }, {
56
+ keysToInvalidate: [[QUERY_KEYS.INTEGRATION_SMTP, ownerId], function () {
57
+ return invalidateAllIntegrationQueries(queryClient, ownerId);
58
+ }]
59
+ });
60
+ };
7
61
 
8
62
  var get$1 = function get(ownerId) {
9
63
  return axios.get(buildUrl(GMAIL_URL, {
@@ -83,5 +137,5 @@ var useDestroyOutlook = function useDestroyOutlook(_ref) {
83
137
  });
84
138
  };
85
139
 
86
- export { useFetchOutlook as a, useDestroyGmail as b, useDestroyOutlook as c, useFetchGmail as u };
87
- //# sourceMappingURL=useOutlookIntegrationApi-ZgRWrUQN.js.map
140
+ export { useFetchOutlook as a, useFetchSmtp as b, useCreateSmtp as c, useDestroyGmail as d, useDestroyOutlook as e, useDestroySmtp as f, useFetchGmail as u };
141
+ //# sourceMappingURL=useOutlookIntegrationApi-b_mNVfRE.js.map