diff --git a/api.md b/api.md
index e1bfb809..750e26c0 100644
--- a/api.md
+++ b/api.md
@@ -2,7 +2,7 @@
Types:
-- Apikey
+- APIKkey
- App
- Collection
@@ -27,14 +27,14 @@ Methods:
Types:
-- Collection
+- CollectionResponse
- CollectionListResponse
Methods:
-- client.collections.create({ ...params }) -> Collection
+- client.collections.create({ ...params }) -> CollectionResponse
- client.collections.list({ ...params }) -> CollectionListResponsesCursorPage
-- client.collections.get(name) -> Collection
+- client.collections.get(name) -> CollectionResponse
# Query
diff --git a/src/index.ts b/src/index.ts
index eac9925b..6d7238a8 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -13,6 +13,7 @@ import {
CollectionListParams,
CollectionListResponse,
CollectionListResponsesCursorPage,
+ CollectionResponse,
Collections,
} from './resources/collections';
import {
@@ -220,7 +221,7 @@ export declare namespace Hyperspell {
export {
Collections as Collections,
- type Collection as Collection,
+ type CollectionResponse as CollectionResponse,
type CollectionListResponse as CollectionListResponse,
CollectionListResponsesCursorPage as CollectionListResponsesCursorPage,
type CollectionCreateParams as CollectionCreateParams,
@@ -235,7 +236,7 @@ export declare namespace Hyperspell {
export { Auth as Auth, type Token as Token, type AuthUserTokenParams as AuthUserTokenParams };
- export type Apikey = API.Apikey;
+ export type APIKkey = API.APIKkey;
export type App = API.App;
export type Collection = API.Collection;
}
diff --git a/src/resources/collections.ts b/src/resources/collections.ts
index 10c517ac..769fadf8 100644
--- a/src/resources/collections.ts
+++ b/src/resources/collections.ts
@@ -10,7 +10,7 @@ export class Collections extends APIResource {
* This endpoint allows you to paginate through all documents in the index. You can
* filter the documents by title, date, metadata, etc.
*/
- create(body: CollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(body: CollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise {
return this._client.post('/collections/add', { body, ...options });
}
@@ -40,14 +40,14 @@ export class Collections extends APIResource {
/**
* Retrieves a collection by name.
*/
- get(name: string, options?: Core.RequestOptions): Core.APIPromise {
+ get(name: string, options?: Core.RequestOptions): Core.APIPromise {
return this._client.get(`/collections/get/${name}`, options);
}
}
export class CollectionListResponsesCursorPage extends CursorPage {}
-export interface Collection {
+export interface CollectionResponse {
created_at: string;
name: string;
@@ -86,7 +86,7 @@ Collections.CollectionListResponsesCursorPage = CollectionListResponsesCursorPag
export declare namespace Collections {
export {
- type Collection as Collection,
+ type CollectionResponse as CollectionResponse,
type CollectionListResponse as CollectionListResponse,
CollectionListResponsesCursorPage as CollectionListResponsesCursorPage,
type CollectionCreateParams as CollectionCreateParams,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index b3e58dd1..405ca170 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -5,7 +5,7 @@ export { Auth, type Token, type AuthUserTokenParams } from './auth';
export {
CollectionListResponsesCursorPage,
Collections,
- type Collection,
+ type CollectionResponse,
type CollectionListResponse,
type CollectionCreateParams,
type CollectionListParams,
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index aa6598df..5017a93a 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -5,7 +5,7 @@ import * as DocumentsAPI from './documents';
/**
* ApiKeys Base Schema.
*/
-export interface Apikey {
+export interface APIKkey {
app_id: number;
scopes: Array<'all' | 'ingest' | 'query'>;
@@ -38,7 +38,7 @@ export interface App {
id?: number | null;
- api_keys?: Array | null;
+ api_keys?: Array | null;
collections?: Array | null;