Skip to content

Commit 250596a

Browse files
committed
Rename Project to Space in hub schemas and types
Refactored all references from Project to Space in JSON schemas and TypeScript Zod schemas, including file renames and type updates. This change clarifies the domain model by introducing 'Space' as the logical container, replacing the previous 'Project' terminology.
1 parent 83c399e commit 250596a

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

packages/spec/json-schema/hub/HubProject.json renamed to packages/spec/json-schema/hub/HubSpace.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$ref": "#/definitions/HubProject",
2+
"$ref": "#/definitions/HubSpace",
33
"definitions": {
4-
"HubProject": {
4+
"HubSpace": {
55
"type": "object",
66
"properties": {
77
"id": {
@@ -18,7 +18,7 @@
1818
"ownerId": {
1919
"type": "string"
2020
},
21-
"tenant": {
21+
"runtime": {
2222
"type": "object",
2323
"properties": {
2424
"isolation": {
@@ -57,7 +57,7 @@
5757
"isolation"
5858
],
5959
"additionalProperties": false,
60-
"description": "Runtime tenant configuration"
60+
"description": "Runtime instance configuration"
6161
},
6262
"bom": {
6363
"type": "object",

packages/spec/json-schema/hub/ProjectSubscription.json renamed to packages/spec/json-schema/hub/SpaceSubscription.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$ref": "#/definitions/ProjectSubscription",
2+
"$ref": "#/definitions/SpaceSubscription",
33
"definitions": {
4-
"ProjectSubscription": {
4+
"SpaceSubscription": {
55
"type": "object",
66
"properties": {
77
"planId": {

packages/spec/src/hub/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Export Hub Components
22
export * from './composer.zod';
33
export * from './marketplace.zod';
4-
export * from './project.zod';
4+
export * from './space.zod';
55
export * from './tenant.zod';
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { BillOfMaterialsSchema } from './composer.zod';
33
import { TenantIsolationLevel, TenantQuotaSchema } from './tenant.zod';
44

55
/**
6-
* # Project Protocol
6+
* # Space Protocol
77
*
8-
* Defines the SaaS-side representation of a Tenant/Project.
8+
* Defines the SaaS-side representation of a Space (formerly Project).
9+
* A Space is a logical container for business apps, data, and logic.
910
* Corresponds to an entry in the Hub's database.
1011
*/
1112

@@ -21,9 +22,9 @@ export const SubscriptionStatus = z.enum([
2122
]);
2223

2324
/**
24-
* Project Subscription Info
25+
* Space Subscription Info
2526
*/
26-
export const ProjectSubscriptionSchema = z.object({
27+
export const SpaceSubscriptionSchema = z.object({
2728
planId: z.string().describe('Reference to Plan Code'),
2829
status: SubscriptionStatus,
2930
currentPeriodEnd: z.string().datetime().optional(),
@@ -49,9 +50,9 @@ export const DeploymentTargetSchema = z.object({
4950
});
5051

5152
/**
52-
* Hub Project Schema
53+
* Hub Space Schema
5354
*/
54-
export const HubProjectSchema = z.object({
55+
export const HubSpaceSchema = z.object({
5556
id: z.string().uuid(),
5657

5758
/**
@@ -66,14 +67,13 @@ export const HubProjectSchema = z.object({
6667
ownerId: z.string(),
6768

6869
/**
69-
* The Runtime Tenant Definition
70-
* Defines the isolation level and quotas.
71-
* Simplified: ID/Name are inherited from Project.
70+
* The Runtime Instance Definition
71+
* Defines the technical execution environment.
7272
*/
73-
tenant: z.object({
73+
runtime: z.object({
7474
isolation: TenantIsolationLevel.describe('Data isolation strategy'),
7575
quotas: TenantQuotaSchema.optional().describe('Resource quotas'),
76-
}).optional().describe('Runtime tenant configuration'),
76+
}).optional().describe('Runtime instance configuration'),
7777

7878
/**
7979
* The Desired State (Bill of Materials)
@@ -94,7 +94,7 @@ export const HubProjectSchema = z.object({
9494
/**
9595
* Commercial / Billing Info
9696
*/
97-
subscription: ProjectSubscriptionSchema.optional(),
97+
subscription: SpaceSubscriptionSchema.optional(),
9898

9999
/**
100100
* Infrastructure Settings
@@ -106,6 +106,6 @@ export const HubProjectSchema = z.object({
106106
});
107107

108108
export type SubscriptionStatus = z.infer<typeof SubscriptionStatus>;
109-
export type ProjectSubscription = z.infer<typeof ProjectSubscriptionSchema>;
109+
export type SpaceSubscription = z.infer<typeof SpaceSubscriptionSchema>;
110110
export type DeploymentTarget = z.infer<typeof DeploymentTargetSchema>;
111-
export type HubProject = z.infer<typeof HubProjectSchema>;
111+
export type HubSpace = z.infer<typeof HubSpaceSchema>;

0 commit comments

Comments
 (0)