@zysec-ai/cpod-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/_generated/paths.ts","../src/http/errors.ts","../src/http/token-manager.ts","../src/http/trace.ts","../src/http/client.ts","../src/auth/service.ts","../src/edms/crud.ts","../src/people/service.ts","../src/_generated/build-path.ts","../src/groups/service.ts","../src/technology.assets/service.ts","../src/entitlements.items/service.ts","../src/vulnerabilities.items/service.ts","../src/compliance-controls/service.ts","../src/cloud-resources.items/service.ts","../src/licenses.items/service.ts","../src/assets.items/service.ts","../src/risk/service.ts","../src/types/index.ts","../src/relationships.edges/service.ts","../src/datasources/service.ts","../src/storage/files.ts","../src/storage/db.ts","../src/storage/kv.ts","../src/storage/objects.ts","../src/storage/records.ts","../src/skills/service.ts","../src/workflows/service.ts","../src/jobs/service.ts","../src/masking/service.ts","../src/telemetry/audit.ts","../src/telemetry/traces.ts","../src/telemetry/events.ts","../src/telemetry/index.ts","../src/flags/service.ts","../src/secrets/service.ts","../src/organizations/service.ts","../src/pods/service.ts","../src/credentials/service.ts","../src/events/service.ts","../src/user-profiles/service.ts","../src/mcp/service.ts","../src/mcp/manifest.ts","../src/contracts/service.ts","../src/work/service.ts","../src/investments/service.ts","../src/performance/service.ts","../src/okr/service.ts","../src/employee/service.ts","../src/projects/service.ts","../src/customer/service.ts","../src/grc/service.ts","../src/soc/service.ts","../src/learning/service.ts","../src/rfp/service.ts","../src/knowledge/service.ts","../src/integration/service.ts","../src/notifications/service.ts","../src/approvals/service.ts","../src/helpdesk/service.ts","../src/hr/service.ts","../src/finance/service.ts","../src/org/service.ts","../src/policies/service.ts","../src/catalog/service.ts","../src/procurement/service.ts","../src/audit.records/service.ts","../src/tenants/service.ts","../src/chat/service.ts","../src/agents/service.ts","../src/mcp-servers/service.ts","../src/memory/service.ts","../src/workspaces/service.ts","../src/apps/service.ts","../src/registry/service.ts","../src/storage-sqlite/service.ts","../src/operations/service.ts","../src/analytics/service.ts","../src/graph/service.ts","../src/planner/service.ts","../src/postmortems/service.ts","../src/vendor/service.ts","../src/marketing/service.ts","../src/legal/service.ts","../src/surveys/service.ts","../src/process/service.ts","../src/clientops/service.ts","../src/integrations/service.ts","../src/completions/service.ts","../src/mutations/service.ts","../src/timeline/service.ts","../src/signals/service.ts","../src/common/service.ts","../src/client.ts","../src/events/types.ts","../src/mcp/invoke.ts","../src/mcp/validate.ts","../src/tenants/types.ts","../src/registry/validate.ts"],"names":["DEFAULT_BASE_URL","PAGINATION","ID_PARAM","qs","manifest","withQuery","AttentionSignalService","EventType","TenantStatus","VALID_METHODS","TOOL_NAME_RE"],"mappings":";;;;;;;;;;AACO,IAAM,KAAA,GAAQ;AAAA,EACnB,iBAAA,EAAmB,wBAAA;AAAA,EACnB,4BAAA,EAA8B,mCAAA;AAAA,EAC9B,MAAA,EAAQ,gBAAA;AAAA,EACR,OAAA,EAAS,iBAAA;AAAA,EACT,eAAA,EAAiB,2BAAA;AAAA,EACjB,cAAA,EAAgB,0BAAA;AAAA,EAChB,iBAAA,EAAmB,4BAAA;AAAA,EACnB,yBAAA,EAA2B,sCAAA;AAAA,EAC3B,kCAAA,EAAoC,gDAAA;AAAA,EACpC,cAAA,EAAgB,yBAAA;AAAA,EAChB,sBAAA,EAAwB,mCAAA;AAAA,EACxB,4BAAA,EAA8B,0CAAA;AAAA,EAC9B,8BAAA,EAAgC,4CAAA;AAAA,EAChC,IAAA,EAAM,cAAA;AAAA,EACN,OAAA,EAAS,kBAAA;AAAA,EACT,eAAA,EAAiB,4BAAA;AAAA,EACjB,MAAA,EAAQ,iBAAA;AAAA,EACR,cAAA,EAAgB,2BAAA;AAAA,EAChB,YAAA,EAAc,uBAAA;AAAA,EACd,oBAAA,EAAsB,iCAAA;AAAA,EACtB,WAAA,EAAa,uBAAA;AAAA,EACb,4BAAA,EAA8B,0CAAA;AAAA,EAC9B,mBAAA,EAAqB,iCA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A,UAAAA,CAAS,KAAK,CAAA,EAAG;AAClC,MAAA,MAAA,CAAO,KAAK,wBAAwB,CAAA;AAAA,IACtC,CAAA,MAAO;AACL,MAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAIA,UAAAA,CAAS,KAAA,CAAM,QAAQ,CAAA,EAAA,EAAK;AAC9C,QAAA,MAAM,IAAA,GAA4BA,UAAAA,CAAS,KAAA,CAAM,CAAC,CAAA;AAClD,QAAA,IAAI,CAAC,IAAA,EAAM;AACX,QAAA,MAAM,MAAA,GAAS,gBAAgB,IAAI,CAAA;AACnC,QAAA,IAAI,CAAC,OAAO,KAAA,EAAO;AACjB,UAAA,KAAA,MAAW,GAAA,IAAO,OAAO,MAAA,EAAQ;AAC/B,YAAA,MAAA,CAAO,IAAA,CAAK,SAAS,CAAC,CAAA,GAAA,EAAM,KAAK,SAAA,IAAa,SAAS,CAAA,GAAA,EAAM,GAAG,CAAA,CAAE,CAAA;AAAA,UACpE;AAAA,QACF;AACA,QAAA,IAAI,KAAK,SAAA,EAAW;AAClB,UAAA,IAAI,SAAA,CAAU,GAAA,CAAI,IAAA,CAAK,SAAS,CAAA,EAAG;AACjC,YAAA,MAAA,CAAO,IAAA,CAAK,CAAA,sBAAA,EAAyB,IAAA,CAAK,SAAS,CAAA,CAAA,CAAG,CAAA;AAAA,UACxD;AACA,UAAA,SAAA,CAAU,GAAA,CAAI,KAAK,SAAS,CAAA;AAAA,QAC9B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,KAAA,EAAO,MAAA,CAAO,MAAA,KAAW,GAAG,MAAA,EAAO;AAC9C","file":"index.mjs","sourcesContent":["// AUTO-GENERATED from docs/api-contract/backend-openapi.json. Do NOT edit.\nexport const PATHS = {\n wellKnownJwksJson: \"/.well-known/jwks.json\",\n wellKnownOpenidConfiguration: \"/.well-known/openid-configuration\",\n agents: \"/api/v1/agents\",\n agents2: \"/api/v1/agents/\",\n agentsByAgentId: \"/api/v1/agents/{agent_id}\",\n agentsByItemId: \"/api/v1/agents/{item_id}\",\n approvalsRequests: \"/api/v1/approvals/requests\",\n approvalsRequestsByItemId: \"/api/v1/approvals/requests/{item_id}\",\n approvalsRequestsByRequestIdCancel: \"/api/v1/approvals/requests/{request_id}/cancel\",\n approvalsSteps: \"/api/v1/approvals/steps\",\n approvalsStepsByItemId: \"/api/v1/approvals/steps/{item_id}\",\n approvalsStepsByStepIdDecide: \"/api/v1/approvals/steps/{step_id}/decide\",\n approvalsStepsByStepIdDelegate: \"/api/v1/approvals/steps/{step_id}/delegate\",\n apps: \"/api/v1/apps\",\n appsMcp: \"/api/v1/apps/mcp\",\n appsMcpByItemId: \"/api/v1/apps/mcp/{item_id}\",\n appsMe: \"/api/v1/apps/me\",\n appsMeByItemId: \"/api/v1/apps/me/{item_id}\",\n appsRegister: \"/api/v1/apps/register\",\n appsRegisterByItemId: \"/api/v1/apps/register/{item_id}\",\n appsByAppId: \"/api/v1/apps/{app_id}\",\n appsByAppIdCredentialsRotate: \"/api/v1/apps/{app_id}/credentials/rotate\",\n appsByAppIdMcpProxy: \"/api/v1/apps/{app_id}/mcp/proxy\",\n appsByAppIdMcpTools: \"/api/v1/apps/{app_id}/mcp/tools\",\n appsByAppIdMcpToolsByName: \"/api/v1/apps/{app_id}/mcp/tools/{name}\",\n appsByItemId: \"/api/v1/apps/{item_id}\",\n auditEvents: \"/api/v1/audit-events\",\n auditEventsActions: \"/api/v1/audit-events/actions\",\n auditEventsActionsByItemId: \"/api/v1/audit-events/actions/{item_id}\",\n auditEventsByItemId: \"/api/v1/audit-events/{item_id}\",\n authAcceptInvite: \"/api/v1/auth/accept-invite\",\n authAcceptInviteByItemId: \"/api/v1/auth/accept-invite/{item_id}\",\n authChangePassword: \"/api/v1/auth/change-password\",\n authChangePasswordByItemId: \"/api/v1/auth/change-password/{item_id}\",\n authForgotPassword: \"/api/v1/auth/forgot-password\",\n authForgotPasswordByItemId: \"/api/v1/auth/forgot-password/{item_id}\",\n authInvite: \"/api/v1/auth/invite\",\n authInviteByItemId: \"/api/v1/auth/invite/{item_id}\",\n authLogin: \"/api/v1/auth/login\",\n authLoginByItemId: \"/api/v1/auth/login/{item_id}\",\n authMe: \"/api/v1/auth/me\",\n authMeByItemId: \"/api/v1/auth/me/{item_id}\",\n authOidcCallback: \"/api/v1/auth/oidc/callback\",\n authOidcCallbackByItemId: \"/api/v1/auth/oidc/callback/{item_id}\",\n authOidcExchange: \"/api/v1/auth/oidc/exchange\",\n authOidcExchangeByItemId: \"/api/v1/auth/oidc/exchange/{item_id}\",\n authOidcFinish: \"/api/v1/auth/oidc/finish\",\n authOidcFinishByItemId: \"/api/v1/auth/oidc/finish/{item_id}\",\n authOidcLogin: \"/api/v1/auth/oidc/login\",\n authOidcLoginByItemId: \"/api/v1/auth/oidc/login/{item_id}\",\n authOidcProviders: \"/api/v1/auth/oidc/providers\",\n authOidcProvidersByItemId: \"/api/v1/auth/oidc/providers/{item_id}\",\n authOidcProvidersByProviderId: \"/api/v1/auth/oidc/providers/{provider_id}\",\n authOidcResult: \"/api/v1/auth/oidc/result\",\n authOidcResultByItemId: \"/api/v1/auth/oidc/result/{item_id}\",\n authRefresh: \"/api/v1/auth/refresh\",\n authRefreshByItemId: \"/api/v1/auth/refresh/{item_id}\",\n authResetPassword: \"/api/v1/auth/reset-password\",\n authResetPasswordByItemId: \"/api/v1/auth/reset-password/{item_id}\",\n authRevoke: \"/api/v1/auth/revoke\",\n authRevokeByItemId: \"/api/v1/auth/revoke/{item_id}\",\n authScimToken: \"/api/v1/auth/scim/token\",\n authScimTokenRotate: \"/api/v1/auth/scim/token/rotate\",\n authScimTokenRotateByItemId: \"/api/v1/auth/scim/token/rotate/{item_id}\",\n authScimTokenByItemId: \"/api/v1/auth/scim/token/{item_id}\",\n authToken: \"/api/v1/auth/token\",\n authTokenByItemId: \"/api/v1/auth/token/{item_id}\",\n authValidate: \"/api/v1/auth/validate\",\n authValidateByItemId: \"/api/v1/auth/validate/{item_id}\",\n catalogCategories: \"/api/v1/catalog/categories\",\n catalogCategoriesByItemId: \"/api/v1/catalog/categories/{item_id}\",\n catalogProducts: \"/api/v1/catalog/products\",\n catalogProductsByItemId: \"/api/v1/catalog/products/{item_id}\",\n chat: \"/api/v1/chat\",\n chatArtifacts: \"/api/v1/chat/artifacts\",\n chatArtifactsByArtifactId: \"/api/v1/chat/artifacts/{artifact_id}\",\n chatArtifactsByArtifactIdRevise: \"/api/v1/chat/artifacts/{artifact_id}/revise\",\n chatArtifactsByArtifactIdVersions: \"/api/v1/chat/artifacts/{artifact_id}/versions\",\n chatArtifactsByItemId: \"/api/v1/chat/artifacts/{item_id}\",\n chatCompletions: \"/api/v1/chat/completions\",\n chatCompletionsRegenerateByMessageId: \"/api/v1/chat/completions/regenerate/{message_id}\",\n chatCompletionsByItemId: \"/api/v1/chat/completions/{item_id}\",\n chatHitl: \"/api/v1/chat/hitl\",\n chatHitlByApprovalIdResolve: \"/api/v1/chat/hitl/{approval_id}/resolve\",\n chatHitlByItemId: \"/api/v1/chat/hitl/{item_id}\",\n chatMessages: \"/api/v1/chat/messages\",\n chatMessagesByItemId: \"/api/v1/chat/messages/{item_id}\",\n chatMessagesByMessageIdFeedback: \"/api/v1/chat/messages/{message_id}/feedback\",\n chatByChatId: \"/api/v1/chat/{chat_id}\",\n chatByChatIdArtifacts: \"/api/v1/chat/{chat_id}/artifacts\",\n chatByChatIdMessages: \"/api/v1/chat/{chat_id}/messages\",\n chatByItemId: \"/api/v1/chat/{item_id}\",\n cloudResources: \"/api/v1/cloud-resources\",\n cloudResourcesByItemId: \"/api/v1/cloud-resources/{item_id}\",\n complianceControls: \"/api/v1/compliance-controls\",\n complianceControlsByItemId: \"/api/v1/compliance-controls/{item_id}\",\n containers: \"/api/v1/containers\",\n containers2: \"/api/v1/containers/\",\n containersByItemId: \"/api/v1/containers/{item_id}\",\n containersByRunId: \"/api/v1/containers/{run_id}\",\n contractsContracts: \"/api/v1/contracts/contracts\",\n contractsContractsByItemId: \"/api/v1/contracts/contracts/{item_id}\",\n contractsObligations: \"/api/v1/contracts/obligations\",\n contractsObligationsByItemId: \"/api/v1/contracts/obligations/{item_id}\",\n contractsVendors: \"/api/v1/contracts/vendors\",\n contractsVendorsByItemId: \"/api/v1/contracts/vendors/{item_id}\",\n credentials: \"/api/v1/credentials\",\n credentialsByCredentialId: \"/api/v1/credentials/{credential_id}\",\n credentialsByCredentialIdRevoke: \"/api/v1/credentials/{credential_id}/revoke\",\n credentialsByItemId: \"/api/v1/credentials/{item_id}\",\n crmAccounts: \"/api/v1/crm/accounts\",\n crmAccountsByItemId: \"/api/v1/crm/accounts/{item_id}\",\n crmActivities: \"/api/v1/crm/activities\",\n crmActivitiesByItemId: \"/api/v1/crm/activities/{item_id}\",\n crmContacts: \"/api/v1/crm/contacts\",\n crmContactsByItemId: \"/api/v1/crm/contacts/{item_id}\",\n crmDeals: \"/api/v1/crm/deals\",\n crmDealsByItemId: \"/api/v1/crm/deals/{item_id}\",\n crmLineItems: \"/api/v1/crm/line-items\",\n crmLineItemsByItemId: \"/api/v1/crm/line-items/{item_id}\",\n crmQuotes: \"/api/v1/crm/quotes\",\n crmQuotesByItemId: \"/api/v1/crm/quotes/{item_id}\",\n datasources: \"/api/v1/datasources\",\n datasourcesByItemId: \"/api/v1/datasources/{item_id}\",\n developerRuns: \"/api/v1/developer/runs\",\n developerRunsByItemId: \"/api/v1/developer/runs/{item_id}\",\n developerRunsByRunId: \"/api/v1/developer/runs/{run_id}\",\n developerSettings: \"/api/v1/developer/settings\",\n developerSettingsByItemId: \"/api/v1/developer/settings/{item_id}\",\n developerTestDbSeed: \"/api/v1/developer/test-db/seed\",\n developerTestDbSeedByItemId: \"/api/v1/developer/test-db/seed/{item_id}\",\n edmProjectsFeatures: \"/api/v1/edm-projects/features\",\n edmProjectsFeaturesByItemId: \"/api/v1/edm-projects/features/{item_id}\",\n edmProjectsProjects: \"/api/v1/edm-projects/projects\",\n edmProjectsProjectsByItemId: \"/api/v1/edm-projects/projects/{item_id}\",\n edmProjectsSprints: \"/api/v1/edm-projects/sprints\",\n edmProjectsSprintsByItemId: \"/api/v1/edm-projects/sprints/{item_id}\",\n edmProjectsTasks: \"/api/v1/edm-projects/tasks\",\n edmProjectsTasksByItemId: \"/api/v1/edm-projects/tasks/{item_id}\",\n employeeCalendarEvents: \"/api/v1/employee/calendar-events\",\n employeeCalendarEventsByItemId: \"/api/v1/employee/calendar-events/{item_id}\",\n employeeLeaveRequests: \"/api/v1/employee/leave-requests\",\n employeeLeaveRequestsByItemId: \"/api/v1/employee/leave-requests/{item_id}\",\n employeeMeetingNotes: \"/api/v1/employee/meeting-notes\",\n employeeMeetingNotesByItemId: \"/api/v1/employee/meeting-notes/{item_id}\",\n employeeSkills: \"/api/v1/employee/skills\",\n employeeSkillsByItemId: \"/api/v1/employee/skills/{item_id}\",\n entitlements: \"/api/v1/entitlements\",\n entitlementsByItemId: \"/api/v1/entitlements/{item_id}\",\n events: \"/api/v1/events\",\n events2: \"/api/v1/events/\",\n eventsByItemId: \"/api/v1/events/{item_id}\",\n financeBudgetLines: \"/api/v1/finance/budget-lines\",\n financeBudgetLinesByItemId: \"/api/v1/finance/budget-lines/{item_id}\",\n financeBudgets: \"/api/v1/finance/budgets\",\n financeBudgetsByItemId: \"/api/v1/finance/budgets/{item_id}\",\n financeExpenses: \"/api/v1/finance/expenses\",\n financeExpensesByItemId: \"/api/v1/finance/expenses/{item_id}\",\n financeInvoices: \"/api/v1/finance/invoices\",\n financeInvoicesByItemId: \"/api/v1/finance/invoices/{item_id}\",\n financePurchaseOrders: \"/api/v1/finance/purchase-orders\",\n financePurchaseOrdersByItemId: \"/api/v1/finance/purchase-orders/{item_id}\",\n flagsEvaluate: \"/api/v1/flags/evaluate\",\n flagsEvaluateByItemId: \"/api/v1/flags/evaluate/{item_id}\",\n governanceGuardrailRules: \"/api/v1/governance/guardrail-rules\",\n governanceGuardrailRulesByItemId: \"/api/v1/governance/guardrail-rules/{item_id}\",\n governanceGuardrailRulesByRuleId: \"/api/v1/governance/guardrail-rules/{rule_id}\",\n governanceModelPolicies: \"/api/v1/governance/model-policies\",\n governanceModelPoliciesGlobal: \"/api/v1/governance/model-policies/global\",\n governanceModelPoliciesGlobalByItemId: \"/api/v1/governance/model-policies/global/{item_id}\",\n governanceModelPoliciesGlobalByModelId: \"/api/v1/governance/model-policies/global/{model_id}\",\n governanceModelPoliciesByItemId: \"/api/v1/governance/model-policies/{item_id}\",\n governanceModelPoliciesByModelId: \"/api/v1/governance/model-policies/{model_id}\",\n governanceRoutingRules: \"/api/v1/governance/routing-rules\",\n governanceRoutingRulesByItemId: \"/api/v1/governance/routing-rules/{item_id}\",\n governanceRoutingRulesByRuleId: \"/api/v1/governance/routing-rules/{rule_id}\",\n grcControls: \"/api/v1/grc/controls\",\n grcControlsByItemId: \"/api/v1/grc/controls/{item_id}\",\n grcEvidence: \"/api/v1/grc/evidence\",\n grcEvidenceByItemId: \"/api/v1/grc/evidence/{item_id}\",\n grcFrameworks: \"/api/v1/grc/frameworks\",\n grcFrameworksByItemId: \"/api/v1/grc/frameworks/{item_id}\",\n grcIncidents: \"/api/v1/grc/incidents\",\n grcIncidentsByItemId: \"/api/v1/grc/incidents/{item_id}\",\n grcRisks: \"/api/v1/grc/risks\",\n grcRisksByItemId: \"/api/v1/grc/risks/{item_id}\",\n groupMetadata: \"/api/v1/group-metadata\",\n groupMetadataByGroupId: \"/api/v1/group-metadata/{group_id}\",\n groupMetadataByItemId: \"/api/v1/group-metadata/{item_id}\",\n groups: \"/api/v1/groups\",\n groupsMembers: \"/api/v1/groups/members\",\n groupsMembersByItemId: \"/api/v1/groups/members/{item_id}\",\n groupsByGroupId: \"/api/v1/groups/{group_id}\",\n groupsByGroupIdMembers: \"/api/v1/groups/{group_id}/members\",\n groupsByGroupIdMembersByUserId: \"/api/v1/groups/{group_id}/members/{user_id}\",\n groupsByGroupIdPermissions: \"/api/v1/groups/{group_id}/permissions\",\n groupsByItemId: \"/api/v1/groups/{item_id}\",\n helpdeskSlaPolicies: \"/api/v1/helpdesk/sla-policies\",\n helpdeskSlaPoliciesByItemId: \"/api/v1/helpdesk/sla-policies/{item_id}\",\n helpdeskTickets: \"/api/v1/helpdesk/tickets\",\n helpdeskTicketsByItemId: \"/api/v1/helpdesk/tickets/{item_id}\",\n helpdeskTicketsByTicketIdComments: \"/api/v1/helpdesk/tickets/{ticket_id}/comments\",\n hrApplicants: \"/api/v1/hr/applicants\",\n hrApplicantsByItemId: \"/api/v1/hr/applicants/{item_id}\",\n hrJobPostings: \"/api/v1/hr/job-postings\",\n hrJobPostingsByItemId: \"/api/v1/hr/job-postings/{item_id}\",\n hrOffboardingTasks: \"/api/v1/hr/offboarding-tasks\",\n hrOffboardingTasksByItemId: \"/api/v1/hr/offboarding-tasks/{item_id}\",\n hrOnboardingTasks: \"/api/v1/hr/onboarding-tasks\",\n hrOnboardingTasksByItemId: \"/api/v1/hr/onboarding-tasks/{item_id}\",\n integrationApiKeys: \"/api/v1/integration/api-keys\",\n integrationApiKeysByItemId: \"/api/v1/integration/api-keys/{item_id}\",\n integrationApplications: \"/api/v1/integration/applications\",\n integrationApplicationsByItemId: \"/api/v1/integration/applications/{item_id}\",\n integrationConnectors: \"/api/v1/integration/connectors\",\n integrationConnectorsByItemId: \"/api/v1/integration/connectors/{item_id}\",\n integrationWebhooks: \"/api/v1/integration/webhooks\",\n integrationWebhooksByItemId: \"/api/v1/integration/webhooks/{item_id}\",\n integrationsConnections: \"/api/v1/integrations/connections\",\n integrationsConnectionsByItemId: \"/api/v1/integrations/connections/{item_id}\",\n integrationsDataSources: \"/api/v1/integrations/data-sources\",\n integrationsDataSourcesByItemId: \"/api/v1/integrations/data-sources/{item_id}\",\n integrationsSyncState: \"/api/v1/integrations/sync-state\",\n integrationsSyncStateByItemId: \"/api/v1/integrations/sync-state/{item_id}\",\n investmentsCostCenters: \"/api/v1/investments/cost-centers\",\n investmentsCostCentersByItemId: \"/api/v1/investments/cost-centers/{item_id}\",\n investmentsPortfolio: \"/api/v1/investments/portfolio\",\n investmentsPortfolioByItemId: \"/api/v1/investments/portfolio/{item_id}\",\n knowledgeBases: \"/api/v1/knowledge-bases\",\n knowledgeBases2: \"/api/v1/knowledge-bases/\",\n knowledgeBasesByItemId: \"/api/v1/knowledge-bases/{item_id}\",\n knowledgeBasesByKbId: \"/api/v1/knowledge-bases/{kb_id}\",\n knowledgeChunks: \"/api/v1/knowledge/chunks\",\n knowledgeChunksByItemId: \"/api/v1/knowledge/chunks/{item_id}\",\n knowledgeDocuments: \"/api/v1/knowledge/documents\",\n knowledgeDocumentsByItemId: \"/api/v1/knowledge/documents/{item_id}\",\n knowledgeEntities: \"/api/v1/knowledge/entities\",\n knowledgeEntitiesByItemId: \"/api/v1/knowledge/entities/{item_id}\",\n learningAssessments: \"/api/v1/learning/assessments\",\n learningAssessmentsByItemId: \"/api/v1/learning/assessments/{item_id}\",\n learningCohorts: \"/api/v1/learning/cohorts\",\n learningCohortsByItemId: \"/api/v1/learning/cohorts/{item_id}\",\n licenses: \"/api/v1/licenses\",\n licensesAssignments: \"/api/v1/licenses/assignments\",\n licensesAssignmentsByItemId: \"/api/v1/licenses/assignments/{item_id}\",\n licensesByItemId: \"/api/v1/licenses/{item_id}\",\n llmCompletions: \"/api/v1/llm/completions\",\n llmCompletionsByItemId: \"/api/v1/llm/completions/{item_id}\",\n mcpServers: \"/api/v1/mcp-servers\",\n mcpServers2: \"/api/v1/mcp-servers/\",\n mcpServersByItemId: \"/api/v1/mcp-servers/{item_id}\",\n mcpServersByServerId: \"/api/v1/mcp-servers/{server_id}\",\n mcpServersByServerIdCall: \"/api/v1/mcp-servers/{server_id}/call\",\n mcpServersByServerIdDiscover: \"/api/v1/mcp-servers/{server_id}/discover\",\n mcpCall: \"/api/v1/mcp/call\",\n mcpCallByItemId: \"/api/v1/mcp/call/{item_id}\",\n memories: \"/api/v1/memories\",\n memoriesNotificationAction: \"/api/v1/memories/notification-action\",\n memoriesNotificationActionByItemId: \"/api/v1/memories/notification-action/{item_id}\",\n memoriesByItemId: \"/api/v1/memories/{item_id}\",\n memoriesByMemoryId: \"/api/v1/memories/{memory_id}\",\n memoriesByMemoryIdAcknowledge: \"/api/v1/memories/{memory_id}/acknowledge\",\n modelConfigs: \"/api/v1/model-configs\",\n modelConfigs2: \"/api/v1/model-configs/\",\n modelConfigsByGatewayId: \"/api/v1/model-configs/{gateway_id}\",\n modelConfigsByItemId: \"/api/v1/model-configs/{item_id}\",\n notificationsAnnouncements: \"/api/v1/notifications/announcements\",\n notificationsAnnouncementsByItemId: \"/api/v1/notifications/announcements/{item_id}\",\n notificationsNotifications: \"/api/v1/notifications/notifications\",\n notificationsNotificationsByItemId: \"/api/v1/notifications/notifications/{item_id}\",\n notificationsNotificationsByNotificationIdRead: \"/api/v1/notifications/notifications/{notification_id}/read\",\n okrKeyResults: \"/api/v1/okr/key-results\",\n okrKeyResultsByItemId: \"/api/v1/okr/key-results/{item_id}\",\n okrObjectives: \"/api/v1/okr/objectives\",\n okrObjectivesByItemId: \"/api/v1/okr/objectives/{item_id}\",\n orgLocations: \"/api/v1/org/locations\",\n orgLocationsByItemId: \"/api/v1/org/locations/{item_id}\",\n peoplePersons: \"/api/v1/people/persons\",\n peoplePersonsByItemId: \"/api/v1/people/persons/{item_id}\",\n performanceGoals: \"/api/v1/performance/goals\",\n performanceGoalsByItemId: \"/api/v1/performance/goals/{item_id}\",\n performanceLearningRecords: \"/api/v1/performance/learning-records\",\n performanceLearningRecordsByItemId: \"/api/v1/performance/learning-records/{item_id}\",\n performanceReviews: \"/api/v1/performance/reviews\",\n performanceReviewsByItemId: \"/api/v1/performance/reviews/{item_id}\",\n physicalAssets: \"/api/v1/physical-assets\",\n physicalAssetsByItemId: \"/api/v1/physical-assets/{item_id}\",\n platformSecrets: \"/api/v1/platform-secrets\",\n platformSecrets2: \"/api/v1/platform-secrets/\",\n platformSecretsResolve: \"/api/v1/platform-secrets/resolve\",\n platformSecretsResolveByItemId: \"/api/v1/platform-secrets/resolve/{item_id}\",\n platformSecretsByItemId: \"/api/v1/platform-secrets/{item_id}\",\n platformSecretsBySecretId: \"/api/v1/platform-secrets/{secret_id}\",\n platformDepartments: \"/api/v1/platform/departments\",\n platformDepartmentsByDepartmentId: \"/api/v1/platform/departments/{department_id}\",\n platformDepartmentsByItemId: \"/api/v1/platform/departments/{item_id}\",\n platformEvents: \"/api/v1/platform/events\",\n platformEventsByEventId: \"/api/v1/platform/events/{event_id}\",\n platformEventsByItemId: \"/api/v1/platform/events/{item_id}\",\n platformFlags: \"/api/v1/platform/flags\",\n platformFlagsByFlagKey: \"/api/v1/platform/flags/{flag_key}\",\n platformFlagsByItemId: \"/api/v1/platform/flags/{item_id}\",\n platformLocations: \"/api/v1/platform/locations\",\n platformLocationsByItemId: \"/api/v1/platform/locations/{item_id}\",\n platformLocationsByLocationId: \"/api/v1/platform/locations/{location_id}\",\n platformMaskingDetect: \"/api/v1/platform/masking/detect\",\n platformMaskingDetectByItemId: \"/api/v1/platform/masking/detect/{item_id}\",\n platformMaskingMask: \"/api/v1/platform/masking/mask\",\n platformMaskingMaskByItemId: \"/api/v1/platform/masking/mask/{item_id}\",\n platformUserProfilesByUserId: \"/api/v1/platform/user-profiles/{user_id}\",\n platformUserProfilesByUserIdPreferences: \"/api/v1/platform/user-profiles/{user_id}/preferences\",\n pods: \"/api/v1/pods\",\n pods2: \"/api/v1/pods/\",\n podsByItemId: \"/api/v1/pods/{item_id}\",\n podsByPodId: \"/api/v1/pods/{pod_id}\",\n podsByPodIdStart: \"/api/v1/pods/{pod_id}/start\",\n podsByPodIdStop: \"/api/v1/pods/{pod_id}/stop\",\n policies: \"/api/v1/policies\",\n policiesAcknowledgements: \"/api/v1/policies/acknowledgements\",\n policiesAcknowledgementsByItemId: \"/api/v1/policies/acknowledgements/{item_id}\",\n policiesPolicies: \"/api/v1/policies/policies\",\n policiesPoliciesByItemId: \"/api/v1/policies/policies/{item_id}\",\n policiesPoliciesByPolicyIdPublish: \"/api/v1/policies/policies/{policy_id}/publish\",\n policiesPoliciesByPolicyIdRetire: \"/api/v1/policies/policies/{policy_id}/retire\",\n policiesReviews: \"/api/v1/policies/reviews\",\n policiesReviewsByItemId: \"/api/v1/policies/reviews/{item_id}\",\n policiesReviewsByReviewIdComplete: \"/api/v1/policies/reviews/{review_id}/complete\",\n policiesByItemId: \"/api/v1/policies/{item_id}\",\n procurementSuppliers: \"/api/v1/procurement/suppliers\",\n procurementSuppliersByItemId: \"/api/v1/procurement/suppliers/{item_id}\",\n projects: \"/api/v1/projects\",\n projects2: \"/api/v1/projects/\",\n projectsFeatures: \"/api/v1/projects/features\",\n projectsFeaturesByItemId: \"/api/v1/projects/features/{item_id}\",\n projectsSprints: \"/api/v1/projects/sprints\",\n projectsSprintsByItemId: \"/api/v1/projects/sprints/{item_id}\",\n projectsTasks: \"/api/v1/projects/tasks\",\n projectsTasksByItemId: \"/api/v1/projects/tasks/{item_id}\",\n projectsByItemId: \"/api/v1/projects/{item_id}\",\n projectsByProjectId: \"/api/v1/projects/{project_id}\",\n registryApps: \"/api/v1/registry/apps\",\n registryAppsByAppCode: \"/api/v1/registry/apps/{app_code}\",\n registryAppsByItemId: \"/api/v1/registry/apps/{item_id}\",\n registryCall: \"/api/v1/registry/call\",\n registryCallByItemId: \"/api/v1/registry/call/{item_id}\",\n registryCatalog: \"/api/v1/registry/catalog\",\n registryCatalogByItemId: \"/api/v1/registry/catalog/{item_id}\",\n registryEdmsTools: \"/api/v1/registry/edms/tools\",\n registryEdmsToolsByItemId: \"/api/v1/registry/edms/tools/{item_id}\",\n registryHeartbeat: \"/api/v1/registry/heartbeat\",\n registryHeartbeatByItemId: \"/api/v1/registry/heartbeat/{item_id}\",\n registryRegister: \"/api/v1/registry/register\",\n registryRegisterByItemId: \"/api/v1/registry/register/{item_id}\",\n registryTools: \"/api/v1/registry/tools\",\n registryToolsByItemId: \"/api/v1/registry/tools/{item_id}\",\n relationships: \"/api/v1/relationships\",\n relationshipsTraverse: \"/api/v1/relationships/traverse\",\n relationshipsTraverseByItemId: \"/api/v1/relationships/traverse/{item_id}\",\n relationshipsByItemId: \"/api/v1/relationships/{item_id}\",\n rfpQuestions: \"/api/v1/rfp/questions\",\n rfpQuestionsByItemId: \"/api/v1/rfp/questions/{item_id}\",\n rfpRecords: \"/api/v1/rfp/records\",\n rfpRecordsByItemId: \"/api/v1/rfp/records/{item_id}\",\n rfpResponses: \"/api/v1/rfp/responses\",\n rfpResponsesByItemId: \"/api/v1/rfp/responses/{item_id}\",\n riskItems: \"/api/v1/risk-items\",\n riskItemsByItemId: \"/api/v1/risk-items/{item_id}\",\n runs: \"/api/v1/runs\",\n runs2: \"/api/v1/runs/\",\n runsByItemId: \"/api/v1/runs/{item_id}\",\n runsByRunIdLogs: \"/api/v1/runs/{run_id}/logs\",\n secrets: \"/api/v1/secrets\",\n secrets2: \"/api/v1/secrets/\",\n secretsAccessLog: \"/api/v1/secrets/access-log\",\n secretsAccessLogByItemId: \"/api/v1/secrets/access-log/{item_id}\",\n secretsResolve: \"/api/v1/secrets/resolve\",\n secretsResolveBatch: \"/api/v1/secrets/resolve/batch\",\n secretsResolveBatchByItemId: \"/api/v1/secrets/resolve/batch/{item_id}\",\n secretsResolveByItemId: \"/api/v1/secrets/resolve/{item_id}\",\n secretsByItemId: \"/api/v1/secrets/{item_id}\",\n secretsBySecretId: \"/api/v1/secrets/{secret_id}\",\n secretsBySecretIdAccessLog: \"/api/v1/secrets/{secret_id}/access-log\",\n secretsBySecretIdGrants: \"/api/v1/secrets/{secret_id}/grants\",\n secretsBySecretIdGrantsByGrantId: \"/api/v1/secrets/{secret_id}/grants/{grant_id}\",\n secretsBySecretIdRotate: \"/api/v1/secrets/{secret_id}/rotate\",\n sessions: \"/api/v1/sessions\",\n sessionsRevokeAll: \"/api/v1/sessions/revoke-all\",\n sessionsRevokeAllByItemId: \"/api/v1/sessions/revoke-all/{item_id}\",\n sessionsByItemId: \"/api/v1/sessions/{item_id}\",\n sessionsBySessionId: \"/api/v1/sessions/{session_id}\",\n skills: \"/api/v1/skills\",\n skills2: \"/api/v1/skills/\",\n skillsGenerate: \"/api/v1/skills/generate\",\n skillsGenerateByItemId: \"/api/v1/skills/generate/{item_id}\",\n skillsUpload: \"/api/v1/skills/upload\",\n skillsUploadByItemId: \"/api/v1/skills/upload/{item_id}\",\n skillsByItemId: \"/api/v1/skills/{item_id}\",\n skillsBySkillId: \"/api/v1/skills/{skill_id}\",\n skillsBySkillIdFilesByFilePath: \"/api/v1/skills/{skill_id}/files/{file_path}\",\n skillsBySkillIdRun: \"/api/v1/skills/{skill_id}/run\",\n skillsBySkillIdRuns: \"/api/v1/skills/{skill_id}/runs\",\n skillsBySkillIdRunsByRunId: \"/api/v1/skills/{skill_id}/runs/{run_id}\",\n skillsBySlugConfig: \"/api/v1/skills/{slug}/config\",\n socAlerts: \"/api/v1/soc/alerts\",\n socAlertsByItemId: \"/api/v1/soc/alerts/{item_id}\",\n socInvestigations: \"/api/v1/soc/investigations\",\n socInvestigationsByItemId: \"/api/v1/soc/investigations/{item_id}\",\n socPlaybooks: \"/api/v1/soc/playbooks\",\n socPlaybooksByItemId: \"/api/v1/soc/playbooks/{item_id}\",\n status: \"/api/v1/status\",\n statusByItemId: \"/api/v1/status/{item_id}\",\n storageDbByCollection: \"/api/v1/storage/db/{collection}\",\n storageDbByCollectionByKey: \"/api/v1/storage/db/{collection}/{key}\",\n storageFiles: \"/api/v1/storage/files\",\n storageFilesPresignGet: \"/api/v1/storage/files/presign-get\",\n storageFilesPresignGetByItemId: \"/api/v1/storage/files/presign-get/{item_id}\",\n storageFilesPresignPut: \"/api/v1/storage/files/presign-put\",\n storageFilesPresignPutByItemId: \"/api/v1/storage/files/presign-put/{item_id}\",\n storageFilesByItemId: \"/api/v1/storage/files/{item_id}\",\n storageKvSet: \"/api/v1/storage/kv/set\",\n storageKvSetByItemId: \"/api/v1/storage/kv/set/{item_id}\",\n storageKvByKey: \"/api/v1/storage/kv/{key}\",\n storageObjects: \"/api/v1/storage/objects\",\n storageObjectsByItemId: \"/api/v1/storage/objects/{item_id}\",\n storageRecords: \"/api/v1/storage/records\",\n storageRecordsByItemId: \"/api/v1/storage/records/{item_id}\",\n systemSettings: \"/api/v1/system-settings\",\n systemSettings2: \"/api/v1/system-settings/\",\n systemSettingsActive: \"/api/v1/system-settings/active\",\n systemSettingsActiveByItemId: \"/api/v1/system-settings/active/{item_id}\",\n systemSettingsHistory: \"/api/v1/system-settings/history\",\n systemSettingsHistoryByItemId: \"/api/v1/system-settings/history/{item_id}\",\n systemSettingsByItemId: \"/api/v1/system-settings/{item_id}\",\n teams: \"/api/v1/teams\",\n teams2: \"/api/v1/teams/\",\n teamsGenerate: \"/api/v1/teams/generate\",\n teamsGenerateByItemId: \"/api/v1/teams/generate/{item_id}\",\n teamsByItemId: \"/api/v1/teams/{item_id}\",\n teamsByTeamId: \"/api/v1/teams/{team_id}\",\n teamsByTeamIdRun: \"/api/v1/teams/{team_id}/run\",\n teamsByTeamIdRuns: \"/api/v1/teams/{team_id}/runs\",\n teamsByTeamIdRunsByRunId: \"/api/v1/teams/{team_id}/runs/{run_id}\",\n teamsByTeamIdRunsByRunIdDocument: \"/api/v1/teams/{team_id}/runs/{run_id}/document\",\n technology: \"/api/v1/technology\",\n technologyEntitlements: \"/api/v1/technology/entitlements\",\n technologyEntitlementsByItemId: \"/api/v1/technology/entitlements/{item_id}\",\n technologyByItemId: \"/api/v1/technology/{item_id}\",\n tenants: \"/api/v1/tenants\",\n tenantsByItemId: \"/api/v1/tenants/{item_id}\",\n tenantsByTenantId: \"/api/v1/tenants/{tenant_id}\",\n tenantsByTenantIdUsers: \"/api/v1/tenants/{tenant_id}/users\",\n users: \"/api/v1/users\",\n usersMe: \"/api/v1/users/me\",\n usersMeByItemId: \"/api/v1/users/me/{item_id}\",\n usersByItemId: \"/api/v1/users/{item_id}\",\n usersByUserId: \"/api/v1/users/{user_id}\",\n usersByUserIdPermissions: \"/api/v1/users/{user_id}/permissions\",\n vulnerabilities: \"/api/v1/vulnerabilities\",\n vulnerabilitiesByItemId: \"/api/v1/vulnerabilities/{item_id}\",\n webhooksLogsByRunId: \"/api/v1/webhooks/logs/{run_id}\",\n webhooksStep: \"/api/v1/webhooks/step\",\n webhooksStepByItemId: \"/api/v1/webhooks/step/{item_id}\",\n workCapacity: \"/api/v1/work/capacity\",\n workCapacityByItemId: \"/api/v1/work/capacity/{item_id}\",\n workComments: \"/api/v1/work/comments\",\n workCommentsByItemId: \"/api/v1/work/comments/{item_id}\",\n workTimeEntries: \"/api/v1/work/time-entries\",\n workTimeEntriesByItemId: \"/api/v1/work/time-entries/{item_id}\",\n workflows: \"/api/v1/workflows\",\n workflows2: \"/api/v1/workflows/\",\n workflowsGenerate: \"/api/v1/workflows/generate\",\n workflowsGenerateByItemId: \"/api/v1/workflows/generate/{item_id}\",\n workflowsRuns: \"/api/v1/workflows/runs\",\n workflowsRunsByItemId: \"/api/v1/workflows/runs/{item_id}\",\n workflowsRunsByRunId: \"/api/v1/workflows/runs/{run_id}\",\n workflowsRunsByRunIdCancel: \"/api/v1/workflows/runs/{run_id}/cancel\",\n workflowsRunsByRunIdFilesByFileId: \"/api/v1/workflows/runs/{run_id}/files/{file_id}\",\n workflowsRunsByRunIdMarkdown: \"/api/v1/workflows/runs/{run_id}/markdown\",\n workflowsRunsByRunIdResume: \"/api/v1/workflows/runs/{run_id}/resume\",\n workflowsRunsByRunIdStream: \"/api/v1/workflows/runs/{run_id}/stream\",\n workflowsByItemId: \"/api/v1/workflows/{item_id}\",\n workflowsByWorkflowId: \"/api/v1/workflows/{workflow_id}\",\n workflowsByWorkflowIdRequiredSecrets: \"/api/v1/workflows/{workflow_id}/required-secrets\",\n workflowsByWorkflowIdRun: \"/api/v1/workflows/{workflow_id}/run\",\n workflowsByWorkflowIdRunInputsPreflight: \"/api/v1/workflows/{workflow_id}/run-inputs/preflight\",\n workflowsByWorkflowIdRuns: \"/api/v1/workflows/{workflow_id}/runs\",\n workflowsByWorkflowIdRunsByRunId: \"/api/v1/workflows/{workflow_id}/runs/{run_id}\",\n workspaces: \"/api/v1/workspaces\",\n workspaces2: \"/api/v1/workspaces/\",\n workspacesEnsureHome: \"/api/v1/workspaces/ensure-home\",\n workspacesEnsureHomeByItemId: \"/api/v1/workspaces/ensure-home/{item_id}\",\n workspacesFiles: \"/api/v1/workspaces/files\",\n workspacesFilesUpload: \"/api/v1/workspaces/files/upload\",\n workspacesFilesUploadByItemId: \"/api/v1/workspaces/files/upload/{item_id}\",\n workspacesFilesByFileId: \"/api/v1/workspaces/files/{file_id}\",\n workspacesFilesByFileIdDownload: \"/api/v1/workspaces/files/{file_id}/download\",\n workspacesFilesByItemId: \"/api/v1/workspaces/files/{item_id}\",\n workspacesFolders: \"/api/v1/workspaces/folders\",\n workspacesFoldersByFolderId: \"/api/v1/workspaces/folders/{folder_id}\",\n workspacesFoldersByItemId: \"/api/v1/workspaces/folders/{item_id}\",\n workspacesHomeEnsure: \"/api/v1/workspaces/home/ensure\",\n workspacesHomeEnsureByItemId: \"/api/v1/workspaces/home/ensure/{item_id}\",\n workspacesTrash: \"/api/v1/workspaces/trash\",\n workspacesTrashRestore: \"/api/v1/workspaces/trash/restore\",\n workspacesTrashRestoreByItemId: \"/api/v1/workspaces/trash/restore/{item_id}\",\n workspacesTrashByItemId: \"/api/v1/workspaces/trash/{item_id}\",\n workspacesByItemId: \"/api/v1/workspaces/{item_id}\",\n workspacesByWorkspaceId: \"/api/v1/workspaces/{workspace_id}\",\n // Pending backend implementation — SDK stubs for future modules\n analyticsDashboards: \"/api/v1/analytics/dashboards\",\n analyticsDashboardsByItemId: \"/api/v1/analytics/dashboards/{item_id}\",\n analyticsMetrics: \"/api/v1/analytics/metrics\",\n analyticsMetricsByItemId: \"/api/v1/analytics/metrics/{item_id}\",\n analyticsReports: \"/api/v1/analytics/reports\",\n analyticsReportsByItemId: \"/api/v1/analytics/reports/{item_id}\",\n analyticsReportsGenerate: \"/api/v1/analytics/reports/generate\",\n graphNodes: \"/api/v1/graph/nodes\",\n graphNodesByItemId: \"/api/v1/graph/nodes/{item_id}\",\n graphEdges: \"/api/v1/graph/edges\",\n graphEdgesByItemId: \"/api/v1/graph/edges/{item_id}\",\n graphQueries: \"/api/v1/graph/queries\",\n graphQueriesByItemId: \"/api/v1/graph/queries/{item_id}\",\n graphQueriesExecute: \"/api/v1/graph/queries/execute\",\n operationsAccessRequests: \"/api/v1/operations/access-requests\",\n operationsAccessRequestsByItemId: \"/api/v1/operations/access-requests/{item_id}\",\n operationsAccessRequestsApprove: \"/api/v1/operations/access-requests/{item_id}/approve\",\n operationsAccessRequestsProvision: \"/api/v1/operations/access-requests/{item_id}/provision\",\n operationsHrRequests: \"/api/v1/operations/hr-requests\",\n operationsHrRequestsByItemId: \"/api/v1/operations/hr-requests/{item_id}\",\n operationsHrRequestsFulfill: \"/api/v1/operations/hr-requests/{item_id}/fulfill\",\n operationsPending: \"/api/v1/operations/pending\",\n operationsPendingByItemId: \"/api/v1/operations/pending/{item_id}\",\n operationsEquipment: \"/api/v1/operations/equipment\",\n operationsEquipmentByItemId: \"/api/v1/operations/equipment/{item_id}\",\n operationsEquipmentProvision: \"/api/v1/operations/equipment/{item_id}/provision\",\n operationsTravel: \"/api/v1/operations/travel\",\n operationsTravelByItemId: \"/api/v1/operations/travel/{item_id}\",\n operationsTravelBook: \"/api/v1/operations/travel/{item_id}/book\",\n plannerDailyPlans: \"/api/v1/planner/daily-plans\",\n plannerDailyPlansByItemId: \"/api/v1/planner/daily-plans/{item_id}\",\n plannerPlanItems: \"/api/v1/planner/plan-items\",\n plannerPlanItemsByItemId: \"/api/v1/planner/plan-items/{item_id}\",\n postmortemsTimeline: \"/api/v1/postmortems/timeline\",\n postmortemsTimelineByItemId: \"/api/v1/postmortems/timeline/{item_id}\",\n knowledgeTemplates: \"/api/v1/knowledge/templates\",\n knowledgeTemplatesByItemId: \"/api/v1/knowledge/templates/{item_id}\",\n knowledgeSops: \"/api/v1/knowledge/sops\",\n knowledgeSopsByItemId: \"/api/v1/knowledge/sops/{item_id}\",\n vendorScorecards: \"/api/v1/vendor/scorecards\",\n vendorScorecardsByItemId: \"/api/v1/vendor/scorecards/{item_id}\",\n vendorInsurance: \"/api/v1/vendor/insurance\",\n vendorInsuranceByItemId: \"/api/v1/vendor/insurance/{item_id}\",\n vendorCertifications: \"/api/v1/vendor/certifications\",\n vendorCertificationsByItemId: \"/api/v1/vendor/certifications/{item_id}\",\n vendorContacts: \"/api/v1/vendor/contacts\",\n vendorContactsByItemId: \"/api/v1/vendor/contacts/{item_id}\",\n vendorOnboarding: \"/api/v1/vendor/onboarding\",\n vendorOnboardingByItemId: \"/api/v1/vendor/onboarding/{item_id}\",\n marketingCampaigns: \"/api/v1/marketing/campaigns\",\n marketingCampaignsByItemId: \"/api/v1/marketing/campaigns/{item_id}\",\n marketingLeads: \"/api/v1/marketing/leads\",\n marketingLeadsByItemId: \"/api/v1/marketing/leads/{item_id}\",\n marketingContent: \"/api/v1/marketing/content\",\n marketingContentByItemId: \"/api/v1/marketing/content/{item_id}\",\n marketingEvents: \"/api/v1/marketing/events\",\n marketingEventsByItemId: \"/api/v1/marketing/events/{item_id}\",\n marketingSocial: \"/api/v1/marketing/social\",\n marketingSocialByItemId: \"/api/v1/marketing/social/{item_id}\",\n marketingEmails: \"/api/v1/marketing/emails\",\n marketingEmailsByItemId: \"/api/v1/marketing/emails/{item_id}\",\n marketingAnalytics: \"/api/v1/marketing/analytics\",\n marketingAnalyticsByItemId: \"/api/v1/marketing/analytics/{item_id}\",\n legalContracts: \"/api/v1/legal/contracts\",\n legalContractsByItemId: \"/api/v1/legal/contracts/{item_id}\",\n legalNdas: \"/api/v1/legal/ndas\",\n legalNdasByItemId: \"/api/v1/legal/ndas/{item_id}\",\n legalCases: \"/api/v1/legal/cases\",\n legalCasesByItemId: \"/api/v1/legal/cases/{item_id}\",\n legalIp: \"/api/v1/legal/ip\",\n legalIpByItemId: \"/api/v1/legal/ip/{item_id}\",\n legalCompliance: \"/api/v1/legal/compliance\",\n legalComplianceByItemId: \"/api/v1/legal/compliance/{item_id}\",\n legalReviews: \"/api/v1/legal/reviews\",\n legalReviewsByItemId: \"/api/v1/legal/reviews/{item_id}\",\n surveysSurveys: \"/api/v1/surveys/surveys\",\n surveysSurveysByItemId: \"/api/v1/surveys/surveys/{item_id}\",\n surveysResponses: \"/api/v1/surveys/responses\",\n surveysResponsesByItemId: \"/api/v1/surveys/responses/{item_id}\",\n surveysAnalytics: \"/api/v1/surveys/analytics\",\n surveysAnalyticsByItemId: \"/api/v1/surveys/analytics/{item_id}\",\n processMaps: \"/api/v1/process/maps\",\n processMapsByItemId: \"/api/v1/process/maps/{item_id}\",\n processBottlenecks: \"/api/v1/process/bottlenecks\",\n processBottlenecksByItemId: \"/api/v1/process/bottlenecks/{item_id}\",\n processEfficiencyScores: \"/api/v1/process/efficiency-scores\",\n processEfficiencyScoresByItemId: \"/api/v1/process/efficiency-scores/{item_id}\",\n clientopsHealthScores: \"/api/v1/clientops/health-scores\",\n clientopsHealthScoresByItemId: \"/api/v1/clientops/health-scores/{item_id}\",\n clientopsPlaybooks: \"/api/v1/clientops/playbooks\",\n clientopsPlaybooksByItemId: \"/api/v1/clientops/playbooks/{item_id}\",\n clientopsOnboardingPlans: \"/api/v1/clientops/onboarding-plans\",\n clientopsOnboardingPlansByItemId: \"/api/v1/clientops/onboarding-plans/{item_id}\",\n clientopsRetentionRisks: \"/api/v1/clientops/retention-risk\",\n clientopsRetentionRisksByItemId: \"/api/v1/clientops/retention-risk/{item_id}\",\n clientopsExpansions: \"/api/v1/clientops/expansions\",\n clientopsExpansionsByItemId: \"/api/v1/clientops/expansions/{item_id}\",\n mutations: \"/api/v1/mutations\",\n mutationsByItemId: \"/api/v1/mutations/{item_id}\",\n mutationsReview: \"/api/v1/mutations/review\",\n mutationsCommit: \"/api/v1/mutations/commit\",\n timeline: \"/api/v1/timeline\",\n timelineByItemId: \"/api/v1/timeline/{item_id}\",\n signals: \"/api/v1/signals\",\n signalsByItemId: \"/api/v1/signals/{item_id}\",\n healthz: \"/healthz\",\n otelV1Traces: \"/otel/v1/traces\",\n readyz: \"/readyz\",\n} as const;\nexport type PathKey = keyof typeof PATHS;\n","/**\n * Base error class for all cPod SDK errors.\n */\nexport class CpodError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"CpodError\";\n // Restore prototype chain for instanceof checks in transpiled code.\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Represents a generic API error returned by the cPod backend.\n */\nexport class ApiError extends CpodError {\n readonly statusCode: number;\n readonly requestId?: string;\n\n constructor(message: string, statusCode: number, requestId?: string) {\n super(message);\n this.name = \"ApiError\";\n this.statusCode = statusCode;\n if (requestId !== undefined) this.requestId = requestId;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown when the API key is missing, invalid, or expired (HTTP 401/403).\n */\nexport class AuthenticationError extends ApiError {\n constructor(message = \"Authentication failed. Check your API key.\", requestId?: string) {\n super(message, 401, requestId);\n this.name = \"AuthenticationError\";\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown when the requested resource does not exist (HTTP 404).\n */\nexport class NotFoundError extends ApiError {\n readonly resourceType?: string;\n readonly resourceId?: string;\n\n constructor(\n message: string,\n resourceType?: string,\n resourceId?: string,\n requestId?: string\n ) {\n super(message, 404, requestId);\n this.name = \"NotFoundError\";\n if (resourceType !== undefined) this.resourceType = resourceType;\n if (resourceId !== undefined) this.resourceId = resourceId;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown when the client has exceeded API rate limits (HTTP 429).\n */\nexport class RateLimitError extends ApiError {\n /** Time in seconds until the rate limit resets. */\n readonly retryAfter?: number;\n\n constructor(message = \"Rate limit exceeded.\", retryAfter?: number, requestId?: string) {\n super(message, 429, requestId);\n this.name = \"RateLimitError\";\n if (retryAfter !== undefined) this.retryAfter = retryAfter;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown when a request times out.\n */\nexport class TimeoutError extends CpodError {\n constructor(timeoutMs: number) {\n super(`Request timed out after ${timeoutMs}ms.`);\n this.name = \"TimeoutError\";\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown by the popup login flow (`CpodClient.login`) when sign-in can't be\n * completed. The `code` distinguishes the failure so callers can react — most\n * commonly by falling back to the redirect flow (`beginLogin`).\n *\n * Codes: `popup_blocked` | `cancelled` | `timeout` | `no_window` | the backend\n * error string (e.g. `expired`, `access_denied`).\n */\nexport class LoginError extends CpodError {\n readonly code: string;\n\n constructor(code: string, message: string) {\n super(message);\n this.name = \"LoginError\";\n this.code = code;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Maps an HTTP status code to the appropriate error class.\n */\nexport function createApiError(\n statusCode: number,\n message: string,\n requestId?: string,\n retryAfter?: number\n): ApiError {\n switch (statusCode) {\n case 401:\n case 403:\n return new AuthenticationError(message, requestId);\n case 404:\n return new NotFoundError(message, undefined, undefined, requestId);\n case 429:\n return new RateLimitError(message, retryAfter, requestId);\n default:\n return new ApiError(message, statusCode, requestId);\n }\n}\n","// Transparent access-token lifecycle for the SDK.\n//\n// Apps construct the client with the tokens they have at startup\n// (e.g. from localStorage / cookie / their own login flow):\n//\n// new CpodClient({\n// baseUrl,\n// auth: {\n// accessToken,\n// refreshToken, // optional\n// onTokenRefreshed: bundle => …, // persist somewhere\n// },\n// })\n//\n// The SDK uses the access token for every call. When the backend rejects\n// a request with 401 — meaning the access token expired — HttpClient asks\n// the TokenManager to refresh. If a refresh_token is configured, the SDK\n// silently swaps it for a fresh access token via /api/v1/auth/refresh,\n// fires `onTokenRefreshed`, and retries the failed request once.\n//\n// Backwards-compatible: passing the legacy `apiKey` instead of `auth`\n// builds a TokenManager that returns that token forever (no refresh).\n\nexport interface TokenBundle {\n accessToken: string;\n refreshToken?: string;\n}\n\nexport interface AuthOptions extends TokenBundle {\n /**\n * Fires when a new access token is minted (after a refresh). Use it to\n * persist the updated bundle back to your store (localStorage, cookie,\n * server-side cache, …). Sync or async — the SDK does not await it.\n */\n onTokenRefreshed?: (bundle: TokenBundle) => void;\n}\n\nexport class TokenManager {\n private bundle: TokenBundle;\n private readonly baseUrl: string;\n private readonly onRefreshed?: (b: TokenBundle) => void;\n\n // Single-flight: if two SDK calls 401 at the same moment, they both await\n // one refresh instead of racing five POSTs to /auth/refresh.\n private inflight: Promise<TokenBundle> | null = null;\n\n constructor(baseUrl: string, opts: AuthOptions) {\n this.baseUrl = baseUrl.replace(/\\/$/, \"\");\n this.bundle = {\n accessToken: opts.accessToken,\n ...(opts.refreshToken !== undefined && { refreshToken: opts.refreshToken }),\n };\n if (opts.onTokenRefreshed) this.onRefreshed = opts.onTokenRefreshed;\n }\n\n /** Current access token. Synchronous — no expiry check. */\n getAccessToken(): string {\n return this.bundle.accessToken;\n }\n\n /**\n * Trade refresh_token for a new access_token. Mutex-protected so a\n * thundering-herd burst all awaits the same network round-trip. Throws\n * if no refresh_token is set or the backend rejects the refresh —\n * caller's responsibility to fall back to a fresh login at that point.\n */\n async refresh(): Promise<TokenBundle> {\n if (this.inflight) return this.inflight;\n this.inflight = this.doRefresh().finally(() => {\n this.inflight = null;\n });\n return this.inflight;\n }\n\n /** True iff a refresh attempt is possible (a refresh_token is set). */\n canRefresh(): boolean {\n return !!this.bundle.refreshToken;\n }\n\n /** Snapshot of the current bundle. */\n getBundle(): TokenBundle {\n return { ...this.bundle };\n }\n\n /**\n * Replace the bundle externally — e.g. after the host app runs its own\n * login flow and wants the SDK to pick up the new tokens.\n */\n setBundle(b: TokenBundle): void {\n this.bundle = { ...b };\n this.onRefreshed?.(this.getBundle());\n }\n\n // ── internals ────────────────────────────────────────────────────────────\n\n private async doRefresh(): Promise<TokenBundle> {\n if (!this.bundle.refreshToken) {\n throw new Error(\n \"TokenManager.refresh(): no refresh_token configured. Pass \" +\n \"`auth.refreshToken` to CpodClient, or handle expiry yourself.\",\n );\n }\n const res = await fetch(`${this.baseUrl}/api/v1/auth/refresh`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ refresh_token: this.bundle.refreshToken }),\n });\n if (!res.ok) {\n throw new Error(`Token refresh failed: HTTP ${res.status}`);\n }\n const data = (await res.json()) as { token: string };\n this.bundle = { ...this.bundle, accessToken: data.token };\n this.onRefreshed?.(this.getBundle());\n return this.getBundle();\n }\n}\n","import { randomUUID } from \"crypto\";\n\n/**\n * Minimal structural type for the subset of `@opentelemetry/api` we use.\n *\n * We don't take a compile-time type dependency on the OTel package — it's\n * an optional peer dep, so its types may not be installed. Instead we\n * define just enough shape to read the active span's context.\n */\ninterface OtelApiLike {\n trace: {\n getActiveSpan(): { spanContext(): { traceId: string; spanId: string; traceFlags: number } } | undefined;\n };\n}\n\n/**\n * Inject W3C `traceparent` (when OTel is available) and `x-request-id`\n * headers into an outgoing HTTP request.\n *\n * `@opentelemetry/api` is an **optional peer dependency** — when the caller\n * hasn't installed it, the `require()` call throws, we catch it, and the SDK\n * still works: only `x-request-id` is added (a fresh UUID v4 per request).\n *\n * When OTel *is* installed, we read the currently active span from the\n * context and synthesise a W3C-compliant `traceparent` header. This gives\n * end-to-end request correlation across the SDK → backend → sidecar →\n * coreiq pipeline without the SDK taking a hard runtime dependency on OTel.\n *\n * @internal — exported only so it can be unit-tested.\n */\nexport function injectTraceHeaders(\n headers: Record<string, string>,\n): Record<string, string> {\n // --- W3C traceparent (optional) ------------------------------------------\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const otel = require(\"@opentelemetry/api\") as OtelApiLike;\n const span = otel.trace.getActiveSpan();\n if (span) {\n const ctx = span.spanContext();\n // trace_flags: format to 2 hex chars (01 = sampled).\n const flags = (ctx.traceFlags ?? 0).toString(16).padStart(2, \"0\");\n headers[\"traceparent\"] = `00-${ctx.traceId}-${ctx.spanId}-${flags}`;\n }\n } catch {\n // @opentelemetry/api not installed — skip traceparent.\n }\n\n // --- x-request-id (always) -----------------------------------------------\n // UUID v4 is good enough here — UUID v7 (time-sortable) requires Node 20+\n // or a polyfill, and request_id's only contract is uniqueness, not\n // sortability, at the SDK layer.\n headers[\"x-request-id\"] = randomUUID();\n\n return headers;\n}\n","import { PATHS } from '../_generated/paths.js';\nimport type { CpodConfig, RequestOptions } from \"../types/index.js\";\nimport { createApiError, TimeoutError } from \"./errors.js\";\nimport { TokenManager } from \"./token-manager.js\";\nimport { injectTraceHeaders } from \"./trace.js\";\n\nconst DEFAULT_BASE_URL = \"https://api.cyberpod.app\";\nconst DEFAULT_TIMEOUT_MS = 30_000;\nconst MAX_RETRIES = 3;\nconst RETRYABLE_STATUS_CODES = new Set([429, 500, 502, 503, 504]);\n\ninterface FetchOptions extends RequestOptions {\n method: string;\n body?: unknown;\n}\n\n/**\n * Internal HTTP client that wraps the Fetch API with authentication,\n * timeout, and retry logic.\n *\n * Auth comes through a TokenManager — that's how refresh works\n * transparently. On 401, the client asks the manager to refresh once,\n * then retries the request with the new access token.\n */\nexport class HttpClient {\n private readonly baseUrl: string;\n private readonly tokenManager: TokenManager;\n private readonly timeoutMs: number;\n\n constructor(config: CpodConfig) {\n this.baseUrl = (config.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, \"\");\n this.timeoutMs = config.timeout ?? DEFAULT_TIMEOUT_MS;\n\n // One of `apiKey` (simple) or `auth` (full bundle) is required.\n // `auth` wins when both are present so apps that supply a refresh\n // token get the refresh behaviour even if they also pass apiKey for\n // legacy reasons.\n if (config.auth) {\n this.tokenManager = new TokenManager(this.baseUrl, config.auth);\n } else if (config.apiKey) {\n this.tokenManager = new TokenManager(this.baseUrl, {\n accessToken: config.apiKey,\n });\n } else {\n throw new Error(\n \"CpodClient requires either `apiKey` or `auth.accessToken`.\",\n );\n }\n }\n\n /** Public accessor — apps can read or replace the bundle. */\n get tokens(): TokenManager {\n return this.tokenManager;\n }\n\n async get<T>(path: string, opts?: RequestOptions): Promise<T> {\n return this.request<T>(path, { ...opts, method: \"GET\" });\n }\n\n async post<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> {\n return this.request<T>(path, { ...opts, method: \"POST\", body });\n }\n\n async put<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> {\n return this.request<T>(path, { ...opts, method: \"PUT\", body });\n }\n\n async patch<T>(path: string, body?: unknown, opts?: RequestOptions): Promise<T> {\n return this.request<T>(path, { ...opts, method: \"PATCH\", body });\n }\n\n async delete<T>(path: string, opts?: RequestOptions): Promise<T> {\n return this.request<T>(path, { ...opts, method: \"DELETE\" });\n }\n\n private async request<T>(\n path: string,\n opts: FetchOptions,\n attempt = 1,\n alreadyRefreshed = false,\n ): Promise<T> {\n const url = `${this.baseUrl}${path}`;\n const timeoutMs = opts.timeout ?? this.timeoutMs;\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), timeoutMs);\n\n if (opts.signal) {\n opts.signal.addEventListener(\"abort\", () => controller.abort());\n }\n\n const headers: Record<string, string> = injectTraceHeaders({\n Authorization: `Bearer ${this.tokenManager.getAccessToken()}`,\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-Cpod-SDK\": \"typescript/1.0.0\",\n ...opts.headers,\n });\n\n let response: Response;\n try {\n response = await fetch(url, {\n method: opts.method,\n headers,\n ...(opts.body !== undefined && { body: JSON.stringify(opts.body) }),\n signal: controller.signal,\n });\n } catch (err) {\n clearTimeout(timeoutId);\n if (err instanceof Error && err.name === \"AbortError\") {\n throw new TimeoutError(timeoutMs);\n }\n throw err;\n } finally {\n clearTimeout(timeoutId);\n }\n\n if (!response.ok) {\n // 401 path:\n // • First 401 → try one transparent refresh and retry the request.\n // • Still 401 after refresh → the refresh token itself is bad\n // (revoked / expired / wrong tenant). Surface a clear, actionable\n // error so the app can run its own login flow instead of seeing\n // a generic \"HTTP 401\".\n // • No refresh_token configured → fall through and surface the 401.\n if (\n response.status === 401 &&\n !this.isRefreshPath(path)\n ) {\n if (!alreadyRefreshed && this.tokenManager.canRefresh()) {\n try {\n await this.tokenManager.refresh();\n return this.request<T>(path, opts, attempt, true);\n } catch {\n // Refresh itself failed — surface as auth-expired below.\n }\n }\n if (alreadyRefreshed || this.tokenManager.canRefresh()) {\n throw createApiError(\n 401,\n \"Authentication failed even after a token refresh attempt — \" +\n \"the refresh token is invalid, revoked, or expired. \" +\n \"Run your login flow again and pass the new bundle to the SDK.\",\n response.headers.get(\"X-Request-Id\") ?? undefined,\n );\n }\n }\n\n const requestId = response.headers.get(\"X-Request-Id\") ?? undefined;\n const retryAfterHeader = response.headers.get(\"Retry-After\");\n const retryAfter = retryAfterHeader\n ? parseInt(retryAfterHeader, 10)\n : undefined;\n\n // Retry on transient errors (429 / 5xx) — independent of the 401 path.\n if (RETRYABLE_STATUS_CODES.has(response.status) && attempt < MAX_RETRIES) {\n const delay = this.backoffMs(attempt, retryAfter);\n await sleep(delay);\n return this.request<T>(path, opts, attempt + 1, alreadyRefreshed);\n }\n\n let message = `HTTP ${response.status} ${response.statusText} at ${path}`;\n try {\n const errorBody = (await response.json()) as { message?: string; error?: string };\n message = errorBody.message ?? errorBody.error ?? message;\n } catch {\n try {\n const rawBody = await response.text();\n if (rawBody) {\n message = `${message}: ${rawBody.slice(0, 500)}`;\n }\n } catch {\n // ignore\n }\n }\n\n throw createApiError(response.status, message, requestId, retryAfter);\n }\n\n if (response.status === 204) {\n return undefined as T;\n }\n\n return response.json() as Promise<T>;\n }\n\n /** Don't try to refresh the refresh endpoint itself (would loop). */\n private isRefreshPath(path: string): boolean {\n return path.startsWith(PATHS.authRefresh);\n }\n\n private backoffMs(attempt: number, retryAfterSeconds?: number): number {\n if (retryAfterSeconds !== undefined) {\n return retryAfterSeconds * 1000;\n }\n const base = 500 * Math.pow(2, attempt - 1);\n const jitter = base * 0.1 * (Math.random() * 2 - 1);\n return Math.round(base + jitter);\n }\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","import { PATHS } from '../_generated/paths.js';\n// ─────────────────────────────────────────────────────────────────────────────\n// AuthService — wraps every endpoint under cpod-backend /api/v1/auth/*\n//\n// Pre-auth methods (login, clientCredentials, refresh, forgotPassword,\n// resetPassword, acceptInvite, validate) do not require a Bearer token.\n// Post-auth methods (me, patchMe, changePassword, revoke, createInvite)\n// require a Bearer token — supply it at construction or via setToken().\n//\n// Path alignment as of 2026-05-25 against cpod-backend/app/auth/urls.py:\n// POST /api/v1/auth/login → login()\n// GET /api/v1/auth/me → me()\n// PATCH /api/v1/auth/me → patchMe()\n// POST /api/v1/auth/validate → validate()\n// POST /api/v1/auth/refresh → refresh()\n// POST /api/v1/auth/change-password → changePassword()\n// POST /api/v1/auth/forgot-password → forgotPassword()\n// POST /api/v1/auth/reset-password → resetPassword()\n// POST /api/v1/auth/revoke → revoke()\n// POST /api/v1/auth/invite → createInvite()\n// POST /api/v1/auth/accept-invite → acceptInvite()\n// POST /api/v1/auth/token → clientCredentials()\n// ─────────────────────────────────────────────────────────────────────────────\n\nimport type {\n AcceptInviteInput,\n AcceptInviteResponse,\n ChangePasswordInput,\n ClientCredentialsTokenResponse,\n CreateInviteInput,\n ForgotPasswordResponse,\n InviteResponse,\n LoginInput,\n MeResponse,\n PasswordChangeResponse,\n PatchMeInput,\n RefreshResponse,\n ResetPasswordInput,\n RevokeResponse,\n TokenResponse,\n ValidateResponse,\n} from './types.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport type { TokenManager } from '../http/token-manager.js'\n\nconst DEFAULT_BASE_URL = 'https://api.cyberpod.app'\n\n/** Convert top-level camelCase keys to snake_case for backend payloads.\n * Snake_case keys pass through untouched. Non-object inputs returned as-is.\n * Lets callers pass either convention (`{currentPassword}` or\n * `{current_password}`) without the SDK rejecting them. */\nfunction camelToSnakeBody<T = unknown>(obj: T): T {\n if (!obj || typeof obj !== 'object' || Array.isArray(obj)) return obj\n const out: Record<string, unknown> = {}\n for (const [k, v] of Object.entries(obj)) {\n const snake = k.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, '')\n out[snake] = v\n }\n return out as T\n}\n\nexport class AuthService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n me: { description: 'Fetch the current user (claims + profile extensions).', params: [] },\n login: { description: 'Exchange email + password for a JWT.', params: [\n { name: 'email', type: 'string', required: true },\n { name: 'password', type: 'string', required: true },\n ] },\n validate: { description: 'Check whether a JWT is still valid.', params: [\n { name: 'token', type: 'string', required: true },\n ] },\n refresh: { description: 'Exchange a refresh token for a fresh access token.', params: [\n { name: 'refreshToken', type: 'string', required: true },\n ] },\n changePassword: { description: 'Update the current user’s password.', params: [\n { name: 'currentPassword', type: 'string', required: true },\n { name: 'newPassword', type: 'string', required: true },\n ] },\n forgotPassword: { description: 'Send a password-reset email.', params: [\n { name: 'email', type: 'string', required: true },\n ] },\n revoke: { description: 'Revoke the caller’s current JWT.', params: [] },\n createInvite: { description: 'Create an invite for a new user. Requires tenant_admin+.', params: [\n { name: 'email', type: 'string', required: true },\n { name: 'role', type: 'string', required: true, description: 'global_admin | tenant_admin | user' },\n { name: 'type', type: 'string' },\n ] },\n }\n\n private readonly baseUrl: string\n private token: string | undefined\n private tokenManager: TokenManager | undefined\n\n constructor(baseUrl: string = DEFAULT_BASE_URL, token?: string, tokenManager?: TokenManager) {\n this.baseUrl = baseUrl.replace(/\\/$/, '')\n this.token = token\n this.tokenManager = tokenManager\n }\n\n /** Attach a Bearer token for subsequent authenticated calls. */\n setToken(token: string): void {\n this.token = token\n }\n\n /** Drop the Bearer token (e.g. after logout/revoke). */\n clearToken(): void {\n this.token = undefined\n }\n\n /**\n * Wire a TokenManager so that successful login / resetPassword /\n * acceptInvite automatically update the client's stored token bundle.\n * Called internally by CpodClient — apps should not need this.\n */\n setTokenManager(tm: TokenManager): void {\n this.tokenManager = tm\n }\n\n // ── PRE-AUTH ──────────────────────────────────────────────────────────────\n\n /**\n * Email + password login. Returns the token bundle.\n *\n * When a TokenManager is wired (the normal case via CpodClient), the\n * returned access token and refresh token are automatically stored so\n * subsequent SDK calls authenticate as the logged-in user, and 401\n * responses trigger transparent refresh.\n */\n async login(input: LoginInput): Promise<TokenResponse> {\n const result = await this.json<TokenResponse>('POST', PATHS.authLogin, input, false)\n this.captureTokens(result)\n return result\n }\n\n /**\n * OAuth2 client_credentials grant (RFC 6749 §4.4).\n * Returns a Bearer token for service-to-service calls.\n *\n * Accepts either positional args or an object form (for invokeTool / MCP).\n */\n async clientCredentials(\n clientIdOrInput:\n | string\n | { clientId?: string; client_id?: string; clientSecret?: string; client_secret?: string; scope?: string },\n clientSecretArg?: string,\n scopeArg = 'mcp:call mcp:register',\n ): Promise<ClientCredentialsTokenResponse> {\n const clientId =\n typeof clientIdOrInput === 'string'\n ? clientIdOrInput\n : (clientIdOrInput.clientId ?? clientIdOrInput.client_id ?? '')\n const clientSecret =\n typeof clientIdOrInput === 'string'\n ? (clientSecretArg ?? '')\n : (clientIdOrInput.clientSecret ?? clientIdOrInput.client_secret ?? '')\n const scope = typeof clientIdOrInput === 'string' ? scopeArg : (clientIdOrInput.scope ?? scopeArg)\n if (!clientId || !clientSecret) throw new Error('clientCredentials: requires clientId + clientSecret')\n const body = new URLSearchParams({\n grant_type: 'client_credentials',\n client_id: clientId,\n client_secret: clientSecret,\n scope,\n })\n const res = await fetch(`${this.baseUrl}/api/v1/auth/token`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: body.toString(),\n })\n if (!res.ok) throw await this.toError(res, 'OAuth token')\n return res.json() as Promise<ClientCredentialsTokenResponse>\n }\n\n /** Exchange a refresh token for a new short-lived access token.\n * Accepts either a positional string or an object `{ refreshToken | refresh_token }`\n * for parity with how invokeTool (MCP / portal) calls every method.\n * On success the new access token is auto-stored in the TokenManager. */\n async refresh(\n input: string | { refreshToken?: string; refresh_token?: string },\n ): Promise<RefreshResponse> {\n const refreshToken =\n typeof input === 'string'\n ? input\n : (input.refreshToken ?? input.refresh_token ?? '')\n if (!refreshToken) throw new Error('refresh: requires a refresh token')\n const result = await this.json<RefreshResponse>(\n 'POST',\n PATHS.authRefresh,\n { refresh_token: refreshToken },\n false\n )\n // Auto-store the new access token\n if (result.token) {\n this.token = result.token\n if (this.tokenManager) {\n this.tokenManager.setBundle({\n accessToken: result.token,\n refreshToken,\n })\n }\n }\n return result\n }\n\n /**\n * Check whether a token is valid. Returns claims when valid.\n * The token-to-check is passed as a query string per the backend signature.\n * Accepts either a positional string or `{ token }` object.\n */\n async validate(input: string | { token: string }): Promise<ValidateResponse> {\n const token = typeof input === 'string' ? input : input.token\n if (!token) throw new Error('validate: requires a token')\n const url = `${this.baseUrl}/api/v1/auth/validate?token=${encodeURIComponent(token)}`\n const res = await fetch(url, { method: 'POST' })\n if (!res.ok) throw await this.toError(res, 'Validate')\n return res.json() as Promise<ValidateResponse>\n }\n\n /** Send a password-reset email. In dev returns the reset token in the response.\n * Accepts a positional string or `{ email }` object. */\n async forgotPassword(input: string | { email: string }): Promise<ForgotPasswordResponse> {\n const email = typeof input === 'string' ? input : input.email\n if (!email) throw new Error('forgotPassword: requires an email')\n return this.json<ForgotPasswordResponse>(\n 'POST',\n PATHS.authForgotPassword,\n { email },\n false\n )\n }\n\n /** Complete the password reset using the token from /forgot-password.\n * camelCase keys (`resetToken`, `newPassword`) are normalised to snake_case.\n * On success the new tokens are auto-stored (same as login). */\n async resetPassword(\n input: ResetPasswordInput | { resetToken?: string; newPassword?: string },\n ): Promise<TokenResponse> {\n const result = await this.json<TokenResponse>(\n 'POST',\n PATHS.authResetPassword,\n camelToSnakeBody(input as Record<string, unknown>),\n false,\n )\n this.captureTokens(result)\n return result\n }\n\n /** Accept an invite — creates the account and returns a JWT.\n * Accepts (inviteId, input) positional OR `{ inviteId | invite_id, ...AcceptInviteInput }`.\n * On success the new token is auto-stored when present. */\n async acceptInvite(\n inviteIdOrInput: string | (AcceptInviteInput & { inviteId?: string; invite_id?: string }),\n inputArg?: AcceptInviteInput,\n ): Promise<AcceptInviteResponse> {\n let inviteId: string\n let body: AcceptInviteInput\n if (typeof inviteIdOrInput === 'string') {\n inviteId = inviteIdOrInput\n body = inputArg as AcceptInviteInput\n } else {\n inviteId = inviteIdOrInput.inviteId ?? inviteIdOrInput.invite_id ?? ''\n const { inviteId: _a, invite_id: _b, ...rest } = inviteIdOrInput\n body = rest as AcceptInviteInput\n }\n if (!inviteId) throw new Error('acceptInvite: requires an inviteId')\n const url = `/api/v1/auth/accept-invite?invite_id=${encodeURIComponent(inviteId)}`\n const result = await this.json<AcceptInviteResponse>('POST', url, camelToSnakeBody(body as unknown as Record<string, unknown>), false)\n // acceptInvite may return a token — store it if present\n if (result.token) {\n this.token = result.token\n if (this.tokenManager) {\n const existing = this.tokenManager.getBundle().refreshToken\n this.tokenManager.setBundle({\n accessToken: result.token,\n ...(existing !== undefined && { refreshToken: existing }),\n })\n }\n }\n return result\n }\n\n // ── AUTHENTICATED (Bearer required) ───────────────────────────────────────\n\n /** Current authenticated user — profile + extension fields. */\n async me(): Promise<MeResponse> {\n return this.json<MeResponse>('GET', PATHS.authMe)\n }\n\n /** Self-update for portal/profile fields.\n * camelCase keys (`displayName`, `avatarUrl`) are normalised to snake_case. */\n async patchMe(\n input: PatchMeInput | { displayName?: string; avatar?: string; avatarUrl?: string; department?: string; twinPersonality?: unknown; preferences?: Record<string, unknown>; consent?: Record<string, unknown>; tourCompletedAt?: number },\n ): Promise<MeResponse> {\n return this.json<MeResponse>('PATCH', PATHS.authMe, camelToSnakeBody(input as Record<string, unknown>))\n }\n\n /** Update password for the current user.\n * Accepts both snake_case (`current_password`/`new_password`) and\n * camelCase (`currentPassword`/`newPassword`) keys — translates the\n * latter so the backend always sees its expected snake_case payload. */\n async changePassword(\n input: ChangePasswordInput | { currentPassword?: string; newPassword?: string },\n ): Promise<PasswordChangeResponse> {\n const body = camelToSnakeBody(input as Record<string, unknown>)\n return this.json<PasswordChangeResponse>(\n 'POST',\n PATHS.authChangePassword,\n body,\n )\n }\n\n /** Revoke the caller's own token. */\n async revoke(): Promise<RevokeResponse> {\n const result = await this.json<RevokeResponse>('POST', PATHS.authRevoke, {})\n this.clearToken()\n return result\n }\n\n /** Create an invite (requires tenant_admin or higher).\n * camelCase `tenantId` is normalised to snake_case `tenant_id`. */\n async createInvite(\n input: CreateInviteInput | { email: string; role?: string; type?: string; tenantId?: string; metadata?: Record<string, unknown> },\n ): Promise<InviteResponse> {\n return this.json<InviteResponse>(\n 'POST',\n PATHS.authInvite,\n camelToSnakeBody(input as Record<string, unknown>),\n )\n }\n\n // ── Internals ─────────────────────────────────────────────────────────────\n\n /**\n * After login / resetPassword / acceptInvite, push the new tokens into\n * the TokenManager so subsequent SDK calls use the fresh session.\n * The backend may or may not return a refresh_token — when absent, the\n * existing refresh_token (if any) is preserved.\n */\n private captureTokens(result: TokenResponse | { token?: string | null; refresh_token?: string | null }): void {\n const accessToken = (result as TokenResponse).token ?? (result as { token?: string }).token\n if (!accessToken) return\n // Update the local bearer for AuthService's own authenticated methods\n this.token = accessToken\n // Push into the TokenManager so HttpClient picks it up\n if (this.tokenManager) {\n const bundle = this.tokenManager.getBundle()\n const newRefresh = result.refresh_token ?? bundle.refreshToken\n this.tokenManager.setBundle({\n accessToken,\n ...(newRefresh !== undefined && { refreshToken: newRefresh }),\n })\n }\n }\n\n private async json<T>(\n method: string,\n path: string,\n body?: unknown,\n requireAuth = true\n ): Promise<T> {\n const headers: Record<string, string> = { 'Content-Type': 'application/json' }\n if (requireAuth) {\n if (!this.token) throw new Error('AuthService: Bearer token required for ' + path)\n headers['Authorization'] = `Bearer ${this.token}`\n } else if (this.token) {\n // Optional — backend may still want it (e.g. validate/refresh in some setups)\n headers['Authorization'] = `Bearer ${this.token}`\n }\n const init: RequestInit = { method, headers }\n if (body !== undefined) init.body = JSON.stringify(body)\n const res = await fetch(`${this.baseUrl}${path}`, init)\n if (!res.ok) throw await this.toError(res, `${method} ${path}`)\n if (res.status === 204) return undefined as T\n return res.json() as Promise<T>\n }\n\n private async toError(res: Response, label: string): Promise<Error> {\n const text = await res.text().catch(() => '')\n return new Error(`${label} error ${res.status}: ${text.slice(0, 300)}`)\n }\n}\n\n// ─── Legacy aliases — keep existing imports working ─────────────────────────\n\n/** @deprecated Renamed to {@link AuthService}. Will be removed in a future release. */\nexport const AppAuthService = AuthService\n\n/**\n * Convenience: exchange env vars CPOD_CLIENT_ID + CPOD_CLIENT_SECRET for a token.\n * Looks up CPOD_BASE_URL if `baseUrl` is not provided.\n */\nexport async function getAppToken(baseUrl?: string): Promise<string> {\n const clientId = process.env['CPOD_CLIENT_ID']\n const clientSecret = process.env['CPOD_CLIENT_SECRET']\n if (!clientId || !clientSecret) {\n throw new Error(\n 'CPOD_CLIENT_ID and CPOD_CLIENT_SECRET environment variables are required'\n )\n }\n const auth = new AuthService(baseUrl ?? process.env['CPOD_BASE_URL'])\n const result = await auth.clientCredentials(clientId, clientSecret)\n return result.access_token\n}\n","import { PATHS } from '../_generated/paths.js';\n// EDMs — thin HTTP CRUD helper shared by every domain service.\n//\n// Every direct-mode domain that's been migrated to cpod-backend follows\n// the same five-verb shape: GET/POST/GET-by-id/PATCH/DELETE under a single\n// resource path. This file provides one class so each service file just\n// declares its path and (optionally) custom actions.\n\nimport type { HttpClient } from '../http/client.js'\n\nexport interface PaginatedResponse<T> {\n items: T[]\n total: number\n page: number\n page_size: number\n}\n\n/**\n * Options for a list call. Beyond paging, any extra key becomes a server-side\n * filter on the matching field. The backend understands:\n *\n * - equality: `{ status: 'open', ownerId: 'usr_…' }` → `?status=open&ownerId=…`\n * - free text: `{ search: 'vpn' }` — regex across common text fields\n * - ranges: suffix a field with an operator —\n * `_gte` `_lte` `_gt` `_lt` `_ne` `_in`\n * `_from`/`_to` (inclusive) · `_after`/`_before` (exclusive)\n * e.g. `{ dueDate_after: '2026-01-01', amount_gte: 1000 }`\n * - `_in` takes an array (or comma string): `{ status_in: ['open','blocked'] }`\n *\n * Values are coerced server-side (ISO dates → datetime, numbers, booleans).\n * Everything is optional — `list()` with no options is the unfiltered first page.\n */\nexport interface ListOptions {\n page?: number\n pageSize?: number\n /** Case-insensitive free-text search across common string fields. */\n search?: string\n /** Any other key is a field filter (see operator suffixes above). */\n [k: string]: unknown\n}\n\nfunction qs(opts?: ListOptions): string {\n if (!opts) return ''\n const parts: string[] = []\n if (opts.page != null) parts.push(`page=${opts.page}`)\n if (opts.pageSize != null) parts.push(`page_size=${encodeURIComponent(String(opts.pageSize))}`)\n for (const [k, v] of Object.entries(opts)) {\n if (k === 'page' || k === 'pageSize') continue\n if (v == null || v === '') continue\n // Arrays (e.g. `status_in: ['open','blocked']`) → comma list for `$in`.\n const value = Array.isArray(v) ? v.join(',') : String(v)\n if (value === '') continue\n parts.push(`${encodeURIComponent(k)}=${encodeURIComponent(value)}`)\n }\n return parts.length ? `?${parts.join('&')}` : ''\n}\n\n/**\n * Thin HTTP CRUD service. One per resource path\n * (e.g. `PATHS.helpdeskTickets`). Subclasses can add custom\n * actions by calling the protected ``http`` directly.\n */\nexport class HttpCrudService<TRecord extends object = Record<string, unknown>> {\n constructor(\n protected readonly http: HttpClient,\n /** Absolute path under the backend, e.g. `PATHS.helpdeskTickets`. */\n protected readonly path: string,\n ) {}\n\n list(opts?: ListOptions): Promise<PaginatedResponse<TRecord>> {\n return this.http.get<PaginatedResponse<TRecord>>(`${this.path}${qs(opts)}`)\n }\n get(id: string): Promise<TRecord> {\n return this.http.get<TRecord>(`${this.path}/${id}`)\n }\n create(body: Record<string, unknown>): Promise<TRecord> {\n return this.http.post<TRecord>(this.path, body)\n }\n update(id: string, patch: Record<string, unknown>): Promise<TRecord> {\n return this.http.patch<TRecord>(`${this.path}/${id}`, patch)\n }\n delete(id: string): Promise<void> {\n return this.http.delete<void>(`${this.path}/${id}`)\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Person — thin HTTP client over cpod-backend (PATHS.peoplePersons).\n//\n// Reachable as `client.people.persons.*` to match Standards §4.1.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class PersonService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Persons.', params: PAGINATION },\n get: { description: 'Fetch a Person by UUID.', params: [ID_PARAM] },\n create: {\n description: 'Create a Person.',\n params: [\n { name: 'email', type: 'string', required: true },\n { name: 'display_name', type: 'string', required: true },\n { name: 'first_name', type: 'string' },\n { name: 'last_name', type: 'string' },\n { name: 'type', type: 'string', description: 'employee | contractor | service' },\n { name: 'status', type: 'string', description: 'active | inactive | deactivated' },\n ],\n },\n update: { description: 'Patch Person fields.', params: [ID_PARAM] },\n deactivate: { description: 'Mark a Person as deactivated (soft).', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Person.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) {\n super(http, PATHS.peoplePersons)\n }\n}\n\n/** @deprecated Use `client.people.persons` instead. Kept for one release. */\nexport { PersonService as PeopleService }\n","// Substitute {param} placeholders in a PATHS template, in order, URL-encoding\n// each value. e.g. buildPath(PATHS.peoplePersonsByItemId, id) -> /api/v1/people/persons/<id>\nexport function buildPath(template: string, ...values: (string | number)[]): string {\n let i = 0;\n return template.replace(/\\{[^}]+\\}/g, () => encodeURIComponent(String(values[i++])));\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// GroupService — backend SCIM groups + backend EDM group metadata.\n//\n// Canonical SCIM record: GET/POST/PATCH/DELETE /api/v1/groups\n// EDM sidecar metadata: GET/PUT /api/v1/group-metadata/<group_id>\n//\n// Both halves live in cpod-backend now. The SDK enriches list/get on\n// the client side by joining the two HTTP calls.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\n\nexport type GroupKind =\n | 'department'\n | 'team'\n | 'cohort'\n | 'squad'\n | 'committee'\n | 'ad_group'\n | 'distribution_list'\n | 'custom'\n\nexport type GroupSource = 'manual' | 'active_directory' | 'azure_ad' | 'okta' | 'scim'\n\nexport interface GroupMetadata {\n group_id: string\n tenant_id: string\n display_name?: string\n description?: string\n kind?: GroupKind\n owner_id?: string\n parent_group_id?: string | null\n source?: GroupSource\n tags?: string[]\n updated_at: string\n [k: string]: unknown\n}\n\n/** Fields layered onto the SCIM group via the EDM `group_metadata` overlay. */\nexport interface GroupMetadataInput {\n display_name?: string\n description?: string\n kind?: GroupKind\n owner_id?: string\n parent_group_id?: string\n source?: GroupSource\n tags?: string[]\n}\n\n/** Strip keys whose value is `undefined` so `exactOptionalPropertyTypes` is satisfied. */\nfunction stripUndefined<T extends Record<string, unknown>>(obj: T): Partial<T> {\n const out: Partial<T> = {}\n for (const [k, v] of Object.entries(obj)) {\n if (v !== undefined) (out as Record<string, unknown>)[k] = v\n }\n return out\n}\n\nexport interface GroupListOptions {\n /** Filter by EDM kind. Applied client-side after joining metadata. */\n kind?: GroupKind\n}\n\ninterface ScimGroup {\n id: string\n displayName: string\n members?: Array<{ value: string; display?: string }>\n [k: string]: unknown\n}\n\nexport class GroupService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: {\n description: 'List groups (SCIM groups enriched with EDM metadata).',\n params: [\n { name: 'kind', type: 'string', description: 'Filter by EDM kind: department | team | cohort | squad | committee | ad_group | distribution_list | custom' },\n { name: 'search', type: 'string' },\n ],\n },\n get: {\n description: 'Fetch a group (SCIM + metadata) by group id.',\n params: [{ name: 'groupId', type: 'string', required: true }],\n },\n create: {\n description: 'Create a group; layers EDM group_metadata onto the SCIM record.',\n params: [\n { name: 'display_name', type: 'string', required: true, description: 'SCIM canonical display name.' },\n { name: 'display_name', type: 'string', description: 'Human-friendly name shown in cPod.' },\n { name: 'description', type: 'string', description: 'Group purpose / responsibilities.' },\n { name: 'kind', type: 'string', description: 'Classification of the group\\'s purpose.', enum: ['department', 'team', 'cohort', 'squad', 'committee', 'ad_group', 'distribution_list', 'custom'] },\n { name: 'owner_id', type: 'string', description: 'User responsible for the group / membership approvals.' },\n { name: 'parent_group_id', type: 'string', description: 'Parent group id for hierarchies; unset for top-level groups.' },\n { name: 'source', type: 'string', description: 'System of record the group was sourced from.', enum: ['manual', 'active_directory', 'azure_ad', 'okta', 'scim'] },\n { name: 'tags', type: 'array', description: 'Free-form labels, e.g. [\"engineering\", \"on-call\"].' },\n ],\n },\n update: {\n description: 'Patch SCIM and/or EDM metadata fields on a group.',\n params: [{ name: 'groupId', type: 'string', required: true }],\n },\n delete: {\n description: 'Delete a group.',\n params: [{ name: 'groupId', type: 'string', required: true }],\n },\n }\n\n constructor(private readonly http: HttpClient) {}\n\n // ── SCIM (canonical) ─────────────────────────────────────────────────\n\n async list(opts?: GroupListOptions): Promise<Array<ScimGroup & { metadata?: GroupMetadata }>> {\n const groups = await this.http.get<{ Resources?: ScimGroup[] } | ScimGroup[]>(PATHS.groups)\n const rows: ScimGroup[] = Array.isArray(groups) ? groups : (groups?.Resources ?? [])\n const enriched = await Promise.all(\n rows.map(async (g) => {\n const meta = await this._getMetadata(g.id).catch(() => null)\n return meta ? { ...g, metadata: meta } : g\n }),\n )\n if (opts?.kind) {\n return enriched.filter((g) => (g as any).metadata?.kind === opts.kind) as Array<ScimGroup & { metadata?: GroupMetadata }>\n }\n return enriched as Array<ScimGroup & { metadata?: GroupMetadata }>\n }\n\n async get(groupId: string): Promise<ScimGroup & { metadata?: GroupMetadata }> {\n const [g, meta] = await Promise.all([\n this.http.get<ScimGroup>(buildPath(PATHS.groupsByGroupId, groupId)),\n this._getMetadata(groupId).catch(() => null),\n ])\n return meta ? { ...g, metadata: meta } : g\n }\n\n async create(body: Partial<ScimGroup> & GroupMetadataInput) {\n const { display_name, description, kind, owner_id, parent_group_id, source, tags, ...scimBody } = body\n const scim = await this.http.post<ScimGroup>(PATHS.groups, scimBody)\n const meta = this._collectMetadata(stripUndefined({ display_name, description, kind, owner_id, parent_group_id, source, tags }))\n if (Object.keys(meta).length) {\n await this._upsertMetadata(scim.id, meta)\n }\n return this.get(scim.id)\n }\n\n async update(groupId: string, patch: Partial<ScimGroup> & GroupMetadataInput) {\n const { display_name, description, kind, owner_id, parent_group_id, source, tags, ...scimPatch } = patch\n if (Object.keys(scimPatch).length) {\n await this.http.patch(buildPath(PATHS.groupsByGroupId, groupId), scimPatch)\n }\n const meta = this._collectMetadata(stripUndefined({ display_name, description, kind, owner_id, parent_group_id, source, tags }))\n if (Object.keys(meta).length) {\n await this._upsertMetadata(groupId, meta)\n }\n return this.get(groupId)\n }\n\n private _collectMetadata(input: Partial<GroupMetadataInput>): Partial<GroupMetadata> {\n const meta: Partial<GroupMetadata> = {}\n if (input.display_name !== undefined) meta.display_name = input.display_name\n if (input.description !== undefined) meta.description = input.description\n if (input.kind !== undefined) meta.kind = input.kind\n if (input.owner_id !== undefined) meta.owner_id = input.owner_id\n if (input.parent_group_id !== undefined) meta.parent_group_id = input.parent_group_id\n if (input.source !== undefined) meta.source = input.source\n if (input.tags !== undefined) meta.tags = input.tags\n return meta\n }\n\n async delete(groupId: string) {\n await this.http.delete(buildPath(PATHS.groupsByGroupId, groupId))\n }\n\n // ── EDM metadata sidecar (backend-owned now) ─────────────────────────\n\n private _getMetadata(groupId: string): Promise<GroupMetadata> {\n return this.http.get<GroupMetadata>(buildPath(PATHS.groupMetadataByGroupId, groupId))\n }\n\n private _upsertMetadata(groupId: string, body: Partial<GroupMetadata>) {\n return this.http.put<GroupMetadata>(buildPath(PATHS.groupMetadataByGroupId, groupId), body)\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Technology Asset — thin HTTP client over cpod-backend (PATHS.technology).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class TechnologyService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Technology Assets.', params: PAGINATION },\n get: { description: 'Fetch a Technology Asset by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Technology Asset.', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'vendor', type: 'string' },\n { name: 'category', type: 'string' },\n ] },\n update: { description: 'Patch Technology Asset fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Technology Asset.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.technology) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Entitlement — thin HTTP client over cpod-backend (PATHS.entitlements).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class AccessEntitlementService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Entitlements.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a Entitlement by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Entitlement.', params: [\n { name: 'asset_id', type: 'string', required: true, description: 'Technology asset this entitlement grants access to.' },\n { name: 'principal_id', type: 'string', required: true, description: 'Person or group that holds this entitlement.' },\n { name: 'entitlement_type', type: 'string', required: true, description: 'Permission / role / access level granted (asset-specific, e.g. admin, read_only, contributor, owner).' },\n { name: 'principal_type', type: 'string', description: 'Whether principal_id refers to a person or a group. Enum: person, group (default person).' },\n { name: 'granted_at', type: 'string', description: 'When this entitlement was originally granted (ISO 8601).' },\n { name: 'granted_by_id', type: 'string', description: 'Person who approved or provisioned this entitlement.' },\n { name: 'expires_at', type: 'string', description: 'When this entitlement is scheduled to expire, if any (ISO 8601).' },\n { name: 'grant_source', type: 'string', description: 'How the entitlement was created. Enum: provisioned, inherited, direct (default provisioned).' },\n { name: 'status', type: 'string', description: 'Lifecycle status. Enum: active, expired, revoked, pending_approval (default active).' },\n ] },\n update: { description: 'Patch Entitlement fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Entitlement.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.entitlements) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Vulnerability — thin HTTP client over cpod-backend (PATHS.vulnerabilities).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class VulnerabilityService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Vulnerabilitys.', params: PAGINATION },\n get: { description: 'Fetch a Vulnerability by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Vulnerability.', params: [\n { name: 'title', type: 'string', required: true },\n { name: 'severity', type: 'string', required: true },\n { name: 'cve_id', type: 'string' },\n { name: 'affected_asset_id', type: 'string' },\n ] },\n update: { description: 'Patch Vulnerability fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Vulnerability.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.vulnerabilities) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Compliance Control — thin HTTP client over cpod-backend (PATHS.complianceControls).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class ComplianceControlService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Compliance Controls.', params: [{ name: 'search', type: 'string' }, ...PAGINATION] },\n get: { description: 'Fetch a Compliance Control by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Compliance Control.', params: [\n { name: 'framework', type: 'string', required: true, description: 'soc2 | iso27001 | nist_csf | pci_dss | hipaa | gdpr | cis | custom' },\n { name: 'control_id', type: 'string', required: true, description: \"Framework-native control identifier (e.g. 'CC6.1', 'A.9.2.1', 'PR.AC-1').\" },\n { name: 'title', type: 'string', required: true, description: 'Short title of the control as defined in the framework.' },\n { name: 'description', type: 'string', description: 'Detailed description of what this control requires.' },\n { name: 'category', type: 'string', description: \"Control category/domain (e.g. 'Access Control', 'Encryption', 'Incident Response').\" },\n { name: 'owner', type: 'string', description: 'User id responsible for implementing and maintaining this control.' },\n { name: 'status', type: 'string', description: 'implemented | partial | not_implemented | not_applicable' },\n { name: 'evidence', type: 'object', description: 'Evidence artifacts demonstrating the control is operating effectively.' },\n { name: 'last_assessed_at', type: 'string', description: 'ISO 8601 timestamp the control was last assessed.' },\n { name: 'next_review_at', type: 'string', description: 'ISO 8601 timestamp of the next scheduled review.' },\n { name: 'linked_asset_ids', type: 'object', description: 'Ids of technology assets to which this control applies.' },\n ] },\n update: { description: 'Patch Compliance Control fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Compliance Control.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.complianceControls) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Cloud Resource — thin HTTP client over cpod-backend (PATHS.cloudResources).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class CloudResourceService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Cloud Resources.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a Cloud Resource by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Cloud Resource.', params: [\n { name: 'resource_name', type: 'string', required: true, description: 'Human-readable / tag-based name of the resource.' },\n { name: 'external_id', type: 'string', description: 'Native provider resource identifier (e.g. EC2 instance id).' },\n { name: 'provider', type: 'string', description: 'Cloud provider. Enum: aws | azure | gcp | other (default aws).' },\n { name: 'account_id', type: 'string', description: 'Provider account or subscription id where the resource lives.' },\n { name: 'region', type: 'string', description: 'Provider region where the resource is located.' },\n { name: 'resource_type', type: 'string', description: \"Provider resource type in dot-notation (e.g. 's3.bucket').\" },\n { name: 'arn', type: 'string', description: 'Amazon Resource Name; null for non-AWS resources.' },\n { name: 'status', type: 'string', description: 'Operational state. Enum: running | stopped | terminated | unknown (default unknown).' },\n { name: 'asset_id', type: 'string', description: 'TechnologyAsset this resource implements / is part of.' },\n { name: 'tags', type: 'object', description: 'Provider tags as key-value pairs, synced from the provider.' },\n { name: 'cost', type: 'object', description: 'Estimated monthly cost based on provider billing data.' },\n ] },\n update: { description: 'Patch Cloud Resource fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Cloud Resource.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.cloudResources) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// License — thin HTTP client over cpod-backend (PATHS.licenses).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class LicenseService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Licenses.', params: PAGINATION },\n get: { description: 'Fetch a License by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a License.', params: [\n { name: 'vendor', type: 'string', required: true },\n { name: 'product_name', type: 'string', required: true },\n { name: 'product_sku', type: 'string' },\n { name: 'license_type', type: 'string' },\n { name: 'total_seats', type: 'number' },\n { name: 'expiry_date', type: 'string' },\n ] },\n update: { description: 'Patch License fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a License.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.licenses) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Physical Asset + Cloud Resource — thin HTTP clients over cpod-backend.\n//\n// Fixes #150: create() now applies `status: \"active\"` default for physical\n// assets, matching the backend schema. Previously callers who omitted `status`\n// got an HTTP 422 Unprocessable Entity because the backend requires it.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\nimport type {\n CreatePhysicalAssetInput,\n PhysicalAsset,\n UpdatePhysicalAssetInput,\n} from './types.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class AssetService extends HttpCrudService<PhysicalAsset> {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Physical Assets.', params: PAGINATION },\n get: { description: 'Fetch a Physical Asset by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Physical Asset. `type` must be one of: laptop, desktop, server, mobile_device, networking_equipment, printer, peripheral, other. `status` defaults to \"active\".', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'type', type: 'string', required: true, description: 'laptop | desktop | server | mobile_device | networking_equipment | printer | peripheral | other' },\n { name: 'status', type: 'string', description: 'active | inactive | in_repair | retired | lost | stolen. Default: active' },\n { name: 'serial_number', type: 'string' },\n { name: 'assignee_id', type: 'string' },\n ] },\n update: { description: 'Patch Physical Asset fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Physical Asset.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.physicalAssets) }\n\n /**\n * Create a Physical Asset. Applies `status: \"active\"` default when omitted.\n *\n * @example\n * ```ts\n * await client.assetsItems.create({\n * name: 'MBPRO-JDOE-001',\n * serial_number: 'C02ZR1Y4MD6M',\n * type: 'laptop',\n * // status defaults to \"active\"\n * })\n * ```\n */\n override create(body: Record<string, unknown> & Partial<CreatePhysicalAssetInput>): Promise<PhysicalAsset> {\n // Apply default status to avoid HTTP 422 from backend (#150)\n const payload = { status: 'active', ...body }\n return this.http.post<PhysicalAsset>(this.path, payload)\n }\n\n /**\n * Update a Physical Asset. All fields optional.\n */\n override update(id: string, patch: Record<string, unknown> & Partial<UpdatePhysicalAssetInput>): Promise<PhysicalAsset> {\n return this.http.patch<PhysicalAsset>(`${this.path}/${id}`, patch)\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Risk Item — thin HTTP client over cpod-backend (PATHS.riskItems).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class RiskService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Risk Items.', params: PAGINATION },\n get: { description: 'Fetch a Risk Item by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Risk Item.', params: [\n { name: 'title', type: 'string', required: true },\n { name: 'severity', type: 'string' },\n { name: 'owner_id', type: 'string' },\n ] },\n update: { description: 'Patch Risk Item fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Risk Item.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.riskItems) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// ─── Common ───────────────────────────────────────────────────────────────────\n\nimport type { AuthOptions } from \"../http/token-manager.js\";\n\n/** Configuration for the CpodClient. */\nexport interface CpodConfig {\n /**\n * cPod access token (JWT). Use this for the simple one-token case —\n * the SDK uses it for every call and surfaces 401s to your code.\n *\n * For long-lived sessions, prefer `auth` instead: it carries a refresh\n * token and the SDK transparently swaps an expired access token without\n * your code seeing the 401.\n *\n * Exactly one of `apiKey` or `auth` is required.\n */\n apiKey?: string;\n /**\n * Auth bundle for sessions that should outlive a single access token.\n * Pass the tokens you obtained from `client.auth.login(…)` (or your own\n * login flow). When `refreshToken` is provided, the SDK refreshes the\n * access token transparently on 401 and fires `onTokenRefreshed` so you\n * can persist the new bundle.\n *\n * Exactly one of `apiKey` or `auth` is required.\n */\n auth?: AuthOptions;\n /** Base URL origin for the cPod API. Defaults to https://api.cyberpod.app. Do not include /api/v1. */\n baseUrl?: string;\n /** Request timeout in milliseconds. Defaults to 30000. */\n timeout?: number;\n /**\n * App ID for MCP tool registration. Obtain by calling POST /api/v1/apps/register\n * once (or read from `GET /api/v1/apps/me`). Falls back to the `CPOD_APP_ID`\n * environment variable when omitted.\n */\n appId?: string;\n\n // The SDK is a pure HTTP client. Every call routes through ``baseUrl``\n // against cpod-backend. No direct Mongo / MinIO configuration is\n // accepted or read from environment variables.\n}\n\n/**\n * Standard API response wrapper for single-resource endpoints.\n */\nexport interface ApiResponse<T> {\n data: T;\n requestId: string;\n}\n\n/**\n * Standard API response wrapper for paginated list endpoints.\n */\nexport interface PaginatedResponse<T> {\n data: T[];\n total: number;\n page: number;\n pageSize: number;\n hasMore: boolean;\n}\n\n/**\n * Per-request options that override client-level defaults.\n */\nexport interface RequestOptions {\n /** AbortSignal for request cancellation. */\n signal?: AbortSignal;\n /** Override the request timeout in milliseconds. */\n timeout?: number;\n /** Additional headers to merge into the request. */\n headers?: Record<string, string>;\n}\n\n// ─── People Domain ────────────────────────────────────────────────────────────\n\n/** Classification of a Person's relationship to the organization. */\nexport type PersonType =\n | 'employee'\n | 'contractor'\n | 'vendor'\n | 'partner'\n | 'service_account';\n\n/** Lifecycle status of a Person record. */\nexport type PersonStatus = 'active' | 'on_leave' | 'terminated' | 'suspended';\n\n/** Physical or remote location for a Person. */\nexport interface PersonLocation {\n /** Office site name or identifier. */\n site?: string;\n /** City of the location. */\n city?: string;\n /** ISO 3166-1 alpha-2 country code. */\n country?: string;\n /** True if the person works remotely. */\n remote: boolean;\n}\n\n/** External identity provider binding for a Person. */\nexport interface PersonIdentity {\n /** Name of the identity provider (e.g., 'okta', 'azure_ad'). */\n provider: string;\n /** Subject ID issued by the external identity provider. */\n externalId: string;\n}\n\n/**\n * Represents an individual human or service identity in the organization.\n * Domain: People\n * Schema: data-model/schemas/person.schema.json\n */\nexport interface Person {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Optional external system identifier for cross-system correlation. */\n externalId?: string;\n /** Primary email address. Used as the canonical identifier for login. */\n email: string;\n /** Human-readable display name (e.g., \"Jane Doe\"). */\n displayName: string;\n /** Given name. */\n firstName: string;\n /** Family name. */\n lastName: string;\n /** HR system employee ID, if applicable. */\n employeeId?: string;\n /** Classification of the person's relationship to the organization. */\n type: PersonType;\n /** Current lifecycle status. */\n status: PersonStatus;\n /** Organizational department (e.g., \"Engineering\", \"Finance\"). */\n department?: string;\n /** Job title. */\n title?: string;\n /** Physical or remote work location. */\n location?: PersonLocation;\n /** UUID of the person's direct manager. */\n managerId?: string;\n /** Bound external identity provider accounts. */\n identities: PersonIdentity[];\n /** ISO 8601 date when the person started at the organization. */\n startDate?: string;\n /** ISO 8601 date when the person's employment ended. */\n endDate?: string;\n /** IANA timezone identifier (e.g. 'America/New_York'). */\n timezone?: string;\n /** Typical working hours for this person in their local timezone. */\n workingHours?: { start: string; end: string };\n /** UUID of the CostCenter to which this person's headcount cost is attributed. */\n costCenterId?: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Person record. */\nexport interface CreatePersonInput {\n email: string;\n displayName: string;\n firstName: string;\n lastName: string;\n type: PersonType;\n department?: string;\n title?: string;\n location?: PersonLocation;\n managerId?: string;\n employeeId?: string;\n externalId?: string;\n}\n\n/** Filter options for listing Person records. */\nexport interface ListPeopleOptions {\n type?: PersonType;\n status?: PersonStatus;\n department?: string;\n /** Full-text search across displayName, email, and employeeId. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Group ────────────────────────────────────────────────────────────────────\n\n/** Classification of a Group's purpose or source system. */\nexport type GroupType =\n | 'department'\n | 'team'\n | 'ad_group'\n | 'distribution_list'\n | 'custom';\n\n/** A single member record within a Group. */\nexport interface GroupMember {\n /** UUID of the Person who is a member. */\n personId: string;\n /** Role of this person within the group (e.g., 'member', 'lead'). */\n role: string;\n /** ISO 8601 timestamp when this membership was established. */\n addedAt: string;\n}\n\n/**\n * Represents a collection of People, synced from AD/LDAP or managed natively.\n * Domain: People\n * Schema: data-model/schemas/group.schema.json\n */\nexport interface Group {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Human-readable name for the group. */\n name: string;\n /** Classification of the group's purpose. */\n type: GroupType;\n /** Optional description of the group's function. */\n description?: string;\n /** UUID of the Person who owns or is accountable for this group. */\n ownerId: string;\n /** Current members of the group. */\n members: GroupMember[];\n /** UUID of the parent Group, for hierarchical group structures. */\n parentGroupId?: string;\n /** The system that is the source of truth for this group (e.g., 'active_directory'). */\n source: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Group. */\nexport interface CreateGroupInput {\n name: string;\n type: GroupType;\n description?: string;\n ownerId: string;\n parentGroupId?: string;\n source?: string;\n}\n\n// ─── Technology Domain ────────────────────────────────────────────────────────\n\n/** Classification of a technology asset. */\nexport type AssetType =\n | 'application'\n | 'saas'\n | 'infrastructure'\n | 'database'\n | 'network_device'\n | 'endpoint'\n | 'cloud_service'\n | 'api_service'\n | 'microservice';\n\n/** Lifecycle status of a TechnologyAsset. */\nexport type AssetStatus = 'active' | 'deprecated' | 'decommissioned' | 'planned';\n\n/** Deployment environment for a TechnologyAsset. */\nexport type AssetEnvironment = 'production' | 'staging' | 'development' | 'dr';\n\n/** Business criticality rating. */\nexport type Criticality = 'critical' | 'high' | 'medium' | 'low';\n\n/** Data sensitivity classification. */\nexport type DataClassification = 'public' | 'internal' | 'confidential' | 'restricted';\n\n/** Ownership reference for a TechnologyAsset. */\nexport interface AssetOwner {\n /** UUID of the owning Person. */\n personId: string;\n /** UUID of the owning Group, if group-owned. */\n groupId?: string;\n}\n\n/**\n * Represents a software application, infrastructure component, or service managed by the organization.\n * Domain: Technology\n * Schema: data-model/schemas/technology-asset.schema.json\n */\nexport interface TechnologyAsset {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Canonical system name (e.g., 'salesforce-crm'). */\n name: string;\n /** Human-readable display name. */\n displayName: string;\n /** Optional description of the asset's purpose. */\n description?: string;\n /** Asset type classification. */\n type: AssetType;\n /** Functional category (e.g., 'CRM', 'SIEM', 'API Gateway'). */\n category: string;\n /** Vendor or manufacturer name. */\n vendor: string;\n /** Software version string, if applicable. */\n version?: string;\n /** Lifecycle status. */\n status: AssetStatus;\n /** Ownership reference. */\n owner: AssetOwner;\n /** Deployment environment classification. */\n environment: AssetEnvironment;\n /** Hosting model. */\n hosting: 'cloud' | 'on_premise' | 'hybrid' | 'saas';\n /** Cloud provider name, if cloud-hosted. */\n cloudProvider?: string;\n /** Cloud region, if applicable (e.g., 'us-east-1'). */\n region?: string;\n /** Public or internal URL of the asset. */\n url?: string;\n /** Flat string tags for filtering and grouping. */\n tags: string[];\n /** Business criticality rating. */\n criticality: Criticality;\n /** Highest data classification level handled by this asset. */\n dataClassification: DataClassification;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new TechnologyAsset. */\nexport interface CreateTechnologyAssetInput {\n name: string;\n displayName: string;\n description?: string;\n type: AssetType;\n category: string;\n vendor: string;\n version?: string;\n owner: AssetOwner;\n environment: AssetEnvironment;\n hosting: 'cloud' | 'on_premise' | 'hybrid' | 'saas';\n cloudProvider?: string;\n region?: string;\n url?: string;\n tags?: string[];\n criticality: Criticality;\n dataClassification: DataClassification;\n}\n\n/** Lifecycle status of an AccessEntitlement. */\nexport type EntitlementStatus =\n | 'active'\n | 'expired'\n | 'revoked'\n | 'pending_approval';\n\n/**\n * Represents a grant of access to a TechnologyAsset for a Person or Group.\n * Domain: Technology\n * Schema: data-model/schemas/access-entitlement.schema.json\n */\nexport interface AccessEntitlement {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the TechnologyAsset this entitlement grants access to. */\n assetId: string;\n /** UUID of the Person or Group being granted access. */\n principalId: string;\n /** Discriminator for the type of principal. */\n principalType: 'person' | 'group';\n /** The specific role or permission level granted (e.g., 'read', 'admin'). */\n entitlementType: string;\n /** ISO 8601 timestamp when access was granted. */\n grantedAt: string;\n /** UUID of the Person who authorized the grant, if applicable. */\n grantedById?: string;\n /** ISO 8601 timestamp when the entitlement expires. Null if it does not expire. */\n expiresAt?: string;\n /** The system that is the authoritative source for this entitlement (e.g., 'okta'). */\n source: string;\n /** Current status of the entitlement. */\n status: EntitlementStatus;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for granting a new AccessEntitlement. */\nexport interface GrantEntitlementInput {\n assetId: string;\n principalId: string;\n principalType: 'person' | 'group';\n entitlementType: string;\n expiresAt?: string;\n}\n\n// ─── Licenses Domain ──────────────────────────────────────────────────────────\n\n/** Licensing model type. */\nexport type LicenseType =\n | 'perpetual'\n | 'subscription'\n | 'concurrent'\n | 'named_user'\n | 'site'\n | 'open_source';\n\n/** Lifecycle status of a SoftwareLicense. */\nexport type LicenseStatus =\n | 'active'\n | 'expired'\n | 'expiring_soon'\n | 'terminated';\n\n/** License allocation compliance status. */\nexport type ComplianceStatus =\n | 'compliant'\n | 'over_allocated'\n | 'under_utilized'\n | 'unknown';\n\n/** Cost details for a SoftwareLicense. */\nexport interface LicenseCost {\n /** Monetary amount. */\n amount: number;\n /** ISO 4217 currency code (e.g., 'USD', 'EUR'). */\n currency: string;\n /** Billing frequency. */\n billingCycle: 'monthly' | 'annual' | 'one_time';\n}\n\n/**\n * Represents an enterprise software license agreement with seat counts and cost tracking.\n * Domain: Licenses\n * Schema: data-model/schemas/software-license.schema.json\n */\nexport interface SoftwareLicense {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the TechnologyAsset this license is associated with, if applicable. */\n assetId?: string;\n /** Software vendor name. */\n vendor: string;\n /** Name of the software product. */\n productName: string;\n /** Vendor's SKU or part number for the product. */\n productSku: string;\n /** Licensing model. */\n licenseType: LicenseType;\n /** Total number of licensed seats. Null for site or open-source licenses. */\n totalSeats?: number;\n /** Number of seats currently assigned. Read-only; computed from LicenseAssignment records. */\n usedSeats: number;\n /** Available seats remaining. Read-only; computed as totalSeats - usedSeats. */\n availableSeats: number;\n /** Cost breakdown. */\n cost: LicenseCost;\n /** ISO 8601 date when the license was purchased. */\n purchaseDate: string;\n /** ISO 8601 date when the license expires. Null for perpetual licenses. */\n expiryDate?: string;\n /** ISO 8601 date of the next renewal. */\n renewalDate?: string;\n /** Whether the license is set to auto-renew. */\n autoRenew: boolean;\n /** ID of the supplier or reseller. */\n supplierId?: string;\n /** Contract or purchase order reference number. */\n contractReference?: string;\n /** Vendor list price per seat or billing cycle before any discount. */\n listPrice?: number;\n /** Percentage discount negotiated off the vendor list price (0–100). */\n negotiatedDiscount?: number;\n /** UUID of the CostCenter that funds this license. */\n costCenterId?: string;\n /** UUID of the Contract that governs this license agreement. */\n contractId?: string;\n /** Lifecycle status. */\n status: LicenseStatus;\n /** Allocation compliance status. */\n complianceStatus: ComplianceStatus;\n /** Flat string tags for filtering. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new SoftwareLicense. */\nexport interface CreateLicenseInput {\n assetId?: string;\n vendor: string;\n productName: string;\n productSku: string;\n licenseType: LicenseType;\n totalSeats?: number;\n cost: LicenseCost;\n purchaseDate: string;\n expiryDate?: string;\n renewalDate?: string;\n autoRenew?: boolean;\n supplierId?: string;\n contractReference?: string;\n tags?: string[];\n}\n\n/**\n * Represents the assignment of a SoftwareLicense seat to a Person or Group.\n * Domain: Licenses\n * Schema: data-model/schemas/license-assignment.schema.json\n */\nexport interface LicenseAssignment {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the SoftwareLicense being assigned. */\n licenseId: string;\n /** UUID of the Person or Group receiving the license seat. */\n assigneeId: string;\n /** Discriminator for the type of assignee. */\n assigneeType: 'person' | 'group';\n /** UUID of the specific TechnologyAsset instance, if applicable. */\n assetId?: string;\n /** ISO 8601 timestamp when the assignment was made. */\n assignedAt: string;\n /** UUID of the Person who made the assignment. */\n assignedById: string;\n /** ISO 8601 timestamp when the assignment expires. Null if it does not expire. */\n expiresAt?: string;\n /** ISO 8601 timestamp when the assigned seat was last actively used. Null if usage has never been recorded. */\n lastUsedAt?: string;\n /** Current status of the assignment. */\n status: 'active' | 'revoked' | 'expired';\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n// ─── Assets Domain ────────────────────────────────────────────────────────────\n\n/** Classification of a physical hardware asset. */\nexport type PhysicalAssetType =\n | 'laptop'\n | 'desktop'\n | 'server'\n | 'mobile'\n | 'tablet'\n | 'network_device'\n | 'printer'\n | 'other';\n\n/** Lifecycle status of a PhysicalAsset. */\nexport type PhysicalAssetStatus =\n | 'in_use'\n | 'available'\n | 'in_repair'\n | 'retired'\n | 'lost_stolen';\n\n/**\n * Represents a physical hardware device tracked by the organization.\n * Domain: Assets\n * Schema: data-model/schemas/physical-asset.schema.json\n */\nexport interface PhysicalAsset {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Organization's internal asset tag (barcode or RFID label). */\n assetTag: string;\n /** Human-readable name or label for the asset. */\n name: string;\n /** Hardware serial number. */\n serialNumber?: string;\n /** Hardware model name (e.g., 'MacBook Pro 14-inch, 2023'). */\n model: string;\n /** Hardware manufacturer (e.g., 'Apple', 'Dell', 'Cisco'). */\n manufacturer: string;\n /** Hardware type classification. */\n type: PhysicalAssetType;\n /** Lifecycle status. */\n status: PhysicalAssetStatus;\n /** Current assignment of the asset. */\n assignedTo?: {\n /** UUID of the Person currently using this asset. */\n personId?: string;\n /** Physical location description (e.g., 'HQ Floor 3, Desk 12'). */\n location?: string;\n };\n /** ISO 8601 date when the asset was purchased. */\n purchaseDate?: string;\n /** Original purchase cost. */\n purchaseCost?: {\n amount: number;\n /** ISO 4217 currency code. */\n currency: string;\n };\n /** ISO 8601 date when the hardware warranty expires. */\n warrantyExpiry?: string;\n /** Operating system details. */\n os?: {\n name: string;\n version: string;\n };\n /** Name of the MDM or device management system managing this asset. */\n managedBy?: string;\n /** ISO 8601 timestamp when the asset last checked in with its management system. */\n lastSeenAt?: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new PhysicalAsset record. */\nexport interface CreatePhysicalAssetInput {\n assetTag: string;\n name: string;\n serialNumber?: string;\n model: string;\n manufacturer: string;\n type: PhysicalAssetType;\n status?: PhysicalAssetStatus;\n assignedTo?: { personId?: string; location?: string };\n purchaseDate?: string;\n purchaseCost?: { amount: number; currency: string };\n warrantyExpiry?: string;\n os?: { name: string; version: string };\n managedBy?: string;\n}\n\n/** Cloud infrastructure provider. */\nexport type CloudProvider = 'aws' | 'azure' | 'gcp' | 'other';\n\n/**\n * Represents a discovered or managed cloud infrastructure resource.\n * Domain: Assets\n * Schema: data-model/schemas/cloud-resource.schema.json\n */\nexport interface CloudResource {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Native provider resource ID (e.g., AWS Resource ID, Azure Resource ID). */\n externalId: string;\n /** Cloud provider where this resource lives. */\n provider: CloudProvider;\n /** Cloud account or subscription ID. */\n accountId: string;\n /** Cloud region identifier (e.g., 'us-east-1', 'eastus'). */\n region: string;\n /** Provider-specific resource type (e.g., 'AWS::EC2::Instance', 'Microsoft.Compute/virtualMachines'). */\n resourceType: string;\n /** Human-readable resource name. */\n resourceName: string;\n /** AWS ARN, if applicable. */\n arn?: string;\n /** Current operational status reported by the cloud provider. */\n status: 'running' | 'stopped' | 'terminated' | 'unknown';\n /** UUID of the linked TechnologyAsset, if this resource is mapped to a known asset. */\n assetId?: string;\n /** Native cloud resource tags as key-value pairs. */\n tags: Record<string, string>;\n /** Cost estimate for this resource. */\n cost?: {\n monthlyCost: number;\n currency: string;\n /** ISO 8601 timestamp when the cost estimate was last updated. */\n lastUpdated: string;\n };\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n// ─── Risk & Compliance Domain ─────────────────────────────────────────────────\n\n/** CVSS-aligned severity rating for a Vulnerability. */\nexport type VulnerabilitySeverity =\n | 'critical'\n | 'high'\n | 'medium'\n | 'low'\n | 'informational';\n\n/** Remediation lifecycle status of a Vulnerability. */\nexport type VulnerabilityStatus =\n | 'open'\n | 'in_remediation'\n | 'remediated'\n | 'accepted_risk'\n | 'false_positive';\n\n/**\n * Represents a security vulnerability affecting a managed asset.\n * Domain: Risk & Compliance\n * Schema: data-model/schemas/vulnerability.schema.json\n */\nexport interface Vulnerability {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** CVE identifier, if applicable (e.g., 'CVE-2024-12345'). */\n cveId?: string;\n /** Short, descriptive title for the vulnerability. */\n title: string;\n /** Detailed description of the vulnerability, its impact, and affected components. */\n description: string;\n /** CVSS-aligned severity rating. */\n severity: VulnerabilitySeverity;\n /** CVSS base score (0.0–10.0). */\n cvssScore?: number;\n /** CVSS vector string. */\n cvssVector?: string;\n /** UUID of the affected asset. */\n affectedAssetId: string;\n /** Domain type of the affected asset. */\n affectedAssetType: 'technology' | 'physical' | 'cloud';\n /** Current remediation status. */\n status: VulnerabilityStatus;\n /** ISO 8601 timestamp when the vulnerability was first discovered. */\n discoveredAt: string;\n /** ISO 8601 timestamp when remediation was confirmed. */\n remediatedAt?: string;\n /** ISO 8601 deadline for remediation, based on SLA policy. */\n dueDate?: string;\n /** UUID of the Person assigned to remediate this vulnerability. */\n assignedTo?: string;\n /** Scanner or source system that discovered the vulnerability (e.g., 'qualys', 'snyk'). */\n source: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Recognized compliance framework identifiers. */\nexport type ComplianceFramework =\n | 'soc2'\n | 'iso27001'\n | 'nist_csf'\n | 'pci_dss'\n | 'hipaa'\n | 'gdpr'\n | 'cis'\n | 'custom';\n\n/** Implementation status of a ComplianceControl. */\nexport type ControlStatus =\n | 'implemented'\n | 'partial'\n | 'not_implemented'\n | 'not_applicable';\n\n/** A piece of evidence collected to demonstrate control implementation. */\nexport interface ControlEvidence {\n /** Evidence type (e.g., 'screenshot', 'policy_document', 'log_export'). */\n type: string;\n /** Description of the evidence and what it demonstrates. */\n description: string;\n /** URL to the evidence artifact, if available. */\n url?: string;\n /** ISO 8601 timestamp when the evidence was collected. */\n collectedAt: string;\n}\n\n/**\n * Represents a specific control requirement from a compliance framework.\n * Domain: Risk & Compliance\n * Schema: data-model/schemas/compliance-control.schema.json\n */\nexport interface ComplianceControl {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** The compliance framework this control belongs to. */\n framework: ComplianceFramework;\n /** Framework-specific control identifier (e.g., 'CC6.1', 'A.9.2.1'). */\n controlId: string;\n /** Short title of the control requirement. */\n title: string;\n /** Full description of the control requirement. */\n description: string;\n /** Control category within the framework (e.g., 'Access Control', 'Cryptography'). */\n category: string;\n /** UUID of the Person responsible for this control. */\n owner: string;\n /** Current implementation status. */\n status: ControlStatus;\n /** Evidence collected to demonstrate implementation. */\n evidence: ControlEvidence[];\n /** ISO 8601 timestamp of the most recent assessment. */\n lastAssessedAt?: string;\n /** ISO 8601 timestamp of the next scheduled review. */\n nextReviewAt?: string;\n /** UUIDs of TechnologyAssets or other assets this control applies to. */\n linkedAssetIds: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Risk domain category. */\nexport type RiskCategory =\n | 'security'\n | 'operational'\n | 'compliance'\n | 'vendor'\n | 'data'\n | 'financial';\n\n/** Likelihood rating for a RiskItem. */\nexport type RiskLikelihood =\n | 'rare'\n | 'unlikely'\n | 'possible'\n | 'likely'\n | 'almost_certain';\n\n/** Business impact rating for a RiskItem. */\nexport type RiskImpact =\n | 'negligible'\n | 'minor'\n | 'moderate'\n | 'major'\n | 'catastrophic';\n\n/**\n * Represents an identified enterprise risk tracked through the risk management lifecycle.\n * Domain: Risk & Compliance\n * Schema: data-model/schemas/risk-item.schema.json\n */\nexport interface RiskItem {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Short descriptive title for the risk. */\n title: string;\n /** Detailed description of the risk scenario and its potential impact. */\n description: string;\n /** Risk domain category. */\n category: RiskCategory;\n /** Estimated likelihood of the risk occurring. */\n likelihood: RiskLikelihood;\n /** Estimated business impact if the risk materializes. */\n impact: RiskImpact;\n /** Computed risk score (likelihood × impact matrix). Read-only. */\n riskScore: number;\n /** Current treatment status. */\n status: 'open' | 'mitigating' | 'accepted' | 'closed';\n /** UUID of the Person accountable for this risk. */\n owner: string;\n /** UUIDs of linked Vulnerability records that contribute to this risk. */\n linkedVulnerabilityIds: string[];\n /** UUIDs of ComplianceControl records relevant to this risk. */\n linkedControlIds: string[];\n /** Description of the planned or active mitigation strategy. */\n mitigationPlan?: string;\n /** ISO 8601 target date for risk closure or mitigation. */\n dueDate?: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new RiskItem. */\nexport interface CreateRiskInput {\n title: string;\n description: string;\n category: RiskCategory;\n likelihood: RiskLikelihood;\n impact: RiskImpact;\n owner: string;\n linkedVulnerabilityIds?: string[];\n linkedControlIds?: string[];\n mitigationPlan?: string;\n dueDate?: string;\n}\n\n// ─── Common Domain ────────────────────────────────────────────────────────────\n\n/**\n * Represents a directed relationship between any two entities in the EDM graph.\n * Relationships power the graph traversal capabilities of the cPod platform.\n * Domain: Common\n * Schema: data-model/schemas/relationship.schema.json\n */\nexport interface Relationship {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the source entity. */\n sourceId: string;\n /** EDM entity type of the source (e.g., 'Person', 'TechnologyAsset'). */\n sourceType: string;\n /** UUID of the target entity. */\n targetId: string;\n /** EDM entity type of the target. */\n targetType: string;\n /** Semantic type of the relationship (e.g., 'manages', 'owns', 'depends_on'). */\n relationshipType: string;\n /** Arbitrary additional attributes describing the relationship. */\n properties?: Record<string, unknown>;\n /** Confidence score for the relationship (0.0–1.0). Higher = more certain. */\n confidence: number;\n /** Source system that asserted this relationship (e.g., 'active_directory', 'inferred'). */\n source: string;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Relationship. */\nexport interface CreateRelationshipInput {\n sourceId: string;\n sourceType: string;\n targetId: string;\n targetType: string;\n relationshipType: string;\n properties?: Record<string, unknown>;\n confidence?: number;\n source?: string;\n}\n\n// ─── Cross-domain relationship spine (Issue #111) ─────────────────────────────\n\n/**\n * Well-known edge types for the cross-domain relationship spine.\n * These cover the most common directed edges between EDM entities;\n * `relationshipType` on {@link Relationship} remains an open string\n * so callers can use custom values beyond this set.\n */\nexport type RelationshipEdgeType =\n | 'owns'\n | 'manages'\n | 'reports_to'\n | 'member_of'\n | 'related_to'\n | 'depends_on'\n | 'responsible_for'\n | 'approved_by'\n | 'part_of';\n\n/**\n * Alias for {@link RelationshipEdgeType} — the common cross-domain edge\n * types used by the relationship spine.\n */\nexport type RelationshipType = RelationshipEdgeType;\n\n/**\n * How a relationship was established.\n * - `manual` — explicitly created by a user or integration\n * - `inferred` — derived by the platform (graph inference, ML, heuristics)\n * - `imported` — bulk-loaded from an external system (HRIS, CMDB, IdP…)\n */\nexport type RelationshipProvenance = 'manual' | 'inferred' | 'imported';\n\n/**\n * Richer cross-domain relationship record. Extends the base {@link Relationship}\n * with provenance, validity window, and actor attribution used by the\n * cross-domain spine. The base type remains backward-compatible — the extra\n * fields are all optional and only populated when the backend supports them.\n */\nexport interface ExtendedRelationship extends Relationship {\n /** UUID of the source entity (alias for `sourceId`, useful for spine queries). */\n sourceEntityId?: string;\n /** EDM entity type of the source (alias for `sourceType`). */\n sourceEntityType?: string;\n /** EDM domain of the source entity (e.g., 'people', 'technology', 'assets'). */\n sourceEntityDomain?: string;\n /** UUID of the target entity (alias for `targetId`). */\n targetEntityId?: string;\n /** EDM entity type of the target (alias for `targetType`). */\n targetEntityType?: string;\n /** EDM domain of the target entity. */\n targetEntityDomain?: string;\n /** How the relationship was established. */\n provenance?: RelationshipProvenance;\n /** ISO 8601 timestamp from which this relationship is considered valid. */\n validFrom?: string;\n /** ISO 8601 timestamp until which this relationship is considered valid. */\n validTo?: string;\n /** UUID of the user or system actor that created or last confirmed the edge. */\n actorId?: string;\n /** Human-readable explanation of why this relationship exists. */\n explanation?: string;\n}\n\n// ─── Cross-domain relationship bridges (Issue #169) ─────────────────────────\n\n/**\n * Well-known cross-domain relationship bridges in the EDM.\n *\n * These formalize the 5 most common cross-domain traversals that apps need,\n * replacing per-app query-time derivation with first-class SDK methods.\n *\n * @example\n * ```ts\n * // Traverse from a customer account to related finance records\n * const edges = await client.relationshipsEdges.traverseBridge(\n * 'customer_finance',\n * { sourceEntityId: 'acc_01HX...' }\n * );\n * ```\n */\nexport type RelationshipBridge =\n /** Customer accounts ↔ finance invoices/payments */\n | 'customer_finance'\n /** Procurement suppliers ↔ contracts ↔ GRC controls ↔ finance */\n | 'procurement_contracts_grc_finance'\n /** Projects ↔ customer accounts (project-to-customer attribution) */\n | 'projects_customer'\n /** Employee ↔ performance reviews ↔ learning records */\n | 'employee_performance_learning'\n /** Generic first-class relationship (any domain ↔ any domain) */\n | 'generic';\n\n/**\n * Bridge definition — maps a bridge name to its source and target domains.\n * Used by traverseBridge() to construct the right query.\n */\nexport interface BridgeDefinition {\n bridge: RelationshipBridge;\n sourceDomains: string[];\n targetDomains: string[];\n /** Typical edge types for this bridge. */\n edgeTypes: string[];\n}\n\n/**\n * Registry of all known relationship bridge definitions.\n */\nexport const RELATIONSHIP_BRIDGES: Record<RelationshipBridge, BridgeDefinition> = {\n customer_finance: {\n bridge: 'customer_finance',\n sourceDomains: ['customer', 'crm'],\n targetDomains: ['finance'],\n edgeTypes: ['billed_to', 'paid_by', 'credited_to'],\n },\n procurement_contracts_grc_finance: {\n bridge: 'procurement_contracts_grc_finance',\n sourceDomains: ['procurement', 'contracts'],\n targetDomains: ['grc', 'finance'],\n edgeTypes: ['governed_by', 'insured_by', 'funded_by', 'obligates'],\n },\n projects_customer: {\n bridge: 'projects_customer',\n sourceDomains: ['projects'],\n targetDomains: ['customer', 'crm'],\n edgeTypes: ['delivered_to', 'owned_by', 'sponsored_by'],\n },\n employee_performance_learning: {\n bridge: 'employee_performance_learning',\n sourceDomains: ['employee', 'people'],\n targetDomains: ['performance', 'learning'],\n edgeTypes: ['reviewed_in', 'completed', 'trained_on', 'assessed_by'],\n },\n generic: {\n bridge: 'generic',\n sourceDomains: [],\n targetDomains: [],\n edgeTypes: [],\n },\n};\n\n/**\n * Options for traversing a relationship bridge.\n */\nexport interface BridgeTraversalOptions {\n /** Filter by source entity ID. */\n sourceEntityId?: string;\n /** Filter by target entity ID. */\n targetEntityId?: string;\n /** Filter by specific edge type within the bridge. */\n edgeType?: string;\n /** Page number (1-based). */\n page?: number;\n /** Page size. */\n pageSize?: number;\n}\n\n/** Type identifier for an integrated external data source. */\nexport type DataSourceType =\n | 'active_directory'\n | 'okta'\n | 'aws'\n | 'azure'\n | 'gcp'\n | 'servicenow'\n | 'jira'\n | 'github'\n | 'jamf'\n | 'intune'\n | 'qualys'\n | 'tenable'\n | 'snyk'\n | 'crowdstrike'\n | 'custom';\n\n/** Operational status of a DataSource integration. */\nexport type DataSourceStatus = 'active' | 'error' | 'paused' | 'disconnected';\n\n/**\n * Represents an integrated external system that feeds data into the cPod EDM.\n * Domain: Common\n * Schema: data-model/schemas/data-source.schema.json\n */\nexport interface DataSource {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Human-readable name for this integration (e.g., 'Production Okta', 'AWS Prod Account'). */\n name: string;\n /** The type of system being integrated. */\n type: DataSourceType;\n /** Current operational status of the integration. */\n status: DataSourceStatus;\n /** ISO 8601 timestamp of the last successful sync. */\n lastSyncAt?: string;\n /** ISO 8601 timestamp of the next scheduled sync. */\n nextSyncAt?: string;\n /** Count of synced entities per entity type. Read-only. */\n syncedEntities: Record<string, number>;\n /** Integration configuration (credentials, endpoints, etc.). Values are redacted in responses. */\n config: Record<string, unknown>;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new DataSource integration. */\nexport interface CreateDataSourceInput {\n name: string;\n type: DataSourceType;\n config: Record<string, unknown>;\n}\n\n// ─── Work & Time Domain ───────────────────────────────────────────────────────\n\n/**\n * A recorded block of work time logged by a Person.\n * Domain: Work\n * Schema: data-model/schemas/time-entry.schema.json\n */\nexport interface TimeEntry {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person who logged this time. */\n personId: string;\n /** UUID of the task, if logged at task level. */\n taskId?: string | null;\n /** UUID of the project, if logged at project level. */\n projectId?: string | null;\n /** ISO 8601 date on which the work was performed. */\n date: string;\n /** Duration in hours (0.25–24). */\n hours: number;\n /** Optional description of the work performed. */\n notes?: string | null;\n /** Whether this time is billable to a client or project. */\n billable: boolean;\n /** UUID of the Person who approved this entry. */\n approvedById?: string | null;\n /** ISO 8601 timestamp when this entry was approved. */\n approvedAt?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new TimeEntry record. */\nexport interface CreateTimeEntryInput {\n personId: string;\n taskId?: string | null;\n projectId?: string | null;\n date: string;\n hours: number;\n notes?: string | null;\n billable?: boolean;\n}\n\n/** Filter options for listing TimeEntry records. */\nexport interface ListTimeEntriesOptions {\n personId?: string;\n projectId?: string;\n taskId?: string;\n billable?: boolean;\n dateFrom?: string;\n dateTo?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * A markdown-formatted comment authored by a Person on any EDM entity.\n * Domain: Work\n * Schema: data-model/schemas/comment.schema.json\n */\nexport interface Comment {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** EDM entity type this comment is attached to (e.g., 'task', 'project', 'risk_item'). */\n entityType: string;\n /** UUID of the specific entity this comment belongs to. */\n entityId: string;\n /** UUID of the Person who authored this comment. */\n authorId: string;\n /** Markdown-formatted body text. */\n body: string;\n /** UUID of the parent Comment for threaded replies. Null for top-level comments. */\n parentCommentId?: string | null;\n /** ISO 8601 timestamp when this thread was resolved. */\n resolvedAt?: string | null;\n /** UUID of the Person who resolved this comment. */\n resolvedById?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Comment. */\nexport interface CreateCommentInput {\n entityType: string;\n entityId: string;\n authorId: string;\n body: string;\n parentCommentId?: string | null;\n}\n\n/** Filter options for listing Comment records. */\nexport interface ListCommentsOptions {\n entityType?: string;\n entityId?: string;\n authorId?: string;\n resolved?: boolean;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * A capacity allocation expressing what percentage of a Person's time is committed to a project.\n * Domain: Work\n * Schema: data-model/schemas/capacity.schema.json\n */\nexport interface Capacity {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person whose capacity is allocated. */\n personId: string;\n /** UUID of the project this allocation is for. */\n projectId: string;\n /** ISO 8601 date — first day of the allocation period (inclusive). */\n periodStart: string;\n /** ISO 8601 date — last day of the allocation period (inclusive). */\n periodEnd: string;\n /** Percentage of working time allocated to this project (0–100). */\n allocatedPct: number;\n /** UUID of the Person who confirmed this allocation. */\n confirmedById?: string | null;\n /** ISO 8601 timestamp when this allocation was confirmed. */\n confirmedAt?: string | null;\n /** Optional notes about the allocation. */\n notes?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Capacity record. */\nexport interface CreateCapacityInput {\n personId: string;\n projectId: string;\n periodStart: string;\n periodEnd: string;\n allocatedPct: number;\n notes?: string | null;\n}\n\n/** Filter options for listing Capacity records. */\nexport interface ListCapacityOptions {\n personId?: string;\n projectId?: string;\n periodStart?: string;\n periodEnd?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Pagination ───────────────────────────────────────────────────────────────\n\n/** Common pagination parameters shared by list endpoints. */\nexport interface PaginationOptions {\n /** Maximum number of results to return. */\n limit?: number;\n /** Number of results to skip (for cursor-based pagination). */\n offset?: number;\n}\n\n// ─── Contracts Domain ─────────────────────────────────────────────────────────\n\n/** Risk rating of a Vendor as assessed by the procurement or security team. */\nexport type VendorRiskRating = 'low' | 'medium' | 'high' | 'critical';\n\n/** Procurement tier classification for a Vendor. */\nexport type VendorStrategicTier = 'preferred' | 'approved' | 'standard' | 'restricted';\n\n/** Lifecycle status of a Vendor relationship. */\nexport type VendorStatus = 'active' | 'inactive' | 'under_review';\n\n/**\n * Represents an external supplier of goods or services.\n * Domain: Contracts\n * Schema: data-model/schemas/vendor.schema.json\n */\nexport interface Vendor {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Canonical machine-friendly name (e.g., 'acme-corp'). */\n name: string;\n /** Human-readable display name. */\n displayName: string;\n /** Primary website URL. */\n website?: string | null;\n /** Risk rating assigned by the procurement or security team. */\n riskRating: VendorRiskRating;\n /** Standard payment terms in days (e.g., 30 for net-30). */\n paymentTermsDays?: number | null;\n /** Full name of the vendor's account manager. */\n accountManagerName?: string | null;\n /** Email of the vendor's account manager. */\n accountManagerEmail?: string | null;\n /** Procurement tier classification. */\n strategicTier?: VendorStrategicTier | null;\n /** Lifecycle status of the vendor relationship. */\n status: VendorStatus;\n /** Internal notes about the vendor. */\n notes?: string | null;\n /** Flat string tags for filtering and grouping. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Vendor record. */\nexport interface CreateVendorInput {\n name: string;\n displayName: string;\n riskRating: VendorRiskRating;\n status?: VendorStatus;\n website?: string | null;\n paymentTermsDays?: number | null;\n accountManagerName?: string | null;\n accountManagerEmail?: string | null;\n strategicTier?: VendorStrategicTier | null;\n notes?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Vendor records. */\nexport interface ListVendorsOptions {\n status?: VendorStatus;\n riskRating?: VendorRiskRating;\n strategicTier?: VendorStrategicTier;\n /** Full-text search across name and displayName. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Legal agreement type classification. */\nexport type ContractType = 'msa' | 'sow' | 'nda' | 'saas_subscription' | 'ela' | 'employment' | 'other';\n\n/** Lifecycle status of a Contract. */\nexport type ContractStatus = 'draft' | 'executed' | 'active' | 'expired' | 'terminated' | 'cancelled';\n\n/**\n * Represents a formal legal agreement between the enterprise and a Vendor.\n * Domain: Contracts\n * Schema: data-model/schemas/contract.schema.json\n */\nexport interface Contract {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Vendor that is party to this contract. */\n vendorId: string;\n /** UUID of the internal Person who owns this contract. */\n ownerId: string;\n /** Contract type classification. */\n type: ContractType;\n /** Human-readable name for this contract. */\n name: string;\n /** Lifecycle status. */\n status: ContractStatus;\n /** ISO 8601 date when all parties signed the contract. */\n signedDate?: string | null;\n /** ISO 8601 date when the contract's obligations begin. */\n effectiveDate?: string | null;\n /** ISO 8601 date when the contract expires. */\n expiryDate?: string | null;\n /** Days of notice required to terminate the contract. */\n noticePeriodDays?: number | null;\n /** Days before expiryDate by which cancellation must be given to avoid auto-renewal. */\n autoRenewalWindowDays?: number | null;\n /** Total contract value. */\n value?: number | null;\n /** ISO 4217 3-character currency code for the contract value. */\n currency?: string | null;\n /** UUIDs of SoftwareLicense records governed by this contract. */\n linkedLicenseIds?: string[] | null;\n /** MinIO object path to the stored contract document. */\n documentRef?: string | null;\n /** Internal notes about the contract. */\n notes?: string | null;\n /** Flat string tags for filtering and grouping. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Contract record. */\nexport interface CreateContractInput {\n vendorId: string;\n ownerId: string;\n type: ContractType;\n name: string;\n status?: ContractStatus;\n signedDate?: string | null;\n effectiveDate?: string | null;\n expiryDate?: string | null;\n noticePeriodDays?: number | null;\n autoRenewalWindowDays?: number | null;\n value?: number | null;\n currency?: string | null;\n linkedLicenseIds?: string[] | null;\n documentRef?: string | null;\n notes?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Contract records. */\nexport interface ListContractsOptions {\n vendorId?: string;\n ownerId?: string;\n type?: ContractType;\n status?: ContractStatus;\n /** Full-text search across contract name. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Fulfilment status of a ContractObligation. */\nexport type ObligationStatus = 'pending' | 'in_progress' | 'completed' | 'overdue' | 'waived';\n\n/** Recurrence interval for a repeating ContractObligation. */\nexport type RecurrenceInterval = 'monthly' | 'quarterly' | 'annual';\n\n/**\n * Represents a specific deliverable or recurring duty arising from a Contract.\n * Domain: Contracts\n * Schema: data-model/schemas/contract-obligation.schema.json\n */\nexport interface ContractObligation {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the parent Contract. */\n contractId: string;\n /** Short descriptive title. */\n title: string;\n /** Detailed description of what is required. */\n description?: string | null;\n /** ISO 8601 date by which this obligation must be completed (next occurrence for recurring). */\n dueDate?: string | null;\n /** UUID of the Person internally responsible for this obligation. */\n ownerPersonId?: string | null;\n /** Current fulfilment status. */\n status: ObligationStatus;\n /** Whether this obligation repeats on a schedule. */\n recurring: boolean;\n /** Recurrence interval. Required when recurring is true. */\n recurrenceInterval?: RecurrenceInterval | null;\n /** Internal notes about this obligation. */\n notes?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new ContractObligation record. */\nexport interface CreateContractObligationInput {\n contractId: string;\n title: string;\n description?: string | null;\n dueDate?: string | null;\n ownerPersonId?: string | null;\n status?: ObligationStatus;\n recurring: boolean;\n recurrenceInterval?: RecurrenceInterval | null;\n notes?: string | null;\n}\n\n// ─── Organizations Domain ─────────────────────────────────────────────────────\n\n/**\n * Represents the organization context for the current JWT.\n * Automatically scoped — you never pass an org ID to any API call.\n */\nexport interface Organization {\n /** Unique organization ID — same as tenantId internally. */\n id: string;\n /** Canonical organization name. */\n name: string;\n /** Billing plan. */\n plan: 'free' | 'pro' | 'enterprise';\n /** Lifecycle status. */\n status: 'active' | 'suspended';\n /** Organization-wide settings (arbitrary key-value). */\n settings?: Record<string, unknown>;\n /** ISO 8601 UTC creation timestamp. */\n createdAt: string;\n}\n\n// ─── Pods Domain ──────────────────────────────────────────────────────────────\n\n/** Lifecycle status of a Pod. */\nexport type PodStatus =\n | 'provisioning'\n | 'running'\n | 'stopping'\n | 'stopped'\n | 'failed'\n | 'terminating'\n | 'terminated';\n\n/** Desired-state workload specification for a Pod. */\nexport interface PodSpec {\n image: string;\n cpu?: string;\n memory?: string;\n replicas?: number;\n env?: Record<string, string>;\n command?: string[];\n args?: string[];\n}\n\n/** Named network port exposed by a Pod container. */\nexport interface PodPort {\n name: string;\n port: number;\n protocol?: string;\n}\n\n/** Network configuration for a Pod. */\nexport interface PodNetwork {\n ports?: PodPort[];\n clusterIp?: string;\n externalIp?: string;\n}\n\n/** Health state of a Pod. */\nexport interface PodHealth {\n ready: boolean;\n liveness?: boolean;\n}\n\n/** Represents a cPod workload unit. */\nexport interface Pod {\n id: string;\n workspaceId: string;\n name: string;\n displayName?: string;\n spec: PodSpec;\n status: PodStatus;\n network?: PodNetwork;\n health?: PodHealth;\n labels: Record<string, string>;\n annotations: Record<string, string>;\n createdAt: string;\n updatedAt: string;\n}\n\n// ─── Credentials Domain ───────────────────────────────────────────────────────\n\n/** Kind of credential. */\nexport type CredentialType = 'api_key' | 'service_account' | 'webhook_token' | 'virtual_llm';\n\n/** Lifecycle status of a Credential. */\nexport type CredentialStatus = 'active' | 'revoked' | 'expired';\n\n/** Represents an API key or service account credential. */\nexport interface Credential {\n id: string;\n organizationId: string;\n workspaceId?: string;\n name: string;\n description?: string;\n type: CredentialType;\n status: CredentialStatus;\n scopes: string[];\n keyPrefix?: string;\n expiresAt?: string;\n lastUsedAt?: string;\n createdAt: string;\n updatedAt: string;\n}\n\n/**\n * Returned only on creation. The `secret` field is the one-time plaintext value —\n * store it immediately; it will not be returned again.\n */\nexport interface CredentialCreateResponse extends Omit<Credential, 'keyPrefix' | 'lastUsedAt'> {\n secret: string;\n}\n\n// ─── User Profiles Domain ─────────────────────────────────────────────────────\n\n/** Role of a user within an Organization. */\nexport type UserRole = 'owner' | 'admin' | 'member' | 'viewer';\n\n/** Lifecycle status of a user account. */\nexport type UserStatus = 'active' | 'suspended' | 'invited' | 'deactivated';\n\n/** User-configurable display and notification settings. */\nexport interface UserPreferences {\n theme?: string;\n timezone?: string;\n locale?: string;\n notificationsEnabled?: boolean;\n}\n\n/** Represents a cPod user's profile. */\nexport interface UserProfile {\n id: string;\n email: string;\n displayName: string;\n avatarUrl?: string;\n role: UserRole;\n status: UserStatus;\n preferences?: UserPreferences;\n createdAt: string;\n updatedAt: string;\n}\n\n// ─── Investments Domain ───────────────────────────────────────────────────────\n\n/** Strategic priority level for a TechPortfolioItem. */\nexport type StrategicPriority = 'critical' | 'high' | 'medium' | 'low';\n\n/** Lifecycle status of a TechPortfolioItem. */\nexport type PortfolioItemStatus = 'active' | 'proposed' | 'under_review' | 'retired';\n\n/**\n * Groups software licenses and assets under a business capability or investment initiative.\n * Domain: Investments\n * Schema: data-model/schemas/tech-portfolio-item.schema.json\n */\nexport interface TechPortfolioItem {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Human-readable name for this portfolio item. */\n name: string;\n /** Optional free-text description of the initiative's scope and objectives. */\n description?: string | null;\n /** Business capability this investment supports (e.g. 'Collaboration', 'Security'). */\n businessCapability?: string | null;\n /** Strategic importance of this investment. */\n strategicPriority: StrategicPriority;\n /** UUID of the Person accountable for this portfolio item. */\n ownerId: string;\n /** UUIDs of SoftwareLicense records that belong to this portfolio item. */\n linkedLicenseIds: string[];\n /** UUIDs of TechnologyAsset or PhysicalAsset records that belong to this portfolio item. */\n linkedAssetIds: string[];\n /** Approved budget for this portfolio item. */\n budgetedCostAmount?: number | null;\n /** Actual spend to date for this portfolio item. */\n actualCostAmount?: number | null;\n /** ISO 4217 3-character currency code for cost amounts. */\n currency?: string | null;\n /** Optional tag linking this item to an external programme or initiative tracker. */\n initiativeTag?: string | null;\n /** Current lifecycle status. */\n status: PortfolioItemStatus;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new TechPortfolioItem. */\nexport interface CreateTechPortfolioItemInput {\n name: string;\n description?: string | null;\n businessCapability?: string | null;\n strategicPriority: StrategicPriority;\n ownerId: string;\n linkedLicenseIds?: string[];\n linkedAssetIds?: string[];\n budgetedCostAmount?: number | null;\n actualCostAmount?: number | null;\n currency?: string | null;\n initiativeTag?: string | null;\n status?: PortfolioItemStatus;\n}\n\n/** Filter options for listing TechPortfolioItem records. */\nexport interface ListPortfolioItemsOptions {\n status?: PortfolioItemStatus;\n strategicPriority?: StrategicPriority;\n ownerId?: string;\n /** Full-text search across name and businessCapability. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Lifecycle status of a CostCenter. */\nexport type CostCenterStatus = 'active' | 'inactive';\n\n/**\n * A financial cost center used to allocate technology spend.\n * Domain: Investments\n * Schema: data-model/schemas/cost-center.schema.json\n */\nexport interface CostCenter {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Unique human-readable cost center code (e.g. 'CC-ENG-001'). */\n code: string;\n /** Human-readable display name for this cost center. */\n name: string;\n /** UUID of the Person who is the budget owner for this cost center. */\n ownerId?: string | null;\n /** UUID of the parent CostCenter, if this is a child in a hierarchy. */\n parentCostCenterId?: string | null;\n /** Annual budget allocated to this cost center. */\n budgetAmount?: number | null;\n /** ISO 4217 3-character currency code for the budget amount. */\n currency?: string | null;\n /** Fiscal year to which the budgetAmount applies (e.g. '2026'). */\n fiscalYear?: string | null;\n /** Whether this cost center is actively in use. */\n status: CostCenterStatus;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new CostCenter. */\nexport interface CreateCostCenterInput {\n code: string;\n name: string;\n ownerId?: string | null;\n parentCostCenterId?: string | null;\n budgetAmount?: number | null;\n currency?: string | null;\n fiscalYear?: string | null;\n status?: CostCenterStatus;\n}\n\n/** Filter options for listing CostCenter records. */\nexport interface ListCostCentersOptions {\n status?: CostCenterStatus;\n ownerId?: string;\n /** Full-text search across code and name. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Performance & Development Domain ────────────────────────────────────────\n\n/** Qualitative label corresponding to a numeric performance rating. */\nexport type RatingLabel =\n | 'exceptional'\n | 'strong'\n | 'meets_expectations'\n | 'needs_improvement'\n | 'unsatisfactory';\n\n/** Lifecycle status of a PerformanceReview. */\nexport type ReviewStatus = 'draft' | 'submitted' | 'acknowledged' | 'closed';\n\n/**\n * A formal performance review linking a reviewee and a reviewer for a defined cycle.\n * Domain: Performance\n * Schema: data-model/schemas/performance-review.schema.json\n */\nexport interface PerformanceReview {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person being reviewed. */\n revieweeId: string;\n /** UUID of the Person conducting the review. */\n reviewerId: string;\n /** Identifier of the review cycle (e.g. '2026-H1'). */\n cycleId: string;\n /** Human-readable period this review covers (e.g. '2026-H1'). */\n period: string;\n /** Numeric overall rating on a 1–5 scale. Null until submitted. */\n overallRating?: number | null;\n /** Qualitative rating label. Null until submitted. */\n ratingLabel?: RatingLabel | null;\n /** Goal titles or IDs the reviewee achieved during this period. */\n goalsAchieved?: string[] | null;\n /** Free-text narrative on the reviewee's key strengths. */\n strengthsNarrative?: string | null;\n /** Free-text narrative on development areas and growth plan. */\n developmentNarrative?: string | null;\n /** Lifecycle status of the review. */\n status: ReviewStatus;\n /** ISO 8601 timestamp when the review was submitted. Null while in draft. */\n submittedAt?: string | null;\n /** ISO 8601 timestamp when the reviewee acknowledged the review. */\n acknowledgedAt?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new PerformanceReview. */\nexport interface CreatePerformanceReviewInput {\n revieweeId: string;\n reviewerId: string;\n cycleId: string;\n period: string;\n status?: ReviewStatus;\n overallRating?: number | null;\n ratingLabel?: RatingLabel | null;\n goalsAchieved?: string[] | null;\n strengthsNarrative?: string | null;\n developmentNarrative?: string | null;\n}\n\n/** Filter options for listing PerformanceReview records. */\nexport interface ListPerformanceReviewsOptions {\n revieweeId?: string;\n reviewerId?: string;\n cycleId?: string;\n status?: ReviewStatus;\n page?: number;\n pageSize?: number;\n}\n\n/** Category classification for a PersonGoal. */\nexport type GoalCategory = 'professional' | 'personal' | 'development' | 'compliance';\n\n/** Progress status of a PersonGoal. */\nexport type GoalStatus = 'not_started' | 'in_progress' | 'achieved' | 'missed' | 'cancelled';\n\n/**\n * A tracked goal for an individual Person within a defined period.\n * Domain: Performance\n * Schema: data-model/schemas/person-goal.schema.json\n */\nexport interface PersonGoal {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person this goal belongs to. */\n personId: string;\n /** Short descriptive title for the goal. */\n title: string;\n /** Detailed description and success criteria. */\n description?: string | null;\n /** Goal category classification. */\n category: GoalCategory;\n /** Period this goal is scoped to (e.g. '2026-Q2'). */\n period: string;\n /** ISO 8601 date by which this goal should be achieved. */\n targetDate?: string | null;\n /** Current progress status. */\n status: GoalStatus;\n /** Percentage of completion, 0–100. */\n progressPct: number;\n /** UUID of the parent OKR Objective this goal contributes to. */\n linkedObjectiveId?: string | null;\n /** Identifier of the performance review cycle this goal is associated with. */\n reviewCycleId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new PersonGoal. */\nexport interface CreatePersonGoalInput {\n personId: string;\n title: string;\n description?: string | null;\n category: GoalCategory;\n period: string;\n targetDate?: string | null;\n status?: GoalStatus;\n progressPct?: number;\n linkedObjectiveId?: string | null;\n reviewCycleId?: string | null;\n}\n\n/** Filter options for listing PersonGoal records. */\nexport interface ListPersonGoalsOptions {\n personId?: string;\n category?: GoalCategory;\n status?: GoalStatus;\n period?: string;\n reviewCycleId?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * A record of a course completion, certification, or learning activity for a Person.\n * Domain: Performance\n * Schema: data-model/schemas/learning-record.schema.json\n */\nexport interface LearningRecord {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person this learning record belongs to. */\n personId: string;\n /** Name of the course, certification, or learning activity. */\n title: string;\n /** Training provider or certification body name. */\n provider?: string | null;\n /** ISO 8601 timestamp when the learner completed or passed the activity. */\n completedAt?: string | null;\n /** ISO 8601 date when the certification expires. */\n expiresAt?: string | null;\n /** Numeric score achieved, 0–100. Null if not applicable. */\n score?: number | null;\n /** Whether the learner passed the assessment. Null if not applicable. */\n passed?: boolean | null;\n /** External credential URL, badge ID, or certification reference number. */\n certificationRef?: string | null;\n /** UUID of the training cohort this record is associated with. */\n linkedCohortId?: string | null;\n /** UUID of the formal assessment that generated this record. */\n linkedAssessmentId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new LearningRecord. */\nexport interface CreateLearningRecordInput {\n personId: string;\n title: string;\n provider?: string | null;\n completedAt?: string | null;\n expiresAt?: string | null;\n score?: number | null;\n passed?: boolean | null;\n certificationRef?: string | null;\n linkedCohortId?: string | null;\n linkedAssessmentId?: string | null;\n}\n\n/** Filter options for listing LearningRecord records. */\nexport interface ListLearningRecordsOptions {\n personId?: string;\n provider?: string;\n passed?: boolean;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Employee Experience Domain ───────────────────────────────────────────────\n\n/** Category of a PersonSkill record. */\nexport type SkillCategory =\n | 'technical'\n | 'soft'\n | 'language'\n | 'domain'\n | 'certification';\n\n/** Evidence source for a PersonSkill. */\nexport type SkillSource =\n | 'self_reported'\n | 'manager_assessed'\n | 'certification'\n | 'assessment';\n\n/**\n * Represents a skill attributed to a Person, including proficiency level and evidence source.\n * Domain: Employee Experience\n * Schema: data-model/schemas/person-skill.schema.json\n */\nexport interface PersonSkill {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person who holds this skill. */\n personId: string;\n /** Name of the skill (e.g., 'Kubernetes', 'Python', 'Spanish'). */\n skillName: string;\n /** Category of the skill. */\n category: SkillCategory;\n /** Proficiency level 1 (Beginner) – 5 (Expert). */\n proficiencyLevel: number;\n /** Evidence source for the skill record. */\n source: SkillSource;\n /** UUID of the Person who verified this skill, if applicable. */\n verifiedById?: string | null;\n /** ISO 8601 timestamp when the skill was verified. */\n verifiedAt?: string | null;\n /** ISO 8601 date after which this skill record expires. */\n validUntil?: string | null;\n /** Optional free-text notes (e.g., certificate number). */\n notes?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new PersonSkill record. */\nexport interface CreatePersonSkillInput {\n personId: string;\n skillName: string;\n category: SkillCategory;\n /** Integer 1–5. */\n proficiencyLevel: number;\n source: SkillSource;\n verifiedById?: string | null;\n verifiedAt?: string | null;\n validUntil?: string | null;\n notes?: string | null;\n}\n\n/** Filter options for listing PersonSkill records. */\nexport interface ListPersonSkillsOptions {\n personId?: string;\n category?: SkillCategory;\n source?: SkillSource;\n /** Minimum proficiency level (inclusive). */\n minProficiency?: number;\n page?: number;\n pageSize?: number;\n}\n\n/** Type of a CalendarEvent. */\nexport type CalendarEventType =\n | 'meeting'\n | 'ooo'\n | 'focus_time'\n | 'leave'\n | 'external';\n\n/** Status of a CalendarEvent booking. */\nexport type CalendarEventStatus = 'confirmed' | 'tentative' | 'cancelled';\n\n/**\n * Represents a calendar event owned by a Person — meeting, OOO, focus time, leave, or external.\n * Domain: Employee Experience\n * Schema: data-model/schemas/calendar-event.schema.json\n */\nexport interface CalendarEvent {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person who organized this event. */\n organizerId: string;\n /** UUIDs of Person records attending. */\n attendeeIds: string[];\n /** Event type classification. */\n type: CalendarEventType;\n /** Human-readable event title. */\n title: string;\n /** Optional description or agenda. */\n description?: string | null;\n /** ISO 8601 start timestamp. */\n start: string;\n /** ISO 8601 end timestamp. */\n end: string;\n /** True if the event spans the full day. */\n isAllDay: boolean;\n /** Physical location or room name. */\n location?: string | null;\n /** Video conferencing URL. */\n videoUrl?: string | null;\n /** UUID of an associated Project. */\n linkedProjectId?: string | null;\n /** UUIDs of associated Task records. */\n linkedTaskIds: string[];\n /** Booking status. */\n status: CalendarEventStatus;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new CalendarEvent. */\nexport interface CreateCalendarEventInput {\n organizerId: string;\n attendeeIds?: string[];\n type: CalendarEventType;\n title: string;\n description?: string | null;\n start: string;\n end: string;\n isAllDay?: boolean;\n location?: string | null;\n videoUrl?: string | null;\n linkedProjectId?: string | null;\n linkedTaskIds?: string[];\n status?: CalendarEventStatus;\n}\n\n/** Filter options for listing CalendarEvent records. */\nexport interface ListCalendarEventsOptions {\n organizerId?: string;\n type?: CalendarEventType;\n status?: CalendarEventStatus;\n /** ISO 8601 date — return events starting on or after this date. */\n startFrom?: string;\n /** ISO 8601 date — return events starting on or before this date. */\n startTo?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Leave type classification. */\nexport type LeaveType =\n | 'annual'\n | 'sick'\n | 'parental'\n | 'public_holiday'\n | 'unpaid'\n | 'other';\n\n/** Approval workflow status of a LeaveRequest. */\nexport type LeaveStatus = 'pending' | 'approved' | 'rejected' | 'cancelled';\n\n/**\n * Represents a leave request submitted by a Person.\n * Domain: Employee Experience\n * Schema: data-model/schemas/leave-request.schema.json\n */\nexport interface LeaveRequest {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person submitting this request. */\n personId: string;\n /** Leave category. */\n type: LeaveType;\n /** ISO 8601 start date of the leave period (inclusive). */\n startDate: string;\n /** ISO 8601 end date of the leave period (inclusive). */\n endDate: string;\n /** Current approval status. */\n status: LeaveStatus;\n /** UUID of the Person who approved or rejected the request. */\n approvedById?: string | null;\n /** ISO 8601 timestamp when the approval decision was made. */\n approvedAt?: string | null;\n /** Optional notes from the requester or approver. */\n notes?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new LeaveRequest. */\nexport interface CreateLeaveRequestInput {\n personId: string;\n type: LeaveType;\n startDate: string;\n endDate: string;\n status?: LeaveStatus;\n notes?: string | null;\n}\n\n/** Filter options for listing LeaveRequest records. */\nexport interface ListLeaveRequestsOptions {\n personId?: string;\n type?: LeaveType;\n status?: LeaveStatus;\n page?: number;\n pageSize?: number;\n}\n\n/** A single action item within a MeetingNote. */\nexport interface MeetingActionItem {\n /** Short description of the action to be taken. */\n title: string;\n /** UUID of the Person responsible for this action item. */\n assigneeId?: string | null;\n /** ISO 8601 target completion date. */\n dueDate?: string | null;\n /** UUID of a linked Task record. */\n linkedTaskId?: string | null;\n}\n\n/**\n * Structured notes captured for a meeting, including summary, decisions, and action items.\n * Domain: Employee Experience\n * Schema: data-model/schemas/meeting-note.schema.json\n */\nexport interface MeetingNote {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the CalendarEvent this note belongs to, if applicable. */\n calendarEventId?: string | null;\n /** UUID of the Person who authored these notes. */\n authorId: string;\n /** UUIDs of Persons who attended the meeting. */\n attendeeIds: string[];\n /** Title for the meeting note document. */\n title: string;\n /** Markdown-formatted summary of the discussion. */\n summary?: string | null;\n /** Decisions made during the meeting. */\n decisions: string[];\n /** Structured action items arising from the meeting. */\n actionItems: MeetingActionItem[];\n /** UUID of an associated Project. */\n linkedProjectId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new MeetingNote. */\nexport interface CreateMeetingNoteInput {\n calendarEventId?: string | null;\n authorId: string;\n attendeeIds?: string[];\n title: string;\n summary?: string | null;\n decisions?: string[];\n actionItems?: MeetingActionItem[];\n linkedProjectId?: string | null;\n}\n\n/** Filter options for listing MeetingNote records. */\nexport interface ListMeetingNotesOptions {\n authorId?: string;\n calendarEventId?: string;\n linkedProjectId?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── OKR Domain ───────────────────────────────────────────────────────────────\n\n/** Strategic category an Objective contributes to. */\nexport type ObjectiveCategory =\n | 'growth'\n | 'retention'\n | 'efficiency'\n | 'quality'\n | 'compliance'\n | 'learning';\n\n/** Lifecycle status of an Objective. */\nexport type ObjectiveStatus =\n | 'draft'\n | 'committed'\n | 'at_risk'\n | 'on_track'\n | 'achieved'\n | 'missed'\n | 'cancelled';\n\n/** Check-in cadence for an Objective. */\nexport type CheckInFrequency = 'weekly' | 'biweekly' | 'monthly';\n\n/** A dependency reference attached to an Objective. */\nexport interface ObjectiveDependency {\n /** Entity type of the dependency (e.g. 'RfpRecord', 'Contract'). */\n kind: string;\n /** ID of the dependency entity. */\n refId: string;\n /** Optional free-text note about this dependency. */\n note?: string;\n}\n\n/**\n * A strategic or quarterly Objective in the OKR framework.\n * Domain: OKR\n * Schema: data-model/schemas/objective.schema.json\n */\nexport interface Objective {\n /** Globally unique identifier. Format: obj-<uuid>. Read-only. */\n id: string;\n /** Tenant this Objective belongs to. */\n tenantId: string;\n /** Slug of the app that created this record. */\n appId: string;\n /** Planning period (e.g. '2026-Q4'). */\n period: string;\n /** Short, action-oriented title. */\n title: string;\n /** Longer narrative describing intent and context. */\n description?: string;\n /** Strategic category. */\n category?: ObjectiveCategory;\n /** User ID of the person accountable for this Objective. */\n ownerId: string;\n /** Group (department/team) that owns this Objective. */\n groupId?: string;\n /** ID of the parent Objective for cascaded alignment. */\n parentObjectiveId?: string;\n /** IDs of KeyResult records that contribute to this Objective. */\n keyResultIds: string[];\n /** Current lifecycle status. */\n status: ObjectiveStatus;\n /** Aggregate progress percentage (0-100), computed from linked KeyResults. */\n progressPct?: number;\n /** Relative importance within its parent. */\n weight?: number;\n /** IDs of execution projects that contribute to this Objective. */\n linkedProjectIds: string[];\n /** External dependencies that affect delivery. */\n dependencies: ObjectiveDependency[];\n /** How often progress check-ins are expected. */\n checkInFrequency?: CheckInFrequency;\n /** ISO 8601 timestamp of the most recent check-in. */\n lastCheckInAt?: string;\n /** Free-form tags. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** User ID of the creator. */\n createdBy?: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User ID of the last modifier. */\n updatedBy?: string;\n /** Optimistic-lock version counter. */\n version?: number;\n /** ISO 8601 soft-delete timestamp. Null if active. */\n deletedAt?: string;\n}\n\n/** Input payload for creating a new Objective. */\nexport interface CreateObjectiveInput {\n tenantId: string;\n appId: string;\n period: string;\n title: string;\n ownerId: string;\n status: ObjectiveStatus;\n description?: string;\n category?: ObjectiveCategory;\n groupId?: string;\n parentObjectiveId?: string;\n weight?: number;\n linkedProjectIds?: string[];\n dependencies?: ObjectiveDependency[];\n checkInFrequency?: CheckInFrequency;\n tags?: string[];\n}\n\n/** Filter options for listing Objective records. */\nexport interface ListObjectivesOptions {\n period?: string;\n status?: ObjectiveStatus;\n ownerId?: string;\n groupId?: string;\n category?: ObjectiveCategory;\n /** Full-text search across title and description. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** How a KeyResult metric is measured. */\nexport type KeyResultMetricType =\n | 'number'\n | 'percent'\n | 'currency'\n | 'boolean'\n | 'binary_milestone';\n\n/** Whether progress is made by the metric going up or down. */\nexport type KeyResultDirection = 'increase' | 'decrease';\n\n/** How the current metric value is sourced. */\nexport type KeyResultDataSource = 'manual' | 'connector' | 'query';\n\n/** Health status of a KeyResult. */\nexport type KeyResultStatus = 'on_track' | 'at_risk' | 'off_track' | 'achieved';\n\n/** A historical snapshot of the metric value. */\nexport interface KeyResultHistoryEntry {\n /** ISO 8601 timestamp of this snapshot. */\n at: string;\n /** Metric value at this point in time. */\n value: number;\n /** Optional commentary. */\n note?: string;\n}\n\n/**\n * A measurable result that contributes to an Objective.\n * Domain: OKR\n * Schema: data-model/schemas/key-result.schema.json\n */\nexport interface KeyResult {\n /** Globally unique identifier. Format: krs-<uuid>. Read-only. */\n id: string;\n /** Tenant this KeyResult belongs to. */\n tenantId: string;\n /** Slug of the app that created this record. */\n appId: string;\n /** ID of the Objective this KeyResult contributes to. */\n objectiveId: string;\n /** Short descriptive title. */\n title: string;\n /** The measurement type governing how progress is computed. */\n metricType: KeyResultMetricType;\n /** Starting value at the time this KeyResult was created. */\n baseline?: number;\n /** Value the metric must reach for this KeyResult to be achieved. */\n target: number;\n /** Latest observed value. */\n current: number;\n /** Human-readable unit label (e.g. '%', 'MRR', 'count'). */\n unit?: string;\n /** Whether progress is made by the metric increasing or decreasing. */\n direction: KeyResultDirection;\n /** User ID of the person accountable for this KeyResult. */\n ownerId: string;\n /** How the current metric value is sourced. */\n dataSource?: KeyResultDataSource;\n /** ID of the connector used to pull metric data automatically. */\n connectorId?: string;\n /** Metric query expression (when dataSource is 'query'). */\n query?: string;\n /** Computed progress percentage (0-100). */\n progressPct?: number;\n /** Current health status. */\n status: KeyResultStatus;\n /** ISO 8601 timestamp when the current value was last updated. */\n lastUpdateAt?: string;\n /** Ordered log of metric value snapshots. */\n history: KeyResultHistoryEntry[];\n /** Free-form tags. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** User ID of the creator. */\n createdBy?: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User ID of the last modifier. */\n updatedBy?: string;\n /** Optimistic-lock version counter. */\n version?: number;\n /** ISO 8601 soft-delete timestamp. Null if active. */\n deletedAt?: string;\n}\n\n/** Input payload for creating a new KeyResult. */\nexport interface CreateKeyResultInput {\n tenantId: string;\n appId: string;\n objectiveId: string;\n title: string;\n metricType: KeyResultMetricType;\n target: number;\n current: number;\n direction: KeyResultDirection;\n ownerId: string;\n status: KeyResultStatus;\n baseline?: number;\n unit?: string;\n dataSource?: KeyResultDataSource;\n connectorId?: string;\n query?: string;\n tags?: string[];\n}\n\n/** Filter options for listing KeyResult records. */\nexport interface ListKeyResultsOptions {\n objectiveId?: string;\n status?: KeyResultStatus;\n ownerId?: string;\n metricType?: KeyResultMetricType;\n /** Full-text search across title. */\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Project Domain ───────────────────────────────────────────────────────────\n\n/** Classification of a Project's purpose. */\nexport type ProjectKind = 'delivery' | 'engineering' | 'internal' | 'research' | 'marketing';\n\n/** Lifecycle status of a Project. */\nexport type ProjectStatus = 'planning' | 'active' | 'on_hold' | 'completed' | 'cancelled';\n\n/** Priority level shared across Project, Task, and Feature. */\nexport type ProjectPriority = 'low' | 'medium' | 'high' | 'critical';\n\n/** Role of a member within a Project. */\nexport type ProjectMemberRole = 'lead' | 'contributor' | 'reviewer' | 'observer';\n\n/** A project member with their assigned role. */\nexport interface ProjectMember {\n /** User ID of the member. */\n userId: string;\n /** Role of this member within the project. */\n projectRole: ProjectMemberRole;\n}\n\n/** A linked source code repository. */\nexport interface RepositoryRef {\n /** VCS provider name (e.g., 'github', 'gitlab'). */\n provider: string;\n /** Repository URL. */\n url: string;\n}\n\n/** Budget tracking for a Project. */\nexport interface ProjectBudget {\n /** Planned budget amount. */\n planned: number;\n /** Amount spent to date. */\n spent: number;\n /** ISO 4217 currency code. */\n currency: string;\n}\n\n/**\n * Represents a delivery, engineering, or internal project.\n * Domain: Project\n * Schema: data-model/schemas/project.schema.json\n */\nexport interface Project {\n id: string;\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n key: string;\n kind: ProjectKind;\n accountId?: string | null;\n dealId?: string | null;\n status: ProjectStatus;\n priority?: ProjectPriority | null;\n startDate?: string | null;\n endDate?: string | null;\n actualStartDate?: string | null;\n actualEndDate?: string | null;\n budget?: ProjectBudget | null;\n memberIds: string[];\n members: ProjectMember[];\n groupIds: string[];\n repositoryRefs: RepositoryRef[];\n description?: string | null;\n objectives: string[];\n linkedObjectiveIds: string[];\n attachmentRefs: string[];\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Project. */\nexport interface CreateProjectInput {\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n key: string;\n kind: ProjectKind;\n status?: ProjectStatus;\n accountId?: string | null;\n dealId?: string | null;\n priority?: ProjectPriority | null;\n startDate?: string | null;\n endDate?: string | null;\n budget?: ProjectBudget | null;\n memberIds?: string[];\n members?: ProjectMember[];\n groupIds?: string[];\n repositoryRefs?: RepositoryRef[];\n description?: string | null;\n objectives?: string[];\n linkedObjectiveIds?: string[];\n attachmentRefs?: string[];\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Project records. */\nexport interface ListProjectsOptions {\n status?: ProjectStatus;\n kind?: ProjectKind;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Lifecycle status of a Task. */\nexport type TaskStatus = 'backlog' | 'todo' | 'in_progress' | 'in_review' | 'done' | 'blocked' | 'cancelled';\n\n/** A linked pull request or branch reference. */\nexport interface TaskRepositoryRef {\n provider: string;\n prUrl?: string | null;\n branch?: string | null;\n}\n\n/**\n * Represents a unit of work within a Project.\n * Domain: Project\n * Schema: data-model/schemas/task.schema.json\n */\nexport interface Task {\n id: string;\n tenantId: string;\n appId: string;\n projectId: string;\n parentTaskId?: string | null;\n sprintId?: string | null;\n featureId?: string | null;\n title: string;\n description?: string | null;\n taskNumber: string;\n status: TaskStatus;\n priority: ProjectPriority;\n storyPoints?: number | null;\n estimatedHours?: number | null;\n actualHours?: number | null;\n assigneeId?: string | null;\n reviewerIds: string[];\n labels: string[];\n dueDate?: string | null;\n completedAt?: string | null;\n blockedByTaskIds: string[];\n duplicatesTaskId?: string | null;\n repositoryRef?: TaskRepositoryRef | null;\n commentCount?: number | null;\n attachmentRefs: string[];\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Task. */\nexport interface CreateTaskInput {\n tenantId: string;\n appId: string;\n projectId: string;\n title: string;\n taskNumber: string;\n status?: TaskStatus;\n priority: ProjectPriority;\n parentTaskId?: string | null;\n sprintId?: string | null;\n featureId?: string | null;\n description?: string | null;\n storyPoints?: number | null;\n estimatedHours?: number | null;\n assigneeId?: string | null;\n reviewerIds?: string[];\n labels?: string[];\n dueDate?: string | null;\n blockedByTaskIds?: string[];\n duplicatesTaskId?: string | null;\n repositoryRef?: TaskRepositoryRef | null;\n attachmentRefs?: string[];\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Task records. */\nexport interface ListTasksOptions {\n projectId?: string;\n sprintId?: string;\n featureId?: string;\n status?: TaskStatus;\n priority?: ProjectPriority;\n assigneeId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Lifecycle status of a Sprint. */\nexport type SprintStatus = 'planned' | 'active' | 'in_review' | 'completed' | 'cancelled';\n\n/** Sprint retrospective notes. */\nexport interface SprintRetrospective {\n wentWell: string[];\n improvements: string[];\n actions: string[];\n}\n\n/**\n * Represents a time-boxed iteration container within a Project.\n * Domain: Project\n * Schema: data-model/schemas/sprint.schema.json\n */\nexport interface Sprint {\n id: string;\n tenantId: string;\n appId: string;\n projectId: string;\n name: string;\n weekKey?: string | null;\n startDate: string;\n endDate: string;\n status: SprintStatus;\n goal?: string | null;\n committedPoints?: number | null;\n completedPoints?: number | null;\n taskIds: string[];\n featureIds: string[];\n leadId?: string | null;\n retrospective?: SprintRetrospective | null;\n aiPlan?: string | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Sprint. */\nexport interface CreateSprintInput {\n tenantId: string;\n appId: string;\n projectId: string;\n name: string;\n startDate: string;\n endDate: string;\n status?: SprintStatus;\n weekKey?: string | null;\n goal?: string | null;\n committedPoints?: number | null;\n taskIds?: string[];\n featureIds?: string[];\n leadId?: string | null;\n aiPlan?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Sprint records. */\nexport interface ListSprintsOptions {\n projectId?: string;\n status?: SprintStatus;\n leadId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Source type for a Feature. */\nexport type FeatureSourceType = 'manual' | 'url' | 'github_issue' | 'teams_intake' | 'rfp';\n\n/** Lifecycle status of a Feature. */\nexport type FeatureStatus = 'idea' | 'active' | 'in_progress' | 'completed' | 'cancelled';\n\n/** A linked GitHub issue reference. */\nexport interface GithubIssueRef {\n issueId: number;\n nodeId: string;\n url: string;\n status: string;\n}\n\n/** A single status transition in a Feature's history. */\nexport interface FeatureStatusHistoryEntry {\n fromStatus: string;\n toStatus: string;\n changedBy: string;\n changedAt: string;\n}\n\n/**\n * Represents a product or work-stream unit larger than a Task.\n * Domain: Project\n * Schema: data-model/schemas/feature.schema.json\n */\nexport interface Feature {\n id: string;\n tenantId: string;\n appId: string;\n projectId?: string | null;\n title: string;\n description?: string | null;\n category?: string | null;\n priority: ProjectPriority;\n status: FeatureStatus;\n sourceType?: FeatureSourceType | null;\n sourceUrl?: string | null;\n sprintId?: string | null;\n sectionIds: string[];\n assigneeIds: string[];\n storyPoints?: number | null;\n goals: string[];\n aiPlan?: string | null;\n linkedTaskIds: string[];\n linkedDealId?: string | null;\n linkedRfpId?: string | null;\n githubIssueRef?: GithubIssueRef | null;\n statusHistory: FeatureStatusHistoryEntry[];\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Feature. */\nexport interface CreateFeatureInput {\n tenantId: string;\n appId: string;\n title: string;\n priority: ProjectPriority;\n status?: FeatureStatus;\n projectId?: string | null;\n description?: string | null;\n category?: string | null;\n sourceType?: FeatureSourceType | null;\n sourceUrl?: string | null;\n sprintId?: string | null;\n sectionIds?: string[];\n assigneeIds?: string[];\n storyPoints?: number | null;\n goals?: string[];\n aiPlan?: string | null;\n linkedTaskIds?: string[];\n linkedDealId?: string | null;\n linkedRfpId?: string | null;\n githubIssueRef?: GithubIssueRef | null;\n tags?: string[];\n}\n\n/** Filter options for listing Feature records. */\nexport interface ListFeaturesOptions {\n projectId?: string;\n sprintId?: string;\n status?: FeatureStatus;\n priority?: ProjectPriority;\n sourceType?: FeatureSourceType;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Customer Domain ──────────────────────────────────────────────────────────\n\n/** Lifecycle stage of a customer Account. */\nexport type AccountLifecycleStage =\n | 'lead'\n | 'prospect'\n | 'account'\n | 'customer'\n | 'churned';\n\n/** Customer health indicator. */\nexport type AccountHealthScore = 'green' | 'yellow' | 'red';\n\n/** A physical address associated with an Account. */\nexport interface AccountAddress {\n type: 'billing' | 'shipping' | 'office';\n line1: string;\n line2?: string;\n city: string;\n region?: string;\n postalCode?: string;\n country: string;\n}\n\n/**\n * The canonical customer or company record.\n * Domain: Customer\n * Schema: data-model/schemas/account.schema.json\n */\nexport interface Account {\n id: string;\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n legalName?: string | null;\n industry?: string | null;\n subIndustry?: string | null;\n website?: string | null;\n domain?: string | null;\n phone?: string | null;\n addresses: AccountAddress[];\n annualRevenue?: number | null;\n employeeCount?: number | null;\n lifecycleStage: AccountLifecycleStage;\n leadSource?: string | null;\n healthScore?: AccountHealthScore | null;\n parentAccountId?: string | null;\n description?: string | null;\n lastActivityAt?: string | null;\n firstContactedAt?: string | null;\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number | null;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Account. */\nexport interface CreateAccountInput {\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n lifecycleStage: AccountLifecycleStage;\n legalName?: string | null;\n industry?: string | null;\n subIndustry?: string | null;\n website?: string | null;\n domain?: string | null;\n phone?: string | null;\n addresses?: AccountAddress[];\n annualRevenue?: number | null;\n employeeCount?: number | null;\n leadSource?: string | null;\n healthScore?: AccountHealthScore | null;\n parentAccountId?: string | null;\n description?: string | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Account records. */\nexport interface ListAccountsOptions {\n lifecycleStage?: AccountLifecycleStage;\n ownerId?: string;\n industry?: string;\n healthScore?: AccountHealthScore;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Seniority level of a Contact within their company. */\nexport type ContactSeniority =\n | 'c_suite'\n | 'vp'\n | 'director'\n | 'manager'\n | 'individual_contributor';\n\n/** Role a Contact plays in deal decisions. */\nexport type ContactDecisionRole =\n | 'decision_maker'\n | 'champion'\n | 'influencer'\n | 'blocker'\n | 'user';\n\n/** GDPR/CASL consent record attached to a Contact. */\nexport interface ContactGdprConsent {\n recordedAt: string;\n source: string;\n consentText: string;\n}\n\n/**\n * A person at a customer account (external contact, not an internal user).\n * Domain: Customer\n * Schema: data-model/schemas/contact.schema.json\n */\nexport interface Contact {\n id: string;\n tenantId: string;\n appId: string;\n accountId?: string | null;\n firstName: string;\n lastName: string;\n displayName?: string | null;\n email?: string | null;\n phone?: string | null;\n jobTitle?: string | null;\n seniority?: ContactSeniority | null;\n decisionRole?: ContactDecisionRole | null;\n isPrimary?: boolean | null;\n linkedinUrl?: string | null;\n reportsToContactId?: string | null;\n lastInteractionAt?: string | null;\n optedIn?: boolean | null;\n optedInAt?: string | null;\n gdprConsent?: ContactGdprConsent | null;\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number | null;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Contact. */\nexport interface CreateContactInput {\n tenantId: string;\n appId: string;\n firstName: string;\n lastName: string;\n accountId?: string | null;\n displayName?: string | null;\n email?: string | null;\n phone?: string | null;\n jobTitle?: string | null;\n seniority?: ContactSeniority | null;\n decisionRole?: ContactDecisionRole | null;\n isPrimary?: boolean | null;\n linkedinUrl?: string | null;\n reportsToContactId?: string | null;\n optedIn?: boolean | null;\n gdprConsent?: ContactGdprConsent | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Contact records. */\nexport interface ListContactsOptions {\n accountId?: string;\n seniority?: ContactSeniority;\n decisionRole?: ContactDecisionRole;\n isPrimary?: boolean;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Stage of a Deal in the sales pipeline. */\nexport type DealStage =\n | 'discovery'\n | 'qualification'\n | 'rfp_intake'\n | 'proposal'\n | 'negotiation'\n | 'closed_won'\n | 'closed_lost'\n | 'on_hold';\n\n/** Forecast category for revenue planning. */\nexport type DealForecastCategory = 'pipeline' | 'best_case' | 'commit' | 'closed';\n\n/** Business motion classification for a Deal. */\nexport type DealType = 'new_business' | 'expansion' | 'renewal' | 'cross_sell';\n\n/** Categorical reason a deal was lost. */\nexport type DealLossCategory = 'price' | 'feature' | 'timing' | 'competitor' | 'no_decision';\n\n/** An inline stage-transition entry in a Deal's audit log. */\nexport interface DealAuditLogEntry {\n stage: DealStage;\n changedBy: string;\n changedAt: string;\n notes?: string | null;\n}\n\n/**\n * A sales opportunity.\n * Domain: Customer\n * Schema: data-model/schemas/deal.schema.json\n */\nexport interface Deal {\n id: string;\n tenantId: string;\n appId: string;\n accountId: string;\n ownerId: string;\n name: string;\n dealNumber: string;\n pipelineId?: string | null;\n stage: DealStage;\n value?: number | null;\n currency: string;\n probability?: number | null;\n forecastCategory?: DealForecastCategory | null;\n expectedCloseDate?: string | null;\n actualCloseDate?: string | null;\n nextFollowupDate?: string | null;\n dealType?: DealType | null;\n dealSource?: string | null;\n competitors: string[];\n lossReason?: string | null;\n lossCategory?: DealLossCategory | null;\n closureNotes?: string | null;\n primaryContactId?: string | null;\n contactIds: string[];\n rfpRecordId?: string | null;\n quoteIds: string[];\n proposalIds: string[];\n attachmentRefs: string[];\n linkedTaskIds: string[];\n auditLog: DealAuditLogEntry[];\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number | null;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Deal. */\nexport interface CreateDealInput {\n tenantId: string;\n appId: string;\n accountId: string;\n ownerId: string;\n name: string;\n dealNumber: string;\n stage: DealStage;\n currency: string;\n pipelineId?: string | null;\n value?: number | null;\n probability?: number | null;\n forecastCategory?: DealForecastCategory | null;\n expectedCloseDate?: string | null;\n nextFollowupDate?: string | null;\n dealType?: DealType | null;\n dealSource?: string | null;\n competitors?: string[];\n primaryContactId?: string | null;\n contactIds?: string[];\n rfpRecordId?: string | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Deal records. */\nexport interface ListDealsOptions {\n accountId?: string;\n ownerId?: string;\n stage?: DealStage;\n dealType?: DealType;\n forecastCategory?: DealForecastCategory;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * Lifecycle status of a Quote.\n *\n * Canonical (API) form is lowercase. The legacy CRM surface emits display-cased\n * values (`Draft`, `Sent`, `Accepted`, `Rejected`, `Expired`); those are\n * normalized to this lowercase form.\n */\nexport type QuoteStatus = 'draft' | 'sent' | 'accepted' | 'rejected' | 'expired';\n\n/** Embedded line-item summary returned inline on a Quote. */\nexport interface QuoteLineItemSummary {\n id?: string;\n description: string;\n quantity: number;\n unitPrice: number;\n discount?: number | null;\n total: number;\n}\n\n/**\n * A sales quote / pricing proposal against an Account (and optionally a Deal).\n * Domain: Customer (CRM) — PATHS.crmQuotes.\n */\nexport interface Quote {\n id: string;\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n quoteNumber: string;\n accountId: string;\n dealId?: string | null;\n value?: number | null;\n currency: string;\n status: QuoteStatus;\n dateIssued?: string | null;\n validityDate?: string | null;\n contractDuration?: string | null;\n isPrimary: boolean;\n notes?: string | null;\n tags: string[];\n customFields?: Record<string, unknown> | null;\n /** Embedded summary of the quote's line items (full records via `customer.lineItems`). */\n lineItems: QuoteLineItemSummary[];\n createdAt: string;\n updatedAt: string;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a Quote. */\nexport interface CreateQuoteInput {\n tenantId: string;\n appId: string;\n ownerId: string;\n name: string;\n quoteNumber: string;\n accountId: string;\n currency: string;\n dealId?: string | null;\n value?: number | null;\n status?: QuoteStatus;\n dateIssued?: string | null;\n validityDate?: string | null;\n contractDuration?: string | null;\n isPrimary?: boolean;\n notes?: string | null;\n tags?: string[];\n customFields?: Record<string, unknown> | null;\n lineItems?: QuoteLineItemSummary[];\n}\n\n/** Filter options for listing Quote records. */\nexport interface ListQuotesOptions {\n accountId?: string;\n dealId?: string;\n status?: QuoteStatus;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** A first-class line item belonging to a Quote — PATHS.crmLineItems. */\nexport interface LineItem {\n id: string;\n tenantId: string;\n appId: string;\n quoteId: string;\n description: string;\n quantity: number;\n unitPrice: number;\n discount?: number | null;\n total: number;\n createdAt: string;\n updatedAt: string;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a LineItem. */\nexport interface CreateLineItemInput {\n tenantId: string;\n appId: string;\n quoteId: string;\n description: string;\n quantity: number;\n unitPrice: number;\n discount?: number | null;\n total?: number | null;\n}\n\n/** Filter options for listing LineItem records. */\nexport interface ListLineItemsOptions {\n quoteId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Type of an Activity touchpoint. */\nexport type ActivityType =\n | 'call'\n | 'email'\n | 'meeting'\n | 'note'\n | 'task'\n | 'chat'\n | 'demo'\n | 'event'\n | 'linkedin_msg';\n\n/** Lifecycle status of an Activity. */\nexport type ActivityStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';\n\n/** Priority of an Activity. */\nexport type ActivityPriority = 'low' | 'medium' | 'high';\n\n/** Communication direction for calls and emails. */\nexport type ActivityDirection = 'inbound' | 'outbound';\n\n/** Outcome of a call or email activity. */\nexport type ActivityOutcome =\n | 'connected'\n | 'no_answer'\n | 'voicemail'\n | 'email_sent'\n | 'email_replied';\n\n/** Who or what performed an Activity. */\nexport type ActivityActorType = 'human' | 'ai' | 'system';\n\n/** A participant in an Activity (user or contact). */\nexport interface ActivityParticipant {\n userId?: string | null;\n contactId?: string | null;\n role: 'organizer' | 'attendee';\n}\n\n/** Recurrence schedule for a repeating Activity. */\nexport interface ActivityRecurrence {\n frequency: string;\n endDate?: string | null;\n}\n\n/**\n * A touchpoint timeline entry, polymorphic over multiple activity types.\n * Domain: Customer\n * Schema: data-model/schemas/activity.schema.json\n */\nexport interface Activity {\n id: string;\n tenantId: string;\n appId: string;\n accountId?: string | null;\n dealId?: string | null;\n contactId?: string | null;\n contactIds: string[];\n activityType: ActivityType;\n subject: string;\n description?: string | null;\n activityDate: string;\n dueDate?: string | null;\n completedAt?: string | null;\n status: ActivityStatus;\n priority?: ActivityPriority | null;\n direction?: ActivityDirection | null;\n outcome?: ActivityOutcome | null;\n actorType: ActivityActorType;\n performedByUserId: string;\n participants: ActivityParticipant[];\n linkedTraceId?: string | null;\n attachmentRefs: string[];\n recurrence?: ActivityRecurrence | null;\n reminderSent?: boolean | null;\n customFields?: Record<string, unknown> | null;\n tags: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number | null;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Activity. */\nexport interface CreateActivityInput {\n tenantId: string;\n appId: string;\n activityType: ActivityType;\n subject: string;\n activityDate: string;\n status: ActivityStatus;\n actorType: ActivityActorType;\n performedByUserId: string;\n accountId?: string | null;\n dealId?: string | null;\n contactId?: string | null;\n contactIds?: string[];\n description?: string | null;\n dueDate?: string | null;\n priority?: ActivityPriority | null;\n direction?: ActivityDirection | null;\n outcome?: ActivityOutcome | null;\n participants?: ActivityParticipant[];\n linkedTraceId?: string | null;\n recurrence?: ActivityRecurrence | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Activity records. */\nexport interface ListActivitiesOptions {\n accountId?: string;\n dealId?: string;\n contactId?: string;\n activityType?: ActivityType;\n status?: ActivityStatus;\n actorType?: ActivityActorType;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── GRC Domain ───────────────────────────────────────────────────────────────\n\n/** Lifecycle status of a Framework record. */\nexport type FrameworkStatus = 'active' | 'pending' | 'superseded' | 'retired';\n\n/** Overall risk impact or assurance level associated with a Framework. */\nexport type FrameworkLevel = 'low' | 'medium' | 'high';\n\n/** Issuing regulatory body for a Framework. */\nexport interface FrameworkAuthority {\n name: string;\n country: string;\n url?: string;\n}\n\n/**\n * Represents a regulatory or industry compliance framework (e.g. SOC 2, ISO 27001, NIST CSF).\n * Domain: GRC\n * Schema: data-model/schemas/grc-framework.schema.json\n */\nexport interface GrcFramework {\n id: string;\n tenantId?: string | null;\n appId: string;\n slug: string;\n name: string;\n version: string;\n status: FrameworkStatus;\n authority?: FrameworkAuthority | null;\n jurisdiction?: string[];\n industries?: string[];\n effectiveDate?: string | null;\n complianceDeadline?: string | null;\n scopeAndApplicability?: Record<string, unknown> | null;\n exemptionsAndExceptions?: Record<string, unknown> | null;\n controlCategories?: string[];\n controlCount?: number | null;\n riskCategories?: string[];\n riskImpact?: FrameworkLevel | null;\n assuranceLevel?: FrameworkLevel | null;\n relatedFrameworkIds?: string[];\n derivedFromFrameworkId?: string | null;\n penalties?: Record<string, unknown> | null;\n reportingRequirements?: Record<string, unknown> | null;\n certification?: string | null;\n referenceDocs?: string[];\n keyTerms?: Record<string, string> | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new GrcFramework. */\nexport interface CreateGrcFrameworkInput {\n appId: string;\n slug: string;\n name: string;\n version: string;\n status?: FrameworkStatus;\n tenantId?: string | null;\n authority?: FrameworkAuthority | null;\n jurisdiction?: string[];\n industries?: string[];\n effectiveDate?: string | null;\n complianceDeadline?: string | null;\n controlCategories?: string[];\n riskImpact?: FrameworkLevel | null;\n assuranceLevel?: FrameworkLevel | null;\n tags?: string[];\n}\n\n/** Filter options for listing GrcFramework records. */\nexport interface ListGrcFrameworksOptions {\n status?: FrameworkStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Implementation maturity level for a GRC Control. */\nexport type ControlMaturity = 'not_implemented' | 'partial' | 'implemented' | 'optimized';\n\n/**\n * Represents a specific requirement within a Framework.\n * Domain: GRC\n * Schema: data-model/schemas/grc-control.schema.json\n */\nexport interface GrcControl {\n id: string;\n tenantId: string;\n appId: string;\n frameworkId: string;\n controlRef: string;\n name: string;\n description: string;\n category: string;\n objective?: string | null;\n implementationGuidance?: string | null;\n implementationMaturity: ControlMaturity;\n effectiveness?: number | null;\n ownerId: string;\n nextReviewDate?: string | null;\n evidenceIds?: string[];\n mappedControlIds?: string[];\n mitigatedRiskIds?: string[];\n relatedDocumentIds?: string[];\n knowledgeEntityId?: string | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new GrcControl. */\nexport interface CreateGrcControlInput {\n tenantId: string;\n appId: string;\n frameworkId: string;\n controlRef: string;\n name: string;\n description: string;\n category: string;\n ownerId: string;\n implementationMaturity?: ControlMaturity;\n objective?: string | null;\n implementationGuidance?: string | null;\n effectiveness?: number | null;\n nextReviewDate?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing GrcControl records. */\nexport interface ListGrcControlsOptions {\n frameworkId?: string;\n ownerId?: string;\n implementationMaturity?: ControlMaturity;\n category?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Evidence collection method. */\nexport type EvidenceCollectionMethod = 'manual' | 'automated' | 'system_extract' | 'connector_pull';\n\n/** Assessment result for an Evidence record. */\nexport type EvidenceAssessmentResult = 'effective' | 'partial' | 'ineffective' | 'not_assessed';\n\n/** Evidence artifact type. */\nexport type EvidenceType =\n | 'policy_doc'\n | 'screenshot'\n | 'report'\n | 'attestation'\n | 'log_extract'\n | 'configuration'\n | 'interview'\n | 'certificate';\n\n/** Validity window for an Evidence record. */\nexport interface EvidencePeriod {\n from: string;\n to: string;\n}\n\n/**\n * Proof that a control is implemented and operating.\n * Domain: GRC\n * Schema: data-model/schemas/grc-evidence.schema.json\n */\nexport interface GrcEvidence {\n id: string;\n tenantId: string;\n appId: string;\n controlIds: string[];\n name: string;\n description?: string | null;\n evidenceType: EvidenceType;\n collectionMethod?: EvidenceCollectionMethod | null;\n documentId?: string | null;\n chunkIds?: string[];\n minioRef?: string | null;\n period?: EvidencePeriod | null;\n collectedAt: string;\n collectedBy: string;\n assessor?: string | null;\n assessmentResult?: EvidenceAssessmentResult | null;\n findings?: string[];\n recommendations?: string[];\n expiryDate?: string | null;\n nextCollectionDate?: string | null;\n connectorId?: string | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new GrcEvidence record. */\nexport interface CreateGrcEvidenceInput {\n tenantId: string;\n appId: string;\n controlIds: string[];\n name: string;\n evidenceType: EvidenceType;\n collectedAt: string;\n collectedBy: string;\n description?: string | null;\n collectionMethod?: EvidenceCollectionMethod | null;\n documentId?: string | null;\n minioRef?: string | null;\n period?: EvidencePeriod | null;\n assessmentResult?: EvidenceAssessmentResult | null;\n expiryDate?: string | null;\n connectorId?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing GrcEvidence records. */\nexport interface ListGrcEvidenceOptions {\n controlId?: string;\n evidenceType?: EvidenceType;\n assessmentResult?: EvidenceAssessmentResult;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Category of a GRC Incident. */\nexport type IncidentCategory =\n | 'data_breach'\n | 'service_outage'\n | 'compliance_violation'\n | 'physical_security'\n | 'financial_loss'\n | 'malware'\n | 'phishing_success';\n\n/** Severity of a GRC Incident. */\nexport type IncidentSeverity = 'low' | 'medium' | 'high' | 'critical';\n\n/** Lifecycle status of a GRC Incident. */\nexport type IncidentStatus = 'open' | 'investigating' | 'contained' | 'recovering' | 'closed';\n\n/**\n * A realized risk event tracked for governance purposes. Bridges GRC and SOC.\n * Domain: GRC\n * Schema: data-model/schemas/grc-incident.schema.json\n */\nexport interface GrcIncident {\n id: string;\n tenantId: string;\n appId: string;\n incidentNumber: string;\n title: string;\n description?: string | null;\n category: IncidentCategory;\n severity: IncidentSeverity;\n status: IncidentStatus;\n detectedAt: string;\n reportedAt?: string | null;\n containedAt?: string | null;\n closedAt?: string | null;\n realizedRiskIds?: string[];\n affectedAssetIds?: string[];\n affectedAccountIds?: string[];\n consolidatedInvestigationIds?: string[];\n triggeredByAlertIds?: string[];\n ownerId: string;\n commanderIds?: string[];\n rootCause?: string | null;\n lessonsLearned?: string[];\n correctiveActionIds?: string[];\n reportableTo?: string[];\n reportedToRegulatorsAt?: string | null;\n customerNotifiedAt?: string | null;\n financialImpact?: number | null;\n mttd_minutes?: number | null;\n mttr_minutes?: number | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new GrcIncident. */\nexport interface CreateGrcIncidentInput {\n tenantId: string;\n appId: string;\n incidentNumber: string;\n title: string;\n category: IncidentCategory;\n severity: IncidentSeverity;\n detectedAt: string;\n ownerId: string;\n status?: IncidentStatus;\n description?: string | null;\n realizedRiskIds?: string[];\n affectedAssetIds?: string[];\n tags?: string[];\n}\n\n/** Filter options for listing GrcIncident records. */\nexport interface ListGrcIncidentsOptions {\n status?: IncidentStatus;\n severity?: IncidentSeverity;\n category?: IncidentCategory;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Category of a GRC Risk. */\nexport type GrcRiskCategory =\n | 'cybersecurity'\n | 'operational'\n | 'financial'\n | 'compliance'\n | 'strategic'\n | 'reputational'\n | 'supply_chain';\n\n/** Treatment approach for a GRC Risk. */\nexport type RiskTreatment = 'accept' | 'mitigate' | 'transfer' | 'avoid';\n\n/** Lifecycle status of a GRC Risk. */\nexport type GrcRiskStatus = 'identified' | 'assessing' | 'treating' | 'monitoring' | 'closed';\n\n/**\n * A potential adverse event scored by inherent and residual ratings.\n * Domain: GRC\n * Schema: data-model/schemas/grc-risk.schema.json\n */\nexport interface GrcRisk {\n id: string;\n tenantId: string;\n appId: string;\n title: string;\n description: string;\n category: GrcRiskCategory;\n ownerId: string;\n assetIds?: string[];\n threatActorIds?: string[];\n inherentLikelihood: number;\n inherentImpact: number;\n inherentRating: number;\n residualLikelihood?: number | null;\n residualImpact?: number | null;\n residualRating?: number | null;\n mitigatingControlIds?: string[];\n treatment: RiskTreatment;\n treatmentRationale?: string | null;\n status: GrcRiskStatus;\n acceptanceLevel?: 'level-1' | 'level-2' | 'level-3' | null;\n acceptedBy?: string | null;\n acceptedAt?: string | null;\n nextReviewDate?: string | null;\n lastAssessedAt?: string | null;\n assessmentNotes?: string | null;\n realizedIncidentIds?: string[];\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new GrcRisk. */\nexport interface CreateGrcRiskInput {\n tenantId: string;\n appId: string;\n title: string;\n description: string;\n category: GrcRiskCategory;\n ownerId: string;\n inherentLikelihood: number;\n inherentImpact: number;\n inherentRating: number;\n treatment: RiskTreatment;\n status?: GrcRiskStatus;\n assetIds?: string[];\n mitigatingControlIds?: string[];\n tags?: string[];\n}\n\n/** Filter options for listing GrcRisk records. */\nexport interface ListGrcRisksOptions {\n status?: GrcRiskStatus;\n category?: GrcRiskCategory;\n treatment?: RiskTreatment;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── SOC Domain ───────────────────────────────────────────────────────────────\n\n/** Severity level of a SOC Alert. */\nexport type AlertSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';\n\n/** Lifecycle status of a SOC Alert. */\nexport type AlertStatus = 'open' | 'investigating' | 'resolved' | 'closed' | 'false_positive';\n\n/** Analyst verdict for a SOC Alert. */\nexport type AlertVerdict = 'true_positive' | 'benign_true_positive' | 'false_positive' | 'unknown';\n\n/** Host context attached to a SOC Alert. */\nexport interface AlertHost {\n hostname: string;\n ip?: string;\n os?: string;\n fqdn?: string;\n}\n\n/** User context attached to a SOC Alert. */\nexport interface AlertUser {\n username: string;\n domain?: string;\n userId?: string;\n}\n\n/** Threat indicator (IOC) in a SOC Alert. */\nexport interface AlertIndicator {\n type: string;\n value: string;\n}\n\n/** External ticketing system reference for a SOC Alert. */\nexport interface AlertTicketRef {\n system: string;\n id: string;\n url?: string;\n}\n\n/**\n * SOC-level alert raised by a connector against a monitored asset.\n * Domain: SOC\n * Schema: data-model/schemas/soc-alert.schema.json\n */\nexport interface SocAlert {\n id: string;\n tenantId: string;\n appId: string;\n title: string;\n description?: string | null;\n severity: AlertSeverity;\n status: AlertStatus;\n verdict?: AlertVerdict | null;\n source: string;\n sourceId: string;\n timestamp: string;\n mitreTactic?: string | null;\n mitreTechnique?: string | null;\n killChainPhase?: string | null;\n host?: AlertHost | null;\n user?: AlertUser | null;\n indicators?: AlertIndicator[];\n relatedAlertIds?: string[];\n relatedFindingIds?: string[];\n assigneeId?: string | null;\n investigationId?: string | null;\n playbookRunIds?: string[];\n ticketRef?: AlertTicketRef | null;\n rawData?: Record<string, unknown> | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new SocAlert. */\nexport interface CreateSocAlertInput {\n tenantId: string;\n appId: string;\n title: string;\n severity: AlertSeverity;\n source: string;\n sourceId: string;\n timestamp: string;\n status?: AlertStatus;\n description?: string | null;\n mitreTactic?: string | null;\n mitreTechnique?: string | null;\n host?: AlertHost | null;\n user?: AlertUser | null;\n indicators?: AlertIndicator[];\n tags?: string[];\n}\n\n/** Filter options for listing SocAlert records. */\nexport interface ListSocAlertsOptions {\n status?: AlertStatus;\n severity?: AlertSeverity;\n verdict?: AlertVerdict;\n assigneeId?: string;\n investigationId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Priority level of a SOC Investigation. */\nexport type InvestigationPriority = 'p1' | 'p2' | 'p3' | 'p4' | 'p5';\n\n/** Lifecycle status of a SOC Investigation. */\nexport type InvestigationStatus = 'open' | 'in_progress' | 'suspended' | 'closed';\n\n/** Category of a SOC Investigation. */\nexport type InvestigationCategory =\n | 'malware'\n | 'phishing'\n | 'ransomware'\n | 'lateral_movement'\n | 'data_breach'\n | 'insider_threat'\n | 'policy_violation'\n | 'misconfiguration';\n\n/** A single entry in an Investigation timeline. */\nexport interface InvestigationTimelineEntry {\n kind: 'note' | 'action' | 'escalation' | 'closure';\n text: string;\n authorId: string;\n at: string;\n}\n\n/** SLA tracking data for an Investigation. */\nexport interface InvestigationSlaTracker {\n startedAt: string;\n dueAt: string;\n breached: boolean;\n breachedAt?: string | null;\n}\n\n/**\n * Case-management container grouping related Alerts.\n * Domain: SOC\n * Schema: data-model/schemas/soc-investigation.schema.json\n */\nexport interface SocInvestigation {\n id: string;\n tenantId: string;\n appId: string;\n investigationNumber: string;\n title: string;\n description?: string | null;\n status: InvestigationStatus;\n priority: InvestigationPriority;\n category: InvestigationCategory;\n assignedToId?: string | null;\n teamGroupId?: string | null;\n alertIds: string[];\n findingIds?: string[];\n timeline?: InvestigationTimelineEntry[];\n slaDefinitionId?: string | null;\n slaTracker?: InvestigationSlaTracker | null;\n escalatedToIncidentId?: string | null;\n closedAt?: string | null;\n closureReason?: string | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new SocInvestigation. */\nexport interface CreateSocInvestigationInput {\n tenantId: string;\n appId: string;\n investigationNumber: string;\n title: string;\n priority: InvestigationPriority;\n category: InvestigationCategory;\n alertIds: string[];\n status?: InvestigationStatus;\n description?: string | null;\n assignedToId?: string | null;\n teamGroupId?: string | null;\n slaDefinitionId?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing SocInvestigation records. */\nexport interface ListSocInvestigationsOptions {\n status?: InvestigationStatus;\n priority?: InvestigationPriority;\n category?: InvestigationCategory;\n assignedToId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Category of a SOC Playbook. */\nexport type PlaybookCategory = 'containment' | 'eradication' | 'recovery' | 'analysis' | 'notification';\n\n/** A trigger condition for a SOC Playbook. */\nexport interface PlaybookTriggerCondition {\n field: string;\n op: string;\n value: unknown;\n}\n\n/** A single step in a SOC Playbook. */\nexport interface PlaybookStep {\n step: number;\n kind: 'action' | 'approval' | 'wait' | 'branch';\n connectorId?: string;\n action?: string;\n params?: Record<string, unknown>;\n onSuccessGoto?: number;\n onFailureGoto?: number;\n}\n\n/** Aggregate run statistics for a SOC Playbook. */\nexport interface PlaybookRunStats {\n totalRuns: number;\n successCount: number;\n failureCount: number;\n avgDurationSec: number;\n}\n\n/**\n * SOAR-style automated or semi-automated response sequence.\n * Domain: SOC\n * Schema: data-model/schemas/soc-playbook.schema.json\n */\nexport interface SocPlaybook {\n id: string;\n tenantId: string;\n appId: string;\n name: string;\n description?: string | null;\n category?: PlaybookCategory | null;\n triggerConditions?: PlaybookTriggerCondition[];\n autoExecute: boolean;\n mitreTactics?: string[];\n mitreTechniques?: string[];\n steps: PlaybookStep[];\n requiredConnectorIds?: string[];\n ownerId: string;\n enabled: boolean;\n lastRunAt?: string | null;\n lastRunId?: string | null;\n runStats?: PlaybookRunStats | null;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new SocPlaybook. */\nexport interface CreateSocPlaybookInput {\n tenantId: string;\n appId: string;\n name: string;\n ownerId: string;\n steps: PlaybookStep[];\n autoExecute: boolean;\n enabled?: boolean;\n description?: string | null;\n category?: PlaybookCategory | null;\n triggerConditions?: PlaybookTriggerCondition[];\n mitreTactics?: string[];\n mitreTechniques?: string[];\n requiredConnectorIds?: string[];\n tags?: string[];\n}\n\n/** Filter options for listing SocPlaybook records. */\nexport interface ListSocPlaybooksOptions {\n category?: PlaybookCategory;\n enabled?: boolean;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Learning Domain ──────────────────────────────────────────────────────────\n\n/** Lifecycle status of a Cohort. */\nexport type CohortStatus = 'planned' | 'active' | 'completed' | 'cancelled';\n\n/**\n * Represents a group of users enrolled in a learning programme.\n * Domain: Learning\n * Schema: data-model/schemas/cohort.schema.json\n */\nexport interface Cohort {\n /** Globally unique identifier. Format: coh-<uuid>. Read-only. */\n id: string;\n /** Tenant that owns this record. */\n tenantId: string;\n /** Slug of the app that created the record. */\n appId: string;\n /** Underlying Group with kind=cohort. Format: grp-<uuid>. */\n groupId: string;\n /** Programme catalogue identifier. */\n programId: string;\n /** Human-readable cohort name. */\n name: string;\n /** Programme start date (ISO 8601 date). */\n startDate: string;\n /** Programme end date (ISO 8601 date). */\n endDate: string;\n /** Lifecycle status. */\n status: CohortStatus;\n /** Total number of sessions in the programme. */\n sessionCount?: number | null;\n /** User IDs of facilitators responsible for this cohort. */\n facilitatorIds?: string[];\n /** Assessment IDs assigned to this cohort. */\n assignedAssessmentIds?: string[];\n /** Minimum completion percentage required to pass. */\n completionRequiredPct?: number | null;\n /** Computed current completion percentage. */\n currentCompletionPct?: number | null;\n /** Arbitrary app-specific metadata. */\n metadata?: Record<string, unknown> | null;\n /** Free-form tags. */\n tags?: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** User ID of the creator. */\n createdBy?: string | null;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User ID of the last modifier. */\n updatedBy?: string | null;\n /** Optimistic concurrency version counter. */\n version?: number | null;\n /** Soft-delete timestamp. Null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Cohort record. */\nexport interface CreateCohortInput {\n tenantId: string;\n appId: string;\n groupId: string;\n programId: string;\n name: string;\n startDate: string;\n endDate: string;\n status?: CohortStatus;\n sessionCount?: number | null;\n facilitatorIds?: string[];\n assignedAssessmentIds?: string[];\n completionRequiredPct?: number | null;\n metadata?: Record<string, unknown> | null;\n tags?: string[];\n}\n\n/** Filter options for listing Cohort records. */\nexport interface ListCohortsOptions {\n status?: CohortStatus;\n programId?: string;\n appId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Polymorphic kind of an Assessment. */\nexport type AssessmentKind =\n | 'learning'\n | 'grc_self_assessment'\n | 'compliance_audit'\n | 'operational_review'\n | 'security_assessment'\n | 'customer_satisfaction'\n | 'financial_risk';\n\n/** Lifecycle status of an Assessment. */\nexport type AssessmentStatus =\n | 'draft'\n | 'scheduled'\n | 'in_progress'\n | 'completed'\n | 'cancelled';\n\n/** Recurrence frequency for scheduled assessments. */\nexport type AssessmentFrequency =\n | 'one_off'\n | 'weekly'\n | 'monthly'\n | 'quarterly'\n | 'annual';\n\n/**\n * Generic assessment / quiz / survey / audit instrument.\n * Domain: Learning\n * Schema: data-model/schemas/assessment.schema.json\n */\nexport interface Assessment {\n /** Globally unique identifier. Format: asm-<uuid>. Read-only. */\n id: string;\n /** Tenant that owns this record. */\n tenantId: string;\n /** Slug of the app that created the record. */\n appId: string;\n /** Polymorphic kind of assessment. */\n kind: AssessmentKind;\n /** Human-readable assessment name. */\n name: string;\n /** Optional description of the assessment's purpose. */\n description?: string | null;\n /** User ID of the assessor or facilitator. */\n responsibleUserId: string;\n /** Cohort this assessment is assigned to (learning kind). */\n targetCohortId?: string | null;\n /** Group this assessment is scoped to. */\n targetGroupId?: string | null;\n /** Customer account this assessment relates to. */\n targetAccountId?: string | null;\n /** GRC framework IDs in scope. */\n frameworkIds?: string[];\n /** GRC control IDs in scope. */\n controlIds?: string[];\n /** Inline question definitions. */\n questions?: Record<string, unknown>[];\n /** Shared question bank reference instead of inline questions. */\n questionBankId?: string | null;\n /** Recurrence frequency. */\n frequency?: AssessmentFrequency | null;\n /** Deadline for completing the assessment (ISO 8601 datetime). */\n dueDate?: string | null;\n /** Scheduled start time (ISO 8601 datetime). */\n scheduledStartAt?: string | null;\n /** Lifecycle status. */\n status: AssessmentStatus;\n /** Number of responses received. */\n responseCount?: number | null;\n /** Percentage of expected responses received. */\n completionPct?: number | null;\n /** Key findings from the assessment. */\n findings?: string[];\n /** Recommendations from the assessment. */\n recommendations?: string[];\n /** Tools used to conduct the assessment. */\n assessmentTools?: string[];\n /** ID of the final output report document. */\n outputDocumentId?: string | null;\n /** Free-form tags. */\n tags?: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** User ID of the creator. */\n createdBy?: string | null;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User ID of the last modifier. */\n updatedBy?: string | null;\n /** Optimistic concurrency version counter. */\n version?: number | null;\n /** Soft-delete timestamp. Null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Assessment record. */\nexport interface CreateAssessmentInput {\n tenantId: string;\n appId: string;\n kind: AssessmentKind;\n name: string;\n responsibleUserId: string;\n description?: string | null;\n targetCohortId?: string | null;\n targetGroupId?: string | null;\n targetAccountId?: string | null;\n frameworkIds?: string[];\n controlIds?: string[];\n questions?: Record<string, unknown>[];\n questionBankId?: string | null;\n frequency?: AssessmentFrequency | null;\n dueDate?: string | null;\n scheduledStartAt?: string | null;\n status?: AssessmentStatus;\n assessmentTools?: string[];\n tags?: string[];\n}\n\n/** Filter options for listing Assessment records. */\nexport interface ListAssessmentsOptions {\n kind?: AssessmentKind;\n status?: AssessmentStatus;\n responsibleUserId?: string;\n targetCohortId?: string;\n appId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Storage Domain — EDM entities ────────────────────────────────────────────\n\n/** Isolation tier for storage objects and records. */\nexport type StorageObjectTier = 'private' | 'user' | 'shared';\n\n/**\n * Metadata record for a file written via sdk.storage.files.\n * The actual bytes live in MinIO; this document lives in MongoDB.\n * ID prefix: sobj-\n */\nexport interface StorageObject {\n id: string;\n tenantId: string;\n appId: string;\n userId?: string;\n tier: StorageObjectTier;\n path: string;\n minioKey: string;\n size: number;\n contentType: string;\n checksum?: string;\n createdAt: string;\n updatedAt: string;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a StorageObject metadata record. */\nexport interface CreateStorageObjectInput {\n tier: StorageObjectTier;\n path: string;\n size: number;\n contentType: string;\n checksum?: string;\n}\n\n/** Filter options for listing StorageObject records. */\nexport interface ListStorageObjectsOptions {\n tier?: StorageObjectTier;\n path?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * A document written via sdk.storage.db, represented as an EDM metadata record.\n * The underlying collection is namespaced by tenantId + appId in MongoDB.\n * ID prefix: srec-\n */\nexport interface StorageRecord {\n id: string;\n tenantId: string;\n appId: string;\n userId?: string;\n tier: StorageObjectTier;\n collection: string;\n key: string;\n value: Record<string, unknown>;\n ttl?: number | null;\n version?: number;\n createdAt: string;\n updatedAt: string;\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a StorageRecord. */\nexport interface CreateStorageRecordInput {\n tier: StorageObjectTier;\n collection: string;\n key: string;\n value: Record<string, unknown>;\n ttl?: number | null;\n}\n\n/** Filter options for listing StorageRecord records. */\nexport interface ListStorageRecordsOptions {\n tier?: StorageObjectTier;\n collection?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── RFP Domain ───────────────────────────────────────────────────────────────\n\n/** Channel through which an RFP was received. */\nexport type RfpSource = 'outlook' | 'portal' | 'manual' | 'api' | 'email_forward';\n\n/** Lifecycle status of an RfpRecord. */\nexport type RfpStatus =\n | 'new'\n | 'triaging'\n | 'pursuing'\n | 'responding'\n | 'submitted'\n | 'won'\n | 'lost'\n | 'declined';\n\n/** Bid/no-bid decision for an RfpRecord. */\nexport type RfpBidDecision = 'bid' | 'no_bid' | 'pending';\n\n/** Authoring phase of an RfpRecord. */\nexport type RfpPhase = 'intake' | 'extraction' | 'authoring' | 'review' | 'submission' | 'closed';\n\n/** SLA tracking for an RfpRecord. */\nexport interface RfpSla {\n dueAt: string;\n breached: boolean;\n breachedAt?: string | null;\n}\n\n/** A single SLA milestone within an RfpRecord. */\nexport interface RfpSlaMilestone {\n name: string;\n dueAt: string;\n status: string;\n completedAt?: string | null;\n}\n\n/** Outlook mail metadata when source is 'outlook'. */\nexport interface RfpMailMetadata {\n messageId?: string;\n internetMessageId?: string;\n from?: string;\n subject?: string;\n receivedAt?: string;\n attachments?: object[];\n}\n\n/** AI-generated enrichment for an RfpRecord. */\nexport interface RfpAiEnrichment {\n execSummary?: string;\n riskScore?: number;\n pricingHint?: string;\n recommendation?: string;\n modelUsed?: string;\n generatedAt?: string;\n}\n\n/** Outcome record for a concluded RfpRecord. */\nexport interface RfpOutcome {\n status?: string;\n decidedAt?: string;\n decidedBy?: string;\n notes?: string;\n}\n\n/**\n * Single canonical RFP — intake, authoring, and response state in one record.\n * Domain: RFP\n * Schema: data-model/schemas/rfp-record.schema.json\n */\nexport interface RfpRecord {\n id: string;\n tenantId: string;\n appId: string;\n rfpNumber: string;\n title: string;\n description?: string | null;\n source: RfpSource;\n accountId?: string | null;\n procurementContactId?: string | null;\n dealId?: string | null;\n ownerId: string;\n departmentGroupId?: string | null;\n parentRfpId?: string | null;\n childRfpIds?: string[];\n status: RfpStatus;\n bidDecision?: RfpBidDecision | null;\n phase: RfpPhase;\n submissionDeadline: string;\n submissionMethod?: string | null;\n sla?: RfpSla | null;\n slaMilestones?: RfpSlaMilestone[];\n mailMetadata?: RfpMailMetadata | null;\n attachmentRefs?: string[];\n proposalRefs?: string[];\n extractedDocumentIds?: string[];\n questionIds?: string[];\n responseIds?: string[];\n aiEnrichment?: RfpAiEnrichment | null;\n reviewers?: string[];\n approvers?: string[];\n submittedAt?: string | null;\n submittedBy?: string | null;\n outcome?: RfpOutcome | null;\n customFields?: Record<string, unknown> | null;\n tags?: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input for creating a new RfpRecord. */\nexport interface CreateRfpRecordInput {\n tenantId: string;\n appId: string;\n rfpNumber: string;\n title: string;\n source: RfpSource;\n ownerId: string;\n status: RfpStatus;\n phase: RfpPhase;\n submissionDeadline: string;\n description?: string;\n accountId?: string;\n procurementContactId?: string;\n dealId?: string;\n departmentGroupId?: string;\n parentRfpId?: string;\n bidDecision?: RfpBidDecision;\n submissionMethod?: string;\n customFields?: Record<string, unknown>;\n tags?: string[];\n}\n\n/** Filter options for listing RfpRecord records. */\nexport interface ListRfpRecordsOptions {\n status?: RfpStatus;\n phase?: RfpPhase;\n ownerId?: string;\n accountId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Expected answer format for an RfpQuestion. */\nexport type RfpQuestionType = 'narrative' | 'yes_no' | 'numeric' | 'multi_select' | 'attachment';\n\n/** Answer status of an RfpQuestion. */\nexport type RfpQuestionStatus = 'unanswered' | 'in_progress' | 'answered' | 'skipped';\n\n/** Priority of an RfpQuestion. */\nexport type RfpQuestionPriority = 'low' | 'medium' | 'high';\n\n/**\n * A single question extracted from an RFP.\n * Domain: RFP\n * Schema: data-model/schemas/rfp-question.schema.json\n */\nexport interface RfpQuestion {\n id: string;\n tenantId: string;\n appId: string;\n rfpRecordId: string;\n section: string;\n subsection?: string | null;\n orderIndex: number;\n text: string;\n questionType?: RfpQuestionType | null;\n aiExtracted: boolean;\n extractionConfidence?: number | null;\n requiredAttachments?: string[];\n assignedTo?: string | null;\n status: RfpQuestionStatus;\n priority?: RfpQuestionPriority | null;\n tags?: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input for creating a new RfpQuestion. */\nexport interface CreateRfpQuestionInput {\n tenantId: string;\n appId: string;\n rfpRecordId: string;\n section: string;\n orderIndex: number;\n text: string;\n aiExtracted: boolean;\n status: RfpQuestionStatus;\n subsection?: string;\n questionType?: RfpQuestionType;\n extractionConfidence?: number;\n requiredAttachments?: string[];\n assignedTo?: string;\n priority?: RfpQuestionPriority;\n tags?: string[];\n}\n\n/** Filter options for listing RfpQuestion records. */\nexport interface ListRfpQuestionsOptions {\n rfpRecordId?: string;\n status?: RfpQuestionStatus;\n assignedTo?: string;\n section?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Review status of an RfpResponse. */\nexport type RfpResponseStatus = 'draft' | 'in_review' | 'approved' | 'rejected';\n\n/** A RAG chunk citation within an RfpResponse. */\nexport interface RfpCitation {\n chunkId: string;\n documentId: string;\n similarity: number;\n rank: number;\n span?: { start: number; end: number };\n}\n\n/** An inline review comment on an RfpResponse. */\nexport interface RfpComment {\n author: string;\n body: string;\n anchor?: object;\n resolved: boolean;\n createdAt: string;\n}\n\n/** A version history entry for an RfpResponse. */\nexport interface RfpVersionEntry {\n version: number;\n text: string;\n savedBy: string;\n savedAt: string;\n}\n\n/**\n * Drafted answer to an RfpQuestion, RAG-grounded with chunk citations.\n * Domain: RFP\n * Schema: data-model/schemas/rfp-response.schema.json\n */\nexport interface RfpResponse {\n id: string;\n tenantId: string;\n appId: string;\n rfpRecordId: string;\n questionId: string;\n text: string;\n aiDraft?: string | null;\n humanEdited: boolean;\n citations: RfpCitation[];\n attachmentRefs?: string[];\n status: RfpResponseStatus;\n wordCount?: number | null;\n tokensIn?: number | null;\n tokensOut?: number | null;\n modelUsed?: string | null;\n traceId?: string | null;\n authoredBy: string;\n reviewedBy?: string[];\n reviewedAt?: string | null;\n approvedBy?: string | null;\n approvedAt?: string | null;\n comments?: RfpComment[];\n versionHistory?: RfpVersionEntry[];\n tags?: string[];\n createdAt: string;\n createdBy?: string | null;\n updatedAt: string;\n updatedBy?: string | null;\n version?: number;\n deletedAt?: string | null;\n}\n\n/** Input for creating a new RfpResponse. */\nexport interface CreateRfpResponseInput {\n tenantId: string;\n appId: string;\n rfpRecordId: string;\n questionId: string;\n text: string;\n humanEdited: boolean;\n citations: RfpCitation[];\n authoredBy: string;\n status: RfpResponseStatus;\n aiDraft?: string;\n attachmentRefs?: string[];\n wordCount?: number;\n tokensIn?: number;\n tokensOut?: number;\n modelUsed?: string;\n traceId?: string;\n tags?: string[];\n}\n\n/** Filter options for listing RfpResponse records. */\nexport interface ListRfpResponsesOptions {\n rfpRecordId?: string;\n questionId?: string;\n status?: RfpResponseStatus;\n authoredBy?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Knowledge Domain ─────────────────────────────────────────────────────────\n\n/** Document kind classification. */\nexport type DocumentKind =\n | 'rfp_source'\n | 'proposal'\n | 'evidence'\n | 'policy'\n | 'kb_article'\n | 'regulatory'\n | 'contract'\n | 'general';\n\n/** Extraction pipeline status for a Document. */\nexport type ExtractionStatus = 'pending' | 'processing' | 'ready' | 'failed';\n\n/** Access control scope for a Document. */\nexport type AclScope = 'tenant' | 'department' | 'account' | 'restricted';\n\n/**\n * Canonical document record in the knowledge graph.\n * Domain: Knowledge\n * Schema: data-model/schemas/document.schema.json\n */\nexport interface KnowledgeDocument {\n id: string;\n tenantId: string;\n appId: string;\n accountId?: string | null;\n collectionId?: string;\n kind: DocumentKind;\n title: string;\n description?: string;\n mimeType: string;\n sizeBytes: number;\n fileHash: string;\n minioKey: string;\n language?: string;\n pageCount?: number;\n extractor?: string;\n extractionStatus: ExtractionStatus;\n extractedAt?: string;\n chunkCount?: number;\n embeddingModel?: string;\n embeddingDimensions?: number;\n chunkIds?: string[];\n entityIds?: string[];\n effectiveFrom?: string;\n effectiveTo?: string;\n version?: string;\n parentDocumentId?: string | null;\n aclScope: AclScope;\n aclAllowedRoleIds?: string[];\n tags?: string[];\n createdAt: string;\n createdBy?: string;\n updatedAt: string;\n updatedBy?: string;\n deletedAt?: string | null;\n}\n\nexport interface CreateKnowledgeDocumentInput {\n tenantId: string;\n appId: string;\n kind: DocumentKind;\n title: string;\n mimeType: string;\n sizeBytes: number;\n fileHash: string;\n minioKey: string;\n aclScope: AclScope;\n accountId?: string | null;\n collectionId?: string;\n description?: string;\n language?: string;\n pageCount?: number;\n extractor?: string;\n extractionStatus?: ExtractionStatus;\n embeddingModel?: string;\n embeddingDimensions?: number;\n effectiveFrom?: string;\n effectiveTo?: string;\n version?: string;\n parentDocumentId?: string | null;\n aclAllowedRoleIds?: string[];\n tags?: string[];\n}\n\nexport interface ListKnowledgeDocumentsOptions {\n kind?: DocumentKind;\n extractionStatus?: ExtractionStatus;\n collectionId?: string;\n aclScope?: AclScope;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Structural type of a Chunk's content. */\nexport type ChunkType = 'paragraph' | 'table' | 'list' | 'header' | 'code';\n\n/** Data sensitivity classification for a Chunk. */\nexport type ChunkSensitivity = 'public' | 'internal' | 'confidential' | 'restricted';\n\n/**\n * Smallest retrievable unit: a span of text from a Document with an embedding vector.\n * Domain: Knowledge\n * Schema: data-model/schemas/chunk.schema.json\n */\nexport interface KnowledgeChunk {\n id: string;\n tenantId: string;\n appId: string;\n documentId: string;\n chunkNumber: number;\n text: string;\n tokens: number;\n vector: number[];\n embeddingModel: string;\n chunkType?: ChunkType;\n pageNumber?: number;\n headerPath?: string[];\n prevChunkId?: string | null;\n nextChunkId?: string | null;\n entityIds?: string[];\n keywords?: string[];\n language?: string;\n sensitivity?: ChunkSensitivity;\n createdAt: string;\n}\n\nexport interface CreateKnowledgeChunkInput {\n tenantId: string;\n appId: string;\n documentId: string;\n chunkNumber: number;\n text: string;\n tokens: number;\n vector: number[];\n embeddingModel: string;\n chunkType?: ChunkType;\n pageNumber?: number;\n headerPath?: string[];\n prevChunkId?: string | null;\n nextChunkId?: string | null;\n entityIds?: string[];\n keywords?: string[];\n language?: string;\n sensitivity?: ChunkSensitivity;\n}\n\nexport interface ListKnowledgeChunksOptions {\n documentId?: string;\n chunkType?: ChunkType;\n sensitivity?: ChunkSensitivity;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Semantic type of a KnowledgeEntity. */\nexport type KnowledgeEntityType =\n | 'person'\n | 'asset'\n | 'threat'\n | 'vulnerability'\n | 'control'\n | 'framework'\n | 'incident'\n | 'concept'\n | 'topic'\n | 'organization'\n | 'product';\n\n/** Knowledge domain a KnowledgeEntity belongs to. */\nexport type KnowledgeEntityDomain =\n | 'cybersecurity'\n | 'compliance'\n | 'finance'\n | 'general'\n | 'medical'\n | 'legal';\n\n/**\n * A named entity extracted from documents and persisted as a node in FalkorDB.\n * Domain: Knowledge\n * Schema: data-model/schemas/knowledge-entity.schema.json\n */\nexport interface KnowledgeEntity {\n id: string;\n tenantId: string;\n appId: string;\n type: KnowledgeEntityType;\n domain: KnowledgeEntityDomain;\n name: string;\n canonicalName: string;\n aliases?: string[];\n description?: string;\n confidence?: number;\n documentIds?: string[];\n chunkIds?: string[];\n attributes?: Record<string, unknown>;\n versionInfo?: string | null;\n isValid: boolean;\n lastSeenAt?: string;\n tags?: string[];\n createdAt: string;\n createdBy?: string;\n updatedAt: string;\n updatedBy?: string;\n deletedAt?: string | null;\n}\n\nexport interface CreateKnowledgeEntityInput {\n tenantId: string;\n appId: string;\n type: KnowledgeEntityType;\n domain: KnowledgeEntityDomain;\n name: string;\n canonicalName: string;\n isValid: boolean;\n aliases?: string[];\n description?: string;\n confidence?: number;\n documentIds?: string[];\n chunkIds?: string[];\n attributes?: Record<string, unknown>;\n versionInfo?: string | null;\n lastSeenAt?: string;\n tags?: string[];\n}\n\nexport interface ListKnowledgeEntitiesOptions {\n type?: KnowledgeEntityType;\n domain?: KnowledgeEntityDomain;\n isValid?: boolean;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Integration Domain ───────────────────────────────────────────────────────\n\n/** Kind of Application in the cPod estate registry. */\nexport type ApplicationKind = 'app' | 'platform-service' | 'library';\n\n/** Lifecycle status of an Application. */\nexport type ApplicationStatus = 'active' | 'deprecated' | 'decommissioned';\n\n/** Primary domain served by an Application. */\nexport type ApplicationPrimaryDomain =\n | 'customer'\n | 'rfp'\n | 'knowledge'\n | 'project'\n | 'grc'\n | 'soc'\n | 'okr'\n | 'learning'\n | 'support'\n | 'telemetry'\n | 'integration'\n | 'identity';\n\n/**\n * Registry entry for every app and platform service in the cPod estate.\n * The id slug is the value stored in appId on every non-identity entity.\n * Domain: Integration\n * Schema: data-model/schemas/integration-application.schema.json\n */\nexport interface Application {\n /** Stable lowercase app slug and primary key, e.g. crm-360. Read-only. */\n id: string;\n /** Human-readable name, e.g. CRM 360. */\n displayName: string;\n /** Classification: app, platform-service, or library. */\n kind: ApplicationKind;\n /** Model domain primarily served. */\n primaryDomain?: ApplicationPrimaryDomain | null;\n /** What the app does. */\n description?: string | null;\n /** Registered OAuth client id used to stamp appId on every write. */\n oauthClientId: string;\n /** Lifecycle status. */\n status: ApplicationStatus;\n /** Entity types this app canonically owns; empty for pure consumers. */\n canonicalOwnerOf?: string[];\n /** Base path the app serves, e.g. /v1/deals. */\n apiBasePath?: string | null;\n /** Source repository. */\n repository?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User or service that created this record. */\n createdBy: string;\n /** User or service that last modified this record. */\n updatedBy: string;\n /** Optimistic concurrency version counter. */\n version: number;\n /** Soft-delete timestamp; null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Application. */\nexport interface CreateApplicationInput {\n id: string;\n displayName: string;\n kind: ApplicationKind;\n oauthClientId: string;\n status: ApplicationStatus;\n primaryDomain?: ApplicationPrimaryDomain | null;\n description?: string | null;\n canonicalOwnerOf?: string[];\n apiBasePath?: string | null;\n repository?: string | null;\n}\n\n/** Filter options for listing Application records. */\nexport interface ListApplicationsOptions {\n kind?: ApplicationKind;\n status?: ApplicationStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Type category of a Connector integration. */\nexport type ConnectorType =\n | 'edr' | 'siem' | 'soar' | 'ticketing' | 'firewall' | 'email' | 'identity'\n | 'enrichment' | 'cloud' | 'network' | 'scm' | 'scanner' | 'communication'\n | 'iam' | 'ndr' | 'cspm' | 'aml' | 'fraud' | 'banking' | 'sanctions'\n | 'payment' | 'regtech' | 'grc' | 'tip' | 'darkweb' | 'ueba' | 'graph'\n | 'asm' | 'tprm' | 'oprisk' | 'sandbox' | 'mlops' | 'container' | 'kms'\n | 'apisec' | 'azure_devops' | 'outlook' | 'google_workspace' | 'crm_external' | 'webhook';\n\n/** Scope of a Connector — who it applies to. */\nexport type ConnectorScope = 'org' | 'user' | 'group';\n\n/** Authentication mechanism used by a Connector. */\nexport type ConnectorAuthType = 'api_key' | 'oauth2' | 'basic' | 'cert' | 'webhook_signature';\n\n/** Health status of a Connector's sync. */\nexport type ConnectorSyncStatus = 'healthy' | 'degraded' | 'error' | 'disabled' | 'auth_expired';\n\n/**\n * External integration configuration — credentials, scope, sync state, metrics.\n * Domain: Integration\n * Schema: data-model/schemas/integration-connector.schema.json\n */\nexport interface Connector {\n /** Stable identifier with prefix cnn-. Read-only. */\n id: string;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Slug of the app that created the record; FK to Application. */\n appId: string;\n /** Integration type category. */\n type: ConnectorType;\n /** Vendor, e.g. defender_for_endpoint, splunk, jira, okta. */\n provider: string;\n /** Human-readable connector name. */\n name: string;\n /** Scope of this connector. */\n scope: ConnectorScope;\n /** usr-<uuid> of the owning user. */\n ownerId: string;\n /** Group ID if scope=group. */\n groupId?: string | null;\n /** User ID if scope=user. */\n userId?: string | null;\n /** Non-secret configuration: baseUrl, region, accountId, etc. */\n config?: Record<string, unknown> | null;\n /** Vault KV v2 path to secrets. */\n vaultPath: string;\n /** Authentication mechanism. */\n authType: ConnectorAuthType;\n /** Whether the OAuth token needs refreshing. */\n oauthRefreshNeeded?: boolean | null;\n /** When the OAuth access token expires. */\n oauthTokenExpiresAt?: string | null;\n /** Whether the connector is active. */\n enabled: boolean;\n /** Current sync health. */\n syncStatus: ConnectorSyncStatus;\n /** Timestamp of the last successful sync. */\n lastSyncAt?: string | null;\n /** Count of consecutive sync errors. */\n consecutiveErrors?: number | null;\n /** Last error message. */\n lastError?: string | null;\n /** { totalSynced, last24h, avgLatencyMs } */\n metrics?: Record<string, unknown> | null;\n /** Event types this connector emits. */\n eventTypes?: string[];\n /** ID of the outbound Webhook endpoint, if applicable. */\n webhookEndpointId?: string | null;\n /** When credentials were last rotated. */\n credentialLastRotatedAt?: string | null;\n /** When credentials are next due for rotation. */\n nextRotationDue?: string | null;\n /** Free-form tags. */\n tags?: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User or service that created this record. */\n createdBy: string;\n /** User or service that last modified this record. */\n updatedBy: string;\n /** Optimistic concurrency version counter. */\n version: number;\n /** Soft-delete timestamp; null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Connector. */\nexport interface CreateConnectorInput {\n type: ConnectorType;\n provider: string;\n name: string;\n scope: ConnectorScope;\n ownerId: string;\n vaultPath: string;\n authType: ConnectorAuthType;\n enabled: boolean;\n groupId?: string | null;\n userId?: string | null;\n config?: Record<string, unknown> | null;\n eventTypes?: string[];\n}\n\n/** Filter options for listing Connector records. */\nexport interface ListConnectorsOptions {\n type?: ConnectorType;\n scope?: ConnectorScope;\n enabled?: boolean;\n syncStatus?: ConnectorSyncStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Kind of ApiKey. */\nexport type ApiKeyKind = 'service' | 'user' | 'virtual_llm' | 'webhook_signing';\n\n/**\n * Virtual/issued API key. Bearer tokens for service-to-service and LLM-gateway access.\n * keyHash is writeOnly — it is only returned on create and omitted from list/get responses.\n * Domain: Integration\n * Schema: data-model/schemas/integration-api-key.schema.json\n */\nexport interface ApiKey {\n /** Stable identifier with prefix key-. Read-only. */\n id: string;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Slug of the app that created the record; FK to Application. */\n appId: string;\n /** Human-readable label for this key. */\n name: string;\n /** SHA-256 hash of the raw key. Only present immediately after creation. */\n keyHash?: string;\n /** First 8 chars of raw key for UI display, e.g. sk-acme-. */\n prefix: string;\n /** Key classification. */\n kind: ApiKeyKind;\n /** User this key was issued to, if kind=user. */\n issuedToUserId?: string | null;\n /** Service name this key was issued to, if kind=service. */\n issuedToService?: string | null;\n /** Permission scopes granted to this key. */\n scopes: string[];\n /** If kind=virtual_llm, allowlist of model identifiers. */\n allowedModels?: string[];\n /** Tokens per minute rate limit. */\n tpmLimit?: number | null;\n /** Requests per minute rate limit. */\n rpmLimit?: number | null;\n /** Maximum spend cap in USD. */\n maxBudgetUsd?: number | null;\n /** Cached spend counter in USD. */\n spendUsd?: number | null;\n /** Whether this key is blocked from making requests. */\n blocked: boolean;\n /** Reason the key was blocked. */\n blockedReason?: string | null;\n /** Timestamp of the last successful use of this key. */\n lastUsedAt?: string | null;\n /** Expiry timestamp; null for non-expiring keys. */\n expiresAt?: string | null;\n /** ID of the key this was rotated from. */\n rotatedFromKeyId?: string | null;\n /** ID of the user who created this key. */\n createdByUserId: string;\n /** Free-form tags. */\n tags?: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User or service that created this record. */\n createdBy: string;\n /** User or service that last modified this record. */\n updatedBy: string;\n /** Optimistic concurrency version counter. */\n version: number;\n /** Soft-delete timestamp; null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new ApiKey. */\nexport interface CreateApiKeyInput {\n name: string;\n kind: ApiKeyKind;\n scopes: string[];\n createdByUserId: string;\n issuedToUserId?: string | null;\n issuedToService?: string | null;\n allowedModels?: string[];\n tpmLimit?: number | null;\n rpmLimit?: number | null;\n maxBudgetUsd?: number | null;\n expiresAt?: string | null;\n}\n\n/** Filter options for listing ApiKey records. */\nexport interface ListApiKeysOptions {\n kind?: ApiKeyKind;\n blocked?: boolean;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Payload signing scheme for a Webhook. */\nexport type WebhookSignatureScheme = 'hmac-sha256' | 'hmac-sha512' | 'jws' | 'none';\n\n/** Direction of a Webhook. */\nexport type WebhookDirection = 'outbound' | 'inbound';\n\n/** Delivery status of the last Webhook delivery attempt. */\nexport type WebhookDeliveryStatus = 'success' | 'failed';\n\n/**\n * Outbound webhook endpoint. Replaces per-app webhook tables across the estate.\n * Domain: Integration\n * Schema: data-model/schemas/integration-webhook.schema.json\n */\nexport interface Webhook {\n /** Stable identifier with prefix whk-. Read-only. */\n id: string;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Slug of the app that created the record; FK to Application. */\n appId: string;\n /** Human-readable webhook name. */\n name: string;\n /** outbound = cPod pushes to url; inbound = external system calls cPod. */\n direction: WebhookDirection;\n /** Target URL (outbound) or callback URL (inbound). */\n url: string;\n /** Event type filters, e.g. rfp.created, rfp.status_changed. */\n eventTypes: string[];\n /** Payload signing scheme. */\n signatureScheme: WebhookSignatureScheme;\n /** Vault KV v2 path where the HMAC secret lives. */\n vaultPath: string;\n /** Static custom headers (non-secret) sent with every delivery. */\n headers?: Record<string, string> | null;\n /** Whether this webhook is active. */\n enabled: boolean;\n /** { maxAttempts, backoff: 'exponential', timeoutMs } */\n retryPolicy?: Record<string, unknown> | null;\n /** Timestamp of the last delivery attempt. */\n lastDeliveryAt?: string | null;\n /** Outcome of the last delivery attempt. */\n lastDeliveryStatus?: WebhookDeliveryStatus | null;\n /** Count of consecutive delivery failures. */\n consecutiveFailures?: number | null;\n /** Timestamp when the webhook was auto-paused after N consecutive failures. */\n pausedAt?: string | null;\n /** ID of the owning Connector, if this webhook is connector-owned. */\n connectorId?: string | null;\n /** Free-form tags. */\n tags?: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n /** User or service that created this record. */\n createdBy: string;\n /** User or service that last modified this record. */\n updatedBy: string;\n /** Optimistic concurrency version counter. */\n version: number;\n /** Soft-delete timestamp; null when active. */\n deletedAt?: string | null;\n}\n\n/** Input payload for creating a new Webhook. */\nexport interface CreateWebhookInput {\n name: string;\n direction: WebhookDirection;\n url: string;\n eventTypes: string[];\n signatureScheme: WebhookSignatureScheme;\n vaultPath: string;\n enabled: boolean;\n headers?: Record<string, string> | null;\n retryPolicy?: Record<string, unknown> | null;\n connectorId?: string | null;\n}\n\n/** Filter options for listing Webhook records. */\nexport interface ListWebhooksOptions {\n direction?: WebhookDirection;\n enabled?: boolean;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── HR Lifecycle Domain ──────────────────────────────────────────────────────\n\n/** Employment type for a JobPosting. */\nexport type EmploymentType = 'full_time' | 'part_time' | 'contract' | 'internship';\n\n/** Lifecycle status of a JobPosting. */\nexport type JobPostingStatus = 'draft' | 'open' | 'paused' | 'closed' | 'filled';\n\n/**\n * An open or draft position in the organisation.\n * Domain: HR\n * Schema: data-model/schemas/job-posting.schema.json\n */\nexport interface JobPosting {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Job title for this posting. */\n title: string;\n /** Organisational department or business unit. */\n department?: string | null;\n /** UUID of the associated office or location record. */\n locationId?: string | null;\n /** Nature of the employment engagement offered. */\n employmentType: EmploymentType;\n /** Current lifecycle state of the posting. */\n status: JobPostingStatus;\n /** Full job description in Markdown. */\n description: string;\n /** Required qualifications or skills. */\n requirements?: string[] | null;\n /** Minimum salary for the compensation band. */\n salaryMin?: number | null;\n /** Maximum salary for the compensation band. */\n salaryMax?: number | null;\n /** ISO 4217 three-letter currency code for the salary range. */\n currency?: string | null;\n /** UUID of the Person who owns this requisition. */\n hiringManagerId?: string | null;\n /** ISO 8601 timestamp when the posting was first made public. */\n publishedAt?: string | null;\n /** ISO 8601 timestamp when the posting was closed or filled. */\n closedAt?: string | null;\n /** Link to the canonical external job board listing. */\n externalUrl?: string | null;\n /** Free-form labels for filtering and categorisation. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new JobPosting. */\nexport interface CreateJobPostingInput {\n title: string;\n employmentType: EmploymentType;\n status: JobPostingStatus;\n description: string;\n department?: string | null;\n locationId?: string | null;\n requirements?: string[] | null;\n salaryMin?: number | null;\n salaryMax?: number | null;\n currency?: string | null;\n hiringManagerId?: string | null;\n publishedAt?: string | null;\n externalUrl?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing JobPosting records. */\nexport interface ListJobPostingsOptions {\n status?: JobPostingStatus;\n employmentType?: EmploymentType;\n department?: string;\n hiringManagerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Stage of an Applicant in the hiring pipeline. */\nexport type ApplicantStage =\n | 'applied'\n | 'screening'\n | 'interview'\n | 'assessment'\n | 'offer'\n | 'hired'\n | 'rejected'\n | 'withdrawn';\n\n/** Channel through which an Applicant discovered a posting. */\nexport type ApplicantSource = 'referral' | 'linkedin' | 'website' | 'job_board' | 'agency' | 'other';\n\n/**\n * A candidate who has applied for a JobPosting.\n * Domain: HR\n * Schema: data-model/schemas/applicant.schema.json\n */\nexport interface Applicant {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the JobPosting the candidate applied for. */\n jobPostingId: string;\n /** Given (first) name. */\n firstName: string;\n /** Family (last) name. */\n lastName: string;\n /** Primary contact email address. */\n email: string;\n /** Contact phone number. */\n phone?: string | null;\n /** URL to the applicant's LinkedIn profile. */\n linkedInUrl?: string | null;\n /** MinIO object path for the uploaded résumé. */\n resumeRef?: string | null;\n /** MinIO object path for the uploaded cover letter. */\n coverLetterRef?: string | null;\n /** Current stage in the hiring pipeline. */\n stage: ApplicantStage;\n /** UUID of the Person (recruiter or hiring manager) reviewing this applicant. */\n assignedReviewerId?: string | null;\n /** Internal recruiter notes. */\n notes?: string | null;\n /** Reason for rejection when stage is 'rejected'. */\n rejectionReason?: string | null;\n /** ISO 8601 timestamp when a formal offer was sent. */\n offerSentAt?: string | null;\n /** UUID of the Person record created when this applicant was hired. */\n hiredPersonId?: string | null;\n /** Channel through which the applicant discovered the posting. */\n source?: ApplicantSource | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Applicant. */\nexport interface CreateApplicantInput {\n jobPostingId: string;\n firstName: string;\n lastName: string;\n email: string;\n stage?: ApplicantStage;\n phone?: string | null;\n linkedInUrl?: string | null;\n resumeRef?: string | null;\n coverLetterRef?: string | null;\n assignedReviewerId?: string | null;\n notes?: string | null;\n source?: ApplicantSource | null;\n}\n\n/** Filter options for listing Applicant records. */\nexport interface ListApplicantsOptions {\n jobPostingId?: string;\n stage?: ApplicantStage;\n assignedReviewerId?: string;\n source?: ApplicantSource;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Functional category of an OnboardingTask. */\nexport type OnboardingTaskCategory =\n | 'it_setup'\n | 'hr_paperwork'\n | 'training'\n | 'introduction'\n | 'access_provisioning'\n | 'other';\n\n/** Execution state of an onboarding or offboarding task. */\nexport type HrTaskStatus = 'pending' | 'in_progress' | 'completed' | 'skipped';\n\n/**\n * A checklist item in a new hire's onboarding plan.\n * Domain: HR\n * Schema: data-model/schemas/onboarding-task.schema.json\n */\nexport interface OnboardingTask {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person (new hire) this task belongs to. */\n personId: string;\n /** Short, action-oriented title. */\n title: string;\n /** Detailed instructions or context. */\n description?: string | null;\n /** Functional category of the task. */\n category: OnboardingTaskCategory;\n /** UUID of the Person responsible for completing this task. */\n assignedToId: string;\n /** ISO 8601 date by which this task should be completed. */\n dueDate?: string | null;\n /** ISO 8601 timestamp when this task was completed. */\n completedAt?: string | null;\n /** Current execution state. */\n status: HrTaskStatus;\n /** Zero-based display order within the checklist. */\n order: number;\n /** UUID of the template that generated this task, if any. */\n templateId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new OnboardingTask. */\nexport interface CreateOnboardingTaskInput {\n personId: string;\n title: string;\n category: OnboardingTaskCategory;\n assignedToId: string;\n order: number;\n description?: string | null;\n dueDate?: string | null;\n status?: HrTaskStatus;\n templateId?: string | null;\n}\n\n/** Filter options for listing OnboardingTask records. */\nexport interface ListOnboardingTasksOptions {\n personId?: string;\n category?: OnboardingTaskCategory;\n status?: HrTaskStatus;\n assignedToId?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Functional category of an OffboardingTask. */\nexport type OffboardingTaskCategory =\n | 'access_revocation'\n | 'equipment_return'\n | 'knowledge_transfer'\n | 'hr_paperwork'\n | 'exit_interview'\n | 'other';\n\n/**\n * A checklist item in a departing employee's offboarding plan.\n * Domain: HR\n * Schema: data-model/schemas/offboarding-task.schema.json\n */\nexport interface OffboardingTask {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the Person (departing employee) this task belongs to. */\n personId: string;\n /** Short, action-oriented title. */\n title: string;\n /** Detailed instructions or context. */\n description?: string | null;\n /** Functional category of the task. */\n category: OffboardingTaskCategory;\n /** UUID of the Person responsible for completing this task. */\n assignedToId: string;\n /** ISO 8601 date by which this task must be completed. */\n dueDate?: string | null;\n /** ISO 8601 timestamp when this task was completed. */\n completedAt?: string | null;\n /** Current execution state. */\n status: HrTaskStatus;\n /** Zero-based display order within the checklist. */\n order: number;\n /** UUID of the template that generated this task, if any. */\n templateId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new OffboardingTask. */\nexport interface CreateOffboardingTaskInput {\n personId: string;\n title: string;\n category: OffboardingTaskCategory;\n assignedToId: string;\n order: number;\n description?: string | null;\n dueDate?: string | null;\n status?: HrTaskStatus;\n templateId?: string | null;\n}\n\n/** Filter options for listing OffboardingTask records. */\nexport interface ListOffboardingTasksOptions {\n personId?: string;\n category?: OffboardingTaskCategory;\n status?: HrTaskStatus;\n assignedToId?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Helpdesk Domain ──────────────────────────────────────────────────────────\n\n/** ITSM classification of a Ticket. */\nexport type TicketType = 'incident' | 'service_request' | 'change' | 'problem' | 'question';\n\n/** Lifecycle status of a Ticket. */\nexport type TicketStatus = 'open' | 'in_progress' | 'pending' | 'resolved' | 'closed' | 'cancelled';\n\n/** Priority tier of a Ticket or SLAPolicy. */\nexport type HelpdeskPriority = 'low' | 'medium' | 'high' | 'urgent';\n\n/** Lifecycle status of an SLAPolicy. */\nexport type SlaPolicyStatus = 'active' | 'inactive';\n\n/**\n * An ITSM helpdesk ticket — covering incidents, service requests, changes,\n * problems, and general questions.\n * Domain: Helpdesk\n * Schema: data-model/schemas/ticket.schema.json\n */\nexport interface Ticket {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Human-readable ticket number (e.g. \"TKT-0042\"). Read-only. */\n number: string;\n /** Short summary of the ticket. */\n title: string;\n /** Detailed description. Markdown supported. */\n description?: string | null;\n /** ITSM classification of the ticket. */\n type: TicketType;\n /** Current lifecycle state. */\n status: TicketStatus;\n /** Impact and urgency rating. */\n priority: HelpdeskPriority;\n /** Optional category for grouping (e.g. \"Hardware\", \"Software\", \"Network\"). */\n category?: string | null;\n /** UUID of the Person who submitted this ticket. */\n submittedById: string;\n /** UUID of the Person assigned to resolve this ticket. Null when unassigned. */\n assignedToId?: string | null;\n /** UUID of the Group (team) responsible for this ticket. */\n teamId?: string | null;\n /** UUID of the SLAPolicy governing this ticket's time targets. */\n slaPolicy?: string | null;\n /** ISO 8601 timestamp of the first agent response. */\n firstResponseAt?: string | null;\n /** ISO 8601 timestamp when the ticket was marked resolved. */\n resolvedAt?: string | null;\n /** ISO 8601 resolution deadline derived from the SLA policy. */\n dueAt?: string | null;\n /** UUID of a related PhysicalAsset or CloudResource. */\n relatedAssetId?: string | null;\n /** UUID of a related Vulnerability. */\n relatedVulnerabilityId?: string | null;\n /** Free-form tags. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Ticket. */\nexport interface CreateTicketInput {\n title: string;\n type: TicketType;\n priority: HelpdeskPriority;\n submittedById: string;\n description?: string | null;\n category?: string | null;\n assignedToId?: string | null;\n teamId?: string | null;\n slaPolicy?: string | null;\n dueAt?: string | null;\n relatedAssetId?: string | null;\n relatedVulnerabilityId?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Ticket records. */\nexport interface ListTicketsOptions {\n type?: TicketType;\n status?: TicketStatus;\n priority?: HelpdeskPriority;\n submittedById?: string;\n assignedToId?: string;\n teamId?: string;\n category?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * A Service Level Agreement policy that defines response and resolution time\n * targets for Tickets.\n * Domain: Helpdesk\n * Schema: data-model/schemas/sla-policy.schema.json\n */\nexport interface SlaPolicy {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Human-readable name for this SLA policy. */\n name: string;\n /** Optional description of when this policy applies. */\n description?: string | null;\n /** The ticket types this policy governs. */\n appliesTo: TicketType[];\n /** The ticket priority tier this policy applies to. */\n priority: HelpdeskPriority;\n /** Target minutes from creation to first agent response. */\n firstResponseMinutes: number;\n /** Target minutes from creation to full resolution. */\n resolutionMinutes: number;\n /** When true, the SLA clock pauses outside business hours. */\n businessHoursOnly: boolean;\n /** Whether this policy is currently enforced. */\n status: SlaPolicyStatus;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new SLAPolicy. */\nexport interface CreateSlaPolicyInput {\n name: string;\n appliesTo: TicketType[];\n priority: HelpdeskPriority;\n firstResponseMinutes: number;\n resolutionMinutes: number;\n businessHoursOnly: boolean;\n description?: string | null;\n status?: SlaPolicyStatus;\n}\n\n/** Filter options for listing SLAPolicy records. */\nexport interface ListSlaPoliciesOptions {\n priority?: HelpdeskPriority;\n status?: SlaPolicyStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Notifications Domain ─────────────────────────────────────────────────────\n\n/** Severity / intent classification of a Notification. */\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error';\n\n/** Delivery channel for a Notification. */\nexport type NotificationChannel = 'in_app' | 'email' | 'sms';\n\n/**\n * A directed notification sent to a specific Person.\n * Notifications are append-only — created by platform events, not SDK callers.\n * Domain: Notifications\n * Schema: data-model/schemas/notification.schema.json\n */\nexport interface Notification {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the recipient Person. */\n recipientId: string;\n /** Severity / intent classification. */\n type: NotificationType;\n /** Delivery channel. */\n channel: NotificationChannel;\n /** Short summary line. */\n title: string;\n /** Full notification body text. */\n body: string;\n /** EDM entity type that triggered this notification (e.g. 'LeaveRequest'). */\n entityType?: string | null;\n /** UUID of the triggering entity instance. */\n entityId?: string | null;\n /** ISO 8601 timestamp when the recipient read this notification. Null if unread. */\n readAt?: string | null;\n /** Optional deep-link URL for the recipient to act on this notification. */\n actionUrl?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n}\n\n/** Filter options for listing Notification records. */\nexport interface ListNotificationsOptions {\n recipientId?: string;\n type?: NotificationType;\n channel?: NotificationChannel;\n unreadOnly?: boolean;\n page?: number;\n pageSize?: number;\n}\n\n/** Publication lifecycle status of an Announcement. */\nexport type AnnouncementStatus = 'draft' | 'published' | 'archived';\n\n/** Audience scoping strategy for an Announcement. */\nexport type AnnouncementAudienceType = 'all' | 'group' | 'department' | 'role';\n\n/**\n * An organisation-wide or targeted broadcast message.\n * Domain: Notifications\n * Schema: data-model/schemas/announcement.schema.json\n */\nexport interface Announcement {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Announcement headline. */\n title: string;\n /** Full body text in Markdown. */\n body: string;\n /** UUID of the Person who authored this announcement. */\n authorId: string;\n /** Audience scoping strategy. */\n audienceType: AnnouncementAudienceType;\n /** Group, department, or role identifiers forming the target audience. */\n audienceIds: string[];\n /** Whether this announcement is pinned to the top of the notice board. */\n pinned: boolean;\n /** ISO 8601 timestamp when the announcement was published. Null while draft. */\n publishedAt?: string | null;\n /** ISO 8601 timestamp after which the announcement is no longer shown. */\n expiresAt?: string | null;\n /** Publication lifecycle status. */\n status: AnnouncementStatus;\n /** Free-form tags for filtering. */\n tags: string[];\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new Announcement. */\nexport interface CreateAnnouncementInput {\n title: string;\n body: string;\n authorId: string;\n audienceType: AnnouncementAudienceType;\n audienceIds?: string[];\n pinned?: boolean;\n publishedAt?: string | null;\n expiresAt?: string | null;\n status?: AnnouncementStatus;\n tags?: string[];\n}\n\n/** Filter options for listing Announcement records. */\nexport interface ListAnnouncementsOptions {\n status?: AnnouncementStatus;\n audienceType?: AnnouncementAudienceType;\n pinned?: boolean;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Approvals Domain ─────────────────────────────────────────────────────────\n\n/** Overall lifecycle status of an ApprovalRequest. */\nexport type ApprovalRequestStatus =\n | 'pending'\n | 'approved'\n | 'rejected'\n | 'cancelled'\n | 'expired';\n\n/**\n * A multi-step approval workflow instance tied to any approvable entity.\n * Domain: Approvals\n * Schema: data-model/schemas/approval-request.schema.json\n */\nexport interface ApprovalRequest {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** EDM entity type being approved (e.g. 'Expense', 'LeaveRequest'). */\n entityType: string;\n /** UUID of the specific entity instance awaiting approval. */\n entityId: string;\n /** UUID of the Person who initiated this request. */\n requestedById: string;\n /** Human-readable summary of what is being approved. */\n title: string;\n /** Optional longer description or justification. */\n description?: string | null;\n /** Overall approval status. */\n status: ApprovalRequestStatus;\n /** Zero-based index of the currently active step. */\n currentStepIndex: number;\n /** Total number of steps required. */\n totalSteps: number;\n /** ISO 8601 deadline for completion. Null if no deadline. */\n dueAt?: string | null;\n /** ISO 8601 timestamp when the request reached a terminal state. */\n completedAt?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new ApprovalRequest. */\nexport interface CreateApprovalRequestInput {\n entityType: string;\n entityId: string;\n requestedById: string;\n title: string;\n description?: string | null;\n totalSteps: number;\n dueAt?: string | null;\n}\n\n/** Filter options for listing ApprovalRequest records. */\nexport interface ListApprovalRequestsOptions {\n entityType?: string;\n requestedById?: string;\n status?: ApprovalRequestStatus;\n page?: number;\n pageSize?: number;\n}\n\n/** Status of a single ApprovalStep. */\nexport type ApprovalStepStatus =\n | 'pending'\n | 'approved'\n | 'rejected'\n | 'delegated'\n | 'skipped';\n\n/** The approver's explicit decision on a step. */\nexport type ApprovalDecision = 'approve' | 'reject';\n\n/**\n * A single step in an ApprovalRequest's approval chain.\n * Domain: Approvals\n * Schema: data-model/schemas/approval-step.schema.json\n */\nexport interface ApprovalStep {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** UUID of the parent ApprovalRequest. */\n approvalRequestId: string;\n /** Zero-based position of this step in the chain. */\n stepIndex: number;\n /** UUID of the Person assigned to decide on this step. */\n approverId: string;\n /** Current state of this step. */\n status: ApprovalStepStatus;\n /** The approver's explicit decision. Null while pending. */\n decision?: ApprovalDecision | null;\n /** Optional comment left alongside the decision. */\n comment?: string | null;\n /** ISO 8601 timestamp when the decision was made. Null while pending. */\n decidedAt?: string | null;\n /** UUID of the Person this step was delegated to. Null unless delegated. */\n delegatedToId?: string | null;\n /** ISO 8601 creation timestamp. Read-only. */\n createdAt: string;\n /** ISO 8601 last-updated timestamp. Read-only. */\n updatedAt: string;\n}\n\n/** Input payload for creating a new ApprovalStep. */\nexport interface CreateApprovalStepInput {\n approvalRequestId: string;\n stepIndex: number;\n approverId: string;\n}\n\n/** Filter options for listing ApprovalStep records. */\nexport interface ListApprovalStepsOptions {\n approvalRequestId?: string;\n approverId?: string;\n status?: ApprovalStepStatus;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Org Domain ───────────────────────────────────────────────────────────────\n\n/** Classification of a Location's primary purpose. */\nexport type LocationType =\n | 'headquarters'\n | 'office'\n | 'remote_hub'\n | 'warehouse'\n | 'datacenter'\n | 'other';\n\n/** Lifecycle status of a Location record. */\nexport type LocationStatus = 'active' | 'inactive';\n\n/** Postal address embedded in a Location. */\nexport interface LocationAddress {\n street?: string | null;\n city?: string | null;\n state?: string | null;\n /** ISO 3166-1 alpha-2 country code. */\n country: string;\n postalCode?: string | null;\n}\n\n/**\n * A physical or virtual site where the organization operates.\n * Domain: Org\n * Schema: data-model/schemas/location.schema.json\n */\nexport interface Location {\n /** Globally unique identifier. Read-only. */\n id: string;\n name: string;\n type: LocationType;\n address: LocationAddress;\n /** IANA timezone identifier. */\n timezone: string;\n phone?: string | null;\n capacity?: number | null;\n status: LocationStatus;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new Location record. */\nexport interface CreateLocationInput {\n name: string;\n type: LocationType;\n address: LocationAddress;\n timezone: string;\n phone?: string | null;\n capacity?: number | null;\n status?: LocationStatus;\n tags?: string[];\n}\n\n/** Filter options for listing Location records. */\nexport interface ListLocationsOptions {\n type?: LocationType;\n status?: LocationStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Lifecycle status of a Department record. */\nexport type DepartmentStatus = 'active' | 'inactive';\n\n/**\n * An organizational unit within the enterprise.\n * Domain: Org\n * Schema: data-model/schemas/department.schema.json\n */\nexport interface Department {\n /** Globally unique identifier. Read-only. */\n id: string;\n name: string;\n /** Short uppercase code unique within the tenant (e.g. \"ENG\", \"HR\"). */\n code: string;\n description?: string | null;\n headId?: string | null;\n parentDepartmentId?: string | null;\n costCenterId?: string | null;\n locationId?: string | null;\n /** Computed count of active Persons. Read-only. */\n headcount: number;\n status: DepartmentStatus;\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new Department record. */\nexport interface CreateDepartmentInput {\n name: string;\n code: string;\n description?: string | null;\n headId?: string | null;\n parentDepartmentId?: string | null;\n costCenterId?: string | null;\n locationId?: string | null;\n status?: DepartmentStatus;\n}\n\n/** Filter options for listing Department records. */\nexport interface ListDepartmentsOptions {\n status?: DepartmentStatus;\n locationId?: string;\n parentDepartmentId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Catalog Domain ───────────────────────────────────────────────────────────\n\n/** Classification of a Product's delivery form. */\nexport type ProductType = 'physical' | 'digital' | 'service' | 'subscription';\n\n/** Lifecycle status of a Product in the catalog. */\nexport type ProductStatus = 'active' | 'discontinued' | 'draft';\n\n/**\n * A product or service in the enterprise catalog.\n * Domain: Catalog\n * Schema: data-model/schemas/product.schema.json\n */\nexport interface Product {\n /** Globally unique identifier. Read-only. */\n id: string;\n /** Stock Keeping Unit — unique within the tenant catalog. */\n sku: string;\n name: string;\n description?: string | null;\n category?: string | null;\n type: ProductType;\n status: ProductStatus;\n unitPrice: number;\n /** ISO 4217 three-character currency code. */\n currency: string;\n unit?: string | null;\n taxable: boolean;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new Product record. */\nexport interface CreateProductInput {\n sku: string;\n name: string;\n type: ProductType;\n unitPrice: number;\n currency: string;\n taxable: boolean;\n description?: string | null;\n category?: string | null;\n status?: ProductStatus;\n unit?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Product records. */\nexport interface ListProductsOptions {\n type?: ProductType;\n status?: ProductStatus;\n category?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/** Lifecycle status of a ProductCategory. */\nexport type ProductCategoryStatus = 'active' | 'inactive';\n\n/**\n * A hierarchical category node in the product catalog.\n * Domain: Catalog\n * Schema: data-model/schemas/product-category.schema.json\n */\nexport interface ProductCategory {\n /** Globally unique identifier. Read-only. */\n id: string;\n name: string;\n /** URL-safe kebab-case slug, unique within the tenant. */\n slug: string;\n description?: string | null;\n parentCategoryId?: string | null;\n status: ProductCategoryStatus;\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new ProductCategory record. */\nexport interface CreateProductCategoryInput {\n name: string;\n slug: string;\n description?: string | null;\n parentCategoryId?: string | null;\n status?: ProductCategoryStatus;\n}\n\n/** Filter options for listing ProductCategory records. */\nexport interface ListProductCategoriesOptions {\n status?: ProductCategoryStatus;\n parentCategoryId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Procurement Domain ───────────────────────────────────────────────────────\n\n/** Classification of a Supplier's business relationship. */\nexport type SupplierType =\n | 'manufacturer'\n | 'distributor'\n | 'service_provider'\n | 'freelancer'\n | 'other';\n\n/** Engagement status of a Supplier. */\nexport type SupplierStatus = 'active' | 'inactive' | 'blacklisted';\n\n/** Postal address embedded in a Supplier. */\nexport interface SupplierAddress {\n street?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n postalCode?: string | null;\n}\n\n/**\n * An external organization supplying goods or services to the enterprise.\n * Domain: Procurement\n * Schema: data-model/schemas/supplier.schema.json\n */\nexport interface Supplier {\n /** Globally unique identifier. Read-only. */\n id: string;\n name: string;\n displayName?: string | null;\n type: SupplierType;\n status: SupplierStatus;\n contactName?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n website?: string | null;\n address?: SupplierAddress | null;\n paymentTermsDays?: number | null;\n currency?: string | null;\n taxId?: string | null;\n notes?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\n/** Input payload for creating a new Supplier record. */\nexport interface CreateSupplierInput {\n name: string;\n type: SupplierType;\n displayName?: string | null;\n status?: SupplierStatus;\n contactName?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n website?: string | null;\n address?: SupplierAddress | null;\n paymentTermsDays?: number | null;\n currency?: string | null;\n taxId?: string | null;\n notes?: string | null;\n tags?: string[];\n}\n\n/** Filter options for listing Supplier records. */\nexport interface ListSuppliersOptions {\n type?: SupplierType;\n status?: SupplierStatus;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n// ─── Finance Domain ───────────────────────────────────────────────────────────\n\n/** Whether an Invoice is accounts-receivable (customer) or accounts-payable (supplier). */\nexport type InvoiceType = 'customer' | 'supplier';\n\n/** Lifecycle status of an Invoice. */\nexport type InvoiceStatus = 'draft' | 'sent' | 'paid' | 'overdue' | 'cancelled' | 'void';\n\n/** A single line item on an Invoice. */\nexport interface InvoiceLineItem {\n description: string;\n quantity: number;\n unitPrice: number;\n /** Tax rate as a decimal (e.g. 0.20 = 20%). */\n taxRate: number;\n /** Line total (quantity × unitPrice before tax). */\n amount: number;\n}\n\n/**\n * Represents a customer or supplier invoice in the Finance domain.\n * Domain: Finance\n * Schema: data-model/schemas/invoice.schema.json\n */\nexport interface Invoice {\n id: string;\n number: string;\n type: InvoiceType;\n status: InvoiceStatus;\n accountId?: string | null;\n vendorId?: string | null;\n issueDate: string;\n dueDate: string;\n paidDate?: string | null;\n currency: string;\n subtotal: number;\n taxAmount: number;\n discountAmount: number;\n total: number;\n lineItems: InvoiceLineItem[];\n notes?: string | null;\n projectId?: string | null;\n contractId?: string | null;\n documentRef?: string | null;\n createdById: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateInvoiceInput {\n number: string;\n type: InvoiceType;\n status?: InvoiceStatus;\n accountId?: string | null;\n vendorId?: string | null;\n issueDate: string;\n dueDate: string;\n paidDate?: string | null;\n currency: string;\n subtotal: number;\n taxAmount: number;\n discountAmount: number;\n total: number;\n lineItems: InvoiceLineItem[];\n notes?: string | null;\n projectId?: string | null;\n contractId?: string | null;\n documentRef?: string | null;\n createdById: string;\n}\n\nexport interface ListInvoicesOptions {\n type?: InvoiceType;\n status?: InvoiceStatus;\n accountId?: string;\n vendorId?: string;\n projectId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\nexport type PurchaseOrderStatus = 'draft' | 'submitted' | 'approved' | 'fulfilled' | 'cancelled';\n\nexport interface PurchaseOrderLineItem {\n description: string;\n quantity: number;\n unitPrice: number;\n amount: number;\n deliveredQuantity: number;\n}\n\n/**\n * Represents a purchase order raised against a vendor in the Finance domain.\n * Domain: Finance\n * Schema: data-model/schemas/purchase-order.schema.json\n */\nexport interface PurchaseOrder {\n id: string;\n number: string;\n vendorId: string;\n status: PurchaseOrderStatus;\n requestedById: string;\n approvedById?: string | null;\n issuedDate?: string | null;\n expectedDeliveryDate?: string | null;\n currency: string;\n total: number;\n lineItems: PurchaseOrderLineItem[];\n notes?: string | null;\n linkedContractId?: string | null;\n costCenterId?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreatePurchaseOrderInput {\n number: string;\n vendorId: string;\n status?: PurchaseOrderStatus;\n requestedById: string;\n approvedById?: string | null;\n issuedDate?: string | null;\n expectedDeliveryDate?: string | null;\n currency: string;\n total: number;\n lineItems: PurchaseOrderLineItem[];\n notes?: string | null;\n linkedContractId?: string | null;\n costCenterId?: string | null;\n}\n\nexport interface ListPurchaseOrdersOptions {\n status?: PurchaseOrderStatus;\n vendorId?: string;\n requestedById?: string;\n costCenterId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\nexport type ExpenseCategory =\n | 'travel'\n | 'accommodation'\n | 'meals'\n | 'equipment'\n | 'software'\n | 'training'\n | 'marketing'\n | 'other';\n\nexport type ExpenseStatus = 'draft' | 'submitted' | 'approved' | 'rejected' | 'reimbursed';\n\n/**\n * Represents an employee expense claim in the Finance domain.\n * Domain: Finance\n * Schema: data-model/schemas/expense.schema.json\n */\nexport interface Expense {\n id: string;\n submittedById: string;\n approvedById?: string | null;\n category: ExpenseCategory;\n description: string;\n amount: number;\n currency: string;\n expenseDate: string;\n status: ExpenseStatus;\n receiptRef?: string | null;\n projectId?: string | null;\n costCenterId?: string | null;\n notes?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateExpenseInput {\n submittedById: string;\n category: ExpenseCategory;\n description: string;\n amount: number;\n currency: string;\n expenseDate: string;\n status?: ExpenseStatus;\n receiptRef?: string | null;\n projectId?: string | null;\n costCenterId?: string | null;\n notes?: string | null;\n}\n\nexport interface ListExpensesOptions {\n submittedById?: string;\n status?: ExpenseStatus;\n category?: ExpenseCategory;\n projectId?: string;\n costCenterId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\nexport type BudgetPeriod = 'annual' | 'quarterly' | 'monthly';\n\nexport type BudgetStatus = 'draft' | 'approved' | 'active' | 'closed';\n\n/**\n * Represents a financial budget for a fiscal period in the Finance domain.\n * Domain: Finance\n * Schema: data-model/schemas/budget.schema.json\n */\nexport interface Budget {\n id: string;\n name: string;\n fiscalYear: string;\n period: BudgetPeriod;\n costCenterId?: string | null;\n ownerId: string;\n totalAmount: number;\n currency: string;\n status: BudgetStatus;\n notes?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateBudgetInput {\n name: string;\n fiscalYear: string;\n period: BudgetPeriod;\n costCenterId?: string | null;\n ownerId: string;\n totalAmount: number;\n currency: string;\n status?: BudgetStatus;\n notes?: string | null;\n}\n\nexport interface ListBudgetsOptions {\n fiscalYear?: string;\n period?: BudgetPeriod;\n status?: BudgetStatus;\n costCenterId?: string;\n ownerId?: string;\n search?: string;\n page?: number;\n pageSize?: number;\n}\n\n/**\n * Represents a single category line within a Budget in the Finance domain.\n * Domain: Finance\n * Schema: data-model/schemas/budget-line.schema.json\n */\nexport interface BudgetLine {\n id: string;\n budgetId: string;\n category: string;\n allocatedAmount: number;\n /** Computed total actuals. Read-only — maintained by the platform. */\n spentAmount: number;\n /** Computed remaining balance (allocatedAmount - spentAmount). Read-only. */\n remainingAmount: number;\n notes?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateBudgetLineInput {\n budgetId: string;\n category: string;\n allocatedAmount: number;\n notes?: string | null;\n}\n\nexport interface ListBudgetLinesOptions {\n budgetId?: string;\n category?: string;\n page?: number;\n pageSize?: number;\n}\n","import { PATHS } from '../_generated/paths.js';\n// Relationship — thin HTTP client over cpod-backend (PATHS.relationships).\n//\n// Issue #111 — cross-domain relationship spine. The base CRUD stays backward\n// compatible (inherited from HttpCrudService). Two new helpers cover the\n// common spine queries:\n// • getRelationshipsByEntity(entityType, entityId) — all edges touching an entity\n// • getCrossDomainRelationships(domain1, domain2) — edges bridging two EDM domains\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService, type PaginatedResponse, type ListOptions } from '../edms/crud.js'\nimport type {\n ExtendedRelationship,\n RelationshipBridge,\n BridgeTraversalOptions,\n} from '../types/index.js'\nimport { RELATIONSHIP_BRIDGES } from '../types/index.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class RelationshipService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Relationships.', params: PAGINATION },\n get: { description: 'Fetch a Relationship by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Relationship.', params: [\n { name: 'from_id', type: 'string', required: true },\n { name: 'to_id', type: 'string', required: true },\n { name: 'relation', type: 'string', required: true },\n ] },\n update: { description: 'Patch Relationship fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Relationship.', params: [ID_PARAM] },\n getByEntity: { description: 'Query relationships for a specific entity.', params: [\n { name: 'entityType', type: 'string', required: true },\n { name: 'entityId', type: 'string', required: true },\n ] },\n getCrossDomain: { description: 'Relationships between two domains.', params: [\n { name: 'domain1', type: 'string', required: true },\n { name: 'domain2', type: 'string', required: true },\n ] },\n }\n constructor(http: HttpClient) { super(http, PATHS.relationships) }\n\n /**\n * Fetch every relationship edge that touches the given entity — either as\n * source or target. The backend filters on `sourceId` / `targetId` via\n * query-string parameters. Returns the paginated envelope so callers can\n * walk large graphs page by page.\n *\n * @param entityType EDM entity type (e.g. 'Person', 'TechnologyAsset').\n * @param entityId UUID of the entity.\n * @param opts Optional pagination / filter overrides.\n */\n getRelationshipsByEntity(\n entityType: string,\n entityId: string,\n opts?: ListOptions,\n ): Promise<PaginatedResponse<ExtendedRelationship>> {\n const params = new URLSearchParams();\n params.set('entity_type', entityType);\n params.set('entity_id', entityId);\n if (opts?.page != null) params.set('page', String(opts.page));\n if (opts?.pageSize != null) params.set('page_size', String(opts.pageSize));\n return this.http.get<PaginatedResponse<ExtendedRelationship>>(\n `${this.path}?${params.toString()}`,\n );\n }\n\n /**\n * Fetch all edges that bridge two EDM domains (e.g. 'people' ↔ 'technology').\n * Direction-agnostic — returns edges where (sourceDomain = domain1 AND\n * targetDomain = domain2) OR the reverse. Useful for building cross-domain\n * graph views (who owns which asset, which risk touches which control, etc.).\n */\n getCrossDomainRelationships(\n domain1: string,\n domain2: string,\n opts?: ListOptions,\n ): Promise<PaginatedResponse<ExtendedRelationship>> {\n const params = new URLSearchParams();\n params.set('source_domain', domain1);\n params.set('target_domain', domain2);\n if (opts?.page != null) params.set('page', String(opts.page));\n if (opts?.pageSize != null) params.set('page_size', String(opts.pageSize));\n return this.http.get<PaginatedResponse<ExtendedRelationship>>(\n `${this.path}?${params.toString()}`,\n );\n }\n\n // ── Bridge traversal (#169) ──────────────────────────────────────────\n\n /**\n * List all registered relationship bridges and their definitions.\n * Useful for building UI that shows which cross-domain traversals are available.\n */\n listBridges() {\n return Object.values(RELATIONSHIP_BRIDGES);\n }\n\n /**\n * Traverse a named relationship bridge — the first-class cross-domain\n * query that replaces per-app ad-hoc joins.\n *\n * Each bridge maps to a set of source/target domains and typical edge\n * types. Pass `sourceEntityId` or `targetEntityId` to anchor one end.\n *\n * @example\n * ```ts\n * // All finance records linked to a customer account\n * const edges = await client.relationshipsEdges.traverseBridge(\n * 'customer_finance',\n * { sourceEntityId: 'acc_01HXACCOUNT' }\n * );\n *\n * // All performance reviews and learning records for an employee\n * const edges = await client.relationshipsEdges.traverseBridge(\n * 'employee_performance_learning',\n * { sourceEntityId: 'emp_01HXEMPLOYEE' }\n * );\n * ```\n */\n traverseBridge(\n bridge: RelationshipBridge,\n opts?: BridgeTraversalOptions,\n ): Promise<PaginatedResponse<ExtendedRelationship>> {\n const def = RELATIONSHIP_BRIDGES[bridge];\n const params = new URLSearchParams();\n params.set('bridge', bridge);\n\n // When the bridge has known domains, pass them for server-side filtering\n if (def.sourceDomains.length > 0) {\n params.set('source_domains', def.sourceDomains.join(','));\n }\n if (def.targetDomains.length > 0) {\n params.set('target_domains', def.targetDomains.join(','));\n }\n if (def.edgeTypes.length > 0 && !opts?.edgeType) {\n params.set('edge_types', def.edgeTypes.join(','));\n }\n\n // Apply traversal filters\n if (opts?.sourceEntityId) params.set('source_entity_id', opts.sourceEntityId);\n if (opts?.targetEntityId) params.set('target_entity_id', opts.targetEntityId);\n if (opts?.edgeType) params.set('edge_type', opts.edgeType);\n if (opts?.page != null) params.set('page', String(opts.page));\n if (opts?.pageSize != null) params.set('page_size', String(opts.pageSize));\n\n return this.http.get<PaginatedResponse<ExtendedRelationship>>(\n `${this.path}/bridge?${params.toString()}`,\n );\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Data Source — thin HTTP client over cpod-backend (PATHS.datasources).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class DataSourceService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Data Sources.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a Data Source by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Data Source — a live connection to an external system that syncs enterprise data into the EDM.', params: [\n { name: 'name', type: 'string', required: true, description: 'Human-readable display name for this integration connection.' },\n { name: 'type', type: 'string', required: true, description: 'Integration type. One of: active_directory, okta, aws, azure, gcp, servicenow, jira, github, jamf, intune, qualys, tenable, snyk, crowdstrike, custom.' },\n { name: 'status', type: 'string', description: 'Current operational status. One of: active, error, paused, disconnected. Defaults to active.' },\n { name: 'config', type: 'object', description: 'Integration-specific configuration; shape varies by type. Sensitive fields are write-only and never returned.' },\n { name: 'last_sync_at', type: 'string', description: 'Timestamp (ISO 8601) of the most recently completed sync run.' },\n { name: 'next_sync_at', type: 'string', description: 'Timestamp (ISO 8601) of the next scheduled sync run.' },\n { name: 'synced_entities', type: 'object', description: 'Count of synced entities by entity type, e.g. {\"people\": 1200, \"groups\": 85}.' },\n ] },\n update: { description: 'Patch Data Source fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Data Source.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.datasources) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// File storage — backend mints presigned URLs to MinIO.\n//\n// The SDK never holds MinIO credentials. To upload, we POST to\n// PATHS.storageFilesPresignPut and receive a short-lived URL;\n// the client then uploads the bytes directly to MinIO. Downloads use\n// the same dance with `/presign-get`.\n\nimport type { HttpClient } from '../http/client.js'\n\ninterface PresignedResponse {\n file_key: string\n url: string\n expires_seconds: number\n}\n\nexport interface PutOptions {\n /** Override the auto-generated key. Must start with the caller's scope prefix. */\n fileKey?: string\n /** Presigned URL lifetime. Default 900s (15 min). */\n expiresSeconds?: number\n /** Optional content type used on the upload. */\n contentType?: string\n}\n\nexport class FilesClient {\n constructor(private readonly http: HttpClient) {}\n\n /** Upload bytes via a backend-issued presigned URL. Returns the stored ``fileKey``. */\n async put(\n data: Blob | ArrayBuffer | Uint8Array | string,\n opts: PutOptions = {},\n ): Promise<{ fileKey: string }> {\n const presign = await this.http.post<PresignedResponse>(\n PATHS.storageFilesPresignPut,\n {\n file_key: opts.fileKey ?? null,\n expires_seconds: opts.expiresSeconds ?? 900,\n },\n )\n const body: any = data instanceof Uint8Array ? new Blob([data]) : data\n const init: any = { method: 'PUT', body }\n if (opts.contentType) init.headers = { 'Content-Type': opts.contentType }\n const res = await fetch(presign.url, init)\n if (!res.ok) {\n throw new Error(`MinIO PUT failed: HTTP ${res.status}`)\n }\n return { fileKey: presign.file_key }\n }\n\n /** Download bytes via a backend-issued presigned URL. */\n async get(fileKey: string, opts: { expiresSeconds?: number } = {}): Promise<ArrayBuffer> {\n const presign = await this.http.post<PresignedResponse>(\n PATHS.storageFilesPresignGet,\n { file_key: fileKey, expires_seconds: opts.expiresSeconds ?? 900 },\n )\n const res = await fetch(presign.url)\n if (!res.ok) {\n throw new Error(`MinIO GET failed: HTTP ${res.status}`)\n }\n return res.arrayBuffer()\n }\n\n /** Get the URL directly (e.g. for an <img src=...>). */\n async getUrl(fileKey: string, opts: { expiresSeconds?: number } = {}): Promise<string> {\n const presign = await this.http.post<PresignedResponse>(\n PATHS.storageFilesPresignGet,\n { file_key: fileKey, expires_seconds: opts.expiresSeconds ?? 900 },\n )\n return presign.url\n }\n\n async delete(fileKey: string): Promise<void> {\n await this.http.delete(`/api/v1/storage/files?file_key=${encodeURIComponent(fileKey)}`)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// db — thin HTTP client over cpod-backend (`/api/v1/storage/db/*`).\n\nimport type { HttpClient } from '../http/client.js'\n\ntype JsonObject = Record<string, unknown>\n\nexport interface SetOptions {\n /** Currently unused at the wire layer; reserved for future TTL support. */\n ttlSeconds?: number\n}\n\n/** A logical \"collection\" of JSON docs keyed by string. */\nexport class CollectionClient {\n constructor(\n private readonly http: HttpClient,\n private readonly collection: string,\n ) {}\n\n async get(key: string): Promise<JsonObject | null> {\n try {\n const doc = await this.http.get<{ value: JsonObject }>(\n buildPath(PATHS.storageDbByCollectionByKey, encodeURIComponent(this.collection), encodeURIComponent(key)),\n )\n return doc?.value ?? null\n } catch (e: any) {\n if (e?.status === 404) return null\n throw e\n }\n }\n\n async set(key: string, value: JsonObject, _opts: SetOptions = {}): Promise<void> {\n await this.http.put(\n buildPath(PATHS.storageDbByCollectionByKey, encodeURIComponent(this.collection), encodeURIComponent(key)),\n { value },\n )\n }\n\n async delete(key: string): Promise<void> {\n try {\n await this.http.delete(\n buildPath(PATHS.storageDbByCollectionByKey, encodeURIComponent(this.collection), encodeURIComponent(key)),\n )\n } catch (e: any) {\n if (e?.status === 404) return\n throw e\n }\n }\n\n async list(opts?: { page?: number; pageSize?: number }) {\n const qs: string[] = []\n if (opts?.page != null) qs.push(`page=${opts.page}`)\n if (opts?.pageSize != null) qs.push(`page_size=${opts.pageSize}`)\n const suffix = qs.length ? `?${qs.join('&')}` : ''\n return this.http.get<{ items: JsonObject[]; total: number; page: number; page_size: number }>(\n `/api/v1/storage/db/${encodeURIComponent(this.collection)}${suffix}`,\n )\n }\n}\n\nexport class DbClient {\n constructor(private readonly http: HttpClient) {}\n\n collection(name: string): CollectionClient {\n return new CollectionClient(this.http, name)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// KV — thin HTTP client over cpod-backend (`/api/v1/storage/kv/*`).\n// Backend owns the Mongo collection (`edm_kv`); SDK just issues HTTP.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { KvSetOptions } from './types.js'\n\nexport class KvClient {\n constructor(private readonly http: HttpClient) {}\n\n async get(key: string): Promise<string | null> {\n try {\n const doc = await this.http.get<{ value: string }>(\n buildPath(PATHS.storageKvByKey, encodeURIComponent(key)),\n )\n return doc?.value ?? null\n } catch (e: any) {\n if (e?.status === 404) return null\n throw e\n }\n }\n\n async set(key: string, value: string | object, opts: KvSetOptions = {}): Promise<void> {\n const serialized = typeof value === 'string' ? value : JSON.stringify(value)\n await this.http.put(buildPath(PATHS.storageKvByKey, encodeURIComponent(key)), {\n value: serialized,\n ttl_seconds: opts.ttl ?? null,\n })\n }\n\n async delete(key: string): Promise<void> {\n try {\n await this.http.delete(buildPath(PATHS.storageKvByKey, encodeURIComponent(key)))\n } catch (e: any) {\n if (e?.status === 404) return\n throw e\n }\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// StorageObject registry — thin HTTP client over cpod-backend.\n// Records here point at MinIO blobs; the bytes themselves are still in MinIO.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class StorageObjectsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List storage objects (MinIO blob metadata records).', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a storage object record by id.', params: [ID_PARAM] },\n create: { description: 'Register a storage object — metadata that pairs with a MinIO blob. The bytes themselves are uploaded separately via a presigned PUT; this row records where they live and how to validate them.', params: [\n { name: 'path', type: 'string', required: true, description: 'Relative path as supplied by the SDK consumer, e.g. \"config/settings.json\".' },\n { name: 'minio_key', type: 'string', description: 'Resolved MinIO object key (server-assigned; never trusted from the client).' },\n { name: 'tier', type: 'string', description: 'Isolation sandbox. One of: private, user, shared. Defaults to private.' },\n { name: 'user_id', type: 'string', description: 'Owner user id — set only when tier=user.' },\n { name: 'size', type: 'number', description: 'Object size in bytes.' },\n { name: 'content_type', type: 'string', description: 'MIME content type of the blob, e.g. \"application/json\".' },\n { name: 'checksum', type: 'string', description: 'SHA-256 hex digest of the object bytes.' },\n ] },\n update: { description: 'Patch storage object metadata fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a storage object record.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.storageObjects) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// StorageRecord registry — thin HTTP client over cpod-backend.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class StorageRecordsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List storage records (generic JSON document registry).', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a storage record by id.', params: [ID_PARAM] },\n create: { description: 'Create a storage record — an arbitrary JSON document stored under a named collection/key, with optional TTL. Useful as a lightweight key/value document store on top of the EDM.', params: [\n { name: 'collection', type: 'string', required: true, description: 'Collection name the record belongs to, e.g. \"audit_events\".' },\n { name: 'key', type: 'string', description: 'Document key within the collection.' },\n { name: 'tier', type: 'string', description: 'Isolation sandbox. One of: private, user, shared. Defaults to private.' },\n { name: 'user_id', type: 'string', description: 'Owner user id — set only when tier=user.' },\n { name: 'value', type: 'object', description: 'Arbitrary JSON payload for this record.' },\n { name: 'ttl', type: 'number', description: 'TTL in seconds; null means no expiry.' },\n { name: 'version', type: 'number', description: 'Optimistic concurrency counter, bumped on each update.' },\n ] },\n update: { description: 'Patch storage record fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a storage record.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.storageRecords) }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type { Skill, RunSkillInput, SkillRunResult } from './types.js';\n\n/** Provides operations for listing and executing platform Skills. */\nexport class SkillsService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** List all available skills. */\n async list(requestOpts?: RequestOptions): Promise<Skill[]> {\n return this.http.get<Skill[]>(PATHS.skills, requestOpts);\n }\n\n /** Get a skill by ID. */\n async get(id: string, requestOpts?: RequestOptions): Promise<Skill> {\n return this.http.get<Skill>(buildPath(PATHS.skillsBySkillId, id), requestOpts);\n }\n\n /** Run a skill synchronously or asynchronously. */\n async run(\n id: string,\n input: RunSkillInput,\n requestOpts?: RequestOptions\n ): Promise<SkillRunResult> {\n return this.http.post<SkillRunResult>(buildPath(PATHS.skillsBySkillIdRun, id), input, requestOpts);\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type {\n Workflow,\n CreateWorkflowInput,\n RunWorkflowInput,\n WorkflowRunResult,\n} from './types.js';\n\n/** Provides operations for managing and running platform Workflows. */\nexport class WorkflowsService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** List all workflows. */\n async list(requestOpts?: RequestOptions): Promise<Workflow[]> {\n return this.http.get<Workflow[]>(PATHS.workflows, requestOpts);\n }\n\n /** Create a new workflow. */\n async create(\n input: CreateWorkflowInput,\n requestOpts?: RequestOptions\n ): Promise<Workflow> {\n return this.http.post<Workflow>(PATHS.workflows, input, requestOpts);\n }\n\n /** Get a workflow by ID. */\n async get(id: string, requestOpts?: RequestOptions): Promise<Workflow> {\n return this.http.get<Workflow>(buildPath(PATHS.workflowsByWorkflowId, id), requestOpts);\n }\n\n /** Trigger a workflow run. */\n async run(\n id: string,\n input: RunWorkflowInput,\n requestOpts?: RequestOptions\n ): Promise<WorkflowRunResult> {\n return this.http.post<WorkflowRunResult>(buildPath(PATHS.workflowsByWorkflowIdRun, id), input, requestOpts);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type { Job, SubmitJobInput } from './types.js';\n\n/** Provides operations for submitting, monitoring, and cancelling platform Jobs. */\nexport class JobsService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Submit a new job for async execution. */\n async submit(input: SubmitJobInput, requestOpts?: RequestOptions): Promise<Job> {\n return this.http.post<Job>('/api/v1/jobs/submit', input, requestOpts);\n }\n\n /** Poll a job for its current status and result. */\n async watch(id: string, requestOpts?: RequestOptions): Promise<Job> {\n return this.http.get<Job>(`/api/v1/jobs/${id}`, requestOpts);\n }\n\n /** Get the output of a completed job. */\n async getOutput(id: string, requestOpts?: RequestOptions): Promise<unknown> {\n const job = await this.http.get<Job>(`/api/v1/jobs/${id}`, requestOpts);\n return job.output;\n }\n\n /** Cancel a running or pending job. */\n async cancel(id: string, requestOpts?: RequestOptions): Promise<Job> {\n return this.http.post<Job>(`/api/v1/jobs/${id}/cancel`, {}, requestOpts);\n }\n}\n","// Masking — pure client-side PII redactor.\n//\n// No backend involvement, no Mongo. Runs entirely in-process: applies a\n// library of regex rules to redact common sensitive substrings (emails,\n// credit cards, JWTs, IP addresses, …). Callers can extend with custom\n// rules per call.\n//\n// Why client-side: masking is a stateless transform. Round-tripping data\n// through a backend to be redacted is both slower and a worse security\n// posture (the data has to leave the caller's process to be cleaned).\n// Doing it locally keeps the raw value on-host and the redacted value\n// is what hits the wire.\n\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport type { MaskInput, MaskResult } from './types.js'\n\n/**\n * A masking rule. `pattern` finds sensitive substrings; `replace` returns\n * the redaction (defaults to '••• REDACTED •••').\n */\nexport interface MaskRule {\n /** Identifier shown in `MaskResult.matches[].type`. */\n type: string\n /** Regex (must have the global flag). */\n pattern: RegExp\n /** Optional replacement function; defaults to a generic placeholder. */\n replace?: (match: string) => string\n}\n\nconst DEFAULT_PLACEHOLDER = '••• REDACTED •••'\n\n/** Built-in rules — extensible per-call via `extraRules`. */\nexport const BUILTIN_MASK_RULES: MaskRule[] = [\n {\n type: 'email',\n pattern: /\\b[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}\\b/gi,\n replace: (m) => `••• REDACTED EMAIL (${m.split('@')[1] ?? ''}) •••`,\n },\n {\n // PAN — 13–19 digits, Luhn not enforced (regex is sufficient for masking).\n type: 'credit_card',\n pattern: /\\b(?:\\d[ -]?){13,19}\\b/g,\n },\n {\n // US SSN.\n type: 'us_ssn',\n pattern: /\\b\\d{3}-\\d{2}-\\d{4}\\b/g,\n },\n {\n // JWT.\n type: 'jwt',\n pattern: /\\beyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b/g,\n },\n {\n // Bearer tokens in Authorization headers.\n type: 'bearer_token',\n pattern: /(?<=Bearer\\s)[A-Za-z0-9._~+/=-]+/g,\n },\n {\n // IPv4.\n type: 'ipv4',\n pattern: /\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b/g,\n },\n {\n // E.164 phone numbers.\n type: 'phone_e164',\n pattern: /\\+\\d{7,15}\\b/g,\n },\n {\n // AWS access key IDs.\n type: 'aws_access_key',\n pattern: /\\bAKIA[0-9A-Z]{16}\\b/g,\n },\n]\n\n/**\n * Pure client-side masker. Never touches the network.\n */\nexport class MaskingService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n mask: {\n description:\n 'Redact sensitive substrings (emails, credit cards, JWTs, IPs, …) from a string. Pure client-side regex — never sent to the backend.',\n params: [\n { name: 'value', type: 'string', required: true },\n { name: 'type', type: 'string', description: 'Optional hint; ignored by built-in rules.' },\n ],\n },\n maskString: {\n description: 'Convenience: mask a plain string, return the masked version only.',\n params: [\n { name: 'value', type: 'string', required: true },\n ],\n },\n rules: {\n description: 'Return the list of built-in masking rules (for inspection / docs).',\n params: [],\n },\n }\n\n /**\n * Mask a string against built-in rules + optional extras. Returns the\n * masked text plus a list of matches (with original + type).\n */\n mask(input: MaskInput, opts?: { extraRules?: MaskRule[]; placeholder?: string }): MaskResult {\n const value = input.value ?? ''\n const rules = [...BUILTIN_MASK_RULES, ...(opts?.extraRules ?? [])]\n const placeholder = opts?.placeholder ?? DEFAULT_PLACEHOLDER\n\n let masked = value\n const matches: Array<{ type: string; original: string; replacement: string }> = []\n for (const rule of rules) {\n masked = masked.replace(rule.pattern, (m) => {\n const replacement = rule.replace ? rule.replace(m) : placeholder\n matches.push({ type: rule.type, original: m, replacement })\n return replacement\n })\n }\n return { masked, matches } as MaskResult\n }\n\n /** Mask + return only the masked string. */\n maskString(value: string, _type?: string, opts?: { extraRules?: MaskRule[] }): string {\n return this.mask({ value, type: _type ?? 'auto' } as MaskInput, opts).masked\n }\n\n /** Inspect the built-in rule set. */\n rules(): Array<{ type: string; pattern: string }> {\n return BUILTIN_MASK_RULES.map((r) => ({ type: r.type, pattern: r.pattern.source }))\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\n\n// ─── Audit types ──────────────────────────────────────────────────────────────\n\n/** Input for emitting a custom audit event. */\nexport interface AuditEmitOptions {\n action: string;\n resourceId?: string;\n resourceType?: string;\n outcome?: 'success' | 'failure' | 'denied';\n actorType?: 'user' | 'service' | 'system';\n metadata?: Record<string, unknown>;\n before?: Record<string, unknown>;\n after?: Record<string, unknown>;\n}\n\n/** A recorded audit event. Schema: data-model/schemas/audit-event.schema.json */\nexport interface AuditEvent {\n /** 'aud-' prefixed globally unique ID. */\n id: string;\n /** Monotonic per-tenant sequence number. */\n sequenceId: number;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Source application slug. */\n appId: string;\n /** Classification of the actor: 'user' | 'service' | 'system' | 'impersonator'. */\n actorType: 'user' | 'service' | 'system' | 'impersonator';\n /** User or service account that performed the action. */\n actorId: string;\n /** Set when actorType is 'impersonator'. */\n impersonatedUserId?: string | null;\n /** Dot-separated action name (e.g. 'person.created', 'export.approved'). */\n action: string;\n /** EDM entity type of the affected resource. */\n resourceType: string;\n /** Identifier of the affected resource. */\n resourceId: string;\n /** Result of the action: 'success' | 'denied' | 'error'. */\n outcome: 'success' | 'denied' | 'error';\n /** Denial reason or error message. */\n reason?: string | null;\n /** Resource state before the mutation. */\n before?: Record<string, unknown> | null;\n /** Resource state after the mutation. */\n after?: Record<string, unknown> | null;\n /** Computed diff of changed fields. */\n changes?: Record<string, unknown> | null;\n /** Source IP address of the request. */\n ip?: string | null;\n /** User-Agent of the originating client. */\n userAgent?: string | null;\n /** Distributed trace correlation ID. */\n requestId?: string | null;\n /** Rego policy decision IDs that gated this action. */\n policyDecisionIds?: string[];\n /** SHA-256 of the prior event in the tenant chain. Read-only. */\n previousHash: string;\n /** HMAC-SHA-256 of this record. Read-only. */\n recordHash: string;\n /** MinIO Object Lock URL once archived. Read-only. */\n wormRef?: string | null;\n /** ISO 8601 UTC timestamp of the event. */\n ts: string;\n}\n\n/** Query parameters for listing audit events. */\nexport interface AuditQueryOptions {\n resourceId?: string;\n resourceType?: string;\n action?: string;\n actorId?: string;\n outcome?: string;\n from?: string;\n to?: string;\n limit?: number;\n cursor?: string;\n}\n\n/** Paginated response for audit event queries. */\nexport interface AuditEventPage {\n items: AuditEvent[];\n nextCursor?: string;\n}\n\n// ─── AuditClient ─────────────────────────────────────────────────────────────\n\n/**\n * Provides operations for emitting and querying platform audit events.\n *\n * The platform automatically emits audit events for all EDM mutations\n * (create, update, delete on People, Assets, Licenses, etc.) and every\n * platform service invocation. Use `emit()` only for custom business events\n * not covered by built-in actions.\n */\nexport class AuditClient {\n constructor(private http: HttpClient) {}\n\n /** Emit a custom audit event. */\n async emit(opts: AuditEmitOptions, requestOpts?: RequestOptions): Promise<AuditEvent> {\n return this.http.post<AuditEvent>('/api/v1/telemetry/audit/emit', opts, requestOpts);\n }\n\n /** Query audit events with optional filters. */\n async query(\n opts?: AuditQueryOptions,\n requestOpts?: RequestOptions\n ): Promise<AuditEventPage> {\n const parts: string[] = [];\n if (opts?.resourceId) parts.push(`resourceId=${encodeURIComponent(opts.resourceId)}`);\n if (opts?.resourceType) parts.push(`resourceType=${encodeURIComponent(opts.resourceType)}`);\n if (opts?.action) parts.push(`action=${encodeURIComponent(opts.action)}`);\n if (opts?.actorId) parts.push(`actorId=${encodeURIComponent(opts.actorId)}`);\n if (opts?.outcome) parts.push(`outcome=${encodeURIComponent(opts.outcome)}`);\n if (opts?.from) parts.push(`from=${encodeURIComponent(opts.from)}`);\n if (opts?.to) parts.push(`to=${encodeURIComponent(opts.to)}`);\n if (opts?.limit != null) parts.push(`limit=${opts.limit}`);\n if (opts?.cursor) parts.push(`cursor=${encodeURIComponent(opts.cursor)}`);\n const qs = parts.length > 0 ? `?${parts.join('&')}` : '';\n return this.http.get<AuditEventPage>(`/api/v1/telemetry/audit/events${qs}`, requestOpts);\n }\n\n /** Get a single audit event by ID. */\n async get(id: string, requestOpts?: RequestOptions): Promise<AuditEvent> {\n return this.http.get<AuditEvent>(`/api/v1/telemetry/audit/events/${id}`, requestOpts);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\n\n// ─── Traces types ─────────────────────────────────────────────────────────────\n\n/** A policy decision evaluated by coreiq for a trace. */\nexport interface TracePolicyDecision {\n policyId: string;\n decision: string;\n reason?: string | null;\n}\n\n/** A PII/DLP violation detected for a trace. */\nexport interface TraceSecurityViolation {\n kind: string;\n value?: string | null;\n action: string;\n}\n\n/** A recorded LLM/AI call trace. Schema: data-model/schemas/trace.schema.json */\nexport interface Trace {\n /** 'trc-' prefixed globally unique ID. */\n id: string;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Source application slug. */\n appId: string;\n /** Distributed-tracing parent span ID. */\n parentSpanId?: string | null;\n /** Agent run this trace belongs to. */\n agentRunId?: string | null;\n /** Initiating user. Null for system calls. */\n userId?: string | null;\n /** Virtual API key used for this call. */\n apiKeyId?: string | null;\n /** Model identifier (e.g. 'anthropic/claude-opus-4-7'). */\n model: string;\n /** LLM provider name (e.g. 'anthropic', 'openai', 'azure'). */\n provider: string;\n /** Kind of LLM operation: 'chat' | 'embedding' | 'image' | 'audio' | 'tool_call' | 'evaluation'. */\n spanKind: 'chat' | 'embedding' | 'image' | 'audio' | 'tool_call' | 'evaluation';\n /** Prompt/input token count. */\n inputTokens: number;\n /** Completion/output token count. */\n outputTokens: number;\n /** Tokens served from the prompt cache. */\n cacheReadTokens?: number | null;\n /** Tokens written to the prompt cache. */\n cacheWriteTokens?: number | null;\n /** End-to-end latency in milliseconds. */\n latencyMs: number;\n /** Whether the response was served from cache. */\n cacheHit: boolean;\n /** Estimated cost in USD. */\n costUsd: number;\n /** Reason the model stopped: 'stop' | 'length' | 'tool_calls' | 'error'. */\n finishReason?: string | null;\n /** Routing rule that selected the provider. */\n routingRule?: string | null;\n /** Policy decisions evaluated for this call. */\n policyDecisions?: TracePolicyDecision[] | null;\n /** PII/DLP violations detected for this call. */\n securityViolations?: TraceSecurityViolation[] | null;\n /** SHA-256 of the canonicalized request (cache key). */\n requestHash?: string | null;\n /** Linked evolution episode identifier. */\n episodeId?: string | null;\n /** ISO 8601 UTC timestamp of the LLM call. */\n ts: string;\n}\n\n/** Query parameters for listing traces. */\nexport interface TraceQueryOptions {\n /** Filter by model (e.g. 'anthropic/claude-opus-4-7'). */\n model?: string;\n /** Filter by provider (e.g. 'anthropic', 'openai'). */\n provider?: string;\n /** Filter by spanKind (e.g. 'chat', 'embedding'). */\n spanKind?: string;\n /** Filter by appId. */\n appId?: string;\n /** Filter by userId. */\n userId?: string;\n /** ISO 8601 start of time range. */\n from?: string;\n /** ISO 8601 end of time range. */\n to?: string;\n limit?: number;\n cursor?: string;\n}\n\n/** Paginated response for trace queries. */\nexport interface TracePage {\n items: Trace[];\n nextCursor?: string;\n}\n\n// ─── TracesClient ─────────────────────────────────────────────────────────────\n\n/** Provides read access to the LLM/AI call trace history for the tenant. */\nexport class TracesClient {\n constructor(private http: HttpClient) {}\n\n /** List traces with optional filters. */\n async list(opts?: TraceQueryOptions, requestOpts?: RequestOptions): Promise<TracePage> {\n const parts: string[] = [];\n if (opts?.model) parts.push(`model=${encodeURIComponent(opts.model)}`);\n if (opts?.provider) parts.push(`provider=${encodeURIComponent(opts.provider)}`);\n if (opts?.spanKind) parts.push(`spanKind=${encodeURIComponent(opts.spanKind)}`);\n if (opts?.appId) parts.push(`appId=${encodeURIComponent(opts.appId)}`);\n if (opts?.userId) parts.push(`userId=${encodeURIComponent(opts.userId)}`);\n if (opts?.from) parts.push(`from=${encodeURIComponent(opts.from)}`);\n if (opts?.to) parts.push(`to=${encodeURIComponent(opts.to)}`);\n if (opts?.limit != null) parts.push(`limit=${opts.limit}`);\n if (opts?.cursor) parts.push(`cursor=${encodeURIComponent(opts.cursor)}`);\n const qs = parts.length > 0 ? `?${parts.join('&')}` : '';\n return this.http.get<TracePage>(`/api/v1/telemetry/traces${qs}`, requestOpts);\n }\n\n /** Get a single trace by ID. */\n async get(id: string, requestOpts?: RequestOptions): Promise<Trace> {\n return this.http.get<Trace>(`/api/v1/telemetry/traces/${id}`, requestOpts);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\n\n// ─── App Events types ─────────────────────────────────────────────────────────\n\n/** Geo-location derived from source IP. */\nexport interface AppEventGeo {\n country?: string | null;\n region?: string | null;\n city?: string | null;\n}\n\n/** Device info parsed from User-Agent. */\nexport interface AppEventDevice {\n type?: string | null;\n os?: string | null;\n browser?: string | null;\n}\n\n/** A recorded application analytics event. Schema: data-model/schemas/app-event.schema.json */\nexport interface AppEvent {\n /** 'evt-' prefixed globally unique ID. */\n id: string;\n /** Owning tenant identifier. */\n tenantId: string;\n /** Initiating user. Null for anonymous events. */\n userId?: string | null;\n /** Browser or client session identifier. */\n sessionId?: string | null;\n /** Source application slug. */\n appId: string;\n /** Event name (e.g. 'page_view', 'record_create', 'rfp_response_approved'). */\n eventType: string;\n /** Broad category: 'navigation' | 'interaction' | 'mutation' | 'business_event'. */\n eventCategory?: 'navigation' | 'interaction' | 'mutation' | 'business_event' | null;\n /** EDM entity type of the target entity, if applicable. */\n entityType?: string | null;\n /** Target entity identifier, if applicable. */\n entityId?: string | null;\n /** Free-form event-specific properties. */\n properties?: Record<string, unknown> | null;\n /** URL where the event occurred. */\n pageUrl?: string | null;\n /** Referrer URL. */\n referrerUrl?: string | null;\n /** User-Agent of the originating client. */\n userAgent?: string | null;\n /** Source IP, truncated or anonymised per policy. */\n ip?: string | null;\n /** Geo-location derived from source IP. */\n geo?: AppEventGeo | null;\n /** Device info parsed from User-Agent. */\n device?: AppEventDevice | null;\n /** ISO 8601 UTC timestamp of the event. */\n ts: string;\n}\n\n/** Options for emitting an app event. */\nexport interface AppEventEmitOptions {\n userId?: string;\n sessionId?: string;\n}\n\n/** Query parameters for listing app events. */\nexport interface AppEventQueryOptions {\n /** Filter by eventType (e.g. 'page_view', 'rfp_response_approved'). */\n eventType?: string;\n /** Filter by userId. */\n userId?: string;\n /** Filter by appId. */\n appId?: string;\n /** ISO 8601 start of time range. */\n from?: string;\n /** ISO 8601 end of time range. */\n to?: string;\n limit?: number;\n cursor?: string;\n}\n\n/** Paginated response for app event queries. */\nexport interface AppEventPage {\n items: AppEvent[];\n nextCursor?: string;\n}\n\n// ─── AppEventsClient ──────────────────────────────────────────────────────────\n\n/** Provides operations for emitting and querying custom application analytics events. */\nexport class AppEventsClient {\n constructor(private http: HttpClient) {}\n\n /** Emit a named analytics event with optional properties. */\n async emit(\n name: string,\n properties?: Record<string, unknown>,\n opts?: AppEventEmitOptions,\n requestOpts?: RequestOptions\n ): Promise<AppEvent> {\n return this.http.post<AppEvent>(\n '/api/v1/telemetry/events',\n { name, properties, ...opts },\n requestOpts\n );\n }\n\n /** Query app events with optional filters. */\n async query(\n opts?: AppEventQueryOptions,\n requestOpts?: RequestOptions\n ): Promise<AppEventPage> {\n const parts: string[] = [];\n if (opts?.eventType) parts.push(`eventType=${encodeURIComponent(opts.eventType)}`);\n if (opts?.userId) parts.push(`userId=${encodeURIComponent(opts.userId)}`);\n if (opts?.appId) parts.push(`appId=${encodeURIComponent(opts.appId)}`);\n if (opts?.from) parts.push(`from=${encodeURIComponent(opts.from)}`);\n if (opts?.to) parts.push(`to=${encodeURIComponent(opts.to)}`);\n if (opts?.limit != null) parts.push(`limit=${opts.limit}`);\n if (opts?.cursor) parts.push(`cursor=${encodeURIComponent(opts.cursor)}`);\n const qs = parts.length > 0 ? `?${parts.join('&')}` : '';\n return this.http.get<AppEventPage>(`/api/v1/telemetry/events${qs}`, requestOpts);\n }\n\n /** Get a single app event by ID. */\n async get(id: string, requestOpts?: RequestOptions): Promise<AppEvent> {\n return this.http.get<AppEvent>(`/api/v1/telemetry/events/${id}`, requestOpts);\n }\n}\n","import { HttpClient } from '../http/client.js';\nimport { AuditClient } from './audit.js';\nimport { TracesClient } from './traces.js';\nimport { AppEventsClient } from './events.js';\n\nexport { AuditClient } from './audit.js';\nexport type {\n AuditEmitOptions,\n AuditEvent,\n AuditQueryOptions,\n AuditEventPage,\n} from './audit.js';\n\nexport { TracesClient } from './traces.js';\nexport type {\n Trace,\n TracePolicyDecision,\n TraceSecurityViolation,\n TraceQueryOptions,\n TracePage,\n} from './traces.js';\n\nexport { AppEventsClient } from './events.js';\nexport type {\n AppEvent,\n AppEventGeo,\n AppEventDevice,\n AppEventEmitOptions,\n AppEventQueryOptions,\n AppEventPage,\n} from './events.js';\n\n/**\n * Top-level telemetry namespace exposed as `client.telemetry`.\n *\n * - `.audit` — emit and query audit events (custom + auto-instrumented)\n * - `.traces` — read LLM/AI call trace history\n * - `.events` — emit and query custom analytics events\n */\nexport class TelemetryClient {\n /** Audit event emission and querying. */\n readonly audit: AuditClient;\n /** LLM/AI call trace history. */\n readonly traces: TracesClient;\n /** Custom application analytics events. */\n readonly events: AppEventsClient;\n\n constructor(http: HttpClient) {\n this.audit = new AuditClient(http);\n this.traces = new TracesClient(http);\n this.events = new AppEventsClient(http);\n }\n}\n","import { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type { EvaluateFlagInput, FlagValue } from './types.js';\n\n/** Provides feature-flag evaluation against the platform flag service. */\nexport class FlagsService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Evaluate a feature flag, optionally with an evaluation context. */\n async evaluate(\n input: EvaluateFlagInput,\n requestOpts?: RequestOptions\n ): Promise<FlagValue> {\n return this.http.post<FlagValue>(PATHS.flagsEvaluate, input, requestOpts);\n }\n}\n","import { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type { ResolveSecretsInput, ResolvedSecrets } from './types.js';\n\n/** Provides secure secret resolution from the platform vault. */\nexport class SecretsService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Resolve one or more secrets by key name. */\n async resolve(\n input: ResolveSecretsInput,\n requestOpts?: RequestOptions\n ): Promise<ResolvedSecrets> {\n return this.http.post<ResolvedSecrets>(PATHS.secretsResolve, input, requestOpts);\n }\n}\n","import type { HttpClient } from \"../http/client.js\";\nimport type { RequestOptions } from \"../types/index.js\";\nimport type { Organization } from \"./types.js\";\n\n// Re-export for consumers importing from this module\nexport type { Organization } from \"./types.js\";\n\n/**\n * Provides access to the current organization context for multi-tenant apps.\n *\n * The SDK is automatically scoped to the organization encoded in your JWT —\n * you never need to pass an org ID. All SDK calls (sdk.people, sdk.storage, etc.)\n * are already isolated to your organization.\n *\n * @example\n * ```typescript\n * const org = await client.organizations.getCurrent()\n * console.log(org.id, org.name, org.plan)\n * ```\n */\nexport class OrganizationService {\n constructor(private http: HttpClient) {}\n\n /**\n * Returns the organization context for the current JWT — no params needed.\n */\n async getCurrent(requestOpts?: RequestOptions): Promise<Organization> {\n return this.http.get<Organization>('/api/v1/organizations/current', requestOpts)\n }\n\n /**\n * Update current org settings — admin scope required.\n */\n async update(data: Partial<Pick<Organization, 'name' | 'settings'>>, requestOpts?: RequestOptions): Promise<Organization> {\n return this.http.patch<Organization>('/api/v1/organizations/current', data, requestOpts)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from \"../http/client.js\";\nimport type { ApiResponse, RequestOptions } from \"../types/index.js\";\nimport type {\n Pod,\n CreatePodInput,\n UpdatePodInput,\n ListPodsOptions,\n StartPodOptions,\n} from \"./types.js\";\n\n/**\n * Provides CRUD and lifecycle operations for cPod Pod resources.\n *\n * @example\n * ```typescript\n * // Create a Pod in a Workspace\n * const pod = await client.pods.create({\n * workspaceId: \"c3d4e5f6-...\",\n * name: \"api-server-primary\",\n * spec: {\n * image: \"docker.io/acme/api:v3.2.1\",\n * cpu: \"1000m\",\n * memory: \"2Gi\",\n * replicas: 3,\n * },\n * });\n *\n * // List running pods in a workspace\n * const { data: pods } = await client.pods.list({\n * workspaceId: \"c3d4e5f6-...\",\n * status: \"running\",\n * });\n * ```\n */\nexport class PodService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /**\n * List Pods, optionally filtered by Workspace, Organization, status, or label.\n */\n async list(\n opts: ListPodsOptions = {},\n requestOpts?: RequestOptions\n ): Promise<ApiResponse<Pod[]>> {\n const params = new URLSearchParams();\n if (opts.limit !== undefined) params.set(\"limit\", String(opts.limit));\n if (opts.offset !== undefined) params.set(\"offset\", String(opts.offset));\n if (opts.workspaceId !== undefined)\n params.set(\"workspaceId\", opts.workspaceId);\n if (opts.organizationId !== undefined)\n params.set(\"organizationId\", opts.organizationId);\n if (opts.status !== undefined) params.set(\"status\", opts.status);\n if (opts.label !== undefined) params.set(\"label\", opts.label);\n\n const qs = params.toString();\n return this.http.get<ApiResponse<Pod[]>>(\n `/api/v1/pods${qs ? `?${qs}` : \"\"}`,\n requestOpts\n );\n }\n\n /**\n * Retrieve a single Pod by UUID.\n */\n async get(id: string, requestOpts?: RequestOptions): Promise<Pod> {\n if (!id) throw new Error(\"Pod ID is required.\");\n return this.http.get<Pod>(\n buildPath(PATHS.podsByPodId, encodeURIComponent(id)),\n requestOpts\n );\n }\n\n /**\n * Create a new Pod in the specified Workspace.\n */\n async create(input: CreatePodInput, requestOpts?: RequestOptions): Promise<Pod> {\n return this.http.post<Pod>(PATHS.pods, input, requestOpts);\n }\n\n /**\n * Update an existing Pod's spec, labels, or annotations.\n * Changes to spec.image, spec.cpu, or spec.memory trigger a rolling restart.\n * Changes to spec.replicas are applied immediately.\n */\n async update(\n id: string,\n input: UpdatePodInput,\n requestOpts?: RequestOptions\n ): Promise<Pod> {\n if (!id) throw new Error(\"Pod ID is required.\");\n return this.http.patch<Pod>(\n buildPath(PATHS.podsByPodId, encodeURIComponent(id)),\n input,\n requestOpts\n );\n }\n\n /**\n * Start a stopped Pod. Transitions the Pod from 'stopped' to 'provisioning'.\n */\n async start(\n id: string,\n opts: StartPodOptions = {},\n requestOpts?: RequestOptions\n ): Promise<Pod> {\n if (!id) throw new Error(\"Pod ID is required.\");\n return this.http.post<Pod>(\n buildPath(PATHS.podsByPodIdStart, encodeURIComponent(id)),\n opts,\n requestOpts\n );\n }\n\n /**\n * Gracefully stop a running Pod. Transitions to 'stopping' then 'stopped'.\n * Resources are retained; the Pod can be restarted.\n */\n async stop(id: string, requestOpts?: RequestOptions): Promise<Pod> {\n if (!id) throw new Error(\"Pod ID is required.\");\n return this.http.post<Pod>(\n buildPath(PATHS.podsByPodIdStop, encodeURIComponent(id)),\n {},\n requestOpts\n );\n }\n\n /**\n * Permanently delete a Pod. Releases all compute resources.\n * The Pod must be in 'stopped' or 'failed' status before deletion.\n */\n async delete(id: string, requestOpts?: RequestOptions): Promise<void> {\n if (!id) throw new Error(\"Pod ID is required.\");\n return this.http.delete<void>(\n buildPath(PATHS.podsByPodId, encodeURIComponent(id)),\n requestOpts\n );\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Credentials — thin HTTP client over cpod-backend (`/api/v1/credentials/*`).\n// Backend mints the secret server-side and returns the raw value ONCE in\n// the create response; we never see it again.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport interface CredentialCreateResponse {\n id: string\n name: string\n /** Raw secret — returned ONCE on create, never again. Store it immediately. */\n secret: string\n key_prefix: string\n secret_fingerprint: string\n [k: string]: unknown\n}\n\nexport class CredentialService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Credentials.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a Credential by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Credential. Raw secret returned ONCE.', params: [\n { name: 'name', type: 'string', required: true, description: 'Human-readable label for this credential.' },\n { name: 'type', type: 'string', description: 'Credential classification: api_key | service_account | webhook_token | virtual_llm (default api_key).' },\n { name: 'description', type: 'string', description: 'Free-text description of the credential.' },\n { name: 'status', type: 'string', description: 'Lifecycle state: active | revoked | expired (default active).' },\n { name: 'scopes', type: 'object', description: 'Permission scopes granted, e.g. [\"edm:read\",\"edm:write\"].' },\n { name: 'issued_to_user_id', type: 'string', description: 'User this credential was issued to, if type=user.' },\n { name: 'issued_to_service', type: 'string', description: 'Service this credential was issued to, if type=service.' },\n { name: 'allowed_models', type: 'object', description: 'Allowlist of model identifiers for type=virtual_llm.' },\n { name: 'tpm_limit', type: 'number', description: 'Tokens-per-minute rate limit.' },\n { name: 'rpm_limit', type: 'number', description: 'Requests-per-minute rate limit.' },\n { name: 'max_budget_usd', type: 'number', description: 'Maximum spend cap in USD.' },\n { name: 'expires_at', type: 'string', description: 'Expiry timestamp; omit for non-expiring credentials.' },\n { name: 'tags', type: 'object', description: 'Free-form tags, e.g. [\"integration\",\"copilot\"].' },\n ] },\n update: { description: 'Patch metadata (does NOT rotate the secret).', params: [ID_PARAM] },\n revoke: { description: 'Set status=revoked.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.credentials) }\n\n override create(body: Record<string, unknown>) {\n // Backend returns the raw secret only on this call.\n return this.http.post<CredentialCreateResponse>(PATHS.credentials, body)\n }\n\n revoke(id: string) {\n return this.http.post<Record<string, unknown>>(buildPath(PATHS.credentialsByCredentialIdRevoke, id))\n }\n}\n","import type { HttpClient } from \"../http/client.js\";\nimport type { ApiResponse, RequestOptions } from \"../types/index.js\";\nimport type {\n CpodEvent,\n EventFilter,\n EventHandler,\n EventHistoryOptions,\n SubscribeOptions,\n Subscription,\n} from \"./types.js\";\n\n/**\n * Manages event subscriptions and history for cPod resources.\n *\n * Subscriptions use a poll-based EventEmitter-like pattern over the REST API.\n * For real-time SSE, the server must expose a `/api/v1/events/stream` endpoint.\n *\n * @example\n * ```typescript\n * const sub = client.events.subscribe(\n * { organizationId: \"b2c3d4e5-...\", types: [\"pod.failed\"] },\n * (event) => {\n * console.log(\"Pod failed:\", event.resourceId, event.payload);\n * }\n * );\n *\n * // Later, stop receiving events:\n * sub.unsubscribe();\n * ```\n */\nexport class EventService {\n private readonly http: HttpClient;\n private readonly listeners: Map<\n symbol,\n { filter: EventFilter; handler: EventHandler }\n > = new Map();\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /**\n * Subscribe to events matching the given filter.\n * The handler is called for each matching event received.\n *\n * Returns a Subscription handle — call `.unsubscribe()` to stop.\n */\n subscribe(\n filter: EventFilter,\n handler: EventHandler,\n _opts: SubscribeOptions = {}\n ): Subscription {\n const key = Symbol(\"subscription\");\n this.listeners.set(key, { filter, handler });\n\n return {\n unsubscribe: () => {\n this.listeners.delete(key);\n },\n };\n }\n\n /**\n * Dispatch a raw event object to all matching subscribers.\n * Typically called internally when processing SSE or webhook payloads.\n */\n dispatch(event: CpodEvent): void {\n for (const { filter, handler } of this.listeners.values()) {\n if (this.matchesFilter(event, filter)) {\n try {\n handler(event);\n } catch {\n // Individual handler errors must not interrupt other handlers.\n }\n }\n }\n }\n\n /**\n * Retrieve historical events from the API.\n */\n async getHistory(\n opts: EventHistoryOptions = {},\n requestOpts?: RequestOptions\n ): Promise<ApiResponse<CpodEvent[]>> {\n const params = new URLSearchParams();\n if (opts.limit !== undefined) params.set(\"limit\", String(opts.limit));\n if (opts.offset !== undefined) params.set(\"offset\", String(opts.offset));\n if (opts.organizationId !== undefined)\n params.set(\"organizationId\", opts.organizationId);\n if (opts.workspaceId !== undefined)\n params.set(\"workspaceId\", opts.workspaceId);\n if (opts.resourceType !== undefined)\n params.set(\"resourceType\", opts.resourceType);\n if (opts.resourceId !== undefined)\n params.set(\"resourceId\", opts.resourceId);\n if (opts.since !== undefined) params.set(\"since\", opts.since);\n if (opts.until !== undefined) params.set(\"until\", opts.until);\n if (opts.types && opts.types.length > 0) {\n params.set(\"types\", opts.types.join(\",\"));\n }\n\n const qs = params.toString();\n return this.http.get<ApiResponse<CpodEvent[]>>(\n `/api/v1/events${qs ? `?${qs}` : \"\"}`,\n requestOpts\n );\n }\n\n private matchesFilter(event: CpodEvent, filter: EventFilter): boolean {\n if (\n filter.organizationId &&\n event.organizationId !== filter.organizationId\n )\n return false;\n if (filter.workspaceId && event.workspaceId !== filter.workspaceId)\n return false;\n if (filter.resourceType && event.resourceType !== filter.resourceType)\n return false;\n if (filter.resourceId && event.resourceId !== filter.resourceId)\n return false;\n if (filter.types && filter.types.length > 0) {\n if (!filter.types.includes(event.type)) return false;\n }\n return true;\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from \"../http/client.js\";\nimport type { ApiResponse, RequestOptions } from \"../types/index.js\";\nimport type {\n UserProfile,\n UpdateUserProfileInput,\n UpdateUserMembershipInput,\n ListMembersOptions,\n} from \"./types.js\";\n\n/**\n * Provides operations for managing UserProfile resources.\n *\n * Includes fetching the authenticated user's own profile, listing Organization\n * members, and updating profile data or membership roles.\n *\n * @example\n * ```typescript\n * // Get the authenticated user's profile\n * const me = await client.userProfiles.me();\n * console.log(me.displayName, me.role);\n *\n * // List members of an organization\n * const { data: members } = await client.userProfiles.listMembers(\n * \"b2c3d4e5-f6a7-8901-bcde-f12345678901\",\n * { role: \"admin\" }\n * );\n * ```\n */\nexport class UserProfileService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /**\n * Retrieve the UserProfile of the currently authenticated user.\n * Equivalent to GET /v1/users/me.\n */\n async me(requestOpts?: RequestOptions): Promise<UserProfile> {\n return this.http.get<UserProfile>(PATHS.usersMe, requestOpts);\n }\n\n /**\n * Retrieve a UserProfile by UUID.\n * Requires the caller to be a member of an Organization that includes this user.\n */\n async get(id: string, requestOpts?: RequestOptions): Promise<UserProfile> {\n if (!id) throw new Error(\"UserProfile ID is required.\");\n return this.http.get<UserProfile>(\n buildPath(PATHS.usersByUserId, encodeURIComponent(id)),\n requestOpts\n );\n }\n\n /**\n * Update the authenticated user's own profile fields.\n * Users may only update their own profile; admins may update any member's profile.\n */\n async update(\n id: string,\n input: UpdateUserProfileInput,\n requestOpts?: RequestOptions\n ): Promise<UserProfile> {\n if (!id) throw new Error(\"UserProfile ID is required.\");\n return this.http.patch<UserProfile>(\n buildPath(PATHS.usersByUserId, encodeURIComponent(id)),\n input,\n requestOpts\n );\n }\n\n /**\n * List members of an Organization with optional role and status filters.\n */\n async listMembers(\n organizationId: string,\n opts: ListMembersOptions = {},\n requestOpts?: RequestOptions\n ): Promise<ApiResponse<UserProfile[]>> {\n if (!organizationId) throw new Error(\"Organization ID is required.\");\n\n const params = new URLSearchParams();\n if (opts.limit !== undefined) params.set(\"limit\", String(opts.limit));\n if (opts.offset !== undefined) params.set(\"offset\", String(opts.offset));\n if (opts.role !== undefined) params.set(\"role\", opts.role);\n if (opts.status !== undefined) params.set(\"status\", opts.status);\n\n const qs = params.toString();\n return this.http.get<ApiResponse<UserProfile[]>>(\n `/api/v1/organizations/${encodeURIComponent(organizationId)}/members${qs ? `?${qs}` : \"\"}`,\n requestOpts\n );\n }\n\n /**\n * Update a member's role or status within an Organization.\n * Requires 'admin' or 'owner' role in the Organization.\n */\n async updateMembership(\n organizationId: string,\n userId: string,\n input: UpdateUserMembershipInput,\n requestOpts?: RequestOptions\n ): Promise<UserProfile> {\n if (!organizationId) throw new Error(\"Organization ID is required.\");\n if (!userId) throw new Error(\"UserProfile ID is required.\");\n return this.http.patch<UserProfile>(\n `/api/v1/organizations/${encodeURIComponent(organizationId)}/members/${encodeURIComponent(userId)}`,\n input,\n requestOpts\n );\n }\n\n /**\n * Remove a member from an Organization.\n * Requires 'admin' or 'owner' role. Owners cannot remove themselves.\n */\n async removeMember(\n organizationId: string,\n userId: string,\n requestOpts?: RequestOptions\n ): Promise<void> {\n if (!organizationId) throw new Error(\"Organization ID is required.\");\n if (!userId) throw new Error(\"UserProfile ID is required.\");\n return this.http.delete<void>(\n `/api/v1/organizations/${encodeURIComponent(organizationId)}/members/${encodeURIComponent(userId)}`,\n requestOpts\n );\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type { RequestOptions } from '../types/index.js'\nimport type { McpTool, RegisteredMcpTool, McpProxyInfo, McpToolDefinition, McpServerConfig } from './types.js'\n\n/**\n * **MCP tool registration & proxy** — lets LLM agents call your app's REST\n * endpoints as typed tools through a single audited gateway.\n *\n * ### When to use `client.mcp.*`\n *\n * Use this service when your application exposes functionality that an\n * **LLM or AI agent** should invoke through the Model Context Protocol:\n *\n * | Call | Purpose |\n * |------|---------|\n * | `mcp.register(tools)` | Register one or more tools for the calling app. Each tool maps a name to a REST endpoint + JSON schema. |\n * | `mcp.list()` | List all tools registered for this app. |\n * | `mcp.unregister(name)` | Remove a tool by name. |\n * | `mcp.call(name, args)` | Invoke a tool through the tenant-scoped proxy (`POST /api/v1/mcp/call`). Every call is audited. |\n * | `mcp.proxyInfo()` | Get the proxy URL and all registered tools for this app. |\n * | `mcp.toMcpServer(tools)` | Build an MCP-compatible server descriptor for `@modelcontextprotocol/sdk`. |\n *\n * ### Prerequisites\n *\n * 1. Register an app via {@link AppsService.register} to obtain an `app_id`.\n * 2. Pass the `app_id` to `CpodClient` via `config.appId` or `CPOD_APP_ID`.\n *\n * ### How this relates to AppsService and RegistryService\n *\n * - **AppsService** (`client.apps`) — registers the *app identity* and mints\n * the `app_id` that McpService needs. Apps also has low-level `registerTools`\n * / `listTools`, but those are deprecated in favor of this service.\n * - **McpService** (this class) — the *LLM-facing* tool layer. You declare\n * which REST endpoints your app exposes, and agents call them by name via\n * the MCP protocol. Tools are scoped to a single app.\n * - **RegistryService** (`client.registry`) — *dynamic, cross-app* capability\n * discovery. Apps register a manifest at boot; consumers `discover()` and\n * `call()` tools without knowing the owning app. Use when you need\n * service-mesh-style routing rather than a fixed tool list.\n *\n * ### Validation\n *\n * Tool definitions can be pre-validated with {@link validateMcpTool} before\n * calling `register()`. Validation is opt-in — the SDK does not enforce it\n * on the register path, so existing code keeps working.\n *\n * @see {@link AppsService} — app identity & registration.\n * @see {@link RegistryService} — dynamic cross-app tool registry.\n * @see {@link validateMcpTool} — client-side validation for McpTool definitions.\n *\n * @example\n * ```typescript\n * const client = CpodClient.fromEnv(); // needs CPOD_APP_ID\n *\n * // Register tools on startup\n * await client.mcp.register([{\n * name: 'get_customer',\n * description: 'Fetch a customer by ID',\n * endpoint: '/v1/customers/{id}',\n * method: 'GET',\n * inputSchema: {\n * type: 'object',\n * properties: { id: { type: 'string' } },\n * required: ['id'],\n * },\n * }]);\n *\n * // Later, an agent invokes the tool:\n * const result = await client.mcp.call('get_customer', { id: 'cust_123' });\n * ```\n */\nexport class McpService {\n private readonly http: HttpClient\n private readonly appId: string\n\n /**\n * @param http Authenticated HTTP client.\n * @param appId App ID obtained from POST /api/v1/apps/register.\n * All tool management calls are scoped to this app.\n */\n constructor(http: HttpClient, appId: string) {\n this.http = http\n this.appId = appId\n }\n\n /** Register one or more tools with cpod-backend's MCP proxy. */\n async register(tools: McpTool[], opts?: RequestOptions): Promise<RegisteredMcpTool[]> {\n return this.http.post<RegisteredMcpTool[]>(buildPath(PATHS.appsByAppIdMcpTools, this.appId), { tools }, opts)\n }\n\n /** List all tools registered for this app. */\n async list(opts?: RequestOptions): Promise<RegisteredMcpTool[]> {\n return this.http.get<RegisteredMcpTool[]>(buildPath(PATHS.appsByAppIdMcpTools, this.appId), opts)\n }\n\n /** Delete a registered tool by name. */\n async unregister(toolName: string, opts?: RequestOptions): Promise<void> {\n return this.http.delete(buildPath(PATHS.appsByAppIdMcpToolsByName, this.appId, toolName), opts)\n }\n\n /** Get proxy info — the URL and all registered tools for this app. */\n async proxyInfo(opts?: RequestOptions): Promise<McpProxyInfo> {\n return this.http.get<McpProxyInfo>(buildPath(PATHS.appsByAppIdMcpProxy, this.appId), opts)\n }\n\n /**\n * Invoke a tool through cpod-backend's tenant-scoped proxy.\n * Every call is audited; the backend resolves path params and forwards\n * the request to the registered REST endpoint.\n */\n async call(\n toolName: string,\n args: Record<string, unknown>,\n opts?: RequestOptions\n ): Promise<{ content: Array<{ type: 'text'; text: string }> }> {\n const result = await this.http.post<unknown>(\n PATHS.mcpCall,\n { tool: toolName, arguments: args, appId: this.appId },\n opts\n )\n return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] }\n }\n\n /**\n * Returns an MCP-compatible server descriptor that wraps this app's\n * registered tools. Pass this to @modelcontextprotocol/sdk Server or\n * any MCP transport.\n *\n * The returned object implements the minimal MCP server contract:\n * - `tools()` → array of MCP tool definitions\n * - `call(name, args)` → proxied through cpod-backend\n */\n toMcpServer(\n tools: McpTool[],\n config: McpServerConfig = { name: 'cpod-app', version: '1.0.0' }\n ): {\n name: string\n version: string\n tools(): McpToolDefinition[]\n call(name: string, args: Record<string, unknown>): Promise<{ content: Array<{ type: 'text'; text: string }> }>\n } {\n const toolMap = new Map(tools.map(t => [t.name, t]))\n\n return {\n name: config.name,\n version: config.version,\n\n tools(): McpToolDefinition[] {\n return tools.map(t => ({\n name: t.name,\n description: t.description,\n inputSchema: t.inputSchema,\n }))\n },\n\n call: async (name: string, args: Record<string, unknown>) => {\n if (!toolMap.has(name)) throw new Error(`Unknown MCP tool: ${name}`)\n return this.call(name, args)\n },\n }\n }\n\n /**\n * Tools sub-namespace — provides `client.mcp.tools.list()` and\n * `client.mcp.tools.call()` as ergonomic aliases for the flat methods.\n *\n * - `tools.list()` → same as `mcp.list()` → GET /api/v1/apps/{appId}/mcp/tools\n * - `tools.call(name, args)` → same as `mcp.call()` → POST /api/v1/mcp/call\n *\n * @example\n * ```typescript\n * const tools = await client.mcp.tools.list();\n * const result = await client.mcp.tools.call('get_customer', { id: 'cust_123' });\n * ```\n */\n get tools() {\n return {\n /** List all tools registered for this app. Alias for `mcp.list()`. */\n list: (opts?: RequestOptions) => this.list(opts),\n /** Invoke a tool through the tenant-scoped proxy. Alias for `mcp.call()`. */\n call: (toolName: string, args: Record<string, unknown>, opts?: RequestOptions) =>\n this.call(toolName, args, opts),\n }\n }\n}\n","// MCP method manifest — co-located metadata for auto-deriving MCP tools\n// from the SDK surface.\n//\n// Each SDK service class exposes a static `MCP_MANIFEST` describing its\n// callable methods. The client walks every service and emits a flat list\n// of MCP-compatible `McpToolDefinition` objects — adding a new SDK method\n// (and an entry in its manifest) automatically produces a registerable\n// MCP tool with no separate \"MCP layer\" file to keep in sync.\n\nimport type { McpToolDefinition, McpToolInputSchema } from './types.js'\n\n/** Lightweight per-parameter spec (a JSON-Schema subset). */\nexport interface McpParamSpec {\n /** Parameter name. */\n name: string\n /** Param type for JSON-Schema. */\n type: 'string' | 'number' | 'boolean' | 'object' | 'array'\n /** Whether this parameter is required. */\n required?: boolean\n /** Human-readable description for the LLM. */\n description?: string\n /** Optional enum constraint. */\n enum?: string[]\n}\n\n/** Per-method metadata: description + parameter spec. */\nexport interface McpMethodSpec {\n description: string\n params: McpParamSpec[]\n}\n\n/**\n * A service's MCP manifest — one entry per callable method.\n * Keys here become MCP tool names suffixed onto the service's domain\n * (e.g. `{ list: ... }` on PeopleService → tool name `people.list`).\n */\nexport type McpServiceManifest = Record<string, McpMethodSpec>\n\n/** A service that exposes a manifest. */\nexport interface ServiceManifestEntry {\n /** Domain slug used as the MCP tool name prefix (\"people\", \"technology\"). */\n domain: string\n /** The service's static manifest. */\n manifest: McpServiceManifest\n}\n\n/**\n * Convert a single service's manifest into an array of MCP tool defs.\n */\nexport function manifestToTools(entry: ServiceManifestEntry): McpToolDefinition[] {\n const out: McpToolDefinition[] = []\n for (const [method, spec] of Object.entries(entry.manifest)) {\n const properties: McpToolInputSchema['properties'] = {}\n const required: string[] = []\n for (const p of spec.params) {\n properties[p.name] = {\n type: p.type,\n ...(p.description ? { description: p.description } : {}),\n ...(p.enum ? { enum: p.enum } : {}),\n }\n if (p.required) required.push(p.name)\n }\n out.push({\n name: `${entry.domain}.${method}`,\n description: spec.description,\n inputSchema: {\n type: 'object',\n properties,\n ...(required.length ? { required } : {}),\n },\n })\n }\n return out\n}\n\n/**\n * Aggregate every service's manifest into one flat list — the source\n * of truth that an MCP server registers with its host.\n */\nexport function manifestsToTools(entries: ServiceManifestEntry[]): McpToolDefinition[] {\n return entries.flatMap(manifestToTools)\n}\n","import { PATHS } from '../_generated/paths.js';\n// Contracts — thin HTTP client over cpod-backend (`/api/v1/contracts/*`).\n// Backend component lives in ``app/edms/contracts/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class VendorService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Vendor', [\n { name: 'name', type: 'string', required: true, description: 'Canonical machine-friendly vendor name.' },\n { name: 'display_name', type: 'string', description: 'Human-readable display name shown in the UI.' },\n { name: 'website', type: 'string' },\n { name: 'risk_rating', type: 'string', description: 'low | medium | high | critical (default medium).' },\n { name: 'payment_terms_days', type: 'number', description: 'Standard payment terms (e.g. net-30).' },\n { name: 'account_manager_name', type: 'string' },\n { name: 'account_manager_email', type: 'string' },\n { name: 'strategic_tier', type: 'string', description: 'preferred | approved | standard | restricted (default standard).' },\n { name: 'status', type: 'string', description: 'active | inactive | under_review (default active).' },\n { name: 'notes', type: 'string' },\n { name: 'tags', type: 'object', description: 'Array of free-text tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.contractsVendors) }\n}\n\nexport class ContractService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Contract', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable contract name.' },\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor that is party to this contract.' },\n { name: 'owner_id', type: 'string', description: 'Internal owner accountable for this contract.' },\n { name: 'type', type: 'string', description: 'msa | sow | nda | saas_subscription | ela | employment | other (default other).' },\n { name: 'status', type: 'string', description: 'draft | executed | active | expired | terminated | cancelled (default draft).' },\n { name: 'signed_date', type: 'string' },\n { name: 'effective_date', type: 'string' },\n { name: 'expiry_date', type: 'string' },\n { name: 'notice_period_days', type: 'number', description: 'Days notice required to terminate before expiry.' },\n { name: 'auto_renewal_window_days', type: 'number', description: 'Auto-renews unless cancelled this many days before expiry.' },\n { name: 'value', type: 'number', description: 'Total contract value (TCV).' },\n { name: 'currency', type: 'string', description: 'ISO 4217 code (default USD).' },\n { name: 'linked_license_ids', type: 'object', description: 'SoftwareLicense ids governed by this contract.' },\n { name: 'document_ref', type: 'string', description: 'MinIO object path to the stored contract document.' },\n { name: 'notes', type: 'string' },\n { name: 'tags', type: 'object', description: 'Array of free-text tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.contractsContracts) }\n}\n\nexport class ContractObligationService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Contract Obligation', [\n { name: 'contract_id', type: 'string', required: true, description: 'The contract this obligation belongs to.' },\n { name: 'title', type: 'string', required: true, description: 'Short descriptive title of the obligation.' },\n { name: 'description', type: 'string' },\n { name: 'due_date', type: 'string' },\n { name: 'owner_person_id', type: 'string', description: 'Internal person responsible for fulfilment.' },\n { name: 'status', type: 'string', description: 'pending | in_progress | completed | overdue | waived (default pending).' },\n { name: 'recurring', type: 'boolean', description: 'Whether this obligation repeats on a schedule (default false).' },\n { name: 'recurrence_interval', type: 'string', description: 'monthly | quarterly | annual (when recurring).' },\n { name: 'notes', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.contractsObligations) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Work & time — thin HTTP client over cpod-backend (`/api/v1/work/*`).\n// Backend component lives in ``app/edms/work/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class TimeEntryService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Time Entry', [\n { name: 'person_id', type: 'string', required: true },\n { name: 'task_id', type: 'string' },\n { name: 'hours', type: 'number', required: true },\n { name: 'date', type: 'string', description: 'ISO-8601.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.workTimeEntries) }\n}\n\nexport class CommentService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Work Comment', [\n { name: 'entity_id', type: 'string', required: true },\n { name: 'entity_type', type: 'string', required: true },\n { name: 'author_id', type: 'string', required: true },\n { name: 'body', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.workComments) }\n}\n\nexport class CapacityService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Capacity', [\n { name: 'person_id', type: 'string', required: true },\n { name: 'period', type: 'string', required: true },\n { name: 'hours', type: 'number', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.workCapacity) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Investments — thin HTTP client over cpod-backend (`/api/v1/investments/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class TechPortfolioService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Portfolio Item', [\n { name: 'name', type: 'string', required: true },\n { name: 'category', type: 'string' },\n { name: 'owner_person_id', type: 'string' },\n { name: 'annual_cost', type: 'number' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.investmentsPortfolio) }\n}\n\nexport class CostCenterService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Cost Center', [\n { name: 'name', type: 'string', required: true },\n { name: 'code', type: 'string' },\n { name: 'owner_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.investmentsCostCenters) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Performance & development — thin HTTP client over cpod-backend.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class PerformanceReviewService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Performance Review', [\n { name: 'person_id', type: 'string', required: true },\n { name: 'reviewer_id', type: 'string', required: true },\n { name: 'period', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.performanceReviews) }\n}\n\nexport class PersonGoalService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Goal', [\n { name: 'person_id', type: 'string', required: true },\n { name: 'title', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.performanceGoals) }\n}\n\nexport class LearningRecordService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Learning Record', [\n { name: 'person_id', type: 'string', required: true },\n { name: 'subject', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.performanceLearningRecords) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// OKR — thin HTTP client over cpod-backend (`/api/v1/okr/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class ObjectiveService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Objective', [\n { name: 'title', type: 'string', required: true },\n { name: 'period', type: 'string' },\n { name: 'owner_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.okrObjectives) }\n}\n\nexport class KeyResultService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Key Result', [\n { name: 'objective_id', type: 'string', required: true },\n { name: 'title', type: 'string', required: true },\n { name: 'metric', type: 'string' },\n { name: 'target', type: 'number' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.okrKeyResults) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Employee experience — thin HTTP client over cpod-backend.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class PersonSkillService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Person Skill', [\n { name: 'person_id', type: 'string', required: true, description: 'Person who holds this skill.' },\n { name: 'skill_name', type: 'string', required: true, description: \"Name of the skill (e.g. 'Kubernetes', 'Python').\" },\n { name: 'category', type: 'string', description: 'technical | soft | language | domain | certification (default technical).' },\n { name: 'proficiency_level', type: 'number', description: 'Proficiency on a 1–5 scale (1 = Beginner, 5 = Expert).' },\n { name: 'source', type: 'string', description: 'self_reported | manager_assessed | certification | assessment (default self_reported).' },\n { name: 'verified_by_id', type: 'string', description: 'Person who verified this skill claim.' },\n { name: 'verified_at', type: 'string', description: 'ISO-8601 datetime.' },\n { name: 'valid_until', type: 'string', description: 'Date after which the record is considered expired.' },\n { name: 'notes', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.employeeSkills) }\n}\n\nexport class CalendarEventService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Calendar Event', [\n { name: 'title', type: 'string', required: true, description: 'Human-readable event title.' },\n { name: 'type', type: 'string', description: 'meeting | ooo | focus_time | leave | external (default meeting; ooo = out of office).' },\n { name: 'organizer_id', type: 'string', description: 'Person who created or owns this event.' },\n { name: 'attendee_ids', type: 'object', description: 'Person ids attending this event.' },\n { name: 'description', type: 'string' },\n { name: 'start', type: 'string', description: 'ISO-8601 datetime.' },\n { name: 'end', type: 'string', description: 'ISO-8601 datetime.' },\n { name: 'is_all_day', type: 'boolean' },\n { name: 'location', type: 'string' },\n { name: 'video_url', type: 'string' },\n { name: 'linked_project_id', type: 'string' },\n { name: 'linked_task_ids', type: 'object', description: 'Linked task ids.' },\n { name: 'status', type: 'string', description: 'confirmed | tentative | cancelled (default confirmed).' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.employeeCalendarEvents) }\n}\n\nexport class LeaveRequestService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Leave Request', [\n { name: 'person_id', type: 'string', required: true, description: 'Person submitting this leave request.' },\n { name: 'type', type: 'string', description: 'annual | sick | parental | public_holiday | unpaid | other (default annual).' },\n { name: 'start_date', type: 'string', required: true, description: 'Date the leave period begins (inclusive).' },\n { name: 'end_date', type: 'string', required: true, description: 'Date the leave period ends (inclusive).' },\n { name: 'status', type: 'string', description: 'pending | approved | rejected | cancelled (default pending).' },\n { name: 'approved_by_id', type: 'string' },\n { name: 'approved_at', type: 'string', description: 'ISO-8601 datetime.' },\n { name: 'notes', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.employeeLeaveRequests) }\n}\n\nexport class MeetingNoteService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Meeting Note', [\n { name: 'title', type: 'string', required: true, description: 'Title for the meeting note document.' },\n { name: 'author_id', type: 'string', description: 'Person who authored these notes.' },\n { name: 'calendar_event_id', type: 'string', description: 'CalendarEvent this note was captured for.' },\n { name: 'attendee_ids', type: 'object', description: 'Persons who attended the meeting.' },\n { name: 'summary', type: 'string', description: 'Markdown-formatted summary of the discussion.' },\n { name: 'decisions', type: 'object', description: 'Decisions made during the meeting.' },\n { name: 'action_items', type: 'object', description: 'Structured action items arising from the meeting.' },\n { name: 'linked_project_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.employeeMeetingNotes) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Projects (EDM) — thin HTTP client over cpod-backend (`/api/v1/edm-projects/*`).\n// Backend component lives in ``app/edms/projects/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nfunction manifest(label: string, create: { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class ProjectService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Project', [\n { name: 'name', type: 'string', required: true },\n { name: 'owner_id', type: 'string' },\n { name: 'status', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.edmProjectsProjects) }\n}\n\nexport class TaskService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Task', [\n { name: 'title', type: 'string', required: true },\n { name: 'project_id', type: 'string' },\n { name: 'assignee_id', type: 'string' },\n { name: 'due_date', type: 'string', description: 'ISO-8601.' },\n { name: 'status', type: 'string', description: 'open | in_progress | done | blocked' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.edmProjectsTasks) }\n}\n\nexport class SprintService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Sprint', [\n { name: 'name', type: 'string', required: true },\n { name: 'starts_at', type: 'string', required: true },\n { name: 'ends_at', type: 'string', required: true },\n { name: 'project_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.edmProjectsSprints) }\n}\n\nexport class FeatureService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Feature', [\n { name: 'name', type: 'string', required: true },\n { name: 'project_id', type: 'string' },\n { name: 'owner_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.edmProjectsFeatures) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// CRM — thin HTTP client over cpod-backend (`/api/v1/crm/*`).\n// Backend component lives in ``app/edms/crm/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class AccountService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Account', [\n { name: 'name', type: 'string', required: true, description: 'Account / company name.' },\n { name: 'owner_id', type: 'string' },\n { name: 'legal_name', type: 'string' },\n { name: 'industry', type: 'string' },\n { name: 'website', type: 'string' },\n { name: 'domain', type: 'string' },\n { name: 'phone', type: 'string' },\n { name: 'annual_revenue', type: 'number' },\n { name: 'employee_count', type: 'number' },\n { name: 'lifecycle_stage', type: 'string', description: 'lead | prospect | customer | partner | churned (default prospect)' },\n { name: 'lead_source', type: 'string' },\n { name: 'parent_account_id', type: 'string' },\n { name: 'description', type: 'string' },\n { name: 'tags', type: 'object', description: 'Array of free-text tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmAccounts) }\n}\n\nexport class ContactService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Contact', [\n { name: 'first_name', type: 'string', required: true },\n { name: 'last_name', type: 'string', required: true },\n { name: 'account_id', type: 'string' },\n { name: 'display_name', type: 'string' },\n { name: 'email', type: 'string' },\n { name: 'phone', type: 'string' },\n { name: 'job_title', type: 'string' },\n { name: 'seniority', type: 'string', description: 'individual | manager | director | vp | c_level (default manager)' },\n { name: 'is_primary', type: 'boolean', description: 'Default false.' },\n { name: 'linkedin_url', type: 'string' },\n { name: 'tags', type: 'object', description: 'Array of free-text tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmContacts) }\n}\n\nexport class DealService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Deal', [\n { name: 'name', type: 'string', required: true },\n { name: 'account_id', type: 'string' },\n { name: 'owner_id', type: 'string' },\n { name: 'stage', type: 'string', description: 'qualification | discovery | proposal | negotiation | closed_won | closed_lost (default qualification)' },\n { name: 'value', type: 'number' },\n { name: 'currency', type: 'string', description: 'Default USD.' },\n { name: 'probability', type: 'number' },\n { name: 'forecast_category', type: 'string', description: 'pipeline | best_case | commit | closed (default pipeline)' },\n { name: 'expected_close_date', type: 'string', description: 'ISO date.' },\n { name: 'deal_type', type: 'string' },\n { name: 'deal_source', type: 'string' },\n { name: 'primary_contact_id', type: 'string' },\n { name: 'tags', type: 'object', description: 'Array of free-text tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmDeals) }\n}\n\nexport class ActivityService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Activity', [\n { name: 'subject', type: 'string', required: true },\n { name: 'type', type: 'string', description: 'call | email | meeting | note | task (default note)' },\n { name: 'account_id', type: 'string' },\n { name: 'contact_id', type: 'string' },\n { name: 'deal_id', type: 'string' },\n { name: 'owner_id', type: 'string' },\n { name: 'notes', type: 'string' },\n { name: 'occurred_at', type: 'string', description: 'ISO datetime.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmActivities) }\n}\n\n/**\n * @beta Backend CRM quote endpoints are not yet generally available.\n * This service is wired to PATHS.crmQuotes but will 404 until the\n * cpod-backend `/api/v1/crm/quotes` route is shipped. Tracked as\n * \"API pending\" — see sdks/typescript/EDM_ALIGNMENT.md.\n */\nexport class QuoteService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Quote', [\n { name: 'name', type: 'string', required: true },\n { name: 'account_id', type: 'string' },\n { name: 'deal_id', type: 'string' },\n { name: 'status', type: 'string', description: 'draft | sent | accepted | rejected | expired (default draft)' },\n { name: 'currency', type: 'string', description: 'Default USD.' },\n { name: 'total', type: 'number' },\n { name: 'valid_until', type: 'string', description: 'ISO date.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmQuotes) }\n}\n\n/**\n * @beta Backend CRM line-item endpoints are not yet generally available.\n * This service is wired to PATHS.crmLineItems but will 404 until the\n * cpod-backend `/api/v1/crm/line-items` route is shipped. Tracked as\n * \"API pending\" — see sdks/typescript/EDM_ALIGNMENT.md.\n */\nexport class LineItemService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Line Item', [\n { name: 'quote_id', type: 'string', required: true, description: 'The quote this line item belongs to.' },\n { name: 'description', type: 'string', required: true },\n { name: 'quantity', type: 'number', description: 'Default 1.' },\n { name: 'unit_price', type: 'number' },\n { name: 'currency', type: 'string', description: 'Default USD.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.crmLineItems) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// GRC — thin HTTP client over cpod-backend (`/api/v1/grc/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class FrameworksService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Framework', [\n { name: 'name', type: 'string', required: true, description: 'Full display name of the framework.' },\n { name: 'slug', type: 'string', description: 'Stable human-readable slug.' },\n { name: 'version', type: 'string', description: 'Version or edition.' },\n { name: 'status', type: 'string', description: 'active | pending | superseded | retired (default active).' },\n { name: 'jurisdiction', type: 'object', description: 'Array of ISO 3166-1 alpha-2 country codes.' },\n { name: 'industries', type: 'object', description: 'Array of industry sectors this framework targets.' },\n { name: 'effective_date', type: 'string', description: 'Date the framework takes effect.' },\n { name: 'compliance_deadline', type: 'string', description: 'Compliance deadline date.' },\n { name: 'control_categories', type: 'object', description: 'Array of control categories.' },\n { name: 'control_count', type: 'number', description: 'Number of controls.' },\n { name: 'risk_categories', type: 'object', description: 'Array of risk categories.' },\n { name: 'risk_impact', type: 'string', description: 'low | medium | high.' },\n { name: 'assurance_level', type: 'string', description: 'low | medium | high.' },\n { name: 'certification', type: 'string', description: 'Certification/attestation type.' },\n { name: 'reference_docs', type: 'object', description: 'Array of reference document URLs.' },\n { name: 'tags', type: 'object', description: 'Array of free-form tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.grcFrameworks) }\n}\n\nexport class ControlsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Control', [\n { name: 'name', type: 'string', required: true, description: 'Short name of the control.' },\n { name: 'framework_id', type: 'string', required: true, description: 'ID of the framework this control belongs to.' },\n { name: 'control_ref', type: 'string', description: 'Framework-specific control reference, e.g. CC6.1.' },\n { name: 'description', type: 'string', description: 'Full control description.' },\n { name: 'category', type: 'string', description: 'Control category within the framework.' },\n { name: 'objective', type: 'string', description: 'Control objective.' },\n { name: 'implementation_guidance', type: 'string', description: 'How to implement this control.' },\n { name: 'implementation_maturity', type: 'string', description: 'not_implemented | partial | implemented | optimized (default not_implemented).' },\n { name: 'effectiveness', type: 'number', description: 'Effectiveness score between 0 and 1.' },\n { name: 'owner_id', type: 'string', description: 'ID of the control owner.' },\n { name: 'next_review_date', type: 'string', description: 'Date of the next control review.' },\n { name: 'tags', type: 'object', description: 'Array of free-form tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.grcControls) }\n}\n\nexport class EvidenceService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Evidence', [\n { name: 'name', type: 'string', required: true, description: 'Short descriptive name of the evidence.' },\n { name: 'control_ids', type: 'object', description: 'Array of control IDs this evidence satisfies.' },\n { name: 'description', type: 'string', description: 'Description of the evidence artifact.' },\n { name: 'evidence_type', type: 'string', description: 'policy_doc | screenshot | report | attestation | log_extract | configuration | interview | certificate (default report).' },\n { name: 'collection_method', type: 'string', description: 'manual | automated | system_extract | connector_pull (default manual).' },\n { name: 'document_id', type: 'string', description: 'Linked document ID.' },\n { name: 'minio_ref', type: 'string', description: 'Object storage reference.' },\n { name: 'collected_at', type: 'string', description: 'When the evidence was collected.' },\n { name: 'collected_by', type: 'string', description: 'ID of the collector.' },\n { name: 'assessor', type: 'string', description: 'Name of the assessor.' },\n { name: 'assessment_result', type: 'string', description: 'effective | partial | ineffective | not_assessed (default not_assessed).' },\n { name: 'expiry_date', type: 'string', description: 'Evidence expiry date.' },\n { name: 'connector_id', type: 'string', description: 'Source connector ID.' },\n { name: 'tags', type: 'object', description: 'Array of free-form tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.grcEvidence) }\n}\n\nexport class IncidentsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Incident', [\n { name: 'title', type: 'string', required: true, description: 'Short title of the incident.' },\n { name: 'incident_number', type: 'string', description: 'Human-readable incident reference number.' },\n { name: 'description', type: 'string', description: 'Full incident description.' },\n { name: 'category', type: 'string', description: 'data_breach | service_outage | compliance_violation | physical_security | financial_loss | malware | phishing_success (default data_breach).' },\n { name: 'severity', type: 'string', description: 'low | medium | high | critical (default medium).' },\n { name: 'status', type: 'string', description: 'open | investigating | contained | recovering | closed (default open).' },\n { name: 'detected_at', type: 'string', description: 'When the incident was detected.' },\n { name: 'owner_id', type: 'string', description: 'ID of the incident owner.' },\n { name: 'root_cause', type: 'string', description: 'Root cause of the incident.' },\n { name: 'financial_impact', type: 'number', description: 'Estimated financial impact.' },\n { name: 'tags', type: 'object', description: 'Array of free-form tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.grcIncidents) }\n}\n\nexport class RisksService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Risk', [\n { name: 'title', type: 'string', required: true, description: 'Short descriptive title for the risk.' },\n { name: 'description', type: 'string', description: 'Full risk description.' },\n { name: 'category', type: 'string', description: 'cybersecurity | operational | financial | compliance | strategic | reputational | supply_chain (default cybersecurity).' },\n { name: 'owner_id', type: 'string', description: 'ID of the risk owner.' },\n { name: 'inherent_likelihood', type: 'number', description: 'Inherent likelihood score (1-5) before controls.' },\n { name: 'inherent_impact', type: 'number', description: 'Inherent impact score (1-5) before controls.' },\n { name: 'inherent_rating', type: 'number', description: 'Computed inherent rating (likelihood × impact).' },\n { name: 'residual_likelihood', type: 'number', description: 'Residual likelihood score (1-5) after controls.' },\n { name: 'residual_impact', type: 'number', description: 'Residual impact score (1-5) after controls.' },\n { name: 'treatment', type: 'string', description: 'accept | mitigate | transfer | avoid (default mitigate).' },\n { name: 'treatment_rationale', type: 'string', description: 'Rationale for the chosen treatment.' },\n { name: 'status', type: 'string', description: 'identified | assessing | treating | monitoring | closed (default identified).' },\n { name: 'next_review_date', type: 'string', description: 'Date of the next risk review.' },\n { name: 'tags', type: 'object', description: 'Array of free-form tags.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.grcRisks) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// SOC — thin HTTP client over cpod-backend (`/api/v1/soc/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class AlertsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Alert', [\n { name: 'title', type: 'string', required: true },\n { name: 'severity', type: 'string', required: true },\n { name: 'source_alert', type: 'string' },\n { name: 'status', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.socAlerts) }\n}\n\nexport class InvestigationsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Investigation', [\n { name: 'title', type: 'string', required: true },\n { name: 'lead_id', type: 'string' },\n { name: 'alert_ids', type: 'object', description: 'string[] of correlated alerts.' },\n { name: 'status', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.socInvestigations) }\n}\n\nexport class PlaybooksService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Playbook', [\n { name: 'name', type: 'string', required: true },\n { name: 'category', type: 'string' },\n { name: 'steps', type: 'object', description: 'string[] of ordered steps.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.socPlaybooks) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Learning — thin HTTP client over cpod-backend (`/api/v1/learning/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class CohortService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Cohort', [\n { name: 'name', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.learningCohorts) }\n}\n\nexport class AssessmentService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Assessment', [\n { name: 'name', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.learningAssessments) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// RFP — thin HTTP client over cpod-backend (`/api/v1/rfp/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class RfpRecordService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('RFP', [{ name: 'title', type: 'string', required: true }])\n constructor(http: HttpClient) { super(http, PATHS.rfpRecords) }\n}\n\nexport class RfpQuestionService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('RFP Question', [\n { name: 'rfp_record_id', type: 'string', required: true },\n { name: 'text', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.rfpQuestions) }\n}\n\nexport class RfpResponseService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('RFP Response', [\n { name: 'rfp_record_id', type: 'string', required: true },\n { name: 'question_id', type: 'string', required: true },\n { name: 'text', type: 'string', required: true },\n ])\n constructor(http: HttpClient) { super(http, PATHS.rfpResponses) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Knowledge — thin HTTP client over cpod-backend (`/api/v1/knowledge/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class KnowledgeDocumentService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Knowledge Document', [\n { name: 'title', type: 'string', required: true },\n { name: 'kind', type: 'string' },\n { name: 'collection_id', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.knowledgeDocuments) }\n}\n\nexport class KnowledgeChunkService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Knowledge Chunk', [\n { name: 'document_id', type: 'string', required: true },\n { name: 'text', type: 'string', required: true },\n { name: 'embedding', type: 'object', description: 'number[] vector.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.knowledgeChunks) }\n}\n\nexport class KnowledgeEntityService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Knowledge Entity', [\n { name: 'name', type: 'string', required: true },\n { name: 'type', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.knowledgeEntities) }\n}\n\nexport class KnowledgeTemplateService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Knowledge Template', [\n { name: 'name', type: 'string', required: true },\n { name: 'category', type: 'string' },\n { name: 'description', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.knowledgeTemplates) }\n}\n\nexport class KnowledgeSopService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Knowledge SOP', [\n { name: 'title', type: 'string', required: true },\n { name: 'template_id', type: 'string' },\n { name: 'steps', type: 'object', description: 'Ordered array of procedure steps.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.knowledgeSops) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Integration — thin HTTP client over cpod-backend (`/api/v1/integration/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class ApplicationService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Application', [\n { name: 'name', type: 'string', required: true },\n { name: 'slug', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.integrationApplications) }\n}\n\nexport class ConnectorService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Connector', [\n { name: 'application_id', type: 'string', required: true },\n { name: 'name', type: 'string', required: true },\n { name: 'type', type: 'string' },\n { name: 'config', type: 'object' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.integrationConnectors) }\n}\n\nexport class ApiKeyService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('API Key', [\n { name: 'name', type: 'string', required: true },\n { name: 'application_id', type: 'string' },\n { name: 'scopes', type: 'object' },\n { name: 'expires_at', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.integrationApiKeys) }\n}\n\nexport class WebhookService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Webhook', [\n { name: 'application_id', type: 'string' },\n { name: 'url', type: 'string', required: true },\n { name: 'event_types', type: 'object' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.integrationWebhooks) }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Notifications — thin HTTP client over cpod-backend (`/api/v1/notifications/*`).\n// Backend component lives in ``app/edms/notifications/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class NotificationsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Notifications.', params: PAGINATION },\n get: { description: 'Fetch a Notification by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Notification.', params: [\n { name: 'recipient_id', type: 'string', required: true },\n { name: 'title', type: 'string', required: true },\n { name: 'body', type: 'string' },\n ] },\n update: { description: 'Patch fields.', params: [ID_PARAM] },\n markRead: { description: 'Mark as read.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.notificationsNotifications) }\n\n markRead(id: string) {\n return this.http.post<Record<string, unknown>>(\n buildPath(PATHS.notificationsNotificationsByNotificationIdRead, id),\n )\n }\n}\n\nexport class AnnouncementsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Announcements.', params: PAGINATION },\n get: { description: 'Fetch an Announcement by UUID.', params: [ID_PARAM] },\n create: { description: 'Create an Announcement.', params: [\n { name: 'title', type: 'string', required: true },\n { name: 'body', type: 'string' },\n ] },\n update: { description: 'Patch fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.notificationsAnnouncements) }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Approvals — thin HTTP client over cpod-backend (`/api/v1/approvals/*`).\n// Backend component lives in ``app/edms/approvals/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class ApprovalRequestsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List ApprovalRequests.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a request by UUID.', params: [ID_PARAM] },\n create: { description: 'Create an ApprovalRequest.', params: [\n { name: 'title', type: 'string', required: true, description: 'Human-readable summary of what is being approved.' },\n { name: 'description', type: 'string', description: 'Longer context, e.g. \"Pre-planned family holiday, cover arranged with team.\"' },\n { name: 'entity_type', type: 'string', description: 'EDM entity type being approved (Expense, LeaveRequest, Contract, PurchaseOrder, ...).' },\n { name: 'entity_id', type: 'string', description: 'Id of the specific entity instance awaiting approval, e.g. lr_01HXENTITY.' },\n { name: 'requester_id', type: 'string', description: 'User who initiated this approval request.' },\n { name: 'status', type: 'string', description: 'Lifecycle status. One of: pending, approved, rejected, cancelled, expired. Default pending.' },\n { name: 'current_step_index', type: 'number', description: 'Zero-based index of the currently active step. Default 0.' },\n { name: 'total_steps', type: 'number', description: 'Number of steps required before full approval.' },\n { name: 'due_at', type: 'string', description: 'When the request expires, ISO 8601, e.g. 2026-05-28T23:59:59Z.' },\n { name: 'completed_at', type: 'string', description: 'When the request reached a terminal state, ISO 8601.' },\n { name: 'tags', type: 'array', description: 'Free-form labels, e.g. [\"leave\", \"q2\"].' },\n ] },\n update: { description: 'Patch request fields.', params: [ID_PARAM] },\n cancel: { description: 'Cancel a pending request.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a request.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.approvalsRequests) }\n\n cancel(id: string) {\n return this.http.post<Record<string, unknown>>(buildPath(PATHS.approvalsRequestsByRequestIdCancel, id))\n }\n}\n\nexport class ApprovalStepsService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List ApprovalSteps.', params: [...PAGINATION, { name: 'search', type: 'string' }] },\n get: { description: 'Fetch a step by UUID.', params: [ID_PARAM] },\n create: { description: 'Create an ApprovalStep.', params: [\n { name: 'request_id', type: 'string', required: true, description: 'Parent approval request this step belongs to, e.g. apr_01HXREQUEST.' },\n { name: 'approver_id', type: 'string', required: true, description: 'User assigned to decide on this step.' },\n { name: 'step_index', type: 'number', description: 'Zero-based position of this step in the chain. Default 0.' },\n { name: 'status', type: 'string', description: 'Step state. One of: pending, approved, rejected, delegated, skipped. Default pending.' },\n { name: 'decision', type: 'string', description: 'Approver decision. One of: approved, rejected. Absent while pending.' },\n { name: 'comment', type: 'string', description: 'Free-form note, e.g. \"Approved — cover confirmed with team lead.\"' },\n { name: 'decided_at', type: 'string', description: 'When the decision was recorded, ISO 8601.' },\n { name: 'delegated', type: 'boolean', description: 'True once the step has been reassigned to another approver. Default false.' },\n { name: 'delegated_to_id', type: 'string', description: 'User this step was delegated to, if any.' },\n ] },\n update: { description: 'Patch step fields.', params: [ID_PARAM] },\n decide: { description: 'Approve or reject a step.', params: [\n ID_PARAM,\n { name: 'decision', type: 'string', required: true, description: 'approved | rejected' },\n { name: 'comment', type: 'string' },\n ] },\n delegate: { description: 'Reassign a step.', params: [\n ID_PARAM,\n { name: 'delegatee_id', type: 'string', required: true },\n ] },\n delete: { description: 'Soft-delete a step.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.approvalsSteps) }\n\n decide(id: string, decision: 'approved' | 'rejected', comment?: string) {\n return this.http.post<Record<string, unknown>>(\n buildPath(PATHS.approvalsStepsByStepIdDecide, id),\n { decision, comment },\n )\n }\n delegate(id: string, delegateeId: string) {\n return this.http.post<Record<string, unknown>>(\n buildPath(PATHS.approvalsStepsByStepIdDelegate, id),\n { delegatee_id: delegateeId },\n )\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Helpdesk — SDK thin HTTP client.\n//\n// All DB operations live in cpod-backend (`app/helpdesk/`). This file\n// issues typed HTTP calls against the backend's component routes:\n// GET /api/v1/helpdesk/tickets\n// POST /api/v1/helpdesk/tickets\n// GET /api/v1/helpdesk/tickets/{id}\n// PATCH /api/v1/helpdesk/tickets/{id}\n// DELETE /api/v1/helpdesk/tickets/{id}\n// GET /api/v1/helpdesk/sla-policies\n// POST /api/v1/helpdesk/sla-policies\n// GET /api/v1/helpdesk/sla-policies/{id}\n// PATCH /api/v1/helpdesk/sla-policies/{id}\n// DELETE /api/v1/helpdesk/sla-policies/{id}\n//\n// See cyberpod/MIGRATION_DB_OWNERSHIP.md for the wider plan.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\n\nexport interface PaginatedHelpdeskResponse<T> {\n items: T[]\n total: number\n page: number\n page_size: number\n}\n\nexport interface ListOptions {\n page?: number\n pageSize?: number\n}\n\nfunction qs(opts?: ListOptions | (ListOptions & Record<string, unknown>)): string {\n if (!opts) return ''\n const parts: string[] = []\n if (opts.page != null) parts.push(`page=${opts.page}`)\n if (opts.pageSize != null) parts.push(`page_size=${opts.pageSize}`)\n for (const [k, v] of Object.entries(opts)) {\n if (k === 'page' || k === 'pageSize') continue\n if (v == null) continue\n parts.push(`${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`)\n }\n return parts.length ? `?${parts.join('&')}` : ''\n}\n\n/** Helpdesk tickets — every support / service request. */\nexport class TicketService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Helpdesk Tickets (tenant + app scoped).', params: [{ name: 'page', type: 'number' }, { name: 'pageSize', type: 'number' }] },\n get: { description: 'Fetch a Ticket by UUID.', params: [{ name: 'id', type: 'string', required: true }] },\n create: { description: 'Create a Ticket.', params: [\n { name: 'title', type: 'string', required: true },\n { name: 'description', type: 'string' },\n { name: 'priority', type: 'string', description: 'low | medium | high | urgent' },\n { name: 'reporter_id', type: 'string' },\n { name: 'assignee_id', type: 'string' },\n { name: 'category', type: 'string' },\n { name: 'status', type: 'string', description: 'open | pending | resolved | closed' },\n ] },\n update: { description: 'Patch Ticket fields (status, assignee, priority, …).', params: [{ name: 'id', type: 'string', required: true }] },\n delete: { description: 'Soft-delete a Ticket.', params: [{ name: 'id', type: 'string', required: true }] },\n }\n\n constructor(private readonly http: HttpClient) {}\n\n list(opts?: ListOptions) {\n return this.http.get<PaginatedHelpdeskResponse<Record<string, unknown>>>(\n `/api/v1/helpdesk/tickets${qs(opts)}`,\n )\n }\n get(id: string) {\n return this.http.get<Record<string, unknown>>(buildPath(PATHS.helpdeskTicketsByItemId, id))\n }\n create(body: Record<string, unknown>) {\n return this.http.post<Record<string, unknown>>(PATHS.helpdeskTickets, body)\n }\n update(id: string, patch: Record<string, unknown>) {\n return this.http.patch<Record<string, unknown>>(buildPath(PATHS.helpdeskTicketsByItemId, id), patch)\n }\n delete(id: string) {\n return this.http.delete<void>(buildPath(PATHS.helpdeskTicketsByItemId, id))\n }\n}\n\n/** SLA policies — first-response / resolution targets per priority. */\nexport class SlaPolicyService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List SLA Policies.', params: [{ name: 'page', type: 'number' }, { name: 'pageSize', type: 'number' }] },\n get: { description: 'Fetch an SLA Policy by UUID.', params: [{ name: 'id', type: 'string', required: true }] },\n create: { description: 'Create an SLA Policy.', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'priority', type: 'string' },\n { name: 'response_time_hours', type: 'number' },\n { name: 'resolution_time_hours', type: 'number' },\n ] },\n update: { description: 'Patch SLA Policy fields.', params: [{ name: 'id', type: 'string', required: true }] },\n delete: { description: 'Soft-delete an SLA Policy.', params: [{ name: 'id', type: 'string', required: true }] },\n }\n\n constructor(private readonly http: HttpClient) {}\n\n list(opts?: ListOptions) {\n return this.http.get<PaginatedHelpdeskResponse<Record<string, unknown>>>(\n `/api/v1/helpdesk/sla-policies${qs(opts)}`,\n )\n }\n get(id: string) {\n return this.http.get<Record<string, unknown>>(buildPath(PATHS.helpdeskSlaPoliciesByItemId, id))\n }\n create(body: Record<string, unknown>) {\n return this.http.post<Record<string, unknown>>(PATHS.helpdeskSlaPolicies, body)\n }\n update(id: string, patch: Record<string, unknown>) {\n return this.http.patch<Record<string, unknown>>(buildPath(PATHS.helpdeskSlaPoliciesByItemId, id), patch)\n }\n delete(id: string) {\n return this.http.delete<void>(buildPath(PATHS.helpdeskSlaPoliciesByItemId, id))\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// HR — thin HTTP client over cpod-backend (`/api/v1/hr/*`).\n// Backend component lives in ``app/edms/hr/`` and owns the Mongo writes.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst JOB_FIELDS = [\n { name: 'title', type: 'string' as const, required: true },\n { name: 'department', type: 'string' as const },\n { name: 'status', type: 'string' as const, description: 'draft | open | closed | filled' },\n]\nconst APPLICANT_FIELDS = [\n { name: 'job_posting_id', type: 'string' as const, required: true },\n { name: 'name', type: 'string' as const, required: true },\n { name: 'email', type: 'string' as const, required: true },\n { name: 'stage', type: 'string' as const },\n]\nconst ONB_FIELDS = [\n { name: 'person_id', type: 'string' as const, required: true },\n { name: 'title', type: 'string' as const, required: true },\n { name: 'due_date', type: 'string' as const },\n { name: 'status', type: 'string' as const },\n]\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nfunction manifest(label: string, fields: typeof JOB_FIELDS): McpServiceManifest {\n return {\n list: { description: `List ${label} (tenant + app scoped).`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: fields },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class JobPostingsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Job Posting', JOB_FIELDS)\n constructor(http: HttpClient) { super(http, PATHS.hrJobPostings) }\n}\n\nexport class ApplicantsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Applicant', APPLICANT_FIELDS)\n constructor(http: HttpClient) { super(http, PATHS.hrApplicants) }\n}\n\nexport class OnboardingTasksService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Onboarding Task', ONB_FIELDS)\n constructor(http: HttpClient) { super(http, PATHS.hrOnboardingTasks) }\n}\n\nexport class OffboardingTasksService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Offboarding Task', ONB_FIELDS)\n constructor(http: HttpClient) { super(http, PATHS.hrOffboardingTasks) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Finance — thin HTTP client over cpod-backend (`/api/v1/finance/*`).\n// Backend component lives in ``app/edms/finance/``.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class InvoicesService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Invoice', [\n { name: 'number', type: 'string', required: true, description: 'Invoice number, e.g. \"INV-2026-0042\".' },\n { name: 'counterparty_id', type: 'string', description: 'Customer (AR) or vendor (AP) the invoice is with, e.g. \"acc_01HXCOUNTERPARTY\".' },\n { name: 'direction', type: 'string', description: 'AR vs AP: one of \"receivable\", \"payable\" (default \"receivable\").' },\n { name: 'amount', type: 'number', description: 'Invoice total, e.g. 12500.0.' },\n { name: 'currency', type: 'string', description: 'ISO currency code (default \"USD\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"sent\", \"paid\", \"overdue\", \"void\" (default \"draft\").' },\n { name: 'issue_date', type: 'string', description: 'Issue date, e.g. \"2026-06-01\".' },\n { name: 'due_date', type: 'string', description: 'Due date, e.g. \"2026-07-01\".' },\n { name: 'paid_at', type: 'string', description: 'When the invoice was paid, e.g. \"2026-06-20\".' },\n { name: 'po_id', type: 'string', description: 'Purchase order this invoice bills against, e.g. \"po_01HXPO\".' },\n { name: 'notes', type: 'string', description: 'Free-text notes, e.g. \"Net-30 terms.\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"q2\", \"ar\"].' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.financeInvoices) }\n}\n\nexport class PurchaseOrdersService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Purchase Order', [\n { name: 'number', type: 'string', required: true, description: 'Purchase-order number, e.g. \"PO-2026-0117\".' },\n { name: 'supplier_id', type: 'string', description: 'Supplier / vendor the PO is raised against, e.g. \"acc_01HXSUPPLIER\".' },\n { name: 'amount', type: 'number', description: 'PO total value, e.g. 48000.0.' },\n { name: 'currency', type: 'string', description: 'ISO currency code (default \"USD\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"approved\", \"ordered\", \"received\", \"closed\", \"cancelled\" (default \"draft\").' },\n { name: 'order_date', type: 'string', description: 'Order date, e.g. \"2026-06-02\".' },\n { name: 'expected_delivery_date', type: 'string', description: 'Expected delivery date, e.g. \"2026-06-30\".' },\n { name: 'budget_id', type: 'string', description: 'Budget this PO draws down, e.g. \"bud_01HXBUDGET\".' },\n { name: 'requested_by', type: 'string', description: 'Requester user id, e.g. \"usr_01HXREQUESTER\".' },\n { name: 'approved_by', type: 'string', description: 'Approver user id, e.g. \"usr_01HXAPPROVER\".' },\n { name: 'notes', type: 'string', description: 'Free-text notes, e.g. \"Annual laptop refresh.\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"hardware\", \"capex\"].' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.financePurchaseOrders) }\n}\n\nexport class ExpensesService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Expense', [\n { name: 'person_id', type: 'string', required: true, description: 'The person who incurred the expense, e.g. \"usr_01HXPERSON\".' },\n { name: 'amount', type: 'number', description: 'Expense amount, e.g. 126.5.' },\n { name: 'currency', type: 'string', description: 'ISO currency code (default \"USD\").' },\n { name: 'category', type: 'string', description: 'One of \"travel\", \"meals\", \"lodging\", \"software\", \"supplies\", \"other\" (default \"other\").' },\n { name: 'description', type: 'string', description: 'What the expense was for, e.g. \"Taxi to client site for kickoff.\".' },\n { name: 'date', type: 'string', description: 'Expense date, e.g. \"2026-06-04\".' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"submitted\", \"approved\", \"reimbursed\", \"rejected\" (default \"draft\").' },\n { name: 'merchant', type: 'string', description: 'Merchant name, e.g. \"City Cabs\".' },\n { name: 'receipt_url', type: 'string', description: 'Receipt URL, e.g. \"https://files.example.com/receipts/r1.pdf\".' },\n { name: 'project_id', type: 'string', description: 'Project this expense is billed to, e.g. \"prj_01HXPROJECT\".' },\n { name: 'approved_by', type: 'string', description: 'Approver user id, e.g. \"usr_01HXAPPROVER\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"billable\", \"travel\"].' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.financeExpenses) }\n}\n\nexport class BudgetsService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Budget', [\n { name: 'name', type: 'string', required: true, description: 'Budget name, e.g. \"FY26 Engineering\".' },\n { name: 'period', type: 'string', required: true, description: 'Budget period (fiscal year / quarter), e.g. \"FY2026\".' },\n { name: 'cost_center_id', type: 'string', description: 'Cost center this budget belongs to, e.g. \"cc_01HXENGINEERING\".' },\n { name: 'amount', type: 'number', description: 'Total budgeted amount, e.g. 500000.0 (default 0).' },\n { name: 'currency', type: 'string', description: 'ISO currency code (default \"USD\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"active\", \"closed\" (default \"draft\").' },\n { name: 'owner_id', type: 'string', description: 'Budget owner user id, e.g. \"usr_01HXOWNER\".' },\n { name: 'start_date', type: 'string', description: 'Period start date, e.g. \"2026-01-01\".' },\n { name: 'end_date', type: 'string', description: 'Period end date, e.g. \"2026-12-31\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"fy26\", \"engineering\"].' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.financeBudgets) }\n}\n\nexport class BudgetLinesService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Budget Line', [\n { name: 'budget_id', type: 'string', required: true, description: 'The budget this line item rolls up to, e.g. \"bud_01HXBUDGET\".' },\n { name: 'description', type: 'string', required: true, description: 'What this line covers, e.g. \"Cloud infrastructure (AWS)\".' },\n { name: 'amount', type: 'number', description: 'Budgeted amount for this line, e.g. 120000.0.' },\n { name: 'currency', type: 'string', description: 'ISO currency code (default \"USD\").' },\n { name: 'category', type: 'string', description: 'One of \"personnel\", \"software\", \"hardware\", \"services\", \"travel\", \"other\" (default \"other\").' },\n { name: 'spent', type: 'number', description: 'Amount spent to date, e.g. 45000.0 (default 0).' },\n { name: 'cost_center_id', type: 'string', description: 'Cost center, e.g. \"cc_01HXENGINEERING\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"opex\", \"cloud\"].' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.financeBudgetLines) }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Org — thin HTTP client over cpod-backend (`/api/v1/org/*`).\n// Departments are served at `/api/v1/platform/departments` (PATHS.platformDepartments).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class LocationService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Locations.', params: PAGINATION },\n get: { description: 'Fetch a Location by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Location.', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'type', type: 'string', description: 'physical | cloud-region' },\n { name: 'address', type: 'string' },\n ] },\n update: { description: 'Patch Location fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Location.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.orgLocations) }\n}\n\nexport class DepartmentService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Departments.', params: PAGINATION },\n get: { description: 'Fetch a Department by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Department.', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'parent_id', type: 'string' },\n ] },\n update: { description: 'Patch Department fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Department.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.platformDepartments) }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\n// Policies — thin HTTP client over cpod-backend (`/api/v1/policies/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class PolicyService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n ...manifest('Policy', [\n { name: 'name', type: 'string', required: true },\n { name: 'body', type: 'string', required: true },\n { name: 'version', type: 'string', required: true },\n { name: 'category', type: 'string' },\n { name: 'status', type: 'string' },\n { name: 'owner_id', type: 'string' },\n ]),\n publish: { description: 'Set status=published, stamp published_at.', params: [ID_PARAM] },\n retire: { description: 'Set status=retired.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.policiesPolicies) }\n\n publish(id: string) {\n return this.http.post<Record<string, unknown>>(buildPath(PATHS.policiesPoliciesByPolicyIdPublish, id))\n }\n retire(id: string) {\n return this.http.post<Record<string, unknown>>(buildPath(PATHS.policiesPoliciesByPolicyIdRetire, id))\n }\n}\n\nexport class PolicyAcknowledgementService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Policy Acknowledgement', [\n { name: 'policy_id', type: 'string', required: true },\n { name: 'policy_version', type: 'string', required: true },\n { name: 'person_id', type: 'string', required: true },\n { name: 'acknowledged_at', type: 'string' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.policiesAcknowledgements) }\n}\n\nexport class PolicyReviewService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n ...manifest('Policy Review', [\n { name: 'policy_id', type: 'string', required: true },\n { name: 'reviewer_id', type: 'string', required: true },\n { name: 'due_at', type: 'string', required: true },\n ]),\n complete: { description: 'Mark review complete with an outcome.', params: [\n ID_PARAM,\n { name: 'outcome', type: 'string', required: true },\n { name: 'notes', type: 'string' },\n ] },\n }\n constructor(http: HttpClient) { super(http, PATHS.policiesReviews) }\n\n complete(id: string, outcome: string, notes?: string) {\n return this.http.post<Record<string, unknown>>(\n buildPath(PATHS.policiesReviewsByReviewIdComplete, id),\n { outcome, notes },\n )\n }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Catalog — thin HTTP client over cpod-backend (`/api/v1/catalog/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string }\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n }\n}\n\nexport class ProductService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Product', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable product name.' },\n { name: 'sku', type: 'string', description: 'Stock Keeping Unit — unique product code in the catalog.' },\n { name: 'description', type: 'string', description: 'Free-form product description.' },\n { name: 'category', type: 'string', description: 'Free-form category label. Use a category id for hierarchy.' },\n { name: 'type', type: 'string', description: 'Product type classification. One of: physical, digital, service, subscription (default subscription).' },\n { name: 'status', type: 'string', description: 'Lifecycle status in the catalog. One of: active, discontinued, draft (default draft).' },\n { name: 'unit_price', type: 'number', description: 'Price per unit in the currency.' },\n { name: 'currency', type: 'string', description: 'ISO 4217 three-character currency code (default USD).' },\n { name: 'unit', type: 'string', description: 'Human-readable unit description for the price.' },\n { name: 'taxable', type: 'boolean', description: 'Whether this product is subject to sales tax or VAT (default false).' },\n { name: 'tags', type: 'object', description: 'Array of free-form tag labels.' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.catalogProducts) }\n}\n\nexport class ProductCategoryService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Product Category', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable category name.' },\n { name: 'slug', type: 'string', description: 'URL-safe kebab-case identifier, unique within the catalog.' },\n { name: 'description', type: 'string', description: 'Free-form category description.' },\n { name: 'parent_category_id', type: 'string', description: 'Parent category id. Omit for root-level categories.' },\n { name: 'status', type: 'string', description: 'Whether this category is visible and usable. One of: active, inactive (default active).' },\n ])\n constructor(http: HttpClient) { super(http, PATHS.catalogCategories) }\n}\n","import { PATHS } from '../_generated/paths.js';\n// Procurement — thin HTTP client over cpod-backend (`/api/v1/procurement/*`).\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\nexport class SupplierService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List Suppliers.', params: PAGINATION },\n get: { description: 'Fetch a Supplier by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a Supplier.', params: [\n { name: 'name', type: 'string', required: true },\n { name: 'type', type: 'string' },\n { name: 'status', type: 'string' },\n ] },\n update: { description: 'Patch Supplier fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a Supplier.', params: [ID_PARAM] },\n }\n constructor(http: HttpClient) { super(http, PATHS.procurementSuppliers) }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type { EmitAuditInput, AuditEvent, QueryAuditOptions, AuditEventPage } from './types.js';\n\n/** Provides operations for emitting and querying platform audit events. */\nexport class AuditService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Emit a new audit event. */\n async emit(input: EmitAuditInput, requestOpts?: RequestOptions): Promise<AuditEvent> {\n return this.http.post<AuditEvent>('/api/v1/audit/emit', input, requestOpts);\n }\n\n /** Query audit events with optional filters. */\n async query(\n opts?: QueryAuditOptions,\n requestOpts?: RequestOptions\n ): Promise<AuditEventPage> {\n const parts: string[] = [];\n if (opts?.resourceId) parts.push(`resourceId=${encodeURIComponent(opts.resourceId)}`);\n if (opts?.resourceType) parts.push(`resourceType=${encodeURIComponent(opts.resourceType)}`);\n if (opts?.action) parts.push(`action=${encodeURIComponent(opts.action)}`);\n if (opts?.from) parts.push(`from=${encodeURIComponent(opts.from)}`);\n if (opts?.to) parts.push(`to=${encodeURIComponent(opts.to)}`);\n if (opts?.limit != null) parts.push(`limit=${opts.limit}`);\n if (opts?.cursor) parts.push(`cursor=${encodeURIComponent(opts.cursor)}`);\n const qs = parts.length > 0 ? `?${parts.join('&')}` : '';\n return this.http.get<AuditEventPage>(`/api/v1/audit/events${qs}`, requestOpts);\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from \"../http/client.js\";\nimport type { ApiResponse, RequestOptions } from \"../types/index.js\";\nimport type {\n Tenant,\n CreateTenantInput,\n UpdateTenantInput,\n ListTenantsOptions,\n} from \"./types.js\";\n\n/**\n * Provides CRUD operations for cPod Tenant resources.\n */\nexport class TenantService {\n private readonly http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /**\n * List tenants with optional filters.\n */\n async list(\n opts: ListTenantsOptions = {},\n requestOpts?: RequestOptions\n ): Promise<ApiResponse<Tenant[]>> {\n const params = new URLSearchParams();\n if (opts.limit !== undefined) params.set(\"limit\", String(opts.limit));\n if (opts.offset !== undefined) params.set(\"offset\", String(opts.offset));\n if (opts.status !== undefined) params.set(\"status\", opts.status);\n if (opts.plan !== undefined) params.set(\"plan\", opts.plan);\n\n const qs = params.toString();\n return this.http.get<ApiResponse<Tenant[]>>(\n `/api/v1/tenants${qs ? `?${qs}` : \"\"}`,\n requestOpts\n );\n }\n\n /**\n * Retrieve a single tenant by ID.\n */\n async get(id: string, requestOpts?: RequestOptions): Promise<Tenant> {\n if (!id) throw new Error(\"Tenant ID is required.\");\n return this.http.get<Tenant>(\n buildPath(PATHS.tenantsByTenantId, encodeURIComponent(id)),\n requestOpts\n );\n }\n\n /**\n * Create a new tenant.\n */\n async create(\n input: CreateTenantInput,\n requestOpts?: RequestOptions\n ): Promise<Tenant> {\n return this.http.post<Tenant>(PATHS.tenants, input, requestOpts);\n }\n\n /**\n * Update an existing tenant.\n */\n async update(\n id: string,\n input: UpdateTenantInput,\n requestOpts?: RequestOptions\n ): Promise<Tenant> {\n if (!id) throw new Error(\"Tenant ID is required.\");\n return this.http.patch<Tenant>(\n buildPath(PATHS.tenantsByTenantId, encodeURIComponent(id)),\n input,\n requestOpts\n );\n }\n\n /**\n * Delete a tenant by ID.\n */\n async delete(id: string, requestOpts?: RequestOptions): Promise<void> {\n if (!id) throw new Error(\"Tenant ID is required.\");\n return this.http.delete<void>(\n buildPath(PATHS.tenantsByTenantId, encodeURIComponent(id)),\n requestOpts\n );\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type {\n HITLPendingRequest,\n HITLResolveInput,\n HITLResolveResponse,\n ChatHITLRequiredEvent,\n ChatHITLResolvedEvent,\n} from './types.js'\n\n/**\n * ChatHITLService — resolve agent tool-call approvals.\n *\n * When an AI agent wants to call a tool marked `requires_approval=true`,\n * the platform pauses the agent and emits a `chat.hitl_required` SSE event.\n * Call `resolve()` to approve or reject the tool call.\n *\n * @example\n * ```typescript\n * // In your approval UI or bot:\n * await client.chat.resolve('hitl_abc123', { decision: 'approved' })\n * ```\n *\n * @example\n * // Reject with a modified payload:\n * await client.chat.resolve('hitl_abc123', {\n * decision: 'approved',\n * payload: { to: 'safe@example.com' } // override tool args\n * })\n */\nexport class ChatHITLService {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Approve or reject a pending HITL tool-call approval.\n *\n * After calling this, the agent's SSE stream receives a `chat.hitl_resolved`\n * event and the agent continues (approved) or skips the tool (rejected).\n *\n * @param approvalId - The `approvalId` from the `chat.hitl_required` SSE event\n * @param input - `{ decision: 'approved' | 'rejected', payload?: {...} }`\n */\n async resolve(approvalId: string, input: HITLResolveInput): Promise<HITLResolveResponse> {\n return this.http.post<HITLResolveResponse>(\n buildPath(PATHS.chatHitlByApprovalIdResolve, approvalId),\n input,\n )\n }\n\n /**\n * Fetch a single pending HITL approval by ID.\n * Useful to display tool name, args, and expiry in your approval UI.\n */\n async getPending(approvalId: string): Promise<HITLPendingRequest> {\n return this.http.get<HITLPendingRequest>(buildPath(PATHS.chatHitlByItemId, approvalId))\n }\n\n /**\n * List all pending HITL approvals for the caller's tenant.\n * Use to build an approval dashboard.\n */\n async listPending(): Promise<HITLPendingRequest[]> {\n return this.http.get<HITLPendingRequest[]>('/api/v1/chat/hitl/pending')\n }\n}\n\n// ── SSE event parsing helpers ─────────────────────────────────────────────────\n\n/**\n * Parse a raw SSE `data:` line into a typed HITL event, or return null\n * if it's not a HITL event.\n *\n * @example\n * ```typescript\n * const evtSource = new EventSource(PATHS.chatCompletions, { ... })\n * evtSource.addEventListener('chat.hitl_required', (e) => {\n * const event = parseChatHITLEvent(e.data)\n * if (event?.type === 'chat.hitl_required') {\n * await client.chat.resolve(event.approvalId, { decision: 'approved' })\n * }\n * })\n * ```\n */\nexport function parseChatHITLEvent(\n data: string,\n): ChatHITLRequiredEvent | ChatHITLResolvedEvent | null {\n try {\n const parsed = JSON.parse(data)\n if (\n parsed?.type === 'chat.hitl_required' ||\n parsed?.type === 'chat.hitl_resolved'\n ) {\n return parsed as ChatHITLRequiredEvent | ChatHITLResolvedEvent\n }\n } catch {\n // not JSON or not a HITL event\n }\n return null\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type { RequestOptions } from '../types/index.js'\nimport type { Agent, CreateAgentInput, UpdateAgentInput } from './types.js'\n\n/**\n * AgentsService — manage AI agents configured by users in the tenant.\n *\n * Agents have three scopes:\n * - `personal` — owned by the creating user, invisible to others\n * - `department` — visible to members of the listed departments\n * - `universal` — tenant-wide (requires admin role)\n *\n * Each agent carries a model, a list of skills (by slug), MCP server IDs,\n * and secret slugs that are injected as env vars at runtime.\n */\nexport class AgentsService {\n constructor(private readonly http: HttpClient) {}\n\n /** List all agents visible to the authenticated user (filtered by scope). */\n async list(opts?: RequestOptions): Promise<Agent[]> {\n return this.http.get<Agent[]>(PATHS.agents, opts)\n }\n\n /** Get a single agent by ID. */\n async get(agentId: string, opts?: RequestOptions): Promise<Agent> {\n return this.http.get<Agent>(buildPath(PATHS.agentsByAgentId, agentId), opts)\n }\n\n /** Create a new agent. */\n async create(input: CreateAgentInput, opts?: RequestOptions): Promise<Agent> {\n return this.http.post<Agent>(PATHS.agents, input, opts)\n }\n\n /** Update an existing agent. */\n async update(agentId: string, input: UpdateAgentInput, opts?: RequestOptions): Promise<Agent> {\n return this.http.patch<Agent>(buildPath(PATHS.agentsByAgentId, agentId), input, opts)\n }\n\n /** Delete an agent permanently. */\n async delete(agentId: string, opts?: RequestOptions): Promise<{ deleted: string }> {\n return this.http.delete<{ deleted: string }>(buildPath(PATHS.agentsByAgentId, agentId), opts)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type { RequestOptions } from '../types/index.js'\nimport type {\n McpServer,\n RegisterMcpServerInput,\n UpdateMcpServerInput,\n DiscoverMcpToolsResult,\n} from './types.js'\n\n/**\n * McpServersService — manage MCP server integrations connected by the user.\n *\n * MCP servers are external services that expose tools via the Model Context Protocol.\n * Each server has a scope:\n * - `user` — personal to the registering user\n * - `tenant` — visible to all agents in the tenant\n * - `platform` — platform-scoped (admin only)\n *\n * Agents automatically see all servers in scope when generating tool calls.\n *\n * @example\n * ```typescript\n * const server = await client.mcpServers.register({\n * name: 'GitHub',\n * serverUrl: 'https://mcp.github.com',\n * scope: 'tenant',\n * })\n * await client.mcpServers.discover(server.id)\n * ```\n */\nexport class McpServersService {\n constructor(private readonly http: HttpClient) {}\n\n /** List all MCP servers registered by the current user (and tenant-scoped ones). */\n async list(opts?: RequestOptions): Promise<McpServer[]> {\n return this.http.get<McpServer[]>(PATHS.mcpServers, opts)\n }\n\n /** Get a single MCP server with its discovered tools. */\n async get(serverId: string, opts?: RequestOptions): Promise<McpServer> {\n return this.http.get<McpServer>(buildPath(PATHS.mcpServersByServerId, serverId), opts)\n }\n\n /** Register a new MCP server by URL. */\n async register(input: RegisterMcpServerInput, opts?: RequestOptions): Promise<McpServer> {\n return this.http.post<McpServer>(PATHS.mcpServers, input, opts)\n }\n\n /** Update a registered MCP server (name, URL, headers, scope, secrets). */\n async update(serverId: string, input: UpdateMcpServerInput, opts?: RequestOptions): Promise<McpServer> {\n return this.http.patch<McpServer>(buildPath(PATHS.mcpServersByServerId, serverId), input, opts)\n }\n\n /** Delete a registered MCP server. */\n async delete(serverId: string, opts?: RequestOptions): Promise<void> {\n return this.http.delete(buildPath(PATHS.mcpServersByServerId, serverId), opts)\n }\n\n /**\n * Discover tools — call `tools/list` on the MCP server and persist the result.\n * Run this after registering a server or when the server's tool list changes.\n */\n async discover(serverId: string, opts?: RequestOptions): Promise<DiscoverMcpToolsResult> {\n return this.http.post<DiscoverMcpToolsResult>(buildPath(PATHS.mcpServersByServerIdDiscover, serverId), {}, opts)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type { RequestOptions } from '../types/index.js'\nimport type {\n Memory,\n ListMemoriesOptions,\n AcknowledgeMemoryInput,\n AcknowledgeMemoryResponse,\n} from './types.js'\n\n/**\n * MemoryService — read and manage the platform's cognitive memory layer.\n *\n * The memory layer automatically extracts facts, preferences, and instructions\n * from conversations. Memories are scoped to a user, project, agent, or session.\n *\n * Users can approve (lock in), reject (soft-delete), or correct (supersede)\n * any auto-extracted memory. Use `acknowledge()` to drive that lifecycle.\n *\n * @example\n * ```typescript\n * // List the current user's memories\n * const memories = await client.memory.list({ scope: 'user' })\n *\n * // Correct a wrong memory\n * await client.memory.acknowledge(memories[0].id, {\n * action: 'correct',\n * feedback: 'I prefer TypeScript, not JavaScript',\n * correctedContent: 'User prefers TypeScript',\n * })\n * ```\n */\nexport class MemoryService {\n constructor(private readonly http: HttpClient) {}\n\n /** List memories filtered by scope, acknowledgement state, and type. */\n async list(options: ListMemoriesOptions, opts?: RequestOptions): Promise<Memory[]> {\n const params = new URLSearchParams()\n params.set('scope', options.scope)\n if (options.scopeId) params.set('scopeId', options.scopeId)\n if (options.acknowledged !== undefined) params.set('acknowledged', String(options.acknowledged))\n if (options.memoryType) params.set('memoryType', options.memoryType)\n if (options.includeInactive) params.set('includeInactive', 'true')\n if (options.limit) params.set('limit', String(options.limit))\n const qs = params.toString()\n const result = await this.http.get<{ items: Memory[] }>(`/api/v1/memories?${qs}`, opts)\n return result.items ?? (result as unknown as Memory[])\n }\n\n /** Get a single memory by ID. */\n async get(memoryId: string, opts?: RequestOptions): Promise<Memory> {\n return this.http.get<Memory>(buildPath(PATHS.memoriesByMemoryId, memoryId), opts)\n }\n\n /**\n * Approve, reject, or correct a memory.\n *\n * - `approve` — lock the memory in as acknowledged\n * - `reject` — soft-delete via the forgetting service\n * - `correct` — create a superseding record with corrected content\n */\n async acknowledge(\n memoryId: string,\n input: AcknowledgeMemoryInput,\n opts?: RequestOptions,\n ): Promise<AcknowledgeMemoryResponse> {\n return this.http.patch<AcknowledgeMemoryResponse>(\n buildPath(PATHS.memoriesByMemoryIdAcknowledge, memoryId),\n input,\n opts,\n )\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js'\nimport type { RequestOptions } from '../types/index.js'\nimport type {\n Workspace,\n CreateWorkspaceInput,\n UpdateWorkspaceInput,\n Folder,\n CreateFolderInput,\n WorkspaceFile,\n TrashedItem,\n} from './types.js'\n\n/**\n * WorkspacesService — manage platform workspaces, folders, and files.\n *\n * Workspaces are personal or shared containers for files and folders.\n * Each workspace has a root folder auto-created on creation.\n * Files in trash are retained for 30 days before permanent deletion.\n *\n * @example\n * ```typescript\n * const ws = await client.workspaces.create({ name: 'My Project' })\n * const folder = await client.workspaces.createFolder({\n * name: 'Reports',\n * workspaceId: ws.id,\n * })\n * ```\n */\nexport class WorkspacesService {\n constructor(private readonly http: HttpClient) {}\n\n // ── Workspaces ────────────────────────────────────────────────────────────\n\n /** List all workspaces visible to the authenticated user. */\n async list(opts?: RequestOptions): Promise<Workspace[]> {\n return this.http.get<Workspace[]>(PATHS.workspaces, opts)\n }\n\n /** Get a single workspace by ID. */\n async get(workspaceId: string, opts?: RequestOptions): Promise<Workspace> {\n return this.http.get<Workspace>(buildPath(PATHS.workspacesByWorkspaceId, workspaceId), opts)\n }\n\n /** Create a new workspace. A root folder is auto-seeded. */\n async create(input: CreateWorkspaceInput, opts?: RequestOptions): Promise<Workspace> {\n return this.http.post<Workspace>(PATHS.workspaces, input, opts)\n }\n\n /** Update workspace name, description, or visibility. */\n async update(workspaceId: string, input: UpdateWorkspaceInput, opts?: RequestOptions): Promise<Workspace> {\n return this.http.patch<Workspace>(buildPath(PATHS.workspacesByWorkspaceId, workspaceId), input, opts)\n }\n\n /** Move a workspace to trash (30-day retention). */\n async delete(workspaceId: string, opts?: RequestOptions): Promise<void> {\n return this.http.delete(buildPath(PATHS.workspacesByWorkspaceId, workspaceId), opts)\n }\n\n // ── Folders ───────────────────────────────────────────────────────────────\n\n /** Create a folder inside a workspace. */\n async createFolder(input: CreateFolderInput, opts?: RequestOptions): Promise<Folder> {\n return this.http.post<Folder>(PATHS.workspacesFolders, input, opts)\n }\n\n /** List folders by workspace or parent folder. */\n async listFolders(params: { workspaceId?: string; parentId?: string }, opts?: RequestOptions): Promise<Folder[]> {\n const qs = new URLSearchParams(params as Record<string, string>).toString()\n return this.http.get<Folder[]>(`/api/v1/workspaces/folders?${qs}`, opts)\n }\n\n /** Rename a folder. */\n async renameFolder(folderId: string, name: string, opts?: RequestOptions): Promise<Folder> {\n return this.http.patch<Folder>(buildPath(PATHS.workspacesFoldersByFolderId, folderId), { name }, opts)\n }\n\n /** Move a folder (and all descendants) to trash. */\n async deleteFolder(folderId: string, opts?: RequestOptions): Promise<void> {\n return this.http.delete(buildPath(PATHS.workspacesFoldersByFolderId, folderId), opts)\n }\n\n /** Ensure (and return) the authenticated user's personal home folder. */\n async ensureHome(opts?: RequestOptions): Promise<Folder> {\n return this.http.post<Folder>(PATHS.workspacesHomeEnsure, {}, opts)\n }\n\n // ── Files ─────────────────────────────────────────────────────────────────\n\n /** List files in a workspace or folder. */\n async listFiles(\n params: { workspaceId?: string; folderId?: string },\n opts?: RequestOptions,\n ): Promise<WorkspaceFile[]> {\n const qs = new URLSearchParams(params as Record<string, string>).toString()\n return this.http.get<WorkspaceFile[]>(`/api/v1/workspaces/files?${qs}`, opts)\n }\n\n /** Get file metadata (not bytes). */\n async getFile(fileId: string, opts?: RequestOptions): Promise<WorkspaceFile> {\n return this.http.get<WorkspaceFile>(buildPath(PATHS.workspacesFilesByFileId, fileId), opts)\n }\n\n /** Get a signed download URL for a file. */\n async downloadUrl(fileId: string, opts?: RequestOptions): Promise<{ url: string }> {\n return this.http.get<{ url: string }>(buildPath(PATHS.workspacesFilesByFileIdDownload, fileId), opts)\n }\n\n /** Move a file to trash (30-day retention). */\n async deleteFile(fileId: string, opts?: RequestOptions): Promise<void> {\n return this.http.delete(buildPath(PATHS.workspacesFilesByFileId, fileId), opts)\n }\n\n // ── Trash ─────────────────────────────────────────────────────────────────\n\n /** List trashed workspaces, folders, and files (30-day window). */\n async listTrash(opts?: RequestOptions): Promise<TrashedItem[]> {\n return this.http.get<TrashedItem[]>(PATHS.workspacesTrash, opts)\n }\n\n /** Restore a trashed item by ID. */\n async restoreTrash(itemId: string, opts?: RequestOptions): Promise<void> {\n return this.http.post(PATHS.workspacesTrashRestore, { itemId }, opts)\n }\n}\n","import { buildPath } from '../_generated/build-path.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { App, AppMcpTool, RegisterAppInput, RegisterToolInput } from './types.js';\n\n/**\n * **App registration & identity** — the first step before using MCP or the\n * capability registry.\n *\n * ### When to use `client.apps.*`\n *\n * | Call | Purpose |\n * |------|---------|\n * | `apps.register({ name, description })` | Create a new **app identity** (OAuth client / service account). Returns an `App` with an `app_id` you'll use everywhere else. |\n * | `apps.me()` | Fetch the calling app's own profile. |\n * | `apps.registerTools(appId, tools)` | Low-level: register MCP tools for an app. Prefer {@link McpService.register} — it auto-scopes to the client's `appId`. |\n * | `apps.listTools(appId)` | Low-level: list MCP tools. Prefer {@link McpService.list}. |\n *\n * ### How this relates to McpService and RegistryService\n *\n * - **AppsService** (this class) — *identity*. Registers the app, mints the\n * `app_id`, and exposes the raw tool-registration REST endpoints.\n * - **McpService** (`client.mcp`) — *LLM tool-calling*. Built on top of\n * `app_id`; registers tools the LLM can invoke through an audited proxy.\n * Use when your app exposes tools an AI agent should call.\n * - **RegistryService** (`client.registry`) — *dynamic capability discovery*.\n * Apps register a manifest at boot; consumers discover and call tools at\n * runtime without knowing the owning app. Use for service-mesh-style\n * tool routing.\n *\n * @see {@link McpService} — for LLM/agent tool registration & invocation.\n * @see {@link RegistryService} — for dynamic runtime capability registry.\n */\nexport class AppsService {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a new application identity.\n * Returns an {@link App} containing the `app_id` needed for MCP tool\n * registration and registry manifests.\n *\n * Call this once per application (e.g. during onboarding or first boot),\n * then persist the `app_id` for all subsequent calls.\n */\n async register(input: RegisterAppInput): Promise<App> {\n return this.http.post(PATHS.appsRegister, input);\n }\n\n /** Fetch the calling app's own profile (identified by the Bearer token). */\n async me(): Promise<App> {\n return this.http.get(PATHS.appsMe);\n }\n\n /**\n * Register MCP tools for an app by ID.\n *\n * @deprecated Prefer {@link McpService.register}, which auto-scopes to the\n * client's configured `appId` and accepts the richer {@link McpTool} shape.\n * This method is kept for backward compatibility with code that manages\n * multiple app IDs.\n *\n * @see {@link McpService.register}\n */\n async registerTools(appId: string, tools: RegisterToolInput[]): Promise<AppMcpTool[]> {\n return this.http.post(buildPath(PATHS.appsByAppIdMcpTools, appId), { tools });\n }\n\n /**\n * List MCP tools registered for an app.\n *\n * @deprecated Prefer {@link McpService.list}, which auto-scopes to the\n * client's configured `appId`.\n *\n * @see {@link McpService.list}\n */\n async listTools(appId: string): Promise<AppMcpTool[]> {\n return this.http.get(buildPath(PATHS.appsByAppIdMcpTools, appId));\n }\n}\n","import { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { RequestOptions } from '../types/index.js';\nimport type {\n DiscoveredTool,\n RegisterManifest,\n RegisterResult,\n} from './types.js';\n\n/**\n * **Dynamic capability registry** — service-mesh-style tool discovery and\n * invocation across all registered apps.\n *\n * ### When to use `client.registry.*`\n *\n * Use this service when apps need **runtime, cross-app** tool discovery —\n * the set of available tools changes as apps boot and shut down:\n *\n * | Call | Purpose |\n * |------|---------|\n * | `registry.register(manifest)` | Register (or re-register) this app's capabilities + base_url. Call on every boot. |\n * | `registry.heartbeat(appCode)` | Keep the app marked `live`. Call within the stale window (default 90s). |\n * | `registry.discover()` | List tools available right now (live apps only). |\n * | `registry.call(appCode, tool, args)` | Invoke a registered tool. The backend validates args, authorizes, then routes. |\n *\n * ### How this relates to AppsService and McpService\n *\n * - **AppsService** (`client.apps`) — registers the *app identity* (the\n * `app_id` / `app_code`). The registry uses this identity to track which\n * app owns which tools.\n * - **McpService** (`client.mcp`) — *static, single-app* tool registration\n * for LLM agents. Tools are bound to a specific app_id at registration\n * time and invoked through an MCP proxy.\n * - **RegistryService** (this class) — *dynamic, cross-app* capability\n * discovery. Apps publish a manifest on boot with a `base_url`; consumers\n * discover what's live and call tools without knowing the owning app.\n * The backend proxies calls to the correct `base_url`.\n *\n * ### When to choose which\n *\n * | Use case | Service |\n * |----------|---------|\n * | Register app identity (one-time) | `client.apps.register` |\n * | Expose tools for LLM/agent calling | `client.mcp.register` |\n * | Dynamic tool discovery across apps | `client.registry.discover` |\n * | Service-mesh-style tool routing | `client.registry.call` |\n *\n * ### Validation\n *\n * Manifests can be pre-validated with {@link validateRegisterManifest} and\n * tool definitions with {@link validateToolDef}. Validation is opt-in —\n * the SDK does not enforce it on the register path.\n *\n * @see {@link AppsService} — app identity & registration.\n * @see {@link McpService} — single-app LLM tool proxy.\n * @see {@link validateRegisterManifest} — client-side manifest validation.\n * @see {@link validateToolDef} — client-side tool definition validation.\n *\n * @example\n * ```typescript\n * const client = CpodClient.fromEnv();\n *\n * // On app boot — register capabilities\n * await client.registry.register({\n * app_code: 'crm-service',\n * base_url: 'https://crm.internal:8080',\n * tools: [{\n * tool_name: 'crm.customer.list',\n * description: 'List customers',\n * kind: 'private_proxy',\n * endpoint: '/v1/customers',\n * method: 'GET',\n * }],\n * });\n *\n * // Consumer — discover and call\n * const tools = await client.registry.discover();\n * const { result } = await client.registry.call(\n * 'crm-service', 'crm.customer.list', { status: 'open' },\n * );\n * ```\n */\nexport class RegistryService {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register (or re-register) this app's capabilities.\n *\n * `base_url` is optional — only needed if the manifest declares\n * `private_proxy` tools; when given, it's captured every call, so a\n * restart on a new port overwrites the record.\n */\n async register(manifest: RegisterManifest, opts?: RequestOptions): Promise<RegisterResult> {\n return this.http.post<RegisterResult>(PATHS.registryRegister, manifest, opts);\n }\n\n /** Keep this app marked `live`. Call within the stale window (default 90s). */\n async heartbeat(appCode: string, opts?: RequestOptions): Promise<{ app_code: string; status: string }> {\n return this.http.post(PATHS.registryHeartbeat, { app_code: appCode }, opts);\n }\n\n /** List the tools available to the caller right now (live apps only). */\n async discover(opts?: RequestOptions): Promise<DiscoveredTool[]> {\n return this.http.get<DiscoveredTool[]>(PATHS.registryTools, opts);\n }\n\n /**\n * Invoke a registered tool by name.\n *\n * The backend validates `args` against the tool's JSON schema, authorizes,\n * then routes (proxy to the owning app, or — later — a central EDM op).\n * Pass the owning `appCode` plus the tool name and its args.\n *\n * @example\n * ```typescript\n * const { result } = await client.registry.call(\n * 'taskboard', 'taskboard.task.list', { status: 'open' },\n * );\n * ```\n */\n async call<T = unknown>(\n appCode: string,\n toolName: string,\n args: Record<string, unknown> = {},\n opts?: RequestOptions,\n ): Promise<{ app_code: string; tool_name: string; result: T }> {\n return this.http.post(PATHS.registryCall, {\n app_code: appCode,\n tool_name: toolName,\n args,\n }, opts);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { SqliteDatabase, SqliteDatabaseDetail, SqliteExecInput, SqliteExecResult } from './types.js';\n\nexport class StorageSqliteService {\n constructor(private readonly http: HttpClient) {}\n\n async listDatabases(): Promise<{ databases: SqliteDatabase[] }> {\n return this.http.get('/api/v1/storage/sqlite');\n }\n\n async getDatabase(db: string): Promise<SqliteDatabaseDetail> {\n return this.http.get(`/api/v1/storage/sqlite/${db}`);\n }\n\n async dropDatabase(db: string): Promise<void> {\n return this.http.delete(`/api/v1/storage/sqlite/${db}`);\n }\n\n async exec(db: string, input: SqliteExecInput): Promise<SqliteExecResult> {\n return this.http.post(`/api/v1/storage/sqlite/${db}/exec`, input);\n }\n\n async listTables(db: string): Promise<{ tables: string[] }> {\n return this.http.get(`/api/v1/storage/sqlite/${db}/tables`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n AccessRequest,\n CreateAccessRequestInput,\n HRRequest,\n CreateHRRequestInput,\n PendingItem,\n EquipmentRequest,\n CreateEquipmentRequestInput,\n TravelRequest,\n CreateTravelRequestInput,\n OperationsListOptions,\n OperationsPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by ID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: OperationsListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\n// Access Requests service\nexport class AccessRequestService {\n static readonly MCP_MANIFEST = manifest('Access Request', [\n { name: 'requester_id', type: 'string', required: true, description: 'User ID of the person requesting access, e.g. \"usr_01HXREQ\".' },\n { name: 'system_id', type: 'string', required: true, description: 'Target system identifier, e.g. \"sys_github\" (github, aws, slack).' },\n { name: 'access_type', type: 'string', required: true, description: 'Type of access change: one of \"new\", \"modify\", \"revoke\".' },\n { name: 'justification', type: 'string', required: true, description: 'Business justification, e.g. \"Need access to deploy production services.\".' },\n { name: 'status', type: 'string', description: 'Lifecycle status: one of \"pending\", \"approved\", \"rejected\", \"provisioned\", \"completed\" (default \"pending\").' },\n { name: 'approver_id', type: 'string', description: 'User ID of the approver, e.g. \"usr_01HXAPP\".' },\n { name: 'approved_at', type: 'string', description: 'ISO 8601 timestamp when approved, e.g. \"2026-01-15T10:00:00Z\".' },\n { name: 'provisioned_at', type: 'string', description: 'ISO 8601 timestamp when access was provisioned, e.g. \"2026-01-15T10:05:00Z\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"production\", \"engineering\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: OperationsListOptions): Promise<OperationsPageResult<AccessRequest>> {\n return this.http.get(withQuery(PATHS.operationsAccessRequests, options));\n }\n\n async get(id: string): Promise<AccessRequest> {\n return this.http.get(`${PATHS.operationsAccessRequests}/${id}`);\n }\n\n async create(input: CreateAccessRequestInput): Promise<AccessRequest> {\n return this.http.post(PATHS.operationsAccessRequests, input);\n }\n\n async update(id: string, patch: Partial<AccessRequest>): Promise<AccessRequest> {\n return this.http.patch(`${PATHS.operationsAccessRequests}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.operationsAccessRequests}/${id}`);\n }\n\n async approve(id: string, approverId: string, notes?: string): Promise<AccessRequest> {\n return this.http.post(`${PATHS.operationsAccessRequests}/${id}/approve`, { approverId, notes });\n }\n\n async reject(id: string, approverId: string, reason: string): Promise<AccessRequest> {\n return this.http.post(`${PATHS.operationsAccessRequests}/${id}/reject`, { approverId, reason });\n }\n\n async provision(id: string): Promise<AccessRequest> {\n return this.http.post(`${PATHS.operationsAccessRequests}/${id}/provision`, {});\n }\n}\n\n// HR Requests service\nexport class HRRequestService {\n static readonly MCP_MANIFEST = manifest('HR Request', [\n { name: 'requester_id', type: 'string', required: true, description: 'User ID of the person requesting the document/service, e.g. \"usr_01HXREQ\".' },\n { name: 'type', type: 'string', required: true, description: 'Type of HR request: one of \"employment_letter\", \"certificate\", \"verification\", \"document\", \"other\".' },\n { name: 'description', type: 'string', required: true, description: 'Description of the request, e.g. \"Employment verification letter for mortgage application.\".' },\n { name: 'status', type: 'string', description: 'Lifecycle status: one of \"pending\", \"in_progress\", \"completed\", \"rejected\" (default \"pending\").' },\n { name: 'deliverable_type', type: 'string', description: 'How the deliverable is provided: one of \"digital\", \"physical\" (default \"digital\").' },\n { name: 'deliverable_url', type: 'string', description: 'URL to the generated deliverable, e.g. \"https://storage.example.com/hr/employment-letter-123.pdf\".' },\n { name: 'fulfilled_by', type: 'string', description: 'User ID of the HR person who fulfilled the request, e.g. \"usr_01HXHR\".' },\n { name: 'fulfilled_at', type: 'string', description: 'ISO 8601 timestamp when fulfilled, e.g. \"2026-01-15T14:00:00Z\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"employment\", \"mortgage\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: OperationsListOptions): Promise<OperationsPageResult<HRRequest>> {\n return this.http.get(withQuery(PATHS.operationsHrRequests, options));\n }\n\n async get(id: string): Promise<HRRequest> {\n return this.http.get(`${PATHS.operationsHrRequests}/${id}`);\n }\n\n async create(input: CreateHRRequestInput): Promise<HRRequest> {\n return this.http.post(PATHS.operationsHrRequests, input);\n }\n\n async update(id: string, patch: Partial<HRRequest>): Promise<HRRequest> {\n return this.http.patch(`${PATHS.operationsHrRequests}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.operationsHrRequests}/${id}`);\n }\n\n async fulfill(id: string, fulfilledBy: string, deliverableUrl?: string): Promise<HRRequest> {\n return this.http.post(`${PATHS.operationsHrRequests}/${id}/fulfill`, { fulfilledBy, deliverableUrl });\n }\n}\n\n// Pending Workflows service (read-only aggregation)\nexport class PendingService {\n static readonly MCP_MANIFEST = manifest('Pending Item', [\n { name: 'type', type: 'string', required: true, description: 'Type of pending item, e.g. \"approval\" (approval, task, review, etc.).' },\n { name: 'source_id', type: 'string', required: true, description: 'ID of the source record, e.g. \"appr_01HXPEND\".' },\n { name: 'status', type: 'string', description: 'Pending item status: one of \"queued\", \"processing\", \"blocked\", \"completed\" (default \"queued\").' },\n { name: 'priority', type: 'number', description: 'Priority level (1 = highest, 5 = lowest), e.g. 2.' },\n { name: 'assignee_id', type: 'string', description: 'User ID of the person assigned to this item, e.g. \"usr_01HXASS\".' },\n { name: 'due_at', type: 'string', description: 'ISO 8601 due date/time, e.g. \"2026-01-20T17:00:00Z\".' },\n { name: 'title', type: 'string', description: 'Human-readable title, e.g. \"Approve budget for Q2 marketing campaign\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"approval\", \"finance\", \"urgent\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: OperationsListOptions): Promise<OperationsPageResult<PendingItem>> {\n return this.http.get(withQuery(PATHS.operationsPending, options));\n }\n\n async get(id: string): Promise<PendingItem> {\n return this.http.get(`${PATHS.operationsPending}/${id}`);\n }\n\n async create(input: Partial<PendingItem>): Promise<PendingItem> {\n return this.http.post(PATHS.operationsPending, input);\n }\n\n async update(id: string, patch: Partial<PendingItem>): Promise<PendingItem> {\n return this.http.patch(`${PATHS.operationsPending}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.operationsPending}/${id}`);\n }\n\n async query(filter: { status?: string; assigneeId?: string; type?: string }): Promise<PendingItem[]> {\n return this.http.post(`${PATHS.operationsPending}/query`, filter);\n }\n\n async aggregate(groupBy: 'status' | 'type' | 'assignee'): Promise<Record<string, number>> {\n return this.http.post(`${PATHS.operationsPending}/aggregate`, { groupBy });\n }\n}\n\n// Equipment Requests service\nexport class EquipmentService {\n static readonly MCP_MANIFEST = manifest('Equipment Request', [\n { name: 'requester_id', type: 'string', required: true, description: 'User ID of the person requesting equipment, e.g. \"usr_01HXREQ\".' },\n { name: 'equipment_type', type: 'string', required: true, description: 'Type of equipment, e.g. \"laptop\" (laptop, monitor, phone, etc.).' },\n { name: 'specification', type: 'string', required: true, description: 'Detailed specification, e.g. \"MacBook Pro 16-inch, M3 Max, 64GB RAM\".' },\n { name: 'status', type: 'string', description: 'Lifecycle status: one of \"requested\", \"approved\", \"ordered\", \"shipped\", \"delivered\", \"returned\" (default \"requested\").' },\n { name: 'approver_id', type: 'string', description: 'User ID of the approver, e.g. \"usr_01HXAPP\".' },\n { name: 'ordered_at', type: 'string', description: 'ISO 8601 timestamp when ordered, e.g. \"2026-01-15T10:00:00Z\".' },\n { name: 'delivered_at', type: 'string', description: 'ISO 8601 timestamp when delivered, e.g. \"2026-01-20T14:00:00Z\".' },\n { name: 'cost', type: 'number', description: 'Cost of the equipment, e.g. 2499.0.' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"engineering\", \"onboarding\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: OperationsListOptions): Promise<OperationsPageResult<EquipmentRequest>> {\n return this.http.get(withQuery(PATHS.operationsEquipment, options));\n }\n\n async get(id: string): Promise<EquipmentRequest> {\n return this.http.get(`${PATHS.operationsEquipment}/${id}`);\n }\n\n async create(input: CreateEquipmentRequestInput): Promise<EquipmentRequest> {\n return this.http.post(PATHS.operationsEquipment, input);\n }\n\n async update(id: string, patch: Partial<EquipmentRequest>): Promise<EquipmentRequest> {\n return this.http.patch(`${PATHS.operationsEquipment}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.operationsEquipment}/${id}`);\n }\n\n async provision(id: string): Promise<EquipmentRequest> {\n return this.http.post(`${PATHS.operationsEquipment}/${id}/provision`, {});\n }\n}\n\n// Travel Requests service\nexport class TravelService {\n static readonly MCP_MANIFEST = manifest('Travel Request', [\n { name: 'requester_id', type: 'string', required: true, description: 'User ID of the person traveling, e.g. \"usr_01HXREQ\".' },\n { name: 'purpose', type: 'string', required: true, description: 'Business purpose of the travel, e.g. \"Attend Q2 planning meeting with client.\".' },\n { name: 'destination', type: 'string', required: true, description: 'Travel destination, e.g. \"San Francisco, CA\".' },\n { name: 'departure_at', type: 'string', required: true, description: 'ISO 8601 departure date/time, e.g. \"2026-02-01T08:00:00Z\".' },\n { name: 'return_at', type: 'string', required: true, description: 'ISO 8601 return date/time, e.g. \"2026-02-03T18:00:00Z\".' },\n { name: 'status', type: 'string', description: 'Lifecycle status: one of \"requested\", \"approved\", \"booked\", \"completed\", \"cancelled\" (default \"requested\").' },\n { name: 'approver_id', type: 'string', description: 'User ID of the approver, e.g. \"usr_01HXAPP\".' },\n { name: 'booked_at', type: 'string', description: 'ISO 8601 timestamp when booked, e.g. \"2026-01-20T10:00:00Z\".' },\n { name: 'estimated_cost', type: 'number', description: 'Estimated total cost (flights, hotel, meals), e.g. 1500.0.' },\n { name: 'actual_cost', type: 'number', description: 'Actual total cost after travel, e.g. 1450.0.' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"client-meeting\", \"quarterly\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: OperationsListOptions): Promise<OperationsPageResult<TravelRequest>> {\n return this.http.get(withQuery(PATHS.operationsTravel, options));\n }\n\n async get(id: string): Promise<TravelRequest> {\n return this.http.get(`${PATHS.operationsTravel}/${id}`);\n }\n\n async create(input: CreateTravelRequestInput): Promise<TravelRequest> {\n return this.http.post(PATHS.operationsTravel, input);\n }\n\n async update(id: string, patch: Partial<TravelRequest>): Promise<TravelRequest> {\n return this.http.patch(`${PATHS.operationsTravel}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.operationsTravel}/${id}`);\n }\n\n async book(id: string, bookingDetails: { provider: string; confirmationNumber: string }): Promise<TravelRequest> {\n return this.http.post(`${PATHS.operationsTravel}/${id}/book`, bookingDetails);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type {\n Dashboard,\n CreateDashboardInput,\n Metric,\n MetricQuery,\n Report,\n CreateReportInput,\n GenerateReportRequest,\n AnalyticsListOptions,\n AnalyticsPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: AnalyticsListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class DashboardService {\n static readonly MCP_MANIFEST = manifest('Dashboard', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable dashboard name, e.g. \"Q4 Executive KPIs\".' },\n { name: 'description', type: 'string', description: 'Dashboard description, e.g. \"Quarterly executive dashboard with KPI exceptions and trends.\".' },\n { name: 'owner_id', type: 'string', required: true, description: 'User ID of the dashboard owner, e.g. \"usr_01HXABC\".' },\n { name: 'is_public', type: 'boolean', description: 'Whether this dashboard is visible to all users (default false).' },\n { name: 'layout', type: 'object', description: 'Dashboard layout configuration (widgets, positions, sizes).' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"executive\", \"quarterly\", \"kpi\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: AnalyticsListOptions): Promise<AnalyticsPageResult<Dashboard>> {\n return this.http.get(withQuery(PATHS.analyticsDashboards, options));\n }\n\n async get(id: string): Promise<Dashboard> {\n return this.http.get(`${PATHS.analyticsDashboards}/${id}`);\n }\n\n async create(input: CreateDashboardInput): Promise<Dashboard> {\n return this.http.post(PATHS.analyticsDashboards, input);\n }\n\n async update(id: string, patch: Partial<Dashboard>): Promise<Dashboard> {\n return this.http.patch(`${PATHS.analyticsDashboards}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.analyticsDashboards}/${id}`);\n }\n}\n\nexport class MetricService {\n static readonly MCP_MANIFEST = manifest('Metric', [\n { name: 'name', type: 'string', required: true, description: 'Metric name (Prometheus-style naming), e.g. \"api_requests_total\".' },\n { name: 'type', type: 'string', required: true, description: 'Metric type: one of \"counter\", \"gauge\", \"histogram\", \"summary\".' },\n { name: 'value', type: 'number', required: true, description: 'Current metric value, e.g. 42.5.' },\n { name: 'labels', type: 'object', description: 'Key-value labels for metric dimensions, e.g. {\"service\":\"api\",\"method\":\"GET\",\"status\":\"200\"}.' },\n { name: 'timestamp', type: 'string', description: 'ISO 8601 timestamp of the metric observation, e.g. \"2026-01-15T10:30:00Z\".' },\n { name: 'unit', type: 'string', description: 'Unit of measurement, e.g. \"requests\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: AnalyticsListOptions): Promise<AnalyticsPageResult<Metric>> {\n return this.http.get(withQuery(PATHS.analyticsMetrics, options));\n }\n\n async get(id: string): Promise<Metric> {\n return this.http.get(`${PATHS.analyticsMetrics}/${id}`);\n }\n\n async create(input: Partial<Metric>): Promise<Metric> {\n return this.http.post(PATHS.analyticsMetrics, input);\n }\n\n async update(id: string, patch: Partial<Metric>): Promise<Metric> {\n return this.http.patch(`${PATHS.analyticsMetrics}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.analyticsMetrics}/${id}`);\n }\n\n async query(filter: MetricQuery): Promise<Metric[]> {\n return this.http.post(`${PATHS.analyticsMetrics}/query`, filter);\n }\n}\n\nexport class ReportService {\n static readonly MCP_MANIFEST = manifest('Report', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable report name, e.g. \"Monthly Operations Report\".' },\n { name: 'type', type: 'string', required: true, description: 'Report type identifier, e.g. \"operations_summary\".' },\n { name: 'status', type: 'string', description: 'Report generation status: one of \"draft\", \"generating\", \"completed\", \"failed\" (default \"draft\").' },\n { name: 'parameters', type: 'object', description: 'Report generation parameters, e.g. {\"date_range\":\"2026-01\",\"departments\":[\"engineering\"]}.' },\n { name: 'generated_at', type: 'string', description: 'ISO 8601 timestamp when report was generated, e.g. \"2026-01-15T14:00:00Z\".' },\n { name: 'file_url', type: 'string', description: 'URL to the generated report file, e.g. \"https://storage.example.com/reports/monthly-ops-2026-01.pdf\".' },\n { name: 'owner_id', type: 'string', description: 'User ID of the report owner, e.g. \"usr_01HXABC\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"monthly\", \"operations\", \"executive\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: AnalyticsListOptions): Promise<AnalyticsPageResult<Report>> {\n return this.http.get(withQuery(PATHS.analyticsReports, options));\n }\n\n async get(id: string): Promise<Report> {\n return this.http.get(`${PATHS.analyticsReports}/${id}`);\n }\n\n async create(input: CreateReportInput): Promise<Report> {\n return this.http.post(PATHS.analyticsReports, input);\n }\n\n async update(id: string, patch: Partial<Report>): Promise<Report> {\n return this.http.patch(`${PATHS.analyticsReports}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.analyticsReports}/${id}`);\n }\n\n async generate(request: GenerateReportRequest): Promise<Report> {\n return this.http.post(PATHS.analyticsReportsGenerate, request);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n GraphNode,\n GraphEdge,\n GraphQuery,\n CreateGraphQueryInput,\n NodeQuery,\n EdgeQuery,\n ExecuteQueryRequest,\n GraphListOptions,\n GraphPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: GraphListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class NodeService {\n static readonly MCP_MANIFEST = manifest('Graph Node', [\n { name: 'type', type: 'string', required: true, description: 'Node type label, e.g. \"person\", \"project\", \"document\".' },\n { name: 'properties', type: 'object', required: true, description: 'Key-value properties attached to the node, e.g. {\"name\": \"Alice\", \"email\": \"alice@example.com\"}.' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"employee\", \"engineering\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: GraphListOptions): Promise<GraphPageResult<GraphNode>> {\n return this.http.get(withQuery(PATHS.graphNodes, options));\n }\n\n async get(id: string): Promise<GraphNode> {\n return this.http.get(`${PATHS.graphNodes}/${id}`);\n }\n\n async create(input: Partial<GraphNode>): Promise<GraphNode> {\n return this.http.post(PATHS.graphNodes, input);\n }\n\n async update(id: string, patch: Partial<GraphNode>): Promise<GraphNode> {\n return this.http.patch(`${PATHS.graphNodes}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.graphNodes}/${id}`);\n }\n\n async query(filter: NodeQuery): Promise<GraphNode[]> {\n return this.http.post(`${PATHS.graphNodes}/query`, filter);\n }\n}\n\nexport class EdgeService {\n static readonly MCP_MANIFEST = manifest('Graph Edge', [\n { name: 'source_id', type: 'string', required: true, description: 'Source node ID, e.g. \"node_01HXSRC\".' },\n { name: 'target_id', type: 'string', required: true, description: 'Target node ID, e.g. \"node_01HXTGT\".' },\n { name: 'type', type: 'string', required: true, description: 'Edge type label, e.g. \"reports_to\", \"owns\", \"member_of\".' },\n { name: 'properties', type: 'object', description: 'Key-value properties attached to the edge, e.g. {\"since\": \"2024-01-15\", \"weight\": 1.0}.' },\n { name: 'weight', type: 'number', description: 'Edge weight for weighted graph algorithms, e.g. 1.0.' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: GraphListOptions): Promise<GraphPageResult<GraphEdge>> {\n return this.http.get(withQuery(PATHS.graphEdges, options));\n }\n\n async get(id: string): Promise<GraphEdge> {\n return this.http.get(`${PATHS.graphEdges}/${id}`);\n }\n\n async create(input: Partial<GraphEdge>): Promise<GraphEdge> {\n return this.http.post(PATHS.graphEdges, input);\n }\n\n async update(id: string, patch: Partial<GraphEdge>): Promise<GraphEdge> {\n return this.http.patch(`${PATHS.graphEdges}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.graphEdges}/${id}`);\n }\n\n async query(filter: EdgeQuery): Promise<GraphEdge[]> {\n return this.http.post(`${PATHS.graphEdges}/query`, filter);\n }\n}\n\nexport class QueryService {\n static readonly MCP_MANIFEST = manifest('Graph Query', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable query name, e.g. \"Find all reports-to chains\".' },\n { name: 'query', type: 'string', required: true, description: 'Query text in the specified language, e.g. \"MATCH (a)-[:reports_to]->(b) RETURN a, b\".' },\n { name: 'language', type: 'string', required: true, description: 'Query language: one of \"cypher\", \"gremlin\", \"sparql\" (default \"cypher\").' },\n { name: 'description', type: 'string', description: 'Free-text description, e.g. \"Traversal query to find all reporting relationships.\".' },\n { name: 'owner_id', type: 'string', description: 'User ID of the query owner, e.g. \"usr_01HXABC\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"traversal\", \"hierarchy\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: GraphListOptions): Promise<GraphPageResult<GraphQuery>> {\n return this.http.get(withQuery(PATHS.graphQueries, options));\n }\n\n async get(id: string): Promise<GraphQuery> {\n return this.http.get(`${PATHS.graphQueries}/${id}`);\n }\n\n // Saved (stored) graph queries are creatable; `execute` runs an ad-hoc one.\n async create(input: CreateGraphQueryInput): Promise<GraphQuery> {\n return this.http.post(PATHS.graphQueries, input);\n }\n\n async update(id: string, patch: Partial<GraphQuery>): Promise<GraphQuery> {\n return this.http.patch(`${PATHS.graphQueries}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.graphQueries}/${id}`);\n }\n\n async execute(request: ExecuteQueryRequest): Promise<any> {\n return this.http.post(PATHS.graphQueriesExecute, request);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n DailyPlan,\n CreateDailyPlanInput,\n PlanItem,\n CreatePlanItemInput,\n PlannerListOptions,\n PlannerPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: PlannerListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class DailyPlanService {\n static readonly MCP_MANIFEST = manifest('Daily Plan', [\n { name: 'date', type: 'string', required: true, description: 'Plan date (YYYY-MM-DD), e.g. \"2026-01-15\".' },\n { name: 'owner_id', type: 'string', required: true, description: 'User ID of the plan owner, e.g. \"usr_01HXABC\".' },\n { name: 'focus', type: 'string', description: 'Primary focus or theme for the day, e.g. \"Ship analytics dashboard MVP\".' },\n { name: 'status', type: 'string', description: 'Plan lifecycle status: one of \"draft\", \"active\", \"completed\", \"archived\" (default \"draft\").' },\n { name: 'notes', type: 'string', description: 'Free-form notes for the day, e.g. \"Morning standup at 9am, then deep work on dashboard widgets.\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"sprint-12\", \"analytics\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: PlannerListOptions): Promise<PlannerPageResult<DailyPlan>> {\n return this.http.get(withQuery(PATHS.plannerDailyPlans, options));\n }\n\n async get(id: string): Promise<DailyPlan> {\n return this.http.get(`${PATHS.plannerDailyPlans}/${id}`);\n }\n\n async create(input: CreateDailyPlanInput): Promise<DailyPlan> {\n return this.http.post(PATHS.plannerDailyPlans, input);\n }\n\n async update(id: string, patch: Partial<DailyPlan>): Promise<DailyPlan> {\n return this.http.patch(`${PATHS.plannerDailyPlans}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.plannerDailyPlans}/${id}`);\n }\n}\n\nexport class PlanItemService {\n static readonly MCP_MANIFEST = manifest('Plan Item', [\n { name: 'plan_id', type: 'string', required: true, description: 'Parent daily plan ID, e.g. \"dplan_01HXPLAN\".' },\n { name: 'title', type: 'string', required: true, description: 'Plan item title, e.g. \"Review dashboard widget designs\".' },\n { name: 'description', type: 'string', description: 'Details, e.g. \"Review Figma mockups and provide feedback on layout and interactions.\".' },\n { name: 'status', type: 'string', description: 'Plan item status: one of \"planned\", \"in_progress\", \"completed\", \"deferred\", \"cancelled\" (default \"planned\").' },\n { name: 'priority', type: 'number', description: 'Priority level (1 = highest, 5 = lowest), e.g. 2.' },\n { name: 'estimated_minutes', type: 'number', description: 'Estimated time to complete in minutes, e.g. 90.' },\n { name: 'actual_minutes', type: 'number', description: 'Actual time spent in minutes, e.g. 75.' },\n { name: 'scheduled_at', type: 'string', description: 'ISO 8601 scheduled start time, e.g. \"2026-01-15T10:00:00Z\".' },\n { name: 'completed_at', type: 'string', description: 'ISO 8601 completion timestamp, e.g. \"2026-01-15T11:15:00Z\".' },\n { name: 'source_id', type: 'string', description: 'ID of the source record (task, meeting, etc.), e.g. \"tsk_01HXTASK\".' },\n { name: 'source_type', type: 'string', description: 'Type of source record (task, meeting, manual), e.g. \"task\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"design\", \"review\"].' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: PlannerListOptions): Promise<PlannerPageResult<PlanItem>> {\n return this.http.get(withQuery(PATHS.plannerPlanItems, options));\n }\n\n async get(id: string): Promise<PlanItem> {\n return this.http.get(`${PATHS.plannerPlanItems}/${id}`);\n }\n\n async create(input: CreatePlanItemInput): Promise<PlanItem> {\n return this.http.post(PATHS.plannerPlanItems, input);\n }\n\n async update(id: string, patch: Partial<PlanItem>): Promise<PlanItem> {\n return this.http.patch(`${PATHS.plannerPlanItems}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.plannerPlanItems}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type {\n TimelineEvent,\n CreateTimelineEventInput,\n PostmortemsListOptions,\n PostmortemsPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\nfunction withQuery(path: string, options?: PostmortemsListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class TimelineService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List postmortem timeline events.', params: PAGINATION },\n get: { description: 'Fetch a postmortem timeline event by UUID.', params: [ID_PARAM] },\n create: {\n description: 'Create a postmortem timeline event.',\n params: [\n { name: 'incident_id', type: 'string', required: true, description: 'Parent incident ID, e.g. \"inc_01HXINC\".' },\n { name: 'timestamp', type: 'string', required: true, description: 'ISO 8601 timestamp of the event, e.g. \"2026-01-15T10:30:00Z\".' },\n { name: 'type', type: 'string', required: true, description: 'Event type in the incident timeline: one of \"detection\", \"investigation\", \"mitigation\", \"resolution\", \"communication\", \"other\".' },\n { name: 'title', type: 'string', required: true, description: 'Human-readable event title, e.g. \"Alert triggered: API latency > 500ms\".' },\n { name: 'description', type: 'string', description: 'Detailed description of the event, e.g. \"PagerDuty alert fired for api-gateway service. On-call engineer acknowledged.\".' },\n { name: 'actor_id', type: 'string', description: 'User ID of the person who performed the action, e.g. \"usr_01HXACT\".' },\n { name: 'source', type: 'string', description: 'Source system that generated the event (pagerduty, slack, manual), e.g. \"pagerduty\".' },\n { name: 'metadata', type: 'object', description: 'Additional structured metadata, e.g. {\"severity\": \"high\", \"service\": \"api-gateway\"}.' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"severity-1\", \"api\", \"latency\"].' },\n ],\n },\n update: { description: 'Patch postmortem timeline event fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a postmortem timeline event.', params: [ID_PARAM] },\n };\n\n constructor(private http: HttpClient) {}\n\n async list(options?: PostmortemsListOptions): Promise<PostmortemsPageResult<TimelineEvent>> {\n return this.http.get(withQuery(PATHS.postmortemsTimeline, options));\n }\n\n async get(id: string): Promise<TimelineEvent> {\n return this.http.get(`${PATHS.postmortemsTimeline}/${id}`);\n }\n\n async create(input: CreateTimelineEventInput): Promise<TimelineEvent> {\n return this.http.post(PATHS.postmortemsTimeline, input);\n }\n\n async update(id: string, patch: Partial<TimelineEvent>): Promise<TimelineEvent> {\n return this.http.patch(`${PATHS.postmortemsTimeline}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.postmortemsTimeline}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type {\n VendorScorecard,\n CreateVendorScorecardInput,\n VendorInsurance,\n CreateVendorInsuranceInput,\n VendorCertification,\n CreateVendorCertificationInput,\n VendorContact,\n CreateVendorContactInput,\n VendorOnboarding,\n CreateVendorOnboardingInput,\n VendorListOptions,\n VendorPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: VendorListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class ScorecardService {\n static readonly MCP_MANIFEST = manifest('Vendor Scorecard', [\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor this scorecard rates, e.g. \"sup_01HXABC\".' },\n { name: 'period', type: 'string', required: true, description: 'Review period, e.g. \"2026-Q2\".' },\n { name: 'overall_score', type: 'number', description: 'Composite score across all dimensions, e.g. 85.' },\n { name: 'quality_score', type: 'number', description: 'Quality dimension score, e.g. 90.' },\n { name: 'delivery_score', type: 'number', description: 'On-time delivery dimension score, e.g. 80.' },\n { name: 'responsiveness', type: 'number', description: 'Responsiveness dimension score, e.g. 85.' },\n { name: 'notes', type: 'string', description: 'Free-form reviewer notes.' },\n { name: 'reviewer_id', type: 'string', description: 'User who authored this scorecard, e.g. \"usr_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"submitted\", \"approved\" (default \"draft\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: VendorListOptions): Promise<VendorPageResult<VendorScorecard>> {\n return this.http.get(withQuery(PATHS.vendorScorecards, options));\n }\n\n async get(id: string): Promise<VendorScorecard> {\n return this.http.get(`${PATHS.vendorScorecards}/${id}`);\n }\n\n async create(input: CreateVendorScorecardInput): Promise<VendorScorecard> {\n return this.http.post(PATHS.vendorScorecards, input);\n }\n\n async update(id: string, patch: Partial<VendorScorecard>): Promise<VendorScorecard> {\n return this.http.patch(`${PATHS.vendorScorecards}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.vendorScorecards}/${id}`);\n }\n}\n\nexport class InsuranceService {\n static readonly MCP_MANIFEST = manifest('Vendor Insurance', [\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor that carries this policy, e.g. \"sup_01HXABC\".' },\n { name: 'type', type: 'string', required: true, description: 'One of \"general_liability\", \"professional_liability\", \"cyber\", \"workers_comp\", \"epl\", \"property\", \"other\".' },\n { name: 'carrier', type: 'string', description: 'Insurance carrier, e.g. \"AIG\".' },\n { name: 'policy_number', type: 'string', description: 'Policy number, e.g. \"POL-2026-12345\".' },\n { name: 'coverage_amount', type: 'number', description: 'Coverage limit, e.g. 5000000.' },\n { name: 'effective_date', type: 'string', description: 'Policy effective date, e.g. \"2026-01-01T00:00:00Z\".' },\n { name: 'expiration_date', type: 'string', description: 'Policy expiration date, e.g. \"2027-01-01T00:00:00Z\".' },\n { name: 'status', type: 'string', description: 'One of \"active\", \"expired\", \"pending\", \"cancelled\" (default \"active\").' },\n { name: 'document_url', type: 'string', description: 'URL of the certificate of insurance.' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: VendorListOptions): Promise<VendorPageResult<VendorInsurance>> {\n return this.http.get(withQuery(PATHS.vendorInsurance, options));\n }\n\n async get(id: string): Promise<VendorInsurance> {\n return this.http.get(`${PATHS.vendorInsurance}/${id}`);\n }\n\n async create(input: CreateVendorInsuranceInput): Promise<VendorInsurance> {\n return this.http.post(PATHS.vendorInsurance, input);\n }\n\n async update(id: string, patch: Partial<VendorInsurance>): Promise<VendorInsurance> {\n return this.http.patch(`${PATHS.vendorInsurance}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.vendorInsurance}/${id}`);\n }\n}\n\nexport class CertificationService {\n static readonly MCP_MANIFEST = manifest('Vendor Certification', [\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor that holds this certification, e.g. \"sup_01HXABC\".' },\n { name: 'type', type: 'string', required: true, description: 'One of \"soc2_type1\", \"soc2_type2\", \"iso27001\", \"iso9001\", \"iso14001\", \"hipaa\", \"pci_dss\", \"fedramp\", \"hitrust\", \"gdpr\", \"other\".' },\n { name: 'status', type: 'string', description: 'One of \"current\", \"expired\", \"in_progress\", \"not_applicable\", \"revoked\" (default \"current\").' },\n { name: 'issued_date', type: 'string', description: 'Date issued, e.g. \"2026-01-15T00:00:00Z\".' },\n { name: 'expiration_date', type: 'string', description: 'Date it expires, e.g. \"2027-01-15T00:00:00Z\".' },\n { name: 'auditor', type: 'string', description: 'Auditor or certifying body, e.g. \"Deloitte\".' },\n { name: 'scope', type: 'string', description: 'Scope covered, e.g. \"All production services\".' },\n { name: 'findings', type: 'string', description: 'Summary of audit findings.' },\n { name: 'qualified_opinion', type: 'boolean', description: 'Whether the audit was a qualified opinion (default false).' },\n { name: 'document_url', type: 'string', description: 'URL of the certification document.' },\n { name: 'verified_at', type: 'string', description: 'When the certification was last verified.' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: VendorListOptions): Promise<VendorPageResult<VendorCertification>> {\n return this.http.get(withQuery(PATHS.vendorCertifications, options));\n }\n\n async get(id: string): Promise<VendorCertification> {\n return this.http.get(`${PATHS.vendorCertifications}/${id}`);\n }\n\n async create(input: CreateVendorCertificationInput): Promise<VendorCertification> {\n return this.http.post(PATHS.vendorCertifications, input);\n }\n\n async update(id: string, patch: Partial<VendorCertification>): Promise<VendorCertification> {\n return this.http.patch(`${PATHS.vendorCertifications}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.vendorCertifications}/${id}`);\n }\n}\n\nexport class VendorContactService {\n static readonly MCP_MANIFEST = manifest('Vendor Contact', [\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor this contact belongs to, e.g. \"sup_01HXABC\".' },\n { name: 'name', type: 'string', required: true, description: 'Contact full name, e.g. \"John Doe\".' },\n { name: 'email', type: 'string', description: 'Contact email, e.g. \"john@vendor.com\".' },\n { name: 'phone', type: 'string', description: 'Contact phone number, e.g. \"+1-555-0123\".' },\n { name: 'role', type: 'string', description: 'Contact role or title, e.g. \"Account Manager\".' },\n { name: 'department', type: 'string', description: 'Department, e.g. \"Sales\".' },\n { name: 'is_primary', type: 'boolean', description: 'Whether this is the primary contact (default false).' },\n { name: 'status', type: 'string', description: 'One of \"active\", \"inactive\" (default \"active\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: VendorListOptions): Promise<VendorPageResult<VendorContact>> {\n return this.http.get(withQuery(PATHS.vendorContacts, options));\n }\n\n async get(id: string): Promise<VendorContact> {\n return this.http.get(`${PATHS.vendorContacts}/${id}`);\n }\n\n async create(input: CreateVendorContactInput): Promise<VendorContact> {\n return this.http.post(PATHS.vendorContacts, input);\n }\n\n async update(id: string, patch: Partial<VendorContact>): Promise<VendorContact> {\n return this.http.patch(`${PATHS.vendorContacts}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.vendorContacts}/${id}`);\n }\n}\n\nexport class OnboardingService {\n static readonly MCP_MANIFEST = manifest('Vendor Onboarding', [\n { name: 'vendor_id', type: 'string', required: true, description: 'Vendor being onboarded, e.g. \"sup_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"pending\", \"in_progress\", \"completed\", \"cancelled\" (default \"pending\").' },\n { name: 'started_at', type: 'string', description: 'When onboarding started.' },\n { name: 'completed_at', type: 'string', description: 'When onboarding completed.' },\n { name: 'assignee_id', type: 'string', description: 'User driving onboarding, e.g. \"usr_01HXABC\".' },\n { name: 'steps_completed', type: 'object', description: 'Array of completed step identifiers, e.g. [\"nda\", \"security_review\"].' },\n { name: 'current_step', type: 'string', description: 'Current workflow step, e.g. \"security_review\".' },\n { name: 'notes', type: 'string', description: 'Free-form onboarding notes.' },\n { name: 'priority', type: 'string', description: 'One of \"low\", \"medium\", \"high\" (default \"medium\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: VendorListOptions): Promise<VendorPageResult<VendorOnboarding>> {\n return this.http.get(withQuery(PATHS.vendorOnboarding, options));\n }\n\n async get(id: string): Promise<VendorOnboarding> {\n return this.http.get(`${PATHS.vendorOnboarding}/${id}`);\n }\n\n async create(input: CreateVendorOnboardingInput): Promise<VendorOnboarding> {\n return this.http.post(PATHS.vendorOnboarding, input);\n }\n\n async update(id: string, patch: Partial<VendorOnboarding>): Promise<VendorOnboarding> {\n return this.http.patch(`${PATHS.vendorOnboarding}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.vendorOnboarding}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n Campaign,\n CreateCampaignInput,\n Lead,\n CreateLeadInput,\n Content,\n CreateContentInput,\n MarketingEvent,\n CreateMarketingEventInput,\n SocialPost,\n CreateSocialPostInput,\n MarketingEmail,\n CreateMarketingEmailInput,\n MarketingMetric,\n MarketingListOptions,\n MarketingPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = {\n name: string;\n type: 'string' | 'number' | 'boolean' | 'object';\n required?: boolean;\n description?: string;\n};\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: MarketingListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class CampaignService {\n static readonly MCP_MANIFEST = manifest('Marketing Campaign', [\n { name: 'name', type: 'string', required: true, description: 'Campaign name, e.g. \"Q3 Product Launch\".' },\n { name: 'type', type: 'string', description: 'One of \"email\", \"social\", \"content\", \"event\", \"paid\", \"organic\", \"multi_channel\" (default \"multi_channel\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"active\", \"paused\", \"completed\", \"cancelled\" (default \"draft\").' },\n { name: 'start_date', type: 'string', description: 'Campaign start, e.g. \"2026-07-01T00:00:00Z\".' },\n { name: 'end_date', type: 'string', description: 'Campaign end, e.g. \"2026-09-30T23:59:59Z\".' },\n { name: 'budget', type: 'number', description: 'Total budget, e.g. 50000.' },\n { name: 'spent', type: 'number', description: 'Amount spent to date, e.g. 0.' },\n { name: 'goals', type: 'object', description: 'Array of goal strings, e.g. [\"1000 leads\", \"20 demos\"].' },\n { name: 'owner_id', type: 'string', description: 'Owning user id, e.g. \"usr_01HXABC\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<Campaign>> {\n return this.http.get(withQuery(PATHS.marketingCampaigns, options));\n }\n\n async get(id: string): Promise<Campaign> {\n return this.http.get(`${PATHS.marketingCampaigns}/${id}`);\n }\n\n async create(input: CreateCampaignInput): Promise<Campaign> {\n return this.http.post(PATHS.marketingCampaigns, input);\n }\n\n async update(id: string, patch: Partial<Campaign>): Promise<Campaign> {\n return this.http.patch(`${PATHS.marketingCampaigns}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingCampaigns}/${id}`);\n }\n}\n\nexport class LeadService {\n static readonly MCP_MANIFEST = manifest('Marketing Lead', [\n { name: 'name', type: 'string', required: true, description: 'Lead full name, e.g. \"Jane Smith\".' },\n { name: 'email', type: 'string', description: 'Lead email, e.g. \"jane@example.com\".' },\n { name: 'source', type: 'string', description: 'Lead source, e.g. \"website_form\".' },\n { name: 'score', type: 'number', description: 'Lead score, e.g. 75 (default 0).' },\n { name: 'status', type: 'string', description: 'One of \"new\", \"qualified\", \"nurturing\", \"converted\", \"lost\" (default \"new\").' },\n { name: 'contact_id', type: 'string', description: 'Linked CRM contact id, e.g. \"cnt_01HXCONTACT\".' },\n { name: 'account_id', type: 'string', description: 'Linked CRM account id, e.g. \"acc_01HXACCOUNT\".' },\n { name: 'campaign_id', type: 'string', description: 'Originating campaign id, e.g. \"camp_01HXCAMP\".' },\n { name: 'assigned_to', type: 'string', description: 'Assigned user id, e.g. \"usr_01HXREP\".' },\n { name: 'notes', type: 'string', description: 'Free-text notes, e.g. \"Requested a demo of the cloud module.\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<Lead>> {\n return this.http.get(withQuery(PATHS.marketingLeads, options));\n }\n\n async get(id: string): Promise<Lead> {\n return this.http.get(`${PATHS.marketingLeads}/${id}`);\n }\n\n async create(input: CreateLeadInput): Promise<Lead> {\n return this.http.post(PATHS.marketingLeads, input);\n }\n\n async update(id: string, patch: Partial<Lead>): Promise<Lead> {\n return this.http.patch(`${PATHS.marketingLeads}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingLeads}/${id}`);\n }\n}\n\nexport class ContentService {\n static readonly MCP_MANIFEST = manifest('Marketing Content', [\n { name: 'title', type: 'string', required: true, description: 'Content title, e.g. \"10 Ways to Secure Your Cloud\".' },\n { name: 'type', type: 'string', description: 'One of \"blog\", \"whitepaper\", \"case_study\", \"video\", \"infographic\", \"webinar\", \"other\" (default \"blog\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"review\", \"published\", \"archived\" (default \"draft\").' },\n { name: 'author_id', type: 'string', description: 'Author user id, e.g. \"usr_01HXAUTHOR\".' },\n { name: 'published_at', type: 'string', description: 'Publish timestamp, e.g. \"2026-05-20T10:00:00Z\".' },\n { name: 'url', type: 'string', description: 'Published URL, e.g. \"https://blog.example.com/secure-cloud\".' },\n { name: 'campaign_id', type: 'string', description: 'Associated campaign id, e.g. \"camp_01HXCAMP\".' },\n { name: 'tags', type: 'object', description: 'Array of tag strings, e.g. [\"cloud\", \"security\"].' },\n { name: 'summary', type: 'string', description: 'Short summary, e.g. \"Practical hardening tips for cloud workloads.\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<Content>> {\n return this.http.get(withQuery(PATHS.marketingContent, options));\n }\n\n async get(id: string): Promise<Content> {\n return this.http.get(`${PATHS.marketingContent}/${id}`);\n }\n\n async create(input: CreateContentInput): Promise<Content> {\n return this.http.post(PATHS.marketingContent, input);\n }\n\n async update(id: string, patch: Partial<Content>): Promise<Content> {\n return this.http.patch(`${PATHS.marketingContent}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingContent}/${id}`);\n }\n}\n\nexport class MarketingEventService {\n static readonly MCP_MANIFEST = manifest('Marketing Event', [\n { name: 'name', type: 'string', required: true, description: 'Event name, e.g. \"CyberPod Summit 2026\".' },\n { name: 'type', type: 'string', description: 'One of \"webinar\", \"conference\", \"meetup\", \"workshop\", \"trade_show\", \"other\" (default \"webinar\").' },\n { name: 'status', type: 'string', description: 'One of \"planning\", \"active\", \"completed\", \"cancelled\" (default \"planning\").' },\n { name: 'start_date', type: 'string', description: 'Event start, e.g. \"2026-09-15T09:00:00Z\".' },\n { name: 'end_date', type: 'string', description: 'Event end, e.g. \"2026-09-15T17:00:00Z\".' },\n { name: 'location', type: 'string', description: 'Event location, e.g. \"Virtual\".' },\n { name: 'capacity', type: 'number', description: 'Max attendees, e.g. 500.' },\n { name: 'registered', type: 'number', description: 'Registered attendees, e.g. 0 (default 0).' },\n { name: 'campaign_id', type: 'string', description: 'Associated campaign id, e.g. \"camp_01HXCAMP\".' },\n { name: 'organizer_id', type: 'string', description: 'Organizer user id, e.g. \"usr_01HXORG\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<MarketingEvent>> {\n return this.http.get(withQuery(PATHS.marketingEvents, options));\n }\n\n async get(id: string): Promise<MarketingEvent> {\n return this.http.get(`${PATHS.marketingEvents}/${id}`);\n }\n\n async create(input: CreateMarketingEventInput): Promise<MarketingEvent> {\n return this.http.post(PATHS.marketingEvents, input);\n }\n\n async update(id: string, patch: Partial<MarketingEvent>): Promise<MarketingEvent> {\n return this.http.patch(`${PATHS.marketingEvents}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingEvents}/${id}`);\n }\n}\n\nexport class SocialService {\n static readonly MCP_MANIFEST = manifest('Marketing Social Post', [\n { name: 'platform', type: 'string', required: true, description: 'One of \"twitter\", \"linkedin\", \"facebook\", \"instagram\", \"youtube\", \"tiktok\", \"other\".' },\n { name: 'content', type: 'string', required: true, description: 'Post body, e.g. \"Join us at CyberPod Summit 2026!\".' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"scheduled\", \"published\", \"failed\" (default \"draft\").' },\n { name: 'scheduled_at', type: 'string', description: 'Scheduled publish time, e.g. \"2026-08-01T14:00:00Z\".' },\n { name: 'published_at', type: 'string', description: 'Actual publish time, e.g. \"2026-08-01T14:00:05Z\".' },\n { name: 'engagement', type: 'object', description: 'Engagement metrics object, e.g. {\"likes\":120,\"shares\":18}.' },\n { name: 'campaign_id', type: 'string', description: 'Associated campaign id, e.g. \"camp_01HXCAMP\".' },\n { name: 'author_id', type: 'string', description: 'Author user id, e.g. \"usr_01HXAUTHOR\".' },\n { name: 'external_id', type: 'string', description: 'Platform-native post id, e.g. \"tw_1789012345\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<SocialPost>> {\n return this.http.get(withQuery(PATHS.marketingSocial, options));\n }\n\n async get(id: string): Promise<SocialPost> {\n return this.http.get(`${PATHS.marketingSocial}/${id}`);\n }\n\n async create(input: CreateSocialPostInput): Promise<SocialPost> {\n return this.http.post(PATHS.marketingSocial, input);\n }\n\n async update(id: string, patch: Partial<SocialPost>): Promise<SocialPost> {\n return this.http.patch(`${PATHS.marketingSocial}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingSocial}/${id}`);\n }\n}\n\nexport class MarketingEmailService {\n static readonly MCP_MANIFEST = manifest('Marketing Email', [\n { name: 'subject', type: 'string', required: true, description: 'Email subject, e.g. \"Product Update — June 2026\".' },\n { name: 'campaign_id', type: 'string', description: 'Associated campaign id, e.g. \"camp_01HXCAMP\".' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"scheduled\", \"sent\", \"bounced\", \"cancelled\" (default \"draft\").' },\n { name: 'template_id', type: 'string', description: 'Email template id, e.g: \"tmpl_01HXTEMPLATE\".' },\n { name: 'sent_at', type: 'string', description: 'Send timestamp, e.g. \"2026-06-15T08:00:00Z\".' },\n { name: 'scheduled_at', type: 'string', description: 'Scheduled send time, e.g. \"2026-06-15T08:00:00Z\".' },\n { name: 'recipient_count', type: 'number', description: 'Number of recipients, e.g. 12000 (default 0).' },\n { name: 'open_rate', type: 'number', description: 'Open rate fraction, e.g. 0.42 (default 0).' },\n { name: 'click_rate', type: 'number', description: 'Click rate fraction, e.g. 0.11 (default 0).' },\n { name: 'bounce_rate', type: 'number', description: 'Bounce rate fraction, e.g. 0.02 (default 0).' },\n { name: 'author_id', type: 'string', description: 'Author user id, e.g. \"usr_01HXAUTHOR\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<MarketingEmail>> {\n return this.http.get(withQuery(PATHS.marketingEmails, options));\n }\n\n async get(id: string): Promise<MarketingEmail> {\n return this.http.get(`${PATHS.marketingEmails}/${id}`);\n }\n\n async create(input: CreateMarketingEmailInput): Promise<MarketingEmail> {\n return this.http.post(PATHS.marketingEmails, input);\n }\n\n async update(id: string, patch: Partial<MarketingEmail>): Promise<MarketingEmail> {\n return this.http.patch(`${PATHS.marketingEmails}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingEmails}/${id}`);\n }\n}\n\nexport class MarketingAnalyticsService {\n static readonly MCP_MANIFEST = manifest('Marketing Analytics Metric', [\n { name: 'campaign_id', type: 'string', required: true, description: 'Campaign this metric belongs to, e.g. \"camp_01HXCAMP\".' },\n { name: 'metric_type', type: 'string', required: true, description: 'One of \"impressions\", \"clicks\", \"conversions\", \"revenue\", \"cost_per_lead\", \"cost_per_acquisition\", \"roi\", \"other\".' },\n { name: 'value', type: 'number', required: true, description: 'Metric value, e.g. 1250.' },\n { name: 'period', type: 'string', description: 'Reporting period, e.g. \"2026-06\".' },\n { name: 'dimensions', type: 'object', description: 'Breakdown dimensions object, e.g. {\"channel\":\"email\",\"region\":\"NA\"}.' },\n { name: 'source', type: 'string', description: 'Data source, e.g. \"google_analytics\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: MarketingListOptions): Promise<MarketingPageResult<MarketingMetric>> {\n return this.http.get(withQuery(PATHS.marketingAnalytics, options));\n }\n\n async get(id: string): Promise<MarketingMetric> {\n return this.http.get(`${PATHS.marketingAnalytics}/${id}`);\n }\n\n async create(input: Partial<MarketingMetric>): Promise<MarketingMetric> {\n return this.http.post(PATHS.marketingAnalytics, input);\n }\n\n async update(id: string, patch: Partial<MarketingMetric>): Promise<MarketingMetric> {\n return this.http.patch(`${PATHS.marketingAnalytics}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.marketingAnalytics}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n LegalContract,\n CreateLegalContractInput,\n Nda,\n CreateNdaInput,\n LegalCase,\n CreateLegalCaseInput,\n IpAsset,\n CreateIpAssetInput,\n LegalCompliance,\n CreateLegalComplianceInput,\n LegalReview,\n CreateLegalReviewInput,\n LegalListOptions,\n LegalPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: LegalListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\nexport class LegalContractService {\n static readonly MCP_MANIFEST = manifest('Legal Contract', [\n { name: 'title', type: 'string', required: true, description: 'Contract title, e.g. \"Master Service Agreement\".' },\n { name: 'type', type: 'string', description: 'One of \"service\", \"partnership\", \"vendor\", \"employment\", \"other\" (default \"service\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"review\", \"signed\", \"active\", \"expired\", \"terminated\" (default \"draft\").' },\n { name: 'parties', type: 'object', description: 'Array of party identifiers/names on the contract.' },\n { name: 'effective_date', type: 'string', description: 'When the contract takes effect, e.g. \"2026-01-01T00:00:00Z\".' },\n { name: 'expiration_date', type: 'string', description: 'When the contract expires, e.g. \"2027-01-01T00:00:00Z\".' },\n { name: 'value', type: 'number', description: 'Total contract value, e.g. 250000.' },\n { name: 'clauses', type: 'object', description: 'Array of clause objects/strings.' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<LegalContract>> {\n return this.http.get(withQuery(PATHS.legalContracts, options));\n }\n\n async get(id: string): Promise<LegalContract> {\n return this.http.get(`${PATHS.legalContracts}/${id}`);\n }\n\n async create(input: CreateLegalContractInput): Promise<LegalContract> {\n return this.http.post(PATHS.legalContracts, input);\n }\n\n async update(id: string, patch: Partial<LegalContract>): Promise<LegalContract> {\n return this.http.patch(`${PATHS.legalContracts}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalContracts}/${id}`);\n }\n}\n\nexport class NdaService {\n static readonly MCP_MANIFEST = manifest('NDA', [\n { name: 'title', type: 'string', required: true, description: 'NDA title, e.g. \"Mutual NDA — Acme Corp\".' },\n { name: 'type', type: 'string', description: 'One of \"mutual\", \"unilateral\" (default \"mutual\").' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"sent\", \"signed\", \"expired\" (default \"draft\").' },\n { name: 'parties', type: 'object', description: 'Array of party identifiers/names on the NDA.' },\n { name: 'effective_date', type: 'string', description: 'When the NDA takes effect, e.g. \"2026-01-01T00:00:00Z\".' },\n { name: 'expiration_date', type: 'string', description: 'When the NDA expires, e.g. \"2027-01-01T00:00:00Z\".' },\n { name: 'scope', type: 'string', description: 'Scope of the NDA, e.g. \"Technical discussions and proprietary information\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<Nda>> {\n return this.http.get(withQuery(PATHS.legalNdas, options));\n }\n\n async get(id: string): Promise<Nda> {\n return this.http.get(`${PATHS.legalNdas}/${id}`);\n }\n\n async create(input: CreateNdaInput): Promise<Nda> {\n return this.http.post(PATHS.legalNdas, input);\n }\n\n async update(id: string, patch: Partial<Nda>): Promise<Nda> {\n return this.http.patch(`${PATHS.legalNdas}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalNdas}/${id}`);\n }\n}\n\nexport class LegalCaseService {\n static readonly MCP_MANIFEST = manifest('Legal Case', [\n { name: 'title', type: 'string', required: true, description: 'Case title, e.g. \"Patent Infringement — US2024/123\".' },\n { name: 'type', type: 'string', description: 'One of \"litigation\", \"regulatory\", \"contract\", \"ip\", \"other\" (default \"other\").' },\n { name: 'status', type: 'string', description: 'One of \"open\", \"pending\", \"closed\", \"escalated\" (default \"open\").' },\n { name: 'assigned_to', type: 'string', description: 'User id the case is assigned to, e.g. \"usr_01HXABC\".' },\n { name: 'notes', type: 'string', description: 'Free-text case notes.' },\n { name: 'priority', type: 'string', description: 'One of \"low\", \"medium\", \"high\", \"critical\" (default \"medium\").' },\n { name: 'related_entity_id', type: 'string', description: 'ID of a related entity, e.g. \"lcon_01HXABC\".' },\n { name: 'related_entity_type', type: 'string', description: 'Type of the related entity, e.g. \"contract\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<LegalCase>> {\n return this.http.get(withQuery(PATHS.legalCases, options));\n }\n\n async get(id: string): Promise<LegalCase> {\n return this.http.get(`${PATHS.legalCases}/${id}`);\n }\n\n async create(input: CreateLegalCaseInput): Promise<LegalCase> {\n return this.http.post(PATHS.legalCases, input);\n }\n\n async update(id: string, patch: Partial<LegalCase>): Promise<LegalCase> {\n return this.http.patch(`${PATHS.legalCases}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalCases}/${id}`);\n }\n}\n\nexport class IpService {\n static readonly MCP_MANIFEST = manifest('IP Asset', [\n { name: 'title', type: 'string', required: true, description: 'IP asset title, e.g. \"CyberPod Platform Patent\".' },\n { name: 'type', type: 'string', description: 'One of \"patent\", \"trademark\", \"copyright\", \"trade_secret\", \"other\" (default \"patent\").' },\n { name: 'status', type: 'string', description: 'One of \"pending\", \"registered\", \"expired\", \"abandoned\" (default \"pending\").' },\n { name: 'registration_number', type: 'string', description: 'Registration/application number, e.g. \"US2024/123456\".' },\n { name: 'filed_at', type: 'string', description: 'When the IP was filed, e.g. \"2024-03-15T00:00:00Z\".' },\n { name: 'granted_at', type: 'string', description: 'When the IP was granted, e.g. \"2025-09-01T00:00:00Z\".' },\n { name: 'jurisdiction', type: 'string', description: 'Jurisdiction code, e.g. \"US\".' },\n { name: 'owner_id', type: 'string', description: 'Owner user/org id, e.g. \"usr_01HXABC\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<IpAsset>> {\n return this.http.get(withQuery(PATHS.legalIp, options));\n }\n\n async get(id: string): Promise<IpAsset> {\n return this.http.get(`${PATHS.legalIp}/${id}`);\n }\n\n async create(input: CreateIpAssetInput): Promise<IpAsset> {\n return this.http.post(PATHS.legalIp, input);\n }\n\n async update(id: string, patch: Partial<IpAsset>): Promise<IpAsset> {\n return this.http.patch(`${PATHS.legalIp}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalIp}/${id}`);\n }\n}\n\nexport class LegalComplianceService {\n static readonly MCP_MANIFEST = manifest('Legal Compliance Record', [\n { name: 'title', type: 'string', required: true, description: 'Compliance record title, e.g. \"GDPR Data Processing Audit\".' },\n { name: 'framework', type: 'string', description: 'One of \"gdpr\", \"hipaa\", \"sox\", \"pci_dss\", \"iso_27001\", \"fedramp\", \"other\" (default \"other\").' },\n { name: 'status', type: 'string', description: 'One of \"compliant\", \"non_compliant\", \"in_progress\", \"not_assessed\" (default \"not_assessed\").' },\n { name: 'assessed_at', type: 'string', description: 'When the assessment was done, e.g. \"2026-05-10T00:00:00Z\".' },\n { name: 'assessor_id', type: 'string', description: 'Assessor user id, e.g. \"usr_01HXABC\".' },\n { name: 'findings', type: 'string', description: 'Free-text findings from the assessment.' },\n { name: 'remediation_plan', type: 'string', description: 'Free-text remediation plan.' },\n { name: 'next_review_date', type: 'string', description: 'Date of the next review, e.g. \"2026-11-10T00:00:00Z\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<LegalCompliance>> {\n return this.http.get(withQuery(PATHS.legalCompliance, options));\n }\n\n async get(id: string): Promise<LegalCompliance> {\n return this.http.get(`${PATHS.legalCompliance}/${id}`);\n }\n\n async create(input: CreateLegalComplianceInput): Promise<LegalCompliance> {\n return this.http.post(PATHS.legalCompliance, input);\n }\n\n async update(id: string, patch: Partial<LegalCompliance>): Promise<LegalCompliance> {\n return this.http.patch(`${PATHS.legalCompliance}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalCompliance}/${id}`);\n }\n}\n\nexport class LegalReviewService {\n static readonly MCP_MANIFEST = manifest('Legal Review', [\n { name: 'type', type: 'string', required: true, description: 'One of \"contract\", \"nda\", \"policy\", \"compliance\", \"other\".' },\n { name: 'target_id', type: 'string', required: true, description: 'ID of the entity under review, e.g. \"lcon_01HXABC\".' },\n { name: 'reviewer_id', type: 'string', required: true, description: 'Reviewer user id, e.g. \"usr_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"pending\", \"approved\", \"rejected\", \"changes_requested\" (default \"pending\").' },\n { name: 'comments', type: 'string', description: 'Free-text reviewer comments.' },\n { name: 'reviewed_at', type: 'string', description: 'When the review was completed, e.g. \"2026-06-02T00:00:00Z\".' },\n { name: 'risk_level', type: 'string', description: 'One of \"low\", \"medium\", \"high\" (default \"medium\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n async list(options?: LegalListOptions): Promise<LegalPageResult<LegalReview>> {\n return this.http.get(withQuery(PATHS.legalReviews, options));\n }\n\n async get(id: string): Promise<LegalReview> {\n return this.http.get(`${PATHS.legalReviews}/${id}`);\n }\n\n async create(input: CreateLegalReviewInput): Promise<LegalReview> {\n return this.http.post(PATHS.legalReviews, input);\n }\n\n async update(id: string, patch: Partial<LegalReview>): Promise<LegalReview> {\n return this.http.patch(`${PATHS.legalReviews}/${id}`, patch);\n }\n\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.legalReviews}/${id}`);\n }\n}\n","import { HttpCrudService, type PaginatedResponse } from '../edms/crud.js';\nimport type { HttpClient } from '../http/client.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type {\n Survey,\n CreateSurveyInput,\n SurveyResponse,\n CreateSurveyResponseInput,\n SurveyAnalytics,\n CreateSurveyAnalyticsInput,\n SurveysListOptions,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: SurveysListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\n/**\n * Survey definitions and configuration.\n *\n * Manages the lifecycle of surveys (draft → active → closed → archived),\n * including their question sets, audience targeting, and scheduling.\n */\nexport class SurveyService extends HttpCrudService<Survey> {\n static readonly MCP_MANIFEST = manifest('Survey', [\n { name: 'title', type: 'string', required: true, description: 'Survey title, e.g. \"Q2 Employee Engagement Pulse\".' },\n { name: 'description', type: 'string', description: 'Free-text description of the survey purpose or scope.' },\n { name: 'questions', type: 'object', description: 'Array of question objects, each with { id, type, text, options?, required? }.' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"active\", \"closed\", \"archived\" (default \"draft\").' },\n { name: 'audience', type: 'string', description: 'Audience descriptor, e.g. \"all_employees\", \"customer_segment:enterprise\".' },\n { name: 'scheduled_at', type: 'string', description: 'ISO-8601 timestamp when the survey should open, e.g. \"2026-07-01T09:00:00Z\".' },\n { name: 'owner_id', type: 'string', description: 'Owner user id, e.g. \"usr_01HXABC\".' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.surveysSurveys);\n }\n\n /** List surveys with optional status, search, and paging filters. */\n override list(options?: SurveysListOptions): Promise<PaginatedResponse<Survey>> {\n return this.http.get(withQuery(this.path, options)) as Promise<PaginatedResponse<Survey>>;\n }\n\n /** Fetch a single survey by id. */\n override get(id: string): Promise<Survey> {\n return this.http.get(`${this.path}/${id}`) as Promise<Survey>;\n }\n\n /** Create a new survey. */\n createSurvey(input: CreateSurveyInput): Promise<Survey> {\n return this.http.post(this.path, input as unknown as Record<string, unknown>) as Promise<Survey>;\n }\n\n /** Patch survey fields (title, description, status, questions, audience, …). */\n override update(id: string, patch: Partial<Survey>): Promise<Survey> {\n return this.http.patch(`${this.path}/${id}`, patch as Record<string, unknown>) as Promise<Survey>;\n }\n\n /** Soft-delete a survey. */\n override delete(id: string): Promise<void> {\n return this.http.delete(`${this.path}/${id}`);\n }\n}\n\n/**\n * Individual survey responses.\n *\n * Each response is tied to a parent survey and captures the respondent's\n * answers as a questionId → answer map. Responses may be anonymous\n * (respondentId omitted).\n */\nexport class ResponseService extends HttpCrudService<SurveyResponse> {\n static readonly MCP_MANIFEST = manifest('Survey Response', [\n { name: 'survey_id', type: 'string', required: true, description: 'Id of the parent survey, e.g. \"srv_01HXABC\".' },\n { name: 'respondent_id', type: 'string', description: 'Respondent user id. Omit for anonymous submissions.' },\n { name: 'answers', type: 'object', required: true, description: 'Map of questionId to answer value, e.g. { \"q1\": \"Agree\", \"q2\": 4 }.' },\n { name: 'submitted_at', type: 'string', description: 'ISO-8601 submission timestamp, e.g. \"2026-06-10T14:30:00Z\".' },\n { name: 'duration', type: 'number', description: 'Time in seconds the respondent spent completing the survey.' },\n { name: 'source', type: 'string', description: 'One of \"email\", \"web\", \"mobile\", \"kiosk\" (default \"web\").' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.surveysResponses);\n }\n\n /** List responses with optional surveyId, source, search, and paging filters. */\n override list(options?: SurveysListOptions): Promise<PaginatedResponse<SurveyResponse>> {\n return this.http.get(withQuery(this.path, options)) as Promise<PaginatedResponse<SurveyResponse>>;\n }\n\n /** Fetch a single response by id. */\n override get(id: string): Promise<SurveyResponse> {\n return this.http.get(`${this.path}/${id}`) as Promise<SurveyResponse>;\n }\n\n /** Record a new survey response. */\n createResponse(input: CreateSurveyResponseInput): Promise<SurveyResponse> {\n return this.http.post(this.path, input as unknown as Record<string, unknown>) as Promise<SurveyResponse>;\n }\n\n /** Patch response fields (answers, duration, …). */\n override update(id: string, patch: Partial<SurveyResponse>): Promise<SurveyResponse> {\n return this.http.patch(`${this.path}/${id}`, patch as Record<string, unknown>) as Promise<SurveyResponse>;\n }\n\n /** Soft-delete a response. */\n override delete(id: string): Promise<void> {\n return this.http.delete(`${this.path}/${id}`);\n }\n}\n\n/**\n * Survey analytics and benchmarks.\n *\n * Aggregated analytics snapshots per survey and period, including response\n * counts, completion rate, average score, per-question breakdowns, sentiment\n * analysis, and industry benchmark comparisons.\n */\nexport class AnalyticsService extends HttpCrudService<SurveyAnalytics> {\n static readonly MCP_MANIFEST = manifest('Survey Analytics Record', [\n { name: 'survey_id', type: 'string', required: true, description: 'Id of the parent survey, e.g. \"srv_01HXABC\".' },\n { name: 'period', type: 'string', description: 'Analytics period, e.g. \"2026-Q2\", \"last_30_days\", \"all_time\".' },\n { name: 'total_responses', type: 'number', description: 'Total number of responses in this period.' },\n { name: 'completion_rate', type: 'number', description: 'Percentage of started surveys that were completed (0–100).' },\n { name: 'average_score', type: 'number', description: 'Overall average score across scored questions, if applicable.' },\n { name: 'question_breakdown', type: 'object', description: 'Per-question stats, keyed by questionId.' },\n { name: 'sentiment_analysis', type: 'object', description: 'Sentiment distribution, e.g. { positive: 0.6, neutral: 0.3, negative: 0.1 }.' },\n { name: 'benchmarks', type: 'object', description: 'Industry benchmark comparison, e.g. { completionRateDelta: +5.2 }.' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.surveysAnalytics);\n }\n\n /** List analytics records with optional surveyId, period, search, and paging filters. */\n override list(options?: SurveysListOptions): Promise<PaginatedResponse<SurveyAnalytics>> {\n return this.http.get(withQuery(this.path, options)) as Promise<PaginatedResponse<SurveyAnalytics>>;\n }\n\n /** Fetch a single analytics record by id. */\n override get(id: string): Promise<SurveyAnalytics> {\n return this.http.get(`${this.path}/${id}`) as Promise<SurveyAnalytics>;\n }\n\n /** Create or refresh an analytics snapshot. */\n createAnalytics(input: CreateSurveyAnalyticsInput): Promise<SurveyAnalytics> {\n return this.http.post(this.path, input as unknown as Record<string, unknown>) as Promise<SurveyAnalytics>;\n }\n\n /** Patch analytics fields (benchmarks, sentimentAnalysis, …). */\n override update(id: string, patch: Partial<SurveyAnalytics>): Promise<SurveyAnalytics> {\n return this.http.patch(`${this.path}/${id}`, patch as Record<string, unknown>) as Promise<SurveyAnalytics>;\n }\n\n /** Soft-delete an analytics record. */\n override delete(id: string): Promise<void> {\n return this.http.delete(`${this.path}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n ProcessMap,\n CreateProcessMapInput,\n Bottleneck,\n CreateBottleneckInput,\n EfficiencyScore,\n CreateEfficiencyScoreInput,\n ProcessListOptions,\n ProcessPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = { name: string; type: 'string' | 'number' | 'boolean' | 'object'; required?: boolean; description?: string };\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: ProcessListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\n/** CRUD service for process maps — flow definitions and their steps. */\nexport class ProcessMapService {\n static readonly MCP_MANIFEST = manifest('Process Map', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable name, e.g. \"Customer Onboarding Flow\".' },\n { name: 'description', type: 'string', description: 'Free-text description of what the process covers.' },\n { name: 'steps', type: 'object', description: 'Array of step objects with id, name, duration, and dependencies.' },\n { name: 'owner', type: 'string', description: 'Owner user/org identifier, e.g. \"usr_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"active\", \"archived\" (default \"draft\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List process maps with optional filtering and pagination. */\n async list(options?: ProcessListOptions): Promise<ProcessPageResult<ProcessMap>> {\n return this.http.get(withQuery(PATHS.processMaps, options));\n }\n\n /** Fetch a single process map by its UUID. */\n async get(id: string): Promise<ProcessMap> {\n return this.http.get(`${PATHS.processMaps}/${id}`);\n }\n\n /** Create a new process map. */\n async create(input: CreateProcessMapInput): Promise<ProcessMap> {\n return this.http.post(PATHS.processMaps, input);\n }\n\n /** Partially update an existing process map. */\n async update(id: string, patch: Partial<ProcessMap>): Promise<ProcessMap> {\n return this.http.patch(`${PATHS.processMaps}/${id}`, patch);\n }\n\n /** Soft-delete a process map. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.processMaps}/${id}`);\n }\n}\n\n/** CRUD service for bottlenecks — identified delays within process steps. */\nexport class BottleneckService {\n static readonly MCP_MANIFEST = manifest('Bottleneck', [\n { name: 'processMapId', type: 'string', required: true, description: 'ID of the process map this bottleneck belongs to, e.g. \"pmap_01HXABC\".' },\n { name: 'stepId', type: 'string', required: true, description: 'ID of the specific step where the bottleneck was detected.' },\n { name: 'severity', type: 'string', description: 'One of \"low\", \"medium\", \"high\", \"critical\" (default \"medium\").' },\n { name: 'impact', type: 'string', description: 'Quantified or described impact of the bottleneck.' },\n { name: 'rootCause', type: 'string', description: 'Identified root cause of the delay.' },\n { name: 'recommendations', type: 'object', description: 'Array of suggested actions to resolve the bottleneck.' },\n { name: 'status', type: 'string', description: 'One of \"identified\", \"analyzing\", \"resolved\" (default \"identified\").' },\n { name: 'detectedAt', type: 'string', description: 'When the bottleneck was first detected, e.g. \"2026-06-01T00:00:00Z\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List bottlenecks with optional filtering and pagination. */\n async list(options?: ProcessListOptions): Promise<ProcessPageResult<Bottleneck>> {\n return this.http.get(withQuery(PATHS.processBottlenecks, options));\n }\n\n /** Fetch a single bottleneck by its UUID. */\n async get(id: string): Promise<Bottleneck> {\n return this.http.get(`${PATHS.processBottlenecks}/${id}`);\n }\n\n /** Record a new bottleneck. */\n async create(input: CreateBottleneckInput): Promise<Bottleneck> {\n return this.http.post(PATHS.processBottlenecks, input);\n }\n\n /** Partially update an existing bottleneck. */\n async update(id: string, patch: Partial<Bottleneck>): Promise<Bottleneck> {\n return this.http.patch(`${PATHS.processBottlenecks}/${id}`, patch);\n }\n\n /** Soft-delete a bottleneck. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.processBottlenecks}/${id}`);\n }\n}\n\n/** CRUD service for efficiency scores — point-in-time process efficiency measurements. */\nexport class EfficiencyScoreService {\n static readonly MCP_MANIFEST = manifest('Efficiency Score', [\n { name: 'processMapId', type: 'string', required: true, description: 'ID of the process map being scored, e.g. \"pmap_01HXABC\".' },\n { name: 'score', type: 'number', required: true, description: 'Overall efficiency score from 0 to 100.' },\n { name: 'cycleTime', type: 'number', description: 'Average cycle time in minutes.' },\n { name: 'throughput', type: 'number', description: 'Number of completions per period.' },\n { name: 'defectRate', type: 'number', description: 'Percentage of outputs with defects (0-100).' },\n { name: 'measuredAt', type: 'string', description: 'When the measurement was taken, e.g. \"2026-06-01T00:00:00Z\".' },\n { name: 'period', type: 'string', description: 'One of \"day\", \"week\", \"month\", \"quarter\" (default \"day\").' },\n { name: 'breakdown', type: 'object', description: 'Per-dimension score breakdown (speed, quality, utilization, throughput).' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List efficiency scores with optional filtering and pagination. */\n async list(options?: ProcessListOptions): Promise<ProcessPageResult<EfficiencyScore>> {\n return this.http.get(withQuery(PATHS.processEfficiencyScores, options));\n }\n\n /** Fetch a single efficiency score by its UUID. */\n async get(id: string): Promise<EfficiencyScore> {\n return this.http.get(`${PATHS.processEfficiencyScores}/${id}`);\n }\n\n /** Record a new efficiency score. */\n async create(input: CreateEfficiencyScoreInput): Promise<EfficiencyScore> {\n return this.http.post(PATHS.processEfficiencyScores, input);\n }\n\n /** Partially update an existing efficiency score. */\n async update(id: string, patch: Partial<EfficiencyScore>): Promise<EfficiencyScore> {\n return this.http.patch(`${PATHS.processEfficiencyScores}/${id}`, patch);\n }\n\n /** Soft-delete an efficiency score. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.processEfficiencyScores}/${id}`);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type {\n HealthScore,\n CreateHealthScoreInput,\n Playbook,\n CreatePlaybookInput,\n OnboardingPlan,\n CreateOnboardingPlanInput,\n RetentionRisk,\n CreateRetentionRiskInput,\n Expansion,\n CreateExpansionInput,\n ClientOpsListOptions,\n ClientOpsPageResult,\n} from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n { name: 'customerId', type: 'string' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = {\n name: string;\n type: 'string' | 'number' | 'boolean' | 'object';\n required?: boolean;\n description?: string;\n};\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label} records.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\nfunction withQuery(path: string, options?: ClientOpsListOptions): string {\n if (!options) return path;\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options)) {\n if (value !== undefined && value !== null && value !== '') {\n params.set(key, String(value));\n }\n }\n const query = params.toString();\n return query ? `${path}?${query}` : path;\n}\n\n// ---------------------------------------------------------------------------\n// HealthScoreService\n// ---------------------------------------------------------------------------\n\n/**\n * Service for managing customer health scores.\n *\n * Health scores aggregate multiple signals (usage, sentiment, support load)\n * into a single 0-100 metric with trend tracking per customer.\n */\nexport class HealthScoreService {\n static readonly MCP_MANIFEST = manifest('Health Score', [\n { name: 'customer_id', type: 'string', required: true, description: 'Customer identifier, e.g. \"cust_01HXABC\".' },\n { name: 'score', type: 'number', required: true, description: 'Health score from 0 (poor) to 100 (excellent).' },\n { name: 'trend', type: 'string', description: 'One of \"improving\", \"stable\", \"declining\" (default \"stable\").' },\n { name: 'factors', type: 'object', description: 'Key/value breakdown of contributing factors, e.g. {\"usage\": 85, \"sentiment\": 72}.' },\n { name: 'last_calculated_at', type: 'string', description: 'ISO-8601 timestamp of the last score calculation, e.g. \"2026-06-10T12:00:00Z\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List health scores with optional pagination, search, and customer filter. */\n async list(options?: ClientOpsListOptions): Promise<ClientOpsPageResult<HealthScore>> {\n return this.http.get(withQuery(PATHS.clientopsHealthScores, options));\n }\n\n /** Fetch a single health score by ID. */\n async get(id: string): Promise<HealthScore> {\n return this.http.get(`${PATHS.clientopsHealthScores}/${id}`);\n }\n\n /** Create a new health score record. */\n async create(input: CreateHealthScoreInput): Promise<HealthScore> {\n return this.http.post(PATHS.clientopsHealthScores, input);\n }\n\n /** Patch fields on an existing health score. */\n async update(id: string, patch: Partial<HealthScore>): Promise<HealthScore> {\n return this.http.patch(`${PATHS.clientopsHealthScores}/${id}`, patch);\n }\n\n /** Soft-delete a health score. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.clientopsHealthScores}/${id}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// PlaybookService\n// ---------------------------------------------------------------------------\n\n/**\n * Service for managing customer success playbooks.\n *\n * Playbooks define repeatable automation sequences (e.g. onboarding outreach,\n * risk mitigation steps) triggered by customer events.\n */\nexport class PlaybookService {\n static readonly MCP_MANIFEST = manifest('Playbook', [\n { name: 'name', type: 'string', required: true, description: 'Playbook name, e.g. \"New Customer Onboarding Sequence\".' },\n { name: 'trigger', type: 'string', required: true, description: 'Event that fires the playbook, e.g. \"customer.created\" or \"health_score.declining\".' },\n { name: 'steps', type: 'object', description: 'Ordered array of step objects defining the playbook actions.' },\n { name: 'status', type: 'string', description: 'One of \"draft\", \"active\", \"paused\", \"archived\" (default \"draft\").' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List playbooks with optional pagination, search, and status filter. */\n async list(options?: ClientOpsListOptions): Promise<ClientOpsPageResult<Playbook>> {\n return this.http.get(withQuery(PATHS.clientopsPlaybooks, options));\n }\n\n /** Fetch a single playbook by ID. */\n async get(id: string): Promise<Playbook> {\n return this.http.get(`${PATHS.clientopsPlaybooks}/${id}`);\n }\n\n /** Create a new playbook. */\n async create(input: CreatePlaybookInput): Promise<Playbook> {\n return this.http.post(PATHS.clientopsPlaybooks, input);\n }\n\n /** Patch fields on an existing playbook. */\n async update(id: string, patch: Partial<Playbook>): Promise<Playbook> {\n return this.http.patch(`${PATHS.clientopsPlaybooks}/${id}`, patch);\n }\n\n /** Soft-delete a playbook. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.clientopsPlaybooks}/${id}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// OnboardingPlanService\n// ---------------------------------------------------------------------------\n\n/**\n * Service for managing customer onboarding plans.\n *\n * Onboarding plans track milestone progress from signup through activation,\n * linking customers to reusable plan templates.\n */\nexport class OnboardingPlanService {\n static readonly MCP_MANIFEST = manifest('Onboarding Plan', [\n { name: 'customer_id', type: 'string', required: true, description: 'Customer identifier, e.g. \"cust_01HXABC\".' },\n { name: 'template_id', type: 'string', description: 'Optional template to seed milestones from, e.g. \"tmpl_standard_onboarding\".' },\n { name: 'status', type: 'string', description: 'One of \"not_started\", \"in_progress\", \"completed\", \"cancelled\" (default \"not_started\").' },\n { name: 'milestones', type: 'object', description: 'Array of milestone objects with name, due date, and completion state.' },\n { name: 'started_at', type: 'string', description: 'ISO-8601 timestamp when onboarding started, e.g. \"2026-06-01T00:00:00Z\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List onboarding plans with optional pagination, search, and customer filter. */\n async list(options?: ClientOpsListOptions): Promise<ClientOpsPageResult<OnboardingPlan>> {\n return this.http.get(withQuery(PATHS.clientopsOnboardingPlans, options));\n }\n\n /** Fetch a single onboarding plan by ID. */\n async get(id: string): Promise<OnboardingPlan> {\n return this.http.get(`${PATHS.clientopsOnboardingPlans}/${id}`);\n }\n\n /** Create a new onboarding plan. */\n async create(input: CreateOnboardingPlanInput): Promise<OnboardingPlan> {\n return this.http.post(PATHS.clientopsOnboardingPlans, input);\n }\n\n /** Patch fields on an existing onboarding plan. */\n async update(id: string, patch: Partial<OnboardingPlan>): Promise<OnboardingPlan> {\n return this.http.patch(`${PATHS.clientopsOnboardingPlans}/${id}`, patch);\n }\n\n /** Soft-delete an onboarding plan. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.clientopsOnboardingPlans}/${id}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// RetentionRiskService\n// ---------------------------------------------------------------------------\n\n/**\n * Service for managing retention risk records.\n *\n * Retention risks surface customers at risk of churn with severity scoring,\n * reason tracking, and mitigation workflows.\n */\nexport class RetentionRiskService {\n static readonly MCP_MANIFEST = manifest('Retention Risk', [\n { name: 'customer_id', type: 'string', required: true, description: 'Customer identifier, e.g. \"cust_01HXABC\".' },\n { name: 'risk_level', type: 'string', required: true, description: 'One of \"low\", \"medium\", \"high\", \"critical\".' },\n { name: 'reason', type: 'string', required: true, description: 'Free-text explanation of the risk, e.g. \"Usage dropped 40% over 30 days\".' },\n { name: 'mitigations', type: 'object', description: 'Array of mitigation action strings, e.g. [\"Schedule executive check-in\", \"Offer training session\"].' },\n { name: 'status', type: 'string', description: 'One of \"open\", \"addressed\", \"dismissed\" (default \"open\").' },\n { name: 'detected_at', type: 'string', description: 'ISO-8601 timestamp when the risk was detected, e.g. \"2026-06-09T08:30:00Z\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List retention risks with optional pagination, search, and customer filter. */\n async list(options?: ClientOpsListOptions): Promise<ClientOpsPageResult<RetentionRisk>> {\n return this.http.get(withQuery(PATHS.clientopsRetentionRisks, options));\n }\n\n /** Fetch a single retention risk by ID. */\n async get(id: string): Promise<RetentionRisk> {\n return this.http.get(`${PATHS.clientopsRetentionRisks}/${id}`);\n }\n\n /** Create a new retention risk record. */\n async create(input: CreateRetentionRiskInput): Promise<RetentionRisk> {\n return this.http.post(PATHS.clientopsRetentionRisks, input);\n }\n\n /** Patch fields on an existing retention risk. */\n async update(id: string, patch: Partial<RetentionRisk>): Promise<RetentionRisk> {\n return this.http.patch(`${PATHS.clientopsRetentionRisks}/${id}`, patch);\n }\n\n /** Soft-delete a retention risk. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.clientopsRetentionRisks}/${id}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// ExpansionService\n// ---------------------------------------------------------------------------\n\n/**\n * Service for managing expansion opportunities.\n *\n * Expansions track upsell, cross-sell, and renewal pipeline with stage\n * progression, probability weighting, and expected close dates.\n */\nexport class ExpansionService {\n static readonly MCP_MANIFEST = manifest('Expansion', [\n { name: 'customer_id', type: 'string', required: true, description: 'Customer identifier, e.g. \"cust_01HXABC\".' },\n { name: 'type', type: 'string', required: true, description: 'One of \"upsell\", \"cross_sell\", \"renewal\".' },\n { name: 'value', type: 'number', required: true, description: 'Opportunity value in the tenant currency, e.g. 50000.' },\n { name: 'stage', type: 'string', description: 'One of \"identified\", \"qualified\", \"proposal\", \"closed\" (default \"identified\").' },\n { name: 'probability', type: 'number', description: 'Win probability as a percentage 0-100, e.g. 75.' },\n { name: 'expected_close_date', type: 'string', description: 'ISO-8601 expected close date, e.g. \"2026-09-30T00:00:00Z\".' },\n { name: 'owner_id', type: 'string', description: 'User id that owns the opportunity, e.g. \"usr_01HXABC\".' },\n ]);\n constructor(private http: HttpClient) {}\n\n /** List expansion opportunities with optional pagination, search, and customer filter. */\n async list(options?: ClientOpsListOptions): Promise<ClientOpsPageResult<Expansion>> {\n return this.http.get(withQuery(PATHS.clientopsExpansions, options));\n }\n\n /** Fetch a single expansion by ID. */\n async get(id: string): Promise<Expansion> {\n return this.http.get(`${PATHS.clientopsExpansions}/${id}`);\n }\n\n /** Create a new expansion opportunity. */\n async create(input: CreateExpansionInput): Promise<Expansion> {\n return this.http.post(PATHS.clientopsExpansions, input);\n }\n\n /** Patch fields on an existing expansion. */\n async update(id: string, patch: Partial<Expansion>): Promise<Expansion> {\n return this.http.patch(`${PATHS.clientopsExpansions}/${id}`, patch);\n }\n\n /** Soft-delete an expansion opportunity. */\n async delete(id: string): Promise<void> {\n return this.http.delete(`${PATHS.clientopsExpansions}/${id}`);\n }\n}\n","/**\n * Service classes for the Integrations domain.\n *\n * Provides CRUD access to connections, data sources, and sync state records\n * via the cpod-backend API. Each service extends {@link HttpCrudService} for\n * standard CRUD and exposes a static {@link McpServiceManifest} for MCP tool\n * registration.\n *\n * @module integrations\n */\n\nimport type { HttpClient } from '../http/client.js';\nimport { PATHS } from '../_generated/paths.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport { HttpCrudService } from '../edms/crud.js';\n\n// ──────────────────────────────────────────────────────────────────────────────\n// MCP manifest helpers\n// ──────────────────────────────────────────────────────────────────────────────\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\ntype Field = {\n name: string;\n type: 'string' | 'number' | 'boolean' | 'object';\n required?: boolean;\n description?: string;\n};\n\nfunction manifest(label: string, create: Field[]): McpServiceManifest {\n return {\n list: { description: `List ${label}.`, params: PAGINATION },\n get: { description: `Fetch a ${label} by UUID.`, params: [ID_PARAM] },\n create: { description: `Create a ${label}.`, params: create },\n update: { description: `Patch ${label} fields.`, params: [ID_PARAM] },\n delete: { description: `Soft-delete a ${label}.`, params: [ID_PARAM] },\n };\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// ConnectionService\n// ──────────────────────────────────────────────────────────────────────────────\n\n/**\n * CRUD service for external system connections.\n *\n * Connections represent configured integrations with external systems\n * (APIs, databases, file stores, webhooks). The `config` field is encrypted\n * at rest and masked in MCP responses.\n */\nexport class ConnectionService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Connection', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable connection name, e.g. \"Production Stripe\".' },\n { name: 'type', type: 'string', description: 'One of \"api\", \"database\", \"file\", \"webhook\" (default \"api\").' },\n { name: 'provider', type: 'string', required: true, description: 'Provider or vendor name, e.g. \"stripe\", \"salesforce\", \"postgres\".' },\n { name: 'status', type: 'string', description: 'One of \"active\", \"inactive\", \"error\" (default \"active\").' },\n { name: 'config', type: 'object', description: 'Encrypted provider-specific configuration object.' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.integrationsConnections);\n }\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// IntegrationDataSourceService\n// ──────────────────────────────────────────────────────────────────────────────\n\n/**\n * CRUD service for data source registry entries.\n *\n * Data sources represent named datasets pulled from external systems via\n * a connection. Each data source tracks its sync status, record count, and\n * schema metadata.\n *\n * Prefixed with `Integration` to avoid collision with the Common domain's\n * `DataSourceService` in `src/datasources/`.\n */\nexport class IntegrationDataSourceService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Data Source', [\n { name: 'name', type: 'string', required: true, description: 'Human-readable data source name, e.g. \"Salesforce Opportunities\".' },\n { name: 'type', type: 'string', description: 'One of \"salesforce\", \"hubspot\", \"stripe\", \"custom\" (default \"custom\").' },\n { name: 'connectionId', type: 'string', required: true, description: 'ID of the underlying connection, e.g. \"conn_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"connected\", \"disconnected\", \"syncing\" (default \"connected\").' },\n { name: 'schema', type: 'object', description: 'Schema descriptor for the data source (tables, fields, mappings).' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.integrationsDataSources);\n }\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// SyncStateService\n// ──────────────────────────────────────────────────────────────────────────────\n\n/**\n * CRUD service for sync state records.\n *\n * Sync state tracks the execution status, progress, and outcome of data\n * source synchronization operations. Each record belongs to a specific\n * data source.\n */\nexport class SyncStateService extends HttpCrudService {\n static readonly MCP_MANIFEST = manifest('Sync State', [\n { name: 'dataSourceId', type: 'string', required: true, description: 'ID of the data source this sync belongs to, e.g. \"ds_01HXABC\".' },\n { name: 'status', type: 'string', description: 'One of \"idle\", \"syncing\", \"completed\", \"failed\" (default \"idle\").' },\n { name: 'startedAt', type: 'string', description: 'ISO-8601 timestamp when the sync started.' },\n { name: 'completedAt', type: 'string', description: 'ISO-8601 timestamp when the sync completed or failed.' },\n { name: 'recordsProcessed', type: 'number', description: 'Number of records successfully processed.' },\n { name: 'recordsFailed', type: 'number', description: 'Number of records that failed to process.' },\n { name: 'errorMessage', type: 'string', description: 'Error message if the sync failed.' },\n { name: 'nextSyncAt', type: 'string', description: 'ISO-8601 timestamp of the next scheduled sync.' },\n ]);\n\n constructor(http: HttpClient) {\n super(http, PATHS.integrationsSyncState);\n }\n}\n","import { PATHS } from '../_generated/paths.js';\nimport type { HttpClient } from '../http/client.js';\nimport type {\n ChatCompletionRequest,\n ChatCompletionResponse,\n CompletionChunk,\n ModelListResponse,\n EmbeddingRequest,\n EmbeddingResponse,\n} from './types.js';\n\n/**\n * CompletionsService — OpenAI-compatible LLM gateway.\n *\n * Provides `chat.completions`, `embeddings`, and `models` endpoints that\n * match the OpenAI API shape, so existing OpenAI SDK code works with\n * minimal changes. The cPod backend routes requests through coreiq for\n * governance, PII scanning, and cost tracking.\n *\n * @example\n * ```typescript\n * const response = await client.completions.chat({\n * model: 'claude-sonnet-4-20250514',\n * messages: [{ role: 'user', content: 'Hello!' }],\n * });\n * console.log(response.choices[0].message.content);\n * ```\n *\n * @example\n * // Streaming — returns an async iterator of chunks\n * const stream = await client.completions.chatStream({\n * model: 'claude-sonnet-4-20250514',\n * messages: [{ role: 'user', content: 'Hello!' }],\n * stream: true,\n * });\n * for await (const chunk of stream) {\n * process.stdout.write(chunk.choices[0]?.delta?.content ?? '');\n * }\n */\nexport class CompletionsService {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Create a chat completion (non-streaming).\n * POST /api/v1/llm/completions\n */\n async chat(request: ChatCompletionRequest): Promise<ChatCompletionResponse> {\n return this.http.post<ChatCompletionResponse>(PATHS.llmCompletions, {\n ...request,\n stream: false,\n });\n }\n\n /**\n * Create a streaming chat completion.\n * Returns an async iterable of CompletionChunks.\n *\n * Note: The actual streaming is handled by the HTTP client — this method\n * sets `stream: true` and returns the parsed stream.\n */\n async chatStream(request: ChatCompletionRequest): Promise<AsyncIterable<CompletionChunk>> {\n // The HttpClient doesn't natively support SSE streams, so we return\n // a single-element async iterable with the full response cast.\n // Real streaming requires EventSource or fetch with ReadableStream.\n const response = await this.http.post<ChatCompletionResponse>(PATHS.llmCompletions, {\n ...request,\n stream: true,\n });\n // Wrap in async iterable for API compatibility\n async function* toChunks() {\n yield {\n id: response.id,\n object: 'chat.completion.chunk' as const,\n created: response.created,\n model: response.model,\n choices: response.choices.map((c) => ({\n index: c.index,\n delta: c.message,\n finish_reason: c.finish_reason,\n })),\n };\n }\n return toChunks();\n }\n\n /**\n * List available models.\n * GET /api/v1/model-configs\n */\n async listModels(): Promise<ModelListResponse> {\n return this.http.get<ModelListResponse>('/api/v1/llm/models');\n }\n\n /**\n * Create embeddings for the given input.\n * POST /api/v1/llm/completions with embedding model\n */\n async embeddings(request: EmbeddingRequest): Promise<EmbeddingResponse> {\n return this.http.post<EmbeddingResponse>('/api/v1/llm/embeddings', request);\n }\n}\n","// Governed prepare-review-commit mutation service (Issue #115).\n//\n// Routes every call through /api/v1/mutations/*. The governance logic\n// (risk determination, review requirements, approval policies) lives on\n// the server — the SDK is a thin typed client.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport type {\n PreparedMutation,\n PrepareMutationInput,\n MutationReviewDecision,\n MutationReviewResult,\n MutationCommitResult,\n} from './types.js'\n\n/** Backend paths for the governed mutation contract. */\nexport const MUTATION_PATHS = {\n base: '/api/v1/mutations',\n byId: (id: string) => `/api/v1/mutations/${encodeURIComponent(id)}`,\n prepare: '/api/v1/mutations/prepare',\n review: (id: string) => `/api/v1/mutations/${encodeURIComponent(id)}/review`,\n commit: (id: string) => `/api/v1/mutations/${encodeURIComponent(id)}/commit`,\n} as const;\n\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\nexport class MutationService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List prepared mutations.', params: [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n ] },\n get: { description: 'Fetch a prepared mutation by id.', params: [ID_PARAM] },\n create: { description: 'Prepare a new governed mutation.', params: [\n { name: 'entity_type', type: 'string', required: true },\n { name: 'operation', type: 'string', required: true },\n ] },\n }\n\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Validate input and park the mutation server-side. The backend assigns\n * `riskLevel`, `requiresReview`, and `status`. If `requiresReview` is true,\n * the mutation cannot be committed until `reviewMutation` approves it.\n */\n prepareMutation(input: PrepareMutationInput): Promise<PreparedMutation> {\n return this.http.post<PreparedMutation>(MUTATION_PATHS.prepare, input);\n }\n\n /**\n * Approve or reject a mutation that has `requiresReview: true` and is\n * currently in `pending_review` status.\n */\n reviewMutation(\n mutationId: string,\n decision: MutationReviewDecision,\n ): Promise<MutationReviewResult> {\n return this.http.post<MutationReviewResult>(\n MUTATION_PATHS.review(mutationId),\n decision,\n );\n }\n\n /**\n * Apply a prepared (and, if required, approved) mutation. Returns the\n * committed result with audit and source refs on success.\n */\n commitMutation(mutationId: string): Promise<MutationCommitResult> {\n return this.http.post<MutationCommitResult>(\n MUTATION_PATHS.commit(mutationId),\n {},\n );\n }\n\n /**\n * Fetch the current status of a prepared mutation. Same shape as the\n * prepare response — includes `status`, `riskLevel`, and any validation\n * errors accumulated since preparation.\n */\n getMutationStatus(mutationId: string): Promise<PreparedMutation> {\n return this.http.get<PreparedMutation>(MUTATION_PATHS.byId(mutationId));\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { HttpCrudService, type PaginatedResponse, type ListOptions } from '../edms/crud.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type { BusinessTimelineEntry, CreateBusinessTimelineEntryInput, BusinessTimelineListOptions } from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\nexport class BusinessTimelineService extends HttpCrudService<BusinessTimelineEntry> {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List timeline events.', params: PAGINATION },\n get: { description: 'Fetch a timeline event by id.', params: [ID_PARAM] },\n create: {\n description: 'Create a timeline event.',\n params: [\n { name: 'source_id', type: 'string', required: true, description: 'ID of the source record (account, project, incident, etc.), e.g. \"acc_01HXACCOUNT\".' },\n { name: 'source_type', type: 'string', required: true, description: 'Type of source entity: one of \"account\", \"project\", \"task\", \"incident\", \"approval\", \"contract\", \"lead\", \"deal\", \"case\", \"policy\", \"risk\", \"asset\", \"employee\", \"meeting\", \"document\", \"other\".' },\n { name: 'domain', type: 'string', required: true, description: 'Business domain: one of \"work\", \"service\", \"legal\", \"marketing\", \"finance\", \"hr\", \"compliance\", \"operations\", \"security\", \"customer\", \"other\".' },\n { name: 'event_type', type: 'string', required: true, description: 'Type of timeline event: one of \"created\", \"updated\", \"status_changed\", \"assigned\", \"comment_added\", \"attachment_added\", \"approval_requested\", \"approved\", \"rejected\", \"escalated\", \"resolved\", \"closed\", \"reopened\", \"deadline_set\", \"deadline_missed\", \"milestone_reached\", \"handoff\", \"other\".' },\n { name: 'title', type: 'string', required: true, description: 'Human-readable event title, e.g. \"Account status changed to \\'At Risk\\'\".' },\n { name: 'summary', type: 'string', description: 'Detailed summary of what happened, e.g. \"Customer health score dropped from 85 to 62 due to unresolved support tickets.\".' },\n { name: 'actor_id', type: 'string', description: 'User who performed the action (if human-initiated), e.g. \"usr_01HXUSER\".' },\n { name: 'actor_type', type: 'string', description: 'Type of actor: one of \"user\", \"system\", \"agent\", \"workflow\", \"external\".' },\n { name: 'actor_name', type: 'string', description: 'Display name of the actor, e.g. \"John Smith\".' },\n { name: 'occurred_at', type: 'string', required: true, description: 'When the event occurred, e.g. \"2026-06-08T10:30:00Z\".' },\n { name: 'visibility', type: 'string', description: 'Who can see this event: one of \"public\", \"internal\", \"private\", \"restricted\" (default \"internal\").' },\n { name: 'risk_level', type: 'string', description: 'Risk level associated with this event: one of \"none\", \"low\", \"medium\", \"high\", \"critical\" (default \"none\").' },\n { name: 'citation_refs', type: 'array', description: 'Array of source records that prove this event happened, e.g. [{\"type\":\"audit_log\",\"id\":\"audit_789\",\"action\":\"update_status\"}].' },\n { name: 'previous_state', type: 'object', description: 'State before the event (for change events), e.g. {\"status\":\"active\",\"health_score\":85}.' },\n { name: 'current_state', type: 'object', description: 'State after the event (for change events), e.g. {\"status\":\"at_risk\",\"health_score\":62}.' },\n { name: 'metadata', type: 'object', description: 'Additional context-specific data, e.g. {\"changed_fields\":[\"status\",\"health_score\"],\"trigger\":\"health_monitor\"}.' },\n { name: 'tags', type: 'array', description: 'Array of tag strings, e.g. [\"status_change\", \"at_risk\", \"automated\"].' },\n ],\n },\n update: { description: 'Patch timeline event fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete a timeline event.', params: [ID_PARAM] },\n };\n\n constructor(http: HttpClient) {\n super(http, '/api/v1/timeline');\n }\n\n /**\n * List timeline entries with optional filters.\n */\n async listEntries(opts?: BusinessTimelineListOptions): Promise<PaginatedResponse<BusinessTimelineEntry>> {\n const params = new URLSearchParams();\n if (opts?.entityType) params.set('entity_type', opts.entityType);\n if (opts?.entityId) params.set('entity_id', opts.entityId);\n if (opts?.domain) params.set('domain', opts.domain);\n if (opts?.severity) params.set('severity', opts.severity);\n if (opts?.since) params.set('since', opts.since);\n if (opts?.until) params.set('until', opts.until);\n if (opts?.page != null) params.set('page', String(opts.page));\n if (opts?.pageSize != null) params.set('page_size', String(opts.pageSize));\n\n const query = params.toString();\n const url = query ? `${this.path}?${query}` : this.path;\n return this.http.get<PaginatedResponse<BusinessTimelineEntry>>(url);\n }\n\n /**\n * List timeline entries for a specific entity.\n */\n async listByEntity(\n entityType: string,\n entityId: string,\n opts?: ListOptions,\n ): Promise<PaginatedResponse<BusinessTimelineEntry>> {\n return this.listEntries({ entityType, entityId, ...opts });\n }\n\n /**\n * List timeline entries within a time window (e.g., daily/weekly briefs).\n */\n async listByWindow(\n since: string,\n until: string,\n opts?: Omit<BusinessTimelineListOptions, 'since' | 'until'>,\n ): Promise<PaginatedResponse<BusinessTimelineEntry>> {\n return this.listEntries({ since, until, ...opts });\n }\n\n /**\n * List timeline entries for a specific domain (e.g., 'people', 'technology').\n */\n async listByDomain(\n domain: string,\n opts?: Omit<BusinessTimelineListOptions, 'domain'>,\n ): Promise<PaginatedResponse<BusinessTimelineEntry>> {\n return this.listEntries({ domain, ...opts });\n }\n\n /**\n * Emit a new timeline entry (create).\n */\n async emit(input: CreateBusinessTimelineEntryInput): Promise<BusinessTimelineEntry> {\n return this.create(input as unknown as Record<string, unknown>);\n }\n}\n","import type { HttpClient } from '../http/client.js';\nimport { HttpCrudService, type PaginatedResponse, type ListOptions } from '../edms/crud.js';\nimport type { McpServiceManifest } from '../mcp/manifest.js';\nimport type { AttentionSignal, CreateAttentionSignalInput, SignalListOptions } from './types.js';\n\nconst PAGINATION = [\n { name: 'search', type: 'string' as const },\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n];\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true };\n\nexport class AttentionSignalService extends HttpCrudService<AttentionSignal> {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List attention signals.', params: PAGINATION },\n get: { description: 'Fetch an attention signal by id.', params: [ID_PARAM] },\n create: {\n description: 'Create an attention signal.',\n params: [\n { name: 'target_id', type: 'string', required: true, description: 'ID of the entity needing attention (account, project, task, etc.), e.g. \"acc_01HXACCOUNT\".' },\n { name: 'target_type', type: 'string', required: true, description: 'Type of target entity: one of \"account\", \"project\", \"task\", \"incident\", \"approval\", \"contract\", \"lead\", \"deal\", \"case\", \"policy\", \"risk\", \"asset\", \"employee\", \"other\".' },\n { name: 'domain', type: 'string', required: true, description: 'Business domain: one of \"work\", \"service\", \"legal\", \"marketing\", \"finance\", \"hr\", \"compliance\", \"operations\", \"security\", \"customer\", \"other\".' },\n { name: 'signal_type', type: 'string', required: true, description: 'Type of attention signal: one of \"sla_risk\", \"overdue_approval\", \"stale_owner\", \"renewal_risk\", \"missing_evidence\", \"contract_due\", \"deadline_approaching\", \"blocked\", \"escalation\", \"anomaly\", \"follow_up\", \"review_due\", \"other\".' },\n { name: 'severity', type: 'string', required: true, description: 'Severity level: one of \"critical\", \"high\", \"medium\", \"low\".' },\n { name: 'reason', type: 'string', required: true, description: 'Human-readable explanation of why attention is needed, e.g. \"Response SLA at risk: 4 hours remaining, no response yet.\".' },\n { name: 'summary', type: 'string', description: 'Brief summary for list views, e.g. \"Customer Acme Corp waiting on support response\".' },\n { name: 'due_at', type: 'string', description: 'When this becomes urgent/deadline, e.g. \"2026-06-08T17:00:00Z\".' },\n { name: 'stale_at', type: 'string', description: 'When this becomes stale if not addressed, e.g. \"2026-06-10T00:00:00Z\".' },\n { name: 'owner_id', type: 'string', description: 'User who should act on this signal, e.g. \"usr_01HXUSER\".' },\n { name: 'team_id', type: 'string', description: 'Team responsible for this signal, e.g. \"team_support\".' },\n { name: 'source_refs', type: 'array', description: 'Array of source records that generated this signal, e.g. [{\"type\":\"incident\",\"id\":\"inc_123\",\"title\":\"P2 - API Latency\"}].' },\n { name: 'computed_by', type: 'string', description: 'System or user that computed this signal, e.g. \"sla_monitor_v2\".' },\n { name: 'status', type: 'string', description: 'Signal lifecycle status: one of \"active\", \"dismissed\", \"resolved\", \"expired\" (default \"active\").' },\n { name: 'metadata', type: 'object', description: 'Additional context-specific data, e.g. {\"sla_hours_remaining\":4,\"customer_tier\":\"enterprise\"}.' },\n { name: 'tags', type: 'array', description: 'Array of tag strings, e.g. [\"sla\", \"customer\", \"urgent\"].' },\n ],\n },\n update: { description: 'Patch attention signal fields.', params: [ID_PARAM] },\n delete: { description: 'Soft-delete an attention signal.', params: [ID_PARAM] },\n };\n\n constructor(http: HttpClient) {\n super(http, '/api/v1/signals');\n }\n\n /**\n * List attention signals with optional filters.\n */\n async listSignals(opts?: SignalListOptions): Promise<PaginatedResponse<AttentionSignal>> {\n const params = new URLSearchParams();\n if (opts?.targetEntityType) params.set('target_entity_type', opts.targetEntityType);\n if (opts?.targetEntityId) params.set('target_entity_id', opts.targetEntityId);\n if (opts?.signalType) params.set('signal_type', opts.signalType);\n if (opts?.severity) params.set('severity', opts.severity);\n if (opts?.ownerId) params.set('owner_id', opts.ownerId);\n if (opts?.domain) params.set('domain', opts.domain);\n if (opts?.active != null) params.set('active', String(opts.active));\n if (opts?.dueBefore) params.set('due_before', opts.dueBefore);\n if (opts?.page != null) params.set('page', String(opts.page));\n if (opts?.pageSize != null) params.set('page_size', String(opts.pageSize));\n\n const query = params.toString();\n const url = query ? `${this.path}?${query}` : this.path;\n return this.http.get<PaginatedResponse<AttentionSignal>>(url);\n }\n\n /**\n * List signals for a specific owner (person/team).\n */\n async listByOwner(\n ownerId: string,\n opts?: Omit<SignalListOptions, 'ownerId'>,\n ): Promise<PaginatedResponse<AttentionSignal>> {\n return this.listSignals({ ownerId, ...opts });\n }\n\n /**\n * List signals for a specific domain (e.g., 'legal', 'finance').\n */\n async listByDomain(\n domain: string,\n opts?: Omit<SignalListOptions, 'domain'>,\n ): Promise<PaginatedResponse<AttentionSignal>> {\n return this.listSignals({ domain, ...opts });\n }\n\n /**\n * List signals for a specific target entity.\n */\n async listByTarget(\n entityType: string,\n entityId: string,\n opts?: Omit<SignalListOptions, 'targetEntityType' | 'targetEntityId'>,\n ): Promise<PaginatedResponse<AttentionSignal>> {\n return this.listSignals({ targetEntityType: entityType, targetEntityId: entityId, ...opts });\n }\n\n /**\n * Dismiss a signal (acknowledge without taking action).\n */\n async dismiss(signalId: string, dismissedBy: string): Promise<AttentionSignal> {\n return this.http.patch<AttentionSignal>(`${this.path}/${signalId}`, {\n dismissedAt: new Date().toISOString(),\n dismissedBy,\n });\n }\n\n /**\n * Resolve a signal (action taken, signal completed).\n */\n async resolve(signalId: string, resolvedBy: string): Promise<AttentionSignal> {\n return this.http.patch<AttentionSignal>(`${this.path}/${signalId}`, {\n resolvedAt: new Date().toISOString(),\n resolvedBy,\n });\n }\n}\n","// Common domain — cross-domain primitives for attention signals and timeline events.\n\nimport type { HttpClient } from '../http/client.js'\nimport type { McpServiceManifest } from '../mcp/manifest.js'\nimport { HttpCrudService } from '../edms/crud.js'\n\nconst PAGINATION = [\n { name: 'page', type: 'number' as const },\n { name: 'pageSize', type: 'number' as const },\n]\nconst ID_PARAM = { name: 'id', type: 'string' as const, required: true }\n\n/**\n * Attention signals — cross-domain notifications that require user attention.\n * Backend path: /api/v1/common/attention-signals\n */\nexport class AttentionSignalService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List attention signals.', params: PAGINATION },\n get: { description: 'Fetch an attention signal by UUID.', params: [ID_PARAM] },\n create: { description: 'Create an attention signal.', params: [\n { name: 'target_type', type: 'string', required: true },\n { name: 'target_id', type: 'string', required: true },\n { name: 'signal_type', type: 'string', required: true },\n ] },\n update: { description: 'Patch attention signal fields.', params: [ID_PARAM] },\n delete: { description: 'Delete an attention signal.', params: [ID_PARAM] },\n }\n\n constructor(http: HttpClient) {\n super(http, '/api/v1/common/attention-signals')\n }\n\n /** Dismiss an attention signal. */\n async dismiss(id: string, dismissedBy: string, resolutionNotes?: string): Promise<unknown> {\n return this.http.post(`${(this as any).path}/${id}/dismiss`, {\n dismissed_by: dismissedBy,\n resolution_notes: resolutionNotes,\n })\n }\n\n /** Resolve an attention signal. */\n async resolve(id: string, resolvedBy: string, resolutionNotes?: string): Promise<unknown> {\n return this.http.post(`${(this as any).path}/${id}/resolve`, {\n resolved_by: resolvedBy,\n resolution_notes: resolutionNotes,\n })\n }\n\n /** List attention signals by target entity. */\n async listByTarget(targetType: string, targetId: string, status: string = 'active'): Promise<unknown[]> {\n const queryString = `?status=${encodeURIComponent(status)}`\n return this.http.get(`${(this as any).path}/by-target/${targetType}/${targetId}${queryString}`)\n }\n}\n\n/**\n * Timeline events — cross-domain event timeline for tracking changes across entities.\n * Backend path: /api/v1/common/timeline-events\n */\nexport class TimelineEventService extends HttpCrudService {\n static readonly MCP_MANIFEST: McpServiceManifest = {\n list: { description: 'List timeline events.', params: PAGINATION },\n get: { description: 'Fetch a timeline event by UUID.', params: [ID_PARAM] },\n create: { description: 'Create a timeline event.', params: [\n { name: 'source_type', type: 'string', required: true },\n { name: 'source_id', type: 'string', required: true },\n { name: 'event_type', type: 'string', required: true },\n { name: 'domain', type: 'string', required: true },\n ] },\n update: { description: 'Patch timeline event fields.', params: [ID_PARAM] },\n delete: { description: 'Delete a timeline event.', params: [ID_PARAM] },\n }\n\n constructor(http: HttpClient) {\n super(http, '/api/v1/common/timeline-events')\n }\n\n /** List timeline events by source entity. */\n async listBySource(sourceType: string, sourceId: string, limit: number = 50, since?: string, until?: string): Promise<unknown[]> {\n const parts: string[] = [`limit=${limit}`]\n if (since) parts.push(`since=${encodeURIComponent(since)}`)\n if (until) parts.push(`until=${encodeURIComponent(until)}`)\n const queryString = `?${parts.join('&')}`\n return this.http.get(`${(this as any).path}/by-source/${sourceType}/${sourceId}${queryString}`)\n }\n\n /** List timeline events by business domain. */\n async listByDomain(domain: string, limit: number = 50, since?: string, until?: string): Promise<unknown[]> {\n const parts: string[] = [`limit=${limit}`]\n if (since) parts.push(`since=${encodeURIComponent(since)}`)\n if (until) parts.push(`until=${encodeURIComponent(until)}`)\n const queryString = `?${parts.join('&')}`\n return this.http.get(`${(this as any).path}/by-domain/${domain}${queryString}`)\n }\n}\n","import { PATHS } from './_generated/paths.js';\nimport { HttpClient } from './http/client.js';\nimport { LoginError } from './http/errors.js';\nimport type { CpodConfig } from './types/index.js';\nimport { AuthService } from './auth/service.js';\nimport { PersonService } from './people/service.js';\nimport { GroupService } from './groups/service.js';\nimport { TechnologyService } from './technology.assets/service.js';\nimport { AccessEntitlementService } from './entitlements.items/service.js';\nimport { VulnerabilityService } from './vulnerabilities.items/service.js';\nimport { ComplianceControlService } from './compliance-controls/service.js';\nimport { CloudResourceService } from './cloud-resources.items/service.js';\nimport { LicenseService } from './licenses.items/service.js';\nimport { AssetService } from './assets.items/service.js';\nimport { RiskService } from './risk/service.js';\nimport { RelationshipService } from './relationships.edges/service.js';\nimport { DataSourceService } from './datasources/service.js';\nimport { FilesClient } from './storage/files.js';\nimport { DbClient } from './storage/db.js';\nimport { KvClient } from './storage/kv.js';\nimport { StorageObjectsService } from './storage/objects.js';\nimport { StorageRecordsService } from './storage/records.js';\nimport { SkillsService } from './skills/service.js';\nimport { WorkflowsService } from './workflows/service.js';\nimport { JobsService } from './jobs/service.js';\nimport { MaskingService } from './masking/service.js';\nimport { TelemetryClient } from './telemetry/index.js';\nimport { FlagsService } from './flags/service.js';\nimport { SecretsService } from './secrets/service.js';\nimport { OrganizationService } from './organizations/service.js';\nimport { PodService } from './pods/service.js';\nimport { CredentialService } from './credentials/service.js';\nimport { EventService } from './events/service.js';\nimport { UserProfileService } from './user-profiles/service.js';\nimport { McpService } from './mcp/service.js';\nimport type { McpToolDefinition } from './mcp/types.js';\nimport { manifestsToTools, type ServiceManifestEntry } from './mcp/manifest.js';\nimport { VendorService, ContractService, ContractObligationService } from './contracts/service.js';\nimport { TimeEntryService, CommentService, CapacityService } from './work/service.js';\nimport { TechPortfolioService, CostCenterService } from './investments/service.js';\nimport { PerformanceReviewService, PersonGoalService, LearningRecordService } from './performance/service.js';\nimport { ObjectiveService, KeyResultService } from './okr/service.js';\nimport { PersonSkillService, CalendarEventService, LeaveRequestService, MeetingNoteService } from './employee/service.js';\nimport { ProjectService, TaskService, SprintService, FeatureService } from './projects/service.js';\nimport { AccountService, ContactService, DealService, ActivityService, QuoteService, LineItemService } from './customer/service.js';\nimport { FrameworksService, ControlsService, EvidenceService, IncidentsService, RisksService } from './grc/service.js';\nimport { AlertsService, InvestigationsService, PlaybooksService } from './soc/service.js';\nimport { CohortService, AssessmentService } from './learning/service.js';\nimport { RfpRecordService, RfpQuestionService, RfpResponseService } from './rfp/service.js';\nimport { KnowledgeDocumentService, KnowledgeChunkService, KnowledgeEntityService, KnowledgeTemplateService, KnowledgeSopService } from './knowledge/service.js';\nimport { ApplicationService, ConnectorService, ApiKeyService, WebhookService } from './integration/service.js';\nimport { NotificationsService, AnnouncementsService } from './notifications/service.js';\nimport { ApprovalRequestsService, ApprovalStepsService } from './approvals/service.js';\nimport { TicketService, SlaPolicyService } from './helpdesk/service.js';\nimport { JobPostingsService, ApplicantsService, OnboardingTasksService, OffboardingTasksService } from './hr/service.js';\nimport { InvoicesService, PurchaseOrdersService, ExpensesService, BudgetsService, BudgetLinesService } from './finance/service.js';\nimport { LocationService, DepartmentService } from './org/service.js';\nimport {\n PolicyService,\n PolicyAcknowledgementService,\n PolicyReviewService,\n} from './policies/service.js';\nimport { ProductService, ProductCategoryService } from './catalog/service.js';\nimport { SupplierService } from './procurement/service.js';\nimport { AuditService } from './audit.records/service.js';\nimport { TenantService } from './tenants/service.js';\nimport { ChatHITLService } from './chat/service.js';\nimport { AgentsService } from './agents/service.js';\nimport { McpServersService } from './mcp-servers/service.js';\nimport { MemoryService } from './memory/service.js';\nimport { WorkspacesService } from './workspaces/service.js';\nimport { AppsService } from './apps/service.js';\nimport { RegistryService } from './registry/service.js';\nimport { StorageSqliteService } from './storage-sqlite/service.js';\nimport {\n AccessRequestService,\n HRRequestService,\n PendingService,\n EquipmentService,\n TravelService,\n} from './operations/service.js';\nimport { DashboardService, MetricService, ReportService } from './analytics/service.js';\nimport { NodeService, EdgeService, QueryService } from './graph/service.js';\nimport { DailyPlanService, PlanItemService } from './planner/service.js';\nimport { TimelineService } from './postmortems/service.js';\nimport {\n ScorecardService,\n InsuranceService,\n CertificationService,\n VendorContactService,\n OnboardingService,\n} from './vendor/service.js';\nimport {\n CampaignService,\n LeadService,\n ContentService,\n MarketingEventService,\n SocialService,\n MarketingEmailService,\n MarketingAnalyticsService,\n} from './marketing/service.js';\nimport {\n LegalContractService,\n NdaService,\n LegalCaseService,\n IpService,\n LegalComplianceService,\n LegalReviewService,\n} from './legal/service.js';\nimport {\n SurveyService,\n ResponseService as SurveyResponseService,\n AnalyticsService as SurveyAnalyticsService,\n} from './surveys/service.js';\nimport {\n ProcessMapService,\n BottleneckService,\n EfficiencyScoreService,\n} from './process/service.js';\nimport {\n HealthScoreService,\n PlaybookService,\n OnboardingPlanService,\n RetentionRiskService,\n ExpansionService,\n} from './clientops/service.js';\nimport {\n ConnectionService,\n IntegrationDataSourceService,\n SyncStateService,\n} from './integrations/service.js';\nimport { CompletionsService } from './completions/service.js';\nimport { MutationService } from './mutations/service.js';\nimport { BusinessTimelineService } from './timeline/service.js';\nimport { AttentionSignalService } from './signals/service.js';\nimport { AttentionSignalService as CommonAttentionSignalService, TimelineEventService } from './common/service.js';\n\nexport interface PoliciesNamespace {\n readonly policy: PolicyService;\n readonly acknowledgements: PolicyAcknowledgementService;\n readonly reviews: PolicyReviewService;\n}\n\nexport interface OrgNamespace {\n readonly locations: LocationService;\n readonly departments: DepartmentService;\n}\n\nexport interface CatalogNamespace {\n readonly products: ProductService;\n readonly categories: ProductCategoryService;\n}\n\nexport interface ProcurementNamespace {\n readonly suppliers: SupplierService;\n}\n\nexport interface CustomerNamespace {\n readonly accounts: AccountService;\n readonly contacts: ContactService;\n readonly deals: DealService;\n readonly activities: ActivityService;\n readonly quotes: QuoteService;\n readonly lineItems: LineItemService;\n}\n\nexport interface ProjectsNamespace {\n readonly project: ProjectService;\n readonly tasks: TaskService;\n readonly sprints: SprintService;\n readonly features: FeatureService;\n}\n\nexport interface OkrNamespace {\n readonly objectives: ObjectiveService;\n readonly keyResults: KeyResultService;\n}\n\nexport interface EmployeeNamespace {\n readonly skills: PersonSkillService;\n readonly calendarEvents: CalendarEventService;\n readonly leaveRequests: LeaveRequestService;\n readonly meetingNotes: MeetingNoteService;\n}\n\nexport interface StorageClient {\n readonly files: FilesClient;\n readonly db: DbClient;\n readonly kv: KvClient;\n readonly objects: StorageObjectsService;\n readonly records: StorageRecordsService;\n readonly sqlite: StorageSqliteService;\n}\n\nexport interface ContractsNamespace {\n readonly vendors: VendorService;\n readonly contract: ContractService;\n readonly obligations: ContractObligationService;\n}\n\nexport interface GrcNamespace {\n readonly frameworks: FrameworksService;\n readonly controls: ControlsService;\n readonly evidence: EvidenceService;\n readonly incidents: IncidentsService;\n readonly risks: RisksService;\n}\n\nexport interface SocNamespace {\n readonly alerts: AlertsService;\n readonly investigations: InvestigationsService;\n readonly playbooks: PlaybooksService;\n}\n\nexport interface LearningNamespace {\n readonly cohorts: CohortService;\n readonly assessments: AssessmentService;\n}\n\nexport interface RfpNamespace {\n readonly records: RfpRecordService;\n readonly questions: RfpQuestionService;\n readonly responses: RfpResponseService;\n}\n\nexport interface KnowledgeNamespace {\n readonly documents: KnowledgeDocumentService;\n readonly chunks: KnowledgeChunkService;\n readonly entities: KnowledgeEntityService;\n readonly templates: KnowledgeTemplateService;\n readonly sops: KnowledgeSopService;\n}\n\nexport interface IntegrationNamespace {\n readonly applications: ApplicationService;\n readonly connectors: ConnectorService;\n readonly apiKeys: ApiKeyService;\n readonly webhooks: WebhookService;\n}\n\nexport interface HelpdeskNamespace {\n readonly tickets: TicketService;\n readonly slaPolicies: SlaPolicyService;\n}\n\nexport interface NotificationsNamespace {\n readonly notification: NotificationsService;\n readonly announcements: AnnouncementsService;\n}\n\nexport interface ApprovalsNamespace {\n readonly requests: ApprovalRequestsService;\n readonly steps: ApprovalStepsService;\n}\n\nexport interface HrNamespace {\n readonly jobPostings: JobPostingsService;\n readonly applicants: ApplicantsService;\n readonly onboardingTasks: OnboardingTasksService;\n readonly offboardingTasks: OffboardingTasksService;\n}\n\nexport interface FinanceNamespace {\n readonly invoices: InvoicesService;\n readonly purchaseOrders: PurchaseOrdersService;\n readonly expenses: ExpensesService;\n readonly budgets: BudgetsService;\n readonly budgetLines: BudgetLinesService;\n}\n\nexport interface OperationsNamespace {\n readonly accessRequests: AccessRequestService;\n readonly hrRequests: HRRequestService;\n readonly pending: PendingService;\n readonly equipment: EquipmentService;\n readonly travel: TravelService;\n}\n\nexport interface AnalyticsNamespace {\n readonly dashboards: DashboardService;\n readonly metrics: MetricService;\n readonly reports: ReportService;\n}\n\nexport interface GraphNamespace {\n readonly nodes: NodeService;\n readonly edges: EdgeService;\n readonly queries: QueryService;\n}\n\nexport interface PlannerNamespace {\n readonly dailyPlans: DailyPlanService;\n readonly planItems: PlanItemService;\n}\n\nexport interface PostmortemsNamespace {\n readonly timeline: TimelineService;\n}\n\nexport interface VendorNamespace {\n readonly scorecards: ScorecardService;\n readonly insurance: InsuranceService;\n readonly certifications: CertificationService;\n readonly contacts: VendorContactService;\n readonly onboarding: OnboardingService;\n}\n\nexport interface MarketingNamespace {\n readonly campaigns: CampaignService;\n readonly leads: LeadService;\n readonly content: ContentService;\n readonly events: MarketingEventService;\n readonly social: SocialService;\n readonly emails: MarketingEmailService;\n readonly analytics: MarketingAnalyticsService;\n}\n\nexport interface LegalNamespace {\n readonly contracts: LegalContractService;\n readonly ndas: NdaService;\n readonly cases: LegalCaseService;\n readonly ip: IpService;\n readonly compliance: LegalComplianceService;\n readonly reviews: LegalReviewService;\n}\n\n/**\n * Surveys module — survey definitions, responses, and analytics.\n */\nexport interface SurveysNamespace {\n readonly surveys: SurveyService;\n readonly responses: SurveyResponseService;\n readonly analytics: SurveyAnalyticsService;\n}\n\nexport interface ProcessNamespace {\n readonly maps: ProcessMapService;\n readonly bottlenecks: BottleneckService;\n readonly efficiencyScores: EfficiencyScoreService;\n}\n\n/**\n * ClientOps module — customer health, success playbooks, onboarding,\n * retention risk, and expansion pipeline.\n */\nexport interface ClientOpsNamespace {\n readonly healthScores: HealthScoreService;\n readonly playbooks: PlaybookService;\n readonly onboardingPlans: OnboardingPlanService;\n readonly retentionRisks: RetentionRiskService;\n readonly expansions: ExpansionService;\n}\n\n/**\n * Integrations module — external system connections, data source registry,\n * and sync state tracking. Distinct from the `integration` namespace which\n * covers platform integration primitives (applications, connectors, apiKeys, webhooks).\n */\nexport interface IntegrationsNamespace {\n readonly connections: ConnectionService;\n readonly dataSources: IntegrationDataSourceService;\n readonly syncState: SyncStateService;\n}\n\nexport interface CompletionsNamespace {\n readonly chat: CompletionsService;\n}\n\nexport interface WorkNamespace {\n readonly timeEntries: TimeEntryService;\n readonly comments: CommentService;\n readonly capacity: CapacityService;\n}\n\nexport interface InvestmentsNamespace {\n readonly portfolio: TechPortfolioService;\n readonly costCenters: CostCenterService;\n}\n\nexport interface PerformanceNamespace {\n readonly reviews: PerformanceReviewService;\n readonly goals: PersonGoalService;\n readonly learningRecords: LearningRecordService;\n}\n\nexport interface CommonNamespace {\n readonly attentionSignals: CommonAttentionSignalService;\n readonly timelineEvents: TimelineEventService;\n}\n\n/**\n * The main entry point for the cPod TypeScript SDK.\n *\n * Provides typed access to all 6 domains of the cPod Enterprise Data Model:\n * People, Technology, Licenses, Assets, Risk & Compliance, and Common.\n *\n * @example\n * ```typescript\n * import { CpodClient } from '@zysec-ai/cpod-sdk'\n *\n * const client = new CpodClient({\n * apiKey: process.env.CPOD_API_KEY!,\n * })\n *\n * // Query a person and their access entitlements\n * const person = await client.people.get('person-uuid')\n * const entitlements = await client.technologyAssets.getEntitlements(person.id)\n * ```\n */\n\n/** CSPRNG handle (32 bytes → hex) that ties a popup login to its polled result. */\nfunction generateLoginHandle(): string {\n const bytes = new Uint8Array(32);\n globalThis.crypto.getRandomValues(bytes);\n return Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n}\n\n// Minimal browser shapes — the SDK is isomorphic and its tsconfig has no DOM\n// lib, so we type just the popup surface `login()` touches instead of pulling\n// in all of `lib.dom`.\ninterface PopupWindow {\n closed: boolean;\n close(): void;\n}\ninterface BrowserWindow {\n open(url: string, target: string, features?: string): PopupWindow | null;\n}\nfunction browserWindow(): BrowserWindow | undefined {\n return (globalThis as { window?: BrowserWindow }).window;\n}\n\nexport class CpodClient {\n /**\n * Authentication + self-service profile operations — login, refresh,\n * validate, /auth/me, change-password, invites. All HTTP-backed.\n */\n readonly auth: AuthService;\n\n /** Operations for managing Person records in the People domain. */\n /**\n * People domain (Standards §4.1). Reach the Person entity via\n * `client.people.persons.*` — matching PATHS.peoplePersons.\n */\n readonly people: { persons: PersonService; groups: GroupService };\n\n /** Operations for managing Group records in the People domain. */\n readonly groups: GroupService;\n\n /**\n * Operations for managing TechnologyAssets and AccessEntitlements\n * in the Technology domain.\n */\n readonly technologyAssets: TechnologyService;\n\n /**\n * AccessEntitlement direct-mode service — grants of access to a\n * TechnologyAsset for a Person or Group. Backed by Mongo only;\n * cpod-backend intentionally does not expose this domain.\n */\n readonly entitlementsItems: AccessEntitlementService;\n\n /**\n * Vulnerability direct-mode service — CVEs and findings with severity\n * scoring. Backed by Mongo only; cpod-backend intentionally has no\n * vulnerabilities endpoint.\n */\n readonly vulnerabilitiesItems: VulnerabilityService;\n\n /**\n * ComplianceControl direct-mode service — controls from SOC 2,\n * ISO 27001, PCI, HIPAA, NIST. Backed by Mongo only.\n */\n readonly complianceControls: ComplianceControlService;\n\n /**\n * CloudResource direct-mode service — AWS / GCP / Azure / OCI\n * resources discovered or imported. Backed by Mongo only.\n */\n readonly cloudResourcesItems: CloudResourceService;\n\n /**\n * Operations for managing SoftwareLicenses and LicenseAssignments\n * in the Licenses domain.\n */\n readonly licensesItems: LicenseService;\n\n /**\n * Operations for managing PhysicalAssets and CloudResources\n * in the Assets domain.\n */\n readonly assetsItems: AssetService;\n\n /**\n * Operations for managing Vulnerabilities, ComplianceControls, and RiskItems\n * in the Risk & Compliance domain.\n */\n readonly risk: RiskService;\n\n /**\n * Operations for traversing and managing the EDM graph Relationships\n * in the Common domain.\n */\n readonly relationshipsEdges: RelationshipService;\n\n /**\n * Operations for managing external DataSource integrations\n * in the Common domain.\n */\n readonly dataSources: DataSourceService;\n\n /**\n * Sandboxed storage — files (MinIO), structured documents (MongoDB),\n * and ephemeral key-value (Redis). All operations are automatically\n * scoped to the tenant + app + user from the Bearer token.\n * No DB credentials ever reach the SDK consumer.\n */\n readonly storage: StorageClient;\n\n /** Operations for listing and running platform Skills. */\n readonly skills: SkillsService;\n\n /** Operations for managing and triggering platform Workflows. */\n readonly workflows: WorkflowsService;\n\n /** Operations for submitting, monitoring, and cancelling async Jobs. */\n readonly jobs: JobsService;\n\n /** Operations for masking PII and sensitive string values. */\n readonly masking: MaskingService;\n\n /**\n * Telemetry namespace: audit events, LLM traces, and analytics events.\n * - `telemetry.audit` — emit/query audit events\n * - `telemetry.traces` — read LLM/AI call trace history\n * - `telemetry.events` — emit/query custom analytics events\n */\n readonly telemetry: TelemetryClient;\n\n /** Operations for evaluating platform feature flags. */\n readonly flags: FlagsService;\n\n /** Operations for resolving secrets from the platform vault. */\n readonly secrets: SecretsService;\n\n /** Access organization context from the current JWT — getCurrent and update only. */\n readonly organizations: OrganizationService;\n\n /** CRUD and lifecycle operations for Pod resources. */\n readonly pods: PodService;\n\n /** Operations for Credential resources (API keys, service accounts). */\n readonly credentials: CredentialService;\n\n /** Event subscription and history for cPod resources. */\n readonly events: EventService;\n\n /** Operations for UserProfile resources. */\n readonly userProfiles: UserProfileService;\n\n /**\n * MCP tool registration and proxy. Register tools once on startup;\n * the cpod-backend proxies all LLM/agent calls through a single audited endpoint.\n *\n * Requires an `appId` — obtain one by calling POST /api/v1/apps/register once,\n * then pass it to CpodClient via `config.appId` or `CPOD_APP_ID` env var.\n */\n readonly mcp: McpService;\n\n /**\n * Operations for managing Vendors, Contracts, and ContractObligations\n * in the Contracts domain.\n * - `contracts.vendors` — Vendor CRUD\n * - `contracts.contract` — Contract CRUD\n * - `contracts.obligations` — ContractObligation CRUD\n */\n readonly contracts: ContractsNamespace;\n\n /**\n * Operations for managing TimeEntries, Comments, and Capacity records\n * in the Work & Time domain.\n * - `work.timeEntries` — TimeEntry CRUD\n * - `work.comments` — Comment CRUD\n * - `work.capacity` — Capacity CRUD\n */\n readonly work: WorkNamespace;\n\n /**\n * Operations for managing technology investment portfolio items and cost centers\n * in the Investments domain.\n * - `investments.portfolio` — TechPortfolioItem CRUD\n * - `investments.costCenters` — CostCenter CRUD\n */\n readonly investments: InvestmentsNamespace;\n\n /**\n * Operations for managing PerformanceReviews, PersonGoals, and LearningRecords\n * in the Performance & Development domain.\n * - `performance.reviews` — PerformanceReview CRUD\n * - `performance.goals` — PersonGoal CRUD\n * - `performance.learningRecords` — LearningRecord CRUD\n */\n readonly performance: PerformanceNamespace;\n\n /**\n * Operations for managing PersonSkills, CalendarEvents, LeaveRequests, and MeetingNotes\n * in the Employee Experience domain.\n * - `employee.skills` — PersonSkill CRUD\n * - `employee.calendarEvents` — CalendarEvent CRUD\n * - `employee.leaveRequests` — LeaveRequest CRUD\n * - `employee.meetingNotes` — MeetingNote CRUD\n */\n readonly employee: EmployeeNamespace;\n\n /**\n * Operations for managing Objectives and KeyResults in the OKR domain.\n * - `okr.objectives` — Objective CRUD\n * - `okr.keyResults` — KeyResult CRUD\n */\n readonly okr: OkrNamespace;\n\n /**\n * Operations for managing Projects, Tasks, Sprints, and Features\n * in the Project domain.\n * - `projects.project` — Project CRUD\n * - `projects.tasks` — Task CRUD\n * - `projects.sprints` — Sprint CRUD\n * - `projects.features` — Feature CRUD\n */\n readonly projects: ProjectsNamespace;\n\n /**\n * Operations for managing Accounts, Contacts, Deals, and Activities\n * in the Customer domain.\n * - `customer.accounts` — Account CRUD\n * - `customer.contacts` — Contact CRUD\n * - `customer.deals` — Deal CRUD\n * - `customer.activities` — Activity CRUD\n */\n readonly customer: CustomerNamespace;\n\n /**\n * Operations for managing GRC entities: Frameworks, Controls, Evidence, Incidents, and Risks.\n * - `grc.frameworks` — Framework CRUD\n * - `grc.controls` — Control CRUD\n * - `grc.evidence` — Evidence CRUD\n * - `grc.incidents` — Incident CRUD\n * - `grc.risks` — Risk CRUD\n */\n readonly grc: GrcNamespace;\n\n /**\n * Operations for managing SOC entities: Alerts, Investigations, and Playbooks.\n * - `soc.alerts` — Alert CRUD\n * - `soc.investigations` — Investigation CRUD\n * - `soc.playbooks` — Playbook CRUD\n */\n readonly soc: SocNamespace;\n\n /**\n * Operations for managing Learning entities: Cohorts and Assessments.\n * - `learning.cohorts` — Cohort CRUD\n * - `learning.assessments` — Assessment CRUD\n */\n readonly learning: LearningNamespace;\n\n /**\n * Operations for managing RfpRecords, RfpQuestions, and RfpResponses\n * in the RFP domain.\n * - `rfp.records` — RfpRecord CRUD\n * - `rfp.questions` — RfpQuestion CRUD\n * - `rfp.responses` — RfpResponse CRUD\n */\n readonly rfp: RfpNamespace;\n readonly knowledge: KnowledgeNamespace;\n\n /**\n * Operations for managing Integration entities: Applications, Connectors, ApiKeys, and Webhooks.\n * - `integration.applications` — Application CRUD\n * - `integration.connectors` — Connector CRUD\n * - `integration.apiKeys` — ApiKey CRUD\n * - `integration.webhooks` — Webhook CRUD\n */\n readonly integration: IntegrationNamespace;\n\n /**\n * Operations for managing Tickets and SLA Policies in the Helpdesk domain.\n * - `helpdesk.tickets` — Ticket CRUD\n * - `helpdesk.slaPolicies` — SLAPolicy CRUD\n */\n readonly helpdesk: HelpdeskNamespace;\n\n /**\n * Operations for managing HR Lifecycle entities: JobPostings, Applicants,\n * OnboardingTasks, and OffboardingTasks.\n * - `hr.jobPostings` — JobPosting CRUD\n * - `hr.applicants` — Applicant CRUD\n * - `hr.onboardingTasks` — OnboardingTask CRUD\n * - `hr.offboardingTasks` — OffboardingTask CRUD\n */\n readonly hr: HrNamespace;\n\n /**\n * Operations for managing Notifications and Announcements\n * in the Notifications domain.\n * - `notifications.notification` — Notification list/get/markRead\n * - `notifications.announcements` — Announcement CRUD\n */\n readonly notifications: NotificationsNamespace;\n\n /**\n * Operations for managing ApprovalRequests and ApprovalSteps\n * in the Approvals domain.\n * - `approvals.requests` — ApprovalRequest CRUD + cancel\n * - `approvals.steps` — ApprovalStep CRUD + decide + delegate\n */\n readonly approvals: ApprovalsNamespace;\n\n readonly finance: FinanceNamespace;\n\n /**\n * Policy Management.\n * - `policies.policy` — Policy CRUD + publish/retire helpers\n * - `policies.acknowledgements` — per-Person sigs on a specific Policy version\n * - `policies.reviews` — scheduled re-attestations (annual / per-incident)\n */\n readonly policies: PoliciesNamespace;\n\n /**\n * Operations for managing Locations and Departments in the Org domain.\n * - `org.locations` — Location CRUD\n * - `org.departments` — Department CRUD\n */\n readonly org: OrgNamespace;\n\n /**\n * Operations for managing Products and ProductCategories in the Catalog domain.\n * - `catalog.products` — Product CRUD\n * - `catalog.categories` — ProductCategory CRUD\n */\n readonly catalog: CatalogNamespace;\n\n /**\n * Operations for managing Suppliers in the Procurement domain.\n * - `procurement.suppliers` — Supplier CRUD\n */\n readonly procurement: ProcurementNamespace;\n\n /**\n * Operations module for cross-functional request tracking.\n * - `operations.accessRequests` — system access provisioning workflow\n * - `operations.hrRequests` — HR document/service requests\n * - `operations.pending` — aggregated pending items across all workflows\n * - `operations.equipment` — equipment request and provisioning\n * - `operations.travel` — travel request and booking workflow\n */\n readonly operations: OperationsNamespace;\n\n /**\n * Analytics module for dashboards, metrics, and reports.\n * - `analytics.dashboards` — dashboard CRUD\n * - `analytics.metrics` — time-series metric queries\n * - `analytics.reports` — report generation and management\n */\n readonly analytics: AnalyticsNamespace;\n\n /**\n * Graph module for knowledge graph operations.\n * - `graph.nodes` — node listing and filtering\n * - `graph.edges` — edge listing and filtering\n * - `graph.queries` — saved graph query execution\n */\n readonly graph: GraphNamespace;\n\n /**\n * Planner module for user-scoped daily planning.\n * - `planner.dailyPlans` — daily plan CRUD\n * - `planner.planItems` — individual plan items/tasks\n */\n readonly planner: PlannerNamespace;\n\n /**\n * Postmortems module for incident timeline tracking.\n * - `postmortems.timeline` — incident timeline event CRUD\n */\n readonly postmortems: PostmortemsNamespace;\n\n /**\n * Vendor management module — scorecards, insurance, certifications, contacts, onboarding.\n * - `vendor.scorecards` — VendorScorecard CRUD\n * - `vendor.insurance` — VendorInsurance CRUD\n * - `vendor.certifications` — VendorCertification CRUD\n * - `vendor.contacts` — VendorContact CRUD\n * - `vendor.onboarding` — VendorOnboarding CRUD\n */\n readonly vendor: VendorNamespace;\n\n /**\n * Marketing module — campaigns, leads, content, events, social, emails, analytics.\n * - `marketing.campaigns` — Campaign CRUD\n * - `marketing.leads` — Lead CRUD\n * - `marketing.content` — Content CRUD\n * - `marketing.events` — MarketingEvent CRUD\n * - `marketing.social` — SocialPost CRUD\n * - `marketing.emails` — MarketingEmail CRUD\n * - `marketing.analytics` — MarketingMetric (read-only)\n */\n readonly marketing: MarketingNamespace;\n\n /**\n * Legal module — contracts, NDAs, cases, IP assets, compliance, reviews.\n * - `legal.contracts` — LegalContract CRUD\n * - `legal.ndas` — NDA CRUD\n * - `legal.cases` — LegalCase CRUD\n * - `legal.ip` — IP Asset CRUD\n * - `legal.compliance` — LegalCompliance CRUD\n * - `legal.reviews` — LegalReview CRUD\n */\n readonly legal: LegalNamespace;\n\n /**\n * Surveys module — survey definitions, responses, and analytics.\n * - `surveys.surveys` — Survey CRUD\n * - `surveys.responses` — SurveyResponse CRUD\n * - `surveys.analytics` — SurveyAnalytics CRUD\n */\n readonly surveys: SurveysNamespace;\n\n /**\n * Process module — process maps, bottlenecks, efficiency scores.\n * - `process.maps` — ProcessMap CRUD\n * - `process.bottlenecks` — Bottleneck CRUD\n * - `process.efficiencyScores` — EfficiencyScore CRUD\n */\n readonly process: ProcessNamespace;\n\n /**\n * ClientOps module — customer health, playbooks, onboarding, retention, expansion.\n * - `clientops.healthScores` — HealthScore CRUD\n * - `clientops.playbooks` — Playbook CRUD\n * - `clientops.onboardingPlans` — OnboardingPlan CRUD\n * - `clientops.retentionRisks` — RetentionRisk CRUD\n * - `clientops.expansions` — Expansion CRUD\n */\n readonly clientops: ClientOpsNamespace;\n\n /**\n * Integrations module — external connections, data source registry, sync state.\n * Distinct from `integration` (platform primitives like apps, connectors, webhooks).\n * - `integrations.connections` — Connection CRUD\n * - `integrations.dataSources` — IntegrationDataSource CRUD\n * - `integrations.syncState` — SyncState CRUD\n */\n readonly integrations: IntegrationsNamespace;\n\n /**\n * OpenAI-compatible completions gateway.\n * - `completions.chat` — POST chat completions (OpenAI shape)\n */\n readonly completions: CompletionsNamespace;\n\n /**\n * Governed prepare-review-commit mutation contract.\n * Three-step lifecycle: `prepareMutation` → (optional) `reviewMutation` → `commitMutation`.\n * Risk determination, review requirements, and approval policies are server-side;\n * the SDK is a typed client over `/api/v1/mutations/*`.\n */\n readonly mutations: MutationService;\n\n /**\n * Source-backed business timeline/activity ledger. Distinct from platform\n * telemetry — timeline entries cite canonical source records and support\n * daily/weekly \"changed since\" briefs across all cockpits.\n */\n readonly timeline: BusinessTimelineService;\n\n /**\n * Explainable \"why now\" attention signals. Cite source records, support\n * dismissal/resolution without altering canonical sources. Used for daily\n * priority queues (SLA risk, overdue approvals, renewal risk, etc.).\n */\n readonly signals: AttentionSignalService;\n\n /**\n * Cross-domain primitives — attention signals and timeline events.\n * - `common.attentionSignals` — attention signal CRUD + dismiss/resolve\n * - `common.timelineEvents` — timeline event CRUD + list-by-source/list-by-domain\n */\n readonly common: CommonNamespace;\n\n /** Operations for emitting and querying platform audit events. */\n readonly auditRecords: AuditService;\n\n /** CRUD operations for cPod Tenant resources (admin use). */\n readonly tenants: TenantService;\n\n /**\n * Agents configured by the user — personal, department-scoped, or tenant-wide.\n * Each agent carries a model, skills, MCP server integrations, and runtime secrets.\n */\n readonly agents: AgentsService;\n\n /**\n * MCP server integrations registered by the user.\n * These are the external services (GitHub, Jira, Slack…) that agents can call as tools.\n * After registering, call `mcpServers.discover()` to refresh the tool list.\n */\n readonly mcpServers: McpServersService;\n\n /**\n * Cognitive memory layer — facts, preferences, and instructions auto-extracted\n * from conversations. Scoped to user, project, agent, or session.\n * Use `memory.acknowledge()` to approve, reject, or correct any memory.\n */\n readonly memory: MemoryService;\n\n /**\n * Workspaces — personal and shared file/folder containers.\n * Each workspace has a root folder; files are stored in MinIO with 30-day trash retention.\n */\n readonly workspaces: WorkspacesService;\n\n /**\n * Chat HITL (Human-in-the-Loop) service — approve or reject pending agent tool calls.\n * When an agent calls a tool marked `requires_approval=true`, it pauses and emits\n * a `chat.hitl_required` SSE event. Use `chat.resolve()` to approve or reject.\n */\n readonly chat: ChatHITLService;\n\n /** Apps service — register apps and their MCP tools. */\n readonly apps: AppsService;\n\n /** Capability registry — dynamic app-tool register / discover / call. */\n readonly registry: RegistryService;\n\n // The SDK is a pure HTTP client. Every operation routes through\n // ``baseUrl`` + bearer auth. No direct Mongo / MinIO connections.\n /**\n * Token lifecycle handle. Read or replace the current bundle at runtime —\n * useful for apps that want to persist refreshed tokens or swap in a new\n * session without rebuilding the whole client.\n *\n * @example\n * client.tokens.getBundle() // → { accessToken, refreshToken? }\n * client.tokens.setBundle({ accessToken }) // replace\n */\n readonly tokens: import(\"./http/token-manager.js\").TokenManager;\n\n private readonly _config: CpodConfig;\n private readonly _http: HttpClient;\n\n /**\n * Create a CpodClient from environment variables.\n * Reads CPOD_API_KEY (required), CPOD_APP_ID (required for MCP),\n * and CPOD_API_URL or CPOD_BASE_URL (optional, defaults to https://api.cyberpod.app).\n * @example\n * const client = CpodClient.fromEnv()\n */\n static fromEnv(): CpodClient {\n const apiKey = process.env['CPOD_API_KEY'];\n if (!apiKey) throw new Error('CPOD_API_KEY environment variable is required');\n const baseUrl = process.env['CPOD_API_URL'] ?? process.env['CPOD_BASE_URL'];\n const appId = process.env['CPOD_APP_ID'];\n return new CpodClient({\n apiKey,\n ...(baseUrl !== undefined && { baseUrl }),\n ...(appId !== undefined && { appId }),\n });\n }\n\n /**\n * Create a CpodClient from a token issued by the IdP (Keycloak) via the\n * platform's OIDC flow — the zero-credential path. The app holds no API key\n * or client secret of its own; it simply forwards the access token that\n * arrived for the logged-in user (e.g. the inbound request's Bearer token),\n * and every call runs as that user.\n *\n * Pass `refreshToken` to get transparent re-auth on 401.\n *\n * @example\n * // In a request handler — act as the logged-in user, no secrets:\n * const token = req.headers.authorization?.replace(/^Bearer\\s+/i, '');\n * const cpod = CpodClient.fromToken(token!);\n * await cpod.people.persons.list();\n */\n static fromToken(\n accessToken: string,\n opts?: { refreshToken?: string; baseUrl?: string; appId?: string },\n ): CpodClient {\n if (!accessToken) throw new Error('CpodClient.fromToken requires an access token');\n return new CpodClient({\n auth: {\n accessToken,\n ...(opts?.refreshToken !== undefined && { refreshToken: opts.refreshToken }),\n },\n ...(opts?.baseUrl !== undefined && { baseUrl: opts.baseUrl }),\n ...(opts?.appId !== undefined && { appId: opts.appId }),\n });\n }\n\n /**\n * Build the URL that starts the centralized Keycloak login. Send the user's\n * browser here; the backend forwards to the IdP, mints the token, and\n * redirects to `returnTo` with it. The app never sees a credential — only the\n * resulting token, which you then pass to {@link CpodClient.fromToken}.\n *\n * `backendUrl` is the cPod backend base URL — the SDK's only point of contact.\n * The app never talks to the control plane directly; the backend forwards the\n * login to it.\n *\n * @example\n * const { loginUrl } = CpodClient.beginLogin({\n * backendUrl: 'https://api.cyberpod.app',\n * returnTo: 'https://app.example.com/auth/finalize',\n * });\n * // → redirect the browser to loginUrl\n */\n static beginLogin(opts: { backendUrl: string; returnTo: string }): { loginUrl: string } {\n const base = opts.backendUrl.replace(/\\/$/, '');\n const loginUrl = `${base}/api/v1/auth/oidc/login?return_to=${encodeURIComponent(opts.returnTo)}`;\n return { loginUrl };\n }\n\n /**\n * Exchange the one-time `code` (received on the app redirect after login)\n * for the token bundle, via the backend. The token is never in a URL — only\n * the opaque code is. Call this from your `/auth/callback` handler, then build\n * a client with {@link CpodClient.fromToken}.\n *\n * `backendUrl` is the cPod backend — the SDK's only point of contact.\n */\n static async exchangeCode(opts: {\n backendUrl: string;\n code: string;\n }): Promise<{ accessToken: string; refreshToken?: string }> {\n const base = opts.backendUrl.replace(/\\/$/, '');\n const res = await fetch(`${base}/api/v1/auth/oidc/exchange`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ code: opts.code }),\n });\n if (!res.ok) throw new Error(`cPod code exchange failed: HTTP ${res.status}`);\n const data = (await res.json()) as { token: string; refresh_token?: string };\n return {\n accessToken: data.token,\n ...(data.refresh_token ? { refreshToken: data.refresh_token } : {}),\n };\n }\n\n /**\n * Zero-dependency popup login — the whole IdP dance in one call, with **no\n * callback route** in your app. Opens Keycloak in a popup (the backend hosts\n * the landing screen), polls the backend for the outcome, and resolves to a\n * ready {@link CpodClient}. Must run in a browser and be triggered by a user\n * gesture (a click) so the popup isn't blocked.\n *\n * The result is delivered by the backend (not a window message), so nothing\n * is \"missed\": a blocked/closed popup, a timeout, an expired session, or an\n * IdP error all reject with a {@link LoginError} whose `code` says why. When\n * popups aren't viable (SSR, mobile webviews), fall back to the redirect flow\n * ({@link CpodClient.beginLogin} + {@link CpodClient.exchangeCode}).\n *\n * @example\n * button.onclick = async () => {\n * try {\n * const cpod = await CpodClient.login({ backendUrl: 'https://api.cyberpod.app' });\n * await cpod.people.persons.list(); // runs as the signed-in user\n * } catch (e) {\n * // popup blocked / closed / timed out → guaranteed redirect fallback\n * const { loginUrl } = CpodClient.beginLogin({ backendUrl, returnTo });\n * window.location.href = loginUrl;\n * }\n * };\n */\n static async login(opts: {\n backendUrl: string;\n baseUrl?: string;\n appId?: string;\n /** Overall timeout before giving up (default 5 min). */\n timeoutMs?: number;\n /** Poll interval (default 1.2s). */\n pollIntervalMs?: number;\n /** Overrides the popup window features string. */\n popupFeatures?: string;\n }): Promise<CpodClient> {\n const win = browserWindow();\n if (!win || typeof win.open !== 'function') {\n throw new LoginError(\n 'no_window',\n 'CpodClient.login() needs a browser. On a server use beginLogin + exchangeCode.',\n );\n }\n\n const base = opts.backendUrl.replace(/\\/+$/, '');\n const handle = generateLoginHandle();\n const returnTo = `${base}/api/v1/auth/oidc/finish?handle=${encodeURIComponent(handle)}`;\n const { loginUrl } = CpodClient.beginLogin({ backendUrl: opts.backendUrl, returnTo });\n\n const popup = win.open(\n loginUrl,\n 'cpod-login',\n opts.popupFeatures ?? 'width=480,height=720,menubar=no,toolbar=no',\n );\n if (!popup) {\n throw new LoginError(\n 'popup_blocked',\n 'The login popup was blocked. Trigger login from a click, or use the redirect flow (beginLogin).',\n );\n }\n\n const timeoutMs = opts.timeoutMs ?? 5 * 60 * 1000;\n const pollMs = opts.pollIntervalMs ?? 1200;\n const deadline = Date.now() + timeoutMs;\n\n try {\n while (Date.now() < deadline) {\n await new Promise((r) => setTimeout(r, pollMs));\n\n let data: { status?: string; code?: string; error?: string } | null = null;\n try {\n const res = await fetch(`${base}/api/v1/auth/oidc/result`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ handle }),\n });\n data = res.ok\n ? ((await res.json()) as { status?: string; code?: string; error?: string })\n : null;\n } catch {\n data = null; // transient network blip — keep polling\n }\n\n if (data?.status === 'ready' && data.code) {\n const { accessToken, refreshToken } = await CpodClient.exchangeCode({\n backendUrl: opts.backendUrl,\n code: data.code,\n });\n return CpodClient.fromToken(accessToken, {\n ...(refreshToken !== undefined && { refreshToken }),\n ...(opts.baseUrl !== undefined && { baseUrl: opts.baseUrl }),\n ...(opts.appId !== undefined && { appId: opts.appId }),\n });\n }\n if (data?.status === 'error') {\n throw new LoginError(\n data.error || 'error',\n `Sign-in failed: ${data.error || 'unknown error'}.`,\n );\n }\n // pending → keep polling, unless the user closed the popup.\n if (popup.closed) {\n throw new LoginError(\n 'cancelled',\n 'The login window was closed before sign-in completed.',\n );\n }\n }\n throw new LoginError('timeout', 'Login timed out before completing.');\n } finally {\n try {\n popup.close();\n } catch {\n /* ignore */\n }\n }\n }\n\n /**\n * Escape hatch — issue a raw request through the SDK's HTTP client, so auth,\n * base URL, retries, and error mapping all apply. Use for endpoints without a\n * typed method yet, and for tooling (e.g. the conformance harness). Prefer\n * the typed services for everyday calls.\n */\n request<T = unknown>(\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n path: string,\n body?: unknown,\n ): Promise<T> {\n switch (method) {\n case 'GET':\n return this._http.get<T>(path);\n case 'POST':\n return this._http.post<T>(path, body);\n case 'PUT':\n return this._http.put<T>(path, body);\n case 'PATCH':\n return this._http.patch<T>(path, body);\n case 'DELETE':\n return this._http.delete<T>(path);\n }\n }\n\n constructor(config: CpodConfig) {\n // Accept either the simple `apiKey` or the full `auth` bundle (which\n // unlocks transparent refresh). HttpClient enforces the same rule\n // internally — surface a friendlier error at the entrypoint.\n const accessToken = config.auth?.accessToken ?? config.apiKey;\n if (!accessToken) {\n throw new Error(\n 'CpodClient requires either { apiKey } or { auth: { accessToken, … } }.',\n );\n }\n this._config = config;\n\n const http = new HttpClient(config);\n this._http = http;\n this.tokens = http.tokens;\n // ── EDM domains — all SDK direct-mode (Mongo) ──────────────────────────\n // Backend's /api/v1/edm/* endpoints are being removed. The SDK owns EDM\n // entirely now. See cpod-backend PR for the corresponding deletion.\n // AuthService takes (baseUrl, token, tokenManager) — not an HttpClient —\n // and manages its own fetch. The TokenManager is passed so that successful\n // login / resetPassword / acceptInvite automatically update the client's\n // stored token bundle (fixes #149: refresh_token now captured on login).\n this.auth = new AuthService(config.baseUrl ?? '', accessToken, http.tokens);\n // EDM core — backend owns DB. Thin HTTP clients.\n // People domain (Standards §4.1): Person at /api/v1/people/persons.\n // Group is canonically /api/v1/people/groups too — today it's served\n // by the SCIM /api/v1/groups endpoint, so we alias the same instance\n // under `client.people.groups` and `client.groups` for parity.\n const groups = new GroupService(http);\n this.groups = groups;\n this.people = { persons: new PersonService(http), groups };\n this.technologyAssets = new TechnologyService(http);\n this.entitlementsItems = new AccessEntitlementService(http);\n this.vulnerabilitiesItems = new VulnerabilityService(http);\n this.complianceControls = new ComplianceControlService(http);\n this.cloudResourcesItems = new CloudResourceService(http);\n this.licensesItems = new LicenseService(http);\n this.assetsItems = new AssetService(http);\n this.risk = new RiskService(http);\n this.relationshipsEdges = new RelationshipService(http);\n this.dataSources = new DataSourceService(http);\n // Storage — backend owns DB + issues presigned MinIO URLs.\n this.storage = {\n files: new FilesClient(http),\n db: new DbClient(http),\n kv: new KvClient(http),\n objects: new StorageObjectsService(http),\n records: new StorageRecordsService(http),\n sqlite: new StorageSqliteService(http),\n };\n this.skills = new SkillsService(http);\n this.workflows = new WorkflowsService(http);\n this.jobs = new JobsService(http);\n this.masking = new MaskingService();\n this.telemetry = new TelemetryClient(http);\n this.flags = new FlagsService(http);\n this.secrets = new SecretsService(http);\n this.organizations = new OrganizationService(http);\n this.pods = new PodService(http);\n this.credentials = new CredentialService(http);\n this.events = new EventService(http);\n this.userProfiles = new UserProfileService(http);\n const appId = config.appId ?? process.env['CPOD_APP_ID'] ?? '';\n this.mcp = new McpService(http, appId);\n // Contracts — backend owns DB (/api/v1/contracts/*). Thin HTTP client.\n const contractService = new ContractService(http);\n this.contracts = {\n vendors: new VendorService(http),\n contract: contractService,\n obligations: new ContractObligationService(http),\n };\n // Work, Investments, Performance, Employee, OKR — backend owns DB.\n // Each is a thin HTTP client against /api/v1/<app>/<resource>.\n this.work = {\n timeEntries: new TimeEntryService(http),\n comments: new CommentService(http),\n capacity: new CapacityService(http),\n };\n this.investments = {\n portfolio: new TechPortfolioService(http),\n costCenters: new CostCenterService(http),\n };\n this.performance = {\n reviews: new PerformanceReviewService(http),\n goals: new PersonGoalService(http),\n learningRecords: new LearningRecordService(http),\n };\n this.employee = {\n skills: new PersonSkillService(http),\n calendarEvents: new CalendarEventService(http),\n leaveRequests: new LeaveRequestService(http),\n meetingNotes: new MeetingNoteService(http),\n };\n this.okr = {\n objectives: new ObjectiveService(http),\n keyResults: new KeyResultService(http),\n };\n // Projects (EDM) — backend owns DB (/api/v1/edm-projects/*).\n const projectService = new ProjectService(http);\n this.projects = {\n project: projectService,\n tasks: new TaskService(http),\n sprints: new SprintService(http),\n features: new FeatureService(http),\n };\n // CRM — backend owns DB (/api/v1/crm/*). Thin HTTP client.\n this.customer = {\n accounts: new AccountService(http),\n contacts: new ContactService(http),\n deals: new DealService(http),\n activities: new ActivityService(http),\n quotes: new QuoteService(http),\n lineItems: new LineItemService(http),\n };\n // GRC, SOC, Learning, RFP — backend owns DB. Thin HTTP clients.\n this.grc = {\n frameworks: new FrameworksService(http),\n controls: new ControlsService(http),\n evidence: new EvidenceService(http),\n incidents: new IncidentsService(http),\n risks: new RisksService(http),\n };\n this.soc = {\n alerts: new AlertsService(http),\n investigations: new InvestigationsService(http),\n playbooks: new PlaybooksService(http),\n };\n this.learning = {\n cohorts: new CohortService(http),\n assessments: new AssessmentService(http),\n };\n this.rfp = {\n records: new RfpRecordService(http),\n questions: new RfpQuestionService(http),\n responses: new RfpResponseService(http),\n };\n // Knowledge + Integration — backend owns DB. Thin HTTP clients.\n this.knowledge = {\n documents: new KnowledgeDocumentService(http),\n chunks: new KnowledgeChunkService(http),\n entities: new KnowledgeEntityService(http),\n templates: new KnowledgeTemplateService(http),\n sops: new KnowledgeSopService(http),\n };\n this.integration = {\n applications: new ApplicationService(http),\n connectors: new ConnectorService(http),\n apiKeys: new ApiKeyService(http),\n webhooks: new WebhookService(http),\n };\n // Helpdesk / Support — backend owns DB (cpod-backend /api/v1/helpdesk/*).\n // First domain migrated under MIGRATION_DB_OWNERSHIP.md.\n this.helpdesk = {\n tickets: new TicketService(http),\n slaPolicies: new SlaPolicyService(http),\n };\n // HR — backend owns DB (/api/v1/hr/*). Thin HTTP clients.\n this.hr = {\n jobPostings: new JobPostingsService(http),\n applicants: new ApplicantsService(http),\n onboardingTasks: new OnboardingTasksService(http),\n offboardingTasks: new OffboardingTasksService(http),\n };\n // Notifications + Approvals — backend owns DB. Thin HTTP clients.\n const notificationService = new NotificationsService(http);\n this.notifications = {\n notification: notificationService,\n announcements: new AnnouncementsService(http),\n };\n this.approvals = {\n requests: new ApprovalRequestsService(http),\n steps: new ApprovalStepsService(http),\n };\n // Finance — backend owns DB (/api/v1/finance/*). Thin HTTP client.\n this.finance = {\n invoices: new InvoicesService(http),\n purchaseOrders: new PurchaseOrdersService(http),\n expenses: new ExpensesService(http),\n budgets: new BudgetsService(http),\n budgetLines: new BudgetLinesService(http),\n };\n // Policies / Org / Catalog / Procurement — backend owns DB. Thin HTTP clients.\n const policyService = new PolicyService(http);\n this.policies = {\n policy: policyService,\n acknowledgements: new PolicyAcknowledgementService(http),\n reviews: new PolicyReviewService(http),\n };\n // org.departments served at /api/v1/platform/departments.\n this.org = {\n locations: new LocationService(http),\n departments: new DepartmentService(http),\n };\n this.catalog = {\n products: new ProductService(http),\n categories: new ProductCategoryService(http),\n };\n this.procurement = {\n suppliers: new SupplierService(http),\n };\n this.operations = {\n accessRequests: new AccessRequestService(http),\n hrRequests: new HRRequestService(http),\n pending: new PendingService(http),\n equipment: new EquipmentService(http),\n travel: new TravelService(http),\n };\n this.analytics = {\n dashboards: new DashboardService(http),\n metrics: new MetricService(http),\n reports: new ReportService(http),\n };\n this.graph = {\n nodes: new NodeService(http),\n edges: new EdgeService(http),\n queries: new QueryService(http),\n };\n this.planner = {\n dailyPlans: new DailyPlanService(http),\n planItems: new PlanItemService(http),\n };\n this.postmortems = {\n timeline: new TimelineService(http),\n };\n this.vendor = {\n scorecards: new ScorecardService(http),\n insurance: new InsuranceService(http),\n certifications: new CertificationService(http),\n contacts: new VendorContactService(http),\n onboarding: new OnboardingService(http),\n };\n this.marketing = {\n campaigns: new CampaignService(http),\n leads: new LeadService(http),\n content: new ContentService(http),\n events: new MarketingEventService(http),\n social: new SocialService(http),\n emails: new MarketingEmailService(http),\n analytics: new MarketingAnalyticsService(http),\n };\n this.legal = {\n contracts: new LegalContractService(http),\n ndas: new NdaService(http),\n cases: new LegalCaseService(http),\n ip: new IpService(http),\n compliance: new LegalComplianceService(http),\n reviews: new LegalReviewService(http),\n };\n this.surveys = {\n surveys: new SurveyService(http),\n responses: new SurveyResponseService(http),\n analytics: new SurveyAnalyticsService(http),\n };\n this.process = {\n maps: new ProcessMapService(http),\n bottlenecks: new BottleneckService(http),\n efficiencyScores: new EfficiencyScoreService(http),\n };\n this.clientops = {\n healthScores: new HealthScoreService(http),\n playbooks: new PlaybookService(http),\n onboardingPlans: new OnboardingPlanService(http),\n retentionRisks: new RetentionRiskService(http),\n expansions: new ExpansionService(http),\n };\n this.integrations = {\n connections: new ConnectionService(http),\n dataSources: new IntegrationDataSourceService(http),\n syncState: new SyncStateService(http),\n };\n this.completions = {\n chat: new CompletionsService(http),\n };\n this.mutations = new MutationService(http);\n this.timeline = new BusinessTimelineService(http);\n this.signals = new AttentionSignalService(http);\n this.common = {\n attentionSignals: new CommonAttentionSignalService(http),\n timelineEvents: new TimelineEventService(http),\n };\n this.auditRecords = new AuditService(http);\n this.tenants = new TenantService(http);\n this.chat = new ChatHITLService(http);\n this.apps = new AppsService(http);\n this.registry = new RegistryService(http);\n this.agents = new AgentsService(http);\n this.mcpServers = new McpServersService(http);\n this.memory = new MemoryService(http);\n this.workspaces = new WorkspacesService(http);\n }\n\n /**\n * Auto-derive an MCP-compatible tool list from every service's static\n * MCP_MANIFEST. Adding a new SDK method (plus an entry in its service's\n * manifest) automatically extends the returned array — no separate MCP\n * registry file to keep in sync.\n *\n * @returns A flat list of MCP tool definitions ready to register with\n * an MCP server. Tool names are `{domain}.{method}` (e.g.\n * `people.create`).\n */\n mcpTools(): McpToolDefinition[] {\n const entries: ServiceManifestEntry[] = [\n { domain: 'auth', manifest: AuthService.MCP_MANIFEST },\n { domain: 'people.persons', manifest: PersonService.MCP_MANIFEST },\n { domain: 'people.groups', manifest: GroupService.MCP_MANIFEST },\n { domain: 'technology.assets', manifest: TechnologyService.MCP_MANIFEST },\n { domain: 'entitlements.items', manifest: AccessEntitlementService.MCP_MANIFEST },\n { domain: 'vulnerabilities.items', manifest: VulnerabilityService.MCP_MANIFEST },\n { domain: 'complianceControls', manifest: ComplianceControlService.MCP_MANIFEST },\n { domain: 'cloudResources.items', manifest: CloudResourceService.MCP_MANIFEST },\n { domain: 'licenses.items', manifest: LicenseService.MCP_MANIFEST },\n { domain: 'assets.items', manifest: AssetService.MCP_MANIFEST },\n { domain: 'risk', manifest: RiskService.MCP_MANIFEST },\n { domain: 'relationships.edges', manifest: RelationshipService.MCP_MANIFEST },\n { domain: 'dataSources', manifest: DataSourceService.MCP_MANIFEST },\n { domain: 'credentials', manifest: CredentialService.MCP_MANIFEST },\n { domain: 'masking', manifest: MaskingService.MCP_MANIFEST },\n { domain: 'storage.objects', manifest: StorageObjectsService.MCP_MANIFEST },\n { domain: 'storage.records', manifest: StorageRecordsService.MCP_MANIFEST },\n // Business EDM domains — all SDK direct-mode.\n { domain: 'work.timeEntries', manifest: TimeEntryService.MCP_MANIFEST },\n { domain: 'work.comments', manifest: CommentService.MCP_MANIFEST },\n { domain: 'work.capacity', manifest: CapacityService.MCP_MANIFEST },\n { domain: 'investments.portfolio', manifest: TechPortfolioService.MCP_MANIFEST },\n { domain: 'investments.costCenters', manifest: CostCenterService.MCP_MANIFEST },\n { domain: 'performance.reviews', manifest: PerformanceReviewService.MCP_MANIFEST },\n { domain: 'performance.goals', manifest: PersonGoalService.MCP_MANIFEST },\n { domain: 'performance.learningRecords', manifest: LearningRecordService.MCP_MANIFEST },\n { domain: 'employee.skills', manifest: PersonSkillService.MCP_MANIFEST },\n { domain: 'employee.calendarEvents', manifest: CalendarEventService.MCP_MANIFEST },\n { domain: 'employee.leaveRequests', manifest: LeaveRequestService.MCP_MANIFEST },\n { domain: 'employee.meetingNotes', manifest: MeetingNoteService.MCP_MANIFEST },\n { domain: 'okr.objectives', manifest: ObjectiveService.MCP_MANIFEST },\n { domain: 'okr.keyResults', manifest: KeyResultService.MCP_MANIFEST },\n { domain: 'learning.cohorts', manifest: CohortService.MCP_MANIFEST },\n { domain: 'learning.assessments', manifest: AssessmentService.MCP_MANIFEST },\n { domain: 'rfp.records', manifest: RfpRecordService.MCP_MANIFEST },\n { domain: 'rfp.questions', manifest: RfpQuestionService.MCP_MANIFEST },\n { domain: 'rfp.responses', manifest: RfpResponseService.MCP_MANIFEST },\n { domain: 'notifications.notification', manifest: NotificationsService.MCP_MANIFEST },\n { domain: 'notifications.announcements', manifest: AnnouncementsService.MCP_MANIFEST },\n { domain: 'approvals.requests', manifest: ApprovalRequestsService.MCP_MANIFEST },\n { domain: 'approvals.steps', manifest: ApprovalStepsService.MCP_MANIFEST },\n { domain: 'catalog.products', manifest: ProductService.MCP_MANIFEST },\n { domain: 'catalog.categories', manifest: ProductCategoryService.MCP_MANIFEST },\n { domain: 'procurement.suppliers', manifest: SupplierService.MCP_MANIFEST },\n { domain: 'knowledge.documents', manifest: KnowledgeDocumentService.MCP_MANIFEST },\n { domain: 'knowledge.chunks', manifest: KnowledgeChunkService.MCP_MANIFEST },\n { domain: 'knowledge.entities', manifest: KnowledgeEntityService.MCP_MANIFEST },\n { domain: 'knowledge.templates', manifest: KnowledgeTemplateService.MCP_MANIFEST },\n { domain: 'knowledge.sops', manifest: KnowledgeSopService.MCP_MANIFEST },\n // Projects + helpdesk — tasks, sprints, features, tickets, SLA policies.\n { domain: 'projects.project', manifest: ProjectService.MCP_MANIFEST },\n { domain: 'projects.tasks', manifest: TaskService.MCP_MANIFEST },\n { domain: 'projects.sprints', manifest: SprintService.MCP_MANIFEST },\n { domain: 'projects.features', manifest: FeatureService.MCP_MANIFEST },\n { domain: 'helpdesk.tickets', manifest: TicketService.MCP_MANIFEST },\n { domain: 'helpdesk.slaPolicies', manifest: SlaPolicyService.MCP_MANIFEST },\n // HR (job postings, applicants, on/off-boarding).\n { domain: 'hr.jobPostings', manifest: JobPostingsService.MCP_MANIFEST },\n { domain: 'hr.applicants', manifest: ApplicantsService.MCP_MANIFEST },\n { domain: 'hr.onboardingTasks', manifest: OnboardingTasksService.MCP_MANIFEST },\n { domain: 'hr.offboardingTasks', manifest: OffboardingTasksService.MCP_MANIFEST },\n // CRM.\n { domain: 'customer.accounts', manifest: AccountService.MCP_MANIFEST },\n { domain: 'customer.contacts', manifest: ContactService.MCP_MANIFEST },\n { domain: 'customer.deals', manifest: DealService.MCP_MANIFEST },\n { domain: 'customer.activities', manifest: ActivityService.MCP_MANIFEST },\n { domain: 'customer.quotes', manifest: QuoteService.MCP_MANIFEST },\n { domain: 'customer.lineItems', manifest: LineItemService.MCP_MANIFEST },\n // Finance.\n { domain: 'finance.invoices', manifest: InvoicesService.MCP_MANIFEST },\n { domain: 'finance.purchaseOrders', manifest: PurchaseOrdersService.MCP_MANIFEST },\n { domain: 'finance.expenses', manifest: ExpensesService.MCP_MANIFEST },\n { domain: 'finance.budgets', manifest: BudgetsService.MCP_MANIFEST },\n { domain: 'finance.budgetLines', manifest: BudgetLinesService.MCP_MANIFEST },\n // Contracts.\n { domain: 'contracts.vendors', manifest: VendorService.MCP_MANIFEST },\n { domain: 'contracts.contract', manifest: ContractService.MCP_MANIFEST },\n { domain: 'contracts.obligations', manifest: ContractObligationService.MCP_MANIFEST },\n // GRC.\n { domain: 'grc.frameworks', manifest: FrameworksService.MCP_MANIFEST },\n { domain: 'grc.controls', manifest: ControlsService.MCP_MANIFEST },\n { domain: 'grc.evidence', manifest: EvidenceService.MCP_MANIFEST },\n { domain: 'grc.incidents', manifest: IncidentsService.MCP_MANIFEST },\n { domain: 'grc.risks', manifest: RisksService.MCP_MANIFEST },\n // SOC.\n { domain: 'soc.alerts', manifest: AlertsService.MCP_MANIFEST },\n { domain: 'soc.investigations', manifest: InvestigationsService.MCP_MANIFEST },\n { domain: 'soc.playbooks', manifest: PlaybooksService.MCP_MANIFEST },\n // Policies (new domain).\n { domain: 'policies.policy', manifest: PolicyService.MCP_MANIFEST },\n { domain: 'policies.acknowledgements', manifest: PolicyAcknowledgementService.MCP_MANIFEST },\n { domain: 'policies.reviews', manifest: PolicyReviewService.MCP_MANIFEST },\n // Common domain — cross-domain primitives.\n { domain: 'common.attentionSignals', manifest: CommonAttentionSignalService.MCP_MANIFEST },\n { domain: 'common.timelineEvents', manifest: TimelineEventService.MCP_MANIFEST },\n // Analytics.\n { domain: 'analytics.dashboards', manifest: DashboardService.MCP_MANIFEST },\n { domain: 'analytics.metrics', manifest: MetricService.MCP_MANIFEST },\n { domain: 'analytics.reports', manifest: ReportService.MCP_MANIFEST },\n // Legal.\n { domain: 'legal.contracts', manifest: LegalContractService.MCP_MANIFEST },\n { domain: 'legal.ndas', manifest: NdaService.MCP_MANIFEST },\n { domain: 'legal.cases', manifest: LegalCaseService.MCP_MANIFEST },\n { domain: 'legal.ip', manifest: IpService.MCP_MANIFEST },\n { domain: 'legal.compliance', manifest: LegalComplianceService.MCP_MANIFEST },\n { domain: 'legal.reviews', manifest: LegalReviewService.MCP_MANIFEST },\n // Surveys.\n { domain: 'surveys.surveys', manifest: SurveyService.MCP_MANIFEST },\n { domain: 'surveys.responses', manifest: SurveyResponseService.MCP_MANIFEST },\n { domain: 'surveys.analytics', manifest: SurveyAnalyticsService.MCP_MANIFEST },\n // Process.\n { domain: 'process.maps', manifest: ProcessMapService.MCP_MANIFEST },\n { domain: 'process.bottlenecks', manifest: BottleneckService.MCP_MANIFEST },\n { domain: 'process.efficiencyScores', manifest: EfficiencyScoreService.MCP_MANIFEST },\n // Graph.\n { domain: 'graph.nodes', manifest: NodeService.MCP_MANIFEST },\n { domain: 'graph.edges', manifest: EdgeService.MCP_MANIFEST },\n { domain: 'graph.queries', manifest: QueryService.MCP_MANIFEST },\n // Operations.\n { domain: 'operations.accessRequests', manifest: AccessRequestService.MCP_MANIFEST },\n { domain: 'operations.hrRequests', manifest: HRRequestService.MCP_MANIFEST },\n { domain: 'operations.pending', manifest: PendingService.MCP_MANIFEST },\n { domain: 'operations.equipment', manifest: EquipmentService.MCP_MANIFEST },\n { domain: 'operations.travel', manifest: TravelService.MCP_MANIFEST },\n // Planner.\n { domain: 'planner.dailyPlans', manifest: DailyPlanService.MCP_MANIFEST },\n { domain: 'planner.planItems', manifest: PlanItemService.MCP_MANIFEST },\n // Postmortems.\n { domain: 'postmortems.timeline', manifest: TimelineService.MCP_MANIFEST },\n // Marketing.\n { domain: 'marketing.campaigns', manifest: CampaignService.MCP_MANIFEST },\n { domain: 'marketing.leads', manifest: LeadService.MCP_MANIFEST },\n { domain: 'marketing.content', manifest: ContentService.MCP_MANIFEST },\n { domain: 'marketing.events', manifest: MarketingEventService.MCP_MANIFEST },\n { domain: 'marketing.social', manifest: SocialService.MCP_MANIFEST },\n { domain: 'marketing.emails', manifest: MarketingEmailService.MCP_MANIFEST },\n { domain: 'marketing.analytics', manifest: MarketingAnalyticsService.MCP_MANIFEST },\n // Vendor management.\n { domain: 'vendor.scorecards', manifest: ScorecardService.MCP_MANIFEST },\n { domain: 'vendor.insurance', manifest: InsuranceService.MCP_MANIFEST },\n { domain: 'vendor.certifications', manifest: CertificationService.MCP_MANIFEST },\n { domain: 'vendor.contacts', manifest: VendorContactService.MCP_MANIFEST },\n { domain: 'vendor.onboarding', manifest: OnboardingService.MCP_MANIFEST },\n // Integration registry.\n { domain: 'integration.applications', manifest: ApplicationService.MCP_MANIFEST },\n { domain: 'integration.connectors', manifest: ConnectorService.MCP_MANIFEST },\n { domain: 'integration.apiKeys', manifest: ApiKeyService.MCP_MANIFEST },\n { domain: 'integration.webhooks', manifest: WebhookService.MCP_MANIFEST },\n // Org structure.\n { domain: 'org.locations', manifest: LocationService.MCP_MANIFEST },\n { domain: 'org.departments', manifest: DepartmentService.MCP_MANIFEST },\n // Governed mutations (prepare-review-commit).\n { domain: 'mutations', manifest: MutationService.MCP_MANIFEST },\n // ClientOps.\n { domain: 'clientops.healthScores', manifest: HealthScoreService.MCP_MANIFEST },\n { domain: 'clientops.playbooks', manifest: PlaybookService.MCP_MANIFEST },\n { domain: 'clientops.onboardingPlans', manifest: OnboardingPlanService.MCP_MANIFEST },\n { domain: 'clientops.retentionRisks', manifest: RetentionRiskService.MCP_MANIFEST },\n { domain: 'clientops.expansions', manifest: ExpansionService.MCP_MANIFEST },\n // Integrations (external connections, data sources, sync state).\n { domain: 'integrations.connections', manifest: ConnectionService.MCP_MANIFEST },\n { domain: 'integrations.dataSources', manifest: IntegrationDataSourceService.MCP_MANIFEST },\n { domain: 'integrations.syncState', manifest: SyncStateService.MCP_MANIFEST },\n ];\n return manifestsToTools(entries);\n }\n}\n","import type { PaginationOptions } from \"../types/index.js\";\n\n/**\n * Well-known event type strings emitted by the cPod platform.\n * Additional event types may be emitted for enterprise features — use string\n * literals for those until they are added to this enum.\n */\nexport enum EventType {\n // Pod lifecycle events\n PodCreated = \"pod.created\",\n PodUpdated = \"pod.updated\",\n PodDeleted = \"pod.deleted\",\n PodStatusChanged = \"pod.status_changed\",\n PodStarted = \"pod.started\",\n PodStopped = \"pod.stopped\",\n PodFailed = \"pod.failed\",\n // Organization events\n OrganizationCreated = \"organization.created\",\n OrganizationUpdated = \"organization.updated\",\n OrganizationArchived = \"organization.archived\",\n OrganizationMemberAdded = \"organization.member_added\",\n OrganizationMemberRemoved = \"organization.member_removed\",\n // Workspace events\n WorkspaceCreated = \"workspace.created\",\n WorkspaceUpdated = \"workspace.updated\",\n WorkspaceArchived = \"workspace.archived\",\n // Credential events\n CredentialCreated = \"credential.created\",\n CredentialRevoked = \"credential.revoked\",\n CredentialExpired = \"credential.expired\",\n // Policy events\n PolicyCreated = \"policy.created\",\n PolicyUpdated = \"policy.updated\",\n PolicyDeleted = \"policy.deleted\",\n // User events\n UserSuspended = \"user.suspended\",\n UserReactivated = \"user.reactivated\",\n}\n\n/** A platform event delivered to subscribers or returned from event history. */\nexport interface CpodEvent {\n /** Unique event identifier (UUID). */\n id: string;\n /** Dot-notation event type (e.g., 'pod.created', 'credential.revoked'). */\n type: EventType | string;\n /** UUID of the Organization in whose context this event occurred. */\n organizationId: string;\n /** UUID of the Workspace, if this event is workspace-scoped. */\n workspaceId?: string;\n /** UUID of the specific resource affected. */\n resourceId: string;\n /** Entity type of the resource (e.g., 'Pod', 'Credential'). */\n resourceType: string;\n /** Event-specific payload. Shape varies by event type. */\n payload: Record<string, unknown>;\n /** ISO 8601 timestamp of when the event occurred. */\n timestamp: string;\n /** Schema version of the payload (e.g., '1.0'). */\n version: string;\n}\n\n/** Filter criteria for event subscriptions and history queries. */\nexport interface EventFilter {\n /** Filter to events in a specific Organization. */\n organizationId?: string;\n /** Filter to events in a specific Workspace. */\n workspaceId?: string;\n /** Filter to events affecting a specific resource type. */\n resourceType?: string;\n /** Filter to events affecting a specific resource UUID. */\n resourceId?: string;\n /** Filter to specific event types. */\n types?: Array<EventType | string>;\n}\n\n/** Options for subscribing to real-time events. */\nexport interface SubscribeOptions {\n /** Replay events that occurred after this ISO 8601 timestamp. */\n since?: string;\n}\n\n/** Options for querying historical events. */\nexport interface EventHistoryOptions extends PaginationOptions {\n /** Filter to a specific Organization. */\n organizationId?: string;\n /** Filter to a specific Workspace. */\n workspaceId?: string;\n /** Filter to events affecting a specific resource type. */\n resourceType?: string;\n /** Filter to events affecting a specific resource UUID. */\n resourceId?: string;\n /** Filter to specific event types. */\n types?: Array<EventType | string>;\n /** Return only events after this ISO 8601 timestamp. */\n since?: string;\n /** Return only events before this ISO 8601 timestamp. */\n until?: string;\n}\n\n/** Callback invoked when a matching event is received. */\nexport type EventHandler = (event: CpodEvent) => void;\n\n/** Handle returned by `EventService.subscribe()`. */\nexport interface Subscription {\n /** Stop receiving events for this subscription. */\n unsubscribe(): void;\n}\n","// MCP tool invocation — bridges the auto-derived tool descriptors\n// (client.mcpTools()) to the actual SDK methods that execute them.\n//\n// The descriptor lists `{name, description, inputSchema}` but holds no\n// reference to the implementing function. This module owns the dispatch\n// from \"domain.method\" → client[domain][method](args), with a small,\n// well-defined convention for unpacking args per method shape.\n\nimport type { CpodClient } from '../client.js'\n\n/**\n * Calling conventions per method-name suffix:\n *\n * list, listX, search → method({ ...args })\n * create, createX, grant, register → method({ ...args })\n * update, patchX → method(args.id, { ...args without id })\n * get, getX, revoke, delete,\n * deleteX, deactivate, hardDelete,\n * triggerSync → method(args.id)\n * anything else → method(args) [fallback: single object arg]\n *\n * Returns whatever the SDK method returns (records, lists, void).\n */\ntype ArgConvention = 'object' | 'id' | 'id-and-rest'\n\n// Methods that take a single positional id string. NOTE: `revoke` is NOT\n// here — the only revoke in the SDK is `AuthService.revoke()`, which takes\n// no args (it revokes the caller's own Bearer-attached token). If a future\n// per-resource `revoke(id)` lands, route it through a service-specific\n// alias instead of re-adding it here.\nconst ID_METHODS = new Set([\n 'get', 'delete', 'hardDelete', 'deactivate',\n 'triggerSync', 'getSyncStatus', 'getPhysical', 'deletePhysical',\n 'getCloud', 'getRisk', 'deleteRisk',\n])\n\nconst ID_AND_REST_METHODS = new Set([\n 'update', 'updatePhysical', 'updateRisk',\n])\n\nfunction classify(method: string): ArgConvention {\n if (ID_AND_REST_METHODS.has(method)) return 'id-and-rest'\n if (ID_METHODS.has(method)) return 'id'\n return 'object'\n}\n\n/**\n * Look up `client[domain][method]` and call it with args unpacked per\n * the calling convention. Throws if the path doesn't resolve.\n *\n * @param client A CpodClient instance.\n * @param toolName \"{domain}.{method}\", e.g. \"people.create\".\n * @param args Args object received from the MCP `CallTool` request.\n */\nexport async function invokeTool(\n client: CpodClient,\n toolName: string,\n args: Record<string, unknown> = {},\n): Promise<unknown> {\n // Tool names can have any number of dots — walk nested namespaces:\n // \"people.list\" → client.people.list(args)\n // \"customer.accounts.list\" → client.customer.accounts.list(args)\n // \"projects.project.get\" → client.projects.project.get(id)\n // The LAST segment is the method; everything before is the path to it.\n const lastDot = toolName.lastIndexOf('.')\n if (lastDot === -1) {\n throw new Error(`Tool name must be \"<...path>.<method>\", got: ${toolName}`)\n }\n const path = toolName.slice(0, lastDot).split('.')\n const method = toolName.slice(lastDot + 1)\n\n let svc: any = client\n for (const seg of path) {\n svc = svc?.[seg]\n if (svc == null) {\n throw new Error(`Unknown SDK service: ${path.slice(0, path.indexOf(seg) + 1).join('.')}`)\n }\n }\n const fn = svc[method]\n if (typeof fn !== 'function') {\n throw new Error(`Unknown SDK method: ${toolName}`)\n }\n\n const conv = classify(method)\n try {\n switch (conv) {\n case 'object': {\n return await fn.call(svc, args)\n }\n case 'id': {\n const { id } = args as { id?: string }\n if (!id) throw new Error(`${toolName} requires an \"id\" argument`)\n return await fn.call(svc, id)\n }\n case 'id-and-rest': {\n const { id, ...rest } = args as { id?: string; [k: string]: unknown }\n if (!id) throw new Error(`${toolName} requires an \"id\" argument`)\n return await fn.call(svc, id, rest)\n }\n }\n } catch (err: any) {\n // Re-throw with the tool name in the message so MCP-tool log lines\n // are easy to grep without losing the original cause.\n const msg = err?.message || String(err)\n const e = new Error(`${toolName}: ${msg}`)\n ;(e as any).cause = err\n throw e\n }\n}\n","import type { McpTool } from './types.js'\n\n/**\n * Result of a client-side MCP validation check.\n *\n * Returned by {@link validateMcpTool} and {@link validateMcpTools}.\n * Callers can inspect `valid` to decide whether to proceed with registration\n * or surface the `errors` to the developer.\n */\nexport interface McpValidationResult {\n valid: boolean\n errors: string[]\n}\n\n/** Allowed HTTP methods for MCP tool endpoints. */\nconst VALID_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] as const\n\n/**\n * Tool name pattern: alphanumeric characters, underscores, and dashes.\n * Must start with a letter. Max 128 chars.\n * Examples: `get_customer`, `list-vulnerabilities`, `create_risk_item`\n */\nconst TOOL_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{0,127}$/\n\n/**\n * Validate a single {@link McpTool} definition.\n *\n * This is an **opt-in** client-side check — `McpService.register()` does\n * NOT enforce it, so existing code keeps working. Call before registering\n * to catch schema errors early (bad name format, missing required fields,\n * invalid enum values).\n *\n * @example\n * ```typescript\n * import { validateMcpTool } from '@zysec-ai/cpod-sdk'\n *\n * const result = validateMcpTool({\n * name: 'get_customer',\n * description: 'Fetch a customer',\n * endpoint: '/v1/customers/{id}',\n * method: 'GET',\n * inputSchema: { type: 'object', properties: { id: { type: 'string' } } },\n * });\n * if (!result.valid) {\n * console.error('Tool validation failed:', result.errors);\n * }\n * ```\n */\nexport function validateMcpTool(tool: McpTool): McpValidationResult {\n const errors: string[] = []\n\n // Required fields\n if (!tool.name || typeof tool.name !== 'string') {\n errors.push('name is required and must be a non-empty string')\n } else if (!TOOL_NAME_RE.test(tool.name)) {\n errors.push(\n `name \"${tool.name}\" is invalid — must start with a letter and contain only alphanumeric characters, underscores, or dashes (max 128 chars)`,\n )\n }\n\n if (!tool.description || typeof tool.description !== 'string') {\n errors.push('description is required and must be a non-empty string')\n }\n\n if (!tool.endpoint || typeof tool.endpoint !== 'string') {\n errors.push('endpoint is required and must be a non-empty string')\n } else if (!tool.endpoint.startsWith('/')) {\n errors.push(`endpoint \"${tool.endpoint}\" must start with \"/\"`)\n }\n\n if (!tool.method || typeof tool.method !== 'string') {\n errors.push('method is required and must be a non-empty string')\n } else if (!VALID_METHODS.includes(tool.method as (typeof VALID_METHODS)[number])) {\n errors.push(\n `method \"${tool.method}\" is invalid — must be one of: ${VALID_METHODS.join(', ')}`,\n )\n }\n\n if (!tool.inputSchema) {\n errors.push('inputSchema is required')\n } else {\n if (tool.inputSchema.type !== 'object') {\n errors.push(`inputSchema.type must be \"object\", got \"${tool.inputSchema.type}\"`)\n }\n if (!tool.inputSchema.properties || typeof tool.inputSchema.properties !== 'object') {\n errors.push('inputSchema.properties is required and must be an object')\n }\n }\n\n // Optional field validation\n if (tool.tags !== undefined && !Array.isArray(tool.tags)) {\n errors.push('tags must be an array of strings')\n }\n\n if (tool.secretHeaders !== undefined && typeof tool.secretHeaders !== 'object') {\n errors.push('secretHeaders must be a Record<string, string>')\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n/**\n * Validate an array of {@link McpTool} definitions.\n *\n * Checks each tool individually and also verifies there are no duplicate\n * tool names. Returns a combined result.\n *\n * @example\n * ```typescript\n * const result = validateMcpTools(tools);\n * if (!result.valid) {\n * throw new Error(`MCP tools invalid: ${result.errors.join('; ')}`);\n * }\n * ```\n */\nexport function validateMcpTools(tools: McpTool[]): McpValidationResult {\n const errors: string[] = []\n const seenNames = new Set<string>()\n\n for (let i = 0; i < tools.length; i++) {\n const tool = tools[i]\n if (!tool) continue\n const result = validateMcpTool(tool)\n if (!result.valid) {\n for (const err of result.errors) {\n errors.push(`tools[${i}] (${tool.name ?? 'unknown'}): ${err}`)\n }\n }\n if (tool.name) {\n if (seenNames.has(tool.name)) {\n errors.push(`duplicate tool name: \"${tool.name}\"`)\n }\n seenNames.add(tool.name)\n }\n }\n\n return { valid: errors.length === 0, errors }\n}\n","import type { PaginationOptions } from \"../types/index.js\";\n\nexport enum TenantStatus {\n Active = \"active\",\n Suspended = \"suspended\",\n PendingDeletion = \"pending_deletion\",\n}\n\nexport type TenantPlan = \"free\" | \"pro\" | \"enterprise\";\n\nexport interface TenantSettings {\n maxPods?: number;\n allowedRegions?: string[];\n ssoEnabled?: boolean;\n auditLogsEnabled?: boolean;\n}\n\nexport interface Tenant {\n id: string;\n name: string;\n slug: string;\n plan: TenantPlan;\n status: TenantStatus;\n settings: TenantSettings;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateTenantInput {\n name: string;\n slug: string;\n plan?: TenantPlan;\n settings?: TenantSettings;\n}\n\nexport interface UpdateTenantInput {\n name?: string;\n plan?: TenantPlan;\n settings?: Partial<TenantSettings>;\n}\n\nexport interface ListTenantsOptions extends PaginationOptions {\n status?: TenantStatus;\n plan?: TenantPlan;\n}\n","import type { ToolDef, RegisterManifest } from './types.js'\n\n/**\n * Result of a client-side registry validation check.\n *\n * Returned by {@link validateToolDef}, {@link validateRegisterManifest}.\n */\nexport interface RegistryValidationResult {\n valid: boolean\n errors: string[]\n}\n\n/** Valid values for the `operation` field on a ToolDef. */\nconst VALID_OPERATIONS = ['read', 'write'] as const\n\n/** Valid values for the `kind` field on a ToolDef. */\nconst VALID_KINDS = ['shared_edm', 'private_proxy'] as const\n\n/** Valid HTTP methods for ToolDef endpoints. */\nconst VALID_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'get', 'post', 'put', 'patch', 'delete'] as const\n\n/**\n * Tool name pattern: alphanumeric characters, underscores, dots, and dashes.\n * Registry tool names typically use dotted notation (e.g. `crm.customer.list`).\n * Must start with a letter. Max 128 chars.\n */\nconst TOOL_NAME_RE = /^[a-zA-Z][a-zA-Z0-9._-]{0,127}$/\n\n/**\n * App code pattern: alphanumeric characters, underscores, and dashes.\n * Must start with a letter. Max 64 chars.\n */\nconst APP_CODE_RE = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/\n\n/**\n * Validate a single registry {@link ToolDef}.\n *\n * Opt-in client-side check — `RegistryService.register()` does NOT enforce\n * it. Call before registering to catch errors early.\n *\n * @example\n * ```typescript\n * import { validateToolDef } from '@zysec-ai/cpod-sdk'\n *\n * const result = validateToolDef({\n * tool_name: 'crm.customer.list',\n * description: 'List customers',\n * kind: 'private_proxy',\n * endpoint: '/v1/customers',\n * method: 'GET',\n * });\n * if (!result.valid) {\n * console.error('Tool validation failed:', result.errors);\n * }\n * ```\n */\nexport function validateToolDef(tool: ToolDef): RegistryValidationResult {\n const errors: string[] = []\n\n if (!tool.tool_name || typeof tool.tool_name !== 'string') {\n errors.push('tool_name is required and must be a non-empty string')\n } else if (!TOOL_NAME_RE.test(tool.tool_name)) {\n errors.push(\n `tool_name \"${tool.tool_name}\" is invalid — must start with a letter and contain only alphanumeric characters, underscores, dots, or dashes (max 128 chars)`,\n )\n }\n\n if (tool.operation !== undefined && !VALID_OPERATIONS.includes(tool.operation)) {\n errors.push(\n `operation \"${tool.operation}\" is invalid — must be one of: ${VALID_OPERATIONS.join(', ')}`,\n )\n }\n\n if (tool.kind !== undefined && !VALID_KINDS.includes(tool.kind)) {\n errors.push(\n `kind \"${tool.kind}\" is invalid — must be one of: ${VALID_KINDS.join(', ')}`,\n )\n }\n\n if (tool.endpoint !== undefined && tool.endpoint !== null && typeof tool.endpoint === 'string') {\n if (!tool.endpoint.startsWith('/')) {\n errors.push(`endpoint \"${tool.endpoint}\" must start with \"/\"`)\n }\n }\n\n if (tool.method !== undefined && tool.method !== null && typeof tool.method === 'string') {\n if (!VALID_METHODS.includes(tool.method as (typeof VALID_METHODS)[number])) {\n errors.push(\n `method \"${tool.method}\" is invalid — must be one of: GET, POST, PUT, PATCH, DELETE`,\n )\n }\n }\n\n // If kind is private_proxy, endpoint and method should be provided\n if (tool.kind === 'private_proxy') {\n if (!tool.endpoint) {\n errors.push('endpoint is required when kind is \"private_proxy\"')\n }\n if (!tool.method) {\n errors.push('method is required when kind is \"private_proxy\"')\n }\n }\n\n if (tool.input_schema !== undefined && (typeof tool.input_schema !== 'object' || tool.input_schema === null)) {\n errors.push('input_schema must be an object')\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n/**\n * Validate a {@link RegisterManifest} before sending it to the registry.\n *\n * Checks the app_code format, base_url requirement for private_proxy tools,\n * and validates each tool definition.\n *\n * @example\n * ```typescript\n * import { validateRegisterManifest } from '@zysec-ai/cpod-sdk'\n *\n * const result = validateRegisterManifest({\n * app_code: 'my-app',\n * base_url: 'https://my-app.example.com',\n * tools: [{ tool_name: 'my_app.list', kind: 'private_proxy', endpoint: '/list', method: 'GET' }],\n * });\n * if (!result.valid) {\n * throw new Error(`Manifest invalid: ${result.errors.join('; ')}`);\n * }\n * ```\n */\nexport function validateRegisterManifest(manifest: RegisterManifest): RegistryValidationResult {\n const errors: string[] = []\n\n if (!manifest.app_code || typeof manifest.app_code !== 'string') {\n errors.push('app_code is required and must be a non-empty string')\n } else if (!APP_CODE_RE.test(manifest.app_code)) {\n errors.push(\n `app_code \"${manifest.app_code}\" is invalid — must start with a letter and contain only alphanumeric characters, underscores, or dashes (max 64 chars)`,\n )\n }\n\n if (manifest.version !== undefined && typeof manifest.version !== 'string') {\n errors.push('version must be a string')\n }\n\n if (manifest.base_url !== undefined && typeof manifest.base_url !== 'string') {\n errors.push('base_url must be a string')\n }\n\n // Validate tools\n const toolNames = new Set<string>()\n const hasPrivateProxy = manifest.tools?.some(t => t.kind === 'private_proxy') ?? false\n\n if (hasPrivateProxy && !manifest.base_url) {\n errors.push('base_url is required when manifest declares private_proxy tools')\n }\n\n if (manifest.tools) {\n if (!Array.isArray(manifest.tools)) {\n errors.push('tools must be an array')\n } else {\n for (let i = 0; i < manifest.tools.length; i++) {\n const tool: ToolDef | undefined = manifest.tools[i]\n if (!tool) continue\n const result = validateToolDef(tool)\n if (!result.valid) {\n for (const err of result.errors) {\n errors.push(`tools[${i}] (${tool.tool_name ?? 'unknown'}): ${err}`)\n }\n }\n if (tool.tool_name) {\n if (toolNames.has(tool.tool_name)) {\n errors.push(`duplicate tool_name: \"${tool.tool_name}\"`)\n }\n toolNames.add(tool.tool_name)\n }\n }\n }\n }\n\n return { valid: errors.length === 0, errors }\n}\n"]}