@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,61 @@
1
+ {
2
+ "$ref": "#/definitions/TriggerContext",
3
+ "definitions": {
4
+ "TriggerContext": {
5
+ "type": "object",
6
+ "properties": {
7
+ "action": {
8
+ "type": "string",
9
+ "enum": [
10
+ "insert",
11
+ "update",
12
+ "delete"
13
+ ],
14
+ "description": "Database operation type"
15
+ },
16
+ "timing": {
17
+ "type": "string",
18
+ "enum": [
19
+ "before",
20
+ "after"
21
+ ],
22
+ "description": "Trigger execution timing"
23
+ },
24
+ "doc": {
25
+ "type": "object",
26
+ "additionalProperties": {},
27
+ "description": "Current document/record"
28
+ },
29
+ "previousDoc": {
30
+ "type": "object",
31
+ "additionalProperties": {},
32
+ "description": "Previous document state"
33
+ },
34
+ "userId": {
35
+ "type": "string",
36
+ "description": "Current user ID"
37
+ },
38
+ "user": {
39
+ "type": "object",
40
+ "additionalProperties": {},
41
+ "description": "Current user record"
42
+ },
43
+ "ql": {
44
+ "description": "ObjectQL data access API"
45
+ },
46
+ "logger": {
47
+ "description": "Logging interface"
48
+ }
49
+ },
50
+ "required": [
51
+ "action",
52
+ "timing",
53
+ "doc",
54
+ "userId",
55
+ "user"
56
+ ],
57
+ "additionalProperties": false
58
+ }
59
+ },
60
+ "$schema": "http://json-schema.org/draft-07/schema#"
61
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$ref": "#/definitions/TriggerTiming",
3
+ "definitions": {
4
+ "TriggerTiming": {
5
+ "type": "string",
6
+ "enum": [
7
+ "before",
8
+ "after"
9
+ ]
10
+ }
11
+ },
12
+ "$schema": "http://json-schema.org/draft-07/schema#"
13
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$ref": "#/definitions/TwoFactorConfig",
3
+ "definitions": {
4
+ "TwoFactorConfig": {
5
+ "type": "object",
6
+ "properties": {
7
+ "enabled": {
8
+ "type": "boolean",
9
+ "default": false
10
+ },
11
+ "issuer": {
12
+ "type": "string",
13
+ "description": "TOTP issuer name"
14
+ },
15
+ "qrCodeSize": {
16
+ "type": "number",
17
+ "default": 200,
18
+ "description": "QR code size in pixels"
19
+ },
20
+ "backupCodes": {
21
+ "type": "object",
22
+ "properties": {
23
+ "enabled": {
24
+ "type": "boolean",
25
+ "default": true
26
+ },
27
+ "count": {
28
+ "type": "number",
29
+ "default": 10,
30
+ "description": "Number of backup codes to generate"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ }
38
+ },
39
+ "$schema": "http://json-schema.org/draft-07/schema#"
40
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "$ref": "#/definitions/Typography",
3
+ "definitions": {
4
+ "Typography": {
5
+ "type": "object",
6
+ "properties": {
7
+ "fontFamily": {
8
+ "type": "object",
9
+ "properties": {
10
+ "base": {
11
+ "type": "string",
12
+ "description": "Base font family (default: system fonts)"
13
+ },
14
+ "heading": {
15
+ "type": "string",
16
+ "description": "Heading font family"
17
+ },
18
+ "mono": {
19
+ "type": "string",
20
+ "description": "Monospace font family for code"
21
+ }
22
+ },
23
+ "additionalProperties": false
24
+ },
25
+ "fontSize": {
26
+ "type": "object",
27
+ "properties": {
28
+ "xs": {
29
+ "type": "string",
30
+ "description": "Extra small font size (e.g., 0.75rem)"
31
+ },
32
+ "sm": {
33
+ "type": "string",
34
+ "description": "Small font size (e.g., 0.875rem)"
35
+ },
36
+ "base": {
37
+ "type": "string",
38
+ "description": "Base font size (e.g., 1rem)"
39
+ },
40
+ "lg": {
41
+ "type": "string",
42
+ "description": "Large font size (e.g., 1.125rem)"
43
+ },
44
+ "xl": {
45
+ "type": "string",
46
+ "description": "Extra large font size (e.g., 1.25rem)"
47
+ },
48
+ "2xl": {
49
+ "type": "string",
50
+ "description": "2X large font size (e.g., 1.5rem)"
51
+ },
52
+ "3xl": {
53
+ "type": "string",
54
+ "description": "3X large font size (e.g., 1.875rem)"
55
+ },
56
+ "4xl": {
57
+ "type": "string",
58
+ "description": "4X large font size (e.g., 2.25rem)"
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ "fontWeight": {
64
+ "type": "object",
65
+ "properties": {
66
+ "light": {
67
+ "type": "number",
68
+ "description": "Light weight (default: 300)"
69
+ },
70
+ "normal": {
71
+ "type": "number",
72
+ "description": "Normal weight (default: 400)"
73
+ },
74
+ "medium": {
75
+ "type": "number",
76
+ "description": "Medium weight (default: 500)"
77
+ },
78
+ "semibold": {
79
+ "type": "number",
80
+ "description": "Semibold weight (default: 600)"
81
+ },
82
+ "bold": {
83
+ "type": "number",
84
+ "description": "Bold weight (default: 700)"
85
+ }
86
+ },
87
+ "additionalProperties": false
88
+ },
89
+ "lineHeight": {
90
+ "type": "object",
91
+ "properties": {
92
+ "tight": {
93
+ "type": "string",
94
+ "description": "Tight line height (e.g., 1.25)"
95
+ },
96
+ "normal": {
97
+ "type": "string",
98
+ "description": "Normal line height (e.g., 1.5)"
99
+ },
100
+ "relaxed": {
101
+ "type": "string",
102
+ "description": "Relaxed line height (e.g., 1.75)"
103
+ },
104
+ "loose": {
105
+ "type": "string",
106
+ "description": "Loose line height (e.g., 2)"
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ },
111
+ "letterSpacing": {
112
+ "type": "object",
113
+ "properties": {
114
+ "tighter": {
115
+ "type": "string",
116
+ "description": "Tighter letter spacing (e.g., -0.05em)"
117
+ },
118
+ "tight": {
119
+ "type": "string",
120
+ "description": "Tight letter spacing (e.g., -0.025em)"
121
+ },
122
+ "normal": {
123
+ "type": "string",
124
+ "description": "Normal letter spacing (e.g., 0)"
125
+ },
126
+ "wide": {
127
+ "type": "string",
128
+ "description": "Wide letter spacing (e.g., 0.025em)"
129
+ },
130
+ "wider": {
131
+ "type": "string",
132
+ "description": "Wider letter spacing (e.g., 0.05em)"
133
+ }
134
+ },
135
+ "additionalProperties": false
136
+ }
137
+ },
138
+ "additionalProperties": false
139
+ }
140
+ },
141
+ "$schema": "http://json-schema.org/draft-07/schema#"
142
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$ref": "#/definitions/UpdateRequest",
3
+ "definitions": {
4
+ "UpdateRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "data": {
8
+ "type": "object",
9
+ "additionalProperties": {},
10
+ "description": "Partial record data to update"
11
+ }
12
+ },
13
+ "required": [
14
+ "data"
15
+ ],
16
+ "additionalProperties": false
17
+ }
18
+ },
19
+ "$schema": "http://json-schema.org/draft-07/schema#"
20
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$ref": "#/definitions/UserFieldMapping",
3
+ "definitions": {
4
+ "UserFieldMapping": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "default": "id",
10
+ "description": "User ID field"
11
+ },
12
+ "email": {
13
+ "type": "string",
14
+ "default": "email",
15
+ "description": "Email field"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "default": "name",
20
+ "description": "Name field"
21
+ },
22
+ "image": {
23
+ "type": "string",
24
+ "default": "image",
25
+ "description": "Profile image field"
26
+ },
27
+ "emailVerified": {
28
+ "type": "string",
29
+ "default": "email_verified",
30
+ "description": "Email verification status field"
31
+ },
32
+ "createdAt": {
33
+ "type": "string",
34
+ "default": "created_at",
35
+ "description": "Created timestamp field"
36
+ },
37
+ "updatedAt": {
38
+ "type": "string",
39
+ "default": "updated_at",
40
+ "description": "Updated timestamp field"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ },
46
+ "$schema": "http://json-schema.org/draft-07/schema#"
47
+ }