kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
chore: update deps
rodzic
c87829d873
commit
89ab4753ef
|
@ -3,14 +3,15 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
AIFunctionsProvider,
|
||||
aiFunction,
|
||||
AIFunctionsProvider,
|
||||
assert,
|
||||
getEnv,
|
||||
pick,
|
||||
sanitizeSearchParams
|
||||
} from '@agentic/core'
|
||||
import defaultKy, { type KyInstance } from 'ky'
|
||||
|
||||
import { notion } from './notion'
|
||||
|
||||
/**
|
||||
|
@ -73,7 +74,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
})
|
||||
async getUser(params: notion.GetUserParams): Promise<notion.GetUserResponse> {
|
||||
return this.ky
|
||||
.get(`/users/${params['user_id']}`)
|
||||
.get(`/users/${params.user_id}`)
|
||||
.json<notion.GetUserResponse>()
|
||||
}
|
||||
|
||||
|
@ -125,7 +126,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
})
|
||||
async getPage(params: notion.GetPageParams): Promise<notion.GetPageResponse> {
|
||||
return this.ky
|
||||
.get(`/pages/${params['page_id']}`, {
|
||||
.get(`/pages/${params.page_id}`, {
|
||||
searchParams: sanitizeSearchParams(pick(params, 'filter_properties'))
|
||||
})
|
||||
.json<notion.GetPageResponse>()
|
||||
|
@ -143,7 +144,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.UpdatePageParams
|
||||
): Promise<notion.UpdatePageResponse> {
|
||||
return this.ky
|
||||
.patch(`/pages/${params['page_id']}`, {
|
||||
.patch(`/pages/${params.page_id}`, {
|
||||
json: pick(params, 'properties', 'archived')
|
||||
})
|
||||
.json<notion.UpdatePageResponse>()
|
||||
|
@ -161,7 +162,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.GetPagePropertyParams
|
||||
): Promise<notion.GetPagePropertyResponse> {
|
||||
return this.ky
|
||||
.get(`/pages/${params['page_id']}/properties/${params['property_id']}`, {
|
||||
.get(`/pages/${params.page_id}/properties/${params.property_id}`, {
|
||||
searchParams: sanitizeSearchParams(
|
||||
pick(params, 'start_cursor', 'page_size')
|
||||
)
|
||||
|
@ -181,7 +182,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.GetBlockParams
|
||||
): Promise<notion.GetBlockResponse> {
|
||||
return this.ky
|
||||
.get(`/blocks/${params['block_id']}`)
|
||||
.get(`/blocks/${params.block_id}`)
|
||||
.json<notion.GetBlockResponse>()
|
||||
}
|
||||
|
||||
|
@ -197,7 +198,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.DeleteBlockParams
|
||||
): Promise<notion.DeleteBlockResponse> {
|
||||
return this.ky
|
||||
.delete(`/blocks/${params['block_id']}`)
|
||||
.delete(`/blocks/${params.block_id}`)
|
||||
.json<notion.DeleteBlockResponse>()
|
||||
}
|
||||
|
||||
|
@ -213,7 +214,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.UpdateBlockParams
|
||||
): Promise<notion.UpdateBlockResponse> {
|
||||
return this.ky
|
||||
.patch(`/blocks/${params['block_id']}`, {
|
||||
.patch(`/blocks/${params.block_id}`, {
|
||||
json: pick(
|
||||
params,
|
||||
'paragraph',
|
||||
|
@ -258,7 +259,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.ListBlockChildrenParams
|
||||
): Promise<notion.ListBlockChildrenResponse> {
|
||||
return this.ky
|
||||
.get(`/blocks/${params['block_id']}/children`, {
|
||||
.get(`/blocks/${params.block_id}/children`, {
|
||||
searchParams: sanitizeSearchParams(
|
||||
pick(params, 'start_cursor', 'page_size')
|
||||
)
|
||||
|
@ -278,7 +279,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.AppendBlockChildrenParams
|
||||
): Promise<notion.AppendBlockChildrenResponse> {
|
||||
return this.ky
|
||||
.patch(`/blocks/${params['block_id']}/children`, {
|
||||
.patch(`/blocks/${params.block_id}/children`, {
|
||||
json: pick(params, 'children')
|
||||
})
|
||||
.json<notion.AppendBlockChildrenResponse>()
|
||||
|
@ -296,7 +297,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.GetDatabaseParams
|
||||
): Promise<notion.GetDatabaseResponse> {
|
||||
return this.ky
|
||||
.get(`/databases/${params['database_id']}`)
|
||||
.get(`/databases/${params.database_id}`)
|
||||
.json<notion.GetDatabaseResponse>()
|
||||
}
|
||||
|
||||
|
@ -312,7 +313,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.UpdateDatabaseParams
|
||||
): Promise<notion.UpdateDatabaseResponse> {
|
||||
return this.ky
|
||||
.patch(`/databases/${params['database_id']}`, {
|
||||
.patch(`/databases/${params.database_id}`, {
|
||||
json: pick(
|
||||
params,
|
||||
'title',
|
||||
|
@ -339,7 +340,7 @@ export class NotionClient extends AIFunctionsProvider {
|
|||
params: notion.QueryDatabaseParams
|
||||
): Promise<notion.QueryDatabaseResponse> {
|
||||
return this.ky
|
||||
.post(`/databases/${params['database_id']}/query`, {
|
||||
.post(`/databases/${params.database_id}/query`, {
|
||||
searchParams: sanitizeSearchParams(pick(params, 'filter_properties')),
|
||||
json: pick(
|
||||
params,
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
aiFunction,
|
||||
AIFunctionsProvider,
|
||||
aiFunction,
|
||||
pick,
|
||||
sanitizeSearchParams
|
||||
} from '@agentic/core'
|
||||
import defaultKy, { type KyInstance } from 'ky'
|
||||
|
||||
import { petstore } from './pet-store'
|
||||
|
||||
/**
|
||||
|
@ -88,7 +87,7 @@ export class PetStoreClient extends AIFunctionsProvider {
|
|||
params: petstore.ShowPetByIdParams
|
||||
): Promise<petstore.ShowPetByIdResponse> {
|
||||
return this.ky
|
||||
.get(`/pets/${params.petId}`)
|
||||
.get(`/pets/${params['petId']}`)
|
||||
.json<petstore.ShowPetByIdResponse>()
|
||||
}
|
||||
}
|
||||
|
|
779
pnpm-lock.yaml
779
pnpm-lock.yaml
Plik diff jest za duży
Load Diff
|
@ -6,20 +6,20 @@ updateConfig:
|
|||
- p-throttle
|
||||
- eslint
|
||||
catalog:
|
||||
'@ai-sdk/openai': ^1.3.6
|
||||
'@ai-sdk/openai': ^1.3.7
|
||||
'@apidevtools/swagger-parser': ^10.1.1
|
||||
'@dexaai/dexter': ^4.1.1
|
||||
'@e2b/code-interpreter': ^1.1.0
|
||||
'@fisch0920/config': ^1.0.2
|
||||
'@langchain/core': ^0.3.43
|
||||
'@langchain/openai': ^0.5.2
|
||||
'@langchain/openai': ^0.5.4
|
||||
'@mastra/core': ^0.7.0
|
||||
'@modelcontextprotocol/sdk': ^1.8.0
|
||||
'@nangohq/node': 0.42.22 # pinned for now
|
||||
'@types/jsrsasign': ^10.5.15
|
||||
'@types/node': ^22.13.16
|
||||
'@xsai/tool': ^0.2.0-beta.2
|
||||
ai: ^4.2.10
|
||||
'@types/node': ^22.14.0
|
||||
'@xsai/tool': ^0.2.0-beta.3
|
||||
ai: ^4.3.1
|
||||
bumpp: ^10.1.0
|
||||
camelcase: ^8.0.0
|
||||
cleye: ^1.3.4
|
||||
|
@ -29,25 +29,25 @@ catalog:
|
|||
delay: ^6.0.0
|
||||
dotenv: ^16.4.7
|
||||
duck-duck-scrape: ^2.2.7
|
||||
eslint: ^9.23.0
|
||||
eslint: ^9.24.0
|
||||
execa: ^9.5.2
|
||||
exit-hook: ^4.0.0
|
||||
fast-xml-parser: ^5.0.9
|
||||
genkit: ^1.4.0
|
||||
fast-xml-parser: ^5.2.0
|
||||
genkit: ^1.5.0
|
||||
genkitx-openai: ^0.20.2
|
||||
'@googleapis/customsearch': ^3.2.0
|
||||
json-schema-to-zod: ^2.6.0
|
||||
json-schema-to-zod: ^2.6.1
|
||||
jsonrepair: ^3.12.0
|
||||
jsrsasign: ^10.9.0
|
||||
ky: ^1.8.0
|
||||
langchain: ^0.3.19
|
||||
langchain: ^0.3.20
|
||||
lint-staged: ^15.5.0
|
||||
llamaindex: ^0.9.14
|
||||
llamaindex: ^0.9.16
|
||||
mathjs: ^13.2.3
|
||||
npm-run-all2: ^7.0.2
|
||||
octokit: ^4.1.2
|
||||
only-allow: ^1.2.1
|
||||
openai: ^4.91.0
|
||||
openai: ^4.91.1
|
||||
openai-fetch: ^3.4.2
|
||||
openai-zod-to-json-schema: ^1.0.3
|
||||
openapi-types: ^12.1.3
|
||||
|
@ -60,13 +60,13 @@ catalog:
|
|||
syncpack: 14.0.0-alpha.10
|
||||
tsup: ^8.4.0
|
||||
tsx: ^4.19.3
|
||||
turbo: ^2.4.4
|
||||
turbo: ^2.5.0
|
||||
twitter-api-sdk: ^1.2.1
|
||||
type-fest: ^4.39.0
|
||||
typescript: ^5.8.2
|
||||
type-fest: ^4.39.1
|
||||
typescript: ^5.8.3
|
||||
vitest: ^3.1.1
|
||||
wikibase-sdk: ^10.2.3
|
||||
xsai: ^0.2.0-beta.2
|
||||
xsai: ^0.2.0-beta.3
|
||||
zod: ^3.24.2
|
||||
zod-validation-error: ^3.4.0
|
||||
zoominfo-api-auth-client: ^1.0.1
|
||||
|
|
Ładowanie…
Reference in New Issue