@ido_kawaz/storage-client 1.0.0 → 1.0.1

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.
@@ -0,0 +1,3 @@
1
+ export { StorageClient } from './storageClient';
2
+ export { StorageClientConfig, StorageError, UploadObjectOptions } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Readable } from "stream";
2
+ import { StorageClientConfig, UploadObjectOptions } from "./types";
3
+ export declare class StorageClient {
4
+ private readonly config;
5
+ private client;
6
+ constructor(config: StorageClientConfig);
7
+ ensureBucket: (bucketName: string) => Promise<void>;
8
+ deleteBucket: (bucketName: string) => Promise<void>;
9
+ uploadObject: (bucketName: string, objectKey: string, objectData: Readable, options?: UploadObjectOptions) => Promise<void>;
10
+ }
11
+ //# sourceMappingURL=storageClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageClient.d.ts","sourceRoot":"","sources":["../src/storageClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAgB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEjF,qBAAa,aAAa;IAEV,OAAO,CAAC,QAAQ,CAAC,MAAM;IADnC,OAAO,CAAC,MAAM,CAAW;gBACI,MAAM,EAAE,mBAAmB;IAGxD,YAAY,GAAU,YAAY,MAAM,mBAQtC;IACF,YAAY,GAAU,YAAY,MAAM,mBAMtC;IAEF,YAAY,GAAU,YAAY,MAAM,EAAE,WAAW,MAAM,EAAE,YAAY,QAAQ,EAAE,UAAU,mBAAmB,mBAqB/G;CACJ"}
@@ -0,0 +1,12 @@
1
+ import { S3ClientConfig, S3ServiceException } from "@aws-sdk/client-s3";
2
+ export interface StorageClientConfig extends S3ClientConfig {
3
+ partSize: number;
4
+ maxConcurrency: number;
5
+ }
6
+ export declare class StorageError extends Error {
7
+ constructor(operation: string, error: S3ServiceException, details: {});
8
+ }
9
+ export interface UploadObjectOptions {
10
+ ensureBucket: boolean;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACvB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE;CAIxE;AAED,MAAM,WAAW,mBAAmB;IAChC,YAAY,EAAE,OAAO,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ido_kawaz/storage-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Storage client library for Kawaz Plus services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",