@diagonal-hq/cli 0.43.3 → 0.44.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.
- package/dist/check-data.json +1 -1
- package/dist/{cli-assets-cli-KPJWOWLD.mjs → cli-assets-cli-PWYQHPT3.mjs} +3 -3
- package/dist/{cli-check-data-EFGW2377.mjs → cli-check-data-2NWFJFCC.mjs} +6 -6
- package/dist/{cli-chunk-EHIY7LHO.mjs → cli-chunk-4OFN4A6Y.mjs} +1 -1
- package/dist/{cli-chunk-3LF7KYRH.mjs → cli-chunk-5NNKJDPS.mjs} +2 -2
- package/dist/{cli-chunk-ZCZKOXUH.mjs → cli-chunk-CSIAT2LX.mjs} +3 -3
- package/dist/{cli-chunk-HQJJ3ZAJ.mjs → cli-chunk-HOJSWPJT.mjs} +3 -3
- package/dist/{cli-chunk-KRD6O5UC.mjs → cli-chunk-LU5O6DBH.mjs} +1 -1
- package/dist/{cli-chunk-FR2ZNG34.mjs → cli-chunk-QQXQ2SBW.mjs} +2 -2
- package/dist/{cli-chunk-LBQOYO4G.mjs → cli-chunk-QW63G2VP.mjs} +1 -1
- package/dist/{cli-chunk-KP2RSHLJ.mjs → cli-chunk-RD6PXRZJ.mjs} +1 -0
- package/dist/{cli-skill-file-PHFXSLAU.mjs → cli-skill-file-ZD4UACLT.mjs} +3 -3
- package/dist/{cli-workflows-KJH52NZ5.mjs → cli-workflows-AXOTBFPJ.mjs} +5 -5
- package/dist/cli.mjs +60 -15
- package/dist/sdk-contract.d.ts +78 -69
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
frontMatterUidInsertion,
|
|
5
5
|
readDefinitionUid,
|
|
6
6
|
require_dist
|
|
7
|
-
} from "./cli-chunk-
|
|
7
|
+
} from "./cli-chunk-LU5O6DBH.mjs";
|
|
8
8
|
import {
|
|
9
9
|
SourceError,
|
|
10
10
|
characterCount,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
diagnosticAt,
|
|
13
13
|
diagnosticFromError,
|
|
14
14
|
withoutDevInfix
|
|
15
|
-
} from "./cli-chunk-
|
|
15
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
18
|
} from "./cli-chunk-LRS5IEI3.mjs";
|
|
@@ -2,15 +2,15 @@ import { createRequire as __diagonalCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __diagonalCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
stringFacts
|
|
5
|
-
} from "./cli-chunk-
|
|
5
|
+
} from "./cli-chunk-4OFN4A6Y.mjs";
|
|
6
6
|
import {
|
|
7
7
|
readUid
|
|
8
|
-
} from "./cli-chunk-
|
|
8
|
+
} from "./cli-chunk-LU5O6DBH.mjs";
|
|
9
9
|
import {
|
|
10
10
|
SourceError,
|
|
11
11
|
declaredSlug,
|
|
12
12
|
propertyKey
|
|
13
|
-
} from "./cli-chunk-
|
|
13
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
14
14
|
|
|
15
15
|
// scripts/lib/runtime-build/workflow-config.mjs
|
|
16
16
|
var WORKFLOW_STAGE = "workflow";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
SystemPermissions,
|
|
5
5
|
isTimezone,
|
|
6
6
|
isUrl
|
|
7
|
-
} from "./cli-chunk-
|
|
7
|
+
} from "./cli-chunk-4OFN4A6Y.mjs";
|
|
8
8
|
import {
|
|
9
9
|
UID_PATTERN
|
|
10
|
-
} from "./cli-chunk-
|
|
10
|
+
} from "./cli-chunk-LU5O6DBH.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AUTHORING_MODULE,
|
|
13
13
|
BUILT_IN_RESOURCE_SLUGS,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
staticValue,
|
|
30
30
|
studlyName,
|
|
31
31
|
withoutDevInfix
|
|
32
|
-
} from "./cli-chunk-
|
|
32
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
33
33
|
|
|
34
34
|
// packages/cli/workspace-settings-catalog.json
|
|
35
35
|
var workspace_settings_catalog_default = {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
assetsBinding,
|
|
8
8
|
buildAssets,
|
|
9
9
|
isAssetKey
|
|
10
|
-
} from "./cli-chunk-
|
|
10
|
+
} from "./cli-chunk-QW63G2VP.mjs";
|
|
11
11
|
import {
|
|
12
12
|
SourceError,
|
|
13
13
|
bindsName,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
staticObject,
|
|
19
19
|
studlyName,
|
|
20
20
|
traverse
|
|
21
|
-
} from "./cli-chunk-
|
|
21
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
22
22
|
|
|
23
23
|
// scripts/lib/runtime-build/api-cli.mjs
|
|
24
24
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -764,6 +764,7 @@ var PAGE_SDK_TYPES = {
|
|
|
764
764
|
NavigateOptions: { "parameters": "", "arguments": "" },
|
|
765
765
|
NavigationMenu: { "parameters": "", "arguments": "" },
|
|
766
766
|
NavigationMenuCatalog: { "parameters": "", "arguments": "" },
|
|
767
|
+
NavigationMenuModule: { "parameters": "", "arguments": "" },
|
|
767
768
|
NotificationChannel: { "parameters": "", "arguments": "" },
|
|
768
769
|
NotificationChannelAvailability: { "parameters": "", "arguments": "" },
|
|
769
770
|
NotificationChannelUnavailableReason: { "parameters": "", "arguments": "" },
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
skillFrontMatter,
|
|
11
11
|
skillUidDefinition,
|
|
12
12
|
writeSkillFile
|
|
13
|
-
} from "./cli-chunk-
|
|
14
|
-
import "./cli-chunk-
|
|
15
|
-
import "./cli-chunk-
|
|
13
|
+
} from "./cli-chunk-5NNKJDPS.mjs";
|
|
14
|
+
import "./cli-chunk-LU5O6DBH.mjs";
|
|
15
|
+
import "./cli-chunk-RD6PXRZJ.mjs";
|
|
16
16
|
import "./cli-chunk-LRS5IEI3.mjs";
|
|
17
17
|
export {
|
|
18
18
|
SKILL_DESCRIPTION_MAX_LENGTH,
|
|
@@ -3,7 +3,7 @@ const require = __diagonalCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
WORKFLOW_STAGE,
|
|
5
5
|
stripTypes
|
|
6
|
-
} from "./cli-chunk-
|
|
6
|
+
} from "./cli-chunk-CSIAT2LX.mjs";
|
|
7
7
|
import {
|
|
8
8
|
scriptSdkRuntimeFiles
|
|
9
9
|
} from "./cli-chunk-6HPUF67L.mjs";
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
appModuleClosure,
|
|
16
16
|
isAppSpecifier,
|
|
17
17
|
resolveAppSpecifier
|
|
18
|
-
} from "./cli-chunk-
|
|
19
|
-
import "./cli-chunk-
|
|
18
|
+
} from "./cli-chunk-4OFN4A6Y.mjs";
|
|
19
|
+
import "./cli-chunk-LU5O6DBH.mjs";
|
|
20
20
|
import {
|
|
21
21
|
GENERATED_ASSETS_PATH
|
|
22
|
-
} from "./cli-chunk-
|
|
22
|
+
} from "./cli-chunk-QW63G2VP.mjs";
|
|
23
23
|
import {
|
|
24
24
|
AUTHORING_MODULE,
|
|
25
25
|
SourceError,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
diagnosticAt,
|
|
29
29
|
diagnosticFromError,
|
|
30
30
|
parseSource
|
|
31
|
-
} from "./cli-chunk-
|
|
31
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
32
32
|
import "./cli-chunk-LRS5IEI3.mjs";
|
|
33
33
|
|
|
34
34
|
// scripts/lib/runtime-build/workflows.mjs
|
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
buildSkill,
|
|
6
6
|
isSkillPath,
|
|
7
7
|
writeSkillFile
|
|
8
|
-
} from "./cli-chunk-
|
|
8
|
+
} from "./cli-chunk-5NNKJDPS.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DOMAINS_EXPORT,
|
|
11
11
|
DOMAIN_REFERENCE_MESSAGE,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
routeBindingsSource,
|
|
47
47
|
routeParamNames,
|
|
48
48
|
workspace_settings_catalog_default
|
|
49
|
-
} from "./cli-chunk-
|
|
49
|
+
} from "./cli-chunk-HOJSWPJT.mjs";
|
|
50
50
|
import {
|
|
51
51
|
TRIGGER_TYPES,
|
|
52
52
|
compareVersions,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
workflowConfigObject,
|
|
59
59
|
workflowMetadata,
|
|
60
60
|
workspaceBuildNeeds
|
|
61
|
-
} from "./cli-chunk-
|
|
61
|
+
} from "./cli-chunk-CSIAT2LX.mjs";
|
|
62
62
|
import {
|
|
63
63
|
GENERATED_NOTIFICATION_TYPES_MODULE,
|
|
64
64
|
GENERATED_WORKFLOWS_MODULE,
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
templateSlugOf,
|
|
80
80
|
workflowEntries,
|
|
81
81
|
workflowNames
|
|
82
|
-
} from "./cli-chunk-
|
|
82
|
+
} from "./cli-chunk-4OFN4A6Y.mjs";
|
|
83
83
|
import {
|
|
84
84
|
isUid,
|
|
85
85
|
readDefinitionUid,
|
|
86
86
|
readUid
|
|
87
|
-
} from "./cli-chunk-
|
|
87
|
+
} from "./cli-chunk-LU5O6DBH.mjs";
|
|
88
88
|
import {
|
|
89
89
|
ASSETS_LIST_USAGE,
|
|
90
90
|
ASSETS_PATH,
|
|
@@ -105,14 +105,14 @@ import {
|
|
|
105
105
|
withWorkspaceEnv,
|
|
106
106
|
writeAssetCatalog,
|
|
107
107
|
writeAssetEntry
|
|
108
|
-
} from "./cli-chunk-
|
|
108
|
+
} from "./cli-chunk-QQXQ2SBW.mjs";
|
|
109
109
|
import {
|
|
110
110
|
ASSETS_EXPORT,
|
|
111
111
|
GENERATED_ASSETS_MODULE,
|
|
112
112
|
assetKeyMessage,
|
|
113
113
|
assetsBinding,
|
|
114
114
|
isAssetKey
|
|
115
|
-
} from "./cli-chunk-
|
|
115
|
+
} from "./cli-chunk-QW63G2VP.mjs";
|
|
116
116
|
import {
|
|
117
117
|
APP_PREFIX,
|
|
118
118
|
AUTHORING_MODULE,
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
traverse,
|
|
182
182
|
usesImplicitName,
|
|
183
183
|
withoutDevInfix
|
|
184
|
-
} from "./cli-chunk-
|
|
184
|
+
} from "./cli-chunk-RD6PXRZJ.mjs";
|
|
185
185
|
import {
|
|
186
186
|
__commonJS,
|
|
187
187
|
__require,
|
|
@@ -9216,12 +9216,13 @@ ${code}
|
|
|
9216
9216
|
previous = bindPackageSource(previous, vendorFile(previousPath)?.path ?? previousPath, bindings);
|
|
9217
9217
|
}
|
|
9218
9218
|
const parts = () => {
|
|
9219
|
-
const {
|
|
9219
|
+
const { statements: codeImports, rest: factoryCode } = leadingImports(code);
|
|
9220
|
+
const { helpers, component } = splitFactoryBody(factoryCode);
|
|
9220
9221
|
let imports = previous === null ? [DEFAULT_IMPORT, ...extraImports].join("\n") : importsOf(previous);
|
|
9221
9222
|
if (previousPath !== null && posix3.dirname(previousPath) !== posix3.dirname(path)) {
|
|
9222
9223
|
imports = rebasedImports(imports, previousPath, path);
|
|
9223
9224
|
}
|
|
9224
|
-
return { imports, helpers, component, trailing: "" };
|
|
9225
|
+
return { imports: withCodeImports(imports, codeImports), helpers, component, trailing: "" };
|
|
9225
9226
|
};
|
|
9226
9227
|
return writeParts(path, options, parts, {
|
|
9227
9228
|
previous,
|
|
@@ -9775,6 +9776,50 @@ function unboundElementsOnly(ast, name) {
|
|
|
9775
9776
|
);
|
|
9776
9777
|
return [...new Set(rendered)].filter((local) => !otherUses.has(local) && !bindsName(ast, local));
|
|
9777
9778
|
}
|
|
9779
|
+
var LEADING_IMPORT = /^\s*import\s+(?:[\s\S]*?\s+from\s+)?['"][^'"]+['"];?[ \t]*\n?/;
|
|
9780
|
+
function leadingImports(code) {
|
|
9781
|
+
const statements = [];
|
|
9782
|
+
let rest = code;
|
|
9783
|
+
let match = LEADING_IMPORT.exec(rest);
|
|
9784
|
+
while (match !== null) {
|
|
9785
|
+
statements.push(match[0].trim());
|
|
9786
|
+
rest = rest.slice(match[0].length);
|
|
9787
|
+
match = LEADING_IMPORT.exec(rest);
|
|
9788
|
+
}
|
|
9789
|
+
return { statements, rest: statements.length === 0 ? code : rest.replace(/^\s*\n/, "") };
|
|
9790
|
+
}
|
|
9791
|
+
function importBinding2(module, specifier) {
|
|
9792
|
+
const imported = specifier.type === "ImportSpecifier" ? specifier.imported.name ?? specifier.imported.value : null;
|
|
9793
|
+
return JSON.stringify([module, specifier.type, imported]);
|
|
9794
|
+
}
|
|
9795
|
+
function withCodeImports(imports, statements) {
|
|
9796
|
+
for (const statement of statements) {
|
|
9797
|
+
const bound = new Map(
|
|
9798
|
+
parseSource(imports, { jsx: false }).program.body.filter((node) => node.type === "ImportDeclaration").flatMap((node) => node.specifiers.map((specifier) => [specifier.local.name, importBinding2(node.source.value, specifier)]))
|
|
9799
|
+
);
|
|
9800
|
+
const declaration = parseSource(statement, { jsx: false }).program.body[0];
|
|
9801
|
+
const module = declaration.source.value;
|
|
9802
|
+
for (const specifier of declaration.specifiers) {
|
|
9803
|
+
const existing = bound.get(specifier.local.name);
|
|
9804
|
+
if (existing !== void 0 && existing !== importBinding2(module, specifier)) {
|
|
9805
|
+
throw new SourceError(
|
|
9806
|
+
`The code imports ${specifier.local.name} from '${module}', but the page file already imports ${specifier.local.name} from another module or export. Use another local name.`,
|
|
9807
|
+
null
|
|
9808
|
+
);
|
|
9809
|
+
}
|
|
9810
|
+
}
|
|
9811
|
+
const unbound = declaration.specifiers.filter((specifier) => !bound.has(specifier.local.name));
|
|
9812
|
+
if (declaration.importKind === "type" || unbound.some((specifier) => specifier.type !== "ImportSpecifier")) {
|
|
9813
|
+
imports = unbound.length === 0 ? imports : `${imports}
|
|
9814
|
+
${statement.replace(/;?$/, ";")}`;
|
|
9815
|
+
continue;
|
|
9816
|
+
}
|
|
9817
|
+
for (const specifier of unbound) {
|
|
9818
|
+
imports = withNamedImport(imports, module, specifier.imported.name ?? specifier.imported.value, specifier.local.name);
|
|
9819
|
+
}
|
|
9820
|
+
}
|
|
9821
|
+
return imports;
|
|
9822
|
+
}
|
|
9778
9823
|
function withNamedImport(imports, module, name, local) {
|
|
9779
9824
|
const named = parseSource(imports, { jsx: false }).program.body.filter(
|
|
9780
9825
|
(statement) => statement.type === "ImportDeclaration" && statement.source.value === module && statement.importKind !== "type"
|
|
@@ -13890,7 +13935,7 @@ async function checkSources() {
|
|
|
13890
13935
|
if (existsSync4(DATA_FILE) && existsSync4(SDK_FILE)) {
|
|
13891
13936
|
return { dataFile: DATA_FILE, sdkFile: SDK_FILE };
|
|
13892
13937
|
}
|
|
13893
|
-
const { checkData, scriptSdk } = await import("./cli-check-data-
|
|
13938
|
+
const { checkData, scriptSdk } = await import("./cli-check-data-2NWFJFCC.mjs");
|
|
13894
13939
|
return { data: checkData(), sdk: scriptSdk() };
|
|
13895
13940
|
}
|
|
13896
13941
|
function isScriptTestPath(path) {
|
|
@@ -13910,8 +13955,8 @@ function holdsSkills(root, plan) {
|
|
|
13910
13955
|
async function checkCheckout(root, options) {
|
|
13911
13956
|
const sources = await checkSources();
|
|
13912
13957
|
const plan = composePackages(root);
|
|
13913
|
-
const testRunner = async () => (await import("./cli-workflows-
|
|
13914
|
-
const skillReader = async () => (await import("./cli-skill-file-
|
|
13958
|
+
const testRunner = async () => (await import("./cli-workflows-AXOTBFPJ.mjs")).runBuildTests;
|
|
13959
|
+
const skillReader = async () => (await import("./cli-skill-file-ZD4UACLT.mjs")).skillFrontMatter;
|
|
13915
13960
|
const finish = (checkoutRoot, buildPlan, answer, runTests2) => {
|
|
13916
13961
|
const run = hasScriptTests(answer) ? runTests2(checkoutRoot, answer.tests) : null;
|
|
13917
13962
|
const diagnostics = finishedDiagnostics(withTestDiagnostics(answer, run), buildPlan);
|
|
@@ -13996,9 +14041,9 @@ async function main(argv, io) {
|
|
|
13996
14041
|
case "assets": {
|
|
13997
14042
|
const [subcommand, ...assetArgs] = args;
|
|
13998
14043
|
if (subcommand === "upload")
|
|
13999
|
-
return (await import("./cli-assets-cli-
|
|
14044
|
+
return (await import("./cli-assets-cli-PWYQHPT3.mjs")).uploadAsset(assetArgs, withWorkspaceEnv(io));
|
|
14000
14045
|
if (subcommand === "list")
|
|
14001
|
-
return (await import("./cli-assets-cli-
|
|
14046
|
+
return (await import("./cli-assets-cli-PWYQHPT3.mjs")).listAssets(assetArgs, withWorkspaceEnv(io));
|
|
14002
14047
|
io.stderr.write(`${ASSETS_UPLOAD_USAGE}
|
|
14003
14048
|
${ASSETS_LIST_USAGE}
|
|
14004
14049
|
`);
|
package/dist/sdk-contract.d.ts
CHANGED
|
@@ -2893,51 +2893,47 @@ type SdkSaveNotificationTemplateHandle = {
|
|
|
2893
2893
|
type SdkNavigationMenu = {
|
|
2894
2894
|
id: string;
|
|
2895
2895
|
name: string;
|
|
2896
|
-
items
|
|
2896
|
+
/** The items of a menu row, or the resolved items of a `navigation/*.ts` module. */
|
|
2897
|
+
items: any[] | readonly SdkResolvedMenuItem[];
|
|
2897
2898
|
};
|
|
2898
2899
|
|
|
2899
|
-
type
|
|
2900
|
+
type SdkResolvedMenuItem = NavMainItem & {
|
|
2901
|
+
readonly badge: string | number | null;
|
|
2902
|
+
readonly children: readonly SdkResolvedMenuItem[] | null;
|
|
2903
|
+
};
|
|
2900
2904
|
|
|
2901
|
-
type
|
|
2902
|
-
|
|
2903
|
-
|
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
|
2912
|
-
|
|
2913
|
-
|
|
|
2914
|
-
|
|
2915
|
-
|
|
|
2916
|
-
|
|
2917
|
-
|
|
|
2918
|
-
|
|
2919
|
-
| 'pages'
|
|
2920
|
-
| 'projects'
|
|
2921
|
-
| 'record-bindings'
|
|
2922
|
-
| 'redirects'
|
|
2923
|
-
| 'resources'
|
|
2924
|
-
| 'security'
|
|
2925
|
-
| 'staged-content'
|
|
2926
|
-
| 'tests'
|
|
2927
|
-
| 'workflow-script-migration'
|
|
2928
|
-
| 'workflows'
|
|
2929
|
-
| 'workspace-analytics'
|
|
2930
|
-
| 'workspace-brand-kit'
|
|
2931
|
-
| 'workspace-domains'
|
|
2932
|
-
| 'workspace-email'
|
|
2933
|
-
| 'workspace-fields'
|
|
2934
|
-
| 'workspace-files'
|
|
2935
|
-
| 'workspace-onboarding'
|
|
2936
|
-
| 'workspace-runs'
|
|
2937
|
-
| 'workspace-workflows'
|
|
2938
|
-
| 'workspaces';
|
|
2905
|
+
type NavMainItem = {
|
|
2906
|
+
readonly id: string;
|
|
2907
|
+
readonly parent_id: string | null;
|
|
2908
|
+
readonly title: string;
|
|
2909
|
+
/** The destination, or null for a dropdown and for a page that has no published route. */
|
|
2910
|
+
readonly url: string | null;
|
|
2911
|
+
readonly type: {
|
|
2912
|
+
readonly value: 'page' | 'url' | 'external_link' | 'system_config' | 'dropdown';
|
|
2913
|
+
readonly label: string;
|
|
2914
|
+
};
|
|
2915
|
+
readonly icon: string | null;
|
|
2916
|
+
/** A short count or label that shows at the end of the item. */
|
|
2917
|
+
readonly badge?: string | number | null;
|
|
2918
|
+
readonly sort_order: number;
|
|
2919
|
+
readonly children: readonly NavMainItem[] | null;
|
|
2920
|
+
/** Paths other than `url` that mark the item active. */
|
|
2921
|
+
readonly activation_paths?: readonly string[] | null;
|
|
2922
|
+
};
|
|
2939
2923
|
|
|
2940
|
-
type
|
|
2924
|
+
type SdkNavigationMenuModule = {
|
|
2925
|
+
id: string;
|
|
2926
|
+
name: string;
|
|
2927
|
+
/** Loads the module's menu. It throws when the module does not load or exports no menu. */
|
|
2928
|
+
load: () => SdkMenu;
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2931
|
+
type SdkMenu<E extends SdkMenuExtra = Record<never, never>> = {
|
|
2932
|
+
readonly $menu: true;
|
|
2933
|
+
readonly build: (ctx: SdkMenuContext & E) => readonly SdkMenuItem[];
|
|
2934
|
+
};
|
|
2935
|
+
|
|
2936
|
+
type SdkMenuExtra = Record<string, any>;
|
|
2941
2937
|
|
|
2942
2938
|
type SdkMenuContext = {
|
|
2943
2939
|
/** The signed-in identity, or null for a visitor who is not signed in. */
|
|
@@ -3034,36 +3030,48 @@ type SdkCatalogPageParams<U> = SdkCatalogPage<U> extends { params: infer P } ? P
|
|
|
3034
3030
|
|
|
3035
3031
|
type SdkCatalogPage<U> = U extends keyof PageParamsCatalog ? PageParamsCatalog[U] : null;
|
|
3036
3032
|
|
|
3037
|
-
type
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3033
|
+
type SdkSystemSettingsPage =
|
|
3034
|
+
| 'ai-assistant'
|
|
3035
|
+
| 'ai-conversations'
|
|
3036
|
+
| 'application-assets'
|
|
3037
|
+
| 'branches'
|
|
3038
|
+
| 'calendar-sync'
|
|
3039
|
+
| 'components'
|
|
3040
|
+
| 'data-imports'
|
|
3041
|
+
| 'developer'
|
|
3042
|
+
| 'diagonal-wallet'
|
|
3043
|
+
| 'entity-graph'
|
|
3044
|
+
| 'layouts'
|
|
3045
|
+
| 'media-library'
|
|
3046
|
+
| 'navigation'
|
|
3047
|
+
| 'notifications'
|
|
3048
|
+
| 'package'
|
|
3049
|
+
| 'packages'
|
|
3050
|
+
| 'page-playground'
|
|
3051
|
+
| 'pages'
|
|
3052
|
+
| 'projects'
|
|
3053
|
+
| 'record-bindings'
|
|
3054
|
+
| 'redirects'
|
|
3055
|
+
| 'resources'
|
|
3056
|
+
| 'security'
|
|
3057
|
+
| 'staged-content'
|
|
3058
|
+
| 'tests'
|
|
3059
|
+
| 'workflow-script-migration'
|
|
3060
|
+
| 'workflows'
|
|
3061
|
+
| 'workspace-analytics'
|
|
3062
|
+
| 'workspace-brand-kit'
|
|
3063
|
+
| 'workspace-domains'
|
|
3064
|
+
| 'workspace-email'
|
|
3065
|
+
| 'workspace-fields'
|
|
3066
|
+
| 'workspace-files'
|
|
3067
|
+
| 'workspace-onboarding'
|
|
3068
|
+
| 'workspace-runs'
|
|
3069
|
+
| 'workspace-workflows'
|
|
3070
|
+
| 'workspaces';
|
|
3043
3071
|
|
|
3044
|
-
type
|
|
3045
|
-
readonly badge: string | number | null;
|
|
3046
|
-
readonly children: readonly SdkResolvedMenuItem[] | null;
|
|
3047
|
-
};
|
|
3072
|
+
type SdkNavigationMenuCatalog = Record<string, SdkNavigationMenu | SdkNavigationMenuModule>;
|
|
3048
3073
|
|
|
3049
|
-
type
|
|
3050
|
-
readonly id: string;
|
|
3051
|
-
readonly parent_id: string | null;
|
|
3052
|
-
readonly title: string;
|
|
3053
|
-
/** The destination, or null for a dropdown and for a page that has no published route. */
|
|
3054
|
-
readonly url: string | null;
|
|
3055
|
-
readonly type: {
|
|
3056
|
-
readonly value: 'page' | 'url' | 'external_link' | 'system_config' | 'dropdown';
|
|
3057
|
-
readonly label: string;
|
|
3058
|
-
};
|
|
3059
|
-
readonly icon: string | null;
|
|
3060
|
-
/** A short count or label that shows at the end of the item. */
|
|
3061
|
-
readonly badge?: string | number | null;
|
|
3062
|
-
readonly sort_order: number;
|
|
3063
|
-
readonly children: readonly NavMainItem[] | null;
|
|
3064
|
-
/** Paths other than `url` that mark the item active. */
|
|
3065
|
-
readonly activation_paths?: readonly string[] | null;
|
|
3066
|
-
};
|
|
3074
|
+
type SdkSystemSettingsPageEntry = { key: string; url: string | null };
|
|
3067
3075
|
|
|
3068
3076
|
type SdkMenuResult = { items: readonly SdkResolvedMenuItem[] };
|
|
3069
3077
|
|
|
@@ -14946,6 +14954,7 @@ declare namespace Sdk {
|
|
|
14946
14954
|
export type UseSaveNotificationTemplateOptions = import("diagonal:sdk-internal").SdkUseSaveNotificationTemplateOptions;
|
|
14947
14955
|
export type SaveNotificationTemplateHandle = import("diagonal:sdk-internal").SdkSaveNotificationTemplateHandle;
|
|
14948
14956
|
export type NavigationMenu = import("diagonal:sdk-internal").SdkNavigationMenu;
|
|
14957
|
+
export type NavigationMenuModule = import("diagonal:sdk-internal").SdkNavigationMenuModule;
|
|
14949
14958
|
export type NavigationMenuCatalog = import("diagonal:sdk-internal").SdkNavigationMenuCatalog;
|
|
14950
14959
|
export type SystemSettingsPage = import("diagonal:sdk-internal").SdkSystemSettingsPage;
|
|
14951
14960
|
export type SystemSettingsPageEntry = import("diagonal:sdk-internal").SdkSystemSettingsPageEntry;
|