Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate 0.1.0 (#6)
Browse files Browse the repository at this point in the history
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.498.0

* empty commit to trigger [run-tests] workflow

---------

Co-authored-by: speakeasybot <[email protected]>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 20, 2025
1 parent ebd043f commit c585d45
Show file tree
Hide file tree
Showing 1,262 changed files with 27,301 additions and 2,104 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir samples
npm install
npm install -g ts-node
npm link
npm link @speakeasy-api/bluesky
npm link @speakeasy-sdks/bluesky
TS_CONFIG_CONTENT=$(cat <<EOL
{
"compilerOptions": {
Expand Down
5 changes: 3 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ management:
docVersion: 0.0.0
speakeasyVersion: 1.498.0
generationVersion: 2.518.0
releaseVersion: 0.11.3
configChecksum: 4fed8632508b65b980720fc6bdf3dccc
releaseVersion: 0.1.0
configChecksum: 47ae9481d14f02f92a88ef8be0d9297e
repoURL: https://github.com/speakeasy-api/bluesky-ts.git
installationURL: https://github.com/speakeasy-api/bluesky-ts
published: true
features:
typescript:
additionalDependencies: 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.11.3
version: 0.1.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
3 changes: 3 additions & 0 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ workflow:
bluesky:
target: typescript
source: OAS
publish:
npm:
token: $npm_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/bluesky/bluesky/-oas-typescript-code-samples
Expand Down
6 changes: 3 additions & 3 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ specific category of applications.
## Example

```typescript
import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { actorsGetProfile } from "@speakeasy-api/bluesky/funcs/actorsGetProfile.js";
import { SDKValidationError } from "@speakeasy-api/bluesky/models/errors/sdkvalidationerror.js";
import { BlueskyCore } from "@speakeasy-sdks/bluesky/core.js";
import { actorsGetProfile } from "@speakeasy-sdks/bluesky/funcs/actorsGetProfile.js";
import { SDKValidationError } from "@speakeasy-sdks/bluesky/models/errors/sdkvalidationerror.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand Down
32 changes: 16 additions & 16 deletions REACT_QUERY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ your React app at the root or layout component. For example:

```tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BlueskyCore } from "@speakeasy-api/bluesky";
import { BlueskyProvider } from "@speakeasy-api/bluesky/react-query";
import { BlueskyCore } from "@speakeasy-sdks/bluesky";
import { BlueskyProvider } from "@speakeasy-sdks/bluesky/react-query";

const queryClient = new QueryClient();
const bluesky = new BlueskyCore({
bearer: process.env["BLUESKY_BEARER"] ?? "",
});

// Retries are handled by the underlying SDK.
queryClient.setQueryDefaults(["@speakeasy-api/bluesky"], { retry: false });
queryClient.setMutationDefaults(["@speakeasy-api/bluesky"], { retry: false });
queryClient.setQueryDefaults(["@speakeasy-sdks/bluesky"], { retry: false });
queryClient.setMutationDefaults(["@speakeasy-sdks/bluesky"], { retry: false });

export function App() {
return (
Expand All @@ -50,7 +50,7 @@ from TanStack Query.
[use-query]: https://tanstack.com/query/v5/docs/framework/react/reference/useQuery

```tsx
import { useActorsGetPreferences } from "@speakeasy-api/bluesky/react-query/actorsGetPreferences.js";
import { useActorsGetPreferences } from "@speakeasy-sdks/bluesky/react-query/actorsGetPreferences.js";

export function Example() {
const { data, error, status } = useActorsGetPreferences();
Expand All @@ -66,7 +66,7 @@ more options provided by the query hooks to control these behaviors.

```tsx
import { useState } from "react";
import { useActorsGetPreferences } from "@speakeasy-api/bluesky/react-query/actorsGetPreferences.js";
import { useActorsGetPreferences } from "@speakeasy-sdks/bluesky/react-query/actorsGetPreferences.js";

export function ExampleWithOptions() {
const [enabled, setEnabled] = useState(true);
Expand Down Expand Up @@ -107,7 +107,7 @@ Query.
[use-mutation]: https://tanstack.com/query/v5/docs/framework/react/reference/useMutation

```tsx
import { useActorsPutPreferencesMutation } from "@speakeasy-api/bluesky/react-query/actorsPutPreferences.js";
import { useActorsPutPreferencesMutation } from "@speakeasy-sdks/bluesky/react-query/actorsPutPreferences.js";

export function Example() {
const { mutate, status } = useActorsPutPreferencesMutation();
Expand Down Expand Up @@ -146,7 +146,7 @@ Since the underlying SDK handles request timeouts and retries, there are a few
more options provided by the mutation hooks to control these behaviors.

```tsx
import { useActorsPutPreferencesMutation } from "@speakeasy-api/bluesky/react-query/actorsPutPreferences.js";
import { useActorsPutPreferencesMutation } from "@speakeasy-sdks/bluesky/react-query/actorsPutPreferences.js";

export function ExampleWithOptions() {
const { mutate, status } = useActorsPutPreferencesMutation({
Expand Down Expand Up @@ -181,9 +181,9 @@ query hook there are two functions that help invalidate cached data:

```tsx
import { useQueryClient } from "@tanstack/react-query";
import { invalidateActorsGetPreferences, invalidateAllActorsGetPreferences } from "@speakeasy-api/bluesky/react-query/actorsGetPreferences.js";
import { invalidateActorsGetPreferences, invalidateAllActorsGetPreferences } from "@speakeasy-sdks/bluesky/react-query/actorsGetPreferences.js";
// Replace this with a real mutation
import { useExampleMutation } from "@speakeasy-api/bluesky/react-query/example.js";
import { useExampleMutation } from "@speakeasy-sdks/bluesky/react-query/example.js";

export function Example() {
const { queryClient } = useQueryClient();
Expand Down Expand Up @@ -228,7 +228,7 @@ infinite scrolling and "load more" user interfaces.
> those hooks may be more suitable.
```tsx
import { useSearchActorsInfinite } from "@speakeasy-api/bluesky/react-query/actorsSearch.js";
import { useSearchActorsInfinite } from "@speakeasy-sdks/bluesky/react-query/actorsSearch.js";

export function Example() {
const { data, error, status, fetchNextPage, hasNextPage } = useSearchActorsInfinite({});
Expand Down Expand Up @@ -260,9 +260,9 @@ hooks that integrate neatly with React Suspense.
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ErrorBoundary } from "react-error-boundary";

import { BlueskyCore } from "@speakeasy-api/bluesky";
import { BlueskyProvider } from "@speakeasy-api/bluesky/react-query";
import { useActorsGetPreferencesSuspense } from "@speakeasy-api/bluesky/react-query/actorsGetPreferences.js";
import { BlueskyCore } from "@speakeasy-sdks/bluesky";
import { BlueskyProvider } from "@speakeasy-sdks/bluesky/react-query";
import { useActorsGetPreferencesSuspense } from "@speakeasy-sdks/bluesky/react-query/actorsGetPreferences.js";

const queryClient = new QueryClient();
const bluesky = new BlueskyCore({
Expand Down Expand Up @@ -316,8 +316,8 @@ import {
HydrationBoundary,
QueryClient,
} from "@tanstack/react-query";
import { BlueskyCore } from "@speakeasy-api/bluesky";
import { prefetchActorsGetPreferences } from "@speakeasy-api/bluesky/react-query/actorsGetPreferences.js";
import { BlueskyCore } from "@speakeasy-sdks/bluesky";
import { prefetchActorsGetPreferences } from "@speakeasy-sdks/bluesky/react-query/actorsGetPreferences.js";

export default async function Page() {
const queryClient = new QueryClient();
Expand Down
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,36 @@ This section contains HTTP API reference docs for Bluesky and AT Protocol lexico
<!-- Start SDK Installation [installation] -->
## SDK Installation

> [!TIP]
> To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).

The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.

### NPM

```bash
npm add https://github.com/speakeasy-api/bluesky-ts
npm add @speakeasy-sdks/bluesky
# Install optional peer dependencies if you plan to use React hooks
npm add @tanstack/react-query react react-dom
```

### PNPM

```bash
pnpm add https://github.com/speakeasy-api/bluesky-ts
pnpm add @speakeasy-sdks/bluesky
# Install optional peer dependencies if you plan to use React hooks
pnpm add @tanstack/react-query react react-dom
```

### Bun

```bash
bun add https://github.com/speakeasy-api/bluesky-ts
bun add @speakeasy-sdks/bluesky
# Install optional peer dependencies if you plan to use React hooks
bun add @tanstack/react-query react react-dom
```

### Yarn

```bash
yarn add https://github.com/speakeasy-api/bluesky-ts zod
yarn add @speakeasy-sdks/bluesky zod
# Install optional peer dependencies if you plan to use React hooks
yarn add @tanstack/react-query react react-dom

Expand All @@ -79,7 +75,7 @@ yarn add @tanstack/react-query react react-dom

> [!NOTE]
> This package is published as an ES Module (ESM) only. For applications using
> CommonJS, use `await import()` to import and use this package.
> CommonJS, use `await import("@speakeasy-sdks/bluesky")` to import and use this package.
### Model Context Protocol (MCP) Server

Expand All @@ -98,7 +94,10 @@ Add the following server definition to your `claude_desktop_config.json` file:
"mcpServers": {
"Bluesky": {
"command": "npx",
"args": ["-y", "--", "@speakeasy-api/bluesky", "mcp", "start", "--server", "public"]
"args": ["-y", "--", "@speakeasy-sdks/bluesky", "mcp", "start"],
"env": {
"BLUESKY_BEARER": "..."
}
}
}
}
Expand All @@ -116,7 +115,7 @@ Add the following server definition to your `claude_desktop_config.json` file:

export BLUESKY_BEARER="..."

exec npx -y -- @speakeasy-api/bluesky mcp start "$@"
exec npx -y -- @speakeasy-sdks/bluesky mcp start "$@"
```

2. Then make it executable with the following command:
Expand All @@ -138,7 +137,7 @@ Add the following server definition to your `claude_desktop_config.json` file:
For a full list of server arguments, run:

```sh
npx -y -- @speakeasy-api/bluesky mcp start --help
npx -y -- @speakeasy-sdks/bluesky mcp start --help
```
<!-- End SDK Installation [installation] -->

Expand All @@ -154,7 +153,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
### Example

```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down Expand Up @@ -187,7 +186,7 @@ This SDK supports the following security scheme globally:
To authenticate with the API the `bearer` parameter must be set when initializing the SDK client instance. For example:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down Expand Up @@ -2829,7 +2828,7 @@ syntax.
Here's an example of one such pagination call:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down Expand Up @@ -2864,7 +2863,7 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
import { openAsBlob } from "node:fs";
const bluesky = new Bluesky({
Expand All @@ -2890,7 +2889,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without a
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down Expand Up @@ -2920,7 +2919,7 @@ run();
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
retryConfig: {
Expand Down Expand Up @@ -2972,7 +2971,7 @@ Some methods specify known errors which can be thrown. All the known errors are
If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`.
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
import {
BadRequestAppBskyActorGetPreferencesResponseBodyError,
BadRequestError,
Expand All @@ -2983,7 +2982,7 @@ import {
TimeoutError,
UnauthorizedAppBskyActorGetPreferencesResponseBodyError,
UnauthorizedError,
} from "@speakeasy-api/bluesky/models/errors";
} from "@speakeasy-sdks/bluesky/models/errors";
const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down Expand Up @@ -3108,7 +3107,7 @@ You can override the default server globally by passing a server name to the `se
#### Example
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
server: "public",
Expand All @@ -3130,7 +3129,7 @@ run();
The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const bluesky = new Bluesky({
serverURL: "https://api.bsky.app",
Expand Down Expand Up @@ -3167,8 +3166,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook
to log errors:
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { HTTPClient } from "@speakeasy-api/bluesky/lib/http";
import { Bluesky } from "@speakeasy-sdks/bluesky";
import { HTTPClient } from "@speakeasy-sdks/bluesky/lib/http";
const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native `fetch`.
Expand Down Expand Up @@ -3209,7 +3208,7 @@ You can pass a logger that matches `console`'s interface as an SDK option.
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";
const sdk = new Bluesky({ debugLogger: console });
```
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.453.0 (2.472.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.7.1] .
- [typescript v0.7.1] .

## 2025-02-20 15:42:20
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.498.0 (2.518.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.0] .
### Releases
- [NPM v0.1.0] https://www.npmjs.com/package/@speakeasy-sdks/bluesky/v/0.1.0 - .
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Start SDK Example Usage [usage] -->
```typescript
import { Bluesky } from "@speakeasy-api/bluesky";
import { Bluesky } from "@speakeasy-sdks/bluesky";

const bluesky = new Bluesky({
bearer: process.env["BLUESKY_BEARER"] ?? "",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/actortarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Groups of users to apply the muted word to. If undefined, applies to all users.
## Example Usage

```typescript
import { ActorTarget } from "@speakeasy-api/bluesky/models/components";
import { ActorTarget } from "@speakeasy-sdks/bluesky/models/components";

let value: ActorTarget = "all";
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/allowincoming.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

```typescript
import { AllowIncoming } from "@speakeasy-api/bluesky/models/components";
import { AllowIncoming } from "@speakeasy-sdks/bluesky/models/components";

let value: AllowIncoming = "all";
```
Expand Down
Loading

0 comments on commit c585d45

Please sign in to comment.