From 5a4316516d2c32a38f59209f33c50ad189bf698d Mon Sep 17 00:00:00 2001 From: Vinyarion <38413862+VinyarionHyarmendacil@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:48:02 -0500 Subject: [PATCH] Add Update Own Inventory Item, fix Get Inventory parameters --- openapi/components/parameters.yaml | 36 +++++++++++++++++-- openapi/components/paths/inventory.yaml | 23 +++++++++++- .../requests/UpdateInventoryItemRequest.yaml | 5 +++ 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 openapi/components/requests/UpdateInventoryItemRequest.yaml diff --git a/openapi/components/parameters.yaml b/openapi/components/parameters.yaml index aa5e5242..c37d815f 100644 --- a/openapi/components/parameters.yaml +++ b/openapi/components/parameters.yaml @@ -510,22 +510,52 @@ inventoryTemplateId: example: invt_00000000-0000-0000-0000-000000000000 description: Must be a valid inventory template ID. inventorySortOrder: - name: inventorySortOrder + name: order in: query required: false schema: type: string enum: - newest + - newest_created - oldest + - oldest_created description: Sort order for inventory retrieval. -inventoryItemType: - name: inventoryItemType +inventoryItemTypes: + name: types in: query required: false schema: $ref: ./schemas/InventoryItemType.yaml description: Filter for inventory retrieval. +inventoryItemTags: + name: tags + in: query + required: false + schema: + $ref: ./schemas/Tag.yaml + description: Filter tags for inventory retrieval (comma-separated). +inventoryItemFlags: + name: flags + in: query + required: false + schema: + $ref: ./schemas/InventoryFlag.yaml + description: Filter flags for inventory retrieval (comma-separated). +inventoryItemNotFlags: + name: notFlags + in: query + required: false + schema: + $ref: ./schemas/InventoryFlag.yaml + description: Filter out flags for inventory retrieval (comma-separated). +inventoryItemArchived: + name: archived + in: query + required: false + schema: + type: boolean + description: Filter archived status for inventory retrieval. inventorySpawnItemId: name: id in: query diff --git a/openapi/components/paths/inventory.yaml b/openapi/components/paths/inventory.yaml index 2404e73a..e2209e33 100644 --- a/openapi/components/paths/inventory.yaml +++ b/openapi/components/paths/inventory.yaml @@ -9,7 +9,10 @@ paths: - $ref: ../parameters.yaml#/number - $ref: ../parameters.yaml#/offset - $ref: ../parameters.yaml#/inventorySortOrder - - $ref: ../parameters.yaml#/inventoryItemType + - $ref: ../parameters.yaml#/inventoryItemTypes + - $ref: ../parameters.yaml#/inventoryItemFlags + - $ref: ../parameters.yaml#/inventoryItemNotFlags + - $ref: ../parameters.yaml#/inventoryItemArchived get: summary: Get Inventory operationId: getInventory @@ -39,6 +42,24 @@ paths: tags: - inventory description: Returns an InventoryItem object held by the currently logged in user. + put: + summary: Update Own Inventory Item + operationId: updateOwnInventoryItem + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/inventory/InventoryItemResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - inventory + requestBody: + content: + application/json: + schema: + $ref: ../requests/UpdateInventoryItemRequest.yaml + description: Returns the modified InventoryItem object as held by the currently logged in user. '/users/{userId}/inventory/{inventoryItemId}': parameters: - $ref: ../parameters.yaml#/userId diff --git a/openapi/components/requests/UpdateInventoryItemRequest.yaml b/openapi/components/requests/UpdateInventoryItemRequest.yaml new file mode 100644 index 00000000..f6523b55 --- /dev/null +++ b/openapi/components/requests/UpdateInventoryItemRequest.yaml @@ -0,0 +1,5 @@ +title: UpdateInventoryItemRequest +type: object +properties: + isArchived: + type: boolean