Skip to content

Commit

Permalink
release: 0.0.3 (#8)
Browse files Browse the repository at this point in the history
* chore(internal): version bump (#7)

* feat(api): update via SDK Studio (#9)

* feat(api): OpenAPI spec update via Stainless API (#10)

* feat(api): update via SDK Studio (#11)

* release: 0.0.3

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
  • Loading branch information
stainless-app[bot] authored May 23, 2024
1 parent aeff0a3 commit 73b4271
Show file tree
Hide file tree
Showing 23 changed files with 61 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.2"
".": "0.0.3"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 38
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/plastic-labs%2Fhoncho-a370506bdacaf58567fea52cb6312d99b0e211dd67c8d1ffb896fcf6abfee16b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/plastic-labs%2Fhoncho-7967581df14089cda98ce7bd258102d5da5ec541dc5b17aa918f96be11a2bde8.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.0.3 (2024-05-23)

Full Changelog: [v0.0.2...v0.0.3](https://github.com/plastic-labs/honcho-node/compare/v0.0.2...v0.0.3)

### Features

* **api:** OpenAPI spec update via Stainless API ([#10](https://github.com/plastic-labs/honcho-node/issues/10)) ([b523d40](https://github.com/plastic-labs/honcho-node/commit/b523d4033e9aa50a20ba2beb3de697a6caa91ad3))
* **api:** update via SDK Studio ([#11](https://github.com/plastic-labs/honcho-node/issues/11)) ([5ac8ff6](https://github.com/plastic-labs/honcho-node/commit/5ac8ff630c010182ab7a69e24f57ccd0b345b270))
* **api:** update via SDK Studio ([#9](https://github.com/plastic-labs/honcho-node/issues/9)) ([3f05b53](https://github.com/plastic-labs/honcho-node/commit/3f05b53412e8fee6e9ac993369c14dcb6a59146d))


### Chores

* **internal:** version bump ([#7](https://github.com/plastic-labs/honcho-node/issues/7)) ([917efc4](https://github.com/plastic-labs/honcho-node/commit/917efc407618b3fda49db2b0e429d461b1cca964))

## 0.0.2 (2024-05-16)

Full Changelog: [v0.0.2-alpha.1...v0.0.2](https://github.com/plastic-labs/honcho-node/compare/v0.0.2-alpha.1...v0.0.2)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The full API of this library can be found in [api.md](api.md).
import Honcho from 'honcho-ai';

const honcho = new Honcho({
apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted
apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
environment: 'demo', // defaults to 'local'
});

Expand All @@ -45,7 +45,7 @@ This library includes TypeScript definitions for all request params and response
import Honcho from 'honcho-ai';

const honcho = new Honcho({
apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted
apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
environment: 'demo', // defaults to 'local'
});

Expand Down
13 changes: 1 addition & 12 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
#!/usr/bin/env bash

warnings=()
errors=()

if [ -z "${NPM_TOKEN}" ]; then
warnings+=("The HONCHO_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenWarnings=${#warnings[@]}

if [[ lenWarnings -gt 0 ]]; then
echo -e "Found the following warnings in the release environment:\n"

for warning in "${warnings[@]}"; do
echo -e "- $warning\n"
done
errors+=("The HONCHO_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "honcho-ai",
"version": "0.0.2",
"version": "0.0.3",
"description": "The official TypeScript library for the Honcho API",
"author": "Honcho <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Environment = keyof typeof environments;

export interface ClientOptions {
/**
* Defaults to process.env['HONCHO_AUTH_TOKEN'].
* Defaults to process.env['HONCHO_API_KEY'].
*/
apiKey?: string | null | undefined;

Expand Down Expand Up @@ -94,7 +94,7 @@ export class Honcho extends Core.APIClient {
/**
* API Client for interfacing with the Honcho API.
*
* @param {string | null | undefined} [opts.apiKey=process.env['HONCHO_AUTH_TOKEN'] ?? null]
* @param {string | null | undefined} [opts.apiKey=process.env['HONCHO_API_KEY'] ?? null]
* @param {Environment} [opts.environment=local] - Specifies the environment URL to use for the API.
* @param {string} [opts.baseURL=process.env['HONCHO_BASE_URL'] ?? http://localhost:8000] - Override the default base URL for the API.
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
Expand All @@ -106,7 +106,7 @@ export class Honcho extends Core.APIClient {
*/
constructor({
baseURL = Core.readEnv('HONCHO_BASE_URL'),
apiKey = Core.readEnv('HONCHO_AUTH_TOKEN') ?? null,
apiKey = Core.readEnv('HONCHO_API_KEY') ?? null,
...opts
}: ClientOptions = {}) {
const options: ClientOptions = {
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ export interface App {

created_at: string;

metadata: unknown;
metadata: Record<string, unknown>;

name: string;
}

export interface AppCreateParams {
name: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface AppUpdateParams {
metadata?: unknown | null;
metadata?: Record<string, unknown> | null;

name?: string | null;
}
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/collections/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export interface Collection {

created_at: string;

metadata: unknown;
metadata: Record<string, unknown>;

name: string;

Expand All @@ -159,13 +159,13 @@ export type CollectionQueryResponse = Array<DocumentsAPI.Document>;
export interface CollectionCreateParams {
name: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface CollectionUpdateParams {
name: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface CollectionListParams extends PageParams {
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/collections/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface Document {

created_at: string;

metadata: unknown;
metadata: Record<string, unknown>;
}

export interface PageDocument {
Expand All @@ -137,13 +137,13 @@ export type DocumentDeleteResponse = unknown;
export interface DocumentCreateParams {
content: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface DocumentUpdateParams {
content?: string | null;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface DocumentListParams extends PageParams {
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/sessions/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface Message {

is_user: boolean;

metadata: unknown;
metadata: Record<string, unknown>;

session_id: string;
}
Expand All @@ -142,11 +142,11 @@ export interface MessageCreateParams {

is_user: boolean;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface MessageUpdateParams {
metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface MessageListParams extends PageParams {
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/sessions/metamessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export interface Metamessage {

message_id: string;

metadata: unknown;
metadata: Record<string, unknown>;

metamessage_type: string;
}
Expand All @@ -153,13 +153,13 @@ export interface MetamessageCreateParams {

metamessage_type: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface MetamessageUpdateParams {
message_id: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;

metamessage_type?: string | null;
}
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/sessions/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export interface Session {

location_id: string;

metadata: unknown;
metadata: Record<string, unknown>;

user_id: string;
}
Expand All @@ -195,11 +195,11 @@ export type SessionStreamResponse = unknown;
export interface SessionCreateParams {
location_id: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface SessionUpdateParams {
metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface SessionListParams extends PageParams {
Expand Down
6 changes: 3 additions & 3 deletions src/resources/apps/users/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,19 @@ export interface User {

created_at: string;

metadata: unknown;
metadata: Record<string, unknown>;

name: string;
}

export interface UserCreateParams {
name: string;

metadata?: unknown | null;
metadata?: Record<string, unknown> | null;
}

export interface UserUpdateParams {
metadata?: unknown | null;
metadata?: Record<string, unknown> | null;

name?: string | null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.0.2'; // x-release-please-version
export const VERSION = '0.0.3'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/apps/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('resource apps', () => {
});

test('create: required and optional params', async () => {
const response = await honcho.apps.create({ name: 'string', metadata: {} });
const response = await honcho.apps.create({ name: 'string', metadata: { foo: 'bar' } });
});

test('update', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('resource collections', () => {
const response = await honcho.apps.users.collections.create(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ name: 'string', metadata: {} },
{ name: 'string', metadata: { foo: 'bar' } },
);
});

Expand All @@ -53,7 +53,7 @@ describe('resource collections', () => {
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ name: 'string', metadata: {} },
{ name: 'string', metadata: { foo: 'bar' } },
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('resource documents', () => {
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ content: 'string', metadata: {} },
{ content: 'string', metadata: { foo: 'bar' } },
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/apps/users/sessions/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('resource messages', () => {
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ content: 'string', is_user: true, metadata: {} },
{ content: 'string', is_user: true, metadata: { foo: 'bar' } },
);
});

Expand Down
8 changes: 6 additions & 2 deletions tests/api-resources/apps/users/sessions/metamessages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('resource metamessages', () => {
content: 'string',
message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
metamessage_type: 'string',
metadata: {},
metadata: { foo: 'bar' },
},
);
});
Expand Down Expand Up @@ -62,7 +62,11 @@ describe('resource metamessages', () => {
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', metadata: {}, metamessage_type: 'string' },
{
message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
metadata: { foo: 'bar' },
metamessage_type: 'string',
},
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/apps/users/sessions/sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('resource sessions', () => {
const response = await honcho.apps.users.sessions.create(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ location_id: 'string', metadata: {} },
{ location_id: 'string', metadata: { foo: 'bar' } },
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/apps/users/users.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('resource users', () => {
test('create: required and optional params', async () => {
const response = await honcho.apps.users.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
name: 'string',
metadata: {},
metadata: { foo: 'bar' },
});
});

Expand Down
4 changes: 2 additions & 2 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ describe('instantiate client', () => {

test('with environment variable arguments', () => {
// set options via env var
process.env['HONCHO_AUTH_TOKEN'] = 'My API Key';
process.env['HONCHO_API_KEY'] = 'My API Key';
const client = new Honcho();
expect(client.apiKey).toBe('My API Key');
});

test('with overriden environment variable arguments', () => {
// set options via env var
process.env['HONCHO_AUTH_TOKEN'] = 'another My API Key';
process.env['HONCHO_API_KEY'] = 'another My API Key';
const client = new Honcho({ apiKey: 'My API Key' });
expect(client.apiKey).toBe('My API Key');
});
Expand Down

0 comments on commit 73b4271

Please sign in to comment.