@botpress/cli 4.17.13 → 4.17.15
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/.turbo/turbo-build.log +16 -12
- package/bin.js +1 -1
- package/dist/api/bot-body.d.ts +5 -0
- package/dist/api/client.d.ts +50 -0
- package/dist/api/client.js +2 -1
- package/dist/api/client.js.map +1 -1
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.js +9 -0
- package/dist/api/integration-body.d.ts +5 -0
- package/dist/api/interface-body.d.ts +7 -0
- package/dist/api/paging.d.ts +9 -0
- package/dist/api/plugin-body.d.ts +5 -0
- package/dist/api/retry.d.ts +2 -0
- package/dist/api/types.d.ts +62 -0
- package/dist/chat/index.d.ts +25 -0
- package/dist/chat/index.js +1 -1
- package/dist/chat/index.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +7 -0
- package/dist/code-generation/bot-implementation/bot-implementation.d.ts +8 -0
- package/dist/code-generation/bot-implementation/bot-implementation.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-plugins/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-plugins/index.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.d.ts +13 -0
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/events-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/events-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-typings/index.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/states-module.d.ts +17 -0
- package/dist/code-generation/bot-implementation/bot-typings/states-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/tables-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/bot-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/bot-implementation/bot-typings/workflows-module.js.map +1 -1
- package/dist/code-generation/bot-implementation/index.d.ts +3 -0
- package/dist/code-generation/bot-implementation/index.js.map +1 -1
- package/dist/code-generation/consts.d.ts +5 -0
- package/dist/code-generation/consts.js +2 -1
- package/dist/code-generation/generators.d.ts +10 -0
- package/dist/code-generation/generators.js.map +1 -1
- package/dist/code-generation/index.d.ts +8 -0
- package/dist/code-generation/index.js +2 -1
- package/dist/code-generation/integration-implementation/index.d.ts +3 -0
- package/dist/code-generation/integration-implementation/index.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-implementation.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-implementation.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-secret.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-secret.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/events-module.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-typings/index.js.map +1 -1
- package/dist/code-generation/integration-implementation/integration-typings/states-module.d.ts +17 -0
- package/dist/code-generation/integration-implementation/integration-typings/states-module.js.map +1 -1
- package/dist/code-generation/integration-package/index.d.ts +2 -0
- package/dist/code-generation/integration-package/index.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/events-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/index.d.ts +8 -0
- package/dist/code-generation/integration-package/integration-package-definition/index.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/interfaces-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/interfaces-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/states-module.js.map +1 -1
- package/dist/code-generation/integration-package/integration-package-definition/typings.d.ts +10 -0
- package/dist/code-generation/interface-implementation/index.d.ts +4 -0
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.js.map +1 -1
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.js.map +1 -1
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.js.map +1 -1
- package/dist/code-generation/interface-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/events-module.js.map +1 -1
- package/dist/code-generation/interface-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/interface-implementation/integration-typings/index.js.map +1 -1
- package/dist/code-generation/interface-package/index.d.ts +2 -0
- package/dist/code-generation/interface-package/index.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/events-module.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/index.d.ts +8 -0
- package/dist/code-generation/interface-package/interface-package-definition/index.js.map +1 -1
- package/dist/code-generation/interface-package/interface-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/module.d.ts +49 -0
- package/dist/code-generation/module.js +2 -2
- package/dist/code-generation/module.js.map +2 -2
- package/dist/code-generation/plugin-implementation/index.d.ts +3 -0
- package/dist/code-generation/plugin-implementation/index.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-implementation.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-implementation.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/index.d.ts +8 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.d.ts +17 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/tables-module.js.map +1 -1
- package/dist/code-generation/plugin-implementation/plugin-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/workflows-module.js.map +1 -1
- package/dist/code-generation/plugin-package/index.d.ts +2 -0
- package/dist/code-generation/plugin-package/index.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/index.d.ts +8 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/index.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/interfaces-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/interfaces-module.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/recurring-events-module.d.ts +5 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/recurring-events-module.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.js.map +1 -1
- package/dist/code-generation/plugin-package/plugin-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/strings.d.ts +4 -0
- package/dist/code-generation/strings.js.map +1 -1
- package/dist/code-generation/typings.d.ts +162 -0
- package/dist/code-generation/typings.test.d.ts +1 -0
- package/dist/command-definitions.d.ts +1480 -0
- package/dist/command-definitions.js +0 -2
- package/dist/command-implementations/add-command.d.ts +15 -0
- package/dist/command-implementations/add-command.js.map +1 -1
- package/dist/command-implementations/base-command.d.ts +13 -0
- package/dist/command-implementations/base-command.js.map +1 -1
- package/dist/command-implementations/bot-commands.d.ts +20 -0
- package/dist/command-implementations/bot-commands.js.map +1 -1
- package/dist/command-implementations/build-command.d.ts +9 -0
- package/dist/command-implementations/build-command.js +4 -4
- package/dist/command-implementations/build-command.js.map +2 -2
- package/dist/command-implementations/bundle-command.d.ts +10 -0
- package/dist/command-implementations/bundle-command.js +8 -7
- package/dist/command-implementations/bundle-command.js.map +2 -2
- package/dist/command-implementations/chat-command.d.ts +13 -0
- package/dist/command-implementations/chat-command.js.map +1 -1
- package/dist/command-implementations/deploy-command.d.ts +18 -0
- package/dist/command-implementations/deploy-command.js +1 -2
- package/dist/command-implementations/deploy-command.js.map +1 -1
- package/dist/command-implementations/dev-command.d.ts +21 -0
- package/dist/command-implementations/dev-command.js +6 -1
- package/dist/command-implementations/dev-command.js.map +2 -2
- package/dist/command-implementations/gen-command.d.ts +11 -0
- package/dist/command-implementations/gen-command.js.map +1 -1
- package/dist/command-implementations/global-command.d.ts +57 -0
- package/dist/command-implementations/global-command.js.map +1 -1
- package/dist/command-implementations/index.d.ts +1534 -0
- package/dist/command-implementations/index.js +0 -2
- package/dist/command-implementations/init-command.d.ts +17 -0
- package/dist/command-implementations/init-command.js.map +1 -1
- package/dist/command-implementations/integration-commands.d.ts +15 -0
- package/dist/command-implementations/integration-commands.js.map +1 -1
- package/dist/command-implementations/interface-commands.d.ts +14 -0
- package/dist/command-implementations/interface-commands.js.map +1 -1
- package/dist/command-implementations/lint-command.d.ts +15 -0
- package/dist/command-implementations/login-command.d.ts +6 -0
- package/dist/command-implementations/login-command.js +1 -2
- package/dist/command-implementations/login-command.js.map +1 -1
- package/dist/command-implementations/logout-command.d.ts +6 -0
- package/dist/command-implementations/plugin-commands.d.ts +14 -0
- package/dist/command-implementations/plugin-commands.js.map +1 -1
- package/dist/command-implementations/profile-commands.d.ts +14 -0
- package/dist/command-implementations/profile-commands.js +1 -2
- package/dist/command-implementations/profile-commands.js.map +1 -1
- package/dist/command-implementations/project-command.d.ts +67 -0
- package/dist/command-implementations/project-command.js.map +1 -1
- package/dist/command-implementations/read-command.d.ts +10 -0
- package/dist/command-implementations/serve-command.d.ts +6 -0
- package/dist/command-implementations/serve-command.js.map +1 -1
- package/dist/command-tree.d.ts +39 -0
- package/dist/config.d.ts +1441 -0
- package/dist/consts.d.ts +41 -0
- package/dist/errors.d.ts +56 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1524 -0
- package/dist/index.js +50 -25
- package/dist/index.js.map +3 -3
- package/dist/init.d.ts +1 -0
- package/dist/linter/base-linter.d.ts +21 -0
- package/dist/linter/base-linter.js.map +1 -1
- package/dist/linter/base-linter.test.d.ts +1 -0
- package/dist/linter/base-linter.test.js +4 -4
- package/dist/linter/base-linter.test.js.map +1 -1
- package/dist/linter/bot-linter.d.ts +5 -0
- package/dist/linter/integration-linter.d.ts +7 -0
- package/dist/linter/interface-linter.d.ts +5 -0
- package/dist/linter/ruleset-tests/bot.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/common.d.ts +9 -0
- package/dist/linter/ruleset-tests/integration.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/interface.ruleset.test.d.ts +1 -0
- package/dist/linter/rulesets/bot.ruleset.d.ts +165 -0
- package/dist/linter/rulesets/bot.ruleset.js.map +1 -1
- package/dist/linter/rulesets/integration.ruleset.d.ts +390 -0
- package/dist/linter/rulesets/integration.ruleset.js.map +1 -1
- package/dist/linter/rulesets/interface.ruleset.d.ts +141 -0
- package/dist/linter/rulesets/interface.ruleset.js.map +1 -1
- package/dist/linter/spectral-functions.d.ts +11 -0
- package/dist/logger/base-logger.d.ts +43 -0
- package/dist/logger/base-logger.js.map +1 -1
- package/dist/logger/index.d.ts +22 -0
- package/dist/logger/index.js.map +1 -1
- package/dist/logger/logger.test.d.ts +1 -0
- package/dist/package-ref.d.ts +22 -0
- package/dist/package-ref.js.map +1 -1
- package/dist/package-ref.test.d.ts +1 -0
- package/dist/package-ref.test.js.map +1 -1
- package/dist/project-templates.d.ts +42 -0
- package/dist/register-yargs.d.ts +4 -0
- package/dist/register-yargs.js.map +1 -1
- package/dist/root.d.ts +7 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +5 -0
- package/dist/sdk/validate-bot.d.ts +2 -0
- package/dist/sdk/validate-bot.js.map +1 -1
- package/dist/sdk/validate-bot.test.d.ts +1 -0
- package/dist/sdk/validate-integration.d.ts +2 -0
- package/dist/sdk/validate-integration.js.map +1 -1
- package/dist/tables/index.d.ts +1 -0
- package/dist/tables/schemas.d.ts +1259 -0
- package/dist/tables/tables-publisher.d.ts +22 -0
- package/dist/tables/tables-publisher.js.map +1 -1
- package/dist/typings.d.ts +27 -0
- package/dist/utils/attribute-utils.d.ts +10 -0
- package/dist/utils/cache-utils.d.ts +14 -0
- package/dist/utils/case-utils.d.ts +14 -0
- package/dist/utils/case-utils.test.d.ts +1 -0
- package/dist/utils/case-utils.test.js.map +1 -1
- package/dist/utils/concurrency-utils.d.ts +1 -0
- package/dist/utils/concurrency-utils.test.d.ts +1 -0
- package/dist/utils/esbuild-utils.d.ts +29 -0
- package/dist/utils/esbuild-utils.js +32 -1
- package/dist/utils/esbuild-utils.js.map +3 -3
- package/dist/utils/event-emitter.d.ts +7 -0
- package/dist/utils/file-watcher.d.ts +17 -0
- package/dist/utils/file-watcher.js.map +1 -1
- package/dist/utils/guard-utils.d.ts +4 -0
- package/dist/utils/id-utils.d.ts +2 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/object-utils.d.ts +1 -0
- package/dist/utils/path-utils.d.ts +28 -0
- package/dist/utils/path-utils.test.d.ts +1 -0
- package/dist/utils/pkgjson-utils.d.ts +17 -0
- package/dist/utils/promise-utils.d.ts +2 -0
- package/dist/utils/promise-utils.test.d.ts +1 -0
- package/dist/utils/prompt-utils.d.ts +33 -0
- package/dist/utils/prompt-utils.js.map +1 -1
- package/dist/utils/record-utils.d.ts +8 -0
- package/dist/utils/record-utils.test.d.ts +1 -0
- package/dist/utils/require-utils.d.ts +2 -0
- package/dist/utils/require-utils.js.map +1 -1
- package/dist/utils/require-utils.test.d.ts +1 -0
- package/dist/utils/require-utils.test.js.map +1 -1
- package/dist/utils/schema-utils.d.ts +13 -0
- package/dist/utils/schema-utils.test.d.ts +1 -0
- package/dist/utils/semver-utils.d.ts +8 -0
- package/dist/utils/string-utils.d.ts +2 -0
- package/dist/utils/template-utils.d.ts +1 -0
- package/dist/utils/tunnel-utils.d.ts +49 -0
- package/dist/utils/tunnel-utils.js.map +1 -1
- package/dist/utils/type-utils.d.ts +19 -0
- package/dist/utils/url-utils.d.ts +19 -0
- package/dist/utils/url-utils.js.map +1 -1
- package/dist/worker/child-entrypoint.d.ts +1 -0
- package/dist/worker/child-entrypoint.js.map +1 -1
- package/dist/worker/child-wrapper.d.ts +18 -0
- package/dist/worker/child-wrapper.js.map +1 -1
- package/dist/worker/config.d.ts +28 -0
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/is-child.d.ts +14 -0
- package/dist/worker/is-child.js.map +1 -1
- package/dist/worker/worker-state.d.ts +30 -0
- package/dist/worker/worker.d.ts +20 -0
- package/package.json +7 -5
- package/tsconfig.build.json +14 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
export declare const INTEGRATION_RULESET: {
|
|
2
|
+
extends: never[];
|
|
3
|
+
rules: {
|
|
4
|
+
'integration-title-must-be-present': {
|
|
5
|
+
description: string;
|
|
6
|
+
severity: "error";
|
|
7
|
+
given: string;
|
|
8
|
+
then: {
|
|
9
|
+
field: string;
|
|
10
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
'integration-description-must-be-present': {
|
|
14
|
+
description: string;
|
|
15
|
+
severity: "error";
|
|
16
|
+
given: string;
|
|
17
|
+
then: {
|
|
18
|
+
field: string;
|
|
19
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
'integration-must-have-an-icon': {
|
|
23
|
+
description: string;
|
|
24
|
+
severity: "error";
|
|
25
|
+
given: string;
|
|
26
|
+
then: {
|
|
27
|
+
field: string;
|
|
28
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
31
|
+
'integration-must-have-a-readme-file': {
|
|
32
|
+
description: string;
|
|
33
|
+
severity: "error";
|
|
34
|
+
given: string;
|
|
35
|
+
then: {
|
|
36
|
+
field: string;
|
|
37
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
'actions-should-have-a-title': {
|
|
41
|
+
description: string;
|
|
42
|
+
message: string;
|
|
43
|
+
severity: "warn";
|
|
44
|
+
given: string;
|
|
45
|
+
then: {
|
|
46
|
+
field: string;
|
|
47
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
48
|
+
message: string;
|
|
49
|
+
}[];
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
'actions-must-have-a-description': {
|
|
53
|
+
description: string;
|
|
54
|
+
message: string;
|
|
55
|
+
severity: "error";
|
|
56
|
+
given: string;
|
|
57
|
+
then: {
|
|
58
|
+
field: string;
|
|
59
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
60
|
+
message: string;
|
|
61
|
+
}[];
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
'action-inputparams-should-have-a-title': {
|
|
65
|
+
description: string;
|
|
66
|
+
message: string;
|
|
67
|
+
severity: "warn";
|
|
68
|
+
given: string;
|
|
69
|
+
then: {
|
|
70
|
+
field: string;
|
|
71
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
72
|
+
message: string;
|
|
73
|
+
}[];
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
'action-inputparams-must-have-a-description': {
|
|
77
|
+
description: string;
|
|
78
|
+
message: string;
|
|
79
|
+
severity: "error";
|
|
80
|
+
given: string;
|
|
81
|
+
then: {
|
|
82
|
+
field: string;
|
|
83
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
84
|
+
message: string;
|
|
85
|
+
}[];
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
'action-outputparams-should-have-a-title': {
|
|
89
|
+
description: string;
|
|
90
|
+
message: string;
|
|
91
|
+
severity: "warn";
|
|
92
|
+
given: string;
|
|
93
|
+
then: {
|
|
94
|
+
field: string;
|
|
95
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
96
|
+
message: string;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
'action-outputparams-must-have-a-description': {
|
|
101
|
+
description: string;
|
|
102
|
+
message: string;
|
|
103
|
+
severity: "error";
|
|
104
|
+
given: string;
|
|
105
|
+
then: {
|
|
106
|
+
field: string;
|
|
107
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
108
|
+
message: string;
|
|
109
|
+
}[];
|
|
110
|
+
}[];
|
|
111
|
+
};
|
|
112
|
+
'event-outputparams-should-have-title': {
|
|
113
|
+
description: string;
|
|
114
|
+
message: string;
|
|
115
|
+
severity: "warn";
|
|
116
|
+
given: string;
|
|
117
|
+
then: {
|
|
118
|
+
field: string;
|
|
119
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
120
|
+
message: string;
|
|
121
|
+
}[];
|
|
122
|
+
}[];
|
|
123
|
+
};
|
|
124
|
+
'event-outputparams-must-have-description': {
|
|
125
|
+
description: string;
|
|
126
|
+
message: string;
|
|
127
|
+
severity: "error";
|
|
128
|
+
given: string;
|
|
129
|
+
then: {
|
|
130
|
+
field: string;
|
|
131
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
132
|
+
message: string;
|
|
133
|
+
}[];
|
|
134
|
+
}[];
|
|
135
|
+
};
|
|
136
|
+
'events-must-have-a-title': {
|
|
137
|
+
description: string;
|
|
138
|
+
message: string;
|
|
139
|
+
severity: "error";
|
|
140
|
+
given: string;
|
|
141
|
+
then: {
|
|
142
|
+
field: string;
|
|
143
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
144
|
+
message: string;
|
|
145
|
+
}[];
|
|
146
|
+
}[];
|
|
147
|
+
};
|
|
148
|
+
'events-must-have-a-description': {
|
|
149
|
+
description: string;
|
|
150
|
+
message: string;
|
|
151
|
+
severity: "error";
|
|
152
|
+
given: string;
|
|
153
|
+
then: {
|
|
154
|
+
field: string;
|
|
155
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
156
|
+
message: string;
|
|
157
|
+
}[];
|
|
158
|
+
}[];
|
|
159
|
+
};
|
|
160
|
+
'consider-migrating-to-configurations': {
|
|
161
|
+
description: string;
|
|
162
|
+
severity: "off";
|
|
163
|
+
given: string;
|
|
164
|
+
then: {
|
|
165
|
+
field: string;
|
|
166
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
167
|
+
}[];
|
|
168
|
+
};
|
|
169
|
+
'configuration-fields-must-have-a-title': {
|
|
170
|
+
description: string;
|
|
171
|
+
message: string;
|
|
172
|
+
severity: "error";
|
|
173
|
+
given: string;
|
|
174
|
+
then: {
|
|
175
|
+
field: string;
|
|
176
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
177
|
+
message: string;
|
|
178
|
+
}[];
|
|
179
|
+
}[];
|
|
180
|
+
};
|
|
181
|
+
'configuration-fields-must-have-a-description': {
|
|
182
|
+
description: string;
|
|
183
|
+
message: string;
|
|
184
|
+
severity: "error";
|
|
185
|
+
given: string;
|
|
186
|
+
then: {
|
|
187
|
+
field: string;
|
|
188
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
189
|
+
message: string;
|
|
190
|
+
}[];
|
|
191
|
+
}[];
|
|
192
|
+
};
|
|
193
|
+
'multiple-configurations-must-have-a-title': {
|
|
194
|
+
description: string;
|
|
195
|
+
message: string;
|
|
196
|
+
severity: "error";
|
|
197
|
+
given: string;
|
|
198
|
+
then: {
|
|
199
|
+
field: string;
|
|
200
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
201
|
+
message: string;
|
|
202
|
+
}[];
|
|
203
|
+
}[];
|
|
204
|
+
};
|
|
205
|
+
'multiple-configurations-must-have-a-description': {
|
|
206
|
+
description: string;
|
|
207
|
+
message: string;
|
|
208
|
+
severity: "error";
|
|
209
|
+
given: string;
|
|
210
|
+
then: {
|
|
211
|
+
field: string;
|
|
212
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
213
|
+
message: string;
|
|
214
|
+
}[];
|
|
215
|
+
}[];
|
|
216
|
+
};
|
|
217
|
+
'multipes-configurations-fields-must-have-a-title': {
|
|
218
|
+
description: string;
|
|
219
|
+
message: string;
|
|
220
|
+
severity: "error";
|
|
221
|
+
given: string;
|
|
222
|
+
then: {
|
|
223
|
+
field: string;
|
|
224
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
225
|
+
message: string;
|
|
226
|
+
}[];
|
|
227
|
+
}[];
|
|
228
|
+
};
|
|
229
|
+
'multipes-configurations-fields-must-have-a-description': {
|
|
230
|
+
description: string;
|
|
231
|
+
message: string;
|
|
232
|
+
severity: "error";
|
|
233
|
+
given: string;
|
|
234
|
+
then: {
|
|
235
|
+
field: string;
|
|
236
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
237
|
+
message: string;
|
|
238
|
+
}[];
|
|
239
|
+
}[];
|
|
240
|
+
};
|
|
241
|
+
'user-tags-should-have-a-title': {
|
|
242
|
+
description: string;
|
|
243
|
+
message: string;
|
|
244
|
+
severity: "warn";
|
|
245
|
+
given: string;
|
|
246
|
+
then: {
|
|
247
|
+
field: string;
|
|
248
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
249
|
+
message: string;
|
|
250
|
+
}[];
|
|
251
|
+
}[];
|
|
252
|
+
};
|
|
253
|
+
'user-tags-must-have-a-description': {
|
|
254
|
+
description: string;
|
|
255
|
+
message: string;
|
|
256
|
+
severity: "error";
|
|
257
|
+
given: string;
|
|
258
|
+
then: {
|
|
259
|
+
field: string;
|
|
260
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
261
|
+
message: string;
|
|
262
|
+
}[];
|
|
263
|
+
}[];
|
|
264
|
+
};
|
|
265
|
+
'channels-should-have-a-title': {
|
|
266
|
+
description: string;
|
|
267
|
+
message: string;
|
|
268
|
+
severity: "warn";
|
|
269
|
+
given: string;
|
|
270
|
+
then: {
|
|
271
|
+
field: string;
|
|
272
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
273
|
+
message: string;
|
|
274
|
+
}[];
|
|
275
|
+
}[];
|
|
276
|
+
};
|
|
277
|
+
'channels-must-have-a-description': {
|
|
278
|
+
description: string;
|
|
279
|
+
message: string;
|
|
280
|
+
severity: "error";
|
|
281
|
+
given: string;
|
|
282
|
+
then: {
|
|
283
|
+
field: string;
|
|
284
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
285
|
+
message: string;
|
|
286
|
+
}[];
|
|
287
|
+
}[];
|
|
288
|
+
};
|
|
289
|
+
'channels-conversation-tags-should-have-a-title': {
|
|
290
|
+
description: string;
|
|
291
|
+
message: string;
|
|
292
|
+
severity: "warn";
|
|
293
|
+
given: string;
|
|
294
|
+
then: {
|
|
295
|
+
field: string;
|
|
296
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
297
|
+
message: string;
|
|
298
|
+
}[];
|
|
299
|
+
}[];
|
|
300
|
+
};
|
|
301
|
+
'channels-conversation-tags-must-have-a-description': {
|
|
302
|
+
description: string;
|
|
303
|
+
message: string;
|
|
304
|
+
severity: "error";
|
|
305
|
+
given: string;
|
|
306
|
+
then: {
|
|
307
|
+
field: string;
|
|
308
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
309
|
+
message: string;
|
|
310
|
+
}[];
|
|
311
|
+
}[];
|
|
312
|
+
};
|
|
313
|
+
'channels-message-tags-should-have-a-title': {
|
|
314
|
+
description: string;
|
|
315
|
+
message: string;
|
|
316
|
+
severity: "warn";
|
|
317
|
+
given: string;
|
|
318
|
+
then: {
|
|
319
|
+
field: string;
|
|
320
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
321
|
+
message: string;
|
|
322
|
+
}[];
|
|
323
|
+
}[];
|
|
324
|
+
};
|
|
325
|
+
'channels-message-tags-must-have-a-description': {
|
|
326
|
+
description: string;
|
|
327
|
+
message: string;
|
|
328
|
+
severity: "error";
|
|
329
|
+
given: string;
|
|
330
|
+
then: {
|
|
331
|
+
field: string;
|
|
332
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
333
|
+
message: string;
|
|
334
|
+
}[];
|
|
335
|
+
}[];
|
|
336
|
+
};
|
|
337
|
+
'legacy-zui-title-should-be-removed': {
|
|
338
|
+
description: string;
|
|
339
|
+
severity: "error";
|
|
340
|
+
given: string;
|
|
341
|
+
then: {
|
|
342
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
343
|
+
}[];
|
|
344
|
+
};
|
|
345
|
+
'legacy-zui-examples-should-be-removed': {
|
|
346
|
+
description: string;
|
|
347
|
+
severity: "hint";
|
|
348
|
+
given: string;
|
|
349
|
+
then: {
|
|
350
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
351
|
+
}[];
|
|
352
|
+
};
|
|
353
|
+
'state-fields-should-have-title': {
|
|
354
|
+
description: string;
|
|
355
|
+
message: string;
|
|
356
|
+
severity: "warn";
|
|
357
|
+
given: string;
|
|
358
|
+
then: {
|
|
359
|
+
field: string;
|
|
360
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
361
|
+
message: string;
|
|
362
|
+
}[];
|
|
363
|
+
}[];
|
|
364
|
+
};
|
|
365
|
+
'state-fields-must-have-description': {
|
|
366
|
+
description: string;
|
|
367
|
+
message: string;
|
|
368
|
+
severity: "error";
|
|
369
|
+
given: string;
|
|
370
|
+
then: {
|
|
371
|
+
field: string;
|
|
372
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
373
|
+
message: string;
|
|
374
|
+
}[];
|
|
375
|
+
}[];
|
|
376
|
+
};
|
|
377
|
+
'secrets-must-have-a-description': {
|
|
378
|
+
description: string;
|
|
379
|
+
message: string;
|
|
380
|
+
severity: "error";
|
|
381
|
+
given: string;
|
|
382
|
+
then: {
|
|
383
|
+
field: string;
|
|
384
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
385
|
+
message: string;
|
|
386
|
+
}[];
|
|
387
|
+
}[];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/linter/rulesets/integration.ruleset.ts"],
|
|
4
4
|
"sourcesContent": ["import { type RulesetDefinition } from '@stoplight/spectral-core'\nimport { falsy, truthy } from '@stoplight/spectral-functions'\nimport { truthyWithMessage } from '../spectral-functions'\n\nexport const INTEGRATION_RULESET = {\n extends: [],\n rules: {\n 'integration-title-must-be-present': {\n description: 'The integration MUST have a non-empty title',\n severity: 'error',\n given: '$',\n then: [{ field: 'title', function: truthy }],\n },\n 'integration-description-must-be-present': {\n description: 'The integration MUST have a non-empty description',\n severity: 'error',\n given: '$',\n then: [{ field: 'description', function: truthy }],\n },\n 'integration-must-have-an-icon': {\n description: 'The integration MUST have an icon',\n severity: 'error',\n given: '$',\n then: [{ field: 'icon', function: truthy }],\n },\n 'integration-must-have-a-readme-file': {\n description: 'The integration MUST have a readme file',\n severity: 'error',\n given: '$',\n then: [{ field: 'readme', function: truthy }],\n },\n 'actions-should-have-a-title': {\n description: 'All actions SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.actions[*]',\n then: [{ field: 'title', function: truthyWithMessage(({ path }) => `action \"${path[1]}\"`) }],\n },\n 'actions-must-have-a-description': {\n description: 'All actions MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.actions[*]',\n then: [{ field: 'description', function: truthyWithMessage(({ path }) => `action \"${path[1]}\"`) }],\n },\n 'action-inputparams-should-have-a-title': {\n description: 'All action input parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.actions[*].input..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `input parameter \"${path.at(-3)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-inputparams-must-have-a-description': {\n description: 'All action input parameters MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.actions[*].input..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `input parameter \"${path.at(-2)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-outputparams-should-have-a-title': {\n description: 'All action output parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.actions[*].output..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-3)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-outputparams-must-have-a-description': {\n description: 'All action output parameters MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.actions[*].output..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-2)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'event-outputparams-should-have-title': {\n description: 'All event output parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-3)}\" of event \"${path[1]}\"`),\n },\n ],\n },\n 'event-outputparams-must-have-description': {\n description: 'All event output parameters MUST have a description',\n message:\n '{{description}}: {{error}} SHOULD provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-2)}\" of event \"${path[1]}\"`),\n },\n ],\n },\n 'events-must-have-a-title': {\n description: 'All events MUST have a title',\n message: '{{description}}: {{error}} MUST be a non-empty string',\n severity: 'error',\n given: '$.events[*]',\n then: [{ field: 'title', function: truthyWithMessage(({ path }) => `event \"${path[1]}\"`) }],\n },\n 'events-must-have-a-description': {\n description: 'All events MUST have a description',\n message: '{{description}}: {{error}} MUST be a non-empty string',\n severity: 'error',\n given: '$.events[*]',\n then: [{ field: 'description', function: truthyWithMessage(({ path }) => `event \"${path[1]}\"`) }],\n },\n 'consider-migrating-to-configurations': {\n description:\n 'Consider migrating to the new multiple configuration format: you MAY move your configuration from \"configuration\" to \"configurations\" and remove the \"configuration\" property',\n severity: 'off',\n given: '$',\n then: [\n { field: 'configuration', function: falsy },\n { field: 'configurations', function: truthy },\n ],\n },\n 'configuration-fields-must-have-a-title': {\n description: 'All configuration fields MUST have a title',\n message: '{{description}}: {{error}} MUST provide a non-empty title by using .title() in its Zod schema',\n severity: 'error',\n given: '$.configuration..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `configuration parameter \"${path.at(-3)}\"`),\n },\n ],\n },\n 'configuration-fields-must-have-a-description': {\n description: 'All configuration fields MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.configuration..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `configuration parameter \"${path.at(-2)}\"`),\n },\n ],\n },\n 'multiple-configurations-must-have-a-title': {\n description: 'Multiple configuration definitions MUST have a title',\n message: '{{description}}: {{error}} MUST have a title',\n severity: 'error',\n given: '$.configurations[*]',\n then: [{ field: 'title', function: truthyWithMessage(({ path }) => `configuration \"${path[1]}\"`) }],\n },\n 'multiple-configurations-must-have-a-description': {\n description: 'Multiple configuration definitions MUST have a description',\n message: '{{description}}: {{error}} MUST have a description',\n severity: 'error',\n given: '$.configurations[*]',\n then: [{ field: 'description', function: truthyWithMessage(({ path }) => `configuration \"${path[1]}\"`) }],\n },\n 'multipes-configurations-fields-must-have-a-title': {\n description: 'All configuration fields in multiple configurations MUST have a title',\n message: '{{description}}: {{error}} MUST provide a non-empty title by using .title() in its Zod schema',\n severity: 'error',\n given: '$.configurations[*]..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(\n ({ path }) => `configuration field \"${path.at(-3)}\" of configuration \"${path[1]}\"`\n ),\n },\n ],\n },\n 'multipes-configurations-fields-must-have-a-description': {\n description: 'All configuration fields in multiple configurations MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.configurations[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(\n ({ path }) => `configuration field \"${path.at(-2)}\" of configuration \"${path[1]}\"`\n ),\n },\n ],\n },\n 'user-tags-should-have-a-title': {\n description: 'All user tags SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.user.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `user tag \"${path[2]}\"`),\n },\n ],\n },\n 'user-tags-must-have-a-description': {\n description: 'All user tags MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.user.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `user tag \"${path[2]}\"`),\n },\n ],\n },\n 'channels-should-have-a-title': {\n description: 'All channels SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.channels[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `channel \"${path[1]}\"`),\n },\n ],\n },\n 'channels-must-have-a-description': {\n description: 'All channels MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.channels[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `channel \"${path[1]}\"`),\n },\n ],\n },\n 'channels-conversation-tags-should-have-a-title': {\n description: 'All conversation tags SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.channels[*].conversation.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `conversation tag \"${path.at(-2)}\" of channel \"${path[1]}\"`),\n },\n ],\n },\n 'channels-conversation-tags-must-have-a-description': {\n description: 'All conversation tags MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.channels[*].conversation.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `conversation tag \"${path.at(-2)}\" of channel \"${path[1]}\"`),\n },\n ],\n },\n 'channels-message-tags-should-have-a-title': {\n description: 'All message tags SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.channels[*].message.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `message tag \"${path.at(-2)}\" of channel \"${path[1]}\"`),\n },\n ],\n },\n 'channels-message-tags-must-have-a-description': {\n description: 'All message tags MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.channels[*].message.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `message tag \"${path.at(-2)}\" of channel \"${path[1]}\"`),\n },\n ],\n },\n 'legacy-zui-title-should-be-removed': {\n description:\n 'Legacy ZUI title fields (ui.title) SHOULD be removed. Please use .title() in your Zod schemas instead',\n severity: 'error',\n given: '$..ui[*].title',\n then: [{ function: falsy }],\n },\n 'legacy-zui-examples-should-be-removed': {\n description: 'Legacy ZUI examples fields (ui.examples) SHOULD be removed. There are currently no alternatives',\n severity: 'hint',\n given: '$..ui[*].examples',\n then: [{ function: falsy }],\n },\n 'state-fields-should-have-title': {\n description: 'All state fields SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.states[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage(({ path }) => `field \"${path.at(-3)}\" of state \"${path[1]}\"`),\n },\n ],\n },\n 'state-fields-must-have-description': {\n description: 'All state fields MUST have a description',\n message:\n '{{description}}: {{error}} SHOULD provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.states[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `field \"${path.at(-2)}\" of state \"${path[1]}\"`),\n },\n ],\n },\n 'secrets-must-have-a-description': {\n description: 'All secrets MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.secrets[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `secret \"${path[1]}\"`),\n },\n ],\n },\n },\n} satisfies RulesetDefinition\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gCAA8B;AAC9B,IAAAA,6BAAkC;AAE3B,MAAM,sBAAsB;AAAA,EACjC,SAAS,CAAC;AAAA,EACV,OAAO;AAAA,IACL,qCAAqC;AAAA,MACnC,aAAa;AAAA,MACb,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM,CAAC,EAAE,OAAO,SAAS,UAAU,iCAAO,CAAC;AAAA,IAC7C;AAAA,IACA,2CAA2C;AAAA,MACzC,aAAa;AAAA,MACb,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM,CAAC,EAAE,OAAO,eAAe,UAAU,iCAAO,CAAC;AAAA,IACnD;AAAA,IACA,iCAAiC;AAAA,MAC/B,aAAa;AAAA,MACb,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM,CAAC,EAAE,OAAO,QAAQ,UAAU,iCAAO,CAAC;AAAA,IAC5C;AAAA,IACA,uCAAuC;AAAA,MACrC,aAAa;AAAA,MACb,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM,CAAC,EAAE,OAAO,UAAU,UAAU,iCAAO,CAAC;AAAA,IAC9C;AAAA,IACA,+BAA+B;AAAA,MAC7B,aAAa;AAAA,MACb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O;AAAA,MACP,MAAM,CAAC,EAAE,UAAU,gCAAM,CAAC;AAAA,IAC5B;AAAA,IACA,yCAAyC;AAAA,MACvC,aAAa;AAAA,MACb,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM,CAAC,EAAE,UAAU,gCAAM,CAAC;AAAA,IAC5B;AAAA,IACA,kCAAkC;AAAA,MAChC,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,UAAU,KAAK,GAAG,EAAE,CAAC,eAAe,KAAK,CAAC,CAAC,GAAG;AAAA,QAC1F;AAAA,MACF;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC,aAAa;AAAA,MACb,SACE;AAAA,MACF,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,UAAU,KAAK,GAAG,EAAE,CAAC,eAAe,KAAK,CAAC,CAAC,GAAG;AAAA,QAC1F;AAAA,MACF;AAAA,IACF;AAAA,IACA,mCAAmC;AAAA,MACjC,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG;AAAA,QACjE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["import_spectral_functions"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export declare const INTERFACE_RULESET: {
|
|
2
|
+
extends: never[];
|
|
3
|
+
rules: {
|
|
4
|
+
'action-inputparams-should-have-a-title': {
|
|
5
|
+
description: string;
|
|
6
|
+
message: string;
|
|
7
|
+
severity: "warn";
|
|
8
|
+
given: string;
|
|
9
|
+
then: {
|
|
10
|
+
field: string;
|
|
11
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
12
|
+
message: string;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
'action-inputparams-must-have-a-description': {
|
|
17
|
+
description: string;
|
|
18
|
+
message: string;
|
|
19
|
+
severity: "error";
|
|
20
|
+
given: string;
|
|
21
|
+
then: {
|
|
22
|
+
field: string;
|
|
23
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
24
|
+
message: string;
|
|
25
|
+
}[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
'action-outputparams-should-have-a-title': {
|
|
29
|
+
description: string;
|
|
30
|
+
message: string;
|
|
31
|
+
severity: "warn";
|
|
32
|
+
given: string;
|
|
33
|
+
then: {
|
|
34
|
+
field: string;
|
|
35
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
36
|
+
message: string;
|
|
37
|
+
}[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
'action-outputparams-must-have-a-description': {
|
|
41
|
+
description: string;
|
|
42
|
+
message: string;
|
|
43
|
+
severity: "error";
|
|
44
|
+
given: string;
|
|
45
|
+
then: {
|
|
46
|
+
field: string;
|
|
47
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
48
|
+
message: string;
|
|
49
|
+
}[];
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
'event-outputparams-should-have-title': {
|
|
53
|
+
description: string;
|
|
54
|
+
message: string;
|
|
55
|
+
severity: "warn";
|
|
56
|
+
given: string;
|
|
57
|
+
then: {
|
|
58
|
+
field: string;
|
|
59
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
60
|
+
message: string;
|
|
61
|
+
}[];
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
'event-outputparams-must-have-description': {
|
|
65
|
+
description: string;
|
|
66
|
+
message: string;
|
|
67
|
+
severity: "error";
|
|
68
|
+
given: string;
|
|
69
|
+
then: {
|
|
70
|
+
field: string;
|
|
71
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
72
|
+
message: string;
|
|
73
|
+
}[];
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
'legacy-zui-title-should-be-removed': {
|
|
77
|
+
description: string;
|
|
78
|
+
severity: "error";
|
|
79
|
+
given: string;
|
|
80
|
+
then: {
|
|
81
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
82
|
+
}[];
|
|
83
|
+
};
|
|
84
|
+
'legacy-zui-examples-should-be-removed': {
|
|
85
|
+
description: string;
|
|
86
|
+
severity: "hint";
|
|
87
|
+
given: string;
|
|
88
|
+
then: {
|
|
89
|
+
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
'entities-should-have-a-title': {
|
|
93
|
+
description: string;
|
|
94
|
+
message: string;
|
|
95
|
+
severity: "warn";
|
|
96
|
+
given: string;
|
|
97
|
+
then: {
|
|
98
|
+
field: string;
|
|
99
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
100
|
+
message: string;
|
|
101
|
+
}[];
|
|
102
|
+
}[];
|
|
103
|
+
};
|
|
104
|
+
'entities-must-have-a-description': {
|
|
105
|
+
description: string;
|
|
106
|
+
message: string;
|
|
107
|
+
severity: "error";
|
|
108
|
+
given: string;
|
|
109
|
+
then: {
|
|
110
|
+
field: string;
|
|
111
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
112
|
+
message: string;
|
|
113
|
+
}[];
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
'entity-fields-should-have-a-title': {
|
|
117
|
+
description: string;
|
|
118
|
+
message: string;
|
|
119
|
+
severity: "warn";
|
|
120
|
+
given: string;
|
|
121
|
+
then: {
|
|
122
|
+
field: string;
|
|
123
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
124
|
+
message: string;
|
|
125
|
+
}[];
|
|
126
|
+
}[];
|
|
127
|
+
};
|
|
128
|
+
'entity-fields-must-have-a-description': {
|
|
129
|
+
description: string;
|
|
130
|
+
message: string;
|
|
131
|
+
severity: "error";
|
|
132
|
+
given: string;
|
|
133
|
+
then: {
|
|
134
|
+
field: string;
|
|
135
|
+
function: (input: string, _: unknown, context: import("@stoplight/spectral-core").RulesetFunctionContext) => {
|
|
136
|
+
message: string;
|
|
137
|
+
}[];
|
|
138
|
+
}[];
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/linter/rulesets/interface.ruleset.ts"],
|
|
4
4
|
"sourcesContent": ["import { type RulesetDefinition } from '@stoplight/spectral-core'\nimport { falsy } from '@stoplight/spectral-functions'\nimport { truthyWithMessage } from '../spectral-functions'\n\nexport const INTERFACE_RULESET = {\n extends: [],\n rules: {\n 'action-inputparams-should-have-a-title': {\n description: 'All action input parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.actions[*].input..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `input parameter \"${path.at(-3)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-inputparams-must-have-a-description': {\n description: 'All action input parameters MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.actions[*].input..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `input parameter \"${path.at(-2)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-outputparams-should-have-a-title': {\n description: 'All action output parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.actions[*].output..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-3)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'action-outputparams-must-have-a-description': {\n description: 'All action output parameters MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.actions[*].output..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-2)}\" of action \"${path[1]}\"`),\n },\n ],\n },\n 'event-outputparams-should-have-title': {\n description: 'All event output parameters SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-3)}\" of event \"${path[1]}\"`),\n },\n ],\n },\n 'event-outputparams-must-have-description': {\n description: 'All event output parameters MUST have a description',\n message:\n '{{description}}: {{error}} SHOULD provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `output parameter \"${path.at(-2)}\" of event \"${path[1]}\"`),\n },\n ],\n },\n 'legacy-zui-title-should-be-removed': {\n description:\n 'Legacy ZUI title fields (ui.title) SHOULD be removed. Please use .title() in your Zod schemas instead',\n severity: 'error',\n given: '$..ui[*].title',\n then: [{ function: falsy }],\n },\n 'legacy-zui-examples-should-be-removed': {\n description: 'Legacy ZUI examples fields (ui.examples) SHOULD be removed. There are currently no alternatives',\n severity: 'hint',\n given: '$..ui[*].examples',\n then: [{ function: falsy }],\n },\n 'entities-should-have-a-title': {\n description: 'All entities SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD have a non-empty title',\n severity: 'warn',\n given: '$.entities[*]',\n then: [{ field: 'title', function: truthyWithMessage(({ path }) => `entity \"${path[1]}\"`) }],\n },\n 'entities-must-have-a-description': {\n description: 'All entities MUST have a description',\n message: '{{description}}: {{error}} MUST have a non-empty description',\n severity: 'error',\n given: '$.entities[*]',\n then: [{ field: 'description', function: truthyWithMessage(({ path }) => `entity \"${path[1]}\"`) }],\n },\n 'entity-fields-should-have-a-title': {\n description: 'All entity fields SHOULD have a title',\n message: '{{description}}: {{error}} SHOULD provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.entities[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage(({ path }) => `field \"${path.at(-3)}\" of entity \"${path[1]}\"`),\n },\n ],\n },\n 'entity-fields-must-have-a-description': {\n description: 'All entity fields MUST have a description',\n message: '{{description}}: {{error}} MUST provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.entities[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `field \"${path.at(-2)}\" of entity \"${path[1]}\"`),\n },\n ],\n },\n },\n} satisfies RulesetDefinition\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gCAAsB;AACtB,IAAAA,6BAAkC;AAE3B,MAAM,oBAAoB;AAAA,EAC/B,SAAS,CAAC;AAAA,EACV,OAAO;AAAA,IACL,0CAA0C;AAAA,MACxC,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,oBAAoB,KAAK,GAAG,EAAE,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AO,eAAe,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;AAAA,IACnG;AAAA,IACA,qCAAqC;AAAA,MACnC,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,UAAU,KAAK,GAAG,EAAE,CAAC,gBAAgB,KAAK,CAAC,CAAC,GAAG;AAAA,QAC3F;AAAA,MACF;AAAA,IACF;AAAA,IACA,yCAAyC;AAAA,MACvC,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,UACP,cAAU,8CAAkB,CAAC,EAAE,KAAK,MAAM,UAAU,KAAK,GAAG,EAAE,CAAC,gBAAgB,KAAK,CAAC,CAAC,GAAG;AAAA,QAC3F;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["import_spectral_functions"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RulesetFunctionContext } from '@stoplight/spectral-core';
|
|
2
|
+
type MessageFn = ({ path }: {
|
|
3
|
+
path: (string | number)[];
|
|
4
|
+
}) => string;
|
|
5
|
+
/**
|
|
6
|
+
* When the input is falsy, return a message that is generated by the provided function
|
|
7
|
+
*/
|
|
8
|
+
export declare const truthyWithMessage: (fn: MessageFn) => (input: string, _: unknown, context: RulesetFunctionContext) => {
|
|
9
|
+
message: string;
|
|
10
|
+
}[];
|
|
11
|
+
export {};
|