fix API schema for admin/queue/jobs endpoint
This commit is contained in:
parent
cad059f039
commit
c3ae0c7e8c
3 changed files with 73 additions and 1 deletions
|
|
@ -14,6 +14,76 @@ export const meta = {
|
|||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
kind: 'read:admin:queue',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
nullable: false, optional: false,
|
||||
items: {
|
||||
type: 'object',
|
||||
nullable: false, optional: false,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
data: {
|
||||
type: 'object',
|
||||
nullable: true, optional: true,
|
||||
additionalProperties: true,
|
||||
},
|
||||
opts: {
|
||||
type: 'object',
|
||||
nullable: false, optional: false,
|
||||
additionalProperties: true,
|
||||
},
|
||||
timestamp: {
|
||||
type: 'number',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
processedOn: {
|
||||
type: 'number',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
processedBy: {
|
||||
type: 'string',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
finishedOn: {
|
||||
type: 'number',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
progress: {},
|
||||
attempts: {
|
||||
type: 'number',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
delay: {
|
||||
type: 'number',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
failedReason: {
|
||||
type: 'string',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
stackTrace: {
|
||||
type: 'array',
|
||||
nullable: false, optional: true,
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
returnValue: {},
|
||||
isFailed: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ import type {
|
|||
AdminQueueDeliverDelayedResponse,
|
||||
AdminQueueInboxDelayedResponse,
|
||||
AdminQueueJobsRequest,
|
||||
AdminQueueJobsResponse,
|
||||
AdminQueuePromoteJobsRequest,
|
||||
AdminQueueQueueStatsRequest,
|
||||
AdminQueueRemoveJobRequest,
|
||||
|
|
@ -739,7 +740,7 @@ export type Endpoints = {
|
|||
'admin/queue/clear': { req: AdminQueueClearRequest; res: EmptyResponse };
|
||||
'admin/queue/deliver-delayed': { req: EmptyRequest; res: AdminQueueDeliverDelayedResponse };
|
||||
'admin/queue/inbox-delayed': { req: EmptyRequest; res: AdminQueueInboxDelayedResponse };
|
||||
'admin/queue/jobs': { req: AdminQueueJobsRequest; res: EmptyResponse };
|
||||
'admin/queue/jobs': { req: AdminQueueJobsRequest; res: AdminQueueJobsResponse };
|
||||
'admin/queue/promote-jobs': { req: AdminQueuePromoteJobsRequest; res: EmptyResponse };
|
||||
'admin/queue/queue-stats': { req: AdminQueueQueueStatsRequest; res: EmptyResponse };
|
||||
'admin/queue/queues': { req: EmptyRequest; res: EmptyResponse };
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ export type AdminQueueClearRequest = operations['admin___queue___clear']['reques
|
|||
export type AdminQueueDeliverDelayedResponse = operations['admin___queue___deliver-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueueInboxDelayedResponse = operations['admin___queue___inbox-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueueJobsRequest = operations['admin___queue___jobs']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueJobsResponse = operations['admin___queue___jobs']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueuePromoteJobsRequest = operations['admin___queue___promote-jobs']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueQueueStatsRequest = operations['admin___queue___queue-stats']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueRemoveJobRequest = operations['admin___queue___remove-job']['requestBody']['content']['application/json'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue