@airweave/sdk 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +15 -0
- package/Client.js +37 -12
- package/api/resources/apiKeys/client/Client.js +12 -12
- package/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +1 -0
- package/api/resources/chat/client/Client.d.ts +77 -0
- package/api/resources/chat/client/Client.js +227 -0
- package/api/resources/chat/client/index.d.ts +1 -0
- package/api/resources/chat/client/index.js +17 -0
- package/api/{types → resources/chat/client/requests}/ChatCreate.d.ts +5 -1
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/api/resources/chat/client/requests/index.d.ts +2 -0
- package/api/resources/chat/client/requests/index.js +2 -0
- package/api/resources/chat/index.d.ts +1 -0
- package/api/resources/chat/index.js +17 -0
- package/api/resources/connections/client/Client.d.ts +2 -2
- package/api/resources/connections/client/Client.js +11 -11
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +2 -2
- package/api/resources/dag/client/Client.d.ts +81 -0
- package/api/resources/dag/client/Client.js +276 -0
- package/api/resources/dag/client/index.d.ts +1 -0
- package/api/resources/dag/client/index.js +17 -0
- package/api/resources/dag/client/requests/SyncDagCreate.d.ts +26 -0
- package/{dist/api/types → api/resources/dag/client/requests}/SyncDagUpdate.d.ts +7 -3
- package/api/resources/dag/client/requests/index.d.ts +2 -0
- package/api/resources/dag/client/requests/index.js +2 -0
- package/api/resources/dag/index.d.ts +1 -0
- package/api/resources/dag/index.js +17 -0
- package/api/resources/embeddingModels/client/Client.d.ts +1 -1
- package/api/resources/embeddingModels/client/Client.js +3 -3
- package/api/resources/entities/client/Client.d.ts +119 -0
- package/api/resources/entities/client/Client.js +480 -0
- package/api/resources/entities/client/index.d.ts +1 -0
- package/api/resources/entities/client/index.js +17 -0
- package/{dist/api/types → api/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +9 -2
- package/{dist/api/types → api/resources/entities/client/requests}/EntityRelationCreate.d.ts +6 -1
- package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/api/resources/entities/client/requests/index.d.ts +3 -0
- package/api/resources/entities/client/requests/index.js +2 -0
- package/api/resources/entities/index.d.ts +2 -0
- package/api/resources/entities/index.js +18 -0
- package/api/resources/entities/types/index.d.ts +1 -0
- package/api/resources/entities/types/index.js +17 -0
- package/api/resources/index.d.ts +10 -0
- package/api/resources/index.js +11 -1
- package/api/resources/search/client/Client.d.ts +3 -2
- package/api/resources/search/client/Client.js +9 -5
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +5 -0
- package/api/resources/sources/client/Client.d.ts +1 -1
- package/api/resources/sources/client/Client.js +3 -3
- package/api/resources/sync/client/Client.d.ts +3 -1
- package/api/resources/sync/client/Client.js +27 -17
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
- package/api/resources/transformers/client/Client.d.ts +58 -0
- package/api/resources/transformers/client/Client.js +199 -0
- package/api/resources/transformers/client/index.d.ts +1 -0
- package/api/resources/transformers/client/index.js +17 -0
- package/{dist/api/types → api/resources/transformers/client/requests}/TransformerCreate.d.ts +8 -1
- package/api/resources/transformers/client/requests/index.d.ts +1 -0
- package/api/resources/transformers/client/requests/index.js +2 -0
- package/api/resources/transformers/index.d.ts +1 -0
- package/api/resources/transformers/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +48 -0
- package/api/resources/users/client/Client.js +135 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +2 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +17 -0
- package/api/resources/whiteLabels/client/Client.js +10 -10
- package/api/types/ApiKey.d.ts +1 -1
- package/api/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
- package/api/types/{EmbeddingModelWithConfigFields.d.ts → EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
- package/api/types/EntityCount.d.ts +9 -0
- package/api/types/Organization.d.ts +13 -0
- package/api/types/ResponseType.d.ts +11 -0
- package/api/types/ResponseType.js +10 -0
- package/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/api/types/SyncJob.d.ts +5 -4
- package/api/types/User.d.ts +1 -1
- package/api/types/UserCreate.d.ts +11 -0
- package/api/types/index.d.ts +7 -10
- package/api/types/index.js +7 -10
- package/dist/Client.d.ts +15 -0
- package/dist/Client.js +37 -12
- package/dist/api/resources/apiKeys/client/Client.js +12 -12
- package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +1 -0
- package/dist/api/resources/chat/client/Client.d.ts +77 -0
- package/dist/api/resources/chat/client/Client.js +227 -0
- package/dist/api/resources/chat/client/index.d.ts +1 -0
- package/dist/api/resources/chat/client/index.js +17 -0
- package/dist/api/{types → resources/chat/client/requests}/ChatCreate.d.ts +5 -1
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/dist/api/resources/chat/client/requests/index.d.ts +2 -0
- package/dist/api/resources/chat/client/requests/index.js +2 -0
- package/dist/api/resources/chat/index.d.ts +1 -0
- package/dist/api/resources/chat/index.js +17 -0
- package/dist/api/resources/connections/client/Client.d.ts +2 -2
- package/dist/api/resources/connections/client/Client.js +11 -11
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +2 -2
- package/dist/api/resources/dag/client/Client.d.ts +81 -0
- package/dist/api/resources/dag/client/Client.js +276 -0
- package/dist/api/resources/dag/client/index.d.ts +1 -0
- package/dist/api/resources/dag/client/index.js +17 -0
- package/dist/api/resources/dag/client/requests/SyncDagCreate.d.ts +26 -0
- package/{api/types → dist/api/resources/dag/client/requests}/SyncDagUpdate.d.ts +7 -3
- package/dist/api/resources/dag/client/requests/index.d.ts +2 -0
- package/dist/api/resources/dag/client/requests/index.js +2 -0
- package/dist/api/resources/dag/index.d.ts +1 -0
- package/dist/api/resources/dag/index.js +17 -0
- package/dist/api/resources/embeddingModels/client/Client.d.ts +1 -1
- package/dist/api/resources/embeddingModels/client/Client.js +3 -3
- package/dist/api/resources/entities/client/Client.d.ts +119 -0
- package/dist/api/resources/entities/client/Client.js +480 -0
- package/dist/api/resources/entities/client/index.d.ts +1 -0
- package/dist/api/resources/entities/client/index.js +17 -0
- package/{api/types → dist/api/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +9 -2
- package/{api/types → dist/api/resources/entities/client/requests}/EntityRelationCreate.d.ts +6 -1
- package/dist/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
- package/dist/api/resources/entities/client/requests/index.d.ts +3 -0
- package/dist/api/resources/entities/client/requests/index.js +2 -0
- package/dist/api/resources/entities/index.d.ts +2 -0
- package/dist/api/resources/entities/index.js +18 -0
- package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
- package/dist/api/resources/entities/types/index.d.ts +1 -0
- package/dist/api/resources/entities/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +10 -0
- package/dist/api/resources/index.js +11 -1
- package/dist/api/resources/search/client/Client.d.ts +3 -2
- package/dist/api/resources/search/client/Client.js +9 -5
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +5 -0
- package/dist/api/resources/sources/client/Client.d.ts +1 -1
- package/dist/api/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/sync/client/Client.d.ts +3 -1
- package/dist/api/resources/sync/client/Client.js +27 -17
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
- package/dist/api/resources/transformers/client/Client.d.ts +58 -0
- package/dist/api/resources/transformers/client/Client.js +199 -0
- package/dist/api/resources/transformers/client/index.d.ts +1 -0
- package/dist/api/resources/transformers/client/index.js +17 -0
- package/{api/types → dist/api/resources/transformers/client/requests}/TransformerCreate.d.ts +8 -1
- package/dist/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
- package/dist/api/resources/transformers/client/requests/index.d.ts +1 -0
- package/dist/api/resources/transformers/client/requests/index.js +2 -0
- package/dist/api/resources/transformers/index.d.ts +1 -0
- package/dist/api/resources/transformers/index.js +17 -0
- package/dist/api/resources/users/client/Client.d.ts +48 -0
- package/dist/api/resources/users/client/Client.js +135 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +17 -0
- package/dist/api/resources/whiteLabels/client/Client.js +10 -10
- package/dist/api/types/ApiKey.d.ts +1 -1
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/dist/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/DestinationWithAuthenticationFields.js +5 -0
- package/dist/api/types/{EmbeddingModelWithConfigFields.d.ts → EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/EmbeddingModelWithAuthenticationFields.js +5 -0
- package/dist/api/types/EntityCount.d.ts +9 -0
- package/dist/api/types/EntityCount.js +5 -0
- package/dist/api/types/Organization.d.ts +13 -0
- package/dist/api/types/Organization.js +5 -0
- package/dist/api/types/ResponseType.d.ts +11 -0
- package/dist/api/types/ResponseType.js +10 -0
- package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/SourceWithAuthenticationFields.js +5 -0
- package/dist/api/types/SyncJob.d.ts +5 -4
- package/dist/api/types/User.d.ts +1 -1
- package/dist/api/types/UserCreate.d.ts +11 -0
- package/dist/api/types/UserCreate.js +5 -0
- package/dist/api/types/index.d.ts +7 -10
- package/dist/api/types/index.js +7 -10
- package/dist/serialization/resources/chat/client/index.d.ts +2 -0
- package/dist/serialization/resources/chat/client/index.js +41 -0
- package/dist/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/dist/serialization/resources/chat/client/listChats.js +42 -0
- package/dist/serialization/{types → resources/chat/client/requests}/ChatCreate.d.ts +4 -4
- package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
- package/dist/serialization/resources/chat/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/chat/client/requests/index.js +5 -0
- package/dist/serialization/resources/chat/index.d.ts +1 -0
- package/dist/serialization/resources/chat/index.js +17 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +1 -1
- package/dist/serialization/resources/dag/client/index.d.ts +1 -0
- package/dist/serialization/resources/dag/client/index.js +17 -0
- package/dist/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +18 -0
- package/{serialization/types → dist/serialization/resources/dag/client/requests}/SyncDagCreate.js +4 -4
- package/dist/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +18 -0
- package/{serialization/types → dist/serialization/resources/dag/client/requests}/SyncDagUpdate.js +4 -4
- package/dist/serialization/resources/dag/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/dag/client/requests/index.js +7 -0
- package/dist/serialization/resources/dag/index.d.ts +1 -0
- package/dist/serialization/resources/dag/index.js +17 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
- package/dist/serialization/resources/entities/client/index.d.ts +5 -0
- package/dist/serialization/resources/entities/client/index.js +44 -0
- package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
- package/dist/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
- package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
- package/dist/serialization/resources/entities/client/listEntityRelations.js +42 -0
- package/{serialization/types → dist/serialization/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +6 -6
- package/dist/serialization/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +3 -3
- package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
- package/{serialization/types → dist/serialization/resources/entities/client/requests}/EntityRelationCreate.js +1 -1
- package/dist/serialization/resources/entities/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/entities/client/requests/index.js +7 -0
- package/dist/serialization/resources/entities/index.d.ts +2 -0
- package/dist/serialization/resources/entities/index.js +18 -0
- package/dist/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
- package/dist/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +1 -1
- package/dist/serialization/resources/entities/types/index.d.ts +1 -0
- package/dist/serialization/resources/entities/types/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +9 -0
- package/dist/serialization/resources/index.js +10 -1
- package/dist/serialization/resources/search/client/search.d.ts +2 -2
- package/dist/serialization/resources/search/client/search.js +1 -1
- package/dist/serialization/resources/transformers/client/index.d.ts +2 -0
- package/dist/serialization/resources/transformers/client/index.js +41 -0
- package/dist/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
- package/dist/serialization/resources/transformers/client/listTransformers.js +42 -0
- package/dist/serialization/{types → resources/transformers/client/requests}/TransformerCreate.d.ts +4 -4
- package/dist/serialization/{types → resources/transformers/client/requests}/TransformerCreate.js +1 -1
- package/dist/serialization/resources/transformers/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/transformers/client/requests/index.js +5 -0
- package/dist/serialization/resources/transformers/index.d.ts +1 -0
- package/dist/serialization/resources/transformers/index.js +17 -0
- package/dist/serialization/types/ApiKey.d.ts +1 -1
- package/dist/serialization/types/ApiKey.js +1 -1
- package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/dist/serialization/types/ApiKeyWithPlainKey.js +1 -1
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
- package/dist/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
- package/dist/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
- package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
- package/{serialization/types/EmbeddingModelWithConfigFields.js → dist/serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
- package/dist/serialization/types/EntityCount.d.ts +12 -0
- package/dist/serialization/types/EntityCount.js +43 -0
- package/dist/serialization/types/Organization.d.ts +16 -0
- package/dist/serialization/types/Organization.js +47 -0
- package/dist/serialization/types/ResponseType.d.ts +10 -0
- package/dist/serialization/types/ResponseType.js +41 -0
- package/dist/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/dist/serialization/types/SyncJob.d.ts +5 -4
- package/dist/serialization/types/SyncJob.js +5 -4
- package/dist/serialization/types/User.d.ts +1 -1
- package/dist/serialization/types/User.js +1 -1
- package/dist/serialization/types/UserCreate.d.ts +14 -0
- package/dist/serialization/types/UserCreate.js +45 -0
- package/dist/serialization/types/index.d.ts +7 -10
- package/dist/serialization/types/index.js +7 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +962 -7
- package/serialization/resources/chat/client/index.d.ts +2 -0
- package/serialization/resources/chat/client/index.js +41 -0
- package/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/serialization/resources/chat/client/listChats.js +42 -0
- package/serialization/{types → resources/chat/client/requests}/ChatCreate.d.ts +4 -4
- package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
- package/serialization/resources/chat/client/requests/index.d.ts +1 -0
- package/serialization/resources/chat/client/requests/index.js +5 -0
- package/serialization/resources/chat/index.d.ts +1 -0
- package/serialization/resources/chat/index.js +17 -0
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +1 -1
- package/serialization/resources/dag/client/index.d.ts +1 -0
- package/serialization/resources/dag/client/index.js +17 -0
- package/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +18 -0
- package/{dist/serialization/types → serialization/resources/dag/client/requests}/SyncDagCreate.js +4 -4
- package/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +18 -0
- package/{dist/serialization/types → serialization/resources/dag/client/requests}/SyncDagUpdate.js +4 -4
- package/serialization/resources/dag/client/requests/index.d.ts +2 -0
- package/serialization/resources/dag/client/requests/index.js +7 -0
- package/serialization/resources/dag/index.d.ts +1 -0
- package/serialization/resources/dag/index.js +17 -0
- package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
- package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
- package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
- package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
- package/serialization/resources/entities/client/index.d.ts +5 -0
- package/serialization/resources/entities/client/index.js +44 -0
- package/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
- package/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
- package/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
- package/serialization/resources/entities/client/listEntityRelations.js +42 -0
- package/{dist/serialization/types → serialization/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +6 -6
- package/serialization/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +3 -3
- package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
- package/{dist/serialization/types → serialization/resources/entities/client/requests}/EntityRelationCreate.js +1 -1
- package/serialization/resources/entities/client/requests/index.d.ts +2 -0
- package/serialization/resources/entities/client/requests/index.js +7 -0
- package/serialization/resources/entities/index.d.ts +2 -0
- package/serialization/resources/entities/index.js +18 -0
- package/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
- package/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +1 -1
- package/serialization/resources/entities/types/index.d.ts +1 -0
- package/serialization/resources/entities/types/index.js +17 -0
- package/serialization/resources/index.d.ts +9 -0
- package/serialization/resources/index.js +10 -1
- package/serialization/resources/search/client/search.d.ts +2 -2
- package/serialization/resources/search/client/search.js +1 -1
- package/serialization/resources/transformers/client/index.d.ts +2 -0
- package/serialization/resources/transformers/client/index.js +41 -0
- package/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
- package/serialization/resources/transformers/client/listTransformers.js +42 -0
- package/serialization/{types → resources/transformers/client/requests}/TransformerCreate.d.ts +4 -4
- package/serialization/{types → resources/transformers/client/requests}/TransformerCreate.js +1 -1
- package/serialization/resources/transformers/client/requests/index.d.ts +1 -0
- package/serialization/resources/transformers/client/requests/index.js +5 -0
- package/serialization/resources/transformers/index.d.ts +1 -0
- package/serialization/resources/transformers/index.js +17 -0
- package/serialization/types/ApiKey.d.ts +1 -1
- package/serialization/types/ApiKey.js +1 -1
- package/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/serialization/types/ApiKeyWithPlainKey.js +1 -1
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
- package/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
- package/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
- package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
- package/{dist/serialization/types/EmbeddingModelWithConfigFields.js → serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
- package/serialization/types/EntityCount.d.ts +12 -0
- package/serialization/types/EntityCount.js +43 -0
- package/serialization/types/Organization.d.ts +16 -0
- package/serialization/types/Organization.js +47 -0
- package/serialization/types/ResponseType.d.ts +10 -0
- package/serialization/types/ResponseType.js +41 -0
- package/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/serialization/types/SyncJob.d.ts +5 -4
- package/serialization/types/SyncJob.js +5 -4
- package/serialization/types/User.d.ts +1 -1
- package/serialization/types/User.js +1 -1
- package/serialization/types/UserCreate.d.ts +14 -0
- package/serialization/types/UserCreate.js +45 -0
- package/serialization/types/index.d.ts +7 -10
- package/serialization/types/index.js +7 -10
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/SyncDagCreate.d.ts +0 -14
- package/dist/api/types/SyncDagCreate.d.ts +0 -14
- package/dist/serialization/types/EntityRelationCreate.d.ts +0 -15
- package/dist/serialization/types/SyncDagCreate.d.ts +0 -18
- package/dist/serialization/types/SyncDagUpdate.d.ts +0 -18
- package/serialization/types/EntityRelationCreate.d.ts +0 -15
- package/serialization/types/SyncDagCreate.d.ts +0 -18
- package/serialization/types/SyncDagUpdate.d.ts +0 -18
- /package/api/{types → resources/chat/client/requests}/ChatCreate.js +0 -0
- /package/api/{types/DestinationWithConfigFields.js → resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
- /package/api/{types → resources/dag/client/requests}/SyncDagCreate.js +0 -0
- /package/api/{types → resources/dag/client/requests}/SyncDagUpdate.js +0 -0
- /package/api/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +0 -0
- /package/api/{types → resources/entities/client/requests}/EntityRelationCreate.js +0 -0
- /package/api/{types/EmbeddingModelWithConfigFields.js → resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
- /package/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
- /package/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +0 -0
- /package/api/{types → resources/transformers/client/requests}/TransformerCreate.js +0 -0
- /package/api/types/{SourceWithConfigFields.js → DestinationWithAuthenticationFields.js} +0 -0
- /package/{dist/api/types/ChatCreate.js → api/types/EmbeddingModelWithAuthenticationFields.js} +0 -0
- /package/{dist/api/types/DestinationWithConfigFields.js → api/types/EntityCount.js} +0 -0
- /package/{dist/api/types/EmbeddingModelWithConfigFields.js → api/types/Organization.js} +0 -0
- /package/{dist/api/types/EntityDefinitionCreate.js → api/types/SourceWithAuthenticationFields.js} +0 -0
- /package/{dist/api/types/EntityDefinitionCreateEntitySchema.js → api/types/UserCreate.js} +0 -0
- /package/dist/api/{types/EntityRelationCreate.js → resources/chat/client/requests/ChatCreate.js} +0 -0
- /package/dist/api/{types/SourceWithConfigFields.js → resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
- /package/dist/api/{types → resources/dag/client/requests}/SyncDagCreate.js +0 -0
- /package/dist/api/{types → resources/dag/client/requests}/SyncDagUpdate.js +0 -0
- /package/dist/api/{types/TransformerCreate.js → resources/entities/client/requests/EntityDefinitionCreate.js} +0 -0
- /package/dist/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
package/Client.d.ts
CHANGED
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { ApiKeys } from "./api/resources/apiKeys/client/Client";
|
|
7
|
+
import { Users } from "./api/resources/users/client/Client";
|
|
7
8
|
import { Sources } from "./api/resources/sources/client/Client";
|
|
8
9
|
import { EmbeddingModels } from "./api/resources/embeddingModels/client/Client";
|
|
9
10
|
import { Connections } from "./api/resources/connections/client/Client";
|
|
10
11
|
import { Sync } from "./api/resources/sync/client/Client";
|
|
11
12
|
import { Search } from "./api/resources/search/client/Client";
|
|
12
13
|
import { WhiteLabels } from "./api/resources/whiteLabels/client/Client";
|
|
14
|
+
import { Chat } from "./api/resources/chat/client/Client";
|
|
15
|
+
import { Dag } from "./api/resources/dag/client/Client";
|
|
16
|
+
import { Entities } from "./api/resources/entities/client/Client";
|
|
17
|
+
import { Transformers } from "./api/resources/transformers/client/Client";
|
|
13
18
|
export declare namespace AirweaveSDKClient {
|
|
14
19
|
interface Options {
|
|
15
20
|
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
@@ -32,18 +37,28 @@ export declare namespace AirweaveSDKClient {
|
|
|
32
37
|
export declare class AirweaveSDKClient {
|
|
33
38
|
protected readonly _options: AirweaveSDKClient.Options;
|
|
34
39
|
protected _apiKeys: ApiKeys | undefined;
|
|
40
|
+
protected _users: Users | undefined;
|
|
35
41
|
protected _sources: Sources | undefined;
|
|
36
42
|
protected _embeddingModels: EmbeddingModels | undefined;
|
|
37
43
|
protected _connections: Connections | undefined;
|
|
38
44
|
protected _sync: Sync | undefined;
|
|
39
45
|
protected _search: Search | undefined;
|
|
40
46
|
protected _whiteLabels: WhiteLabels | undefined;
|
|
47
|
+
protected _chat: Chat | undefined;
|
|
48
|
+
protected _dag: Dag | undefined;
|
|
49
|
+
protected _entities: Entities | undefined;
|
|
50
|
+
protected _transformers: Transformers | undefined;
|
|
41
51
|
constructor(_options?: AirweaveSDKClient.Options);
|
|
42
52
|
get apiKeys(): ApiKeys;
|
|
53
|
+
get users(): Users;
|
|
43
54
|
get sources(): Sources;
|
|
44
55
|
get embeddingModels(): EmbeddingModels;
|
|
45
56
|
get connections(): Connections;
|
|
46
57
|
get sync(): Sync;
|
|
47
58
|
get search(): Search;
|
|
48
59
|
get whiteLabels(): WhiteLabels;
|
|
60
|
+
get chat(): Chat;
|
|
61
|
+
get dag(): Dag;
|
|
62
|
+
get entities(): Entities;
|
|
63
|
+
get transformers(): Transformers;
|
|
49
64
|
}
|
package/Client.js
CHANGED
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AirweaveSDKClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/apiKeys/client/Client");
|
|
8
|
-
const Client_2 = require("./api/resources/
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
8
|
+
const Client_2 = require("./api/resources/users/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/sources/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/embeddingModels/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/connections/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/sync/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/search/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/whiteLabels/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/chat/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/dag/client/Client");
|
|
17
|
+
const Client_11 = require("./api/resources/entities/client/Client");
|
|
18
|
+
const Client_12 = require("./api/resources/transformers/client/Client");
|
|
14
19
|
class AirweaveSDKClient {
|
|
15
20
|
constructor(_options = {}) {
|
|
16
21
|
this._options = _options;
|
|
@@ -19,29 +24,49 @@ class AirweaveSDKClient {
|
|
|
19
24
|
var _a;
|
|
20
25
|
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_1.ApiKeys(this._options)));
|
|
21
26
|
}
|
|
27
|
+
get users() {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_2.Users(this._options)));
|
|
30
|
+
}
|
|
22
31
|
get sources() {
|
|
23
32
|
var _a;
|
|
24
|
-
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new
|
|
33
|
+
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_3.Sources(this._options)));
|
|
25
34
|
}
|
|
26
35
|
get embeddingModels() {
|
|
27
36
|
var _a;
|
|
28
|
-
return ((_a = this._embeddingModels) !== null && _a !== void 0 ? _a : (this._embeddingModels = new
|
|
37
|
+
return ((_a = this._embeddingModels) !== null && _a !== void 0 ? _a : (this._embeddingModels = new Client_4.EmbeddingModels(this._options)));
|
|
29
38
|
}
|
|
30
39
|
get connections() {
|
|
31
40
|
var _a;
|
|
32
|
-
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new
|
|
41
|
+
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_5.Connections(this._options)));
|
|
33
42
|
}
|
|
34
43
|
get sync() {
|
|
35
44
|
var _a;
|
|
36
|
-
return ((_a = this._sync) !== null && _a !== void 0 ? _a : (this._sync = new
|
|
45
|
+
return ((_a = this._sync) !== null && _a !== void 0 ? _a : (this._sync = new Client_6.Sync(this._options)));
|
|
37
46
|
}
|
|
38
47
|
get search() {
|
|
39
48
|
var _a;
|
|
40
|
-
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new
|
|
49
|
+
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new Client_7.Search(this._options)));
|
|
41
50
|
}
|
|
42
51
|
get whiteLabels() {
|
|
43
52
|
var _a;
|
|
44
|
-
return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new
|
|
53
|
+
return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new Client_8.WhiteLabels(this._options)));
|
|
54
|
+
}
|
|
55
|
+
get chat() {
|
|
56
|
+
var _a;
|
|
57
|
+
return ((_a = this._chat) !== null && _a !== void 0 ? _a : (this._chat = new Client_9.Chat(this._options)));
|
|
58
|
+
}
|
|
59
|
+
get dag() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._dag) !== null && _a !== void 0 ? _a : (this._dag = new Client_10.Dag(this._options)));
|
|
62
|
+
}
|
|
63
|
+
get entities() {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = this._entities) !== null && _a !== void 0 ? _a : (this._entities = new Client_11.Entities(this._options)));
|
|
66
|
+
}
|
|
67
|
+
get transformers() {
|
|
68
|
+
var _a;
|
|
69
|
+
return ((_a = this._transformers) !== null && _a !== void 0 ? _a : (this._transformers = new Client_12.Transformers(this._options)));
|
|
45
70
|
}
|
|
46
71
|
}
|
|
47
72
|
exports.AirweaveSDKClient = AirweaveSDKClient;
|
|
@@ -93,11 +93,11 @@ class ApiKeys {
|
|
|
93
93
|
_queryParams["limit"] = limit.toString();
|
|
94
94
|
}
|
|
95
95
|
const _response = yield core.fetcher({
|
|
96
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "
|
|
96
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "api-keys"),
|
|
97
97
|
method: "GET",
|
|
98
98
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
99
99
|
? yield core.Supplier.get(this._options.apiKey)
|
|
100
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
100
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
queryParameters: _queryParams,
|
|
103
103
|
requestType: "json",
|
|
@@ -136,7 +136,7 @@ class ApiKeys {
|
|
|
136
136
|
body: _response.error.rawBody,
|
|
137
137
|
});
|
|
138
138
|
case "timeout":
|
|
139
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
139
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /api-keys.");
|
|
140
140
|
case "unknown":
|
|
141
141
|
throw new errors.AirweaveSDKError({
|
|
142
142
|
message: _response.error.errorMessage,
|
|
@@ -172,11 +172,11 @@ class ApiKeys {
|
|
|
172
172
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
173
173
|
var _a;
|
|
174
174
|
const _response = yield core.fetcher({
|
|
175
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "
|
|
175
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "api-keys"),
|
|
176
176
|
method: "POST",
|
|
177
177
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
178
178
|
? yield core.Supplier.get(this._options.apiKey)
|
|
179
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
179
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
180
180
|
contentType: "application/json",
|
|
181
181
|
requestType: "json",
|
|
182
182
|
body: serializers.ApiKeyCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -215,7 +215,7 @@ class ApiKeys {
|
|
|
215
215
|
body: _response.error.rawBody,
|
|
216
216
|
});
|
|
217
217
|
case "timeout":
|
|
218
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /
|
|
218
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /api-keys.");
|
|
219
219
|
case "unknown":
|
|
220
220
|
throw new errors.AirweaveSDKError({
|
|
221
221
|
message: _response.error.errorMessage,
|
|
@@ -257,11 +257,11 @@ class ApiKeys {
|
|
|
257
257
|
const _queryParams = {};
|
|
258
258
|
_queryParams["id"] = id;
|
|
259
259
|
const _response = yield core.fetcher({
|
|
260
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "
|
|
260
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "api-keys"),
|
|
261
261
|
method: "DELETE",
|
|
262
262
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
263
263
|
? yield core.Supplier.get(this._options.apiKey)
|
|
264
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
264
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
queryParameters: _queryParams,
|
|
267
267
|
requestType: "json",
|
|
@@ -300,7 +300,7 @@ class ApiKeys {
|
|
|
300
300
|
body: _response.error.rawBody,
|
|
301
301
|
});
|
|
302
302
|
case "timeout":
|
|
303
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /
|
|
303
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /api-keys.");
|
|
304
304
|
case "unknown":
|
|
305
305
|
throw new errors.AirweaveSDKError({
|
|
306
306
|
message: _response.error.errorMessage,
|
|
@@ -337,11 +337,11 @@ class ApiKeys {
|
|
|
337
337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
338
338
|
var _a;
|
|
339
339
|
const _response = yield core.fetcher({
|
|
340
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `
|
|
340
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `api-keys/${encodeURIComponent(id)}`),
|
|
341
341
|
method: "GET",
|
|
342
342
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
343
343
|
? yield core.Supplier.get(this._options.apiKey)
|
|
344
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
344
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
345
345
|
contentType: "application/json",
|
|
346
346
|
requestType: "json",
|
|
347
347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -379,7 +379,7 @@ class ApiKeys {
|
|
|
379
379
|
body: _response.error.rawBody,
|
|
380
380
|
});
|
|
381
381
|
case "timeout":
|
|
382
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
382
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /api-keys/{id}.");
|
|
383
383
|
case "unknown":
|
|
384
384
|
throw new errors.AirweaveSDKError({
|
|
385
385
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as AirweaveSDK from "../../../index";
|
|
7
|
+
export declare namespace Chat {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
10
|
+
/** Override the x-api-key header */
|
|
11
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Override the x-api-key header */
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class Chat {
|
|
27
|
+
protected readonly _options: Chat.Options;
|
|
28
|
+
constructor(_options?: Chat.Options);
|
|
29
|
+
/**
|
|
30
|
+
* List all chats for the current user.
|
|
31
|
+
*
|
|
32
|
+
* Args:
|
|
33
|
+
* ----
|
|
34
|
+
* db: The database session.
|
|
35
|
+
* skip: The number of chats to skip.
|
|
36
|
+
* limit: The number of chats to return.
|
|
37
|
+
* user: The current user.
|
|
38
|
+
*
|
|
39
|
+
* Returns:
|
|
40
|
+
* -------
|
|
41
|
+
* list[schemas.Chat]: The list of chats.
|
|
42
|
+
*
|
|
43
|
+
* @param {AirweaveSDK.ListChatsChatGetRequest} request
|
|
44
|
+
* @param {Chat.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.chat.listChats()
|
|
50
|
+
*/
|
|
51
|
+
listChats(request?: AirweaveSDK.ListChatsChatGetRequest, requestOptions?: Chat.RequestOptions): Promise<AirweaveSDK.Chat[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a new chat.
|
|
54
|
+
*
|
|
55
|
+
* Args:
|
|
56
|
+
* ----
|
|
57
|
+
* db: The database session.
|
|
58
|
+
* chat_in: The chat creation data.
|
|
59
|
+
* user: The current user.
|
|
60
|
+
*
|
|
61
|
+
* Returns:
|
|
62
|
+
* -------
|
|
63
|
+
* schemas.Chat: The created chat.
|
|
64
|
+
*
|
|
65
|
+
* @param {AirweaveSDK.ChatCreate} request
|
|
66
|
+
* @param {Chat.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.chat.createChat({
|
|
72
|
+
* name: "name",
|
|
73
|
+
* syncId: "sync_id"
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
76
|
+
createChat(request: AirweaveSDK.ChatCreate, requestOptions?: Chat.RequestOptions): Promise<AirweaveSDK.Chat>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Chat = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const AirweaveSDK = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
class Chat {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* List all chats for the current user.
|
|
64
|
+
*
|
|
65
|
+
* Args:
|
|
66
|
+
* ----
|
|
67
|
+
* db: The database session.
|
|
68
|
+
* skip: The number of chats to skip.
|
|
69
|
+
* limit: The number of chats to return.
|
|
70
|
+
* user: The current user.
|
|
71
|
+
*
|
|
72
|
+
* Returns:
|
|
73
|
+
* -------
|
|
74
|
+
* list[schemas.Chat]: The list of chats.
|
|
75
|
+
*
|
|
76
|
+
* @param {AirweaveSDK.ListChatsChatGetRequest} request
|
|
77
|
+
* @param {Chat.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.chat.listChats()
|
|
83
|
+
*/
|
|
84
|
+
listChats() {
|
|
85
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
|
+
var _a;
|
|
87
|
+
const { skip, limit } = request;
|
|
88
|
+
const _queryParams = {};
|
|
89
|
+
if (skip != null) {
|
|
90
|
+
_queryParams["skip"] = skip.toString();
|
|
91
|
+
}
|
|
92
|
+
if (limit != null) {
|
|
93
|
+
_queryParams["limit"] = limit.toString();
|
|
94
|
+
}
|
|
95
|
+
const _response = yield core.fetcher({
|
|
96
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "chat"),
|
|
97
|
+
method: "GET",
|
|
98
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
99
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
100
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
101
|
+
contentType: "application/json",
|
|
102
|
+
queryParameters: _queryParams,
|
|
103
|
+
requestType: "json",
|
|
104
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
105
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
106
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
+
});
|
|
108
|
+
if (_response.ok) {
|
|
109
|
+
return serializers.chat.listChats.Response.parseOrThrow(_response.body, {
|
|
110
|
+
unrecognizedObjectKeys: "passthrough",
|
|
111
|
+
allowUnrecognizedUnionMembers: true,
|
|
112
|
+
allowUnrecognizedEnumValues: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 422:
|
|
119
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
120
|
+
unrecognizedObjectKeys: "passthrough",
|
|
121
|
+
allowUnrecognizedUnionMembers: true,
|
|
122
|
+
allowUnrecognizedEnumValues: true,
|
|
123
|
+
breadcrumbsPrefix: ["response"],
|
|
124
|
+
}));
|
|
125
|
+
default:
|
|
126
|
+
throw new errors.AirweaveSDKError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.body,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
switch (_response.error.reason) {
|
|
133
|
+
case "non-json":
|
|
134
|
+
throw new errors.AirweaveSDKError({
|
|
135
|
+
statusCode: _response.error.statusCode,
|
|
136
|
+
body: _response.error.rawBody,
|
|
137
|
+
});
|
|
138
|
+
case "timeout":
|
|
139
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /chat.");
|
|
140
|
+
case "unknown":
|
|
141
|
+
throw new errors.AirweaveSDKError({
|
|
142
|
+
message: _response.error.errorMessage,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create a new chat.
|
|
149
|
+
*
|
|
150
|
+
* Args:
|
|
151
|
+
* ----
|
|
152
|
+
* db: The database session.
|
|
153
|
+
* chat_in: The chat creation data.
|
|
154
|
+
* user: The current user.
|
|
155
|
+
*
|
|
156
|
+
* Returns:
|
|
157
|
+
* -------
|
|
158
|
+
* schemas.Chat: The created chat.
|
|
159
|
+
*
|
|
160
|
+
* @param {AirweaveSDK.ChatCreate} request
|
|
161
|
+
* @param {Chat.RequestOptions} requestOptions - Request-specific configuration.
|
|
162
|
+
*
|
|
163
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.chat.createChat({
|
|
167
|
+
* name: "name",
|
|
168
|
+
* syncId: "sync_id"
|
|
169
|
+
* })
|
|
170
|
+
*/
|
|
171
|
+
createChat(request, requestOptions) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var _a;
|
|
174
|
+
const _response = yield core.fetcher({
|
|
175
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "chat"),
|
|
176
|
+
method: "POST",
|
|
177
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
178
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
179
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.24", "User-Agent": "@airweave/sdk/v0.2.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
180
|
+
contentType: "application/json",
|
|
181
|
+
requestType: "json",
|
|
182
|
+
body: serializers.ChatCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
183
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
184
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
185
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
186
|
+
});
|
|
187
|
+
if (_response.ok) {
|
|
188
|
+
return serializers.Chat.parseOrThrow(_response.body, {
|
|
189
|
+
unrecognizedObjectKeys: "passthrough",
|
|
190
|
+
allowUnrecognizedUnionMembers: true,
|
|
191
|
+
allowUnrecognizedEnumValues: true,
|
|
192
|
+
breadcrumbsPrefix: ["response"],
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
if (_response.error.reason === "status-code") {
|
|
196
|
+
switch (_response.error.statusCode) {
|
|
197
|
+
case 422:
|
|
198
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
199
|
+
unrecognizedObjectKeys: "passthrough",
|
|
200
|
+
allowUnrecognizedUnionMembers: true,
|
|
201
|
+
allowUnrecognizedEnumValues: true,
|
|
202
|
+
breadcrumbsPrefix: ["response"],
|
|
203
|
+
}));
|
|
204
|
+
default:
|
|
205
|
+
throw new errors.AirweaveSDKError({
|
|
206
|
+
statusCode: _response.error.statusCode,
|
|
207
|
+
body: _response.error.body,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
switch (_response.error.reason) {
|
|
212
|
+
case "non-json":
|
|
213
|
+
throw new errors.AirweaveSDKError({
|
|
214
|
+
statusCode: _response.error.statusCode,
|
|
215
|
+
body: _response.error.rawBody,
|
|
216
|
+
});
|
|
217
|
+
case "timeout":
|
|
218
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /chat.");
|
|
219
|
+
case "unknown":
|
|
220
|
+
throw new errors.AirweaveSDKError({
|
|
221
|
+
message: _response.error.errorMessage,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.Chat = Chat;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -107,7 +107,7 @@ export declare class Connections {
|
|
|
107
107
|
* integration_type: The type of integration to connect to.
|
|
108
108
|
* short_name: The short name of the integration to connect to.
|
|
109
109
|
* name: The name of the connection.
|
|
110
|
-
*
|
|
110
|
+
* auth_fields: The config fields for the integration.
|
|
111
111
|
* user: The current user.
|
|
112
112
|
*
|
|
113
113
|
* Returns:
|
|
@@ -123,7 +123,7 @@ export declare class Connections {
|
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
125
125
|
* await client.connections.connectIntegration("source", "short_name", {
|
|
126
|
-
*
|
|
126
|
+
* authFields: {
|
|
127
127
|
* "key": "value"
|
|
128
128
|
* }
|
|
129
129
|
* })
|