diff --git a/api/spec/factories/Room/DenFactory.ts b/api/spec/factories/Room/DenFactory.ts
new file mode 100644
index 0000000..1a26df8
--- /dev/null
+++ b/api/spec/factories/Room/DenFactory.ts
@@ -0,0 +1,8 @@
+import { UpdateableProperties } from '@rvoh/dream/types'
+import Den from '@models/Room/Den.js'
+
+export default async function createDen(attrs: UpdateableProperties<Den> = {}) {
+ return await Den.create({
+ ...attrs,
+ })
+}
diff --git a/api/spec/factories/Room/LivingRoomFactory.ts b/api/spec/factories/Room/LivingRoomFactory.ts
new file mode 100644
index 0000000..acca82d
--- /dev/null
+++ b/api/spec/factories/Room/LivingRoomFactory.ts
@@ -0,0 +1,8 @@
+import { UpdateableProperties } from '@rvoh/dream/types'
+import LivingRoom from '@models/Room/LivingRoom.js'
+
+export default async function createLivingRoom(attrs: UpdateableProperties<LivingRoom> = {}) {
+ return await LivingRoom.create({
+ ...attrs,
+ })
+}
diff --git a/api/spec/unit/models/Room/Den.spec.ts b/api/spec/unit/models/Room/Den.spec.ts
new file mode 100644
index 0000000..f1e12ce
--- /dev/null
+++ b/api/spec/unit/models/Room/Den.spec.ts
@@ -0,0 +1,3 @@
+describe('Room/Den', () => {
+ it.todo('add a test here to get started building Room/Den')
+})
diff --git a/api/spec/unit/models/Room/LivingRoom.spec.ts b/api/spec/unit/models/Room/LivingRoom.spec.ts
new file mode 100644
index 0000000..6e4aa50
--- /dev/null
+++ b/api/spec/unit/models/Room/LivingRoom.spec.ts
@@ -0,0 +1,3 @@
+describe('Room/LivingRoom', () => {
+ it.todo('add a test here to get started building Room/LivingRoom')
+})
diff --git a/api/src/app/models/Room/Den.ts b/api/src/app/models/Room/Den.ts
new file mode 100644
index 0000000..616ff1e
--- /dev/null
+++ b/api/src/app/models/Room/Den.ts
@@ -0,0 +1,16 @@
+import { Decorators, STI } from '@rvoh/dream'
+import { DreamColumn, DreamSerializers } from '@rvoh/dream/types'
+import Room from '@models/Room.js'
+
+const deco = new Decorators<typeof Den>()
+
+@STI(Room)
+export default class Den extends Room {
+ public override get serializers(): DreamSerializers<Den> {
+ return {
+ default: 'Room/DenSerializer',
+ summary: 'Room/DenSummarySerializer',
+ }
+ }
+
+}
diff --git a/api/src/app/models/Room/LivingRoom.ts b/api/src/app/models/Room/LivingRoom.ts
new file mode 100644
index 0000000..18781f3
--- /dev/null
+++ b/api/src/app/models/Room/LivingRoom.ts
@@ -0,0 +1,16 @@
+import { Decorators, STI } from '@rvoh/dream'
+import { DreamColumn, DreamSerializers } from '@rvoh/dream/types'
+import Room from '@models/Room.js'
+
+const deco = new Decorators<typeof LivingRoom>()
+
+@STI(Room)
+export default class LivingRoom extends Room {
+ public override get serializers(): DreamSerializers<LivingRoom> {
+ return {
+ default: 'Room/LivingRoomSerializer',
+ summary: 'Room/LivingRoomSummarySerializer',
+ }
+ }
+
+}
diff --git a/api/src/app/serializers/Room/DenSerializer.ts b/api/src/app/serializers/Room/DenSerializer.ts
new file mode 100644
index 0000000..5d4db09
--- /dev/null
+++ b/api/src/app/serializers/Room/DenSerializer.ts
@@ -0,0 +1,8 @@
+import { RoomSerializer, RoomSummarySerializer } from '@serializers/RoomSerializer.js'
+import Den from '@models/Room/Den.js'
+
+export const RoomDenSummarySerializer = (den: Den) =>
+ RoomSummarySerializer(Den, den)
+
+export const RoomDenSerializer = (den: Den) =>
+ RoomSerializer(Den, den)
diff --git a/api/src/app/serializers/Room/LivingRoomSerializer.ts b/api/src/app/serializers/Room/LivingRoomSerializer.ts
new file mode 100644
index 0000000..473d39b
--- /dev/null
+++ b/api/src/app/serializers/Room/LivingRoomSerializer.ts
@@ -0,0 +1,8 @@
+import { RoomSerializer, RoomSummarySerializer } from '@serializers/RoomSerializer.js'
+import LivingRoom from '@models/Room/LivingRoom.js'
+
+export const RoomLivingRoomSummarySerializer = (livingRoom: LivingRoom) =>
+ RoomSummarySerializer(LivingRoom, livingRoom)
+
+export const RoomLivingRoomSerializer = (livingRoom: LivingRoom) =>
+ RoomSerializer(LivingRoom, livingRoom)
diff --git a/api/src/openapi/mobile.openapi.json b/api/src/openapi/mobile.openapi.json
index fed01ca..2c48296 100644
--- a/api/src/openapi/mobile.openapi.json
+++ b/api/src/openapi/mobile.openapi.json
@@ -350,8 +350,14 @@
{
"$ref": "#/components/schemas/RoomBedroomSummary"
},
+ {
+ "$ref": "#/components/schemas/RoomDenSummary"
+ },
{
"$ref": "#/components/schemas/RoomKitchenSummary"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoomSummary"
}
]
}
@@ -458,8 +464,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -527,8 +539,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -893,6 +911,50 @@
}
}
},
+ "RoomDen": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "description": "The following values will be allowed:\n Den"
+ }
+ }
+ },
+ "RoomDenSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"RoomKitchen": {
"type": "object",
"additionalProperties": false,
@@ -945,6 +1007,50 @@
}
}
},
+ "RoomLivingRoom": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "description": "The following values will be allowed:\n LivingRoom"
+ }
+ }
+ },
+ "RoomLivingRoomSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"ValidationErrors": {
"type": "object",
"required": [
diff --git a/api/src/openapi/openapi.json b/api/src/openapi/openapi.json
index 9890837..6616d1e 100644
--- a/api/src/openapi/openapi.json
+++ b/api/src/openapi/openapi.json
@@ -350,8 +350,14 @@
{
"$ref": "#/components/schemas/RoomBedroomSummary"
},
+ {
+ "$ref": "#/components/schemas/RoomDenSummary"
+ },
{
"$ref": "#/components/schemas/RoomKitchenSummary"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoomSummary"
}
]
}
@@ -458,8 +464,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -527,8 +539,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -918,6 +936,52 @@
}
}
},
+ "RoomDen": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "Den"
+ ]
+ }
+ }
+ },
+ "RoomDenSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"RoomKitchen": {
"type": "object",
"additionalProperties": false,
@@ -977,6 +1041,52 @@
}
}
},
+ "RoomLivingRoom": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "LivingRoom"
+ ]
+ }
+ }
+ },
+ "RoomLivingRoomSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"ValidationErrors": {
"type": "object",
"required": [
diff --git a/api/src/openapi/tests.openapi.json b/api/src/openapi/tests.openapi.json
index 15038fa..e34f706 100644
--- a/api/src/openapi/tests.openapi.json
+++ b/api/src/openapi/tests.openapi.json
@@ -350,8 +350,14 @@
{
"$ref": "#/components/schemas/RoomBedroomSummary"
},
+ {
+ "$ref": "#/components/schemas/RoomDenSummary"
+ },
{
"$ref": "#/components/schemas/RoomKitchenSummary"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoomSummary"
}
]
}
@@ -458,8 +464,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -527,8 +539,14 @@
{
"$ref": "#/components/schemas/RoomBedroom"
},
+ {
+ "$ref": "#/components/schemas/RoomDen"
+ },
{
"$ref": "#/components/schemas/RoomKitchen"
+ },
+ {
+ "$ref": "#/components/schemas/RoomLivingRoom"
}
]
}
@@ -918,6 +936,52 @@
}
}
},
+ "RoomDen": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "Den"
+ ]
+ }
+ }
+ },
+ "RoomDenSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"RoomKitchen": {
"type": "object",
"additionalProperties": false,
@@ -977,6 +1041,52 @@
}
}
},
+ "RoomLivingRoom": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "deletedAt",
+ "id",
+ "position",
+ "type"
+ ],
+ "properties": {
+ "deletedAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "LivingRoom"
+ ]
+ }
+ }
+ },
+ "RoomLivingRoomSummary": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+ },
"ValidationErrors": {
"type": "object",
"required": [
diff --git a/api/src/types/dream.globals.ts b/api/src/types/dream.globals.ts
index a014277..b6e5538 100644
--- a/api/src/types/dream.globals.ts
+++ b/api/src/types/dream.globals.ts
@@ -68,8 +68,12 @@ export const globalTypeConfig = {
'Room/BathroomSummarySerializer',
'Room/BedroomSerializer',
'Room/BedroomSummarySerializer',
+ 'Room/DenSerializer',
+ 'Room/DenSummarySerializer',
'Room/KitchenSerializer',
'Room/KitchenSummarySerializer',
+ 'Room/LivingRoomSerializer',
+ 'Room/LivingRoomSummarySerializer',
'RoomSerializer',
'RoomSummarySerializer',
],
diff --git a/api/src/types/dream.ts b/api/src/types/dream.ts
index 946a014..a45e34d 100644
--- a/api/src/types/dream.ts
+++ b/api/src/types/dream.ts
@@ -623,7 +623,9 @@ export const connectionTypeConfig = {
Room: 'rooms',
'Room/Bathroom': 'rooms',
'Room/Bedroom': 'rooms',
+ 'Room/Den': 'rooms',
'Room/Kitchen': 'rooms',
+ 'Room/LivingRoom': 'rooms',
User: 'users',
},
},
diff --git a/api/src/types/openapi/tests.openapi.d.ts b/api/src/types/openapi/tests.openapi.d.ts
index 6ac23ac..0ff0366 100644
--- a/api/src/types/openapi/tests.openapi.d.ts
+++ b/api/src/types/openapi/tests.openapi.d.ts
@@ -225,7 +225,7 @@ export interface paths {
content: {
"application/json": {
cursor: string | null;
- results: (components["schemas"]["RoomBathroomSummary"] | components["schemas"]["RoomBedroomSummary"] | components["schemas"]["RoomKitchenSummary"])[];
+ results: (components["schemas"]["RoomBathroomSummary"] | components["schemas"]["RoomBedroomSummary"] | components["schemas"]["RoomDenSummary"] | components["schemas"]["RoomKitchenSummary"] | components["schemas"]["RoomLivingRoomSummary"])[];
};
};
};
@@ -270,7 +270,7 @@ export interface paths {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["RoomBathroom"] | components["schemas"]["RoomBedroom"] | components["schemas"]["RoomKitchen"];
+ "application/json": components["schemas"]["RoomBathroom"] | components["schemas"]["RoomBedroom"] | components["schemas"]["RoomDen"] | components["schemas"]["RoomKitchen"] | components["schemas"]["RoomLivingRoom"];
};
};
400: components["responses"]["BadRequest"];
@@ -317,7 +317,7 @@ export interface paths {
[name: string]: unknown;
};
content: {
- "application/json": components["schemas"]["RoomBathroom"] | components["schemas"]["RoomBedroom"] | components["schemas"]["RoomKitchen"];
+ "application/json": components["schemas"]["RoomBathroom"] | components["schemas"]["RoomBedroom"] | components["schemas"]["RoomDen"] | components["schemas"]["RoomKitchen"] | components["schemas"]["RoomLivingRoom"];
};
};
400: components["responses"]["BadRequest"];
@@ -448,6 +448,17 @@ export interface components {
RoomBedroomSummary: {
id: string;
};
+ RoomDen: {
+ /** Format: date-time */
+ deletedAt: string | null;
+ id: string;
+ position: number | null;
+ /** @enum {string} */
+ type: "Den";
+ };
+ RoomDenSummary: {
+ id: string;
+ };
RoomKitchen: {
appliances: ("dishwasher" | "microwave" | "oven" | "stove")[];
/** Format: date-time */
@@ -460,6 +471,17 @@ export interface components {
RoomKitchenSummary: {
id: string;
};
+ RoomLivingRoom: {
+ /** Format: date-time */
+ deletedAt: string | null;
+ id: string;
+ position: number | null;
+ /** @enum {string} */
+ type: "LivingRoom";
+ };
+ RoomLivingRoomSummary: {
+ id: string;
+ };
ValidationErrors: {
/** @enum {string} */
type: "validation";