Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 4 additions & 31 deletions src/gen/model-decoders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ decoders.ExportUserResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.Flag2 = (input?: Record<string, any>) => {
decoders.Flag = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

Expand All @@ -699,17 +699,6 @@ decoders.Flag2 = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.Flag2Response = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

updated_at: { type: 'DatetimeType', isSingle: true },

user: { type: 'UserResponse', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.FlagDetails = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
automod: { type: 'AutomodDetails', isSingle: true },
Expand All @@ -736,6 +725,8 @@ decoders.FullUserResponse = (input?: Record<string, any>) => {

mutes: { type: 'UserMuteResponse', isSingle: false },

ban_expires: { type: 'DatetimeType', isSingle: true },

deactivated_at: { type: 'DatetimeType', isSingle: true },

deleted_at: { type: 'DatetimeType', isSingle: true },
Expand Down Expand Up @@ -1192,15 +1183,6 @@ decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.ModerationUsageStats = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
reference_date: { type: 'DatetimeType', isSingle: true },

updated_at: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.MuteChannelResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
channel_mutes: { type: 'ChannelMute', isSingle: false },
Expand Down Expand Up @@ -1528,13 +1510,6 @@ decoders.QueryThreadsResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.QueryUsageStatsResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
items: { type: 'ModerationUsageStats', isSingle: false },
};
return decode(typeMappings, input);
};

decoders.QueryUsersResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
users: { type: 'FullUserResponse', isSingle: false },
Expand Down Expand Up @@ -1599,7 +1574,7 @@ decoders.ReviewQueueItem = (input?: Record<string, any>) => {

bans: { type: 'Ban', isSingle: false },

flags: { type: 'Flag2', isSingle: false },
flags: { type: 'Flag', isSingle: false },

assigned_to: { type: 'User', isSingle: true },

Expand All @@ -1622,8 +1597,6 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {

bans: { type: 'Ban', isSingle: false },

flags: { type: 'Flag2Response', isSingle: false },

completed_at: { type: 'DatetimeType', isSingle: true },

reviewed_at: { type: 'DatetimeType', isSingle: true },
Expand Down
191 changes: 44 additions & 147 deletions src/gen/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2395,8 +2395,6 @@ export interface CheckRequest {

config_team?: string;

test_mode?: boolean;

user_id?: string;

moderation_payload?: ModerationPayload;
Expand Down Expand Up @@ -3467,8 +3465,6 @@ export interface ExternalStorageResponse {
export interface FPSStats {
average_fps: number;

harmonic_fps: number;

tracked: number;
}

Expand Down Expand Up @@ -3543,36 +3539,6 @@ export interface FirebaseConfigFields {
export interface Flag {
created_at: Date;

created_by_automod: boolean;

updated_at: Date;

approved_at?: Date;

reason?: string;

rejected_at?: Date;

reviewed_at?: Date;

reviewed_by?: string;

target_message_id?: string;

custom?: Record<string, any>;

details?: FlagDetails;

target_message?: Message;

target_user?: User;

user?: User;
}

export interface Flag2 {
created_at: Date;

entity_id: string;

entity_type: string;
Expand Down Expand Up @@ -3600,36 +3566,6 @@ export interface Flag2 {
user?: User;
}

export interface Flag2Response {
created_at: Date;

entity_id: string;

entity_type: string;

updated_at: Date;

user_id: string;

result: Array<Record<string, any>>;

entity_creator_id?: string;

reason?: string;

review_queue_item_id?: string;

type?: string;

labels?: string[];

custom?: Record<string, any>;

moderation_payload?: ModerationPayload;

user?: UserResponse;
}

export interface FlagDetails {
original_text: string;

Expand Down Expand Up @@ -3763,6 +3699,8 @@ export interface FullUserResponse {

custom: Record<string, any>;

ban_expires?: Date;

deactivated_at?: Date;

deleted_at?: Date;
Expand Down Expand Up @@ -5232,22 +5170,6 @@ export interface ModerationCustomActionEvent {
user?: User;
}

export interface ModerationEvent {
created_at: Date;

custom: Record<string, any>;

type: string;

received_at?: Date;

flags?: Flag2Response[];

action?: ActionLogResponse;

review_queue_item?: ReviewQueueItemResponse;
}

export interface ModerationFlaggedEvent {
created_at: Date;

Expand Down Expand Up @@ -5292,22 +5214,6 @@ export interface ModerationResponse {
toxic: number;
}

export interface ModerationUsageStats {
app_pk: number;

id: number;

organization_id: number;

reference_date: Date;

updated_at: Date;

usage_amount: number;

usage_type: string;
}

export interface ModerationV2Response {
action: string;

Expand All @@ -5324,20 +5230,6 @@ export interface ModerationV2Response {
text_harms?: string[];
}

export interface ModeratorStats {
id: string;

items_reviewed: number;

action_counts: Record<string, number>;
}

export interface ModeratorStatsResponse {
duration: string;

moderator_stats: ModeratorStats[];
}

export interface MuteChannelRequest {
expiration?: number;

Expand Down Expand Up @@ -5468,6 +5360,10 @@ export interface NotificationSettings {

export interface NullTime {}

export interface OCRConfig {
rules?: BodyguardRule[];
}

export interface OnlyUserID {
id: string;
}
Expand Down Expand Up @@ -6576,32 +6472,6 @@ export interface QueryThreadsResponse {
prev?: string;
}

export interface QueryUsageStatsRequest {
limit?: number;

next?: string;

prev?: string;

user_id?: string;

sort?: SortParamRequest[];

filter?: Record<string, any>;

user?: UserRequest;
}

export interface QueryUsageStatsResponse {
duration: string;

items: ModerationUsageStats[];

next?: string;

prev?: string;
}

export interface QueryUserFeedbackRequest {
limit?: number;

Expand Down Expand Up @@ -6648,14 +6518,6 @@ export interface QueryUsersResponse {
users: FullUserResponse[];
}

export interface QueueStatsResponse {
avg_time_to_action: number;

duration: string;

time_to_action_buckets: Record<string, number>;
}

export interface RTMPBroadcastRequest {
name: string;

Expand Down Expand Up @@ -7007,7 +6869,7 @@ export interface ReviewQueueItem {

bans: Ban[];

flags: Flag2[];
flags: Flag[];

languages: string[];

Expand All @@ -7028,6 +6890,22 @@ export interface ReviewQueueItem {
moderation_payload?: ModerationPayload;
}

export interface ReviewQueueItemNewEvent {
created_at: Date;

custom: Record<string, any>;

type: string;

received_at?: Date;

flags?: FlagResponse[];

action?: ActionLogResponse;

review_queue_item?: ReviewQueueItemResponse;
}

export interface ReviewQueueItemResponse {
ai_text_severity: string;

Expand All @@ -7053,7 +6931,7 @@ export interface ReviewQueueItemResponse {

bans: Ban[];

flags: Flag2Response[];
flags: FlagResponse[];

languages: string[];

Expand All @@ -7078,6 +6956,22 @@ export interface ReviewQueueItemResponse {
moderation_payload?: ModerationPayload;
}

export interface ReviewQueueItemUpdatedEvent {
created_at: Date;

custom: Record<string, any>;

type: string;

received_at?: Date;

flags?: FlagResponse[];

action?: ActionLogResponse;

review_queue_item?: ReviewQueueItemResponse;
}

export interface RingSettings {
auto_cancel_timeout_ms: number;

Expand Down Expand Up @@ -7961,7 +7855,8 @@ export interface TranslateMessageRequest {
| 'uk'
| 'ur'
| 'vi'
| 'lt';
| 'lt'
| 'ht';
}

export interface TruncateChannelRequest {
Expand Down Expand Up @@ -8695,6 +8590,8 @@ export interface UpsertConfigRequest {

google_vision_config?: GoogleVisionConfig;

ocr_config?: OCRConfig;

user?: UserRequest;

velocity_filter_config?: VelocityFilterConfig;
Expand Down
Loading
Loading