{ "version": 3, "sources": ["libs/automata/shared/src/lib/constants.ts"], "sourcesContent": ["import { Context } from '@vendasta/automata';\nimport { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport const AUTOMATION_CONTEXT_INJECTION_TOKEN = 'AUTOMATION_CONTEXT';\nexport const AUTOMATION_NAMESPACE_INJECTION_TOKEN$ = 'AUTOMATION_NAMESPACE';\nexport const AUTOMATION_PARTNER_ID_INJECTION_TOKEN$ = 'AUTOMATION_PARTNER_ID';\nexport const AUTOMATION_MARKET_ID_INJECTION_TOKEN$ = 'AUTOMATION_MARKET_ID';\n\nexport const AUTOMATION_VARIABLE_MENU_DIALOG = 'AUTOMATION_VARIABLE_MENU_DIALOG';\n\nexport interface VBCEntryInfo {\n url: string;\n name: string;\n}\n\nexport interface BusinessCenterService {\n getVBCEntryUrl(accountGroupId?: string, page?: string): Observable;\n}\n\nexport const AUTOMATION_BUSINESS_ENTRY_URL_SERVICE = new InjectionToken(\n '[Automations]: We need the business entry url for sending notifications to customers',\n);\n\nexport interface AccessService {\n hasAccessToFeature(feature: string): Observable;\n\n hasAccessToFeatures(features: string[]): Observable;\n}\n\nexport const AUTOMATIONS_ACCESS_SERVICE = new InjectionToken(\n '[Automations - Access Service]: If the user has access to subscription features',\n);\n\nexport const AUTOMATION_IS_USER_SUPERADMIN$ = 'AUTOMATION_IS_USER_SUPERADMIN$';\n\nexport interface Market {\n name: string;\n partner_id: string;\n market_id: string;\n}\n\nexport interface MarketsService {\n markets$: Observable;\n}\n\nexport const AUTOMATIONS_MARKETS_SERVICE = new InjectionToken(\n '[Automations Market Service]: Markets are required for the market filter, this should only be provided in PCC but we need to segment our task definition providing first',\n);\n\nexport const AUTOMATIONS_ROUTE_PREFIX$ = new InjectionToken>(\n '[Automations - Route prefix service]: If the user has access to subscription features',\n);\n\nexport interface Tab {\n path: string;\n label: string;\n}\n\nexport interface ContextConfig {\n systemAutomations: {\n titleTranslationKey: string;\n };\n canCreateFromTemplate: boolean;\n hideUserFilterOnAutomationsTable: boolean;\n whitelabel: boolean;\n baseAutomationsRoute: string;\n}\n\nconst PartnerConfigContext: ContextConfig = {\n systemAutomations: {\n titleTranslationKey: 'AUTOMATIONS.COMMON.SYSTEM_AUTOMATIONS',\n },\n canCreateFromTemplate: true,\n hideUserFilterOnAutomationsTable: false,\n whitelabel: false,\n baseAutomationsRoute: '/automations',\n};\n\nconst SMBConfigContext: ContextConfig = {\n systemAutomations: {\n titleTranslationKey: 'AUTOMATIONS.COMMON.AUTOMATIONS',\n },\n canCreateFromTemplate: false,\n hideUserFilterOnAutomationsTable: true, // SMBs aren't currently exposed to all the users that have access to their agid so hide this for now\n whitelabel: true,\n baseAutomationsRoute: '/automations/all',\n};\n\nexport const ContextConfigMap = {\n [Context.AUTOMATION_CONTEXT_UNSET]: null,\n [Context.AUTOMATION_CONTEXT_SMB]: SMBConfigContext,\n [Context.AUTOMATION_CONTEXT_PARTNER]: PartnerConfigContext,\n};\n"], "mappings": "iFAIO,IAAMA,EAAqC,qBACrCC,EAAwC,uBACxCC,EAAyC,wBACzCC,EAAwC,uBAExCC,EAAkC,kCAWlCC,EAAwC,IAAIC,EACvD,sFAAsF,EAS3EC,EAA6B,IAAID,EAC5C,iFAAiF,EAGtEE,EAAiC,iCAYjCC,EAA8B,IAAIH,EAC7C,0KAA0K,EAG/JI,EAA4B,IAAIJ,EAC3C,uFAAuF,EAkBnFK,EAAsC,CAC1CC,kBAAmB,CACjBC,oBAAqB,yCAEvBC,sBAAuB,GACvBC,iCAAkC,GAClCC,WAAY,GACZC,qBAAsB,gBAGlBC,EAAkC,CACtCN,kBAAmB,CACjBC,oBAAqB,kCAEvBC,sBAAuB,GACvBC,iCAAkC,GAClCC,WAAY,GACZC,qBAAsB,oBAGXE,EAAmB,CAC9B,CAACC,EAAQC,wBAAwB,EAAG,KACpC,CAACD,EAAQE,sBAAsB,EAAGJ,EAClC,CAACE,EAAQG,0BAA0B,EAAGZ", "names": ["AUTOMATION_CONTEXT_INJECTION_TOKEN", "AUTOMATION_NAMESPACE_INJECTION_TOKEN$", "AUTOMATION_PARTNER_ID_INJECTION_TOKEN$", "AUTOMATION_MARKET_ID_INJECTION_TOKEN$", "AUTOMATION_VARIABLE_MENU_DIALOG", "AUTOMATION_BUSINESS_ENTRY_URL_SERVICE", "InjectionToken", "AUTOMATIONS_ACCESS_SERVICE", "AUTOMATION_IS_USER_SUPERADMIN$", "AUTOMATIONS_MARKETS_SERVICE", "AUTOMATIONS_ROUTE_PREFIX$", "PartnerConfigContext", "systemAutomations", "titleTranslationKey", "canCreateFromTemplate", "hideUserFilterOnAutomationsTable", "whitelabel", "baseAutomationsRoute", "SMBConfigContext", "ContextConfigMap", "Context", "AUTOMATION_CONTEXT_UNSET", "AUTOMATION_CONTEXT_SMB", "AUTOMATION_CONTEXT_PARTNER"] }