diff --git a/openapi/components/parameters.yaml b/openapi/components/parameters.yaml index 3b74f258..647f3e9f 100644 --- a/openapi/components/parameters.yaml +++ b/openapi/components/parameters.yaml @@ -558,6 +558,23 @@ inventorySpawnItemId: schema: $ref: ./schemas/InventoryItemID.yaml description: Id for inventory item spawning. +inventoryPedestalItemId: + name: itemId + in: query + required: true + schema: + $ref: ./schemas/InventoryItemID.yaml + description: Id for inventory item sharing. +inventoryPedestalDuration: + name: duration + in: query + required: true + schema: + type: integer + minimum: 30 + maximum: 86400 + default: 90 + description: The duration before the sharing pedestal despawns. calendarSearchTerm: name: searchTerm in: query @@ -565,4 +582,38 @@ calendarSearchTerm: schema: type: string example: game night - description: Search term for calendar events. \ No newline at end of file + description: Search term for calendar events. +steamId: + name: steamId + in: query + required: false + schema: + type: string + example: game night + description: The Steam ID of the user. +hydrateListings: + name: hydrateListings + in: query + required: false + schema: + type: boolean + description: Listings fields will be populated. +hydrateProducts: + name: hydrateProducts + in: query + required: false + schema: + type: boolean + description: Products fields will be populated. +storeId: + name: storeId + in: query + required: true + schema: + $ref: ./schemas/StoreID.yaml +storeView: + name: fetch + in: query + required: false + schema: + $ref: ./schemas/StoreView.yaml diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index ef562470..9555d07f 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -97,6 +97,8 @@ $ref: "./paths/economy.yaml#/paths/~1Admin~1transactions~1{transactionId}" '/auth/user/subscription': $ref: "./paths/economy.yaml#/paths/~1auth~1user~1subscription" +'/users/{userId}/subscription/eligible': + $ref: "./paths/economy.yaml#/paths/~1users~1{userId}~1subscription~1eligible" '/subscriptions': $ref: "./paths/economy.yaml#/paths/~1subscriptions" '/licenseGroups/{licenseGroupId}': @@ -113,6 +115,16 @@ $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1tilia~1tos" '/user/{userId}/balance': $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1balance" +'/user/{userId}/balance/earnings': + $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1balance~1earnings" +'/user/{userId}/economy/account': + $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1economy~1account" +'/economy/licenses/active': + $ref: "./paths/economy.yaml#/paths/~1economy~1licenses~1active" +'/economy/store': + $ref: "./paths/economy.yaml#/paths/~1economy~1store" +'/economy/store/shelves': + $ref: "./paths/economy.yaml#/paths/~1economy~1store~1shelves" # favorites @@ -238,6 +250,11 @@ $ref: "./paths/inventory.yaml#/paths/~1inventory~1template~1{inventoryTemplateId}" "/inventory/spawn": $ref: "./paths/inventory.yaml#/paths/~1inventory~1spawn" +"/inventory/cloning/pedestal": + $ref: "./paths/inventory.yaml#/paths/~1inventory~1cloning~1pedestal" +"/inventory/cloning/direct": + $ref: "./paths/inventory.yaml#/paths/~1inventory~1cloning~1direct" + # invite diff --git a/openapi/components/paths/economy.yaml b/openapi/components/paths/economy.yaml index 08e4979f..00b58b33 100644 --- a/openapi/components/paths/economy.yaml +++ b/openapi/components/paths/economy.yaml @@ -82,6 +82,23 @@ paths: tags: - economy description: Get a list of all current user subscriptions. + '/users/{userId}/subscription/eligible': + parameters: + - $ref: ../parameters.yaml#/userId + - $ref: ../parameters.yaml#/steamId + get: + summary: Get User Subscription Eligiblity + operationId: getUserSubscriptionEligible + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/UserSubscriptionEligibleResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Get the user's eligibility status for subscriptions. /subscriptions: get: summary: List Subscriptions @@ -210,6 +227,88 @@ paths: tags: - economy description: 'Gets the balance of a user' + '/user/{userId}/balance/earnings': + parameters: + - $ref: ../parameters.yaml#/userId + get: + summary: Get Balance Earnings + operationId: getBalanceEarnings + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/BalanceResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: 'Gets the balance of a user from earnings' + '/user/{userId}/economy/account': + parameters: + - $ref: ../parameters.yaml#/userId + get: + summary: Get Economy Account + operationId: getEconomyAccount + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/EconomyAccountResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: 'Gets the economy account of a user' + '/economy/licenses/active': + get: + summary: Get Active Licenses + operationId: getActiveLicenses + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/LicenseListResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: 'Gets active licenses' + '/economy/store': + parameters: + - $ref: ../parameters.yaml#/storeId + - $ref: ../parameters.yaml#/hydrateListings + - $ref: ../parameters.yaml#/hydrateProducts + get: + summary: Get Store + operationId: getStore + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/StoreResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Gets a store + '/economy/store/shelves': + parameters: + - $ref: ../parameters.yaml#/storeId + - $ref: ../parameters.yaml#/hydrateListings + - $ref: ../parameters.yaml#/storeView + get: + summary: Get Store Shelves + operationId: getStoreShelves + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/economy/StoreShelfListResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - economy + description: Gets the shelves for a store tags: $ref: ../tags.yaml components: diff --git a/openapi/components/paths/inventory.yaml b/openapi/components/paths/inventory.yaml index 2404e73a..81a46150 100644 --- a/openapi/components/paths/inventory.yaml +++ b/openapi/components/paths/inventory.yaml @@ -104,6 +104,46 @@ paths: tags: - inventory description: Returns an InventorySpawn object. + '/inventory/cloning/pedestal': + parameters: + - $ref: ../parameters.yaml#/inventoryPedestalItemId + - $ref: ../parameters.yaml#/inventoryPedestalDuration + get: + summary: Share Inventory Item by Pedestal + operationId: shareInventoryItemPedestal + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/inventory/InventorySpawnResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - inventory + description: Returns an InventorySpawn object. + '/inventory/cloning/direct': + parameters: + - $ref: ../parameters.yaml#/inventoryPedestalItemId + - $ref: ../parameters.yaml#/inventoryPedestalDuration + post: + summary: Share Inventory Item Direct + operationId: shareInventoryItemDirect + requestBody: + required: true + content: + application/json: + schema: + $ref: ../requests/ShareInventoryItemDirectRequest.yaml + security: + - authCookie: [] + responses: + '200': + $ref: ../responses/inventory/InventoryShareResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + tags: + - inventory + description: Share content directly with other users. tags: $ref: ../tags.yaml components: diff --git a/openapi/components/requests/ShareInventoryItemDirectRequest.yaml b/openapi/components/requests/ShareInventoryItemDirectRequest.yaml new file mode 100644 index 00000000..45d6d6b2 --- /dev/null +++ b/openapi/components/requests/ShareInventoryItemDirectRequest.yaml @@ -0,0 +1,12 @@ +title: ShareInventoryItemDirectRequest +type: object +properties: + itemId: + $ref: ../schemas/InventoryItemID.yaml + users: + type: array + items: + $ref: ../schemas/UserID.yaml +required: + - itemId + - users diff --git a/openapi/components/responses/economy/EconomyAccountResponse.yaml b/openapi/components/responses/economy/EconomyAccountResponse.yaml new file mode 100644 index 00000000..99ff3de2 --- /dev/null +++ b/openapi/components/responses/economy/EconomyAccountResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single EconomyAccount object. +content: + application/json: + schema: + $ref: ../../schemas/EconomyAccount.yaml \ No newline at end of file diff --git a/openapi/components/responses/economy/LicenseListResponse.yaml b/openapi/components/responses/economy/LicenseListResponse.yaml new file mode 100644 index 00000000..74c2b2ff --- /dev/null +++ b/openapi/components/responses/economy/LicenseListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of License objects. +content: + application/json: + schema: + type: array + items: + $ref: ../../schemas/License.yaml \ No newline at end of file diff --git a/openapi/components/responses/economy/StoreResponse.yaml b/openapi/components/responses/economy/StoreResponse.yaml new file mode 100644 index 00000000..1bd69d60 --- /dev/null +++ b/openapi/components/responses/economy/StoreResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single Store object. +content: + application/json: + schema: + $ref: ../../schemas/Store.yaml \ No newline at end of file diff --git a/openapi/components/responses/economy/StoreShelfListResponse.yaml b/openapi/components/responses/economy/StoreShelfListResponse.yaml new file mode 100644 index 00000000..448f61ae --- /dev/null +++ b/openapi/components/responses/economy/StoreShelfListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of StoreShelf objects. +content: + application/json: + schema: + type: array + items: + $ref: ../../schemas/StoreShelf.yaml \ No newline at end of file diff --git a/openapi/components/responses/economy/UserSubscriptionEligibleResponse.yaml b/openapi/components/responses/economy/UserSubscriptionEligibleResponse.yaml new file mode 100644 index 00000000..ed0c1527 --- /dev/null +++ b/openapi/components/responses/economy/UserSubscriptionEligibleResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single UserSubscriptionEligible object. +content: + application/json: + schema: + $ref: ../../schemas/UserSubscriptionEligible.yaml \ No newline at end of file diff --git a/openapi/components/responses/inventory/InventoryShareResponse.yaml b/openapi/components/responses/inventory/InventoryShareResponse.yaml new file mode 100644 index 00000000..b74432e6 --- /dev/null +++ b/openapi/components/responses/inventory/InventoryShareResponse.yaml @@ -0,0 +1,5 @@ +description: Returns an OkStatus object. +content: + application/json: + schema: + $ref: ../../schemas/OkStatus.yaml \ No newline at end of file diff --git a/openapi/components/schemas/EconomyAccount.yaml b/openapi/components/schemas/EconomyAccount.yaml new file mode 100644 index 00000000..8a988b61 --- /dev/null +++ b/openapi/components/schemas/EconomyAccount.yaml @@ -0,0 +1,25 @@ +title: EconomyAccount +type: object +properties: + accountActivatedOn: + type: string + format: date-time + nullable: true + accountId: + type: string + nullable: true + blocked: + type: boolean + canSpend: + type: boolean + source: + type: string + userId: + $ref: ./UserID.yaml +required: + - accountActivatedOn + - accountId + - blocked + - canSpend + - source + - userId diff --git a/openapi/components/schemas/OkStatus.yaml b/openapi/components/schemas/OkStatus.yaml new file mode 100644 index 00000000..f6789b6e --- /dev/null +++ b/openapi/components/schemas/OkStatus.yaml @@ -0,0 +1,10 @@ +title: OkStatus +type: object +description: A status response consisting of solely a string description of whether the result of an operation was ok. +properties: + ok: + type: string + default: "maybe?" + description: The actual status itself +required: + - ok diff --git a/openapi/components/schemas/Store.yaml b/openapi/components/schemas/Store.yaml new file mode 100644 index 00000000..c276f3e8 --- /dev/null +++ b/openapi/components/schemas/Store.yaml @@ -0,0 +1,56 @@ +title: Store +type: object +properties: + description: + type: string + displayName: + type: string + id: + $ref: ./StoreID.yaml + sellerDisplayName: + type: string + sellerId: + $ref: ./UserID.yaml + storeId: + $ref: ./StoreID.yaml + storeType: + $ref: ./StoreType.yaml + tags: + type: array + items: + $ref: ./Tag.yaml + listingIds: + description: Only for store type world and group + type: array + items: + $ref: ./ProductID.yaml + listings: + description: Only for store type world and group + type: array + items: + $ref: ./ProductListing.yaml + worldId: + description: Only for store type world + $ref: ./WorldID.yaml + groupId: + description: Only for store type group + $ref: ./GroupID.yaml + shelfIds: + description: Only for store type house + type: array + items: + $ref: ./StoreShelfID.yaml + shelves: + description: Only for store type house + type: array + items: + $ref: ./StoreShelf.yaml +required: + - description + - displayName + - id + - sellerDisplayName + - sellerId + - storeId + - storeType + - tags diff --git a/openapi/components/schemas/StoreShelf.yaml b/openapi/components/schemas/StoreShelf.yaml new file mode 100644 index 00000000..b91a33b1 --- /dev/null +++ b/openapi/components/schemas/StoreShelf.yaml @@ -0,0 +1,29 @@ +title: StoreShelf +type: object +properties: + id: + $ref: ./StoreShelfID.yaml + listingIds: + type: array + items: + $ref: ./ProductID.yaml + listings: + type: array + items: + $ref: ./ProductListing.yaml + shelfDescription: + type: string + shelfLayout: + type: string + shelfTitle: + type: string + updatedAt: + type: string + format: data-time +required: + - id + - listingIds + - shelfDescription + - shelfLayout + - shelfTitle + - updatedAt diff --git a/openapi/components/schemas/StoreShelfID.yaml b/openapi/components/schemas/StoreShelfID.yaml new file mode 100644 index 00000000..f0990763 --- /dev/null +++ b/openapi/components/schemas/StoreShelfID.yaml @@ -0,0 +1,3 @@ +example: ess_964dd7aa-f881-4ba1-adf7-261e906b9189 +title: StoreShelfID +type: string diff --git a/openapi/components/schemas/StoreType.yaml b/openapi/components/schemas/StoreType.yaml new file mode 100644 index 00000000..4c5254bd --- /dev/null +++ b/openapi/components/schemas/StoreType.yaml @@ -0,0 +1,7 @@ +title: StoreType +type: string +default: group +enum: + - house + - world + - group diff --git a/openapi/components/schemas/StoreView.yaml b/openapi/components/schemas/StoreView.yaml new file mode 100644 index 00000000..3b182896 --- /dev/null +++ b/openapi/components/schemas/StoreView.yaml @@ -0,0 +1,9 @@ +title: StoreView +type: string +default: public +enum: + - all + - publicPreview + - public + - preview + - draft diff --git a/openapi/components/schemas/UserSubscriptionEligible.yaml b/openapi/components/schemas/UserSubscriptionEligible.yaml new file mode 100644 index 00000000..f398b9c9 --- /dev/null +++ b/openapi/components/schemas/UserSubscriptionEligible.yaml @@ -0,0 +1,22 @@ +title: UserSubscriptionEligible +type: object +properties: + activeCancelledSubscription: + type: boolean + giftEligible: + type: boolean + nonExtendVendorWillLoseGiftTime: + type: boolean + purchaseEligible: + type: boolean + subscriptionEligible: + type: boolean + subscriptionOnAltAccount: + type: boolean +required: + - activeCancelledSubscription + - giftEligible + - nonExtendVendorWillLoseGiftTime + - purchaseEligible + - subscriptionEligible + - subscriptionOnAltAccount