/*
 * Copyright 2026, Jaime Terrats.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
export const PROFILE_ORCHESTRATION_METADATA = {
    developer: {
        activationCriteria: ['Apex, LWC, metadata, SOQL, DML, test class, or implementation work'],
        expectedEvidence: ['unit test result', 'deployment or validation result', 'static analysis result'],
        gates: ['code quality', 'security', 'test coverage'],
    },
    architect: {
        activationCriteria: ['architecture decision, ADR, integration pattern, data model, or cross-cutting concern'],
        expectedEvidence: ['ADR or design note', 'diagram or option comparison', 'Well-Architected assessment'],
        gates: ['architecture', 'security', 'governance'],
    },
    ba: {
        activationCriteria: [
            'requirements, user story, acceptance criteria, process mapping, or stakeholder clarification',
        ],
        expectedEvidence: ['refined story', 'acceptance criteria', 'process notes'],
        gates: ['scope', 'traceability'],
    },
    pm: {
        activationCriteria: ['roadmap, milestone, release scope, dependency, risk, or stakeholder status'],
        expectedEvidence: ['priority decision', 'release or sprint plan', 'risk and dependency summary'],
        gates: ['scope', 'readiness'],
    },
    mulesoft: {
        activationCriteria: ['API-led integration, Mule flow, RAML, OAS, connector, or MUnit work'],
        expectedEvidence: ['API contract', 'MUnit result', 'integration test result'],
        gates: ['integration', 'contract', 'security'],
    },
    ux: {
        activationCriteria: ['LWC UI, SLDS, accessibility, interaction flow, empty state, or user research work'],
        expectedEvidence: ['UI checklist', 'accessibility result', 'screenshot or flow review'],
        gates: ['ux', 'accessibility'],
    },
    cgcloud: {
        activationCriteria: ['Consumer Goods Cloud modeler, visit, retail execution, promotion, or cgcloud namespace work'],
        expectedEvidence: ['modeler configuration note', 'domain validation result', 'test data note'],
        gates: ['domain', 'data integrity'],
    },
    devops: {
        activationCriteria: ['pipeline, deployment, package, scratch org, CI, environment, or release automation work'],
        expectedEvidence: ['pipeline result', 'deployment validation', 'rollback note'],
        gates: ['release', 'environment', 'rollback'],
    },
    qa: {
        activationCriteria: ['test strategy, regression, Playwright, acceptance validation, or defect reproduction work'],
        expectedEvidence: ['test plan', 'execution result', 'defect evidence or trace'],
        gates: ['qa', 'regression'],
    },
    crma: {
        activationCriteria: ['CRM Analytics recipe, dataflow, dashboard, SAQL, dataset, or security predicate work'],
        expectedEvidence: ['recipe or dataflow validation', 'dashboard screenshot', 'security predicate review'],
        gates: ['analytics', 'data security'],
    },
    commerce: {
        activationCriteria: ['B2B/B2C Commerce storefront, cartridge, pipeline, OCAPI, SCAPI, or Business Manager work'],
        expectedEvidence: ['storefront validation', 'API contract result', 'commerce smoke test'],
        gates: ['commerce', 'performance'],
    },
    data360: {
        activationCriteria: [
            'Data Cloud stream, DMO, identity resolution, calculated insight, segment, or activation work',
        ],
        expectedEvidence: ['data mapping', 'identity or segment validation', 'activation result'],
        gates: ['data quality', 'privacy'],
    },
    admin: {
        activationCriteria: ['declarative setup, permission set, flow, page layout, object manager, or automation work'],
        expectedEvidence: ['configuration note', 'setup path confirmation', 'admin validation result'],
        gates: ['configuration', 'permissions'],
    },
    sfmc: {
        activationCriteria: [
            'Marketing Cloud journey, email, automation, data extension, personalization, or consent work',
        ],
        expectedEvidence: ['journey validation', 'send preview', 'consent or data extension review'],
        gates: ['marketing', 'consent'],
    },
    security: {
        activationCriteria: ['FLS, sharing, secrets, threat model, compliance, privacy, or vulnerability concern'],
        expectedEvidence: ['security review', 'threat model note', 'scan or permission evidence'],
        gates: ['security', 'privacy', 'compliance'],
    },
    salescloud: {
        activationCriteria: ['Sales Cloud lead, opportunity, forecast, territory, quote, or sales process work'],
        expectedEvidence: ['pipeline validation', 'forecast review', 'territory assignment check'],
        gates: ['sales process', 'forecast accuracy'],
    },
    service: {
        activationCriteria: ['Service Cloud case, entitlement, omni-channel, knowledge, console, or service process work'],
        expectedEvidence: ['case flow validation', 'service process note', 'agent console review'],
        gates: ['service process', 'operability'],
    },
    cpq: {
        activationCriteria: ['CPQ quote, product rule, price rule, calculator, amendment, renewal, or contract work'],
        expectedEvidence: ['quote calculation result', 'rule validation', 'pricing scenario review'],
        gates: ['pricing', 'contract integrity'],
    },
    omnistudio: {
        activationCriteria: ['OmniScript, DataRaptor, Integration Procedure, FlexCard, or Industries work'],
        expectedEvidence: ['OmniStudio preview', 'DataRaptor or IP test result', 'deployment note'],
        gates: ['industries', 'integration'],
    },
    fsl: {
        activationCriteria: ['Field Service appointment, scheduling, mobile worker, territory, or optimization work'],
        expectedEvidence: ['scheduling validation', 'mobile flow review', 'territory model note'],
        gates: ['field operations', 'mobile'],
    },
    ai: {
        activationCriteria: ['Agentforce, prompt, topic, action, grounding, model behavior, or evaluation work'],
        expectedEvidence: ['prompt or topic review', 'eval result', 'grounding/source review'],
        gates: ['ai behavior', 'safety', 'grounding'],
    },
    slack: {
        activationCriteria: ['Slack app, workflow, channel experience, notification, or human-agent collaboration work'],
        expectedEvidence: ['workflow validation', 'message payload review', 'collaboration flow note'],
        gates: ['collaboration', 'notification'],
    },
    tableau: {
        activationCriteria: ['Tableau dashboard, datasource, extract, permission, VizQL, or analytics embedding work'],
        expectedEvidence: ['dashboard screenshot', 'datasource validation', 'permission review'],
        gates: ['analytics', 'data access'],
    },
    'experience-cloud': {
        activationCriteria: [
            'Experience Cloud site, LWR/Aura architecture, guest user security, CMS content, or community deployment work',
        ],
        expectedEvidence: ['site deployment confirmation', 'guest user security review', 'publish confirmation'],
        gates: ['security', 'publish'],
    },
    'release-manager': {
        activationCriteria: [
            'Production deployment, sandbox promotion, validate/quick-deploy sequencing, or rollback planning',
        ],
        expectedEvidence: ['validation job id', 'deployment confirmation', 'smoke test results'],
        gates: ['qa-gate', 'deploy-approval'],
    },
    fsc: {
        activationCriteria: [
            'Financial Services Cloud data model, FinServ objects, ARC, household, rollup, referral, or FSC managed package work',
        ],
        expectedEvidence: ['FSC object validation', 'rollup result', 'ARC or referral flow review'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    manufacturing: {
        activationCriteria: [
            'Manufacturing Cloud data model, Sales Agreements, Account-Based Forecasting, Rebate Management, MfgProgram, or manufacturing managed package work',
        ],
        expectedEvidence: ['agreement or forecast validation', 'rebate calculation result', 'ERP integration review'],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    communications: {
        activationCriteria: [
            'Communications Cloud data model, Industries CPQ, Vlocity product catalog, order decomposition, orchestration plans, TMF alignment, or vlocity_cmt namespace work',
        ],
        expectedEvidence: ['catalog or order validation', 'orchestration plan result', 'BSS/OSS integration review'],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    health: {
        activationCriteria: [
            'Health Cloud data model, patient records, care plans, clinical data model, or health managed package work',
        ],
        expectedEvidence: ['health object validation', 'care plan review', 'HIPAA compliance check'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    automotive: {
        activationCriteria: [
            'Automotive Cloud data model, Vehicle lifecycle, VehicleDefinition, Vehicle, DealerPerformance, TestDrive, TradeIn, or automotive managed package work',
        ],
        expectedEvidence: ['vehicle data model validation', 'dealer performance review', 'DMS integration test result'],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    education: {
        activationCriteria: [
            'Education Cloud data model, EDA objects, student lifecycle, admissions, course enrollment, program plans, hed__ namespace, or education managed package work',
        ],
        expectedEvidence: ['EDA object validation', 'student lifecycle flow review', 'FERPA compliance check'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    netzero: {
        activationCriteria: [
            'Net Zero Cloud data model, carbon accounting, emission sources, StnryAssetEnvrSrc, BldgEnergyIntensity, ESG reporting, sustainability goals, or sustainability cloud work',
        ],
        expectedEvidence: ['emission calculation validation', 'ESG disclosure mapping review', 'audit trail verification'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    nonprofit: {
        activationCriteria: [
            'Nonprofit Cloud data model, NPSP objects, donations, recurring donations, GAU allocations, program management, gift entry, npsp__ namespace, or nonprofit managed package work',
        ],
        expectedEvidence: ['donation pipeline validation', 'program engagement review', 'NPSP package safety check'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    'public-sector': {
        activationCriteria: [
            'Public Sector Solutions data model, BusinessLicenseApplication, Inspections, RegulatoryTrxnFee, PublicComplaint, permitting, or public sector managed package work',
        ],
        expectedEvidence: ['licensing workflow validation', 'inspection flow review', 'accessibility compliance check'],
        gates: ['data integrity', 'compliance', 'package-safety'],
    },
    media: {
        activationCriteria: [
            'Media Cloud data model, MediaChannel, MediaPlan, AdSpace, SubscriptionPlan, SubscriberProfile, ad sales, subscription management, or media cloud work',
        ],
        expectedEvidence: ['media plan validation', 'subscription lifecycle review', 'ad server integration test result'],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    energy: {
        activationCriteria: [
            'Energy & Utilities Cloud data model, ServicePoint, UtilityMeter, UtilityMeterReading, RatePlan, DERProgram, meter data management, or energy cloud work',
        ],
        expectedEvidence: ['meter data validation', 'rate plan calculation review', 'AMI integration test result'],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    revenue: {
        activationCriteria: [
            'Revenue Cloud data model, Salesforce Billing, blng__ objects, invoices, payments, billing schedules, subscriptions, revenue recognition, or payment processing work',
        ],
        expectedEvidence: ['billing schedule validation', 'payment gateway test result', 'invoice generation review'],
        gates: ['data integrity', 'financial compliance', 'package-safety'],
    },
    maps: {
        activationCriteria: [
            'Salesforce Maps data model, maps__ objects, territory planning, route optimization, live tracking, geofencing, location intelligence, or maps managed package work',
        ],
        expectedEvidence: ['territory alignment validation', 'route optimization result', 'location data privacy review'],
        gates: ['data integrity', 'privacy', 'package-safety'],
    },
    loyalty: {
        activationCriteria: [
            'Loyalty Management data model, LoyaltyProgram, LoyaltyProgramMember, TransactionJournal, tiers, promotions, vouchers, earn/redeem rules, or loyalty platform work',
        ],
        expectedEvidence: ['program configuration validation', 'earn/redeem calculation result', 'fraud detection review'],
        gates: ['data integrity', 'financial compliance', 'package-safety'],
    },
    industries: {
        activationCriteria: [
            'Industries Cloud platform setup, OmniStudio components (OmniScripts, DataRaptors, Integration Procedures, FlexCards), Industries Order Management, Action Plans, Decision Tables, vlocity_cmt__ or omnistudio__ namespace objects, or cross-vertical Industries platform work',
        ],
        expectedEvidence: [
            'OmniStudio component validation',
            'orchestration plan test result',
            'package compatibility review',
        ],
        gates: ['data integrity', 'integration', 'package-safety'],
    },
    ta: {
        activationCriteria: ['technical architecture, platform governance, or cross-team technical leadership'],
        expectedEvidence: ['ADR', 'architecture diagram', 'technical spike outcome'],
        gates: ['architecture', 'governance'],
    },
    sa: {
        activationCriteria: ['solution design, cross-cloud integration, or end-to-end solution architecture'],
        expectedEvidence: ['solution design document', 'integration architecture', 'fit-gap analysis'],
        gates: ['architecture', 'feasibility'],
    },
};
export function getProfileOrchestrationMetadata(profile) {
    const id = typeof profile === 'string' ? profile : profile.id;
    return PROFILE_ORCHESTRATION_METADATA[id];
}
export function withProfileOrchestrationMetadata(profile) {
    return { ...profile, orchestration: getProfileOrchestrationMetadata(profile) };
}
//# sourceMappingURL=metadata.js.map