|
| 1 | +/** |
| 2 | + * Test to verify ObjectStack Spec v0.6.1 namespace exports |
| 3 | + */ |
| 4 | +import { describe, it, expect } from 'vitest'; |
| 5 | +import type { Data, UI, System, AI, API, Auth, Hub, Automation, Permission, Shared } from '../index'; |
| 6 | + |
| 7 | +describe('ObjectStack Spec v0.6.1 Namespace Exports', () => { |
| 8 | + it('should export Data namespace', () => { |
| 9 | + // Type check only - this verifies the namespace is exported |
| 10 | + const field: Data.Field = { |
| 11 | + name: 'test', |
| 12 | + type: 'text', |
| 13 | + label: 'Test Field', |
| 14 | + }; |
| 15 | + expect(field.name).toBe('test'); |
| 16 | + }); |
| 17 | + |
| 18 | + it('should export UI namespace', () => { |
| 19 | + // Type check only - verify UI namespace exists |
| 20 | + type UITest = UI.Component | undefined; |
| 21 | + const uiComponent: UITest = undefined; |
| 22 | + expect(uiComponent).toBeUndefined(); |
| 23 | + }); |
| 24 | + |
| 25 | + it('should export System namespace', () => { |
| 26 | + // Type check only - verify System namespace exists |
| 27 | + type SystemTest = System.Environment | undefined; |
| 28 | + const systemEnv: SystemTest = undefined; |
| 29 | + expect(systemEnv).toBeUndefined(); |
| 30 | + }); |
| 31 | + |
| 32 | + it('should export AI namespace', () => { |
| 33 | + // Type check only - verify AI namespace exists |
| 34 | + type AITest = AI.Model | undefined; |
| 35 | + const aiModel: AITest = undefined; |
| 36 | + expect(aiModel).toBeUndefined(); |
| 37 | + }); |
| 38 | + |
| 39 | + it('should export API namespace', () => { |
| 40 | + // Type check only - verify API namespace exists |
| 41 | + type APITest = API.Endpoint | undefined; |
| 42 | + const apiEndpoint: APITest = undefined; |
| 43 | + expect(apiEndpoint).toBeUndefined(); |
| 44 | + }); |
| 45 | + |
| 46 | + it('should export Auth namespace', () => { |
| 47 | + // Type check only - verify Auth namespace exists |
| 48 | + type AuthTest = Auth.User | undefined; |
| 49 | + const authUser: AuthTest = undefined; |
| 50 | + expect(authUser).toBeUndefined(); |
| 51 | + }); |
| 52 | + |
| 53 | + it('should export Hub namespace', () => { |
| 54 | + // Type check only - verify Hub namespace exists |
| 55 | + type HubTest = Hub.Tenant | undefined; |
| 56 | + const hubTenant: HubTest = undefined; |
| 57 | + expect(hubTenant).toBeUndefined(); |
| 58 | + }); |
| 59 | + |
| 60 | + it('should export Automation namespace', () => { |
| 61 | + // Type check only - verify Automation namespace exists |
| 62 | + type AutomationTest = Automation.Workflow | undefined; |
| 63 | + const workflow: AutomationTest = undefined; |
| 64 | + expect(workflow).toBeUndefined(); |
| 65 | + }); |
| 66 | + |
| 67 | + it('should export Permission namespace', () => { |
| 68 | + // Type check only - verify Permission namespace exists |
| 69 | + type PermissionTest = Permission.PermissionSet | undefined; |
| 70 | + const permissionSet: PermissionTest = undefined; |
| 71 | + expect(permissionSet).toBeUndefined(); |
| 72 | + }); |
| 73 | + |
| 74 | + it('should export Shared namespace', () => { |
| 75 | + // Type check only - verify Shared namespace exists |
| 76 | + type SharedTest = Shared.ObjectId | undefined; |
| 77 | + const objectId: SharedTest = undefined; |
| 78 | + expect(objectId).toBeUndefined(); |
| 79 | + }); |
| 80 | +}); |
0 commit comments