@airweave/sdk 0.1.10 → 0.1.12
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 -2
- package/Client.js +1 -1
- package/README.md +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +3 -2
- package/api/resources/apiKeys/client/Client.js +14 -9
- package/api/resources/chat/client/Client.d.ts +3 -2
- package/api/resources/chat/client/Client.js +26 -17
- 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/health/client/Client.d.ts +3 -2
- package/api/resources/health/client/Client.js +5 -3
- 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 +4 -3
- package/api/resources/whiteLabels/client/Client.js +27 -18
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +2 -2
- package/api/types/WhiteLabel.d.ts +1 -1
- package/dist/Client.d.ts +3 -2
- package/dist/Client.js +1 -1
- package/dist/api/resources/apiKeys/client/Client.d.ts +3 -2
- package/dist/api/resources/apiKeys/client/Client.js +14 -9
- package/dist/api/resources/chat/client/Client.d.ts +3 -2
- package/dist/api/resources/chat/client/Client.js +26 -17
- 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/health/client/Client.d.ts +3 -2
- package/dist/api/resources/health/client/Client.js +5 -3
- 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 +4 -3
- package/dist/api/resources/whiteLabels/client/Client.js +27 -18
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +2 -2
- package/dist/api/types/WhiteLabel.d.ts +1 -1
- 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/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +1 -1
- package/dist/serialization/types/WhiteLabel.d.ts +1 -1
- package/dist/serialization/types/WhiteLabel.js +1 -1
- 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 +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +1 -1
- package/serialization/types/WhiteLabel.d.ts +1 -1
- package/serialization/types/WhiteLabel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Destinations = 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 Destinations {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -70,12 +71,13 @@ class Destinations {
|
|
|
70
71
|
*/
|
|
71
72
|
listDestinations(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), "destinations/list"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "destinations/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.12", "User-Agent": "@airweave/sdk/0.1.12", "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,
|
|
@@ -134,12 +136,13 @@ class Destinations {
|
|
|
134
136
|
*/
|
|
135
137
|
readDestination(shortName, requestOptions) {
|
|
136
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
var _a;
|
|
137
140
|
const _response = yield core.fetcher({
|
|
138
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `destinations/detail/${encodeURIComponent(shortName)}`),
|
|
141
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `destinations/detail/${encodeURIComponent(shortName)}`),
|
|
139
142
|
method: "GET",
|
|
140
143
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
141
144
|
? yield core.Supplier.get(this._options.apiKey)
|
|
142
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
145
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
143
146
|
contentType: "application/json",
|
|
144
147
|
requestType: "json",
|
|
145
148
|
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 EmbeddingModels {
|
|
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 EmbeddingModels {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class EmbeddingModels {
|
|
26
27
|
protected readonly _options: EmbeddingModels.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: EmbeddingModels.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get embedding model by id.
|
|
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.EmbeddingModels = 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 EmbeddingModels {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -81,12 +82,13 @@ class EmbeddingModels {
|
|
|
81
82
|
*/
|
|
82
83
|
readEmbeddingModel(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), `embedding_models/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, `embedding_models/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.12", "User-Agent": "@airweave/sdk/0.1.12", "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,
|
|
@@ -153,12 +155,13 @@ class EmbeddingModels {
|
|
|
153
155
|
*/
|
|
154
156
|
readEmbeddingModels(requestOptions) {
|
|
155
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a;
|
|
156
159
|
const _response = yield core.fetcher({
|
|
157
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "embedding_models/list"),
|
|
160
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "embedding_models/list"),
|
|
158
161
|
method: "GET",
|
|
159
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
160
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
161
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
162
165
|
contentType: "application/json",
|
|
163
166
|
requestType: "json",
|
|
164
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,10 +1,11 @@
|
|
|
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
|
export declare namespace Health {
|
|
6
7
|
interface Options {
|
|
7
|
-
environment
|
|
8
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
8
9
|
/** Override the x-api-key header */
|
|
9
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
10
11
|
}
|
|
@@ -23,7 +24,7 @@ export declare namespace Health {
|
|
|
23
24
|
}
|
|
24
25
|
export declare class Health {
|
|
25
26
|
protected readonly _options: Health.Options;
|
|
26
|
-
constructor(_options
|
|
27
|
+
constructor(_options?: Health.Options);
|
|
27
28
|
/**
|
|
28
29
|
* Check if the API is healthy.
|
|
29
30
|
*
|
|
@@ -49,12 +49,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Health = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const url_join_1 = __importDefault(require("url-join"));
|
|
54
55
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
55
56
|
const errors = __importStar(require("../../../../errors/index"));
|
|
56
57
|
class Health {
|
|
57
|
-
constructor(_options) {
|
|
58
|
+
constructor(_options = {}) {
|
|
58
59
|
this._options = _options;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -70,12 +71,13 @@ class Health {
|
|
|
70
71
|
*/
|
|
71
72
|
healthCheck(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), "health"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "health"),
|
|
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.12", "User-Agent": "@airweave/sdk/0.1.12", "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,
|
|
@@ -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 Sources {
|
|
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 Sources {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Sources {
|
|
26
27
|
protected readonly _options: Sources.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Sources.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get source by id.
|
|
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.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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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.12", "User-Agent": "@airweave/sdk/0.1.12", "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
|
*
|
|
@@ -47,7 +48,7 @@ export declare class WhiteLabels {
|
|
|
47
48
|
* @example
|
|
48
49
|
* await client.whiteLabels.createWhiteLabel({
|
|
49
50
|
* name: "name",
|
|
50
|
-
*
|
|
51
|
+
* sourceShortName: "source_short_name",
|
|
51
52
|
* redirectUrl: "redirect_url",
|
|
52
53
|
* clientId: "client_id",
|
|
53
54
|
* clientSecret: "client_secret"
|