openapi: 3.0.0
info:
title: '@kumo/api Account Stock Walls API'
contact: {}
servers:
- url: /
tags:
- name: Stock Walls
paths:
/v1/stockWalls:
get:
operationId: GetStockWalls
responses:
'200':
description: A paginated list of stock walls.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse_ApiStockWall_'
description: 'Get a paginated list of stock walls. (i.e., well-known wall
types).
Subsequent pages can be requested with the "next" parameter, which is
returned in the response metadata object if another page exists.'
summary: Get stock walls.
tags:
- Stock Walls
security: []
parameters:
- description: Whether to include draft walls in the results. Defaults to false.
in: query
name: includeDraft
required: false
schema:
default: false
type: boolean
- description: 'An opaque cursor used to request the next page of results.
It is provided in the previous response from the api.'
in: query
name: next
required: false
schema:
type: string
- description: 'The maximum number of results to return. max: 30'
in: query
name: limit
required: false
schema:
default: 30
format: int32
type: integer
maximum: 30
minimum: 1
post:
operationId: CreateStockWall
responses:
'201':
description: Created
description: 'Creates a new stock wall. Can only be called by kumospace
admins.'
summary: Create stock wall.
tags:
- Stock Walls
security:
- firebase: []
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApiCreateStockWallRequest'
components:
schemas:
DbWallBehavior:
allOf:
- properties:
disableCollision:
type: boolean
type: object
- anyOf:
- properties:
type:
$ref: '#/components/schemas/WallBehaviorType.none'
required:
- type
type: object
- properties:
data:
properties:
hinge:
type: string
enum:
- left
- right
required:
- hinge
type: object
type:
$ref: '#/components/schemas/WallBehaviorType.door'
required:
- data
- type
type: object
WallBehaviorType.none:
enum:
- none
type: string
DbStockWall:
properties:
title:
type: string
description:
type: string
thumbnailUrl:
type: string
behavior:
$ref: '#/components/schemas/DbWallBehavior'
textures:
properties:
'0':
$ref: '#/components/schemas/DbStockWallTexture'
'90':
$ref: '#/components/schemas/DbStockWallTexture'
'180':
$ref: '#/components/schemas/DbStockWallTexture'
'270':
$ref: '#/components/schemas/DbStockWallTexture'
corner:
$ref: '#/components/schemas/DbStockWallTexture'
required:
- '90'
- '0'
type: object
isDraft:
type: boolean
isDeleted:
type: boolean
required:
- title
- description
- thumbnailUrl
- behavior
- textures
- isDraft
type: object
additionalProperties: false
WallBehaviorType.door:
enum:
- door
type: string
ApiWallBehavior:
$ref: '#/components/schemas/DbWallBehavior'
PaginatedResponse_ApiStockWall_:
description: A page of items. Useful for breaking up a large dataset into smaller chunks.
properties:
items:
items:
$ref: '#/components/schemas/ApiStockWall'
type: array
description: The page of items.
metadata:
properties:
count:
type: number
format: double
description: The number of items sent.
next:
type: string
description: 'A pagination cursor. If specified, there is another page of results that
can be requested by appending this value as a query parameter called
"next".'
required:
- count
type: object
description: 'Metadata about the page of items. Contains a pagination cursor called
"next" if there is another page of items.'
required:
- items
- metadata
type: object
additionalProperties: false
ApiStockWall:
allOf:
- $ref: '#/components/schemas/DbStockWall'
- properties:
id:
type: string
required:
- id
type: object
description: A wall style that can be applied to a room.
ApiCreateStockWallRequest:
properties:
isDraft:
type: boolean
description: 'Whether this wall is in draft (i.e., not viewable in the room builder).
Defaults to false.'
textures:
properties:
'0':
$ref: '#/components/schemas/DbStockWallTexture'
'90':
$ref: '#/components/schemas/DbStockWallTexture'
'180':
$ref: '#/components/schemas/DbStockWallTexture'
'270':
$ref: '#/components/schemas/DbStockWallTexture'
corner:
$ref: '#/components/schemas/DbStockWallTexture'
required:
- '90'
- '0'
type: object
description: 'Image URLs for textures on walls. The key is the degrees of
clockwise rotation from the default (0°).'
behavior:
$ref: '#/components/schemas/ApiWallBehavior'
description: The behavior for this wall.
thumbnailUrl:
type: string
description: An image displayed in the room builder slideout that represents this wall.
minLength: 1
description:
type: string
description: The description of the stock wall.
minLength: 1
title:
type: string
description: A short title.
minLength: 1
required:
- textures
- behavior
- thumbnailUrl
- description
- title
type: object
description: A request to add a new stock wall to the wall gallery.
DbStockWallTexture:
properties:
url:
type: string
width:
type: number
format: double
height:
type: number
format: double
imgWidth:
type: number
format: double
imgHeight:
type: number
format: double
required:
- url
- width
- height
type: object
additionalProperties: false
securitySchemes:
firebase:
type: http
scheme: bearer
bearerFormat: JWT