@spica-devkit/storage 0.9.29 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs DELETED
@@ -1,317 +0,0 @@
1
- import axios_1 from 'axios';
2
-
3
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
-
5
- function createCommonjsModule(fn, basedir, module) {
6
- return module = {
7
- path: basedir,
8
- exports: {},
9
- require: function (path, base) {
10
- return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
11
- }
12
- }, fn(module, module.exports), module.exports;
13
- }
14
-
15
- function commonjsRequire () {
16
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
17
- }
18
-
19
- var request = createCommonjsModule(function (module, exports) {
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.Axios = exports.logWarning = void 0;
22
-
23
- function logWarning(response) {
24
- const warning = response.headers["warning"];
25
- if (warning) {
26
- console.warn(warning);
27
- }
28
- }
29
- exports.logWarning = logWarning;
30
- class Axios {
31
- constructor(config) {
32
- this.interceptors = {
33
- request: {
34
- onFulfilled: (request) => {
35
- request.maxBodyLength = Number.MAX_SAFE_INTEGER;
36
- request.maxContentLength = Number.MAX_SAFE_INTEGER;
37
- if (!request.headers["Authorization"]) {
38
- throw new Error("You should call initialize method with a valid apikey or identity token.");
39
- }
40
- return request;
41
- },
42
- onRejected: (error) => {
43
- return Promise.reject(error);
44
- }
45
- },
46
- response: {
47
- onFulfilled: (response) => {
48
- logWarning(response);
49
- return response.data;
50
- },
51
- onRejected: (error) => {
52
- return Promise.reject(error.response ? error.response.data : error);
53
- }
54
- }
55
- };
56
- this.instance = axios_1.default.create(config);
57
- this.instance.interceptors.request.use(this.interceptors.request.onFulfilled, this.interceptors.request.onRejected);
58
- this.instance.interceptors.response.use(this.interceptors.response.onFulfilled, this.interceptors.response.onRejected);
59
- this.baseUrl = this.instance.defaults.baseURL;
60
- }
61
- setBaseUrl(url) {
62
- this.instance.defaults.baseURL = url;
63
- }
64
- setWriteDefaults(writeDefaults) {
65
- for (const [header, value] of Object.entries(writeDefaults.headers)) {
66
- this.instance.defaults.headers.post[header] = value;
67
- this.instance.defaults.headers.put[header] = value;
68
- }
69
- }
70
- setAuthorization(authorization) {
71
- this.instance.defaults.headers["Authorization"] = authorization;
72
- }
73
- get(url, config) {
74
- return this.instance.get(url, config);
75
- }
76
- post(url, body, config) {
77
- return this.instance.post(url, body, config);
78
- }
79
- put(url, body, config) {
80
- return this.instance.put(url, body, config);
81
- }
82
- patch(url, body, config) {
83
- return this.instance.patch(url, body, config);
84
- }
85
- delete(url, config) {
86
- return this.instance.delete(url, config);
87
- }
88
- request(config) {
89
- return this.instance.request(config);
90
- }
91
- }
92
- exports.Axios = Axios;
93
-
94
- });
95
-
96
- var initialize_1 = createCommonjsModule(function (module, exports) {
97
- Object.defineProperty(exports, "__esModule", { value: true });
98
- exports.isPlatformBrowser = exports.checkInitialized = exports.initialize = void 0;
99
-
100
- let service;
101
- function initialize(options) {
102
- let authorization;
103
- if ("apikey" in options) {
104
- authorization = `APIKEY ${options.apikey}`;
105
- }
106
- else if ("identity" in options) {
107
- authorization = `IDENTITY ${options.identity}`;
108
- }
109
- checkInitialized(authorization);
110
- const publicUrl = options.publicUrl || getPublicUrl();
111
- if (!publicUrl) {
112
- throw new Error("Public url must be provided.");
113
- }
114
- if (!service) {
115
- service = new request.Axios({ baseURL: publicUrl, headers: { Authorization: authorization } });
116
- }
117
- else {
118
- service.setBaseUrl(publicUrl);
119
- service.setAuthorization(authorization);
120
- }
121
- return { authorization, publicUrl, service };
122
- }
123
- exports.initialize = initialize;
124
- function checkInitialized(authorization) {
125
- if (!authorization) {
126
- throw new Error("You should call initialize method with a valid apikey or identity token.");
127
- }
128
- }
129
- exports.checkInitialized = checkInitialized;
130
- function getPublicUrl() {
131
- return isPlatformBrowser() ? undefined : process.env.__INTERNAL__SPICA__PUBLIC_URL__;
132
- }
133
- function isPlatformBrowser() {
134
- return typeof window !== "undefined";
135
- }
136
- exports.isPlatformBrowser = isPlatformBrowser;
137
-
138
- });
139
-
140
- var _interface = createCommonjsModule(function (module, exports) {
141
- Object.defineProperty(exports, "__esModule", { value: true });
142
-
143
- });
144
-
145
- var url = createCommonjsModule(function (module, exports) {
146
- Object.defineProperty(exports, "__esModule", { value: true });
147
- exports.buildUrl = void 0;
148
- function buildUrl(baseUrl, queryParams = {}) {
149
- const url = new URL(baseUrl);
150
- for (let [key, value] of Object.entries(queryParams)) {
151
- if (typeof value != "string") {
152
- value = JSON.stringify(value);
153
- }
154
- url.searchParams.set(key, value);
155
- }
156
- return url;
157
- }
158
- exports.buildUrl = buildUrl;
159
-
160
- });
161
-
162
- var src = createCommonjsModule(function (module, exports) {
163
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
164
- if (k2 === undefined) k2 = k;
165
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
166
- }) : (function(o, m, k, k2) {
167
- if (k2 === undefined) k2 = k;
168
- o[k2] = m[k];
169
- }));
170
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
171
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
172
- };
173
- Object.defineProperty(exports, "__esModule", { value: true });
174
- __exportStar(initialize_1, exports);
175
- __exportStar(_interface, exports);
176
- __exportStar(request, exports);
177
- __exportStar(url, exports);
178
-
179
- });
180
-
181
- var internal_common = createCommonjsModule(function (module, exports) {
182
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
183
- if (k2 === undefined) k2 = k;
184
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
185
- }) : (function(o, m, k, k2) {
186
- if (k2 === undefined) k2 = k;
187
- o[k2] = m[k];
188
- }));
189
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
190
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
191
- };
192
- Object.defineProperty(exports, "__esModule", { value: true });
193
- __exportStar(src, exports);
194
-
195
- });
196
-
197
- function importFormData() {
198
- return require("form-data")();
199
- }
200
- async function preparePostBody(objects) {
201
- let files = [];
202
- if (!Array.isArray(objects)) {
203
- files = Array.from(objects);
204
- }
205
- else {
206
- files = objects;
207
- }
208
- const form = createForm();
209
- for (const file of files) {
210
- appendToForm(form, "files", file);
211
- }
212
- return { body: form, headers: getHeaders(form) };
213
- }
214
- async function preparePutBody(object) {
215
- const form = createForm();
216
- appendToForm(form, "file", object);
217
- return { body: form, headers: getHeaders(form) };
218
- }
219
- function instanceOfBufferWithMeta(value) {
220
- return "data" in value && "name" in value && "contentType" in value;
221
- }
222
- function createForm() {
223
- return internal_common.isPlatformBrowser() ? new FormData() : importFormData();
224
- }
225
- async function appendToForm(form, key, file) {
226
- if (internal_common.isPlatformBrowser()) {
227
- if (instanceOfBufferWithMeta(file)) {
228
- form.append(key, new Blob([file.data], { type: file.contentType }), file.name);
229
- }
230
- else {
231
- form.append(key, file);
232
- }
233
- }
234
- else {
235
- form.append(key, file.data, {
236
- contentType: file.contentType,
237
- filename: file.name
238
- });
239
- }
240
- return form;
241
- }
242
- function getHeaders(form) {
243
- if (!internal_common.isPlatformBrowser()) {
244
- return form.getHeaders();
245
- }
246
- return {};
247
- }
248
-
249
- let authorization;
250
- let service;
251
- function initialize(options) {
252
- const { authorization: _authorization, service: _service } = internal_common.initialize(options);
253
- authorization = _authorization;
254
- service = _service;
255
- }
256
- async function insert(object, onUploadProgress) {
257
- internal_common.checkInitialized(authorization);
258
- const { body, headers } = await preparePostBody([object]);
259
- return service
260
- .post("storage", body, {
261
- onUploadProgress,
262
- headers
263
- })
264
- .then(([r]) => r);
265
- }
266
- async function insertMany(objects, onUploadProgress) {
267
- internal_common.checkInitialized(authorization);
268
- const { body, headers } = await preparePostBody(objects);
269
- return service.post("storage", body, {
270
- onUploadProgress,
271
- headers
272
- });
273
- }
274
- function get(id) {
275
- internal_common.checkInitialized(authorization);
276
- return service.get(`storage/${id}`);
277
- }
278
- /**
279
- * Returns Blob for browser environment, ReadableStream for Nodejs environment
280
- */
281
- function download(id, options = {}) {
282
- internal_common.checkInitialized(authorization);
283
- return service.get(`storage/${id}/view`, {
284
- headers: options.headers,
285
- onDownloadProgress: options.onDownloadProgress,
286
- responseType: internal_common.isPlatformBrowser() ? "blob" : "stream"
287
- });
288
- }
289
- function getAll(queryParams) {
290
- internal_common.checkInitialized(authorization);
291
- return service.get(`storage`, {
292
- params: queryParams
293
- });
294
- }
295
- async function update(id, object, onUploadProgress) {
296
- internal_common.checkInitialized(authorization);
297
- const { body, headers } = await preparePutBody(object);
298
- return service.put(`storage/${id}`, body, {
299
- onUploadProgress,
300
- headers
301
- });
302
- }
303
- async function updateMeta(id, meta) {
304
- internal_common.checkInitialized(authorization);
305
- return service.patch(`storage/${id}`, meta, {
306
- headers: {
307
- "Content-Type": "application/json"
308
- }
309
- });
310
- }
311
- function remove(id) {
312
- internal_common.checkInitialized(authorization);
313
- return service.delete(`storage/${id}`);
314
- }
315
-
316
- export { download, get, getAll, initialize, insert, insertMany, remove, update, updateMeta };
317
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../../../node_modules/@spica-devkit/internal_common/src/request.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/initialize.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/interface.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/url.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/index.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/index.js","../publish/src/utility.js","../publish/src/storage.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Axios = exports.logWarning = void 0;\nconst axios_1 = require(\"axios\");\nfunction logWarning(response) {\n const warning = response.headers[\"warning\"];\n if (warning) {\n console.warn(warning);\n }\n}\nexports.logWarning = logWarning;\nclass Axios {\n constructor(config) {\n this.interceptors = {\n request: {\n onFulfilled: (request) => {\n request.maxBodyLength = Number.MAX_SAFE_INTEGER;\n request.maxContentLength = Number.MAX_SAFE_INTEGER;\n if (!request.headers[\"Authorization\"]) {\n throw new Error(\"You should call initialize method with a valid apikey or identity token.\");\n }\n return request;\n },\n onRejected: (error) => {\n return Promise.reject(error);\n }\n },\n response: {\n onFulfilled: (response) => {\n logWarning(response);\n return response.data;\n },\n onRejected: (error) => {\n return Promise.reject(error.response ? error.response.data : error);\n }\n }\n };\n this.instance = axios_1.default.create(config);\n this.instance.interceptors.request.use(this.interceptors.request.onFulfilled, this.interceptors.request.onRejected);\n this.instance.interceptors.response.use(this.interceptors.response.onFulfilled, this.interceptors.response.onRejected);\n this.baseUrl = this.instance.defaults.baseURL;\n }\n setBaseUrl(url) {\n this.instance.defaults.baseURL = url;\n }\n setWriteDefaults(writeDefaults) {\n for (const [header, value] of Object.entries(writeDefaults.headers)) {\n this.instance.defaults.headers.post[header] = value;\n this.instance.defaults.headers.put[header] = value;\n }\n }\n setAuthorization(authorization) {\n this.instance.defaults.headers[\"Authorization\"] = authorization;\n }\n get(url, config) {\n return this.instance.get(url, config);\n }\n post(url, body, config) {\n return this.instance.post(url, body, config);\n }\n put(url, body, config) {\n return this.instance.put(url, body, config);\n }\n patch(url, body, config) {\n return this.instance.patch(url, body, config);\n }\n delete(url, config) {\n return this.instance.delete(url, config);\n }\n request(config) {\n return this.instance.request(config);\n }\n}\nexports.Axios = Axios;\n//# sourceMappingURL=request.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlatformBrowser = exports.checkInitialized = exports.initialize = void 0;\nconst request_1 = require(\"./request\");\nlet service;\nfunction initialize(options) {\n let authorization;\n if (\"apikey\" in options) {\n authorization = `APIKEY ${options.apikey}`;\n }\n else if (\"identity\" in options) {\n authorization = `IDENTITY ${options.identity}`;\n }\n checkInitialized(authorization);\n const publicUrl = options.publicUrl || getPublicUrl();\n if (!publicUrl) {\n throw new Error(\"Public url must be provided.\");\n }\n if (!service) {\n service = new request_1.Axios({ baseURL: publicUrl, headers: { Authorization: authorization } });\n }\n else {\n service.setBaseUrl(publicUrl);\n service.setAuthorization(authorization);\n }\n return { authorization, publicUrl, service };\n}\nexports.initialize = initialize;\nfunction checkInitialized(authorization) {\n if (!authorization) {\n throw new Error(\"You should call initialize method with a valid apikey or identity token.\");\n }\n}\nexports.checkInitialized = checkInitialized;\nfunction getPublicUrl() {\n return isPlatformBrowser() ? undefined : process.env.__INTERNAL__SPICA__PUBLIC_URL__;\n}\nfunction isPlatformBrowser() {\n return typeof window !== \"undefined\";\n}\nexports.isPlatformBrowser = isPlatformBrowser;\n//# sourceMappingURL=initialize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interface.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildUrl = void 0;\nfunction buildUrl(baseUrl, queryParams = {}) {\n const url = new URL(baseUrl);\n for (let [key, value] of Object.entries(queryParams)) {\n if (typeof value != \"string\") {\n value = JSON.stringify(value);\n }\n url.searchParams.set(key, value);\n }\n return url;\n}\nexports.buildUrl = buildUrl;\n//# sourceMappingURL=url.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./initialize\"), exports);\n__exportStar(require(\"./interface\"), exports);\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./url\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./src\"), exports);\n//# sourceMappingURL=index.js.map","import { isPlatformBrowser } from \"@spica-devkit/internal_common\";\nfunction importFormData() {\n return require(\"form-data\")();\n}\nexport function fileToBuffer(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n}\nexport async function preparePostBody(objects) {\n let files = [];\n if (!Array.isArray(objects)) {\n files = Array.from(objects);\n }\n else {\n files = objects;\n }\n const form = createForm();\n for (const file of files) {\n appendToForm(form, \"files\", file);\n }\n return { body: form, headers: getHeaders(form) };\n}\nexport async function preparePutBody(object) {\n const form = createForm();\n appendToForm(form, \"file\", object);\n return { body: form, headers: getHeaders(form) };\n}\nfunction instanceOfBufferWithMeta(value) {\n return \"data\" in value && \"name\" in value && \"contentType\" in value;\n}\nfunction createForm() {\n return isPlatformBrowser() ? new FormData() : importFormData();\n}\nasync function appendToForm(form, key, file) {\n if (isPlatformBrowser()) {\n if (instanceOfBufferWithMeta(file)) {\n form.append(key, new Blob([file.data], { type: file.contentType }), file.name);\n }\n else {\n form.append(key, file);\n }\n }\n else {\n form.append(key, file.data, {\n contentType: file.contentType,\n filename: file.name\n });\n }\n return form;\n}\nfunction getHeaders(form) {\n if (!isPlatformBrowser()) {\n return form.getHeaders();\n }\n return {};\n}\n//# sourceMappingURL=utility.js.map","import { initialize as _initialize, checkInitialized, isPlatformBrowser } from \"@spica-devkit/internal_common\";\nimport { preparePostBody, preparePutBody } from \"./utility\";\nlet authorization;\nlet service;\nexport function initialize(options) {\n const { authorization: _authorization, service: _service } = _initialize(options);\n authorization = _authorization;\n service = _service;\n}\nexport async function insert(object, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePostBody([object]);\n return service\n .post(\"storage\", body, {\n onUploadProgress,\n headers\n })\n .then(([r]) => r);\n}\nexport async function insertMany(objects, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePostBody(objects);\n return service.post(\"storage\", body, {\n onUploadProgress,\n headers\n });\n}\nexport function get(id) {\n checkInitialized(authorization);\n return service.get(`storage/${id}`);\n}\n/**\n * Returns Blob for browser environment, ReadableStream for Nodejs environment\n */\nexport function download(id, options = {}) {\n checkInitialized(authorization);\n return service.get(`storage/${id}/view`, {\n headers: options.headers,\n onDownloadProgress: options.onDownloadProgress,\n responseType: isPlatformBrowser() ? \"blob\" : \"stream\"\n });\n}\nexport function getAll(queryParams) {\n checkInitialized(authorization);\n return service.get(`storage`, {\n params: queryParams\n });\n}\nexport async function update(id, object, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePutBody(object);\n return service.put(`storage/${id}`, body, {\n onUploadProgress,\n headers\n });\n}\nexport async function updateMeta(id, meta) {\n checkInitialized(authorization);\n return service.patch(`storage/${id}`, meta, {\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n}\nexport function remove(id) {\n checkInitialized(authorization);\n return service.delete(`storage/${id}`);\n}\n//# sourceMappingURL=storage.js.map"],"names":["request_1","this","require$$0","require$$1","require$$2","require$$3","isPlatformBrowser","_initialize","checkInitialized"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,MAAM,CAAC,cAAc,CAAC,OAA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C,aAAa,CAAC,CAAC;AACpC,IAAI,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;AAC3D,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;AAC9C,QAAQ,gBAAgB;AACxB,QAAQ,OAAO;AACf,KAAK,CAAC,CAAC;AACP,CAAC;AACM,eAAe,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE;AAC3C,IAAIA,gCAAgB,CAAC,aAAa,CAAC,CAAC;AACpC,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;AAChD,QAAQ,OAAO,EAAE;AACjB,YAAY,cAAc,EAAE,kBAAkB;AAC9C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;AACM,SAAS,MAAM,CAAC,EAAE,EAAE;AAC3B,IAAIA,gCAAgB,CAAC,aAAa,CAAC,CAAC;AACpC,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3C;;;;"}
@@ -1,2 +0,0 @@
1
- export * from "./storage";
2
- export * from "./interface";
@@ -1,37 +0,0 @@
1
- interface InitializeOptions {
2
- publicUrl?: string;
3
- }
4
- export interface ApikeyInitialization extends InitializeOptions {
5
- apikey: string;
6
- }
7
- export interface IdentityInitialization extends InitializeOptions {
8
- identity: string;
9
- }
10
- export interface InitializationResult {
11
- authorization: string;
12
- publicUrl: string;
13
- }
14
- export interface IndexResult<T> {
15
- meta: {
16
- total: number;
17
- };
18
- data: T[];
19
- }
20
- export interface StorageObject {
21
- _id: string;
22
- name: string;
23
- url: string;
24
- content: {
25
- type: string;
26
- size: number;
27
- };
28
- }
29
- export interface BufferWithMeta {
30
- /**
31
- * string | Buffer | Uint8Array | number[];
32
- */
33
- data: any;
34
- name: string;
35
- contentType: string;
36
- }
37
- export {};
@@ -1,31 +0,0 @@
1
- import { StorageObject, BufferWithMeta, IndexResult, ApikeyInitialization, IdentityInitialization } from "./interface";
2
- export declare function initialize(options: ApikeyInitialization | IdentityInitialization): void;
3
- export declare function insert(object: File | BufferWithMeta, onUploadProgress?: (progress: ProgressEvent) => void): Promise<StorageObject>;
4
- export declare function insertMany(objects: FileList | (File | BufferWithMeta)[], onUploadProgress?: (progress: ProgressEvent) => void): Promise<StorageObject[]>;
5
- export declare function get(id: string): Promise<StorageObject>;
6
- /**
7
- * Returns Blob for browser environment, ReadableStream for Nodejs environment
8
- */
9
- export declare function download(id: string, options?: {
10
- headers?: any;
11
- onDownloadProgress?: (progress: ProgressEvent) => void;
12
- }): Promise<unknown>;
13
- export declare function getAll(queryParams?: {
14
- filter?: object;
15
- paginate?: false;
16
- limit?: number;
17
- skip?: number;
18
- sort?: object;
19
- }): Promise<StorageObject[]>;
20
- export declare function getAll(queryParams?: {
21
- filter?: object;
22
- paginate?: true;
23
- limit?: number;
24
- skip?: number;
25
- sort?: object;
26
- }): Promise<IndexResult<StorageObject>>;
27
- export declare function update(id: string, object: File | BufferWithMeta, onUploadProgress?: (progress: ProgressEvent) => void): Promise<StorageObject>;
28
- export declare function updateMeta(id: string, meta: {
29
- name: string;
30
- }): Promise<StorageObject>;
31
- export declare function remove(id: string): any;
@@ -1,10 +0,0 @@
1
- import { BufferWithMeta } from "./interface";
2
- export declare function fileToBuffer(file: File): Promise<any>;
3
- export declare function preparePostBody(objects: FileList | (BufferWithMeta | File)[]): Promise<{
4
- body: any;
5
- headers: any;
6
- }>;
7
- export declare function preparePutBody(object: File | BufferWithMeta): Promise<{
8
- body: any;
9
- headers: any;
10
- }>;