@airweave/sdk 0.1.11 → 0.1.13
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 +3 -11
- package/Client.js +15 -30
- package/README.md +12 -8
- package/api/resources/connections/client/Client.d.ts +3 -2
- package/api/resources/connections/client/Client.js +38 -25
- package/api/resources/destinations/client/Client.d.ts +3 -2
- package/api/resources/destinations/client/Client.js +8 -5
- package/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/api/resources/embeddingModels/client/Client.js +8 -5
- package/api/resources/index.d.ts +0 -5
- package/api/resources/index.js +1 -6
- package/api/resources/sources/client/Client.d.ts +3 -2
- package/api/resources/sources/client/Client.js +8 -5
- package/api/resources/sync/client/Client.d.ts +3 -2
- package/api/resources/sync/client/Client.js +26 -17
- package/api/resources/users/client/Client.d.ts +3 -2
- package/api/resources/users/client/Client.js +5 -3
- package/api/resources/whiteLabels/client/Client.d.ts +3 -2
- package/api/resources/whiteLabels/client/Client.js +26 -17
- package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
- package/{dist/api/resources/chat/client/requests → api/types}/ChatCreate.d.ts +1 -5
- package/{dist/api/resources/chat/client/requests → api/types}/ChatMessageCreate.d.ts +1 -4
- package/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/Client.d.ts +3 -11
- package/dist/Client.js +15 -30
- package/dist/api/resources/connections/client/Client.d.ts +3 -2
- package/dist/api/resources/connections/client/Client.js +38 -25
- package/dist/api/resources/destinations/client/Client.d.ts +3 -2
- package/dist/api/resources/destinations/client/Client.js +8 -5
- package/dist/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/dist/api/resources/embeddingModels/client/Client.js +8 -5
- package/dist/api/resources/index.d.ts +0 -5
- package/dist/api/resources/index.js +1 -6
- package/dist/api/resources/sources/client/Client.d.ts +3 -2
- package/dist/api/resources/sources/client/Client.js +8 -5
- package/dist/api/resources/sync/client/Client.d.ts +3 -2
- package/dist/api/resources/sync/client/Client.js +26 -17
- package/dist/api/resources/users/client/Client.d.ts +3 -2
- package/dist/api/resources/users/client/Client.js +5 -3
- package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -2
- package/dist/api/resources/whiteLabels/client/Client.js +26 -17
- package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
- package/{api/resources/chat/client/requests → dist/api/types}/ChatCreate.d.ts +1 -5
- package/{api/resources/chat/client/requests → dist/api/types}/ChatMessageCreate.d.ts +1 -4
- package/dist/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +0 -5
- package/dist/serialization/resources/index.js +1 -6
- package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatCreate.d.ts +4 -4
- package/dist/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
- package/dist/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatMessageCreate.js +1 -1
- package/dist/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatUpdate.js +1 -1
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +8 -0
- package/environments.js +10 -0
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/package.json +1 -1
- package/reference.md +310 -1200
- package/serialization/resources/index.d.ts +0 -5
- package/serialization/resources/index.js +1 -6
- package/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatCreate.d.ts +4 -4
- package/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
- package/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatMessageCreate.js +1 -1
- package/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatUpdate.js +1 -1
- package/serialization/types/index.d.ts +4 -0
- package/serialization/types/index.js +4 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +0 -130
- package/api/resources/apiKeys/client/Client.js +0 -386
- package/api/resources/apiKeys/client/index.d.ts +0 -1
- package/api/resources/apiKeys/client/index.js +0 -17
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
- package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/api/resources/apiKeys/client/requests/index.js +0 -2
- package/api/resources/apiKeys/index.d.ts +0 -1
- package/api/resources/apiKeys/index.js +0 -17
- package/api/resources/chat/client/Client.d.ts +0 -133
- package/api/resources/chat/client/Client.js +0 -585
- package/api/resources/chat/client/index.d.ts +0 -1
- package/api/resources/chat/client/index.js +0 -17
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
- package/api/resources/chat/client/requests/index.d.ts +0 -4
- package/api/resources/chat/client/requests/index.js +0 -2
- package/api/resources/chat/index.d.ts +0 -1
- package/api/resources/chat/index.js +0 -17
- package/api/resources/health/client/Client.d.ts +0 -39
- package/api/resources/health/client/Client.js +0 -115
- package/api/resources/health/client/index.d.ts +0 -1
- package/api/resources/health/client/index.js +0 -2
- package/api/resources/health/index.d.ts +0 -1
- package/api/resources/health/index.js +0 -17
- package/dist/api/resources/apiKeys/client/Client.d.ts +0 -130
- package/dist/api/resources/apiKeys/client/Client.js +0 -386
- package/dist/api/resources/apiKeys/client/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/client/index.js +0 -17
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
- package/dist/api/resources/apiKeys/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/index.js +0 -17
- package/dist/api/resources/chat/client/Client.d.ts +0 -133
- package/dist/api/resources/chat/client/Client.js +0 -585
- package/dist/api/resources/chat/client/index.d.ts +0 -1
- package/dist/api/resources/chat/client/index.js +0 -17
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
- package/dist/api/resources/chat/client/requests/index.d.ts +0 -4
- package/dist/api/resources/chat/client/requests/index.js +0 -2
- package/dist/api/resources/chat/index.d.ts +0 -1
- package/dist/api/resources/chat/index.js +0 -17
- package/dist/api/resources/health/client/Client.d.ts +0 -39
- package/dist/api/resources/health/client/Client.js +0 -115
- package/dist/api/resources/health/client/index.d.ts +0 -1
- package/dist/api/resources/health/client/index.js +0 -2
- package/dist/api/resources/health/index.d.ts +0 -1
- package/dist/api/resources/health/index.js +0 -17
- package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/dist/serialization/resources/apiKeys/client/index.js +0 -41
- package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
- package/dist/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
- package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/dist/serialization/resources/apiKeys/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/index.js +0 -17
- package/dist/serialization/resources/chat/client/index.d.ts +0 -3
- package/dist/serialization/resources/chat/client/index.js +0 -42
- package/dist/serialization/resources/chat/client/listChats.d.ts +0 -11
- package/dist/serialization/resources/chat/client/listChats.js +0 -42
- package/dist/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
- package/dist/serialization/resources/chat/client/openaiKeySet.js +0 -41
- package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
- package/dist/serialization/resources/chat/client/requests/index.d.ts +0 -3
- package/dist/serialization/resources/chat/client/requests/index.js +0 -9
- package/dist/serialization/resources/chat/index.d.ts +0 -1
- package/dist/serialization/resources/chat/index.js +0 -17
- package/dist/serialization/resources/health/client/healthCheck.d.ts +0 -9
- package/dist/serialization/resources/health/client/healthCheck.js +0 -41
- package/dist/serialization/resources/health/client/index.d.ts +0 -1
- package/dist/serialization/resources/health/client/index.js +0 -37
- package/dist/serialization/resources/health/index.d.ts +0 -1
- package/dist/serialization/resources/health/index.js +0 -17
- package/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/serialization/resources/apiKeys/client/index.js +0 -41
- package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
- package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
- package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/serialization/resources/apiKeys/index.d.ts +0 -1
- package/serialization/resources/apiKeys/index.js +0 -17
- package/serialization/resources/chat/client/index.d.ts +0 -3
- package/serialization/resources/chat/client/index.js +0 -42
- package/serialization/resources/chat/client/listChats.d.ts +0 -11
- package/serialization/resources/chat/client/listChats.js +0 -42
- package/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
- package/serialization/resources/chat/client/openaiKeySet.js +0 -41
- package/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
- package/serialization/resources/chat/client/requests/index.d.ts +0 -3
- package/serialization/resources/chat/client/requests/index.js +0 -9
- package/serialization/resources/chat/index.d.ts +0 -1
- package/serialization/resources/chat/index.js +0 -17
- package/serialization/resources/health/client/healthCheck.d.ts +0 -9
- package/serialization/resources/health/client/healthCheck.js +0 -41
- package/serialization/resources/health/client/index.d.ts +0 -1
- package/serialization/resources/health/client/index.js +0 -37
- package/serialization/resources/health/index.d.ts +0 -1
- package/serialization/resources/health/index.js +0 -17
- /package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatUpdate.js +0 -0
- /package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatUpdate.js +0 -0
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Sources = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Sources {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -81,12 +82,13 @@ class Sources {
|
|
|
81
82
|
*/
|
|
82
83
|
readSource(shortName, requestOptions) {
|
|
83
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
84
86
|
const _response = yield core.fetcher({
|
|
85
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sources/detail/${encodeURIComponent(shortName)}`),
|
|
87
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sources/detail/${encodeURIComponent(shortName)}`),
|
|
86
88
|
method: "GET",
|
|
87
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
88
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
92
|
contentType: "application/json",
|
|
91
93
|
requestType: "json",
|
|
92
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,12 +150,13 @@ class Sources {
|
|
|
148
150
|
*/
|
|
149
151
|
readSources(requestOptions) {
|
|
150
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
var _a;
|
|
151
154
|
const _response = yield core.fetcher({
|
|
152
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sources/list"),
|
|
155
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sources/list"),
|
|
153
156
|
method: "GET",
|
|
154
157
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
155
158
|
? yield core.Supplier.get(this._options.apiKey)
|
|
156
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
159
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
160
|
contentType: "application/json",
|
|
158
161
|
requestType: "json",
|
|
159
162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace Sync {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace Sync {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Sync {
|
|
26
27
|
protected readonly _options: Sync.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Sync.Options);
|
|
28
29
|
/**
|
|
29
30
|
* List all syncs for the current user.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Sync = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Sync {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -71,6 +72,7 @@ class Sync {
|
|
|
71
72
|
*/
|
|
72
73
|
listSyncs() {
|
|
73
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
|
+
var _a;
|
|
74
76
|
const { skip, limit, withSourceConnection } = request;
|
|
75
77
|
const _queryParams = {};
|
|
76
78
|
if (skip != null) {
|
|
@@ -83,11 +85,11 @@ class Sync {
|
|
|
83
85
|
_queryParams["with_source_connection"] = withSourceConnection.toString();
|
|
84
86
|
}
|
|
85
87
|
const _response = yield core.fetcher({
|
|
86
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sync/"),
|
|
88
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
|
|
87
89
|
method: "GET",
|
|
88
90
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
89
91
|
? yield core.Supplier.get(this._options.apiKey)
|
|
90
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
92
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
93
|
contentType: "application/json",
|
|
92
94
|
queryParameters: _queryParams,
|
|
93
95
|
requestType: "json",
|
|
@@ -150,12 +152,13 @@ class Sync {
|
|
|
150
152
|
*/
|
|
151
153
|
createSync(request, requestOptions) {
|
|
152
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
var _a;
|
|
153
156
|
const _response = yield core.fetcher({
|
|
154
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sync/"),
|
|
157
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
|
|
155
158
|
method: "POST",
|
|
156
159
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
157
160
|
? yield core.Supplier.get(this._options.apiKey)
|
|
158
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
161
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
159
162
|
contentType: "application/json",
|
|
160
163
|
requestType: "json",
|
|
161
164
|
body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -215,12 +218,13 @@ class Sync {
|
|
|
215
218
|
*/
|
|
216
219
|
getSync(syncId, requestOptions) {
|
|
217
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
var _a;
|
|
218
222
|
const _response = yield core.fetcher({
|
|
219
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}`),
|
|
223
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
|
|
220
224
|
method: "GET",
|
|
221
225
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
222
226
|
? yield core.Supplier.get(this._options.apiKey)
|
|
223
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
227
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
224
228
|
contentType: "application/json",
|
|
225
229
|
requestType: "json",
|
|
226
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -280,17 +284,18 @@ class Sync {
|
|
|
280
284
|
*/
|
|
281
285
|
deleteSync(syncId_1) {
|
|
282
286
|
return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
|
|
287
|
+
var _a;
|
|
283
288
|
const { deleteData } = request;
|
|
284
289
|
const _queryParams = {};
|
|
285
290
|
if (deleteData != null) {
|
|
286
291
|
_queryParams["delete_data"] = deleteData.toString();
|
|
287
292
|
}
|
|
288
293
|
const _response = yield core.fetcher({
|
|
289
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}`),
|
|
294
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
|
|
290
295
|
method: "DELETE",
|
|
291
296
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
292
297
|
? yield core.Supplier.get(this._options.apiKey)
|
|
293
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
298
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
294
299
|
contentType: "application/json",
|
|
295
300
|
queryParameters: _queryParams,
|
|
296
301
|
requestType: "json",
|
|
@@ -350,12 +355,13 @@ class Sync {
|
|
|
350
355
|
*/
|
|
351
356
|
runSync(syncId, requestOptions) {
|
|
352
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
+
var _a;
|
|
353
359
|
const _response = yield core.fetcher({
|
|
354
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}/run`),
|
|
360
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/run`),
|
|
355
361
|
method: "POST",
|
|
356
362
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
357
363
|
? yield core.Supplier.get(this._options.apiKey)
|
|
358
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
364
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
359
365
|
contentType: "application/json",
|
|
360
366
|
requestType: "json",
|
|
361
367
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -414,12 +420,13 @@ class Sync {
|
|
|
414
420
|
*/
|
|
415
421
|
listSyncJobs(syncId, requestOptions) {
|
|
416
422
|
return __awaiter(this, void 0, void 0, function* () {
|
|
423
|
+
var _a;
|
|
417
424
|
const _response = yield core.fetcher({
|
|
418
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}/jobs`),
|
|
425
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/jobs`),
|
|
419
426
|
method: "GET",
|
|
420
427
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
421
428
|
? yield core.Supplier.get(this._options.apiKey)
|
|
422
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
429
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
423
430
|
contentType: "application/json",
|
|
424
431
|
requestType: "json",
|
|
425
432
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -481,15 +488,16 @@ class Sync {
|
|
|
481
488
|
*/
|
|
482
489
|
getSyncJob(jobId, request, requestOptions) {
|
|
483
490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
var _a;
|
|
484
492
|
const { syncId } = request;
|
|
485
493
|
const _queryParams = {};
|
|
486
494
|
_queryParams["sync_id"] = syncId;
|
|
487
495
|
const _response = yield core.fetcher({
|
|
488
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/job/${encodeURIComponent(jobId)}`),
|
|
496
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}`),
|
|
489
497
|
method: "GET",
|
|
490
498
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
491
499
|
? yield core.Supplier.get(this._options.apiKey)
|
|
492
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
500
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
493
501
|
contentType: "application/json",
|
|
494
502
|
queryParameters: _queryParams,
|
|
495
503
|
requestType: "json",
|
|
@@ -549,12 +557,13 @@ class Sync {
|
|
|
549
557
|
*/
|
|
550
558
|
subscribeSyncJob(jobId, requestOptions) {
|
|
551
559
|
return __awaiter(this, void 0, void 0, function* () {
|
|
560
|
+
var _a;
|
|
552
561
|
const _response = yield core.fetcher({
|
|
553
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/job/${encodeURIComponent(jobId)}/subscribe`),
|
|
562
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}/subscribe`),
|
|
554
563
|
method: "GET",
|
|
555
564
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
556
565
|
? yield core.Supplier.get(this._options.apiKey)
|
|
557
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
566
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
558
567
|
contentType: "application/json",
|
|
559
568
|
requestType: "json",
|
|
560
569
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace Users {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace Users {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Users {
|
|
26
27
|
protected readonly _options: Users.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Users.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get current user.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Users = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Users {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -78,12 +79,13 @@ class Users {
|
|
|
78
79
|
*/
|
|
79
80
|
readUser(requestOptions) {
|
|
80
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a;
|
|
81
83
|
const _response = yield core.fetcher({
|
|
82
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "users/"),
|
|
84
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "users/"),
|
|
83
85
|
method: "GET",
|
|
84
86
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
85
87
|
? yield core.Supplier.get(this._options.apiKey)
|
|
86
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
88
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
89
|
contentType: "application/json",
|
|
88
90
|
requestType: "json",
|
|
89
91
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace WhiteLabels {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace WhiteLabels {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class WhiteLabels {
|
|
26
27
|
protected readonly _options: WhiteLabels.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: WhiteLabels.Options);
|
|
28
29
|
/**
|
|
29
30
|
* List all white labels for the current user's organization.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.WhiteLabels = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class WhiteLabels {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -70,12 +71,13 @@ class WhiteLabels {
|
|
|
70
71
|
*/
|
|
71
72
|
listWhiteLabels(requestOptions) {
|
|
72
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
73
75
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "white_labels/list"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/list"),
|
|
75
77
|
method: "GET",
|
|
76
78
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
77
79
|
? yield core.Supplier.get(this._options.apiKey)
|
|
78
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
81
|
contentType: "application/json",
|
|
80
82
|
requestType: "json",
|
|
81
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -140,12 +142,13 @@ class WhiteLabels {
|
|
|
140
142
|
*/
|
|
141
143
|
createWhiteLabel(request, requestOptions) {
|
|
142
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
var _a;
|
|
143
146
|
const _response = yield core.fetcher({
|
|
144
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "white_labels/"),
|
|
147
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/"),
|
|
145
148
|
method: "POST",
|
|
146
149
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
147
150
|
? yield core.Supplier.get(this._options.apiKey)
|
|
148
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
151
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
149
152
|
contentType: "application/json",
|
|
150
153
|
requestType: "json",
|
|
151
154
|
body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -205,12 +208,13 @@ class WhiteLabels {
|
|
|
205
208
|
*/
|
|
206
209
|
getWhiteLabel(whiteLabelId, requestOptions) {
|
|
207
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
var _a;
|
|
208
212
|
const _response = yield core.fetcher({
|
|
209
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
213
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
210
214
|
method: "GET",
|
|
211
215
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
212
216
|
? yield core.Supplier.get(this._options.apiKey)
|
|
213
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
217
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
218
|
contentType: "application/json",
|
|
215
219
|
requestType: "json",
|
|
216
220
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -270,12 +274,13 @@ class WhiteLabels {
|
|
|
270
274
|
*/
|
|
271
275
|
updateWhiteLabel(whiteLabelId_1) {
|
|
272
276
|
return __awaiter(this, arguments, void 0, function* (whiteLabelId, request = {}, requestOptions) {
|
|
277
|
+
var _a;
|
|
273
278
|
const _response = yield core.fetcher({
|
|
274
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
279
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
275
280
|
method: "PUT",
|
|
276
281
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
277
282
|
? yield core.Supplier.get(this._options.apiKey)
|
|
278
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
283
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
279
284
|
contentType: "application/json",
|
|
280
285
|
requestType: "json",
|
|
281
286
|
body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -335,12 +340,13 @@ class WhiteLabels {
|
|
|
335
340
|
*/
|
|
336
341
|
deleteWhiteLabel(whiteLabelId, requestOptions) {
|
|
337
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
var _a;
|
|
338
344
|
const _response = yield core.fetcher({
|
|
339
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
345
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
|
|
340
346
|
method: "DELETE",
|
|
341
347
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
342
348
|
? yield core.Supplier.get(this._options.apiKey)
|
|
343
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
349
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
344
350
|
contentType: "application/json",
|
|
345
351
|
requestType: "json",
|
|
346
352
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -399,12 +405,13 @@ class WhiteLabels {
|
|
|
399
405
|
*/
|
|
400
406
|
getWhiteLabelOauth2AuthUrl(whiteLabelId, requestOptions) {
|
|
401
407
|
return __awaiter(this, void 0, void 0, function* () {
|
|
408
|
+
var _a;
|
|
402
409
|
const _response = yield core.fetcher({
|
|
403
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/auth_url`),
|
|
410
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/auth_url`),
|
|
404
411
|
method: "GET",
|
|
405
412
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
406
413
|
? yield core.Supplier.get(this._options.apiKey)
|
|
407
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
414
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
408
415
|
contentType: "application/json",
|
|
409
416
|
requestType: "json",
|
|
410
417
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -464,12 +471,13 @@ class WhiteLabels {
|
|
|
464
471
|
*/
|
|
465
472
|
exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
|
|
466
473
|
return __awaiter(this, void 0, void 0, function* () {
|
|
474
|
+
var _a;
|
|
467
475
|
const _response = yield core.fetcher({
|
|
468
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/code`),
|
|
476
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/code`),
|
|
469
477
|
method: "POST",
|
|
470
478
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
471
479
|
? yield core.Supplier.get(this._options.apiKey)
|
|
472
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
480
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
473
481
|
contentType: "application/json",
|
|
474
482
|
requestType: "json",
|
|
475
483
|
body: serializers.whiteLabels.exchangeWhiteLabelOauth2Code.Request.jsonOrThrow(request, {
|
|
@@ -531,12 +539,13 @@ class WhiteLabels {
|
|
|
531
539
|
*/
|
|
532
540
|
listWhiteLabelSyncs(whiteLabelId, requestOptions) {
|
|
533
541
|
return __awaiter(this, void 0, void 0, function* () {
|
|
542
|
+
var _a;
|
|
534
543
|
const _response = yield core.fetcher({
|
|
535
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/syncs`),
|
|
544
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/syncs`),
|
|
536
545
|
method: "GET",
|
|
537
546
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
538
547
|
? yield core.Supplier.get(this._options.apiKey)
|
|
539
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
548
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
540
549
|
contentType: "application/json",
|
|
541
550
|
requestType: "json",
|
|
542
551
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from "./ApiKey";
|
|
2
|
+
export * from "./ApiKeyCreate";
|
|
2
3
|
export * from "./ApiKeyWithPlainKey";
|
|
3
4
|
export * from "./AuthType";
|
|
4
5
|
export * from "./Chat";
|
|
6
|
+
export * from "./ChatCreate";
|
|
5
7
|
export * from "./ChatMessage";
|
|
8
|
+
export * from "./ChatMessageCreate";
|
|
9
|
+
export * from "./ChatUpdate";
|
|
6
10
|
export * from "./ConfigField";
|
|
7
11
|
export * from "./Connection";
|
|
8
12
|
export * from "./ConnectionStatus";
|
package/dist/api/types/index.js
CHANGED
|
@@ -15,10 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiKey"), exports);
|
|
18
|
+
__exportStar(require("./ApiKeyCreate"), exports);
|
|
18
19
|
__exportStar(require("./ApiKeyWithPlainKey"), exports);
|
|
19
20
|
__exportStar(require("./AuthType"), exports);
|
|
20
21
|
__exportStar(require("./Chat"), exports);
|
|
22
|
+
__exportStar(require("./ChatCreate"), exports);
|
|
21
23
|
__exportStar(require("./ChatMessage"), exports);
|
|
24
|
+
__exportStar(require("./ChatMessageCreate"), exports);
|
|
25
|
+
__exportStar(require("./ChatUpdate"), exports);
|
|
22
26
|
__exportStar(require("./ConfigField"), exports);
|
|
23
27
|
__exportStar(require("./Connection"), exports);
|
|
24
28
|
__exportStar(require("./ConnectionStatus"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AirweaveSDKEnvironment: {
|
|
5
|
+
readonly Production: "https://api.airweave.ai";
|
|
6
|
+
readonly Local: "http://localhost:8001";
|
|
7
|
+
};
|
|
8
|
+
export type AirweaveSDKEnvironment = typeof AirweaveSDKEnvironment.Production | typeof AirweaveSDKEnvironment.Local;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AirweaveSDKEnvironment = void 0;
|
|
7
|
+
exports.AirweaveSDKEnvironment = {
|
|
8
|
+
Production: "https://api.airweave.ai",
|
|
9
|
+
Local: "http://localhost:8001",
|
|
10
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -33,10 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.AirweaveSDKTimeoutError = exports.AirweaveSDKError = exports.AirweaveSDKClient = exports.AirweaveSDK = void 0;
|
|
36
|
+
exports.AirweaveSDKTimeoutError = exports.AirweaveSDKError = exports.AirweaveSDKEnvironment = exports.AirweaveSDKClient = exports.AirweaveSDK = void 0;
|
|
37
37
|
exports.AirweaveSDK = __importStar(require("./api"));
|
|
38
38
|
var Client_1 = require("./Client");
|
|
39
39
|
Object.defineProperty(exports, "AirweaveSDKClient", { enumerable: true, get: function () { return Client_1.AirweaveSDKClient; } });
|
|
40
|
+
var environments_1 = require("./environments");
|
|
41
|
+
Object.defineProperty(exports, "AirweaveSDKEnvironment", { enumerable: true, get: function () { return environments_1.AirweaveSDKEnvironment; } });
|
|
40
42
|
var errors_1 = require("./errors");
|
|
41
43
|
Object.defineProperty(exports, "AirweaveSDKError", { enumerable: true, get: function () { return errors_1.AirweaveSDKError; } });
|
|
42
44
|
Object.defineProperty(exports, "AirweaveSDKTimeoutError", { enumerable: true, get: function () { return errors_1.AirweaveSDKTimeoutError; } });
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
export * as sync from "./sync";
|
|
2
2
|
export * from "./sync/types";
|
|
3
|
-
export * as health from "./health";
|
|
4
|
-
export * as apiKeys from "./apiKeys";
|
|
5
3
|
export * as sources from "./sources";
|
|
6
4
|
export * as destinations from "./destinations";
|
|
7
5
|
export * as embeddingModels from "./embeddingModels";
|
|
8
6
|
export * as connections from "./connections";
|
|
9
7
|
export * as whiteLabels from "./whiteLabels";
|
|
10
|
-
export * as chat from "./chat";
|
|
11
|
-
export * from "./apiKeys/client/requests";
|
|
12
8
|
export * from "./connections/client/requests";
|
|
13
9
|
export * from "./sync/client/requests";
|
|
14
10
|
export * from "./whiteLabels/client/requests";
|
|
15
|
-
export * from "./chat/client/requests";
|