Skip to content

Commit 8ee7bce

Browse files
Re-generate from new spec, adjust ESLint config
1 parent d2edb09 commit 8ee7bce

5 files changed

Lines changed: 281 additions & 36 deletions

File tree

eslint.config.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ import importPlugin from 'eslint-plugin-import';
88

99
export default tseslint.config(
1010
{
11-
ignores: [
12-
'dist',
13-
'coverage',
14-
'.yarn',
15-
'.claude',
16-
'src/@types',
17-
'src/gen/**',
18-
'*.{js,ts}',
19-
],
11+
ignores: ['dist', 'coverage', '.yarn', '.claude', 'src/@types', '*.{js,ts}'],
2012
},
2113
{
2214
name: 'default',
@@ -29,7 +21,6 @@ export default tseslint.config(
2921
plugins: {
3022
import: importPlugin,
3123
'unused-imports': unusedImports,
32-
jsdoc,
3324
},
3425
settings: {
3526
react: {
@@ -105,6 +96,15 @@ export default tseslint.config(
10596
'@typescript-eslint/consistent-type-imports': 'error',
10697
'@typescript-eslint/no-empty-object-type': 'off',
10798
'@typescript-eslint/no-explicit-any': 'off',
99+
},
100+
},
101+
{
102+
ignores: ['src/gen/**'],
103+
files: ['src/**/*.{js,ts}'],
104+
plugins: {
105+
jsdoc,
106+
},
107+
rules: {
108108
'jsdoc/no-types': 'error',
109109
'jsdoc/check-param-names': ['error', { checkDestructured: false }],
110110
'jsdoc/check-tag-names': [

src/gen/chat/ChatApi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export class ChatApi {
186186
is_confusable_folding_enabled: request?.is_confusable_folding_enabled,
187187
is_leet_check_enabled: request?.is_leet_check_enabled,
188188
is_plural_check_enabled: request?.is_plural_check_enabled,
189+
is_substring_matching_enabled: request?.is_substring_matching_enabled,
189190
team: request?.team,
190191
type: request?.type,
191192
};
@@ -232,6 +233,7 @@ export class ChatApi {
232233
is_confusable_folding_enabled: request?.is_confusable_folding_enabled,
233234
is_leet_check_enabled: request?.is_leet_check_enabled,
234235
is_plural_check_enabled: request?.is_plural_check_enabled,
236+
is_substring_matching_enabled: request?.is_substring_matching_enabled,
235237
team: request?.team,
236238
words: request?.words,
237239
};

src/gen/model-decoders/decoders.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,13 @@ decoders['ListDevicesResponse'] = (input?: { [key: string]: any }) => {
998998
return decode(typeMappings, input);
999999
};
10001000

1001+
decoders['ListQueuesResponse'] = (input?: { [key: string]: any }) => {
1002+
const typeMappings: TypeMapping = {
1003+
queues: { type: 'ModerationQueueResponse', isSingle: false },
1004+
};
1005+
return decode(typeMappings, input);
1006+
};
1007+
10011008
decoders['ListUserGroupsResponse'] = (input?: { [key: string]: any }) => {
10021009
const typeMappings: TypeMapping = {
10031010
user_groups: { type: 'UserGroupResponse', isSingle: false },
@@ -1353,6 +1360,15 @@ decoders['ModerationMarkReviewedEvent'] = (input?: { [key: string]: any }) => {
13531360
return decode(typeMappings, input);
13541361
};
13551362

1363+
decoders['ModerationQueueResponse'] = (input?: { [key: string]: any }) => {
1364+
const typeMappings: TypeMapping = {
1365+
created_at: { type: 'DatetimeType', isSingle: true },
1366+
1367+
updated_at: { type: 'DatetimeType', isSingle: true },
1368+
};
1369+
return decode(typeMappings, input);
1370+
};
1371+
13561372
decoders['MuteChannelResponse'] = (input?: { [key: string]: any }) => {
13571373
const typeMappings: TypeMapping = {
13581374
channel_mutes: { type: 'ChannelMute', isSingle: false },
@@ -1822,6 +1838,13 @@ decoders['QueryUsersResponse'] = (input?: { [key: string]: any }) => {
18221838
return decode(typeMappings, input);
18231839
};
18241840

1841+
decoders['QueueResponse'] = (input?: { [key: string]: any }) => {
1842+
const typeMappings: TypeMapping = {
1843+
queue: { type: 'ModerationQueueResponse', isSingle: true },
1844+
};
1845+
return decode(typeMappings, input);
1846+
};
1847+
18251848
decoders['Reaction'] = (input?: { [key: string]: any }) => {
18261849
const typeMappings: TypeMapping = {
18271850
created_at: { type: 'DatetimeType', isSingle: true },
@@ -2453,6 +2476,13 @@ decoders['UserGroupDeletedEvent'] = (input?: { [key: string]: any }) => {
24532476
return decode(typeMappings, input);
24542477
};
24552478

2479+
decoders['UserGroupMember'] = (input?: { [key: string]: any }) => {
2480+
const typeMappings: TypeMapping = {
2481+
created_at: { type: 'DatetimeType', isSingle: true },
2482+
};
2483+
return decode(typeMappings, input);
2484+
};
2485+
24562486
decoders['UserGroupMemberAddedEvent'] = (input?: { [key: string]: any }) => {
24572487
const typeMappings: TypeMapping = {
24582488
created_at: { type: 'DatetimeType', isSingle: true },
@@ -2480,6 +2510,8 @@ decoders['UserGroupResponse'] = (input?: { [key: string]: any }) => {
24802510
created_at: { type: 'DatetimeType', isSingle: true },
24812511

24822512
updated_at: { type: 'DatetimeType', isSingle: true },
2513+
2514+
members: { type: 'UserGroupMember', isSingle: false },
24832515
};
24842516
return decode(typeMappings, input);
24852517
};

src/gen/models/index.ts

Lines changed: 120 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,8 @@ export interface BlockListResponse {
767767

768768
is_plural_check_enabled: boolean;
769769

770+
is_substring_matching_enabled: boolean;
771+
770772
/**
771773
* Block list name
772774
*/
@@ -1070,7 +1072,7 @@ export interface CastPollVoteRequest {
10701072
vote?: VoteData;
10711073
}
10721074

1073-
export interface ChannelConfig {
1075+
export interface ChannelConfigOverrides {
10741076
blocklist?: string;
10751077

10761078
blocklist_behavior?: 'flag' | 'block';
@@ -1465,7 +1467,7 @@ export interface ChannelInput {
14651467

14661468
members?: Array<ChannelMemberRequest>;
14671469

1468-
config_overrides?: ChannelConfig;
1470+
config_overrides?: ChannelConfigOverrides;
14691471

14701472
created_by?: UserRequest;
14711473

@@ -1659,6 +1661,7 @@ export const ChannelOwnCapability = {
16591661
CAST_POLL_VOTE: 'cast-poll-vote',
16601662
CONNECT_EVENTS: 'connect-events',
16611663
CREATE_ATTACHMENT: 'create-attachment',
1664+
CREATE_MENTION: 'create-mention',
16621665
DELETE_ANY_MESSAGE: 'delete-any-message',
16631666
DELETE_CHANNEL: 'delete-channel',
16641667
DELETE_OWN_MESSAGE: 'delete-own-message',
@@ -2651,6 +2654,8 @@ export interface CreateBlockListRequest {
26512654

26522655
is_plural_check_enabled?: boolean;
26532656

2657+
is_substring_matching_enabled?: boolean;
2658+
26542659
team?: string;
26552660

26562661
/**
@@ -2779,6 +2784,18 @@ export interface CreatePollRequest {
27792784
custom?: Record<string, any>;
27802785
}
27812786

2787+
export interface CreateQueueRequest {
2788+
name: string;
2789+
2790+
type: 'personal_view' | 'operational_queue';
2791+
2792+
description?: string;
2793+
2794+
sort?: Array<Record<string, any>>;
2795+
2796+
filters?: Record<string, any>;
2797+
}
2798+
27822799
export interface CreateReminderRequest {
27832800
remind_at?: Date;
27842801
}
@@ -2971,6 +2988,8 @@ export interface DeleteModerationConfigResponse {
29712988
duration: string;
29722989
}
29732990

2991+
export interface DeleteQueueRequest {}
2992+
29742993
export interface DeleteReactionRequestPayload {
29752994
/**
29762995
* ID of the reaction to delete (alternative to item_id)
@@ -3852,6 +3871,15 @@ export interface FlagFeedbackResponse {
38523871
labels: Array<LabelResponse>;
38533872
}
38543873

3874+
export interface FlagItemResponse {
3875+
duration: string;
3876+
3877+
/**
3878+
* Unique identifier of the created moderation item
3879+
*/
3880+
item_id: string;
3881+
}
3882+
38553883
export interface FlagMessageDetailsResponse {
38563884
pin_changed?: boolean;
38573885

@@ -3891,15 +3919,6 @@ export interface FlagRequest {
38913919
moderation_payload?: ModerationPayload;
38923920
}
38933921

3894-
export interface FlagResponse {
3895-
duration: string;
3896-
3897-
/**
3898-
* Unique identifier of the created moderation item
3899-
*/
3900-
item_id: string;
3901-
}
3902-
39033922
export interface FlagUserOptions {
39043923
reason?: string;
39053924
}
@@ -4477,6 +4496,15 @@ export interface ListDevicesResponse {
44774496
devices: Array<DeviceResponse>;
44784497
}
44794498

4499+
export interface ListQueuesResponse {
4500+
/**
4501+
* Duration of the request in milliseconds
4502+
*/
4503+
duration: string;
4504+
4505+
queues: Array<ModerationQueueResponse>;
4506+
}
4507+
44804508
export interface ListUserGroupsResponse {
44814509
duration: string;
44824510

@@ -5861,6 +5889,10 @@ export interface ModerationActionConfigResponse {
58615889
custom?: Record<string, any>;
58625890
}
58635891

5892+
export interface ModerationBanResponse {
5893+
duration: string;
5894+
}
5895+
58645896
export interface ModerationCustomActionEvent {
58655897
/**
58665898
* The ID of the custom action that was executed
@@ -5952,21 +5984,39 @@ export interface ModerationMarkReviewedEvent {
59525984
}
59535985

59545986
export interface ModerationPayload {
5987+
image_ordered_keys?: Array<string>;
5988+
59555989
images?: Array<string>;
59565990

5991+
text_ordered_keys?: Array<string>;
5992+
59575993
texts?: Array<string>;
59585994

59595995
videos?: Array<string>;
59605996

59615997
custom?: Record<string, any>;
5998+
5999+
image_ids?: Record<string, string>;
6000+
6001+
text_ids?: Record<string, string>;
59626002
}
59636003

59646004
export interface ModerationPayloadResponse {
6005+
/**
6006+
* Caller-supplied keys for images, index-aligned with images[]
6007+
*/
6008+
image_ordered_keys?: Array<string>;
6009+
59656010
/**
59666011
* Image URLs to moderate
59676012
*/
59686013
images?: Array<string>;
59696014

6015+
/**
6016+
* Caller-supplied keys for texts (e.g. "title", "description"), index-aligned with texts[]
6017+
*/
6018+
text_ordered_keys?: Array<string>;
6019+
59706020
/**
59716021
* Text content to moderate
59726022
*/
@@ -5981,6 +6031,38 @@ export interface ModerationPayloadResponse {
59816031
* Custom data for moderation
59826032
*/
59836033
custom?: Record<string, any>;
6034+
6035+
/**
6036+
* Caller-supplied content IDs per image key (from content_ids on /analyze)
6037+
*/
6038+
image_ids?: Record<string, string>;
6039+
6040+
/**
6041+
* Caller-supplied content IDs per text key (from content_ids on /analyze)
6042+
*/
6043+
text_ids?: Record<string, string>;
6044+
}
6045+
6046+
export interface ModerationQueueResponse {
6047+
created_at: Date;
6048+
6049+
created_by: string;
6050+
6051+
description: string;
6052+
6053+
id: string;
6054+
6055+
item_count: number;
6056+
6057+
name: string;
6058+
6059+
type: string;
6060+
6061+
updated_at: Date;
6062+
6063+
sort: Array<Record<string, any>>;
6064+
6065+
filters: Record<string, any>;
59846066
}
59856067

59866068
export interface ModerationResponse {
@@ -7898,6 +7980,15 @@ export interface QueryUsersResponse {
78987980
users: Array<FullUserResponse>;
78997981
}
79007982

7983+
export interface QueueResponse {
7984+
/**
7985+
* Duration of the request in milliseconds
7986+
*/
7987+
duration: string;
7988+
7989+
queue?: ModerationQueueResponse;
7990+
}
7991+
79017992
export interface Reaction {
79027993
activity_id: string;
79037994

@@ -9238,6 +9329,10 @@ export interface TextContentParameters {
92389329

92399330
severity?: string;
92409331

9332+
text_length?: number;
9333+
9334+
text_length_operator?: string;
9335+
92419336
blocklist_match?: Array<string>;
92429337

92439338
harm_labels?: Array<string>;
@@ -9748,6 +9843,8 @@ export interface UpdateBlockListRequest {
97489843

97499844
is_plural_check_enabled?: boolean;
97509845

9846+
is_substring_matching_enabled?: boolean;
9847+
97519848
team?: string;
97529849

97539850
/**
@@ -10050,6 +10147,16 @@ export interface UpdatePollRequest {
1005010147
custom?: Record<string, any>;
1005110148
}
1005210149

10150+
export interface UpdateQueueRequest {
10151+
description?: string;
10152+
10153+
name?: string;
10154+
10155+
sort?: Array<Record<string, any>>;
10156+
10157+
filters?: Record<string, any>;
10158+
}
10159+
1005310160
export interface UpdateReminderRequest {
1005410161
remind_at?: Date;
1005510162
}
@@ -10631,6 +10738,8 @@ export interface UserGroupResponse {
1063110738
description?: string;
1063210739

1063310740
team_id?: string;
10741+
10742+
members?: Array<UserGroupMember>;
1063410743
}
1063510744

1063610745
export interface UserGroupUpdatedEvent {

0 commit comments

Comments
 (0)