diff --git a/openapi/components/parameters.yaml b/openapi/components/parameters.yaml index 2ae786b2..3a2b8e10 100644 --- a/openapi/components/parameters.yaml +++ b/openapi/components/parameters.yaml @@ -62,7 +62,7 @@ badgeId: required: true in: path schema: - type: string + $ref: ./schemas/BadgeID.yaml branch: name: branch description: Specifies which git branch the site should load frontend source code from. @@ -163,8 +163,7 @@ calendarId: required: true in: path schema: - type: string - example: cal_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/CalendarID.yaml calendarSearchTerm: name: searchTerm description: Search term for calendar events. @@ -187,15 +186,30 @@ confirmEmailUserId: required: true in: query schema: - type: string - example: usr_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/UserID.yaml contentId: name: contentId - description: Filter for users' previously submitted feedback, e.g., a groupId, userId, avatarId, etc. + description: Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. required: false in: query schema: - type: boolean + type: string +dateMax: + name: dateMax + description: The end date of the search range. + required: false + in: query + schema: + type: string + format: date-time +dateMin: + name: dateMin + description: The start date of the search range. + required: false + in: query + schema: + type: string + format: date-time displayName: name: displayName description: Filter by displayName. @@ -232,32 +246,28 @@ excludeUserId: required: false in: query schema: - type: string + $ref: ./schemas/UserID.yaml favoriteGroupName: name: favoriteGroupName description: "The name of the group to fetch, must be a name of a FavoriteGroup." required: true in: path schema: - type: string + $ref: ./schemas/FavoriteName.yaml favoriteGroupType: name: favoriteGroupType description: "The type of group to fetch, must be a valid FavoriteType." required: true in: path schema: - type: string - enum: - - avatar - - friend - - world + $ref: ./schemas/FavoriteType.yaml favoriteId: name: favoriteId description: Must be a valid favorite ID. required: true in: path schema: - type: string + $ref: ./schemas/FavoriteID.yaml featured: name: featured description: Filters on featured results. @@ -271,8 +281,7 @@ fileId: required: true in: path schema: - type: string - example: file_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/FileID.yaml fileType: name: fileType description: Type of file. @@ -285,6 +294,13 @@ fileType: - file - signature example: file +fromUserId: + name: fromUserId + description: Must be a valid user ID. + required: false + in: query + schema: + $ref: ./schemas/UserID.yaml fuzzy: name: fuzzy required: false @@ -297,32 +313,28 @@ groupGalleryId: required: true in: path schema: - type: string - example: ggal_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/GroupGalleryID.yaml groupGalleryImageId: name: groupGalleryImageId description: Must be a valid group gallery image ID. required: true in: path schema: - type: string - example: ggim_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/GroupGalleryImageID.yaml groupId: name: groupId description: Must be a valid group ID. required: true in: path schema: - type: string - example: grp_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/GroupID.yaml groupIdFilter: name: groupId description: Must be a valid group ID. required: false in: query schema: - type: string - example: grp_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/GroupID.yaml groupMemberRoleFilter: name: roleId description: Only returns members with a specific groupRoleId @@ -343,8 +355,7 @@ groupRoleId: required: true in: path schema: - type: string - example: grol_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/GroupRoleID.yaml hydrate: name: hydrate description: Populates some fields and changes types of others for certain objects. @@ -379,7 +390,7 @@ instanceId: required: true in: path schema: - type: string + $ref: ./schemas/InstanceID.yaml inventoryEquipSlot: name: equipSlot description: Filter for inventory retrieval. @@ -414,8 +425,7 @@ inventoryItemId: required: true in: path schema: - type: string - example: inv_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/InventoryItemID.yaml inventoryItemNotFlags: name: notFlags description: Filter out flags for inventory retrieval (comma-separated). @@ -493,8 +503,7 @@ inventoryTemplateId: required: true in: path schema: - type: string - example: invt_00000000-0000-0000-0000-000000000000 + $ref: ./schemas/InventoryTemplateID.yaml isInternalVariant: name: isInternalVariant description: Not quite sure what this actually does (exists on the website but doesn't seem to be used) @@ -505,19 +514,25 @@ isInternalVariant: example: false jamId: name: jamId - description: Must be a valid query ID. + description: Must be a valid jam ID. required: true in: path schema: - type: string - example: jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9 + $ref: ./schemas/JamID.yaml +jamSubmissionId: + name: jamSubmissionId + description: Must be a valid jam submission ID. + required: true + in: path + schema: + $ref: ./schemas/JamSubmissionID.yaml licenseGroupId: name: licenseGroupId description: Must be a valid license group ID. required: true in: path schema: - type: string + $ref: ./schemas/LicenseGroupID.yaml limit: name: limit description: The maximum number of entries to get. @@ -540,6 +555,13 @@ messageType: in: path schema: $ref: ./schemas/InviteMessageType.yaml +metadata: + name: metadata + description: Which metadata fields to include (comma-separated). + required: false + in: query + schema: + type: string minUnityVersion: name: minUnityVersion description: The minimum Unity version supported by the asset. @@ -609,7 +631,7 @@ notificationId: required: true in: path schema: - type: string + $ref: ./schemas/NotificationID.yaml number: name: n description: The number of objects to return. @@ -655,7 +677,7 @@ permissionId: required: true in: path schema: - type: string + $ref: ./schemas/PermissionID.yaml platform: name: platform description: The platform the asset supports. @@ -669,23 +691,35 @@ printId: required: true in: path schema: - type: string - example: prnt_0a0aa0a0-85ea-42eb-b2f7-4840d7f341fa + $ref: ./schemas/PrintID.yaml productId: name: productId description: Must be a valid product ID. required: true in: path schema: - type: string + $ref: ./schemas/ProductID.yaml +productPurchaseId: + name: productPurchaseId + description: Must be a valid purchase ID. + required: true + in: path + schema: + $ref: ./schemas/ProductPurchaseID.yaml propId: name: propId description: Prop ID. required: true in: path schema: - type: string - example: prop_829ba6f6-b837-49d9-b9a9-056b82103b58 + $ref: ./schemas/PropID.yaml +publishedPlatform: + name: publishedPlatform + description: A platform the world supports. + required: true + in: path + schema: + $ref: ./schemas/Platform.yaml releaseStatus: name: releaseStatus description: Filter by ReleaseStatus. @@ -758,6 +792,13 @@ storeView: in: query schema: $ref: ./schemas/StoreView.yaml +submitterId: + name: submitterId + description: Must be a valid user ID. + required: false + in: query + schema: + $ref: ./schemas/UserID.yaml subscriptionId: name: subscriptionId required: true @@ -786,6 +827,13 @@ targetIds: schema: type: string example: usr_00000000-0000-0000-0000-000000000000,usr_11111111-1111-1111-1111-111111111111 +toUserId: + name: toUserId + description: Must be a valid user ID. + required: false + in: query + schema: + $ref: ./schemas/UserID.yaml transactionId: name: transactionId description: Must be a valid transaction ID. @@ -799,28 +847,28 @@ userId: required: true in: path schema: - type: string + $ref: ./schemas/UserID.yaml userIdAdmin: name: userId description: "Target user to see information on, admin-only." required: false in: query schema: - type: string + $ref: ./schemas/UserID.yaml userIdQuery: name: userId description: Filter by UserID. required: false in: query schema: - type: string + $ref: ./schemas/UserID.yaml userNoteId: name: userNoteId description: Must be a valid user note ID. required: true in: path schema: - type: string + $ref: ./schemas/UserNoteID.yaml usernameQuery: name: username description: Filter by Username. @@ -871,4 +919,4 @@ worldId: required: true in: path schema: - type: string + $ref: ./schemas/WorldID.yaml diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index 2e9a6cd6..36663409 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -124,10 +124,18 @@ $ref: "./paths/miscellaneous.yaml#/paths/~1css~1app.css" /economy/licenses/active: $ref: "./paths/economy.yaml#/paths/~1economy~1licenses~1active" +/economy/metrics/earnings: + $ref: "./paths/economy.yaml#/paths/~1economy~1metrics~1earnings" /economy/purchase/listing: $ref: "./paths/economy.yaml#/paths/~1economy~1purchase~1listing" /economy/purchases: $ref: "./paths/economy.yaml#/paths/~1economy~1purchases" +"/economy/purchases/{productPurchaseId}": + $ref: "./paths/economy.yaml#/paths/~1economy~1purchases~1{productPurchaseId}" +"/economy/purchases/{productPurchaseId}/stacks": + $ref: "./paths/economy.yaml#/paths/~1economy~1purchases~1{productPurchaseId}~1stacks" +/economy/seller/eligibility: + $ref: "./paths/economy.yaml#/paths/~1economy~1seller~1eligibility" /economy/store: $ref: "./paths/economy.yaml#/paths/~1economy~1store" /economy/store/shelves: @@ -274,6 +282,8 @@ $ref: "./paths/jams.yaml#/paths/~1jams~1{jamId}" "/jams/{jamId}/submissions": $ref: "./paths/jams.yaml#/paths/~1jams~1{jamId}~1submissions" +"/jams/{jamId}/submissions/{jamSubmissionId}": + $ref: "./paths/jams.yaml#/paths/~1jams~1{jamId}~1submissions~1{jamSubmissionId}" /js/app.js: $ref: "./paths/miscellaneous.yaml#/paths/~1js~1app.js" "/licenseGroups/{licenseGroupId}": @@ -322,6 +332,8 @@ $ref: "./paths/invite.yaml#/paths/~1requestInvite~1{userId}" "/requestInvite/{userId}/photo": $ref: "./paths/invite.yaml#/paths/~1requestInvite~1{userId}~1photo" +/reward/redeem: + $ref: "./paths/inventory.yaml#/paths/~1reward~1redeem" /subscriptions: $ref: "./paths/economy.yaml#/paths/~1subscriptions" /tilia/status: @@ -340,6 +352,8 @@ $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1balance~1earnings" "/user/{userId}/economy/account": $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1economy~1account" +"/user/{userId}/economy/transactions": + $ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1economy~1transactions" "/user/{userId}/friendRequest": $ref: "./paths/friends.yaml#/paths/~1user~1{userId}~1friendRequest" "/user/{userId}/friendStatus": @@ -402,6 +416,8 @@ $ref: "./paths/users.yaml#/paths/~1users~1{userId}~1removeTags" "/users/{userId}/subscription/eligible": $ref: "./paths/economy.yaml#/paths/~1users~1{userId}~1subscription~1eligible" +"/users/{userId}/tutorial": + $ref: "./paths/users.yaml#/paths/~1users~1{userId}~1tutorial" "/users/{userId}/{worldId}/persist": $ref: "./paths/users.yaml#/paths/~1users~1{userId}~1{worldId}~1persist" "/users/{userId}/{worldId}/persist/exists": @@ -420,9 +436,15 @@ $ref: "./paths/worlds.yaml#/paths/~1worlds~1recent" "/worlds/{worldId}": $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}" +"/worlds/{worldId}/addTags": + $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1addTags" "/worlds/{worldId}/metadata": $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1metadata" +"/worlds/{worldId}/platform/{publishedPlatform}": + $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1platform~1{publishedPlatform}" "/worlds/{worldId}/publish": $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1publish" +"/worlds/{worldId}/removeTags": + $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1removeTags" "/worlds/{worldId}/{instanceId}": $ref: "./paths/worlds.yaml#/paths/~1worlds~1{worldId}~1{instanceId}" diff --git a/openapi/components/paths/economy.yaml b/openapi/components/paths/economy.yaml index e0ca1858..8f0ce07d 100644 --- a/openapi/components/paths/economy.yaml +++ b/openapi/components/paths/economy.yaml @@ -117,6 +117,20 @@ paths: $ref: ../responses/economy/LicenseListResponse.yaml "401": $ref: ../responses/MissingCredentialsError.yaml + /economy/metrics/earnings: + get: + operationId: getEarningsMetrics + summary: Get Earnings Metrics + description: Gets earnings totals and breakdown metrics for the currently authenticated user. + tags: + - economy + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/economy/EarningsMetricsResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml /economy/purchase/listing: post: operationId: purchaseProductListing @@ -157,6 +171,52 @@ paths: $ref: ../responses/economy/ProductPurchaseListResponse.yaml "401": $ref: ../responses/MissingCredentialsError.yaml + "/economy/purchases/{productPurchaseId}": + parameters: + - $ref: ../parameters.yaml#/productPurchaseId + get: + operationId: getProductPurchase + summary: Get Product Purchase + description: Gets a single product purchase + tags: + - economy + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/economy/ProductPurchaseResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml + "/economy/purchases/{productPurchaseId}/stacks": + parameters: + - $ref: ../parameters.yaml#/productPurchaseId + get: + operationId: getProductPurchaseStacks + summary: Get Product Purchase Stacks + description: Gets stacks for a product purchase + tags: + - economy + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/economy/ProductPurchaseStacksResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml + /economy/seller/eligibility: + get: + operationId: getSellerEligibility + summary: Get Seller Eligibility + description: Get the eligibility of the currently authenticated user to become a seller + tags: + - economy + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/economy/SellerEligibilityResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml /economy/store: parameters: - $ref: ../parameters.yaml#/storeId @@ -363,6 +423,29 @@ paths: $ref: ../responses/economy/EconomyAccountResponse.yaml "401": $ref: ../responses/MissingCredentialsError.yaml + "/user/{userId}/economy/transactions": + parameters: + - $ref: ../parameters.yaml#/userId + - $ref: ../parameters.yaml#/number + - $ref: ../parameters.yaml#/dateMin + - $ref: ../parameters.yaml#/dateMax + - $ref: ../parameters.yaml#/fromUserId + - $ref: ../parameters.yaml#/toUserId + - $ref: ../parameters.yaml#/sortProductPurchase + - $ref: ../parameters.yaml#/orderShort + get: + operationId: getProductPurchaseHistory + summary: Get Product Purchase History + description: Gets a history of product purchases + tags: + - economy + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/economy/ProductPurchaseHistoryResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml "/user/{userId}/listings": parameters: - $ref: ../parameters.yaml#/userId diff --git a/openapi/components/paths/inventory.yaml b/openapi/components/paths/inventory.yaml index b1e522ae..34121ee1 100644 --- a/openapi/components/paths/inventory.yaml +++ b/openapi/components/paths/inventory.yaml @@ -237,6 +237,26 @@ paths: $ref: ../responses/inventory/InventoryItemNotEquippable.yaml "401": $ref: ../responses/MissingCredentialsError.yaml + /reward/redeem: + post: + operationId: redeemReward + summary: Redeem Reward + description: Redeem a reward for the currently logged in user. + tags: + - inventory + requestBody: + required: true + content: + application/json: + schema: + $ref: ../requests/RewardRedemptionRequest.yaml + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/inventory/RewardRedemptionResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml "/user/{userId}/inventory/{inventoryItemId}": parameters: - $ref: ../parameters.yaml#/userId diff --git a/openapi/components/paths/jams.yaml b/openapi/components/paths/jams.yaml index bd92dcbd..4b5c35ed 100644 --- a/openapi/components/paths/jams.yaml +++ b/openapi/components/paths/jams.yaml @@ -29,7 +29,7 @@ paths: responses: "200": $ref: ../responses/jams/JamListResponse.yaml - /jams/{jamId}: + "/jams/{jamId}": parameters: - $ref: ../parameters.yaml#/jamId get: @@ -45,19 +45,63 @@ paths: $ref: ../responses/jams/JamResponse.yaml "404": $ref: ../responses/jams/JamNotFoundError.yaml - /jams/{jamId}/submissions: + "/jams/{jamId}/submissions": parameters: - $ref: ../parameters.yaml#/jamId get: operationId: getJamSubmissions summary: Show jam submissions - description: Returns all submissions of a jam. + description: Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + tags: + - jams + parameters: + - $ref: ../parameters.yaml#/contentId + - $ref: ../parameters.yaml#/submitterId + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/jams/JamSubmissionListResponse.yaml + "404": + $ref: ../responses/jams/JamNotFoundError.yaml + post: + operationId: submitJamContent + summary: Submit Jam Content + description: Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + tags: + - jams + requestBody: + content: + application/json: + schema: + $ref: ../requests/CreateJamSubmissionRequest.yaml + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/jams/JamSubmissionResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml + "404": + $ref: ../responses/jams/JamNotFoundError.yaml + "/jams/{jamId}/submissions/{jamSubmissionId}": + parameters: + - $ref: ../parameters.yaml#/jamId + - $ref: ../parameters.yaml#/jamSubmissionId + delete: + operationId: deleteJamSubmission + summary: Delete Jam Submission + description: Withdraws a content submission from a jam. tags: - jams security: - authCookie: [] responses: "200": - $ref: ../responses/jams/SubmissionListResponse.yaml + $ref: ../responses/jams/DeleteJamSubmissionResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml + "403": + $ref: ../responses/NoPermission.yaml "404": $ref: ../responses/jams/JamNotFoundError.yaml diff --git a/openapi/components/paths/users.yaml b/openapi/components/paths/users.yaml index 6d6d0b65..c098aee0 100644 --- a/openapi/components/paths/users.yaml +++ b/openapi/components/paths/users.yaml @@ -305,7 +305,7 @@ paths: content: application/json: schema: - $ref: ../schemas/representedGroup.yaml + $ref: ../schemas/RepresentedGroup.yaml "401": $ref: ../responses/MissingCredentialsError.yaml "/users/{userId}/groups/requested": @@ -470,6 +470,22 @@ paths: $ref: ../responses/users/UserTagInvalidError.yaml "401": $ref: ../responses/MissingCredentialsError.yaml + "/users/{userId}/tutorial": + parameters: + - $ref: ../parameters.yaml#/userId + get: + operationId: getUserTutorialStatus + summary: Get User Tutorial Status + description: Gets the status of completed or outstanding tutorials for the specified user. + tags: + - users + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/users/TutorialStatusResponse.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml "/users/{userId}/{worldId}/persist": parameters: - $ref: ../parameters.yaml#/userId diff --git a/openapi/components/paths/worlds.yaml b/openapi/components/paths/worlds.yaml index c31117a6..0563ca8d 100644 --- a/openapi/components/paths/worlds.yaml +++ b/openapi/components/paths/worlds.yaml @@ -202,6 +202,30 @@ paths: $ref: ../responses/MissingCredentialsError.yaml "404": $ref: ../responses/worlds/WorldNotFoundError.yaml + "/worlds/{worldId}/addTags": + parameters: + - $ref: ../parameters.yaml#/worldId + post: + operationId: addWorldTags + summary: Add World Tags + description: Adds tags to the world's profile + tags: + - worlds + requestBody: + required: true + content: + application/json: + schema: + $ref: ../requests/ChangeWorldTagsRequest.yaml + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/worlds/WorldResponse.yaml + "400": + $ref: ../responses/worlds/WorldTagInvalidError.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml "/worlds/{worldId}/metadata": parameters: - $ref: ../parameters.yaml#/worldId @@ -218,6 +242,25 @@ paths: $ref: ../responses/worlds/WorldMetadataResponse.yaml "404": $ref: ../responses/worlds/WorldNotFoundError.yaml + "/worlds/{worldId}/platform/{publishedPlatform}": + parameters: + - $ref: ../parameters.yaml#/worldId + - $ref: ../parameters.yaml#/publishedPlatform + delete: + operationId: deleteWorldPlatform + summary: Delete World Platform + description: Deletes a world platform. + tags: + - worlds + security: + - authCookie: [] + responses: + "200": + description: OK + "401": + $ref: ../responses/MissingCredentialsError.yaml + "404": + $ref: ../responses/worlds/WorldNotFoundError.yaml "/worlds/{worldId}/publish": parameters: - $ref: ../parameters.yaml#/worldId @@ -266,6 +309,30 @@ paths: $ref: ../responses/MissingCredentialsError.yaml "404": $ref: ../responses/worlds/WorldNotFoundError.yaml + "/worlds/{worldId}/removeTags": + parameters: + - $ref: ../parameters.yaml#/worldId + post: + operationId: removeWorldTags + summary: Remove World Tags + description: Removes tags from the world's profile + tags: + - worlds + requestBody: + required: true + content: + application/json: + schema: + $ref: ../requests/ChangeWorldTagsRequest.yaml + security: + - authCookie: [] + responses: + "200": + $ref: ../responses/worlds/WorldResponse.yaml + "400": + $ref: ../responses/worlds/WorldTagInvalidError.yaml + "401": + $ref: ../responses/MissingCredentialsError.yaml "/worlds/{worldId}/{instanceId}": parameters: - $ref: ../parameters.yaml#/worldId diff --git a/openapi/components/requests/ChangeWorldTagsRequest.yaml b/openapi/components/requests/ChangeWorldTagsRequest.yaml new file mode 100644 index 00000000..976551fe --- /dev/null +++ b/openapi/components/requests/ChangeWorldTagsRequest.yaml @@ -0,0 +1,10 @@ +title: ChangeWorldTagsRequest +type: object +properties: + tags: + type: array + description: The tags being added or removed. + items: + $ref: ../schemas/Tag.yaml +required: + - tags diff --git a/openapi/components/requests/CreateJamSubmissionRequest.yaml b/openapi/components/requests/CreateJamSubmissionRequest.yaml new file mode 100644 index 00000000..721a0043 --- /dev/null +++ b/openapi/components/requests/CreateJamSubmissionRequest.yaml @@ -0,0 +1,15 @@ +title: CreateJamSubmissionRequest +type: object +description: Submit content for a Jam. Both content upload by submitter and jam submission itself must be made within the jam's designated times. +properties: + contentId: + type: string + description: The id of the uploaded content (e.g., avatar, world) being submitted. + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + description: + type: string + description: A description of the content being submitted. + example: My awesomely unique avatar for the jam! +required: + - contentId + - description diff --git a/openapi/components/requests/PurchaseProductListingRequest.yaml b/openapi/components/requests/PurchaseProductListingRequest.yaml index b93896a3..3f6b7fe1 100644 --- a/openapi/components/requests/PurchaseProductListingRequest.yaml +++ b/openapi/components/requests/PurchaseProductListingRequest.yaml @@ -1,13 +1,31 @@ title: PurchaseProductListingRequest type: object properties: + contextData: + title: PurchaseContextData + type: object + properties: + locationType: + $ref: ../schemas/ProductPurchaseLocationType.yaml + storeId: + $ref: ../schemas/StoreID.yaml + worldId: + $ref: ../schemas/WorldID.yaml + required: + - locationType listingId: $ref: ../schemas/ProductID.yaml + listingVariantId: + $ref: ../schemas/ProductListingVariantID.yaml quantity: type: integer default: 1 maximum: 99 minimum: 1 + receiverId: + $ref: ../schemas/UserID.yaml + stackable: + type: boolean totalPrice: type: integer minimum: 0 diff --git a/openapi/components/requests/RewardRedemptionRequest.yaml b/openapi/components/requests/RewardRedemptionRequest.yaml new file mode 100644 index 00000000..8a2c853a --- /dev/null +++ b/openapi/components/requests/RewardRedemptionRequest.yaml @@ -0,0 +1,7 @@ +title: RewardRedemptionRequest +type: object +properties: + code: + type: string +required: + - code diff --git a/openapi/components/responses/economy/EarningsMetricsResponse.yaml b/openapi/components/responses/economy/EarningsMetricsResponse.yaml new file mode 100644 index 00000000..fd6e3de9 --- /dev/null +++ b/openapi/components/responses/economy/EarningsMetricsResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single EarningsMetrics object. +content: + application/json: + schema: + $ref: ../../schemas/EarningsMetrics.yaml diff --git a/openapi/components/responses/economy/ProductPurchaseHistoryResponse.yaml b/openapi/components/responses/economy/ProductPurchaseHistoryResponse.yaml new file mode 100644 index 00000000..349e57e0 --- /dev/null +++ b/openapi/components/responses/economy/ProductPurchaseHistoryResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single ProductPurchaseHistory object. +content: + application/json: + schema: + $ref: ../../schemas/ProductPurchaseHistory.yaml diff --git a/openapi/components/responses/economy/ProductPurchaseStacksResponse.yaml b/openapi/components/responses/economy/ProductPurchaseStacksResponse.yaml new file mode 100644 index 00000000..fc4fa4c6 --- /dev/null +++ b/openapi/components/responses/economy/ProductPurchaseStacksResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of stacks for a product purchase. +content: + application/json: + schema: + type: array + items: + type: object diff --git a/openapi/components/responses/economy/SellerEligibilityResponse.yaml b/openapi/components/responses/economy/SellerEligibilityResponse.yaml new file mode 100644 index 00000000..77b54d4c --- /dev/null +++ b/openapi/components/responses/economy/SellerEligibilityResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single SellerEligibility object. +content: + application/json: + schema: + $ref: ../../schemas/SellerEligibility.yaml diff --git a/openapi/components/responses/inventory/RewardRedemptionResponse.yaml b/openapi/components/responses/inventory/RewardRedemptionResponse.yaml new file mode 100644 index 00000000..ed5b358f --- /dev/null +++ b/openapi/components/responses/inventory/RewardRedemptionResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a single RewardRedemptionResult object. +content: + application/json: + schema: + type: array + items: + $ref: ../../schemas/RewardRedemptionResult.yaml diff --git a/openapi/components/responses/jams/DeleteJamSubmissionResponse.yaml b/openapi/components/responses/jams/DeleteJamSubmissionResponse.yaml new file mode 100644 index 00000000..86439f61 --- /dev/null +++ b/openapi/components/responses/jams/DeleteJamSubmissionResponse.yaml @@ -0,0 +1,5 @@ +description: Returns an Success object. +content: + application/json: + schema: + $ref: ../../schemas/Success.yaml diff --git a/openapi/components/responses/jams/JamSubmissionListResponse.yaml b/openapi/components/responses/jams/JamSubmissionListResponse.yaml new file mode 100644 index 00000000..f3e1e219 --- /dev/null +++ b/openapi/components/responses/jams/JamSubmissionListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of JamSubmission objects. +content: + application/json: + schema: + type: array + items: + $ref: ../../schemas/JamSubmission.yaml diff --git a/openapi/components/responses/jams/JamSubmissionResponse.yaml b/openapi/components/responses/jams/JamSubmissionResponse.yaml new file mode 100644 index 00000000..a2f5f654 --- /dev/null +++ b/openapi/components/responses/jams/JamSubmissionResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single JamSubmission object. +content: + application/json: + schema: + $ref: ../../schemas/JamSubmission.yaml diff --git a/openapi/components/responses/jams/SubmissionListResponse.yaml b/openapi/components/responses/jams/SubmissionListResponse.yaml deleted file mode 100644 index 39a0519e..00000000 --- a/openapi/components/responses/jams/SubmissionListResponse.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: Returns a list of Submission objects. -content: - application/json: - schema: - type: array - items: - $ref: ../../schemas/Submission.yaml diff --git a/openapi/components/responses/users/TutorialStatusResponse.yaml b/openapi/components/responses/users/TutorialStatusResponse.yaml new file mode 100644 index 00000000..0043cdfc --- /dev/null +++ b/openapi/components/responses/users/TutorialStatusResponse.yaml @@ -0,0 +1,5 @@ +description: Returns a single TutorialStatus object. +content: + application/json: + schema: + $ref: ../../schemas/TutorialStatus.yaml diff --git a/openapi/components/responses/worlds/WorldTagInvalidError.yaml b/openapi/components/responses/worlds/WorldTagInvalidError.yaml new file mode 100644 index 00000000..d960a2ad --- /dev/null +++ b/openapi/components/responses/worlds/WorldTagInvalidError.yaml @@ -0,0 +1,5 @@ +description: Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. +content: + application/json: + schema: + $ref: ../../schemas/Error.yaml diff --git a/openapi/components/schemas/EarningsMetrics.yaml b/openapi/components/schemas/EarningsMetrics.yaml new file mode 100644 index 00000000..750a963f --- /dev/null +++ b/openapi/components/schemas/EarningsMetrics.yaml @@ -0,0 +1,37 @@ +title: EarningsMetrics +type: object +properties: + breakdown: + type: array + items: + type: object + sellerId: + $ref: ./UserID.yaml + totals: + type: object + properties: + otpEarnings: + type: integer + minimum: 0 + otpPurchaseCount: + type: integer + minimum: 0 + subscriberEarnings: + type: integer + minimum: 0 + subscriberMonths: + type: integer + minimum: 0 + totalEarnings: + type: integer + minimum: 0 + required: + - otpEarnings + - otpPurchaseCount + - subscriberEarnings + - subscriberMonths + - totalEarnings +required: + - breakdown + - sellerId + - totals diff --git a/openapi/components/schemas/FavoriteName.yaml b/openapi/components/schemas/FavoriteName.yaml new file mode 100644 index 00000000..56b6ad89 --- /dev/null +++ b/openapi/components/schemas/FavoriteName.yaml @@ -0,0 +1,8 @@ +title: FavoriteName +type: string +default: group_0 +example: > + avatar: [ avatars1, avatars2, avatars3, avatars4, avatars5, avatars6 ] + friend: [ group_0, group_1, group_2 ] + vrcPlusWorld: [ vrcPlusWorlds1, vrcPlusWorlds2, vrcPlusWorlds3, vrcPlusWorlds4 ] + world: [ worlds1, worlds2, worlds3, worlds4 ] diff --git a/openapi/components/schemas/FavoriteType.yaml b/openapi/components/schemas/FavoriteType.yaml index dda3e351..ad6e0c8f 100644 --- a/openapi/components/schemas/FavoriteType.yaml +++ b/openapi/components/schemas/FavoriteType.yaml @@ -3,5 +3,6 @@ type: string enum: - avatar - friend + - vrcPlusWorld - world default: friend diff --git a/openapi/components/schemas/Jam.yaml b/openapi/components/schemas/Jam.yaml index 8e938f2b..3b1bb2ad 100644 --- a/openapi/components/schemas/Jam.yaml +++ b/openapi/components/schemas/Jam.yaml @@ -6,9 +6,7 @@ properties: type: string minLength: 1 id: - type: string - example: jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9 - minLength: 1 + $ref: ./JamID.yaml isVisible: type: boolean moreInfo: diff --git a/openapi/components/schemas/JamID.yaml b/openapi/components/schemas/JamID.yaml new file mode 100644 index 00000000..01e82379 --- /dev/null +++ b/openapi/components/schemas/JamID.yaml @@ -0,0 +1,3 @@ +title: JamID +type: string +example: jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9 diff --git a/openapi/components/schemas/Submission.yaml b/openapi/components/schemas/JamSubmission.yaml similarity index 69% rename from openapi/components/schemas/Submission.yaml rename to openapi/components/schemas/JamSubmission.yaml index e2685b44..da2c8746 100644 --- a/openapi/components/schemas/Submission.yaml +++ b/openapi/components/schemas/JamSubmission.yaml @@ -1,4 +1,4 @@ -title: Submission +title: JamSubmission type: object description: "" properties: @@ -12,13 +12,9 @@ properties: description: type: string id: - type: string - example: jsub_f01f44fa-89fa-443c-ab4c-7fed9245970f - minLength: 1 + $ref: ../schemas/JamSubmissionID.yaml jamId: - type: string - example: jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9 - minLength: 1 + $ref: ../schemas/JamID.yaml ratingScore: type: integer minimum: 0 diff --git a/openapi/components/schemas/JamSubmissionID.yaml b/openapi/components/schemas/JamSubmissionID.yaml new file mode 100644 index 00000000..6534729b --- /dev/null +++ b/openapi/components/schemas/JamSubmissionID.yaml @@ -0,0 +1,3 @@ +title: JamSubmissionID +type: string +example: jsub_f01f44fa-89fa-443c-ab4c-7fed9245970f diff --git a/openapi/components/schemas/ProductPurchaseHistory.yaml b/openapi/components/schemas/ProductPurchaseHistory.yaml new file mode 100644 index 00000000..79014b6b --- /dev/null +++ b/openapi/components/schemas/ProductPurchaseHistory.yaml @@ -0,0 +1,17 @@ +title: ProductPurchaseHistory +type: object +properties: + endDate: + type: string + format: date-time + startDate: + type: string + format: date-time + transactions: + type: array + items: + $ref: ./ProductPurchaseRecord.yaml +required: + - endDate + - startDate + - transactions diff --git a/openapi/components/schemas/ProductPurchaseLocationType.yaml b/openapi/components/schemas/ProductPurchaseLocationType.yaml new file mode 100644 index 00000000..ee46313c --- /dev/null +++ b/openapi/components/schemas/ProductPurchaseLocationType.yaml @@ -0,0 +1,15 @@ +title: ProductPurchaseLocationType +type: string +enum: + - client_avatar_marketplace + - client_creator_store + - client_group_store + - client_world_component + - client_world_store + - undefined + - web_any + - web_avatar_marketplace + - web_creator_store + - web_group_store + - web_world_store +default: web_group_store diff --git a/openapi/components/schemas/ProductPurchaseRecord.yaml b/openapi/components/schemas/ProductPurchaseRecord.yaml new file mode 100644 index 00000000..f891b9bb --- /dev/null +++ b/openapi/components/schemas/ProductPurchaseRecord.yaml @@ -0,0 +1,49 @@ +title: ProductPurchaseRecord +type: object +properties: + amount: + type: integer + example: 399 + balance: + type: integer + example: 399 + date: + type: string + format: date-time + fromUserDisplayName: + type: string + example: VRChat + listingDisplayName: + type: string + example: Lucky Red Envelope + listingType: + $ref: ./ProductListingType.yaml + platform: + type: string + description: Where (first- or third-party) the purchase was made + example: VRChat + purchaseId: + $ref: ./ProductPurchaseID.yaml + reason: + type: integer + example: 3002 + reasonLabel: + type: string + example: Promo Credit + transactionId: + type: integer + transactionLineId: + type: integer +required: + - amount + - balance + - date + - fromUserDisplayName + - listingDisplayName + - listingType + - platform + - purchaseId + - reason + - reasonLabel + - transactionId + - transactionLineId diff --git a/openapi/components/schemas/representedGroup.yaml b/openapi/components/schemas/RepresentedGroup.yaml similarity index 100% rename from openapi/components/schemas/representedGroup.yaml rename to openapi/components/schemas/RepresentedGroup.yaml diff --git a/openapi/components/schemas/RewardBadge.yaml b/openapi/components/schemas/RewardBadge.yaml new file mode 100644 index 00000000..fb1d26fd --- /dev/null +++ b/openapi/components/schemas/RewardBadge.yaml @@ -0,0 +1,41 @@ +title: RewardBadge +type: object +properties: + createdAt: + type: string + format: date-time + createdBy: + $ref: ./UserID.yaml + description: + type: string + fileName: + type: string + hidden: + type: boolean + id: + $ref: ./BadgeID.yaml + imageUrl: + type: string + isLocalizationEnabled: + type: boolean + machineName: + type: string + name: + type: string + type: + type: string + updatedAt: + type: string + format: date-time +required: + - createdAt + - createdBy + - description + - fileName + - hidden + - id + - imageUrl + - isLocalizationEnabled + - name + - type + - updatedAt diff --git a/openapi/components/schemas/RewardRedemption.yaml b/openapi/components/schemas/RewardRedemption.yaml new file mode 100644 index 00000000..d039c5d5 --- /dev/null +++ b/openapi/components/schemas/RewardRedemption.yaml @@ -0,0 +1,16 @@ +title: RewardRedemptionResult +type: object +properties: + data: + type: object + properties: + badge: + $ref: ./RewardBadge.yaml + item: + $ref: ./InventoryTemplate.yaml + type: + type: string + description: One of `badge`, `item`, ... +required: + - data + - type diff --git a/openapi/components/schemas/RewardRedemptionResult.yaml b/openapi/components/schemas/RewardRedemptionResult.yaml new file mode 100644 index 00000000..6d295881 --- /dev/null +++ b/openapi/components/schemas/RewardRedemptionResult.yaml @@ -0,0 +1,12 @@ +title: RewardRedemptionResult +type: object +properties: + redeemedRewards: + type: array + items: + $ref: ./RewardRedemption.yaml + redemptionCode: + type: string +required: + - redeemedRewards + - redemptionCode diff --git a/openapi/components/schemas/SellerEligibility.yaml b/openapi/components/schemas/SellerEligibility.yaml new file mode 100644 index 00000000..161896b9 --- /dev/null +++ b/openapi/components/schemas/SellerEligibility.yaml @@ -0,0 +1,7 @@ +title: SellerEligibility +type: object +properties: + eligible: + type: boolean +required: + - eligible diff --git a/openapi/components/schemas/TutorialKey.yaml b/openapi/components/schemas/TutorialKey.yaml new file mode 100644 index 00000000..43e95274 --- /dev/null +++ b/openapi/components/schemas/TutorialKey.yaml @@ -0,0 +1,5 @@ +title: TutorialKey +type: string +description: "The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value." +default: undefined:undefined:v1 +example: standalonewindows:steam:v1 diff --git a/openapi/components/schemas/TutorialStatus.yaml b/openapi/components/schemas/TutorialStatus.yaml new file mode 100644 index 00000000..5ddf6299 --- /dev/null +++ b/openapi/components/schemas/TutorialStatus.yaml @@ -0,0 +1,18 @@ +title: TutorialStatus +type: object +properties: + completed: + type: boolean + completedAnyTutorial: + type: boolean + completedTutorials: + type: array + items: + $ref: ./TutorialKey.yaml + tutorialKey: + $ref: ./TutorialKey.yaml +required: + - completed + - completedAnyTutorial + - completedTutorials + - tutorialKey