@lssm/lib.contracts 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406
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/dist/app-config/app-config.feature.js +53 -1
- package/dist/app-config/contracts.d.ts +50 -50
- package/dist/app-config/contracts.js +396 -1
- package/dist/app-config/docs/app-config.docblock.js +22 -220
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/events.js +168 -1
- package/dist/app-config/index.js +8 -1
- package/dist/app-config/lifecycle-contracts.d.ts +80 -80
- package/dist/app-config/lifecycle-contracts.js +441 -1
- package/dist/app-config/runtime.js +617 -1
- package/dist/app-config/spec.js +36 -1
- package/dist/app-config/validation.js +538 -1
- package/dist/capabilities/docs/capabilities.docblock.js +22 -1
- package/dist/capabilities/openbanking.js +92 -1
- package/dist/capabilities.js +50 -1
- package/dist/client/index.js +9 -1
- package/dist/client/react/drivers/rn-reusables.js +21 -1
- package/dist/client/react/drivers/shadcn.js +11 -1
- package/dist/client/react/feature-render.js +43 -1
- package/dist/client/react/form-render.js +298 -1
- package/dist/client/react/index.js +8 -1
- package/dist/contract-registry/index.js +3 -1
- package/dist/contract-registry/schemas.js +61 -1
- package/dist/contracts-adapter-hydration.js +41 -1
- package/dist/contracts-adapter-input.js +77 -1
- package/dist/data-views/docs/data-views.docblock.js +22 -1
- package/dist/data-views/query-generator.js +48 -1
- package/dist/data-views/runtime.js +39 -1
- package/dist/data-views.js +35 -1
- package/dist/docs/PUBLISHING.docblock.js +17 -76
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -350
- package/dist/docs/index.js +33 -1
- package/dist/docs/meta.docs.js +15 -2
- package/dist/docs/presentations.js +77 -1
- package/dist/docs/registry.js +51 -1
- package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +17 -383
- package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +17 -68
- package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +17 -140
- package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +17 -86
- package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +17 -1
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +25 -2
- package/dist/docs/tech/contracts/README.docblock.js +21 -1
- package/dist/docs/tech/contracts/create-subscription.docblock.js +21 -1
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +21 -180
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -1
- package/dist/docs/tech/contracts/openapi-export.docblock.js +22 -2
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +19 -60
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -68
- package/dist/docs/tech/contracts/tests.docblock.js +21 -132
- package/dist/docs/tech/contracts/themes.docblock.js +21 -1
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +21 -106
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -213
- package/dist/docs/tech/llm/llm-integration.docblock.js +74 -5
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -1
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -1
- package/dist/docs/tech/schema/README.docblock.js +21 -262
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -1
- package/dist/docs/tech/studio/learning-journeys.docblock.js +25 -2
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +24 -2
- package/dist/docs/tech/studio/project-access-teams.docblock.js +26 -16
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -1
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +23 -2
- package/dist/docs/tech/studio/team-invitations.docblock.js +41 -36
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -1
- package/dist/docs/tech/studio/workspaces.docblock.js +24 -2
- package/dist/docs/tech/telemetry-ingest.docblock.js +37 -3
- package/dist/docs/tech/templates/runtime.docblock.js +21 -1
- package/dist/docs/tech/vscode-extension.docblock.js +37 -3
- package/dist/docs/tech/workflows/overview.docblock.js +21 -1
- package/dist/docs/tech-contracts.docs.js +19 -2
- package/dist/events.js +12 -1
- package/dist/experiments/docs/experiments.docblock.js +22 -128
- package/dist/experiments/evaluator.js +101 -1
- package/dist/experiments/spec.js +33 -1
- package/dist/features.js +68 -1
- package/dist/forms/docs/forms.docblock.js +22 -1
- package/dist/forms.js +119 -1
- package/dist/index.js +107 -1
- package/dist/install.js +40 -1
- package/dist/integrations/contracts.d.ts +102 -102
- package/dist/integrations/contracts.js +388 -1
- package/dist/integrations/docs/integrations.docblock.js +95 -1
- package/dist/integrations/health.js +69 -1
- package/dist/integrations/index.js +23 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
- package/dist/integrations/openbanking/contracts/accounts.js +237 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
- package/dist/integrations/openbanking/contracts/balances.js +167 -1
- package/dist/integrations/openbanking/contracts/index.js +12 -1
- package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
- package/dist/integrations/openbanking/contracts/transactions.js +218 -1
- package/dist/integrations/openbanking/guards.js +32 -1
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/openbanking/models.js +242 -1
- package/dist/integrations/openbanking/openbanking.feature.js +68 -1
- package/dist/integrations/openbanking/telemetry.js +39 -1
- package/dist/integrations/providers/elevenlabs.js +56 -1
- package/dist/integrations/providers/gcs-storage.js +79 -1
- package/dist/integrations/providers/gmail.js +91 -1
- package/dist/integrations/providers/google-calendar.js +70 -1
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -1
- package/dist/integrations/providers/impls/gcs-storage.js +88 -1
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -1
- package/dist/integrations/providers/impls/gmail-outbound.js +104 -5
- package/dist/integrations/providers/impls/google-calendar.js +154 -1
- package/dist/integrations/providers/impls/index.js +16 -1
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -1
- package/dist/integrations/providers/impls/mistral-llm.js +247 -1
- package/dist/integrations/providers/impls/postmark-email.js +55 -1
- package/dist/integrations/providers/impls/powens-client.js +171 -1
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -1
- package/dist/integrations/providers/impls/provider-factory.js +142 -1
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -1
- package/dist/integrations/providers/impls/stripe-payments.js +202 -1
- package/dist/integrations/providers/impls/twilio-sms.js +58 -1
- package/dist/integrations/providers/index.js +13 -1
- package/dist/integrations/providers/mistral.js +72 -1
- package/dist/integrations/providers/postmark.js +72 -1
- package/dist/integrations/providers/powens.js +120 -1
- package/dist/integrations/providers/qdrant.js +77 -1
- package/dist/integrations/providers/registry.js +34 -1
- package/dist/integrations/providers/stripe.js +87 -1
- package/dist/integrations/providers/twilio-sms.js +65 -1
- package/dist/integrations/runtime.js +186 -1
- package/dist/integrations/secrets/aws-secret-manager.js +231 -1
- package/dist/integrations/secrets/env-secret-provider.js +81 -1
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -1
- package/dist/integrations/secrets/index.js +8 -1
- package/dist/integrations/secrets/manager.js +103 -1
- package/dist/integrations/secrets/provider.js +58 -1
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -1
- package/dist/integrations/spec.js +39 -1
- package/dist/jobs/define-job.js +16 -1
- package/dist/jobs/gcp-cloud-tasks.js +53 -1
- package/dist/jobs/gcp-pubsub.js +39 -1
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -1
- package/dist/jobs/handlers/index.js +12 -1
- package/dist/jobs/handlers/ping-handler.js +15 -1
- package/dist/jobs/handlers/storage-document-handler.js +14 -1
- package/dist/jobs/index.js +4 -1
- package/dist/jobs/memory-queue.js +71 -1
- package/dist/jobs/queue.js +33 -1
- package/dist/jobs/scaleway-sqs-queue.js +153 -1
- package/dist/jsonschema.d.ts +3 -3
- package/dist/jsonschema.js +32 -1
- package/dist/knowledge/contracts.d.ts +66 -66
- package/dist/knowledge/contracts.js +317 -1
- package/dist/knowledge/docs/knowledge.docblock.js +22 -138
- package/dist/knowledge/index.js +10 -1
- package/dist/knowledge/ingestion/document-processor.js +54 -1
- package/dist/knowledge/ingestion/embedding-service.js +25 -1
- package/dist/knowledge/ingestion/gmail-adapter.js +50 -5
- package/dist/knowledge/ingestion/index.js +7 -1
- package/dist/knowledge/ingestion/storage-adapter.js +26 -1
- package/dist/knowledge/ingestion/vector-indexer.js +32 -1
- package/dist/knowledge/query/index.js +3 -1
- package/dist/knowledge/query/service.js +64 -2
- package/dist/knowledge/runtime.js +49 -1
- package/dist/knowledge/spaces/email-threads.js +38 -1
- package/dist/knowledge/spaces/financial-docs.js +38 -1
- package/dist/knowledge/spaces/financial-overview.js +42 -1
- package/dist/knowledge/spaces/index.js +8 -1
- package/dist/knowledge/spaces/product-canon.js +38 -1
- package/dist/knowledge/spaces/support-faq.js +41 -1
- package/dist/knowledge/spaces/uploaded-docs.js +38 -1
- package/dist/knowledge/spec.js +39 -1
- package/dist/llm/exporters.js +541 -8
- package/dist/llm/index.js +4 -1
- package/dist/llm/prompts.js +246 -56
- package/dist/markdown.js +116 -3
- package/dist/migrations.js +33 -1
- package/dist/onboarding-base.d.ts +29 -29
- package/dist/onboarding-base.js +196 -1
- package/dist/openapi.js +75 -1
- package/dist/openbanking/docs/openbanking.docblock.js +22 -109
- package/dist/ownership.js +40 -1
- package/dist/policy/docs/policy.docblock.js +22 -1
- package/dist/policy/engine.js +223 -1
- package/dist/policy/opa-adapter.js +71 -1
- package/dist/policy/spec.js +33 -1
- package/dist/presentations/docs/presentations-conventions.docblock.js +21 -7
- package/dist/presentations.backcompat.js +47 -1
- package/dist/presentations.d.ts +3 -3
- package/dist/presentations.js +66 -1
- package/dist/presentations.v2.js +278 -6
- package/dist/prompt.js +10 -1
- package/dist/promptRegistry.js +34 -1
- package/dist/regenerator/docs/regenerator.docblock.js +22 -184
- package/dist/regenerator/executor.js +86 -1
- package/dist/regenerator/index.js +6 -1
- package/dist/regenerator/service.js +92 -1
- package/dist/regenerator/sinks.js +32 -1
- package/dist/regenerator/utils.js +51 -1
- package/dist/registry.js +208 -1
- package/dist/resources.js +47 -1
- package/dist/schema/dist/EnumType.js +2 -1
- package/dist/schema/dist/FieldType.js +49 -1
- package/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/schema/dist/entity/index.js +2 -1
- package/dist/schema/dist/entity/types.js +1 -1
- package/dist/schema/dist/index.js +6 -1
- package/dist/schema-to-markdown.js +214 -10
- package/dist/server/graphql-pothos.js +128 -1
- package/dist/server/index.js +10 -1
- package/dist/server/mcp/createMcpServer.js +28 -1
- package/dist/server/mcp/registerPresentations.js +151 -1
- package/dist/server/mcp/registerPrompts.js +36 -2
- package/dist/server/mcp/registerResources.js +35 -1
- package/dist/server/mcp/registerTools.js +22 -1
- package/dist/server/provider-mcp.js +3 -1
- package/dist/server/rest-elysia.js +20 -1
- package/dist/server/rest-express.js +39 -1
- package/dist/server/rest-generic.js +125 -1
- package/dist/server/rest-next-app.js +38 -1
- package/dist/server/rest-next-mcp.js +45 -1
- package/dist/server/rest-next-pages.js +25 -1
- package/dist/spec.js +35 -1
- package/dist/telemetry/anomaly.js +48 -1
- package/dist/telemetry/docs/telemetry.docblock.js +22 -139
- package/dist/telemetry/index.js +5 -1
- package/dist/telemetry/spec.js +69 -1
- package/dist/telemetry/tracker.js +76 -1
- package/dist/tests/index.js +4 -1
- package/dist/tests/runner.js +150 -1
- package/dist/tests/spec.js +33 -1
- package/dist/themes.js +39 -1
- package/dist/workflow/adapters/db-adapter.js +83 -1
- package/dist/workflow/adapters/file-adapter.js +11 -1
- package/dist/workflow/adapters/index.js +5 -1
- package/dist/workflow/adapters/memory-store.js +58 -1
- package/dist/workflow/expression.js +98 -1
- package/dist/workflow/index.js +9 -1
- package/dist/workflow/runner.js +337 -1
- package/dist/workflow/sla-monitor.js +47 -1
- package/dist/workflow/spec.js +32 -1
- package/dist/workflow/validation.js +175 -1
- package/package.json +11 -4
|
@@ -1 +1,441 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { SchemaModel } from "../schema/dist/SchemaModel.js";
|
|
3
|
+
import "../schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../spec.js";
|
|
5
|
+
import { OwnersEnum, StabilityEnum, TagsEnum } from "../ownership.js";
|
|
6
|
+
import { ConfigDraftCreatedEvent, ConfigPromotedToPreviewEvent, ConfigPublishedEvent, ConfigRolledBackEvent } from "./events.js";
|
|
7
|
+
|
|
8
|
+
//#region src/app-config/lifecycle-contracts.ts
|
|
9
|
+
const LifecyclePolicy = {
|
|
10
|
+
auth: "admin",
|
|
11
|
+
policies: [{
|
|
12
|
+
name: "platform.app-config.manage",
|
|
13
|
+
version: 1
|
|
14
|
+
}]
|
|
15
|
+
};
|
|
16
|
+
const LifecycleReadPolicy = {
|
|
17
|
+
auth: "admin",
|
|
18
|
+
policies: [{
|
|
19
|
+
name: "platform.app-config.read",
|
|
20
|
+
version: 1
|
|
21
|
+
}]
|
|
22
|
+
};
|
|
23
|
+
const ConfigVersionRecord = new SchemaModel({
|
|
24
|
+
name: "ConfigVersionRecord",
|
|
25
|
+
fields: {
|
|
26
|
+
meta: {
|
|
27
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
28
|
+
isOptional: false
|
|
29
|
+
},
|
|
30
|
+
config: {
|
|
31
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
32
|
+
isOptional: false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const ConfigTransitionRecord = new SchemaModel({
|
|
37
|
+
name: "ConfigTransitionRecord",
|
|
38
|
+
fields: {
|
|
39
|
+
tenantId: {
|
|
40
|
+
type: ScalarTypeEnum.ID(),
|
|
41
|
+
isOptional: false
|
|
42
|
+
},
|
|
43
|
+
appId: {
|
|
44
|
+
type: ScalarTypeEnum.ID(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
},
|
|
47
|
+
fromStatus: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: false
|
|
50
|
+
},
|
|
51
|
+
toStatus: {
|
|
52
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
53
|
+
isOptional: false
|
|
54
|
+
},
|
|
55
|
+
version: {
|
|
56
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
57
|
+
isOptional: false
|
|
58
|
+
},
|
|
59
|
+
timestamp: {
|
|
60
|
+
type: ScalarTypeEnum.DateTime(),
|
|
61
|
+
isOptional: false
|
|
62
|
+
},
|
|
63
|
+
actor: {
|
|
64
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
65
|
+
isOptional: false
|
|
66
|
+
},
|
|
67
|
+
reason: {
|
|
68
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
69
|
+
isOptional: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const CreateDraftInput = new SchemaModel({
|
|
74
|
+
name: "CreateTenantConfigDraftInput",
|
|
75
|
+
fields: {
|
|
76
|
+
tenantId: {
|
|
77
|
+
type: ScalarTypeEnum.ID(),
|
|
78
|
+
isOptional: false
|
|
79
|
+
},
|
|
80
|
+
appId: {
|
|
81
|
+
type: ScalarTypeEnum.ID(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
blueprintName: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
},
|
|
88
|
+
blueprintVersion: {
|
|
89
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
90
|
+
isOptional: false
|
|
91
|
+
},
|
|
92
|
+
environment: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: true
|
|
95
|
+
},
|
|
96
|
+
fromVersion: {
|
|
97
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
98
|
+
isOptional: true
|
|
99
|
+
},
|
|
100
|
+
createdBy: {
|
|
101
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const CreateDraftOutput = new SchemaModel({
|
|
107
|
+
name: "CreateTenantConfigDraftOutput",
|
|
108
|
+
fields: {
|
|
109
|
+
version: {
|
|
110
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
111
|
+
isOptional: false
|
|
112
|
+
},
|
|
113
|
+
status: {
|
|
114
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
115
|
+
isOptional: false
|
|
116
|
+
},
|
|
117
|
+
createdAt: {
|
|
118
|
+
type: ScalarTypeEnum.DateTime(),
|
|
119
|
+
isOptional: false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const CreateTenantConfigDraftCommand = defineCommand({
|
|
124
|
+
meta: {
|
|
125
|
+
name: "appConfig.lifecycle.createDraft",
|
|
126
|
+
version: 1,
|
|
127
|
+
description: "Creates a new draft tenant config version.",
|
|
128
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
129
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
130
|
+
stability: StabilityEnum.Experimental,
|
|
131
|
+
goal: "Allow operators to start editing a new tenant config version.",
|
|
132
|
+
context: "Invoked by the Studio or automation when starting a new configuration run."
|
|
133
|
+
},
|
|
134
|
+
io: {
|
|
135
|
+
input: CreateDraftInput,
|
|
136
|
+
output: CreateDraftOutput
|
|
137
|
+
},
|
|
138
|
+
policy: LifecyclePolicy,
|
|
139
|
+
sideEffects: { emits: [{
|
|
140
|
+
ref: ConfigDraftCreatedEvent,
|
|
141
|
+
when: "after successful draft creation"
|
|
142
|
+
}] }
|
|
143
|
+
});
|
|
144
|
+
const PromotePreviewInput = new SchemaModel({
|
|
145
|
+
name: "PromoteTenantConfigPreviewInput",
|
|
146
|
+
fields: {
|
|
147
|
+
tenantId: {
|
|
148
|
+
type: ScalarTypeEnum.ID(),
|
|
149
|
+
isOptional: false
|
|
150
|
+
},
|
|
151
|
+
appId: {
|
|
152
|
+
type: ScalarTypeEnum.ID(),
|
|
153
|
+
isOptional: false
|
|
154
|
+
},
|
|
155
|
+
version: {
|
|
156
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
157
|
+
isOptional: false
|
|
158
|
+
},
|
|
159
|
+
promotedBy: {
|
|
160
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
161
|
+
isOptional: false
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const PromotePreviewOutput = new SchemaModel({
|
|
166
|
+
name: "PromoteTenantConfigPreviewOutput",
|
|
167
|
+
fields: {
|
|
168
|
+
version: {
|
|
169
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
170
|
+
isOptional: false
|
|
171
|
+
},
|
|
172
|
+
status: {
|
|
173
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
174
|
+
isOptional: false
|
|
175
|
+
},
|
|
176
|
+
warnings: {
|
|
177
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
178
|
+
isOptional: true,
|
|
179
|
+
isArray: true
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
const PromoteTenantConfigToPreviewCommand = defineCommand({
|
|
184
|
+
meta: {
|
|
185
|
+
name: "appConfig.lifecycle.promoteToPreview",
|
|
186
|
+
version: 1,
|
|
187
|
+
description: "Promotes a draft tenant config to preview/testing state.",
|
|
188
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
189
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
190
|
+
stability: StabilityEnum.Experimental,
|
|
191
|
+
goal: "Enable validation and testing of draft configurations.",
|
|
192
|
+
context: "Called when a draft passes initial checks and should be exposed to preview environments."
|
|
193
|
+
},
|
|
194
|
+
io: {
|
|
195
|
+
input: PromotePreviewInput,
|
|
196
|
+
output: PromotePreviewOutput
|
|
197
|
+
},
|
|
198
|
+
policy: LifecyclePolicy,
|
|
199
|
+
sideEffects: { emits: [{
|
|
200
|
+
ref: ConfigPromotedToPreviewEvent,
|
|
201
|
+
when: "after promotion to preview"
|
|
202
|
+
}] }
|
|
203
|
+
});
|
|
204
|
+
const PublishConfigInput = new SchemaModel({
|
|
205
|
+
name: "PublishTenantConfigInput",
|
|
206
|
+
fields: {
|
|
207
|
+
tenantId: {
|
|
208
|
+
type: ScalarTypeEnum.ID(),
|
|
209
|
+
isOptional: false
|
|
210
|
+
},
|
|
211
|
+
appId: {
|
|
212
|
+
type: ScalarTypeEnum.ID(),
|
|
213
|
+
isOptional: false
|
|
214
|
+
},
|
|
215
|
+
version: {
|
|
216
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
217
|
+
isOptional: false
|
|
218
|
+
},
|
|
219
|
+
environment: {
|
|
220
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
221
|
+
isOptional: true
|
|
222
|
+
},
|
|
223
|
+
publishedBy: {
|
|
224
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
225
|
+
isOptional: false
|
|
226
|
+
},
|
|
227
|
+
changeSummary: {
|
|
228
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
229
|
+
isOptional: true
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
const PublishConfigOutput = new SchemaModel({
|
|
234
|
+
name: "PublishTenantConfigOutput",
|
|
235
|
+
fields: {
|
|
236
|
+
version: {
|
|
237
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
238
|
+
isOptional: false
|
|
239
|
+
},
|
|
240
|
+
status: {
|
|
241
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
242
|
+
isOptional: false
|
|
243
|
+
},
|
|
244
|
+
previousVersion: {
|
|
245
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
246
|
+
isOptional: true
|
|
247
|
+
},
|
|
248
|
+
publishedAt: {
|
|
249
|
+
type: ScalarTypeEnum.DateTime(),
|
|
250
|
+
isOptional: false
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const PublishTenantConfigCommand = defineCommand({
|
|
255
|
+
meta: {
|
|
256
|
+
name: "appConfig.lifecycle.publish",
|
|
257
|
+
version: 1,
|
|
258
|
+
description: "Publishes a preview tenant config to production.",
|
|
259
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
260
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
261
|
+
stability: StabilityEnum.Experimental,
|
|
262
|
+
goal: "Promote tested configurations to production safely.",
|
|
263
|
+
context: "Triggered after validation passes and change management approvals are complete."
|
|
264
|
+
},
|
|
265
|
+
io: {
|
|
266
|
+
input: PublishConfigInput,
|
|
267
|
+
output: PublishConfigOutput
|
|
268
|
+
},
|
|
269
|
+
policy: LifecyclePolicy,
|
|
270
|
+
sideEffects: { emits: [{
|
|
271
|
+
ref: ConfigPublishedEvent,
|
|
272
|
+
when: "after publish succeeds"
|
|
273
|
+
}] }
|
|
274
|
+
});
|
|
275
|
+
const RollbackConfigInput = new SchemaModel({
|
|
276
|
+
name: "RollbackTenantConfigInput",
|
|
277
|
+
fields: {
|
|
278
|
+
tenantId: {
|
|
279
|
+
type: ScalarTypeEnum.ID(),
|
|
280
|
+
isOptional: false
|
|
281
|
+
},
|
|
282
|
+
appId: {
|
|
283
|
+
type: ScalarTypeEnum.ID(),
|
|
284
|
+
isOptional: false
|
|
285
|
+
},
|
|
286
|
+
toVersion: {
|
|
287
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
288
|
+
isOptional: false
|
|
289
|
+
},
|
|
290
|
+
environment: {
|
|
291
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
292
|
+
isOptional: true
|
|
293
|
+
},
|
|
294
|
+
rolledBackBy: {
|
|
295
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
296
|
+
isOptional: false
|
|
297
|
+
},
|
|
298
|
+
reason: {
|
|
299
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
300
|
+
isOptional: false
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
const RollbackConfigOutput = new SchemaModel({
|
|
305
|
+
name: "RollbackTenantConfigOutput",
|
|
306
|
+
fields: {
|
|
307
|
+
newVersion: {
|
|
308
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
309
|
+
isOptional: false
|
|
310
|
+
},
|
|
311
|
+
status: {
|
|
312
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
313
|
+
isOptional: false
|
|
314
|
+
},
|
|
315
|
+
rolledBackFrom: {
|
|
316
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
317
|
+
isOptional: false
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
const RollbackTenantConfigCommand = defineCommand({
|
|
322
|
+
meta: {
|
|
323
|
+
name: "appConfig.lifecycle.rollback",
|
|
324
|
+
version: 1,
|
|
325
|
+
description: "Rolls back to a previously published tenant config version.",
|
|
326
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
327
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
328
|
+
stability: StabilityEnum.Experimental,
|
|
329
|
+
goal: "Provide rapid recovery when new configs regress production.",
|
|
330
|
+
context: "Called manually or automatically when monitoring detects regression and a rollback is required."
|
|
331
|
+
},
|
|
332
|
+
io: {
|
|
333
|
+
input: RollbackConfigInput,
|
|
334
|
+
output: RollbackConfigOutput
|
|
335
|
+
},
|
|
336
|
+
policy: LifecyclePolicy,
|
|
337
|
+
sideEffects: { emits: [{
|
|
338
|
+
ref: ConfigRolledBackEvent,
|
|
339
|
+
when: "after rollback completes"
|
|
340
|
+
}] }
|
|
341
|
+
});
|
|
342
|
+
const ListVersionsInput = new SchemaModel({
|
|
343
|
+
name: "ListTenantConfigVersionsInput",
|
|
344
|
+
fields: {
|
|
345
|
+
tenantId: {
|
|
346
|
+
type: ScalarTypeEnum.ID(),
|
|
347
|
+
isOptional: false
|
|
348
|
+
},
|
|
349
|
+
appId: {
|
|
350
|
+
type: ScalarTypeEnum.ID(),
|
|
351
|
+
isOptional: false
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
const ListVersionsOutput = new SchemaModel({
|
|
356
|
+
name: "ListTenantConfigVersionsOutput",
|
|
357
|
+
fields: {
|
|
358
|
+
versions: {
|
|
359
|
+
type: ConfigVersionRecord,
|
|
360
|
+
isOptional: false,
|
|
361
|
+
isArray: true
|
|
362
|
+
},
|
|
363
|
+
transitions: {
|
|
364
|
+
type: ConfigTransitionRecord,
|
|
365
|
+
isOptional: true,
|
|
366
|
+
isArray: true
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
const ListTenantConfigVersionsQuery = defineQuery({
|
|
371
|
+
meta: {
|
|
372
|
+
name: "appConfig.lifecycle.listVersions",
|
|
373
|
+
version: 1,
|
|
374
|
+
description: "Lists all versions of a tenant configuration.",
|
|
375
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
376
|
+
tags: ["app-config", TagsEnum.Hygiene],
|
|
377
|
+
stability: StabilityEnum.Experimental,
|
|
378
|
+
goal: "Support lifecycle views and change audit tooling.",
|
|
379
|
+
context: "Used by the Studio to render history timelines and by automation for change tracking."
|
|
380
|
+
},
|
|
381
|
+
io: {
|
|
382
|
+
input: ListVersionsInput,
|
|
383
|
+
output: ListVersionsOutput
|
|
384
|
+
},
|
|
385
|
+
policy: LifecycleReadPolicy
|
|
386
|
+
});
|
|
387
|
+
const GetVersionInput = new SchemaModel({
|
|
388
|
+
name: "GetTenantConfigVersionInput",
|
|
389
|
+
fields: {
|
|
390
|
+
tenantId: {
|
|
391
|
+
type: ScalarTypeEnum.ID(),
|
|
392
|
+
isOptional: false
|
|
393
|
+
},
|
|
394
|
+
appId: {
|
|
395
|
+
type: ScalarTypeEnum.ID(),
|
|
396
|
+
isOptional: false
|
|
397
|
+
},
|
|
398
|
+
version: {
|
|
399
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
400
|
+
isOptional: false
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
const GetVersionOutput = new SchemaModel({
|
|
405
|
+
name: "GetTenantConfigVersionOutput",
|
|
406
|
+
fields: { version: {
|
|
407
|
+
type: ConfigVersionRecord,
|
|
408
|
+
isOptional: false
|
|
409
|
+
} }
|
|
410
|
+
});
|
|
411
|
+
const GetTenantConfigVersionQuery = defineQuery({
|
|
412
|
+
meta: {
|
|
413
|
+
name: "appConfig.lifecycle.getVersion",
|
|
414
|
+
version: 1,
|
|
415
|
+
description: "Fetches a single tenant config version by id.",
|
|
416
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
417
|
+
tags: ["app-config", TagsEnum.Hygiene],
|
|
418
|
+
stability: StabilityEnum.Experimental,
|
|
419
|
+
goal: "Allow detail drill-down for lifecycle entries.",
|
|
420
|
+
context: "Used by automation to fetch config payloads for comparison or export."
|
|
421
|
+
},
|
|
422
|
+
io: {
|
|
423
|
+
input: GetVersionInput,
|
|
424
|
+
output: GetVersionOutput
|
|
425
|
+
},
|
|
426
|
+
policy: LifecycleReadPolicy
|
|
427
|
+
});
|
|
428
|
+
const lifecycleContracts = {
|
|
429
|
+
CreateTenantConfigDraftCommand,
|
|
430
|
+
PromoteTenantConfigToPreviewCommand,
|
|
431
|
+
PublishTenantConfigCommand,
|
|
432
|
+
RollbackTenantConfigCommand,
|
|
433
|
+
ListTenantConfigVersionsQuery,
|
|
434
|
+
GetTenantConfigVersionQuery
|
|
435
|
+
};
|
|
436
|
+
function registerAppConfigLifecycleContracts(registry) {
|
|
437
|
+
return registry.register(CreateTenantConfigDraftCommand).register(PromoteTenantConfigToPreviewCommand).register(PublishTenantConfigCommand).register(RollbackTenantConfigCommand).register(ListTenantConfigVersionsQuery).register(GetTenantConfigVersionQuery);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
//#endregion
|
|
441
|
+
export { CreateTenantConfigDraftCommand, GetTenantConfigVersionQuery, ListTenantConfigVersionsQuery, PromoteTenantConfigToPreviewCommand, PublishTenantConfigCommand, RollbackTenantConfigCommand, lifecycleContracts, registerAppConfigLifecycleContracts };
|