open-index/open-npm huggingface dataset:
npm package: @sandumo/nestjs-cache-module
Description: This package provides a NestJS module for caching.
Author: Sandu Morari
Latest version: 0.1.0

# @sandumo/nestjs-cache-module

This package provides a NestJS module for interacting with cache.

## Installation

```bash
npm install @sandumo/nestjs-cache-module
```

## Usage

```typescript
import { CacheModule } from '@sandumo/nestjs-cache-module';

@Module({
  imports: [
    CacheModule.forRootAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: (configService: ConfigService) => ({
        redisUrl: configService.get('REDIS_URL'),
      }),
    }),
  ],
})
```
npm package: @sandumo/nestjs-client-ip-decorator
Description: This package provides a NestJS decorator for getting the client IP address.
Author: Sandu Morari
Latest version: 0.0.2

# @sandumo/nestjs-client-ip-decorator

This package provides a NestJS decorator for getting the client IP address.

## Installation

```bash
npm install @sandumo/nestjs-client-ip-decorator
```

## Usage

```typescript
import { ClientIp } from '@sandumo/nestjs-client-ip-decorator';

@Module({
  imports: [
    ClientIpModule.forRootAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: (configService: ConfigService) => ({
        redisUrl: configService.get('REDIS_URL'),
      }),
    }),
  ],
})
```
npm package: @sandumo/nestjs-storage-module
Description: This package provides a NestJS module for storage.
Author: Sandu Morari
Latest version: 1.0.7

# @sandumo/nestjs-storage-module

This package provides a NestJS module for interacting with S3 compatible storage.

## Installation

```bash
npm install @sandumo/nestjs-storage-module
```

## Usage

```typescript
import { StorageModule } from '@sandumo/nestjs-storage-module';

@Module({
  imports: [
    StorageModule.forRootAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: async (configService: ConfigService) => ({
        endpoint: configService.getS3Endpoint(),
        accessKeyId: configService.getS3AccessKeyId(),
        secretAccessKey: configService.getS3SecretAccessKey(),
        bucket: configService.getS3Bucket(),
      }),
    }),
  ]
})
```
npm package: @sandumo/openapi-client-generator
Description: This package generates a client for an OpenAPI specification.
Author: Sandu Morari
Latest version: 0.0.2

# @sandumo/openapi-client-generator

This package generates a client for an OpenAPI specification.

## Installation

```bash
npm install @sandumo/openapi-client-generator
```

## Usage

### Generating client code

```typescript
import { OpenAPIClientGenerator } from '@sandumo/openapi-client-generator';

const schema = JSON.parse(fs.readFileSync('path/to/openapi-schema.json', 'utf8'));
const outputFile = 'path/to/output/file.ts';

new OpenAPIClientGenerator()
  .fromSchema(schema)
  .toPath(outputFile)
  .generate();
```

### Using the generated client

```typescript
import api from './path/to/output/file';

api.axios.defaults.baseURL = 'https://api.example.com'; // api.axios is an Axios instance

await api.users.getUsers();
```

#### react-query

```typescript
import api from './path/to/output/file';

export function ContextSettings() {
  // Set the queryClient for the api-client
  const queryClient = useQueryClient();

  useEffect(() => {
    api.config.queryClient = queryClient;
  }, [queryClient]);

  return <></>;
}

export function Component() {
  const { data: users } = useQuery(api.users.getUsersQuery());

  return <></>
}
```