@airweave/sdk 0.2.22 → 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/README.md +7 -15
- package/api/resources/apiKeys/client/Client.d.ts +78 -5
- package/api/resources/apiKeys/client/Client.js +252 -10
- package/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
- package/api/resources/{sync/client/requests/GetSyncSyncSyncIdGetRequest.d.ts → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts} +3 -3
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
- package/api/resources/apiKeys/client/requests/index.d.ts +3 -1
- 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/index.d.ts +1 -0
- package/api/resources/chat/index.js +17 -0
- package/api/resources/connections/client/Client.d.ts +20 -48
- package/api/resources/connections/client/Client.js +30 -107
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +3 -8
- package/api/resources/connections/client/requests/index.d.ts +0 -8
- 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/index.d.ts +1 -0
- package/api/resources/dag/index.js +17 -0
- package/api/resources/embeddingModels/client/Client.d.ts +4 -10
- package/api/resources/embeddingModels/client/Client.js +7 -21
- package/api/resources/embeddingModels/client/index.d.ts +1 -1
- package/api/resources/embeddingModels/client/index.js +0 -15
- 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/api/{types → 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/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 -2
- package/api/resources/index.js +11 -3
- package/api/resources/search/client/Client.d.ts +1 -2
- package/api/resources/search/client/Client.js +5 -7
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +1 -3
- package/api/resources/sources/client/Client.d.ts +4 -10
- package/api/resources/sources/client/Client.js +7 -21
- package/api/resources/sources/client/index.d.ts +1 -1
- package/api/resources/sources/client/index.js +0 -15
- package/api/resources/sync/client/Client.d.ts +19 -59
- package/api/resources/sync/client/Client.js +43 -125
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +1 -4
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +1 -4
- package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +1 -4
- package/api/resources/sync/client/requests/SyncCreate.d.ts +1 -12
- package/api/resources/sync/client/requests/SyncUpdate.d.ts +1 -11
- package/api/resources/sync/client/requests/index.d.ts +0 -5
- 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/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.d.ts +15 -40
- package/api/resources/whiteLabels/client/Client.js +28 -96
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -2
- package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +1 -8
- package/api/resources/whiteLabels/client/requests/index.d.ts +0 -6
- 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/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/api/types/index.d.ts +3 -11
- package/api/types/index.js +3 -11
- package/dist/Client.d.ts +15 -0
- package/dist/Client.js +37 -12
- package/dist/api/resources/apiKeys/client/Client.d.ts +78 -5
- package/dist/api/resources/apiKeys/client/Client.js +252 -10
- package/dist/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
- package/dist/api/resources/{sync/client/requests/GetSyncSyncSyncIdGetRequest.d.ts → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts} +3 -3
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +3 -1
- 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 +20 -48
- package/dist/api/resources/connections/client/Client.js +30 -107
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +3 -8
- package/dist/api/resources/connections/client/requests/index.d.ts +0 -8
- 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 +4 -10
- package/dist/api/resources/embeddingModels/client/Client.js +7 -21
- package/dist/api/resources/embeddingModels/client/index.d.ts +1 -1
- package/dist/api/resources/embeddingModels/client/index.js +0 -15
- 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/dist/api/{types → 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/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -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/index.d.ts +1 -0
- package/dist/api/resources/entities/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +10 -2
- package/dist/api/resources/index.js +11 -3
- package/dist/api/resources/search/client/Client.d.ts +1 -2
- package/dist/api/resources/search/client/Client.js +5 -7
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +1 -3
- package/dist/api/resources/sources/client/Client.d.ts +4 -10
- package/dist/api/resources/sources/client/Client.js +7 -21
- package/dist/api/resources/sources/client/index.d.ts +1 -1
- package/dist/api/resources/sources/client/index.js +0 -15
- package/dist/api/resources/sync/client/Client.d.ts +19 -59
- package/dist/api/resources/sync/client/Client.js +43 -125
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +1 -4
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +1 -4
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +1 -4
- package/dist/api/resources/sync/client/requests/SyncCreate.d.ts +1 -12
- package/dist/api/resources/sync/client/requests/SyncUpdate.d.ts +1 -11
- package/dist/api/resources/sync/client/requests/index.d.ts +0 -5
- 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/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.d.ts +15 -40
- package/dist/api/resources/whiteLabels/client/Client.js +28 -96
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -2
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +1 -8
- package/dist/api/resources/whiteLabels/client/requests/index.d.ts +0 -6
- 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/{EmbeddingModelWithConfigFields.d.ts → EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/index.d.ts +3 -11
- package/dist/api/types/index.js +3 -11
- package/dist/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/dist/serialization/resources/apiKeys/client/index.js +41 -0
- package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
- package/dist/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/dist/serialization/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +1 -1
- package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/apiKeys/client/requests/index.js +5 -0
- package/dist/serialization/resources/apiKeys/index.d.ts +1 -0
- package/dist/serialization/resources/apiKeys/index.js +17 -0
- 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/{serialization/types → dist/serialization/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 +2 -2
- 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/dist/serialization/{types → 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/dist/serialization/{types → 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 +11 -0
- package/dist/serialization/resources/index.js +12 -1
- package/dist/serialization/resources/sync/client/requests/SyncCreate.d.ts +1 -1
- package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +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/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +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/{serialization/types/DestinationWithConfigFields.js → dist/serialization/types/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/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/dist/serialization/types/index.d.ts +3 -11
- package/dist/serialization/types/index.js +3 -11
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1530 -612
- package/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/serialization/resources/apiKeys/client/index.js +41 -0
- package/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
- package/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/serialization/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +1 -1
- package/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/serialization/resources/apiKeys/client/requests/index.js +5 -0
- package/serialization/resources/apiKeys/index.d.ts +1 -0
- package/serialization/resources/apiKeys/index.js +17 -0
- 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/{dist/serialization/types → serialization/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 +2 -2
- 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/serialization/{types → 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/serialization/{types → 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 +11 -0
- package/serialization/resources/index.js +12 -1
- package/serialization/resources/sync/client/requests/SyncCreate.d.ts +1 -1
- package/serialization/resources/sync/client/requests/SyncUpdate.d.ts +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/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +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/{dist/serialization/types/DestinationWithConfigFields.js → serialization/types/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/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/serialization/types/index.d.ts +3 -11
- package/serialization/types/index.js +3 -11
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/DeleteConnectionConnectionsDeleteSourceConnectionIdDeleteRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/DisconnectSourceConnectionConnectionsDisconnectSourceConnectionIdPutRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/GetConnectionConnectionsDetailConnectionIdGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/GetConnectionCredentialsConnectionsCredentialsConnectionIdGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.d.ts +0 -14
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.d.ts +0 -12
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.d.ts +0 -12
- package/api/resources/embeddingModels/client/requests/index.d.ts +0 -2
- package/api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.d.ts +0 -12
- package/api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.d.ts +0 -12
- package/api/resources/sources/client/requests/index.d.ts +0 -2
- package/api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.d.ts +0 -12
- package/api/resources/sync/client/requests/GetSyncJobSyncSyncIdJobJobIdGetRequest.d.ts +0 -12
- package/api/resources/sync/client/requests/GetSyncJobSyncSyncIdJobJobIdGetRequest.js +0 -5
- package/api/resources/sync/client/requests/GetSyncSyncSyncIdGetRequest.js +0 -5
- package/api/resources/sync/client/requests/ListSyncJobsSyncSyncIdJobsGetRequest.d.ts +0 -12
- package/api/resources/sync/client/requests/ListSyncJobsSyncSyncIdJobsGetRequest.js +0 -5
- package/api/resources/sync/client/requests/RunSyncSyncSyncIdRunPostRequest.d.ts +0 -12
- package/api/resources/sync/client/requests/RunSyncSyncSyncIdRunPostRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/DeleteWhiteLabelWhiteLabelsWhiteLabelIdDeleteRequest.d.ts +0 -12
- package/api/resources/whiteLabels/client/requests/DeleteWhiteLabelWhiteLabelsWhiteLabelIdDeleteRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/ExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePostRequest.d.ts +0 -14
- package/api/resources/whiteLabels/client/requests/ExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePostRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/GetWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlGetRequest.d.ts +0 -12
- package/api/resources/whiteLabels/client/requests/GetWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlGetRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/GetWhiteLabelWhiteLabelsWhiteLabelIdGetRequest.d.ts +0 -12
- package/api/resources/whiteLabels/client/requests/GetWhiteLabelWhiteLabelsWhiteLabelIdGetRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/ListWhiteLabelSyncsWhiteLabelsWhiteLabelIdSyncsGetRequest.d.ts +0 -12
- package/api/resources/whiteLabels/client/requests/ListWhiteLabelSyncsWhiteLabelsWhiteLabelIdSyncsGetRequest.js +0 -5
- package/api/resources/whiteLabels/client/requests/ListWhiteLabelsWhiteLabelsListGetRequest.d.ts +0 -12
- package/api/resources/whiteLabels/client/requests/ListWhiteLabelsWhiteLabelsListGetRequest.js +0 -5
- package/api/types/DestinationWithConfigFields.js +0 -5
- package/api/types/EmbeddingModelWithConfigFields.js +0 -5
- package/api/types/SourceWithConfigFields.js +0 -5
- package/api/types/SyncDagCreate.d.ts +0 -14
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.d.ts +0 -12
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/DeleteConnectionConnectionsDeleteSourceConnectionIdDeleteRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/DeleteConnectionConnectionsDeleteSourceConnectionIdDeleteRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/DisconnectSourceConnectionConnectionsDisconnectSourceConnectionIdPutRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/DisconnectSourceConnectionConnectionsDisconnectSourceConnectionIdPutRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/GetConnectionConnectionsDetailConnectionIdGetRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/GetConnectionConnectionsDetailConnectionIdGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/GetConnectionCredentialsConnectionsCredentialsConnectionIdGetRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/GetConnectionCredentialsConnectionsCredentialsConnectionIdGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.d.ts +0 -12
- package/dist/api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.js +0 -5
- package/dist/api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.d.ts +0 -14
- package/dist/api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.js +0 -5
- package/dist/api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.d.ts +0 -12
- package/dist/api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.js +0 -5
- package/dist/api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.d.ts +0 -12
- package/dist/api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.js +0 -5
- package/dist/api/resources/embeddingModels/client/requests/index.d.ts +0 -2
- package/dist/api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.d.ts +0 -12
- package/dist/api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.js +0 -5
- package/dist/api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.d.ts +0 -12
- package/dist/api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.js +0 -5
- package/dist/api/resources/sources/client/requests/index.d.ts +0 -2
- package/dist/api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.d.ts +0 -12
- package/dist/api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.js +0 -5
- package/dist/api/resources/sync/client/requests/GetSyncJobSyncSyncIdJobJobIdGetRequest.d.ts +0 -12
- package/dist/api/resources/sync/client/requests/GetSyncJobSyncSyncIdJobJobIdGetRequest.js +0 -5
- package/dist/api/resources/sync/client/requests/GetSyncSyncSyncIdGetRequest.js +0 -5
- package/dist/api/resources/sync/client/requests/ListSyncJobsSyncSyncIdJobsGetRequest.d.ts +0 -12
- package/dist/api/resources/sync/client/requests/ListSyncJobsSyncSyncIdJobsGetRequest.js +0 -5
- package/dist/api/resources/sync/client/requests/RunSyncSyncSyncIdRunPostRequest.d.ts +0 -12
- package/dist/api/resources/sync/client/requests/RunSyncSyncSyncIdRunPostRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/DeleteWhiteLabelWhiteLabelsWhiteLabelIdDeleteRequest.d.ts +0 -12
- package/dist/api/resources/whiteLabels/client/requests/DeleteWhiteLabelWhiteLabelsWhiteLabelIdDeleteRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/ExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePostRequest.d.ts +0 -14
- package/dist/api/resources/whiteLabels/client/requests/ExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePostRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/GetWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlGetRequest.d.ts +0 -12
- package/dist/api/resources/whiteLabels/client/requests/GetWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlGetRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/GetWhiteLabelWhiteLabelsWhiteLabelIdGetRequest.d.ts +0 -12
- package/dist/api/resources/whiteLabels/client/requests/GetWhiteLabelWhiteLabelsWhiteLabelIdGetRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/ListWhiteLabelSyncsWhiteLabelsWhiteLabelIdSyncsGetRequest.d.ts +0 -12
- package/dist/api/resources/whiteLabels/client/requests/ListWhiteLabelSyncsWhiteLabelsWhiteLabelIdSyncsGetRequest.js +0 -5
- package/dist/api/resources/whiteLabels/client/requests/ListWhiteLabelsWhiteLabelsListGetRequest.d.ts +0 -12
- package/dist/api/resources/whiteLabels/client/requests/ListWhiteLabelsWhiteLabelsListGetRequest.js +0 -5
- package/dist/api/types/DestinationWithConfigFields.js +0 -5
- package/dist/api/types/EmbeddingModelWithConfigFields.js +0 -5
- package/dist/api/types/SourceWithConfigFields.js +0 -5
- package/dist/api/types/SyncDagCreate.d.ts +0 -14
- package/dist/serialization/types/ApiKeyCreate.d.ts +0 -12
- 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/ApiKeyCreate.d.ts +0 -12
- 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/apiKeys/client/requests}/ApiKeyCreate.js +0 -0
- /package/api/resources/apiKeys/client/requests/{ReadApiKeyApiKeysIdGetRequest.js → DeleteApiKeyApiKeysDeleteRequest.js} +0 -0
- /package/api/resources/{connections/client/requests/DeleteConnectionConnectionsDeleteSourceConnectionIdDeleteRequest.js → apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js} +0 -0
- /package/api/{types → resources/chat/client/requests}/ChatCreate.js +0 -0
- /package/api/resources/{connections/client/requests/DisconnectSourceConnectionConnectionsDisconnectSourceConnectionIdPutRequest.js → chat/client/requests/ListChatsChatGetRequest.js} +0 -0
- /package/api/resources/{embeddingModels → chat}/client/requests/index.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/resources/{sources → dag}/client/requests/index.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/resources/{connections/client/requests/GetConnectionConnectionsDetailConnectionIdGetRequest.js → entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
- /package/{dist/api/resources/embeddingModels → api/resources/entities}/client/requests/index.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/{dist/api/resources/sources → api/resources/transformers}/client/requests/index.js +0 -0
- /package/api/{resources/connections/client/requests/GetConnectionCredentialsConnectionsCredentialsConnectionIdGetRequest.js → types/DestinationWithAuthenticationFields.js} +0 -0
- /package/api/{resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.js → types/EmbeddingModelWithAuthenticationFields.js} +0 -0
- /package/api/{resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.js → types/SourceWithAuthenticationFields.js} +0 -0
- /package/dist/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +0 -0
- /package/{api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.js → dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js} +0 -0
- /package/{api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.js → dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js} +0 -0
- /package/dist/api/{types → resources/chat/client/requests}/ChatCreate.js +0 -0
- /package/{api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.js → dist/api/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 → resources/entities/client/requests}/EntityDefinitionCreate.js +0 -0
- /package/dist/api/{types → resources/entities/client/requests}/EntityRelationCreate.js +0 -0
- /package/{api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.js → dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
- /package/dist/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
- /package/dist/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +0 -0
- /package/dist/api/{types → resources/transformers/client/requests}/TransformerCreate.js +0 -0
- /package/{api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.js → dist/api/types/DestinationWithAuthenticationFields.js} +0 -0
- /package/{api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.js → dist/api/types/EmbeddingModelWithAuthenticationFields.js} +0 -0
- /package/{api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.js → dist/api/types/SourceWithAuthenticationFields.js} +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;
|
package/README.md
CHANGED
|
@@ -23,15 +23,7 @@ Instantiate and use the client with the following:
|
|
|
23
23
|
import { AirweaveSDKClient } from "@airweave/sdk";
|
|
24
24
|
|
|
25
25
|
const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
|
|
26
|
-
await client.
|
|
27
|
-
creds: "creds",
|
|
28
|
-
name: undefined,
|
|
29
|
-
configFields: {
|
|
30
|
-
config_fields: {
|
|
31
|
-
key: "value",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
26
|
+
await client.apiKeys.createApiKey();
|
|
35
27
|
```
|
|
36
28
|
|
|
37
29
|
## Request And Response Types
|
|
@@ -42,7 +34,7 @@ following namespace:
|
|
|
42
34
|
```typescript
|
|
43
35
|
import { AirweaveSDK } from "@airweave/sdk";
|
|
44
36
|
|
|
45
|
-
const request: AirweaveSDK.
|
|
37
|
+
const request: AirweaveSDK.ReadApiKeysApiKeysGetRequest = {
|
|
46
38
|
...
|
|
47
39
|
};
|
|
48
40
|
```
|
|
@@ -56,7 +48,7 @@ will be thrown.
|
|
|
56
48
|
import { AirweaveSDKError } from "@airweave/sdk";
|
|
57
49
|
|
|
58
50
|
try {
|
|
59
|
-
await client.
|
|
51
|
+
await client.apiKeys.createApiKey(...);
|
|
60
52
|
} catch (err) {
|
|
61
53
|
if (err instanceof AirweaveSDKError) {
|
|
62
54
|
console.log(err.statusCode);
|
|
@@ -73,7 +65,7 @@ try {
|
|
|
73
65
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
74
66
|
|
|
75
67
|
```typescript
|
|
76
|
-
const response = await client.
|
|
68
|
+
const response = await client.apiKeys.createApiKey(..., {
|
|
77
69
|
headers: {
|
|
78
70
|
'X-Custom-Header': 'custom value'
|
|
79
71
|
}
|
|
@@ -95,7 +87,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
|
95
87
|
Use the `maxRetries` request option to configure this behavior.
|
|
96
88
|
|
|
97
89
|
```typescript
|
|
98
|
-
const response = await client.
|
|
90
|
+
const response = await client.apiKeys.createApiKey(..., {
|
|
99
91
|
maxRetries: 0 // override maxRetries at the request level
|
|
100
92
|
});
|
|
101
93
|
```
|
|
@@ -105,7 +97,7 @@ const response = await client.connections.connectIntegration(..., {
|
|
|
105
97
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
106
98
|
|
|
107
99
|
```typescript
|
|
108
|
-
const response = await client.
|
|
100
|
+
const response = await client.apiKeys.createApiKey(..., {
|
|
109
101
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
110
102
|
});
|
|
111
103
|
```
|
|
@@ -116,7 +108,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
116
108
|
|
|
117
109
|
```typescript
|
|
118
110
|
const controller = new AbortController();
|
|
119
|
-
const response = await client.
|
|
111
|
+
const response = await client.apiKeys.createApiKey(..., {
|
|
120
112
|
abortSignal: controller.signal
|
|
121
113
|
});
|
|
122
114
|
controller.abort(); // aborts the request
|
|
@@ -26,6 +26,82 @@ export declare namespace ApiKeys {
|
|
|
26
26
|
export declare class ApiKeys {
|
|
27
27
|
protected readonly _options: ApiKeys.Options;
|
|
28
28
|
constructor(_options?: ApiKeys.Options);
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve all API keys for the current user.
|
|
31
|
+
*
|
|
32
|
+
* Args:
|
|
33
|
+
* ----
|
|
34
|
+
* db (AsyncSession): The database session.
|
|
35
|
+
* skip (int): Number of records to skip for pagination.
|
|
36
|
+
* limit (int): Maximum number of records to return.
|
|
37
|
+
* user (schemas.User): The current user.
|
|
38
|
+
*
|
|
39
|
+
* Returns:
|
|
40
|
+
* -------
|
|
41
|
+
* List[schemas.APIKey]: A list of API keys.
|
|
42
|
+
*
|
|
43
|
+
* @param {AirweaveSDK.ReadApiKeysApiKeysGetRequest} request
|
|
44
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.apiKeys.readApiKeys()
|
|
50
|
+
*/
|
|
51
|
+
readApiKeys(request?: AirweaveSDK.ReadApiKeysApiKeysGetRequest, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a new API key for the current user.
|
|
54
|
+
*
|
|
55
|
+
* Returns a temporary plain key for the user to store securely.
|
|
56
|
+
* This is not stored in the database.
|
|
57
|
+
*
|
|
58
|
+
* Args:
|
|
59
|
+
* ----
|
|
60
|
+
* db (AsyncSession): The database session.
|
|
61
|
+
* api_key_in (schemas.APIKeyCreate): The API key creation data.
|
|
62
|
+
* user (schemas.User): The current user.
|
|
63
|
+
*
|
|
64
|
+
* Returns:
|
|
65
|
+
* -------
|
|
66
|
+
* schemas.APIKeyWithPlainKey: The created API key object, including the key.
|
|
67
|
+
*
|
|
68
|
+
* @param {AirweaveSDK.ApiKeyCreate} request
|
|
69
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.apiKeys.createApiKey()
|
|
75
|
+
*/
|
|
76
|
+
createApiKey(request?: AirweaveSDK.ApiKeyCreate, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKeyWithPlainKey>;
|
|
77
|
+
/**
|
|
78
|
+
* Delete an API key.
|
|
79
|
+
*
|
|
80
|
+
* Args:
|
|
81
|
+
* ----
|
|
82
|
+
* db (AsyncSession): The database session.
|
|
83
|
+
* id (UUID): The ID of the API key.
|
|
84
|
+
* user (schemas.User): The current user.
|
|
85
|
+
*
|
|
86
|
+
* Returns:
|
|
87
|
+
* -------
|
|
88
|
+
* schemas.APIKey: The revoked API key object.
|
|
89
|
+
*
|
|
90
|
+
* Raises:
|
|
91
|
+
* ------
|
|
92
|
+
* HTTPException: If the API key is not found.
|
|
93
|
+
*
|
|
94
|
+
* @param {AirweaveSDK.DeleteApiKeyApiKeysDeleteRequest} request
|
|
95
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* await client.apiKeys.deleteApiKey({
|
|
101
|
+
* id: "id"
|
|
102
|
+
* })
|
|
103
|
+
*/
|
|
104
|
+
deleteApiKey(request: AirweaveSDK.DeleteApiKeyApiKeysDeleteRequest, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey>;
|
|
29
105
|
/**
|
|
30
106
|
* Retrieve an API key by ID.
|
|
31
107
|
*
|
|
@@ -44,15 +120,12 @@ export declare class ApiKeys {
|
|
|
44
120
|
* HTTPException: If the API key is not found.
|
|
45
121
|
*
|
|
46
122
|
* @param {string} id
|
|
47
|
-
* @param {AirweaveSDK.ReadApiKeyApiKeysIdGetRequest} request
|
|
48
123
|
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
124
|
*
|
|
50
125
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
51
126
|
*
|
|
52
127
|
* @example
|
|
53
|
-
* await client.apiKeys.readApiKey("id"
|
|
54
|
-
* creds: "creds"
|
|
55
|
-
* })
|
|
128
|
+
* await client.apiKeys.readApiKey("id")
|
|
56
129
|
*/
|
|
57
|
-
readApiKey(id: string,
|
|
130
|
+
readApiKey(id: string, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey>;
|
|
58
131
|
}
|
|
@@ -59,6 +59,255 @@ class ApiKeys {
|
|
|
59
59
|
constructor(_options = {}) {
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Retrieve all API keys for the current user.
|
|
64
|
+
*
|
|
65
|
+
* Args:
|
|
66
|
+
* ----
|
|
67
|
+
* db (AsyncSession): The database session.
|
|
68
|
+
* skip (int): Number of records to skip for pagination.
|
|
69
|
+
* limit (int): Maximum number of records to return.
|
|
70
|
+
* user (schemas.User): The current user.
|
|
71
|
+
*
|
|
72
|
+
* Returns:
|
|
73
|
+
* -------
|
|
74
|
+
* List[schemas.APIKey]: A list of API keys.
|
|
75
|
+
*
|
|
76
|
+
* @param {AirweaveSDK.ReadApiKeysApiKeysGetRequest} request
|
|
77
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.apiKeys.readApiKeys()
|
|
83
|
+
*/
|
|
84
|
+
readApiKeys() {
|
|
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, "api-keys"),
|
|
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.apiKeys.readApiKeys.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 /api-keys.");
|
|
140
|
+
case "unknown":
|
|
141
|
+
throw new errors.AirweaveSDKError({
|
|
142
|
+
message: _response.error.errorMessage,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create a new API key for the current user.
|
|
149
|
+
*
|
|
150
|
+
* Returns a temporary plain key for the user to store securely.
|
|
151
|
+
* This is not stored in the database.
|
|
152
|
+
*
|
|
153
|
+
* Args:
|
|
154
|
+
* ----
|
|
155
|
+
* db (AsyncSession): The database session.
|
|
156
|
+
* api_key_in (schemas.APIKeyCreate): The API key creation data.
|
|
157
|
+
* user (schemas.User): The current user.
|
|
158
|
+
*
|
|
159
|
+
* Returns:
|
|
160
|
+
* -------
|
|
161
|
+
* schemas.APIKeyWithPlainKey: The created API key object, including the key.
|
|
162
|
+
*
|
|
163
|
+
* @param {AirweaveSDK.ApiKeyCreate} request
|
|
164
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
|
+
*
|
|
166
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* await client.apiKeys.createApiKey()
|
|
170
|
+
*/
|
|
171
|
+
createApiKey() {
|
|
172
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
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, "api-keys"),
|
|
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.ApiKeyCreate.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.ApiKeyWithPlainKey.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 /api-keys.");
|
|
219
|
+
case "unknown":
|
|
220
|
+
throw new errors.AirweaveSDKError({
|
|
221
|
+
message: _response.error.errorMessage,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Delete an API key.
|
|
228
|
+
*
|
|
229
|
+
* Args:
|
|
230
|
+
* ----
|
|
231
|
+
* db (AsyncSession): The database session.
|
|
232
|
+
* id (UUID): The ID of the API key.
|
|
233
|
+
* user (schemas.User): The current user.
|
|
234
|
+
*
|
|
235
|
+
* Returns:
|
|
236
|
+
* -------
|
|
237
|
+
* schemas.APIKey: The revoked API key object.
|
|
238
|
+
*
|
|
239
|
+
* Raises:
|
|
240
|
+
* ------
|
|
241
|
+
* HTTPException: If the API key is not found.
|
|
242
|
+
*
|
|
243
|
+
* @param {AirweaveSDK.DeleteApiKeyApiKeysDeleteRequest} request
|
|
244
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
245
|
+
*
|
|
246
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* await client.apiKeys.deleteApiKey({
|
|
250
|
+
* id: "id"
|
|
251
|
+
* })
|
|
252
|
+
*/
|
|
253
|
+
deleteApiKey(request, requestOptions) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
var _a;
|
|
256
|
+
const { id } = request;
|
|
257
|
+
const _queryParams = {};
|
|
258
|
+
_queryParams["id"] = id;
|
|
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, "api-keys"),
|
|
261
|
+
method: "DELETE",
|
|
262
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
263
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
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
|
+
contentType: "application/json",
|
|
266
|
+
queryParameters: _queryParams,
|
|
267
|
+
requestType: "json",
|
|
268
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
269
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
270
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
271
|
+
});
|
|
272
|
+
if (_response.ok) {
|
|
273
|
+
return serializers.ApiKey.parseOrThrow(_response.body, {
|
|
274
|
+
unrecognizedObjectKeys: "passthrough",
|
|
275
|
+
allowUnrecognizedUnionMembers: true,
|
|
276
|
+
allowUnrecognizedEnumValues: true,
|
|
277
|
+
breadcrumbsPrefix: ["response"],
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
if (_response.error.reason === "status-code") {
|
|
281
|
+
switch (_response.error.statusCode) {
|
|
282
|
+
case 422:
|
|
283
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
284
|
+
unrecognizedObjectKeys: "passthrough",
|
|
285
|
+
allowUnrecognizedUnionMembers: true,
|
|
286
|
+
allowUnrecognizedEnumValues: true,
|
|
287
|
+
breadcrumbsPrefix: ["response"],
|
|
288
|
+
}));
|
|
289
|
+
default:
|
|
290
|
+
throw new errors.AirweaveSDKError({
|
|
291
|
+
statusCode: _response.error.statusCode,
|
|
292
|
+
body: _response.error.body,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
switch (_response.error.reason) {
|
|
297
|
+
case "non-json":
|
|
298
|
+
throw new errors.AirweaveSDKError({
|
|
299
|
+
statusCode: _response.error.statusCode,
|
|
300
|
+
body: _response.error.rawBody,
|
|
301
|
+
});
|
|
302
|
+
case "timeout":
|
|
303
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /api-keys.");
|
|
304
|
+
case "unknown":
|
|
305
|
+
throw new errors.AirweaveSDKError({
|
|
306
|
+
message: _response.error.errorMessage,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
62
311
|
/**
|
|
63
312
|
* Retrieve an API key by ID.
|
|
64
313
|
*
|
|
@@ -77,30 +326,23 @@ class ApiKeys {
|
|
|
77
326
|
* HTTPException: If the API key is not found.
|
|
78
327
|
*
|
|
79
328
|
* @param {string} id
|
|
80
|
-
* @param {AirweaveSDK.ReadApiKeyApiKeysIdGetRequest} request
|
|
81
329
|
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
330
|
*
|
|
83
331
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
84
332
|
*
|
|
85
333
|
* @example
|
|
86
|
-
* await client.apiKeys.readApiKey("id"
|
|
87
|
-
* creds: "creds"
|
|
88
|
-
* })
|
|
334
|
+
* await client.apiKeys.readApiKey("id")
|
|
89
335
|
*/
|
|
90
|
-
readApiKey(id,
|
|
336
|
+
readApiKey(id, requestOptions) {
|
|
91
337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
338
|
var _a;
|
|
93
|
-
const { creds } = request;
|
|
94
|
-
const _queryParams = {};
|
|
95
|
-
_queryParams["creds"] = creds;
|
|
96
339
|
const _response = yield core.fetcher({
|
|
97
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)}`),
|
|
98
341
|
method: "GET",
|
|
99
342
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
100
343
|
? yield core.Supplier.get(this._options.apiKey)
|
|
101
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.
|
|
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),
|
|
102
345
|
contentType: "application/json",
|
|
103
|
-
queryParameters: _queryParams,
|
|
104
346
|
requestType: "json",
|
|
105
347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
106
348
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type ReadApiKeysApiKeysGetRequest } from "./ReadApiKeysApiKeysGetRequest";
|
|
2
|
+
export { type ApiKeyCreate } from "./ApiKeyCreate";
|
|
3
|
+
export { type DeleteApiKeyApiKeysDeleteRequest } from "./DeleteApiKeyApiKeysDeleteRequest";
|