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