Skip to content

Commit d4f0d3d

Browse files
committed
feat(jsdoc): add JSDoc comments for Contexts
1 parent 606268c commit d4f0d3d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/contexts/@types/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
export type AllContexts = {
2-
created_at: string;
2+
/**
3+
* ID of the context
4+
*/
35
id: string;
6+
/**
7+
* Timestamp of when the context was created
8+
*/
9+
created_at: string;
10+
/**
11+
* Name of the context
12+
*/
413
name: string;
514
}[];

src/contexts/contexts.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import type { AllContexts } from './@types';
44
export class Contexts {
55
constructor(private readonly hyper: Hyper) {}
66

7+
/**
8+
* Get all of the available contexts. More information: https://docs.gethyper.ai/context#get-v1-contexts
9+
* @returns All of the available contexts in the Hyper app (https://app.gethyper.ai)
10+
* @example
11+
* const { data, error } = await hyper.contexts.list();
12+
* console.log(data);
13+
*/
714
async list() {
815
const res = await this.hyper.get<AllContexts>({
916
endpoint: '/contexts',

0 commit comments

Comments
 (0)