@objectstack/spec 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) 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/mapping.zod.d.ts +215 -2
  10. package/dist/data/mapping.zod.d.ts.map +1 -1
  11. package/dist/data/object.zod.d.ts +505 -25
  12. package/dist/data/object.zod.d.ts.map +1 -1
  13. package/dist/data/object.zod.js +32 -5
  14. package/dist/data/query.zod.d.ts +349 -0
  15. package/dist/data/query.zod.d.ts.map +1 -1
  16. package/dist/data/query.zod.js +77 -1
  17. package/dist/data/trigger.zod.d.ts +354 -0
  18. package/dist/data/trigger.zod.d.ts.map +1 -0
  19. package/dist/data/trigger.zod.js +195 -0
  20. package/dist/data/validation.zod.d.ts +83 -43
  21. package/dist/data/validation.zod.d.ts.map +1 -1
  22. package/dist/data/validation.zod.js +51 -5
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +9 -0
  26. package/dist/system/api.zod.d.ts +130 -4
  27. package/dist/system/api.zod.d.ts.map +1 -1
  28. package/dist/system/api.zod.js +4 -1
  29. package/dist/system/datasource.zod.d.ts +89 -6
  30. package/dist/system/datasource.zod.d.ts.map +1 -1
  31. package/dist/system/datasource.zod.js +33 -5
  32. package/dist/system/discovery.zod.d.ts +174 -0
  33. package/dist/system/discovery.zod.d.ts.map +1 -0
  34. package/dist/system/discovery.zod.js +53 -0
  35. package/dist/system/driver.zod.d.ts +1525 -0
  36. package/dist/system/driver.zod.d.ts.map +1 -0
  37. package/dist/system/driver.zod.js +290 -0
  38. package/dist/system/license.zod.d.ts +2 -2
  39. package/dist/system/manifest.zod.d.ts +323 -52
  40. package/dist/system/manifest.zod.d.ts.map +1 -1
  41. package/dist/system/manifest.zod.js +91 -17
  42. package/dist/system/plugin.zod.d.ts +3516 -0
  43. package/dist/system/plugin.zod.d.ts.map +1 -0
  44. package/dist/system/plugin.zod.js +226 -0
  45. package/dist/system/territory.zod.d.ts +1 -1
  46. package/dist/system/webhook.zod.d.ts +3 -3
  47. package/dist/ui/action.zod.d.ts +19 -12
  48. package/dist/ui/action.zod.d.ts.map +1 -1
  49. package/dist/ui/action.zod.js +7 -1
  50. package/dist/ui/app.zod.d.ts +109 -3
  51. package/dist/ui/app.zod.d.ts.map +1 -1
  52. package/dist/ui/app.zod.js +13 -2
  53. package/dist/ui/dashboard.zod.d.ts +9 -3
  54. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  55. package/dist/ui/dashboard.zod.js +7 -1
  56. package/dist/ui/page.zod.d.ts +6 -6
  57. package/dist/ui/report.zod.d.ts +9 -0
  58. package/dist/ui/report.zod.d.ts.map +1 -1
  59. package/dist/ui/report.zod.js +7 -1
  60. package/dist/ui/theme.zod.d.ts +1221 -0
  61. package/dist/ui/theme.zod.d.ts.map +1 -0
  62. package/dist/ui/theme.zod.js +202 -0
  63. package/dist/ui/widget.zod.d.ts +350 -0
  64. package/dist/ui/widget.zod.d.ts.map +1 -0
  65. package/dist/ui/widget.zod.js +66 -0
  66. package/json-schema/Action.json +8 -2
  67. package/json-schema/ActionParam.json +8 -2
  68. package/json-schema/Address.json +40 -0
  69. package/json-schema/AggregationFunction.json +19 -0
  70. package/json-schema/AggregationNode.json +42 -0
  71. package/json-schema/Animation.json +56 -0
  72. package/json-schema/ApiCapabilities.json +28 -0
  73. package/json-schema/ApiError.json +27 -0
  74. package/json-schema/ApiRoutes.json +41 -0
  75. package/json-schema/App.json +13 -2
  76. package/json-schema/AsyncValidation.json +70 -0
  77. package/json-schema/BaseResponse.json +63 -0
  78. package/json-schema/BorderRadius.json +44 -0
  79. package/json-schema/Breakpoints.json +36 -0
  80. package/json-schema/BulkRequest.json +29 -0
  81. package/json-schema/BulkResponse.json +108 -0
  82. package/json-schema/ColorPalette.json +83 -0
  83. package/json-schema/ConditionalValidation.json +793 -0
  84. package/json-schema/CreateRequest.json +20 -0
  85. package/json-schema/CrossFieldValidation.json +56 -0
  86. package/json-schema/CustomValidator.json +57 -0
  87. package/json-schema/Datasource.json +0 -18
  88. package/json-schema/DeleteResponse.json +68 -0
  89. package/json-schema/Discovery.json +114 -0
  90. package/json-schema/DriverCapabilities.json +39 -0
  91. package/json-schema/DriverDefinition.json +66 -0
  92. package/json-schema/DriverInterface.json +58 -0
  93. package/json-schema/DriverOptions.json +23 -0
  94. package/json-schema/DriverType.json +1 -18
  95. package/json-schema/ExportRequest.json +786 -0
  96. package/json-schema/Field.json +75 -4
  97. package/json-schema/FieldType.json +8 -2
  98. package/json-schema/FieldWidgetProps.json +327 -0
  99. package/json-schema/I18nContext.json +12 -0
  100. package/json-schema/JoinNode.json +455 -0
  101. package/json-schema/JoinType.json +15 -0
  102. package/json-schema/ListRecordResponse.json +103 -0
  103. package/json-schema/LocationCoordinates.json +36 -0
  104. package/json-schema/Logger.json +25 -0
  105. package/json-schema/Manifest.json +243 -18
  106. package/json-schema/Mapping.json +328 -0
  107. package/json-schema/ModificationResult.json +46 -0
  108. package/json-schema/Object.json +103 -6
  109. package/json-schema/ObjectCapabilities.json +26 -0
  110. package/json-schema/ObjectQLClient.json +12 -0
  111. package/json-schema/Plugin.json +20 -0
  112. package/json-schema/PluginContext.json +91 -0
  113. package/json-schema/PluginLifecycle.json +11 -0
  114. package/json-schema/Query.json +328 -0
  115. package/json-schema/RecordData.json +11 -0
  116. package/json-schema/Router.json +12 -0
  117. package/json-schema/Scheduler.json +12 -0
  118. package/json-schema/ScopedStorage.json +12 -0
  119. package/json-schema/Shadow.json +44 -0
  120. package/json-schema/SingleRecordResponse.json +69 -0
  121. package/json-schema/Spacing.json +64 -0
  122. package/json-schema/SystemAPI.json +12 -0
  123. package/json-schema/Theme.json +543 -0
  124. package/json-schema/ThemeMode.json +14 -0
  125. package/json-schema/Trigger.json +73 -0
  126. package/json-schema/TriggerAction.json +14 -0
  127. package/json-schema/TriggerContext.json +61 -0
  128. package/json-schema/TriggerTiming.json +13 -0
  129. package/json-schema/Typography.json +142 -0
  130. package/json-schema/UpdateRequest.json +20 -0
  131. package/json-schema/ValidationRule.json +583 -0
  132. package/json-schema/WindowFunction.json +24 -0
  133. package/json-schema/WindowFunctionNode.json +104 -0
  134. package/json-schema/WindowSpec.json +65 -0
  135. package/json-schema/ZIndex.json +44 -0
  136. package/package.json +8 -3
@@ -0,0 +1,104 @@
1
+ {
2
+ "$ref": "#/definitions/WindowFunctionNode",
3
+ "definitions": {
4
+ "WindowFunctionNode": {
5
+ "type": "object",
6
+ "properties": {
7
+ "function": {
8
+ "type": "string",
9
+ "enum": [
10
+ "row_number",
11
+ "rank",
12
+ "dense_rank",
13
+ "percent_rank",
14
+ "lag",
15
+ "lead",
16
+ "first_value",
17
+ "last_value",
18
+ "sum",
19
+ "avg",
20
+ "count",
21
+ "min",
22
+ "max"
23
+ ],
24
+ "description": "Window function name"
25
+ },
26
+ "field": {
27
+ "type": "string",
28
+ "description": "Field to operate on (for aggregate window functions)"
29
+ },
30
+ "alias": {
31
+ "type": "string",
32
+ "description": "Result column alias"
33
+ },
34
+ "over": {
35
+ "type": "object",
36
+ "properties": {
37
+ "partitionBy": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ },
42
+ "description": "PARTITION BY fields"
43
+ },
44
+ "orderBy": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "properties": {
49
+ "field": {
50
+ "type": "string"
51
+ },
52
+ "order": {
53
+ "type": "string",
54
+ "enum": [
55
+ "asc",
56
+ "desc"
57
+ ],
58
+ "default": "asc"
59
+ }
60
+ },
61
+ "required": [
62
+ "field"
63
+ ],
64
+ "additionalProperties": false
65
+ },
66
+ "description": "ORDER BY specification"
67
+ },
68
+ "frame": {
69
+ "type": "object",
70
+ "properties": {
71
+ "type": {
72
+ "type": "string",
73
+ "enum": [
74
+ "rows",
75
+ "range"
76
+ ]
77
+ },
78
+ "start": {
79
+ "type": "string",
80
+ "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
81
+ },
82
+ "end": {
83
+ "type": "string",
84
+ "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
85
+ }
86
+ },
87
+ "additionalProperties": false,
88
+ "description": "Window frame specification"
89
+ }
90
+ },
91
+ "additionalProperties": false,
92
+ "description": "Window specification (OVER clause)"
93
+ }
94
+ },
95
+ "required": [
96
+ "function",
97
+ "alias",
98
+ "over"
99
+ ],
100
+ "additionalProperties": false
101
+ }
102
+ },
103
+ "$schema": "http://json-schema.org/draft-07/schema#"
104
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$ref": "#/definitions/WindowSpec",
3
+ "definitions": {
4
+ "WindowSpec": {
5
+ "type": "object",
6
+ "properties": {
7
+ "partitionBy": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "string"
11
+ },
12
+ "description": "PARTITION BY fields"
13
+ },
14
+ "orderBy": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "properties": {
19
+ "field": {
20
+ "type": "string"
21
+ },
22
+ "order": {
23
+ "type": "string",
24
+ "enum": [
25
+ "asc",
26
+ "desc"
27
+ ],
28
+ "default": "asc"
29
+ }
30
+ },
31
+ "required": [
32
+ "field"
33
+ ],
34
+ "additionalProperties": false
35
+ },
36
+ "description": "ORDER BY specification"
37
+ },
38
+ "frame": {
39
+ "type": "object",
40
+ "properties": {
41
+ "type": {
42
+ "type": "string",
43
+ "enum": [
44
+ "rows",
45
+ "range"
46
+ ]
47
+ },
48
+ "start": {
49
+ "type": "string",
50
+ "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
51
+ },
52
+ "end": {
53
+ "type": "string",
54
+ "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
55
+ }
56
+ },
57
+ "additionalProperties": false,
58
+ "description": "Window frame specification"
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ }
63
+ },
64
+ "$schema": "http://json-schema.org/draft-07/schema#"
65
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$ref": "#/definitions/ZIndex",
3
+ "definitions": {
4
+ "ZIndex": {
5
+ "type": "object",
6
+ "properties": {
7
+ "base": {
8
+ "type": "number",
9
+ "description": "Base z-index (e.g., 0)"
10
+ },
11
+ "dropdown": {
12
+ "type": "number",
13
+ "description": "Dropdown z-index (e.g., 1000)"
14
+ },
15
+ "sticky": {
16
+ "type": "number",
17
+ "description": "Sticky z-index (e.g., 1020)"
18
+ },
19
+ "fixed": {
20
+ "type": "number",
21
+ "description": "Fixed z-index (e.g., 1030)"
22
+ },
23
+ "modalBackdrop": {
24
+ "type": "number",
25
+ "description": "Modal backdrop z-index (e.g., 1040)"
26
+ },
27
+ "modal": {
28
+ "type": "number",
29
+ "description": "Modal z-index (e.g., 1050)"
30
+ },
31
+ "popover": {
32
+ "type": "number",
33
+ "description": "Popover z-index (e.g., 1060)"
34
+ },
35
+ "tooltip": {
36
+ "type": "number",
37
+ "description": "Tooltip z-index (e.g., 1070)"
38
+ }
39
+ },
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "$schema": "http://json-schema.org/draft-07/schema#"
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/spec",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "ObjectStack Protocol & Specification - TypeScript Interfaces, JSON Schemas, and Convention Configurations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,11 +17,13 @@
17
17
  "types"
18
18
  ],
19
19
  "author": "ObjectStack",
20
- "license": "MIT",
20
+ "license": "Apache-2.0",
21
21
  "devDependencies": {
22
22
  "@types/node": "^20.10.0",
23
+ "@vitest/coverage-v8": "^2.1.8",
23
24
  "tsx": "^4.21.0",
24
25
  "typescript": "^5.3.0",
26
+ "vitest": "^2.1.8",
25
27
  "zod-to-json-schema": "^3.25.1"
26
28
  },
27
29
  "dependencies": {
@@ -38,6 +40,9 @@
38
40
  "dev": "tsc --watch",
39
41
  "clean": "rm -rf dist",
40
42
  "gen:schema": "tsx scripts/build-schemas.ts",
41
- "gen:docs": "tsx scripts/build-docs.ts"
43
+ "gen:docs": "tsx scripts/build-docs.ts",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest",
46
+ "test:coverage": "vitest run --coverage"
42
47
  }
43
48
  }