@panneau/protocol 5.0.0-alpha.4 → 5.0.0-alpha.41
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/addresses.d.ts +23 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/addresses.js +52 -0
- package/dist/addresses.js.map +1 -0
- package/dist/aggregates.d.ts +135 -0
- package/dist/aggregates.d.ts.map +1 -0
- package/dist/aggregates.js +236 -0
- package/dist/aggregates.js.map +1 -0
- package/dist/compound.d.ts +20 -0
- package/dist/compound.d.ts.map +1 -0
- package/dist/compound.js +27 -0
- package/dist/compound.js.map +1 -0
- package/dist/conditions.d.ts +1 -1
- package/dist/conformance/index.d.ts +6 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +970 -11
- package/dist/conformance/index.js.map +1 -1
- package/dist/constants.d.ts +108 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +181 -3
- package/dist/constants.js.map +1 -1
- package/dist/context.d.ts +15 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +34 -0
- package/dist/context.js.map +1 -0
- package/dist/currencies.d.ts +22 -0
- package/dist/currencies.d.ts.map +1 -0
- package/dist/currencies.js +231 -0
- package/dist/currencies.js.map +1 -0
- package/dist/dashboards.d.ts +95 -0
- package/dist/dashboards.d.ts.map +1 -0
- package/dist/dashboards.js +140 -0
- package/dist/dashboards.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +22 -8
- package/dist/libraries.d.ts +33 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +59 -0
- package/dist/libraries.js.map +1 -0
- package/dist/links.d.ts +38 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +65 -0
- package/dist/links.js.map +1 -0
- package/dist/lint.d.ts +4 -4
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +540 -15
- package/dist/lint.js.map +1 -1
- package/dist/mock/auth.d.ts +71 -0
- package/dist/mock/auth.d.ts.map +1 -0
- package/dist/mock/auth.js +346 -0
- package/dist/mock/auth.js.map +1 -0
- package/dist/mock/example.d.ts +1 -1
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +49 -28
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts +96 -5
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +505 -44
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +462 -50
- package/dist/openapi.js.map +1 -1
- package/dist/periods.d.ts +61 -0
- package/dist/periods.d.ts.map +1 -0
- package/dist/periods.js +130 -0
- package/dist/periods.js.map +1 -0
- package/dist/problem.d.ts +1 -1
- package/dist/query.d.ts +18 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +34 -8
- package/dist/query.js.map +1 -1
- package/dist/resourceTypes.d.ts +39 -0
- package/dist/resourceTypes.d.ts.map +1 -0
- package/dist/resourceTypes.js +34 -0
- package/dist/resourceTypes.js.map +1 -0
- package/dist/rules.d.ts +18 -5
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +233 -15
- package/dist/rules.js.map +1 -1
- package/dist/runtime/index.d.ts +23 -10
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +16 -3
- package/dist/schemas/action.d.ts +119 -10
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/action.js +20 -3
- package/dist/schemas/action.js.map +1 -1
- package/dist/schemas/api.d.ts +266 -5
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +134 -16
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/boot.d.ts +25 -1
- package/dist/schemas/boot.d.ts.map +1 -1
- package/dist/schemas/boot.js +2 -1
- package/dist/schemas/boot.js.map +1 -1
- package/dist/schemas/common.d.ts +1 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +2 -1
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/definition.d.ts +1414 -30
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +77 -17
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.d.ts +358 -2
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +161 -20
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +5820 -46
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +69 -7
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/jsonRules.d.ts +83 -0
- package/dist/schemas/jsonRules.d.ts.map +1 -0
- package/dist/schemas/jsonRules.js +46 -0
- package/dist/schemas/jsonRules.js.map +1 -0
- package/dist/schemas/layout.d.ts +2 -1
- package/dist/schemas/layout.d.ts.map +1 -1
- package/dist/schemas/layout.js +2 -1
- package/dist/schemas/layout.js.map +1 -1
- package/dist/schemas/list.d.ts +34 -2
- package/dist/schemas/list.d.ts.map +1 -1
- package/dist/schemas/list.js +21 -6
- package/dist/schemas/list.js.map +1 -1
- package/dist/schemas/resource.d.ts +826 -17
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +26 -4
- package/dist/schemas/resource.js.map +1 -1
- package/dist/schemas/theme.d.ts +6 -2
- package/dist/schemas/theme.d.ts.map +1 -1
- package/dist/schemas/theme.js +1 -0
- package/dist/schemas/theme.js.map +1 -1
- package/dist/schemas/widget.d.ts +4379 -0
- package/dist/schemas/widget.d.ts.map +1 -0
- package/dist/schemas/widget.js +269 -0
- package/dist/schemas/widget.js.map +1 -0
- package/dist/search.d.ts +51 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +53 -0
- package/dist/search.js.map +1 -0
- package/dist/themes.d.ts +1 -1
- package/dist/transforms.d.ts +17 -0
- package/dist/transforms.d.ts.map +1 -0
- package/dist/transforms.js +34 -0
- package/dist/transforms.js.map +1 -0
- package/dist/validate.d.ts +5 -3
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +36 -2
- package/dist/validate.js.map +1 -1
- package/dist/values.d.ts +5 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +16 -2
- package/dist/values.js.map +1 -1
- package/dist/widgets.d.ts +232 -0
- package/dist/widgets.d.ts.map +1 -0
- package/dist/widgets.js +630 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +6 -3
- package/schema/boot.schema.json +1461 -104
- package/schema/definition.schema.json +1459 -105
- package/schema/openapi.json +7176 -2000
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAsBH,cAAc,EAoBjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,SAAS,EAA8B,MAAM,UAAU,CAAC;AAC5E,OAAO,EASH,QAAQ,EAIX,MAAM,cAAc,CAAC;AACtB,OAAO,EAEH,SAAS,EAGT,KAAK,EAOR,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA4CtC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AAEvB,wGAAwG;AACxG,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHY,CAAC;AAEtC,0FAA0F;AAC1F,wBAAgB,oBAAoB;QACE,MAAM;4GAK3C"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Abilities, Condition, Id, Option, RouteReference } from "./common.js";
|
|
2
|
-
import { BlockType, Field, Rule } from "./field.js";
|
|
2
|
+
import { AddressSettings, BlockType, DateRangeSettings, DurationSettings, Field, LinkSettings, LinkTypeSetting, MoneySettings, RichTextSettings, RichTextStyle, Rule } from "./field.js";
|
|
3
|
+
import { actionJsonRules } from "./jsonRules.js";
|
|
3
4
|
import { LayoutNode } from "./layout.js";
|
|
4
5
|
import { Action, ActionConfirm, ActionPlacement, ActionScope } from "./action.js";
|
|
5
|
-
import { Column, Filter, ListDefinition } from "./list.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Column, Filter, ListAggregates, ListCalendar, ListDefinition } from "./list.js";
|
|
7
|
+
import { BreakdownWidgetData, BreakdownWidgetItem, ListWidgetData, ListWidgetItem, MetricWidgetData, OverviewPeriod, SeriesPoint, SeriesWidgetData, SeriesWidgetSeries, StatWidgetData, TableWidgetCell, TableWidgetColumn, TableWidgetData, TableWidgetRow, Widget, WidgetAlert, WidgetAlertSettings, WidgetBadge, WidgetNumberFormat, WidgetRowSource, WidgetSeriesSource, WidgetSettings, widgetDataSchemas } from "./widget.js";
|
|
8
|
+
import { Resource, ResourceFeatures, ResourceSummary, ResourceType, SummaryPeriod } from "./resource.js";
|
|
7
9
|
import { DefinitionTheme, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues } from "./theme.js";
|
|
8
|
-
import { Auth, AuthProvider, Definition, MenuItem, Page, Uploads, User
|
|
9
|
-
import { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, Item, ItemResponse, ListResponse, MediaInfo, MediaItem, MediaReference, MediaTransform, Pagination, PreviewResponse, Problem, SearchResponse, Selection, Session, StoredFile, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse } from "./api.js";
|
|
10
|
+
import { Auth, AuthProvider, AuthToken, ContextOption, ContextParam, Definition, DefinitionContext, InterfaceLocale, MenuItem, Page, Uploads, User } from "./definition.js";
|
|
11
|
+
import { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, AddressValue, ContextOptionsResponse, CursorPagination, DateRangeValue, EmbedResponse, EmbedValue, FieldCheckRequest, FieldCheckResponse, Item, ItemResponse, LinkValue, ListResponse, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, MoneyValue, Pagination, Passkey, PreviewResponse, Problem, RecoveryCodes, SearchResponse, Selection, Session, StoredFile, TwoFactorChallenge, TwoFactorSetup, TwoFactorStatus, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, WebAuthnOptions } from "./api.js";
|
|
10
12
|
import { BootConfig } from "./boot.js";
|
|
11
13
|
import { z } from "zod";
|
|
12
14
|
//#region src/schemas/index.ts
|
|
@@ -20,23 +22,47 @@ var namedSchemas = {
|
|
|
20
22
|
Rule,
|
|
21
23
|
BlockType,
|
|
22
24
|
Field,
|
|
25
|
+
RichTextStyle,
|
|
26
|
+
RichTextSettings,
|
|
27
|
+
LinkTypeSetting,
|
|
28
|
+
LinkSettings,
|
|
29
|
+
AddressSettings,
|
|
30
|
+
DateRangeSettings,
|
|
31
|
+
MoneySettings,
|
|
32
|
+
DurationSettings,
|
|
23
33
|
LayoutNode,
|
|
24
34
|
Column,
|
|
25
35
|
Filter,
|
|
36
|
+
ListCalendar,
|
|
37
|
+
ListAggregates,
|
|
26
38
|
ListDefinition,
|
|
27
39
|
ActionScope,
|
|
28
40
|
ActionPlacement,
|
|
29
41
|
ActionConfirm,
|
|
30
42
|
Action,
|
|
31
43
|
ResourceFeatures,
|
|
44
|
+
ResourceType,
|
|
45
|
+
SummaryPeriod,
|
|
46
|
+
ResourceSummary,
|
|
32
47
|
Resource,
|
|
33
48
|
User,
|
|
34
49
|
AuthProvider,
|
|
50
|
+
AuthToken,
|
|
35
51
|
Auth,
|
|
52
|
+
InterfaceLocale,
|
|
36
53
|
MenuItem,
|
|
37
54
|
Page,
|
|
55
|
+
WidgetNumberFormat,
|
|
56
|
+
WidgetAlertSettings,
|
|
57
|
+
WidgetSeriesSource,
|
|
58
|
+
WidgetRowSource,
|
|
59
|
+
WidgetSettings,
|
|
60
|
+
OverviewPeriod,
|
|
38
61
|
Widget,
|
|
39
62
|
Uploads,
|
|
63
|
+
ContextOption,
|
|
64
|
+
ContextParam,
|
|
65
|
+
DefinitionContext,
|
|
40
66
|
ThemeTokens,
|
|
41
67
|
ToneValues,
|
|
42
68
|
ToneInput,
|
|
@@ -48,6 +74,7 @@ var namedSchemas = {
|
|
|
48
74
|
Definition,
|
|
49
75
|
Item,
|
|
50
76
|
Pagination,
|
|
77
|
+
CursorPagination,
|
|
51
78
|
ItemResponse,
|
|
52
79
|
ListResponse,
|
|
53
80
|
Problem,
|
|
@@ -64,20 +91,55 @@ var namedSchemas = {
|
|
|
64
91
|
UploadResponse,
|
|
65
92
|
UploadSignRequest,
|
|
66
93
|
UploadSignResponse,
|
|
94
|
+
FieldCheckRequest,
|
|
95
|
+
FieldCheckResponse,
|
|
67
96
|
MediaInfo,
|
|
68
97
|
MediaItem,
|
|
69
98
|
MediaReference,
|
|
70
99
|
Session,
|
|
100
|
+
TwoFactorChallenge,
|
|
101
|
+
TwoFactorStatus,
|
|
102
|
+
TwoFactorSetup,
|
|
103
|
+
RecoveryCodes,
|
|
104
|
+
WebAuthnOptions,
|
|
105
|
+
Passkey,
|
|
71
106
|
SearchResponse,
|
|
72
|
-
|
|
107
|
+
ContextOptionsResponse,
|
|
108
|
+
PreviewResponse,
|
|
109
|
+
EmbedValue,
|
|
110
|
+
EmbedResponse,
|
|
111
|
+
LocationValue,
|
|
112
|
+
AddressValue,
|
|
113
|
+
LinkValue,
|
|
114
|
+
DateRangeValue,
|
|
115
|
+
MoneyValue,
|
|
116
|
+
WidgetBadge,
|
|
117
|
+
StatWidgetData,
|
|
118
|
+
SeriesPoint,
|
|
119
|
+
SeriesWidgetData,
|
|
120
|
+
ListWidgetItem,
|
|
121
|
+
ListWidgetData,
|
|
122
|
+
BreakdownWidgetItem,
|
|
123
|
+
BreakdownWidgetData,
|
|
124
|
+
WidgetAlert,
|
|
125
|
+
SeriesWidgetSeries,
|
|
126
|
+
MetricWidgetData,
|
|
127
|
+
TableWidgetColumn,
|
|
128
|
+
TableWidgetCell,
|
|
129
|
+
TableWidgetRow,
|
|
130
|
+
TableWidgetData
|
|
73
131
|
};
|
|
74
132
|
/** A registry of the named schemas, used to reference them by name in generated files. */
|
|
75
133
|
function createSchemaRegistry() {
|
|
76
134
|
const registry = z.registry();
|
|
77
135
|
Object.entries(namedSchemas).forEach(([id, schema]) => registry.add(schema, { id }));
|
|
136
|
+
registry.add(Action, {
|
|
137
|
+
id: "Action",
|
|
138
|
+
...actionJsonRules
|
|
139
|
+
});
|
|
78
140
|
return registry;
|
|
79
141
|
}
|
|
80
142
|
//#endregion
|
|
81
|
-
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, Auth, AuthProvider, BlockType, BootConfig, Column, Condition, Definition, DefinitionTheme, Field, Filter, Id, Item, ItemResponse, LayoutNode, ListDefinition, ListResponse, MediaInfo, MediaItem, MediaReference, MediaTransform, MenuItem, Option, Page, Pagination, PreviewResponse, Problem, Resource, ResourceFeatures, RouteReference, Rule, SearchResponse, Selection, Session, StoredFile, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, Uploads, User, Widget, createSchemaRegistry, namedSchemas };
|
|
143
|
+
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, AddressSettings, AddressValue, Auth, AuthProvider, AuthToken, BlockType, BootConfig, BreakdownWidgetData, BreakdownWidgetItem, Column, Condition, ContextOption, ContextOptionsResponse, ContextParam, CursorPagination, DateRangeSettings, DateRangeValue, Definition, DefinitionContext, DefinitionTheme, DurationSettings, EmbedResponse, EmbedValue, Field, FieldCheckRequest, FieldCheckResponse, Filter, Id, InterfaceLocale, Item, ItemResponse, LayoutNode, LinkSettings, LinkTypeSetting, LinkValue, ListAggregates, ListCalendar, ListDefinition, ListResponse, ListWidgetData, ListWidgetItem, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, MenuItem, MetricWidgetData, MoneySettings, MoneyValue, Option, OverviewPeriod, Page, Pagination, Passkey, PreviewResponse, Problem, RecoveryCodes, Resource, ResourceFeatures, ResourceSummary, ResourceType, RichTextSettings, RichTextStyle, RouteReference, Rule, SearchResponse, Selection, SeriesPoint, SeriesWidgetData, SeriesWidgetSeries, Session, StatWidgetData, StoredFile, SummaryPeriod, TableWidgetCell, TableWidgetColumn, TableWidgetData, TableWidgetRow, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues, TwoFactorChallenge, TwoFactorSetup, TwoFactorStatus, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, Uploads, User, WebAuthnOptions, Widget, WidgetAlert, WidgetAlertSettings, WidgetBadge, WidgetNumberFormat, WidgetRowSource, WidgetSeriesSource, WidgetSettings, createSchemaRegistry, namedSchemas, widgetDataSchemas };
|
|
82
144
|
|
|
83
145
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n Item,\n ItemResponse,\n ListResponse,\n MediaInfo,\n MediaItem,\n MediaReference,\n MediaTransform,\n Pagination,\n PreviewResponse,\n Problem,\n SearchResponse,\n Selection,\n Session,\n StoredFile,\n Upload,\n UploadReference,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n Definition,\n MenuItem,\n Page,\n Uploads,\n User,\n
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n AddressValue,\n ContextOptionsResponse,\n CursorPagination,\n DateRangeValue,\n EmbedResponse,\n EmbedValue,\n FieldCheckRequest,\n FieldCheckResponse,\n Item,\n ItemResponse,\n LinkValue,\n ListResponse,\n LocationValue,\n MediaInfo,\n MediaItem,\n MediaReference,\n MediaTransform,\n MoneyValue,\n Pagination,\n Passkey,\n PreviewResponse,\n Problem,\n RecoveryCodes,\n SearchResponse,\n Selection,\n Session,\n StoredFile,\n TwoFactorChallenge,\n TwoFactorSetup,\n TwoFactorStatus,\n Upload,\n UploadReference,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n WebAuthnOptions,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n AuthToken,\n ContextOption,\n ContextParam,\n Definition,\n DefinitionContext,\n InterfaceLocale,\n MenuItem,\n Page,\n Uploads,\n User,\n} from './definition';\nimport {\n AddressSettings,\n BlockType,\n DateRangeSettings,\n DurationSettings,\n Field,\n LinkSettings,\n LinkTypeSetting,\n MoneySettings,\n RichTextSettings,\n RichTextStyle,\n Rule,\n} from './field';\nimport { actionJsonRules } from './jsonRules';\nimport { LayoutNode } from './layout';\nimport { Column, Filter, ListAggregates, ListCalendar, ListDefinition } from './list';\nimport {\n Resource,\n ResourceFeatures,\n ResourceSummary,\n ResourceType,\n SummaryPeriod,\n} from './resource';\nimport {\n DefinitionTheme,\n Theme,\n ThemeFont,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeTokens,\n ToneInput,\n ToneValues,\n} from './theme';\nimport {\n BreakdownWidgetData,\n BreakdownWidgetItem,\n ListWidgetData,\n ListWidgetItem,\n MetricWidgetData,\n OverviewPeriod,\n SeriesPoint,\n SeriesWidgetData,\n SeriesWidgetSeries,\n StatWidgetData,\n TableWidgetCell,\n TableWidgetColumn,\n TableWidgetData,\n TableWidgetRow,\n Widget,\n WidgetAlert,\n WidgetAlertSettings,\n WidgetBadge,\n WidgetNumberFormat,\n WidgetRowSource,\n WidgetSeriesSource,\n WidgetSettings,\n} from './widget';\n\nexport * from './common';\nexport * from './field';\nexport * from './layout';\nexport * from './list';\nexport * from './action';\nexport * from './resource';\nexport * from './theme';\nexport * from './widget';\nexport * from './definition';\nexport * from './api';\nexport * from './boot';\n\n/** The named schemas of the protocol, as they appear in the generated JSON Schema and OpenAPI files. */\nexport const namedSchemas = {\n Id,\n Abilities,\n RouteReference,\n Condition,\n Option,\n Rule,\n BlockType,\n Field,\n RichTextStyle,\n RichTextSettings,\n LinkTypeSetting,\n LinkSettings,\n AddressSettings,\n DateRangeSettings,\n MoneySettings,\n DurationSettings,\n LayoutNode,\n Column,\n Filter,\n ListCalendar,\n ListAggregates,\n ListDefinition,\n ActionScope,\n ActionPlacement,\n ActionConfirm,\n Action,\n ResourceFeatures,\n ResourceType,\n SummaryPeriod,\n ResourceSummary,\n Resource,\n User,\n AuthProvider,\n AuthToken,\n Auth,\n InterfaceLocale,\n MenuItem,\n Page,\n WidgetNumberFormat,\n WidgetAlertSettings,\n WidgetSeriesSource,\n WidgetRowSource,\n WidgetSettings,\n OverviewPeriod,\n Widget,\n Uploads,\n ContextOption,\n ContextParam,\n DefinitionContext,\n ThemeTokens,\n ToneValues,\n ToneInput,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeFont,\n Theme,\n DefinitionTheme,\n Definition,\n Item,\n Pagination,\n CursorPagination,\n ItemResponse,\n ListResponse,\n Problem,\n Selection,\n ActionRequest,\n ActionItemResult,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n MediaTransform,\n StoredFile,\n UploadReference,\n Upload,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n FieldCheckRequest,\n FieldCheckResponse,\n MediaInfo,\n MediaItem,\n MediaReference,\n Session,\n TwoFactorChallenge,\n TwoFactorStatus,\n TwoFactorSetup,\n RecoveryCodes,\n WebAuthnOptions,\n Passkey,\n SearchResponse,\n ContextOptionsResponse,\n PreviewResponse,\n EmbedValue,\n EmbedResponse,\n LocationValue,\n AddressValue,\n LinkValue,\n DateRangeValue,\n MoneyValue,\n WidgetBadge,\n StatWidgetData,\n SeriesPoint,\n SeriesWidgetData,\n ListWidgetItem,\n ListWidgetData,\n BreakdownWidgetItem,\n BreakdownWidgetData,\n WidgetAlert,\n SeriesWidgetSeries,\n MetricWidgetData,\n TableWidgetColumn,\n TableWidgetCell,\n TableWidgetRow,\n TableWidgetData,\n} satisfies Record<string, z.ZodType>;\n\n/** A registry of the named schemas, used to reference them by name in generated files. */\nexport function createSchemaRegistry() {\n const registry = z.registry<{ id: string } & Record<string, unknown>>();\n Object.entries(namedSchemas).forEach(([id, schema]) => registry.add(schema, { id }));\n // Checks that Zod makes in code, which the JSON Schema of the definition must make too.\n registry.add(Action, { id: 'Action', ...actionJsonRules });\n return registry;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoIA,IAAa,eAAe;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;AAGA,SAAgB,uBAAuB;CACnC,MAAM,WAAW,EAAE,SAAmD;CACtE,OAAO,QAAQ,YAAY,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,SAAS,IAAI,QAAQ,EAAE,GAAG,CAAC,CAAC;CAEnF,SAAS,IAAI,QAAQ;EAAE,IAAI;EAAU,GAAG;CAAgB,CAAC;CACzD,OAAO;AACX"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The checks of `Action` that its `superRefine` makes in Zod, as JSON Schema keywords, so that the
|
|
3
|
+
* generated files check them too: backends validate their definitions against those files.
|
|
4
|
+
*/
|
|
5
|
+
export declare const actionJsonRules: {
|
|
6
|
+
allOf: ({
|
|
7
|
+
if: {
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
enum: ("show" | "edit" | "duplicate" | "delete")[];
|
|
11
|
+
not?: undefined;
|
|
12
|
+
};
|
|
13
|
+
kind?: undefined;
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
16
|
+
};
|
|
17
|
+
else: {
|
|
18
|
+
required: string[];
|
|
19
|
+
};
|
|
20
|
+
then?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
if: {
|
|
23
|
+
properties: {
|
|
24
|
+
id: {
|
|
25
|
+
enum: ("show" | "edit")[];
|
|
26
|
+
not?: undefined;
|
|
27
|
+
};
|
|
28
|
+
kind?: undefined;
|
|
29
|
+
};
|
|
30
|
+
required: string[];
|
|
31
|
+
};
|
|
32
|
+
then: {
|
|
33
|
+
properties: {
|
|
34
|
+
kind: {
|
|
35
|
+
const: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
required: string[];
|
|
39
|
+
anyOf?: undefined;
|
|
40
|
+
};
|
|
41
|
+
else?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
if: {
|
|
44
|
+
properties: {
|
|
45
|
+
kind: {
|
|
46
|
+
const: string;
|
|
47
|
+
};
|
|
48
|
+
id: {
|
|
49
|
+
not: {
|
|
50
|
+
enum: ("show" | "edit")[];
|
|
51
|
+
};
|
|
52
|
+
enum?: undefined;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
required: string[];
|
|
56
|
+
};
|
|
57
|
+
then: {
|
|
58
|
+
anyOf: {
|
|
59
|
+
required: string[];
|
|
60
|
+
}[];
|
|
61
|
+
properties?: undefined;
|
|
62
|
+
required?: undefined;
|
|
63
|
+
};
|
|
64
|
+
else?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
if: {
|
|
67
|
+
properties: {
|
|
68
|
+
kind: {
|
|
69
|
+
const: string;
|
|
70
|
+
};
|
|
71
|
+
id?: undefined;
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
then: {
|
|
76
|
+
required: string[];
|
|
77
|
+
properties?: undefined;
|
|
78
|
+
anyOf?: undefined;
|
|
79
|
+
};
|
|
80
|
+
else?: undefined;
|
|
81
|
+
})[];
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=jsonRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonRules.d.ts","sourceRoot":"","sources":["../../src/schemas/jsonRules.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B3B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BUILT_IN_ITEM_ACTIONS, BUILT_IN_LINK_ACTIONS } from "../constants.js";
|
|
2
|
+
//#region src/schemas/jsonRules.ts
|
|
3
|
+
/**
|
|
4
|
+
* The checks of `Action` that its `superRefine` makes in Zod, as JSON Schema keywords, so that the
|
|
5
|
+
* generated files check them too: backends validate their definitions against those files.
|
|
6
|
+
*/
|
|
7
|
+
var actionJsonRules = { allOf: [
|
|
8
|
+
{
|
|
9
|
+
if: {
|
|
10
|
+
properties: { id: { enum: [...BUILT_IN_ITEM_ACTIONS] } },
|
|
11
|
+
required: ["id"]
|
|
12
|
+
},
|
|
13
|
+
else: { required: ["label"] }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
if: {
|
|
17
|
+
properties: { id: { enum: [...BUILT_IN_LINK_ACTIONS] } },
|
|
18
|
+
required: ["id"]
|
|
19
|
+
},
|
|
20
|
+
then: {
|
|
21
|
+
properties: { kind: { const: "link" } },
|
|
22
|
+
required: ["kind"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
if: {
|
|
27
|
+
properties: {
|
|
28
|
+
kind: { const: "link" },
|
|
29
|
+
id: { not: { enum: [...BUILT_IN_LINK_ACTIONS] } }
|
|
30
|
+
},
|
|
31
|
+
required: ["kind", "id"]
|
|
32
|
+
},
|
|
33
|
+
then: { anyOf: [{ required: ["url"] }, { required: ["route"] }] }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
if: {
|
|
37
|
+
properties: { kind: { const: "client" } },
|
|
38
|
+
required: ["kind"]
|
|
39
|
+
},
|
|
40
|
+
then: { required: ["component"] }
|
|
41
|
+
}
|
|
42
|
+
] };
|
|
43
|
+
//#endregion
|
|
44
|
+
export { actionJsonRules };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=jsonRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonRules.js","names":[],"sources":["../../src/schemas/jsonRules.ts"],"sourcesContent":["import { BUILT_IN_ITEM_ACTIONS, BUILT_IN_LINK_ACTIONS } from '../constants';\n\n/**\n * The checks of `Action` that its `superRefine` makes in Zod, as JSON Schema keywords, so that the\n * generated files check them too: backends validate their definitions against those files.\n */\nexport const actionJsonRules = {\n allOf: [\n {\n // The built-in item actions need no label: the client labels them.\n if: { properties: { id: { enum: [...BUILT_IN_ITEM_ACTIONS] } }, required: ['id'] },\n else: { required: ['label'] },\n },\n {\n // The ids of the built-in links are only for links.\n if: { properties: { id: { enum: [...BUILT_IN_LINK_ACTIONS] } }, required: ['id'] },\n then: { properties: { kind: { const: 'link' } }, required: ['kind'] },\n },\n {\n if: {\n properties: {\n kind: { const: 'link' },\n id: { not: { enum: [...BUILT_IN_LINK_ACTIONS] } },\n },\n required: ['kind', 'id'],\n },\n then: { anyOf: [{ required: ['url'] }, { required: ['route'] }] },\n },\n {\n if: { properties: { kind: { const: 'client' } }, required: ['kind'] },\n then: { required: ['component'] },\n },\n ],\n};\n"],"mappings":";;;;;;AAMA,IAAa,kBAAkB,EAC3B,OAAO;CACH;EAEI,IAAI;GAAE,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,qBAAqB,EAAE,EAAE;GAAG,UAAU,CAAC,IAAI;EAAE;EACjF,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE;CAChC;CACA;EAEI,IAAI;GAAE,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,qBAAqB,EAAE,EAAE;GAAG,UAAU,CAAC,IAAI;EAAE;EACjF,MAAM;GAAE,YAAY,EAAE,MAAM,EAAE,OAAO,OAAO,EAAE;GAAG,UAAU,CAAC,MAAM;EAAE;CACxE;CACA;EACI,IAAI;GACA,YAAY;IACR,MAAM,EAAE,OAAO,OAAO;IACtB,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,qBAAqB,EAAE,EAAE;GACpD;GACA,UAAU,CAAC,QAAQ,IAAI;EAC3B;EACA,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE;CACpE;CACA;EACI,IAAI;GAAE,YAAY,EAAE,MAAM,EAAE,OAAO,SAAS,EAAE;GAAG,UAAU,CAAC,MAAM;EAAE;EACpE,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE;CACpC;AACJ,EACJ"}
|
package/dist/schemas/layout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Condition } from './common';
|
|
2
|
+
import { Condition } from './common.js';
|
|
3
3
|
export declare const LayoutNode: z.ZodObject<{
|
|
4
4
|
type: z.ZodString;
|
|
5
5
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -7,6 +7,7 @@ export declare const LayoutNode: z.ZodObject<{
|
|
|
7
7
|
description: z.ZodOptional<z.ZodString>;
|
|
8
8
|
text: z.ZodOptional<z.ZodString>;
|
|
9
9
|
component: z.ZodOptional<z.ZodString>;
|
|
10
|
+
panel: z.ZodOptional<z.ZodString>;
|
|
10
11
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11
12
|
width: z.ZodOptional<z.ZodNumber>;
|
|
12
13
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/schemas/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/schemas/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;cAiCC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;iBAO9D,CAAC;AAEP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/schemas/layout.js
CHANGED
|
@@ -4,10 +4,11 @@ import { z } from "zod";
|
|
|
4
4
|
var LayoutNode = z.looseObject({
|
|
5
5
|
type: z.string().min(1).meta({ description: "A built-in node type, or a type provided by a plugin." }),
|
|
6
6
|
name: z.string().min(1).optional().meta({ description: "`field`: the name of the field." }),
|
|
7
|
-
label: z.string().optional().meta({ description: "`section`, `tab`: the title." }),
|
|
7
|
+
label: z.string().optional().meta({ description: "`section`, `tab`, `sidebar`: the title." }),
|
|
8
8
|
description: z.string().optional(),
|
|
9
9
|
text: z.string().optional().meta({ description: "`text`: a static paragraph." }),
|
|
10
10
|
component: z.string().optional().meta({ description: "`component`: a component provided by a plugin." }),
|
|
11
|
+
panel: z.string().min(1).optional().meta({ description: "`sidebar`: the panel it is, by name: a built-in panel (`save`, `errors`, `publication`, `actions`) or one provided by a plugin. Without its component, the node renders its children." }),
|
|
11
12
|
props: z.record(z.string(), z.unknown()).optional(),
|
|
12
13
|
width: z.number().int().min(1).max(12).optional().meta({ description: "Width on a 12-column grid, inside a `row`." }),
|
|
13
14
|
collapsible: z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","names":[],"sources":["../../src/schemas/layout.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Condition } from './common';\n\nexport const LayoutNode = z\n .looseObject({\n type: z\n .string()\n .min(1)\n .meta({ description: 'A built-in node type, or a type provided by a plugin.' }),\n name: z.string().min(1).optional().meta({ description: '`field`: the name of the field.' }),\n label: z.string().optional().meta({ description: '`section`, `tab`: the title.' }),\n description: z.string().optional(),\n text: z.string().optional().meta({ description: '`text`: a static paragraph.' }),\n component: z\n .string()\n .optional()\n .meta({ description: '`component`: a component provided by a plugin.' }),\n props: z.record(z.string(), z.unknown()).optional(),\n width: z\n .number()\n .int()\n .min(1)\n .max(12)\n .optional()\n .meta({ description: 'Width on a 12-column grid, inside a `row`.' }),\n collapsible: z.boolean().optional(),\n collapsed: z.boolean().optional(),\n visibleWhen: Condition.optional(),\n // The return type is written out so that declaration files keep the recursion.\n get children(): z.ZodOptional<z.ZodArray<typeof LayoutNode>> {\n return z.array(LayoutNode).optional();\n },\n })\n .meta({\n description:\n 'A node of a form layout. Containers (`row`, `column`, `section`, `tabs`, `tab`, `sidebar`) have `children`. Fields that no node references are appended at the end of the form.',\n });\n\nexport type LayoutNode = z.infer<typeof LayoutNode>;\n"],"mappings":";;;AAIA,IAAa,aAAa,EACrB,YAAY;CACT,MAAM,EACD,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,wDAAwD,CAAC;CAClF,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,kCAAkC,CAAC;CAC1F,OAAO,
|
|
1
|
+
{"version":3,"file":"layout.js","names":[],"sources":["../../src/schemas/layout.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Condition } from './common';\n\nexport const LayoutNode = z\n .looseObject({\n type: z\n .string()\n .min(1)\n .meta({ description: 'A built-in node type, or a type provided by a plugin.' }),\n name: z.string().min(1).optional().meta({ description: '`field`: the name of the field.' }),\n label: z\n .string()\n .optional()\n .meta({ description: '`section`, `tab`, `sidebar`: the title.' }),\n description: z.string().optional(),\n text: z.string().optional().meta({ description: '`text`: a static paragraph.' }),\n component: z\n .string()\n .optional()\n .meta({ description: '`component`: a component provided by a plugin.' }),\n panel: z.string().min(1).optional().meta({\n description:\n '`sidebar`: the panel it is, by name: a built-in panel (`save`, `errors`, `publication`, `actions`) or one provided by a plugin. Without its component, the node renders its children.',\n }),\n props: z.record(z.string(), z.unknown()).optional(),\n width: z\n .number()\n .int()\n .min(1)\n .max(12)\n .optional()\n .meta({ description: 'Width on a 12-column grid, inside a `row`.' }),\n collapsible: z.boolean().optional(),\n collapsed: z.boolean().optional(),\n visibleWhen: Condition.optional(),\n // The return type is written out so that declaration files keep the recursion.\n get children(): z.ZodOptional<z.ZodArray<typeof LayoutNode>> {\n return z.array(LayoutNode).optional();\n },\n })\n .meta({\n description:\n 'A node of a form layout. Containers (`row`, `column`, `section`, `tabs`, `tab`, `sidebar`) have `children`. Fields that no node references are appended at the end of the form.',\n });\n\nexport type LayoutNode = z.infer<typeof LayoutNode>;\n"],"mappings":";;;AAIA,IAAa,aAAa,EACrB,YAAY;CACT,MAAM,EACD,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,wDAAwD,CAAC;CAClF,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,kCAAkC,CAAC;CAC1F,OAAO,EACF,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,0CAA0C,CAAC;CACpE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,8BAA8B,CAAC;CAC/E,WAAW,EACN,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,iDAAiD,CAAC;CAC3E,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACrC,aACI,wLACR,CAAC;CACD,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CAClD,OAAO,EACF,OAAO,CAAC,CACR,IAAI,CAAC,CACL,IAAI,CAAC,CAAC,CACN,IAAI,EAAE,CAAC,CACP,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,6CAA6C,CAAC;CACvE,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS;CAClC,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;CAChC,aAAa,UAAU,SAAS;CAEhC,IAAI,WAAyD;EACzD,OAAO,EAAE,MAAM,UAAU,CAAC,CAAC,SAAS;CACxC;AACJ,CAAC,CAAC,CACD,KAAK,EACF,aACI,kLACR,CAAC"}
|
package/dist/schemas/list.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ export declare const Column: z.ZodObject<{
|
|
|
8
8
|
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
9
9
|
align: z.ZodOptional<z.ZodEnum<{
|
|
10
10
|
start: "start";
|
|
11
|
-
center: "center";
|
|
12
11
|
end: "end";
|
|
12
|
+
center: "center";
|
|
13
13
|
}>>;
|
|
14
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
hideable: z.ZodOptional<z.ZodBoolean>;
|
|
14
16
|
}, z.core.$loose>;
|
|
15
17
|
export declare const Filter: z.ZodObject<{
|
|
16
18
|
id: z.ZodString;
|
|
@@ -21,11 +23,22 @@ export declare const Filter: z.ZodObject<{
|
|
|
21
23
|
label: z.ZodString;
|
|
22
24
|
description: z.ZodOptional<z.ZodString>;
|
|
23
25
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
tone: z.ZodOptional<z.ZodString>;
|
|
24
27
|
}, z.core.$loose>>>;
|
|
25
28
|
resource: z.ZodOptional<z.ZodString>;
|
|
26
29
|
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
27
30
|
default: z.ZodOptional<z.ZodUnknown>;
|
|
28
31
|
}, z.core.$loose>;
|
|
32
|
+
export declare const ListCalendar: z.ZodObject<{
|
|
33
|
+
field: z.ZodString;
|
|
34
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
35
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, z.core.$loose>;
|
|
37
|
+
export declare const ListAggregates: z.ZodObject<{
|
|
38
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
29
42
|
export declare const ListDefinition: z.ZodObject<{
|
|
30
43
|
columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
44
|
field: z.ZodOptional<z.ZodString>;
|
|
@@ -36,9 +49,11 @@ export declare const ListDefinition: z.ZodObject<{
|
|
|
36
49
|
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
37
50
|
align: z.ZodOptional<z.ZodEnum<{
|
|
38
51
|
start: "start";
|
|
39
|
-
center: "center";
|
|
40
52
|
end: "end";
|
|
53
|
+
center: "center";
|
|
41
54
|
}>>;
|
|
55
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
hideable: z.ZodOptional<z.ZodBoolean>;
|
|
42
57
|
}, z.core.$loose>>>;
|
|
43
58
|
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
59
|
id: z.ZodString;
|
|
@@ -49,6 +64,7 @@ export declare const ListDefinition: z.ZodObject<{
|
|
|
49
64
|
label: z.ZodString;
|
|
50
65
|
description: z.ZodOptional<z.ZodString>;
|
|
51
66
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
tone: z.ZodOptional<z.ZodString>;
|
|
52
68
|
}, z.core.$loose>>>;
|
|
53
69
|
resource: z.ZodOptional<z.ZodString>;
|
|
54
70
|
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -60,10 +76,26 @@ export declare const ListDefinition: z.ZodObject<{
|
|
|
60
76
|
layouts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
77
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
62
78
|
perPageOptions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
79
|
+
pagination: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
pages: "pages";
|
|
81
|
+
cursor: "cursor";
|
|
82
|
+
}>>;
|
|
63
83
|
inlineEdit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
84
|
selectable: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
calendar: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
field: z.ZodString;
|
|
87
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
88
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, z.core.$loose>>;
|
|
90
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$loose>>;
|
|
65
95
|
}, z.core.$loose>;
|
|
66
96
|
export type Column = z.infer<typeof Column>;
|
|
67
97
|
export type Filter = z.infer<typeof Filter>;
|
|
68
98
|
export type ListDefinition = z.infer<typeof ListDefinition>;
|
|
99
|
+
export type ListCalendar = z.infer<typeof ListCalendar>;
|
|
100
|
+
export type ListAggregates = z.infer<typeof ListAggregates>;
|
|
69
101
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/schemas/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/schemas/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAwBb,CAAC;AAEP,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAkBjB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;iBAavB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;iBAkBrB,CAAC;AAEP,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCzB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/schemas/list.js
CHANGED
|
@@ -12,10 +12,12 @@ var Column = z.looseObject({
|
|
|
12
12
|
"start",
|
|
13
13
|
"center",
|
|
14
14
|
"end"
|
|
15
|
-
]).optional()
|
|
15
|
+
]).optional(),
|
|
16
|
+
hidden: z.boolean().optional().meta({ description: "Not shown by default: the user can show it from the columns of the list (decision 0042)." }),
|
|
17
|
+
hideable: z.boolean().optional().meta({ description: "`false`: always shown, the user can move it but not hide it. Columns are hideable by default." })
|
|
16
18
|
}).refine((column) => column.field !== void 0 || column.id !== void 0, { message: "A column needs a `field` or an `id`." });
|
|
17
19
|
var Filter = z.looseObject({
|
|
18
|
-
id: z.string().min(1).meta({ description: "Sent as `filter[id]`." }),
|
|
20
|
+
id: z.string().min(1).regex(/^(?!ids$)/, "The filter id `ids` is reserved for the filter of every list on ids.").meta({ description: "Sent as `filter[id]`. `ids` is reserved: every list has a filter on the ids of its items, `filter[ids][]` (decision 0069)." }),
|
|
19
21
|
type: z.string().min(1).meta({ description: "Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`. A `date-range` value is the bounds of a range: `filter[id][from]` and `filter[id][to]`, days (`2026-01-31`), both inclusive and both optional." }),
|
|
20
22
|
label: z.string().optional(),
|
|
21
23
|
options: z.array(Option).optional(),
|
|
@@ -23,19 +25,32 @@ var Filter = z.looseObject({
|
|
|
23
25
|
multiple: z.boolean().optional(),
|
|
24
26
|
default: z.unknown().optional()
|
|
25
27
|
});
|
|
28
|
+
var ListCalendar = z.looseObject({
|
|
29
|
+
field: z.string().min(1).meta({ description: "The `date` or `datetime` field each item is shown on the day of." }),
|
|
30
|
+
filter: z.string().min(1).optional().meta({ description: "The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name." }),
|
|
31
|
+
perPage: z.number().int().positive().optional().meta({ description: "How many items the calendar asks for a month, in one request. Defaults to 100." })
|
|
32
|
+
});
|
|
33
|
+
var ListAggregates = z.looseObject({
|
|
34
|
+
sum: z.array(z.string().min(1)).optional().meta({ description: "Fields that can be summed (`measure=sum:{field}`): `number`, `range` and `duration` fields, and `money` fields of one `currency`." }),
|
|
35
|
+
groupBy: z.array(z.string().min(1)).optional().meta({ description: "Fields whose values the items can be grouped by, in a `breakdown` (`group={field}`)." }),
|
|
36
|
+
dates: z.array(z.string().min(1)).optional().meta({ description: "`date` and `datetime` fields whose days, weeks or months the items can be grouped by, in a `series` (`group={period}:{field}`)." })
|
|
37
|
+
}).meta({ description: "What `GET /resources/{resource}/aggregate` can count, sum and group by (decision 0084): nothing that is not declared." });
|
|
26
38
|
var ListDefinition = z.looseObject({
|
|
27
39
|
columns: z.array(Column).optional(),
|
|
28
40
|
filters: z.array(Filter).optional(),
|
|
29
41
|
sorts: z.array(z.string().min(1)).optional().meta({ description: "Fields the list can be sorted by." }),
|
|
30
42
|
defaultSort: z.string().optional().meta({ description: "Same format as the `sort` query parameter: `-published_at,title`." }),
|
|
31
43
|
search: z.boolean().optional().meta({ description: "Whether the `q` parameter is supported." }),
|
|
32
|
-
layouts: z.array(z.string().min(1)).optional(),
|
|
44
|
+
layouts: z.array(z.string().min(1)).optional().meta({ description: "The layouts the list offers, the first being the default. Built in: `table`, `cards`, `gallery` (on the `itemImage` of the resource) and `calendar` (with `calendar`)." }),
|
|
33
45
|
perPage: z.number().int().positive().optional(),
|
|
34
46
|
perPageOptions: z.array(z.number().int().positive()).optional(),
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
pagination: z.enum(["pages", "cursor"]).optional().meta({ description: "`pages` (the default): numbered pages, with a total. `cursor`: the list follows `nextCursor` of each page with the `cursor` parameter, without page numbers, for large lists that the backend can't count (decision 0039)." }),
|
|
48
|
+
inlineEdit: z.array(z.string().min(1)).optional().meta({ description: "Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043)." }),
|
|
49
|
+
selectable: z.boolean().optional(),
|
|
50
|
+
calendar: ListCalendar.optional().meta({ description: "The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044)." }),
|
|
51
|
+
aggregates: ListAggregates.optional().meta({ description: "The fields that `GET /resources/{resource}/aggregate` sums and groups by (decision 0084). Without it, the resource has no aggregates." })
|
|
37
52
|
});
|
|
38
53
|
//#endregion
|
|
39
|
-
export { Column, Filter, ListDefinition };
|
|
54
|
+
export { Column, Filter, ListAggregates, ListCalendar, ListDefinition };
|
|
40
55
|
|
|
41
56
|
//# sourceMappingURL=list.js.map
|
package/dist/schemas/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":[],"sources":["../../src/schemas/list.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Option } from './common';\n\nexport const Column = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'The field shown in the column.' }),\n id: z\n .string()\n .min(1)\n .optional()\n .meta({ description: 'Id of a column that is not a field.' }),\n label: z.string().optional(),\n display: z.string().optional().meta({ description: 'How the value is displayed.' }),\n sortable: z.boolean().optional(),\n width: z.union([z.number(), z.string()]).optional(),\n align: z.enum(['start', 'center', 'end']).optional(),\n })\n .refine((column) => column.field !== undefined || column.id !== undefined, {\n message: 'A column needs a `field` or an `id`.',\n });\n\nexport const Filter = z.looseObject({\n id: z.string().min(1).meta({
|
|
1
|
+
{"version":3,"file":"list.js","names":[],"sources":["../../src/schemas/list.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Option } from './common';\n\nexport const Column = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'The field shown in the column.' }),\n id: z\n .string()\n .min(1)\n .optional()\n .meta({ description: 'Id of a column that is not a field.' }),\n label: z.string().optional(),\n display: z.string().optional().meta({ description: 'How the value is displayed.' }),\n sortable: z.boolean().optional(),\n width: z.union([z.number(), z.string()]).optional(),\n align: z.enum(['start', 'center', 'end']).optional(),\n hidden: z.boolean().optional().meta({\n description:\n 'Not shown by default: the user can show it from the columns of the list (decision 0042).',\n }),\n hideable: z.boolean().optional().meta({\n description:\n '`false`: always shown, the user can move it but not hide it. Columns are hideable by default.',\n }),\n })\n .refine((column) => column.field !== undefined || column.id !== undefined, {\n message: 'A column needs a `field` or an `id`.',\n });\n\nexport const Filter = z.looseObject({\n id: z\n .string()\n .min(1)\n .regex(/^(?!ids$)/, 'The filter id `ids` is reserved for the filter of every list on ids.')\n .meta({\n description:\n 'Sent as `filter[id]`. `ids` is reserved: every list has a filter on the ids of its items, `filter[ids][]` (decision 0069).',\n }),\n type: z.string().min(1).meta({\n description:\n 'Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`. A `date-range` value is the bounds of a range: `filter[id][from]` and `filter[id][to]`, days (`2026-01-31`), both inclusive and both optional.',\n }),\n label: z.string().optional(),\n options: z.array(Option).optional(),\n resource: z.string().optional(),\n multiple: z.boolean().optional(),\n default: z.unknown().optional(),\n});\n\nexport const ListCalendar = z.looseObject({\n field: z\n .string()\n .min(1)\n .meta({ description: 'The `date` or `datetime` field each item is shown on the day of.' }),\n filter: z.string().min(1).optional().meta({\n description:\n \"The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name.\",\n }),\n perPage: z.number().int().positive().optional().meta({\n description:\n 'How many items the calendar asks for a month, in one request. Defaults to 100.',\n }),\n});\n\nexport const ListAggregates = z\n .looseObject({\n sum: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields that can be summed (`measure=sum:{field}`): `number`, `range` and `duration` fields, and `money` fields of one `currency`.',\n }),\n groupBy: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields whose values the items can be grouped by, in a `breakdown` (`group={field}`).',\n }),\n dates: z.array(z.string().min(1)).optional().meta({\n description:\n '`date` and `datetime` fields whose days, weeks or months the items can be grouped by, in a `series` (`group={period}:{field}`).',\n }),\n })\n .meta({\n description:\n 'What `GET /resources/{resource}/aggregate` can count, sum and group by (decision 0084): nothing that is not declared.',\n });\n\nexport const ListDefinition = z.looseObject({\n columns: z.array(Column).optional(),\n filters: z.array(Filter).optional(),\n sorts: z\n .array(z.string().min(1))\n .optional()\n .meta({ description: 'Fields the list can be sorted by.' }),\n defaultSort: z\n .string()\n .optional()\n .meta({ description: 'Same format as the `sort` query parameter: `-published_at,title`.' }),\n search: z.boolean().optional().meta({ description: 'Whether the `q` parameter is supported.' }),\n layouts: z.array(z.string().min(1)).optional().meta({\n description:\n 'The layouts the list offers, the first being the default. Built in: `table`, `cards`, `gallery` (on the `itemImage` of the resource) and `calendar` (with `calendar`).',\n }),\n perPage: z.number().int().positive().optional(),\n perPageOptions: z.array(z.number().int().positive()).optional(),\n pagination: z.enum(['pages', 'cursor']).optional().meta({\n description:\n \"`pages` (the default): numbered pages, with a total. `cursor`: the list follows `nextCursor` of each page with the `cursor` parameter, without page numbers, for large lists that the backend can't count (decision 0039).\",\n }),\n inlineEdit: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043).',\n }),\n selectable: z.boolean().optional(),\n calendar: ListCalendar.optional().meta({\n description:\n 'The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044).',\n }),\n aggregates: ListAggregates.optional().meta({\n description:\n 'The fields that `GET /resources/{resource}/aggregate` sums and groups by (decision 0084). Without it, the resource has no aggregates.',\n }),\n});\n\nexport type Column = z.infer<typeof Column>;\nexport type Filter = z.infer<typeof Filter>;\nexport type ListDefinition = z.infer<typeof ListDefinition>;\nexport type ListCalendar = z.infer<typeof ListCalendar>;\nexport type ListAggregates = z.infer<typeof ListAggregates>;\n"],"mappings":";;;AAIA,IAAa,SAAS,EACjB,YAAY;CACT,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,iCAAiC,CAAC;CAC1F,IAAI,EACC,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,sCAAsC,CAAC;CAChE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,8BAA8B,CAAC;CAClF,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC/B,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,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