declare module 'react-native-cos-sdk' {
  export type SessionCredential = {
    tmpSecretId: string;
    tmpSecretKey: string;
    sessionToken: string;
    startTime?: number;
    expiredTime?: number;
  };

  export function initWithSessionCredentialCallback(cb: () => Promise<SessionCredential> | SessionCredential): Promise<void> | void;

  export function registerDefaultService(config: { region: string; isHttps?: boolean; isDebuggable?: boolean }): Promise<any>;

  export function registerDefaultTransferManger(
    serviceConfig: { region: string; isHttps?: boolean; isDebuggable?: boolean },
    transferConfig: {
      forceSimpleUpload?: boolean;
      enableVerification?: boolean;
      divisionForUpload?: number;
      sliceSizeForUpload?: number;
    }
  ): Promise<any>;

  export function getDefaultTransferManger(): any;

  export default {
    initWithSessionCredentialCallback,
    registerDefaultService,
    registerDefaultTransferManger,
    getDefaultTransferManger,
  };
}


