@storyblok/schema 0.1.0-alpha.0 → 0.1.0-alpha.2
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/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/field-plugins/index.cjs +4 -0
- package/dist/field-plugins/index.d.cts +2 -0
- package/dist/field-plugins/index.d.mts +2 -0
- package/dist/field-plugins/index.mjs +3 -0
- package/dist/field-plugins/storyblok-color-field.cjs +32 -0
- package/dist/field-plugins/storyblok-color-field.cjs.map +1 -0
- package/dist/field-plugins/storyblok-color-field.d.cts +16 -0
- package/dist/field-plugins/storyblok-color-field.d.mts +16 -0
- package/dist/field-plugins/storyblok-color-field.mjs +32 -0
- package/dist/field-plugins/storyblok-color-field.mjs.map +1 -0
- package/dist/generated/capi/types.gen.d.cts +1 -126
- package/dist/generated/capi/types.gen.d.mts +1 -126
- package/dist/generated/mapi/_internal.gen.d.cts +1 -171
- package/dist/generated/mapi/_internal.gen.d.mts +1 -171
- package/dist/generated/overlay/zod.gen.cjs +407 -0
- package/dist/generated/overlay/zod.gen.cjs.map +1 -0
- package/dist/generated/overlay/zod.gen.mjs +402 -0
- package/dist/generated/overlay/zod.gen.mjs.map +1 -0
- package/dist/generated/types/block.d.cts +27 -14
- package/dist/generated/types/block.d.mts +27 -14
- package/dist/generated/types/field.d.cts +48 -17
- package/dist/generated/types/field.d.mts +48 -17
- package/dist/generated/types/mapi-story.d.cts +6 -10
- package/dist/generated/types/mapi-story.d.mts +6 -10
- package/dist/generated/types/story.d.cts +3 -3
- package/dist/generated/types/story.d.mts +3 -3
- package/dist/helpers/define-block.cjs +10 -28
- package/dist/helpers/define-block.cjs.map +1 -1
- package/dist/helpers/define-block.d.cts +14 -31
- package/dist/helpers/define-block.d.mts +14 -31
- package/dist/helpers/define-block.mjs +11 -27
- package/dist/helpers/define-block.mjs.map +1 -1
- package/dist/helpers/define-datasource.cjs +0 -16
- package/dist/helpers/define-datasource.cjs.map +1 -1
- package/dist/helpers/define-datasource.d.cts +14 -23
- package/dist/helpers/define-datasource.d.mts +14 -23
- package/dist/helpers/define-datasource.mjs +1 -15
- package/dist/helpers/define-datasource.mjs.map +1 -1
- package/dist/helpers/define-field-plugin.cjs +21 -0
- package/dist/helpers/define-field-plugin.cjs.map +1 -0
- package/dist/helpers/define-field-plugin.d.cts +33 -0
- package/dist/helpers/define-field-plugin.d.mts +33 -0
- package/dist/helpers/define-field-plugin.mjs +20 -0
- package/dist/helpers/define-field-plugin.mjs.map +1 -0
- package/dist/helpers/define-field.cjs +11 -11
- package/dist/helpers/define-field.cjs.map +1 -1
- package/dist/helpers/define-field.d.cts +46 -85
- package/dist/helpers/define-field.d.mts +46 -85
- package/dist/helpers/define-field.mjs +12 -11
- package/dist/helpers/define-field.mjs.map +1 -1
- package/dist/helpers/define-schema.cjs +22 -0
- package/dist/helpers/define-schema.cjs.map +1 -0
- package/dist/helpers/define-schema.d.cts +28 -0
- package/dist/helpers/define-schema.d.mts +28 -0
- package/dist/helpers/define-schema.mjs +21 -0
- package/dist/helpers/define-schema.mjs.map +1 -0
- package/dist/helpers/schema-type.d.cts +21 -17
- package/dist/helpers/schema-type.d.mts +21 -17
- package/dist/index.cjs +10 -47
- package/dist/index.d.cts +13 -20
- package/dist/index.d.mts +13 -20
- package/dist/index.mjs +8 -15
- package/dist/utils/is-record.cjs +10 -0
- package/dist/utils/is-record.cjs.map +1 -0
- package/dist/utils/is-record.mjs +9 -0
- package/dist/utils/is-record.mjs.map +1 -0
- package/dist/validators/create-story-validator.cjs +37 -0
- package/dist/validators/create-story-validator.cjs.map +1 -0
- package/dist/validators/create-story-validator.d.cts +18 -0
- package/dist/validators/create-story-validator.d.mts +18 -0
- package/dist/validators/create-story-validator.mjs +37 -0
- package/dist/validators/create-story-validator.mjs.map +1 -0
- package/dist/validators/internal-schemas.cjs +1 -0
- package/dist/validators/internal-schemas.mjs +3 -0
- package/dist/validators/shapes.cjs +12 -0
- package/dist/validators/shapes.cjs.map +1 -0
- package/dist/validators/shapes.d.cts +71 -0
- package/dist/validators/shapes.d.mts +71 -0
- package/dist/validators/shapes.mjs +12 -0
- package/dist/validators/shapes.mjs.map +1 -0
- package/dist/validators/types.d.cts +25 -0
- package/dist/validators/types.d.mts +25 -0
- package/dist/validators/validate-schema.cjs +145 -0
- package/dist/validators/validate-schema.cjs.map +1 -0
- package/dist/validators/validate-schema.d.cts +19 -0
- package/dist/validators/validate-schema.d.mts +19 -0
- package/dist/validators/validate-schema.mjs +145 -0
- package/dist/validators/validate-schema.mjs.map +1 -0
- package/dist/validators/validate-story.cjs +285 -0
- package/dist/validators/validate-story.cjs.map +1 -0
- package/dist/validators/validate-story.d.cts +17 -0
- package/dist/validators/validate-story.d.mts +17 -0
- package/dist/validators/validate-story.mjs +284 -0
- package/dist/validators/validate-story.mjs.map +1 -0
- package/package.json +17 -2
- package/dist/generated/mapi/types.gen.d.cts +0 -1272
- package/dist/generated/mapi/types.gen.d.mts +0 -1272
- package/dist/helpers/create-story-helpers.cjs +0 -42
- package/dist/helpers/create-story-helpers.cjs.map +0 -1
- package/dist/helpers/create-story-helpers.d.cts +0 -50
- package/dist/helpers/create-story-helpers.d.mts +0 -50
- package/dist/helpers/create-story-helpers.mjs +0 -42
- package/dist/helpers/create-story-helpers.mjs.map +0 -1
- package/dist/helpers/define-asset-folder.cjs +0 -46
- package/dist/helpers/define-asset-folder.cjs.map +0 -1
- package/dist/helpers/define-asset-folder.d.cts +0 -33
- package/dist/helpers/define-asset-folder.d.mts +0 -33
- package/dist/helpers/define-asset-folder.mjs +0 -43
- package/dist/helpers/define-asset-folder.mjs.map +0 -1
- package/dist/helpers/define-asset.cjs +0 -60
- package/dist/helpers/define-asset.cjs.map +0 -1
- package/dist/helpers/define-asset.d.cts +0 -32
- package/dist/helpers/define-asset.d.mts +0 -32
- package/dist/helpers/define-asset.mjs +0 -57
- package/dist/helpers/define-asset.mjs.map +0 -1
- package/dist/helpers/define-block-folder.cjs +0 -44
- package/dist/helpers/define-block-folder.cjs.map +0 -1
- package/dist/helpers/define-block-folder.d.cts +0 -34
- package/dist/helpers/define-block-folder.d.mts +0 -34
- package/dist/helpers/define-block-folder.mjs +0 -41
- package/dist/helpers/define-block-folder.mjs.map +0 -1
- package/dist/helpers/define-datasource-entry.cjs +0 -47
- package/dist/helpers/define-datasource-entry.cjs.map +0 -1
- package/dist/helpers/define-datasource-entry.d.cts +0 -49
- package/dist/helpers/define-datasource-entry.d.mts +0 -49
- package/dist/helpers/define-datasource-entry.mjs +0 -43
- package/dist/helpers/define-datasource-entry.mjs.map +0 -1
- package/dist/helpers/define-internal-tag.cjs +0 -41
- package/dist/helpers/define-internal-tag.cjs.map +0 -1
- package/dist/helpers/define-internal-tag.d.cts +0 -34
- package/dist/helpers/define-internal-tag.d.mts +0 -34
- package/dist/helpers/define-internal-tag.mjs +0 -38
- package/dist/helpers/define-internal-tag.mjs.map +0 -1
- package/dist/helpers/define-link.cjs +0 -23
- package/dist/helpers/define-link.cjs.map +0 -1
- package/dist/helpers/define-link.d.cts +0 -32
- package/dist/helpers/define-link.d.mts +0 -32
- package/dist/helpers/define-link.mjs +0 -22
- package/dist/helpers/define-link.mjs.map +0 -1
- package/dist/helpers/define-preset.cjs +0 -44
- package/dist/helpers/define-preset.cjs.map +0 -1
- package/dist/helpers/define-preset.d.cts +0 -35
- package/dist/helpers/define-preset.d.mts +0 -35
- package/dist/helpers/define-preset.mjs +0 -41
- package/dist/helpers/define-preset.mjs.map +0 -1
- package/dist/helpers/define-space.cjs +0 -47
- package/dist/helpers/define-space.cjs.map +0 -1
- package/dist/helpers/define-space.d.cts +0 -31
- package/dist/helpers/define-space.d.mts +0 -31
- package/dist/helpers/define-space.mjs +0 -44
- package/dist/helpers/define-space.mjs.map +0 -1
- package/dist/helpers/define-story.cjs +0 -122
- package/dist/helpers/define-story.cjs.map +0 -1
- package/dist/helpers/define-story.d.cts +0 -135
- package/dist/helpers/define-story.d.mts +0 -135
- package/dist/helpers/define-story.mjs +0 -118
- package/dist/helpers/define-story.mjs.map +0 -1
- package/dist/helpers/define-tag.cjs +0 -13
- package/dist/helpers/define-tag.cjs.map +0 -1
- package/dist/helpers/define-tag.d.cts +0 -23
- package/dist/helpers/define-tag.d.mts +0 -23
- package/dist/helpers/define-tag.mjs +0 -12
- package/dist/helpers/define-tag.mjs.map +0 -1
- package/dist/helpers/define-user.cjs +0 -50
- package/dist/helpers/define-user.cjs.map +0 -1
- package/dist/helpers/define-user.d.cts +0 -26
- package/dist/helpers/define-user.d.mts +0 -26
- package/dist/helpers/define-user.mjs +0 -48
- package/dist/helpers/define-user.mjs.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_is_record = require('../utils/is-record.cjs');
|
|
2
|
+
const require_define_field_plugin = require('../helpers/define-field-plugin.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/field-plugins/storyblok-color-field.ts
|
|
5
|
+
/**
|
|
6
|
+
* Hand-written [Standard Schema](https://standardschema.dev) validator for
|
|
7
|
+
* {@link StoryblokColorFieldValue}. Implemented directly (no external validator)
|
|
8
|
+
* so the package stays validator-agnostic and adds no runtime dependency.
|
|
9
|
+
*/
|
|
10
|
+
const storyblokColorFieldValue = { "~standard": {
|
|
11
|
+
version: 1,
|
|
12
|
+
vendor: "storyblok-schema",
|
|
13
|
+
validate(value) {
|
|
14
|
+
if (require_is_record.isRecord(value) && typeof value.color === "string") return { value: { color: value.color } };
|
|
15
|
+
return { issues: [{
|
|
16
|
+
message: "Expected a string `color` property.",
|
|
17
|
+
path: ["color"]
|
|
18
|
+
}] };
|
|
19
|
+
}
|
|
20
|
+
} };
|
|
21
|
+
/**
|
|
22
|
+
* Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).
|
|
23
|
+
* Register it in a schema's `fieldPlugins` to type matching custom fields.
|
|
24
|
+
*/
|
|
25
|
+
const storyblokColorField = require_define_field_plugin.defineFieldPlugin({
|
|
26
|
+
fieldType: "storyblok-colorpicker",
|
|
27
|
+
value: storyblokColorFieldValue
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.storyblokColorField = storyblokColorField;
|
|
32
|
+
//# sourceMappingURL=storyblok-color-field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyblok-color-field.cjs","names":["isRecord","defineFieldPlugin"],"sources":["../../src/field-plugins/storyblok-color-field.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { defineFieldPlugin } from '../helpers/define-field-plugin';\nimport { isRecord } from '../utils/is-record';\n\n/** Value stored by Storyblok's official Colorpicker field plugin. */\nexport interface StoryblokColorFieldValue {\n color: string;\n}\n\n/**\n * Hand-written [Standard Schema](https://standardschema.dev) validator for\n * {@link StoryblokColorFieldValue}. Implemented directly (no external validator)\n * so the package stays validator-agnostic and adds no runtime dependency.\n */\nconst storyblokColorFieldValue: StandardSchemaV1<StoryblokColorFieldValue> = {\n '~standard': {\n version: 1,\n vendor: 'storyblok-schema',\n validate(value) {\n if (isRecord(value) && typeof value.color === 'string') {\n return { value: { color: value.color } };\n }\n return { issues: [{ message: 'Expected a string `color` property.', path: ['color'] }] };\n },\n },\n};\n\n/**\n * Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).\n * Register it in a schema's `fieldPlugins` to type matching custom fields.\n */\nexport const storyblokColorField = defineFieldPlugin({\n fieldType: 'storyblok-colorpicker',\n value: storyblokColorFieldValue,\n});\n"],"mappings":";;;;;;;;;AAcA,MAAM,2BAAuE,EAC3E,aAAa;CACX,SAAS;CACT,QAAQ;CACR,SAAS,OAAO;AACd,MAAIA,2BAAS,MAAM,IAAI,OAAO,MAAM,UAAU,SAC5C,QAAO,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,EAAE;AAE1C,SAAO,EAAE,QAAQ,CAAC;GAAE,SAAS;GAAuC,MAAM,CAAC,QAAQ;GAAE,CAAC,EAAE;;CAE3F,EACF;;;;;AAMD,MAAa,sBAAsBC,8CAAkB;CACnD,WAAW;CACX,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldPlugin } from "../helpers/define-field-plugin.cjs";
|
|
2
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/field-plugins/storyblok-color-field.d.ts
|
|
5
|
+
/** Value stored by Storyblok's official Colorpicker field plugin. */
|
|
6
|
+
interface StoryblokColorFieldValue {
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).
|
|
11
|
+
* Register it in a schema's `fieldPlugins` to type matching custom fields.
|
|
12
|
+
*/
|
|
13
|
+
declare const storyblokColorField: FieldPlugin<"storyblok-colorpicker", StandardSchemaV1<StoryblokColorFieldValue, StoryblokColorFieldValue>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { StoryblokColorFieldValue, storyblokColorField };
|
|
16
|
+
//# sourceMappingURL=storyblok-color-field.d.cts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldPlugin } from "../helpers/define-field-plugin.mjs";
|
|
2
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/field-plugins/storyblok-color-field.d.ts
|
|
5
|
+
/** Value stored by Storyblok's official Colorpicker field plugin. */
|
|
6
|
+
interface StoryblokColorFieldValue {
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).
|
|
11
|
+
* Register it in a schema's `fieldPlugins` to type matching custom fields.
|
|
12
|
+
*/
|
|
13
|
+
declare const storyblokColorField: FieldPlugin<"storyblok-colorpicker", StandardSchemaV1<StoryblokColorFieldValue, StoryblokColorFieldValue>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { StoryblokColorFieldValue, storyblokColorField };
|
|
16
|
+
//# sourceMappingURL=storyblok-color-field.d.mts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isRecord } from "../utils/is-record.mjs";
|
|
2
|
+
import { defineFieldPlugin } from "../helpers/define-field-plugin.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/field-plugins/storyblok-color-field.ts
|
|
5
|
+
/**
|
|
6
|
+
* Hand-written [Standard Schema](https://standardschema.dev) validator for
|
|
7
|
+
* {@link StoryblokColorFieldValue}. Implemented directly (no external validator)
|
|
8
|
+
* so the package stays validator-agnostic and adds no runtime dependency.
|
|
9
|
+
*/
|
|
10
|
+
const storyblokColorFieldValue = { "~standard": {
|
|
11
|
+
version: 1,
|
|
12
|
+
vendor: "storyblok-schema",
|
|
13
|
+
validate(value) {
|
|
14
|
+
if (isRecord(value) && typeof value.color === "string") return { value: { color: value.color } };
|
|
15
|
+
return { issues: [{
|
|
16
|
+
message: "Expected a string `color` property.",
|
|
17
|
+
path: ["color"]
|
|
18
|
+
}] };
|
|
19
|
+
}
|
|
20
|
+
} };
|
|
21
|
+
/**
|
|
22
|
+
* Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).
|
|
23
|
+
* Register it in a schema's `fieldPlugins` to type matching custom fields.
|
|
24
|
+
*/
|
|
25
|
+
const storyblokColorField = defineFieldPlugin({
|
|
26
|
+
fieldType: "storyblok-colorpicker",
|
|
27
|
+
value: storyblokColorFieldValue
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { storyblokColorField };
|
|
32
|
+
//# sourceMappingURL=storyblok-color-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyblok-color-field.mjs","names":[],"sources":["../../src/field-plugins/storyblok-color-field.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { defineFieldPlugin } from '../helpers/define-field-plugin';\nimport { isRecord } from '../utils/is-record';\n\n/** Value stored by Storyblok's official Colorpicker field plugin. */\nexport interface StoryblokColorFieldValue {\n color: string;\n}\n\n/**\n * Hand-written [Standard Schema](https://standardschema.dev) validator for\n * {@link StoryblokColorFieldValue}. Implemented directly (no external validator)\n * so the package stays validator-agnostic and adds no runtime dependency.\n */\nconst storyblokColorFieldValue: StandardSchemaV1<StoryblokColorFieldValue> = {\n '~standard': {\n version: 1,\n vendor: 'storyblok-schema',\n validate(value) {\n if (isRecord(value) && typeof value.color === 'string') {\n return { value: { color: value.color } };\n }\n return { issues: [{ message: 'Expected a string `color` property.', path: ['color'] }] };\n },\n },\n};\n\n/**\n * Official Storyblok Colorpicker field plugin (`storyblok-colorpicker`).\n * Register it in a schema's `fieldPlugins` to type matching custom fields.\n */\nexport const storyblokColorField = defineFieldPlugin({\n fieldType: 'storyblok-colorpicker',\n value: storyblokColorFieldValue,\n});\n"],"mappings":";;;;;;;;;AAcA,MAAM,2BAAuE,EAC3E,aAAa;CACX,SAAS;CACT,QAAQ;CACR,SAAS,OAAO;AACd,MAAI,SAAS,MAAM,IAAI,OAAO,MAAM,UAAU,SAC5C,QAAO,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,EAAE;AAE1C,SAAO,EAAE,QAAQ,CAAC;GAAE,SAAS;GAAuC,MAAM,CAAC,QAAQ;GAAE,CAAC,EAAE;;CAE3F,EACF;;;;;AAMD,MAAa,sBAAsB,kBAAkB;CACnD,WAAW;CACX,OAAO;CACR,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
//#region src/generated/capi/types.gen.d.ts
|
|
2
|
-
type StoryAlternate = {
|
|
3
|
-
id: number;
|
|
4
|
-
name: string;
|
|
5
|
-
slug: string;
|
|
6
|
-
published: boolean | null;
|
|
7
|
-
full_slug: string;
|
|
8
|
-
is_folder: boolean;
|
|
9
|
-
parent_id: number;
|
|
10
|
-
};
|
|
11
2
|
type Datasource = {
|
|
12
3
|
/**
|
|
13
4
|
* ID.
|
|
@@ -34,100 +25,6 @@ type Datasource = {
|
|
|
34
25
|
*/
|
|
35
26
|
updated_at?: string;
|
|
36
27
|
};
|
|
37
|
-
type DatasourceEntry = {
|
|
38
|
-
/**
|
|
39
|
-
* ID.
|
|
40
|
-
*/
|
|
41
|
-
id: number;
|
|
42
|
-
/**
|
|
43
|
-
* Name.
|
|
44
|
-
*/
|
|
45
|
-
name: string;
|
|
46
|
-
/**
|
|
47
|
-
* Given value in default dimension.
|
|
48
|
-
*/
|
|
49
|
-
value: string;
|
|
50
|
-
/**
|
|
51
|
-
* Given value in the requested dimension.
|
|
52
|
-
*/
|
|
53
|
-
dimension_value: string | null;
|
|
54
|
-
};
|
|
55
|
-
type Link = {
|
|
56
|
-
/**
|
|
57
|
-
* ID.
|
|
58
|
-
*/
|
|
59
|
-
id: number;
|
|
60
|
-
uuid: string;
|
|
61
|
-
/**
|
|
62
|
-
* The full slug of the story or folder.
|
|
63
|
-
*/
|
|
64
|
-
slug: string;
|
|
65
|
-
/**
|
|
66
|
-
* Real path defined in the story's entry configuration.
|
|
67
|
-
*/
|
|
68
|
-
path?: string | null;
|
|
69
|
-
/**
|
|
70
|
-
* Either the full slug of the story or folder with a leading /, or, if existent, the value of the real path defined in the story's entry configuration with a leading /.
|
|
71
|
-
*/
|
|
72
|
-
real_path?: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* The complete name of the story or folder.
|
|
75
|
-
*/
|
|
76
|
-
name: string;
|
|
77
|
-
/**
|
|
78
|
-
* true if a story is currently published, even if it has unpublished changes.
|
|
79
|
-
*/
|
|
80
|
-
published: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* ID of the parent folder.
|
|
83
|
-
*/
|
|
84
|
-
parent_id: number;
|
|
85
|
-
/**
|
|
86
|
-
* true if the instance constitutes a folder.
|
|
87
|
-
*/
|
|
88
|
-
is_folder: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* true if the story is defined as root for the folder.
|
|
91
|
-
*/
|
|
92
|
-
is_startpage: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Numeric representation of the story's position in the folder.
|
|
95
|
-
*/
|
|
96
|
-
position: number;
|
|
97
|
-
/**
|
|
98
|
-
* Latest publication timestamp (format is ISO 8601 standard in UTC).
|
|
99
|
-
*/
|
|
100
|
-
published_at?: string | null;
|
|
101
|
-
/**
|
|
102
|
-
* Creation timestamp (format is ISO 8601 standard in UTC).
|
|
103
|
-
*/
|
|
104
|
-
created_at?: string | null;
|
|
105
|
-
/**
|
|
106
|
-
* Latest update timestamp (format is ISO 8601 standard in UTC).
|
|
107
|
-
*/
|
|
108
|
-
updated_at?: string | null;
|
|
109
|
-
/**
|
|
110
|
-
* Alternate language variants.
|
|
111
|
-
*/
|
|
112
|
-
alternates?: Array<Alternate>;
|
|
113
|
-
};
|
|
114
|
-
type Tag = {
|
|
115
|
-
/**
|
|
116
|
-
* The name of the tag.
|
|
117
|
-
*/
|
|
118
|
-
name: string;
|
|
119
|
-
/**
|
|
120
|
-
* The minimum value of `taggings_count` is 1, not 0.
|
|
121
|
-
* - The number of tags with this name that exist in the space, or
|
|
122
|
-
* - The number of draft or published stories with this tag, or
|
|
123
|
-
* - The number of deleted stories with this tag.
|
|
124
|
-
*/
|
|
125
|
-
taggings_count?: number;
|
|
126
|
-
/**
|
|
127
|
-
* Only visible when passing the `all_tags` parameter. The number of stories currently associated with the tag, corresponding to the <strong>Assigned items</strong> column in the <a href='https://www.storyblok.com/docs/manuals/stories#tags'>Tags tab</a>.
|
|
128
|
-
*/
|
|
129
|
-
tag_on_stories?: number;
|
|
130
|
-
};
|
|
131
28
|
type Dimension = {
|
|
132
29
|
/**
|
|
133
30
|
* ID.
|
|
@@ -154,28 +51,6 @@ type Dimension = {
|
|
|
154
51
|
*/
|
|
155
52
|
updated_at?: string;
|
|
156
53
|
};
|
|
157
|
-
type Alternate = {
|
|
158
|
-
/**
|
|
159
|
-
* Translated slug (or parent slug if not installed).
|
|
160
|
-
*/
|
|
161
|
-
path: string;
|
|
162
|
-
/**
|
|
163
|
-
* Translated name of the story or folder.
|
|
164
|
-
*/
|
|
165
|
-
name: string;
|
|
166
|
-
/**
|
|
167
|
-
* Language code of this story variant.
|
|
168
|
-
*/
|
|
169
|
-
lang: string;
|
|
170
|
-
/**
|
|
171
|
-
* True if this variant is published.
|
|
172
|
-
*/
|
|
173
|
-
published: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Translated slug of the story.
|
|
176
|
-
*/
|
|
177
|
-
translated_slug: string;
|
|
178
|
-
};
|
|
179
54
|
//#endregion
|
|
180
|
-
export { Datasource
|
|
55
|
+
export { Datasource };
|
|
181
56
|
//# sourceMappingURL=types.gen.d.cts.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
//#region src/generated/capi/types.gen.d.ts
|
|
2
|
-
type StoryAlternate = {
|
|
3
|
-
id: number;
|
|
4
|
-
name: string;
|
|
5
|
-
slug: string;
|
|
6
|
-
published: boolean | null;
|
|
7
|
-
full_slug: string;
|
|
8
|
-
is_folder: boolean;
|
|
9
|
-
parent_id: number;
|
|
10
|
-
};
|
|
11
2
|
type Datasource = {
|
|
12
3
|
/**
|
|
13
4
|
* ID.
|
|
@@ -34,100 +25,6 @@ type Datasource = {
|
|
|
34
25
|
*/
|
|
35
26
|
updated_at?: string;
|
|
36
27
|
};
|
|
37
|
-
type DatasourceEntry = {
|
|
38
|
-
/**
|
|
39
|
-
* ID.
|
|
40
|
-
*/
|
|
41
|
-
id: number;
|
|
42
|
-
/**
|
|
43
|
-
* Name.
|
|
44
|
-
*/
|
|
45
|
-
name: string;
|
|
46
|
-
/**
|
|
47
|
-
* Given value in default dimension.
|
|
48
|
-
*/
|
|
49
|
-
value: string;
|
|
50
|
-
/**
|
|
51
|
-
* Given value in the requested dimension.
|
|
52
|
-
*/
|
|
53
|
-
dimension_value: string | null;
|
|
54
|
-
};
|
|
55
|
-
type Link = {
|
|
56
|
-
/**
|
|
57
|
-
* ID.
|
|
58
|
-
*/
|
|
59
|
-
id: number;
|
|
60
|
-
uuid: string;
|
|
61
|
-
/**
|
|
62
|
-
* The full slug of the story or folder.
|
|
63
|
-
*/
|
|
64
|
-
slug: string;
|
|
65
|
-
/**
|
|
66
|
-
* Real path defined in the story's entry configuration.
|
|
67
|
-
*/
|
|
68
|
-
path?: string | null;
|
|
69
|
-
/**
|
|
70
|
-
* Either the full slug of the story or folder with a leading /, or, if existent, the value of the real path defined in the story's entry configuration with a leading /.
|
|
71
|
-
*/
|
|
72
|
-
real_path?: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* The complete name of the story or folder.
|
|
75
|
-
*/
|
|
76
|
-
name: string;
|
|
77
|
-
/**
|
|
78
|
-
* true if a story is currently published, even if it has unpublished changes.
|
|
79
|
-
*/
|
|
80
|
-
published: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* ID of the parent folder.
|
|
83
|
-
*/
|
|
84
|
-
parent_id: number;
|
|
85
|
-
/**
|
|
86
|
-
* true if the instance constitutes a folder.
|
|
87
|
-
*/
|
|
88
|
-
is_folder: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* true if the story is defined as root for the folder.
|
|
91
|
-
*/
|
|
92
|
-
is_startpage: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Numeric representation of the story's position in the folder.
|
|
95
|
-
*/
|
|
96
|
-
position: number;
|
|
97
|
-
/**
|
|
98
|
-
* Latest publication timestamp (format is ISO 8601 standard in UTC).
|
|
99
|
-
*/
|
|
100
|
-
published_at?: string | null;
|
|
101
|
-
/**
|
|
102
|
-
* Creation timestamp (format is ISO 8601 standard in UTC).
|
|
103
|
-
*/
|
|
104
|
-
created_at?: string | null;
|
|
105
|
-
/**
|
|
106
|
-
* Latest update timestamp (format is ISO 8601 standard in UTC).
|
|
107
|
-
*/
|
|
108
|
-
updated_at?: string | null;
|
|
109
|
-
/**
|
|
110
|
-
* Alternate language variants.
|
|
111
|
-
*/
|
|
112
|
-
alternates?: Array<Alternate>;
|
|
113
|
-
};
|
|
114
|
-
type Tag = {
|
|
115
|
-
/**
|
|
116
|
-
* The name of the tag.
|
|
117
|
-
*/
|
|
118
|
-
name: string;
|
|
119
|
-
/**
|
|
120
|
-
* The minimum value of `taggings_count` is 1, not 0.
|
|
121
|
-
* - The number of tags with this name that exist in the space, or
|
|
122
|
-
* - The number of draft or published stories with this tag, or
|
|
123
|
-
* - The number of deleted stories with this tag.
|
|
124
|
-
*/
|
|
125
|
-
taggings_count?: number;
|
|
126
|
-
/**
|
|
127
|
-
* Only visible when passing the `all_tags` parameter. The number of stories currently associated with the tag, corresponding to the <strong>Assigned items</strong> column in the <a href='https://www.storyblok.com/docs/manuals/stories#tags'>Tags tab</a>.
|
|
128
|
-
*/
|
|
129
|
-
tag_on_stories?: number;
|
|
130
|
-
};
|
|
131
28
|
type Dimension = {
|
|
132
29
|
/**
|
|
133
30
|
* ID.
|
|
@@ -154,28 +51,6 @@ type Dimension = {
|
|
|
154
51
|
*/
|
|
155
52
|
updated_at?: string;
|
|
156
53
|
};
|
|
157
|
-
type Alternate = {
|
|
158
|
-
/**
|
|
159
|
-
* Translated slug (or parent slug if not installed).
|
|
160
|
-
*/
|
|
161
|
-
path: string;
|
|
162
|
-
/**
|
|
163
|
-
* Translated name of the story or folder.
|
|
164
|
-
*/
|
|
165
|
-
name: string;
|
|
166
|
-
/**
|
|
167
|
-
* Language code of this story variant.
|
|
168
|
-
*/
|
|
169
|
-
lang: string;
|
|
170
|
-
/**
|
|
171
|
-
* True if this variant is published.
|
|
172
|
-
*/
|
|
173
|
-
published: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Translated slug of the story.
|
|
176
|
-
*/
|
|
177
|
-
translated_slug: string;
|
|
178
|
-
};
|
|
179
54
|
//#endregion
|
|
180
|
-
export { Datasource
|
|
55
|
+
export { Datasource };
|
|
181
56
|
//# sourceMappingURL=types.gen.d.mts.map
|
|
@@ -141,176 +141,6 @@ type Component = {
|
|
|
141
141
|
[key: string]: unknown;
|
|
142
142
|
} | null;
|
|
143
143
|
};
|
|
144
|
-
type ComponentCreate = {
|
|
145
|
-
/**
|
|
146
|
-
* Name of the component
|
|
147
|
-
*/
|
|
148
|
-
name: string;
|
|
149
|
-
/**
|
|
150
|
-
* Human-readable display name
|
|
151
|
-
*/
|
|
152
|
-
display_name?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Component description
|
|
155
|
-
*/
|
|
156
|
-
description?: string;
|
|
157
|
-
/**
|
|
158
|
-
* Preview template HTML
|
|
159
|
-
*/
|
|
160
|
-
preview_tmpl?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Component image URL
|
|
163
|
-
*/
|
|
164
|
-
image?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Field used for preview
|
|
167
|
-
*/
|
|
168
|
-
preview_field?: string;
|
|
169
|
-
/**
|
|
170
|
-
* Whether this component can be used as a root component
|
|
171
|
-
*/
|
|
172
|
-
is_root?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Whether this component can be nested inside other components
|
|
175
|
-
*/
|
|
176
|
-
is_nestable?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Default preset ID
|
|
179
|
-
*/
|
|
180
|
-
preset_id?: number;
|
|
181
|
-
/**
|
|
182
|
-
* UUID
|
|
183
|
-
*/
|
|
184
|
-
component_group_uuid?: string;
|
|
185
|
-
/**
|
|
186
|
-
* Component color for UI display
|
|
187
|
-
*/
|
|
188
|
-
color?: string;
|
|
189
|
-
/**
|
|
190
|
-
* Component icon name
|
|
191
|
-
*/
|
|
192
|
-
icon?: string;
|
|
193
|
-
/**
|
|
194
|
-
* Asset preview URL for content type
|
|
195
|
-
*/
|
|
196
|
-
content_type_asset_preview?: string;
|
|
197
|
-
/**
|
|
198
|
-
* List of internal tag IDs
|
|
199
|
-
*/
|
|
200
|
-
internal_tag_ids?: Array<number>;
|
|
201
|
-
/**
|
|
202
|
-
* Component field schema definition
|
|
203
|
-
*/
|
|
204
|
-
schema?: {
|
|
205
|
-
[key: string]: {
|
|
206
|
-
type?: 'bloks' | 'text' | 'textarea' | 'richtext' | 'markdown' | 'number' | 'datetime' | 'boolean' | 'options' | 'option' | 'asset' | 'multiasset' | 'multilink' | 'table' | 'section' | 'commerce' | 'custom' | 'image' | 'file' | 'tab' | 'link' | 'group';
|
|
207
|
-
/**
|
|
208
|
-
* Human-readable field name
|
|
209
|
-
*/
|
|
210
|
-
display_name?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Whether this field is required
|
|
213
|
-
*/
|
|
214
|
-
required?: boolean;
|
|
215
|
-
/**
|
|
216
|
-
* Whether this field is translatable
|
|
217
|
-
*/
|
|
218
|
-
translatable?: boolean;
|
|
219
|
-
[key: string]: unknown | 'bloks' | 'text' | 'textarea' | 'richtext' | 'markdown' | 'number' | 'datetime' | 'boolean' | 'options' | 'option' | 'asset' | 'multiasset' | 'multilink' | 'table' | 'section' | 'commerce' | 'custom' | 'image' | 'file' | 'tab' | 'link' | 'group' | string | boolean | undefined;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Component metadata
|
|
224
|
-
*/
|
|
225
|
-
metadata?: {
|
|
226
|
-
[key: string]: unknown;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
type ComponentUpdate = {
|
|
230
|
-
/**
|
|
231
|
-
* Name of the component
|
|
232
|
-
*/
|
|
233
|
-
name?: string;
|
|
234
|
-
/**
|
|
235
|
-
* Human-readable display name
|
|
236
|
-
*/
|
|
237
|
-
display_name?: string;
|
|
238
|
-
/**
|
|
239
|
-
* Component description
|
|
240
|
-
*/
|
|
241
|
-
description?: string;
|
|
242
|
-
/**
|
|
243
|
-
* Preview template HTML
|
|
244
|
-
*/
|
|
245
|
-
preview_tmpl?: string;
|
|
246
|
-
/**
|
|
247
|
-
* Component image URL
|
|
248
|
-
*/
|
|
249
|
-
image?: string;
|
|
250
|
-
/**
|
|
251
|
-
* Field used for preview
|
|
252
|
-
*/
|
|
253
|
-
preview_field?: string;
|
|
254
|
-
/**
|
|
255
|
-
* Whether this component can be used as a root component
|
|
256
|
-
*/
|
|
257
|
-
is_root?: boolean;
|
|
258
|
-
/**
|
|
259
|
-
* Whether this component can be nested inside other components
|
|
260
|
-
*/
|
|
261
|
-
is_nestable?: boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Default preset ID
|
|
264
|
-
*/
|
|
265
|
-
preset_id?: number;
|
|
266
|
-
/**
|
|
267
|
-
* UUID
|
|
268
|
-
*/
|
|
269
|
-
component_group_uuid?: string;
|
|
270
|
-
/**
|
|
271
|
-
* Component color for UI display
|
|
272
|
-
*/
|
|
273
|
-
color?: string;
|
|
274
|
-
/**
|
|
275
|
-
* Component icon name
|
|
276
|
-
*/
|
|
277
|
-
icon?: string;
|
|
278
|
-
/**
|
|
279
|
-
* Asset preview URL for content type
|
|
280
|
-
*/
|
|
281
|
-
content_type_asset_preview?: string;
|
|
282
|
-
/**
|
|
283
|
-
* List of internal tag IDs
|
|
284
|
-
*/
|
|
285
|
-
internal_tag_ids?: Array<number>;
|
|
286
|
-
/**
|
|
287
|
-
* Component field schema definition
|
|
288
|
-
*/
|
|
289
|
-
schema?: {
|
|
290
|
-
[key: string]: {
|
|
291
|
-
type?: 'bloks' | 'text' | 'textarea' | 'richtext' | 'markdown' | 'number' | 'datetime' | 'boolean' | 'options' | 'option' | 'asset' | 'multiasset' | 'multilink' | 'table' | 'section' | 'commerce' | 'custom' | 'image' | 'file' | 'tab' | 'link' | 'group';
|
|
292
|
-
/**
|
|
293
|
-
* Human-readable field name
|
|
294
|
-
*/
|
|
295
|
-
display_name?: string;
|
|
296
|
-
/**
|
|
297
|
-
* Whether this field is required
|
|
298
|
-
*/
|
|
299
|
-
required?: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* Whether this field is translatable
|
|
302
|
-
*/
|
|
303
|
-
translatable?: boolean;
|
|
304
|
-
[key: string]: unknown | 'bloks' | 'text' | 'textarea' | 'richtext' | 'markdown' | 'number' | 'datetime' | 'boolean' | 'options' | 'option' | 'asset' | 'multiasset' | 'multilink' | 'table' | 'section' | 'commerce' | 'custom' | 'image' | 'file' | 'tab' | 'link' | 'group' | string | boolean | undefined;
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* Component metadata
|
|
309
|
-
*/
|
|
310
|
-
metadata?: {
|
|
311
|
-
[key: string]: unknown;
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
144
|
type MapiStory = {
|
|
315
145
|
name: string;
|
|
316
146
|
/**
|
|
@@ -679,5 +509,5 @@ type Stage = {
|
|
|
679
509
|
created_at: string;
|
|
680
510
|
};
|
|
681
511
|
//#endregion
|
|
682
|
-
export { Component,
|
|
512
|
+
export { Component, MapiStory, StoryCreate, StoryUpdate };
|
|
683
513
|
//# sourceMappingURL=_internal.gen.d.cts.map
|