mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-24 10:51:27 +00:00
Merge branch 'main' into dependabot/npm_and_yarn/npm_and_yarn-82a5d800d0
This commit is contained in:
commit
6f9adabb32
3 changed files with 493 additions and 182 deletions
188
src/pages/repair/NotificationPreferences.tsx
Normal file
188
src/pages/repair/NotificationPreferences.tsx
Normal file
|
|
@ -0,0 +1,188 @@
|
||||||
|
import { useEffect, useState } from "react"
|
||||||
|
import {
|
||||||
|
Modal,
|
||||||
|
ModalContent,
|
||||||
|
ModalHeader,
|
||||||
|
ModalBody,
|
||||||
|
ModalFooter,
|
||||||
|
Switch,
|
||||||
|
Spinner,
|
||||||
|
Button,
|
||||||
|
} from "@heroui/react"
|
||||||
|
import { saturdayClient } from "../../utils/client"
|
||||||
|
import type { components } from "../../types/saturday"
|
||||||
|
|
||||||
|
type NotificationPreferenceItem = components["schemas"]["NotificationPreferenceItem"]
|
||||||
|
type Item = components["schemas"]["Item"]
|
||||||
|
|
||||||
|
interface NotificationPreferencesProps {
|
||||||
|
token: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function NotificationPreferences({ token }: NotificationPreferencesProps) {
|
||||||
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
|
const [preferences, setPreferences] = useState<NotificationPreferenceItem[]>([])
|
||||||
|
const [isLoading, setIsLoading] = useState(false)
|
||||||
|
const [isSaving, setIsSaving] = useState(false)
|
||||||
|
const [errorMessage, setErrorMessage] = useState<string>("")
|
||||||
|
const [successMessage, setSuccessMessage] = useState<string>("")
|
||||||
|
|
||||||
|
const openModal = () => {
|
||||||
|
setIsOpen(true)
|
||||||
|
loadPreferences()
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeModal = () => {
|
||||||
|
setIsOpen(false)
|
||||||
|
setErrorMessage("")
|
||||||
|
setSuccessMessage("")
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadPreferences = async () => {
|
||||||
|
if (!token) return
|
||||||
|
|
||||||
|
setIsLoading(true)
|
||||||
|
setErrorMessage("")
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { data, error } = await saturdayClient.GET("/member/notification-preferences", {
|
||||||
|
params: {
|
||||||
|
header: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if (error || !data) {
|
||||||
|
setErrorMessage("加载通知偏好设置失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setPreferences(data)
|
||||||
|
} catch (err) {
|
||||||
|
setErrorMessage("加载通知偏好设置时出错")
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleToggle = async (notificationType: string, newValue: boolean) => {
|
||||||
|
setIsSaving(true)
|
||||||
|
setErrorMessage("")
|
||||||
|
setSuccessMessage("")
|
||||||
|
|
||||||
|
// Optimistically update UI
|
||||||
|
const previousPreferences = [...preferences]
|
||||||
|
setPreferences(preferences.map(pref =>
|
||||||
|
pref.notificationType === notificationType
|
||||||
|
? { ...pref, enabled: newValue }
|
||||||
|
: pref
|
||||||
|
))
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Create the request body with all preferences as an array of Item objects
|
||||||
|
const preferencesArray: Item[] = preferences.map(pref => ({
|
||||||
|
notificationType: pref.notificationType,
|
||||||
|
enabled: pref.notificationType === notificationType ? newValue : pref.enabled,
|
||||||
|
}))
|
||||||
|
|
||||||
|
const { error } = await saturdayClient.PUT("/member/notification-preferences", {
|
||||||
|
params: {
|
||||||
|
header: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
preferences: preferencesArray,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
// Revert on error
|
||||||
|
setPreferences(previousPreferences)
|
||||||
|
setErrorMessage("更新通知偏好设置失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setSuccessMessage("通知偏好设置已更新")
|
||||||
|
// Clear success message after 3 seconds
|
||||||
|
setTimeout(() => setSuccessMessage(""), 3000)
|
||||||
|
} catch (err) {
|
||||||
|
// Revert on error
|
||||||
|
setPreferences(previousPreferences)
|
||||||
|
setErrorMessage("更新通知偏好设置时出错")
|
||||||
|
} finally {
|
||||||
|
setIsSaving(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Button onPress={openModal} color="primary" variant="flat">
|
||||||
|
通知设置
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Modal isOpen={isOpen} onClose={closeModal} size="2xl">
|
||||||
|
<ModalContent>
|
||||||
|
<ModalHeader className="flex flex-col gap-1">
|
||||||
|
<h3 className="text-xl font-bold">通知偏好设置</h3>
|
||||||
|
<p className="text-sm text-gray-500 font-normal">管理您希望接收的通知类型</p>
|
||||||
|
</ModalHeader>
|
||||||
|
<ModalBody>
|
||||||
|
{isLoading ? (
|
||||||
|
<div className="flex justify-center items-center py-8">
|
||||||
|
<Spinner label="加载中..." />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
{preferences.map((pref) => (
|
||||||
|
<div
|
||||||
|
key={pref.notificationType}
|
||||||
|
className="flex flex-col sm:flex-row sm:items-center justify-between gap-2 sm:gap-4 py-3 border-b border-gray-100 last:border-0"
|
||||||
|
>
|
||||||
|
<div className="flex-1">
|
||||||
|
<p className="text-sm sm:text-base font-medium">{pref.description}</p>
|
||||||
|
<p className="text-xs text-gray-400 mt-1">{pref.notificationType}</p>
|
||||||
|
</div>
|
||||||
|
<Switch
|
||||||
|
isSelected={pref.enabled}
|
||||||
|
onValueChange={(value) => handleToggle(pref.notificationType, value)}
|
||||||
|
isDisabled={isSaving}
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
|
{preferences.length === 0 && !errorMessage && (
|
||||||
|
<div className="text-center py-4 text-gray-500">
|
||||||
|
<p className="text-sm">暂无可用的通知偏好设置</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Messages */}
|
||||||
|
{errorMessage && (
|
||||||
|
<div className="bg-red-50 border border-red-200 rounded-lg p-3 mt-2">
|
||||||
|
<p className="text-sm text-red-800">{errorMessage}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{successMessage && (
|
||||||
|
<div className="bg-green-50 border border-green-200 rounded-lg p-3 mt-2">
|
||||||
|
<p className="text-sm text-green-800">{successMessage}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</ModalBody>
|
||||||
|
<ModalFooter>
|
||||||
|
<Button variant="flat" onPress={closeModal}>
|
||||||
|
关闭
|
||||||
|
</Button>
|
||||||
|
</ModalFooter>
|
||||||
|
</ModalContent>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -34,6 +34,7 @@ import type { PublicMember } from "../../store/member"
|
||||||
import type { UserInfoResponse } from "@logto/browser"
|
import type { UserInfoResponse } from "@logto/browser"
|
||||||
import { getAvailableEventActions, type EventAction, type IdentityContext } from "./EventAction"
|
import { getAvailableEventActions, type EventAction, type IdentityContext } from "./EventAction"
|
||||||
import { ExportExcelModal } from "./ExportEventDialog"
|
import { ExportExcelModal } from "./ExportEventDialog"
|
||||||
|
import NotificationPreferences from "./NotificationPreferences"
|
||||||
|
|
||||||
type PublicEvent = components["schemas"]["PublicEvent"]
|
type PublicEvent = components["schemas"]["PublicEvent"]
|
||||||
|
|
||||||
|
|
@ -525,11 +526,12 @@ export default function App() {
|
||||||
<section className="box-border max-w-full px-4 sm:px-6 lg:max-w-[1024px] lg:px-[22px] mx-auto mb-16 sm:mb-24">
|
<section className="box-border max-w-full px-4 sm:px-6 lg:max-w-[1024px] lg:px-[22px] mx-auto mb-16 sm:mb-24">
|
||||||
<div className="mt-6 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
<div className="mt-6 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||||
<div className="text-xl sm:text-2xl font-bold">维修管理</div>
|
<div className="text-xl sm:text-2xl font-bold">维修管理</div>
|
||||||
{
|
<div className="flex gap-2 w-full sm:w-auto">
|
||||||
userInfo?.roles?.find(v => v.toLowerCase() == "repair admin")
|
{token && <NotificationPreferences token={token} />}
|
||||||
? <div className="w-full sm:w-auto"><ExportExcelModal></ExportExcelModal></div>
|
{userInfo?.roles?.find(v => v.toLowerCase() == "repair admin") && (
|
||||||
: <></>
|
<ExportExcelModal />
|
||||||
}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="my-8 flex flex-col gap-4">
|
<div className="my-8 flex flex-col gap-4">
|
||||||
{/* Mobile Cards Layout */}
|
{/* Mobile Cards Layout */}
|
||||||
|
|
|
||||||
475
src/types/saturday.d.ts
vendored
475
src/types/saturday.d.ts
vendored
|
|
@ -298,6 +298,24 @@ export interface paths {
|
||||||
patch: operations["alter-commit-event"]
|
patch: operations["alter-commit-event"]
|
||||||
trace?: never
|
trace?: never
|
||||||
}
|
}
|
||||||
|
"/member/notification-preferences": {
|
||||||
|
parameters: {
|
||||||
|
query?: never
|
||||||
|
header?: never
|
||||||
|
path?: never
|
||||||
|
cookie?: never
|
||||||
|
}
|
||||||
|
/** Get member notification preferences */
|
||||||
|
get: operations["get-notification-preferences"]
|
||||||
|
/** Update member notification preferences */
|
||||||
|
put: operations["update-notification-preferences"]
|
||||||
|
post?: never
|
||||||
|
delete?: never
|
||||||
|
options?: never
|
||||||
|
head?: never
|
||||||
|
patch?: never
|
||||||
|
trace?: never
|
||||||
|
}
|
||||||
"/member/token/logto": {
|
"/member/token/logto": {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: never
|
query?: never
|
||||||
|
|
@ -426,10 +444,10 @@ export interface components {
|
||||||
schemas: {
|
schemas: {
|
||||||
"ActivateMemberRequest": {
|
"ActivateMemberRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/ActivateMemberRequest.json
|
* @example https://api.nbtca.space/schemas/ActivateMemberRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
MemberId: string
|
MemberId: string
|
||||||
alias: string
|
alias: string
|
||||||
|
|
@ -440,29 +458,29 @@ export interface components {
|
||||||
}
|
}
|
||||||
"AlterCommitEventInputBody": {
|
"AlterCommitEventInputBody": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/AlterCommitEventInputBody.json
|
* @example https://api.nbtca.space/schemas/AlterCommitEventInputBody.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
content: string
|
content: string
|
||||||
size?: string
|
size?: string
|
||||||
}
|
}
|
||||||
"Bind-member-logto-idRequest": {
|
"Bind-member-logto-idRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/Bind-member-logto-idRequest.json
|
* @example https://api.nbtca.space/schemas/Bind-member-logto-idRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
password: string
|
password: string
|
||||||
}
|
}
|
||||||
"ClientTokenResponse": {
|
"ClientTokenResponse": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/ClientTokenResponse.json
|
* @example https://api.nbtca.space/schemas/ClientTokenResponse.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/** Format: int64 */
|
/** Format: int64 */
|
||||||
clientId: number
|
clientId: number
|
||||||
|
|
@ -474,38 +492,38 @@ export interface components {
|
||||||
}
|
}
|
||||||
"CommitEventInputBody": {
|
"CommitEventInputBody": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/CommitEventInputBody.json
|
* @example https://api.nbtca.space/schemas/CommitEventInputBody.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
content: string
|
content: string
|
||||||
size?: string
|
size?: string
|
||||||
}
|
}
|
||||||
"Create-token-via-wechatRequest": {
|
"Create-token-via-wechatRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/Create-token-via-wechatRequest.json
|
* @example https://api.nbtca.space/schemas/Create-token-via-wechatRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
code: string
|
code: string
|
||||||
}
|
}
|
||||||
"Create-tokenRequest": {
|
"Create-tokenRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/Create-tokenRequest.json
|
* @example https://api.nbtca.space/schemas/Create-tokenRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
password: string
|
password: string
|
||||||
}
|
}
|
||||||
"CreateClientEventInputBody": {
|
"CreateClientEventInputBody": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/CreateClientEventInputBody.json
|
* @example https://api.nbtca.space/schemas/CreateClientEventInputBody.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
contactPreference?: string
|
contactPreference?: string
|
||||||
model?: string
|
model?: string
|
||||||
|
|
@ -515,10 +533,10 @@ export interface components {
|
||||||
}
|
}
|
||||||
"CreateMemberRequest": {
|
"CreateMemberRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/CreateMemberRequest.json
|
* @example https://api.nbtca.space/schemas/CreateMemberRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
alias: string
|
alias: string
|
||||||
avatar: string
|
avatar: string
|
||||||
|
|
@ -533,10 +551,10 @@ export interface components {
|
||||||
}
|
}
|
||||||
"CreateMemberTokenResponse": {
|
"CreateMemberTokenResponse": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/CreateMemberTokenResponse.json
|
* @example https://api.nbtca.space/schemas/CreateMemberTokenResponse.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
alias: string
|
alias: string
|
||||||
avatar: string
|
avatar: string
|
||||||
|
|
@ -547,6 +565,7 @@ export interface components {
|
||||||
logtoId: string
|
logtoId: string
|
||||||
memberId: string
|
memberId: string
|
||||||
name: string
|
name: string
|
||||||
|
notificationPreferences: components["schemas"]["NotificationPreferences"]
|
||||||
phone: string
|
phone: string
|
||||||
profile: string
|
profile: string
|
||||||
qq: string
|
qq: string
|
||||||
|
|
@ -564,49 +583,49 @@ export interface components {
|
||||||
}
|
}
|
||||||
"ErrorModel": {
|
"ErrorModel": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/ErrorModel.json
|
* @example https://api.nbtca.space/schemas/ErrorModel.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/**
|
/**
|
||||||
* @description A human-readable explanation specific to this occurrence of the problem.
|
* @description A human-readable explanation specific to this occurrence of the problem.
|
||||||
* @example Property foo is required but is missing.
|
* @example Property foo is required but is missing.
|
||||||
*/
|
*/
|
||||||
detail?: string
|
detail?: string
|
||||||
/** @description Optional list of individual error details */
|
/** @description Optional list of individual error details */
|
||||||
errors?: components["schemas"]["ErrorDetail"][] | null
|
errors?: components["schemas"]["ErrorDetail"][] | null
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URI reference that identifies the specific occurrence of the problem.
|
* @description A URI reference that identifies the specific occurrence of the problem.
|
||||||
* @example https://example.com/error-log/abc123
|
* @example https://example.com/error-log/abc123
|
||||||
*/
|
*/
|
||||||
instance?: string
|
instance?: string
|
||||||
/**
|
/**
|
||||||
* Format: int64
|
* Format: int64
|
||||||
* @description HTTP status code
|
* @description HTTP status code
|
||||||
* @example 400
|
* @example 400
|
||||||
*/
|
*/
|
||||||
status?: number
|
status?: number
|
||||||
/**
|
/**
|
||||||
* @description A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
|
* @description A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
|
||||||
* @example Bad Request
|
* @example Bad Request
|
||||||
*/
|
*/
|
||||||
title?: string
|
title?: string
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URI reference to human-readable documentation for the error.
|
* @description A URI reference to human-readable documentation for the error.
|
||||||
* @default about:blank
|
* @default about:blank
|
||||||
* @example https://example.com/errors/example
|
* @example https://example.com/errors/example
|
||||||
*/
|
*/
|
||||||
type: string
|
type: string
|
||||||
}
|
}
|
||||||
"Event": {
|
"Event": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/Event.json
|
* @example https://api.nbtca.space/schemas/Event.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/** Format: int64 */
|
/** Format: int64 */
|
||||||
clientId: number
|
clientId: number
|
||||||
|
|
@ -637,12 +656,16 @@ export interface components {
|
||||||
logId: number
|
logId: number
|
||||||
memberId: string
|
memberId: string
|
||||||
}
|
}
|
||||||
|
"Item": {
|
||||||
|
enabled: boolean
|
||||||
|
notificationType: string
|
||||||
|
}
|
||||||
"Member": {
|
"Member": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/Member.json
|
* @example https://api.nbtca.space/schemas/Member.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
alias: string
|
alias: string
|
||||||
avatar: string
|
avatar: string
|
||||||
|
|
@ -653,12 +676,23 @@ export interface components {
|
||||||
logtoId: string
|
logtoId: string
|
||||||
memberId: string
|
memberId: string
|
||||||
name: string
|
name: string
|
||||||
|
notificationPreferences: components["schemas"]["NotificationPreferences"]
|
||||||
phone: string
|
phone: string
|
||||||
profile: string
|
profile: string
|
||||||
qq: string
|
qq: string
|
||||||
role: string
|
role: string
|
||||||
section: string
|
section: string
|
||||||
}
|
}
|
||||||
|
"NotificationPreferenceItem": {
|
||||||
|
description: string
|
||||||
|
enabled: boolean
|
||||||
|
notificationType: string
|
||||||
|
}
|
||||||
|
"NotificationPreferences": {
|
||||||
|
event_assigned_to_me: boolean
|
||||||
|
event_status_changed: boolean
|
||||||
|
new_event_created: boolean
|
||||||
|
}
|
||||||
"NullInt64": {
|
"NullInt64": {
|
||||||
/** Format: int64 */
|
/** Format: int64 */
|
||||||
Int64: number
|
Int64: number
|
||||||
|
|
@ -666,23 +700,23 @@ export interface components {
|
||||||
}
|
}
|
||||||
"PingResponse": {
|
"PingResponse": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/PingResponse.json
|
* @example https://api.nbtca.space/schemas/PingResponse.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/**
|
/**
|
||||||
* @description Ping message
|
* @description Ping message
|
||||||
* @example ping
|
* @example ping
|
||||||
*/
|
*/
|
||||||
message: string
|
message: string
|
||||||
}
|
}
|
||||||
"PublicEvent": {
|
"PublicEvent": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/PublicEvent.json
|
* @example https://api.nbtca.space/schemas/PublicEvent.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/** Format: int64 */
|
/** Format: int64 */
|
||||||
clientId: number
|
clientId: number
|
||||||
|
|
@ -704,10 +738,10 @@ export interface components {
|
||||||
}
|
}
|
||||||
"PublicMember": {
|
"PublicMember": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/PublicMember.json
|
* @example https://api.nbtca.space/schemas/PublicMember.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
alias: string
|
alias: string
|
||||||
avatar: string
|
avatar: string
|
||||||
|
|
@ -720,10 +754,10 @@ export interface components {
|
||||||
}
|
}
|
||||||
"UpdateClientEventInputBody": {
|
"UpdateClientEventInputBody": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/UpdateClientEventInputBody.json
|
* @example https://api.nbtca.space/schemas/UpdateClientEventInputBody.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
contactPreference?: string
|
contactPreference?: string
|
||||||
model?: string
|
model?: string
|
||||||
|
|
@ -734,20 +768,20 @@ export interface components {
|
||||||
}
|
}
|
||||||
"UpdateMemberAvatarInputBody": {
|
"UpdateMemberAvatarInputBody": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/UpdateMemberAvatarInputBody.json
|
* @example https://api.nbtca.space/schemas/UpdateMemberAvatarInputBody.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
/** @description Avatar URL */
|
/** @description Avatar URL */
|
||||||
avatar: string
|
avatar: string
|
||||||
}
|
}
|
||||||
"UpdateMemberBasicRequest": {
|
"UpdateMemberBasicRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/UpdateMemberBasicRequest.json
|
* @example https://api.nbtca.space/schemas/UpdateMemberBasicRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
memberId: string
|
memberId: string
|
||||||
name: string
|
name: string
|
||||||
|
|
@ -756,10 +790,10 @@ export interface components {
|
||||||
}
|
}
|
||||||
"UpdateMemberRequest": {
|
"UpdateMemberRequest": {
|
||||||
/**
|
/**
|
||||||
* Format: uri
|
* Format: uri
|
||||||
* @description A URL to the JSON Schema for this object.
|
* @description A URL to the JSON Schema for this object.
|
||||||
* @example https://api.nbtca.space/schemas/UpdateMemberRequest.json
|
* @example https://api.nbtca.space/schemas/UpdateMemberRequest.json
|
||||||
*/
|
*/
|
||||||
readonly $schema?: string
|
readonly $schema?: string
|
||||||
MemberId: string
|
MemberId: string
|
||||||
alias: string
|
alias: string
|
||||||
|
|
@ -769,6 +803,15 @@ export interface components {
|
||||||
profile: string
|
profile: string
|
||||||
qq: string
|
qq: string
|
||||||
}
|
}
|
||||||
|
"UpdateNotificationPreferencesInputBody": {
|
||||||
|
/**
|
||||||
|
* Format: uri
|
||||||
|
* @description A URL to the JSON Schema for this object.
|
||||||
|
* @example https://api.nbtca.space/schemas/UpdateNotificationPreferencesInputBody.json
|
||||||
|
*/
|
||||||
|
readonly $schema?: string
|
||||||
|
preferences: components["schemas"]["Item"][] | null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
responses: never
|
responses: never
|
||||||
parameters: never
|
parameters: never
|
||||||
|
|
@ -823,14 +866,14 @@ export interface operations {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: {
|
query?: {
|
||||||
/**
|
/**
|
||||||
* @description Offset
|
* @description Offset
|
||||||
* @example 0
|
* @example 0
|
||||||
*/
|
*/
|
||||||
offset?: number
|
offset?: number
|
||||||
/**
|
/**
|
||||||
* @description Limit
|
* @description Limit
|
||||||
* @example 50
|
* @example 50
|
||||||
*/
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
status?: string
|
status?: string
|
||||||
order?: string
|
order?: string
|
||||||
|
|
@ -878,9 +921,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -921,9 +964,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -964,9 +1007,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1081,14 +1124,14 @@ export interface operations {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: {
|
query?: {
|
||||||
/**
|
/**
|
||||||
* @description Offset
|
* @description Offset
|
||||||
* @example 0
|
* @example 0
|
||||||
*/
|
*/
|
||||||
offset?: number
|
offset?: number
|
||||||
/**
|
/**
|
||||||
* @description Limit
|
* @description Limit
|
||||||
* @example 50
|
* @example 50
|
||||||
*/
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
status?: string[] | null
|
status?: string[] | null
|
||||||
order?: string
|
order?: string
|
||||||
|
|
@ -1204,9 +1247,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1247,9 +1290,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1445,14 +1488,14 @@ export interface operations {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: {
|
query?: {
|
||||||
/**
|
/**
|
||||||
* @description Offset
|
* @description Offset
|
||||||
* @example 0
|
* @example 0
|
||||||
*/
|
*/
|
||||||
offset?: number
|
offset?: number
|
||||||
/**
|
/**
|
||||||
* @description Limit
|
* @description Limit
|
||||||
* @example 50
|
* @example 50
|
||||||
*/
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
status?: string
|
status?: string
|
||||||
order?: string
|
order?: string
|
||||||
|
|
@ -1500,9 +1543,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1543,9 +1586,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1586,9 +1629,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1629,9 +1672,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1676,9 +1719,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Event ID
|
* @description Event ID
|
||||||
* @example 123
|
* @example 123
|
||||||
*/
|
*/
|
||||||
EventId: number
|
EventId: number
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1714,6 +1757,84 @@ export interface operations {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"get-notification-preferences": {
|
||||||
|
parameters: {
|
||||||
|
query?: never
|
||||||
|
header?: {
|
||||||
|
/** @description Bearer token or JWT token */
|
||||||
|
Authorization?: string
|
||||||
|
}
|
||||||
|
path?: never
|
||||||
|
cookie?: never
|
||||||
|
}
|
||||||
|
requestBody?: never
|
||||||
|
responses: {
|
||||||
|
/** @description OK */
|
||||||
|
200: {
|
||||||
|
headers: {
|
||||||
|
"X-Limit"?: number | null
|
||||||
|
"X-Offset"?: number | null
|
||||||
|
"X-Page"?: number | null
|
||||||
|
"X-Total-Count"?: number | null
|
||||||
|
"X-Total-Pages"?: number | null
|
||||||
|
[name: string]: unknown
|
||||||
|
}
|
||||||
|
content: {
|
||||||
|
"application/json": components["schemas"]["NotificationPreferenceItem"][] | null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** @description Error */
|
||||||
|
default: {
|
||||||
|
headers: {
|
||||||
|
[name: string]: unknown
|
||||||
|
}
|
||||||
|
content: {
|
||||||
|
"application/problem+json": components["schemas"]["ErrorModel"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"update-notification-preferences": {
|
||||||
|
parameters: {
|
||||||
|
query?: never
|
||||||
|
header?: {
|
||||||
|
/** @description Bearer token or JWT token */
|
||||||
|
Authorization?: string
|
||||||
|
}
|
||||||
|
path?: never
|
||||||
|
cookie?: never
|
||||||
|
}
|
||||||
|
requestBody: {
|
||||||
|
content: {
|
||||||
|
"application/json": components["schemas"]["UpdateNotificationPreferencesInputBody"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
responses: {
|
||||||
|
/** @description OK */
|
||||||
|
200: {
|
||||||
|
headers: {
|
||||||
|
"X-Limit"?: number | null
|
||||||
|
"X-Offset"?: number | null
|
||||||
|
"X-Page"?: number | null
|
||||||
|
"X-Total-Count"?: number | null
|
||||||
|
"X-Total-Pages"?: number | null
|
||||||
|
[name: string]: unknown
|
||||||
|
}
|
||||||
|
content: {
|
||||||
|
"application/json": string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** @description Error */
|
||||||
|
default: {
|
||||||
|
headers: {
|
||||||
|
[name: string]: unknown
|
||||||
|
}
|
||||||
|
content: {
|
||||||
|
"application/problem+json": components["schemas"]["ErrorModel"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
"create-token-via-logto-token": {
|
"create-token-via-logto-token": {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: never
|
query?: never
|
||||||
|
|
@ -1754,14 +1875,14 @@ export interface operations {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: {
|
query?: {
|
||||||
/**
|
/**
|
||||||
* @description Offset
|
* @description Offset
|
||||||
* @example 0
|
* @example 0
|
||||||
*/
|
*/
|
||||||
offset?: number
|
offset?: number
|
||||||
/**
|
/**
|
||||||
* @description Limit
|
* @description Limit
|
||||||
* @example 50
|
* @example 50
|
||||||
*/
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
header?: never
|
header?: never
|
||||||
|
|
@ -1840,14 +1961,14 @@ export interface operations {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: {
|
query?: {
|
||||||
/**
|
/**
|
||||||
* @description Offset
|
* @description Offset
|
||||||
* @example 0
|
* @example 0
|
||||||
*/
|
*/
|
||||||
offset?: number
|
offset?: number
|
||||||
/**
|
/**
|
||||||
* @description Limit
|
* @description Limit
|
||||||
* @example 50
|
* @example 50
|
||||||
*/
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
header?: {
|
header?: {
|
||||||
|
|
@ -1890,9 +2011,9 @@ export interface operations {
|
||||||
header?: never
|
header?: never
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Name to greet
|
* @description Name to greet
|
||||||
* @example 2333333333
|
* @example 2333333333
|
||||||
*/
|
*/
|
||||||
MemberId: string
|
MemberId: string
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1933,9 +2054,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Member ID
|
* @description Member ID
|
||||||
* @example 2333333333
|
* @example 2333333333
|
||||||
*/
|
*/
|
||||||
MemberId: string
|
MemberId: string
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -1980,9 +2101,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Member ID
|
* @description Member ID
|
||||||
* @example 2333333333
|
* @example 2333333333
|
||||||
*/
|
*/
|
||||||
MemberId: string
|
MemberId: string
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -2026,9 +2147,9 @@ export interface operations {
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Member Id
|
* @description Member Id
|
||||||
* @example 2333333333
|
* @example 2333333333
|
||||||
*/
|
*/
|
||||||
MemberId: string
|
MemberId: string
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
@ -2070,9 +2191,9 @@ export interface operations {
|
||||||
header?: never
|
header?: never
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description Member Id
|
* @description Member Id
|
||||||
* @example 2333333333
|
* @example 2333333333
|
||||||
*/
|
*/
|
||||||
MemberId: string
|
MemberId: string
|
||||||
}
|
}
|
||||||
cookie?: never
|
cookie?: never
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue