-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c57f412
commit 8529ad5
Showing
10 changed files
with
162 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { Agents_CreateAgentRequest, Common_uuid, Agents_UpdateAgentRequest, Common_limit, Common_offset, Agents_PatchAgentRequest, Docs_VectorDocSearchRequest, Docs_TextOnlyDocSearchRequest, Docs_HybridDocSearchRequest } from "./api"; | ||
import { JulepApiClient } from "./api/JulepApiClient"; | ||
|
||
export class AgentsRoutes { | ||
constructor(private apiClient: JulepApiClient) { } | ||
|
||
async create({ requestBody }: { requestBody: Agents_CreateAgentRequest }) { | ||
return await this.apiClient.default.agentsRouteCreate({ requestBody }) | ||
} | ||
|
||
async createOrUpdate({ id, requestBody }: { id: Common_uuid, requestBody: Agents_UpdateAgentRequest }) { | ||
return await this.apiClient.default.agentsRouteCreateOrUpdate({ id, requestBody }) | ||
} | ||
|
||
async delete({ id }: { id: Common_uuid }) { | ||
return await this.apiClient.default.agentsRouteDelete({ id }) | ||
} | ||
|
||
async get({ id }: { id: Common_uuid }) { | ||
return await this.apiClient.default.agentsRouteGet({ id }) | ||
} | ||
|
||
async list({ | ||
limit = 100, | ||
offset, | ||
sortBy = "created_at", | ||
direction = "asc", | ||
metadataFilter = "{}", | ||
}: { | ||
limit?: Common_limit; | ||
offset: Common_offset; | ||
sortBy?: "created_at" | "updated_at"; | ||
direction?: "asc" | "desc"; | ||
metadataFilter?: string; | ||
}) { | ||
return await this.apiClient.default.agentsRouteList({ limit, offset, sortBy, direction, metadataFilter }) | ||
} | ||
|
||
async patch({ id, requestBody }: { | ||
id: Common_uuid; | ||
requestBody: Agents_PatchAgentRequest; | ||
}) { | ||
return await this.apiClient.default.agentsRoutePatch({ id, requestBody }) | ||
} | ||
|
||
async update({ id, requestBody }: { | ||
id: Common_uuid; | ||
requestBody: Agents_UpdateAgentRequest; | ||
}) { | ||
return await this.apiClient.default.agentsRouteUpdate({ id, requestBody }) | ||
} | ||
|
||
async searchDocs({ id, requestBody }: { | ||
id: Common_uuid; | ||
requestBody: { | ||
body: | ||
| Docs_VectorDocSearchRequest | ||
| Docs_TextOnlyDocSearchRequest | ||
| Docs_HybridDocSearchRequest; | ||
}; | ||
}) { | ||
return await this.apiClient.default.agentsDocsSearchRouteSearch({ id, requestBody }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { JulepApiClient } from "./api/JulepApiClient"; | ||
import { Users_CreateUserRequest, Common_uuid, Users_UpdateUserRequest, Common_limit, Common_offset, Users_PatchUserRequest } from "./api"; | ||
|
||
export class UsersRoutes { | ||
constructor(private apiClient: JulepApiClient) { } | ||
|
||
async create({ requestBody }: { | ||
requestBody: Users_CreateUserRequest; | ||
}) { | ||
return await this.apiClient.default.usersRouteCreate({ requestBody }) | ||
} | ||
|
||
async createOrUpdate({ id, requestBody }: { | ||
id: Common_uuid; | ||
requestBody: Users_UpdateUserRequest; | ||
}) { | ||
return await this.apiClient.default.usersRouteCreateOrUpdate({ id, requestBody }) | ||
} | ||
|
||
async delete({ id }: { | ||
id: Common_uuid; | ||
}) { | ||
return await this.apiClient.default.usersRouteDelete({ id }) | ||
} | ||
|
||
async get({ id }: { | ||
id: Common_uuid; | ||
}) { | ||
return await this.apiClient.default.usersRouteGet({ id }) | ||
} | ||
|
||
async list({ | ||
limit = 100, | ||
offset, | ||
sortBy = "created_at", | ||
direction = "asc", | ||
metadataFilter = "{}", | ||
}: { | ||
limit?: Common_limit; | ||
offset: Common_offset; | ||
sortBy?: "created_at" | "updated_at"; | ||
direction?: "asc" | "desc"; | ||
metadataFilter?: string; | ||
}) { | ||
return await this.apiClient.default.usersRouteList({ limit, offset, sortBy, direction, metadataFilter }) | ||
} | ||
|
||
async patch({ id, requestBody }: { | ||
id: Common_uuid; | ||
requestBody: Users_PatchUserRequest; | ||
}) { | ||
return this.apiClient.default.usersRoutePatch({ id, requestBody }) | ||
} | ||
|
||
async update({id, requestBody}: { | ||
id: Common_uuid; | ||
requestBody: Users_UpdateUserRequest; | ||
}) { | ||
return await this.apiClient.default.usersRouteUpdate({id, requestBody}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters