@contractspec/lib.contracts 0.0.0-canary-20260113162409
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.
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/_virtual/rolldown_runtime.js +37 -0
- package/dist/app-config/app-config.capability.d.ts +7 -0
- package/dist/app-config/app-config.capability.js +23 -0
- package/dist/app-config/app-config.feature.d.ts +11 -0
- package/dist/app-config/app-config.feature.js +61 -0
- package/dist/app-config/branding.d.ts +55 -0
- package/dist/app-config/branding.js +0 -0
- package/dist/app-config/contracts.d.ts +245 -0
- package/dist/app-config/contracts.js +395 -0
- package/dist/app-config/docs/app-config.docblock.d.ts +6 -0
- package/dist/app-config/docs/app-config.docblock.js +21 -0
- package/dist/app-config/events.d.ts +122 -0
- package/dist/app-config/events.js +174 -0
- package/dist/app-config/index.d.ts +10 -0
- package/dist/app-config/index.js +9 -0
- package/dist/app-config/lifecycle-contracts.d.ts +273 -0
- package/dist/app-config/lifecycle-contracts.js +440 -0
- package/dist/app-config/lifecycle.d.ts +27 -0
- package/dist/app-config/lifecycle.js +0 -0
- package/dist/app-config/runtime.d.ts +120 -0
- package/dist/app-config/runtime.js +617 -0
- package/dist/app-config/spec.d.ts +175 -0
- package/dist/app-config/spec.js +19 -0
- package/dist/app-config/validation.d.ts +49 -0
- package/dist/app-config/validation.js +538 -0
- package/dist/capabilities/capabilities.d.ts +41 -0
- package/dist/capabilities/capabilities.js +48 -0
- package/dist/capabilities/docs/capabilities.docblock.d.ts +6 -0
- package/dist/capabilities/docs/capabilities.docblock.js +21 -0
- package/dist/capabilities/index.d.ts +3 -0
- package/dist/capabilities/index.js +4 -0
- package/dist/capabilities/openbanking.d.ts +10 -0
- package/dist/capabilities/openbanking.js +92 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +9 -0
- package/dist/client/react/drivers/rn-reusables.d.ts +22 -0
- package/dist/client/react/drivers/rn-reusables.js +21 -0
- package/dist/client/react/drivers/shadcn.d.ts +12 -0
- package/dist/client/react/drivers/shadcn.js +11 -0
- package/dist/client/react/feature-render.d.ts +23 -0
- package/dist/client/react/feature-render.js +44 -0
- package/dist/client/react/form-render.d.ts +92 -0
- package/dist/client/react/form-render.js +301 -0
- package/dist/client/react/index.d.ts +5 -0
- package/dist/client/react/index.js +8 -0
- package/dist/contract-registry/index.d.ts +3 -0
- package/dist/contract-registry/index.js +3 -0
- package/dist/contract-registry/schemas.d.ts +124 -0
- package/dist/contract-registry/schemas.js +61 -0
- package/dist/contract-registry/types.d.ts +46 -0
- package/dist/contract-registry/types.js +0 -0
- package/dist/data-views/data-views.d.ts +5 -0
- package/dist/data-views/data-views.js +5 -0
- package/dist/data-views/docs/data-views.docblock.d.ts +6 -0
- package/dist/data-views/docs/data-views.docblock.js +21 -0
- package/dist/data-views/index.d.ts +4 -0
- package/dist/data-views/index.js +4 -0
- package/dist/data-views/query-generator.d.ts +40 -0
- package/dist/data-views/query-generator.js +48 -0
- package/dist/data-views/registry.d.ts +17 -0
- package/dist/data-views/registry.js +20 -0
- package/dist/data-views/runtime.d.ts +32 -0
- package/dist/data-views/runtime.js +68 -0
- package/dist/data-views/spec.d.ts +32 -0
- package/dist/data-views/spec.js +10 -0
- package/dist/data-views/types.d.ts +157 -0
- package/dist/data-views/types.js +0 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +6 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/docs/index.d.ts +6 -0
- package/dist/docs/index.js +30 -0
- package/dist/docs/meta.docs.d.ts +6 -0
- package/dist/docs/meta.docs.js +29 -0
- package/dist/docs/presentations.d.ts +31 -0
- package/dist/docs/presentations.js +57 -0
- package/dist/docs/registry.d.ts +23 -0
- package/dist/docs/registry.js +51 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +6 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/docs/tech/cli.docblock.d.ts +6 -0
- package/dist/docs/tech/cli.docblock.js +138 -0
- package/dist/docs/tech/contracts/README.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/README.docblock.js +21 -0
- package/dist/docs/tech/contracts/migrations.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.js +65 -0
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +21 -0
- package/dist/docs/tech/contracts/overlays.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -0
- package/dist/docs/tech/contracts/tests.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/tests.docblock.js +21 -0
- package/dist/docs/tech/contracts/themes.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/themes.docblock.js +21 -0
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +126 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +6 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts +7 -0
- package/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts +6 -0
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/docs/tech/presentation-runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/docs/tech/schema/README.docblock.d.ts +6 -0
- package/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/docs/tech/studio/learning-events.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.js +48 -0
- package/dist/docs/tech/studio/project-routing.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/docs/tech/studio/workspaces.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts +6 -0
- package/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/docs/tech/vscode-extension.docblock.d.ts +6 -0
- package/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/docs/tech-contracts.docs.d.ts +6 -0
- package/dist/docs/tech-contracts.docs.js +96 -0
- package/dist/docs/types.d.ts +41 -0
- package/dist/docs/types.js +0 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +19 -0
- package/dist/examples/docs/examples.docblock.d.ts +6 -0
- package/dist/examples/docs/examples.docblock.js +165 -0
- package/dist/examples/index.d.ts +13 -0
- package/dist/examples/index.js +13 -0
- package/dist/examples/registry.d.ts +43 -0
- package/dist/examples/registry.js +88 -0
- package/dist/examples/schema.d.ts +282 -0
- package/dist/examples/schema.js +125 -0
- package/dist/examples/types.d.ts +167 -0
- package/dist/examples/types.js +43 -0
- package/dist/examples/validation.d.ts +65 -0
- package/dist/examples/validation.js +144 -0
- package/dist/experiments/docs/experiments.docblock.d.ts +6 -0
- package/dist/experiments/docs/experiments.docblock.js +21 -0
- package/dist/experiments/evaluator.d.ts +37 -0
- package/dist/experiments/evaluator.js +101 -0
- package/dist/experiments/spec-resolver.d.ts +17 -0
- package/dist/experiments/spec-resolver.js +0 -0
- package/dist/experiments/spec.d.ts +80 -0
- package/dist/experiments/spec.js +15 -0
- package/dist/features/index.d.ts +13 -0
- package/dist/features/index.js +12 -0
- package/dist/features/install.d.ts +22 -0
- package/dist/features/install.js +36 -0
- package/dist/features/registry.d.ts +26 -0
- package/dist/features/registry.js +49 -0
- package/dist/features/types.d.ts +88 -0
- package/dist/features/types.js +0 -0
- package/dist/features/validation.d.ts +8 -0
- package/dist/features/validation.js +14 -0
- package/dist/forms/docs/forms.docblock.d.ts +6 -0
- package/dist/forms/docs/forms.docblock.js +21 -0
- package/dist/forms/forms.d.ts +266 -0
- package/dist/forms/forms.js +143 -0
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.js +3 -0
- package/dist/index.d.ts +154 -0
- package/dist/index.js +132 -0
- package/dist/install.d.ts +77 -0
- package/dist/install.js +40 -0
- package/dist/integrations/binding.d.ts +17 -0
- package/dist/integrations/binding.js +0 -0
- package/dist/integrations/connection.d.ts +51 -0
- package/dist/integrations/connection.js +0 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +6 -0
- package/dist/integrations/docs/integrations.docblock.js +94 -0
- package/dist/integrations/health.d.ts +21 -0
- package/dist/integrations/health.js +69 -0
- package/dist/integrations/index.d.ts +34 -0
- package/dist/integrations/index.js +23 -0
- package/dist/integrations/integrations.capability.d.ts +7 -0
- package/dist/integrations/integrations.capability.js +17 -0
- package/dist/integrations/integrations.feature.d.ts +11 -0
- package/dist/integrations/integrations.feature.js +67 -0
- package/dist/integrations/openbanking/contracts/accounts.d.ts +289 -0
- package/dist/integrations/openbanking/contracts/accounts.js +236 -0
- package/dist/integrations/openbanking/contracts/balances.d.ts +165 -0
- package/dist/integrations/openbanking/contracts/balances.js +166 -0
- package/dist/integrations/openbanking/contracts/index.d.ts +10 -0
- package/dist/integrations/openbanking/contracts/index.js +12 -0
- package/dist/integrations/openbanking/contracts/transactions.d.ts +213 -0
- package/dist/integrations/openbanking/contracts/transactions.js +217 -0
- package/dist/integrations/openbanking/guards.d.ts +12 -0
- package/dist/integrations/openbanking/guards.js +33 -0
- package/dist/integrations/openbanking/models.d.ts +228 -0
- package/dist/integrations/openbanking/models.js +240 -0
- package/dist/integrations/openbanking/openbanking.capability.d.ts +7 -0
- package/dist/integrations/openbanking/openbanking.capability.js +21 -0
- package/dist/integrations/openbanking/openbanking.feature.d.ts +11 -0
- package/dist/integrations/openbanking/openbanking.feature.js +76 -0
- package/dist/integrations/openbanking/telemetry.d.ts +15 -0
- package/dist/integrations/openbanking/telemetry.js +39 -0
- package/dist/integrations/operations.d.ts +437 -0
- package/dist/integrations/operations.js +392 -0
- package/dist/integrations/providers/calendar.d.ts +78 -0
- package/dist/integrations/providers/calendar.js +0 -0
- package/dist/integrations/providers/elevenlabs.d.ts +8 -0
- package/dist/integrations/providers/elevenlabs.js +56 -0
- package/dist/integrations/providers/email.d.ts +86 -0
- package/dist/integrations/providers/email.js +0 -0
- package/dist/integrations/providers/embedding.d.ts +24 -0
- package/dist/integrations/providers/embedding.js +0 -0
- package/dist/integrations/providers/gcs-storage.d.ts +8 -0
- package/dist/integrations/providers/gcs-storage.js +79 -0
- package/dist/integrations/providers/gmail.d.ts +8 -0
- package/dist/integrations/providers/gmail.js +91 -0
- package/dist/integrations/providers/google-calendar.d.ts +8 -0
- package/dist/integrations/providers/google-calendar.js +70 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +20 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -0
- package/dist/integrations/providers/impls/gcs-storage.d.ts +24 -0
- package/dist/integrations/providers/impls/gcs-storage.js +88 -0
- package/dist/integrations/providers/impls/gmail-inbound.d.ts +26 -0
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -0
- package/dist/integrations/providers/impls/gmail-outbound.d.ts +18 -0
- package/dist/integrations/providers/impls/gmail-outbound.js +105 -0
- package/dist/integrations/providers/impls/google-calendar.d.ts +23 -0
- package/dist/integrations/providers/impls/google-calendar.js +154 -0
- package/dist/integrations/providers/impls/index.d.ts +15 -0
- package/dist/integrations/providers/impls/index.js +16 -0
- package/dist/integrations/providers/impls/mistral-embedding.d.ts +23 -0
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -0
- package/dist/integrations/providers/impls/mistral-llm.d.ts +31 -0
- package/dist/integrations/providers/impls/mistral-llm.js +247 -0
- package/dist/integrations/providers/impls/postmark-email.d.ts +19 -0
- package/dist/integrations/providers/impls/postmark-email.js +55 -0
- package/dist/integrations/providers/impls/powens-client.d.ts +124 -0
- package/dist/integrations/providers/impls/powens-client.js +171 -0
- package/dist/integrations/providers/impls/powens-openbanking.d.ts +27 -0
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -0
- package/dist/integrations/providers/impls/provider-factory.d.ts +26 -0
- package/dist/integrations/providers/impls/provider-factory.js +146 -0
- package/dist/integrations/providers/impls/qdrant-vector.d.ts +24 -0
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -0
- package/dist/integrations/providers/impls/stripe-payments.d.ts +28 -0
- package/dist/integrations/providers/impls/stripe-payments.js +202 -0
- package/dist/integrations/providers/impls/twilio-sms.d.ts +20 -0
- package/dist/integrations/providers/impls/twilio-sms.js +58 -0
- package/dist/integrations/providers/index.d.ts +22 -0
- package/dist/integrations/providers/index.js +13 -0
- package/dist/integrations/providers/llm.d.ts +82 -0
- package/dist/integrations/providers/llm.js +0 -0
- package/dist/integrations/providers/mistral.d.ts +8 -0
- package/dist/integrations/providers/mistral.js +72 -0
- package/dist/integrations/providers/openbanking.d.ts +128 -0
- package/dist/integrations/providers/openbanking.js +0 -0
- package/dist/integrations/providers/payments.d.ts +109 -0
- package/dist/integrations/providers/payments.js +0 -0
- package/dist/integrations/providers/postmark.d.ts +8 -0
- package/dist/integrations/providers/postmark.js +72 -0
- package/dist/integrations/providers/powens.d.ts +8 -0
- package/dist/integrations/providers/powens.js +120 -0
- package/dist/integrations/providers/qdrant.d.ts +8 -0
- package/dist/integrations/providers/qdrant.js +77 -0
- package/dist/integrations/providers/registry.d.ts +11 -0
- package/dist/integrations/providers/registry.js +34 -0
- package/dist/integrations/providers/sms.d.ts +34 -0
- package/dist/integrations/providers/sms.js +0 -0
- package/dist/integrations/providers/storage.d.ts +60 -0
- package/dist/integrations/providers/storage.js +0 -0
- package/dist/integrations/providers/stripe.d.ts +8 -0
- package/dist/integrations/providers/stripe.js +87 -0
- package/dist/integrations/providers/twilio-sms.d.ts +8 -0
- package/dist/integrations/providers/twilio-sms.js +65 -0
- package/dist/integrations/providers/vector-store.d.ts +43 -0
- package/dist/integrations/providers/vector-store.js +0 -0
- package/dist/integrations/providers/voice.d.ts +34 -0
- package/dist/integrations/providers/voice.js +0 -0
- package/dist/integrations/runtime.d.ts +99 -0
- package/dist/integrations/runtime.js +186 -0
- package/dist/integrations/secrets/aws-secret-manager.d.ts +31 -0
- package/dist/integrations/secrets/aws-secret-manager.js +231 -0
- package/dist/integrations/secrets/env-secret-provider.d.ts +31 -0
- package/dist/integrations/secrets/env-secret-provider.js +81 -0
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +32 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -0
- package/dist/integrations/secrets/index.d.ts +7 -0
- package/dist/integrations/secrets/index.js +8 -0
- package/dist/integrations/secrets/manager.d.ts +47 -0
- package/dist/integrations/secrets/manager.js +103 -0
- package/dist/integrations/secrets/provider.d.ts +52 -0
- package/dist/integrations/secrets/provider.js +58 -0
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +38 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -0
- package/dist/integrations/secrets-types.d.ts +17 -0
- package/dist/integrations/secrets-types.js +0 -0
- package/dist/integrations/spec.d.ts +77 -0
- package/dist/integrations/spec.js +22 -0
- package/dist/jobs/define-job.d.ts +18 -0
- package/dist/jobs/define-job.js +16 -0
- package/dist/jobs/gcp-cloud-tasks.d.ts +41 -0
- package/dist/jobs/gcp-cloud-tasks.js +53 -0
- package/dist/jobs/gcp-pubsub.d.ts +25 -0
- package/dist/jobs/gcp-pubsub.js +39 -0
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +9 -0
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -0
- package/dist/jobs/handlers/index.d.ts +9 -0
- package/dist/jobs/handlers/index.js +12 -0
- package/dist/jobs/handlers/ping-handler.d.ts +10 -0
- package/dist/jobs/handlers/ping-handler.js +15 -0
- package/dist/jobs/handlers/storage-document-handler.d.ts +12 -0
- package/dist/jobs/handlers/storage-document-handler.js +14 -0
- package/dist/jobs/index.d.ts +3 -0
- package/dist/jobs/index.js +4 -0
- package/dist/jobs/memory-queue.d.ts +18 -0
- package/dist/jobs/memory-queue.js +71 -0
- package/dist/jobs/queue.d.ts +131 -0
- package/dist/jobs/queue.js +33 -0
- package/dist/jobs/scaleway-sqs-queue.d.ts +30 -0
- package/dist/jobs/scaleway-sqs-queue.js +153 -0
- package/dist/jsonschema.d.ts +42 -0
- package/dist/jsonschema.js +51 -0
- package/dist/knowledge/binding.d.ts +25 -0
- package/dist/knowledge/binding.js +0 -0
- package/dist/knowledge/docs/knowledge.docblock.d.ts +6 -0
- package/dist/knowledge/docs/knowledge.docblock.js +21 -0
- package/dist/knowledge/index.d.ts +11 -0
- package/dist/knowledge/index.js +10 -0
- package/dist/knowledge/ingestion/document-processor.d.ts +24 -0
- package/dist/knowledge/ingestion/document-processor.js +54 -0
- package/dist/knowledge/ingestion/embedding-service.d.ts +12 -0
- package/dist/knowledge/ingestion/embedding-service.js +25 -0
- package/dist/knowledge/ingestion/gmail-adapter.d.ts +18 -0
- package/dist/knowledge/ingestion/gmail-adapter.js +51 -0
- package/dist/knowledge/ingestion/index.d.ts +6 -0
- package/dist/knowledge/ingestion/index.js +7 -0
- package/dist/knowledge/ingestion/storage-adapter.d.ts +15 -0
- package/dist/knowledge/ingestion/storage-adapter.js +26 -0
- package/dist/knowledge/ingestion/vector-indexer.d.ts +18 -0
- package/dist/knowledge/ingestion/vector-indexer.js +32 -0
- package/dist/knowledge/knowledge.capability.d.ts +7 -0
- package/dist/knowledge/knowledge.capability.js +21 -0
- package/dist/knowledge/knowledge.feature.d.ts +11 -0
- package/dist/knowledge/knowledge.feature.js +68 -0
- package/dist/knowledge/operations.d.ts +318 -0
- package/dist/knowledge/operations.js +321 -0
- package/dist/knowledge/query/index.d.ts +2 -0
- package/dist/knowledge/query/index.js +3 -0
- package/dist/knowledge/query/service.d.ts +29 -0
- package/dist/knowledge/query/service.js +65 -0
- package/dist/knowledge/runtime.d.ts +32 -0
- package/dist/knowledge/runtime.js +49 -0
- package/dist/knowledge/source.d.ts +32 -0
- package/dist/knowledge/source.js +0 -0
- package/dist/knowledge/spaces/email-threads.d.ts +7 -0
- package/dist/knowledge/spaces/email-threads.js +37 -0
- package/dist/knowledge/spaces/financial-docs.d.ts +7 -0
- package/dist/knowledge/spaces/financial-docs.js +37 -0
- package/dist/knowledge/spaces/financial-overview.d.ts +7 -0
- package/dist/knowledge/spaces/financial-overview.js +41 -0
- package/dist/knowledge/spaces/index.d.ts +7 -0
- package/dist/knowledge/spaces/index.js +8 -0
- package/dist/knowledge/spaces/product-canon.d.ts +7 -0
- package/dist/knowledge/spaces/product-canon.js +37 -0
- package/dist/knowledge/spaces/support-faq.d.ts +7 -0
- package/dist/knowledge/spaces/support-faq.js +40 -0
- package/dist/knowledge/spaces/uploaded-docs.d.ts +7 -0
- package/dist/knowledge/spaces/uploaded-docs.js +37 -0
- package/dist/knowledge/spec.d.ts +46 -0
- package/dist/knowledge/spec.js +17 -0
- package/dist/llm/exporters.d.ts +70 -0
- package/dist/llm/exporters.js +542 -0
- package/dist/llm/index.d.ts +4 -0
- package/dist/llm/index.js +4 -0
- package/dist/llm/prompts.d.ts +52 -0
- package/dist/llm/prompts.js +410 -0
- package/dist/llm/types.d.ts +215 -0
- package/dist/llm/types.js +0 -0
- package/dist/markdown.d.ts +22 -0
- package/dist/markdown.js +119 -0
- package/dist/migrations.d.ts +52 -0
- package/dist/migrations.js +31 -0
- package/dist/model-registry.d.ts +13 -0
- package/dist/model-registry.js +33 -0
- package/dist/onboarding-base.d.ts +138 -0
- package/dist/onboarding-base.js +195 -0
- package/dist/openapi.d.ts +31 -0
- package/dist/openapi.js +82 -0
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +4 -0
- package/dist/operations/operation.d.ts +186 -0
- package/dist/operations/operation.js +35 -0
- package/dist/operations/registry.d.ts +54 -0
- package/dist/operations/registry.js +176 -0
- package/dist/ownership.d.ts +84 -0
- package/dist/ownership.js +38 -0
- package/dist/policy/docs/policy.docblock.d.ts +6 -0
- package/dist/policy/docs/policy.docblock.js +21 -0
- package/dist/policy/engine.d.ts +40 -0
- package/dist/policy/engine.js +225 -0
- package/dist/policy/index.d.ts +5 -0
- package/dist/policy/index.js +5 -0
- package/dist/policy/opa-adapter.d.ts +45 -0
- package/dist/policy/opa-adapter.js +71 -0
- package/dist/policy/registry.d.ts +9 -0
- package/dist/policy/registry.js +11 -0
- package/dist/policy/spec.d.ts +103 -0
- package/dist/policy/spec.js +0 -0
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts +6 -0
- package/dist/presentations/docs/presentations-conventions.docblock.js +21 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/presentations/presentations.d.ts +50 -0
- package/dist/presentations/presentations.js +7 -0
- package/dist/presentations/registry.d.ts +10 -0
- package/dist/presentations/registry.js +12 -0
- package/dist/presentations/transform-engine.d.ts +66 -0
- package/dist/presentations/transform-engine.js +282 -0
- package/dist/prompt.d.ts +53 -0
- package/dist/prompt.js +10 -0
- package/dist/promptRegistry.d.ts +15 -0
- package/dist/promptRegistry.js +31 -0
- package/dist/regenerator/adapters.d.ts +19 -0
- package/dist/regenerator/adapters.js +0 -0
- package/dist/regenerator/docs/regenerator.docblock.d.ts +6 -0
- package/dist/regenerator/docs/regenerator.docblock.js +21 -0
- package/dist/regenerator/executor.d.ts +70 -0
- package/dist/regenerator/executor.js +86 -0
- package/dist/regenerator/index.d.ts +7 -0
- package/dist/regenerator/index.js +6 -0
- package/dist/regenerator/service.d.ts +33 -0
- package/dist/regenerator/service.js +93 -0
- package/dist/regenerator/sinks.d.ts +26 -0
- package/dist/regenerator/sinks.js +32 -0
- package/dist/regenerator/types.d.ts +107 -0
- package/dist/regenerator/types.js +0 -0
- package/dist/regenerator/utils.d.ts +9 -0
- package/dist/regenerator/utils.js +51 -0
- package/dist/registry-utils.d.ts +106 -0
- package/dist/registry-utils.js +122 -0
- package/dist/registry.d.ts +32 -0
- package/dist/registry.js +61 -0
- package/dist/resources.d.ts +64 -0
- package/dist/resources.js +50 -0
- package/dist/schema-to-markdown.d.ts +54 -0
- package/dist/schema-to-markdown.js +217 -0
- package/dist/server/contracts-adapter-hydration.d.ts +15 -0
- package/dist/server/contracts-adapter-hydration.js +41 -0
- package/dist/server/contracts-adapter-input.d.ts +9 -0
- package/dist/server/contracts-adapter-input.js +83 -0
- package/dist/server/graphql-pothos.d.ts +31 -0
- package/dist/server/graphql-pothos.js +134 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +10 -0
- package/dist/server/mcp/createMcpServer.d.ts +15 -0
- package/dist/server/mcp/createMcpServer.js +27 -0
- package/dist/server/mcp/mcpTypes.d.ts +27 -0
- package/dist/server/mcp/mcpTypes.js +0 -0
- package/dist/server/mcp/registerPresentations.d.ts +7 -0
- package/dist/server/mcp/registerPresentations.js +54 -0
- package/dist/server/mcp/registerPrompts.d.ts +8 -0
- package/dist/server/mcp/registerPrompts.js +41 -0
- package/dist/server/mcp/registerResources.d.ts +8 -0
- package/dist/server/mcp/registerResources.js +35 -0
- package/dist/server/mcp/registerTools.d.ts +8 -0
- package/dist/server/mcp/registerTools.js +22 -0
- package/dist/server/provider-mcp.d.ts +2 -0
- package/dist/server/provider-mcp.js +3 -0
- package/dist/server/rest-elysia.d.ts +40 -0
- package/dist/server/rest-elysia.js +20 -0
- package/dist/server/rest-express.d.ts +16 -0
- package/dist/server/rest-express.js +36 -0
- package/dist/server/rest-generic.d.ts +32 -0
- package/dist/server/rest-generic.js +124 -0
- package/dist/server/rest-next-app.d.ts +35 -0
- package/dist/server/rest-next-app.js +38 -0
- package/dist/server/rest-next-mcp.d.ts +11 -0
- package/dist/server/rest-next-mcp.js +45 -0
- package/dist/server/rest-next-pages.d.ts +9 -0
- package/dist/server/rest-next-pages.js +22 -0
- package/dist/telemetry/anomaly.d.ts +27 -0
- package/dist/telemetry/anomaly.js +48 -0
- package/dist/telemetry/docs/telemetry.docblock.d.ts +6 -0
- package/dist/telemetry/docs/telemetry.docblock.js +21 -0
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.js +5 -0
- package/dist/telemetry/spec.d.ts +91 -0
- package/dist/telemetry/spec.js +42 -0
- package/dist/telemetry/tracker.d.ts +51 -0
- package/dist/telemetry/tracker.js +76 -0
- package/dist/tests/index.d.ts +3 -0
- package/dist/tests/index.js +4 -0
- package/dist/tests/runner.d.ts +43 -0
- package/dist/tests/runner.js +150 -0
- package/dist/tests/spec.d.ts +82 -0
- package/dist/tests/spec.js +34 -0
- package/dist/themes.d.ts +51 -0
- package/dist/themes.js +17 -0
- package/dist/translations/catalog.d.ts +28 -0
- package/dist/translations/catalog.js +0 -0
- package/dist/translations/tenant.d.ts +15 -0
- package/dist/translations/tenant.js +0 -0
- package/dist/types.d.ts +92 -0
- package/dist/types.js +0 -0
- package/dist/versioning/index.d.ts +3 -0
- package/dist/versioning/index.js +4 -0
- package/dist/versioning/types.d.ts +127 -0
- package/dist/versioning/types.js +24 -0
- package/dist/versioning/utils.d.ts +95 -0
- package/dist/versioning/utils.js +180 -0
- package/dist/workflow/adapters/db-adapter.d.ts +46 -0
- package/dist/workflow/adapters/db-adapter.js +83 -0
- package/dist/workflow/adapters/file-adapter.d.ts +14 -0
- package/dist/workflow/adapters/file-adapter.js +11 -0
- package/dist/workflow/adapters/index.d.ts +4 -0
- package/dist/workflow/adapters/index.js +5 -0
- package/dist/workflow/adapters/memory-store.d.ts +18 -0
- package/dist/workflow/adapters/memory-store.js +58 -0
- package/dist/workflow/expression.d.ts +9 -0
- package/dist/workflow/expression.js +99 -0
- package/dist/workflow/index.d.ts +17 -0
- package/dist/workflow/index.js +16 -0
- package/dist/workflow/overview.docblock.d.ts +6 -0
- package/dist/workflow/overview.docblock.js +21 -0
- package/dist/workflow/runner.d.ts +77 -0
- package/dist/workflow/runner.js +337 -0
- package/dist/workflow/sla-monitor.d.ts +20 -0
- package/dist/workflow/sla-monitor.js +47 -0
- package/dist/workflow/spec.d.ts +93 -0
- package/dist/workflow/spec.js +11 -0
- package/dist/workflow/state.d.ts +35 -0
- package/dist/workflow/state.js +0 -0
- package/dist/workflow/validation.d.ts +29 -0
- package/dist/workflow/validation.js +176 -0
- package/dist/workspace-config/contractsrc-schema.d.ts +1162 -0
- package/dist/workspace-config/contractsrc-schema.js +421 -0
- package/dist/workspace-config/index.d.ts +2 -0
- package/dist/workspace-config/index.js +3 -0
- package/dist/workspace-config/workspace-config.docblock.d.ts +6 -0
- package/dist/workspace-config/workspace-config.docblock.js +45 -0
- package/package.json +618 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { defineCommand, defineQuery } from "../../../operations/operation.js";
|
|
2
|
+
import "../../../operations/index.js";
|
|
3
|
+
import { AccountBalanceRecord } from "../models.js";
|
|
4
|
+
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
5
|
+
import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
|
|
6
|
+
|
|
7
|
+
//#region src/integrations/openbanking/contracts/balances.ts
|
|
8
|
+
const OpenBankingGetBalancesInput = new SchemaModel({
|
|
9
|
+
name: "OpenBankingGetBalancesInput",
|
|
10
|
+
description: "Parameters for retrieving bank account balances from the canonical ledger.",
|
|
11
|
+
fields: {
|
|
12
|
+
tenantId: {
|
|
13
|
+
type: ScalarTypeEnum.ID(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
accountId: {
|
|
17
|
+
type: ScalarTypeEnum.ID(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
balanceTypes: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isArray: true,
|
|
23
|
+
isOptional: true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const OpenBankingGetBalancesOutput = new SchemaModel({
|
|
28
|
+
name: "OpenBankingGetBalancesOutput",
|
|
29
|
+
description: "Canonical balances for a bank account.",
|
|
30
|
+
fields: {
|
|
31
|
+
balances: {
|
|
32
|
+
type: AccountBalanceRecord,
|
|
33
|
+
isOptional: false,
|
|
34
|
+
isArray: true
|
|
35
|
+
},
|
|
36
|
+
asOf: {
|
|
37
|
+
type: ScalarTypeEnum.DateTime(),
|
|
38
|
+
isOptional: true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const OpenBankingRefreshBalancesInput = new SchemaModel({
|
|
43
|
+
name: "OpenBankingRefreshBalancesInput",
|
|
44
|
+
description: "Command payload to refresh balances for a bank account via the open banking provider.",
|
|
45
|
+
fields: {
|
|
46
|
+
tenantId: {
|
|
47
|
+
type: ScalarTypeEnum.ID(),
|
|
48
|
+
isOptional: false
|
|
49
|
+
},
|
|
50
|
+
accountId: {
|
|
51
|
+
type: ScalarTypeEnum.ID(),
|
|
52
|
+
isOptional: false
|
|
53
|
+
},
|
|
54
|
+
connectionId: {
|
|
55
|
+
type: ScalarTypeEnum.ID(),
|
|
56
|
+
isOptional: true
|
|
57
|
+
},
|
|
58
|
+
balanceTypes: {
|
|
59
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
60
|
+
isArray: true,
|
|
61
|
+
isOptional: true
|
|
62
|
+
},
|
|
63
|
+
forceRefresh: {
|
|
64
|
+
type: ScalarTypeEnum.Boolean(),
|
|
65
|
+
isOptional: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const OpenBankingRefreshBalancesOutput = new SchemaModel({
|
|
70
|
+
name: "OpenBankingRefreshBalancesOutput",
|
|
71
|
+
description: "Result of a balance refresh against the open banking provider.",
|
|
72
|
+
fields: {
|
|
73
|
+
balances: {
|
|
74
|
+
type: AccountBalanceRecord,
|
|
75
|
+
isOptional: false,
|
|
76
|
+
isArray: true
|
|
77
|
+
},
|
|
78
|
+
refreshedAt: {
|
|
79
|
+
type: ScalarTypeEnum.DateTime(),
|
|
80
|
+
isOptional: false
|
|
81
|
+
},
|
|
82
|
+
errors: {
|
|
83
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
84
|
+
isArray: true,
|
|
85
|
+
isOptional: true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const OpenBankingGetBalances = defineQuery({
|
|
90
|
+
meta: {
|
|
91
|
+
key: "openbanking.balances.get",
|
|
92
|
+
version: "1.0.0",
|
|
93
|
+
description: "Retrieve the latest cached balances for a bank account.",
|
|
94
|
+
goal: "Expose current and available balances required by dashboards and analytics.",
|
|
95
|
+
context: "Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",
|
|
96
|
+
owners: ["@platform.finance"],
|
|
97
|
+
tags: [
|
|
98
|
+
"open-banking",
|
|
99
|
+
"powens",
|
|
100
|
+
"balances"
|
|
101
|
+
],
|
|
102
|
+
stability: "experimental"
|
|
103
|
+
},
|
|
104
|
+
io: {
|
|
105
|
+
input: OpenBankingGetBalancesInput,
|
|
106
|
+
output: OpenBankingGetBalancesOutput
|
|
107
|
+
},
|
|
108
|
+
policy: { auth: "user" }
|
|
109
|
+
});
|
|
110
|
+
const OpenBankingRefreshBalances = defineCommand({
|
|
111
|
+
meta: {
|
|
112
|
+
key: "openbanking.balances.refresh",
|
|
113
|
+
version: "1.0.0",
|
|
114
|
+
description: "Refresh balances for a bank account via the configured open banking provider.",
|
|
115
|
+
goal: "Ensure canonical balance records reflect the latest values from Powens.",
|
|
116
|
+
context: "Triggered by scheduled workflows before generating summaries or forecasting cashflow.",
|
|
117
|
+
owners: ["@platform.finance"],
|
|
118
|
+
tags: [
|
|
119
|
+
"open-banking",
|
|
120
|
+
"powens",
|
|
121
|
+
"balances"
|
|
122
|
+
],
|
|
123
|
+
stability: "experimental"
|
|
124
|
+
},
|
|
125
|
+
io: {
|
|
126
|
+
input: OpenBankingRefreshBalancesInput,
|
|
127
|
+
output: OpenBankingRefreshBalancesOutput
|
|
128
|
+
},
|
|
129
|
+
policy: { auth: "admin" },
|
|
130
|
+
telemetry: {
|
|
131
|
+
success: {
|
|
132
|
+
event: { key: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },
|
|
133
|
+
properties: ({ input, output }) => {
|
|
134
|
+
const payload = input;
|
|
135
|
+
const result = output;
|
|
136
|
+
return {
|
|
137
|
+
tenantId: payload?.tenantId,
|
|
138
|
+
accountId: payload?.accountId,
|
|
139
|
+
refreshedAt: result?.refreshedAt,
|
|
140
|
+
balanceCount: Array.isArray(result?.balances) ? result?.balances.length : void 0
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
failure: {
|
|
145
|
+
event: { key: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },
|
|
146
|
+
properties: ({ input, error }) => {
|
|
147
|
+
const payload = input;
|
|
148
|
+
return {
|
|
149
|
+
tenantId: payload?.tenantId,
|
|
150
|
+
accountId: payload?.accountId,
|
|
151
|
+
error: error instanceof Error ? error.message : String(error ?? "unknown")
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
const openBankingBalanceContracts = {
|
|
158
|
+
OpenBankingGetBalances,
|
|
159
|
+
OpenBankingRefreshBalances
|
|
160
|
+
};
|
|
161
|
+
function registerOpenBankingBalanceContracts(registry) {
|
|
162
|
+
return registry.register(OpenBankingGetBalances).register(OpenBankingRefreshBalances);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
export { OpenBankingGetBalances, OpenBankingRefreshBalances, openBankingBalanceContracts, registerOpenBankingBalanceContracts };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OperationSpecRegistry } from "../../../operations/registry.js";
|
|
2
|
+
import { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts } from "./accounts.js";
|
|
3
|
+
import { OpenBankingListTransactions, OpenBankingSyncTransactions } from "./transactions.js";
|
|
4
|
+
import { OpenBankingGetBalances, OpenBankingRefreshBalances } from "./balances.js";
|
|
5
|
+
import { OpenBankingFeature } from "../openbanking.feature.js";
|
|
6
|
+
|
|
7
|
+
//#region src/integrations/openbanking/contracts/index.d.ts
|
|
8
|
+
declare function registerOpenBankingContracts(registry: OperationSpecRegistry): OperationSpecRegistry;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, registerOpenBankingContracts };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts, registerOpenBankingAccountContracts } from "./accounts.js";
|
|
2
|
+
import { OpenBankingListTransactions, OpenBankingSyncTransactions, registerOpenBankingTransactionContracts } from "./transactions.js";
|
|
3
|
+
import { OpenBankingGetBalances, OpenBankingRefreshBalances, registerOpenBankingBalanceContracts } from "./balances.js";
|
|
4
|
+
import { OpenBankingFeature } from "../openbanking.feature.js";
|
|
5
|
+
|
|
6
|
+
//#region src/integrations/openbanking/contracts/index.ts
|
|
7
|
+
function registerOpenBankingContracts(registry) {
|
|
8
|
+
return registerOpenBankingBalanceContracts(registerOpenBankingTransactionContracts(registerOpenBankingAccountContracts(registry)));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, registerOpenBankingContracts };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { AnyOperationSpec, OperationSpec } from "../../../operations/operation.js";
|
|
2
|
+
import { OperationSpecRegistry } from "../../../operations/registry.js";
|
|
3
|
+
import "../../../operations/index.js";
|
|
4
|
+
import "../../../index.js";
|
|
5
|
+
import * as _contractspec_lib_schema408 from "@contractspec/lib.schema";
|
|
6
|
+
import { SchemaModel } from "@contractspec/lib.schema";
|
|
7
|
+
|
|
8
|
+
//#region src/integrations/openbanking/contracts/transactions.d.ts
|
|
9
|
+
declare const OpenBankingListTransactions: OperationSpec<SchemaModel<{
|
|
10
|
+
tenantId: {
|
|
11
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
12
|
+
isOptional: false;
|
|
13
|
+
};
|
|
14
|
+
accountId: {
|
|
15
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
16
|
+
isOptional: false;
|
|
17
|
+
};
|
|
18
|
+
from: {
|
|
19
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
20
|
+
isOptional: true;
|
|
21
|
+
};
|
|
22
|
+
to: {
|
|
23
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
24
|
+
isOptional: true;
|
|
25
|
+
};
|
|
26
|
+
cursor: {
|
|
27
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
28
|
+
isOptional: true;
|
|
29
|
+
};
|
|
30
|
+
pageSize: {
|
|
31
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
32
|
+
isOptional: true;
|
|
33
|
+
};
|
|
34
|
+
direction: {
|
|
35
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
36
|
+
isOptional: true;
|
|
37
|
+
};
|
|
38
|
+
minimumAmount: {
|
|
39
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
40
|
+
isOptional: true;
|
|
41
|
+
};
|
|
42
|
+
maximumAmount: {
|
|
43
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
44
|
+
isOptional: true;
|
|
45
|
+
};
|
|
46
|
+
category: {
|
|
47
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
48
|
+
isOptional: true;
|
|
49
|
+
};
|
|
50
|
+
}>, SchemaModel<{
|
|
51
|
+
transactions: {
|
|
52
|
+
type: SchemaModel<{
|
|
53
|
+
id: {
|
|
54
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
55
|
+
isOptional: false;
|
|
56
|
+
};
|
|
57
|
+
accountId: {
|
|
58
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
59
|
+
isOptional: false;
|
|
60
|
+
};
|
|
61
|
+
tenantId: {
|
|
62
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
63
|
+
isOptional: false;
|
|
64
|
+
};
|
|
65
|
+
connectionId: {
|
|
66
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
67
|
+
isOptional: false;
|
|
68
|
+
};
|
|
69
|
+
externalId: {
|
|
70
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
71
|
+
isOptional: false;
|
|
72
|
+
};
|
|
73
|
+
amount: {
|
|
74
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
75
|
+
isOptional: false;
|
|
76
|
+
};
|
|
77
|
+
currency: {
|
|
78
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
79
|
+
isOptional: false;
|
|
80
|
+
};
|
|
81
|
+
date: {
|
|
82
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
83
|
+
isOptional: false;
|
|
84
|
+
};
|
|
85
|
+
bookingDate: {
|
|
86
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
87
|
+
isOptional: true;
|
|
88
|
+
};
|
|
89
|
+
valueDate: {
|
|
90
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
91
|
+
isOptional: true;
|
|
92
|
+
};
|
|
93
|
+
description: {
|
|
94
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
95
|
+
isOptional: true;
|
|
96
|
+
};
|
|
97
|
+
counterpartyName: {
|
|
98
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
99
|
+
isOptional: true;
|
|
100
|
+
};
|
|
101
|
+
counterpartyAccount: {
|
|
102
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
103
|
+
isOptional: true;
|
|
104
|
+
};
|
|
105
|
+
merchantCategoryCode: {
|
|
106
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
107
|
+
isOptional: true;
|
|
108
|
+
};
|
|
109
|
+
rawCategory: {
|
|
110
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
111
|
+
isOptional: true;
|
|
112
|
+
};
|
|
113
|
+
standardizedCategory: {
|
|
114
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
115
|
+
isOptional: true;
|
|
116
|
+
};
|
|
117
|
+
transactionType: {
|
|
118
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
119
|
+
isOptional: false;
|
|
120
|
+
};
|
|
121
|
+
status: {
|
|
122
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
123
|
+
isOptional: false;
|
|
124
|
+
};
|
|
125
|
+
runningBalance: {
|
|
126
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
127
|
+
isOptional: true;
|
|
128
|
+
};
|
|
129
|
+
metadata: {
|
|
130
|
+
type: _contractspec_lib_schema408.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
131
|
+
isOptional: true;
|
|
132
|
+
};
|
|
133
|
+
createdAt: {
|
|
134
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
135
|
+
isOptional: false;
|
|
136
|
+
};
|
|
137
|
+
updatedAt: {
|
|
138
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
139
|
+
isOptional: false;
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
142
|
+
isOptional: false;
|
|
143
|
+
isArray: true;
|
|
144
|
+
};
|
|
145
|
+
nextCursor: {
|
|
146
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
147
|
+
isOptional: true;
|
|
148
|
+
};
|
|
149
|
+
hasMore: {
|
|
150
|
+
type: _contractspec_lib_schema408.FieldType<boolean, boolean>;
|
|
151
|
+
isOptional: true;
|
|
152
|
+
};
|
|
153
|
+
}>, undefined>;
|
|
154
|
+
declare const OpenBankingSyncTransactions: OperationSpec<SchemaModel<{
|
|
155
|
+
tenantId: {
|
|
156
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
157
|
+
isOptional: false;
|
|
158
|
+
};
|
|
159
|
+
accountId: {
|
|
160
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
161
|
+
isOptional: false;
|
|
162
|
+
};
|
|
163
|
+
from: {
|
|
164
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
165
|
+
isOptional: true;
|
|
166
|
+
};
|
|
167
|
+
to: {
|
|
168
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
169
|
+
isOptional: true;
|
|
170
|
+
};
|
|
171
|
+
connectionId: {
|
|
172
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
173
|
+
isOptional: true;
|
|
174
|
+
};
|
|
175
|
+
includePending: {
|
|
176
|
+
type: _contractspec_lib_schema408.FieldType<boolean, boolean>;
|
|
177
|
+
isOptional: true;
|
|
178
|
+
};
|
|
179
|
+
backfillDays: {
|
|
180
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
181
|
+
isOptional: true;
|
|
182
|
+
};
|
|
183
|
+
}>, SchemaModel<{
|
|
184
|
+
synced: {
|
|
185
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
186
|
+
isOptional: false;
|
|
187
|
+
};
|
|
188
|
+
failed: {
|
|
189
|
+
type: _contractspec_lib_schema408.FieldType<number, number>;
|
|
190
|
+
isOptional: false;
|
|
191
|
+
};
|
|
192
|
+
earliestSyncedAt: {
|
|
193
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
194
|
+
isOptional: true;
|
|
195
|
+
};
|
|
196
|
+
latestSyncedAt: {
|
|
197
|
+
type: _contractspec_lib_schema408.FieldType<Date, string>;
|
|
198
|
+
isOptional: true;
|
|
199
|
+
};
|
|
200
|
+
nextSinceToken: {
|
|
201
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
202
|
+
isOptional: true;
|
|
203
|
+
};
|
|
204
|
+
errors: {
|
|
205
|
+
type: _contractspec_lib_schema408.FieldType<string, string>;
|
|
206
|
+
isArray: true;
|
|
207
|
+
isOptional: true;
|
|
208
|
+
};
|
|
209
|
+
}>, undefined>;
|
|
210
|
+
declare const openBankingTransactionContracts: Record<string, AnyOperationSpec>;
|
|
211
|
+
declare function registerOpenBankingTransactionContracts(registry: OperationSpecRegistry): OperationSpecRegistry;
|
|
212
|
+
//#endregion
|
|
213
|
+
export { OpenBankingListTransactions, OpenBankingSyncTransactions, openBankingTransactionContracts, registerOpenBankingTransactionContracts };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { defineCommand, defineQuery } from "../../../operations/operation.js";
|
|
2
|
+
import "../../../operations/index.js";
|
|
3
|
+
import { BankTransactionRecord } from "../models.js";
|
|
4
|
+
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
5
|
+
import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
|
|
6
|
+
|
|
7
|
+
//#region src/integrations/openbanking/contracts/transactions.ts
|
|
8
|
+
const OpenBankingListTransactionsInput = new SchemaModel({
|
|
9
|
+
name: "OpenBankingListTransactionsInput",
|
|
10
|
+
description: "Parameters for listing bank transactions from the canonical ledger.",
|
|
11
|
+
fields: {
|
|
12
|
+
tenantId: {
|
|
13
|
+
type: ScalarTypeEnum.ID(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
accountId: {
|
|
17
|
+
type: ScalarTypeEnum.ID(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
from: {
|
|
21
|
+
type: ScalarTypeEnum.DateTime(),
|
|
22
|
+
isOptional: true
|
|
23
|
+
},
|
|
24
|
+
to: {
|
|
25
|
+
type: ScalarTypeEnum.DateTime(),
|
|
26
|
+
isOptional: true
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: true
|
|
31
|
+
},
|
|
32
|
+
pageSize: {
|
|
33
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
34
|
+
isOptional: true
|
|
35
|
+
},
|
|
36
|
+
direction: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: true
|
|
39
|
+
},
|
|
40
|
+
minimumAmount: {
|
|
41
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
42
|
+
isOptional: true
|
|
43
|
+
},
|
|
44
|
+
maximumAmount: {
|
|
45
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
46
|
+
isOptional: true
|
|
47
|
+
},
|
|
48
|
+
category: {
|
|
49
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
+
isOptional: true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const OpenBankingListTransactionsOutput = new SchemaModel({
|
|
55
|
+
name: "OpenBankingListTransactionsOutput",
|
|
56
|
+
description: "Paginated list of transactions for a bank account.",
|
|
57
|
+
fields: {
|
|
58
|
+
transactions: {
|
|
59
|
+
type: BankTransactionRecord,
|
|
60
|
+
isOptional: false,
|
|
61
|
+
isArray: true
|
|
62
|
+
},
|
|
63
|
+
nextCursor: {
|
|
64
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
65
|
+
isOptional: true
|
|
66
|
+
},
|
|
67
|
+
hasMore: {
|
|
68
|
+
type: ScalarTypeEnum.Boolean(),
|
|
69
|
+
isOptional: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const OpenBankingSyncTransactionsInput = new SchemaModel({
|
|
74
|
+
name: "OpenBankingSyncTransactionsInput",
|
|
75
|
+
description: "Command payload to synchronise transactions from the open banking provider into the canonical ledger.",
|
|
76
|
+
fields: {
|
|
77
|
+
tenantId: {
|
|
78
|
+
type: ScalarTypeEnum.ID(),
|
|
79
|
+
isOptional: false
|
|
80
|
+
},
|
|
81
|
+
accountId: {
|
|
82
|
+
type: ScalarTypeEnum.ID(),
|
|
83
|
+
isOptional: false
|
|
84
|
+
},
|
|
85
|
+
from: {
|
|
86
|
+
type: ScalarTypeEnum.DateTime(),
|
|
87
|
+
isOptional: true
|
|
88
|
+
},
|
|
89
|
+
to: {
|
|
90
|
+
type: ScalarTypeEnum.DateTime(),
|
|
91
|
+
isOptional: true
|
|
92
|
+
},
|
|
93
|
+
connectionId: {
|
|
94
|
+
type: ScalarTypeEnum.ID(),
|
|
95
|
+
isOptional: true
|
|
96
|
+
},
|
|
97
|
+
includePending: {
|
|
98
|
+
type: ScalarTypeEnum.Boolean(),
|
|
99
|
+
isOptional: true
|
|
100
|
+
},
|
|
101
|
+
backfillDays: {
|
|
102
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
103
|
+
isOptional: true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const OpenBankingSyncTransactionsOutput = new SchemaModel({
|
|
108
|
+
name: "OpenBankingSyncTransactionsOutput",
|
|
109
|
+
description: "Result of a transaction synchronisation run.",
|
|
110
|
+
fields: {
|
|
111
|
+
synced: {
|
|
112
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
113
|
+
isOptional: false
|
|
114
|
+
},
|
|
115
|
+
failed: {
|
|
116
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
117
|
+
isOptional: false
|
|
118
|
+
},
|
|
119
|
+
earliestSyncedAt: {
|
|
120
|
+
type: ScalarTypeEnum.DateTime(),
|
|
121
|
+
isOptional: true
|
|
122
|
+
},
|
|
123
|
+
latestSyncedAt: {
|
|
124
|
+
type: ScalarTypeEnum.DateTime(),
|
|
125
|
+
isOptional: true
|
|
126
|
+
},
|
|
127
|
+
nextSinceToken: {
|
|
128
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
129
|
+
isOptional: true
|
|
130
|
+
},
|
|
131
|
+
errors: {
|
|
132
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
133
|
+
isArray: true,
|
|
134
|
+
isOptional: true
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const OpenBankingListTransactions = defineQuery({
|
|
139
|
+
meta: {
|
|
140
|
+
key: "openbanking.transactions.list",
|
|
141
|
+
version: "1.0.0",
|
|
142
|
+
description: "List bank transactions that have been normalised into the canonical ledger.",
|
|
143
|
+
goal: "Allow downstream analytics and UI surfaces to page through canonical bank transactions.",
|
|
144
|
+
context: "Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.",
|
|
145
|
+
owners: ["@platform.finance"],
|
|
146
|
+
tags: [
|
|
147
|
+
"open-banking",
|
|
148
|
+
"powens",
|
|
149
|
+
"transactions"
|
|
150
|
+
],
|
|
151
|
+
stability: "experimental"
|
|
152
|
+
},
|
|
153
|
+
io: {
|
|
154
|
+
input: OpenBankingListTransactionsInput,
|
|
155
|
+
output: OpenBankingListTransactionsOutput
|
|
156
|
+
},
|
|
157
|
+
policy: { auth: "user" }
|
|
158
|
+
});
|
|
159
|
+
const OpenBankingSyncTransactions = defineCommand({
|
|
160
|
+
meta: {
|
|
161
|
+
key: "openbanking.transactions.sync",
|
|
162
|
+
version: "1.0.0",
|
|
163
|
+
description: "Synchronise transactions for a bank account by calling the configured open banking provider.",
|
|
164
|
+
goal: "Ensure the canonical transaction ledger stays aligned with the external provider.",
|
|
165
|
+
context: "Triggered by scheduled workflows or on-demand actions when activity is expected on an account.",
|
|
166
|
+
owners: ["@platform.finance"],
|
|
167
|
+
tags: [
|
|
168
|
+
"open-banking",
|
|
169
|
+
"powens",
|
|
170
|
+
"transactions"
|
|
171
|
+
],
|
|
172
|
+
stability: "experimental"
|
|
173
|
+
},
|
|
174
|
+
io: {
|
|
175
|
+
input: OpenBankingSyncTransactionsInput,
|
|
176
|
+
output: OpenBankingSyncTransactionsOutput
|
|
177
|
+
},
|
|
178
|
+
policy: { auth: "admin" },
|
|
179
|
+
telemetry: {
|
|
180
|
+
success: {
|
|
181
|
+
event: { key: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },
|
|
182
|
+
properties: ({ input, output }) => {
|
|
183
|
+
const payload = input;
|
|
184
|
+
const result = output;
|
|
185
|
+
return {
|
|
186
|
+
tenantId: payload?.tenantId,
|
|
187
|
+
accountId: payload?.accountId,
|
|
188
|
+
synced: result?.synced,
|
|
189
|
+
failed: result?.failed,
|
|
190
|
+
earliestSyncedAt: result?.earliestSyncedAt,
|
|
191
|
+
latestSyncedAt: result?.latestSyncedAt
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
failure: {
|
|
196
|
+
event: { key: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },
|
|
197
|
+
properties: ({ input, error }) => {
|
|
198
|
+
const payload = input;
|
|
199
|
+
return {
|
|
200
|
+
tenantId: payload?.tenantId,
|
|
201
|
+
accountId: payload?.accountId,
|
|
202
|
+
error: error instanceof Error ? error.message : String(error ?? "unknown")
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
const openBankingTransactionContracts = {
|
|
209
|
+
OpenBankingListTransactions,
|
|
210
|
+
OpenBankingSyncTransactions
|
|
211
|
+
};
|
|
212
|
+
function registerOpenBankingTransactionContracts(registry) {
|
|
213
|
+
return registry.register(OpenBankingListTransactions).register(OpenBankingSyncTransactions);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
//#endregion
|
|
217
|
+
export { OpenBankingListTransactions, OpenBankingSyncTransactions, openBankingTransactionContracts, registerOpenBankingTransactionContracts };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResolvedAppConfig, ResolvedIntegration } from "../../app-config/runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region src/integrations/openbanking/guards.d.ts
|
|
4
|
+
interface OpenBankingGuardResult {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
integration?: ResolvedIntegration;
|
|
7
|
+
error?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function ensurePrimaryOpenBankingIntegration(config: ResolvedAppConfig): OpenBankingGuardResult;
|
|
10
|
+
declare function assertPrimaryOpenBankingReady(config: ResolvedAppConfig): ResolvedIntegration;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { OpenBankingGuardResult, assertPrimaryOpenBankingReady, ensurePrimaryOpenBankingIntegration };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/integrations/openbanking/guards.ts
|
|
2
|
+
const PRIMARY_SLOT_ID = "primaryOpenBanking";
|
|
3
|
+
function ensurePrimaryOpenBankingIntegration(config) {
|
|
4
|
+
const integration = config.integrations.find((item) => item.slot.slotId === PRIMARY_SLOT_ID);
|
|
5
|
+
if (!integration) return {
|
|
6
|
+
ok: false,
|
|
7
|
+
error: "primaryOpenBanking slot is not bound in the resolved app config."
|
|
8
|
+
};
|
|
9
|
+
const status = integration.connection.status;
|
|
10
|
+
if (status === "error" || status === "disconnected") return {
|
|
11
|
+
ok: false,
|
|
12
|
+
integration,
|
|
13
|
+
error: `primaryOpenBanking connection is in status "${status}".`
|
|
14
|
+
};
|
|
15
|
+
if (status === "unknown") return {
|
|
16
|
+
ok: false,
|
|
17
|
+
integration,
|
|
18
|
+
error: "primaryOpenBanking connection health is unknown."
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
ok: true,
|
|
22
|
+
integration
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function assertPrimaryOpenBankingReady(config) {
|
|
26
|
+
const result = ensurePrimaryOpenBankingIntegration(config);
|
|
27
|
+
if (!result.ok) throw new Error(result.error ?? "Open banking integration not available.");
|
|
28
|
+
if (!result.integration) throw new Error(result.error ?? "Open banking integration not available.");
|
|
29
|
+
return result.integration;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { assertPrimaryOpenBankingReady, ensurePrimaryOpenBankingIntegration };
|