Skip to content

Commit

Permalink
fix: remove invalid request parameter (#9)
Browse files Browse the repository at this point in the history
* fix: remove invalid request parameter

* chore(release): bump package version to 1.0.2
  • Loading branch information
fabio-nettis committed Mar 28, 2024
1 parent 3e39548 commit f72087d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<br />

<p align="center">
<a href="https://github.com/hellhub-collective/sdk/actions/workflows/github-code-scanning/codeql">
<img src="https://github.com/hellhub-collective/sdk/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main" alt="Tests" />
<a href="https://github.com/hellhub-collective/sdk/actions/workflows/github-code-scanning/codeql">
<img src="https://github.com/hellhub-collective/sdk/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main" alt="CodeQL" />
</a>
<a href="https://github.com/hellhub-collective/sdk/actions/workflows/test.yml">
<img src="https://github.com/hellhub-collective/sdk/actions/workflows/test.yml/badge.svg" alt="Tests" />
Expand All @@ -20,7 +20,7 @@
<img src="https://img.shields.io/bundlephobia/min/@hellhub-collective/sdk" alt="Bundle Size (Minified)" />
</a>
<a href="https://bundlephobia.com/package/@hellhub-collective/sdk">
<img src="https://img.shields.io/bundlephobia/minzip/@hellhub-collective/sdk" alt="alt="Bundle Size (Minified & Zipped)" />
<img src="https://img.shields.io/bundlephobia/minzip/@hellhub-collective/sdk" alt="Bundle Size (Minified & Zipped)" />
</a>
</p>

Expand All @@ -30,15 +30,15 @@ The HellHub SDK is a TypeScript library that provides a simple and easy-to-use i

## Installation

To install the HellHub SDK, you can use npm or yarn or bun. For simplicity, we will use bun in this example:
To install the HellHub SDK, you can use npm, yarn or bun. For simplicity, we will use bun in this example:

```bash
bun add @hellhub-collective/sdk
```

## Usage

To use the HellHub SDK, you will need to import the `HellHub` class from the `@hellhub/sdk` package.
To use the HellHub SDK, you will need to import the `HellHub` class from the `@hellhub-collective/sdk` package.

```typescript
import HellHub from "@hellhub-collective/sdk";
Expand All @@ -53,12 +53,10 @@ const response = await HellHub.planets(1);
// get a list of all planets
const response = await HellHub.planets();

// get a list of planets with a filter
// get a list of planets with a filter and limit
const response = await HellHub.planets({
limit: 15,
filters: {
name: { $contains: "a", mode: "insensitive" },
},
filters: { name: { $contains: "Earth" } },
});
```

Expand All @@ -72,9 +70,7 @@ import HellHub, { type Planet } from "@hellhub-collective/sdk";
const response = await HellHub.request<Planet[]>("/sectors/1/planets", {
query: {
limit: 15,
filters: {
name: { $contains: "a", mode: "insensitive" },
},
filters: { name: { $contains: "Earth" } },
},
});
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "MIT",
"private": false,
"description": "The official SDK for HellHub API. Filter and collect data with full type safety out of the box.",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.mjs",
"types": "dist/index.d.ts",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion types/query-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export type FieldOperator<T, K extends keyof T> = {
$equals?: T[K];
$in?: Array<T[K]>;
$notIn?: Array<T[K]>;
$mode?: "default" | "insensitive";
} & (T[K] extends string
? {
$search?: T[K];
Expand Down

0 comments on commit f72087d

Please sign in to comment.