Add agenda service and submit api

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-02-06 18:32:46 +08:00
parent b2f216f1bd
commit c9e987e2ba
30 changed files with 1228 additions and 365 deletions

View File

@@ -42,6 +42,20 @@ definitions:
username:
type: string
type: object
service_agenda.SubmitData:
properties:
description:
type: string
event_id:
type: string
name:
type: string
type: object
service_agenda.SubmitResponse:
properties:
agenda_id:
type: string
type: object
service_auth.ExchangeData:
properties:
client_id:
@@ -205,6 +219,53 @@ info:
title: NixCN CMS API
version: "1.0"
paths:
/agenda/submit:
post:
consumes:
- application/json
description: Creates a new agenda item for a specific attendance record.
parameters:
- description: Agenda Submission Data
in: body
name: body
required: true
schema:
$ref: '#/definitions/service_agenda.SubmitData'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_agenda.SubmitResponse'
type: object
"400":
description: Invalid Input
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"500":
description: Internal Server Error
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
security:
- ApiKeyAuth: []
summary: Submit Agenda
tags:
- Agenda
/auth/exchange:
post:
consumes:
@@ -218,11 +279,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_auth.ExchangeData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -278,11 +334,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_auth.MagicData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -403,11 +454,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_auth.RefreshData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -463,11 +509,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_auth.TokenData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -520,11 +561,6 @@ paths:
name: event_id
required: true
type: string
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -588,6 +624,11 @@ paths:
name: X-Api-Version
required: true
type: string
- description: Bearer token
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
@@ -685,6 +726,16 @@ paths:
- application/json
description: Submits the generated code to mark the user as attended.
parameters:
- description: latest
in: header
name: X-Api-Version
required: true
type: string
- description: Bearer token
in: header
name: Authorization
required: true
type: string
- description: Checkin Code Data
in: body
name: payload
@@ -729,11 +780,6 @@ paths:
name: event_id
required: true
type: string
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -800,11 +846,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_event.EventJoinData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -858,6 +899,67 @@ paths:
summary: Join an Event
tags:
- Event
/event/joined:
get:
consumes:
- application/json
description: Fetches a list of events where the authenticated user is a participant.
Supports pagination.
parameters:
- description: Maximum number of events to return (default 20)
in: query
name: limit
type: integer
- description: Number of events to skip
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: Successful retrieval of joined events
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
items:
$ref: '#/definitions/data.EventIndexDoc'
type: array
type: object
"400":
description: Invalid Input
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"401":
description: Unauthorized
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"500":
description: Internal Server Error
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
security:
- ApiKeyAuth: []
summary: Get Joined Events
tags:
- Event
/event/list:
get:
consumes:
@@ -873,11 +975,6 @@ paths:
in: query
name: offset
type: integer
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -937,11 +1034,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_kyc.KycQueryData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -999,11 +1091,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_kyc.KycSessionData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -1054,12 +1141,6 @@ paths:
- application/json
description: Fetches the complete profile data for the user associated with
the provided session/token.
parameters:
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -1116,11 +1197,6 @@ paths:
name: user_id
required: true
type: string
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -1190,11 +1266,6 @@ paths:
name: offset
required: true
type: string
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses:
@@ -1255,11 +1326,6 @@ paths:
required: true
schema:
$ref: '#/definitions/service_user.UserInfoData'
- description: latest
in: header
name: X-Api-Version
required: true
type: string
produces:
- application/json
responses: