{"version":3,"file":"main.cbca8cf4.js","mappings":"uIAAA,SACCA,OAAQ,wBACRC,SAAU,mCACVC,YAAa,UAAG,uBAAmB,aACnCC,UAAW,yB,gBCJZ,IAAYC,EASAC,E,kKATZ,SAAYD,GACX,mBACA,0BACA,kBACA,yBACA,YACA,kBAND,CAAYA,IAAAA,EAAS,KASrB,SAAYC,GACX,kBACA,oBAFD,CAAYA,IAAAA,EAAU,KAIf,IAoDKC,EAlCCC,EAAqB,QAErBC,EAAS,+BAETC,EAAkB,8BAElBC,EAAgB,mCAmBhBC,EAPH,cAQGC,EAAuB,eAIvBC,EAAgB,2CAEhBC,EAAe,yBAE5B,SAAYR,GACX,oBACA,uDACA,uBACA,4FACA,kHACA,iHACA,qBACA,gEACA,mBACA,iCACA,kCACA,0CAGA,yDACA,sDACA,+FACA,4CAGA,wDAGA,wDAGA,mDACA,qCACA,+CACA,sFACA,+GACA,oDACA,kDACA,kDACA,kDACA,oDACA,sFACA,6BACA,uDACA,0FACA,wEACA,sDACA,0DACA,8DAGA,yFAGA,2EACA,qEAGA,+CAGA,oDACA,oEAGA,kDAGA,qCACA,gDACA,4HACA,qEACA,uEAGA,yBACA,kCACA,+CACA,qCACA,gCACA,qCAGA,4CACA,4CACA,4CACA,8CACA,sCACA,0CAGA,mFACA,kDACA,0EAGA,wDACA,wDACA,iEACA,4EACA,yDAGA,2DACA,iCACA,6DACA,0EAGA,+CACA,kDAGA,uCACA,+CACA,2CACA,6CACA,qDAGA,uCACA,wCACA,8GACA,uGACA,iEACA,iEACA,8DACA,8DACA,qEACA,uDAGA,+DACA,8DACA,+DAGA,2EACA,0EACA,2GACA,sCAGA,wCACA,wCACA,0CACA,0CACA,0CAGA,uDACA,uDAGA,uCACA,uCACA,4CACA,gDACA,0CACA,+CACA,wDACA,4DACA,6CACA,iDACA,sDACA,yDACA,4CACA,gDACA,gDACA,oDAGA,wCAGA,kFACA,oEACA,mEACA,iDACA,oFAGA,mEAGA,4CACA,gEACA,8DAGA,kCACA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e9C,EAAOhB,QAAQ,MAC1C+D,mBAAoB,oBAAa/C,EAAOkB,UAAU,MAClD8B,WAAY,qCACZC,mBAAoB,qCACpBC,SAAU,qCAEVC,MAAO,qCACPC,OAAQ,qCACRC,OAAQ,sCAERC,UAAW,sBAAevE,EAAcE,KAAI,MAE5CsE,MAAO,kCAEPzwB,QAAS,CACR0wB,QAAS,sBAAexD,EAAOhB,QAAQ,KAAI,yBAAiBgB,EAAOd,QAAQ,MAE5EoD,WAAY,CACXkB,QAAS,oBAAaxD,EAAOhB,QAAQ,MACrCyE,QAAS,oBAAazD,EAAOd,QAAQ,QA6CtCpC,WAzCkB,CAClBC,MAAO,4CACP2G,KAAM,4CACNC,UAAW,0CACXC,YAAa,uCAEbC,IAAK,uBACLrB,MACC,4GACDsB,WACC,6EAgCDC,aArGoB,CACpBhC,QAAS,OACTD,MAAO,OACPD,QAAS,OACTD,MAAO,QAkGPoC,eA/FsB,CACtBjC,QAAS,OACTD,MAAO,OACPD,QAAS,OACTD,MAAO,QA4FPqC,cAzFqB,CACrBlC,QAAS,WACTD,MAAO,WACPD,QAAS,WACTD,MAAO,aAsFPsC,kBAnFyB,CACzBpC,MAAO,UACPD,QAAS,WACTD,MAAO,aAiFPuC,UAjCiB,CACjBC,OAAQ,QAiCRC,OA9Bc,CACdC,OAAQ,EACRC,IAAK,EACLC,IAAK,EACLC,IAAK,GACLC,OAAQ,GACRC,QAAS,KA2BV,Y","sources":["webpack://goodkind-frontend/./src/app/authConfig.ts","webpack://goodkind-frontend/./src/app/constants/index.ts","webpack://goodkind-frontend/./src/app/utils/history.ts","webpack://goodkind-frontend/./src/app/app.styles.tsx","webpack://goodkind-frontend/./src/app/app.tsx","webpack://goodkind-frontend/./src/app/index.tsx","webpack://goodkind-frontend/./src/app/constants/Sentry/index.ts","webpack://goodkind-frontend/./src/app/redux/approval/action.ts","webpack://goodkind-frontend/./src/app/redux/assigned/action.ts","webpack://goodkind-frontend/./src/app/redux/audience/action.ts","webpack://goodkind-frontend/./src/app/redux/auth/action.ts","webpack://goodkind-frontend/./src/app/redux/automations/action.ts","webpack://goodkind-frontend/./src/app/redux/blackbaud/action.ts","webpack://goodkind-frontend/./src/app/redux/campaign/action.ts","webpack://goodkind-frontend/./src/app/redux/campaign/types/index.tsx","webpack://goodkind-frontend/./src/app/redux/constants/index.ts","webpack://goodkind-frontend/./src/app/redux/contact/constants/index.ts","webpack://goodkind-frontend/./src/app/redux/cta/action.ts","webpack://goodkind-frontend/./src/app/redux/onboarding/actions.ts","webpack://goodkind-frontend/./src/app/redux/onboarding/constants/index.ts","webpack://goodkind-frontend/./src/app/redux/reply/action.ts","webpack://goodkind-frontend/./src/app/redux/reply/constants/index.tsx","webpack://goodkind-frontend/./src/app/redux/scheduled/action.ts","webpack://goodkind-frontend/./src/app/redux/sent/action.ts","webpack://goodkind-frontend/./src/app/redux/sharedVideo/action.ts","webpack://goodkind-frontend/./src/app/redux/contact/mappers.ts","webpack://goodkind-frontend/./src/app/redux/contact/index.ts","webpack://goodkind-frontend/./src/app/redux/campaign/index.ts","webpack://goodkind-frontend/./src/app/redux/campaign/utils/index.tsx","webpack://goodkind-frontend/./src/app/redux/recipe/action.ts","webpack://goodkind-frontend/./src/app/redux/recipe/index.ts","webpack://goodkind-frontend/./src/app/redux/cta/index.ts","webpack://goodkind-frontend/./src/app/redux/stories/index.ts","webpack://goodkind-frontend/./src/app/redux/approval/index.ts","webpack://goodkind-frontend/./src/app/redux/assigned/index.ts","webpack://goodkind-frontend/./src/app/redux/reply/index.ts","webpack://goodkind-frontend/./src/app/redux/scheduled/index.ts","webpack://goodkind-frontend/./src/app/redux/sent/index.ts","webpack://goodkind-frontend/./src/app/redux/storyteller/index.ts","webpack://goodkind-frontend/./src/app/redux/storyTemplate/index.ts","webpack://goodkind-frontend/./src/app/redux/storyTemplate/constants/index.tsx","webpack://goodkind-frontend/./src/app/redux/blackbaud/index.ts","webpack://goodkind-frontend/./src/app/redux/sharedVideo/index.ts","webpack://goodkind-frontend/./src/app/redux/tag/index.ts","webpack://goodkind-frontend/./src/app/redux/transaction/index.ts","webpack://goodkind-frontend/./src/app/redux/workspace/schemas/index.ts","webpack://goodkind-frontend/./src/app/redux/workspace/index.ts","webpack://goodkind-frontend/./src/app/redux/auth/index.ts","webpack://goodkind-frontend/./src/app/redux/onboarding/index.ts","webpack://goodkind-frontend/./src/app/redux/audience/index.ts","webpack://goodkind-frontend/./src/app/redux/automations/index.ts","webpack://goodkind-frontend/./src/app/redux/store.ts","webpack://goodkind-frontend/./src/app/redux/fetch-middleware.ts","webpack://goodkind-frontend/./src/app/redux/stories/action.ts","webpack://goodkind-frontend/./src/app/redux/stories/constants/index.tsx","webpack://goodkind-frontend/./src/app/redux/storyTemplate/action.ts","webpack://goodkind-frontend/./src/app/redux/storyteller/action.ts","webpack://goodkind-frontend/./src/app/redux/tag/action.ts","webpack://goodkind-frontend/./src/app/redux/transaction/action.ts","webpack://goodkind-frontend/./src/app/redux/types/index.ts","webpack://goodkind-frontend/./src/app/redux/video/action.ts","webpack://goodkind-frontend/./src/app/redux/video/index.ts","webpack://goodkind-frontend/./src/app/redux/workspace/action.ts","webpack://goodkind-frontend/./src/app/utils/ObjectToOptions.ts","webpack://goodkind-frontend/./src/app/utils/TokenStorage.ts","webpack://goodkind-frontend/./src/app/utils/createFetchReducer.ts","webpack://goodkind-frontend/./src/app/utils/createFetchTypes.ts","webpack://goodkind-frontend/./src/app/utils/entityNormalizer.ts","webpack://goodkind-frontend/./src/app/utils/date-formatter.ts","webpack://goodkind-frontend/./src/common/components/presentation/Loader/Loader.styles.tsx","webpack://goodkind-frontend/./src/common/components/presentation/Loader/Loader.tsx","webpack://goodkind-frontend/./src/common/components/presentation/Toast/Toast.styles.tsx","webpack://goodkind-frontend/./src/common/components/presentation/Toast/ShowToast/ShowToast.tsx","webpack://goodkind-frontend/./src/global/axios.ts","webpack://goodkind-frontend/./src/global/theme.ts"],"sourcesContent":["export default {\n\tdomain: 'login.goodkindapp.com',\n\tclientId: 'zJvWJujfu6BjSTnnegs1BkeADmcuL4uZ',\n\tredirectUri: `${process.env.APP_URL}/callback`,\n\tlogoutUrl: process.env.APP_URL,\n};\n","export enum operators {\n\tgreaterThan = 'gt',\n\tgreaterThanEquals = 'gte',\n\tlesserThan = 'lt',\n\tlesserThanEquals = 'lte',\n\tnot = 'not',\n\texists = 'exists',\n}\n\nexport enum orderTypes {\n\tascending = 'asc',\n\tdescending = 'desc',\n}\nexport const sortDropdownOptions = [\n\t{\n\t\tkey: 'engagementRate',\n\t\ttext: 'Most engaging',\n\t\tvalue: 'engagementRate',\n\t},\n\t{\n\t\tkey: 'storyViews',\n\t\ttext: 'Most views',\n\t\tvalue: 'storyViews',\n\t},\n\t{\n\t\tkey: 'totalTransactedSum',\n\t\ttext: 'Most donations',\n\t\tvalue: 'totalTransactedSum',\n\t},\n];\n\nexport const getGoodkindVersion = process.env.VERSION;\n\nexport const apiUrl = process.env.API_URL;\n\nexport const webRecordingUrl = process.env.WEB_RECORDING_URL;\n\nexport const mixpanelToken = process.env.MIXPANEL_TOKEN;\n\nfunction getVideoPageUrlDomain() {\n\tswitch (process.env.NODE_ENV) {\n\t\tcase 'stage':\n\t\t\treturn 'givemagicvideopageproduction-stage.azurewebsites.net';\n\n\t\tcase 'qa':\n\t\t\treturn 'givemagicvideopageproduction-qa.azurewebsites.net';\n\n\t\tcase 'production':\n\t\tcase 'prod':\n\t\t\treturn 'goodkind.tv';\n\n\t\tdefault:\n\t\t\treturn 'givemagicvideopageproduction-qa.azurewebsites.net';\n\t}\n}\n\nexport const videoPageUrlDomain = getVideoPageUrlDomain();\nexport const storytellerAlgoliaId = process.env.ALGOLIA_STORYTELLER_INDEX_NAME;\n\nexport const videosAlgoliaId = process.env.ALGOLIA_VIDEO_INDEX_NAME;\n\nexport const hotglueApiKey = process.env.HOTGLUE_API_KEY;\n\nexport const hotglueEnvId = process.env.HOTGLUE_ENV_URL;\n\nexport enum ToastMessage {\n\tsuccess = 'Success',\n\terror = 'There was an error, can you please try again',\n\tloading = 'Loading...',\n\terrorUpdatingWorkspace = 'There has been an error updating the workspace, please try again',\n\terrorAuthenticatingBlackbaud = 'You’ll need to authenticate with Blackbaud in order to send a Blackbaud donation',\n\tsmsOff = 'One of the contacts has SMS preference, please turn SMS messaging on in Settings before sending video',\n\tsmsSent = 'SMS sent',\n\tupdateWorkspace = 'You’ve successfully updated your Workspace!',\n\tcopied = 'Copied!',\n\tfailedToCopy = 'Failed to copy!',\n\tarchive = 'Successfully archived',\n\tnumbersNotAllowed = 'Numbers not allowed',\n\n\t/**CTA*/\n\tcreateCTA = 'You have successfully created a new action',\n\tupdateCTA = 'You have successfully updated an action',\n\terrorCreatingCTA = 'There has been an error creating the new action, can you please try again',\n\tctaNotSelected = 'There is no CTA selected',\n\n\t/**Delete modal*/\n\tdeletedAssignStory = 'You’ve deleted an assigned video',\n\n\t/**Edited assigned story*/\n\teditedAssignedStory = 'You’ve edited an assigned video',\n\n\t/**Campaign wizard*/\n\tcampaignUpdated = 'Your campaign has been updated',\n\tcreatedCampaign = 'Campaign created',\n\tsavedDraftCampaign = 'Campaign saved as draft',\n\terrorCreatingCampaign = 'There has been an error creating campaign, please try again',\n\terrorSendingAddress = 'Workspace requires default sending address to be verified in order to launch campaigns',\n\tcampaignLaunched = 'Campaign successfully launched',\n\taudienceCreated = 'Audience successfully created',\n\taudienceUpdated = 'Audience successfully updated',\n\taudienceDeleted = 'Audience successfully deleted',\n\taudienceSelected = 'Audience successfully selected',\n\terrorCreatingAudience = 'There has been an error creating audience, please try again',\n\tscriptSaved = 'Script saved',\n\tcampaignNameUpdated = 'Campaign name has been updated',\n\tcampaignUpdatedNameDuplicated = 'Campaign updated. Warning: Campaign name already exists',\n\tcampaignNameDuplicatedWarning = 'Warning: Campaign name already exists',\n\tctaCreatedAndSelected = 'Action created and selected',\n\tdeactivatedCampaign = 'Campaign deactivated successfully',\n\tdraftCampaignsDeleted = 'Draft campaign deleted successfully',\n\n\t/** Audience*/\n\taudienceMaxContactError = 'The contacts selected exceed the permitted for this campaign',\n\n\t/** Campaign summary*/\n\tpreviewEmailSent = 'We’ve sent you a preview email from your new campaign',\n\terrorSendingPreview = 'There was an error sending the email preview',\n\n\t/**Triggers*/\n\terrorFillLastTrigger = 'Fill the last trigger',\n\n\t/**Resend stories*/\n\tstoryResent = 'Campaign videos successfully resent',\n\terrorResendingStories = 'There has been an error resending videos.',\n\n\t/** Import contacts*/\n\tuploadContacts = 'Contacts successfully imported',\n\n\t/** Contacts */\n\tdeletedContacts = 'Contacts deleted',\n\tassignedStoryCreated = 'Assigned video created',\n\terrorContactSendingAddress = 'Workspace requires default sending address to be verified in order to create a video message',\n\tcontactAlreadyExistInCampaign = 'Contact already exists in campaign',\n\tunableToAddContact = 'Unable to add contact to this type of campaign.',\n\n\t/*** Video */\n\tvideoSent = 'Video sent',\n\tsendingVideo = 'Sending video...',\n\tvideoUploaded = 'Successfully uploaded video!',\n\tcaptionsUpdated = 'Captions updated',\n\tfavorite = 'Marked as favorite',\n\tfavoriteUpdated = 'Favorite updated',\n\n\t/** Story */\n\tstoryCreated = 'Video created successfully',\n\terrorCreatingStory = 'Error creating video',\n\tstoryEnRoute = 'Your video is now en route',\n\terrorAssigningStory = 'Error assigning video',\n\tstorySent = 'Video sent successfully',\n\terrorSendingStory = 'Error sending video',\n\n\t/**Login*/\n\terrorPermissionDenied = 'Permission denied. You do not have administrator access.',\n\tloggedIn = 'You have now successfully logged in.',\n\terrorLoginFirst = 'You must log in first to be able to use the platform!',\n\n\t/**Storyteller*/\n\tstorytellerUpdated = 'Team member updated successfully',\n\terrorCreatingStoryteller = 'Error inviting team member',\n\tstorytellerCreated = 'Team member has been invited successfully',\n\terrorEditingStoryteller = 'There has been an error editing the team member',\n\tstorytellerDeleted = 'Team members deleted successfully',\n\n\t/** Onboarding */\n\terrorWorkspaceAlreadyCreated = 'Workspace already created',\n\tcolorsUpdated = 'Colors updated',\n\terrorAddValidaStoryteller = 'Please add a valid storyteller',\n\tonBoardingComplete = 'Congratulations, you’re now ready to use Goodkind.',\n\n\t/** Blackbaud*/\n\talreadyAuthenticated = 'Already authenticated',\n\terrorSelectBBMS = 'Please select BBMS account ID',\n\n\t/** Integration*/\n\tgatewayConnected = 'Gateway connected',\n\tintegrationConnected = 'Integration connected',\n\tintegrationUpdated = 'Integration updated',\n\tgatewayDisconnected = 'Gateway disconnected',\n\tintegrationDisconnected = 'Integration disconnected',\n\n\t/** Workspace*/\n\tworkspaceUpdated = 'Workspace updated',\n\tworkspaceCreated = 'Workspace created!',\n\terrorWorkspaceEmail = 'Workspace requires default sending address to be verified in order to create a video.',\n\terrorEmailAddressWorkspaceSelection = 'Incorrect email address. Does not match storyteller on record.',\n\tprofilePictureUploaded = 'Successfully uploaded profile picture',\n\tcustomAttributeCreated = 'Custom attribute successfully created',\n\tcustomAttributeMapped = 'Custom attribute succesfully mapped',\n\tdomainVerified = 'Email address domain successfully verified',\n\terrorDomainAuthentication = 'Email address domain not authenticated',\n\terrorDomainNotFound = 'Email address domain not found',\n\n\t/** CardStorytellers email verification */\n\tresendVerificationSuccess = 'Verification successfully resent',\n\tverificationProgress = 'Storyteller verification in progress',\n\tverificationSuccess = 'Storyteller verification is successful',\n\n\t/** Upload*/\n\terrorVideoUpload = 'Error uploading, the video can not be more than 100MB',\n\tcontactsToCampaignAdded = 'Contacts successfully added to this campaign.',\n\tcontactsToCampaignError = 'You have selected one or more contacts that are already part of this campaign.',\n\tupdatedSettings = 'Settings updated ',\n\n\t/** Tags */\n\ttagUpdated = 'Tag successfully updated',\n\ttagDeleted = 'Tag successfully deleted',\n\ttagsUpdated = 'Tags successfully updated',\n\ttagsCreated = 'Tags successfully created',\n\ttagsDeleted = 'Tags successfully deleted',\n\n\t/** Campaign Story Templates */\n\tstoryTemplateUpdated = 'Template successfully updated',\n\tstoryTemplateCreated = 'Template successfully created',\n\n\t/** Story/Reply details */\n\terrorStoryNotFound = 'Video not found',\n\terrorReplyNotFound = 'Reply not found',\n\tupdatedReply = 'Successfully updated reply',\n\tupdatedReplies = 'Successfully updated replies',\n\tsingleReplyStoryDeleted = 'Reply deleted',\n\tseveralReplyStoriesDeleted = 'Replies deleted',\n\tsingleScheduledStoryDeleted = 'Scheduled video deleted',\n\tseveralScheduledStoriesDeleted = 'Scheduled videos deleted',\n\tsingleApprovalStoryDeleted = 'Video deleted',\n\tseveralApprovalStoriesDeleted = 'Videos deleted',\n\tsingleAssignedStoryDeleted = 'Assigned video deleted',\n\tseveralAssignedStoriesDeleted = 'Assigned video deleted',\n\tsingleStoryArchived = 'Sent video archived',\n\tseveralStoriesArchived = 'Sent videos archived',\n\tsingleStoryUnarchived = 'Sent video unarchived',\n\tseveralStoriesUnarchived = 'Sent videos unarchived',\n\n\t/** Approvals */\n\tstoryRejected = 'Rejected successfully',\n\n\t/** Template **/\n\tduplicatedTemplateNameError = 'Name of template already exists. Try another name',\n\tmanualDistributionError = 'Please check your assignment percentage',\n\tbackgroundRequired = 'Background image is missing in the template',\n\tlogoRequired = 'Logo is missing in the template',\n\tbackgroundAndLogoRequired = 'Background image and logo are missing in the template',\n\n\t/** Captions Settings */\n\tthreeWordsNotAllowed = 'Keywords can only have maximum of 2 words',\n\n\t/** Automations */\n\tautomationNotFound = 'Automation not found',\n\tcreateAutomation = \"You've succesfully created your automation\",\n\teditAutomation = \"You've successfully edited your automation\",\n\n\t/** Groups */\n\tgroupNotFound = 'Group not found',\n\tcreateGroup = \"You've succesfully created your group\",\n\tgroupWithoutStorytellers = 'Every group needs at least one storyteller for assignment.',\n\n\t// Caption suggestion\n\tsuggestionCreated = 'Suggestion created',\n\tsuggestionDeleted = 'Suggestion removed',\n\n\t/** Delivery Channels */\n\tdeliveryChannelUpdated = 'Delivery Channel updated successfully',\n}\n\nexport const ToastPosition = {\n\ttop: '100px',\n\tright: '36px',\n\twidth: 'auto',\n};\n\nexport const GoodKindApp = {\n\tAndroid: 'https://goodkind.app',\n\tIOS: 'https://goodkind.app',\n};\n\nexport enum ServiceResponse {\n\tsaveDraft = 'draft saved',\n\tvideoArchived = 'video archived',\n\tfavoriteUpdated = 'favorite updated',\n\ttoggledCaptions = 'Captions toggled',\n}\n\nexport enum MixpanelEvent {\n\tviewedPage = 'Viewed Page',\n\n\tcreatedRecipe = 'Created drafts from recipe',\n\n\tcreatedOneToOneCampaign = 'Clicked create a One to One campaign',\n\tcreatedOneToAllCampaign = 'Clicked create a One to All campaign',\n\tcreatedCollectVideosCampaign = 'Clicked create a Collect Videos campaign',\n\tcompletedAction = 'Completed campaign call to action step',\n\tcompletedTemplate = 'Completed campaign template step',\n\tcompletedStoryteller = 'Completed campaign storyteller step',\n\tcompletedInstructions = 'Completed campaign Instruction step',\n\tcompletedAudience = 'Completed campaign audience step',\n\tcompletedTrigger = 'Completed campaign Trigger step',\n\tcompletedVideo = 'Completed campaign video step',\n\n\tcompletedCampaignTypeStep = 'Completed campaign type step',\n\n\tcreatedWorkspace = 'Created Workspace',\n\n\tchangedWorkspace = 'Changed Workspace',\n\n\tlaunchedCampaign = 'Launched Campaign',\n\tlaunchedDraftCampaign = 'Launched Draft Campaign',\n\tlaunchedScheduledCampaign = 'Launched Scheduled Campaign',\n\tsavedCampaign = 'Saved Campaign',\n\tdraftCampaign = 'Draft Campaign',\n\trenameCampaign = 'Campaign name changed',\n\tabandonedCampaign = 'Abandoned Campaign',\n\tdeactivatedCampaignNoStories = 'Campaign deactivated with no stories',\n\tdeactivatedCampaignDelete = 'Campaign deactivated and delete stories',\n\tdeactivatedCampaignFinish = 'Campaign deactivated and finish stories',\n\tupdatedCampaignPreview = 'Updated campaign preview',\n\tupdatedEmailTemplate = 'Updated email template',\n\tcampaignInstructions = 'Instructions added',\n\tpreviewSent = 'Sent preview',\n\n\tstorytellerChanged = 'Campaign builder storyteller changed',\n\n\tlogin = 'Login',\n\n\tinvitedStoryteller = 'Invited Storyteller',\n\teditedStoryteller = 'Edited Storyteller',\n\n\tverifiedStoryteller = 'Verified Storyteller',\n\tresentVerification = 'Resent Verification',\n\tcheckedVerification = 'Checked Verification',\n\n\tcreatedCTA = 'Created CTA',\n\tupdatedCTA = 'Updated CTA',\n\tdeletedCTA = 'Deleted CTA',\n\n\tdeletedContacts = 'Deleted Contacts',\n\n\topenedAudienceBuilder = 'Opened Audience Builder',\n\tcreatedAudience = 'Created Audience',\n\tpreviewAudience = 'Previewed Audience',\n\n\tstoryTemplateCreated = 'New template created',\n\tstoryTemplateDefaultSelected = 'Default template selected',\n\tstoryTemplateSelected = 'Existing template selected',\n\tnewAction = 'New action created',\n\n\tdeletedAssignedStories = 'Deleted Assigned Videos',\n\teditedAssignedStoryteller = 'Edited Assigned Storyteller',\n\trejectedApprovalStories = 'Rejected Approval Videos',\n\tapprovedApprovalStories = 'Approved Approval Videos',\n\tsawApprovalStoryPreview = 'Saw Approval Videos Preview',\n\tdeletedScheduledStories = 'Deleted Scheduled Videos',\n\tsawScheduledStoryPreview = 'Saw Scheduled Video Preview',\n\tassignedStoryReply = 'Assigned Video Reply',\n\tclosedStoryReply = 'Closed Video Reply',\n\tdeletedStoryReply = 'Deleted Video Reply',\n\treopenedReply = 'Reopened Video Reply',\n\taddedSentStoryContactsToCampaign = 'Added Sent Video Contacts To Campaign',\n\tsawSentStoryPreview = 'Saw Sent Video Preview',\n\tarchivedSentStory = 'Archived Sent Video',\n\tunarchivedSentStory = 'Unarchived Sent Video',\n\n\tupdatedCaptions = 'Updated Captions',\n\tcontactsImported = 'Contacts imported',\n\tcampaignContactsAdded = 'Contacts added to campaign',\n\n\trecipeOpened = 'Opened recipe',\n\tvideoUploaded = 'Uploaded video',\n\tcampaignVideoUploaded = 'Uploaded video in campaign builder',\n\n\tdraftOpened = 'Opened Draft Campaign',\n\n\tassignedStory = 'New Video Assigned',\n\tsentVideo = 'Video Sent From Library',\n\n\tgetHelp = 'Get help',\n}\n\nexport const intercomAppId = 'kez33khf';\n\nexport const engagementScoreHint =\n\t'Engagement rate takes into account the % of the video watched, hearting, shares & more.';\n","import { createBrowserHistory } from 'history';\n\nexport default createBrowserHistory();\n","import { createGlobalStyle } from 'styled-components';\nimport { GoodkindTheme } from '../global/theme';\n\nexport const GlobalStyle = createGlobalStyle`\n * {\n box-sizing: border-box;\n }\n\n body {\n background: ${GoodkindTheme.colors.background} !important;\n font-family: ${GoodkindTheme.fonts.default} !important;\n color: ${GoodkindTheme.colors.dark[700]};\n }\n\n p {\n font-family: ${GoodkindTheme.fonts.default} !important;\n }\n\n a {\n text-decoration: none;\n }\n\n .Toastify__toast {\n height: 56px !important;\n min-height: 56px !important;\n padding: 0;\n border-radius: ${GoodkindTheme.borderRadius.default} !important;\n background-color: ${GoodkindTheme.colors.neutral[0]} !important;\n color: ${GoodkindTheme.colors.neutral[500]} !important;\n font-family: ${GoodkindTheme.fonts.default} !important;\n font-weight: 500;\n }\n \n .Toastify__toast-body {\n padding: 0 !important;\n\n svg {\n margin-top: -4px !important;\n }\n\n > div {\n > div:first-child {\n width: 36px !important; \n height: 36px !important; \n }\n }\n }\n\n\n .Toastify__close-button {\n padding: 8px;\n margin-left: 8px;\n \n > svg {\n fill: ${GoodkindTheme.colors.neutral[500]} !important;\n }\n }\n\n`;\n","import React, { Suspense, lazy } from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport { Provider } from 'react-redux';\nimport { ToastContainer } from 'react-toastify';\nimport { Auth0Provider } from '@auth0/auth0-react';\nimport * as Sentry from '@sentry/react';\nimport { BrowserTracing } from '@sentry/tracing';\nimport { datadogRum } from '@datadog/browser-rum';\n\n// import 'semantic-ui-css/semantic.min.css';\n// import 'react-toastify/dist/ReactToastify.css';\nconst CSSLoader = lazy(() => import('./CSSLoader'));\n\nimport store from './redux/store';\n\nconst Routes = lazy(() => import('./routes'));\n// import Routes from './routes';\nimport config from './authConfig';\nimport { ToastPosition } from './constants';\n\nimport history from './utils/history';\n\nimport GoodkindTheme from '../global/theme';\n\nimport { GlobalStyle } from './app.styles';\nimport { sentryKey } from './constants/Sentry';\n\nexport default function App(props: AppProps) {\n\tconst onRedirectCallback = (appState: any) => {\n\t\thistory.push(\n\t\t\tappState && appState.targetUrl\n\t\t\t\t? appState.targetUrl\n\t\t\t\t: window.location.pathname + '/Home',\n\t\t);\n\t};\n\n\t// explictly have to enable it to avoid local metrics\n\t// by default case\n\tif (process.env.ENABLE_DATADOG === 'on') {\n\t\tdatadogRum.init({\n\t\t\tapplicationId: '3d61d234-172e-4fb7-90b3-df082f74dd6c',\n\t\t\tclientToken: 'pub4dbf744de6ec327d735d607a2cf091af',\n\t\t\tsite: 'datadoghq.com',\n\t\t\tservice: 'webapp',\n\t\t\tenv: process.env.NODE_ENV,\n\t\t\t// Specify a version number to identify the deployed version of your application in Datadog\n\t\t\t// version: '1.0.0',\n\t\t\tsampleRate: 100,\n\t\t\ttrackInteractions: true,\n\t\t\t// disabling session replay\n\t\t\t// defaultPrivacyLevel: 'mask-user-input'\n\t\t});\n\t\t// disabling session replay\n\t\t// datadogRum.startSessionReplayRecording();\n\t}\n\n\tSentry.init({\n\t\tdsn: sentryKey,\n\t\tintegrations: [new BrowserTracing()],\n\t\trelease: 'goodkind-frontend@4.8.1',\n\t\tenvironment: process.env.NODE_ENV,\n\t\ttracesSampleRate: 1.0,\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t}>\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\ntype AppProps = {\n\t/** This property is used for a personalized greeting */\n\t// name: string;\n};\n","import React from 'react';\n\nimport * as ReactDOM from 'react-dom';\nimport App from './app';\nconst ROOT = document.querySelector('.container');\nReactDOM.render(, ROOT);\n\nif ((module as any).hot) {\n\t(module as any).hot.accept('./app', function () {\n\t\tReactDOM.render(, ROOT);\n\t});\n}\n","export const sentryKey =\n\t'https://299fef8eb023442ab5ca18d635b668e6@o626965.ingest.sentry.io/6213103';\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { EditStoryOptionsTypes } from '../stories/types';\nimport { storyStatus } from '../stories/constants';\nimport { CaptionType } from '../../../common/components/interaction/CaptionEditor/types';\n\nconst mainType = 'APPROVAL';\n\nexport const getApprovalsTypes = createFetchTypes(`${mainType}_GET_APPROVALS`);\n\nexport const editStoriesTypes = createFetchTypes(`${mainType}_EDIT_STORIES`);\n\nexport const bulkApproveTypes = createFetchTypes(`${mainType}_BULK_APPROVE`);\nexport const bulkDeleteTypes = createFetchTypes(`${mainType}_BULK_DELETE`);\nexport const bulkRejectTypes = createFetchTypes(`${mainType}_BULK_REJECT`);\nexport const getSingleStoryTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_STORY`,\n);\n\nfunction getSingleStory(storyId: string, FilterOptions: FilterOptions) {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getSingleStoryTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories/${storyId}${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.errorStoryNotFound,\n\t\t},\n\t};\n}\n\nfunction getApprovals(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...FilterOptions,\n\t\tfilter: [\n\t\t\t{ field: 'status', value: storyStatus.pendingApproval },\n\t\t\t...FilterOptions.filter,\n\t\t],\n\t});\n\n\treturn {\n\t\ttype: getApprovalsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getApprovals',\n\t\t},\n\t};\n}\n\nexport const updateApprovalVideoCaptionsTypes = `approval/UPDATE_VIDEO_CAPTIONS`;\n\nfunction updateApprovalVideoCaptions(\n\tapprovalVideoId: string,\n\tcaptions: CaptionType[],\n) {\n\treturn {\n\t\ttype: updateApprovalVideoCaptionsTypes,\n\t\tpayload: {\n\t\t\tapprovalVideoId,\n\t\t\tcaptions,\n\t\t},\n\t};\n}\n\nexport const updateApprovalVideoFieldTypes = `approval/UPDATE_VIDEO_FIELD`;\n\nfunction updateApprovalVideoField(\n\tapprovalId: string,\n\tfield: string,\n\tvalue: any,\n) {\n\treturn {\n\t\ttype: updateApprovalVideoFieldTypes,\n\t\tpayload: {\n\t\t\tapprovalId,\n\t\t\tfield,\n\t\t\tvalue,\n\t\t},\n\t};\n}\n\nfunction editStories(EditOptions: EditStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: editStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/edit`, {\n\t\t\t\t...EditOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'editStories',\n\t\t\tsuccessMessage: ToastMessage.editedAssignedStory,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkApprove(stories: string[]) {\n\treturn {\n\t\ttype: bulkApproveTypes,\n\t\tcallAPI: () => axios.patch(`${apiUrl}/stories/bulk/approval`, { stories }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkAction',\n\t\t\tstories,\n\t\t\tsuccessMessage: ToastMessage.success,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkDelete(storiesId: string[]) {\n\treturn {\n\t\ttype: bulkDeleteTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/stories/bulk`, { data: { storiesId } }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkAction',\n\t\t\tstoriesId,\n\t\t\tsuccessMessage:\n\t\t\t\tstoriesId.length > 1\n\t\t\t\t\t? ToastMessage.severalApprovalStoriesDeleted\n\t\t\t\t\t: ToastMessage.singleApprovalStoryDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkReject(stories: string[], rejectionReason: string) {\n\treturn {\n\t\ttype: bulkRejectTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/reject`, {\n\t\t\t\tstories,\n\t\t\t\trejectionReason,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'bulkAction',\n\t\t\tstories,\n\t\t\tsuccessMessage: ToastMessage.storyRejected,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport {\n\teditStories,\n\tgetApprovals,\n\tbulkApprove,\n\tbulkDelete,\n\tbulkReject,\n\tgetSingleStory,\n\tupdateApprovalVideoCaptions,\n\tupdateApprovalVideoField,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { EditStoryOptionsTypes, StoryTellerBasicInfo } from '../stories/types';\nimport { storyStatus } from '../stories/constants';\n\nconst mainType = 'ASSIGNED';\n\nexport const getAssignedStoriesTypes = createFetchTypes(\n\t`${mainType}_GET_ASSIGNED_STORIES`,\n);\n\nexport const editStoriesTypes = createFetchTypes(`${mainType}_EDIT_STORIES`);\n\nexport const bulkDeleteTypes = createFetchTypes(`${mainType}_BULK_DELETE`);\nexport const getSingleStoryTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_STORY`,\n);\n\nfunction getAssignedStories(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...FilterOptions,\n\t\tfilter: [\n\t\t\t{ field: 'status', value: storyStatus.assigned },\n\t\t\t...FilterOptions.filter,\n\t\t],\n\t});\n\n\treturn {\n\t\ttype: getAssignedStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getAssignedStories',\n\t\t},\n\t};\n}\n\nfunction getSingleStory(storyId: string, FilterOptions: FilterOptions) {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getSingleStoryTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories/${storyId}${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.errorStoryNotFound,\n\t\t},\n\t};\n}\n\nfunction editStories(\n\tEditOptions: EditStoryOptionsTypes,\n\tstoryteller: StoryTellerBasicInfo,\n\tstorytellerFilter?: string,\n): fetchAction {\n\treturn {\n\t\ttype: editStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/edit`, {\n\t\t\t\t...EditOptions,\n\t\t\t\tstorytellerId: storyteller.id,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tEditOptions,\n\t\t\tstoryteller,\n\t\t\tstorytellerFilter,\n\t\t\tcustom: 'editStories',\n\t\t\tsuccessMessage: ToastMessage.editedAssignedStory,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkDelete(storiesId: string[]) {\n\treturn {\n\t\ttype: bulkDeleteTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/stories/bulk`, { data: { storiesId } }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkDelete',\n\t\t\tsuccessMessage:\n\t\t\t\tstoriesId.length > 1\n\t\t\t\t\t? ToastMessage.severalAssignedStoriesDeleted\n\t\t\t\t\t: ToastMessage.singleAssignedStoryDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport { getAssignedStories, editStories, bulkDelete, getSingleStory };\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport axios from '../../../global/axios';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { AudienceDropdownFilter } from '../constants';\n\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types';\n\nconst mainType = 'AUDIENCE';\n\nexport const saveAudienceTypes = createFetchTypes(`${mainType}_SAVE_AUDIENCE`);\n\ntype saveAudienceObjectType = {\n\tname: string;\n\tsize?: number;\n\tfilter: string;\n};\n\nfunction saveAudience(\n\tsaveAudienceObject: saveAudienceObjectType,\n\tcustom?: 'uploadAudience',\n) {\n\treturn {\n\t\ttype: saveAudienceTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/audience`, saveAudienceObject),\n\t\tpayload: {\n\t\t\tcustom,\n\t\t\tsuccessMessage: ToastMessage.audienceCreated,\n\t\t\terrorMessage: ToastMessage.errorCreatingAudience,\n\t\t},\n\t};\n}\n\nexport const getAudienceTypes = createFetchTypes(`${mainType}_GET_AUDIENCE`);\n\nfunction getAudience(FilterOptions: FilterOptions = null) {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getAudienceTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/audience${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nexport const updateAudienceTypes = createFetchTypes(\n\t`${mainType}_UPDATE_AUDIENCE`,\n);\n\ntype updateAudienceObjectType = {\n\tid: string;\n\tname: string;\n\tfilter: string;\n};\n\nfunction updateAudience(\n\tupdateAudienceObject: updateAudienceObjectType,\n\tcustom?: 'updateAudience',\n) {\n\treturn {\n\t\ttype: updateAudienceTypes,\n\t\tcallAPI: () => axios.put(`${apiUrl}/audience`, updateAudienceObject),\n\t\tpayload: {\n\t\t\tcustom: custom,\n\t\t},\n\t};\n}\n\nexport const deleteAudienceTypes = createFetchTypes(\n\t`${mainType}_DELETE_AUDIENCE`,\n);\n\nfunction deleteAudience(id: string) {\n\treturn {\n\t\ttype: deleteAudienceTypes,\n\t\tcallAPI: () => axios.delete(`${apiUrl}/audience/${id}`),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.audienceDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const setAudienceBuildingCountType =\n\t'audience/SET_AUDIENCE_BUILDING_COUNT';\n\n//We need this to deactivate the header of the campaign wizard if the audience hits more then the max possible\nfunction setAudienceBuildingCount(payload: number) {\n\treturn {\n\t\ttype: setAudienceBuildingCountType,\n\t\tpayload,\n\t};\n}\n\nexport const getAudienceOptionsTypes = createFetchTypes(\n\t`${mainType}_GET_OPTIONS`,\n);\n\nfunction getAudienceOptions(): fetchAction {\n\treturn {\n\t\ttype: getAudienceOptionsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/audience?filter=${JSON.stringify(AudienceDropdownFilter)}`,\n\t\t\t),\n\t};\n}\n\nexport const getAudienceByIdTypes = createFetchTypes(\n\t`${mainType}_GET_AUDIENCE_BY_ID`,\n);\n\nfunction getAudienceById(\n\taudienceId: string,\n\tcustomType: 'getAudience',\n): fetchAction {\n\treturn {\n\t\ttype: getAudienceByIdTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/audience/${audienceId}`),\n\t\tpayload: {\n\t\t\tcustom: customType,\n\t\t\tsuccessMessage: '',\n\t\t\terrorMessage: ToastMessage.errorCreatingAudience,\n\t\t},\n\t};\n}\n\nexport {\n\tsaveAudience,\n\tgetAudience,\n\tupdateAudience,\n\tdeleteAudience,\n\tsetAudienceBuildingCount,\n\tgetAudienceOptions,\n\tgetAudienceById,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { fetchAction } from '../types';\nimport axios from '../../../global/axios';\nimport { apiUrl } from '../../constants';\n\nconst mainType = 'AUTH';\n\nexport const grantAccessTypes = createFetchTypes(`${mainType}_GRANT_ACCESS`);\n\nfunction grantAccess(\n\tworkspaceId: string,\n\temail: string,\n\treload = false,\n): fetchAction {\n\treturn {\n\t\ttype: grantAccessTypes,\n\t\tpayload: { reload },\n\t\tcallAPI: () =>\n\t\t\taxios.get(`${apiUrl}/auth/adminAccess?w=${workspaceId}&e=${email}`),\n\t};\n}\n\nexport const uploadProfilePictureTypes = createFetchTypes(\n\t`${mainType}_UPLOAD_PROFILE_PICTURE`,\n);\n\nfunction uploadProfilePicture({\n\temail,\n\tworkspaceId,\n\tpictureUrl,\n}: {\n\tworkspaceId: string;\n\temail: string;\n\tpictureUrl: string;\n}): fetchAction {\n\treturn {\n\t\ttype: uploadProfilePictureTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/storytellers/uploadProfilePictureLink`, {\n\t\t\t\temail,\n\t\t\t\tpictureUrl,\n\t\t\t\tworkspaceId,\n\t\t\t}),\n\t};\n}\n\nexport const verifyTypes = createFetchTypes(`${mainType}_VERIFY`);\n\nfunction verify() {\n\treturn {\n\t\ttype: verifyTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/auth/verify`),\n\t};\n}\n\nexport const setClientType = 'auth/SET_AUTH_CLIENT';\n\nfunction setAuthClient(client: any) {\n\treturn {\n\t\ttype: setClientType,\n\t\tclient,\n\t};\n}\n\nexport { grantAccess, verify, setAuthClient, uploadProfilePicture };\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport axios from '../../../global/axios';\nimport { FilterOptions } from '../../../app/types';\nimport { AutomationTypes } from './types';\n\nconst mainType = 'automation';\nexport const getAutomationsTypes = createFetchTypes(\n\t`${mainType}_GET_AUTOMATIONS`,\n);\nexport const editAutomationTypes = createFetchTypes(\n\t`${mainType}_EDIT_AUTOMATION`,\n);\nexport const createAutomationTypes = createFetchTypes(\n\t`${mainType}_CREATE_AUTOMATION`,\n);\nexport const getSingleAutomationTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_AUTOMATION`,\n);\nexport const deleteAutomationTypes = createFetchTypes(\n\t`${mainType}_DELETE_AUTOMATION`,\n);\n\nfunction getSingleAutomation(\n\tautomationId: string,\n\tFilterOptions: FilterOptions,\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getSingleAutomationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/automation/${automationId}${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.automationNotFound,\n\t\t},\n\t};\n}\n\nfunction getAutomations(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...FilterOptions,\n\t\tfilter: [...FilterOptions.filter],\n\t});\n\n\treturn {\n\t\ttype: getAutomationsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/automation${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getAutomations',\n\t\t},\n\t};\n}\n\nfunction createAutomation(automation: AutomationTypes): fetchAction {\n\treturn {\n\t\ttype: createAutomationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/automation`, {\n\t\t\t\t...automation,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'createAutomation',\n\t\t\tsuccessMessage: ToastMessage.createAutomation,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction editAutomation(automation: AutomationTypes): fetchAction {\n\treturn {\n\t\ttype: editAutomationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/automation`, {\n\t\t\t\t...automation,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'editAutomation',\n\t\t\tsuccessMessage: ToastMessage.editAutomation,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction deleteAutomation(id: string): fetchAction {\n\treturn {\n\t\ttype: deleteAutomationTypes,\n\t\tcallAPI: () => axios.delete(`${apiUrl}/automation/${id}`),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport {\n\tgetSingleAutomation,\n\tgetAutomations,\n\tcreateAutomation,\n\teditAutomation,\n\tdeleteAutomation,\n};\n","/* eslint-disable @typescript-eslint/camelcase */\nimport createFetchTypes from '../../utils/createFetchTypes';\nimport { fetchAction } from '../types';\nimport { axiosForExternal } from '../../../global/axios';\nimport { apiUrl } from '../../constants';\nimport qs from 'querystring';\n\nconst mainType = 'BLACKBAUD';\ntype user = {\n\tname: string;\n};\ntype ResponseType = {\n\tusers: user[];\n};\n\nexport const BBAuthTypes = createFetchTypes(`${mainType}_AUTH`);\nexport const BBRefreshTypes = createFetchTypes(`${mainType}_REFRESH`);\nexport const BBListTypes = createFetchTypes(`${mainType}_LIST`);\nexport const BBFundTypes = createFetchTypes(`${mainType}_FUND`);\nexport const BBCampaignTypes = createFetchTypes(`${mainType}_CAMPAIGN`);\nexport const BBAppealTypes = createFetchTypes(`${mainType}_APPEAL`);\nexport const BBMSAccountTypes = createFetchTypes(`${mainType}_BBMS`);\nexport const BBPublicKeyTypes = createFetchTypes(`${mainType}_PUBLIC_KEY`);\nexport const GetConstituentOfListsTypes = createFetchTypes(\n\t`${mainType}_CONSTITUENT_LISTS`,\n);\n\nconst CORS_URL = `https://cors-enable.herokuapp.com`;\nconst AUTH_URL = `https://oauth2.sky.blackbaud.com`;\nconst BASE_URL = `https://api.sky.blackbaud.com`;\nconst list_type = 'Constituent';\nconst Token = `OWZmODQzMjQtZDc3OS00MGY4LTgxZWYtZGJlNjIzYjNjMGQ2OlEwUVJ4ZVhpQXZwMTg4V3oyVFdUNUlWY3ZwMDd0WUt0NGpkQ0pHbDBYbEk9`;\nconst redirect_url = `${apiUrl}/redirect`;\nconst subscriptionKey = 'd2a803e2305246028e2ecd95a4d4d7d1';\nconst bbGatewayKey = '43617ffdcee648d5a673f57b384b0376';\n\nconst bbHeaders = {\n\t'Content-Type': 'application/x-www-form-urlencoded',\n\t'Access-Control-Allow-Origin': '*',\n\tAuthorization: `Basic ${Token}`,\n};\n\nfunction getBBAuthToken(code: string, type: string): fetchAction {\n\tconst body = {\n\t\tgrant_type: 'authorization_code',\n\t\tcode,\n\t\tredirect_uri: `${redirect_url}/${type}`,\n\t};\n\n\treturn {\n\t\ttype: BBAuthTypes,\n\t\tpayload: { type },\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.post(\n\t\t\t\t`${CORS_URL}/${AUTH_URL}/token`,\n\t\t\t\tqs.stringify(body),\n\t\t\t\t{\n\t\t\t\t\theaders: bbHeaders,\n\t\t\t\t},\n\t\t\t),\n\t};\n}\n\nasync function getLists(access_token: string, id: string[]) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${subscriptionKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\tconst arr: any = [];\n\tconst data = await Promise.all(\n\t\tid.map((item) => {\n\t\t\treturn axiosForExternal\n\t\t\t\t.get(\n\t\t\t\t\t`${CORS_URL}/${BASE_URL}/constituent/v1/constituents?list_id=${item}&limit=5000`,\n\t\t\t\t\t{ headers: bbHeaders },\n\t\t\t\t)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tif (res && res.data) {\n\t\t\t\t\t\tarr.push(...res.data.value);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}),\n\t);\n\n\tif (data) {\n\t\treturn arr;\n\t}\n}\n\nasync function getConstituentsOfLists(access_token: string, id: string[]) {\n\tconst lists = await getLists(access_token, id);\n\treturn lists;\n}\n\nfunction getRefreshToken(refresh_token: string, type: string): fetchAction {\n\tconst body = {\n\t\tgrant_type: 'refresh_token',\n\t\trefresh_token,\n\t\tpreserve_refresh_token: true,\n\t};\n\n\treturn {\n\t\ttype: BBRefreshTypes,\n\t\tpayload: { type },\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.post(\n\t\t\t\t`${CORS_URL}/${AUTH_URL}/token`,\n\t\t\t\tqs.stringify(body),\n\t\t\t\t{\n\t\t\t\t\theaders: bbHeaders,\n\t\t\t\t},\n\t\t\t),\n\t};\n}\n\nfunction getBlackbaudLists(access_token: string): fetchAction {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${subscriptionKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBListTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(\n\t\t\t\t`${CORS_URL}/${BASE_URL}/list/v1/lists?list_type=${list_type}`,\n\t\t\t\t{ headers: bbHeaders },\n\t\t\t),\n\t};\n}\n\nfunction getCampaign(access_token: string) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${subscriptionKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBCampaignTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(`${CORS_URL}/${BASE_URL}/fundraising/v1/campaigns`, {\n\t\t\t\theaders: bbHeaders,\n\t\t\t}),\n\t};\n}\n\nfunction getAppeal(access_token: string) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${subscriptionKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBAppealTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(`${CORS_URL}/${BASE_URL}/fundraising/v1/appeals`, {\n\t\t\t\theaders: bbHeaders,\n\t\t\t}),\n\t};\n}\n\nfunction getFund(access_token: string) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${subscriptionKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBFundTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(`${CORS_URL}/${BASE_URL}/fundraising/v1/funds`, {\n\t\t\t\theaders: bbHeaders,\n\t\t\t}),\n\t};\n}\n\nfunction getBBMSAcounts(access_token: string) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${bbGatewayKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBMSAccountTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(\n\t\t\t\t`${CORS_URL}/${BASE_URL}/payments/v1/paymentconfigurations?include_inactive=${false}`,\n\t\t\t\t{ headers: bbHeaders },\n\t\t\t),\n\t};\n}\n\nfunction getPublicKey(access_token: string) {\n\tconst bbHeaders = {\n\t\t'Bb-Api-Subscription-Key': `${bbGatewayKey}`,\n\t\t'Access-Control-Allow-Origin': '*',\n\t\tAuthorization: `Bearer ${access_token}`,\n\t};\n\n\treturn {\n\t\ttype: BBPublicKeyTypes,\n\t\tcallAPI: () =>\n\t\t\taxiosForExternal.get(\n\t\t\t\t`${CORS_URL}/${BASE_URL}/payments/v1/checkout/publickey`,\n\t\t\t\t{\n\t\t\t\t\theaders: bbHeaders,\n\t\t\t\t},\n\t\t\t),\n\t};\n}\n\nexport {\n\tgetBBAuthToken,\n\tgetRefreshToken,\n\tgetBlackbaudLists,\n\tgetAppeal,\n\tgetFund,\n\tgetCampaign,\n\tgetBBMSAcounts,\n\tgetPublicKey,\n\tgetConstituentsOfLists,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants/index';\nimport { fetchAction, GenericAPIResponse } from '../types';\nimport { FilterOptions, saveCampaignCustomName } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { CampaignDropdownFilter } from '../constants';\nimport { CampaignType } from './types';\nconst mainType = 'campaign';\ntype campaign = {\n\t[key: string]: any;\n};\n\nexport const getCampaignTypes = createFetchTypes(`${mainType}_GET_CAMPAIGN`);\n\nexport const getCampaignsCountTypes = createFetchTypes(\n\t`${mainType}_GET_CAMPAIGNS_COUNT`,\n);\n\nexport const filterCampaignsTypes = createFetchTypes(\n\t`${mainType}_FILTER_CAMPAIGNS`,\n);\nexport const getCampaignOptionsTypes = createFetchTypes(\n\t`${mainType}_GET_CAMPAIGNS_OPTIONS`,\n);\n\nexport const deleteCampaignsTypes = createFetchTypes(\n\t`${mainType}_DELETE_CAMPAIGNS`,\n);\nexport const createCampaignTypes = createFetchTypes(\n\t`${mainType}_CREATE_CAMPAIGNS`,\n);\nexport const updateCampaignTypes = createFetchTypes(\n\t`${mainType}_UPDATE_CAMPAIGNS`,\n);\nexport const createDraftCampaignTypes = createFetchTypes(\n\t`${mainType}_CREATE_DRAFT_CAMPAIGNS`,\n);\nexport const launchDraftCampaignTypes = createFetchTypes(\n\t`${mainType}_LAUNCH_DRAFT_CAMPAIGNS`,\n);\nexport const addContactsToCampaignTypes = createFetchTypes(\n\t`${mainType}_ADD_CONTACT_TO_CAMPAIGN`,\n);\nexport const deactivateCampaignTypes = createFetchTypes(\n\t`${mainType}_DEACTIVATE`,\n);\nexport const bulkDeleteDraftCampaignsTypes = createFetchTypes(\n\t`${mainType}_DELETE_DRAFT_CAMPAIGNS`,\n);\n\nexport const getVerifiedStorytellersTypes = createFetchTypes(\n\t`${mainType}_GET_VERIFIED_STORYTELLERS`,\n);\n\nfunction deactivateCampaign(deactivateCampaignObject: {\n\tcampaignId: string;\n\tdeleteAll: boolean;\n}): fetchAction {\n\treturn {\n\t\ttype: deactivateCampaignTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/campaign/deactivate`, deactivateCampaignObject),\n\t\tpayload: {\n\t\t\tcustom: 'deactivateCampaign',\n\t\t\tsuccessMessage: ToastMessage.deactivatedCampaign,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction getVerifiedStorytellers(campaignId: string): fetchAction {\n\treturn {\n\t\ttype: getVerifiedStorytellersTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(`${apiUrl}/campaign/storytellers/address/${campaignId}`),\n\t\tpayload: {\n\t\t\tcustom: 'getVerifiedStorytellers',\n\t\t},\n\t};\n}\n\nfunction getCampaign(campaignId: string): fetchAction {\n\treturn {\n\t\ttype: getCampaignTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/campaign/${campaignId}`),\n\t\tpayload: {\n\t\t\tcustom: 'getCampaign',\n\t\t},\n\t};\n}\n\nfunction getCampaignsCount() {\n\treturn {\n\t\ttype: getCampaignsCountTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/campaign/count`),\n\t\tpayload: { custom: 'getCampaignsCount' },\n\t};\n}\n\nfunction filterCampaigns(\n\tFilterOptions: FilterOptions,\n\toptions?: { isFilter: boolean },\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: filterCampaignsTypes,\n\t\tpayload: { isFilter: options?.isFilter },\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/campaign${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction getCampaignOptions(\n\toptions: {\n\t\texcludeAll?: boolean;\n\t\tincludeBoth?: boolean;\n\t\tfilterOptions?: FilterOptions;\n\t} = {},\n): fetchAction {\n\treturn {\n\t\ttype: getCampaignOptionsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/campaign?filter=${JSON.stringify(\n\t\t\t\t\toptions.filterOptions\n\t\t\t\t\t\t? options.filterOptions\n\t\t\t\t\t\t: CampaignDropdownFilter,\n\t\t\t\t)}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\texcludeAll: options.excludeAll,\n\t\t\tincludeBoth: options.includeBoth,\n\t\t},\n\t};\n}\n\nfunction deleteCampaigns(DeleteOptions: string[]): fetchAction {\n\tconst deleteString = JSON.stringify(DeleteOptions);\n\treturn {\n\t\ttype: deleteCampaignsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(\n\t\t\t\t`${apiUrl}/campaign${DeleteOptions ? `?filter=${deleteString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction bulkDeleteDraftCampaigns(campaigns: CampaignType[]): fetchAction {\n\treturn {\n\t\ttype: bulkDeleteDraftCampaignsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/campaign/bulkDeleteDraft`, {\n\t\t\t\tcampaigns,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'bulkDeleteDraft',\n\t\t\tsuccessMessage: ToastMessage.draftCampaignsDeleted,\n\t\t},\n\t};\n}\n\nfunction createCampaign(createCampaignObject: { [key: string]: any }) {\n\treturn {\n\t\ttype: createCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign`, createCampaignObject),\n\t};\n}\n\nfunction updateCampaign(createCampaignObject: { [key: string]: any }) {\n\treturn {\n\t\ttype: updateCampaignTypes,\n\t\tcallAPI: () => axios.put(`${apiUrl}/campaign`, createCampaignObject),\n\t\tpayload: {\n\t\t\tcustom: 'updateCampaign',\n\t\t\tsuccessMessage: ToastMessage.campaignUpdated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction createDraftCampaign(createCampaignObject: { [key: string]: any }) {\n\treturn {\n\t\ttype: createDraftCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/draft`, createCampaignObject),\n\t};\n}\n\nfunction launchDraftCampaign(createCampaignId: string) {\n\treturn {\n\t\ttype: launchDraftCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/launch/${createCampaignId}`),\n\t};\n}\n\nexport const exportCampaignsTypes = createFetchTypes(\n\t`${mainType}_EXPORT_CAMPAIGNS`,\n);\nfunction exportCampaigns(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: exportCampaignsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios({\n\t\t\t\turl: `${apiUrl}/campaign/export${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t\tmethod: 'GET',\n\t\t\t\tresponseType: 'blob',\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'exportCampaigns',\n\t\t},\n\t};\n}\n\nexport const exportSingleCampaignTypes = createFetchTypes(\n\t`${mainType}_EXPORT_SINGLE_CAMPAIGN`,\n);\nfunction exportSingleCampaign(campaign: any): fetchAction {\n\tconst paginationObject = {\n\t\tpage: 1,\n\t\tpageSize: 1,\n\t};\n\n\tconst populateObject = [\n\t\t{ field: 'callToAction', select: [] },\n\t\t{\n\t\t\tfield: 'storytellers',\n\t\t\tselect: [\n\t\t\t\t'firstName',\n\t\t\t\t'lastName',\n\t\t\t\t'fullName',\n\t\t\t\t'storiesSent',\n\t\t\t\t'assignedStories',\n\t\t\t\t'storiesSaved',\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tfield: 'tags',\n\t\t\tselect: ['text', 'color', '_id'],\n\t\t},\n\t\t{\n\t\t\tfield: 'audience',\n\t\t\tselect: ['_id', 'name'],\n\t\t},\n\t];\n\n\tconst filterOject = [{ field: '_id', value: campaign._id }];\n\n\tconst FilterOptions = {\n\t\tpagination: paginationObject,\n\t\tpopulate: populateObject,\n\t\tfilter: filterOject,\n\t};\n\n\treturn {\n\t\ttype: exportSingleCampaignTypes,\n\t\tpayload: { campaignName: campaign.name, custom: 'exportSingleCampaign' },\n\t\tcallAPI: () =>\n\t\t\taxios({\n\t\t\t\turl: `${apiUrl}/campaign/export?filter=${JSON.stringify(\n\t\t\t\t\tFilterOptions,\n\t\t\t\t)}`,\n\t\t\t\tmethod: 'GET',\n\t\t\t\tresponseType: 'blob',\n\t\t\t}),\n\t};\n}\n\nexport const emailPreviewTypes = createFetchTypes(`${mainType}_EMAIL_PREVIEW`);\nfunction sendEmailPreview(\n\tdata: {\n\t\tvideoId?: string;\n\t\tctaId: string;\n\t\temailSubjectTitle?: string;\n\t\tsmsBody?: string;\n\t\tsendThroughDefault: boolean;\n\t\tstorytellerId?: string;\n\t},\n\tnoEmail = false,\n): fetchAction {\n\treturn {\n\t\ttype: emailPreviewTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/stories/preview${noEmail ? '?noEmail=true' : ''}`, {\n\t\t\t\t...data,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'sendPreview',\n\t\t\t...(noEmail\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\tsuccessMessage: ToastMessage.previewEmailSent,\n\t\t\t\t\t\terrorMessage: '',\n\t\t\t\t }),\n\t\t},\n\t};\n}\n\nexport const resendCampaignStoriesTypes = createFetchTypes(\n\t`${mainType}_RESEND_CAMPAIGN_STORIES`,\n);\n\nfunction resendCampaignStories(data: {\n\tstoriesToEmailNotOpened: boolean;\n\tstoriesToStoryNotPlayed: boolean;\n\tstoriesToVideoNotOpened: boolean;\n\tcampaignId: string;\n}): fetchAction {\n\treturn {\n\t\ttype: resendCampaignStoriesTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/resend`, data),\n\t};\n}\n\nexport const resendStoriesCounttypes = createFetchTypes(\n\t`${mainType}_RESEND_STORIES_COUNT`,\n);\n\nfunction resendStoriesCount({\n\tstoriesToEmailNotOpened,\n\tstoriesToStoryNotPlayed,\n\tstoriesToVideoNotOpened,\n\tcampaignId,\n}: {\n\tstoriesToEmailNotOpened: boolean;\n\tstoriesToStoryNotPlayed: boolean;\n\tstoriesToVideoNotOpened: boolean;\n\tcampaignId: string;\n}): fetchAction {\n\treturn {\n\t\ttype: resendStoriesCounttypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/campaign/resend/count/?campaignId=${campaignId}&storiesToEmailNotOpened=${storiesToEmailNotOpened}&storiesToStoryNotPlayed=${storiesToStoryNotPlayed}&storiesToVideoNotOpened=${storiesToVideoNotOpened}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'resendStoriesCount',\n\t\t},\n\t};\n}\n\nconst addContactToCampaign = (\n\tvalues: {\n\t\tcampaign: string;\n\t\tcontacts: string[];\n\t},\n\terrorMessage?: string,\n) => {\n\treturn {\n\t\ttype: addContactsToCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/contact`, values),\n\t\tpayload: {\n\t\t\tcustom: 'addContactToCampaing',\n\t\t\tsuccessMessage: ToastMessage.contactsToCampaignAdded,\n\t\t\terrorMessage: errorMessage || ToastMessage.contactsToCampaignError,\n\t\t},\n\t};\n};\n\nexport const getEmailTemplatesTypes = createFetchTypes(\n\t`${mainType}_GET_EMAIL_TEMPLATES`,\n);\n\nfunction getEmailTemplates(): fetchAction {\n\treturn {\n\t\ttype: getEmailTemplatesTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/workspaces/templates`),\n\t\tpayload: {\n\t\t\tcustom: 'emailTemplates',\n\t\t},\n\t};\n}\n\nfunction clearDraftResponse() {\n\treturn {\n\t\ttype: 'CLEAR_DRAFT_RESPONSE',\n\t\tpayload: {},\n\t};\n}\n\nfunction resetCampaignState() {\n\treturn {\n\t\ttype: 'campaign/RESET',\n\t};\n}\n\nexport const saveCampaignTypes = createFetchTypes(`${mainType}_SAVE_CAMPAIGN`);\n\nfunction saveCampaign(\n\tsaveCampaignParams: any,\n\tcustomName?: saveCampaignCustomName,\n\tsuccessMessage?: string,\n) {\n\treturn {\n\t\ttype: saveCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/save`, saveCampaignParams),\n\t\tpayload: {\n\t\t\tcustom: customName,\n\t\t\tsuccessMessage:\n\t\t\t\t(customName === 'saveDraft' && ToastMessage.savedDraftCampaign) ||\n\t\t\t\tsuccessMessage,\n\t\t},\n\t};\n}\n\nexport const saveCurrentChildCampaignTypes = createFetchTypes(\n\t`${mainType}_SAVE_CHILD_CAMPAIGN`,\n);\n\nexport const saveAndUpdateCurrentChildCampaignTypes = createFetchTypes(\n\t`${mainType}_SAVE_AND_UPDATE_CHILD_CAMPAIGN`,\n);\n\nfunction saveCurrentChildCampaign(\n\tsaveChildCampaignParams: any,\n\tupdateCurrentChild?: boolean,\n) {\n\treturn {\n\t\ttype: updateCurrentChild\n\t\t\t? saveAndUpdateCurrentChildCampaignTypes\n\t\t\t: saveCurrentChildCampaignTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/campaign/save`, saveChildCampaignParams),\n\t\tpayload: {\n\t\t\tcustom: 'saveChild',\n\t\t\tsuccessMessage: '',\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const launchCampaignTypes = createFetchTypes(\n\t`${mainType}_LAUNCH_CAMPAIGN`,\n);\n\nfunction launchCampaign(campaignId: string) {\n\treturn {\n\t\ttype: launchCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/bulkLaunch/${campaignId}`),\n\t\tpayload: {\n\t\t\tcustom: 'launchCampaign',\n\t\t\tsuccessMessage: ToastMessage.campaignLaunched,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction editCampaign(campaign: any) {\n\treturn {\n\t\ttype: 'campaign/EDIT_CAMPAIGN',\n\t\tpayload: {\n\t\t\tcampaign,\n\t\t},\n\t};\n}\n\nexport const saveCampaignBulkTypes = createFetchTypes(\n\t`${mainType}_SAVE_CAMPAIGN_BULK`,\n);\n\nfunction saveCampaignBulk(saveBulkParams: any) {\n\treturn {\n\t\ttype: saveCampaignBulkTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/bulk`, saveBulkParams),\n\t\tpayload: {\n\t\t\tcustom: 'saveCampaignBulk',\n\t\t\tsuccessMessage: ToastMessage.savedDraftCampaign,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const duplicateCampaignTypes = createFetchTypes(\n\t`${mainType}_DUPLICATE_CAMPAIGN`,\n);\n\nfunction duplicateCampaign(campaignId: string) {\n\treturn {\n\t\ttype: duplicateCampaignTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/campaign/duplicate/${campaignId}`),\n\t\tpayload: {\n\t\t\tcustom: 'duplicateCampaign',\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction setCampaignTree(campaigns: any[]) {\n\treturn {\n\t\ttype: 'campaign/SET_CAMPAIGN_TREE',\n\t\tpayload: campaigns,\n\t};\n}\n\nfunction setCampaignName(name: string) {\n\treturn {\n\t\ttype: 'campaign/SET_CAMPAIGN_NAME',\n\t\tpayload: name,\n\t};\n}\nexport {\n\tgetCampaign,\n\tgetCampaignsCount,\n\tfilterCampaigns,\n\tdeleteCampaigns,\n\tcreateCampaign,\n\tupdateCampaign,\n\tcreateDraftCampaign,\n\tlaunchDraftCampaign,\n\texportCampaigns,\n\texportSingleCampaign,\n\taddContactToCampaign,\n\tclearDraftResponse,\n\tsendEmailPreview,\n\tgetEmailTemplates,\n\tresendStoriesCount,\n\tresendCampaignStories,\n\tresetCampaignState,\n\tgetCampaignOptions,\n\tdeactivateCampaign,\n\tsetCampaignName,\n\t//Campaign creation services\n\tsaveCampaign,\n\tlaunchCampaign,\n\teditCampaign,\n\tsaveCampaignBulk,\n\tsetCampaignTree,\n\tsaveCurrentChildCampaign,\n\tduplicateCampaign,\n\tbulkDeleteDraftCampaigns,\n\tgetVerifiedStorytellers,\n};\n","import { VideoPageSettingsType } from '../../types';\n\nexport enum CampaignStateEnum {\n\tactive = 'active',\n\tinactive = 'inactive',\n\tdraft = 'draft',\n}\n\nexport type campaignStatusType =\n\t| CampaignStateEnum.active\n\t| CampaignStateEnum.inactive\n\t| CampaignStateEnum.draft;\n\nexport enum SyncStatus {\n\tREADY = 'ready',\n\tINACTIVE = 'inactive',\n\tIMPORTING = 'importing',\n}\n\nexport type StatsType = {\n\tplayPercentage: number;\n\tengagementRate: number;\n\tnumberOfPlays: number;\n\tuniquePlays: number;\n\tstoryViews: number;\n\tuniqueStoryViews: number;\n\tshares: number;\n\tshareViews: number;\n\tshareSignUps: number;\n\ttotalTransactedSum: number;\n\tnumberOfTransactions: number;\n\tabandonedTransactions: number;\n\tnumberOfLinkClicks: number;\n\tstoriesSent: number;\n};\n\nexport type CampaignSettingsType = VideoPageSettingsType;\n\nexport type CampaignType = {\n\tvalue: any;\n\thideReply?: boolean;\n\ttags: any[];\n\tcontacts: any[];\n\tstorytellers: any[];\n\tcompletedStories: any[];\n\tstats: StatsType;\n\tcallToAction: any;\n\taudience: any;\n\tstate: campaignStatusType;\n\tcreationMethod: string;\n\texpirationMethod: string;\n\tpersonalization: string;\n\tpendingStories: any[];\n\tassignedStories: any[];\n\tstoriesPendingApproval: any[];\n\tvideosRequiringApproval: number;\n\tstoriesCount: number;\n\tinstructions?: string;\n\tnoInsights: number;\n\twaitForProcessing: number;\n\tstrictApproval: number;\n\theartCount: number;\n\tsendThroughDefault: boolean;\n\tchildCampaigns: any[];\n\tisChild: boolean;\n\tsmsSent: boolean;\n\tunsubscribes: number;\n\tbounces: number;\n\temailPreferenceCount: number;\n\tSMSPreferenceCount: number;\n\tbothPreferenceCount: number;\n\tisComplete: boolean;\n\tscheduledStories: any[];\n\tselectedContactLists: any[];\n\tscheduledByWindow: boolean;\n\t_id: string;\n\tname: string;\n\tlocation: string;\n\tscheduleDate: string | Date;\n\tsmsBody?: string;\n\temailSubjectTitle?: string;\n\trecipe?: any;\n\tworkspace: string;\n\tlastUpdatedBy: string;\n\tcreatedBy: Date | string;\n\ttriggers: any[];\n\tcreatedAt: string;\n\tupdatedAt: string;\n\tcurrentChild: null | any[];\n\tcurrentStep: string;\n\tfilter: null | string;\n\tvideo: any;\n\ttemplate: null | any;\n\tlaunchedAt: string | Date;\n\temailsSent: number;\n\tlastStorySentAt: string;\n\tlastStorySentUrl: string;\n\temailOpens: number;\n\tengagementCount: number;\n\tlastStoryResentAt: string;\n\tcontactCount: number;\n\tassignedStoriesCount: number;\n\tcompletedStoriesCount: number;\n\tpendingStoriesCount: number;\n\tstoriesPendingApprovalCount: number;\n\tid: string;\n\tformattedUpdatedAt: string;\n\tformattedCreatedAt: string;\n\trecordingScript: string;\n\tautoplay: boolean;\n\tsettings?: CampaignSettingsType;\n\tsyncStatus?: SyncStatus;\n\tlastSyncDate?: string | Date;\n};\n","import { orderTypes } from '../../constants';\n\nconst pagination = {\n\tpage: 1,\n\tpageSize: 500,\n};\n\nexport const CampaignDropdownFilter = {\n\tfilter: [\n\t\t{\n\t\t\tfield: 'state',\n\t\t\tvalue: 'active',\n\t\t},\n\t\t{\n\t\t\tfield: 'creationMethod',\n\t\t\tvalue: 'collectVideos',\n\t\t\toperator: 'not',\n\t\t},\n\t],\n\torder: { field: 'createdAt', type: orderTypes.descending },\n\tpagination,\n\tselect: ['name', 'state'],\n};\n\nexport const CTADropdownFilter = {\n\tpagination,\n\torder: { field: 'createdAt', type: orderTypes.descending },\n\tselect: ['title'],\n};\n\nexport const StorytellerDropdownFilter = {\n\tpagination,\n\tselect: ['fullName', 'firstName', 'lastName'],\n};\nexport const TagDropdownFilter = {\n\tpagination,\n};\nexport const AudienceDropdownFilter = {\n\tpagination,\n};\n\nexport const storyPopulateObject = [\n\t{ field: 'assignedTo', select: ['firstName', 'lastName', 'fullName'] },\n\t{ field: 'callToAction', select: ['title'] },\n\t{\n\t\tfield: 'video',\n\t\tselect: [\n\t\t\t'streamingUrl',\n\t\t\t'thumbnail',\n\t\t\t'captions',\n\t\t\t'duration',\n\t\t\t'createdAt',\n\t\t\t'createdBy',\n\t\t\t'topics',\n\t\t\t'labels',\n\t\t\t'emotions',\n\t\t\t'sentiments',\n\t\t\t'languages',\n\t\t\t'azureId',\n\t\t\t'uuid',\n\t\t\t'status',\n\t\t\t'mediaVersion',\n\t\t\t'location',\n\t\t\t'moderation',\n\t\t\t'hideCaptions',\n\t\t],\n\t},\n\t{ field: 'createdBy', select: ['firstName', 'lastName', 'fullName'] },\n\t{\n\t\tfield: 'contacts',\n\t\tselect: ['firstName', 'lastName', 'fullName', 'stats', 'email', 'tags'],\n\t},\n\t{ field: 'campaign', select: ['name', 'noInsights'] },\n];\n","import { GenericEntityState } from '../../types';\nimport createFetchTypes from '../../../utils/createFetchTypes';\nimport entityNormalizer from '../../../utils/entityNormalizer';\n\nconst contact = entityNormalizer('contacts');\n\nexport const pagination = { contacts: [contact] };\n\nexport const mainType = 'contact';\n\nexport const exportContactsTypes = createFetchTypes(\n\t`${mainType}_EXPORT_CONTACTS`,\n);\n\nexport const exportContactsPerCampaignTypes = createFetchTypes(\n\t`${mainType}_EXPORT_CONTACTS_PER_CAMPAIGN`,\n);\n\nexport const filterContactsTypes = createFetchTypes(\n\t`${mainType}_FILTER_CONTACTS`,\n);\nexport const complexFilterContactstypes = createFetchTypes(\n\t`${mainType}_COMPLEX_FILTER_CONTACTS`,\n);\nexport const uploadFlatfileContactsTypes = createFetchTypes(\n\t`${mainType}_UPLOAD_FLATFILE_CONTACTS`,\n);\n\nexport const updateContactTagTypes = createFetchTypes(\n\t`${mainType}_UPDATE_CONTACT_TAG`,\n);\n\nexport const deleteContactTagTypes = createFetchTypes(\n\t`${mainType}_DELETE_CONTACT_TAG`,\n);\n\nexport const softDeleteContactsTypes = createFetchTypes(\n\t`${mainType}_SOFT_DELETE_CONTACTS`,\n);\n\nexport const filterRepliesActivityTypes = createFetchTypes(\n\t`${mainType}_REPLIES_ACTIVITY`,\n);\n\nexport const filterStoriesActivityTypes = createFetchTypes(\n\t`${mainType}_STORIES_ACTIVITY`,\n);\n\nexport const getContactsByCampaignIdTypes = createFetchTypes(\n\t`${mainType}_CAMPAIGN_CONTACTS`,\n);\n\nexport const initialState: GenericEntityState = {\n\tloading: false,\n\tupdate: true,\n\tcontacts: {},\n\tcontactsCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t},\n\terror: {},\n\ttype: '',\n\tresponse: null,\n\tcustom: {},\n\trepliesActivity: [],\n\trepliesActivityPagination: {},\n\tstoriesActivity: [],\n\tstoriesActivityPagination: {},\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl } from '../../constants/index';\nimport { fetchAction, GenericAPIResponse } from '../types';\nimport { FilterOptions } from '../../types/index';\n\nimport axios from '../../../global/axios';\nimport { CTADropdownFilter } from '../constants';\nconst mainType = 'cta';\ntype cta = {\n\t[key: string]: {};\n};\n\ntype ResponseType = GenericAPIResponse & {\n\tctas: cta[];\n};\n\nexport const filterCtaTypes = createFetchTypes(`${mainType}_FILTER_CTA`);\nexport const deleteCtaTypes = createFetchTypes(`${mainType}_DELETE_CTA`);\nexport const createCtaTypes = createFetchTypes(`${mainType}_CREATE_CTA`);\nexport const updateCtaTypes = createFetchTypes(`${mainType}_UPDATE_CTA`);\nexport const softBulkTypes = createFetchTypes(`${mainType}_SOFT_BULK_CTA`);\n\nexport const getCtaOptionsTypes = createFetchTypes(`${mainType}_GET_OPTIONS`);\n\nfunction getCtaOptions(options?: { excludeAll?: boolean }): fetchAction {\n\treturn {\n\t\ttype: getCtaOptionsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(`${apiUrl}/cta?filter=${JSON.stringify(CTADropdownFilter)}`),\n\t\tpayload: {\n\t\t\texcludeAll: options.excludeAll,\n\t\t},\n\t};\n}\n\nfunction filterCtas(filterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: filterCtaTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/cta${filterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction deleteCtas(DeleteOptions: string[]): fetchAction {\n\tconst deleteString = JSON.stringify(DeleteOptions);\n\treturn {\n\t\ttype: deleteCtaTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(\n\t\t\t\t`${apiUrl}/cta${DeleteOptions ? `?filter=${deleteString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction createCta(\n\tCreateOptions: FormData,\n\tcustom: string = null,\n): fetchAction {\n\treturn {\n\t\ttype: createCtaTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/cta`, CreateOptions, {\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'multipart/form-data',\n\t\t\t\t},\n\t\t\t}),\n\t\tpayload: {\n\t\t\t...(custom ? { custom } : {}),\n\t\t},\n\t};\n}\n\nfunction updateCta(form: FormData, id: string): fetchAction {\n\treturn {\n\t\ttype: updateCtaTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/cta/${id}`, form, {\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'multipart/form-data',\n\t\t\t\t},\n\t\t\t}),\n\t};\n}\n\nfunction softBulk(ctaIds: string[]) {\n\treturn {\n\t\ttype: softBulkTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/cta/soft/bulk`, {\n\t\t\t\tdata: { ctaIds: ctaIds },\n\t\t\t}),\n\t\tpayload: { ctaIds: ctaIds },\n\t};\n}\n\nexport {\n\tfilterCtas,\n\tdeleteCtas,\n\tcreateCta,\n\tupdateCta,\n\tsoftBulk,\n\tgetCtaOptions,\n};\n","import { apiUrl } from '../../constants';\nimport axios from '../../../global/axios';\nimport { SyncStorytellersObject } from './types';\nimport createFetchTypes from '../../utils/createFetchTypes';\nimport { OnBoardingFormType } from '../../containers/OnBoarding/types';\n\nconst mainType = 'onboarding';\n\nexport const sendStorytellersTypes = createFetchTypes(\n\t`${mainType}_SEND_STORYTELLERS`,\n);\n\nexport const authWorkspaceLoginTypes = createFetchTypes(\n\t`${mainType}_AUTH_WORKSPACE_LOGIN`,\n);\n\nfunction sendStorytellers(SendStorytellers: SyncStorytellersObject) {\n\treturn {\n\t\ttype: sendStorytellersTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/storytellers/send`, SendStorytellers),\n\t};\n}\n\nfunction authWorkspaceLogin(OnBoardingForm: OnBoardingFormType) {\n\treturn {\n\t\ttype: authWorkspaceLoginTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(\n\t\t\t\t`${apiUrl}/auth/workspaceAndLogin?createStory=\"true\"`,\n\t\t\t\tOnBoardingForm,\n\t\t\t),\n\t};\n}\n\nexport { sendStorytellers, authWorkspaceLogin };\n","import { GenericEntityState } from '../../types';\nimport { OnBoardingFormType } from '../../../containers/OnBoarding/types';\n\nexport const workSpaceLoginInitialState: OnBoardingFormType = {\n\tstoryteller: {\n\t\temail: '',\n\t\tfirstName: '',\n\t\tlastName: '',\n\t},\n\tworkspace: {\n\t\tlocation: 'CA',\n\t\tworkspaceVertical: '',\n\t\tlogo: '',\n\t\tstate: 'active',\n\t\tcurrencyCode: 'cad',\n\t\tprimaryColor: '',\n\t\tsecondaryColor: '',\n\t\tsmsAlert: false,\n\t\tcommunicationPreference: 'email',\n\t\tdefaultSendingVerified: false,\n\t\tdefaultSmsSendingNumberVerified: false,\n\t\tbillingStoryRates: [],\n\t\tname: '',\n\t\torganizationName: '',\n\t\torganizationUrl: '',\n\t\tdefaultSmsSendingNumber: '',\n\t\tonboardingStage: 1,\n\t\ttemplates: [],\n\t\tgateways: [],\n\t\tintegrations: [],\n\t},\n};\n\nexport const initialState: GenericEntityState = {\n\tloading: false,\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\terror: {},\n\tonBoardingForm: workSpaceLoginInitialState,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants/index';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { replyStates } from './constants';\n\nconst mainType = 'REPLY';\n\nexport const filterRepliesTypes = createFetchTypes(\n\t`${mainType}_FILTER_REPLIES`,\n);\n\nexport const getSingleReplyTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_REPLY`,\n);\n\nexport const setReplyStateTypes = createFetchTypes(\n\t`${mainType}_SET_REPLY_STATE`,\n);\n\nexport const bulkUpdateRepliesTypes = createFetchTypes(\n\t`${mainType}_BULK_UPDATE`,\n);\n\nfunction filterReplies(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\n\treturn {\n\t\ttype: filterRepliesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/reply${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'filterReplies',\n\t\t},\n\t};\n}\n\nfunction getSingleReply(replyId: string, FilterOptions: FilterOptions) {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getSingleReplyTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/reply/${replyId}${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.errorReplyNotFound,\n\t\t},\n\t};\n}\n\nfunction setReplyState(replyId: string, state: string) {\n\treturn {\n\t\ttype: setReplyStateTypes,\n\t\tcallAPI: () => axios.patch(`${apiUrl}/reply/${replyId}`, { state }),\n\t\tpayload: {\n\t\t\tsuccessMessage: state !== replyStates.seen && ToastMessage.updatedReply,\n\t\t\tcustom: 'updateReplyState',\n\t\t\treplyId,\n\t\t\tstate,\n\t\t},\n\t};\n}\n\nfunction bulkUpdateReplies(replyIds: string[], update: any) {\n\tlet sucessMessage = ToastMessage.updatedReplies;\n\tif (update.deleted) {\n\t\tsucessMessage =\n\t\t\treplyIds.length > 1\n\t\t\t\t? ToastMessage.severalReplyStoriesDeleted\n\t\t\t\t: ToastMessage.singleReplyStoryDeleted;\n\t}\n\treturn {\n\t\ttype: bulkUpdateRepliesTypes,\n\t\tcallAPI: () => axios.patch(`${apiUrl}/reply/bulk`, { replyIds, update }),\n\t\tpayload: {\n\t\t\tsuccessMessage: sucessMessage,\n\t\t\tcustom: 'bulkUpdateReplies',\n\t\t\treplyIds,\n\t\t\tupdate,\n\t\t},\n\t};\n}\n\nexport { filterReplies, getSingleReply, setReplyState, bulkUpdateReplies };\n","export enum replyStates {\n\tnew = 'new',\n\tseen = 'seen',\n\tclosedAssigned = 'assigned',\n\tclosedAddedToCampagin = 'addedToCampaign',\n\tclosedNoResponse = 'closed',\n}\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { EditStoryOptionsTypes, SendStoryOptionsTypes } from '../stories/types';\nimport { storyStatus } from '../stories/constants';\nimport { CaptionType } from '../../../common/components/interaction/CaptionEditor/types';\n\nconst mainType = 'scheduled';\n\nexport const getScheduledTypes = createFetchTypes(`${mainType}_GET_SCHEDULED`);\n\nexport const editStoriesTypes = createFetchTypes(`${mainType}_EDIT_STORIES`);\n\nexport const sendStoriesTypes = createFetchTypes(`${mainType}_SEND_STORIES`);\n\nexport const sendNowTypes = createFetchTypes(`${mainType}_SEND_NOW`);\n\nexport const bulkDeleteTypes = createFetchTypes(`${mainType}_BULK_DELETE`);\nexport const getSingleStoryTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_STORY`,\n);\n\nfunction getSingleStory(storyId: string, FilterOptions: FilterOptions) {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: getSingleStoryTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories/${storyId}${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.errorStoryNotFound,\n\t\t},\n\t};\n}\n\n//stays\n// ### get scheduled here , we can clean this and not pass an object, just pagination to it , as filters are fixed\nfunction getScheduled(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...FilterOptions,\n\t\tfilter: [\n\t\t\t{ field: 'status', value: storyStatus.scheduled },\n\t\t\t...FilterOptions.filter,\n\t\t],\n\t});\n\n\treturn {\n\t\ttype: getScheduledTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getScheduled',\n\t\t},\n\t};\n}\n\nfunction sendStory(SendOptions: SendStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: sendStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/stories`, {\n\t\t\t\t...SendOptions,\n\t\t\t}),\n\t};\n}\n\nfunction sendNow(stories: string[]): fetchAction {\n\treturn {\n\t\ttype: sendNowTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/stories/send`, { stories }),\n\t\tpayload: {\n\t\t\tcustom: 'sendNow',\n\t\t\tstories,\n\t\t},\n\t};\n}\n\nfunction editStories(EditOptions: EditStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: editStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/edit`, {\n\t\t\t\t...EditOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'editStories',\n\t\t\tsuccessMessage: ToastMessage.editedAssignedStory,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkDelete(storiesId: string[]) {\n\treturn {\n\t\ttype: bulkDeleteTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/stories/bulk`, { data: { storiesId } }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkDelete',\n\t\t\tsuccessMessage:\n\t\t\t\tstoriesId.length > 1\n\t\t\t\t\t? ToastMessage.severalScheduledStoriesDeleted\n\t\t\t\t\t: ToastMessage.singleScheduledStoryDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const updateScheduledVideoCaptionsTypes = `${mainType}/UPDATE_VIDEO_CAPTIONS`;\n\nfunction updateScheduledVideoCaptions(\n\tscheduledVideoId: string,\n\tcaptions: CaptionType[],\n) {\n\treturn {\n\t\ttype: updateScheduledVideoCaptionsTypes,\n\t\tpayload: {\n\t\t\tscheduledVideoId,\n\t\t\tcaptions,\n\t\t},\n\t};\n}\n\nexport const updateScheduledVideoFieldTypes = `${mainType}/UPDATE_VIDEO_FIELD`;\n\nfunction updateScheduledVideoField(\n\tscheduledId: string,\n\tfield: string,\n\tvalue: any,\n) {\n\treturn {\n\t\ttype: updateScheduledVideoFieldTypes,\n\t\tpayload: {\n\t\t\tscheduledId,\n\t\t\tfield,\n\t\t\tvalue,\n\t\t},\n\t};\n}\n\nexport {\n\tgetScheduled,\n\teditStories,\n\tsendStory,\n\tsendNow,\n\tbulkDelete,\n\tgetSingleStory,\n\tupdateScheduledVideoCaptions,\n\tupdateScheduledVideoField,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types';\nimport axios from '../../../global/axios';\nimport { EditStoryOptionsTypes } from '../stories/types';\nimport { storyStatus } from '../stories/constants';\nimport { CaptionType } from '../../../common/components/interaction/CaptionEditor/types';\n\nconst mainType = 'sent';\n\nexport const getSentStoriesTypes = createFetchTypes(\n\t`${mainType}_GET_SENT_STORIES`,\n);\n\nexport const editStoriesTypes = createFetchTypes(`${mainType}_EDIT_STORIES`);\n\nexport const archiveStoriesTypes = createFetchTypes(\n\t`${mainType}_ARCHIVE_STORIES`,\n);\n\nexport const undeleteStoriesTypes = createFetchTypes(\n\t`${mainType}_UNARCHIVE_STORIES`,\n);\n\nexport const getSingleStoryTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_STORY`,\n);\n\nfunction getSingleStory(storyId: string, filterOptions: FilterOptions) {\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: getSingleStoryTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories/${storyId}${\n\t\t\t\t\tfilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.errorStoryNotFound,\n\t\t},\n\t};\n}\n\n//stays\n// ### get sent here , we can clean this and not pass an object, just pagination to it , as filters are fixed\nfunction getSentStories(filterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...filterOptions,\n\t\tfilter: [\n\t\t\t{ field: 'status', value: storyStatus.sent },\n\t\t\t...filterOptions.filter,\n\t\t],\n\t});\n\n\treturn {\n\t\ttype: getSentStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${filterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getSentStories',\n\t\t},\n\t};\n}\n\nfunction editStories(EditOptions: EditStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: editStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/edit`, {\n\t\t\t\t...EditOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'editStories',\n\t\t\tsuccessMessage: ToastMessage.editedAssignedStory,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction archiveStories(storiesId: string[]): fetchAction {\n\treturn {\n\t\ttype: archiveStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/softDelete`, { storiesId }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkArchive',\n\t\t\tstoriesId,\n\t\t\tsuccessMessage:\n\t\t\t\tstoriesId.length > 1\n\t\t\t\t\t? ToastMessage.severalStoriesArchived\n\t\t\t\t\t: ToastMessage.singleStoryArchived,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction undeleteStories(storiesId: string[]): fetchAction {\n\treturn {\n\t\ttype: undeleteStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/undelete`, { storiesId }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkUnarchive',\n\t\t\tstoriesId,\n\t\t\tsuccessMessage:\n\t\t\t\tstoriesId.length > 1\n\t\t\t\t\t? ToastMessage.severalStoriesUnarchived\n\t\t\t\t\t: ToastMessage.singleStoryUnarchived,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const updateSentVideoCaptionsTypes = `${mainType}/UPDATE_VIDEO_CAPTIONS`;\n\nfunction updateSentVideoCaptions(sentVideoId: string, captions: CaptionType[]) {\n\treturn {\n\t\ttype: updateSentVideoCaptionsTypes,\n\t\tpayload: {\n\t\t\tsentVideoId,\n\t\t\tcaptions,\n\t\t},\n\t};\n}\n\nexport const updateSentVideoFieldTypes = `${mainType}/UPDATE_VIDEO_FIELD`;\n\nfunction updateSentVideoField(sentId: string, field: string, value: any) {\n\treturn {\n\t\ttype: updateSentVideoFieldTypes,\n\t\tpayload: {\n\t\t\tsentId,\n\t\t\tfield,\n\t\t\tvalue,\n\t\t},\n\t};\n}\n\nexport {\n\teditStories,\n\tgetSentStories,\n\tarchiveStories,\n\tundeleteStories,\n\tgetSingleStory,\n\tupdateSentVideoCaptions,\n\tupdateSentVideoField,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl } from '../../constants/index';\nimport { fetchAction, GenericAPIResponse } from '../types';\nimport { FilterOptions } from '../../types/index';\n// import { EditStoryOptionsTypes, CreateStoryOptionsTypes } from \"./types/index\";\nimport axios from '../../../global/axios';\nconst mainType = 'sharedVideo';\ntype sharedVideo = {\n\t[key: string]: {};\n};\n\ntype ResponseType = GenericAPIResponse & {\n\tsharedVideos: sharedVideo[];\n};\n\nexport const filterSharedVideoTypes = createFetchTypes(\n\t`${mainType}_FILTER_SHARED_VIDEOS`,\n);\n\nfunction filterSharedVideo(\n\tFilterOptions: FilterOptions,\n\tinfinite = true,\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: filterSharedVideoTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/sharedVideo${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tinfinite,\n\t\t},\n\t};\n}\n\nexport { filterSharedVideo };\n","import { pagination } from './constants';\nimport { normalize } from 'normalizr';\nimport { ResponseAction } from '../types';\nimport { contactsStateType } from './@types';\nimport fileDownload from 'js-file-download';\nexport const paginationSuccessMapper = function paginationMapper(\n\tstate: contactsStateType,\n\taction: ResponseAction,\n): void {\n\tconst {\n\t\tresponse: {\n\t\t\tcontacts,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ contacts, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\n\tstate.contacts = {\n\t\t...(page > 1 ? { ...state.contacts } : {}),\n\t\t...normalizedData.entities.contacts,\n\t};\n\tstate.contactsCount = Object.keys(state.contacts)?.length;\n\tstate.pagination.pages[action.response.page] = normalizedData.result.contacts;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n};\n\nexport const complexSuccessMapper = function paginationMapper(\n\tstate: contactsStateType,\n\taction: ResponseAction,\n): void {\n\tconst {\n\t\tresponse: {\n\t\t\tcontacts,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t\tpayload: { audienceId },\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ contacts, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\n\tconst copyContacts = action.response.page > 1 ? { ...state.contacts } : {};\n\tif (action.payload?.custom) {\n\t\tstate.custom.contacts = {\n\t\t\t...copyContacts,\n\t\t\t...normalizedData.entities.contacts,\n\t\t};\n\t\tstate.custom.pagination = {\n\t\t\tpages: {},\n\t\t\tcurrentPage: action.response.page,\n\t\t\ttotalPages: action.response.totalPages,\n\t\t\tcount: action.response.count || 0,\n\t\t};\n\t\tstate.custom.pagination.pages[action.response.page] =\n\t\t\tnormalizedData.result.contacts;\n\t} else {\n\t\tif (audienceId) {\n\t\t\tstate.response.audienceId = audienceId;\n\t\t}\n\t\tstate.contacts = { ...copyContacts, ...normalizedData.entities.contacts };\n\t\tstate.contactsCount = Object.keys(state.contacts)?.length;\n\t\tstate.pagination.currentPage = action.response.page;\n\t\tstate.pagination.totalPages = action.response.totalPages;\n\t\tstate.pagination.count = action.response.count;\n\t}\n};\n\nexport const uploadFlatfileContactsSuccessMapper = function paginationMapper(\n\tstate: contactsStateType,\n\taction: ResponseAction,\n): void {\n\tconst {\n\t\tresponse: { contacts },\n\t} = action;\n\t//const normalizedData = normalize({ contacts }, pagination);\n\tconst { response } = action;\n\t// state.response.message = \"contact import successful\"\n\tstate.type = action.type;\n};\n\nexport const softDeleteContactsSuccessMapper = function paginationMapper(\n\tstate: contactsStateType,\n\taction: ResponseAction,\n): void {\n\tconst {\n\t\tresponse: { contacts },\n\t\tpayload,\n\t} = action;\n\tconst result = payload.contactIds.reduce(\n\t\t(objToReturn: any, id: string) => {\n\t\t\tconst { [id]: value, ...rest } = objToReturn;\n\t\t\treturn { ...rest };\n\t\t},\n\t\t{ ...state.contacts },\n\t);\n\tstate.contacts = result;\n\tstate.update = !state.update;\n};\n\nexport const uploadFlatfileContactsErrorMapper = function paginationMapper(\n\tstate: contactsStateType,\n\taction: ResponseAction,\n): void {\n\tstate.type = action.type;\n};\n\nexport const updateContactsSuccessMapper = function (\n\tstate: contactsStateType,\n\taction: ResponseAction,\n) {\n\tconst { payload, response } = action;\n\tconst auxContact = state.contacts[payload.contactId];\n\tconst tagIndex = auxContact.tags.findIndex(\n\t\t(tag: any) => tag.id === payload.tagId,\n\t);\n\tconst newTags = auxContact.tags;\n\tnewTags[tagIndex] = { ...response.tag, edited: true };\n\n\tconst result = {\n\t\t...state.contacts,\n\t\t[payload.contactId]: {\n\t\t\t...auxContact,\n\t\t\ttags: newTags,\n\t\t},\n\t};\n\n\tstate.contacts = result;\n\tstate.update = !state.update;\n};\n\nexport const deleteContactsTagSucessMaper = function (\n\tstate: contactsStateType,\n\taction: ResponseAction,\n) {\n\tconst { payload } = action;\n\tconst auxContact = state.contacts[payload.contactId];\n\tconst tagIndex = auxContact.tags.findIndex(\n\t\t(tag: any) => tag.id === payload.tagId,\n\t);\n\tconst newTags = auxContact.tags;\n\tnewTags[tagIndex] = { ...newTags[tagIndex], deleted: true };\n\n\tconst result = {\n\t\t...state.contacts,\n\t\t[payload.contactId]: {\n\t\t\t...auxContact,\n\t\t\ttags: newTags,\n\t\t},\n\t};\n\n\tstate.contacts = result;\n\tstate.update = !state.update;\n};\n\nexport const exportContactsSuccessMapper = (\n\tstate: contactsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tfileDownload(response, 'contacts.csv');\n\tstate.type = action.type;\n};\n\nexport const repliesActivityMapper = (\n\tstate: contactsStateType,\n\taction: ResponseAction,\n) => {\n\tif (action.response.page === 1) {\n\t\tstate.repliesActivity = action.response.replies;\n\t} else {\n\t\tstate.repliesActivity = [\n\t\t\t...state.repliesActivity,\n\t\t\t...action.response.replies,\n\t\t];\n\t}\n\n\tstate.repliesActivityPagination.currentPage = action.response.page;\n\tstate.repliesActivityPagination.totalPages = action.response.totalPages;\n\tstate.repliesActivityPagination.count = action.response.count;\n};\n\nexport const storiesActivityMapper = (\n\tstate: contactsStateType,\n\taction: ResponseAction,\n) => {\n\tif (action.response.page === 1) {\n\t\tstate.storiesActivity = action.response.stories;\n\t} else {\n\t\tstate.storiesActivity = [\n\t\t\t...state.storiesActivity,\n\t\t\t...action.response.stories,\n\t\t];\n\t}\n\n\tstate.storiesActivityPagination.currentPage = action.response.page;\n\tstate.storiesActivityPagination.totalPages = action.response.totalPages;\n\tstate.storiesActivityPagination.count = action.response.count;\n};\n","import { createSlice } from '@reduxjs/toolkit';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { ResponseAction } from '../types';\nimport { contactsStateType } from './@types';\nimport {\n\tfilterContactsTypes,\n\tuploadFlatfileContactsTypes,\n\tinitialState,\n\tcomplexFilterContactstypes,\n\tupdateContactTagTypes,\n\tdeleteContactTagTypes,\n\tsoftDeleteContactsTypes,\n\texportContactsTypes,\n\texportContactsPerCampaignTypes,\n\tfilterRepliesActivityTypes,\n\tfilterStoriesActivityTypes,\n\tgetContactsByCampaignIdTypes,\n} from './constants';\nimport {\n\tpaginationSuccessMapper,\n\tcomplexSuccessMapper,\n\tupdateContactsSuccessMapper,\n\tdeleteContactsTagSucessMaper,\n\tsoftDeleteContactsSuccessMapper,\n\texportContactsSuccessMapper,\n\trepliesActivityMapper,\n\tstoriesActivityMapper,\n} from './mappers';\n\nexport default createSlice({\n\tname: 'contact',\n\tinitialState,\n\treducers: {\n\t\tNEW_CONTACT_TAGS(state: contactsStateType, action: ResponseAction) {\n\t\t\taction.payload.forEach((contact: any) => {\n\t\t\t\tif (state?.contacts[contact._id]) {\n\t\t\t\t\tstate.contacts[contact._id].tags = contact.tags;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(filterContactsTypes, paginationSuccessMapper),\n\t\t...createFetchReducer(uploadFlatfileContactsTypes),\n\t\t...createFetchReducer(complexFilterContactstypes, complexSuccessMapper),\n\t\t...createFetchReducer(updateContactTagTypes, updateContactsSuccessMapper),\n\t\t...createFetchReducer(deleteContactTagTypes, deleteContactsTagSucessMaper),\n\t\t...createFetchReducer(\n\t\t\tsoftDeleteContactsTypes,\n\t\t\tsoftDeleteContactsSuccessMapper,\n\t\t),\n\t\t...createFetchReducer(exportContactsTypes, exportContactsSuccessMapper),\n\t\t...createFetchReducer(\n\t\t\texportContactsPerCampaignTypes,\n\t\t\texportContactsSuccessMapper,\n\t\t),\n\t\t...createFetchReducer(filterRepliesActivityTypes, repliesActivityMapper),\n\t\t...createFetchReducer(filterStoriesActivityTypes, storiesActivityMapper),\n\t\t...createFetchReducer(\n\t\t\tgetContactsByCampaignIdTypes,\n\t\t\tpaginationSuccessMapper,\n\t\t),\n\t},\n}).reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport fileDownload from 'js-file-download';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\tfilterCampaignsTypes,\n\tcreateCampaignTypes,\n\tupdateCampaignTypes,\n\tcreateDraftCampaignTypes,\n\tlaunchDraftCampaignTypes,\n\texportCampaignsTypes,\n\texportSingleCampaignTypes,\n\taddContactsToCampaignTypes,\n\temailPreviewTypes,\n\tresendStoriesCounttypes,\n\tresendCampaignStoriesTypes,\n\tgetCampaignOptionsTypes,\n\tgetCampaignTypes,\n\tgetCampaignsCountTypes,\n\tsaveCampaignTypes,\n\tlaunchCampaignTypes,\n\tsaveCampaignBulkTypes,\n\tsaveCurrentChildCampaignTypes,\n\tsaveAndUpdateCurrentChildCampaignTypes,\n\tdeactivateCampaignTypes,\n\tgetEmailTemplatesTypes,\n\tduplicateCampaignTypes,\n\tbulkDeleteDraftCampaignsTypes,\n\tgetVerifiedStorytellersTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport objectToOptions from '../../utils/ObjectToOptions';\n\nimport { ServiceResponse, ToastMessage } from '../../constants';\nimport { recipesStateType } from '../recipe';\nimport { CampaignStateEnum, CampaignType } from './types';\nimport { setStatusChangeInCampaigns } from './utils';\nimport { showToast } from '../../../common/components/presentation/Toast';\n\nconst campaign = entityNormalizer('campaigns', {}, { idAttribute: '_id' });\n\nconst pagination = { campaigns: [campaign] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tcampaign: {},\n\tcampaigns: {},\n\tcampaignCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\tpaginationOptions: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tupdateResponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcreateDraftResponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tlaunchResponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n\tcampaignOptions: [],\n\tsavedCampaign: {},\n\tcampaignTree: {},\n\tcampaignName: 'Untitled Campaign',\n\ttotalCampaigns: {},\n\tverifiedStorytellers: [],\n};\n\nexport type campaignsStateType = typeof initialState;\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\tcampaigns,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ campaigns, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction paginationMapper(state: campaignsStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\n\t//to make the infinite scroll works\n\tif (action.response.page === 1) {\n\t\tstate.campaigns = {\n\t\t\t...normalizedData.entities.campaigns,\n\t\t};\n\t} else {\n\t\tstate.campaigns = {\n\t\t\t...state.campaigns,\n\t\t\t...normalizedData.entities.campaigns,\n\t\t};\n\t}\n\n\tstate.campaignCount = Object.keys(state.campaigns || {})?.length;\n\t//Options for the dropdown menu\n\tstate.pagination.pages[action.response.page] =\n\t\tnormalizedData.result.campaigns;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nfunction getCampaign(state: campaignsStateType, action: ResponseAction) {\n\tconst { campaign, sharedVideoStats, contactsByPreference } = action.response;\n\tstate.campaign = {\n\t\t...campaign,\n\t\tsharedVideoStats,\n\t\tcontactsByPreference,\n\t};\n}\n\nfunction optionsMapper(state: campaignsStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tconst campaignCopy = objectToOptions(\n\t\tnormalizedData.entities.campaigns,\n\t\t'id',\n\t\t'name',\n\t);\n\tif (!action.payload?.excludeAll && !action.payload.includeBoth) {\n\t\tcampaignCopy.unshift({\n\t\t\tvalue: '',\n\t\t\tlabel: 'All',\n\t\t});\n\t}\n\n\tif (action?.response?.page > 1) {\n\t\tstate.campaignOptions = [...state.campaignOptions, ...campaignCopy];\n\t} else {\n\t\tstate.campaignOptions = campaignCopy;\n\t}\n\tif (action.payload.includeBoth) {\n\t\tstate.campaignOptions = campaignCopy;\n\t\tstate.campaignOptionsAll = campaignCopy;\n\t\tstate.campaignOptionsAll = [\n\t\t\t{\n\t\t\t\tvalue: '',\n\t\t\t\tlabel: 'All',\n\t\t\t},\n\t\t\t...campaignCopy,\n\t\t];\n\t}\n\tstate.paginationOptions.pages[action.response.page] =\n\t\tnormalizedData.result.campaigns;\n\tstate.paginationOptions.currentPage = action.response.page;\n\tstate.paginationOptions.totalPages = action.response.totalPages;\n\tstate.paginationOptions.count = action.response.count;\n}\n\nfunction getCampaignsCountMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tstate.totalCampaigns = action.response.campaigns;\n}\n\nfunction updateCampaignMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tstate.campaign = { ...state.campaign, ...action.response.campaign };\n\tstate.updateResponse = action.response;\n}\n\nfunction deactivateCampaignMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tconst updatedCampaign = action.response.campaign;\n\tstate.campaign.state = updatedCampaign.state;\n\tstate.campaign.pendingStories = updatedCampaign.pendingStories;\n\tstate.campaign.pendingStoriesCount = updatedCampaign.pendingStoriesCount;\n\tstate.campaign.assignedStories = updatedCampaign.assignedStories;\n\tstate.campaign.assignedStoriesCount = updatedCampaign.assignedStoriesCount;\n}\n\nfunction bulkDeleteDraftCampaignsMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tconst { campaignIds } = action.response;\n\n\tconst result = campaignIds.reduce(\n\t\t(objToReturn: any, id: string) => {\n\t\t\tconst { [id]: deletedCampaign, ...rest } = objToReturn;\n\t\t\treturn { ...rest };\n\t\t},\n\t\t{ ...state.campaigns },\n\t);\n\n\tstate.campaigns = result;\n\n\tconst newCampaignsCount = state.campaignCount - campaignIds.length;\n\tstate.campaignCount = newCampaignsCount > 0 ? newCampaignsCount : 0;\n}\n\nfunction createDraftCampaignSuccessMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tstate.createDraftResponse.message = ServiceResponse.saveDraft;\n\tstate.createDraftResponse = action.response;\n}\nfunction createDraftCampaignErrorMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tstate.createDraftResponse.status = action.error.response.status;\n\tstate.createDraftResponse.message = action.error.message;\n\tstate.createDraftResponse.error = action.error;\n}\n\nfunction launchDraftCampaignMapper(\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) {\n\tstate.launchResponse = action.response;\n\tstate.launchResponse.error = action.error;\n}\n\nexport const exportCampaignsSuccessMapper = (\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tfileDownload(response, 'campaigns.csv');\n\tstate.type = action.type;\n};\n\nexport const exportSingleCampaignSuccessMapper = (\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tconst { campaignName } = action.payload;\n\tfileDownload(response, `${campaignName}.csv`);\n\tstate.type = action.type;\n};\n\nexport const addContactToCampaignSuccessMapper = (\n\tstate: campaignsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n};\n\nfunction updateTreeCampaign(state: recipesStateType, action: ResponseAction) {\n\tif (!!state.campaignTree[action?.response?.campaign?._id]) {\n\t\tstate.campaignTree = {\n\t\t\t...state.campaignTree,\n\t\t\t[action.response.campaign._id]: action.response.campaign,\n\t\t};\n\t}\n}\n\nfunction saveCampaignMapper(state: recipesStateType, action: ResponseAction) {\n\tupdateTreeCampaign(state, action);\n\tstate.savedCampaign = {\n\t\t...state.savedCampaign,\n\t\t...action?.response?.campaign,\n\t\tverifiedStorytellers: [],\n\t};\n\tstate.campaignName = action?.response?.campaign.name;\n}\n\nfunction normalizeCampaignTree(campaigns: CampaignType[]) {\n\tconst entityNormalizer = normalize({ campaigns }, pagination);\n\treturn { ...entityNormalizer.entities.campaigns };\n}\n\nfunction saveCurrentChildCampaignMapper(\n\tstate: recipesStateType,\n\taction: ResponseAction,\n) {\n\tupdateTreeCampaign(state, action);\n}\n\nfunction launchCampaignMapper(state: recipesStateType, action: ResponseAction) {\n\tconst currentCampaign = state.savedCampaign;\n\tconst campaignTree = state.campaignTree;\n\n\tif (campaignTree[currentCampaign?._id]) {\n\t\tconst campaignTreeUpdated = setStatusChangeInCampaigns(\n\t\t\tcampaignTree,\n\t\t\tCampaignStateEnum.active,\n\t\t);\n\n\t\tstate.campaignTree = normalizeCampaignTree(campaignTreeUpdated);\n\t}\n\n\tstate.savedCampaign = {\n\t\t...state.savedCampaign,\n\t\tstate: CampaignStateEnum.active,\n\t};\n}\n\nfunction emailPreviewErrorMapper(\n\tstate: recipesStateType,\n\taction: ResponseAction,\n) {\n\tconst errorMessage = action?.error?.response?.data?.message;\n\tconst isCtaNotDefined = errorMessage.includes('cta must be defined');\n\tif (isCtaNotDefined) {\n\t\treturn showToast(ToastMessage.ctaNotSelected, 'error');\n\t} else {\n\t\treturn showToast(ToastMessage.error, 'error');\n\t}\n}\n\nfunction saveCampaignErrorMapper(\n\tstate: recipesStateType,\n\taction: ResponseAction,\n) {\n\tconst errorMessage = action?.error?.response?.data?.message;\n\tconst haveMaxNumberOfContacts = errorMessage.includes(\n\t\t'Maximun number of contacts exceed.',\n\t);\n\tif (haveMaxNumberOfContacts) {\n\t\treturn showToast(ToastMessage.audienceMaxContactError, 'error');\n\t} else {\n\t\treturn showToast(ToastMessage.error, 'error');\n\t}\n}\n\nfunction verifiedStorytellersMapper(\n\tstate: recipesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { sendingAddresses },\n\t} = action;\n\tstate.verifiedStorytellers = sendingAddresses;\n}\n\nconst campaignSlice = createSlice({\n\tname: 'campaign',\n\tinitialState,\n\treducers: {\n\t\tRESET(state: campaignsStateType) {\n\t\t\tstate.campaignCount = 0;\n\t\t\tstate = initialState;\n\t\t},\n\t\tEDIT_CAMPAIGN(state: campaignsStateType, action: ResponseAction) {\n\t\t\tstate.savedCampaign = {\n\t\t\t\t...action.payload.campaign,\n\t\t\t\tisDraft: !!action.payload.campaign._id,\n\t\t\t};\n\t\t\tstate.campaignName = action.payload?.campaign.name || 'Untitled Campaign';\n\t\t},\n\t\tSET_CAMPAIGN_TREE(state: campaignsStateType, action: ResponseAction) {\n\t\t\tconst { payload } = action;\n\t\t\tstate.campaignTree = normalizeCampaignTree(payload);\n\t\t},\n\t\tSET_CAMPAIGN_NAME(state: campaignsStateType, action: { payload: string }) {\n\t\t\tstate.campaignName = action.payload;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(getCampaignTypes, getCampaign),\n\t\t...createFetchReducer(getCampaignsCountTypes, getCampaignsCountMapper),\n\t\t...createFetchReducer(filterCampaignsTypes, paginationMapper),\n\t\t...createFetchReducer(\n\t\t\tcreateDraftCampaignTypes,\n\t\t\tcreateDraftCampaignSuccessMapper,\n\t\t\tcreateDraftCampaignErrorMapper,\n\t\t),\n\t\t...createFetchReducer(launchDraftCampaignTypes, launchDraftCampaignMapper),\n\t\t...createFetchReducer(createCampaignTypes),\n\t\t...createFetchReducer(updateCampaignTypes, updateCampaignMapper),\n\t\t...createFetchReducer(deactivateCampaignTypes, deactivateCampaignMapper),\n\t\t...createFetchReducer(exportCampaignsTypes, exportCampaignsSuccessMapper),\n\t\t...createFetchReducer(\n\t\t\texportSingleCampaignTypes,\n\t\t\texportSingleCampaignSuccessMapper,\n\t\t),\n\t\t...createFetchReducer(\n\t\t\taddContactsToCampaignTypes,\n\t\t\taddContactToCampaignSuccessMapper,\n\t\t),\n\t\t...createFetchReducer(emailPreviewTypes, () => {}, emailPreviewErrorMapper),\n\t\t...createFetchReducer(getEmailTemplatesTypes),\n\t\t...createFetchReducer(\n\t\t\tgetVerifiedStorytellersTypes,\n\t\t\tverifiedStorytellersMapper,\n\t\t),\n\t\t...createFetchReducer(resendStoriesCounttypes),\n\t\t...createFetchReducer(resendCampaignStoriesTypes),\n\t\t...createFetchReducer(getCampaignOptionsTypes, optionsMapper),\n\t\t...createFetchReducer(\n\t\t\tsaveCampaignTypes,\n\t\t\tsaveCampaignMapper,\n\t\t\tsaveCampaignErrorMapper,\n\t\t),\n\t\t...createFetchReducer(launchCampaignTypes, launchCampaignMapper),\n\t\t...createFetchReducer(saveCampaignBulkTypes),\n\t\t...createFetchReducer(\n\t\t\tsaveCurrentChildCampaignTypes,\n\t\t\tsaveCurrentChildCampaignMapper,\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tsaveAndUpdateCurrentChildCampaignTypes,\n\t\t\tsaveCampaignMapper,\n\t\t),\n\t\t...createFetchReducer(duplicateCampaignTypes),\n\t\t...createFetchReducer(\n\t\t\tbulkDeleteDraftCampaignsTypes,\n\t\t\tbulkDeleteDraftCampaignsMapper,\n\t\t),\n\t},\n});\n\nexport default campaignSlice.reducer;\n","import { CampaignStateEnum, CampaignType } from '../types';\n\nexport function setStatusChangeInCampaigns(\n\tcampaigns: { [key: string]: CampaignType },\n\tstate: CampaignStateEnum,\n) {\n\treturn Object.values(campaigns)?.map((campaign) => ({\n\t\t...campaign,\n\t\tstate,\n\t}));\n}\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl } from '../../constants/index';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nconst mainType = 'recipe';\n\nexport const filterRecipesTypes = createFetchTypes(\n\t`${mainType}_FILTER_RECIPES`,\n);\n\nfunction filterRecipes(\n\tFilterOptions: FilterOptions,\n\toptions?: { isFilter: boolean },\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: filterRecipesTypes,\n\t\tpayload: { isFilter: options?.isFilter },\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/recipes${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nexport { filterRecipes };\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport { filterRecipesTypes } from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\n\nconst recipe = entityNormalizer('recipes');\nconst pagination = { recipes: [recipe] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\trecipes: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\trecipeToEdit: null,\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n};\n\nexport type recipesStateType = typeof initialState;\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\trecipes,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ recipes, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction paginationMapper(state: recipesStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\n\t//Options for the dropdown menu\n\n\tstate.recipes = {\n\t\t// ...state.recipes,\n\t\t...normalizedData.entities.recipes,\n\t};\n\tstate.recipesCount = Object.keys(state.recipes || {})?.length || 0;\n\tstate.pagination.pages[action.response.page] = normalizedData.result.recipes;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nconst recipeslice = createSlice({\n\tname: 'recipe',\n\tinitialState,\n\treducers: {\n\t\tRESET(state: recipesStateType) {\n\t\t\tstate = initialState;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(filterRecipesTypes, paginationMapper),\n\t},\n});\n\nexport default recipeslice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\tfilterCtaTypes,\n\tcreateCtaTypes,\n\tupdateCtaTypes,\n\tsoftBulkTypes,\n\tgetCtaOptionsTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport ObjectToOptions from '../../utils/ObjectToOptions';\n\nconst cta = entityNormalizer('ctas', {}, { idAttribute: '_id' });\nconst pagination = { ctas: [cta] };\n\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tctas: {},\n\tctasCount: 0,\n\tctaOptions: [],\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n};\n\nexport type ctasStateType = typeof initialState;\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\tctas,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ ctas, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction optionsMapper(state: ctasStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tconst ctaCopy = ObjectToOptions(normalizedData.entities.ctas, 'id', 'title');\n\tif (action.payload?.excludeAll !== true) {\n\t\tctaCopy.unshift({\n\t\t\tvalue: '',\n\t\t\tlabel: 'All',\n\t\t});\n\t}\n\tstate.ctaOptions = ctaCopy;\n}\n\nfunction paginationMapper(state: ctasStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tif (action.response.page === 1) {\n\t\tstate.ctas = { ...normalizedData.entities.ctas };\n\t} else {\n\t\tstate.ctas = { ...state.ctas, ...normalizedData.entities.ctas };\n\t}\n\tstate.ctasCount = Object.keys(state.ctas || {})?.length;\n\tstate.pagination.pages[action.response.page] = normalizedData.result.ctas;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nconst ctaSlice = createSlice({\n\tname: 'cta',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(filterCtaTypes, paginationMapper),\n\t\t...createFetchReducer(createCtaTypes),\n\t\t...createFetchReducer(updateCtaTypes),\n\t\t...createFetchReducer(softBulkTypes),\n\t\t...createFetchReducer(getCtaOptionsTypes, optionsMapper),\n\t},\n});\n\nexport default ctaSlice.reducer;\n","import { createSlice, Action } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport fileDownload from 'js-file-download';\nimport {\n\tfilterStoriesTypes,\n\teditStoriesTypes,\n\tcreateStoriesTypes,\n\tsendStoriesTypes,\n\tgetApprovalsTypes,\n\tapprovalCountTypes,\n\texportStoriesTypes,\n\tfilterStoriesWithInfiniteTypes,\n\tbulkApproveTypes,\n\tbulkDeleteTypes,\n\tbulkRejectTypes,\n\tgetSingleStoryTypes,\n\tgetStoriesCountTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { CaptionsType } from '../../../common/components/presentation/VideoCard/types';\n\nconst story = entityNormalizer('stories', {}, { excludeTime: true });\nconst video = entityNormalizer('videos', {}, { excludeTime: true });\n\nconst pagination = { stories: [story], videos: [video] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstories: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\tapprovals: {},\n\tapprovalPagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n\tcreateAssignedStoryResponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tsendVideoResponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\ttotalStories: {},\n};\n\nexport type storiesStateType = typeof initialState;\n\nfunction defaultStoriesPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n\tcb: (stories: any, state: storiesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.stories;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tcb(normalizedData.entities.stories, state);\n}\n\nfunction paginationMapper(stories: any, state: storiesStateType) {\n\tstate.stories = { ...stories };\n}\n\nfunction filterMapper(stories: any, state: storiesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(stories, state);\n\t}\n\tstate.stories = { ...state.stories, ...stories };\n}\n\nfunction approvalPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst videos = stories.map((story: any) => story.video);\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count, videos },\n\t\tpagination,\n\t);\n\n\tstate.approvals = { ...normalizedData.entities.stories };\n\tObject.values(state.approvals).forEach((approval: any) => {\n\t\tapproval.video = normalizedData.entities.videos[approval.video._id];\n\t});\n\tstate.approvalPagination.pages[action.response.page] =\n\t\tnormalizedData.result.stories;\n\tstate.approvalPagination.currentPage = action.response.page;\n\tstate.approvalPagination.totalPages = action.response.totalPages;\n\tstate.approvalPagination.count = action.response.count;\n}\n\nfunction createAssignedStoryMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tstate.createAssignedStoryResponse = action.response;\n}\n\nfunction sendVideoMapper(state: storiesStateType, action: ResponseAction) {\n\tstate.sendVideoResponse = action.response;\n}\n\nfunction exportStoriesSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tfileDownload(response, 'stories.csv');\n\tstate.type = action.type;\n}\n\nfunction bulkActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { stories },\n\t} = action;\n\tstories.map((story: string) => {\n\t\tconst { [story]: omit, ...rest } = state.approvals;\n\t\tstate.approvals = rest;\n\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\tstate.stories = storiesRest;\n\t});\n}\n\nfunction getSingleStoryMapper(state: storiesStateType, action: ResponseAction) {\n\tconst storyId = action.response.story._id;\n\tconst normalizedData = normalize(\n\t\t{ stories: { ...state.stories, [storyId]: action.response.story } },\n\t\tpagination,\n\t);\n\tstate.stories = { ...normalizedData.entities.stories };\n}\n\nfunction getStoriesCountMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tstate.totalStories = action.response.totalStories;\n}\n\nconst storySlice = createSlice({\n\tname: 'story',\n\tinitialState,\n\treducers: {\n\t\tCLEAR_STORIES(state: storiesStateType) {\n\t\t\tstate.stories = {};\n\t\t\tstate.pagination = initialState.pagination;\n\t\t},\n\t\tCLEAR_RESPONSE(state: storiesStateType) {\n\t\t\tstate.response = null;\n\t\t},\n\t\tUPDATE_APPROVAL_VIDEO_CAPTIONS(\n\t\t\tstate: storiesStateType,\n\t\t\taction: {\n\t\t\t\tpayload: { approvalVideoId: string; captions: CaptionsType[] };\n\t\t\t},\n\t\t) {\n\t\t\tconst { approvalVideoId, captions } = action.payload;\n\t\t\tconst [approvalId] = Object.entries(state.approvals).find(\n\t\t\t\t([approvalId, approval]: [string, any]) =>\n\t\t\t\t\tapproval.video._id === approvalVideoId,\n\t\t\t);\n\t\t\tstate.approvals[approvalId].video.captions = captions;\n\t\t},\n\t\tUPDATE_APPROVAL_VIDEO_FIELD(\n\t\t\tstate: storiesStateType,\n\t\t\taction: { payload: { approvalId: string; field: string; value: any } },\n\t\t) {\n\t\t\tconst { approvalId, field, value } = action.payload;\n\t\t\tif (state?.approvals[approvalId]?.video) {\n\t\t\t\tstate.approvals[approvalId].video[field] = value;\n\t\t\t}\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(\n\t\t\tfilterStoriesTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tdefaultStoriesPaginationMapper(state, action, paginationMapper),\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tfilterStoriesWithInfiniteTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tdefaultStoriesPaginationMapper(state, action, filterMapper),\n\t\t),\n\n\t\t...createFetchReducer(editStoriesTypes),\n\t\t...createFetchReducer(createStoriesTypes, createAssignedStoryMapper),\n\t\t...createFetchReducer(sendStoriesTypes, sendVideoMapper),\n\t\t...createFetchReducer(getApprovalsTypes, approvalPaginationMapper),\n\t\t...createFetchReducer(approvalCountTypes),\n\t\t...createFetchReducer(exportStoriesTypes, exportStoriesSuccessMapper),\n\t\tSTORY_CLEAR_ERROR: (state: storiesStateType, action: Action) => {\n\t\t\tstate.error = null;\n\t\t},\n\t\t...createFetchReducer(bulkApproveTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(bulkDeleteTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(bulkRejectTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(getSingleStoryTypes, getSingleStoryMapper),\n\t\t...createFetchReducer(getStoriesCountTypes, getStoriesCountMapper),\n\t},\n});\n\nexport default storySlice.reducer;\n","import { createSlice, Action } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\teditStoriesTypes,\n\tgetApprovalsTypes,\n\tbulkApproveTypes,\n\tbulkDeleteTypes,\n\tbulkRejectTypes,\n\tgetSingleStoryTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { CaptionsType } from '../../../common/components/presentation/VideoCard/types';\n\nconst story = entityNormalizer('stories', {}, { excludeTime: true });\n\nconst pagination = { stories: [story] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstories: {},\n\tstoriesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {\n\t\treload: false,\n\t},\n};\n\nexport type storiesStateType = typeof initialState;\n\nfunction paginationMapper(stories: any, state: storiesStateType) {\n\tstate.stories = { ...stories };\n}\n\nfunction filterMapper(stories: any, state: storiesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(stories, state);\n\t}\n\tstate.stories = { ...state.stories, ...stories };\n}\n\nfunction approvalPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n\tcb: (stories: any, state: storiesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.stories;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tstate.storiesCount = action.response.count;\n\tstate.custom.reload = false;\n\tcb(normalizedData.entities.stories, state);\n}\n\nfunction bulkActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { stories },\n\t} = action;\n\tstories.map((story: string) => {\n\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\tstate.stories = storiesRest;\n\t});\n\tstate.custom.reload = true;\n}\n\nfunction getSingleStoryMapper(state: storiesStateType, action: ResponseAction) {\n\tconst newStory = action.response.story;\n\tconst storyId = action.response.story._id;\n\n\tif (newStory?.assignedTo && !newStory.assignedTo.fullName) {\n\t\tnewStory.assignedTo.fullName = `${newStory.assignedTo.firstName} ${newStory.assignedTo.lastName}`;\n\t}\n\n\tconst normalizedData = normalize(\n\t\t{ stories: { ...state.stories, [storyId]: newStory } },\n\t\tpagination,\n\t);\n\tstate.stories = { ...normalizedData.entities.stories };\n}\n\nconst approvalSlice = createSlice({\n\tname: 'approval',\n\tinitialState,\n\treducers: {\n\t\tUPDATE_VIDEO_CAPTIONS(\n\t\t\tstate: storiesStateType,\n\t\t\taction: {\n\t\t\t\tpayload: { approvalVideoId: string; captions: CaptionsType[] };\n\t\t\t},\n\t\t) {\n\t\t\tconst { approvalVideoId, captions } = action.payload;\n\t\t\tconst [approvalId] = Object.entries(state.stories).find(\n\t\t\t\t([approvalId, approval]: [string, any]) =>\n\t\t\t\t\tapproval.video._id === approvalVideoId,\n\t\t\t);\n\t\t\tstate.stories[approvalId].video.captions = captions;\n\t\t},\n\t\tUPDATE_VIDEO_FIELD(\n\t\t\tstate: storiesStateType,\n\t\t\taction: { payload: { approvalId: string; field: string; value: any } },\n\t\t) {\n\t\t\tconst { approvalId, field, value } = action.payload;\n\t\t\tif (state?.stories[approvalId]?.video) {\n\t\t\t\tstate.stories[approvalId].video[field] = value;\n\t\t\t\tstate.stories = { ...state.stories };\n\t\t\t}\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(editStoriesTypes),\n\t\t...createFetchReducer(\n\t\t\tgetApprovalsTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tapprovalPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\tSTORY_CLEAR_ERROR: (state: storiesStateType, action: Action) => {\n\t\t\tstate.error = null;\n\t\t},\n\t\t...createFetchReducer(bulkApproveTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(bulkDeleteTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(bulkRejectTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(getSingleStoryTypes, getSingleStoryMapper),\n\t},\n});\n\nexport default approvalSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\tgetAssignedStoriesTypes,\n\teditStoriesTypes,\n\tbulkDeleteTypes,\n\tgetSingleStoryTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\n\nconst story = entityNormalizer('stories', {}, { excludeTime: true });\n\nconst pagination = { stories: [story] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstories: {},\n\tstoriesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {\n\t\treload: false,\n\t},\n};\n\nexport type storiesStateType = typeof initialState;\n\nfunction assignedStoriesPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n\tcb: (stories: any, state: storiesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.stories;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tstate.storiesCount = action.response.count;\n\tcb(normalizedData.entities.stories, state);\n}\n\nfunction paginationMapper(stories: any, state: storiesStateType) {\n\tstate.stories = { ...stories };\n}\n\nfunction filterMapper(stories: any, state: storiesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(stories, state);\n\t}\n\tstate.stories = { ...state.stories, ...stories };\n\tstate.custom.reload = false;\n}\n\nfunction bulkActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { stories },\n\t} = action;\n\tstories.map((story: string) => {\n\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\tstate.stories = storiesRest;\n\t});\n\tstate.custom.reload = true;\n}\n\nfunction editActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst storiesId = action.payload.EditOptions.storiesId;\n\tconst storyteller = action.payload.storyteller;\n\tconst storytellerFilter = action.payload.storytellerFilter;\n\tif (storytellerFilter && storytellerFilter !== storyteller._id) {\n\t\tstate.stories = Object.keys(state.stories).reduce(\n\t\t\t(newObject, storyId: string) => {\n\t\t\t\tif (!storiesId.includes(storyId)) {\n\t\t\t\t\tstate.stories[storyId] = { ...state.stories[storyId] };\n\t\t\t\t}\n\t\t\t\treturn newObject;\n\t\t\t},\n\t\t\t{},\n\t\t);\n\t} else {\n\t\tstoriesId.map((storyId: string) => {\n\t\t\tstate.stories[storyId] = {\n\t\t\t\t...state.stories[storyId],\n\t\t\t\tassignedTo: storyteller,\n\t\t\t};\n\t\t});\n\t\tstate.stories = { ...state.stories };\n\t}\n}\n\nfunction getSingleStoryMapper(state: storiesStateType, action: ResponseAction) {\n\tconst newStory = action.response.story;\n\tconst storyId = newStory._id;\n\n\tif (newStory?.assignedTo && !newStory.assignedTo.fullName) {\n\t\tnewStory.assignedTo.fullName = `${newStory.assignedTo.firstName} ${newStory.assignedTo.lastName}`;\n\t}\n\n\tconst normalizedData = normalize(\n\t\t{ stories: { ...state.stories, [storyId]: newStory } },\n\t\tpagination,\n\t);\n\tstate.stories = { ...normalizedData.entities.stories };\n}\n\nconst assignedSlice = createSlice({\n\tname: 'assigned',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(\n\t\t\tgetAssignedStoriesTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tassignedStoriesPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\t...createFetchReducer(editStoriesTypes, editActionSuccessMapper),\n\t\t...createFetchReducer(bulkDeleteTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(getSingleStoryTypes, getSingleStoryMapper),\n\t},\n});\n\nexport default assignedSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\tfilterRepliesTypes,\n\tgetSingleReplyTypes,\n\tsetReplyStateTypes,\n\tbulkUpdateRepliesTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { replyStates } from './constants';\n\nconst reply = entityNormalizer('replies', {}, { excludeTime: true });\nconst video = entityNormalizer('videos', {}, { excludeTime: true });\n\nconst pagination = { replies: [reply], videos: [video] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\treplies: {},\n\trepliesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {\n\t\treload: false,\n\t},\n};\n\nexport type repliesStateType = typeof initialState;\n\nfunction defaultRepliesPaginationMapper(\n\tstate: repliesStateType,\n\taction: ResponseAction,\n\tcb: (replies: any, state: repliesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\treplies,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ replies, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.replies;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tstate.repliesCount = action.response.count;\n\tcb(normalizedData.entities.replies, state);\n}\n\nfunction paginationMapper(replies: any, state: repliesStateType) {\n\tstate.replies = { ...replies };\n}\n\nfunction filterMapper(replies: any, state: repliesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(replies, state);\n\t}\n\tstate.custom.reload = false;\n\tstate.replies = { ...state.replies, ...replies };\n}\n\nfunction getSingleReplyMapper(state: repliesStateType, action: ResponseAction) {\n\tconst newReply = action.response.reply;\n\tconst replyId = newReply._id;\n\n\tif (newReply?.storyteller && !newReply.storyteller.fullName) {\n\t\tnewReply.storyteller.fullName = `${newReply.storyteller.firstName} ${newReply.assignedTo.lastName}`;\n\t}\n\n\tconst normalizedData = normalize(\n\t\t{ replies: { ...state.replies, [replyId]: action.response.reply } },\n\t\tpagination,\n\t);\n\tstate.replies = { ...normalizedData.entities.replies };\n}\n\nfunction setReplyStateMapper(state: repliesStateType, action: ResponseAction) {\n\tconst replyId = action.response.reply._id;\n\tconst newState = action.response.reply.state;\n\tconst normalizedData = normalize(\n\t\t{\n\t\t\treplies: {\n\t\t\t\t...state.replies,\n\t\t\t\t[replyId]: {\n\t\t\t\t\t...state.replies[replyId],\n\t\t\t\t\tstate: newState,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tpagination,\n\t);\n\n\t// If it changed to other state different than seen then it shouldn't be displayed as a reply\n\tif (newState !== replyStates.seen) {\n\t\tdelete normalizedData.entities.replies[replyId];\n\t}\n\tstate.replies = { ...normalizedData.entities.replies };\n}\n\nfunction bulkUpdateRepliesMapper(\n\tstate: repliesStateType,\n\taction: ResponseAction,\n) {\n\taction.response.replyIds.forEach((id: string) => {\n\t\tdelete state.replies[id];\n\t});\n\n\tconst normalizedData = normalize(\n\t\t{\n\t\t\treplies: {\n\t\t\t\t...state.replies,\n\t\t\t},\n\t\t},\n\t\tpagination,\n\t);\n\n\t// If it changed to other state different than seen then it shouldn't be displayed as a reply\n\tstate.replies = { ...normalizedData.entities.replies };\n\tstate.custom.reload = true;\n}\n\nconst replySlice = createSlice({\n\tname: 'reply',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(\n\t\t\tfilterRepliesTypes,\n\t\t\t(state: repliesStateType, action) =>\n\t\t\t\tdefaultRepliesPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\t...createFetchReducer(getSingleReplyTypes, getSingleReplyMapper),\n\t\t...createFetchReducer(setReplyStateTypes, setReplyStateMapper),\n\t\t...createFetchReducer(bulkUpdateRepliesTypes, bulkUpdateRepliesMapper),\n\t},\n});\n\nexport default replySlice.reducer;\n","import { createSlice, Action } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\teditStoriesTypes,\n\tgetScheduledTypes,\n\tbulkDeleteTypes,\n\tgetSingleStoryTypes,\n\tsendNowTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { CaptionsType } from '../../../common/components/presentation/VideoCard/types';\n\nconst story = entityNormalizer('stories', {}, { excludeTime: true });\n\nconst pagination = { stories: [story] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstories: {},\n\tstoriesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {\n\t\treload: false,\n\t},\n};\n\nexport type storiesStateType = typeof initialState;\n\nfunction paginationMapper(stories: any, state: storiesStateType) {\n\tstate.stories = { ...stories };\n}\n\nfunction filterMapper(stories: any, state: storiesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(stories, state);\n\t}\n\tstate.stories = { ...state.stories, ...stories };\n}\n\nfunction scheduledPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n\tcb: (stories: any, state: storiesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.stories;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tstate.storiesCount = action.response.count;\n\tstate.custom.reload = false;\n\tcb(normalizedData.entities.stories, state);\n}\n\nfunction bulkActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { stories },\n\t} = action;\n\tstories.map((story: string) => {\n\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\tstate.stories = storiesRest;\n\t});\n\tstate.custom.reload = true;\n}\n\nfunction sendNowSuccessMapper(state: storiesStateType, action: ResponseAction) {\n\tif (action.response.status === 200) {\n\t\tconst { stories } = action.payload;\n\t\tstories.map((story: string) => {\n\t\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\t\tstate.stories = storiesRest;\n\t\t});\n\t}\n}\n\nfunction getSingleStoryMapper(state: storiesStateType, action: ResponseAction) {\n\tconst newStory = action.response.story;\n\tconst storyId = newStory._id;\n\n\tif (newStory?.assignedTo && !newStory.assignedTo.fullName) {\n\t\tnewStory.assignedTo.fullName = `${newStory.assignedTo.firstName} ${newStory.assignedTo.lastName}`;\n\t}\n\n\tconst normalizedData = normalize(\n\t\t{ stories: { ...state.stories, [storyId]: newStory } },\n\t\tpagination,\n\t);\n\tstate.stories = { ...normalizedData.entities.stories };\n}\n\nconst storySlice = createSlice({\n\tname: 'scheduled',\n\tinitialState,\n\treducers: {\n\t\tUPDATE_VIDEO_CAPTIONS(\n\t\t\tstate: storiesStateType,\n\t\t\taction: {\n\t\t\t\tpayload: { scheduledVideoId: string; captions: CaptionsType[] };\n\t\t\t},\n\t\t) {\n\t\t\tconst { scheduledVideoId, captions } = action.payload;\n\t\t\tconst [storyId] = Object.entries(state.stories).find(\n\t\t\t\t([storyId, approval]: [string, any]) =>\n\t\t\t\t\tapproval.video._id === scheduledVideoId,\n\t\t\t);\n\t\t\tstate.stories[storyId].video.captions = captions;\n\t\t},\n\t\tUPDATE_VIDEO_FIELD(\n\t\t\tstate: storiesStateType,\n\t\t\taction: { payload: { scheduledId: string; field: string; value: any } },\n\t\t) {\n\t\t\tconst { scheduledId, field, value } = action.payload;\n\t\t\tif (state?.stories[scheduledId]?.video) {\n\t\t\t\tstate.stories[scheduledId].video[field] = value;\n\t\t\t\tstate.stories = { ...state.stories };\n\t\t\t}\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(editStoriesTypes),\n\t\t...createFetchReducer(\n\t\t\tgetScheduledTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tscheduledPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\tSTORY_CLEAR_ERROR: (state: storiesStateType, action: Action) => {\n\t\t\tstate.error = null;\n\t\t},\n\t\t...createFetchReducer(bulkDeleteTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(getSingleStoryTypes, getSingleStoryMapper),\n\t\t...createFetchReducer(sendNowTypes, sendNowSuccessMapper),\n\t},\n});\n\nexport default storySlice.reducer;\n","import { createSlice, Action } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\teditStoriesTypes,\n\tgetSentStoriesTypes,\n\tarchiveStoriesTypes,\n\tundeleteStoriesTypes,\n\tgetSingleStoryTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { CaptionsType } from '../../../common/components/presentation/VideoCard/types';\n\nconst story = entityNormalizer('stories', {}, { excludeTime: true });\n\nconst pagination = { stories: [story] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstories: {},\n\tstoriesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {\n\t\treload: false,\n\t},\n};\n\nexport type storiesStateType = typeof initialState;\n\nfunction paginationMapper(stories: any, state: storiesStateType) {\n\tstate.stories = { ...stories };\n}\n\nfunction filterMapper(stories: any, state: storiesStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(stories, state);\n\t}\n\tstate.stories = { ...state.stories, ...stories };\n}\n\nfunction sentPaginationMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n\tcb: (stories: any, state: storiesStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tstories,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst normalizedData = normalize(\n\t\t{ stories, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.pagination.pages[action.response.page] = normalizedData.result.stories;\n\tstate.response = action.response;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tstate.storiesCount = action.response.count;\n\tstate.custom.reload = false;\n\tcb(normalizedData.entities.stories, state);\n}\n\nfunction bulkActionSuccessMapper(\n\tstate: storiesStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { stories },\n\t} = action;\n\tstories.map((story: string) => {\n\t\tconst { [story]: omittedStory, ...storiesRest } = state.stories;\n\t\tstate.stories = storiesRest;\n\t});\n\tstate.custom.reload = true;\n}\n\nfunction getSingleStoryMapper(state: storiesStateType, action: ResponseAction) {\n\tconst newStory = action.response.story;\n\tconst storyId = newStory._id;\n\n\tif (newStory?.assignedTo && !newStory.assignedTo.fullName) {\n\t\tnewStory.assignedTo.fullName = `${newStory.assignedTo.firstName} ${newStory.assignedTo.lastName}`;\n\t}\n\n\tconst normalizedData = normalize(\n\t\t{ stories: { ...state.stories, [storyId]: newStory } },\n\t\tpagination,\n\t);\n\tstate.stories = { ...normalizedData.entities.stories };\n}\n\nconst storySlice = createSlice({\n\tname: 'sent',\n\tinitialState,\n\treducers: {\n\t\tUPDATE_VIDEO_CAPTIONS(\n\t\t\tstate: storiesStateType,\n\t\t\taction: {\n\t\t\t\tpayload: { sentVideoId: string; captions: CaptionsType[] };\n\t\t\t},\n\t\t) {\n\t\t\tconst { sentVideoId, captions } = action.payload;\n\t\t\tconst [storyId] = Object.entries(state.stories).find(\n\t\t\t\t([storyId, approval]: [string, any]) =>\n\t\t\t\t\tapproval.video._id === sentVideoId,\n\t\t\t);\n\t\t\tstate.stories[storyId].video.captions = captions;\n\t\t},\n\t\tUPDATE_VIDEO_FIELD(\n\t\t\tstate: storiesStateType,\n\t\t\taction: { payload: { sentId: string; field: string; value: any } },\n\t\t) {\n\t\t\tconst { sentId, field, value } = action.payload;\n\t\t\tif (state?.stories[sentId]?.video) {\n\t\t\t\tstate.stories[sentId].video[field] = value;\n\t\t\t\tstate.stories = { ...state.stories };\n\t\t\t}\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(editStoriesTypes),\n\t\t...createFetchReducer(\n\t\t\tgetSentStoriesTypes,\n\t\t\t(state: storiesStateType, action) =>\n\t\t\t\tsentPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\tSTORY_CLEAR_ERROR: (state: storiesStateType, action: Action) => {\n\t\t\tstate.error = null;\n\t\t},\n\t\t...createFetchReducer(archiveStoriesTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(undeleteStoriesTypes, bulkActionSuccessMapper),\n\t\t...createFetchReducer(getSingleStoryTypes, getSingleStoryMapper),\n\t},\n});\n\nexport default storySlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport fileDownload from 'js-file-download';\n\nimport {\n\tfilterStorytellersTypes,\n\tfilterStorytellerPendingInvitesTypes,\n\tfilterAdminsTypes,\n\tfilterAdminPendingInvitesTypes,\n\tcreateStorytellerTypes,\n\tupdateStorytellerTypes,\n\timportStorytellersTypes,\n\tverifyStorytellerTypes,\n\tresendStorytellerVerificationTypes,\n\texportStorytellersTypes,\n\tsendSmsAppLinkTypes,\n\tgetStorytellerOptionsTypes,\n\tuploadStorytellerProfilePictureType,\n\tbulkSoftDeleteStorytellersType,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport ObjectToOptions from '../../utils/ObjectToOptions';\n\nconst storyteller = entityNormalizer('storytellers');\nconst pagination = { storytellers: [storyteller] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tstorytellerOptions: [],\n\tstorytellers: {},\n\tstorytellersCount: 0,\n\tstorytellerPendingInvites: {},\n\tstorytellerPendingInvitesCount: 0,\n\tadmins: {},\n\tadminsCount: 0,\n\tadminPendingInvites: {},\n\tadminPendingInvitesCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t\tcount: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n};\n\nexport type storytellersStateType = typeof initialState;\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\tstorytellers,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ storytellers, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction optionsMapper(state: storytellersStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tconst storytellerCopy = ObjectToOptions(\n\t\tnormalizedData.entities.storytellers,\n\t\t'id',\n\t\t'fullName',\n\t);\n\tstorytellerCopy.unshift({\n\t\tvalue: '',\n\t\tlabel: 'All',\n\t});\n\tstate.storytellerOptions = storytellerCopy;\n}\nfunction paginationMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) {\n\tconst normalizedData = normalizeResponse(action);\n\n\tif (action.response.page === 1) {\n\t\tstate.storytellers = normalizedData.entities.storytellers;\n\t} else {\n\t\tstate.storytellers = {\n\t\t\t...state.storytellers,\n\t\t\t...normalizedData.entities.storytellers,\n\t\t};\n\t}\n\t/** This is to avoid multiple loops in the app to count the storytellers\n\t * for the infinite scroll*/\n\tstate.storytellersCount = Object.keys(state.storytellers || {})?.length;\n\tstate.pagination.pages[action.response.page] =\n\t\tnormalizedData.result.storytellers;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nfunction adminPaginationMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) {\n\tconst normalizedData = normalizeResponse(action);\n\n\tstate.admins = normalizedData.entities.storytellers;\n\n\t/** This is to avoid multiple loops in the app to count the storytellers\n\t * for the infinite scroll*/\n\tstate.adminsCount = action.response.count || 0;\n}\n\nfunction storytellerPendingInvitesMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) {\n\tconst normalizedData = normalizeResponse(action);\n\n\tstate.storytellerPendingInvites = normalizedData.entities.storytellers;\n\n\t/** This is to avoid multiple loops in the app to count the storytellers\n\t * for the infinite scroll*/\n\tstate.storytellerPendingInvitesCount = action.response.count || 0;\n}\n\nfunction adminPendingInvitesMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) {\n\tconst normalizedData = normalizeResponse(action);\n\n\tstate.adminPendingInvites = normalizedData.entities.storytellers;\n\n\t/** This is to avoid multiple loops in the app to count the storytellers\n\t * for the infinite scroll*/\n\tstate.adminPendingInvitesCount = action.response.count || 0;\n}\n\nfunction createStorytellerMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) {\n\tconst { custom } = action.payload;\n\tconst { storyteller } = action.response;\n\n\tif (custom !== 'resendInvitation') {\n\t\tconst newStoryteller = { [storyteller._id]: storyteller };\n\t\tstate.storytellers = { ...newStoryteller, ...state.storytellers };\n\t}\n}\n\nfunction importStorytellersMapper(\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n): void {\n\tstate.type = action.type;\n}\n\nconst verifyStorytellerSucessMapper = (\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) => {\n\tconst { storyteller } = action.response;\n\n\tif (state.storytellersCount && state.storytellers[storyteller._id]) {\n\t\tstate.storytellers[storyteller._id].senderIdentities =\n\t\t\tstoryteller.senderIdentities;\n\t\treturn;\n\t}\n\n\tif (state.adminsCount && state.admins[storyteller._id]) {\n\t\tstate.admins[storyteller._id].senderIdentities =\n\t\t\tstoryteller.senderIdentities;\n\t\treturn;\n\t}\n};\n\nexport const exportStorytellersSuccessMapper = (\n\tstate: storytellersStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tfileDownload(response, 'storytellers.csv');\n\tstate.type = action.type;\n};\n\nconst storytellerSlice = createSlice({\n\tname: 'storyteller',\n\tinitialState,\n\treducers: {\n\t\tRESET(state: storytellersStateType) {\n\t\t\tstate.response = initialState.response;\n\t\t\tstate.error = initialState.error;\n\t\t},\n\t\tMANUALLY_ADD_STORYTELLER(state: storytellersStateType, action: any) {\n\t\t\tconst newStorytellerId = action.payload._id;\n\t\t\tconst newStorytellers = {\n\t\t\t\t...state.storytellers,\n\t\t\t\t[newStorytellerId]: action.payload,\n\t\t\t};\n\t\t\tstate.storytellers = newStorytellers;\n\t\t},\n\t\tSET_VERIFICATION_LOADING(state: storytellersStateType, action: any) {\n\t\t\tconst loading = action.payload;\n\t\t\tstate.verificationLoading = loading;\n\t\t},\n\t\tCLEAR_STORYTELLERS(state: storytellersStateType) {\n\t\t\tstate.storytellers = {};\n\t\t\tstate.storytellersCount = 0;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(filterStorytellersTypes, paginationMapper),\n\t\t...createFetchReducer(\n\t\t\tfilterStorytellerPendingInvitesTypes,\n\t\t\tstorytellerPendingInvitesMapper,\n\t\t),\n\t\t...createFetchReducer(filterAdminsTypes, adminPaginationMapper),\n\t\t...createFetchReducer(\n\t\t\tfilterAdminPendingInvitesTypes,\n\t\t\tadminPendingInvitesMapper,\n\t\t),\n\t\t...createFetchReducer(createStorytellerTypes, createStorytellerMapper),\n\t\t...createFetchReducer(updateStorytellerTypes, createStorytellerMapper),\n\t\t...createFetchReducer(importStorytellersTypes, importStorytellersMapper),\n\t\t...createFetchReducer(\n\t\t\tverifyStorytellerTypes,\n\t\t\tverifyStorytellerSucessMapper,\n\t\t),\n\t\t...createFetchReducer(resendStorytellerVerificationTypes),\n\t\t...createFetchReducer(\n\t\t\texportStorytellersTypes,\n\t\t\texportStorytellersSuccessMapper,\n\t\t),\n\t\t...createFetchReducer(sendSmsAppLinkTypes),\n\t\t...createFetchReducer(getStorytellerOptionsTypes, optionsMapper),\n\t\t...createFetchReducer(uploadStorytellerProfilePictureType),\n\t\t...createFetchReducer(bulkSoftDeleteStorytellersType),\n\t},\n});\n\nexport default storytellerSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport {\n\tcreateStoryTemplateTypes,\n\teditStoryTemplateTypes,\n\tfilterTemplatesTypes,\n\tgetTemplateOptionsTypes,\n} from './action';\nimport { TemplateType } from './types';\nimport { OptionsType } from '../../../common/components/interaction/DropdownInput/types';\nimport { normalize } from 'normalizr';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { ToastMessage } from '../../constants';\nimport { CreatedTemplateErrorMessage } from './constants';\nimport { showToast } from '../../../common/components/presentation/Toast';\n\nconst initialState: GenericEntityState = {\n\tloading: false,\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t\tcount: null,\n\t},\n\ttemplates: {},\n\ttemplatesCount: 0,\n\ttemplateOptions: [],\n\tcustom: {},\n};\n\nexport type storyTemplateStateType = typeof initialState;\n\nconst template = entityNormalizer('templates');\nconst pagination = { templates: [template] };\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\ttemplates,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ templates, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nexport const getTemplateOptionsMapper = (\n\tstate: storyTemplateStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tstate.templateOptions = response.templates.map((item: TemplateType) => ({\n\t\tvalue: item,\n\t\tlabel: item.name,\n\t}));\n\tstate.templateOptions.unshift({\n\t\tlabel: 'Default template',\n\t\tvalue: null,\n\t});\n};\n\nexport const createStoryTemplateMapper = (\n\tstate: storyTemplateStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tstate.templateOptions.push({\n\t\tvalue: response.template,\n\t\tlabel: response.template.name,\n\t});\n};\n\nexport const editStoryTemplateMapper = (\n\tstate: storyTemplateStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tstate.templateOptions = state.templateOptions.reduce(\n\t\t(list: OptionsType[], item: OptionsType) => {\n\t\t\tif (item?.value?._id === response.template._id) {\n\t\t\t\titem.value = response.template;\n\t\t\t\titem.label = response.template.name;\n\t\t\t}\n\t\t\tlist.push(item);\n\t\t\treturn list;\n\t\t},\n\t\t[],\n\t);\n};\n\nfunction createStoryErrorMapper(\n\tstate: storyTemplateStateType,\n\taction: ResponseAction,\n) {\n\tconst { message } = action?.error?.response.data;\n\n\tif (message?.includes('is required')) {\n\t\tconst backgroundImageRequired = message?.includes('`backgroundImage`');\n\t\tconst logoRequired = message?.includes('`logo`');\n\n\t\tif (backgroundImageRequired && logoRequired) {\n\t\t\tshowToast(ToastMessage.backgroundAndLogoRequired, 'error');\n\t\t} else if (backgroundImageRequired) {\n\t\t\tshowToast(ToastMessage.backgroundRequired, 'error');\n\t\t} else if (logoRequired) {\n\t\t\tshowToast(ToastMessage.logoRequired, 'error');\n\t\t}\n\t} else if (message?.includes(CreatedTemplateErrorMessage)) {\n\t\tshowToast(ToastMessage.duplicatedTemplateNameError, 'error');\n\t} else {\n\t\tshowToast(ToastMessage.error, 'error');\n\t}\n}\n\nfunction filterTemplatesMapper(\n\tstate: storyTemplateStateType,\n\taction: ResponseAction,\n) {\n\tconst normalizedData = normalizeResponse(action);\n\tif (action.response.page === 1) {\n\t\tstate.templates = normalizedData.entities.templates;\n\t} else {\n\t\tstate.templates = {\n\t\t\t...state.templates,\n\t\t\t...normalizedData.entities.templates,\n\t\t};\n\t}\n\tstate.templatesCount = Object.keys(state.templates || {})?.length;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nconst storyTemplate = createSlice({\n\tname: 'storyTemplate',\n\tinitialState,\n\treducers: {\n\t\tCLEAR_TEMPLATES(state: storyTemplateStateType) {\n\t\t\tstate.templates = {};\n\t\t\tstate.templatesCount = 0;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(getTemplateOptionsTypes, getTemplateOptionsMapper),\n\t\t...createFetchReducer(editStoryTemplateTypes, editStoryTemplateMapper),\n\t\t...createFetchReducer(\n\t\t\tcreateStoryTemplateTypes,\n\t\t\tcreateStoryTemplateMapper,\n\t\t\tcreateStoryErrorMapper,\n\t\t),\n\t\t...createFetchReducer(filterTemplatesTypes, filterTemplatesMapper),\n\t},\n});\n\nexport default storyTemplate.reducer;\n","export const CreatedTemplateErrorMessage =\n\t'A template with this name has already been created.';\n","/* eslint-disable @typescript-eslint/camelcase */\nimport { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport {\n\tBBAuthTypes,\n\tBBRefreshTypes,\n\tBBListTypes,\n\tBBCampaignTypes,\n\tBBFundTypes,\n\tBBAppealTypes,\n\tBBMSAccountTypes,\n\tBBPublicKeyTypes,\n\tGetConstituentOfListsTypes,\n} from './action';\n\nconst initialState: GenericEntityState = {\n\tloading: true,\n\tblackbaudToggle: false,\n\tinsufficientData: false,\n\tblackbaudIntegrationRefresh: {\n\t\ttype: 'integration',\n\t\taccess_token: '',\n\t\trefresh_token: '',\n\t\trefresh_token_expires_in: '',\n\t\tenvironment_id: '',\n\t},\n\tblackbaudGatewayRefresh: {\n\t\ttype: 'gateway',\n\t\taccess_token: '',\n\t\trefresh_token: '',\n\t\trefresh_token_expires_in: '',\n\t\tenvironment_id: '',\n\t},\n\tblackbaudIntegrationAuth: {\n\t\ttype: 'integration',\n\t\taccess_token: '',\n\t\trefresh_token: '',\n\t\trefresh_token_expires_in: '',\n\t\tenvironment_id: '',\n\t},\n\tblackbaudGatewayAuth: {\n\t\ttype: 'gateway',\n\t\taccess_token: '',\n\t\trefresh_token: '',\n\t\trefresh_token_expires_in: '',\n\t\tenvironment_id: '',\n\t},\n\tblackbaudListConstituents: [''],\n\tbbLists: [''],\n\tbbAppeals: new Array(0),\n\tbbFunds: new Array(0),\n\tbbCampaign: new Array(0),\n\tbbmsAccount: [],\n\tbbPublicKey: '',\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\terror: {},\n};\n\nexport type blackbaudStateType = typeof initialState & GenericEntityState;\n\nfunction blackbaudAuthMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse,\n\t\tpayload: { type },\n\t} = action;\n\tif (type === 'blackbaud') {\n\t\tstate.blackbaudIntegrationAuth = { type, ...response };\n\t} else {\n\t\tstate.blackbaudGatewayAuth = { type, ...response };\n\t}\n}\n\nfunction blackbaudRefreshMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse,\n\t\tpayload: { type },\n\t} = action;\n\tif (type === 'blackbaud') {\n\t\tstate.blackbaudIntegrationRefresh = response;\n\t} else {\n\t\tstate.blackbaudGatewayRefresh = response;\n\t}\n}\n\nfunction blackbaudListMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response && response.count) {\n\t\tstate.bbLists = response.value;\n\t}\n}\n\nfunction blackbaudCampaignMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response) {\n\t\tif (response.count) {\n\t\t\tconst { value } = response;\n\t\t\tconst arr: any = [];\n\t\t\tvalue.map((item: any) => {\n\t\t\t\tconst endDate = new Date(item.end_date).getTime();\n\t\t\t\tconst todayDate = Date.now();\n\t\t\t\tif (item.end_date && endDate >= todayDate) {\n\t\t\t\t\tarr.push(item);\n\t\t\t\t}\n\t\t\t});\n\t\t\tstate.bbCampaign = arr;\n\t\t\tif (!arr.length) {\n\t\t\t\tstate.insufficientData = true;\n\t\t\t}\n\t\t} else {\n\t\t\tstate.insufficientData = true;\n\t\t}\n\t}\n}\n\nfunction blackbaudAppealMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response?.count) {\n\t\tconst { value } = response;\n\t\tconst arr: any = [];\n\t\tvalue.map((item: any) => {\n\t\t\tconst endDate = new Date(item.end_date).getTime();\n\t\t\tconst todayDate = Date.now();\n\t\t\tif (item.end_date) {\n\t\t\t\tif (endDate >= todayDate) {\n\t\t\t\t\tarr.push(item);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tstate.bbAppeals = arr;\n\t\tif (!arr.length) {\n\t\t\tstate.insufficientData = true;\n\t\t}\n\t} else {\n\t\tstate.insufficientData = true;\n\t}\n}\n\nfunction blackbaudFundMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response) {\n\t\tif (response.count) {\n\t\t\tconst { value } = response;\n\t\t\tstate.bbFunds = value;\n\t\t\tif (!value.length) {\n\t\t\t\tstate.insufficientData = true;\n\t\t\t}\n\t\t} else {\n\t\t\tstate.insufficientData = true;\n\t\t}\n\t}\n}\n\nfunction blackbaudBBMSMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response.count) {\n\t\tstate.bbmsAccount = response.value;\n\t}\n}\n\nfunction blackbaudPublicKeyMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tif (response.public_key) {\n\t\tstate.bbPublicKey = response.public_key;\n\t}\n}\n\nfunction getConstituentsMapper(\n\tstate: blackbaudStateType,\n\taction: ResponseAction,\n) {\n\tconst { response, payload } = action;\n\tif (response && response.count) {\n\t\tif (payload && payload[0] && payload.length) {\n\t\t\tconst arr = payload;\n\t\t\tstate.blackbaudListConstituents = [...arr, ...response.value];\n\t\t} else {\n\t\t\tstate.blackbaudListConstituents = response.value;\n\t\t}\n\t}\n}\n\nconst BBAuthSlice = createSlice({\n\tname: 'BBAuth',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(BBAuthTypes, blackbaudAuthMapper),\n\t\t...createFetchReducer(BBRefreshTypes, blackbaudRefreshMapper),\n\t\t...createFetchReducer(BBListTypes, blackbaudListMapper),\n\t\t...createFetchReducer(BBCampaignTypes, blackbaudCampaignMapper),\n\t\t...createFetchReducer(BBAppealTypes, blackbaudAppealMapper),\n\t\t...createFetchReducer(BBFundTypes, blackbaudFundMapper),\n\t\t...createFetchReducer(BBMSAccountTypes, blackbaudBBMSMapper),\n\t\t...createFetchReducer(BBPublicKeyTypes, blackbaudPublicKeyMapper),\n\t\t...createFetchReducer(GetConstituentOfListsTypes, getConstituentsMapper),\n\t},\n});\n\nexport default BBAuthSlice.reducer;\n","import { createSlice, PayloadAction, Action } from '@reduxjs/toolkit';\nimport { GenericEntityState, fetchAction, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { schema, normalize } from 'normalizr';\nimport { filterSharedVideoTypes } from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\n\nconst sharedVideo = entityNormalizer(\n\t'sharedVideos',\n\t{},\n\t{ idAttribute: '_id' },\n);\nconst pagination = { sharedVideos: [sharedVideo] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tsharedVideos: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n};\n\nexport type sharedVideosStateType = typeof initialState;\n\nfunction paginationMapper(\n\tstate: sharedVideosStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tsharedVideos,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\n\tconst { infinite } = action.payload;\n\n\tconst normalizedData = normalize(\n\t\t{ sharedVideos, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\n\tif (infinite) {\n\t\tstate.sharedVideos = {\n\t\t\t...state.sharedVideos,\n\t\t\t...normalizedData.entities.sharedVideos,\n\t\t};\n\t}\n\n\tif (!infinite) {\n\t\tstate.sharedVideos = {\n\t\t\t...normalizedData.entities.sharedVideos,\n\t\t};\n\t}\n\n\tstate.pagination.pages[action.response.page] =\n\t\tnormalizedData.result.sharedVideos;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nconst sharedVideoSlice = createSlice({\n\tname: 'sharedVideo',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(filterSharedVideoTypes, paginationMapper),\n\t},\n});\n\nexport default sharedVideoSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport {\n\tfilterTagsTypes,\n\tupdateTagsTypes,\n\tdeleteTagsTypes,\n\tgetTagOptionsTypes,\n\tcreateTagsTypes,\n\tcreateContactTagsTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport ObjectToOptions from '../../utils/ObjectToOptions';\nimport { OptionsType } from '../../../common/components/interaction/DropdownInput/types';\nimport { updateContactTagTypes } from '../contact/constants';\n\nconst tag = entityNormalizer('tags');\nconst pagination = { tags: [tag] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\ttags: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\ttagOptions: [],\n\tcustom: {},\n};\n\nexport type tagsStateType = typeof initialState;\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\ttags,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ tags, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction optionsMapper(state: tagsStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tconst tagCopy = ObjectToOptions(normalizedData?.entities?.tags, 'id', 'text');\n\ttagCopy?.unshift({\n\t\tlabel: 'All',\n\t\tvalue: '',\n\t});\n\tstate.tagOptions = tagCopy?.length > 1 ? tagCopy : [];\n}\nfunction paginationMapper(state: tagsStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tstate.tags = {\n\t\t...normalizedData.entities.tags,\n\t};\n\tstate.pagination.pages[action.response.page] = normalizedData.result.tags;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nconst updateTagsMapper = (state: tagsStateType, action: ResponseAction) => {\n\tconst { payload } = action;\n\tconst auxTag = state.tags[payload.tagId];\n\tconst result = {\n\t\t...state.tags,\n\t\t[payload.tagId]: {\n\t\t\t...auxTag,\n\t\t\ttext: payload.text,\n\t\t},\n\t};\n\n\tstate.tags = result;\n};\n\nconst deleteTagsMapper = (state: tagsStateType, action: ResponseAction) => {\n\tconst { payload } = action;\n\tconst auxTag = state.tags[payload.tagId];\n\tconst result = {\n\t\t...state.tags,\n\t\t[payload.tagId]: {\n\t\t\t...auxTag,\n\t\t\tdeleted: true,\n\t\t},\n\t};\n\tstate.tags = result;\n};\n\nconst createContactTagsMapper = (\n\tstate: tagsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tconst newTags = response.contactsUpdated[0].tags.reduce(\n\t\t(tags: OptionsType[], item: any) => {\n\t\t\tif (response.tagsAdded.includes(item.id)) {\n\t\t\t\ttags.push({ label: item.text, value: item.id });\n\t\t\t}\n\t\t\treturn tags;\n\t\t},\n\t\t[],\n\t);\n\tstate.tagOptions = state.tagOptions.concat(newTags);\n};\n\nfunction updateContactTagMapper(state: tagsStateType, action: ResponseAction) {\n\tconst { response } = action;\n\n\tconst newTag = response.tag;\n\n\tstate.tags[newTag.id] = newTag;\n}\n\nconst tagSlice = createSlice({\n\tname: 'tag',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(filterTagsTypes, paginationMapper),\n\t\t...createFetchReducer(updateTagsTypes, updateTagsMapper),\n\t\t...createFetchReducer(deleteTagsTypes, deleteTagsMapper),\n\t\t...createFetchReducer(createContactTagsTypes, createContactTagsMapper),\n\t\t...createFetchReducer(getTagOptionsTypes, optionsMapper),\n\t\t...createFetchReducer(createTagsTypes),\n\t\t[updateContactTagTypes[1]]: updateContactTagMapper,\n\t},\n});\n\nexport default tagSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize } from 'normalizr';\nimport { filterTransactionTypes, exportTransactionTypes } from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport fileDownload from 'js-file-download';\nconst transaction = entityNormalizer('transactions');\nconst pagination = { transactions: [transaction] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: false,\n\ttransactions: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n};\n\nexport type transactionsStateType = typeof initialState;\n\nfunction paginationMapper(\n\tstate: transactionsStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\ttransactions,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ transactions, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\n\tstate.transactions = {\n\t\t...state.transactions,\n\t\t...normalizedData.entities.transactions,\n\t};\n\tstate.pagination.pages[action.response.page] =\n\t\tnormalizedData.result.transactions;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nexport const exportTransactionsSuccessMapper = (\n\tstate: transactionsStateType,\n\taction: ResponseAction,\n) => {\n\tconst { response } = action;\n\tfileDownload(response, 'transactions.csv');\n\tstate.type = action.type;\n};\n\nconst transactionSlice = createSlice({\n\tname: 'transaction',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(filterTransactionTypes, paginationMapper),\n\t\t...createFetchReducer(\n\t\t\texportTransactionTypes,\n\t\t\texportTransactionsSuccessMapper,\n\t\t),\n\t},\n});\n\nexport default transactionSlice.reducer;\n","import { schema } from 'normalizr';\n\nexport const customAttributesSchema = new schema.Entity(\n\t'customAttributes',\n\t{},\n\t{\n\t\tidAttribute: 'name',\n\t\tprocessStrategy(value) {\n\t\t\tconst newObj = { ...value };\n\n\t\t\treturn newObj;\n\t\t},\n\t},\n);\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { normalize, schema } from 'normalizr';\nimport {\n\tgetWorkspaceByEmailTypes,\n\tupdateWorkspaceGatewayTypes,\n\tWorkspaceInfoTypes,\n\tupdateWorkspaceIntegrationTypes,\n\tdisconnectWorkspaceIntegrationTypes,\n\tupdateWorkspaceTypes,\n\tDisconnectBlackbaudGatewayTypes,\n\tuploadLogoTypes,\n\tverifyWorkspaceDomainDataTypes,\n\tverifyDomainTypes,\n\tupdateWithLogoAndBackgroundtypes,\n\tzapierKeyTypes,\n\tsetZapierIntegrationTypes,\n\tdisconnectHotglueIntegrationTypes,\n\tupdateCustomAttributesTypes,\n\tupdateHotglueCommunicationPreferenceTypes,\n\tupdateHotglueSyncingScheduleTypes,\n\tconnectHotglueFlowTypes,\n\tgetSendDataOutTargetFieldsTypes,\n} from './action';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { customAttributesSchema } from './schemas';\nimport { deleteAutomationTypes } from '../automations/action';\n\nconst workspace = entityNormalizer('workspaces');\nconst pagination = { workspaces: [workspace] };\n\n// add pagination shouldCallAPI only when the filterObject string is equals to the currentFilter (store currentfilter on each api call )\nconst initialState: GenericEntityState = {\n\tloading: true,\n\tworkspaces: {},\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t},\n\tdomainData: {},\n\tzapierKey: '',\n\tworkspaceInfo: {},\n\tfirstLogin: false,\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n};\n\nexport type workspaceStateType = typeof initialState;\n\nfunction paginationMapper(state: workspaceStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { workspaces, page = null, pageSize = null, firstLogin },\n\t} = action;\n\tconst normalizedData = normalize({ workspaces, page, pageSize }, pagination);\n\n\tstate.workspaces = {\n\t\t...state.workspaces,\n\t\t...normalizedData.entities.workspaces,\n\t};\n\tstate.firstLogin = firstLogin || false;\n\t// state.pagination.pages[action.response.page] = normalizedData.result;\n\t// state.pagination.currentPage = action.response.page;\n}\n\nfunction zapierGatewayMapper(state: any, action: ResponseAction) {\n\tconst { response } = action;\n\tif (response && response.status == 200) {\n\t\tstate.zapierKey = response.workspace.integrationId;\n\t}\n}\n\nfunction workspaceInfoMapper(\n\tstate: workspaceStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\n\tstate.workspaceInfo = response.workspace;\n\n\tconst workspaceCustomAttributes = response.workspace.customAttributes;\n\n\tif (workspaceCustomAttributes?.length) {\n\t\tconst customAttributeSchema = new schema.Array(customAttributesSchema);\n\n\t\tconst normalizedCustomAttributes = normalize(\n\t\t\tworkspaceCustomAttributes,\n\t\t\tcustomAttributeSchema,\n\t\t);\n\n\t\tstate.normalizedCustomAttributes =\n\t\t\tnormalizedCustomAttributes.entities.customAttributes || {};\n\t}\n\n\tconst hasBlackbaudIntegration = response.workspace.integrations.findIndex(\n\t\t(integration: { [key: string]: any }) =>\n\t\t\t/blackbaud/i.test(integration.integrationName) &&\n\t\t\tintegration.integrationOn,\n\t);\n\tconst hasSalesforceIntegration = response.workspace.integrations.findIndex(\n\t\t(integration: { [key: string]: any }) =>\n\t\t\tintegration.integrationName === 'salesforce' && integration.integrationOn,\n\t);\n\tconst hasBlackbaudGateway = response.workspace.gateways.findIndex(\n\t\t(gateway: { [key: string]: any }) =>\n\t\t\t/blackbaud/i.test(gateway.name) && gateway.gatewayOn,\n\t);\n\n\tif (hasBlackbaudGateway > -1) {\n\t\tstate.workspaceInfo.hasBlackbaudGateway = true;\n\t} else {\n\t\tstate.workspaceInfo.hasBlackbaudGateway = false;\n\t}\n\tif (hasSalesforceIntegration > -1) {\n\t\tstate.workspaceInfo.hasSalesforceIntegration = true;\n\t} else {\n\t\tstate.workspaceInfo.hasSalesforceIntegration = false;\n\t}\n\tif (hasBlackbaudIntegration > -1) {\n\t\tstate.workspaceInfo.hasBlackbaudIntegration = true;\n\t} else {\n\t\tstate.workspaceInfo.hasBlackbaudIntegration = false;\n\t}\n}\n\nfunction uploadLogoMapper(state: workspaceStateType, action: ResponseAction) {\n\tconst { response } = action;\n\tstate.workspaceInfo.logo = response.workspace.logo;\n}\n\nfunction setDomainMapperSucess(\n\tstate: workspaceStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\n\tstate.workspaceInfo.domainVerified = response.domainVerified;\n}\n\nfunction verifySuccessMapper(\n\tstate: workspaceStateType,\n\taction: ResponseAction,\n) {\n\tconst { response } = action;\n\tObject.keys(state.domainData).map((domain) => {\n\t\tif (Object.keys(response.dnsRecords).includes(domain)) {\n\t\t\tstate.domainData[domain].valid = response.dnsRecords[domain].valid;\n\t\t}\n\t});\n}\n\nfunction updateCustomAttributesSuccess(\n\tstate: workspaceStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tworkspace: { customAttributes },\n\t\t},\n\t} = action;\n\tstate.workspaceInfo.customAttributes = [...customAttributes];\n}\n\nconst workspaceSlice = createSlice({\n\tname: 'workspace',\n\tinitialState,\n\treducers: {\n\t\tRESET_WORKSPACE(state: workspaceStateType) {\n\t\t\tstate.workspaceInfo = {};\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(getWorkspaceByEmailTypes, paginationMapper),\n\t\t...createFetchReducer(\n\t\t\tupdateWorkspaceGatewayTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(WorkspaceInfoTypes, workspaceInfoMapper),\n\t\t...createFetchReducer(connectHotglueFlowTypes, workspaceInfoMapper),\n\n\t\t...createFetchReducer(\n\t\t\tupdateWorkspaceIntegrationTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tupdateHotglueCommunicationPreferenceTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tupdateHotglueSyncingScheduleTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tdisconnectWorkspaceIntegrationTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(updateWorkspaceTypes, workspaceInfoMapper),\n\t\t...createFetchReducer(uploadLogoTypes, uploadLogoMapper),\n\t\t...createFetchReducer(\n\t\t\tupdateWithLogoAndBackgroundtypes,\n\t\t\tworkspaceInfoMapper,\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tDisconnectBlackbaudGatewayTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tverifyWorkspaceDomainDataTypes,\n\t\t\tsetDomainMapperSucess,\n\t\t),\n\t\t...createFetchReducer(verifyDomainTypes, verifySuccessMapper),\n\t\t...createFetchReducer(zapierKeyTypes, zapierGatewayMapper),\n\t\t...createFetchReducer(\n\t\t\tsetZapierIntegrationTypes,\n\t\t\t(state: workspaceStateType, action: ResponseAction) => {\n\t\t\t\tworkspaceInfoMapper(state, action);\n\t\t\t},\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tdisconnectHotglueIntegrationTypes,\n\t\t\tworkspaceInfoMapper,\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tupdateCustomAttributesTypes,\n\t\t\tupdateCustomAttributesSuccess,\n\t\t),\n\t\t...createFetchReducer(getSendDataOutTargetFieldsTypes),\n\t\t[deleteAutomationTypes[1]](state) {\n\t\t\tif (state?.custom?.disconnectHotglueResponse) {\n\t\t\t\tstate.custom.disconnectHotglueResponse = null;\n\t\t\t}\n\t\t},\n\t},\n});\n\nexport default workspaceSlice.reducer;\nexport const WorkspaceActions = workspaceSlice.actions;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction, clientAction } from '../types';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { grantAccessTypes, verifyTypes } from './action';\nimport TokenStorage from '../../utils/TokenStorage';\nimport { authWorkspaceLoginTypes } from '../onboarding/actions';\nimport authConfig from '../../authConfig';\n\nconst initialState: GenericEntityState = {\n\tloading: true,\n\tidentityToken: null,\n\taccessToken: null,\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n};\n\nexport type AuthState = typeof initialState;\n\nfunction storeIdentity(state: AuthState, action: ResponseAction) {\n\tconst {\n\t\tresponse: { identityToken, storyteller },\n\t} = action;\n\tTokenStorage.setIdentity(identityToken);\n\tstate.identityToken = identityToken;\n\tstate.user = storyteller;\n\tif (action.payload?.reload && !!identityToken) {\n\t\twindow.location.reload();\n\t}\n}\n\nconst authSlice = createSlice({\n\tname: 'auth',\n\tinitialState,\n\treducers: {\n\t\tSET_AUTH_CLIENT(state: AuthState, action: clientAction) {\n\t\t\tstate.authClient = action.client;\n\t\t},\n\t\tCLEAR_AUTH(state: AuthState, action: clientAction) {\n\t\t\t// state = initialState;\n\t\t\ttry {\n\t\t\t\tstate?.authClient?.logout({ returnTo: authConfig.logoutUrl });\n\t\t\t} catch (e) {}\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(grantAccessTypes, storeIdentity),\n\t\t...createFetchReducer(verifyTypes),\n\t\t...createFetchReducer(authWorkspaceLoginTypes, storeIdentity),\n\t},\n});\n\nexport default authSlice.reducer;\n\nexport const { CLEAR_AUTH } = authSlice.actions;\n","import { createSlice } from '@reduxjs/toolkit';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport { sendStorytellersTypes } from './actions';\nimport { initialState } from './constants';\n\nconst onboardingSlice = createSlice({\n\tname: 'onboarding',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(sendStorytellersTypes),\n\t\t// ...createFetchReducer(\n\t\t// authWorkspaceLoginTypes,\n\t\t// workspaceAndLoginSuccessMapper\n\t\t// ),\n\t},\n});\n\nexport default onboardingSlice.reducer;\n","import { normalize } from 'normalizr';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport ObjectToOptions from '../../utils/ObjectToOptions';\n\nimport { GenericEntityState, ResponseAction } from '../types';\n\nimport {\n\tsaveAudienceTypes,\n\tgetAudienceTypes,\n\tupdateAudienceTypes,\n\tdeleteAudienceTypes,\n\tgetAudienceOptionsTypes,\n\tgetAudienceByIdTypes,\n} from './action';\n\nconst audienceType = entityNormalizer('audience');\nexport const pagination = { audience: [audienceType] };\n\nconst initialState: GenericEntityState = {\n\tloading: true,\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\taudience: {},\n\taudienceCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t\tcount: null,\n\t},\n\taudienceBuildingCount: null,\n\taudienceOptions: [],\n\tcustom: {},\n};\n\nexport type audienceStateType = typeof initialState;\n\nexport const paginationSuccessMapper = function paginationMapper(\n\tstate: audienceStateType,\n\taction: ResponseAction,\n): void {\n\tconst {\n\t\tresponse: {\n\t\t\taudience,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ audience, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\tstate.audience = { ...state.audience, ...normalizedData.entities.audience };\n\tstate.audienceCount = Object.keys(state.audience)?.length;\n\tstate.pagination.pages[action.response.page] = normalizedData.result.audience;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n};\n\nfunction updateMapperSuccess(state: audienceStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\taudience: { id, _id },\n\t\t\taudience,\n\t\t},\n\t} = action;\n\tconst audienceId = id || _id;\n\tstate.audience[audienceId] = audience;\n}\n\nfunction deleteMapperSuccess(state: audienceStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { audienceId },\n\t} = action;\n\tconst audienceCopy = { ...state.audience };\n\tconst { [audienceId]: deletedAudienceId, ...restOfAudience } = audienceCopy;\n\tstate.audience = restOfAudience;\n}\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\taudience,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ audience, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction optionsMapper(state: audienceStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\tconst audienceCopy = ObjectToOptions(\n\t\tnormalizedData?.entities?.audience,\n\t\t'id',\n\t\t'name',\n\t);\n\taudienceCopy?.unshift({\n\t\tvalue: '',\n\t\tlabel: 'All',\n\t});\n\tstate.audienceOptions = audienceCopy?.length > 1 ? audienceCopy : [];\n}\n\nfunction saveAudienceMapper(state: audienceStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { audience },\n\t} = action;\n\tstate.audience = { [audience?._id]: audience, ...state.audience };\n}\n\nconst audienceSlice = createSlice({\n\tname: 'audience',\n\tinitialState,\n\treducers: {\n\t\tSET_AUDIENCE_BUILDING_COUNT(\n\t\t\tstate: audienceStateType,\n\t\t\taction: { payload: number },\n\t\t) {\n\t\t\tstate.audienceBuildingCount = action.payload;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(saveAudienceTypes, saveAudienceMapper),\n\t\t...createFetchReducer(getAudienceTypes, paginationSuccessMapper),\n\t\t...createFetchReducer(updateAudienceTypes, updateMapperSuccess),\n\t\t...createFetchReducer(deleteAudienceTypes, deleteMapperSuccess),\n\t\t...createFetchReducer(getAudienceOptionsTypes, optionsMapper),\n\t\t...createFetchReducer(getAudienceByIdTypes),\n\t},\n});\n\nexport default audienceSlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { normalize } from 'normalizr';\n\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport {\n\tcreateAutomationTypes,\n\tdeleteAutomationTypes,\n\teditAutomationTypes,\n\tgetAutomationsTypes,\n\tgetSingleAutomationTypes,\n} from './action';\n\nconst initialState: GenericEntityState = {\n\tloading: false,\n\tautomations: {},\n\tautomationsCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\terror: {},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tcustom: {},\n};\n\nexport type automationsStateType = typeof initialState;\nconst automation = entityNormalizer('automations');\nconst pagination = { automations: [automation] };\n\nfunction normalizeResponse(action: ResponseAction) {\n\tconst {\n\t\tresponse: {\n\t\t\tautomations,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ automations, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\treturn normalizedData;\n}\n\nfunction paginationMapper(state: automationsStateType, action: ResponseAction) {\n\tconst normalizedData = normalizeResponse(action);\n\n\tif (action.response.page === 1) {\n\t\tstate.automations = normalizedData.entities.automations;\n\t} else {\n\t\tstate.automations = {\n\t\t\t...state.automations,\n\t\t\t...normalizedData.entities.automations,\n\t\t};\n\t}\n\tstate.automationsCount = Object.keys(state.automations || {})?.length;\n\tstate.pagination.pages[action.response.page] =\n\t\tnormalizedData.result.automations;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n}\n\nfunction createAutomationMapper(\n\tstate: automationsStateType,\n\taction: ResponseAction,\n) {\n\tconst { automation } = action.response;\n\n\tconst newAutomation = { [automation._id]: automation };\n\n\tstate.automations = { ...newAutomation, ...state.automations };\n}\n\nfunction updateMapperSuccess(\n\tstate: automationsStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tautomation: { id, _id },\n\t\t\tautomation,\n\t\t},\n\t} = action;\n\tconst automationId = id || _id;\n\tstate.automations[automationId] = automation;\n}\n\nfunction deleteMapperSuccess(\n\tstate: automationsStateType,\n\taction: ResponseAction,\n) {\n\tconst {\n\t\tresponse: { automationId },\n\t} = action;\n\tconst automationsCopy = { ...state.automations };\n\tconst { [automationId]: deletedAutomation, ...restOfAutomations } =\n\t\tautomationsCopy;\n\tstate.automations = restOfAutomations;\n}\n\nconst automationSlice = createSlice({\n\tname: 'automation',\n\tinitialState,\n\treducers: {},\n\textraReducers: {\n\t\t...createFetchReducer(getSingleAutomationTypes),\n\t\t...createFetchReducer(getAutomationsTypes, paginationMapper),\n\t\t...createFetchReducer(createAutomationTypes, createAutomationMapper),\n\t\t...createFetchReducer(editAutomationTypes, updateMapperSuccess),\n\t\t...createFetchReducer(deleteAutomationTypes, deleteMapperSuccess),\n\t},\n});\n\nexport default automationSlice.reducer;\n","import {\n\tconfigureStore,\n\tgetDefaultMiddleware,\n\tcombineReducers,\n} from '@reduxjs/toolkit';\n\nimport contact from './contact';\nimport campaign from './campaign';\nimport recipe from './recipe';\nimport cta from './cta';\nimport story from './stories';\nimport approval from './approval';\nimport assigned from './assigned';\nimport reply from './reply';\nimport scheduled from './scheduled';\nimport sent from './sent';\nimport storyteller from './storyteller';\nimport storyTemplate from './storyTemplate';\nimport blackbaud from './blackbaud';\nimport sharedVideo from './sharedVideo';\nimport video from './video';\nimport tag from './tag';\nimport transaction from './transaction';\nimport workspace from './workspace';\nimport auth from './auth';\nimport onboarding from './onboarding';\nimport audience from './audience';\nimport automation from './automations';\nimport fetchMiddleware from './fetch-middleware';\nimport { useAppDispatch } from './types';\n\nexport const storeReducers = combineReducers({\n\tauth,\n\tcontact,\n\tcampaign,\n\trecipe,\n\tcta,\n\tstory,\n\tapproval,\n\tassigned,\n\treply,\n\tscheduled,\n\tsent,\n\tstoryteller,\n\tstoryTemplate,\n\tworkspace,\n\tblackbaud,\n\tsharedVideo,\n\tvideo,\n\ttag,\n\ttransaction,\n\tonboarding,\n\taudience,\n\tautomation,\n});\n// const customizedMiddleware = getDefaultMiddleware({\n// \tserializableCheck: false,\n// \timmutableCheck: false\n// });\n\nconst CLEAR_ALL_EXCEPT_AUTH = 'CLEAR_ALL_EXCEPT_AUTH';\n\nconst rootReducer = (state: any, action: any) => {\n\tif (action.type === CLEAR_ALL_EXCEPT_AUTH) {\n\t\tconst copyAuthState = state.auth;\n\t\tstate = {};\n\t\tstate.auth = copyAuthState;\n\t}\n\treturn storeReducers(state, action);\n};\n\nconst store = configureStore({\n\treducer: rootReducer,\n\tmiddleware: [\n\t\t...getDefaultMiddleware({\n\t\t\tserializableCheck: false,\n\t\t\timmutableCheck: false,\n\t\t}),\n\t\tfetchMiddleware,\n\t],\n});\n\nexport default store;\nexport { useAppDispatch };\n\nexport const clearAllExceptAuth = () => {\n\treturn {\n\t\ttype: CLEAR_ALL_EXCEPT_AUTH,\n\t};\n};\n","import { MiddlewareAPI, Action } from '@reduxjs/toolkit';\nimport { Dispatch } from 'react';\nimport { fetchAction } from './types';\n\nfunction fetchMiddleware({ dispatch }: MiddlewareAPI) {\n\treturn (next: Dispatch) => async (action: fetchAction) => {\n\t\tconst {\n\t\t\ttype,\n\t\t\tcallAPI,\n\t\t\tcallFetch,\n\t\t\tshouldCallAPI = () => true,\n\t\t\tpayload = {},\n\t\t} = action;\n\n\t\tif (!type || !Array.isArray(type)) {\n\t\t\t// Normal action: pass it on\n\t\t\treturn next(action);\n\t\t}\n\n\t\t// if (\n\t\t// !Array.isArray(type) ||\n\t\t// type.length !== 3 ||\n\t\t// !type.every(type => typeof type === 'string')\n\t\t// ) {\n\t\t//\n\t\t// throw new Error('Expected an array of three string type.')\n\t\t// }\n\n\t\tif (Array.isArray(type) && type.length === 3) {\n\t\t\tif (typeof callAPI !== 'function' && !callFetch()) {\n\t\t\t\tthrow new Error('Expected callAPI to be a function.');\n\t\t\t}\n\n\t\t\tif (!shouldCallAPI()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [requestType, successType, failureType] = type;\n\t\t\tdispatch({\n\t\t\t\ttype: requestType,\n\t\t\t\tpayload,\n\t\t\t});\n\n\t\t\ttry {\n\t\t\t\tconst { data: response } = await callAPI();\n\t\t\t\tdispatch({\n\t\t\t\t\ttype: successType,\n\t\t\t\t\tpayload,\n\t\t\t\t\tresponse,\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tdispatch({\n\t\t\t\t\ttype: failureType,\n\t\t\t\t\tpayload,\n\t\t\t\t\terror,\n\t\t\t\t});\n\t\t\t\tif (error.statusCode === 401) {\n\t\t\t\t\tlocation.reload();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\nexport default fetchMiddleware;\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport {\n\tEditStoryOptionsTypes,\n\tCreateStoryOptionsTypes,\n\tSendStoryOptionsTypes,\n} from './types/index';\nimport axios from '../../../global/axios';\nimport { CaptionType } from '../../../common/components/interaction/CaptionEditor/types';\n\nconst mainType = 'STORY';\n\nexport const filterStoriesTypes = createFetchTypes(\n\t`${mainType}_FILTER_STORIES`,\n);\n\nexport const filterStoriesWithInfiniteTypes = createFetchTypes(\n\t`${mainType}_FILTER_STORIES_WITH_INFINITE`,\n);\n\nexport const exportStoriesTypes = createFetchTypes(\n\t`${mainType}_EXPORT_STORIES`,\n);\n\nexport const getApprovalsTypes = createFetchTypes(`${mainType}_GET_APPROVALS`);\n\nexport const editStoriesTypes = createFetchTypes(`${mainType}_EDIT_STORIES`);\n\nexport const createStoriesTypes = createFetchTypes(\n\t`${mainType}_CREATE_STORIES`,\n);\nexport const sendStoriesTypes = createFetchTypes(`${mainType}_SEND_STORIES`);\n\nexport const approvalCountTypes = createFetchTypes(\n\t`${mainType}_GET_APPROVAL_COUNT`,\n);\nexport const bulkApproveTypes = createFetchTypes(`${mainType}_BULK_APPROVE`);\nexport const bulkDeleteTypes = createFetchTypes(`${mainType}_BULK_DELETE`);\nexport const bulkRejectTypes = createFetchTypes(`${mainType}_BULK_REJECT`);\nexport const getSingleStoryTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_STORY`,\n);\nexport const getStoriesCountTypes = createFetchTypes(\n\t`${mainType}_GET_STORIES_COUNT`,\n);\n\n// leaves\nfunction exportStories(filterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(filterOptions);\n\n\treturn {\n\t\ttype: exportStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios({\n\t\t\t\turl: `${apiUrl}/stories/export${\n\t\t\t\t\tfilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t\tmethod: 'GET',\n\t\t\t\tresponseType: 'blob',\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'exportStories',\n\t\t},\n\t};\n}\n\n//stays\nfunction filterStories(\n\tFilterOptions: FilterOptions,\n\tinfinite = false,\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\n\treturn {\n\t\ttype: infinite ? filterStoriesWithInfiniteTypes : filterStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\n//stays\nfunction getSingleStory(storyId: string) {\n\treturn {\n\t\ttype: getSingleStoryTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/stories/${storyId}`),\n\t};\n}\n\n//stays\n// ### get approvals here , we can clean this and not pass an object, just pagination to it , as filters are fixed\nfunction getApprovals(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify({\n\t\t...FilterOptions,\n\t\tfilter: [\n\t\t\t{ field: 'status', value: 'pendingApproval' },\n\t\t\t...FilterOptions.filter,\n\t\t],\n\t});\n\n\treturn {\n\t\ttype: getApprovalsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/stories${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction editStories(EditOptions: EditStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: editStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/edit`, {\n\t\t\t\t...EditOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'editStories',\n\t\t\tsuccessMessage: ToastMessage.editedAssignedStory,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction createStory(CreateOptions: CreateStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: createStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/stories`, {\n\t\t\t\t...CreateOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.assignedStoryCreated,\n\t\t\terrorMessage: ToastMessage.errorAssigningStory,\n\t\t},\n\t};\n}\nfunction sendStory(SendOptions: SendStoryOptionsTypes): fetchAction {\n\treturn {\n\t\ttype: sendStoriesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/stories`, {\n\t\t\t\t...SendOptions,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.storySent,\n\t\t\terrorMessage: ToastMessage.errorSendingStory,\n\t\t},\n\t};\n}\n\nfunction getApprovalCount() {\n\treturn {\n\t\ttype: approvalCountTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/stories/approvalCount`),\n\t\tpayload: { custom: 'approvalCount' },\n\t};\n}\n\nfunction clearStoryError() {\n\treturn {\n\t\ttype: `${mainType}_CLEAR_ERROR`,\n\t\tpayload: {},\n\t};\n}\n\nexport const clearStoriesType = `story/CLEAR_STORIES`;\n\nfunction clearStories() {\n\treturn {\n\t\ttype: clearStoriesType,\n\t};\n}\n\nexport const clearResponseType = `story/CLEAR_RESPONSE`;\nfunction clearResponse() {\n\treturn {\n\t\ttype: clearResponseType,\n\t};\n}\n\nfunction bulkApprove(stories: string[]) {\n\treturn {\n\t\ttype: bulkApproveTypes,\n\t\tcallAPI: () => axios.patch(`${apiUrl}/stories/bulk/approval`, { stories }),\n\t\tpayload: { custom: 'bulkApprove' },\n\t};\n}\n\nfunction bulkDelete(storiesId: string[]) {\n\treturn {\n\t\ttype: bulkDeleteTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/stories/bulk`, { data: { storiesId } }),\n\t\tpayload: {\n\t\t\tcustom: 'bulkDelete',\n\t\t\tsuccessMessage: ToastMessage.success,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction bulkReject(stories: string[], rejectionReason: string) {\n\treturn {\n\t\ttype: bulkRejectTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/stories/bulk/reject`, {\n\t\t\t\tstories,\n\t\t\t\trejectionReason,\n\t\t\t}),\n\t\tpayload: { custom: 'bulkReject' },\n\t};\n}\n\nexport const updateApprovalVideoCaptionsTypes = `story/UPDATE_APPROVAL_VIDEO_CAPTIONS`;\n\nfunction updateApprovalVideoCaptions(\n\tapprovalVideoId: string,\n\tcaptions: CaptionType[],\n) {\n\treturn {\n\t\ttype: updateApprovalVideoCaptionsTypes,\n\t\tpayload: {\n\t\t\tapprovalVideoId,\n\t\t\tcaptions,\n\t\t},\n\t};\n}\nexport const updateApprovalVideoFieldTypes = `story/UPDATE_APPROVAL_VIDEO_FIELD`;\n\nfunction updateApprovalVideoField(\n\tapprovalId: string,\n\tfield: string,\n\tvalue: any,\n) {\n\treturn {\n\t\ttype: updateApprovalVideoFieldTypes,\n\t\tpayload: {\n\t\t\tapprovalId,\n\t\t\tfield,\n\t\t\tvalue,\n\t\t},\n\t};\n}\n\nfunction getStoriesCount() {\n\treturn {\n\t\ttype: getStoriesCountTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/stories/storiesCount`),\n\t\tpayload: { custom: 'getStoriesCount' },\n\t};\n}\n\nexport {\n\tclearStoryError,\n\tfilterStories,\n\teditStories,\n\tcreateStory,\n\tgetApprovals,\n\tsendStory,\n\tgetApprovalCount,\n\texportStories,\n\tclearStories,\n\tbulkApprove,\n\tbulkDelete,\n\tbulkReject,\n\tclearResponse,\n\tgetSingleStory,\n\tupdateApprovalVideoCaptions,\n\tupdateApprovalVideoField,\n\tgetStoriesCount,\n};\n","export enum storyStatus {\n\tunassigned = 'unassigned',\n\tassigned = 'assigned',\n\tvideoCompleted = 'videoCompleted',\n\tpendingApproval = 'pendingApproval',\n\tsent = 'sent',\n\tsaved = 'saved',\n\tscheduled = 'scheduled',\n\tpendingSchedule = 'pendingSchedule',\n}\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants';\n\nimport axios from '../../../global/axios';\nimport { FilterOptions } from '../../types';\n\nconst mainType = 'storyTemplate';\n\nexport const getTemplateOptionsTypes = createFetchTypes(\n\t`${mainType}_FETCH_STORY_TEMPLATE_OPTIONS`,\n);\n\nexport const createStoryTemplateTypes = createFetchTypes(\n\t`${mainType}_CREATE_STORY_TEMPLATE`,\n);\n\nexport const editStoryTemplateTypes = createFetchTypes(\n\t`${mainType}_EDIT_STORY_TEMPLATE`,\n);\n\nexport const filterTemplatesTypes = createFetchTypes(\n\t`${mainType}_FETCH_STORY_TEMPLATE_OPTIONS`,\n);\n\nfunction filterTemplates(filter: FilterOptions) {\n\tconst filterString = JSON.stringify(filter);\n\treturn {\n\t\ttype: filterTemplatesTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/templates?filter=${filterString}`),\n\t\tpayload: {\n\t\t\tcustom: '',\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction getStoryTemplateOptions() {\n\tconst filter = JSON.stringify({\n\t\tpagination: {\n\t\t\tpage: 1,\n\t\t\tpageSize: 100,\n\t\t},\n\t});\n\treturn {\n\t\ttype: getTemplateOptionsTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/templates?filter=${filter}`),\n\t\tpayload: {\n\t\t\tcustom: '',\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction editStoryTemplate(id: string, params: FormData) {\n\treturn {\n\t\ttype: editStoryTemplateTypes,\n\t\tcallAPI: () => axios.put(`${apiUrl}/templates/${id}`, params),\n\t\tpayload: {\n\t\t\tcustom: 'editTemplate',\n\t\t\tsuccessMessage: ToastMessage.storyTemplateUpdated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nfunction createStoryTemplate(params: FormData) {\n\treturn {\n\t\ttype: createStoryTemplateTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/templates`, params),\n\t\tpayload: {\n\t\t\tcustom: 'createTemplate',\n\t\t\tsuccessMessage: ToastMessage.storyTemplateCreated,\n\t\t},\n\t};\n}\n\nfunction clearTemplates() {\n\treturn {\n\t\ttype: `${mainType}/CLEAR_TEMPLATES`,\n\t};\n}\n\nexport {\n\tgetStoryTemplateOptions,\n\teditStoryTemplate,\n\tcreateStoryTemplate,\n\tfilterTemplates,\n\tclearTemplates,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage, operators, orderTypes } from '../../constants';\n\nimport { fetchAction, GenericAPIResponse } from '../types';\nimport { FilterOptions } from '../../types/index';\nimport axios from '../../../global/axios';\nimport { importStoryteller } from './types';\nimport { StorytellerDropdownFilter } from '../constants';\nconst mainType = 'storyteller';\ntype storyteller = {\n\t[key: string]: any;\n};\n\ntype ResponseType = GenericAPIResponse & {\n\tStorytellers: storyteller[];\n};\n\nexport const importStorytellersTypes = createFetchTypes(`${mainType}_IMPORT`);\n\nexport const verifyStorytellerTypes = createFetchTypes(`${mainType}_VERIFY`);\nexport const resendStorytellerVerificationTypes = createFetchTypes(\n\t`${mainType}_RESEND`,\n);\n\nexport const getStorytellerOptionsTypes = createFetchTypes(\n\t`${mainType}_GET_OPTIONS`,\n);\n\nfunction getStorytellerOptions(): fetchAction {\n\treturn {\n\t\ttype: getStorytellerOptionsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/storytellers?filter=${JSON.stringify(\n\t\t\t\t\tStorytellerDropdownFilter,\n\t\t\t\t)}`,\n\t\t\t),\n\t};\n}\n\nfunction importStorytellers(data: importStoryteller): fetchAction {\n\treturn {\n\t\ttype: importStorytellersTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/storytellers/import`, data),\n\t\tpayload: {\n\t\t\tcustom: 'importStorytellers',\n\t\t},\n\t};\n}\n\nexport const exportStorytellersTypes = createFetchTypes(`${mainType}_EXPORT`);\n\nfunction exportStorytellers(filterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: exportStorytellersTypes,\n\t\tcallAPI: () =>\n\t\t\taxios({\n\t\t\t\turl: `${apiUrl}/storytellers/export${\n\t\t\t\t\tfilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t\tmethod: 'GET',\n\t\t\t\tresponseType: 'blob',\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'exportStorytellers',\n\t\t},\n\t};\n}\n\nexport const filterStorytellersTypes = createFetchTypes(`${mainType}_FILTER`);\n\nfunction filterStorytellers(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: filterStorytellersTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/storytellers${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t};\n}\n\nexport const filterStorytellerPendingInvitesTypes = createFetchTypes(\n\t`${mainType}_FILTER_PENDING_INVITES`,\n);\n\nfunction filterStorytellerPendingInvites(search?: string): fetchAction {\n\tconst filterObject = [\n\t\t{\n\t\t\tfield: 'lastLoginAt',\n\t\t\toperator: operators.exists,\n\t\t\tvalue: false,\n\t\t},\n\t\t{\n\t\t\tfield: 'role',\n\t\t\tvalue: 'recorder',\n\t\t},\n\t];\n\n\tconst paginationObject = {\n\t\tpage: 1,\n\t\tpageSize: 100,\n\t};\n\n\tconst orderObject = { field: 'createdAt', type: orderTypes.descending };\n\n\tconst searchObject = {\n\t\tfields: ['firstName', 'lastName'],\n\t\tvalue: search,\n\t};\n\n\tconst filterOptions = {\n\t\tpagination: paginationObject,\n\t\tfilter: filterObject,\n\t\torder: orderObject,\n\t\tsearch: searchObject,\n\t};\n\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: filterStorytellerPendingInvitesTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/storytellers?filter=${filterString}`),\n\t};\n}\n\nexport const filterAdminsTypes = createFetchTypes(`${mainType}_FILTER_ADMINS`);\n\nfunction filterAdmins(FilterOptions: FilterOptions): fetchAction {\n\tconst { filter } = FilterOptions;\n\n\tif (filter) {\n\t\tFilterOptions.filter.push({ field: 'role', value: 'admin' });\n\t} else {\n\t\tFilterOptions.filter = [{ field: 'role', value: 'admin' }];\n\t}\n\n\tconst filterString = JSON.stringify(FilterOptions);\n\n\treturn {\n\t\ttype: filterAdminsTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/storytellers?filter=${filterString}`),\n\t\tpayload: {\n\t\t\tcustom: 'admins',\n\t\t},\n\t};\n}\n\nexport const filterAdminPendingInvitesTypes = createFetchTypes(\n\t`${mainType}_FILTER_ADMINS_PENDING_INVITES`,\n);\n\nfunction filterAdminPendingInvites(search?: string): fetchAction {\n\tconst filterObject = [\n\t\t{\n\t\t\tfield: 'lastLoginAt',\n\t\t\toperator: operators.exists,\n\t\t\tvalue: false,\n\t\t},\n\t\t{\n\t\t\tfield: 'role',\n\t\t\tvalue: 'admin',\n\t\t},\n\t];\n\n\tconst searchObject = {\n\t\tfields: ['firstName', 'lastName'],\n\t\tvalue: search,\n\t};\n\n\tconst paginationObject = {\n\t\tpage: 1,\n\t\tpageSize: 100,\n\t};\n\n\tconst orderObject = { field: 'createdAt', type: orderTypes.descending };\n\n\tconst filterOptions = {\n\t\tpagination: paginationObject,\n\t\tfilter: filterObject,\n\t\torder: orderObject,\n\t\tsearch: searchObject,\n\t};\n\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: filterAdminPendingInvitesTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/storytellers?filter=${filterString}`),\n\t\tpayload: {\n\t\t\tcustom: 'admins',\n\t\t},\n\t};\n}\n\nexport const retrieveSavedAdminsTypes = createFetchTypes(\n\t`${mainType}_RETRIEVE_SAVED_ADMINS`,\n);\n\nfunction retrieveSavedAdmins(admins: string[]) {\n\tconst filter = {\n\t\tfilter: [\n\t\t\t{\n\t\t\t\tfield: '_id',\n\t\t\t\tvalue: admins,\n\t\t\t},\n\t\t],\n\t};\n\treturn {\n\t\ttype: filterStorytellersTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(`${apiUrl}/storytellers?filter=${JSON.stringify(filter)}`),\n\t\tpayload: {\n\t\t\tcustom: 'retrieveSavedAdmins',\n\t\t},\n\t};\n}\n\nexport const createStorytellerTypes = createFetchTypes(`${mainType}_CREATE`);\n\nfunction createStoryteller(\n\tdata: { [key: string]: any },\n\tcustom?: string,\n): fetchAction {\n\treturn {\n\t\ttype: createStorytellerTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/storytellers`, data),\n\t\tpayload: {\n\t\t\tcustom,\n\t\t\tsuccessMessage: ToastMessage.storytellerCreated,\n\t\t\terrorMessage: ToastMessage.errorCreatingStoryteller,\n\t\t},\n\t};\n}\n\nexport const updateStorytellerTypes = createFetchTypes(`${mainType}_UPDATE`);\n\nfunction updateStoryteller(data: { [key: string]: any }): fetchAction {\n\treturn {\n\t\ttype: updateStorytellerTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/storytellers`, { id: data.id, storyteller: data }),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.storytellerUpdated,\n\t\t\terrorMessage: ToastMessage.errorEditingStoryteller,\n\t\t},\n\t};\n}\n\nfunction verifyStoryteller(id: string): fetchAction {\n\treturn {\n\t\ttype: verifyStorytellerTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/storytellers/${id}/verifySender`),\n\t\tpayload: {\n\t\t\tcustom: 'verification',\n\t\t},\n\t};\n}\n\nfunction resendStorytellerVerification(id: string): fetchAction {\n\treturn {\n\t\ttype: resendStorytellerVerificationTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/storytellers/${id}/resendVerification`),\n\t\tpayload: {\n\t\t\tcustom: 'verification',\n\t\t},\n\t};\n}\n\nexport const resetStoryTellerType = `${mainType}/RESET`;\n\nexport function resetStoryteller() {\n\treturn {\n\t\ttype: resetStoryTellerType,\n\t};\n}\n\nexport const manuallyAddStoryteller = `${mainType}/MANUALLY_ADD_STORYTELLER`;\n\nexport function manualyAddStoryteller(storyteller: any) {\n\treturn {\n\t\ttype: manuallyAddStoryteller,\n\t\tpayload: storyteller,\n\t};\n}\n\nexport const sendSmsAppLinkTypes = createFetchTypes(\n\t`${mainType}_SEND_SMS_APPLINK`,\n);\n\nfunction sendSmsAppLink(payload: { number: string }): fetchAction {\n\treturn {\n\t\ttype: sendSmsAppLinkTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/storytellers/smsAppLinks`, payload),\n\t};\n}\n\nexport const uploadStorytellerProfilePictureType = createFetchTypes(\n\t`${mainType}_UPLOAD_PROFILE_PICTURE`,\n);\n\nfunction uploadStorytellerProfilePicture(profilePictureForm: FormData) {\n\treturn {\n\t\ttype: uploadStorytellerProfilePictureType,\n\t\tcallAPI: () =>\n\t\t\taxios.post(\n\t\t\t\t`${apiUrl}/storytellers/uploadProfilePicture`,\n\t\t\t\tprofilePictureForm,\n\t\t\t),\n\t};\n}\n\nexport const clearStorytellersType = 'storyteller/CLEAR_STORYTELLERS';\n\nfunction clearStorytellers() {\n\treturn {\n\t\ttype: clearStorytellersType,\n\t};\n}\n\nexport const bulkSoftDeleteStorytellersType = createFetchTypes(\n\t`${mainType}/DELETE_STORYTELLERS`,\n);\n\nfunction bulkSoftDeleteStorytellers(storytellerIds: string[]) {\n\treturn {\n\t\ttype: bulkSoftDeleteStorytellersType,\n\t\tcallAPI: () =>\n\t\t\taxios.delete(`${apiUrl}/storytellers/soft/bulk`, {\n\t\t\t\tdata: { storytellerIds: storytellerIds },\n\t\t\t}),\n\t\tpayload: {\n\t\t\tstorytellerIds,\n\t\t\tsuccessMessage: ToastMessage.storytellerDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport {\n\tfilterStorytellers,\n\tfilterStorytellerPendingInvites,\n\tfilterAdmins,\n\tfilterAdminPendingInvites,\n\tcreateStoryteller,\n\tupdateStoryteller,\n\timportStorytellers,\n\tverifyStoryteller,\n\tresendStorytellerVerification,\n\texportStorytellers,\n\tsendSmsAppLink,\n\tuploadStorytellerProfilePicture,\n\tgetStorytellerOptions,\n\tclearStorytellers,\n\tretrieveSavedAdmins,\n\tbulkSoftDeleteStorytellers,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl, ToastMessage } from '../../constants/index';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\n// import { EditStoryOptionsTypes, CreateStoryOptionsTypes } from \"./types/index\";\nimport axios from '../../../global/axios';\nimport { TagDropdownFilter } from '../constants';\nconst mainType = 'tag';\n\nexport const filterTagsTypes = createFetchTypes(`${mainType}_GET`);\nexport const createTagsTypes = createFetchTypes(`${mainType}_CREATE`);\nexport const updateTagsTypes = createFetchTypes(`${mainType}_UPDATE`);\nexport const deleteTagsTypes = createFetchTypes(`${mainType}_DELETE`);\nexport const createContactTagsTypes = createFetchTypes(\n\t`${mainType}_CREATE_CONTACT_TAGS`,\n);\n\nexport const getTagOptionsTypes = createFetchTypes(`${mainType}_GET_OPTIONS`);\n\nfunction getTagOptions(): fetchAction {\n\treturn {\n\t\ttype: getTagOptionsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(`${apiUrl}/tags?filter=${JSON.stringify(TagDropdownFilter)}`),\n\t};\n}\n\nfunction filterTags(\n\tFilterOptions?: FilterOptions,\n\toptions?: { isFilter: boolean },\n): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\treturn {\n\t\ttype: filterTagsTypes,\n\t\tpayload: { isFilter: options?.isFilter },\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/tags${FilterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t};\n}\n\nfunction updateTag(tagId: string, text: string): fetchAction {\n\treturn {\n\t\ttype: updateTagsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/tags/bulk`, {\n\t\t\t\ttagIds: [tagId],\n\t\t\t\tdata: {\n\t\t\t\t\ttext,\n\t\t\t\t},\n\t\t\t}),\n\t\tpayload: {\n\t\t\ttagId,\n\t\t\ttext,\n\t\t\tsuccessMessage: ToastMessage.tagsUpdated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t\tcustom: 'updateTag',\n\t\t},\n\t};\n}\n\nfunction deleteTag(tagId: string): fetchAction {\n\treturn {\n\t\ttype: deleteTagsTypes,\n\t\tcallAPI: () => axios.delete(`${apiUrl}/tags/${tagId}`),\n\t\tpayload: {\n\t\t\ttagId,\n\t\t\tsuccessMessage: ToastMessage.tagsUpdated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t\tcustom: 'deleteTag',\n\t\t},\n\t};\n}\n\nfunction createTags(tagsText: string[]): fetchAction {\n\treturn {\n\t\ttype: createTagsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/tags/bulk`, {\n\t\t\t\ttagsText,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'createTags',\n\t\t},\n\t};\n}\nfunction createContactTags(actionPayload: {\n\tnoSuccessToast?: boolean;\n\tcontacts: string[];\n\ttags: string[];\n}): fetchAction {\n\treturn {\n\t\ttype: createContactTagsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/tags/addToContacts`, {\n\t\t\t\tcontacts: actionPayload.contacts,\n\t\t\t\ttags: actionPayload.tags,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tsuccessMessage: actionPayload.noSuccessToast\n\t\t\t\t? null\n\t\t\t\t: ToastMessage.tagsCreated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport {\n\tfilterTags,\n\tupdateTag,\n\tdeleteTag,\n\tgetTagOptions,\n\tcreateTags,\n\tcreateContactTags,\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { apiUrl } from '../../constants/index';\nimport { fetchAction } from '../types';\nimport { FilterOptions } from '../../types/index';\n// import { EditStoryOptionsTypes, CreateStoryOptionsTypes } from \"./types/index\";\nimport axios from '../../../global/axios';\nconst mainType = 'transaction';\n\nexport const filterTransactionTypes = createFetchTypes(`${mainType}_FILTER`);\n\nfunction filterTransactions(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\n\treturn {\n\t\ttype: filterTransactionTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/transactions${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t};\n}\n\nexport const exportTransactionTypes = createFetchTypes(`${mainType}_EXPORT`);\n\nfunction exportTransactions(FilterOptions: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(FilterOptions);\n\n\treturn {\n\t\ttype: exportTransactionTypes,\n\t\tcallAPI: () =>\n\t\t\taxios({\n\t\t\t\turl: `${apiUrl}/transactions/export${\n\t\t\t\t\tFilterOptions ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t\tmethod: 'GET',\n\t\t\t\tresponseType: 'blob',\n\t\t\t}),\n\t};\n}\n\nexport { filterTransactions, exportTransactions };\n","import store, { storeReducers } from '../store';\nimport { useDispatch } from 'react-redux';\nimport { Action } from '@reduxjs/toolkit';\nimport { AxiosResponse } from 'axios';\n\nexport type fetchAction = {\n\ttype: string[];\n\tcallAPI?: () => Promise>;\n\tshouldCallAPI?: () => true;\n\tcallFetch?: () => Promise;\n\tpayload?: { [key: string]: any };\n} & Action;\n\nexport type ResponseAction = Action & {\n\tresponse?: GenericAPIResponse | any;\n\terror?: GenericAPIResponse | any;\n\tpayload?: GenericAPIResponse | any;\n\t[key: string]: any;\n};\n\nexport type clientAction = Action & {\n\tclient?: any;\n};\n\nexport type AppDispatch = typeof store.dispatch;\n\nexport const useAppDispatch = () => useDispatch();\n\nexport type RootState = ReturnType;\n\ntype PagesObject = {\n\t[key: string]: string[];\n};\n\nexport type EntityPaginationObject = {\n\tpages: PagesObject;\n\tcurrentPage: number;\n\ttotalPages?: number;\n\tcount?: number;\n};\n\nexport type GenericEntityState = {\n\tloading: boolean;\n\t// should have a generic response type for example {status,message}\n\tresponse: GenericAPIResponse;\n\t// should have a n error type defined in the axios setup (interceptors) for http errors\n\terror: any;\n\tpagination?: EntityPaginationObject;\n\tcustom?: {\n\t\t[key: string]: any;\n\t};\n\t[key: string]: any;\n};\n\nexport type GenericAPIResponse = {\n\tstatus: number;\n\tmessage: string;\n\t[key: string]: any;\n};\n\nexport type VideoPageSettingField = 'autoplay' | 'captionWarning';\n\nexport type VideoPageSettingsType = {\n\tautoplay?: boolean;\n\tcaptionWarning?: boolean;\n\treplies?: boolean;\n};\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { fetchAction } from '../types';\nimport { Action } from '@reduxjs/toolkit';\nimport axios, { axiosForExternal } from '../../../global/axios';\n// import axiosFromLibrary from 'axios';\nimport { apiUrl, ToastMessage } from '../../constants';\nimport { CaptionSuggestion, FilterOptions } from '../../types';\nimport { CueData } from '../../../common/components/interaction/CaptionEditor/types';\nconst mainType = 'video';\n\nexport const uploadVideoTypes = createFetchTypes(`${mainType}_UPLOAD`);\n\nfunction uploadVideo(formdata: FormData, crop?: boolean): fetchAction {\n\treturn {\n\t\ttype: uploadVideoTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(\n\t\t\t\t`${apiUrl}/video?inputlanguage=en-US${crop ? '&square=true' : ''}`,\n\t\t\t\tformdata,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'videoUpload',\n\t\t},\n\t};\n}\n\nexport const filterVideoTypes = createFetchTypes(`${mainType}_FILTER_VIDEOS`);\nexport const filterVideoWithInfiniteTypes = createFetchTypes(\n\t`${mainType}_FILTER_VIDEOS_WITH_INFINITE`,\n);\n\nfunction filterVideos(\n\tfilterOptions: FilterOptions,\n\tinfinite = false,\n): fetchAction {\n\tconst filterString = JSON.stringify(filterOptions);\n\treturn {\n\t\ttype: infinite ? filterVideoWithInfiniteTypes : filterVideoTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/video${filterOptions ? `?filter=${filterString}` : ``}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const downloadVideoTypes = createFetchTypes(\n\t`${mainType}_DOWNLOAD_VIDEOS`,\n);\n\nfunction downloadVideo(videoId: string) {\n\treturn {\n\t\ttype: downloadVideoTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/video/download/${videoId}`),\n\t};\n}\n\nexport const archiveVideoTypes = createFetchTypes(`${mainType}_ARCHIVE_VIDEO`);\n\nfunction archiveVideo(videoId: string) {\n\treturn {\n\t\ttype: archiveVideoTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/video/${videoId}`, { video: { deleted: true } }),\n\t};\n}\n\nexport const toggleHideCaptionTypes = createFetchTypes(\n\t`${mainType}_TOGGLE_CAPTIONS`,\n);\n\nfunction toggleHideCaptions(videoId: string, hideCaptions: boolean) {\n\treturn {\n\t\ttype: toggleHideCaptionTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/video/${videoId}`, { video: { hideCaptions } }),\n\t};\n}\n\nexport const favoriteVideoTypes = createFetchTypes(\n\t`${mainType}_FAVORITE_VIDEO`,\n);\n\nfunction favoriteVideo(videoId: string, isFavorite = false) {\n\treturn {\n\t\ttype: favoriteVideoTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/video/${videoId}`, {\n\t\t\t\tvideo: { favorite: isFavorite },\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'favoriteVideo',\n\t\t\tsuccessMessage: isFavorite\n\t\t\t\t? ToastMessage.favorite\n\t\t\t\t: ToastMessage.favoriteUpdated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const toggleShowWidgetTypes = `${mainType}_TOGGLE_SHOW_WIDGET`;\n\nfunction toggleShowWidget(): Action {\n\treturn {\n\t\ttype: toggleShowWidgetTypes,\n\t};\n}\n\nexport const getStreamingUrlTypes = createFetchTypes(\n\t`${mainType}_GET_STREAMING_URL`,\n);\n\nfunction getStreamingUrl(\n\tvideoId: string,\n\tazureId: string,\n\tproxy: boolean,\n\tlocation: string,\n) {\n\treturn {\n\t\ttype: getStreamingUrlTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/video/getStreamingUrl?videoId=${azureId}&proxy=${proxy}&location=${location}`,\n\t\t\t),\n\t\tpayload: { videoId },\n\t};\n}\n\nexport const getSingleVideoTypes = createFetchTypes(\n\t`${mainType}_GET_SINGLE_VIDEO`,\n);\n\nfunction getSingleVideo(videoId: string) {\n\treturn {\n\t\ttype: getSingleVideoTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/video/${videoId}`),\n\t};\n}\n\nexport const clearVideosType = 'video/CLEAR_VIDEOS';\n\nfunction clearVideos() {\n\treturn {\n\t\ttype: clearVideosType,\n\t};\n}\n\nexport const updateCaptionTypes = createFetchTypes(\n\t`${mainType}_UPDATE_CAPTIONS`,\n);\n\nfunction updateCaptions(\n\tvideoId: string,\n\tcaptions: string,\n\tlanguage: string,\n\tdataByCue: { [key: string]: CueData },\n) {\n\treturn {\n\t\ttype: updateCaptionTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/video/captions/${videoId}`, {\n\t\t\t\tcaptions,\n\t\t\t\tlanguage,\n\t\t\t\tdataByCue,\n\t\t\t}),\n\t\tpayload: {\n\t\t\tcustom: 'updateCaptions',\n\t\t},\n\t};\n}\n\nexport const getParsedCaptionTypes = createFetchTypes(\n\t`${mainType}_GET_PARSED_CAPTION`,\n);\n\nfunction getParsedCaptions(url: string, videoId: string) {\n\treturn {\n\t\ttype: getParsedCaptionTypes,\n\t\tcallAPI: () => axiosForExternal.get(url),\n\t\tpayload: {\n\t\t\tcustom: 'getParsedCaption',\n\t\t\tid: videoId,\n\t\t},\n\t};\n}\n\nexport const createCaptionSuggestionTypes = createFetchTypes(\n\t`${mainType}_CREATE_CAPTION_SUGGESTION`,\n);\n\nfunction createSuggestion(suggestion: CaptionSuggestion) {\n\treturn {\n\t\ttype: createCaptionSuggestionTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/video/suggestion`, { suggestion }),\n\t\tpayload: {\n\t\t\tcustom: 'createSuggestion',\n\t\t\tsuccessMessage: ToastMessage.suggestionCreated,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const deleteCaptionSuggestionTypes = createFetchTypes(\n\t`${mainType}_DELETE_CAPTION_SUGGESTION`,\n);\n\nfunction deleteSuggestion(suggestionId: string) {\n\treturn {\n\t\ttype: deleteCaptionSuggestionTypes,\n\t\tcallAPI: () => axios.delete(`${apiUrl}/video/suggestion/${suggestionId}`),\n\t\tpayload: {\n\t\t\tcustom: 'deleteSuggestion',\n\t\t\tsuccessMessage: ToastMessage.suggestionDeleted,\n\t\t\terrorMessage: ToastMessage.error,\n\t\t},\n\t};\n}\n\nexport const getCaptionSuggestionTypes = createFetchTypes(\n\t`${mainType}_GET_CAPTION_SUGGESTION`,\n);\n\nfunction getSuggestions(filterOptions?: FilterOptions): fetchAction {\n\tconst filterString = JSON.stringify(\n\t\tfilterOptions || { search: '', pagination: { page: 1, pageSize: 100 } },\n\t);\n\treturn {\n\t\ttype: getCaptionSuggestionTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/video/suggestion${\n\t\t\t\t\tfilterString ? `?filter=${filterString}` : ``\n\t\t\t\t}`,\n\t\t\t),\n\t\tpayload: {\n\t\t\tcustom: 'getSuggestion',\n\t\t},\n\t};\n}\n\nexport {\n\tfilterVideos,\n\tuploadVideo,\n\ttoggleShowWidget,\n\tgetStreamingUrl,\n\tclearVideos,\n\tgetSingleVideo,\n\tdownloadVideo,\n\tarchiveVideo,\n\tfavoriteVideo,\n\tupdateCaptions,\n\tgetParsedCaptions,\n\ttoggleHideCaptions,\n\tcreateSuggestion,\n\tgetSuggestions,\n\tdeleteSuggestion,\n};\n","import { Action, createSlice } from '@reduxjs/toolkit';\nimport createFetchReducer from '../../utils/createFetchReducer';\nimport {\n\tuploadVideoTypes,\n\tfilterVideoTypes,\n\tgetStreamingUrlTypes,\n\tfilterVideoWithInfiniteTypes,\n\tgetSingleVideoTypes,\n\tdownloadVideoTypes,\n\tarchiveVideoTypes,\n\tupdateCaptionTypes,\n\tgetParsedCaptionTypes,\n\tfavoriteVideoTypes,\n\ttoggleHideCaptionTypes,\n\tcreateCaptionSuggestionTypes,\n\tdeleteCaptionSuggestionTypes,\n\tgetCaptionSuggestionTypes,\n} from './action';\nimport { GenericEntityState, ResponseAction } from '../types';\nimport { normalize } from 'normalizr';\nimport entityNormalizer from '../../utils/entityNormalizer';\nimport { ServiceResponse } from '../../constants';\n\nimport {\n\tCueData,\n\tSubtitleType,\n} from '../../../common/components/interaction/CaptionEditor/types';\nimport { parse } from 'node-webvtt';\nimport { CaptionSuggestion } from '../../types';\n\nfunction videoDataByCueProcessStrategy(\n\tvalue: any,\n\tparent: any,\n\tkey: string,\n\texcludeTime: boolean,\n) {\n\tif (!value.transcript?.length) {\n\t\treturn { ...value };\n\t}\n\tconst dataByCue: { [key: string]: CueData } = {};\n\tif (\n\t\t!value.dataByCue ||\n\t\tvalue.dataByCue[value.transcript?.length - 1].confidence\n\t) {\n\t\tvalue.transcript?.forEach(\n\t\t\t(\n\t\t\t\t{\n\t\t\t\t\tid,\n\t\t\t\t\ttext,\n\t\t\t\t\tconfidence,\n\t\t\t\t}: {\n\t\t\t\t\tid: string;\n\t\t\t\t\tconfidence: number;\n\t\t\t\t\ttext: string;\n\t\t\t\t},\n\t\t\t\tindex: number,\n\t\t\t) => {\n\t\t\t\tdataByCue[index] = { confidence };\n\t\t\t},\n\t\t);\n\t\treturn { ...value, dataByCue };\n\t}\n}\nconst video = entityNormalizer(\n\t'videos',\n\t{},\n\t{\n\t\tidAttribute: '_id',\n\t\texcludeTime: true,\n\t\tprocessStrategy: videoDataByCueProcessStrategy,\n\t},\n);\nconst pagination = { videos: [video] };\n\nconst initialState: GenericEntityState & {\n\tparsedCaptions: { [key: string]: SubtitleType };\n\tsuggestions?: CaptionSuggestion[];\n} = {\n\tloading: false,\n\terror: {},\n\tvideos: {},\n\tvideosCount: 0,\n\tpagination: {\n\t\tpages: {},\n\t\tcurrentPage: null,\n\t\ttotalPages: null,\n\t},\n\tresponse: {\n\t\tstatus: null,\n\t\tmessage: null,\n\t},\n\tloadingUpload: false,\n\tprocessingVideos: {\n\t\tcurrent: [],\n\t\tcurrentId: [],\n\t\tcompleted: [],\n\t\tshowProcessingWidget: false,\n\t},\n\tstreaming: {},\n\tcustom: {},\n\tparsedCaptions: {},\n};\nexport type VideoStateType = typeof initialState & GenericEntityState;\n\nfunction defaultVideosPaginationMapper(\n\tstate: VideoStateType,\n\taction: ResponseAction,\n\tcb: (videos: any, state: VideoStateType) => void,\n) {\n\tconst {\n\t\tresponse: {\n\t\t\tvideos,\n\t\t\tpage = null,\n\t\t\tpageSize = null,\n\t\t\ttotalPages = null,\n\t\t\tcount = null,\n\t\t},\n\t} = action;\n\tconst normalizedData = normalize(\n\t\t{ videos, page, pageSize, totalPages, count },\n\t\tpagination,\n\t);\n\n\tstate.pagination.pages[action.response.page] = normalizedData.result.videos;\n\tstate.pagination.currentPage = action.response.page;\n\tstate.pagination.totalPages = action.response.totalPages;\n\tstate.pagination.count = action.response.count;\n\tcb(normalizedData.entities.videos, state);\n}\n\nfunction paginationMapper(videos: any, state: VideoStateType) {\n\tstate.videos = { ...videos };\n\tstate.videosCount = Object.keys(state?.videos || {})?.length;\n}\nfunction filterMapper(videos: any, state: VideoStateType) {\n\tif (state.pagination.currentPage === 1) {\n\t\treturn paginationMapper(videos, state);\n\t}\n\tstate.videos = { ...state.videos, ...videos };\n\tstate.videosCount = Object.keys(state?.videos || {})?.length;\n}\n\nfunction uploadMapper(state: VideoStateType, action: ResponseAction) {\n\tstate.processingVideos.showProcessingWidget = true;\n\tstate.loadingUpload = false;\n}\n\nfunction getstreamingUrlMapper(state: VideoStateType, action: ResponseAction) {\n\tconst videoId = action.payload.videoId;\n\tconst { url, jwt, accessToken, urlWithProxy } = action.response;\n\tconst newStreamingState = {\n\t\t[videoId]: {\n\t\t\tid: videoId,\n\t\t\tstreamingUrl: url,\n\t\t\tstreamingToken: jwt,\n\t\t\taccessToken,\n\t\t\turlWithProxy,\n\t\t},\n\t};\n\tconst newState = {\n\t\t[videoId]: {\n\t\t\t...state.videos[videoId],\n\t\t\tstreamingUrl: url,\n\t\t\tstreamingToken: jwt,\n\t\t},\n\t};\n\tstate.videos = { ...state.videos, ...newState };\n\tstate.streaming = { ...state.streaming, ...newStreamingState };\n}\n\nfunction getSingleVideoMapper(state: VideoStateType, action: ResponseAction) {\n\tconst videoId = action.response?.video?._id;\n\tconst normalizedData = normalize(\n\t\t{ videos: { ...state.stories, [videoId]: action.response.video } },\n\t\tpagination,\n\t);\n\tstate.videos = { ...normalizedData.entities.videos };\n}\nfunction updateCaptionsMapper(state: VideoStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { video, captions },\n\t} = action;\n\n\tif (state.videos[video._id]) {\n\t\tstate.videos[video._id].captions = video.captions;\n\t\tstate.videos[video._id].transcriptText = video.transcriptText;\n\n\t\tif (video.dataByCue) {\n\t\t\tstate.videos[video._id].dataByCue = video.dataByCue;\n\t\t}\n\t}\n\n\tstate.parsedCaptions[video._id] = parse(captions, {\n\t\tmeta: true,\n\t}) as SubtitleType;\n}\n\nfunction parseCaptionsMapper(state: VideoStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse,\n\t\tpayload: { id },\n\t} = action;\n\tstate.parsedCaptions[id] = parse(response, { meta: true }) as SubtitleType;\n}\n\nfunction downLoadVideoMapper(state: VideoStateType, action: ResponseAction) {}\n\nfunction archiveVideoMapper(state: VideoStateType, action: ResponseAction) {\n\tstate.response.message = ServiceResponse.videoArchived;\n}\n\nfunction favoriteVideoMapper(state: VideoStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { video },\n\t} = action;\n\tif (state.videos[video._id]) {\n\t\tstate.videos[video._id].favorite = video.favorite;\n\t}\n\tstate.response.message = ServiceResponse.favoriteUpdated;\n}\n\nfunction updateVideoMapper(message: string, field: string = null) {\n\treturn function (state: VideoStateType, action: ResponseAction) {\n\t\tconst {\n\t\t\tresponse: { video },\n\t\t} = action;\n\n\t\t// Discards uploadedBy\n\t\tconst { uploadedBy, ...videoFromResponse } = video;\n\n\t\tif (state.videos[video._id]) {\n\t\t\tif (field) {\n\t\t\t\tstate.videos[video._id][field] = videoFromResponse[field];\n\t\t\t} else {\n\t\t\t\tstate.videos[video._id] = {\n\t\t\t\t\t...state.videos[video._id],\n\t\t\t\t\t...videoFromResponse,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif (message) {\n\t\t\tstate.response.message = message;\n\t\t}\n\t};\n}\n\nfunction getSuggestionsMapper(state: VideoStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { suggestions },\n\t} = action;\n\tstate.suggestions = suggestions;\n}\n\nfunction deleteSuggestionMapper(state: VideoStateType, action: ResponseAction) {\n\tconst {\n\t\tresponse: { id },\n\t} = action;\n\tconst stateCopy = [...state.suggestions];\n\tconst toRemove = stateCopy.findIndex(({ objectID }) => objectID === id);\n\tstate.suggestions = stateCopy.splice(toRemove, 1);\n}\n\nconst videoSlice = createSlice({\n\tname: 'video',\n\tinitialState,\n\treducers: {\n\t\tloadingUpload(state: VideoStateType, action: Action) {\n\t\t\tstate.loadingUpload = true;\n\t\t},\n\t\tCLEAR_VIDEOS(state: VideoStateType) {\n\t\t\tstate.videos = {};\n\t\t\tstate.videosCount = 0;\n\t\t},\n\t},\n\textraReducers: {\n\t\t...createFetchReducer(uploadVideoTypes, uploadMapper),\n\t\t...createFetchReducer(filterVideoTypes, (state: VideoStateType, action) =>\n\t\t\tdefaultVideosPaginationMapper(state, action, paginationMapper),\n\t\t),\n\t\t...createFetchReducer(\n\t\t\tfilterVideoWithInfiniteTypes,\n\t\t\t(state: VideoStateType, action) =>\n\t\t\t\tdefaultVideosPaginationMapper(state, action, filterMapper),\n\t\t),\n\t\t...createFetchReducer(getStreamingUrlTypes, getstreamingUrlMapper),\n\t\t...createFetchReducer(getSingleVideoTypes, getSingleVideoMapper),\n\t\t...createFetchReducer(downloadVideoTypes, downLoadVideoMapper),\n\t\t...createFetchReducer(archiveVideoTypes, archiveVideoMapper),\n\t\t...createFetchReducer(updateCaptionTypes, updateCaptionsMapper),\n\t\t...createFetchReducer(getParsedCaptionTypes, parseCaptionsMapper),\n\t\t...createFetchReducer(favoriteVideoTypes, favoriteVideoMapper),\n\t\t...createFetchReducer(\n\t\t\ttoggleHideCaptionTypes,\n\t\t\tupdateVideoMapper(ServiceResponse.toggledCaptions, 'hideCaptions'),\n\t\t),\n\t\t...createFetchReducer(createCaptionSuggestionTypes),\n\t\t...createFetchReducer(deleteCaptionSuggestionTypes, deleteSuggestionMapper),\n\t\t...createFetchReducer(getCaptionSuggestionTypes, getSuggestionsMapper),\n\t},\n});\n\nexport const { loadingUpload } = videoSlice.actions;\n\nexport default videoSlice.reducer;\n","import createFetchTypes from '../../utils/createFetchTypes';\nimport { fetchAction, GenericAPIResponse } from '../types';\nimport axios from '../../../global/axios';\nimport { apiUrl, ToastMessage } from '../../constants';\n\nconst mainType = 'workspace';\n\nexport type Workspace = {\n\tname: string;\n\tlogo: string;\n\t_id: string;\n\t__v: number;\n\tid: string;\n};\n\ntype ResponseType = GenericAPIResponse & {\n\tworkspaces: Workspace[];\n};\n\nexport const getWorkspaceByEmailTypes = createFetchTypes(\n\t`${mainType}_GET_WORKSPACES_BY_EMAIL`,\n);\nexport const updateWorkspaceGatewayTypes = createFetchTypes(\n\t`${mainType}_GATEWAY_UPDATE`,\n);\nexport const WorkspaceInfoTypes = createFetchTypes(\n\t`${mainType}_WORKSPACE_INFO`,\n);\nexport const zapierKeyTypes = createFetchTypes(`${mainType}_ZAPIER_KEY`);\n\nexport const AddWorkspaceGatewayTypes = createFetchTypes(\n\t`${mainType}_WORKSPACE_GATEWAY`,\n);\nexport const DisconnectBlackbaudGatewayTypes = createFetchTypes(\n\t`${mainType}_WORKSPACE_GATEWAY`,\n);\nexport const disconnectWorkspaceIntegrationTypes = createFetchTypes(\n\t`${mainType}_DISCONNECT_INTEGRATION`,\n);\nexport const updateWorkspaceIntegrationTypes = createFetchTypes(\n\t`${mainType}_WORKSPACE_INTEGRATION`,\n);\nexport const updateHotglueCommunicationPreferenceTypes = createFetchTypes(\n\t`${mainType}_HOTGLUE_COMMUNICATION_PREFRENCE`,\n);\nexport const updateHotglueSyncingScheduleTypes = createFetchTypes(\n\t`${mainType}_HOTGLUE_SYNCING_SCHEDULE`,\n);\nexport const uploadLogoTypes = createFetchTypes(`${mainType}_UPLOAD_LOGO`);\nexport const updateWithLogoAndBackgroundtypes = createFetchTypes(\n\t`${mainType}_UPLOAD_LOGO_BACKGROUND`,\n);\nexport const updateWorkspaceTypes = createFetchTypes(`${mainType}_UPDATE`);\nexport const verifyWorkspaceDomainDataTypes = createFetchTypes(\n\t`${mainType}_SET_DOMAIN_DATA`,\n);\nexport const verifyDomainTypes = createFetchTypes(`${mainType}_VERIFY_DOMAIN`);\n\nexport const setZapierIntegrationTypes = createFetchTypes(\n\t`${mainType}_SET_ZAPIER_INTEGRATION`,\n);\n\nexport const disconnectHotglueIntegrationTypes = createFetchTypes(\n\t`${mainType}_DISCONNECT_HOTGLUE_INTEGRATION`,\n);\n\nexport const updateCustomAttributesTypes = createFetchTypes(\n\t`${mainType}_UPDATE_CUSTOM_ATTRIBUTES`,\n);\n\nexport const connectHotglueFlowTypes = createFetchTypes(\n\t`${mainType}_CONNECT_HOTGLUE_FLOW`,\n);\n\nexport const getSendDataOutTargetFieldsTypes = createFetchTypes(\n\t`${mainType}_GET_SEND_DATA_OUT_TARGET_FIELD`,\n);\n\nfunction setZapierIntegration(): fetchAction {\n\treturn {\n\t\ttype: setZapierIntegrationTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/workspaces/integration/zapier`),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationConnected,\n\t\t},\n\t};\n}\n\nfunction getWorkspaceByEmail(email: string): fetchAction {\n\treturn {\n\t\ttype: getWorkspaceByEmailTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/auth/workspaces?e=${email}`),\n\t};\n}\n\nfunction updateWorkspaceGateway({ workspaceId, ...obj }: any): fetchAction {\n\treturn {\n\t\ttype: updateWorkspaceGatewayTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/gateway/${workspaceId}`, obj),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.gatewayConnected,\n\t\t},\n\t};\n}\n\nfunction DisconnectGateway(obj: any): fetchAction {\n\tconst data = {\n\t\tgatewayOn: false,\n\t\tgatewayId: obj.gatewayId,\n\t\tkey: obj.publicKey || obj.key || 'null',\n\t\tname: obj.name || 'blackbaud',\n\t};\n\n\treturn {\n\t\ttype: DisconnectBlackbaudGatewayTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/gateway/${obj.workspaceId}`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.gatewayDisconnected,\n\t\t},\n\t};\n}\n\n// function getWorkspaceInfo(): fetchAction {\n// return {\n// type: WorkspaceInfoTypes,\n// callAPI: () => axios.get(`${apiUrl}/auth/verify`)\n// }\n// }\n\nfunction updateWorkspaceIntegration(obj: any): fetchAction {\n\tconst data: { [key: string]: string } = {\n\t\tintegrationId: obj.integrationId,\n\t\tintegrationName: obj.integrationName || 'blackbaud',\n\t\tintegrationBaseUrl: obj.integrationBaseUrl || obj.constituent_id,\n\t\tintegrationOn: obj.integrationOn || true,\n\t};\n\tif (obj.refreshToken) {\n\t\tdata.refreshToken = obj.refreshToken || '';\n\t}\n\n\treturn {\n\t\ttype: updateWorkspaceIntegrationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/integration/${obj.workspaceId}`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationConnected,\n\t\t},\n\t};\n}\n\nfunction connectHotglueFlow(data: { [key: string]: any }): fetchAction {\n\treturn {\n\t\ttype: connectHotglueFlowTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.post(`${apiUrl}/workspaces/integration/hotglue/connect`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationConnected,\n\t\t},\n\t};\n}\n\nfunction disconnectWorkspaceIntegration(obj: any): fetchAction {\n\tconst data = {\n\t\tintegrationId: obj.integrationId,\n\t\tintegrationName: obj.integrationName || 'blackbaud',\n\t\tintegrationOn: false,\n\t};\n\treturn {\n\t\ttype: disconnectWorkspaceIntegrationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/integration/${obj.workspaceId}`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationDisconnected,\n\t\t},\n\t};\n}\n\nfunction updateHotglueCommunicationPreference(obj: any): fetchAction {\n\tconst data = {\n\t\tflowName: 'contactImport',\n\t\tflow: {\n\t\t\tdefaultCommunicationPreference: obj.communicationPreference,\n\t\t},\n\t};\n\n\treturn {\n\t\ttype: updateHotglueCommunicationPreferenceTypes,\n\t\tcallAPI: () => axios.put(`${apiUrl}/workspaces/integration/hotglue`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationUpdated,\n\t\t},\n\t};\n}\n\nfunction updateHotglueSyncingSchedule(data: {\n\t[key: string]: any;\n}): fetchAction {\n\treturn {\n\t\ttype: updateHotglueSyncingScheduleTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/integration/hotglue/scheduleJob`, data),\n\t\tpayload: {\n\t\t\tsuccessMessage: ToastMessage.integrationUpdated,\n\t\t},\n\t};\n}\n\nfunction getZapierApiKey(): fetchAction {\n\treturn {\n\t\ttype: zapierKeyTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/workspaces/integration/zapier`),\n\t};\n}\n\nfunction getWorkspaceInfo(custom: string = null): fetchAction {\n\treturn {\n\t\ttype: WorkspaceInfoTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/workspaces/current`),\n\t\tpayload: {\n\t\t\t...(custom ? { custom } : {}),\n\t\t},\n\t};\n}\n\nfunction updateWorkspace(\n\tfields: any,\n\tworkspaceId: string,\n\tsuccessMessage?: string,\n): fetchAction {\n\treturn {\n\t\ttype: updateWorkspaceTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/${workspaceId}`, { workspace: fields }),\n\t\tpayload: {\n\t\t\tcustom: 'updateWorkspace',\n\t\t\t...(successMessage ? { successMessage } : {}),\n\t\t},\n\t};\n}\n\nfunction uploadLogo(logoForm: FormData) {\n\treturn {\n\t\ttype: uploadLogoTypes,\n\t\tcallAPI: () => axios.post(`${apiUrl}/workspaces/uploadLogo`, logoForm),\n\t};\n}\n\nfunction updateWithLogoAndBackground(workspaceForm: FormData) {\n\treturn {\n\t\ttype: updateWithLogoAndBackgroundtypes,\n\t\tcallAPI: () =>\n\t\t\taxios.patch(`${apiUrl}/workspaces/logoAndBackground`, workspaceForm),\n\t};\n}\n\nfunction verifyWorkspaceDomainData() {\n\treturn {\n\t\ttype: verifyWorkspaceDomainDataTypes,\n\t\tcallAPI: () => axios.get(`${apiUrl}/workspaces/domain`),\n\t\tpayload: { custom: 'verifyDomain' },\n\t};\n}\n\nfunction resetWorkspace() {\n\treturn {\n\t\ttype: `${mainType}/RESET_WORKSPACE`,\n\t};\n}\n\nfunction disconnectHotglueIntegration(\n\tintegrationId: string,\n\tflowName: string,\n\tcustom: string = null,\n) {\n\treturn {\n\t\ttype: disconnectHotglueIntegrationTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/integration/hotglue/disconnect`, {\n\t\t\t\tintegrationId,\n\t\t\t\tflowName,\n\t\t\t}),\n\t\tpayload: {\n\t\t\t...(custom ? { custom } : {}),\n\t\t\tsuccessMessage: ToastMessage.integrationDisconnected,\n\t\t},\n\t};\n}\n\nfunction updateCustomAttributes(\n\tcustomAttributes?: [{ index: number; fields: { [key: string]: any } }],\n) {\n\treturn {\n\t\ttype: updateCustomAttributesTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.put(`${apiUrl}/workspaces/customAttributes`, {\n\t\t\t\tcustomAttributes,\n\t\t\t}),\n\t\tpayload: { custom: 'updateCustomAttributes' },\n\t};\n}\n\nfunction getSendDataOutTargetFields(integrationName: string) {\n\treturn {\n\t\ttype: getSendDataOutTargetFieldsTypes,\n\t\tcallAPI: () =>\n\t\t\taxios.get(\n\t\t\t\t`${apiUrl}/workspaces/hotglue/sendDataOut/targets?targetName=${integrationName}`,\n\t\t\t),\n\t\tpayload: { custom: 'getSendDataOutTargetFields' },\n\t};\n}\n\nexport {\n\tgetWorkspaceByEmail,\n\tupdateWorkspaceGateway,\n\tgetWorkspaceInfo,\n\tupdateWorkspaceIntegration,\n\tupdateHotglueCommunicationPreference,\n\tupdateHotglueSyncingSchedule,\n\tupdateWorkspace,\n\tDisconnectGateway,\n\tdisconnectWorkspaceIntegration,\n\tuploadLogo,\n\tverifyWorkspaceDomainData,\n\tupdateWithLogoAndBackground,\n\tgetZapierApiKey,\n\tsetZapierIntegration,\n\tresetWorkspace,\n\tdisconnectHotglueIntegration,\n\tupdateCustomAttributes,\n\tconnectHotglueFlow,\n\tgetSendDataOutTargetFields,\n};\n","type Option = {\n\tvalue: any;\n\tlabel: string;\n};\ntype ObjectToOptionsReturnType = Option[];\n\nexport function denormalizedObjectToOptions(\n\tobjArray: object[],\n\tfield: string,\n\ttext?: string,\n): ObjectToOptionsReturnType {\n\treturn objArray.map((obj: { [key: string]: any }) => ({\n\t\tvalue: obj[field],\n\t\tlabel: text,\n\t}));\n}\n\nfunction ObjectToOptions(\n\tNormalizedObject: { [key: string]: any },\n\tfield: string,\n\ttext?: string,\n\ttextFormat?: (value: string | boolean) => string,\n): ObjectToOptionsReturnType {\n\treturn (\n\t\tNormalizedObject &&\n\t\tObject.entries(NormalizedObject)?.map(([id, value]) => ({\n\t\t\tvalue: value[field],\n\t\t\tlabel: textFormat\n\t\t\t\t? textFormat(text ? value[text] || value[field] : value[field])\n\t\t\t\t: value[text] || field,\n\t\t}))\n\t);\n}\n\nexport default ObjectToOptions;\n","function getAuth0LocalValue() {\n\ttry {\n\t\tconst stringValue = localStorage.getItem(\n\t\t\t'@@auth0spajs@@::zJvWJujfu6BjSTnnegs1BkeADmcuL4uZ::default::openid profile email offline_access',\n\t\t);\n\t\tconst auth0State = JSON.parse(stringValue);\n\t\t// console.log({ auth0State });\n\t\treturn auth0State;\n\t} catch (e) {\n\t\t// console.log(e);\n\t\treturn null;\n\t}\n}\n\nexport default class TokenStorage {\n\tpublic static getAccessToken(): string {\n\t\tconst token =\n\t\t\tgetAuth0LocalValue()?.body?.access_token ||\n\t\t\tlocalStorage.getItem('accessToken');\n\t\treturn token;\n\t}\n\n\tpublic static setAccessToken(accessToken: string) {\n\t\treturn localStorage.setItem('accessToken', accessToken);\n\t}\n\n\tpublic static getIdentity(): string {\n\t\treturn localStorage.getItem('identity');\n\t}\n\n\tpublic static setIdentity(identityToken: string) {\n\t\treturn localStorage.setItem('identity', identityToken);\n\t}\n}\n","import { Action } from 'redux';\nimport { ResponseAction } from '../redux/types';\nimport { showToast } from '../../common/components/presentation/Toast';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst defaultMapper = (state: { [key: string]: any }, action: Action) => ({});\n\nexport default function createFetchReducer(\n\ttypes: string[],\n\tsuccessMapper: MapperFunction = defaultMapper,\n\terrorMapper: MapperFunction = defaultMapper,\n): CreateFetchReducersReturnType {\n\t// const [REQUEST_TYPE, SUCCESS_TYPE, FAILURE_TYPE] = types;\n\n\t// added non desctructuring implementation for storybook\n\tconst actionTypes = types || [];\n\tconst REQUEST_TYPE = actionTypes[0];\n\tconst SUCCESS_TYPE = actionTypes[1];\n\tconst FAILURE_TYPE = actionTypes[2];\n\t// end of storybook fix\n\n\tconst reducerObject: ReducerObject = {};\n\n\tconst handle =\n\t\t(loading = false, error = false) =>\n\t\t(state: any, action: ResponseAction): void => {\n\t\t\tif (action.payload?.custom) {\n\t\t\t\tif (action.payload?.resetCustom) {\n\t\t\t\t\tstate.custom = {\n\t\t\t\t\t\t[`${action.payload?.custom}Loading`]: loading,\n\t\t\t\t\t\t[`${action.payload?.custom}Response`]: loading\n\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t: action.response,\n\t\t\t\t\t\t[`${action.payload?.custom}Error`]: loading ? null : action.error,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tstate.custom[`${action.payload?.custom}Loading`] = loading;\n\t\t\t\t\tstate.custom[`${action.payload?.custom}Response`] = loading\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: action.response;\n\t\t\t\t\tstate.custom[`${action.payload?.custom}Error`] = loading\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: action.error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstate.loading = loading;\n\t\t\t\tstate.response = loading ? null : action.response;\n\t\t\t\tstate.error = loading ? null : action.error;\n\t\t\t}\n\n\t\t\tconst { successMessage, errorMessage } = action.payload;\n\n\t\t\tif (\n\t\t\t\t(successMessage && action.response) ||\n\t\t\t\t(errorMessage && action.error)\n\t\t\t) {\n\t\t\t\tconst message = error ? errorMessage : successMessage;\n\t\t\t\tshowToast(message, error ? 'error' : 'success');\n\t\t\t}\n\n\t\t\tif (!loading) {\n\t\t\t\tstate = error\n\t\t\t\t\t? errorMapper(state, action)\n\t\t\t\t\t: successMapper(state, action);\n\t\t\t}\n\t\t};\n\treducerObject[REQUEST_TYPE] = handle(true);\n\treducerObject[SUCCESS_TYPE] = handle(false);\n\treducerObject[FAILURE_TYPE] = handle(false, true);\n\n\treturn reducerObject;\n}\ntype ReducerObject = { [key: string]: (state: any, action: any) => void };\ntype MapperFunction = (\n\tstate: { [key: string]: any },\n\taction: ResponseAction,\n) => void;\n\ntype CreateFetchReducersReturnType = { [key: string]: any };\n","export default function (\n\ttype: CreateFetchTypesArguments,\n): CreateFetchTypesReturnType {\n\treturn [`${type}_REQUEST`, `${type}_SUCCESS`, `${type}_FAILURE`];\n}\n\ntype CreateFetchTypesArguments = string;\n\ntype CreateFetchTypesReturnType = string[];\n","import { schema, Schema } from 'normalizr';\nimport dateFormatterStrategy from './date-formatter';\n\nfunction entityNormalizer(\n\tentity: string | symbol,\n\tdefinition: Schema = {},\n\t{\n\t\tidAttribute,\n\t\tprocessStrategy = null,\n\t\tmergeStrategy,\n\t\texcludeTime = false,\n\t}: {\n\t\tidAttribute?: any;\n\t\tmergeStrategy?: any;\n\t\tprocessStrategy?: any;\n\t\texcludeTime?: boolean;\n\t} = {},\n) {\n\treturn new schema.Entity(entity, definition, {\n\t\tprocessStrategy: (value: any, parent: any, key: string) => {\n\t\t\tif (processStrategy) {\n\t\t\t\treturn {\n\t\t\t\t\t...processStrategy(value, parent, key),\n\t\t\t\t\t...dateFormatterStrategy(value, parent, key, excludeTime),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...value,\n\t\t\t\t...dateFormatterStrategy(value, parent, key, excludeTime),\n\t\t\t};\n\t\t},\n\t\tmergeStrategy: mergeStrategy || undefined,\n\t\tidAttribute: idAttribute || '_id',\n\t});\n}\n\nexport default entityNormalizer;\n","function dateFormatterStrategy(\n\tvalue: any,\n\tparent: any,\n\tkey: string,\n\texcludeTime: boolean,\n) {\n\tconst createdAtDate = new Date(value.createdAt);\n\n\tconst formattedCreatedAt = `${createdAtDate.toLocaleString('default', {\n\t\tmonth: 'long',\n\t})} ${createdAtDate.getDate()}, ${createdAtDate.getFullYear()} ${\n\t\texcludeTime ? '' : createdAtDate.toLocaleTimeString()\n\t}`.trim();\n\n\tconst updatedAtDate = new Date(value.updatedAt);\n\n\tconst formattedUpdatedAt = value.updatedAt\n\t\t? `${updatedAtDate.toLocaleString('default', {\n\t\t\t\tmonth: 'long',\n\t\t })} ${updatedAtDate.getDate()}, ${updatedAtDate.getFullYear()} ${\n\t\t\t\texcludeTime ? '' : updatedAtDate.toLocaleTimeString()\n\t\t }`.trim()\n\t\t: undefined;\n\n\treturn { ...value, formattedUpdatedAt, formattedCreatedAt };\n}\n\nexport default dateFormatterStrategy;\n","import styled from 'styled-components';\nimport { LoaderProps } from './types';\n\nexport const AnimationContainer = styled.div`\n\topacity: ${(props) => (props.loading ? 1 : 0)};\n\tposition: ${(props) => (props.loading ? 'static' : 'absolute')};\n\tleft: ${(props) => (props.loading ? 'auto' : '-9999px')};\n\twidth: ${({ width }) => width};\n\theight: auto;\n\ttransition: opacity ${({ theme }) => theme.transition.short};\n\tpath {\n\t\t${({ color }) => color && `fill: ${color};`}\n\t\tdisplay:${(props) => (props.loading ? 'block' : 'none')};\n\t}\n`;\n\nexport const ThreeDotsContainer = styled.div<{ width: string }>`\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\twidth: 100%;\n\toverflow: hidden;\n\theight: ${({ width }) => width};\n`;\n","import React, { useEffect } from 'react';\nimport Lottie from 'react-lottie';\nimport DotLoaderAnimation from '../../../../global/lottie/dot-loader.json';\nimport { LoaderProps } from './types';\nimport { AnimationContainer, ThreeDotsContainer } from './Loader.styles';\n\nfunction Loader({ loading, width, color, className }: LoaderProps) {\n\tconst animationData = DotLoaderAnimation;\n\n\tconst animationOptions: any = {\n\t\tloop: true,\n\t\tautoplay: true,\n\t\tanimationData,\n\t\trendererSettings: {\n\t\t\tpreserveAspectRatio: 'xMaxYMax slice',\n\t\t\t// I had to slice it because it had a big padding on both animations\n\t\t\tviewBoxSize: '200 200 200 200',\n\t\t},\n\t};\n\tuseEffect(() => {\n\t\t// uncomment this to track rerenders and check optimizations (campaign is awful and rereders this 125 times)\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nLoader.defaultProps = {\n\tloading: false,\n\twidth: '75px',\n\tcolor: '#fff',\n};\n\nexport default React.memo(Loader);\n","import styled from 'styled-components';\nimport Loader from '../Loader/Loader';\n\nexport const AnimationContainer = styled.div`\n\twidth: 35px;\n\tmin-width: 35px;\n\tpath {\n\t\t${({ colorFill }) => colorFill && `fill: ${colorFill};`}\n\t}\n`;\n\nexport const ToastMessage = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\ttext-align: center;\n\tfont-size: 1em;\n\tline-height: 1em;\n\tmargin-left: 1em;\n\tmargin-right: 0.5em;\n\tmargin-bottom: 2px;\n`;\n\nexport const CustomLoader = styled(Loader)`\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n`;\n","import React from 'react';\nimport { toast } from 'react-toastify';\nimport CheckmarkAnimation from '../../../../../global/lottie/checkmark.json';\nimport {\n\tAnimationContainer,\n\tCustomLoader,\n\tToastMessage,\n} from '../Toast.styles';\nimport Lottie from 'react-lottie';\nimport ErrorAnimation from '../../../../../global/lottie/error.json';\n\nconst showToast = (\n\tmessage: string,\n\ttoastType: 'success' | 'error' | 'loading',\n) => {\n\tconst ToastComponent = () => {\n\t\tlet animationData: any = '';\n\t\tlet viewBoxSize: any = '';\n\t\tif (toastType == 'success') {\n\t\t\tanimationData = CheckmarkAnimation;\n\t\t\tviewBoxSize = '80 80 80 80';\n\t\t} else if (toastType == 'error') {\n\t\t\tanimationData = ErrorAnimation;\n\t\t\tviewBoxSize = '';\n\t\t}\n\t\tconst colorFill = '';\n\t\tconst animationOptions: any = {\n\t\t\tloop: false,\n\t\t\tautoplay: true,\n\t\t\tanimationData,\n\t\t\trendererSettings: {\n\t\t\t\tpreserveAspectRatio: 'xMaxYMax slice',\n\t\t\t\t// I had to slice it because it had a big padding on both animations\n\t\t\t\tviewBoxSize,\n\t\t\t},\n\t\t};\n\n\t\tfunction toastContent() {\n\t\t\tif (toastType === 'loading') {\n\t\t\t\treturn ;\n\t\t\t} else {\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{toastContent()}\n\t\t\t\t{message}\n\t\t\t\n\t\t);\n\t};\n\n\treturn toast.dark(, {\n\t\tstyle: { background: '#313131' },\n\t});\n};\n\nexport { showToast };\n","import _axios, { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';\nimport { apiUrl } from '../app/constants';\nimport store from '../app/redux/store';\nimport TokenStorage from '../app/utils/TokenStorage';\nimport { CLEAR_AUTH } from '../app/redux/auth';\n\nconst axios = _axios.create({\n\tbaseURL: apiUrl,\n\t// Modify this\n\ttimeout: 1000 * 7200, // 7200 seconds\n\tresponseType: 'json',\n});\n\nexport const axiosForExternal = _axios.create({\n\tbaseURL: apiUrl,\n\t// Modify this\n\ttimeout: 1000 * 7200, // 7200 seconds\n\t// responseType: 'json',\n});\n\naxios.interceptors.request.use((config: AxiosRequestConfig) => {\n\tconst identityToken =\n\t\tstore.getState().auth.identityToken || TokenStorage.getIdentity();\n\tconst accessToken = TokenStorage.getAccessToken();\n\tif (identityToken) {\n\t\tconfig.headers['Identity'] = identityToken;\n\t}\n\tif (accessToken) {\n\t\tif (!config.headers.Authorization) {\n\t\t\tconfig.headers.Authorization = `Bearer ${accessToken}`;\n\t\t}\n\t}\n\n\treturn config;\n});\n\naxios.interceptors.response.use(\n\t(res: AxiosResponse) => {\n\t\treturn res;\n\t},\n\t(error: AxiosError) => {\n\t\tconst { response } = error;\n\n\t\tif (\n\t\t\tresponse.status === 401 ||\n\t\t\t(response.status === 500 &&\n\t\t\t\tresponse.data.message &&\n\t\t\t\t(response.data.message.includes('authorization') ||\n\t\t\t\t\tresponse.data.message.includes('jwt expired') ||\n\t\t\t\t\tresponse.data.message.includes('invalid')))\n\t\t) {\n\t\t\t// LocalStorage.clear();\n\t\t\t// console.log('logging out', authConfig.logoutUrl);\n\t\t\t// store.dispatch(CLEAR_AUTH());\n\t\t}\n\t\treturn Promise.reject(error);\n\t},\n);\n\nexport default axios;\n","import {\n\tlighten as lightenColor,\n\tdarken as darkenColor,\n} from '@material-ui/core';\n\nimport { ColorCoefficientType } from './types';\n\nconst paletteColors = {\n\tneutral: '#050A31',\n\tdark: '#131A54',\n\tprimary: '#0074E8',\n\tbackground: '#F6F7FA',\n\twhite: '#FFF',\n\talert: '#F45AC1',\n\twarning: '#FA9B1E',\n\tsuccess: '#53BBC3',\n\taccent: {\n\t\tgreen: '#53DDE8',\n\t\tyellow: '#FFDC2C',\n\t\torange: '#FA9B1E',\n\t\tpink: '#F45AC1',\n\t\tpurple: '#8C4FFF',\n\t},\n};\n\nconst lighten = {\n\tprimary: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.primary, 1 - coefficient),\n\n\tneutral: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.neutral, 1 - coefficient),\n\n\tdark: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.dark, 1 - coefficient),\n\n\talert: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.alert, 1 - coefficient),\n\n\twarning: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.warning, 1 - coefficient),\n\n\tsuccess: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.success, 1 - coefficient),\n\n\tgreen: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.accent.green, 1 - coefficient),\n\n\tpink: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.accent.pink, 1 - coefficient),\n\n\tyellow: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.accent.yellow, 1 - coefficient),\n\n\torange: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.accent.orange, 1 - coefficient),\n\n\tpurple: (coefficient: ColorCoefficientType) =>\n\t\tlightenColor(paletteColors.accent.purple, 1 - coefficient),\n};\n\nconst darken = {\n\tprimary: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.primary, coefficient),\n\n\tneutral: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.neutral, coefficient),\n\n\tdark: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.dark, coefficient),\n\n\talert: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.alert, coefficient),\n\n\twarning: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.warning, coefficient),\n\n\tsuccess: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.success, coefficient),\n\n\tgreen: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.accent.green, coefficient),\n\n\tpink: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.accent.pink, coefficient),\n\n\tyellow: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.accent.yellow, coefficient),\n\n\torange: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.accent.orange, coefficient),\n\n\tpurple: (coefficient: ColorCoefficientType) =>\n\t\tdarkenColor(paletteColors.accent.purple, coefficient),\n};\n\nconst colors = {\n\t...paletteColors,\n\tlabel: '#303b8e',\n\tlabelTransparent: '#303b8e7e',\n\tsentiment: '#F2557A',\n\tsentimentTransparent: '#f2547933',\n\tsentimentStrong: '#b92323',\n\tdelivered: '#74A7E5',\n\tsent: '#74A7E5',\n\t'sent to carrier': '#74A7E5',\n\topened: '#61CD8D',\n\tbounced: '#FC7283',\n\t'in approvals': '#FE9E5F',\n\tpending: '#FE9E5F',\n\tprocessed: '#9191ed',\n\tscheduled: '#9191ed',\n\tdropped: '#e46464',\n\twhatsGreen: '#1CC908',\n\torange: '#e07a5f',\n\tlightBlue: '#5383f9',\n\tlightestBlue: '#f2fbfc',\n\tlightPurple: '#ede6fb',\n\tsoftRed: 'rgba(215, 97, 97, 0.12)',\n\tstrongRed: '#dd1616',\n\tlightGreen: '#effff5',\n\tgreen: '#19C6C2',\n\n\t// This color scheme is used to create general elements, text or containers in the app\n\tneutral: {\n\t\t'0': paletteColors.white,\n\t\t'50': lighten.neutral(0.05), // #f2f2f4\n\t\t'100': lighten.neutral(0.1), // #e6e6ea\n\t\t'200': lighten.neutral(0.3), // #b4b5c1\n\t\t'300': lighten.neutral(0.4), // #9b9dac\n\t\t'400': lighten.neutral(0.6), // #696c83\n\t\t'500': lighten.neutral(0.7), // #50536e\n\t\t'700': paletteColors.neutral, // #050A31\n\t},\n\n\tdark: {\n\t\t'400': lighten.dark(0.6), // #717598\n\t\t'500': lighten.dark(0.7), // #595e87\n\t\t'600': lighten.dark(0.8), // #424776\n\t\t'700': paletteColors.dark, // #131a54\n\t},\n\n\t// This color is used scheme for interactive elements\n\tprimary: {\n\t\t'50': lighten.primary(0.05), // #f6fafe\n\t\t'100': lighten.primary(0.1), // #edf5fd\n\t\t'200': lighten.primary(0.3), // #c9e1f9\n\t\t'300': lighten.primary(0.4), // #b7d7f8\n\t\t'400': lighten.primary(0.6), // #93c4f4\n\t\t'500': lighten.primary(0.7), // #81baf3\n\t\t'600': lighten.primary(0.8), // #6fb0f1\n\t\t'700': paletteColors.primary, // #4c9dee\n\t\t'900': darken.primary(0.3), // #356da6\n\t},\n\n\t// This color scheme is used for some interactive elements according to the mockups\n\tsecondary: {\n\t\t'50': '#ffe8dd',\n\t\t'100': '#ffd8c5',\n\t\t'300': '#ffb18d',\n\t\t'500': '#ff864e',\n\t\t'700': '#ff5c10',\n\t\t'900': '#cd490b',\n\t},\n\n\t// This color scheme is used for success states within the app\n\tsuccess: {\n\t\t'50': lighten.success(0.05), // #f6fbfc\n\t\t'100': lighten.success(0.1), // #edf8f9\n\t\t'300': lighten.success(0.4), // #bae3e7\n\t\t'500': lighten.success(0.7), // #86cfd5\n\t\t'700': paletteColors.success, // #53BBC3\n\t\t'900': darken.success(0.3), // #3a8288\n\t},\n\n\t// This color scheme is used for warning states within the app\n\twarning: {\n\t\t'50': lighten.warning(0.05), // #fefaf3\n\t\t'300': lighten.warning(0.4), // #fdd7a5\n\t\t'500': lighten.warning(0.7), // #fbb961\n\t\t'700': paletteColors.warning, // #FA9B1E\n\t\t'900': darken.warning(0.3), // #af6c15\n\t},\n\n\t// This color scheme is used for error states within the app\n\talert: {\n\t\t'50': lighten.alert(0.05), // #fef6fb\n\t\t'300': lighten.alert(0.4), // #fabde6\n\t\t'500': lighten.alert(0.7), // #f78bd3\n\t\t'700': paletteColors.alert, // #f45ac1\n\t\t'900': darken.alert(0.3), // #aa3e87\n\t},\n\n\t// This color scheme is used for tags\n\ttags: {\n\t\t'50': lighten.yellow(0.05), // #fffdf4\n\t\t'100': lighten.yellow(0.1), // #fffbe9\n\t\t'300': lighten.yellow(0.4), // #fff1aa\n\t\t'500': lighten.yellow(0.7), // #ffe66b\n\t\t'700': paletteColors.accent.yellow, // #ffdc2c\n\t\t'900': darken.yellow(0.3), // #b29a1e\n\t},\n\n\taccent: {\n\t\tpurple: {\n\t\t\t'300': lighten.purple(0.4), // #dccaff\n\t\t\t'700': paletteColors.accent.purple, // #8c4fff\n\t\t},\n\n\t\tyellow: {\n\t\t\t'300': lighten.yellow(0.4),\n\t\t\t'700': paletteColors.accent.yellow, // #FFDC2C\n\t\t},\n\n\t\tgreen: {\n\t\t\t'700': paletteColors.accent.green, // #53DDE8\n\t\t},\n\t},\n\n\tgradients: {\n\t\tprimary: `linear-gradient(90deg, #ff5c10 0%, #F6C93D 100%);`,\n\t\tsecondary: `linear-gradient(90deg, #00b9a5 0%, #009686 100%);`,\n\t},\n};\n\nconst fonts = {\n\tdefault:\n\t\t'Inter, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif',\n};\n\nconst fontSizes = {\n\th1: '24px',\n\th2: '20px',\n\tlarge: '16px',\n\tregular: '14px',\n\tsmall: '12px',\n\tsmaller: '10px',\n};\n\nconst border = {\n\tblock: `1px solid ${colors.neutral[100]}`,\n};\n\nconst borderRadius = {\n\tsubtle: '4px',\n\tsmooth: '6px',\n\tdefault: '8px',\n\trounded: '12px',\n\tround: '16px',\n\tfullRounded: '50%',\n\n\tcomponents: {\n\t\tsmaller: '12px',\n\t\tsmall: '16px',\n\t\tregular: '20px',\n\t\tlarge: '24px',\n\t},\n};\n\nconst buttonHeight = {\n\tsmaller: '24px',\n\tsmall: '32px',\n\tregular: '40px',\n\tlarge: '48px',\n};\n\nconst buttonFontSize = {\n\tsmaller: '12px',\n\tsmall: '14px',\n\tregular: '16px',\n\tlarge: '20px',\n};\n\nconst buttonPadding = {\n\tsmaller: '0px 16px',\n\tsmall: '4px 16px',\n\tregular: '8px 24px',\n\tlarge: '12px 32px',\n};\n\nconst iconButtonPadding = {\n\tsmall: '4px 8px',\n\tregular: '8px 16px',\n\tlarge: '12px 24px',\n};\n\nconst boxShadow = {\n\tdefault: '0 4px 10px 0 rgba(0, 0, 0, 0.15)',\n\thover: '0 3px 8px 0 rgba(0, 0, 0, 0.12)',\n\tbottom: '0px 3px 9px -2px rgba(0,0,0,0.12)',\n\tright: '3px 0 5px -2px rgba(0, 0, 0, 0.25)',\n\tglow: `0 0 4px 1px ${colors.neutral[200]}`,\n\tglowActive: `0 0 4px 2px ${colors.neutral[200]}`,\n\tbigCards: `0px 1px 5px ${colors.neutral[100]}`,\n\tselectedBigCards: `0 0 0 4px ${colors.secondary[700]}`,\n\tsmallCards: `0px 1px 3px ${colors.neutral[100]}`,\n\tselectedSmallCards: `0 0 0 2px ${colors.secondary[700]}`,\n\toptionCard: '0 1px 4px 0 rgba(46, 60, 74, 0.16)',\n\toptionCardSelected: '0 2px 8px 0 rgba(46, 60, 74, 0.16)',\n\twideCard: '0 2px 8px 0 rgba(46, 60, 74, 0.16)',\n\n\tlight: '0 1px 4px 0 rgba(46, 60, 74, 0.16)',\n\tmedium: '0 2px 8px 0 rgba(46, 60, 74, 0.16)',\n\tstrong: '0 4px 16px 0 rgba(46, 60, 74, 0.16)',\n\n\tcardHover: `1px 1px 3px ${paletteColors.dark}26`,\n\n\tmodal: `0px 2px 2px rgba(0, 0, 0, 0.05)`,\n\n\toptions: {\n\t\thovered: `0 0 0 1.6px ${colors.neutral[700]}, 0 0 0 2.4px ${colors.primary[50]}`,\n\t},\n\tcomponents: {\n\t\thovered: `0 0 0 2px ${colors.neutral[100]}`,\n\t\tfocused: `0 0 0 2px ${colors.primary[100]}`,\n\t},\n};\n\nconst transition = {\n\tshort: '0.1s cubic-bezier(0.645, 0.045, 0.355, 1)',\n\tlong: '0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',\n\toneSecond: '1s cubic-bezier(0.645, 0.045, 0.355, 1)',\n\tcubicBezier: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n\n\tall: 'all 0.3s ease-in-out',\n\thover:\n\t\t'box-shadow 0.3s ease-in-out, color 0.3s ease-in-out, background 0.3s ease-in-out, border 0.3s ease-in-out',\n\ttypography:\n\t\t'color 0.3s ease-in-out, transform 0.3s ease-in-out, fill 0.3s ease-in-out',\n};\n\nconst inputSize = {\n\theight: '40px',\n};\n\nconst zIndex = {\n\tunder: -1,\n\tmin: 1,\n\tmid: 5,\n\tmax: 10,\n\tnavBar: 20,\n\toverlay: 30,\n};\n\nconst width = {\n\tpage: '1280px',\n};\n\nexport const GoodkindTheme = {\n\tname: 'Goodkind',\n\tcolors,\n\tlighten,\n\twidth,\n\tdarken,\n\tborder,\n\tfonts,\n\tfontSizes,\n\tborderRadius,\n\tboxShadow,\n\ttransition,\n\tbuttonHeight,\n\tbuttonFontSize,\n\tbuttonPadding,\n\ticonButtonPadding,\n\tinputSize,\n\tzIndex,\n};\n\nexport default GoodkindTheme;\n"],"names":["domain","clientId","redirectUri","logoutUrl","operators","orderTypes","ToastMessage","getGoodkindVersion","apiUrl","webRecordingUrl","mixpanelToken","videoPageUrlDomain","storytellerAlgoliaId","hotglueApiKey","hotglueEnvId","ServiceResponse","MixpanelEvent","ToastPosition","top","right","width","GoodKindApp","Android","IOS","intercomAppId","engagementScoreHint","GlobalStyle","CSSLoader","lazy","Routes","ROOT","document","querySelector","props","applicationId","clientToken","site","service","env","sampleRate","trackInteractions","S","dsn","integrations","release","environment","tracesSampleRate","Suspense","fallback","theme","store","useRefreshTokens","cacheLocation","onRedirectCallback","appState","targetUrl","window","location","pathname","hideProgressBar","style","mainType","getApprovalsTypes","editStoriesTypes","bulkApproveTypes","bulkDeleteTypes","bulkRejectTypes","getSingleStoryTypes","getSingleStory","storyId","FilterOptions","filterString","JSON","stringify","type","callAPI","payload","errorMessage","getApprovals","filter","field","value","custom","updateApprovalVideoCaptions","approvalVideoId","captions","updateApprovalVideoField","approvalId","bulkApprove","stories","successMessage","bulkReject","rejectionReason","getAssignedStoriesTypes","getAssignedStories","editStories","EditOptions","storyteller","storytellerFilter","storytellerId","id","bulkDelete","storiesId","data","length","saveAudienceTypes","saveAudience","saveAudienceObject","getAudienceTypes","getAudience","updateAudienceTypes","updateAudience","updateAudienceObject","deleteAudienceTypes","deleteAudience","setAudienceBuildingCount","getAudienceOptionsTypes","getAudienceByIdTypes","grantAccessTypes","grantAccess","workspaceId","email","reload","uploadProfilePictureTypes","uploadProfilePicture","pictureUrl","verifyTypes","setAuthClient","client","getAutomationsTypes","editAutomationTypes","createAutomationTypes","getSingleAutomationTypes","deleteAutomationTypes","getAutomations","createAutomation","automation","editAutomation","deleteAutomation","BBAuthTypes","BBRefreshTypes","BBListTypes","BBFundTypes","BBCampaignTypes","BBAppealTypes","BBMSAccountTypes","BBPublicKeyTypes","GetConstituentOfListsTypes","CORS_URL","AUTH_URL","BASE_URL","redirect_url","subscriptionKey","bbHeaders","Authorization","getBBAuthToken","code","body","grant_type","redirect_uri","headers","getRefreshToken","refresh_token","preserve_refresh_token","getCampaign","access_token","getAppeal","getFund","getCampaignTypes","getCampaignsCountTypes","filterCampaignsTypes","getCampaignOptionsTypes","createCampaignTypes","updateCampaignTypes","createDraftCampaignTypes","launchDraftCampaignTypes","addContactsToCampaignTypes","deactivateCampaignTypes","bulkDeleteDraftCampaignsTypes","getVerifiedStorytellersTypes","deactivateCampaign","deactivateCampaignObject","getVerifiedStorytellers","campaignId","getCampaignsCount","filterCampaigns","options","isFilter","getCampaignOptions","filterOptions","excludeAll","includeBoth","bulkDeleteDraftCampaigns","campaigns","updateCampaign","createCampaignObject","exportCampaignsTypes","exportCampaigns","url","method","responseType","exportSingleCampaignTypes","emailPreviewTypes","sendEmailPreview","noEmail","resendCampaignStoriesTypes","resendStoriesCounttypes","addContactToCampaign","values","getEmailTemplatesTypes","getEmailTemplates","resetCampaignState","saveCampaignTypes","saveCampaign","saveCampaignParams","customName","saveCurrentChildCampaignTypes","saveAndUpdateCurrentChildCampaignTypes","saveCurrentChildCampaign","saveChildCampaignParams","updateCurrentChild","launchCampaignTypes","launchCampaign","editCampaign","campaign","saveCampaignBulkTypes","duplicateCampaignTypes","duplicateCampaign","setCampaignTree","setCampaignName","name","CampaignStateEnum","SyncStatus","pagination","page","pageSize","CampaignDropdownFilter","operator","order","select","StorytellerDropdownFilter","TagDropdownFilter","contacts","exportContactsTypes","exportContactsPerCampaignTypes","filterContactsTypes","complexFilterContactstypes","uploadFlatfileContactsTypes","updateContactTagTypes","deleteContactTagTypes","softDeleteContactsTypes","filterRepliesActivityTypes","filterStoriesActivityTypes","getContactsByCampaignIdTypes","initialState","loading","update","contactsCount","pages","currentPage","error","response","repliesActivity","repliesActivityPagination","storiesActivity","storiesActivityPagination","filterCtaTypes","createCtaTypes","updateCtaTypes","softBulkTypes","getCtaOptionsTypes","filterCtas","createCta","CreateOptions","updateCta","form","softBulk","ctaIds","sendStorytellersTypes","authWorkspaceLoginTypes","sendStorytellers","SendStorytellers","authWorkspaceLogin","OnBoardingForm","workSpaceLoginInitialState","firstName","lastName","workspace","workspaceVertical","logo","state","currencyCode","primaryColor","secondaryColor","smsAlert","communicationPreference","defaultSendingVerified","defaultSmsSendingNumberVerified","billingStoryRates","organizationName","organizationUrl","defaultSmsSendingNumber","onboardingStage","templates","gateways","status","message","onBoardingForm","filterRepliesTypes","getSingleReplyTypes","setReplyStateTypes","bulkUpdateRepliesTypes","filterReplies","getSingleReply","replyId","setReplyState","bulkUpdateReplies","replyIds","sucessMessage","deleted","replyStates","getScheduledTypes","sendNowTypes","getScheduled","sendNow","updateScheduledVideoCaptionsTypes","updateScheduledVideoCaptions","scheduledVideoId","updateScheduledVideoFieldTypes","updateScheduledVideoField","scheduledId","getSentStoriesTypes","archiveStoriesTypes","undeleteStoriesTypes","getSentStories","archiveStories","undeleteStories","updateSentVideoCaptionsTypes","updateSentVideoCaptions","sentVideoId","updateSentVideoFieldTypes","updateSentVideoField","sentId","filterSharedVideoTypes","filterSharedVideo","infinite","paginationSuccessMapper","action","totalPages","count","normalizedData","entities","Object","keys","result","exportContactsSuccessMapper","reducers","NEW_CONTACT_TAGS","forEach","contact","_id","tags","extraReducers","createFetchReducer","audienceId","copyContacts","auxContact","contactId","tagIndex","findIndex","tag","tagId","newTags","edited","contactIds","reduce","objToReturn","rest","replies","entityNormalizer","idAttribute","campaignCount","paginationOptions","updateResponse","createDraftResponse","launchResponse","campaignOptions","savedCampaign","campaignTree","campaignName","totalCampaigns","verifiedStorytellers","normalizeResponse","updateTreeCampaign","saveCampaignMapper","normalizeCampaignTree","campaignSlice","RESET","EDIT_CAMPAIGN","isDraft","SET_CAMPAIGN_TREE","SET_CAMPAIGN_NAME","sharedVideoStats","contactsByPreference","updatedCampaign","pendingStories","pendingStoriesCount","assignedStories","assignedStoriesCount","includes","sendingAddresses","campaignCopy","unshift","label","campaignOptionsAll","currentCampaign","campaignTreeUpdated","map","setStatusChangeInCampaigns","campaignIds","newCampaignsCount","filterRecipesTypes","createFetchTypes","recipes","recipeToEdit","recipeslice","recipesCount","ctas","ctaSlice","ctasCount","ctaOptions","ctaCopy","ObjectToOptions","excludeTime","videos","approvals","approvalPagination","createAssignedStoryResponse","sendVideoResponse","totalStories","defaultStoriesPaginationMapper","cb","filterMapper","bulkActionSuccessMapper","story","storiesRest","storySlice","CLEAR_STORIES","CLEAR_RESPONSE","UPDATE_APPROVAL_VIDEO_CAPTIONS","entries","find","video","UPDATE_APPROVAL_VIDEO_FIELD","approval","STORY_CLEAR_ERROR","approvalSlice","storiesCount","UPDATE_VIDEO_CAPTIONS","UPDATE_VIDEO_FIELD","newStory","assignedTo","fullName","assignedSlice","assignedStoriesPaginationMapper","newObject","replySlice","repliesCount","defaultRepliesPaginationMapper","newReply","reply","newState","scheduledPaginationMapper","sentPaginationMapper","storytellers","storytellerOptions","storytellersCount","storytellerPendingInvites","storytellerPendingInvitesCount","admins","adminsCount","adminPendingInvites","adminPendingInvitesCount","createStorytellerMapper","newStoryteller","storytellerSlice","MANUALLY_ADD_STORYTELLER","newStorytellerId","newStorytellers","SET_VERIFICATION_LOADING","verificationLoading","CLEAR_STORYTELLERS","senderIdentities","storytellerCopy","storyTemplate","templatesCount","templateOptions","CLEAR_TEMPLATES","item","list","template","push","backgroundImageRequired","logoRequired","blackbaudToggle","insufficientData","blackbaudIntegrationRefresh","refresh_token_expires_in","environment_id","blackbaudGatewayRefresh","blackbaudIntegrationAuth","blackbaudGatewayAuth","blackbaudListConstituents","bbLists","bbAppeals","Array","bbFunds","bbCampaign","bbmsAccount","bbPublicKey","BBAuthSlice","endDate","Date","end_date","getTime","todayDate","now","public_key","arr","sharedVideos","sharedVideoSlice","tagSlice","tagOptions","auxTag","text","contactsUpdated","tagsAdded","concat","tagCopy","newTag","transactions","transactionSlice","customAttributesSchema","processStrategy","workspaces","workspaceInfoMapper","workspaceInfo","workspaceCustomAttributes","customAttributes","customAttributeSchema","normalizedCustomAttributes","hasBlackbaudIntegration","integration","test","integrationName","integrationOn","hasSalesforceIntegration","hasBlackbaudGateway","gateway","gatewayOn","workspaceSlice","domainData","zapierKey","firstLogin","RESET_WORKSPACE","domainVerified","dnsRecords","valid","integrationId","disconnectHotglueResponse","actions","storeIdentity","identityToken","TokenStorage","user","authSlice","accessToken","SET_AUTH_CLIENT","authClient","CLEAR_AUTH","logout","returnTo","authConfig","e","audience","audienceSlice","audienceCount","audienceBuildingCount","audienceOptions","SET_AUDIENCE_BUILDING_COUNT","restOfAudience","audienceCopy","automations","automationSlice","automationsCount","newAutomation","automationId","restOfAutomations","storeReducers","auth","recipe","cta","assigned","scheduled","sent","blackbaud","sharedVideo","transaction","onboarding","CLEAR_ALL_EXCEPT_AUTH","reducer","copyAuthState","middleware","serializableCheck","immutableCheck","dispatch","next","callFetch","shouldCallAPI","isArray","Error","requestType","successType","failureType","statusCode","clearAllExceptAuth","filterStoriesTypes","filterStoriesWithInfiniteTypes","exportStoriesTypes","createStoriesTypes","sendStoriesTypes","approvalCountTypes","getStoriesCountTypes","filterStories","createStory","sendStory","SendOptions","clearStories","getStoriesCount","storyStatus","getTemplateOptionsTypes","createStoryTemplateTypes","editStoryTemplateTypes","filterTemplatesTypes","filterTemplates","editStoryTemplate","params","createStoryTemplate","clearTemplates","importStorytellersTypes","verifyStorytellerTypes","resendStorytellerVerificationTypes","getStorytellerOptionsTypes","getStorytellerOptions","importStorytellers","exportStorytellersTypes","filterStorytellersTypes","filterStorytellers","filterStorytellerPendingInvitesTypes","filterStorytellerPendingInvites","search","fields","filterAdminsTypes","filterAdmins","filterAdminPendingInvitesTypes","filterAdminPendingInvites","searchObject","retrieveSavedAdmins","createStorytellerTypes","createStoryteller","updateStorytellerTypes","updateStoryteller","verifyStoryteller","resendStorytellerVerification","sendSmsAppLinkTypes","sendSmsAppLink","uploadStorytellerProfilePictureType","uploadStorytellerProfilePicture","profilePictureForm","clearStorytellers","bulkSoftDeleteStorytellersType","bulkSoftDeleteStorytellers","storytellerIds","filterTagsTypes","createTagsTypes","updateTagsTypes","deleteTagsTypes","createContactTagsTypes","getTagOptionsTypes","getTagOptions","filterTags","updateTag","tagIds","deleteTag","createTags","tagsText","createContactTags","actionPayload","noSuccessToast","filterTransactionTypes","filterTransactions","exportTransactionTypes","exportTransactions","useAppDispatch","uploadVideoTypes","uploadVideo","formdata","crop","filterVideoTypes","filterVideoWithInfiniteTypes","filterVideos","downloadVideoTypes","archiveVideoTypes","archiveVideo","videoId","toggleHideCaptionTypes","toggleHideCaptions","hideCaptions","favoriteVideoTypes","getStreamingUrlTypes","getStreamingUrl","azureId","proxy","getSingleVideoTypes","getSingleVideo","clearVideos","updateCaptionTypes","updateCaptions","language","dataByCue","getParsedCaptionTypes","getParsedCaptions","createCaptionSuggestionTypes","createSuggestion","suggestion","deleteCaptionSuggestionTypes","deleteSuggestion","suggestionId","getCaptionSuggestionTypes","getSuggestions","parent","key","transcript","confidence","index","defaultVideosPaginationMapper","paginationMapper","videosCount","videoSlice","loadingUpload","processingVideos","current","currentId","completed","showProcessingWidget","streaming","parsedCaptions","CLEAR_VIDEOS","jwt","urlWithProxy","newStreamingState","streamingUrl","streamingToken","transcriptText","parse","meta","favorite","videoFromResponse","de","stateCopy","suggestions","toRemove","splice","getWorkspaceByEmailTypes","updateWorkspaceGatewayTypes","WorkspaceInfoTypes","zapierKeyTypes","DisconnectBlackbaudGatewayTypes","disconnectWorkspaceIntegrationTypes","updateWorkspaceIntegrationTypes","updateHotglueCommunicationPreferenceTypes","updateHotglueSyncingScheduleTypes","uploadLogoTypes","updateWithLogoAndBackgroundtypes","updateWorkspaceTypes","verifyWorkspaceDomainDataTypes","verifyDomainTypes","setZapierIntegrationTypes","disconnectHotglueIntegrationTypes","updateCustomAttributesTypes","connectHotglueFlowTypes","getSendDataOutTargetFieldsTypes","setZapierIntegration","getWorkspaceByEmail","updateWorkspaceGateway","obj","DisconnectGateway","gatewayId","publicKey","updateWorkspaceIntegration","integrationBaseUrl","constituent_id","refreshToken","connectHotglueFlow","disconnectWorkspaceIntegration","updateHotglueCommunicationPreference","flowName","flow","defaultCommunicationPreference","updateHotglueSyncingSchedule","getWorkspaceInfo","updateWorkspace","updateWithLogoAndBackground","workspaceForm","verifyWorkspaceDomainData","resetWorkspace","disconnectHotglueIntegration","updateCustomAttributes","getSendDataOutTargetFields","NormalizedObject","textFormat","getAccessToken","stringValue","localStorage","getItem","getAuth0LocalValue","setAccessToken","setItem","getIdentity","setIdentity","defaultMapper","types","successMapper","errorMapper","actionTypes","REQUEST_TYPE","SUCCESS_TYPE","FAILURE_TYPE","reducerObject","handle","resetCustom","entity","definition","mergeStrategy","createdAtDate","createdAt","formattedCreatedAt","toLocaleString","month","getDate","getFullYear","toLocaleTimeString","trim","updatedAtDate","updatedAt","formattedUpdatedAt","undefined","AnimationContainer","transition","short","color","ThreeDotsContainer","Loader","className","animationOptions","loop","autoplay","animationData","rendererSettings","preserveAspectRatio","viewBoxSize","useEffect","defaultProps","colorFill","CustomLoader","showToast","toastType","display","alignItems","background","axios","baseURL","timeout","axiosForExternal","interceptors","request","use","config","res","Promise","reject","paletteColors","neutral","dark","primary","white","alert","warning","success","accent","green","yellow","orange","pink","purple","lighten","coefficient","darken","colors","labelTransparent","sentiment","sentimentTransparent","sentimentStrong","delivered","opened","bounced","pending","processed","dropped","whatsGreen","lightBlue","lightestBlue","lightPurple","softRed","strongRed","lightGreen","secondary","gradients","GoodkindTheme","border","block","fonts","default","fontSizes","h1","h2","large","regular","small","smaller","borderRadius","subtle","smooth","rounded","round","fullRounded","components","boxShadow","hover","bottom","glow","glowActive","bigCards","selectedBigCards","smallCards","selectedSmallCards","optionCard","optionCardSelected","wideCard","light","medium","strong","cardHover","modal","hovered","focused","long","oneSecond","cubicBezier","all","typography","buttonHeight","buttonFontSize","buttonPadding","iconButtonPadding","inputSize","height","zIndex","under","min","mid","max","navBar","overlay"],"sourceRoot":""}