@contractspec/lib.contracts 1.51.0 → 1.53.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.
Files changed (122) hide show
  1. package/dist/app-config/{contracts.d.ts → app-config.contracts.d.ts} +51 -51
  2. package/dist/app-config/{contracts.js → app-config.contracts.js} +1 -1
  3. package/dist/app-config/events.d.ts +27 -27
  4. package/dist/app-config/lifecycle-contracts.d.ts +54 -54
  5. package/dist/app-config/runtime.d.ts +4 -4
  6. package/dist/app-config/spec.d.ts +3 -3
  7. package/dist/capabilities/guards.d.ts +1 -1
  8. package/dist/capabilities/validation.d.ts +1 -1
  9. package/dist/data-views/data-views.d.ts +1 -1
  10. package/dist/data-views/index.d.ts +1 -1
  11. package/dist/data-views/registry.d.ts +1 -1
  12. package/dist/data-views/report/contractVerificationTable.d.ts +10 -0
  13. package/dist/data-views/report/contractVerificationTable.js +95 -0
  14. package/dist/data-views/runtime.d.ts +2 -2
  15. package/dist/data-views/spec.d.ts +1 -1
  16. package/dist/data-views/types.d.ts +1 -1
  17. package/dist/docs/capabilities/documentationSystem.capability.d.ts +7 -0
  18. package/dist/docs/capabilities/documentationSystem.capability.js +71 -0
  19. package/dist/docs/capabilities/index.d.ts +2 -0
  20. package/dist/docs/capabilities/index.js +3 -0
  21. package/dist/docs/commands/docsGenerate.command.d.ts +95 -0
  22. package/dist/docs/commands/docsGenerate.command.js +142 -0
  23. package/dist/docs/commands/docsPublish.command.d.ts +64 -0
  24. package/dist/docs/commands/docsPublish.command.js +107 -0
  25. package/dist/docs/commands/index.d.ts +3 -0
  26. package/dist/docs/commands/index.js +4 -0
  27. package/dist/docs/constants.d.ts +7 -0
  28. package/dist/docs/constants.js +10 -0
  29. package/dist/docs/contracts.d.ts +442 -0
  30. package/dist/docs/contracts.js +58 -0
  31. package/dist/docs/ensure-docblocks.d.ts +1 -0
  32. package/dist/docs/ensure-docblocks.js +1 -0
  33. package/dist/docs/events/docsGenerated.event.d.ts +62 -0
  34. package/dist/docs/events/docsGenerated.event.js +53 -0
  35. package/dist/docs/events/docsPublished.event.d.ts +70 -0
  36. package/dist/docs/events/docsPublished.event.js +57 -0
  37. package/dist/docs/events/index.d.ts +3 -0
  38. package/dist/docs/events/index.js +4 -0
  39. package/dist/docs/forms/docsSearch.form.d.ts +22 -0
  40. package/dist/docs/forms/docsSearch.form.js +113 -0
  41. package/dist/docs/forms/index.d.ts +2 -0
  42. package/dist/docs/forms/index.js +3 -0
  43. package/dist/docs/index.d.ts +23 -1
  44. package/dist/docs/index.js +25 -1
  45. package/dist/docs/presentations/docsLayout.presentation.d.ts +7 -0
  46. package/dist/docs/presentations/docsLayout.presentation.js +35 -0
  47. package/dist/docs/presentations/docsReferencePage.presentation.d.ts +7 -0
  48. package/dist/docs/presentations/docsReferencePage.presentation.js +35 -0
  49. package/dist/docs/presentations/index.d.ts +3 -0
  50. package/dist/docs/presentations/index.js +4 -0
  51. package/dist/docs/queries/contractReference.query.d.ts +217 -0
  52. package/dist/docs/queries/contractReference.query.js +125 -0
  53. package/dist/docs/queries/docsIndex.query.d.ts +272 -0
  54. package/dist/docs/queries/docsIndex.query.js +133 -0
  55. package/dist/docs/queries/index.d.ts +3 -0
  56. package/dist/docs/queries/index.js +4 -0
  57. package/dist/docs/tech/cli.docblock.js +10 -0
  58. package/dist/docs/tech/docs-system.docblock.d.ts +1 -0
  59. package/dist/docs/tech/docs-system.docblock.js +128 -0
  60. package/dist/docs/tech/report-verification-table.docblock.d.ts +1 -0
  61. package/dist/docs/tech/report-verification-table.docblock.js +50 -0
  62. package/dist/docs/views/contractReference.dataView.d.ts +7 -0
  63. package/dist/docs/views/contractReference.dataView.js +80 -0
  64. package/dist/docs/views/docsIndex.dataView.d.ts +7 -0
  65. package/dist/docs/views/docsIndex.dataView.js +136 -0
  66. package/dist/docs/views/exampleCatalog.dataView.d.ts +7 -0
  67. package/dist/docs/views/exampleCatalog.dataView.js +91 -0
  68. package/dist/docs/views/index.d.ts +4 -0
  69. package/dist/docs/views/index.js +5 -0
  70. package/dist/events.d.ts +1 -1
  71. package/dist/examples/schema.d.ts +7 -7
  72. package/dist/examples/types.d.ts +1 -1
  73. package/dist/experiments/spec.d.ts +2 -2
  74. package/dist/features/install.d.ts +1 -1
  75. package/dist/features/types.d.ts +3 -3
  76. package/dist/forms/forms.d.ts +1 -1
  77. package/dist/index.d.ts +40 -22
  78. package/dist/index.js +20 -2
  79. package/dist/install.d.ts +1 -1
  80. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  81. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  82. package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
  83. package/dist/integrations/openbanking/models.d.ts +55 -55
  84. package/dist/integrations/operations.d.ts +102 -102
  85. package/dist/integrations/spec.d.ts +2 -2
  86. package/dist/jsonschema.d.ts +1 -1
  87. package/dist/knowledge/operations.d.ts +66 -66
  88. package/dist/knowledge/spec.d.ts +1 -1
  89. package/dist/llm/exporters.d.ts +3 -3
  90. package/dist/llm/types.d.ts +1 -1
  91. package/dist/markdown.d.ts +1 -1
  92. package/dist/onboarding-base.d.ts +29 -29
  93. package/dist/operations/index.d.ts +4 -1
  94. package/dist/operations/index.js +4 -1
  95. package/dist/operations/operation.d.ts +3 -3
  96. package/dist/operations/registry.d.ts +1 -1
  97. package/dist/operations/report/getContractVerificationStatus.d.ts +75 -0
  98. package/dist/operations/report/getContractVerificationStatus.js +96 -0
  99. package/dist/operations/report/index.d.ts +13 -0
  100. package/dist/operations/report/index.js +45 -0
  101. package/dist/policy/validation.d.ts +1 -1
  102. package/dist/presentations/registry.d.ts +1 -1
  103. package/dist/registry.d.ts +1 -1
  104. package/dist/serialization/serializers.d.ts +3 -3
  105. package/dist/server/rest-elysia.d.ts +1 -1
  106. package/dist/server/rest-express.d.ts +1 -1
  107. package/dist/server/rest-generic.d.ts +1 -1
  108. package/dist/server/rest-next-app.d.ts +1 -1
  109. package/dist/server/rest-next-mcp.d.ts +1 -1
  110. package/dist/server/rest-next-pages.d.ts +1 -1
  111. package/dist/telemetry/spec.d.ts +1 -1
  112. package/dist/telemetry/tracker.d.ts +3 -2
  113. package/dist/tests/runner.d.ts +1 -1
  114. package/dist/themes.d.ts +1 -1
  115. package/dist/types.d.ts +2 -2
  116. package/dist/workflow/spec.d.ts +2 -2
  117. package/dist/workflow/validation.d.ts +2 -2
  118. package/dist/workspace-config/contractsrc-schema.d.ts +3 -3
  119. package/dist/workspace-config/contractsrc-schema.js +1 -0
  120. package/dist/workspace-config/contractsrc-types.d.ts +7 -8
  121. package/dist/workspace-config/index.d.ts +2 -2
  122. package/package.json +35 -8
@@ -0,0 +1,95 @@
1
+ import { OperationSpec } from "../../operations/operation.js";
2
+ import { EventSpecMeta } from "../../events.js";
3
+ import "../../index.js";
4
+ import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
5
+ import { SchemaModel } from "@contractspec/lib.schema";
6
+
7
+ //#region src/docs/commands/docsGenerate.command.d.ts
8
+ declare const DocsGenerateCommand: OperationSpec<SchemaModel<{
9
+ workspaceRoot: {
10
+ type: _contractspec_lib_schema0.FieldType<string, string>;
11
+ isOptional: true;
12
+ };
13
+ outputDir: {
14
+ type: _contractspec_lib_schema0.FieldType<string, string>;
15
+ isOptional: true;
16
+ };
17
+ version: {
18
+ type: _contractspec_lib_schema0.FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ formats: {
22
+ type: _contractspec_lib_schema0.FieldType<string, string>;
23
+ isOptional: true;
24
+ isArray: true;
25
+ };
26
+ includeInternal: {
27
+ type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
28
+ isOptional: true;
29
+ };
30
+ includeExperimental: {
31
+ type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
32
+ isOptional: true;
33
+ };
34
+ contractFilter: {
35
+ type: _contractspec_lib_schema0.FieldType<string, string>;
36
+ isOptional: true;
37
+ };
38
+ docblockFilter: {
39
+ type: _contractspec_lib_schema0.FieldType<string, string>;
40
+ isOptional: true;
41
+ };
42
+ dryRun: {
43
+ type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
44
+ isOptional: true;
45
+ };
46
+ }>, SchemaModel<{
47
+ buildId: {
48
+ type: _contractspec_lib_schema0.FieldType<string, string>;
49
+ isOptional: false;
50
+ };
51
+ version: {
52
+ type: _contractspec_lib_schema0.FieldType<string, string>;
53
+ isOptional: true;
54
+ };
55
+ generatedAt: {
56
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
57
+ isOptional: false;
58
+ };
59
+ outputDir: {
60
+ type: _contractspec_lib_schema0.FieldType<string, string>;
61
+ isOptional: true;
62
+ };
63
+ artifacts: {
64
+ type: SchemaModel<{
65
+ path: {
66
+ type: _contractspec_lib_schema0.FieldType<string, string>;
67
+ isOptional: false;
68
+ };
69
+ format: {
70
+ type: _contractspec_lib_schema0.FieldType<string, string>;
71
+ isOptional: true;
72
+ };
73
+ bytes: {
74
+ type: _contractspec_lib_schema0.FieldType<number, number>;
75
+ isOptional: true;
76
+ };
77
+ kind: {
78
+ type: _contractspec_lib_schema0.FieldType<string, string>;
79
+ isOptional: true;
80
+ };
81
+ }>;
82
+ isOptional: true;
83
+ isArray: true;
84
+ };
85
+ warnings: {
86
+ type: _contractspec_lib_schema0.FieldType<string, string>;
87
+ isOptional: true;
88
+ isArray: true;
89
+ };
90
+ }>, {
91
+ ref: EventSpecMeta;
92
+ when: string;
93
+ }[]>;
94
+ //#endregion
95
+ export { DocsGenerateCommand };
@@ -0,0 +1,142 @@
1
+ import { defineCommand } from "../../operations/operation.js";
2
+ import "../../operations/index.js";
3
+ import { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS } from "../constants.js";
4
+ import { docId } from "../registry.js";
5
+ import "../ensure-docblocks.js";
6
+ import { DocsGeneratedEvent } from "../events/docsGenerated.event.js";
7
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
8
+
9
+ //#region src/docs/commands/docsGenerate.command.ts
10
+ const DocsArtifactModel = new SchemaModel({
11
+ name: "DocsArtifact",
12
+ fields: {
13
+ path: {
14
+ type: ScalarTypeEnum.String_unsecure(),
15
+ isOptional: false
16
+ },
17
+ format: {
18
+ type: ScalarTypeEnum.String_unsecure(),
19
+ isOptional: true
20
+ },
21
+ bytes: {
22
+ type: ScalarTypeEnum.Int_unsecure(),
23
+ isOptional: true
24
+ },
25
+ kind: {
26
+ type: ScalarTypeEnum.String_unsecure(),
27
+ isOptional: true
28
+ }
29
+ }
30
+ });
31
+ const DocsGenerateInput = new SchemaModel({
32
+ name: "DocsGenerateInput",
33
+ fields: {
34
+ workspaceRoot: {
35
+ type: ScalarTypeEnum.String_unsecure(),
36
+ isOptional: true
37
+ },
38
+ outputDir: {
39
+ type: ScalarTypeEnum.String_unsecure(),
40
+ isOptional: true
41
+ },
42
+ version: {
43
+ type: ScalarTypeEnum.String_unsecure(),
44
+ isOptional: true
45
+ },
46
+ formats: {
47
+ type: ScalarTypeEnum.String_unsecure(),
48
+ isOptional: true,
49
+ isArray: true
50
+ },
51
+ includeInternal: {
52
+ type: ScalarTypeEnum.Boolean(),
53
+ isOptional: true
54
+ },
55
+ includeExperimental: {
56
+ type: ScalarTypeEnum.Boolean(),
57
+ isOptional: true
58
+ },
59
+ contractFilter: {
60
+ type: ScalarTypeEnum.String_unsecure(),
61
+ isOptional: true
62
+ },
63
+ docblockFilter: {
64
+ type: ScalarTypeEnum.String_unsecure(),
65
+ isOptional: true
66
+ },
67
+ dryRun: {
68
+ type: ScalarTypeEnum.Boolean(),
69
+ isOptional: true
70
+ }
71
+ }
72
+ });
73
+ const DocsGenerateOutput = new SchemaModel({
74
+ name: "DocsGenerateOutput",
75
+ fields: {
76
+ buildId: {
77
+ type: ScalarTypeEnum.String_unsecure(),
78
+ isOptional: false
79
+ },
80
+ version: {
81
+ type: ScalarTypeEnum.String_unsecure(),
82
+ isOptional: true
83
+ },
84
+ generatedAt: {
85
+ type: ScalarTypeEnum.DateTime(),
86
+ isOptional: false
87
+ },
88
+ outputDir: {
89
+ type: ScalarTypeEnum.String_unsecure(),
90
+ isOptional: true
91
+ },
92
+ artifacts: {
93
+ type: DocsArtifactModel,
94
+ isOptional: true,
95
+ isArray: true
96
+ },
97
+ warnings: {
98
+ type: ScalarTypeEnum.String_unsecure(),
99
+ isOptional: true,
100
+ isArray: true
101
+ }
102
+ }
103
+ });
104
+ const DocsGenerateCommand = defineCommand({
105
+ meta: {
106
+ key: "docs.generate",
107
+ title: "Generate Documentation",
108
+ version: "1.0.0",
109
+ description: "Generate documentation artifacts from ContractSpecs.",
110
+ goal: "Produce up-to-date reference docs and guides from specs and DocBlocks.",
111
+ context: "Used by CLI and CI to keep docs in sync with contract definitions.",
112
+ domain: DOCS_DOMAIN,
113
+ owners: DOCS_OWNERS,
114
+ tags: [...DOCS_TAGS, "generation"],
115
+ stability: DOCS_STABILITY,
116
+ docId: [docId("docs.tech.docs-generator")]
117
+ },
118
+ capability: {
119
+ key: "docs.system",
120
+ version: "1.0.0"
121
+ },
122
+ io: {
123
+ input: DocsGenerateInput,
124
+ output: DocsGenerateOutput,
125
+ errors: { OUTPUT_WRITE_FAILED: {
126
+ description: "Failed to write generated docs output.",
127
+ http: 500,
128
+ when: "The generator cannot persist artifacts to the output path."
129
+ } }
130
+ },
131
+ policy: {
132
+ auth: "admin",
133
+ pii: []
134
+ },
135
+ sideEffects: { emits: [{
136
+ ref: DocsGeneratedEvent.meta,
137
+ when: "Docs generation completes successfully."
138
+ }] }
139
+ });
140
+
141
+ //#endregion
142
+ export { DocsGenerateCommand };
@@ -0,0 +1,64 @@
1
+ import { OperationSpec } from "../../operations/operation.js";
2
+ import { EventSpecMeta } from "../../events.js";
3
+ import "../../index.js";
4
+ import * as _contractspec_lib_schema17 from "@contractspec/lib.schema";
5
+ import { SchemaModel } from "@contractspec/lib.schema";
6
+
7
+ //#region src/docs/commands/docsPublish.command.d.ts
8
+ declare const DocsPublishCommand: OperationSpec<SchemaModel<{
9
+ buildId: {
10
+ type: _contractspec_lib_schema17.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ version: {
14
+ type: _contractspec_lib_schema17.FieldType<string, string>;
15
+ isOptional: true;
16
+ };
17
+ environment: {
18
+ type: _contractspec_lib_schema17.FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ deployTarget: {
22
+ type: _contractspec_lib_schema17.FieldType<string, string>;
23
+ isOptional: true;
24
+ };
25
+ artifactPath: {
26
+ type: _contractspec_lib_schema17.FieldType<string, string>;
27
+ isOptional: true;
28
+ };
29
+ dryRun: {
30
+ type: _contractspec_lib_schema17.FieldType<boolean, boolean>;
31
+ isOptional: true;
32
+ };
33
+ notes: {
34
+ type: _contractspec_lib_schema17.FieldType<string, string>;
35
+ isOptional: true;
36
+ };
37
+ }>, SchemaModel<{
38
+ publishId: {
39
+ type: _contractspec_lib_schema17.FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ publishedAt: {
43
+ type: _contractspec_lib_schema17.FieldType<Date, string>;
44
+ isOptional: false;
45
+ };
46
+ url: {
47
+ type: _contractspec_lib_schema17.FieldType<string, string>;
48
+ isOptional: true;
49
+ };
50
+ status: {
51
+ type: _contractspec_lib_schema17.FieldType<string, string>;
52
+ isOptional: true;
53
+ };
54
+ warnings: {
55
+ type: _contractspec_lib_schema17.FieldType<string, string>;
56
+ isOptional: true;
57
+ isArray: true;
58
+ };
59
+ }>, {
60
+ ref: EventSpecMeta;
61
+ when: string;
62
+ }[]>;
63
+ //#endregion
64
+ export { DocsPublishCommand };
@@ -0,0 +1,107 @@
1
+ import { defineCommand } from "../../operations/operation.js";
2
+ import "../../operations/index.js";
3
+ import { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS } from "../constants.js";
4
+ import { docId } from "../registry.js";
5
+ import "../ensure-docblocks.js";
6
+ import { DocsPublishedEvent } from "../events/docsPublished.event.js";
7
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
8
+
9
+ //#region src/docs/commands/docsPublish.command.ts
10
+ const DocsPublishInput = new SchemaModel({
11
+ name: "DocsPublishInput",
12
+ fields: {
13
+ buildId: {
14
+ type: ScalarTypeEnum.String_unsecure(),
15
+ isOptional: false
16
+ },
17
+ version: {
18
+ type: ScalarTypeEnum.String_unsecure(),
19
+ isOptional: true
20
+ },
21
+ environment: {
22
+ type: ScalarTypeEnum.String_unsecure(),
23
+ isOptional: true
24
+ },
25
+ deployTarget: {
26
+ type: ScalarTypeEnum.String_unsecure(),
27
+ isOptional: true
28
+ },
29
+ artifactPath: {
30
+ type: ScalarTypeEnum.String_unsecure(),
31
+ isOptional: true
32
+ },
33
+ dryRun: {
34
+ type: ScalarTypeEnum.Boolean(),
35
+ isOptional: true
36
+ },
37
+ notes: {
38
+ type: ScalarTypeEnum.String_unsecure(),
39
+ isOptional: true
40
+ }
41
+ }
42
+ });
43
+ const DocsPublishOutput = new SchemaModel({
44
+ name: "DocsPublishOutput",
45
+ fields: {
46
+ publishId: {
47
+ type: ScalarTypeEnum.String_unsecure(),
48
+ isOptional: false
49
+ },
50
+ publishedAt: {
51
+ type: ScalarTypeEnum.DateTime(),
52
+ isOptional: false
53
+ },
54
+ url: {
55
+ type: ScalarTypeEnum.String_unsecure(),
56
+ isOptional: true
57
+ },
58
+ status: {
59
+ type: ScalarTypeEnum.String_unsecure(),
60
+ isOptional: true
61
+ },
62
+ warnings: {
63
+ type: ScalarTypeEnum.String_unsecure(),
64
+ isOptional: true,
65
+ isArray: true
66
+ }
67
+ }
68
+ });
69
+ const DocsPublishCommand = defineCommand({
70
+ meta: {
71
+ key: "docs.publish",
72
+ title: "Publish Documentation",
73
+ version: "1.0.0",
74
+ description: "Publish generated documentation artifacts.",
75
+ goal: "Deploy docs to the public docs surface with consistent versioning.",
76
+ context: "Used by release pipelines to push generated docs to hosting targets.",
77
+ domain: DOCS_DOMAIN,
78
+ owners: DOCS_OWNERS,
79
+ tags: [...DOCS_TAGS, "publish"],
80
+ stability: DOCS_STABILITY,
81
+ docId: [docId("docs.tech.docs-publish")]
82
+ },
83
+ capability: {
84
+ key: "docs.system",
85
+ version: "1.0.0"
86
+ },
87
+ io: {
88
+ input: DocsPublishInput,
89
+ output: DocsPublishOutput,
90
+ errors: { DEPLOY_FAILED: {
91
+ description: "Failed to deploy documentation artifacts.",
92
+ http: 500,
93
+ when: "The docs publish step fails to deploy to the target host."
94
+ } }
95
+ },
96
+ policy: {
97
+ auth: "admin",
98
+ pii: []
99
+ },
100
+ sideEffects: { emits: [{
101
+ ref: DocsPublishedEvent.meta,
102
+ when: "Docs publish completes successfully."
103
+ }] }
104
+ });
105
+
106
+ //#endregion
107
+ export { DocsPublishCommand };
@@ -0,0 +1,3 @@
1
+ import { DocsGenerateCommand } from "./docsGenerate.command.js";
2
+ import { DocsPublishCommand } from "./docsPublish.command.js";
3
+ export { DocsGenerateCommand, DocsPublishCommand };
@@ -0,0 +1,4 @@
1
+ import { DocsGenerateCommand } from "./docsGenerate.command.js";
2
+ import { DocsPublishCommand } from "./docsPublish.command.js";
3
+
4
+ export { DocsGenerateCommand, DocsPublishCommand };
@@ -0,0 +1,7 @@
1
+ //#region src/docs/constants.d.ts
2
+ declare const DOCS_DOMAIN = "docs";
3
+ declare const DOCS_OWNERS: string[];
4
+ declare const DOCS_TAGS: string[];
5
+ declare const DOCS_STABILITY: "experimental";
6
+ //#endregion
7
+ export { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS };
@@ -0,0 +1,10 @@
1
+ import { StabilityEnum } from "../ownership.js";
2
+
3
+ //#region src/docs/constants.ts
4
+ const DOCS_DOMAIN = "docs";
5
+ const DOCS_OWNERS = ["docs-platform"];
6
+ const DOCS_TAGS = ["docs", "documentation"];
7
+ const DOCS_STABILITY = StabilityEnum.Experimental;
8
+
9
+ //#endregion
10
+ export { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS };