@objectstack/spec 0.1.2 → 0.3.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 (152) hide show
  1. package/README.md +127 -5
  2. package/dist/ai/index.d.ts +14 -0
  3. package/dist/ai/index.d.ts.map +1 -0
  4. package/dist/ai/index.js +29 -0
  5. package/dist/ai/model-registry.zod.d.ts +1389 -0
  6. package/dist/ai/model-registry.zod.d.ts.map +1 -0
  7. package/dist/ai/model-registry.zod.js +164 -0
  8. package/dist/ai/nlq.zod.d.ts +1126 -0
  9. package/dist/ai/nlq.zod.d.ts.map +1 -0
  10. package/dist/ai/nlq.zod.js +246 -0
  11. package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
  12. package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
  13. package/dist/ai/rag-pipeline.zod.js +244 -0
  14. package/dist/api/index.d.ts +9 -0
  15. package/dist/api/index.d.ts.map +1 -0
  16. package/dist/api/index.js +24 -0
  17. package/dist/data/filter.zod.d.ts +295 -0
  18. package/dist/data/filter.zod.d.ts.map +1 -0
  19. package/dist/data/filter.zod.js +226 -0
  20. package/dist/data/index.d.ts +21 -0
  21. package/dist/data/index.d.ts.map +1 -0
  22. package/dist/data/index.js +36 -0
  23. package/dist/data/query.zod.d.ts +386 -3
  24. package/dist/data/query.zod.d.ts.map +1 -1
  25. package/dist/data/query.zod.js +386 -3
  26. package/dist/data/validation.zod.d.ts +349 -0
  27. package/dist/data/validation.zod.d.ts.map +1 -1
  28. package/dist/data/validation.zod.js +395 -0
  29. package/dist/index.d.ts +36 -39
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +64 -47
  32. package/dist/system/auth-protocol.d.ts +175 -0
  33. package/dist/system/auth-protocol.d.ts.map +1 -0
  34. package/dist/system/auth-protocol.js +60 -0
  35. package/dist/system/auth.zod.d.ts +3319 -0
  36. package/dist/system/auth.zod.d.ts.map +1 -0
  37. package/dist/system/auth.zod.js +499 -0
  38. package/dist/system/datasource.zod.d.ts +118 -38
  39. package/dist/system/datasource.zod.d.ts.map +1 -1
  40. package/dist/system/datasource.zod.js +25 -6
  41. package/dist/system/driver.zod.d.ts +106 -0
  42. package/dist/system/driver.zod.d.ts.map +1 -1
  43. package/dist/system/driver.zod.js +47 -0
  44. package/dist/system/identity.zod.d.ts +234 -180
  45. package/dist/system/identity.zod.d.ts.map +1 -1
  46. package/dist/system/identity.zod.js +168 -51
  47. package/dist/system/index.d.ts +28 -0
  48. package/dist/system/index.d.ts.map +1 -0
  49. package/dist/system/index.js +43 -0
  50. package/dist/system/manifest.zod.d.ts +10 -10
  51. package/dist/system/organization.zod.d.ts +179 -0
  52. package/dist/system/organization.zod.d.ts.map +1 -0
  53. package/dist/system/organization.zod.js +129 -0
  54. package/dist/system/policy.zod.d.ts +10 -10
  55. package/dist/ui/action.zod.d.ts +2 -2
  56. package/dist/ui/dashboard.zod.d.ts +10 -10
  57. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  58. package/dist/ui/dashboard.zod.js +3 -2
  59. package/dist/ui/index.d.ts +17 -0
  60. package/dist/ui/index.d.ts.map +1 -0
  61. package/dist/ui/index.js +32 -0
  62. package/dist/ui/report.zod.d.ts +4 -32
  63. package/dist/ui/report.zod.d.ts.map +1 -1
  64. package/dist/ui/report.zod.js +3 -8
  65. package/dist/ui/theme.zod.d.ts +6 -6
  66. package/json-schema/Account.json +87 -0
  67. package/json-schema/AccountLinkingConfig.json +27 -0
  68. package/json-schema/AuthConfig.json +841 -0
  69. package/json-schema/AuthPluginConfig.json +28 -0
  70. package/json-schema/AuthStrategy.json +17 -0
  71. package/json-schema/AuthenticationConfig.json +601 -0
  72. package/json-schema/AuthenticationProvider.json +617 -0
  73. package/json-schema/CSRFConfig.json +31 -0
  74. package/json-schema/ChunkingStrategy.json +133 -0
  75. package/json-schema/ComparisonOperator.json +56 -0
  76. package/json-schema/Dashboard.json +20 -0
  77. package/json-schema/DashboardWidget.json +20 -0
  78. package/json-schema/DatabaseAdapter.json +38 -0
  79. package/json-schema/DatabaseMapping.json +48 -0
  80. package/json-schema/Datasource.json +25 -5
  81. package/json-schema/DatasourceCapabilities.json +25 -5
  82. package/json-schema/DocumentChunk.json +97 -0
  83. package/json-schema/DocumentLoaderConfig.json +69 -0
  84. package/json-schema/DocumentMetadata.json +61 -0
  85. package/json-schema/DriverCapabilities.json +30 -0
  86. package/json-schema/DriverDefinition.json +25 -5
  87. package/json-schema/DriverInterface.json +30 -0
  88. package/json-schema/EmailPasswordConfig.json +43 -0
  89. package/json-schema/EmbeddingModel.json +57 -0
  90. package/json-schema/EnterpriseAuthConfig.json +172 -0
  91. package/json-schema/Entity.json +55 -0
  92. package/json-schema/EqualityOperator.json +14 -0
  93. package/json-schema/FieldOperators.json +108 -0
  94. package/json-schema/FieldSynonymConfig.json +39 -0
  95. package/json-schema/FilterCondition.json +28 -0
  96. package/json-schema/Invitation.json +69 -0
  97. package/json-schema/InvitationStatus.json +15 -0
  98. package/json-schema/LDAPConfig.json +22 -5
  99. package/json-schema/MagicLinkConfig.json +21 -0
  100. package/json-schema/Member.json +46 -0
  101. package/json-schema/ModelCapability.json +47 -0
  102. package/json-schema/ModelConfig.json +181 -0
  103. package/json-schema/ModelLimits.json +45 -0
  104. package/json-schema/ModelPricing.json +28 -0
  105. package/json-schema/ModelProvider.json +19 -0
  106. package/json-schema/ModelRegistry.json +427 -0
  107. package/json-schema/ModelRegistryEntry.json +239 -0
  108. package/json-schema/ModelSelectionCriteria.json +50 -0
  109. package/json-schema/NLQAnalytics.json +106 -0
  110. package/json-schema/NLQFieldMapping.json +40 -0
  111. package/json-schema/NLQModelConfig.json +78 -0
  112. package/json-schema/NLQParseResult.json +252 -0
  113. package/json-schema/NLQRequest.json +110 -0
  114. package/json-schema/NLQResponse.json +288 -0
  115. package/json-schema/NLQTrainingExample.json +120 -0
  116. package/json-schema/NormalizedFilter.json +348 -0
  117. package/json-schema/OAuthProvider.json +66 -0
  118. package/json-schema/OIDCConfig.json +18 -3
  119. package/json-schema/Organization.json +52 -0
  120. package/json-schema/PasskeyConfig.json +54 -0
  121. package/json-schema/PromptTemplate.json +163 -0
  122. package/json-schema/PromptVariable.json +56 -0
  123. package/json-schema/QueryContext.json +72 -0
  124. package/json-schema/QueryFilter.json +34 -0
  125. package/json-schema/QueryIntent.json +21 -0
  126. package/json-schema/QueryTemplate.json +81 -0
  127. package/json-schema/RAGPipelineConfig.json +552 -0
  128. package/json-schema/RAGPipelineStatus.json +66 -0
  129. package/json-schema/RAGQueryRequest.json +64 -0
  130. package/json-schema/RAGQueryResponse.json +108 -0
  131. package/json-schema/RangeOperator.json +41 -0
  132. package/json-schema/RateLimitConfig.json +36 -0
  133. package/json-schema/Report.json +20 -26
  134. package/json-schema/RerankingConfig.json +34 -0
  135. package/json-schema/RetrievalStrategy.json +121 -0
  136. package/json-schema/SAMLConfig.json +17 -3
  137. package/json-schema/Session.json +63 -0
  138. package/json-schema/SessionConfig.json +56 -0
  139. package/json-schema/SetOperator.json +18 -0
  140. package/json-schema/SpecialOperator.json +18 -0
  141. package/json-schema/StandardAuthProvider.json +857 -0
  142. package/json-schema/StringOperator.json +21 -0
  143. package/json-schema/Timeframe.json +68 -0
  144. package/json-schema/TwoFactorConfig.json +40 -0
  145. package/json-schema/User.json +51 -0
  146. package/json-schema/UserFieldMapping.json +47 -0
  147. package/json-schema/VectorStoreConfig.json +82 -0
  148. package/json-schema/VectorStoreProvider.json +21 -0
  149. package/json-schema/VerificationToken.json +36 -0
  150. package/package.json +27 -1
  151. package/json-schema/AuthProtocol.json +0 -17
  152. package/json-schema/AuthProvider.json +0 -171
@@ -0,0 +1,163 @@
1
+ {
2
+ "$ref": "#/definitions/PromptTemplate",
3
+ "definitions": {
4
+ "PromptTemplate": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "description": "Unique template identifier"
10
+ },
11
+ "name": {
12
+ "type": "string",
13
+ "pattern": "^[a-z_][a-z0-9_]*$",
14
+ "description": "Template name (snake_case)"
15
+ },
16
+ "label": {
17
+ "type": "string",
18
+ "description": "Display name"
19
+ },
20
+ "system": {
21
+ "type": "string",
22
+ "description": "System prompt"
23
+ },
24
+ "user": {
25
+ "type": "string",
26
+ "description": "User prompt template with variables"
27
+ },
28
+ "assistant": {
29
+ "type": "string",
30
+ "description": "Assistant message prefix"
31
+ },
32
+ "variables": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "properties": {
37
+ "name": {
38
+ "type": "string",
39
+ "description": "Variable name (e.g., \"user_name\", \"context\")"
40
+ },
41
+ "type": {
42
+ "type": "string",
43
+ "enum": [
44
+ "string",
45
+ "number",
46
+ "boolean",
47
+ "object",
48
+ "array"
49
+ ],
50
+ "default": "string"
51
+ },
52
+ "required": {
53
+ "type": "boolean",
54
+ "default": false
55
+ },
56
+ "defaultValue": {},
57
+ "description": {
58
+ "type": "string"
59
+ },
60
+ "validation": {
61
+ "type": "object",
62
+ "properties": {
63
+ "minLength": {
64
+ "type": "number"
65
+ },
66
+ "maxLength": {
67
+ "type": "number"
68
+ },
69
+ "pattern": {
70
+ "type": "string"
71
+ },
72
+ "enum": {
73
+ "type": "array"
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ }
78
+ },
79
+ "required": [
80
+ "name"
81
+ ],
82
+ "additionalProperties": false
83
+ },
84
+ "description": "Template variables"
85
+ },
86
+ "modelId": {
87
+ "type": "string",
88
+ "description": "Recommended model ID"
89
+ },
90
+ "temperature": {
91
+ "type": "number",
92
+ "minimum": 0,
93
+ "maximum": 2
94
+ },
95
+ "maxTokens": {
96
+ "type": "number"
97
+ },
98
+ "topP": {
99
+ "type": "number"
100
+ },
101
+ "frequencyPenalty": {
102
+ "type": "number"
103
+ },
104
+ "presencePenalty": {
105
+ "type": "number"
106
+ },
107
+ "stopSequences": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "version": {
114
+ "type": "string",
115
+ "default": "1.0.0"
116
+ },
117
+ "description": {
118
+ "type": "string"
119
+ },
120
+ "category": {
121
+ "type": "string",
122
+ "description": "Template category (e.g., \"code_generation\", \"support\")"
123
+ },
124
+ "tags": {
125
+ "type": "array",
126
+ "items": {
127
+ "type": "string"
128
+ }
129
+ },
130
+ "examples": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "object",
134
+ "properties": {
135
+ "input": {
136
+ "type": "object",
137
+ "additionalProperties": {},
138
+ "description": "Example variable values"
139
+ },
140
+ "output": {
141
+ "type": "string",
142
+ "description": "Expected output"
143
+ }
144
+ },
145
+ "required": [
146
+ "input",
147
+ "output"
148
+ ],
149
+ "additionalProperties": false
150
+ }
151
+ }
152
+ },
153
+ "required": [
154
+ "id",
155
+ "name",
156
+ "label",
157
+ "user"
158
+ ],
159
+ "additionalProperties": false
160
+ }
161
+ },
162
+ "$schema": "http://json-schema.org/draft-07/schema#"
163
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$ref": "#/definitions/PromptVariable",
3
+ "definitions": {
4
+ "PromptVariable": {
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "description": "Variable name (e.g., \"user_name\", \"context\")"
10
+ },
11
+ "type": {
12
+ "type": "string",
13
+ "enum": [
14
+ "string",
15
+ "number",
16
+ "boolean",
17
+ "object",
18
+ "array"
19
+ ],
20
+ "default": "string"
21
+ },
22
+ "required": {
23
+ "type": "boolean",
24
+ "default": false
25
+ },
26
+ "defaultValue": {},
27
+ "description": {
28
+ "type": "string"
29
+ },
30
+ "validation": {
31
+ "type": "object",
32
+ "properties": {
33
+ "minLength": {
34
+ "type": "number"
35
+ },
36
+ "maxLength": {
37
+ "type": "number"
38
+ },
39
+ "pattern": {
40
+ "type": "string"
41
+ },
42
+ "enum": {
43
+ "type": "array"
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ }
48
+ },
49
+ "required": [
50
+ "name"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ },
55
+ "$schema": "http://json-schema.org/draft-07/schema#"
56
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$ref": "#/definitions/QueryContext",
3
+ "definitions": {
4
+ "QueryContext": {
5
+ "type": "object",
6
+ "properties": {
7
+ "userId": {
8
+ "type": "string"
9
+ },
10
+ "userRole": {
11
+ "type": "string"
12
+ },
13
+ "currentObject": {
14
+ "type": "string",
15
+ "description": "Current object being viewed"
16
+ },
17
+ "currentRecordId": {
18
+ "type": "string",
19
+ "description": "Current record ID"
20
+ },
21
+ "conversationHistory": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "object",
25
+ "properties": {
26
+ "query": {
27
+ "type": "string"
28
+ },
29
+ "timestamp": {
30
+ "type": "string"
31
+ },
32
+ "intent": {
33
+ "type": "string",
34
+ "enum": [
35
+ "select",
36
+ "aggregate",
37
+ "filter",
38
+ "sort",
39
+ "compare",
40
+ "trend",
41
+ "insight",
42
+ "create",
43
+ "update",
44
+ "delete"
45
+ ]
46
+ }
47
+ },
48
+ "required": [
49
+ "query",
50
+ "timestamp"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ },
55
+ "defaultLimit": {
56
+ "type": "integer",
57
+ "default": 100
58
+ },
59
+ "timezone": {
60
+ "type": "string",
61
+ "default": "UTC"
62
+ },
63
+ "locale": {
64
+ "type": "string",
65
+ "default": "en-US"
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ }
70
+ },
71
+ "$schema": "http://json-schema.org/draft-07/schema#"
72
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$ref": "#/definitions/QueryFilter",
3
+ "definitions": {
4
+ "QueryFilter": {
5
+ "type": "object",
6
+ "properties": {
7
+ "where": {
8
+ "allOf": [
9
+ {
10
+ "type": "object",
11
+ "additionalProperties": {}
12
+ },
13
+ {
14
+ "type": "object",
15
+ "properties": {
16
+ "$and": {
17
+ "type": "array",
18
+ "items": {}
19
+ },
20
+ "$or": {
21
+ "type": "array",
22
+ "items": {}
23
+ },
24
+ "$not": {}
25
+ }
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "additionalProperties": false
31
+ }
32
+ },
33
+ "$schema": "http://json-schema.org/draft-07/schema#"
34
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$ref": "#/definitions/QueryIntent",
3
+ "definitions": {
4
+ "QueryIntent": {
5
+ "type": "string",
6
+ "enum": [
7
+ "select",
8
+ "aggregate",
9
+ "filter",
10
+ "sort",
11
+ "compare",
12
+ "trend",
13
+ "insight",
14
+ "create",
15
+ "update",
16
+ "delete"
17
+ ]
18
+ }
19
+ },
20
+ "$schema": "http://json-schema.org/draft-07/schema#"
21
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$ref": "#/definitions/QueryTemplate",
3
+ "definitions": {
4
+ "QueryTemplate": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string"
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "pattern": "^[a-z_][a-z0-9_]*$",
13
+ "description": "Template name (snake_case)"
14
+ },
15
+ "label": {
16
+ "type": "string"
17
+ },
18
+ "pattern": {
19
+ "type": "string",
20
+ "description": "Query pattern with placeholders"
21
+ },
22
+ "variables": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "name": {
28
+ "type": "string"
29
+ },
30
+ "type": {
31
+ "type": "string",
32
+ "enum": [
33
+ "object",
34
+ "field",
35
+ "value",
36
+ "timeframe"
37
+ ]
38
+ },
39
+ "required": {
40
+ "type": "boolean",
41
+ "default": false
42
+ }
43
+ },
44
+ "required": [
45
+ "name",
46
+ "type"
47
+ ],
48
+ "additionalProperties": false
49
+ }
50
+ },
51
+ "astTemplate": {
52
+ "description": "AST template with variable placeholders"
53
+ },
54
+ "category": {
55
+ "type": "string"
56
+ },
57
+ "examples": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ "tags": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ }
68
+ }
69
+ },
70
+ "required": [
71
+ "id",
72
+ "name",
73
+ "label",
74
+ "pattern",
75
+ "variables"
76
+ ],
77
+ "additionalProperties": false
78
+ }
79
+ },
80
+ "$schema": "http://json-schema.org/draft-07/schema#"
81
+ }