Skip to content

Commit 001b64f

Browse files
VinyarionHyarmendacilariesclarkjellejurre
authored
Miscellaneous 5 (#534)
* Miscellaneous enhancements and fixes Addresses #202, #480, #489, #495, #497, and #498 Merge TwoFactorAuthCode and TwoFactorEmailCode schemas into TwoFactorCode Better document and type-limit properties for CalendarEvent Add `GET /calendar/{groupId}/next` Add `GET /inventory/collections` Fix `GET /user/{userId}/inventory/{inventoryItemId}` having incorrect path and being absent from paths.yaml Moderation Reports: Add `GET /moderationReports` Add `POST /moderationReports` Add `DELETE /moderationReports/<modReportId>` Notification V2: Add `GET /notifications` Add `DELETE /notifications` Add `GET /notifications/{notificationId}` Add `DELETE /notifications/{notificationId}` Add `POST /notifications/{notificationId}/reply` Add `POST /notifications/{notificationId}/respond` Add `POST /notifications/{notificationId}/see` * Unmerge TwoFactorAuthCode and TwoFactorEmailCode from TwoFactorCode * lint 1 * lint 2 * Updated Moderation Report schemas + content filter tags, added UpdateUserRequest.hasSharedConnectionsOptOut for opting out of Mutuals feature * lint 3 * lint 4 * lint 5 * lint 6 * lint 7 i swear if it misses something one more time * Create proper responses * Identify Get NotificationV2 as requiring admin credentials --------- Co-authored-by: Aries <me@ariesclark.com> Co-authored-by: jellejurre <jelle@jilles.com>
1 parent 08f82f1 commit 001b64f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+808
-40
lines changed

openapi/components/parameters.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,14 @@ licenseGroupId:
496496
in: path
497497
schema:
498498
type: string
499+
limit:
500+
name: limit
501+
description: The maximum number of entries to get.
502+
required: false
503+
in: query
504+
schema:
505+
type: integer
506+
example: 100
499507
maxUnityVersion:
500508
name: maxUnityVersion
501509
description: The maximum Unity version supported by the asset.
@@ -517,6 +525,34 @@ minUnityVersion:
517525
in: query
518526
schema:
519527
type: string
528+
moderationReportId:
529+
name: moderationReportId
530+
description: The moderation report id.
531+
required: true
532+
in: path
533+
schema:
534+
$ref: ./schemas/ModerationReportID.yaml
535+
moderationReportStatus:
536+
name: status
537+
description: "Filter for moderation reports. One of: `closed`..."
538+
required: false
539+
in: query
540+
schema:
541+
type: string
542+
moderationReportType:
543+
name: type
544+
description: "Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`..."
545+
required: false
546+
in: query
547+
schema:
548+
type: string
549+
moderationReportingUserId:
550+
name: reportingUserId
551+
description: Filter for moderation reports.
552+
required: false
553+
in: query
554+
schema:
555+
$ref: ./schemas/UserID.yaml
520556
monthDate:
521557
name: date
522558
description: The month to search in.

openapi/components/paths.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
$ref: "./paths/calendar.yaml#/paths/~1calendar~1{groupId}"
105105
"/calendar/{groupId}/event":
106106
$ref: "./paths/calendar.yaml#/paths/~1calendar~1{groupId}~1event"
107+
"/calendar/{groupId}/next":
108+
$ref: "./paths/calendar.yaml#/paths/~1calendar~1{groupId}~1next"
107109
"/calendar/{groupId}/{calendarId}":
108110
$ref: "./paths/calendar.yaml#/paths/~1calendar~1{groupId}~1{calendarId}"
109111
"/calendar/{groupId}/{calendarId}.ics":
@@ -228,6 +230,8 @@
228230
$ref: "./paths/inventory.yaml#/paths/~1inventory~1cloning~1direct"
229231
/inventory/cloning/pedestal:
230232
$ref: "./paths/inventory.yaml#/paths/~1inventory~1cloning~1pedestal"
233+
/inventory/collections:
234+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1collections"
231235
/inventory/drops:
232236
$ref: "./paths/inventory.yaml#/paths/~1inventory~1drops"
233237
/inventory/spawn:
@@ -268,6 +272,20 @@
268272
$ref: "./paths/invite.yaml#/paths/~1message~1{userId}~1{messageType}"
269273
"/message/{userId}/{messageType}/{slot}":
270274
$ref: "./paths/invite.yaml#/paths/~1message~1{userId}~1{messageType}~1{slot}"
275+
/moderationReports:
276+
$ref: "./paths/authentication.yaml#/paths/~1moderationReports"
277+
"/moderationReports/{moderationReportId}":
278+
$ref: "./paths/authentication.yaml#/paths/~1moderationReports~1{moderationReportId}"
279+
/notifications:
280+
$ref: "./paths/notifications.yaml#/paths/~1notifications"
281+
"/notifications/{notificationId}":
282+
$ref: "./paths/notifications.yaml#/paths/~1notifications~1{notificationId}"
283+
"/notifications/{notificationId}/reply":
284+
$ref: "./paths/notifications.yaml#/paths/~1notifications~1{notificationId}~1reply"
285+
"/notifications/{notificationId}/respond":
286+
$ref: "./paths/notifications.yaml#/paths/~1notifications~1{notificationId}~1respond"
287+
"/notifications/{notificationId}/see":
288+
$ref: "./paths/notifications.yaml#/paths/~1notifications~1{notificationId}~1see"
271289
/permissions:
272290
$ref: "./paths/miscellaneous.yaml#/paths/~1permissions"
273291
"/permissions/{permissionId}":
@@ -308,6 +326,8 @@
308326
$ref: "./paths/friends.yaml#/paths/~1user~1{userId}~1friendRequest"
309327
"/user/{userId}/friendStatus":
310328
$ref: "./paths/friends.yaml#/paths/~1user~1{userId}~1friendStatus"
329+
"/user/{userId}/inventory/{inventoryItemId}":
330+
$ref: "./paths/inventory.yaml#/paths/~1user~1{userId}~1inventory~1{inventoryItemId}"
311331
"/user/{userId}/listings":
312332
$ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1listings"
313333
"/user/{userId}/tilia/tos":

openapi/components/paths/authentication.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,66 @@ paths:
339339
$ref: ../responses/authentication/LogoutSuccess.yaml
340340
"401":
341341
$ref: ../responses/MissingCredentialsError.yaml
342+
/moderationReports:
343+
get:
344+
operationId: getModerationReports
345+
summary: Get Moderation Reports
346+
description: Get submitted moderation reports
347+
tags:
348+
- authentication
349+
parameters:
350+
- $ref: ../parameters.yaml#/offset
351+
- $ref: ../parameters.yaml#/number
352+
- $ref: ../parameters.yaml#/moderationReportingUserId
353+
- $ref: ../parameters.yaml#/moderationReportStatus
354+
- $ref: ../parameters.yaml#/moderationReportType
355+
security:
356+
- authCookie: []
357+
responses:
358+
"200":
359+
$ref: ../responses/authentication/ModerationReportListResponse.yaml
360+
"401":
361+
$ref: ../responses/MissingCredentialsError.yaml
362+
"403":
363+
$ref: ../responses/InvalidAdminCredentialsError.yaml
364+
post:
365+
operationId: submitModerationReport
366+
summary: Submit Moderation Report
367+
description: Submit a moderation report
368+
tags:
369+
- authentication
370+
requestBody:
371+
required: true
372+
content:
373+
application/json:
374+
examples: {}
375+
schema:
376+
$ref: ../requests/SubmitModerationReportRequest.yaml
377+
security:
378+
- authCookie: []
379+
responses:
380+
"200":
381+
$ref: ../responses/authentication/ModerationReportResponse.yaml
382+
"401":
383+
$ref: ../responses/MissingCredentialsError.yaml
384+
"/moderationReports/{moderationReportId}":
385+
delete:
386+
operationId: deleteModerationReport
387+
summary: Delete Moderation Report
388+
description: Delete a moderation report
389+
tags:
390+
- authentication
391+
parameters:
392+
- $ref: ../parameters.yaml#/moderationReportId
393+
security:
394+
- authCookie: []
395+
responses:
396+
"200":
397+
$ref: ../responses/authentication/DeleteModerationReportResponse.yaml
398+
"401":
399+
$ref: ../responses/MissingCredentialsError.yaml
400+
"403":
401+
$ref: ../responses/InvalidAdminCredentialsError.yaml
342402
"/users/{userId}/delete":
343403
parameters:
344404
- $ref: ../parameters.yaml#/userId

openapi/components/paths/calendar.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,30 @@ paths:
146146
responses:
147147
"200":
148148
$ref: ../responses/calendar/CalendarEventResponse.yaml
149+
"400":
150+
$ref: ../responses/calendar/CalendarOperationError.yaml
149151
"401":
150152
$ref: ../responses/MissingCredentialsError.yaml
153+
"403":
154+
$ref: ../responses/calendar/CalendarOperationError.yaml
155+
"/calendar/{groupId}/next":
156+
get:
157+
operationId: getGroupNextCalendarEvent
158+
summary: Get next calendar event
159+
description: Get the closest future calendar event scheduled for a group
160+
tags:
161+
- calendar
162+
parameters:
163+
- $ref: ../parameters.yaml#/groupId
164+
security:
165+
- authCookie: []
166+
responses:
167+
"200":
168+
$ref: ../responses/calendar/CalendarEventResponse.yaml
169+
"401":
170+
$ref: ../responses/MissingCredentialsError.yaml
171+
"404":
172+
$ref: ../responses/calendar/CalendarEventNotFoundError.yaml
151173
"/calendar/{groupId}/{calendarId}":
152174
delete:
153175
operationId: deleteGroupCalendarEvent
@@ -165,6 +187,8 @@ paths:
165187
$ref: ../responses/calendar/DeleteCalendarEventSuccess.yaml
166188
"401":
167189
$ref: ../responses/MissingCredentialsError.yaml
190+
"404":
191+
$ref: ../responses/calendar/CalendarEventNotFoundError.yaml
168192
get:
169193
operationId: getGroupCalendarEvent
170194
summary: Get a calendar event
@@ -197,7 +221,7 @@ paths:
197221
"401":
198222
$ref: ../responses/MissingCredentialsError.yaml
199223
"404":
200-
$ref: ../responses/calendar/ICSNotFoundError.yaml
224+
$ref: ../responses/calendar/CalendarEventNotFoundError.yaml
201225
"/calendar/{groupId}/{calendarId}/event":
202226
parameters:
203227
- $ref: ../parameters.yaml#/groupId

openapi/components/paths/inventory.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ paths:
7272
$ref: ../responses/inventory/InventorySpawnResponse.yaml
7373
"401":
7474
$ref: ../responses/MissingCredentialsError.yaml
75+
/inventory/collections:
76+
get:
77+
operationId: getInventoryCollections
78+
summary: List Inventory Collections
79+
description: Returns a list of collection names.
80+
tags:
81+
- inventory
82+
security:
83+
- authCookie: []
84+
responses:
85+
"200":
86+
$ref: ../responses/inventory/InventoryCollectionsResponse.yaml
87+
"401":
88+
$ref: ../responses/MissingCredentialsError.yaml
7589
/inventory/drops:
7690
parameters:
7791
- $ref: ../parameters.yaml#/active
@@ -223,7 +237,7 @@ paths:
223237
$ref: ../responses/inventory/InventoryItemNotEquippable.yaml
224238
"401":
225239
$ref: ../responses/MissingCredentialsError.yaml
226-
"/users/{userId}/inventory/{inventoryItemId}":
240+
"/user/{userId}/inventory/{inventoryItemId}":
227241
parameters:
228242
- $ref: ../parameters.yaml#/userId
229243
- $ref: ../parameters.yaml#/inventoryItemId

openapi/components/paths/notifications.yaml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,143 @@ paths:
127127
$ref: ../responses/notifications/NotificationResponse.yaml
128128
"401":
129129
$ref: ../responses/MissingCredentialsError.yaml
130+
/notifications:
131+
delete:
132+
operationId: deleteAllNotificationV2s
133+
summary: Delete All NotificationV2s
134+
description: Delete all of the current user's notifications.
135+
tags:
136+
- notifications
137+
security:
138+
- authCookie: []
139+
responses:
140+
"200":
141+
$ref: ../responses/notifications/ClearNotificationsV2Success.yaml
142+
"401":
143+
$ref: ../responses/MissingCredentialsError.yaml
144+
get:
145+
operationId: getNotificationV2s
146+
summary: List NotificationV2s
147+
description: Retrieve all of the current user's notifications.
148+
tags:
149+
- notifications
150+
parameters:
151+
- $ref: ../parameters.yaml#/limit
152+
security:
153+
- authCookie: []
154+
responses:
155+
"200":
156+
$ref: ../responses/notifications/NotificationV2ListResponse.yaml
157+
"401":
158+
$ref: ../responses/MissingCredentialsError.yaml
159+
"/notifications/{notificationId}":
160+
parameters:
161+
- $ref: ../parameters.yaml#/notificationId
162+
get:
163+
operationId: getNotificationV2
164+
deprecated: true
165+
summary: Get NotificationV2
166+
description: Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users.
167+
tags:
168+
- notifications
169+
security:
170+
- authCookie: []
171+
responses:
172+
"200":
173+
$ref: ../responses/notifications/NotificationV2Response.yaml
174+
"401":
175+
$ref: ../responses/MissingCredentialsError.yaml
176+
"403":
177+
$ref: ../responses/InvalidAdminCredentialsError.yaml
178+
"404":
179+
$ref: ../responses/notifications/NotificationNotFoundError.yaml
180+
delete:
181+
operationId: deleteNotificationV2
182+
summary: Delete NotificationV2
183+
description: Delete a specific notification
184+
tags:
185+
- notifications
186+
security:
187+
- authCookie: []
188+
responses:
189+
"200":
190+
$ref: ../responses/notifications/ClearNotificationV2Success.yaml
191+
"400":
192+
$ref: ../responses/notifications/NotificationOperationError.yaml
193+
"401":
194+
$ref: ../responses/MissingCredentialsError.yaml
195+
"404":
196+
$ref: ../responses/notifications/NotificationNotFoundError.yaml
197+
"/notifications/{notificationId}/reply":
198+
parameters:
199+
- $ref: ../parameters.yaml#/notificationId
200+
post:
201+
operationId: replyNotificationV2
202+
summary: Reply NotificationV2
203+
description: Reply to a specific notification
204+
tags:
205+
- notifications
206+
requestBody:
207+
required: true
208+
content:
209+
application/json:
210+
schema:
211+
$ref: ../requests/ReplyNotificationV2Request.yaml
212+
security:
213+
- authCookie: []
214+
responses:
215+
"200":
216+
$ref: ../responses/notifications/NotificationV2Response.yaml
217+
"400":
218+
$ref: ../responses/notifications/NotificationOperationError.yaml
219+
"401":
220+
$ref: ../responses/MissingCredentialsError.yaml
221+
"404":
222+
$ref: ../responses/notifications/NotificationNotFoundError.yaml
223+
"/notifications/{notificationId}/respond":
224+
parameters:
225+
- $ref: ../parameters.yaml#/notificationId
226+
post:
227+
operationId: respondNotificationV2
228+
summary: Respond NotificationV2
229+
description: Respond to a specific notification
230+
tags:
231+
- notifications
232+
requestBody:
233+
required: true
234+
content:
235+
application/json:
236+
schema:
237+
$ref: ../requests/RespondNotificationV2Request.yaml
238+
security:
239+
- authCookie: []
240+
responses:
241+
"200":
242+
$ref: ../responses/notifications/NotificationV2Response.yaml
243+
"400":
244+
$ref: ../responses/notifications/NotificationOperationError.yaml
245+
"401":
246+
$ref: ../responses/MissingCredentialsError.yaml
247+
"404":
248+
$ref: ../responses/notifications/NotificationNotFoundError.yaml
249+
"/notifications/{notificationId}/see":
250+
parameters:
251+
- $ref: ../parameters.yaml#/notificationId
252+
post:
253+
operationId: acknowledgeNotificationV2
254+
summary: Acknowledge NotificationV2
255+
description: Acknowledge a specific notification
256+
tags:
257+
- notifications
258+
security:
259+
- authCookie: []
260+
responses:
261+
"200":
262+
$ref: ../responses/notifications/NotificationV2Response.yaml
263+
"401":
264+
$ref: ../responses/MissingCredentialsError.yaml
265+
"404":
266+
$ref: ../responses/notifications/NotificationNotFoundError.yaml
130267
components:
131268
securitySchemes:
132269
$ref: ../securitySchemes.yaml

0 commit comments

Comments
 (0)