You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
import {
 | 
						|
  Quote,
 | 
						|
  AttachmentPointer,
 | 
						|
  Preview,
 | 
						|
} from '../../ts/session/messages/outgoing';
 | 
						|
 | 
						|
interface UploadResponse {
 | 
						|
  url: string;
 | 
						|
  id?: number;
 | 
						|
}
 | 
						|
 | 
						|
export interface LokiAppDotNetServerInterface {
 | 
						|
  setAvatar(url: any, profileKey: any);
 | 
						|
  findOrCreateChannel(
 | 
						|
    api: LokiPublicChatFactoryAPI,
 | 
						|
    channelId: number,
 | 
						|
    conversationId: string
 | 
						|
  ): Promise<LokiPublicChannelAPI>;
 | 
						|
  uploadData(data: FormData): Promise<UploadResponse>;
 | 
						|
  uploadAvatar(data: FormData): Promise<UploadResponse>;
 | 
						|
  putAttachment(data: ArrayBuffer): Promise<UploadResponse>;
 | 
						|
  putAvatar(data: ArrayBuffer): Promise<UploadResponse>;
 | 
						|
  downloadAttachment(url: String): Promise<ArrayBuffer>;
 | 
						|
}
 | 
						|
 | 
						|
export interface LokiPublicChannelAPI {
 | 
						|
  banUser(source: string): Promise<boolean>;
 | 
						|
  getModerators: () => Promise<Array<string>>;
 | 
						|
  serverAPI: any;
 | 
						|
  deleteMessages(arg0: any[]);
 | 
						|
  sendMessage(
 | 
						|
    data: {
 | 
						|
      quote?: Quote;
 | 
						|
      attachments: Array<AttachmentPointer>;
 | 
						|
      preview: Array<Preview>;
 | 
						|
      body?: string;
 | 
						|
    },
 | 
						|
    timestamp: number
 | 
						|
  ): Promise<{ serverId; serverTimestamp }>;
 | 
						|
}
 | 
						|
 | 
						|
declare class LokiAppDotNetServerAPI implements LokiAppDotNetServerInterface {
 | 
						|
  public baseServerUrl: string;
 | 
						|
  constructor(ourKey: string, url: string);
 | 
						|
}
 | 
						|
 | 
						|
export default LokiAppDotNetServerAPI;
 |