@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,20 @@
1
+ {
2
+ "$ref": "#/definitions/CreateRequest",
3
+ "definitions": {
4
+ "CreateRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "data": {
8
+ "type": "object",
9
+ "additionalProperties": {},
10
+ "description": "Record data to insert"
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,56 @@
1
+ {
2
+ "$ref": "#/definitions/CrossFieldValidation",
3
+ "definitions": {
4
+ "CrossFieldValidation": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "pattern": "^[a-z_][a-z0-9_]*$",
10
+ "description": "Unique rule name"
11
+ },
12
+ "active": {
13
+ "type": "boolean",
14
+ "default": true
15
+ },
16
+ "severity": {
17
+ "type": "string",
18
+ "enum": [
19
+ "error",
20
+ "warning",
21
+ "info"
22
+ ],
23
+ "default": "error"
24
+ },
25
+ "message": {
26
+ "type": "string",
27
+ "description": "Error message to display"
28
+ },
29
+ "type": {
30
+ "type": "string",
31
+ "const": "cross_field"
32
+ },
33
+ "condition": {
34
+ "type": "string",
35
+ "description": "Formula expression comparing fields (e.g. \"end_date > start_date\")"
36
+ },
37
+ "fields": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ },
42
+ "description": "Fields involved in the validation"
43
+ }
44
+ },
45
+ "required": [
46
+ "name",
47
+ "message",
48
+ "type",
49
+ "condition",
50
+ "fields"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ },
55
+ "$schema": "http://json-schema.org/draft-07/schema#"
56
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$ref": "#/definitions/CustomValidator",
3
+ "definitions": {
4
+ "CustomValidator": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "pattern": "^[a-z_][a-z0-9_]*$",
10
+ "description": "Unique rule name"
11
+ },
12
+ "active": {
13
+ "type": "boolean",
14
+ "default": true
15
+ },
16
+ "severity": {
17
+ "type": "string",
18
+ "enum": [
19
+ "error",
20
+ "warning",
21
+ "info"
22
+ ],
23
+ "default": "error"
24
+ },
25
+ "message": {
26
+ "type": "string",
27
+ "description": "Error message to display"
28
+ },
29
+ "type": {
30
+ "type": "string",
31
+ "const": "custom"
32
+ },
33
+ "field": {
34
+ "type": "string",
35
+ "description": "Field to validate (optional for record-level validation)"
36
+ },
37
+ "validatorFunction": {
38
+ "type": "string",
39
+ "description": "Function name or reference to custom validator"
40
+ },
41
+ "params": {
42
+ "type": "object",
43
+ "additionalProperties": {},
44
+ "description": "Additional parameters for the validator"
45
+ }
46
+ },
47
+ "required": [
48
+ "name",
49
+ "message",
50
+ "type",
51
+ "validatorFunction"
52
+ ],
53
+ "additionalProperties": false
54
+ }
55
+ },
56
+ "$schema": "http://json-schema.org/draft-07/schema#"
57
+ }
@@ -15,24 +15,6 @@
15
15
  },
16
16
  "driver": {
17
17
  "type": "string",
18
- "enum": [
19
- "postgres",
20
- "mysql",
21
- "sqlserver",
22
- "oracle",
23
- "sqlite",
24
- "mongo",
25
- "redis",
26
- "excel",
27
- "csv",
28
- "airtable",
29
- "rest_api",
30
- "graphql",
31
- "odata",
32
- "salesforce",
33
- "sap",
34
- "workday"
35
- ],
36
18
  "description": "Underlying driver type"
37
19
  },
38
20
  "config": {
@@ -0,0 +1,68 @@
1
+ {
2
+ "$ref": "#/definitions/DeleteResponse",
3
+ "definitions": {
4
+ "DeleteResponse": {
5
+ "type": "object",
6
+ "properties": {
7
+ "success": {
8
+ "type": "boolean",
9
+ "description": "Operation success status"
10
+ },
11
+ "error": {
12
+ "type": "object",
13
+ "properties": {
14
+ "code": {
15
+ "type": "string",
16
+ "description": "Error code (e.g. validation_error)"
17
+ },
18
+ "message": {
19
+ "type": "string",
20
+ "description": "Readable error message"
21
+ },
22
+ "details": {
23
+ "description": "Additional error context (e.g. field validation errors)"
24
+ }
25
+ },
26
+ "required": [
27
+ "code",
28
+ "message"
29
+ ],
30
+ "additionalProperties": false,
31
+ "description": "Error details if success is false"
32
+ },
33
+ "meta": {
34
+ "type": "object",
35
+ "properties": {
36
+ "timestamp": {
37
+ "type": "string"
38
+ },
39
+ "duration": {
40
+ "type": "number"
41
+ },
42
+ "requestId": {
43
+ "type": "string"
44
+ },
45
+ "traceId": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "required": [
50
+ "timestamp"
51
+ ],
52
+ "additionalProperties": false,
53
+ "description": "Response metadata"
54
+ },
55
+ "id": {
56
+ "type": "string",
57
+ "description": "ID of the deleted record"
58
+ }
59
+ },
60
+ "required": [
61
+ "success",
62
+ "id"
63
+ ],
64
+ "additionalProperties": false
65
+ }
66
+ },
67
+ "$schema": "http://json-schema.org/draft-07/schema#"
68
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "$ref": "#/definitions/Discovery",
3
+ "definitions": {
4
+ "Discovery": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string"
9
+ },
10
+ "version": {
11
+ "type": "string"
12
+ },
13
+ "environment": {
14
+ "type": "string",
15
+ "enum": [
16
+ "production",
17
+ "sandbox",
18
+ "development"
19
+ ]
20
+ },
21
+ "routes": {
22
+ "type": "object",
23
+ "properties": {
24
+ "data": {
25
+ "type": "string",
26
+ "description": "e.g. /api/v1/data"
27
+ },
28
+ "metadata": {
29
+ "type": "string",
30
+ "description": "e.g. /api/v1/meta"
31
+ },
32
+ "auth": {
33
+ "type": "string",
34
+ "description": "e.g. /api/v1/auth"
35
+ },
36
+ "actions": {
37
+ "type": "string",
38
+ "description": "e.g. /api/v1/p"
39
+ },
40
+ "storage": {
41
+ "type": "string",
42
+ "description": "e.g. /api/v1/storage"
43
+ },
44
+ "graphql": {
45
+ "type": "string",
46
+ "description": "e.g. /api/v1/graphql"
47
+ }
48
+ },
49
+ "required": [
50
+ "data",
51
+ "metadata",
52
+ "auth"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ "features": {
57
+ "type": "object",
58
+ "properties": {
59
+ "graphql": {
60
+ "type": "boolean",
61
+ "default": false
62
+ },
63
+ "search": {
64
+ "type": "boolean",
65
+ "default": false
66
+ },
67
+ "websockets": {
68
+ "type": "boolean",
69
+ "default": false
70
+ },
71
+ "files": {
72
+ "type": "boolean",
73
+ "default": true
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ },
78
+ "locale": {
79
+ "type": "object",
80
+ "properties": {
81
+ "default": {
82
+ "type": "string"
83
+ },
84
+ "supported": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ "timezone": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "required": [
95
+ "default",
96
+ "supported",
97
+ "timezone"
98
+ ],
99
+ "additionalProperties": false
100
+ }
101
+ },
102
+ "required": [
103
+ "name",
104
+ "version",
105
+ "environment",
106
+ "routes",
107
+ "features",
108
+ "locale"
109
+ ],
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "$schema": "http://json-schema.org/draft-07/schema#"
114
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$ref": "#/definitions/DriverCapabilities",
3
+ "definitions": {
4
+ "DriverCapabilities": {
5
+ "type": "object",
6
+ "properties": {
7
+ "transactions": {
8
+ "type": "boolean",
9
+ "description": "Supports transactions"
10
+ },
11
+ "joins": {
12
+ "type": "boolean",
13
+ "description": "Supports SQL joins"
14
+ },
15
+ "fullTextSearch": {
16
+ "type": "boolean",
17
+ "description": "Supports full-text search"
18
+ },
19
+ "jsonFields": {
20
+ "type": "boolean",
21
+ "description": "Supports JSON field types"
22
+ },
23
+ "arrayFields": {
24
+ "type": "boolean",
25
+ "description": "Supports array field types"
26
+ }
27
+ },
28
+ "required": [
29
+ "transactions",
30
+ "joins",
31
+ "fullTextSearch",
32
+ "jsonFields",
33
+ "arrayFields"
34
+ ],
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "$schema": "http://json-schema.org/draft-07/schema#"
39
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$ref": "#/definitions/DriverDefinition",
3
+ "definitions": {
4
+ "DriverDefinition": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "description": "Unique driver identifier (e.g. \"postgres\")"
10
+ },
11
+ "label": {
12
+ "type": "string",
13
+ "description": "Display label (e.g. \"PostgreSQL\")"
14
+ },
15
+ "description": {
16
+ "type": "string"
17
+ },
18
+ "icon": {
19
+ "type": "string"
20
+ },
21
+ "configSchema": {
22
+ "type": "object",
23
+ "additionalProperties": {},
24
+ "description": "JSON Schema for connection configuration"
25
+ },
26
+ "capabilities": {
27
+ "type": "object",
28
+ "properties": {
29
+ "joins": {
30
+ "type": "boolean",
31
+ "default": false
32
+ },
33
+ "transactions": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "fullTextSearch": {
38
+ "type": "boolean",
39
+ "default": false
40
+ },
41
+ "aggregation": {
42
+ "type": "boolean",
43
+ "default": false
44
+ },
45
+ "dynamicSchema": {
46
+ "type": "boolean",
47
+ "default": false
48
+ },
49
+ "readOnly": {
50
+ "type": "boolean",
51
+ "default": false
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
56
+ },
57
+ "required": [
58
+ "id",
59
+ "label",
60
+ "configSchema"
61
+ ],
62
+ "additionalProperties": false
63
+ }
64
+ },
65
+ "$schema": "http://json-schema.org/draft-07/schema#"
66
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$ref": "#/definitions/DriverInterface",
3
+ "definitions": {
4
+ "DriverInterface": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "description": "Driver unique name"
10
+ },
11
+ "version": {
12
+ "type": "string",
13
+ "description": "Driver version"
14
+ },
15
+ "supports": {
16
+ "type": "object",
17
+ "properties": {
18
+ "transactions": {
19
+ "type": "boolean",
20
+ "description": "Supports transactions"
21
+ },
22
+ "joins": {
23
+ "type": "boolean",
24
+ "description": "Supports SQL joins"
25
+ },
26
+ "fullTextSearch": {
27
+ "type": "boolean",
28
+ "description": "Supports full-text search"
29
+ },
30
+ "jsonFields": {
31
+ "type": "boolean",
32
+ "description": "Supports JSON field types"
33
+ },
34
+ "arrayFields": {
35
+ "type": "boolean",
36
+ "description": "Supports array field types"
37
+ }
38
+ },
39
+ "required": [
40
+ "transactions",
41
+ "joins",
42
+ "fullTextSearch",
43
+ "jsonFields",
44
+ "arrayFields"
45
+ ],
46
+ "additionalProperties": false
47
+ }
48
+ },
49
+ "required": [
50
+ "name",
51
+ "version",
52
+ "supports"
53
+ ],
54
+ "additionalProperties": false
55
+ }
56
+ },
57
+ "$schema": "http://json-schema.org/draft-07/schema#"
58
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/DriverOptions",
3
+ "definitions": {
4
+ "DriverOptions": {
5
+ "type": "object",
6
+ "properties": {
7
+ "transaction": {
8
+ "description": "Transaction handle"
9
+ },
10
+ "timeout": {
11
+ "type": "number",
12
+ "description": "Timeout in ms"
13
+ },
14
+ "skipCache": {
15
+ "type": "boolean",
16
+ "description": "Bypass cache"
17
+ }
18
+ },
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }
@@ -3,24 +3,7 @@
3
3
  "definitions": {
4
4
  "DriverType": {
5
5
  "type": "string",
6
- "enum": [
7
- "postgres",
8
- "mysql",
9
- "sqlserver",
10
- "oracle",
11
- "sqlite",
12
- "mongo",
13
- "redis",
14
- "excel",
15
- "csv",
16
- "airtable",
17
- "rest_api",
18
- "graphql",
19
- "odata",
20
- "salesforce",
21
- "sap",
22
- "workday"
23
- ]
6
+ "description": "Underlying driver identifier"
24
7
  }
25
8
  },
26
9
  "$schema": "http://json-schema.org/draft-07/schema#"