@airweave/sdk 0.1.27 → 0.1.34
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 +45 -20
- package/README.md +7 -11
- package/api/resources/apiKeys/client/Client.d.ts +131 -0
- package/api/resources/apiKeys/client/Client.js +391 -0
- package/api/resources/apiKeys/client/index.d.ts +1 -0
- package/api/resources/apiKeys/client/index.js +17 -0
- package/{dist/api/types → api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
- package/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.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 -0
- package/api/resources/apiKeys/client/requests/index.js +2 -0
- package/api/resources/apiKeys/index.d.ts +1 -0
- package/api/resources/apiKeys/index.js +17 -0
- package/api/resources/chat/client/Client.d.ts +209 -0
- package/api/resources/chat/client/Client.js +669 -0
- package/api/resources/chat/client/index.d.ts +1 -0
- package/api/resources/chat/client/index.js +17 -0
- package/{dist/api/types → api/resources/chat/client/requests}/ChatCreate.d.ts +5 -1
- package/api/{types → resources/chat/client/requests}/ChatMessageCreate.d.ts +4 -1
- package/api/{types → resources/chat/client/requests}/ChatUpdate.d.ts +2 -1
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/api/resources/chat/client/requests/index.d.ts +4 -0
- package/api/resources/chat/client/requests/index.js +2 -0
- package/api/resources/chat/index.d.ts +1 -0
- package/api/resources/chat/index.js +17 -0
- package/api/resources/connections/client/Client.d.ts +26 -25
- package/api/resources/connections/client/Client.js +88 -84
- package/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/api/resources/connections/client/requests/index.d.ts +1 -0
- package/api/resources/cursorDevelopment/client/Client.d.ts +78 -0
- package/api/resources/cursorDevelopment/client/Client.js +218 -0
- package/api/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/api/resources/cursorDevelopment/client/index.js +2 -0
- package/api/resources/cursorDevelopment/index.d.ts +1 -0
- package/api/resources/cursorDevelopment/index.js +17 -0
- package/api/resources/dag/client/Client.js +4 -4
- package/api/resources/destinations/client/Client.js +2 -2
- package/api/resources/embeddingModels/client/Client.js +2 -2
- package/api/resources/entities/client/Client.d.ts +14 -0
- package/api/resources/entities/client/Client.js +78 -7
- package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/api/resources/entities/client/requests/index.d.ts +1 -0
- package/api/resources/health/client/Client.d.ts +41 -0
- package/api/resources/health/client/Client.js +118 -0
- package/api/resources/health/client/index.d.ts +1 -0
- package/api/resources/health/client/index.js +2 -0
- package/api/resources/health/index.d.ts +1 -0
- package/api/resources/health/index.js +17 -0
- package/api/resources/index.d.ts +8 -0
- package/api/resources/index.js +9 -1
- package/api/resources/search/client/Client.d.ts +55 -0
- package/api/resources/search/client/Client.js +147 -0
- package/api/resources/search/client/index.d.ts +1 -0
- package/api/resources/search/client/index.js +17 -0
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/api/resources/search/client/requests/index.d.ts +1 -0
- package/api/resources/search/client/requests/index.js +2 -0
- package/api/resources/search/index.d.ts +1 -0
- package/api/resources/search/index.js +17 -0
- package/api/resources/sources/client/Client.js +2 -2
- package/api/resources/sync/client/Client.d.ts +26 -5
- package/api/resources/sync/client/Client.js +100 -21
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
- package/api/resources/sync/client/requests/index.d.ts +1 -1
- package/api/resources/transformers/client/Client.js +3 -3
- package/api/resources/users/client/Client.js +1 -1
- package/api/resources/whiteLabels/client/Client.js +8 -8
- package/api/types/EntityDefinition.d.ts +1 -3
- package/api/types/SyncJob.d.ts +2 -0
- package/api/types/index.d.ts +0 -4
- package/api/types/index.js +0 -4
- package/dist/Client.d.ts +15 -0
- package/dist/Client.js +45 -20
- package/dist/api/resources/apiKeys/client/Client.d.ts +131 -0
- package/dist/api/resources/apiKeys/client/Client.js +391 -0
- package/dist/api/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/api/resources/apiKeys/client/index.js +17 -0
- package/{api/types → dist/api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
- package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.js +5 -0
- package/dist/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.d.ts → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts} +3 -3
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +5 -0
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +5 -0
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +3 -0
- package/dist/api/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/api/resources/apiKeys/index.d.ts +1 -0
- package/dist/api/resources/apiKeys/index.js +17 -0
- package/dist/api/resources/chat/client/Client.d.ts +209 -0
- package/dist/api/resources/chat/client/Client.js +669 -0
- package/dist/api/resources/chat/client/index.d.ts +1 -0
- package/dist/api/resources/chat/client/index.js +17 -0
- package/{api/types → dist/api/resources/chat/client/requests}/ChatCreate.d.ts +5 -1
- package/dist/api/resources/chat/client/requests/ChatCreate.js +5 -0
- package/dist/api/{types → resources/chat/client/requests}/ChatMessageCreate.d.ts +4 -1
- package/dist/api/resources/chat/client/requests/ChatMessageCreate.js +5 -0
- package/dist/api/{types → resources/chat/client/requests}/ChatUpdate.d.ts +2 -1
- package/dist/api/resources/chat/client/requests/ChatUpdate.js +5 -0
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +5 -0
- package/dist/api/resources/chat/client/requests/index.d.ts +4 -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 +26 -25
- package/dist/api/resources/connections/client/Client.js +88 -84
- package/dist/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/dist/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/cursorDevelopment/client/Client.d.ts +78 -0
- package/dist/api/resources/cursorDevelopment/client/Client.js +218 -0
- package/dist/api/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/dist/api/resources/cursorDevelopment/client/index.js +2 -0
- package/dist/api/resources/cursorDevelopment/index.d.ts +1 -0
- package/dist/api/resources/cursorDevelopment/index.js +17 -0
- package/dist/api/resources/dag/client/Client.js +4 -4
- package/dist/api/resources/destinations/client/Client.js +2 -2
- package/dist/api/resources/embeddingModels/client/Client.js +2 -2
- package/dist/api/resources/entities/client/Client.d.ts +14 -0
- package/dist/api/resources/entities/client/Client.js +78 -7
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
- package/dist/api/resources/entities/client/requests/index.d.ts +1 -0
- package/dist/api/resources/health/client/Client.d.ts +41 -0
- package/dist/api/resources/health/client/Client.js +118 -0
- package/dist/api/resources/health/client/index.d.ts +1 -0
- package/dist/api/resources/health/client/index.js +2 -0
- package/dist/api/resources/health/index.d.ts +1 -0
- package/dist/api/resources/health/index.js +17 -0
- package/dist/api/resources/index.d.ts +8 -0
- package/dist/api/resources/index.js +9 -1
- package/dist/api/resources/search/client/Client.d.ts +55 -0
- package/dist/api/resources/search/client/Client.js +147 -0
- package/dist/api/resources/search/client/index.d.ts +1 -0
- package/dist/api/resources/search/client/index.js +17 -0
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
- package/dist/api/resources/search/client/requests/index.d.ts +1 -0
- package/dist/api/resources/search/client/requests/index.js +2 -0
- package/dist/api/resources/search/index.d.ts +1 -0
- package/dist/api/resources/search/index.js +17 -0
- package/dist/api/resources/sources/client/Client.js +2 -2
- package/dist/api/resources/sync/client/Client.d.ts +26 -5
- package/dist/api/resources/sync/client/Client.js +100 -21
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/index.d.ts +1 -1
- package/dist/api/resources/transformers/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/api/resources/whiteLabels/client/Client.js +8 -8
- package/dist/api/types/EntityDefinition.d.ts +1 -3
- package/dist/api/types/SyncJob.d.ts +2 -0
- package/dist/api/types/index.d.ts +0 -4
- package/dist/api/types/index.js +0 -4
- 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 +3 -0
- package/dist/serialization/resources/chat/client/index.js +42 -0
- package/dist/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/dist/serialization/resources/chat/client/listChats.js +42 -0
- package/dist/serialization/resources/chat/client/openaiKeySet.d.ts +9 -0
- package/dist/serialization/resources/chat/client/openaiKeySet.js +41 -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/ChatMessageCreate.d.ts +13 -0
- package/dist/serialization/{types → resources/chat/client/requests}/ChatMessageCreate.js +1 -1
- package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatUpdate.d.ts +4 -4
- package/dist/serialization/{types → resources/chat/client/requests}/ChatUpdate.js +1 -1
- package/dist/serialization/resources/chat/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/chat/client/requests/index.js +9 -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/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
- package/dist/serialization/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/connections/client/requests/index.js +3 -1
- package/dist/serialization/resources/cursorDevelopment/client/checkConnectionStatus.d.ts +11 -0
- package/dist/serialization/resources/cursorDevelopment/client/checkConnectionStatus.js +42 -0
- package/dist/serialization/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/dist/serialization/resources/cursorDevelopment/client/index.js +37 -0
- package/dist/serialization/resources/cursorDevelopment/index.d.ts +1 -0
- package/dist/serialization/resources/cursorDevelopment/index.js +17 -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 +1 -0
- package/dist/serialization/resources/entities/client/index.js +2 -1
- package/dist/serialization/resources/health/client/healthCheck.d.ts +9 -0
- package/dist/serialization/resources/health/client/healthCheck.js +41 -0
- package/dist/serialization/resources/health/client/index.d.ts +1 -0
- package/dist/serialization/resources/health/client/index.js +37 -0
- package/dist/serialization/resources/health/index.d.ts +1 -0
- package/dist/serialization/resources/health/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +7 -0
- package/dist/serialization/resources/index.js +8 -1
- package/dist/serialization/resources/search/client/index.d.ts +1 -0
- package/dist/serialization/resources/search/client/index.js +37 -0
- package/dist/serialization/resources/search/client/search.d.ts +9 -0
- package/dist/serialization/resources/search/client/search.js +41 -0
- package/dist/serialization/resources/search/index.d.ts +1 -0
- package/dist/serialization/resources/search/index.js +17 -0
- package/dist/serialization/resources/sync/client/index.d.ts +1 -0
- package/dist/serialization/resources/sync/client/index.js +2 -1
- package/dist/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
- package/dist/serialization/resources/sync/client/listAllJobs.js +42 -0
- package/dist/serialization/types/EntityDefinition.d.ts +1 -3
- package/dist/serialization/types/EntityDefinition.js +1 -3
- package/dist/serialization/types/SyncJob.d.ts +1 -0
- package/dist/serialization/types/SyncJob.js +1 -0
- package/dist/serialization/types/index.d.ts +0 -4
- package/dist/serialization/types/index.js +0 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1777 -441
- 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 +3 -0
- package/serialization/resources/chat/client/index.js +42 -0
- package/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/serialization/resources/chat/client/listChats.js +42 -0
- package/serialization/resources/chat/client/openaiKeySet.d.ts +9 -0
- package/serialization/resources/chat/client/openaiKeySet.js +41 -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/ChatMessageCreate.d.ts +13 -0
- package/serialization/{types → resources/chat/client/requests}/ChatMessageCreate.js +1 -1
- package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatUpdate.d.ts +4 -4
- package/serialization/{types → resources/chat/client/requests}/ChatUpdate.js +1 -1
- package/serialization/resources/chat/client/requests/index.d.ts +3 -0
- package/serialization/resources/chat/client/requests/index.js +9 -0
- package/serialization/resources/chat/index.d.ts +1 -0
- package/serialization/resources/chat/index.js +17 -0
- package/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
- package/serialization/resources/connections/client/requests/index.d.ts +1 -0
- package/serialization/resources/connections/client/requests/index.js +3 -1
- package/serialization/resources/cursorDevelopment/client/checkConnectionStatus.d.ts +11 -0
- package/serialization/resources/cursorDevelopment/client/checkConnectionStatus.js +42 -0
- package/serialization/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/serialization/resources/cursorDevelopment/client/index.js +37 -0
- package/serialization/resources/cursorDevelopment/index.d.ts +1 -0
- package/serialization/resources/cursorDevelopment/index.js +17 -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 +1 -0
- package/serialization/resources/entities/client/index.js +2 -1
- package/serialization/resources/health/client/healthCheck.d.ts +9 -0
- package/serialization/resources/health/client/healthCheck.js +41 -0
- package/serialization/resources/health/client/index.d.ts +1 -0
- package/serialization/resources/health/client/index.js +37 -0
- package/serialization/resources/health/index.d.ts +1 -0
- package/serialization/resources/health/index.js +17 -0
- package/serialization/resources/index.d.ts +7 -0
- package/serialization/resources/index.js +8 -1
- package/serialization/resources/search/client/index.d.ts +1 -0
- package/serialization/resources/search/client/index.js +37 -0
- package/serialization/resources/search/client/search.d.ts +9 -0
- package/serialization/resources/search/client/search.js +41 -0
- package/serialization/resources/search/index.d.ts +1 -0
- package/serialization/resources/search/index.js +17 -0
- package/serialization/resources/sync/client/index.d.ts +1 -0
- package/serialization/resources/sync/client/index.js +2 -1
- package/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
- package/serialization/resources/sync/client/listAllJobs.js +42 -0
- package/serialization/types/EntityDefinition.d.ts +1 -3
- package/serialization/types/EntityDefinition.js +1 -3
- package/serialization/types/SyncJob.d.ts +1 -0
- package/serialization/types/SyncJob.js +1 -0
- package/serialization/types/index.d.ts +0 -4
- package/serialization/types/index.js +0 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/dist/serialization/types/ApiKeyCreate.d.ts +0 -12
- package/dist/serialization/types/ChatMessageCreate.d.ts +0 -13
- package/serialization/types/ApiKeyCreate.d.ts +0 -12
- package/serialization/types/ChatMessageCreate.d.ts +0 -13
- /package/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +0 -0
- /package/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js} +0 -0
- /package/api/{types/ChatCreate.js → resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js} +0 -0
- /package/{dist/api/types → api/resources/chat/client/requests}/ChatCreate.js +0 -0
- /package/api/{types → resources/chat/client/requests}/ChatMessageCreate.js +0 -0
- /package/api/{types → resources/chat/client/requests}/ChatUpdate.js +0 -0
- /package/{dist/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js → api/resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
- /package/{dist/api/types/ApiKeyCreate.js → api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
- /package/{dist/api/types/ChatMessageCreate.js → api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
- /package/{dist/api/types/ChatUpdate.js → api/resources/search/client/requests/SearchSearchGetRequest.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -186,7 +186,7 @@ export declare class Connections {
|
|
|
186
186
|
*
|
|
187
187
|
* Returns:
|
|
188
188
|
* --------
|
|
189
|
-
*
|
|
189
|
+
* connection (schemas.Connection): The disconnected connection
|
|
190
190
|
*
|
|
191
191
|
* @param {string} connectionId
|
|
192
192
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -197,36 +197,12 @@ export declare class Connections {
|
|
|
197
197
|
* await client.connections.disconnectSourceConnection("connection_id")
|
|
198
198
|
*/
|
|
199
199
|
disconnectSourceConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
|
|
200
|
-
/**
|
|
201
|
-
* Disconnect from a destination connection.
|
|
202
|
-
*
|
|
203
|
-
* Args:
|
|
204
|
-
* -----
|
|
205
|
-
* db (AsyncSession): The database session
|
|
206
|
-
* connection_id (UUID): The ID of the connection to disconnect
|
|
207
|
-
* user (schemas.User): The current user
|
|
208
|
-
*
|
|
209
|
-
* Returns:
|
|
210
|
-
* --------
|
|
211
|
-
* connection_schema (schemas.Connection): The disconnected connection
|
|
212
|
-
*
|
|
213
|
-
* @param {string} connectionId
|
|
214
|
-
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
|
-
*
|
|
216
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
217
|
-
*
|
|
218
|
-
* @example
|
|
219
|
-
* await client.connections.disconnectDestinationConnection("connection_id")
|
|
220
|
-
*/
|
|
221
|
-
disconnectDestinationConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
|
|
222
200
|
/**
|
|
223
201
|
* Get the OAuth2 authorization URL for a source.
|
|
224
202
|
*
|
|
225
203
|
* Args:
|
|
226
204
|
* -----
|
|
227
|
-
* db: The database session
|
|
228
205
|
* short_name: The short name of the source
|
|
229
|
-
* user: The current user
|
|
230
206
|
*
|
|
231
207
|
* @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
|
|
232
208
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -317,4 +293,29 @@ export declare class Connections {
|
|
|
317
293
|
* await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
|
|
318
294
|
*/
|
|
319
295
|
getOauth2WhiteLabelAuthUrl(whiteLabelId: string, requestOptions?: Connections.RequestOptions): Promise<string>;
|
|
296
|
+
/**
|
|
297
|
+
* Connect to Slack using a direct API token (for local development only).
|
|
298
|
+
*
|
|
299
|
+
* Args:
|
|
300
|
+
* -----
|
|
301
|
+
* db: The database session.
|
|
302
|
+
* token: The Slack API token.
|
|
303
|
+
* name: The name of the connection.
|
|
304
|
+
* user: The current user.
|
|
305
|
+
*
|
|
306
|
+
* Returns:
|
|
307
|
+
* -------
|
|
308
|
+
* schemas.Connection: The connection.
|
|
309
|
+
*
|
|
310
|
+
* @param {AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost} request
|
|
311
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
312
|
+
*
|
|
313
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* await client.connections.connectSlackWithToken({
|
|
317
|
+
* token: "token"
|
|
318
|
+
* })
|
|
319
|
+
*/
|
|
320
|
+
connectSlackWithToken(request: AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
|
|
320
321
|
}
|
|
@@ -88,7 +88,7 @@ class Connections {
|
|
|
88
88
|
method: "GET",
|
|
89
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
90
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
91
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
92
|
contentType: "application/json",
|
|
93
93
|
requestType: "json",
|
|
94
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Connections {
|
|
|
161
161
|
method: "GET",
|
|
162
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
163
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
164
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
requestType: "json",
|
|
167
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -236,7 +236,7 @@ class Connections {
|
|
|
236
236
|
method: "GET",
|
|
237
237
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
238
238
|
? yield core.Supplier.get(this._options.apiKey)
|
|
239
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
240
|
contentType: "application/json",
|
|
241
241
|
requestType: "json",
|
|
242
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -328,7 +328,7 @@ class Connections {
|
|
|
328
328
|
method: "POST",
|
|
329
329
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
330
330
|
? yield core.Supplier.get(this._options.apiKey)
|
|
331
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
331
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
332
332
|
contentType: "application/json",
|
|
333
333
|
requestType: "json",
|
|
334
334
|
body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -404,7 +404,7 @@ class Connections {
|
|
|
404
404
|
method: "GET",
|
|
405
405
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
406
406
|
? yield core.Supplier.get(this._options.apiKey)
|
|
407
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
407
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
408
408
|
contentType: "application/json",
|
|
409
409
|
requestType: "json",
|
|
410
410
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -481,7 +481,7 @@ class Connections {
|
|
|
481
481
|
method: "DELETE",
|
|
482
482
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
483
483
|
? yield core.Supplier.get(this._options.apiKey)
|
|
484
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
484
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
485
485
|
contentType: "application/json",
|
|
486
486
|
requestType: "json",
|
|
487
487
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -538,7 +538,7 @@ class Connections {
|
|
|
538
538
|
*
|
|
539
539
|
* Returns:
|
|
540
540
|
* --------
|
|
541
|
-
*
|
|
541
|
+
* connection (schemas.Connection): The disconnected connection
|
|
542
542
|
*
|
|
543
543
|
* @param {string} connectionId
|
|
544
544
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -556,7 +556,7 @@ class Connections {
|
|
|
556
556
|
method: "PUT",
|
|
557
557
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
558
558
|
? yield core.Supplier.get(this._options.apiKey)
|
|
559
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
559
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
560
560
|
contentType: "application/json",
|
|
561
561
|
requestType: "json",
|
|
562
562
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -603,43 +603,43 @@ class Connections {
|
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
/**
|
|
606
|
-
*
|
|
606
|
+
* Get the OAuth2 authorization URL for a source.
|
|
607
607
|
*
|
|
608
608
|
* Args:
|
|
609
609
|
* -----
|
|
610
|
-
*
|
|
611
|
-
* connection_id (UUID): The ID of the connection to disconnect
|
|
612
|
-
* user (schemas.User): The current user
|
|
613
|
-
*
|
|
614
|
-
* Returns:
|
|
615
|
-
* --------
|
|
616
|
-
* connection_schema (schemas.Connection): The disconnected connection
|
|
610
|
+
* short_name: The short name of the source
|
|
617
611
|
*
|
|
618
|
-
* @param {
|
|
612
|
+
* @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
|
|
619
613
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
620
614
|
*
|
|
621
615
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
622
616
|
*
|
|
623
617
|
* @example
|
|
624
|
-
* await client.connections.
|
|
618
|
+
* await client.connections.getOauth2AuthUrl({
|
|
619
|
+
* shortName: "short_name"
|
|
620
|
+
* })
|
|
625
621
|
*/
|
|
626
|
-
|
|
622
|
+
getOauth2AuthUrl(request, requestOptions) {
|
|
627
623
|
return __awaiter(this, void 0, void 0, function* () {
|
|
628
624
|
var _a;
|
|
625
|
+
const { shortName } = request;
|
|
626
|
+
const _queryParams = {};
|
|
627
|
+
_queryParams["short_name"] = shortName;
|
|
629
628
|
const _response = yield core.fetcher({
|
|
630
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production,
|
|
631
|
-
method: "
|
|
629
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
|
|
630
|
+
method: "GET",
|
|
632
631
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
633
632
|
? yield core.Supplier.get(this._options.apiKey)
|
|
634
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
633
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
635
634
|
contentType: "application/json",
|
|
635
|
+
queryParameters: _queryParams,
|
|
636
636
|
requestType: "json",
|
|
637
637
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
638
638
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
639
639
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
640
640
|
});
|
|
641
641
|
if (_response.ok) {
|
|
642
|
-
return serializers.
|
|
642
|
+
return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
|
|
643
643
|
unrecognizedObjectKeys: "passthrough",
|
|
644
644
|
allowUnrecognizedUnionMembers: true,
|
|
645
645
|
allowUnrecognizedEnumValues: true,
|
|
@@ -669,7 +669,7 @@ class Connections {
|
|
|
669
669
|
body: _response.error.rawBody,
|
|
670
670
|
});
|
|
671
671
|
case "timeout":
|
|
672
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
672
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
|
|
673
673
|
case "unknown":
|
|
674
674
|
throw new errors.AirweaveSDKError({
|
|
675
675
|
message: _response.error.errorMessage,
|
|
@@ -678,45 +678,55 @@ class Connections {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
/**
|
|
681
|
-
*
|
|
681
|
+
* Send the OAuth2 authorization code for a source.
|
|
682
|
+
*
|
|
683
|
+
* This will:
|
|
684
|
+
* 1. Get the OAuth2 settings for the source
|
|
685
|
+
* 2. Exchange the authorization code for a token
|
|
686
|
+
* 3. Create an integration credential with the token
|
|
682
687
|
*
|
|
683
688
|
* Args:
|
|
684
689
|
* -----
|
|
685
690
|
* db: The database session
|
|
686
691
|
* short_name: The short name of the source
|
|
692
|
+
* code: The authorization code
|
|
687
693
|
* user: The current user
|
|
688
694
|
*
|
|
689
|
-
*
|
|
695
|
+
* Returns:
|
|
696
|
+
* --------
|
|
697
|
+
* connection (schemas.Connection): The created connection
|
|
698
|
+
*
|
|
699
|
+
* @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
|
|
690
700
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
691
701
|
*
|
|
692
702
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
693
703
|
*
|
|
694
704
|
* @example
|
|
695
|
-
* await client.connections.
|
|
696
|
-
* shortName: "short_name"
|
|
705
|
+
* await client.connections.sendOauth2Code({
|
|
706
|
+
* shortName: "short_name",
|
|
707
|
+
* code: "code"
|
|
697
708
|
* })
|
|
698
709
|
*/
|
|
699
|
-
|
|
710
|
+
sendOauth2Code(request, requestOptions) {
|
|
700
711
|
return __awaiter(this, void 0, void 0, function* () {
|
|
701
712
|
var _a;
|
|
702
|
-
const { shortName } = request;
|
|
703
|
-
const _queryParams = {};
|
|
704
|
-
_queryParams["short_name"] = shortName;
|
|
705
713
|
const _response = yield core.fetcher({
|
|
706
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/
|
|
707
|
-
method: "
|
|
714
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/code"),
|
|
715
|
+
method: "POST",
|
|
708
716
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
709
717
|
? yield core.Supplier.get(this._options.apiKey)
|
|
710
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
718
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
711
719
|
contentType: "application/json",
|
|
712
|
-
queryParameters: _queryParams,
|
|
713
720
|
requestType: "json",
|
|
721
|
+
body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
|
|
722
|
+
unrecognizedObjectKeys: "strip",
|
|
723
|
+
}),
|
|
714
724
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
715
725
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
716
726
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
717
727
|
});
|
|
718
728
|
if (_response.ok) {
|
|
719
|
-
return serializers.
|
|
729
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
720
730
|
unrecognizedObjectKeys: "passthrough",
|
|
721
731
|
allowUnrecognizedUnionMembers: true,
|
|
722
732
|
allowUnrecognizedEnumValues: true,
|
|
@@ -746,7 +756,7 @@ class Connections {
|
|
|
746
756
|
body: _response.error.rawBody,
|
|
747
757
|
});
|
|
748
758
|
case "timeout":
|
|
749
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
759
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
|
|
750
760
|
case "unknown":
|
|
751
761
|
throw new errors.AirweaveSDKError({
|
|
752
762
|
message: _response.error.errorMessage,
|
|
@@ -755,47 +765,41 @@ class Connections {
|
|
|
755
765
|
});
|
|
756
766
|
}
|
|
757
767
|
/**
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
* This will:
|
|
761
|
-
* 1. Get the OAuth2 settings for the source
|
|
762
|
-
* 2. Exchange the authorization code for a token
|
|
763
|
-
* 3. Create an integration credential with the token
|
|
768
|
+
* Exchange the OAuth2 authorization code for a white label integration.
|
|
764
769
|
*
|
|
765
770
|
* Args:
|
|
766
771
|
* -----
|
|
767
772
|
* db: The database session
|
|
768
|
-
*
|
|
773
|
+
* white_label_id: The ID of the white label integration
|
|
769
774
|
* code: The authorization code
|
|
770
775
|
* user: The current user
|
|
776
|
+
* background_tasks: The background tasks
|
|
771
777
|
*
|
|
772
778
|
* Returns:
|
|
773
779
|
* --------
|
|
774
780
|
* connection (schemas.Connection): The created connection
|
|
775
781
|
*
|
|
776
|
-
* @param {
|
|
782
|
+
* @param {string} whiteLabelId
|
|
783
|
+
* @param {string} request
|
|
777
784
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
778
785
|
*
|
|
779
786
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
780
787
|
*
|
|
781
788
|
* @example
|
|
782
|
-
* await client.connections.
|
|
783
|
-
* shortName: "short_name",
|
|
784
|
-
* code: "code"
|
|
785
|
-
* })
|
|
789
|
+
* await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
|
|
786
790
|
*/
|
|
787
|
-
|
|
791
|
+
sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
|
|
788
792
|
return __awaiter(this, void 0, void 0, function* () {
|
|
789
793
|
var _a;
|
|
790
794
|
const _response = yield core.fetcher({
|
|
791
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production,
|
|
795
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
|
|
792
796
|
method: "POST",
|
|
793
797
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
794
798
|
? yield core.Supplier.get(this._options.apiKey)
|
|
795
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
799
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
796
800
|
contentType: "application/json",
|
|
797
801
|
requestType: "json",
|
|
798
|
-
body: serializers.
|
|
802
|
+
body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
|
|
799
803
|
unrecognizedObjectKeys: "strip",
|
|
800
804
|
}),
|
|
801
805
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -833,7 +837,7 @@ class Connections {
|
|
|
833
837
|
body: _response.error.rawBody,
|
|
834
838
|
});
|
|
835
839
|
case "timeout":
|
|
836
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/
|
|
840
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
|
|
837
841
|
case "unknown":
|
|
838
842
|
throw new errors.AirweaveSDKError({
|
|
839
843
|
message: _response.error.errorMessage,
|
|
@@ -842,49 +846,43 @@ class Connections {
|
|
|
842
846
|
});
|
|
843
847
|
}
|
|
844
848
|
/**
|
|
845
|
-
*
|
|
849
|
+
* Get the OAuth2 authorization URL for a white label integration.
|
|
846
850
|
*
|
|
847
851
|
* Args:
|
|
848
852
|
* -----
|
|
849
853
|
* db: The database session
|
|
850
854
|
* white_label_id: The ID of the white label integration
|
|
851
|
-
* code: The authorization code
|
|
852
855
|
* user: The current user
|
|
853
|
-
* background_tasks: The background tasks
|
|
854
856
|
*
|
|
855
857
|
* Returns:
|
|
856
858
|
* --------
|
|
857
|
-
*
|
|
859
|
+
* str: The OAuth2 authorization URL
|
|
858
860
|
*
|
|
859
861
|
* @param {string} whiteLabelId
|
|
860
|
-
* @param {string} request
|
|
861
862
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
862
863
|
*
|
|
863
864
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
864
865
|
*
|
|
865
866
|
* @example
|
|
866
|
-
* await client.connections.
|
|
867
|
+
* await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
|
|
867
868
|
*/
|
|
868
|
-
|
|
869
|
+
getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
|
|
869
870
|
return __awaiter(this, void 0, void 0, function* () {
|
|
870
871
|
var _a;
|
|
871
872
|
const _response = yield core.fetcher({
|
|
872
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/
|
|
873
|
-
method: "
|
|
873
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
|
|
874
|
+
method: "GET",
|
|
874
875
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
875
876
|
? yield core.Supplier.get(this._options.apiKey)
|
|
876
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
877
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
877
878
|
contentType: "application/json",
|
|
878
879
|
requestType: "json",
|
|
879
|
-
body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
|
|
880
|
-
unrecognizedObjectKeys: "strip",
|
|
881
|
-
}),
|
|
882
880
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
883
881
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
884
882
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
885
883
|
});
|
|
886
884
|
if (_response.ok) {
|
|
887
|
-
return serializers.
|
|
885
|
+
return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
|
|
888
886
|
unrecognizedObjectKeys: "passthrough",
|
|
889
887
|
allowUnrecognizedUnionMembers: true,
|
|
890
888
|
allowUnrecognizedEnumValues: true,
|
|
@@ -914,7 +912,7 @@ class Connections {
|
|
|
914
912
|
body: _response.error.rawBody,
|
|
915
913
|
});
|
|
916
914
|
case "timeout":
|
|
917
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
915
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
|
|
918
916
|
case "unknown":
|
|
919
917
|
throw new errors.AirweaveSDKError({
|
|
920
918
|
message: _response.error.errorMessage,
|
|
@@ -923,43 +921,49 @@ class Connections {
|
|
|
923
921
|
});
|
|
924
922
|
}
|
|
925
923
|
/**
|
|
926
|
-
*
|
|
924
|
+
* Connect to Slack using a direct API token (for local development only).
|
|
927
925
|
*
|
|
928
926
|
* Args:
|
|
929
927
|
* -----
|
|
930
|
-
* db: The database session
|
|
931
|
-
*
|
|
932
|
-
*
|
|
928
|
+
* db: The database session.
|
|
929
|
+
* token: The Slack API token.
|
|
930
|
+
* name: The name of the connection.
|
|
931
|
+
* user: The current user.
|
|
933
932
|
*
|
|
934
933
|
* Returns:
|
|
935
|
-
*
|
|
936
|
-
*
|
|
934
|
+
* -------
|
|
935
|
+
* schemas.Connection: The connection.
|
|
937
936
|
*
|
|
938
|
-
* @param {
|
|
937
|
+
* @param {AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost} request
|
|
939
938
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
940
939
|
*
|
|
941
940
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
942
941
|
*
|
|
943
942
|
* @example
|
|
944
|
-
* await client.connections.
|
|
943
|
+
* await client.connections.connectSlackWithToken({
|
|
944
|
+
* token: "token"
|
|
945
|
+
* })
|
|
945
946
|
*/
|
|
946
|
-
|
|
947
|
+
connectSlackWithToken(request, requestOptions) {
|
|
947
948
|
return __awaiter(this, void 0, void 0, function* () {
|
|
948
949
|
var _a;
|
|
949
950
|
const _response = yield core.fetcher({
|
|
950
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production,
|
|
951
|
-
method: "
|
|
951
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/direct-token/slack"),
|
|
952
|
+
method: "POST",
|
|
952
953
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
953
954
|
? yield core.Supplier.get(this._options.apiKey)
|
|
954
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
955
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
955
956
|
contentType: "application/json",
|
|
956
957
|
requestType: "json",
|
|
958
|
+
body: serializers.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.jsonOrThrow(request, {
|
|
959
|
+
unrecognizedObjectKeys: "strip",
|
|
960
|
+
}),
|
|
957
961
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
958
962
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
959
963
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
960
964
|
});
|
|
961
965
|
if (_response.ok) {
|
|
962
|
-
return serializers.
|
|
966
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
963
967
|
unrecognizedObjectKeys: "passthrough",
|
|
964
968
|
allowUnrecognizedUnionMembers: true,
|
|
965
969
|
allowUnrecognizedEnumValues: true,
|
|
@@ -989,7 +993,7 @@ class Connections {
|
|
|
989
993
|
body: _response.error.rawBody,
|
|
990
994
|
});
|
|
991
995
|
case "timeout":
|
|
992
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
996
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/direct-token/slack.");
|
|
993
997
|
case "unknown":
|
|
994
998
|
throw new errors.AirweaveSDKError({
|
|
995
999
|
message: _response.error.errorMessage,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost } from "./BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost";
|
|
2
2
|
export { type GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest } from "./GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest";
|
|
3
3
|
export { type BodySendOauth2CodeConnectionsOauth2SourceCodePost } from "./BodySendOauth2CodeConnectionsOauth2SourceCodePost";
|
|
4
|
+
export { type BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost } from "./BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost";
|