Comparing version 4.6.5 to 4.6.6
@@ -35,2 +35,3 @@ "use strict"; | ||
const axios_1 = __importDefault(require("axios")); | ||
const bf_types_1 = require("bf-types"); | ||
const common_1 = require("../common"); | ||
@@ -161,3 +162,8 @@ const system_1 = __importStar(require("../system")); | ||
} | ||
const api = Object.freeze(Utils_1.makeCallable(request, { get, delete: del, post, put, search })); | ||
function attachment(filesystem) { | ||
const baseUrl = system_1.default.nexus.getUrl(); | ||
const url = `${baseUrl}/${sanitizeUri('attachment/file')}`; | ||
return filesystem.module_name === bf_types_1.CORE_MODULES.FILESYSTEM ? `${url}/${filesystem.module_id}` : url; | ||
} | ||
const api = Object.freeze(Utils_1.makeCallable(request, { get, delete: del, post, put, search, attachment })); | ||
exports.default = system_1.default.sealModule(api); |
@@ -1,2 +0,2 @@ | ||
import { Domain, DomainModule, SearchFilter, SearchOptions as BfSearchOptions } from 'bf-types'; | ||
import { Domain, DomainModule, ModuleLink, SearchFilter, SearchOptions as BfSearchOptions } from 'bf-types'; | ||
import { Nullable } from '../common'; | ||
@@ -16,2 +16,3 @@ import type { HeadersType, ObjectType } from '../system/Types'; | ||
search: <T = any, H extends HeadersType = HeadersType>(domain: Domain, module: DomainModule, filters: SearchFilter[], options?: SearchOptions<H>) => Promise<T[]>; | ||
attachment: (filesytem: ModuleLink) => string; | ||
} |
{ | ||
"name": "bf-lib", | ||
"version": "4.6.5", | ||
"version": "4.6.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "the standard client library for block-5 software", |
147023
3432