From 8bb5d5c491fbb27739f51e1df0e827c806d5f499 Mon Sep 17 00:00:00 2001 From: Clas Wen Date: Sun, 23 Nov 2025 16:46:44 +0800 Subject: [PATCH] fix pagination --- src/types/saturday.d.ts | 362 ++++++++++++++++++++-------------------- src/utils/client.ts | 6 + 2 files changed, 187 insertions(+), 181 deletions(-) diff --git a/src/types/saturday.d.ts b/src/types/saturday.d.ts index c79c30f..e8e0d77 100644 --- a/src/types/saturday.d.ts +++ b/src/types/saturday.d.ts @@ -444,10 +444,10 @@ export interface components { schemas: { "ActivateMemberRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/ActivateMemberRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/ActivateMemberRequest.json + */ readonly $schema?: string MemberId: string alias: string @@ -458,29 +458,29 @@ export interface components { } "AlterCommitEventInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/AlterCommitEventInputBody.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/AlterCommitEventInputBody.json + */ readonly $schema?: string content: string size?: string } "Bind-member-logto-idRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/Bind-member-logto-idRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/Bind-member-logto-idRequest.json + */ readonly $schema?: string password: string } "ClientTokenResponse": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/ClientTokenResponse.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/ClientTokenResponse.json + */ readonly $schema?: string /** Format: int64 */ clientId: number @@ -492,38 +492,38 @@ export interface components { } "CommitEventInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/CommitEventInputBody.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/CommitEventInputBody.json + */ readonly $schema?: string content: string size?: string } "Create-token-via-wechatRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/Create-token-via-wechatRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/Create-token-via-wechatRequest.json + */ readonly $schema?: string code: string } "Create-tokenRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/Create-tokenRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/Create-tokenRequest.json + */ readonly $schema?: string password: string } "CreateClientEventInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/CreateClientEventInputBody.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/CreateClientEventInputBody.json + */ readonly $schema?: string contactPreference?: string model?: string @@ -533,10 +533,10 @@ export interface components { } "CreateMemberRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/CreateMemberRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/CreateMemberRequest.json + */ readonly $schema?: string alias: string avatar: string @@ -551,10 +551,10 @@ export interface components { } "CreateMemberTokenResponse": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/CreateMemberTokenResponse.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/CreateMemberTokenResponse.json + */ readonly $schema?: string alias: string avatar: string @@ -583,49 +583,49 @@ export interface components { } "ErrorModel": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/ErrorModel.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/ErrorModel.json + */ readonly $schema?: string /** - * @description A human-readable explanation specific to this occurrence of the problem. - * @example Property foo is required but is missing. - */ + * @description A human-readable explanation specific to this occurrence of the problem. + * @example Property foo is required but is missing. + */ detail?: string /** @description Optional list of individual error details */ errors?: components["schemas"]["ErrorDetail"][] | null /** - * Format: uri - * @description A URI reference that identifies the specific occurrence of the problem. - * @example https://example.com/error-log/abc123 - */ + * Format: uri + * @description A URI reference that identifies the specific occurrence of the problem. + * @example https://example.com/error-log/abc123 + */ instance?: string /** - * Format: int64 - * @description HTTP status code - * @example 400 - */ + * Format: int64 + * @description HTTP status code + * @example 400 + */ status?: number /** - * @description A short, human-readable summary of the problem type. This value should not change between occurrences of the error. - * @example Bad Request - */ + * @description A short, human-readable summary of the problem type. This value should not change between occurrences of the error. + * @example Bad Request + */ title?: string /** - * Format: uri - * @description A URI reference to human-readable documentation for the error. - * @default about:blank - * @example https://example.com/errors/example - */ + * Format: uri + * @description A URI reference to human-readable documentation for the error. + * @default about:blank + * @example https://example.com/errors/example + */ type: string } "Event": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/Event.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/Event.json + */ readonly $schema?: string /** Format: int64 */ clientId: number @@ -662,10 +662,10 @@ export interface components { } "Member": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/Member.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/Member.json + */ readonly $schema?: string alias: string avatar: string @@ -700,23 +700,23 @@ export interface components { } "PingResponse": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/PingResponse.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/PingResponse.json + */ readonly $schema?: string /** - * @description Ping message - * @example ping - */ + * @description Ping message + * @example ping + */ message: string } "PublicEvent": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/PublicEvent.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/PublicEvent.json + */ readonly $schema?: string /** Format: int64 */ clientId: number @@ -738,10 +738,10 @@ export interface components { } "PublicMember": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/PublicMember.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/PublicMember.json + */ readonly $schema?: string alias: string avatar: string @@ -754,10 +754,10 @@ export interface components { } "UpdateClientEventInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/UpdateClientEventInputBody.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/UpdateClientEventInputBody.json + */ readonly $schema?: string contactPreference?: string model?: string @@ -768,20 +768,20 @@ export interface components { } "UpdateMemberAvatarInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/UpdateMemberAvatarInputBody.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/UpdateMemberAvatarInputBody.json + */ readonly $schema?: string /** @description Avatar URL */ avatar: string } "UpdateMemberBasicRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/UpdateMemberBasicRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/UpdateMemberBasicRequest.json + */ readonly $schema?: string memberId: string name: string @@ -790,10 +790,10 @@ export interface components { } "UpdateMemberRequest": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/UpdateMemberRequest.json - */ + * Format: uri + * @description A URL to the JSON Schema for this object. + * @example https://api.nbtca.space/schemas/UpdateMemberRequest.json + */ readonly $schema?: string MemberId: string alias: string @@ -805,10 +805,10 @@ export interface components { } "UpdateNotificationPreferencesInputBody": { /** - * Format: uri - * @description A URL to the JSON Schema for this object. - * @example https://api.nbtca.space/schemas/UpdateNotificationPreferencesInputBody.json - */ + * 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 } @@ -866,14 +866,14 @@ export interface operations { parameters: { query?: { /** - * @description Offset - * @example 0 - */ + * @description Offset + * @example 0 + */ offset?: number /** - * @description Limit - * @example 50 - */ + * @description Limit + * @example 50 + */ limit?: number status?: string order?: string @@ -921,9 +921,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -964,9 +964,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1007,9 +1007,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1124,14 +1124,14 @@ export interface operations { parameters: { query?: { /** - * @description Offset - * @example 0 - */ + * @description Offset + * @example 0 + */ offset?: number /** - * @description Limit - * @example 50 - */ + * @description Limit + * @example 50 + */ limit?: number status?: string[] | null order?: string @@ -1247,9 +1247,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1290,9 +1290,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1488,14 +1488,14 @@ export interface operations { parameters: { query?: { /** - * @description Offset - * @example 0 - */ + * @description Offset + * @example 0 + */ offset?: number /** - * @description Limit - * @example 50 - */ + * @description Limit + * @example 50 + */ limit?: number status?: string order?: string @@ -1543,9 +1543,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1586,9 +1586,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1629,9 +1629,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1672,9 +1672,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1719,9 +1719,9 @@ export interface operations { } path: { /** - * @description Event ID - * @example 123 - */ + * @description Event ID + * @example 123 + */ EventId: number } cookie?: never @@ -1875,14 +1875,14 @@ export interface operations { parameters: { query?: { /** - * @description Offset - * @example 0 - */ + * @description Offset + * @example 0 + */ offset?: number /** - * @description Limit - * @example 50 - */ + * @description Limit + * @example 50 + */ limit?: number } header?: never @@ -1961,14 +1961,14 @@ export interface operations { parameters: { query?: { /** - * @description Offset - * @example 0 - */ + * @description Offset + * @example 0 + */ offset?: number /** - * @description Limit - * @example 50 - */ + * @description Limit + * @example 50 + */ limit?: number } header?: { @@ -2011,9 +2011,9 @@ export interface operations { header?: never path: { /** - * @description Name to greet - * @example 2333333333 - */ + * @description Name to greet + * @example 2333333333 + */ MemberId: string } cookie?: never @@ -2054,9 +2054,9 @@ export interface operations { } path: { /** - * @description Member ID - * @example 2333333333 - */ + * @description Member ID + * @example 2333333333 + */ MemberId: string } cookie?: never @@ -2101,9 +2101,9 @@ export interface operations { } path: { /** - * @description Member ID - * @example 2333333333 - */ + * @description Member ID + * @example 2333333333 + */ MemberId: string } cookie?: never @@ -2147,9 +2147,9 @@ export interface operations { } path: { /** - * @description Member Id - * @example 2333333333 - */ + * @description Member Id + * @example 2333333333 + */ MemberId: string } cookie?: never @@ -2191,9 +2191,9 @@ export interface operations { header?: never path: { /** - * @description Member Id - * @example 2333333333 - */ + * @description Member Id + * @example 2333333333 + */ MemberId: string } cookie?: never diff --git a/src/utils/client.ts b/src/utils/client.ts index f6c8919..2618150 100644 --- a/src/utils/client.ts +++ b/src/utils/client.ts @@ -6,6 +6,12 @@ export const saturdayApiBaseUrl = import.meta.env.PROD ? "https://api.nbtca.spac export const saturdayClient = createClient({ baseUrl: saturdayApiBaseUrl, + querySerializer: { + array: { + style: "form", + explode: false, + }, + }, }) export const activeClient = new ApiClient({