[api] fix various issues with inventions

This commit is contained in:
Devin Zuczek
2026-10-02 13:43:48 -04:00
parent 6167925ee0
commit a2f4e4959e
4 changed files with 357 additions and 69 deletions
+7 -2
View File
@@ -567,7 +567,7 @@ export const InventionV9Dto = z.object({
Name: z.string(),
Description: z.string(),
ImageName: z.string(),
UgcVersion: z.int().describe('The UGC format the blob was written in; 0 when unsent'),
UgcVersion: z.int().describe('The UGC format the blob was written in; 1 when the save named none'),
CurrentVersionNumber: z.int(),
LatestVersionNumber: z.int().describe('The same as CurrentVersionNumber on a fresh save'),
Accessibility: z.int(),
@@ -760,7 +760,7 @@ export const PublishInventionRequest = z.object({
.int()
.nullable()
.optional()
.describe('Private 0, Public 1, Unlisted 2. Unlisted stays out of browse and search'),
.describe('Public 1 publishes it into the store; Unlisted 2 publishes it but keeps it out of search and the feeds'),
Price: z
.int()
.nullable()
@@ -771,6 +771,11 @@ export const PublishInventionRequest = z.object({
),
})
/** `POST /api/inventions/v2/unpublish` JSON body — the id and nothing else. */
export const UnpublishInventionRequest = z.object({
InventionId: z.int().describe('The invention to unpublish; the caller must have created it'),
})
/** `POST /api/inventions/v2/delete` JSON body — the id and nothing else. */
export const DeleteInventionRequest = z.object({
InventionId: z.int().describe('The invention to delete; the caller must have created it'),