{"openapi":"3.0.1","info":{"title":"My Project","description":"This is a swagger-ui for midwayjs project","version":"1.0.0","contact":{}},"tags":[{"name":"Msg Archive","description":""},{"name":"Msg Read","description":""},{"name":"Msg Send","description":""},{"name":"Msg Delete","description":""},{"name":"Queue Create","description":""},{"name":"Queue Drop","description":""},{"name":"Queue Get","description":""},{"name":"Queue Metrics","description":""}],"servers":[],"components":{"schemas":{"MsgArchiveDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgId":{"example":1,"description":"","type":"string"}}},"MsgArchiveBatchDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgIds":{"example":[1,2],"description":"","type":"Array"}}},"MsgReadDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"vt":{"example":1,"description":"消息读取后延迟可见时间(秒)","default":1,"type":"number"}}},"MessageDto":{"type":"object","properties":{"msgId":{"example":"1","description":"消息id","type":"string"},"message":{"example":{"foo":"bar"},"description":"消息内容","type":"object"},"enqueuedAt":{"example":"2024-07-01T00:00:00.000Z","description":"入队时间","type":"string"},"readCt":{"example":1,"description":"读取次数","type":"number"},"vt":{"example":"2024-07-01T00:00:01.000Z","description":"消息可见时间","type":"string"}}},"MsgReadWithPollDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"vt":{"example":1,"description":"消息读取后延迟可见时间(秒)","default":1,"type":"number"},"qty":{"example":2,"description":"读取数量","default":1,"type":"number"},"maxPollSeconds":{"example":5,"description":"最大轮询时间(秒)","default":5,"type":"number"},"pollIntervalMs":{"example":100,"description":"轮询间隔时间(毫秒)","default":100,"type":"number"}}},"MsgReadBatchDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"vt":{"example":1,"description":"消息读取后延迟可见时间(秒)","default":1,"type":"number"},"qty":{"example":2,"description":"读取数量","default":1,"type":"number"}}},"MsgSetVtDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgId":{"example":1,"description":"","type":"string"},"vt":{"example":2,"description":"消息延迟可见秒数","type":"number"}}},"MsgSendDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msg":{"example":{"foo":"bar"},"description":"消息内容","type":"object"},"delay":{"example":0,"description":"消息延迟可见时间(秒)","default":0,"type":"number"}}},"MsgSendBatchDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgs":{"example":[{"id":1},{"id":2}],"description":"消息内容","type":"Array"},"delay":{"example":0,"description":"消息延迟可见时间(秒)","default":0,"type":"number"}}},"MsgPopDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"}}},"MsgDeleteDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgId":{"example":1,"description":"","type":"string"}}},"MsgDeleteBatchDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"msgIds":{"example":[1,2],"description":"","type":"Array"}}},"CommonQueueDto":{"type":"object","properties":{"name":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"}}},"QueueDto":{"type":"object","properties":{"name":{"example":"my_queue","description":"队列名","type":"string"},"isPartitioned":{"example":false,"description":"是否分区","type":"boolean"},"isUnlogged":{"example":false,"description":"是否无日志","type":"boolean"},"createdAt":{"example":"2021-01-01T00:00:00.000Z","description":"创建时间","type":"string"}}},"QueueMetricsDto":{"type":"object","properties":{"queue":{"example":"my_queue","description":"队列名, Maximum 60 characters; alphanumeric characters, underscores (_) are allowed.","type":"string"},"queueLength":{"example":"10","description":"队列中消息数量","type":"string"},"newestMsgAgeSec":{"example":1,"description":"最新消息年龄(秒)","type":"object"},"oldestMsgAgeSec":{"example":300,"description":"最旧消息年龄(秒)","type":"object"},"totalMessages":{"example":"100","description":"队列接受消息总数","type":"string"},"scrapeTime":{"example":"2021-01-01T00:00:00.000Z","description":"抓取时间","type":"string"}}}}},"paths":{"/pgmq/msg/archive":{"post":{"operationId":"msgarchivecontroller_archive","tags":["Msg Archive"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgArchiveDto"}}}},"parameters":[],"responses":{"default":{"description":"归档消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/msg/archive_batch":{"post":{"operationId":"msgarchivecontroller_archivebatch","tags":["Msg Archive"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgArchiveBatchDto"}}}},"parameters":[],"responses":{"default":{"description":"批量删除消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/msg/read":{"post":{"operationId":"msgcontroller_read","tags":["Msg Read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgReadDto"}}}},"parameters":[],"responses":{"default":{"description":"读取单条消息","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}}}}},"/pgmq/msg/read_with_poll":{"post":{"operationId":"msgcontroller_readwithpoll","tags":["Msg Read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgReadWithPollDto"}}}},"parameters":[],"responses":{"default":{"description":"读取消息(轮询)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageDto"}}}}}}}},"/pgmq/msg/read_batch":{"post":{"operationId":"msgcontroller_readbatch","tags":["Msg Read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgReadBatchDto"}}}},"parameters":[],"responses":{"default":{"description":"批量读取消息","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageDto"}}}}}}}},"/pgmq/msg/set_vt":{"post":{"operationId":"msgcontroller_setvt","tags":["Msg Read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgSetVtDto"}}}},"parameters":[],"responses":{"default":{"description":"设置消息可见时间","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}}}}},"/pgmq/msg/send":{"post":{"operationId":"msgsendcontroller_send","tags":["Msg Send"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgSendDto"}}}},"parameters":[],"responses":{"default":{"description":"发送消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/msg/send_batch":{"post":{"operationId":"msgsendcontroller_sendbatch","tags":["Msg Send"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgSendBatchDto"}}}},"parameters":[],"responses":{"default":{"description":"批量发送消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/msg/pop":{"post":{"operationId":"msgdeletecontroller_pop","tags":["Msg Delete"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgPopDto"}}}},"parameters":[],"responses":{"default":{"description":"弹出消息","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}}}}},"/pgmq/msg/delete":{"post":{"operationId":"msgdeletecontroller_delete","tags":["Msg Delete"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgDeleteDto"}}}},"parameters":[],"responses":{"default":{"description":"删除消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/msg/delete_batch":{"post":{"operationId":"msgdeletecontroller_deletebatch","tags":["Msg Delete"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgDeleteBatchDto"}}}},"parameters":[],"responses":{"default":{"description":"批量删除消息","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/create":{"post":{"operationId":"queuecreatecontroller_create","tags":["Queue Create"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonQueueDto"}}}},"parameters":[],"responses":{"default":{"description":"新建队列","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/create_unlogged":{"post":{"operationId":"queuecreatecontroller_createunlogged","tags":["Queue Create"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonQueueDto"}}}},"parameters":[],"responses":{"default":{"description":"新建无日志队列","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/drop":{"post":{"operationId":"queuedropcontroller_drop","tags":["Queue Drop"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonQueueDto"}}}},"parameters":[],"responses":{"default":{"description":"删除队列","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/purge":{"post":{"operationId":"queuedropcontroller_purge","tags":["Queue Drop"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonQueueDto"}}}},"parameters":[],"responses":{"default":{"description":"清空队列, 返回清空的消息数","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/detach_archive":{"post":{"operationId":"queuedropcontroller_detacharchive","tags":["Queue Drop"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonQueueDto"}}}},"parameters":[],"responses":{"default":{"description":"分离归档","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/has_queue/{name}":{"get":{"operationId":"queuegetcontroller_hasqueue","tags":["Queue Get"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"队列是否存在","content":{"text/plan":{"schema":{"type":"object"}}}}}}},"/pgmq/queue/get_one/{name}":{"get":{"operationId":"queuegetcontroller_getone","tags":["Queue Get"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"获取指定队列信息","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueDto"}}}}}}},"/pgmq/queue/list":{"get":{"operationId":"queuegetcontroller_list","tags":["Queue Get"],"parameters":[],"responses":{"default":{"description":"获取队列列表","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueueDto"}}}}}}}},"/pgmq/queue/metrics/{name}":{"get":{"operationId":"queuemetricscontroller_metrics","tags":["Queue Metrics"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"队列指标","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueMetricsDto"}}}}}}},"/pgmq/queue/metrics_all":{"get":{"operationId":"queuemetricscontroller_metricsall","tags":["Queue Metrics"],"parameters":[],"responses":{"default":{"description":"所有队列指标","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueueMetricsDto"}}}}}}}}}}