Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Mark storage module as deprecated #894

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os
from typing import List, Optional
from warnings import warn

import requests
from minio import Minio
Expand All @@ -17,6 +18,9 @@
LOG.setLevel(logging.DEBUG if DEBUG else logging.INFO)


warn(f"The module {__name__} is deprecated.", DeprecationWarning, stacklevel=2)


class StorageClientError(Exception):
"""
Raises when some error happens when interacting with storage.
Expand Down
3 changes: 3 additions & 0 deletions packages/sdk/typescript/human-protocol-sdk/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { UploadFile, StorageCredentials, StorageParams } from './types';
import { isValidUrl } from './utils';
import { HttpStatus } from './constants';

/**
* @deprecated StorageClient is deprecated. Use Minio.Client directly.
*/
export class StorageClient {
private client: Minio.Client;
private clientParams: StorageParams;
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/typescript/human-protocol-sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export enum EscrowStatus {
/**
* AWS/GCP cloud storage access data
* @readonly
* @deprecated StorageClient is deprecated. Use Minio.Client directly.
*/
export type StorageCredentials = {
/**
Expand All @@ -45,6 +46,9 @@ export type StorageCredentials = {
secretKey: string;
};

/**
* @deprecated StorageClient is deprecated. Use Minio.Client directly.
*/
export type StorageParams = {
/**
* Request endPoint
Expand Down