import { AuditJobStateType, AuditScanType, AuditType, CallbackTriggerModeType, FreezeModeType } from '../../TosExportEnum'; import TOSBase from '../base'; export interface GetBucketAuditInput { bucket: string; } export interface GetBucketAuditOutputBody { TosAuditConfig: { /** 是否启用 */ Enable: boolean; /** bucket 绑定的内容审核 APP Name */ AppName: string; /** bucket 绑定的内容审核 APP ID */ AppId: number; /** bucket 绑定的内容审核 APP 中文名 */ AppNameZh: string; AppType: string; /** 这是一个示例应用的描述 */ Description: string; }; /** 0 为 Inactive ,1 为 Activating,2 为 ActivationFailed,3 为 Active */ ServiceAppStatus: number; /** 审核服务应用状态消息 */ ServiceAppStatusMessage: string; } export declare type GetBucketAuditOutput = GetBucketAuditOutputBody | null; /** * @private unstable method */ export declare function getBucketAudit(this: TOSBase, input: GetBucketAuditInput): Promise>; export interface PutBucketAuditInput { bucket: string; action: 'create' | 'enable' | 'disable' | 'retry'; } export interface PutBucketAuditOutput { } /** * @private unstable method */ export declare function putBucketAudit(this: TOSBase, input: PutBucketAuditInput): Promise>; export interface ImageAudit { Suffix?: string[]; BizType: string; PerDayLimit?: number; } export interface VideoAudit { Suffix?: string[]; BizType: string; Interval?: number; PerDayLimit?: number; ResultType?: number; } export interface AudioAudit { Suffix?: string[]; BizType: string; PerDayLimit?: number; ResultType?: number; } export interface ScanConf { Objects?: string[]; Type: AuditScanType; ManifestURL?: string[]; ObjectPrefixAllowed?: string[]; ObjectPrefixDenied?: string[]; TimestampStart?: number; TimestampEnd?: number; } export interface CallbackBizs { BizType: string; LabelTexts?: string[]; AuditType: AuditType; } export interface CallbackConf { EnableCallback: boolean; CallbackTriggerMode?: CallbackTriggerModeType; CallbackURL?: { URL: string; Schema: 'https' | 'http'; }; CallbackBizs?: CallbackBizs[]; } export interface FreezeBizs { BizType: string; LabelTexts?: string[]; AuditType: AuditType; } export interface ContentFreezeConf { Enable: boolean; FreezeBizs?: FreezeBizs[]; FreezeMode?: FreezeModeType; FreezePathPrefix?: string; CdnRefresh?: boolean; } export interface AuditItem { JobID: string; State: AuditJobStateType; CreateTime: string; StartTime: string; EndTime: string; Error?: string; Code?: number; Message?: string; ImageAudit?: ImageAudit; VideoAudit?: VideoAudit; AudioAudit?: AudioAudit; ScanConf: ScanConf; ContenFreezeConfig?: ContentFreezeConf; CallbackConfig?: CallbackConf; } export interface ListBucketAuditJobInput { bucket: string; /** * Used to filter the start time of the job, unix timestamp. */ startTime?: number; /** * Used to filter the end time of the job, unix timestamp. */ endTime?: number; /** * The size of pagination, maximum 100? TODO */ pageSize: number; /** * The starting token for pagination. */ pageToken?: string; } export interface ListBucketAuditJobOutput { Items: AuditItem[]; NextPageToken?: string; JobType: string; } /** * @private unstable method */ export declare function listBucketAuditJob(this: TOSBase, input: ListBucketAuditJobInput): Promise>; export interface GetBucketAuditJobInput { bucket: string; jobId: string; } export declare type GetBucketAuditJobOutput = AuditItem | null; /** * @private unstable method */ export declare function getBucketAuditJob(this: TOSBase, input: GetBucketAuditJobInput): Promise>; export interface PostBucketAuditJobInput { bucket?: string; job: { ImageAudit?: ImageAudit; VideoAudit?: VideoAudit; AudioAudit?: AudioAudit; ScanConf: ScanConf; CallbackConfig?: CallbackConf; ContenFreezeConfig?: ContentFreezeConf; }; } export interface PostBucketAuditJobOutput { } /** * @private unstable method */ export declare function postBucketAuditJob(this: TOSBase, input: PostBucketAuditJobInput): Promise>; interface ConfigItem { Name: string; BizType: string; Scene: string; SceneText: string; LabelTexts: string[]; Labels: string; } export interface ListBucketAuditBizTypeOutput { BizType: string; Configs: ConfigItem[]; } export interface ListBucketAuditBizTypeInput { bucket: string; audit_type: string; } /** * @private unstable method */ export declare function listBucketAuditBizType(this: TOSBase, input: ListBucketAuditBizTypeInput): Promise>; export interface IncrementScanConf { ObjectPrefixAllowed?: string[]; ObjectPrefixDenied?: string[]; } export interface PostBucketIncrementAuditInput { bucket?: string; job: { ImageAudit?: ImageAudit; VideoAudit?: VideoAudit; AudioAudit?: AudioAudit; ScanConf: IncrementScanConf; Callback?: CallbackConf; ContentFreezeConf?: ContentFreezeConf; }; } export interface PostBucketIncrementAuditOutput { } /** * @private unstable method */ export declare function postBucketIncrementAudit(this: TOSBase, input: PostBucketIncrementAuditInput): Promise>; export interface ListBucketIncrementAuditsInput { bucket?: string; pageSize: number; /** * The starting token for pagination. */ pageToken?: string; audiType: AuditType; } export interface IncrementAuditItem { RuleId: string; ImageAudit?: ImageAudit; VideoAudit?: VideoAudit; AudioAudit?: AudioAudit; ScanConf: IncrementScanConf; Callback?: CallbackConf; ContentFreezeConf?: ContentFreezeConf; } export interface ListBucketIncrementAuditsOutput { Items: IncrementAuditItem[]; NextPageToken?: string; } /** * @private unstable method */ export declare function listBucketIncrementAudits(this: TOSBase, input: ListBucketIncrementAuditsInput): Promise>; export interface GetBucketIncrementAuditsInput { bucket?: string; ruleId: string; } export declare type GetBucketIncrementAuditsOutput = IncrementAuditItem | null; /** * @private unstable method */ export declare function getBucketIncrementAudit(this: TOSBase, input: GetBucketIncrementAuditsInput): Promise>; export interface DeleteBucketIncrementAuditInput { bucket?: string; ruleId: string; } export declare type DeleteBucketIncrementAuditOutput = {}; /** * @private unstable method */ export declare function deleteBucketIncrementAudit(this: TOSBase, input: DeleteBucketIncrementAuditInput): Promise>; export {};