@objectstack/spec 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +73 -1
  2. package/dist/api/contract.zod.d.ts +1733 -0
  3. package/dist/api/contract.zod.d.ts.map +1 -0
  4. package/dist/api/contract.zod.js +138 -0
  5. package/dist/data/dataset.zod.d.ts +2 -2
  6. package/dist/data/field.zod.d.ts +1648 -10
  7. package/dist/data/field.zod.d.ts.map +1 -1
  8. package/dist/data/field.zod.js +149 -8
  9. package/dist/data/filter.zod.d.ts +295 -0
  10. package/dist/data/filter.zod.d.ts.map +1 -0
  11. package/dist/data/filter.zod.js +226 -0
  12. package/dist/data/mapping.zod.d.ts +215 -2
  13. package/dist/data/mapping.zod.d.ts.map +1 -1
  14. package/dist/data/object.zod.d.ts +505 -25
  15. package/dist/data/object.zod.d.ts.map +1 -1
  16. package/dist/data/object.zod.js +32 -5
  17. package/dist/data/query.zod.d.ts +349 -0
  18. package/dist/data/query.zod.d.ts.map +1 -1
  19. package/dist/data/query.zod.js +77 -1
  20. package/dist/data/trigger.zod.d.ts +354 -0
  21. package/dist/data/trigger.zod.d.ts.map +1 -0
  22. package/dist/data/trigger.zod.js +195 -0
  23. package/dist/data/validation.zod.d.ts +83 -43
  24. package/dist/data/validation.zod.d.ts.map +1 -1
  25. package/dist/data/validation.zod.js +51 -5
  26. package/dist/index.d.ts +10 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +11 -0
  29. package/dist/system/api.zod.d.ts +130 -4
  30. package/dist/system/api.zod.d.ts.map +1 -1
  31. package/dist/system/api.zod.js +4 -1
  32. package/dist/system/auth.zod.d.ts +2287 -0
  33. package/dist/system/auth.zod.d.ts.map +1 -0
  34. package/dist/system/auth.zod.js +365 -0
  35. package/dist/system/datasource.zod.d.ts +193 -30
  36. package/dist/system/datasource.zod.d.ts.map +1 -1
  37. package/dist/system/datasource.zod.js +58 -11
  38. package/dist/system/discovery.zod.d.ts +174 -0
  39. package/dist/system/discovery.zod.d.ts.map +1 -0
  40. package/dist/system/discovery.zod.js +53 -0
  41. package/dist/system/driver.zod.d.ts +1631 -0
  42. package/dist/system/driver.zod.d.ts.map +1 -0
  43. package/dist/system/driver.zod.js +337 -0
  44. package/dist/system/license.zod.d.ts +2 -2
  45. package/dist/system/manifest.zod.d.ts +323 -52
  46. package/dist/system/manifest.zod.d.ts.map +1 -1
  47. package/dist/system/manifest.zod.js +91 -17
  48. package/dist/system/plugin.zod.d.ts +3516 -0
  49. package/dist/system/plugin.zod.d.ts.map +1 -0
  50. package/dist/system/plugin.zod.js +226 -0
  51. package/dist/system/policy.zod.d.ts +10 -10
  52. package/dist/system/territory.zod.d.ts +1 -1
  53. package/dist/system/webhook.zod.d.ts +3 -3
  54. package/dist/ui/action.zod.d.ts +19 -12
  55. package/dist/ui/action.zod.d.ts.map +1 -1
  56. package/dist/ui/action.zod.js +7 -1
  57. package/dist/ui/app.zod.d.ts +109 -3
  58. package/dist/ui/app.zod.d.ts.map +1 -1
  59. package/dist/ui/app.zod.js +13 -2
  60. package/dist/ui/dashboard.zod.d.ts +19 -13
  61. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  62. package/dist/ui/dashboard.zod.js +10 -3
  63. package/dist/ui/page.zod.d.ts +6 -6
  64. package/dist/ui/report.zod.d.ts +13 -32
  65. package/dist/ui/report.zod.d.ts.map +1 -1
  66. package/dist/ui/report.zod.js +10 -9
  67. package/dist/ui/theme.zod.d.ts +1221 -0
  68. package/dist/ui/theme.zod.d.ts.map +1 -0
  69. package/dist/ui/theme.zod.js +202 -0
  70. package/dist/ui/widget.zod.d.ts +350 -0
  71. package/dist/ui/widget.zod.d.ts.map +1 -0
  72. package/dist/ui/widget.zod.js +66 -0
  73. package/json-schema/AccountLinkingConfig.json +27 -0
  74. package/json-schema/Action.json +8 -2
  75. package/json-schema/ActionParam.json +8 -2
  76. package/json-schema/Address.json +40 -0
  77. package/json-schema/AggregationFunction.json +19 -0
  78. package/json-schema/AggregationNode.json +42 -0
  79. package/json-schema/Animation.json +56 -0
  80. package/json-schema/ApiCapabilities.json +28 -0
  81. package/json-schema/ApiError.json +27 -0
  82. package/json-schema/ApiRoutes.json +41 -0
  83. package/json-schema/App.json +13 -2
  84. package/json-schema/AsyncValidation.json +70 -0
  85. package/json-schema/AuthConfig.json +606 -0
  86. package/json-schema/AuthPluginConfig.json +28 -0
  87. package/json-schema/AuthStrategy.json +17 -0
  88. package/json-schema/AuthenticationConfig.json +601 -0
  89. package/json-schema/AuthenticationProvider.json +617 -0
  90. package/json-schema/BaseResponse.json +63 -0
  91. package/json-schema/BorderRadius.json +44 -0
  92. package/json-schema/Breakpoints.json +36 -0
  93. package/json-schema/BulkRequest.json +29 -0
  94. package/json-schema/BulkResponse.json +108 -0
  95. package/json-schema/CSRFConfig.json +31 -0
  96. package/json-schema/ColorPalette.json +83 -0
  97. package/json-schema/ComparisonOperator.json +56 -0
  98. package/json-schema/ConditionalValidation.json +793 -0
  99. package/json-schema/CreateRequest.json +20 -0
  100. package/json-schema/CrossFieldValidation.json +56 -0
  101. package/json-schema/CustomValidator.json +57 -0
  102. package/json-schema/Dashboard.json +20 -0
  103. package/json-schema/DashboardWidget.json +20 -0
  104. package/json-schema/DatabaseAdapter.json +38 -0
  105. package/json-schema/Datasource.json +25 -23
  106. package/json-schema/DatasourceCapabilities.json +25 -5
  107. package/json-schema/DeleteResponse.json +68 -0
  108. package/json-schema/Discovery.json +114 -0
  109. package/json-schema/DriverCapabilities.json +69 -0
  110. package/json-schema/DriverDefinition.json +86 -0
  111. package/json-schema/DriverInterface.json +88 -0
  112. package/json-schema/DriverOptions.json +23 -0
  113. package/json-schema/DriverType.json +1 -18
  114. package/json-schema/EmailPasswordConfig.json +43 -0
  115. package/json-schema/EqualityOperator.json +14 -0
  116. package/json-schema/ExportRequest.json +786 -0
  117. package/json-schema/Field.json +75 -4
  118. package/json-schema/FieldOperators.json +108 -0
  119. package/json-schema/FieldType.json +8 -2
  120. package/json-schema/FieldWidgetProps.json +327 -0
  121. package/json-schema/FilterCondition.json +28 -0
  122. package/json-schema/I18nContext.json +12 -0
  123. package/json-schema/JoinNode.json +455 -0
  124. package/json-schema/JoinType.json +15 -0
  125. package/json-schema/ListRecordResponse.json +103 -0
  126. package/json-schema/LocationCoordinates.json +36 -0
  127. package/json-schema/Logger.json +25 -0
  128. package/json-schema/MagicLinkConfig.json +21 -0
  129. package/json-schema/Manifest.json +243 -18
  130. package/json-schema/Mapping.json +328 -0
  131. package/json-schema/ModificationResult.json +46 -0
  132. package/json-schema/NormalizedFilter.json +348 -0
  133. package/json-schema/OAuthProvider.json +66 -0
  134. package/json-schema/Object.json +103 -6
  135. package/json-schema/ObjectCapabilities.json +26 -0
  136. package/json-schema/ObjectQLClient.json +12 -0
  137. package/json-schema/PasskeyConfig.json +54 -0
  138. package/json-schema/Plugin.json +20 -0
  139. package/json-schema/PluginContext.json +91 -0
  140. package/json-schema/PluginLifecycle.json +11 -0
  141. package/json-schema/Query.json +328 -0
  142. package/json-schema/QueryFilter.json +34 -0
  143. package/json-schema/RangeOperator.json +41 -0
  144. package/json-schema/RateLimitConfig.json +36 -0
  145. package/json-schema/RecordData.json +11 -0
  146. package/json-schema/Report.json +20 -26
  147. package/json-schema/Router.json +12 -0
  148. package/json-schema/Scheduler.json +12 -0
  149. package/json-schema/ScopedStorage.json +12 -0
  150. package/json-schema/SessionConfig.json +56 -0
  151. package/json-schema/SetOperator.json +18 -0
  152. package/json-schema/Shadow.json +44 -0
  153. package/json-schema/SingleRecordResponse.json +69 -0
  154. package/json-schema/Spacing.json +64 -0
  155. package/json-schema/SpecialOperator.json +18 -0
  156. package/json-schema/StandardAuthProvider.json +622 -0
  157. package/json-schema/StringOperator.json +21 -0
  158. package/json-schema/SystemAPI.json +12 -0
  159. package/json-schema/Theme.json +543 -0
  160. package/json-schema/ThemeMode.json +14 -0
  161. package/json-schema/Trigger.json +73 -0
  162. package/json-schema/TriggerAction.json +14 -0
  163. package/json-schema/TriggerContext.json +61 -0
  164. package/json-schema/TriggerTiming.json +13 -0
  165. package/json-schema/TwoFactorConfig.json +40 -0
  166. package/json-schema/Typography.json +142 -0
  167. package/json-schema/UpdateRequest.json +20 -0
  168. package/json-schema/UserFieldMapping.json +47 -0
  169. package/json-schema/ValidationRule.json +583 -0
  170. package/json-schema/WindowFunction.json +24 -0
  171. package/json-schema/WindowFunctionNode.json +104 -0
  172. package/json-schema/WindowSpec.json +65 -0
  173. package/json-schema/ZIndex.json +44 -0
  174. package/package.json +8 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.zod.d.ts","sourceRoot":"","sources":["../../src/ui/theme.zod.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThemeSchema = exports.ThemeMode = exports.ZIndexSchema = exports.AnimationSchema = exports.BreakpointsSchema = exports.ShadowSchema = exports.BorderRadiusSchema = exports.SpacingSchema = exports.TypographySchema = exports.ColorPaletteSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Color Palette Schema
7
+ * Defines brand colors and their variants.
8
+ */
9
+ exports.ColorPaletteSchema = zod_1.z.object({
10
+ primary: zod_1.z.string().describe('Primary brand color (hex, rgb, or hsl)'),
11
+ secondary: zod_1.z.string().optional().describe('Secondary brand color'),
12
+ accent: zod_1.z.string().optional().describe('Accent color for highlights'),
13
+ success: zod_1.z.string().optional().describe('Success state color (default: green)'),
14
+ warning: zod_1.z.string().optional().describe('Warning state color (default: yellow)'),
15
+ error: zod_1.z.string().optional().describe('Error state color (default: red)'),
16
+ info: zod_1.z.string().optional().describe('Info state color (default: blue)'),
17
+ // Neutral colors
18
+ background: zod_1.z.string().optional().describe('Background color'),
19
+ surface: zod_1.z.string().optional().describe('Surface/card background color'),
20
+ text: zod_1.z.string().optional().describe('Primary text color'),
21
+ textSecondary: zod_1.z.string().optional().describe('Secondary text color'),
22
+ border: zod_1.z.string().optional().describe('Border color'),
23
+ disabled: zod_1.z.string().optional().describe('Disabled state color'),
24
+ // Color variants (shades)
25
+ primaryLight: zod_1.z.string().optional().describe('Lighter shade of primary'),
26
+ primaryDark: zod_1.z.string().optional().describe('Darker shade of primary'),
27
+ secondaryLight: zod_1.z.string().optional().describe('Lighter shade of secondary'),
28
+ secondaryDark: zod_1.z.string().optional().describe('Darker shade of secondary'),
29
+ });
30
+ /**
31
+ * Typography Settings Schema
32
+ * Font families, sizes, weights, and line heights.
33
+ */
34
+ exports.TypographySchema = zod_1.z.object({
35
+ fontFamily: zod_1.z.object({
36
+ base: zod_1.z.string().optional().describe('Base font family (default: system fonts)'),
37
+ heading: zod_1.z.string().optional().describe('Heading font family'),
38
+ mono: zod_1.z.string().optional().describe('Monospace font family for code'),
39
+ }).optional(),
40
+ fontSize: zod_1.z.object({
41
+ xs: zod_1.z.string().optional().describe('Extra small font size (e.g., 0.75rem)'),
42
+ sm: zod_1.z.string().optional().describe('Small font size (e.g., 0.875rem)'),
43
+ base: zod_1.z.string().optional().describe('Base font size (e.g., 1rem)'),
44
+ lg: zod_1.z.string().optional().describe('Large font size (e.g., 1.125rem)'),
45
+ xl: zod_1.z.string().optional().describe('Extra large font size (e.g., 1.25rem)'),
46
+ '2xl': zod_1.z.string().optional().describe('2X large font size (e.g., 1.5rem)'),
47
+ '3xl': zod_1.z.string().optional().describe('3X large font size (e.g., 1.875rem)'),
48
+ '4xl': zod_1.z.string().optional().describe('4X large font size (e.g., 2.25rem)'),
49
+ }).optional(),
50
+ fontWeight: zod_1.z.object({
51
+ light: zod_1.z.number().optional().describe('Light weight (default: 300)'),
52
+ normal: zod_1.z.number().optional().describe('Normal weight (default: 400)'),
53
+ medium: zod_1.z.number().optional().describe('Medium weight (default: 500)'),
54
+ semibold: zod_1.z.number().optional().describe('Semibold weight (default: 600)'),
55
+ bold: zod_1.z.number().optional().describe('Bold weight (default: 700)'),
56
+ }).optional(),
57
+ lineHeight: zod_1.z.object({
58
+ tight: zod_1.z.string().optional().describe('Tight line height (e.g., 1.25)'),
59
+ normal: zod_1.z.string().optional().describe('Normal line height (e.g., 1.5)'),
60
+ relaxed: zod_1.z.string().optional().describe('Relaxed line height (e.g., 1.75)'),
61
+ loose: zod_1.z.string().optional().describe('Loose line height (e.g., 2)'),
62
+ }).optional(),
63
+ letterSpacing: zod_1.z.object({
64
+ tighter: zod_1.z.string().optional().describe('Tighter letter spacing (e.g., -0.05em)'),
65
+ tight: zod_1.z.string().optional().describe('Tight letter spacing (e.g., -0.025em)'),
66
+ normal: zod_1.z.string().optional().describe('Normal letter spacing (e.g., 0)'),
67
+ wide: zod_1.z.string().optional().describe('Wide letter spacing (e.g., 0.025em)'),
68
+ wider: zod_1.z.string().optional().describe('Wider letter spacing (e.g., 0.05em)'),
69
+ }).optional(),
70
+ });
71
+ /**
72
+ * Spacing Units Schema
73
+ * Defines spacing scale for margins, padding, gaps.
74
+ */
75
+ exports.SpacingSchema = zod_1.z.object({
76
+ '0': zod_1.z.string().optional().describe('0 spacing (0)'),
77
+ '1': zod_1.z.string().optional().describe('Spacing unit 1 (e.g., 0.25rem)'),
78
+ '2': zod_1.z.string().optional().describe('Spacing unit 2 (e.g., 0.5rem)'),
79
+ '3': zod_1.z.string().optional().describe('Spacing unit 3 (e.g., 0.75rem)'),
80
+ '4': zod_1.z.string().optional().describe('Spacing unit 4 (e.g., 1rem)'),
81
+ '5': zod_1.z.string().optional().describe('Spacing unit 5 (e.g., 1.25rem)'),
82
+ '6': zod_1.z.string().optional().describe('Spacing unit 6 (e.g., 1.5rem)'),
83
+ '8': zod_1.z.string().optional().describe('Spacing unit 8 (e.g., 2rem)'),
84
+ '10': zod_1.z.string().optional().describe('Spacing unit 10 (e.g., 2.5rem)'),
85
+ '12': zod_1.z.string().optional().describe('Spacing unit 12 (e.g., 3rem)'),
86
+ '16': zod_1.z.string().optional().describe('Spacing unit 16 (e.g., 4rem)'),
87
+ '20': zod_1.z.string().optional().describe('Spacing unit 20 (e.g., 5rem)'),
88
+ '24': zod_1.z.string().optional().describe('Spacing unit 24 (e.g., 6rem)'),
89
+ });
90
+ /**
91
+ * Border Radius Schema
92
+ * Rounded corners configuration.
93
+ */
94
+ exports.BorderRadiusSchema = zod_1.z.object({
95
+ none: zod_1.z.string().optional().describe('No border radius (0)'),
96
+ sm: zod_1.z.string().optional().describe('Small border radius (e.g., 0.125rem)'),
97
+ base: zod_1.z.string().optional().describe('Base border radius (e.g., 0.25rem)'),
98
+ md: zod_1.z.string().optional().describe('Medium border radius (e.g., 0.375rem)'),
99
+ lg: zod_1.z.string().optional().describe('Large border radius (e.g., 0.5rem)'),
100
+ xl: zod_1.z.string().optional().describe('Extra large border radius (e.g., 0.75rem)'),
101
+ '2xl': zod_1.z.string().optional().describe('2X large border radius (e.g., 1rem)'),
102
+ full: zod_1.z.string().optional().describe('Full border radius (50%)'),
103
+ });
104
+ /**
105
+ * Shadow Schema
106
+ * Box shadow effects.
107
+ */
108
+ exports.ShadowSchema = zod_1.z.object({
109
+ none: zod_1.z.string().optional().describe('No shadow'),
110
+ sm: zod_1.z.string().optional().describe('Small shadow'),
111
+ base: zod_1.z.string().optional().describe('Base shadow'),
112
+ md: zod_1.z.string().optional().describe('Medium shadow'),
113
+ lg: zod_1.z.string().optional().describe('Large shadow'),
114
+ xl: zod_1.z.string().optional().describe('Extra large shadow'),
115
+ '2xl': zod_1.z.string().optional().describe('2X large shadow'),
116
+ inner: zod_1.z.string().optional().describe('Inner shadow (inset)'),
117
+ });
118
+ /**
119
+ * Breakpoints Schema
120
+ * Responsive design breakpoints.
121
+ */
122
+ exports.BreakpointsSchema = zod_1.z.object({
123
+ xs: zod_1.z.string().optional().describe('Extra small breakpoint (e.g., 480px)'),
124
+ sm: zod_1.z.string().optional().describe('Small breakpoint (e.g., 640px)'),
125
+ md: zod_1.z.string().optional().describe('Medium breakpoint (e.g., 768px)'),
126
+ lg: zod_1.z.string().optional().describe('Large breakpoint (e.g., 1024px)'),
127
+ xl: zod_1.z.string().optional().describe('Extra large breakpoint (e.g., 1280px)'),
128
+ '2xl': zod_1.z.string().optional().describe('2X large breakpoint (e.g., 1536px)'),
129
+ });
130
+ /**
131
+ * Animation Schema
132
+ * Animation timing and duration settings.
133
+ */
134
+ exports.AnimationSchema = zod_1.z.object({
135
+ duration: zod_1.z.object({
136
+ fast: zod_1.z.string().optional().describe('Fast animation (e.g., 150ms)'),
137
+ base: zod_1.z.string().optional().describe('Base animation (e.g., 300ms)'),
138
+ slow: zod_1.z.string().optional().describe('Slow animation (e.g., 500ms)'),
139
+ }).optional(),
140
+ timing: zod_1.z.object({
141
+ linear: zod_1.z.string().optional().describe('Linear timing function'),
142
+ ease: zod_1.z.string().optional().describe('Ease timing function'),
143
+ easeIn: zod_1.z.string().optional().describe('Ease-in timing function'),
144
+ easeOut: zod_1.z.string().optional().describe('Ease-out timing function'),
145
+ easeInOut: zod_1.z.string().optional().describe('Ease-in-out timing function'),
146
+ }).optional(),
147
+ });
148
+ /**
149
+ * Z-Index Scale Schema
150
+ * Layering and stacking order.
151
+ */
152
+ exports.ZIndexSchema = zod_1.z.object({
153
+ base: zod_1.z.number().optional().describe('Base z-index (e.g., 0)'),
154
+ dropdown: zod_1.z.number().optional().describe('Dropdown z-index (e.g., 1000)'),
155
+ sticky: zod_1.z.number().optional().describe('Sticky z-index (e.g., 1020)'),
156
+ fixed: zod_1.z.number().optional().describe('Fixed z-index (e.g., 1030)'),
157
+ modalBackdrop: zod_1.z.number().optional().describe('Modal backdrop z-index (e.g., 1040)'),
158
+ modal: zod_1.z.number().optional().describe('Modal z-index (e.g., 1050)'),
159
+ popover: zod_1.z.number().optional().describe('Popover z-index (e.g., 1060)'),
160
+ tooltip: zod_1.z.number().optional().describe('Tooltip z-index (e.g., 1070)'),
161
+ });
162
+ /**
163
+ * Theme Mode Enum
164
+ */
165
+ exports.ThemeMode = zod_1.z.enum(['light', 'dark', 'auto']);
166
+ /**
167
+ * Theme Configuration Schema
168
+ * Complete theme definition for brand customization.
169
+ */
170
+ exports.ThemeSchema = zod_1.z.object({
171
+ name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Unique theme identifier (snake_case)'),
172
+ label: zod_1.z.string().describe('Human-readable theme name'),
173
+ description: zod_1.z.string().optional().describe('Theme description'),
174
+ /** Theme mode */
175
+ mode: exports.ThemeMode.default('light').describe('Theme mode (light, dark, or auto)'),
176
+ /** Color system */
177
+ colors: exports.ColorPaletteSchema.describe('Color palette configuration'),
178
+ /** Typography */
179
+ typography: exports.TypographySchema.optional().describe('Typography settings'),
180
+ /** Spacing */
181
+ spacing: exports.SpacingSchema.optional().describe('Spacing scale'),
182
+ /** Border radius */
183
+ borderRadius: exports.BorderRadiusSchema.optional().describe('Border radius scale'),
184
+ /** Shadows */
185
+ shadows: exports.ShadowSchema.optional().describe('Box shadow effects'),
186
+ /** Breakpoints */
187
+ breakpoints: exports.BreakpointsSchema.optional().describe('Responsive breakpoints'),
188
+ /** Animation */
189
+ animation: exports.AnimationSchema.optional().describe('Animation settings'),
190
+ /** Z-Index */
191
+ zIndex: exports.ZIndexSchema.optional().describe('Z-index scale for layering'),
192
+ /** Custom CSS variables */
193
+ customVars: zod_1.z.record(zod_1.z.string()).optional().describe('Custom CSS variables (key-value pairs)'),
194
+ /** Logo */
195
+ logo: zod_1.z.object({
196
+ light: zod_1.z.string().optional().describe('Logo URL for light mode'),
197
+ dark: zod_1.z.string().optional().describe('Logo URL for dark mode'),
198
+ favicon: zod_1.z.string().optional().describe('Favicon URL'),
199
+ }).optional().describe('Logo assets'),
200
+ /** Extends another theme */
201
+ extends: zod_1.z.string().optional().describe('Base theme to extend from'),
202
+ });
@@ -0,0 +1,350 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Field Widget Props Schema
4
+ *
5
+ * This defines the contract for custom field components and plugin UI extensions.
6
+ * Third-party developers use this interface to build custom field widgets that integrate
7
+ * seamlessly with the ObjectStack UI system.
8
+ *
9
+ * @example
10
+ * // Custom widget implementation
11
+ * function CustomDatePicker(props: FieldWidgetProps) {
12
+ * const { value, onChange, readonly, required, error, field, record, options } = props;
13
+ * // Widget implementation...
14
+ * }
15
+ */
16
+ export declare const FieldWidgetPropsSchema: z.ZodObject<{
17
+ /**
18
+ * Current field value.
19
+ * Type depends on the field type (string, number, boolean, array, object, etc.)
20
+ */
21
+ value: z.ZodAny;
22
+ /**
23
+ * Callback function to update the field value.
24
+ * Should be called when user interaction changes the value.
25
+ *
26
+ * @param newValue - The new value to set
27
+ */
28
+ onChange: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>;
29
+ /**
30
+ * Whether the field is in read-only mode.
31
+ * When true, the widget should display the value but not allow editing.
32
+ */
33
+ readonly: z.ZodDefault<z.ZodBoolean>;
34
+ /**
35
+ * Whether the field is required.
36
+ * Widget should indicate required state visually and validate accordingly.
37
+ */
38
+ required: z.ZodDefault<z.ZodBoolean>;
39
+ /**
40
+ * Validation error message to display.
41
+ * When present, widget should display the error in its UI.
42
+ */
43
+ error: z.ZodOptional<z.ZodString>;
44
+ /**
45
+ * Complete field definition from the schema.
46
+ * Contains metadata like type, constraints, options, etc.
47
+ */
48
+ field: z.ZodObject<{
49
+ name: z.ZodOptional<z.ZodString>;
50
+ label: z.ZodOptional<z.ZodString>;
51
+ type: z.ZodEnum<["text", "textarea", "email", "url", "phone", "password", "markdown", "html", "richtext", "number", "currency", "percent", "date", "datetime", "time", "boolean", "select", "lookup", "master_detail", "image", "file", "avatar", "formula", "summary", "autonumber", "location", "address", "code", "color", "rating", "signature"]>;
52
+ description: z.ZodOptional<z.ZodString>;
53
+ format: z.ZodOptional<z.ZodString>;
54
+ required: z.ZodDefault<z.ZodBoolean>;
55
+ searchable: z.ZodDefault<z.ZodBoolean>;
56
+ multiple: z.ZodDefault<z.ZodBoolean>;
57
+ unique: z.ZodDefault<z.ZodBoolean>;
58
+ defaultValue: z.ZodOptional<z.ZodAny>;
59
+ maxLength: z.ZodOptional<z.ZodNumber>;
60
+ minLength: z.ZodOptional<z.ZodNumber>;
61
+ precision: z.ZodOptional<z.ZodNumber>;
62
+ scale: z.ZodOptional<z.ZodNumber>;
63
+ min: z.ZodOptional<z.ZodNumber>;
64
+ max: z.ZodOptional<z.ZodNumber>;
65
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
66
+ label: z.ZodString;
67
+ value: z.ZodString;
68
+ color: z.ZodOptional<z.ZodString>;
69
+ default: z.ZodOptional<z.ZodBoolean>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ value: string;
72
+ label: string;
73
+ color?: string | undefined;
74
+ default?: boolean | undefined;
75
+ }, {
76
+ value: string;
77
+ label: string;
78
+ color?: string | undefined;
79
+ default?: boolean | undefined;
80
+ }>, "many">>;
81
+ reference: z.ZodOptional<z.ZodString>;
82
+ referenceFilters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
83
+ writeRequiresMasterRead: z.ZodOptional<z.ZodBoolean>;
84
+ deleteBehavior: z.ZodDefault<z.ZodOptional<z.ZodEnum<["set_null", "cascade", "restrict"]>>>;
85
+ expression: z.ZodOptional<z.ZodString>;
86
+ formula: z.ZodOptional<z.ZodString>;
87
+ summaryOperations: z.ZodOptional<z.ZodObject<{
88
+ object: z.ZodString;
89
+ field: z.ZodString;
90
+ function: z.ZodEnum<["count", "sum", "min", "max", "avg"]>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ object: string;
93
+ function: "min" | "max" | "count" | "sum" | "avg";
94
+ field: string;
95
+ }, {
96
+ object: string;
97
+ function: "min" | "max" | "count" | "sum" | "avg";
98
+ field: string;
99
+ }>>;
100
+ language: z.ZodOptional<z.ZodString>;
101
+ theme: z.ZodOptional<z.ZodString>;
102
+ lineNumbers: z.ZodOptional<z.ZodBoolean>;
103
+ maxRating: z.ZodOptional<z.ZodNumber>;
104
+ allowHalf: z.ZodOptional<z.ZodBoolean>;
105
+ displayMap: z.ZodOptional<z.ZodBoolean>;
106
+ allowGeocoding: z.ZodOptional<z.ZodBoolean>;
107
+ addressFormat: z.ZodOptional<z.ZodEnum<["us", "uk", "international"]>>;
108
+ colorFormat: z.ZodOptional<z.ZodEnum<["hex", "rgb", "rgba", "hsl"]>>;
109
+ allowAlpha: z.ZodOptional<z.ZodBoolean>;
110
+ presetColors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
111
+ hidden: z.ZodDefault<z.ZodBoolean>;
112
+ readonly: z.ZodDefault<z.ZodBoolean>;
113
+ encryption: z.ZodDefault<z.ZodBoolean>;
114
+ index: z.ZodDefault<z.ZodBoolean>;
115
+ externalId: z.ZodDefault<z.ZodBoolean>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
118
+ required: boolean;
119
+ searchable: boolean;
120
+ multiple: boolean;
121
+ unique: boolean;
122
+ deleteBehavior: "set_null" | "cascade" | "restrict";
123
+ hidden: boolean;
124
+ readonly: boolean;
125
+ encryption: boolean;
126
+ index: boolean;
127
+ externalId: boolean;
128
+ formula?: string | undefined;
129
+ options?: {
130
+ value: string;
131
+ label: string;
132
+ color?: string | undefined;
133
+ default?: boolean | undefined;
134
+ }[] | undefined;
135
+ label?: string | undefined;
136
+ name?: string | undefined;
137
+ description?: string | undefined;
138
+ format?: string | undefined;
139
+ defaultValue?: any;
140
+ maxLength?: number | undefined;
141
+ minLength?: number | undefined;
142
+ precision?: number | undefined;
143
+ scale?: number | undefined;
144
+ min?: number | undefined;
145
+ max?: number | undefined;
146
+ reference?: string | undefined;
147
+ referenceFilters?: string[] | undefined;
148
+ writeRequiresMasterRead?: boolean | undefined;
149
+ expression?: string | undefined;
150
+ summaryOperations?: {
151
+ object: string;
152
+ function: "min" | "max" | "count" | "sum" | "avg";
153
+ field: string;
154
+ } | undefined;
155
+ language?: string | undefined;
156
+ theme?: string | undefined;
157
+ lineNumbers?: boolean | undefined;
158
+ maxRating?: number | undefined;
159
+ allowHalf?: boolean | undefined;
160
+ displayMap?: boolean | undefined;
161
+ allowGeocoding?: boolean | undefined;
162
+ addressFormat?: "us" | "uk" | "international" | undefined;
163
+ colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
164
+ allowAlpha?: boolean | undefined;
165
+ presetColors?: string[] | undefined;
166
+ }, {
167
+ type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
168
+ formula?: string | undefined;
169
+ options?: {
170
+ value: string;
171
+ label: string;
172
+ color?: string | undefined;
173
+ default?: boolean | undefined;
174
+ }[] | undefined;
175
+ label?: string | undefined;
176
+ name?: string | undefined;
177
+ description?: string | undefined;
178
+ format?: string | undefined;
179
+ required?: boolean | undefined;
180
+ searchable?: boolean | undefined;
181
+ multiple?: boolean | undefined;
182
+ unique?: boolean | undefined;
183
+ defaultValue?: any;
184
+ maxLength?: number | undefined;
185
+ minLength?: number | undefined;
186
+ precision?: number | undefined;
187
+ scale?: number | undefined;
188
+ min?: number | undefined;
189
+ max?: number | undefined;
190
+ reference?: string | undefined;
191
+ referenceFilters?: string[] | undefined;
192
+ writeRequiresMasterRead?: boolean | undefined;
193
+ deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
194
+ expression?: string | undefined;
195
+ summaryOperations?: {
196
+ object: string;
197
+ function: "min" | "max" | "count" | "sum" | "avg";
198
+ field: string;
199
+ } | undefined;
200
+ language?: string | undefined;
201
+ theme?: string | undefined;
202
+ lineNumbers?: boolean | undefined;
203
+ maxRating?: number | undefined;
204
+ allowHalf?: boolean | undefined;
205
+ displayMap?: boolean | undefined;
206
+ allowGeocoding?: boolean | undefined;
207
+ addressFormat?: "us" | "uk" | "international" | undefined;
208
+ colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
209
+ allowAlpha?: boolean | undefined;
210
+ presetColors?: string[] | undefined;
211
+ hidden?: boolean | undefined;
212
+ readonly?: boolean | undefined;
213
+ encryption?: boolean | undefined;
214
+ index?: boolean | undefined;
215
+ externalId?: boolean | undefined;
216
+ }>;
217
+ /**
218
+ * The complete record/document being edited.
219
+ * Useful for conditional logic and cross-field dependencies.
220
+ */
221
+ record: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
222
+ /**
223
+ * Custom options passed to the widget.
224
+ * Can contain widget-specific configuration like themes, behaviors, etc.
225
+ */
226
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
227
+ }, "strip", z.ZodTypeAny, {
228
+ required: boolean;
229
+ field: {
230
+ type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
231
+ required: boolean;
232
+ searchable: boolean;
233
+ multiple: boolean;
234
+ unique: boolean;
235
+ deleteBehavior: "set_null" | "cascade" | "restrict";
236
+ hidden: boolean;
237
+ readonly: boolean;
238
+ encryption: boolean;
239
+ index: boolean;
240
+ externalId: boolean;
241
+ formula?: string | undefined;
242
+ options?: {
243
+ value: string;
244
+ label: string;
245
+ color?: string | undefined;
246
+ default?: boolean | undefined;
247
+ }[] | undefined;
248
+ label?: string | undefined;
249
+ name?: string | undefined;
250
+ description?: string | undefined;
251
+ format?: string | undefined;
252
+ defaultValue?: any;
253
+ maxLength?: number | undefined;
254
+ minLength?: number | undefined;
255
+ precision?: number | undefined;
256
+ scale?: number | undefined;
257
+ min?: number | undefined;
258
+ max?: number | undefined;
259
+ reference?: string | undefined;
260
+ referenceFilters?: string[] | undefined;
261
+ writeRequiresMasterRead?: boolean | undefined;
262
+ expression?: string | undefined;
263
+ summaryOperations?: {
264
+ object: string;
265
+ function: "min" | "max" | "count" | "sum" | "avg";
266
+ field: string;
267
+ } | undefined;
268
+ language?: string | undefined;
269
+ theme?: string | undefined;
270
+ lineNumbers?: boolean | undefined;
271
+ maxRating?: number | undefined;
272
+ allowHalf?: boolean | undefined;
273
+ displayMap?: boolean | undefined;
274
+ allowGeocoding?: boolean | undefined;
275
+ addressFormat?: "us" | "uk" | "international" | undefined;
276
+ colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
277
+ allowAlpha?: boolean | undefined;
278
+ presetColors?: string[] | undefined;
279
+ };
280
+ readonly: boolean;
281
+ onChange: (args_0: any, ...args: unknown[]) => void;
282
+ value?: any;
283
+ options?: Record<string, any> | undefined;
284
+ error?: string | undefined;
285
+ record?: Record<string, any> | undefined;
286
+ }, {
287
+ field: {
288
+ type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
289
+ formula?: string | undefined;
290
+ options?: {
291
+ value: string;
292
+ label: string;
293
+ color?: string | undefined;
294
+ default?: boolean | undefined;
295
+ }[] | undefined;
296
+ label?: string | undefined;
297
+ name?: string | undefined;
298
+ description?: string | undefined;
299
+ format?: string | undefined;
300
+ required?: boolean | undefined;
301
+ searchable?: boolean | undefined;
302
+ multiple?: boolean | undefined;
303
+ unique?: boolean | undefined;
304
+ defaultValue?: any;
305
+ maxLength?: number | undefined;
306
+ minLength?: number | undefined;
307
+ precision?: number | undefined;
308
+ scale?: number | undefined;
309
+ min?: number | undefined;
310
+ max?: number | undefined;
311
+ reference?: string | undefined;
312
+ referenceFilters?: string[] | undefined;
313
+ writeRequiresMasterRead?: boolean | undefined;
314
+ deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
315
+ expression?: string | undefined;
316
+ summaryOperations?: {
317
+ object: string;
318
+ function: "min" | "max" | "count" | "sum" | "avg";
319
+ field: string;
320
+ } | undefined;
321
+ language?: string | undefined;
322
+ theme?: string | undefined;
323
+ lineNumbers?: boolean | undefined;
324
+ maxRating?: number | undefined;
325
+ allowHalf?: boolean | undefined;
326
+ displayMap?: boolean | undefined;
327
+ allowGeocoding?: boolean | undefined;
328
+ addressFormat?: "us" | "uk" | "international" | undefined;
329
+ colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
330
+ allowAlpha?: boolean | undefined;
331
+ presetColors?: string[] | undefined;
332
+ hidden?: boolean | undefined;
333
+ readonly?: boolean | undefined;
334
+ encryption?: boolean | undefined;
335
+ index?: boolean | undefined;
336
+ externalId?: boolean | undefined;
337
+ };
338
+ onChange: (args_0: any, ...args: unknown[]) => void;
339
+ value?: any;
340
+ options?: Record<string, any> | undefined;
341
+ required?: boolean | undefined;
342
+ readonly?: boolean | undefined;
343
+ error?: string | undefined;
344
+ record?: Record<string, any> | undefined;
345
+ }>;
346
+ /**
347
+ * TypeScript type for Field Widget Props
348
+ */
349
+ export type FieldWidgetProps = z.infer<typeof FieldWidgetPropsSchema>;
350
+ //# sourceMappingURL=widget.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.zod.d.ts","sourceRoot":"","sources":["../../src/ui/widget.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB;IACjC;;;OAGG;;IAGH;;;;;OAKG;;IAMH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;OAGG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldWidgetPropsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const field_zod_1 = require("../data/field.zod");
6
+ /**
7
+ * Field Widget Props Schema
8
+ *
9
+ * This defines the contract for custom field components and plugin UI extensions.
10
+ * Third-party developers use this interface to build custom field widgets that integrate
11
+ * seamlessly with the ObjectStack UI system.
12
+ *
13
+ * @example
14
+ * // Custom widget implementation
15
+ * function CustomDatePicker(props: FieldWidgetProps) {
16
+ * const { value, onChange, readonly, required, error, field, record, options } = props;
17
+ * // Widget implementation...
18
+ * }
19
+ */
20
+ exports.FieldWidgetPropsSchema = zod_1.z.object({
21
+ /**
22
+ * Current field value.
23
+ * Type depends on the field type (string, number, boolean, array, object, etc.)
24
+ */
25
+ value: zod_1.z.any().describe('Current field value'),
26
+ /**
27
+ * Callback function to update the field value.
28
+ * Should be called when user interaction changes the value.
29
+ *
30
+ * @param newValue - The new value to set
31
+ */
32
+ onChange: zod_1.z.function()
33
+ .args(zod_1.z.any())
34
+ .returns(zod_1.z.void())
35
+ .describe('Callback to update field value'),
36
+ /**
37
+ * Whether the field is in read-only mode.
38
+ * When true, the widget should display the value but not allow editing.
39
+ */
40
+ readonly: zod_1.z.boolean().default(false).describe('Read-only mode flag'),
41
+ /**
42
+ * Whether the field is required.
43
+ * Widget should indicate required state visually and validate accordingly.
44
+ */
45
+ required: zod_1.z.boolean().default(false).describe('Required field flag'),
46
+ /**
47
+ * Validation error message to display.
48
+ * When present, widget should display the error in its UI.
49
+ */
50
+ error: zod_1.z.string().optional().describe('Validation error message'),
51
+ /**
52
+ * Complete field definition from the schema.
53
+ * Contains metadata like type, constraints, options, etc.
54
+ */
55
+ field: field_zod_1.FieldSchema.describe('Field schema definition'),
56
+ /**
57
+ * The complete record/document being edited.
58
+ * Useful for conditional logic and cross-field dependencies.
59
+ */
60
+ record: zod_1.z.record(zod_1.z.any()).optional().describe('Complete record data'),
61
+ /**
62
+ * Custom options passed to the widget.
63
+ * Can contain widget-specific configuration like themes, behaviors, etc.
64
+ */
65
+ options: zod_1.z.record(zod_1.z.any()).optional().describe('Custom widget options'),
66
+ });
@@ -0,0 +1,27 @@
1
+ {
2
+ "$ref": "#/definitions/AccountLinkingConfig",
3
+ "definitions": {
4
+ "AccountLinkingConfig": {
5
+ "type": "object",
6
+ "properties": {
7
+ "enabled": {
8
+ "type": "boolean",
9
+ "default": true,
10
+ "description": "Allow account linking"
11
+ },
12
+ "autoLink": {
13
+ "type": "boolean",
14
+ "default": false,
15
+ "description": "Automatically link accounts with same email"
16
+ },
17
+ "requireVerification": {
18
+ "type": "boolean",
19
+ "default": true,
20
+ "description": "Require email verification before linking"
21
+ }
22
+ },
23
+ "additionalProperties": false
24
+ }
25
+ },
26
+ "$schema": "http://json-schema.org/draft-07/schema#"
27
+ }