@objectstack/spec 0.1.0 → 0.1.1

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 (231) hide show
  1. package/README.md +66 -125
  2. package/dist/ai/agent.zod.d.ts +164 -0
  3. package/dist/ai/agent.zod.d.ts.map +1 -0
  4. package/dist/ai/agent.zod.js +51 -0
  5. package/dist/data/dataset.zod.d.ts +60 -0
  6. package/dist/data/dataset.zod.d.ts.map +1 -0
  7. package/dist/data/dataset.zod.js +54 -0
  8. package/dist/data/field.zod.d.ts +170 -0
  9. package/dist/data/field.zod.d.ts.map +1 -0
  10. package/dist/data/field.zod.js +81 -0
  11. package/dist/data/flow.zod.d.ts +242 -0
  12. package/dist/data/flow.zod.d.ts.map +1 -0
  13. package/dist/data/flow.zod.js +77 -0
  14. package/dist/data/mapping.zod.d.ts +257 -0
  15. package/dist/data/mapping.zod.d.ts.map +1 -0
  16. package/dist/data/mapping.zod.js +65 -0
  17. package/dist/data/object.zod.d.ts +364 -0
  18. package/dist/data/object.zod.d.ts.map +1 -0
  19. package/dist/data/object.zod.js +54 -0
  20. package/dist/data/permission.zod.d.ts +163 -0
  21. package/dist/data/permission.zod.d.ts.map +1 -0
  22. package/dist/data/permission.zod.js +62 -0
  23. package/dist/data/query.zod.d.ts +89 -0
  24. package/dist/data/query.zod.d.ts.map +1 -0
  25. package/dist/data/query.zod.js +71 -0
  26. package/dist/data/sharing.zod.d.ts +63 -0
  27. package/dist/data/sharing.zod.d.ts.map +1 -0
  28. package/dist/data/sharing.zod.js +57 -0
  29. package/dist/data/validation.zod.d.ts +236 -0
  30. package/dist/data/validation.zod.d.ts.map +1 -0
  31. package/dist/data/validation.zod.js +59 -0
  32. package/dist/data/workflow.zod.d.ts +195 -0
  33. package/dist/data/workflow.zod.d.ts.map +1 -0
  34. package/dist/data/workflow.zod.js +64 -0
  35. package/dist/index.d.ts +33 -5
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +53 -5
  38. package/dist/system/api.zod.d.ts +168 -0
  39. package/dist/system/api.zod.d.ts.map +1 -0
  40. package/dist/system/api.zod.js +53 -0
  41. package/dist/system/constants/index.d.ts +11 -0
  42. package/dist/system/constants/index.d.ts.map +1 -0
  43. package/dist/system/constants/index.js +26 -0
  44. package/dist/system/constants/paths.d.ts +71 -0
  45. package/dist/system/constants/paths.d.ts.map +1 -0
  46. package/dist/system/constants/paths.js +65 -0
  47. package/dist/system/datasource.zod.d.ts +127 -0
  48. package/dist/system/datasource.zod.d.ts.map +1 -0
  49. package/dist/system/datasource.zod.js +62 -0
  50. package/dist/system/identity.zod.d.ts +204 -0
  51. package/dist/system/identity.zod.d.ts.map +1 -0
  52. package/dist/system/identity.zod.js +68 -0
  53. package/dist/system/license.zod.d.ts +110 -0
  54. package/dist/system/license.zod.d.ts.map +1 -0
  55. package/dist/system/license.zod.js +63 -0
  56. package/dist/system/manifest.zod.d.ts +126 -0
  57. package/dist/system/manifest.zod.d.ts.map +1 -0
  58. package/dist/system/manifest.zod.js +68 -0
  59. package/dist/system/policy.zod.d.ts +209 -0
  60. package/dist/system/policy.zod.d.ts.map +1 -0
  61. package/dist/system/policy.zod.js +54 -0
  62. package/dist/system/role.zod.d.ts +34 -0
  63. package/dist/system/role.zod.d.ts.map +1 -0
  64. package/dist/system/role.zod.js +25 -0
  65. package/dist/system/territory.zod.d.ts +91 -0
  66. package/dist/system/territory.zod.d.ts.map +1 -0
  67. package/dist/system/territory.zod.js +64 -0
  68. package/dist/system/translation.zod.d.ts +171 -0
  69. package/dist/system/translation.zod.d.ts.map +1 -0
  70. package/dist/system/translation.zod.js +34 -0
  71. package/dist/system/types/index.d.ts +7 -0
  72. package/dist/system/types/index.d.ts.map +1 -0
  73. package/dist/system/types/index.js +22 -0
  74. package/dist/system/types/plugin.d.ts +113 -0
  75. package/dist/system/types/plugin.d.ts.map +1 -0
  76. package/dist/system/types/plugin.js +6 -0
  77. package/dist/system/webhook.zod.d.ts +106 -0
  78. package/dist/system/webhook.zod.d.ts.map +1 -0
  79. package/dist/system/webhook.zod.js +56 -0
  80. package/dist/ui/action.zod.d.ts +148 -0
  81. package/dist/ui/action.zod.d.ts.map +1 -0
  82. package/dist/ui/action.zod.js +48 -0
  83. package/dist/ui/app.zod.d.ts +299 -0
  84. package/dist/ui/app.zod.d.ts.map +1 -0
  85. package/dist/ui/app.zod.js +127 -0
  86. package/dist/ui/dashboard.zod.d.ts +207 -0
  87. package/dist/ui/dashboard.zod.d.ts.map +1 -0
  88. package/dist/ui/dashboard.zod.js +66 -0
  89. package/dist/ui/page.zod.d.ts +187 -0
  90. package/dist/ui/page.zod.d.ts.map +1 -0
  91. package/dist/ui/page.zod.js +48 -0
  92. package/dist/ui/report.zod.d.ts +224 -0
  93. package/dist/ui/report.zod.d.ts.map +1 -0
  94. package/dist/ui/report.zod.js +68 -0
  95. package/dist/ui/view.zod.d.ts +887 -0
  96. package/dist/ui/view.zod.d.ts.map +1 -0
  97. package/dist/ui/view.zod.js +83 -0
  98. package/json-schema/AIKnowledge.json +30 -0
  99. package/json-schema/AIModelConfig.json +41 -0
  100. package/json-schema/AITool.json +33 -0
  101. package/json-schema/Action.json +156 -0
  102. package/json-schema/ActionParam.json +76 -0
  103. package/json-schema/Agent.json +140 -0
  104. package/json-schema/ApiEndpoint.json +162 -0
  105. package/json-schema/ApiMapping.json +28 -0
  106. package/json-schema/App.json +286 -0
  107. package/json-schema/AppBranding.json +24 -0
  108. package/json-schema/AuditPolicy.json +31 -0
  109. package/json-schema/AuthProtocol.json +17 -0
  110. package/json-schema/AuthProvider.json +171 -0
  111. package/json-schema/CalendarConfig.json +28 -0
  112. package/json-schema/ChartType.json +19 -0
  113. package/json-schema/Dashboard.json +117 -0
  114. package/json-schema/DashboardNavItem.json +42 -0
  115. package/json-schema/DashboardWidget.json +89 -0
  116. package/json-schema/Dataset.json +63 -0
  117. package/json-schema/DatasetMode.json +16 -0
  118. package/json-schema/Datasource.json +93 -0
  119. package/json-schema/DatasourceCapabilities.json +36 -0
  120. package/json-schema/DriverType.json +27 -0
  121. package/json-schema/EmailAlertAction.json +37 -0
  122. package/json-schema/Feature.json +51 -0
  123. package/json-schema/Field.json +219 -0
  124. package/json-schema/FieldMapping.json +83 -0
  125. package/json-schema/FieldNode.json +32 -0
  126. package/json-schema/FieldPermission.json +22 -0
  127. package/json-schema/FieldType.json +36 -0
  128. package/json-schema/FieldUpdateAction.json +32 -0
  129. package/json-schema/FilterNode.json +52 -0
  130. package/json-schema/FilterOperator.json +26 -0
  131. package/json-schema/Flow.json +186 -0
  132. package/json-schema/FlowEdge.json +37 -0
  133. package/json-schema/FlowNode.json +65 -0
  134. package/json-schema/FlowNodeAction.json +24 -0
  135. package/json-schema/FlowVariable.json +34 -0
  136. package/json-schema/FormSection.json +42 -0
  137. package/json-schema/FormView.json +99 -0
  138. package/json-schema/FormatValidation.json +59 -0
  139. package/json-schema/GanttConfig.json +32 -0
  140. package/json-schema/GroupNavItem.json +42 -0
  141. package/json-schema/HttpMethod.json +16 -0
  142. package/json-schema/Index.json +30 -0
  143. package/json-schema/KanbanConfig.json +31 -0
  144. package/json-schema/LDAPConfig.json +39 -0
  145. package/json-schema/License.json +57 -0
  146. package/json-schema/ListView.json +153 -0
  147. package/json-schema/Locale.json +10 -0
  148. package/json-schema/LogicOperator.json +14 -0
  149. package/json-schema/Manifest.json +90 -0
  150. package/json-schema/Mapping.json +270 -0
  151. package/json-schema/MenuItem.json +28 -0
  152. package/json-schema/MetricType.json +14 -0
  153. package/json-schema/NavigationItem.json +214 -0
  154. package/json-schema/NetworkPolicy.json +31 -0
  155. package/json-schema/OIDCConfig.json +46 -0
  156. package/json-schema/OWDModel.json +14 -0
  157. package/json-schema/Object.json +331 -0
  158. package/json-schema/ObjectCapabilities.json +36 -0
  159. package/json-schema/ObjectNavItem.json +46 -0
  160. package/json-schema/ObjectPermission.json +42 -0
  161. package/json-schema/Page.json +117 -0
  162. package/json-schema/PageComponent.json +36 -0
  163. package/json-schema/PageNavItem.json +47 -0
  164. package/json-schema/PageRegion.json +63 -0
  165. package/json-schema/PasswordPolicy.json +41 -0
  166. package/json-schema/PermissionSet.json +96 -0
  167. package/json-schema/Plan.json +53 -0
  168. package/json-schema/Policy.json +138 -0
  169. package/json-schema/Query.json +128 -0
  170. package/json-schema/RateLimit.json +26 -0
  171. package/json-schema/Report.json +219 -0
  172. package/json-schema/ReportChart.json +45 -0
  173. package/json-schema/ReportColumn.json +35 -0
  174. package/json-schema/ReportGrouping.json +38 -0
  175. package/json-schema/ReportType.json +15 -0
  176. package/json-schema/Role.json +32 -0
  177. package/json-schema/SAMLConfig.json +44 -0
  178. package/json-schema/ScriptValidation.json +48 -0
  179. package/json-schema/SelectOption.json +32 -0
  180. package/json-schema/SessionPolicy.json +27 -0
  181. package/json-schema/SharingLevel.json +13 -0
  182. package/json-schema/SharingRule.json +58 -0
  183. package/json-schema/SharingRuleType.json +15 -0
  184. package/json-schema/SortNode.json +26 -0
  185. package/json-schema/StateMachineValidation.json +59 -0
  186. package/json-schema/Territory.json +77 -0
  187. package/json-schema/TerritoryModel.json +34 -0
  188. package/json-schema/TerritoryType.json +15 -0
  189. package/json-schema/TransformType.json +18 -0
  190. package/json-schema/TranslationBundle.json +78 -0
  191. package/json-schema/TranslationData.json +75 -0
  192. package/json-schema/UniquenessValidation.json +59 -0
  193. package/json-schema/UrlNavItem.json +51 -0
  194. package/json-schema/ValidationRule.json +211 -0
  195. package/json-schema/View.json +500 -0
  196. package/json-schema/Webhook.json +88 -0
  197. package/json-schema/WebhookReceiver.json +66 -0
  198. package/json-schema/WebhookTriggerType.json +16 -0
  199. package/json-schema/WorkflowAction.json +84 -0
  200. package/json-schema/WorkflowRule.json +128 -0
  201. package/json-schema/WorkflowTriggerType.json +16 -0
  202. package/package.json +28 -19
  203. package/dist/examples.d.ts +0 -28
  204. package/dist/examples.d.ts.map +0 -1
  205. package/dist/examples.js +0 -250
  206. package/dist/types/index.d.ts +0 -9
  207. package/dist/types/index.d.ts.map +0 -1
  208. package/dist/types/index.js +0 -8
  209. package/dist/types/meta/field-type.d.ts +0 -54
  210. package/dist/types/meta/field-type.d.ts.map +0 -1
  211. package/dist/types/meta/field-type.js +0 -42
  212. package/dist/types/meta/index.d.ts +0 -13
  213. package/dist/types/meta/index.d.ts.map +0 -1
  214. package/dist/types/meta/index.js +0 -12
  215. package/dist/types/meta/object-entity.d.ts +0 -246
  216. package/dist/types/meta/object-entity.d.ts.map +0 -1
  217. package/dist/types/meta/object-entity.js +0 -9
  218. package/dist/types/meta/object-field.d.ts +0 -199
  219. package/dist/types/meta/object-field.d.ts.map +0 -1
  220. package/dist/types/meta/object-field.js +0 -9
  221. package/dist/types/meta/object-view.d.ts +0 -430
  222. package/dist/types/meta/object-view.d.ts.map +0 -1
  223. package/dist/types/meta/object-view.js +0 -9
  224. package/src/examples.ts +0 -257
  225. package/src/index.ts +0 -10
  226. package/src/types/index.ts +0 -9
  227. package/src/types/meta/field-type.ts +0 -91
  228. package/src/types/meta/index.ts +0 -13
  229. package/src/types/meta/object-entity.ts +0 -265
  230. package/src/types/meta/object-field.ts +0 -218
  231. package/src/types/meta/object-view.ts +0 -475
@@ -0,0 +1,204 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Authentication Protocol
4
+ * Defines supported authentication standards (OIDC, SAML, LDAP).
5
+ */
6
+ export declare const AuthProtocol: z.ZodEnum<["oidc", "saml", "ldap", "oauth2", "local", "mock"]>;
7
+ /**
8
+ * OIDC / OAuth2 Config (Standard)
9
+ */
10
+ export declare const OIDCConfigSchema: z.ZodObject<{
11
+ issuer: z.ZodString;
12
+ clientId: z.ZodString;
13
+ clientSecret: z.ZodString;
14
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
+ attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ issuer: string;
18
+ clientId: string;
19
+ clientSecret: string;
20
+ scopes: string[];
21
+ attributeMapping?: Record<string, string> | undefined;
22
+ }, {
23
+ issuer: string;
24
+ clientId: string;
25
+ clientSecret: string;
26
+ scopes?: string[] | undefined;
27
+ attributeMapping?: Record<string, string> | undefined;
28
+ }>;
29
+ /**
30
+ * SAML 2.0 Config (Enterprise)
31
+ */
32
+ export declare const SAMLConfigSchema: z.ZodObject<{
33
+ entryPoint: z.ZodString;
34
+ cert: z.ZodString;
35
+ issuer: z.ZodString;
36
+ signatureAlgorithm: z.ZodDefault<z.ZodEnum<["sha256", "sha512"]>>;
37
+ attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ issuer: string;
40
+ entryPoint: string;
41
+ cert: string;
42
+ signatureAlgorithm: "sha256" | "sha512";
43
+ attributeMapping?: Record<string, string> | undefined;
44
+ }, {
45
+ issuer: string;
46
+ entryPoint: string;
47
+ cert: string;
48
+ attributeMapping?: Record<string, string> | undefined;
49
+ signatureAlgorithm?: "sha256" | "sha512" | undefined;
50
+ }>;
51
+ /**
52
+ * LDAP / AD Config (On-premise)
53
+ */
54
+ export declare const LDAPConfigSchema: z.ZodObject<{
55
+ url: z.ZodString;
56
+ bindDn: z.ZodString;
57
+ bindCredentials: z.ZodString;
58
+ searchBase: z.ZodString;
59
+ searchFilter: z.ZodString;
60
+ groupSearchBase: z.ZodOptional<z.ZodString>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ url: string;
63
+ bindDn: string;
64
+ bindCredentials: string;
65
+ searchBase: string;
66
+ searchFilter: string;
67
+ groupSearchBase?: string | undefined;
68
+ }, {
69
+ url: string;
70
+ bindDn: string;
71
+ bindCredentials: string;
72
+ searchBase: string;
73
+ searchFilter: string;
74
+ groupSearchBase?: string | undefined;
75
+ }>;
76
+ /**
77
+ * Identity Provider (IdP) Schema
78
+ * Connects the OS to an external source of truth for identities.
79
+ */
80
+ export declare const AuthProviderSchema: z.ZodObject<{
81
+ name: z.ZodString;
82
+ label: z.ZodString;
83
+ type: z.ZodEnum<["oidc", "saml", "ldap", "oauth2", "local", "mock"]>;
84
+ /** Configuration (Polymorphic based on type) */
85
+ config: z.ZodUnion<[z.ZodObject<{
86
+ issuer: z.ZodString;
87
+ clientId: z.ZodString;
88
+ clientSecret: z.ZodString;
89
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
90
+ attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ issuer: string;
93
+ clientId: string;
94
+ clientSecret: string;
95
+ scopes: string[];
96
+ attributeMapping?: Record<string, string> | undefined;
97
+ }, {
98
+ issuer: string;
99
+ clientId: string;
100
+ clientSecret: string;
101
+ scopes?: string[] | undefined;
102
+ attributeMapping?: Record<string, string> | undefined;
103
+ }>, z.ZodObject<{
104
+ entryPoint: z.ZodString;
105
+ cert: z.ZodString;
106
+ issuer: z.ZodString;
107
+ signatureAlgorithm: z.ZodDefault<z.ZodEnum<["sha256", "sha512"]>>;
108
+ attributeMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ issuer: string;
111
+ entryPoint: string;
112
+ cert: string;
113
+ signatureAlgorithm: "sha256" | "sha512";
114
+ attributeMapping?: Record<string, string> | undefined;
115
+ }, {
116
+ issuer: string;
117
+ entryPoint: string;
118
+ cert: string;
119
+ attributeMapping?: Record<string, string> | undefined;
120
+ signatureAlgorithm?: "sha256" | "sha512" | undefined;
121
+ }>, z.ZodObject<{
122
+ url: z.ZodString;
123
+ bindDn: z.ZodString;
124
+ bindCredentials: z.ZodString;
125
+ searchBase: z.ZodString;
126
+ searchFilter: z.ZodString;
127
+ groupSearchBase: z.ZodOptional<z.ZodString>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ url: string;
130
+ bindDn: string;
131
+ bindCredentials: string;
132
+ searchBase: string;
133
+ searchFilter: string;
134
+ groupSearchBase?: string | undefined;
135
+ }, {
136
+ url: string;
137
+ bindDn: string;
138
+ bindCredentials: string;
139
+ searchBase: string;
140
+ searchFilter: string;
141
+ groupSearchBase?: string | undefined;
142
+ }>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
143
+ /** Visuals */
144
+ icon: z.ZodOptional<z.ZodString>;
145
+ /** Policies */
146
+ active: z.ZodDefault<z.ZodBoolean>;
147
+ registrationEnabled: z.ZodDefault<z.ZodBoolean>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type: "local" | "oidc" | "saml" | "ldap" | "oauth2" | "mock";
150
+ label: string;
151
+ name: string;
152
+ active: boolean;
153
+ config: Record<string, any> | {
154
+ issuer: string;
155
+ clientId: string;
156
+ clientSecret: string;
157
+ scopes: string[];
158
+ attributeMapping?: Record<string, string> | undefined;
159
+ } | {
160
+ issuer: string;
161
+ entryPoint: string;
162
+ cert: string;
163
+ signatureAlgorithm: "sha256" | "sha512";
164
+ attributeMapping?: Record<string, string> | undefined;
165
+ } | {
166
+ url: string;
167
+ bindDn: string;
168
+ bindCredentials: string;
169
+ searchBase: string;
170
+ searchFilter: string;
171
+ groupSearchBase?: string | undefined;
172
+ };
173
+ registrationEnabled: boolean;
174
+ icon?: string | undefined;
175
+ }, {
176
+ type: "local" | "oidc" | "saml" | "ldap" | "oauth2" | "mock";
177
+ label: string;
178
+ name: string;
179
+ config: Record<string, any> | {
180
+ issuer: string;
181
+ clientId: string;
182
+ clientSecret: string;
183
+ scopes?: string[] | undefined;
184
+ attributeMapping?: Record<string, string> | undefined;
185
+ } | {
186
+ issuer: string;
187
+ entryPoint: string;
188
+ cert: string;
189
+ attributeMapping?: Record<string, string> | undefined;
190
+ signatureAlgorithm?: "sha256" | "sha512" | undefined;
191
+ } | {
192
+ url: string;
193
+ bindDn: string;
194
+ bindCredentials: string;
195
+ searchBase: string;
196
+ searchFilter: string;
197
+ groupSearchBase?: string | undefined;
198
+ };
199
+ icon?: string | undefined;
200
+ active?: boolean | undefined;
201
+ registrationEnabled?: boolean | undefined;
202
+ }>;
203
+ export type AuthProvider = z.infer<typeof AuthProviderSchema>;
204
+ //# sourceMappingURL=identity.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.zod.d.ts","sourceRoot":"","sources":["../../src/system/identity.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY,gEAOvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;IAK7B,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQhD,cAAc;;IAGd,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGf,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthProviderSchema = exports.LDAPConfigSchema = exports.SAMLConfigSchema = exports.OIDCConfigSchema = exports.AuthProtocol = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Authentication Protocol
7
+ * Defines supported authentication standards (OIDC, SAML, LDAP).
8
+ */
9
+ exports.AuthProtocol = zod_1.z.enum([
10
+ 'oidc', // OpenID Connect (Modern standard)
11
+ 'saml', // SAML 2.0 (Legacy Enterprise)
12
+ 'ldap', // LDAP/Active Directory (On-premise)
13
+ 'oauth2', // Generic OAuth2
14
+ 'local', // Database username/password
15
+ 'mock' // Testing
16
+ ]);
17
+ /**
18
+ * OIDC / OAuth2 Config (Standard)
19
+ */
20
+ exports.OIDCConfigSchema = zod_1.z.object({
21
+ issuer: zod_1.z.string().url().describe('OIDC Issuer URL (.well-known/openid-configuration)'),
22
+ clientId: zod_1.z.string(),
23
+ clientSecret: zod_1.z.string(), // Usually value is ENV reference
24
+ scopes: zod_1.z.array(zod_1.z.string()).default(['openid', 'profile', 'email']),
25
+ attributeMapping: zod_1.z.record(zod_1.z.string()).optional().describe('Map IdP claims to User fields'),
26
+ });
27
+ /**
28
+ * SAML 2.0 Config (Enterprise)
29
+ */
30
+ exports.SAMLConfigSchema = zod_1.z.object({
31
+ entryPoint: zod_1.z.string().url().describe('IdP SSO URL'),
32
+ cert: zod_1.z.string().describe('IdP Public Certificate'), // PEM format
33
+ issuer: zod_1.z.string().describe('Entity ID of the IdP'),
34
+ signatureAlgorithm: zod_1.z.enum(['sha256', 'sha512']).default('sha256'),
35
+ attributeMapping: zod_1.z.record(zod_1.z.string()).optional(),
36
+ });
37
+ /**
38
+ * LDAP / AD Config (On-premise)
39
+ */
40
+ exports.LDAPConfigSchema = zod_1.z.object({
41
+ url: zod_1.z.string().url().describe('LDAP Server URL (ldap:// or ldaps://)'),
42
+ bindDn: zod_1.z.string(),
43
+ bindCredentials: zod_1.z.string(),
44
+ searchBase: zod_1.z.string(),
45
+ searchFilter: zod_1.z.string(),
46
+ groupSearchBase: zod_1.z.string().optional(),
47
+ });
48
+ /**
49
+ * Identity Provider (IdP) Schema
50
+ * Connects the OS to an external source of truth for identities.
51
+ */
52
+ exports.AuthProviderSchema = zod_1.z.object({
53
+ name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Provider ID'),
54
+ label: zod_1.z.string().describe('Button Label (e.g. "Login with Okta")'),
55
+ type: exports.AuthProtocol,
56
+ /** Configuration (Polymorphic based on type) */
57
+ config: zod_1.z.union([
58
+ exports.OIDCConfigSchema,
59
+ exports.SAMLConfigSchema,
60
+ exports.LDAPConfigSchema,
61
+ zod_1.z.record(zod_1.z.any()) // Fallback
62
+ ]).describe('Provider specific configuration'),
63
+ /** Visuals */
64
+ icon: zod_1.z.string().optional().describe('Icon URL or helper class'),
65
+ /** Policies */
66
+ active: zod_1.z.boolean().default(true),
67
+ registrationEnabled: zod_1.z.boolean().default(false).describe('Allow new users to sign up via this provider'),
68
+ });
@@ -0,0 +1,110 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Metric Type Classification
4
+ */
5
+ export declare const MetricType: z.ZodEnum<["boolean", "counter", "gauge"]>;
6
+ /**
7
+ * Feature/Limit Definition Schema
8
+ * Defines a controllable capability of the system.
9
+ */
10
+ export declare const FeatureSchema: z.ZodObject<{
11
+ code: z.ZodString;
12
+ label: z.ZodString;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ type: z.ZodDefault<z.ZodEnum<["boolean", "counter", "gauge"]>>;
15
+ /** For counters/gauges */
16
+ unit: z.ZodOptional<z.ZodEnum<["count", "bytes", "seconds", "percent"]>>;
17
+ /** Dependencies (e.g. 'audit_log' requires 'enterprise_tier') */
18
+ requires: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ code: string;
21
+ type: "boolean" | "counter" | "gauge";
22
+ label: string;
23
+ description?: string | undefined;
24
+ unit?: "percent" | "count" | "bytes" | "seconds" | undefined;
25
+ requires?: string[] | undefined;
26
+ }, {
27
+ code: string;
28
+ label: string;
29
+ type?: "boolean" | "counter" | "gauge" | undefined;
30
+ description?: string | undefined;
31
+ unit?: "percent" | "count" | "bytes" | "seconds" | undefined;
32
+ requires?: string[] | undefined;
33
+ }>;
34
+ /**
35
+ * Subscription Plan Schema
36
+ * Defines a tier of service (e.g. "Free", "Pro", "Enterprise").
37
+ */
38
+ export declare const PlanSchema: z.ZodObject<{
39
+ code: z.ZodString;
40
+ label: z.ZodString;
41
+ active: z.ZodDefault<z.ZodBoolean>;
42
+ /** Feature Entitlements */
43
+ features: z.ZodArray<z.ZodString, "many">;
44
+ /** Limit Quotas */
45
+ limits: z.ZodRecord<z.ZodString, z.ZodNumber>;
46
+ /** Pricing (Optional Metadata) */
47
+ currency: z.ZodOptional<z.ZodDefault<z.ZodString>>;
48
+ priceMonthly: z.ZodOptional<z.ZodNumber>;
49
+ priceYearly: z.ZodOptional<z.ZodNumber>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ code: string;
52
+ label: string;
53
+ active: boolean;
54
+ features: string[];
55
+ limits: Record<string, number>;
56
+ currency?: string | undefined;
57
+ priceMonthly?: number | undefined;
58
+ priceYearly?: number | undefined;
59
+ }, {
60
+ code: string;
61
+ label: string;
62
+ features: string[];
63
+ limits: Record<string, number>;
64
+ currency?: string | undefined;
65
+ active?: boolean | undefined;
66
+ priceMonthly?: number | undefined;
67
+ priceYearly?: number | undefined;
68
+ }>;
69
+ /**
70
+ * License Schema
71
+ * The actual entitlement object assigned to a Tenant.
72
+ * Often signed as a JWT.
73
+ */
74
+ export declare const LicenseSchema: z.ZodObject<{
75
+ /** Identity */
76
+ tenantId: z.ZodString;
77
+ planCode: z.ZodString;
78
+ /** Validity */
79
+ issuedAt: z.ZodString;
80
+ expiresAt: z.ZodOptional<z.ZodString>;
81
+ /** Status */
82
+ status: z.ZodEnum<["active", "expired", "suspended", "trial"]>;
83
+ /** Overrides (Specific to this tenant, exceeding the plan) */
84
+ customFeatures: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
85
+ customLimits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
86
+ /** Signature */
87
+ signature: z.ZodOptional<z.ZodString>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ status: "active" | "expired" | "suspended" | "trial";
90
+ tenantId: string;
91
+ planCode: string;
92
+ issuedAt: string;
93
+ expiresAt?: string | undefined;
94
+ customFeatures?: string[] | undefined;
95
+ customLimits?: Record<string, number> | undefined;
96
+ signature?: string | undefined;
97
+ }, {
98
+ status: "active" | "expired" | "suspended" | "trial";
99
+ tenantId: string;
100
+ planCode: string;
101
+ issuedAt: string;
102
+ expiresAt?: string | undefined;
103
+ customFeatures?: string[] | undefined;
104
+ customLimits?: Record<string, number> | undefined;
105
+ signature?: string | undefined;
106
+ }>;
107
+ export type Feature = z.infer<typeof FeatureSchema>;
108
+ export type Plan = z.infer<typeof PlanSchema>;
109
+ export type License = z.infer<typeof LicenseSchema>;
110
+ //# sourceMappingURL=license.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.zod.d.ts","sourceRoot":"","sources":["../../src/system/license.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,UAAU,4CAIrB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;IAOxB,0BAA0B;;IAG1B,iEAAiE;;;;;;;;;;;;;;;;EAEjE,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;IAKrB,2BAA2B;;IAG3B,mBAAmB;;IAGnB,kCAAkC;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa;IACxB,eAAe;;;IAIf,eAAe;;;IAIf,aAAa;;IAGb,8DAA8D;;;IAI9D,gBAAgB;;;;;;;;;;;;;;;;;;;;EAEhB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LicenseSchema = exports.PlanSchema = exports.FeatureSchema = exports.MetricType = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Metric Type Classification
7
+ */
8
+ exports.MetricType = zod_1.z.enum([
9
+ 'boolean', // Feature Flag (Enabled/Disabled)
10
+ 'counter', // Usage Count (e.g. API Calls, Records Created) - Accumulates
11
+ 'gauge', // Current Level (e.g. Storage Used, Users Active) - Point in time
12
+ ]);
13
+ /**
14
+ * Feature/Limit Definition Schema
15
+ * Defines a controllable capability of the system.
16
+ */
17
+ exports.FeatureSchema = zod_1.z.object({
18
+ code: zod_1.z.string().regex(/^[a-z_][a-z0-9_.]*$/).describe('Feature code (e.g. core.api_access)'),
19
+ label: zod_1.z.string(),
20
+ description: zod_1.z.string().optional(),
21
+ type: exports.MetricType.default('boolean'),
22
+ /** For counters/gauges */
23
+ unit: zod_1.z.enum(['count', 'bytes', 'seconds', 'percent']).optional(),
24
+ /** Dependencies (e.g. 'audit_log' requires 'enterprise_tier') */
25
+ requires: zod_1.z.array(zod_1.z.string()).optional(),
26
+ });
27
+ /**
28
+ * Subscription Plan Schema
29
+ * Defines a tier of service (e.g. "Free", "Pro", "Enterprise").
30
+ */
31
+ exports.PlanSchema = zod_1.z.object({
32
+ code: zod_1.z.string().describe('Plan code (e.g. pro_v1)'),
33
+ label: zod_1.z.string(),
34
+ active: zod_1.z.boolean().default(true),
35
+ /** Feature Entitlements */
36
+ features: zod_1.z.array(zod_1.z.string()).describe('List of enabled boolean features'),
37
+ /** Limit Quotas */
38
+ limits: zod_1.z.record(zod_1.z.number()).describe('Map of metric codes to limit values (e.g. { storage_gb: 10 })'),
39
+ /** Pricing (Optional Metadata) */
40
+ currency: zod_1.z.string().default('USD').optional(),
41
+ priceMonthly: zod_1.z.number().optional(),
42
+ priceYearly: zod_1.z.number().optional(),
43
+ });
44
+ /**
45
+ * License Schema
46
+ * The actual entitlement object assigned to a Tenant.
47
+ * Often signed as a JWT.
48
+ */
49
+ exports.LicenseSchema = zod_1.z.object({
50
+ /** Identity */
51
+ tenantId: zod_1.z.string(),
52
+ planCode: zod_1.z.string(),
53
+ /** Validity */
54
+ issuedAt: zod_1.z.string().datetime(),
55
+ expiresAt: zod_1.z.string().datetime().optional(), // Null = Perpetual
56
+ /** Status */
57
+ status: zod_1.z.enum(['active', 'expired', 'suspended', 'trial']),
58
+ /** Overrides (Specific to this tenant, exceeding the plan) */
59
+ customFeatures: zod_1.z.array(zod_1.z.string()).optional(),
60
+ customLimits: zod_1.z.record(zod_1.z.number()).optional(),
61
+ /** Signature */
62
+ signature: zod_1.z.string().optional().describe('Cryptographic signature of the license'),
63
+ });
@@ -0,0 +1,126 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Schema for menu items in ObjectStack packages.
4
+ * Defines navigation structure that can be injected into the UI.
5
+ */
6
+ export declare const MenuItemSchema: z.ZodObject<{
7
+ /** Display label for the menu item */
8
+ label: z.ZodString;
9
+ /** Navigation path (route) for the menu item */
10
+ path: z.ZodString;
11
+ /** Optional icon identifier for the menu item */
12
+ icon: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ path: string;
15
+ label: string;
16
+ icon?: string | undefined;
17
+ }, {
18
+ path: string;
19
+ label: string;
20
+ icon?: string | undefined;
21
+ }>;
22
+ /**
23
+ * Schema for the ObjectStack Manifest.
24
+ * This defines the structure of a package configuration in the ObjectStack ecosystem.
25
+ * All packages (apps, plugins, drivers, modules) must conform to this schema.
26
+ */
27
+ export declare const ManifestSchema: z.ZodObject<{
28
+ /**
29
+ * Unique package identifier using reverse domain notation.
30
+ * Example: "com.example.crm"
31
+ */
32
+ id: z.ZodString;
33
+ /**
34
+ * Package version following semantic versioning (major.minor.patch).
35
+ * Example: "1.0.0"
36
+ */
37
+ version: z.ZodString;
38
+ /**
39
+ * Type of the package in the ObjectStack ecosystem.
40
+ * - app: Standalone application
41
+ * - plugin: Extension to ObjectOS
42
+ * - driver: Low-level integration driver
43
+ * - module: Reusable code module
44
+ */
45
+ type: z.ZodEnum<["app", "plugin", "driver", "module"]>;
46
+ /**
47
+ * Human-readable name of the package.
48
+ */
49
+ name: z.ZodString;
50
+ /**
51
+ * Brief description of the package functionality.
52
+ */
53
+ description: z.ZodOptional<z.ZodString>;
54
+ /**
55
+ * Array of permission strings that the package requires.
56
+ * Example: ["system.user.read", "system.data.write"]
57
+ */
58
+ permissions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
+ /**
60
+ * Navigation menu structure that the package contributes to the UI.
61
+ */
62
+ menus: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ /** Display label for the menu item */
64
+ label: z.ZodString;
65
+ /** Navigation path (route) for the menu item */
66
+ path: z.ZodString;
67
+ /** Optional icon identifier for the menu item */
68
+ icon: z.ZodOptional<z.ZodString>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ path: string;
71
+ label: string;
72
+ icon?: string | undefined;
73
+ }, {
74
+ path: string;
75
+ label: string;
76
+ icon?: string | undefined;
77
+ }>, "many">>;
78
+ /**
79
+ * Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
80
+ * Example: `["./src/objects/*.object.yml"]`
81
+ */
82
+ objects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
83
+ /**
84
+ * Extension points contributed by this package.
85
+ * Allows packages to extend UI components, add functionality, etc.
86
+ */
87
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ type: "app" | "plugin" | "driver" | "module";
90
+ name: string;
91
+ id: string;
92
+ version: string;
93
+ description?: string | undefined;
94
+ objects?: string[] | undefined;
95
+ permissions?: string[] | undefined;
96
+ menus?: {
97
+ path: string;
98
+ label: string;
99
+ icon?: string | undefined;
100
+ }[] | undefined;
101
+ extensions?: Record<string, any> | undefined;
102
+ }, {
103
+ type: "app" | "plugin" | "driver" | "module";
104
+ name: string;
105
+ id: string;
106
+ version: string;
107
+ description?: string | undefined;
108
+ objects?: string[] | undefined;
109
+ permissions?: string[] | undefined;
110
+ menus?: {
111
+ path: string;
112
+ label: string;
113
+ icon?: string | undefined;
114
+ }[] | undefined;
115
+ extensions?: Record<string, any> | undefined;
116
+ }>;
117
+ /**
118
+ * TypeScript type inferred from the ManifestSchema.
119
+ * Use this type for type-safe manifest handling in TypeScript code.
120
+ */
121
+ export type ObjectStackManifest = z.infer<typeof ManifestSchema>;
122
+ /**
123
+ * TypeScript type for menu items.
124
+ */
125
+ export type MenuItem = z.infer<typeof MenuItemSchema>;
126
+ //# sourceMappingURL=manifest.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,sCAAsC;;IAEtC,gDAAgD;;IAEhD,iDAAiD;;;;;;;;;;EAEjD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;QArDH,sCAAsC;;QAEtC,gDAAgD;;QAEhD,iDAAiD;;;;;;;;;;;IAoDjD;;;OAGG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ManifestSchema = exports.MenuItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Schema for menu items in ObjectStack packages.
7
+ * Defines navigation structure that can be injected into the UI.
8
+ */
9
+ exports.MenuItemSchema = zod_1.z.object({
10
+ /** Display label for the menu item */
11
+ label: zod_1.z.string().describe('Display label for the menu item'),
12
+ /** Navigation path (route) for the menu item */
13
+ path: zod_1.z.string().describe('Navigation path (route) for the menu item'),
14
+ /** Optional icon identifier for the menu item */
15
+ icon: zod_1.z.string().optional().describe('Optional icon identifier for the menu item'),
16
+ });
17
+ /**
18
+ * Schema for the ObjectStack Manifest.
19
+ * This defines the structure of a package configuration in the ObjectStack ecosystem.
20
+ * All packages (apps, plugins, drivers, modules) must conform to this schema.
21
+ */
22
+ exports.ManifestSchema = zod_1.z.object({
23
+ /**
24
+ * Unique package identifier using reverse domain notation.
25
+ * Example: "com.example.crm"
26
+ */
27
+ id: zod_1.z.string().describe('Unique package identifier (reverse domain style)'),
28
+ /**
29
+ * Package version following semantic versioning (major.minor.patch).
30
+ * Example: "1.0.0"
31
+ */
32
+ version: zod_1.z.string().regex(/^\d+\.\d+\.\d+$/).describe('Package version (semantic versioning)'),
33
+ /**
34
+ * Type of the package in the ObjectStack ecosystem.
35
+ * - app: Standalone application
36
+ * - plugin: Extension to ObjectOS
37
+ * - driver: Low-level integration driver
38
+ * - module: Reusable code module
39
+ */
40
+ type: zod_1.z.enum(['app', 'plugin', 'driver', 'module']).describe('Type of package'),
41
+ /**
42
+ * Human-readable name of the package.
43
+ */
44
+ name: zod_1.z.string().describe('Human-readable package name'),
45
+ /**
46
+ * Brief description of the package functionality.
47
+ */
48
+ description: zod_1.z.string().optional().describe('Package description'),
49
+ /**
50
+ * Array of permission strings that the package requires.
51
+ * Example: ["system.user.read", "system.data.write"]
52
+ */
53
+ permissions: zod_1.z.array(zod_1.z.string()).optional().describe('Array of required permission strings'),
54
+ /**
55
+ * Navigation menu structure that the package contributes to the UI.
56
+ */
57
+ menus: zod_1.z.array(exports.MenuItemSchema).optional().describe('Navigation menu structure'),
58
+ /**
59
+ * Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
60
+ * Example: `["./src/objects/*.object.yml"]`
61
+ */
62
+ objects: zod_1.z.array(zod_1.z.string()).optional().describe('Glob patterns for ObjectQL schemas files'),
63
+ /**
64
+ * Extension points contributed by this package.
65
+ * Allows packages to extend UI components, add functionality, etc.
66
+ */
67
+ extensions: zod_1.z.record(zod_1.z.any()).optional().describe('Extension points and contributions'),
68
+ });