File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,10 +51,34 @@ export type TenantQuota = z.infer<typeof TenantQuotaSchema>;
5151/**
5252 * Tenant Schema
5353 *
54- * Legacy schema maintained for backward compatibility.
54+ * @deprecated This schema is maintained for backward compatibility only .
5555 * New implementations should use HubSpaceSchema which embeds tenant concepts.
5656 *
57- * @deprecated Use HubSpaceSchema instead
57+ * **Migration Guide:**
58+ * ```typescript
59+ * // Old approach (deprecated):
60+ * const tenant: Tenant = {
61+ * id: 'tenant_123',
62+ * name: 'My Tenant',
63+ * isolationLevel: 'shared_schema',
64+ * quotas: { maxUsers: 100 }
65+ * };
66+ *
67+ * // New approach (recommended):
68+ * const space: HubSpace = {
69+ * id: '...uuid...',
70+ * name: 'My Tenant',
71+ * slug: 'my-tenant',
72+ * ownerId: 'user_id',
73+ * runtime: {
74+ * isolation: 'shared_schema',
75+ * quotas: { maxUsers: 100 }
76+ * },
77+ * bom: { ... }
78+ * };
79+ * ```
80+ *
81+ * See HubSpaceSchema in space.zod.ts for the recommended approach.
5882 */
5983export const TenantSchema = z . object ( {
6084 /**
You can’t perform that action at this time.
0 commit comments