diff --git a/openapi/components/parameters.yaml b/openapi/components/parameters.yaml index 570b6f72..4953e644 100644 --- a/openapi/components/parameters.yaml +++ b/openapi/components/parameters.yaml @@ -534,6 +534,20 @@ inventoryTemplateId: type: string example: invt_00000000-0000-0000-0000-000000000000 description: Must be a valid inventory template ID. +inventoryHolderId: + name: holderId + in: query + required: false + schema: + $ref: ./schemas/UserID.yaml + description: The UserID of the owner of the inventory; defaults to the currently authenticated user. +inventoryEquipSlot: + name: equipSlot + in: query + required: false + schema: + $ref: ./schemas/InventoryEquipSlot.yaml + description: Filter for inventory retrieval. inventorySortOrder: name: order in: query @@ -654,3 +668,15 @@ storeView: required: false schema: $ref: ./schemas/StoreView.yaml +subscriptionId: + name: subscriptionId + in: query + required: true + schema: + type: string +mostRecentFlag: + name: mostRecent + in: query + required: false + schema: + type: boolean diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index c6ee18a3..2c4f5cbb 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -97,8 +97,14 @@ $ref: "./paths/economy.yaml#/paths/~1Admin~1transactions~1{transactionId}" '/auth/user/subscription': $ref: "./paths/economy.yaml#/paths/~1auth~1user~1subscription" +'/user/subscription/recent': + $ref: "./paths/economy.yaml#/paths/~1user~1subscription~1recent" +'/user/bulk/gift/purchases': + $ref: "./paths/economy.yaml#/paths/~1user~1bulk~1gift~1purchases" '/users/{userId}/subscription/eligible': $ref: "./paths/economy.yaml#/paths/~1users~1{userId}~1subscription~1eligible" +'/users/{userId}/credits/eligible': + $ref: "./paths/economy.yaml#/paths/~1users~1{userId}~1credits~1eligible" '/subscriptions': $ref: "./paths/economy.yaml#/paths/~1subscriptions" '/licenseGroups/{licenseGroupId}': diff --git a/openapi/components/paths/economy.yaml b/openapi/components/paths/economy.yaml index 00b58b33..418b8476 100644 --- a/openapi/components/paths/economy.yaml +++ b/openapi/components/paths/economy.yaml @@ -82,6 +82,36 @@ paths: tags: - economy description: Get a list of all current user subscriptions. + /user/subscription/recent: + get: + summary: Get Recent Subscription + operationId: getRecentSubscription + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/UserSubscriptionResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Get the most recent user subscription. + /user/bulk/gift/purchases: + parameters: + - $ref: ../parameters.yaml#/mostRecentFlag + get: + summary: Get Bulk Gift Purchases + operationId: getBulkGiftPurchases + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/BulkPurchasesListResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Get bulk gift purchases made by the user. '/users/{userId}/subscription/eligible': parameters: - $ref: ../parameters.yaml#/userId @@ -99,6 +129,23 @@ paths: tags: - economy description: Get the user's eligibility status for subscriptions. + '/users/{userId}/credits/eligible': + parameters: + - $ref: ../parameters.yaml#/userId + - $ref: ../parameters.yaml#/subscriptionId + get: + summary: Get User Credits Eligiblity + operationId: getUserCreditsEligible + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/UserCreditsEligibleResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Get the user's eligibility status for subscriptions based on available credits. /subscriptions: get: summary: List Subscriptions @@ -211,6 +258,24 @@ paths: tags: - economy description: 'Gets the status of the agreement of a user to the Tilia TOS' + put: + summary: Update Tilia TOS Agreement Status + operationId: updateTiliaTos + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/UpdateTiliaTOSResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + requestBody: + content: + application/json: + schema: + $ref: ../requests/UpdateTiliaTOSRequest.yaml + description: 'Updates the status of the agreement of a user to the Tilia TOS' '/user/{userId}/balance': parameters: - $ref: ../parameters.yaml#/userId diff --git a/openapi/components/paths/inventory.yaml b/openapi/components/paths/inventory.yaml index fc61f226..5eecb3e6 100644 --- a/openapi/components/paths/inventory.yaml +++ b/openapi/components/paths/inventory.yaml @@ -8,6 +8,8 @@ paths: parameters: - $ref: ../parameters.yaml#/number - $ref: ../parameters.yaml#/offset + - $ref: ../parameters.yaml#/inventoryHolderId + - $ref: ../parameters.yaml#/inventoryEquipSlot - $ref: ../parameters.yaml#/inventorySortOrder - $ref: ../parameters.yaml#/inventoryItemTags - $ref: ../parameters.yaml#/inventoryItemTypes @@ -25,6 +27,8 @@ paths: $ref: ../responses/inventory/InventoryResponse.yaml '401': $ref: ../responses/MissingCredentialsError.yaml + '403': + $ref: ../responses/NoPermission.yaml tags: - inventory description: Returns an Inventory object. @@ -62,6 +66,19 @@ paths: schema: $ref: ../requests/UpdateInventoryItemRequest.yaml description: Returns the modified InventoryItem object as held by the currently logged in user. + delete: + summary: Delete Own Inventory Item + operationId: deleteOwnInventoryItem + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/inventory/DeleteInventoryItemResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - inventory + description: Deletes an InventoryItem from the inventory of 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 index f6523b55..a0dc1903 100644 --- a/openapi/components/requests/UpdateInventoryItemRequest.yaml +++ b/openapi/components/requests/UpdateInventoryItemRequest.yaml @@ -3,3 +3,7 @@ type: object properties: isArchived: type: boolean + isSeen: + type: boolean + userAttributes: + $ref: ../schemas/InventoryUserAttributes.yaml diff --git a/openapi/components/requests/UpdateTiliaTOSRequest.yaml b/openapi/components/requests/UpdateTiliaTOSRequest.yaml new file mode 100644 index 00000000..a1ee1121 --- /dev/null +++ b/openapi/components/requests/UpdateTiliaTOSRequest.yaml @@ -0,0 +1,7 @@ +title: UpdateTiliaTOSRequest +type: object +properties: + accepted: + type: boolean +required: + - accepted diff --git a/openapi/components/responses/economy/BulkPurchasesListResponse.yaml b/openapi/components/responses/economy/BulkPurchasesListResponse.yaml new file mode 100644 index 00000000..d8355a5b --- /dev/null +++ b/openapi/components/responses/economy/BulkPurchasesListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of ??? objects. +content: + application/json: + schema: + type: array + items: + type: object \ No newline at end of file diff --git a/openapi/components/responses/economy/UpdateTiliaTOSResponse.yaml b/openapi/components/responses/economy/UpdateTiliaTOSResponse.yaml new file mode 100644 index 00000000..96871b57 --- /dev/null +++ b/openapi/components/responses/economy/UpdateTiliaTOSResponse.yaml @@ -0,0 +1,6 @@ +description: Returns a UserSubscription object. +content: + application/json: + schema: + type: object + nullable: true \ No newline at end of file diff --git a/openapi/components/responses/economy/UserCreditsEligibleResponse.yaml b/openapi/components/responses/economy/UserCreditsEligibleResponse.yaml new file mode 100644 index 00000000..64b35bab --- /dev/null +++ b/openapi/components/responses/economy/UserCreditsEligibleResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single UserCreditsEligible object. +content: + application/json: + schema: + $ref: ../../schemas/UserCreditsEligible.yaml \ No newline at end of file diff --git a/openapi/components/responses/economy/UserSubscriptionResponse.yaml b/openapi/components/responses/economy/UserSubscriptionResponse.yaml new file mode 100644 index 00000000..6ce29bf7 --- /dev/null +++ b/openapi/components/responses/economy/UserSubscriptionResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a UserSubscription object. +content: + application/json: + schema: + $ref: ../../schemas/UserSubscription.yaml \ No newline at end of file diff --git a/openapi/components/responses/inventory/DeleteInventoryItemResponse.yaml b/openapi/components/responses/inventory/DeleteInventoryItemResponse.yaml new file mode 100644 index 00000000..49c012ac --- /dev/null +++ b/openapi/components/responses/inventory/DeleteInventoryItemResponse.yaml @@ -0,0 +1,5 @@ +description: Returns an SuccessFlag object. +content: + application/json: + schema: + $ref: ../../schemas/SuccessFlag.yaml \ No newline at end of file diff --git a/openapi/components/schemas/InventoryDefaultAttributes.yaml b/openapi/components/schemas/InventoryDefaultAttributes.yaml new file mode 100644 index 00000000..b69c60df --- /dev/null +++ b/openapi/components/schemas/InventoryDefaultAttributes.yaml @@ -0,0 +1,12 @@ +title: InventoryDefaultAttributes +type: object +additionalProperties: + type: object + properties: + defaultValue: + type: string + validator: + type: object + properties: + type: + type: string diff --git a/openapi/components/schemas/InventoryEquipSlot.yaml b/openapi/components/schemas/InventoryEquipSlot.yaml new file mode 100644 index 00000000..8ad147b1 --- /dev/null +++ b/openapi/components/schemas/InventoryEquipSlot.yaml @@ -0,0 +1,8 @@ +title: InventoryEquipSlot +type: string +enum: + - "" + - drone + - portal +default: "" +example: drone diff --git a/openapi/components/schemas/InventoryFlag.yaml b/openapi/components/schemas/InventoryFlag.yaml index 4ece1f26..7550ad08 100644 --- a/openapi/components/schemas/InventoryFlag.yaml +++ b/openapi/components/schemas/InventoryFlag.yaml @@ -7,5 +7,7 @@ enum: - trashable - cloneable - ugc + - equippable + - unique default: instantiatable example: consumable diff --git a/openapi/components/schemas/InventoryItem.yaml b/openapi/components/schemas/InventoryItem.yaml index 685eeecd..cb74f684 100644 --- a/openapi/components/schemas/InventoryItem.yaml +++ b/openapi/components/schemas/InventoryItem.yaml @@ -9,8 +9,16 @@ properties: format: date-time type: string example: '2025-06-13T05:00:45.455Z' + defaultAttributes: + $ref: ./InventoryDefaultAttributes.yaml description: type: string + equipSlot: + $ref: ./InventoryEquipSlot.yaml + equipSlots: + type: array + items: + $ref: ./InventoryEquipSlot.yaml expiryDate: format: date-time type: string @@ -56,9 +64,14 @@ properties: format: date-time type: string example: '2025-06-25T00:34:15.965Z' + userAttributes: + $ref: ./InventoryUserAttributes.yaml + validateUserAttributes: + type: boolean required: - collections - created_at + - defaultAttributes - description - expiryDate - flags @@ -76,3 +89,5 @@ required: - template_created_at - template_updated_at - updated_at + - userAttributes + - validateUserAttributes diff --git a/openapi/components/schemas/InventoryItemType.yaml b/openapi/components/schemas/InventoryItemType.yaml index 2d8a252c..4d5a9fe2 100644 --- a/openapi/components/schemas/InventoryItemType.yaml +++ b/openapi/components/schemas/InventoryItemType.yaml @@ -5,5 +5,7 @@ enum: - prop - emoji - sticker + - droneskin + - portalskin default: bundle example: prop diff --git a/openapi/components/schemas/InventoryUserAttributes.yaml b/openapi/components/schemas/InventoryUserAttributes.yaml new file mode 100644 index 00000000..1004be2d --- /dev/null +++ b/openapi/components/schemas/InventoryUserAttributes.yaml @@ -0,0 +1,9 @@ +title: InventoryUserAttributes +type: object +properties: + primaryColor: + type: string + secondaryColor: + type: string + trailColor: + type: string diff --git a/openapi/components/schemas/SuccessFlag.yaml b/openapi/components/schemas/SuccessFlag.yaml new file mode 100644 index 00000000..32933059 --- /dev/null +++ b/openapi/components/schemas/SuccessFlag.yaml @@ -0,0 +1,7 @@ +title: SuccessFlag +type: object +properties: + success: + type: boolean +required: + - success diff --git a/openapi/components/schemas/UserCreditsEligible.yaml b/openapi/components/schemas/UserCreditsEligible.yaml new file mode 100644 index 00000000..33ae2ff8 --- /dev/null +++ b/openapi/components/schemas/UserCreditsEligible.yaml @@ -0,0 +1,9 @@ +title: UserCreditsEligible +type: object +properties: + eligible: + type: boolean + reason: + type: string +required: + - eligible