Skip to content

Commit c9e2c2b

Browse files
committed
feat: add series ICPC preset byMarker filter option; limit the user fields that can be filtered and grouped
1 parent 06a7ced commit c9e2c2b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

index.d.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ export type Contributor = string;
127127
//#endregion common
128128

129129
//#region ranklist
130+
export type FilterableUserFields = 'id' | 'name' | 'organization';
131+
132+
export type GroupableUserFields = 'id' | 'name' | 'organization';
133+
130134

131135
export interface ExternalUser {
132136
/** Username. */
@@ -363,7 +367,7 @@ export interface RankSeriesRulePresetUniqByUserField {
363367
* Specify the field name of `user`.
364368
* @example 'organization'
365369
*/
366-
field: keyof User;
370+
field: GroupableUserFields;
367371
/**
368372
* Whether to include official users only.
369373
* @defaultValue false
@@ -452,14 +456,21 @@ export interface RankSeriesRulePresetICPC {
452456
* The field name of `user` to be filtered.
453457
* @example 'organization'
454458
*/
455-
field: keyof User;
459+
field: FilterableUserFields;
456460

457461
/**
458462
* The field match rule (RegExp constructor string) of `user` to be filtered.
459463
* @example 'SDUT'
460464
*/
461465
rule: string;
462466
}[];
467+
468+
/**
469+
* The marker ID to filter users.
470+
* If specified, only users with this marker (exact match) will be included.
471+
* @since NEXT
472+
*/
473+
byMarker?: string;
463474
},
464475
};
465476
}

0 commit comments

Comments
 (0)