@airweave/sdk 0.2.22 → 0.2.23
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/README.md +7 -15
- package/api/resources/apiKeys/client/Client.d.ts +78 -5
- package/api/resources/apiKeys/client/Client.js +254 -12
- package/{dist/api/types → api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -2
- 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/connections/client/Client.d.ts +18 -46
- package/api/resources/connections/client/Client.js +28 -105
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -6
- package/api/resources/connections/client/requests/index.d.ts +0 -8
- package/api/resources/embeddingModels/client/Client.d.ts +4 -10
- package/api/resources/embeddingModels/client/Client.js +6 -20
- package/api/resources/embeddingModels/client/index.d.ts +1 -1
- package/api/resources/embeddingModels/client/index.js +0 -15
- package/api/resources/index.d.ts +0 -2
- package/api/resources/index.js +0 -2
- package/api/resources/search/client/Client.d.ts +3 -5
- package/api/resources/search/client/Client.js +4 -10
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +1 -8
- package/api/resources/sources/client/Client.d.ts +4 -10
- package/api/resources/sources/client/Client.js +6 -20
- 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 +20 -62
- package/api/resources/sync/client/Client.js +40 -132
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +1 -4
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +1 -8
- 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/whiteLabels/client/Client.d.ts +15 -40
- package/api/resources/whiteLabels/client/Client.js +26 -94
- 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/ApiKey.d.ts +1 -1
- package/api/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/api/types/SyncJob.d.ts +4 -5
- package/api/types/User.d.ts +1 -1
- package/api/types/index.d.ts +0 -5
- package/api/types/index.js +0 -5
- package/dist/api/resources/apiKeys/client/Client.d.ts +78 -5
- package/dist/api/resources/apiKeys/client/Client.js +254 -12
- package/{api/types → dist/api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -2
- 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/connections/client/Client.d.ts +18 -46
- package/dist/api/resources/connections/client/Client.js +28 -105
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -6
- package/dist/api/resources/connections/client/requests/index.d.ts +0 -8
- package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -10
- package/dist/api/resources/embeddingModels/client/Client.js +6 -20
- 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/index.d.ts +0 -2
- package/dist/api/resources/index.js +0 -2
- package/dist/api/resources/search/client/Client.d.ts +3 -5
- package/dist/api/resources/search/client/Client.js +4 -10
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +1 -8
- package/dist/api/resources/sources/client/Client.d.ts +4 -10
- package/dist/api/resources/sources/client/Client.js +6 -20
- 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 +20 -62
- package/dist/api/resources/sync/client/Client.js +40 -132
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +1 -4
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +1 -8
- 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/whiteLabels/client/Client.d.ts +15 -40
- package/dist/api/resources/whiteLabels/client/Client.js +26 -94
- 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/ApiKey.d.ts +1 -1
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +1 -1
- package/dist/api/types/SyncJob.d.ts +4 -5
- package/dist/api/types/User.d.ts +1 -1
- package/dist/api/types/index.d.ts +0 -5
- package/dist/api/types/index.js +0 -5
- package/dist/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/dist/serialization/{types/ResponseType.js → resources/apiKeys/client/index.js} +6 -6
- package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
- package/{serialization/types/EntityCount.js → dist/serialization/resources/apiKeys/client/readApiKeys.js} +4 -5
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/{serialization/types → dist/serialization/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/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -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/sync/client/requests/SyncCreate.d.ts +1 -1
- package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +1 -1
- 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/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/SyncJob.d.ts +4 -5
- package/dist/serialization/types/SyncJob.js +4 -5
- package/dist/serialization/types/User.d.ts +1 -1
- package/dist/serialization/types/User.js +1 -1
- package/dist/serialization/types/index.d.ts +0 -5
- package/dist/serialization/types/index.js +0 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +282 -319
- 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/{dist/serialization/types/EntityCount.js → serialization/resources/apiKeys/client/readApiKeys.js} +4 -5
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/{dist/serialization/types → serialization/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/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/search/client/search.d.ts +2 -2
- package/serialization/resources/search/client/search.js +1 -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/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +1 -1
- 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/SyncJob.d.ts +4 -5
- package/serialization/types/SyncJob.js +4 -5
- package/serialization/types/User.d.ts +1 -1
- package/serialization/types/User.js +1 -1
- package/serialization/types/index.d.ts +0 -5
- package/serialization/types/index.js +0 -5
- 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/GetConnectionCredentialsConnectionsCredentialsConnectionIdGetRequest.js +0 -5
- package/api/resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/GetOauth2WhiteLabelAuthUrlConnectionsOauth2WhiteLabelWhiteLabelIdAuthUrlGetRequest.js +0 -5
- package/api/resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/ListAllConnectedIntegrationsConnectionsListGetRequest.js +0 -5
- package/api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.d.ts +0 -12
- package/api/resources/connections/client/requests/ListConnectedIntegrationsConnectionsListIntegrationTypeGetRequest.js +0 -5
- package/api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.d.ts +0 -14
- package/api/resources/connections/client/requests/SendOauth2WhiteLabelCodeConnectionsOauth2WhiteLabelWhiteLabelIdCodePostRequest.js +0 -5
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.d.ts +0 -12
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelEmbeddingModelsDetailShortNameGetRequest.js +0 -5
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.d.ts +0 -12
- package/api/resources/embeddingModels/client/requests/ReadEmbeddingModelsEmbeddingModelsListGetRequest.js +0 -5
- package/api/resources/embeddingModels/client/requests/index.d.ts +0 -2
- package/api/resources/embeddingModels/client/requests/index.js +0 -2
- package/api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.d.ts +0 -12
- package/api/resources/sources/client/requests/ReadSourceSourcesDetailShortNameGetRequest.js +0 -5
- package/api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.d.ts +0 -12
- package/api/resources/sources/client/requests/ReadSourcesSourcesListGetRequest.js +0 -5
- package/api/resources/sources/client/requests/index.d.ts +0 -2
- package/api/resources/sources/client/requests/index.js +0 -2
- package/api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.d.ts +0 -12
- package/api/resources/sync/client/requests/GetSyncDagSyncSyncIdDagGetRequest.js +0 -5
- 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/EntityCount.d.ts +0 -9
- package/api/types/EntityCount.js +0 -5
- package/api/types/Organization.d.ts +0 -13
- package/api/types/Organization.js +0 -5
- package/api/types/ResponseType.d.ts +0 -11
- package/api/types/ResponseType.js +0 -10
- package/api/types/UserCreate.d.ts +0 -11
- package/api/types/UserCreate.js +0 -5
- 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/embeddingModels/client/requests/index.js +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/sources/client/requests/index.js +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/EntityCount.d.ts +0 -9
- package/dist/api/types/EntityCount.js +0 -5
- package/dist/api/types/Organization.d.ts +0 -13
- package/dist/api/types/Organization.js +0 -5
- package/dist/api/types/ResponseType.d.ts +0 -11
- package/dist/api/types/ResponseType.js +0 -10
- package/dist/api/types/UserCreate.d.ts +0 -11
- package/dist/api/types/UserCreate.js +0 -5
- package/dist/serialization/types/ApiKeyCreate.d.ts +0 -12
- package/dist/serialization/types/EntityCount.d.ts +0 -12
- package/dist/serialization/types/Organization.d.ts +0 -16
- package/dist/serialization/types/Organization.js +0 -47
- package/dist/serialization/types/ResponseType.d.ts +0 -10
- package/dist/serialization/types/UserCreate.d.ts +0 -14
- package/dist/serialization/types/UserCreate.js +0 -45
- package/serialization/types/ApiKeyCreate.d.ts +0 -12
- package/serialization/types/EntityCount.d.ts +0 -12
- package/serialization/types/Organization.d.ts +0 -16
- package/serialization/types/Organization.js +0 -47
- package/serialization/types/ResponseType.d.ts +0 -10
- package/serialization/types/ResponseType.js +0 -41
- package/serialization/types/UserCreate.d.ts +0 -14
- package/serialization/types/UserCreate.js +0 -45
- /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/dist/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +0 -0
- /package/{api/resources/connections/client/requests/DisconnectSourceConnectionConnectionsDisconnectSourceConnectionIdPutRequest.js → dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js} +0 -0
- /package/{api/resources/connections/client/requests/GetConnectionConnectionsDetailConnectionIdGetRequest.js → dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js} +0 -0
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": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "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": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "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": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "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
|
-
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)}`),
|
|
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": "
|
|
344
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "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,
|
|
@@ -137,7 +379,7 @@ class ApiKeys {
|
|
|
137
379
|
body: _response.error.rawBody,
|
|
138
380
|
});
|
|
139
381
|
case "timeout":
|
|
140
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
382
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /api_keys/{id}.");
|
|
141
383
|
case "unknown":
|
|
142
384
|
throw new errors.AirweaveSDKError({
|
|
143
385
|
message: _response.error.errorMessage,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
6
7
|
*/
|
|
7
8
|
export interface ApiKeyCreate {
|
|
8
|
-
/** Expiration date for the API key, defaults to 180 days from now */
|
|
9
9
|
expirationDate?: Date;
|
|
10
10
|
}
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type ReadApiKeysApiKeysGetRequest } from "./ReadApiKeysApiKeysGetRequest";
|
|
2
|
+
export { type ApiKeyCreate } from "./ApiKeyCreate";
|
|
3
|
+
export { type DeleteApiKeyApiKeysDeleteRequest } from "./DeleteApiKeyApiKeysDeleteRequest";
|