Skip to content

Commit a998bdb

Browse files
committed
📖 DOC: Comments
1 parent 41556f4 commit a998bdb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/langbase/src/pipes/pipes.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,20 +243,37 @@ export class Pipe {
243243
});
244244
}
245245

246+
/**
247+
* Creates a new pipe on Langbase.
248+
*
249+
* @param {PipeCreateOptions} options - The options for creating the pipe.
250+
* @returns {Promise<PipeCreateResponse>} A promise that resolves to the response of the pipe creation.
251+
*/
246252
async create(options: PipeCreateOptions): Promise<PipeCreateResponse> {
247253
return this.request.post({
248254
endpoint: '/v1/pipes',
249255
body: options,
250256
});
251257
}
252258

259+
/**
260+
* Updates a pipe on Langbase.
261+
*
262+
* @param {PipeUpdateOptions} options - The options for updating the pipe.
263+
* @returns {Promise<PipeUpdateResponse>} A promise that resolves to the response of the update operation.
264+
*/
253265
async update(options: PipeUpdateOptions): Promise<PipeUpdateResponse> {
254266
return this.request.post({
255267
endpoint: `/v1/pipes/${options.name}`,
256268
body: options,
257269
});
258270
}
259271

272+
/**
273+
* Retrieves a list of pipes.
274+
*
275+
* @returns {Promise<PipeListResponse[]>} A promise that resolves to an array of PipeListResponse objects.
276+
*/
260277
async list(): Promise<PipeListResponse[]> {
261278
return this.request.get({
262279
endpoint: '/v1/pipes',

0 commit comments

Comments
 (0)