open-index/open-npm huggingface dataset:
npm package: @rustgrid/sdk
Description: RustGrid first-party TypeScript SDK (generated from OpenAPI, wrapped with ergonomic resources).
Latest version: 0.1.0

# @rustgrid/sdk

First-party TypeScript SDK for RustGrid (HTTP).

- Typed models generated from `openapi.json`
- Ergonomic resources (`rg.tickets.*`, `rg.projects.*`, ...)
- Automatic `x-request-id` propagation
- Optional auth refresh hook
- Tenant scoping via `X-Tenant-Id`

## Install

```bash
pnpm add @rustgrid/sdk
# or
npm i @rustgrid/sdk
```

## Quickstart

```ts
import { RustGrid } from "@rustgrid/sdk";

const rg = new RustGrid({
  baseUrl: "https://app.rustgrid.com",
  tenantId: "<tenant-uuid>",
  accessToken: async () => localStorage.getItem("rg_token"),
  requestId: () => crypto.randomUUID(),
  clientName: "myapp/1.0.0",
});

const me = await rg.account.me();
console.log(me.data.user_id, me.data.permissions);

const created = await rg.tickets.create({ title: "Hello", project_key: "RG" }, { idempotencyKey: crypto.randomUUID() });
console.log(created.status, created.data, created.requestId, created.etag);
```

## Auth refresh (optional)

```ts
const rg = new RustGrid({
  baseUrl,
  tenantId,
  auth: {
    async getAccessToken() { return tokenStore.get(); },
    async onAuthError() {
      await tokenStore.refresh();
      return true; // retry once
    },
  },
});
```

## Regenerating types

The SDK ships with a generated `src/gen/schema.ts`. When the backend OpenAPI changes:

```bash
cp /path/to/openapi.json ./openapi.json
pnpm gen:types
pnpm build
```

## Pagination iterator

```ts
for await (const t of rg.tickets.iterate({ project_id: projectId, size: 50 })) {
  console.log(t.id, t.title);
}
```

## ETag / optimistic concurrency

```ts
const res = await rg.projects.get(projectId);
const etag = res.etag; // from header
await rg.projects.update(projectId, { name: "New" }, { ifMatch: etag! });
```

## Retry policy (idempotent + 429 aware)

Retries are **off-limits** for non-idempotent requests unless you provide `Idempotency-Key`.
For idempotent methods (GET/PUT/DELETE) and POST/PATCH with `Idempotency-Key`, the client can retry on:
- network errors
- `429 Too Many Requests` (honors `Retry-After` when present)

```ts
const page = await rg.tickets.list(
  { size: 50 },
  { retry: { maxAttempts: 3, baseDelayMs: 250 } }
);
```

## Examples

- `examples/node-basic` – Node 18+ script (env var driven)
- `examples/browser-vite` – Browser demo with Vite

## Release checklist

```bash
pnpm i
pnpm typecheck
pnpm build
pnpm publish:dry
# then publish (when ready):
# npm publish --access public
```

## GitHub Actions

- `CI` runs on PRs and `main`: typecheck, build, and `publish:dry`
- `Release` runs on tags `v*` and publishes to npm (requires `NPM_TOKEN` secret)

See `docs/RELEASING.md`.
npm package: @rustic-ai/ui-components
Description: A collection of components crafted for building interactive multimodal chat interfaces
Latest version: 1.0.7

# UI Components for Rustic AI

The UI Components for Rustic AI is a comprehensive collection of reusable components designed specifically to empower developers in constructing interactive multimodal chat interfaces. With a focus on versatility and ease of integration, our library offers a wide range of components tailored to accommodate various chat functionalities. Whether you're building a chatbot, virtual assistant, or communication platform, Rustic UI Components provides the building blocks necessary to create engaging and dynamic user experiences.

Additionally, our Rustic UI Component Library is available on Figma, enabling you to delve into the intricacies of our designs. Explore the [Figma file](https://www.figma.com/community/file/1340378790384732080) to gain insights into our innovative approach to UI design.

To learn more about Rustic AI, visit our [website](https://rustic.ai).

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

## Getting Started

To get started, visit the [Quick Start](https://rustic-ai.github.io/rustic-ui-components/?path=/docs/documentation-quick-start--docs) page on our Storybook.

## Storybook

Visit our [Storybook](https://rustic-ai.github.io/rustic-ui-components) for all documentation regarding components, as well as our [Theme and Styling](https://rustic-ai.github.io/rustic-ui-components/?path=/docs/documentation-theme-and-styling--docs) guide.

## Building From Source

If you want to build the UI components locally and use it for your projects, refer to [CONTRIBUTING.md](CONTRIBUTING.md#building-from-source-and-using-it-locally).

## Contributing

Contributions are welcome! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute as well as the process for submitting pull requests.

## License

This project is licensed under the terms of the [MIT License](LICENSE).