
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@ionq/storage-client
Advanced tools
This library provides a unified interface for interacting with different cloud storage providers, such as Google Cloud Storage (GCS) and Amazon S3.
createStorageProvider(type, options)The createStorageProvider factory function is the primary way to create a storage provider instance.
type: The type of storage provider to create. Use the StorageProviderType enum (GCS or S3).options: The configuration options for the specific provider. These are passed directly to the underlying SDK.IStorageProviderAll storage providers implement the IStorageProvider interface, which defines the following methods:
get(bucket: string, path: string): Promise<Buffer>getStream(bucket: string, path: string): Readableput(bucket: string, path: string, content: Buffer | string): Promise<void>putStream(bucket: string, path: string): Writabledelete(bucket: string, path: string): Promise<void>list(bucket: string, prefix?: string): Promise<string[]>import {
createStorageProvider,
StorageProviderType,
StorageOptions,
} from '@ionq/storage-client';
const gcsOptions: StorageOptions = {
projectId: 'your-gcp-project-id',
keyFilename: '/path/to/your/keyfile.json',
};
const gcsProvider = createStorageProvider(StorageProviderType.GCS, gcsOptions);
async function runGCSExample() {
const bucket = 'my-gcs-bucket';
const path = 'my-file.txt';
const content = 'Hello, GCS!';
await gcsProvider.put(bucket, path, content);
console.log('File uploaded to GCS.');
const fileContent = await gcsProvider.get(bucket, path);
console.log('File content from GCS:', fileContent.toString());
}
runGCSExample();
import {
createStorageProvider,
StorageProviderType,
S3ClientConfig,
} from '@ionq/storage-client';
const s3Options: S3ClientConfig = {
region: 'us-east-1',
credentials: {
accessKeyId: 'YOUR_AWS_ACCESS_KEY_ID',
secretAccessKey: 'YOUR_AWS_SECRET_ACCESS_KEY',
},
};
const s3Provider = createStorageProvider(StorageProviderType.S3, s3Options);
async function runS3Example() {
const bucket = 'my-s3-bucket';
const path = 'my-file.txt';
const content = 'Hello, S3!';
await s3Provider.put(bucket, path, content);
console.log('File uploaded to S3.');
const fileContent = await s3Provider.get(bucket, path);
console.log('File content from S3:', fileContent.toString());
}
runS3Example();
FAQs
A vendor-agnostic storage client for GCS, S3, and Signed URLs
We found that @ionq/storage-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 72 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.