/** * Swagger component definitions for the admin module. Picked up by * swagger-jsdoc through the `src/models/**\/*.interface.ts` glob in * app.factory.ts. * * Note what is *not* documented here: the better-auth routes under * /admin/auth/* (sign-in, sign-out, reset-password, passkey ceremonies, and * the invitation preview/accept endpoints). better-auth owns those paths and * their shapes; duplicating them by hand would only drift on the next upgrade. */ /** * @swagger * components: * securitySchemes: * AdminSessionCookie: * type: apiKey * in: cookie * name: nachklang.session_token * description: > * Set by /admin/auth/sign-in/email. Over https the name is * __Secure-nachklang.session_token and the cookie is scoped to * .nachklang.art, so one sign-in covers every *.nachklang.art app. * schemas: * AdminApp: * type: string * enum: [calendar, feedback, tickets, admin] * description: Holding "admin" is what allows managing users and invitations. * AdminMe: * type: object * properties: * id: * type: string * email: * type: string * fullName: * type: string * apps: * type: array * items: * $ref: '#/components/schemas/AdminApp' * AdminUserSession: * type: object * properties: * id: * type: string * createdAt: * type: string * format: date-time * expiresAt: * type: string * format: date-time * ipAddress: * type: string * nullable: true * userAgent: * type: string * nullable: true * AdminUser: * type: object * properties: * id: * type: string * email: * type: string * name: * type: string * apps: * type: array * items: * $ref: '#/components/schemas/AdminApp' * status: * type: string * enum: [aktiv, deaktiviert] * description: Derived - there is no status column. * createdAt: * type: string * format: date-time * lastSignInAt: * type: string * format: date-time * nullable: true * description: Newest session's creation time; null once every session has expired. * AdminUserDetail: * allOf: * - $ref: '#/components/schemas/AdminUser' * - type: object * properties: * sessions: * type: array * items: * $ref: '#/components/schemas/AdminUserSession' * passkeyCount: * type: integer * AdminInvitation: * type: object * description: An open invitation. The token itself is never returned by any endpoint. * properties: * id: * type: integer * email: * type: string * name: * type: string * apps: * type: array * items: * $ref: '#/components/schemas/AdminApp' * invitedBy: * type: string * nullable: true * description: Null for the invitation created by the ADMIN_BOOTSTRAP_EMAIL bootstrap. * createdAt: * type: string * format: date-time * expiresAt: * type: string * format: date-time */ export {};