37 lines
779 B
TypeScript
37 lines
779 B
TypeScript
import BaseNotary from "../BaseCustomer";
|
|
|
|
// TODO Type get query params -> Where + inclue + orderby
|
|
export interface IGetFilesparams {
|
|
where?: {};
|
|
include?: {};
|
|
}
|
|
|
|
// TODO Type getbyuid query params
|
|
|
|
export type IPutFilesParams = {};
|
|
|
|
export interface IPostFilesParams {}
|
|
|
|
export default class OfficeRib extends BaseNotary {
|
|
private static instance: OfficeRib;
|
|
private readonly baseURl = this.namespaceUrl.concat("/office");
|
|
|
|
private constructor() {
|
|
super();
|
|
}
|
|
|
|
public static getInstance() {
|
|
return (this.instance ??= new this());
|
|
}
|
|
|
|
public async getRibStream(uid: string) {
|
|
const url = new URL(this.baseURl.concat(`/${uid}/rib`));
|
|
try {
|
|
return await this.getRequest<any>(url);
|
|
} catch (err) {
|
|
this.onError(err);
|
|
return Promise.reject(err);
|
|
}
|
|
}
|
|
}
|