@airweave/sdk 0.4.18 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +13 -8
- package/dist/cjs/api/resources/authProviders/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/authProviders/client/Client.js +213 -0
- package/dist/cjs/api/resources/authProviders/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/authProviders/client/index.js +17 -0
- package/dist/cjs/api/{types → resources/authProviders/client/requests}/AuthProviderConnectionCreate.d.ts +10 -2
- package/dist/cjs/api/resources/authProviders/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/authProviders/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/authProviders/index.d.ts +1 -0
- package/dist/cjs/api/resources/authProviders/index.js +17 -0
- package/dist/cjs/api/resources/collections/client/requests/SearchRequest.d.ts +1 -1
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/types/EntityCountWithDefinition.d.ts +13 -0
- package/dist/cjs/api/types/SourceConnectionCreateContinuous.d.ts +2 -0
- package/dist/cjs/api/types/SourceConnectionMakeContinuous.d.ts +14 -0
- package/dist/cjs/api/types/SourceConnectionMakeContinuous.js +5 -0
- package/dist/cjs/api/types/index.d.ts +2 -2
- package/dist/cjs/api/types/index.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/authProviders/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/authProviders/client/Client.mjs +176 -0
- package/dist/esm/api/resources/authProviders/client/index.d.mts +2 -0
- package/dist/esm/api/resources/authProviders/client/index.mjs +1 -0
- package/dist/esm/api/{types → resources/authProviders/client/requests}/AuthProviderConnectionCreate.d.mts +10 -2
- package/dist/esm/api/resources/authProviders/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/authProviders/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/authProviders/index.d.mts +1 -0
- package/dist/esm/api/resources/authProviders/index.mjs +1 -0
- package/dist/esm/api/resources/collections/client/requests/SearchRequest.d.mts +1 -1
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/types/EntityCountWithDefinition.d.mts +13 -0
- package/dist/esm/api/types/SourceConnectionCreateContinuous.d.mts +2 -0
- package/dist/esm/api/types/SourceConnectionMakeContinuous.d.mts +14 -0
- package/dist/esm/api/types/SourceConnectionMakeContinuous.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +2 -2
- package/dist/esm/api/types/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +159 -0
- package/dist/cjs/api/types/EntityDefinitionUpdate.d.ts +0 -19
- package/dist/esm/api/types/EntityDefinitionUpdate.d.mts +0 -19
- /package/dist/cjs/api/{types → resources/authProviders/client/requests}/AuthProviderConnectionCreate.js +0 -0
- /package/dist/cjs/api/types/{EntityDefinitionUpdate.js → EntityCountWithDefinition.js} +0 -0
- /package/dist/esm/api/{types → resources/authProviders/client/requests}/AuthProviderConnectionCreate.mjs +0 -0
- /package/dist/esm/api/types/{EntityDefinitionUpdate.mjs → EntityCountWithDefinition.mjs} +0 -0
package/dist/esm/Client.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as core from "./core/index.mjs";
|
|
5
5
|
import { mergeHeaders } from "./core/headers.mjs";
|
|
6
6
|
import { Sources } from "./api/resources/sources/client/Client.mjs";
|
|
7
|
+
import { AuthProviders } from "./api/resources/authProviders/client/Client.mjs";
|
|
7
8
|
import { Collections } from "./api/resources/collections/client/Client.mjs";
|
|
8
9
|
import { SourceConnections } from "./api/resources/sourceConnections/client/Client.mjs";
|
|
9
10
|
import { WhiteLabels } from "./api/resources/whiteLabels/client/Client.mjs";
|
|
@@ -12,8 +13,8 @@ export class AirweaveSDKClient {
|
|
|
12
13
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
13
14
|
"X-Fern-Language": "JavaScript",
|
|
14
15
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
15
|
-
"X-Fern-SDK-Version": "v0.
|
|
16
|
-
"User-Agent": "@airweave/sdk/v0.
|
|
16
|
+
"X-Fern-SDK-Version": "v0.5.0",
|
|
17
|
+
"User-Agent": "@airweave/sdk/v0.5.0",
|
|
17
18
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
18
19
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
19
20
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -22,6 +23,10 @@ export class AirweaveSDKClient {
|
|
|
22
23
|
var _a;
|
|
23
24
|
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Sources(this._options)));
|
|
24
25
|
}
|
|
26
|
+
get authProviders() {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = this._authProviders) !== null && _a !== void 0 ? _a : (this._authProviders = new AuthProviders(this._options)));
|
|
29
|
+
}
|
|
25
30
|
get collections() {
|
|
26
31
|
var _a;
|
|
27
32
|
return ((_a = this._collections) !== null && _a !== void 0 ? _a : (this._collections = new Collections(this._options)));
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../core/index.mjs";
|
|
6
|
+
import * as AirweaveSDK from "../../../index.mjs";
|
|
7
|
+
export declare namespace AuthProviders {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
18
|
+
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
22
|
+
abortSignal?: AbortSignal;
|
|
23
|
+
/** Additional headers to include in the request. */
|
|
24
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare class AuthProviders {
|
|
28
|
+
protected readonly _options: AuthProviders.Options;
|
|
29
|
+
constructor(_options: AuthProviders.Options);
|
|
30
|
+
/**
|
|
31
|
+
* Create or update an auth provider connection.
|
|
32
|
+
*
|
|
33
|
+
* If a connection for this auth provider already exists for the organization,
|
|
34
|
+
* it will be updated with the new credentials and fields.
|
|
35
|
+
* If no connection exists, a new one will be created.
|
|
36
|
+
*
|
|
37
|
+
* Args:
|
|
38
|
+
* -----
|
|
39
|
+
* db: The database session
|
|
40
|
+
* ctx: The current authentication context
|
|
41
|
+
* auth_provider_connection_in: The auth provider connection data
|
|
42
|
+
*
|
|
43
|
+
* Returns:
|
|
44
|
+
* --------
|
|
45
|
+
* schemas.AuthProviderConnection: The created or updated connection
|
|
46
|
+
*
|
|
47
|
+
* @param {AirweaveSDK.AuthProviderConnectionCreate} request
|
|
48
|
+
* @param {AuthProviders.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.authProviders.connectOrUpdateAuthProvider({
|
|
54
|
+
* name: "My Composio Connection",
|
|
55
|
+
* description: "My Composio Connection",
|
|
56
|
+
* short_name: "composio",
|
|
57
|
+
* auth_fields: {
|
|
58
|
+
* "api_key": "comp_1234567890abcdef"
|
|
59
|
+
* }
|
|
60
|
+
* })
|
|
61
|
+
*/
|
|
62
|
+
connectOrUpdateAuthProvider(request: AirweaveSDK.AuthProviderConnectionCreate, requestOptions?: AuthProviders.RequestOptions): core.HttpResponsePromise<AirweaveSDK.AuthProviderConnection>;
|
|
63
|
+
private __connectOrUpdateAuthProvider;
|
|
64
|
+
/**
|
|
65
|
+
* Get details of a specific auth provider.
|
|
66
|
+
*
|
|
67
|
+
* Args:
|
|
68
|
+
* -----
|
|
69
|
+
* db: The database session
|
|
70
|
+
* short_name: The short name of the auth provider
|
|
71
|
+
* ctx: The current authentication context
|
|
72
|
+
*
|
|
73
|
+
* Returns:
|
|
74
|
+
* --------
|
|
75
|
+
* schemas.AuthProvider: The auth provider details
|
|
76
|
+
*
|
|
77
|
+
* @param {string} shortName
|
|
78
|
+
* @param {AuthProviders.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.authProviders.getAuthProvider("short_name")
|
|
84
|
+
*/
|
|
85
|
+
getAuthProvider(shortName: string, requestOptions?: AuthProviders.RequestOptions): core.HttpResponsePromise<AirweaveSDK.AuthProvider>;
|
|
86
|
+
private __getAuthProvider;
|
|
87
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
88
|
+
"x-api-key": string;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../core/index.mjs";
|
|
15
|
+
import * as AirweaveSDK from "../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
+
export class AuthProviders {
|
|
19
|
+
constructor(_options) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create or update an auth provider connection.
|
|
24
|
+
*
|
|
25
|
+
* If a connection for this auth provider already exists for the organization,
|
|
26
|
+
* it will be updated with the new credentials and fields.
|
|
27
|
+
* If no connection exists, a new one will be created.
|
|
28
|
+
*
|
|
29
|
+
* Args:
|
|
30
|
+
* -----
|
|
31
|
+
* db: The database session
|
|
32
|
+
* ctx: The current authentication context
|
|
33
|
+
* auth_provider_connection_in: The auth provider connection data
|
|
34
|
+
*
|
|
35
|
+
* Returns:
|
|
36
|
+
* --------
|
|
37
|
+
* schemas.AuthProviderConnection: The created or updated connection
|
|
38
|
+
*
|
|
39
|
+
* @param {AirweaveSDK.AuthProviderConnectionCreate} request
|
|
40
|
+
* @param {AuthProviders.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.authProviders.connectOrUpdateAuthProvider({
|
|
46
|
+
* name: "My Composio Connection",
|
|
47
|
+
* description: "My Composio Connection",
|
|
48
|
+
* short_name: "composio",
|
|
49
|
+
* auth_fields: {
|
|
50
|
+
* "api_key": "comp_1234567890abcdef"
|
|
51
|
+
* }
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
connectOrUpdateAuthProvider(request, requestOptions) {
|
|
55
|
+
return core.HttpResponsePromise.fromPromise(this.__connectOrUpdateAuthProvider(request, requestOptions));
|
|
56
|
+
}
|
|
57
|
+
__connectOrUpdateAuthProvider(request, requestOptions) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
var _a, _b, _c;
|
|
60
|
+
const _response = yield core.fetcher({
|
|
61
|
+
url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, "auth-providers/connect"),
|
|
62
|
+
method: "PUT",
|
|
63
|
+
headers: mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
requestType: "json",
|
|
66
|
+
body: request,
|
|
67
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
68
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
69
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
70
|
+
});
|
|
71
|
+
if (_response.ok) {
|
|
72
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 422:
|
|
77
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
78
|
+
default:
|
|
79
|
+
throw new errors.AirweaveSDKError({
|
|
80
|
+
statusCode: _response.error.statusCode,
|
|
81
|
+
body: _response.error.body,
|
|
82
|
+
rawResponse: _response.rawResponse,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
switch (_response.error.reason) {
|
|
87
|
+
case "non-json":
|
|
88
|
+
throw new errors.AirweaveSDKError({
|
|
89
|
+
statusCode: _response.error.statusCode,
|
|
90
|
+
body: _response.error.rawBody,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
});
|
|
93
|
+
case "timeout":
|
|
94
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /auth-providers/connect.");
|
|
95
|
+
case "unknown":
|
|
96
|
+
throw new errors.AirweaveSDKError({
|
|
97
|
+
message: _response.error.errorMessage,
|
|
98
|
+
rawResponse: _response.rawResponse,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get details of a specific auth provider.
|
|
105
|
+
*
|
|
106
|
+
* Args:
|
|
107
|
+
* -----
|
|
108
|
+
* db: The database session
|
|
109
|
+
* short_name: The short name of the auth provider
|
|
110
|
+
* ctx: The current authentication context
|
|
111
|
+
*
|
|
112
|
+
* Returns:
|
|
113
|
+
* --------
|
|
114
|
+
* schemas.AuthProvider: The auth provider details
|
|
115
|
+
*
|
|
116
|
+
* @param {string} shortName
|
|
117
|
+
* @param {AuthProviders.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.authProviders.getAuthProvider("short_name")
|
|
123
|
+
*/
|
|
124
|
+
getAuthProvider(shortName, requestOptions) {
|
|
125
|
+
return core.HttpResponsePromise.fromPromise(this.__getAuthProvider(shortName, requestOptions));
|
|
126
|
+
}
|
|
127
|
+
__getAuthProvider(shortName, requestOptions) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
var _a, _b, _c;
|
|
130
|
+
const _response = yield core.fetcher({
|
|
131
|
+
url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `auth-providers/detail/${encodeURIComponent(shortName)}`),
|
|
132
|
+
method: "GET",
|
|
133
|
+
headers: mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
134
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
135
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
136
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
137
|
+
});
|
|
138
|
+
if (_response.ok) {
|
|
139
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
140
|
+
}
|
|
141
|
+
if (_response.error.reason === "status-code") {
|
|
142
|
+
switch (_response.error.statusCode) {
|
|
143
|
+
case 422:
|
|
144
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
145
|
+
default:
|
|
146
|
+
throw new errors.AirweaveSDKError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.body,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
switch (_response.error.reason) {
|
|
154
|
+
case "non-json":
|
|
155
|
+
throw new errors.AirweaveSDKError({
|
|
156
|
+
statusCode: _response.error.statusCode,
|
|
157
|
+
body: _response.error.rawBody,
|
|
158
|
+
rawResponse: _response.rawResponse,
|
|
159
|
+
});
|
|
160
|
+
case "timeout":
|
|
161
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /auth-providers/detail/{short_name}.");
|
|
162
|
+
case "unknown":
|
|
163
|
+
throw new errors.AirweaveSDKError({
|
|
164
|
+
message: _response.error.errorMessage,
|
|
165
|
+
rawResponse: _response.rawResponse,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
_getCustomAuthorizationHeaders() {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
173
|
+
return { "x-api-key": apiKeyValue };
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as AirweaveSDK from "
|
|
4
|
+
import * as AirweaveSDK from "../../../../index.mjs";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* name: "My Composio Connection",
|
|
9
|
+
* description: "My Composio Connection",
|
|
10
|
+
* short_name: "composio",
|
|
11
|
+
* auth_fields: {
|
|
12
|
+
* "api_key": "comp_1234567890abcdef"
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
7
15
|
*/
|
|
8
16
|
export interface AuthProviderConnectionCreate {
|
|
9
17
|
/** Human-readable name for this auth provider connection */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AuthProviderConnectionCreate } from "./AuthProviderConnectionCreate.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -23,7 +23,7 @@ export interface SearchRequest {
|
|
|
23
23
|
filter?: AirweaveSDK.Filter;
|
|
24
24
|
/** Number of results to skip (DEFAULT: 0) */
|
|
25
25
|
offset?: number;
|
|
26
|
-
/** Maximum number of results to return (DEFAULT:
|
|
26
|
+
/** Maximum number of results to return (DEFAULT: 100) */
|
|
27
27
|
limit?: number;
|
|
28
28
|
/** Minimum similarity score threshold (DEFAULT: None - no filtering) */
|
|
29
29
|
score_threshold?: number;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * as sources from "./sources/index.mjs";
|
|
2
|
+
export * as authProviders from "./authProviders/index.mjs";
|
|
2
3
|
export * as collections from "./collections/index.mjs";
|
|
3
4
|
export * as sourceConnections from "./sourceConnections/index.mjs";
|
|
4
5
|
export * as whiteLabels from "./whiteLabels/index.mjs";
|
|
6
|
+
export * from "./authProviders/client/requests/index.mjs";
|
|
5
7
|
export * from "./collections/client/requests/index.mjs";
|
|
6
8
|
export * from "./sourceConnections/client/requests/index.mjs";
|
|
7
9
|
export * from "./whiteLabels/client/requests/index.mjs";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * as sources from "./sources/index.mjs";
|
|
2
|
+
export * as authProviders from "./authProviders/index.mjs";
|
|
2
3
|
export * as collections from "./collections/index.mjs";
|
|
3
4
|
export * as sourceConnections from "./sourceConnections/index.mjs";
|
|
4
5
|
export * as whiteLabels from "./whiteLabels/index.mjs";
|
|
6
|
+
export * from "./authProviders/client/requests/index.mjs";
|
|
5
7
|
export * from "./collections/client/requests/index.mjs";
|
|
6
8
|
export * from "./sourceConnections/client/requests/index.mjs";
|
|
7
9
|
export * from "./whiteLabels/client/requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Entity count with entity definition details.
|
|
6
|
+
*/
|
|
7
|
+
export interface EntityCountWithDefinition {
|
|
8
|
+
count: number;
|
|
9
|
+
entity_definition_id: string;
|
|
10
|
+
entity_definition_name: string;
|
|
11
|
+
entity_definition_type: string;
|
|
12
|
+
entity_definition_description?: string;
|
|
13
|
+
}
|
|
@@ -20,6 +20,8 @@ export interface SourceConnectionCreateContinuous {
|
|
|
20
20
|
short_name: string;
|
|
21
21
|
/** Readable ID of the collection where synced data will be stored. If not provided, a new collection will be automatically created. */
|
|
22
22
|
collection?: string;
|
|
23
|
+
/** Whether to create a daily forced full sync with entity cleanup. Defaults to true for resilience; set to false to rely solely on incremental changes. */
|
|
24
|
+
enable_daily_cleanup?: boolean;
|
|
23
25
|
/** Authentication credentials required to access the data source. The required fields vary by source type. Check the documentation of a specific source (for example [Github](https://docs.airweave.ai/docs/connectors/github)) to see what is required. */
|
|
24
26
|
auth_fields?: AirweaveSDK.ConfigValues;
|
|
25
27
|
/** Unique readable ID of a connected auth provider to use for authentication instead of providing auth_fields directly. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Schema for converting an existing source connection to continuous (BETA).
|
|
6
|
+
*/
|
|
7
|
+
export interface SourceConnectionMakeContinuous {
|
|
8
|
+
/** Specify which field in the entity should be used as the cursor for incremental syncs. If omitted, the source's default cursor field will be used if available. Required for sources without a default (e.g., PostgreSQL). */
|
|
9
|
+
cursor_field?: string;
|
|
10
|
+
/** Whether to create a daily forced full sync with entity cleanup. This helps remove orphaned entities that incremental syncs cannot detect. */
|
|
11
|
+
enable_daily_cleanup?: boolean;
|
|
12
|
+
/** Whether to immediately trigger a sync job after enabling continuous mode. If no cursor data exists yet, this initial run will perform a full sync. */
|
|
13
|
+
run_initial_sync?: boolean;
|
|
14
|
+
}
|
|
@@ -3,7 +3,6 @@ export * from "./ApiKeyCreate.mjs";
|
|
|
3
3
|
export * from "./ActionCheckResponse.mjs";
|
|
4
4
|
export * from "./AuthProvider.mjs";
|
|
5
5
|
export * from "./AuthProviderConnection.mjs";
|
|
6
|
-
export * from "./AuthProviderConnectionCreate.mjs";
|
|
7
6
|
export * from "./AuthProviderConnectionUpdate.mjs";
|
|
8
7
|
export * from "./AuthType.mjs";
|
|
9
8
|
export * from "./BillingPeriodUsage.mjs";
|
|
@@ -30,9 +29,9 @@ export * from "./DestinationWithAuthenticationFields.mjs";
|
|
|
30
29
|
export * from "./EmbeddingModel.mjs";
|
|
31
30
|
export * from "./EmbeddingModelWithAuthenticationFields.mjs";
|
|
32
31
|
export * from "./EntityCount.mjs";
|
|
32
|
+
export * from "./EntityCountWithDefinition.mjs";
|
|
33
33
|
export * from "./EntityDefinition.mjs";
|
|
34
34
|
export * from "./EntityDefinitionCreate.mjs";
|
|
35
|
-
export * from "./EntityDefinitionUpdate.mjs";
|
|
36
35
|
export * from "./EntityType.mjs";
|
|
37
36
|
export * from "./Range.mjs";
|
|
38
37
|
export * from "./FieldCondition.mjs";
|
|
@@ -82,6 +81,7 @@ export * from "./SourceConnectionCreateWithCredential.mjs";
|
|
|
82
81
|
export * from "./SourceConnectionCreateWithWhiteLabel.mjs";
|
|
83
82
|
export * from "./SourceConnectionJob.mjs";
|
|
84
83
|
export * from "./SourceConnectionListItem.mjs";
|
|
84
|
+
export * from "./SourceConnectionMakeContinuous.mjs";
|
|
85
85
|
export * from "./SourceConnectionStatus.mjs";
|
|
86
86
|
export * from "./SubscriptionInfo.mjs";
|
|
87
87
|
export * from "./Sync.mjs";
|
|
@@ -3,7 +3,6 @@ export * from "./ApiKeyCreate.mjs";
|
|
|
3
3
|
export * from "./ActionCheckResponse.mjs";
|
|
4
4
|
export * from "./AuthProvider.mjs";
|
|
5
5
|
export * from "./AuthProviderConnection.mjs";
|
|
6
|
-
export * from "./AuthProviderConnectionCreate.mjs";
|
|
7
6
|
export * from "./AuthProviderConnectionUpdate.mjs";
|
|
8
7
|
export * from "./AuthType.mjs";
|
|
9
8
|
export * from "./BillingPeriodUsage.mjs";
|
|
@@ -30,9 +29,9 @@ export * from "./DestinationWithAuthenticationFields.mjs";
|
|
|
30
29
|
export * from "./EmbeddingModel.mjs";
|
|
31
30
|
export * from "./EmbeddingModelWithAuthenticationFields.mjs";
|
|
32
31
|
export * from "./EntityCount.mjs";
|
|
32
|
+
export * from "./EntityCountWithDefinition.mjs";
|
|
33
33
|
export * from "./EntityDefinition.mjs";
|
|
34
34
|
export * from "./EntityDefinitionCreate.mjs";
|
|
35
|
-
export * from "./EntityDefinitionUpdate.mjs";
|
|
36
35
|
export * from "./EntityType.mjs";
|
|
37
36
|
export * from "./Range.mjs";
|
|
38
37
|
export * from "./FieldCondition.mjs";
|
|
@@ -82,6 +81,7 @@ export * from "./SourceConnectionCreateWithCredential.mjs";
|
|
|
82
81
|
export * from "./SourceConnectionCreateWithWhiteLabel.mjs";
|
|
83
82
|
export * from "./SourceConnectionJob.mjs";
|
|
84
83
|
export * from "./SourceConnectionListItem.mjs";
|
|
84
|
+
export * from "./SourceConnectionMakeContinuous.mjs";
|
|
85
85
|
export * from "./SourceConnectionStatus.mjs";
|
|
86
86
|
export * from "./SubscriptionInfo.mjs";
|
|
87
87
|
export * from "./Sync.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v0.
|
|
1
|
+
export declare const SDK_VERSION = "v0.5.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "v0.
|
|
1
|
+
export const SDK_VERSION = "v0.5.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -123,6 +123,165 @@ await client.sources.list();
|
|
|
123
123
|
</dl>
|
|
124
124
|
</details>
|
|
125
125
|
|
|
126
|
+
## AuthProviders
|
|
127
|
+
|
|
128
|
+
<details><summary><code>client.authProviders.<a href="/src/api/resources/authProviders/client/Client.ts">connectOrUpdateAuthProvider</a>({ ...params }) -> AirweaveSDK.AuthProviderConnection</code></summary>
|
|
129
|
+
<dl>
|
|
130
|
+
<dd>
|
|
131
|
+
|
|
132
|
+
#### 📝 Description
|
|
133
|
+
|
|
134
|
+
<dl>
|
|
135
|
+
<dd>
|
|
136
|
+
|
|
137
|
+
<dl>
|
|
138
|
+
<dd>
|
|
139
|
+
|
|
140
|
+
Create or update an auth provider connection.
|
|
141
|
+
|
|
142
|
+
If a connection for this auth provider already exists for the organization,
|
|
143
|
+
it will be updated with the new credentials and fields.
|
|
144
|
+
If no connection exists, a new one will be created.
|
|
145
|
+
|
|
146
|
+
## Args:
|
|
147
|
+
|
|
148
|
+
db: The database session
|
|
149
|
+
ctx: The current authentication context
|
|
150
|
+
auth_provider_connection_in: The auth provider connection data
|
|
151
|
+
|
|
152
|
+
## Returns:
|
|
153
|
+
|
|
154
|
+
schemas.AuthProviderConnection: The created or updated connection
|
|
155
|
+
|
|
156
|
+
</dd>
|
|
157
|
+
</dl>
|
|
158
|
+
</dd>
|
|
159
|
+
</dl>
|
|
160
|
+
|
|
161
|
+
#### 🔌 Usage
|
|
162
|
+
|
|
163
|
+
<dl>
|
|
164
|
+
<dd>
|
|
165
|
+
|
|
166
|
+
<dl>
|
|
167
|
+
<dd>
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
await client.authProviders.connectOrUpdateAuthProvider({
|
|
171
|
+
name: "My Composio Connection",
|
|
172
|
+
description: "My Composio Connection",
|
|
173
|
+
short_name: "composio",
|
|
174
|
+
auth_fields: {
|
|
175
|
+
api_key: "comp_1234567890abcdef",
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
</dd>
|
|
181
|
+
</dl>
|
|
182
|
+
</dd>
|
|
183
|
+
</dl>
|
|
184
|
+
|
|
185
|
+
#### ⚙️ Parameters
|
|
186
|
+
|
|
187
|
+
<dl>
|
|
188
|
+
<dd>
|
|
189
|
+
|
|
190
|
+
<dl>
|
|
191
|
+
<dd>
|
|
192
|
+
|
|
193
|
+
**request:** `AirweaveSDK.AuthProviderConnectionCreate`
|
|
194
|
+
|
|
195
|
+
</dd>
|
|
196
|
+
</dl>
|
|
197
|
+
|
|
198
|
+
<dl>
|
|
199
|
+
<dd>
|
|
200
|
+
|
|
201
|
+
**requestOptions:** `AuthProviders.RequestOptions`
|
|
202
|
+
|
|
203
|
+
</dd>
|
|
204
|
+
</dl>
|
|
205
|
+
</dd>
|
|
206
|
+
</dl>
|
|
207
|
+
|
|
208
|
+
</dd>
|
|
209
|
+
</dl>
|
|
210
|
+
</details>
|
|
211
|
+
|
|
212
|
+
<details><summary><code>client.authProviders.<a href="/src/api/resources/authProviders/client/Client.ts">getAuthProvider</a>(shortName) -> AirweaveSDK.AuthProvider</code></summary>
|
|
213
|
+
<dl>
|
|
214
|
+
<dd>
|
|
215
|
+
|
|
216
|
+
#### 📝 Description
|
|
217
|
+
|
|
218
|
+
<dl>
|
|
219
|
+
<dd>
|
|
220
|
+
|
|
221
|
+
<dl>
|
|
222
|
+
<dd>
|
|
223
|
+
|
|
224
|
+
Get details of a specific auth provider.
|
|
225
|
+
|
|
226
|
+
## Args:
|
|
227
|
+
|
|
228
|
+
db: The database session
|
|
229
|
+
short_name: The short name of the auth provider
|
|
230
|
+
ctx: The current authentication context
|
|
231
|
+
|
|
232
|
+
## Returns:
|
|
233
|
+
|
|
234
|
+
schemas.AuthProvider: The auth provider details
|
|
235
|
+
|
|
236
|
+
</dd>
|
|
237
|
+
</dl>
|
|
238
|
+
</dd>
|
|
239
|
+
</dl>
|
|
240
|
+
|
|
241
|
+
#### 🔌 Usage
|
|
242
|
+
|
|
243
|
+
<dl>
|
|
244
|
+
<dd>
|
|
245
|
+
|
|
246
|
+
<dl>
|
|
247
|
+
<dd>
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
await client.authProviders.getAuthProvider("short_name");
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
</dd>
|
|
254
|
+
</dl>
|
|
255
|
+
</dd>
|
|
256
|
+
</dl>
|
|
257
|
+
|
|
258
|
+
#### ⚙️ Parameters
|
|
259
|
+
|
|
260
|
+
<dl>
|
|
261
|
+
<dd>
|
|
262
|
+
|
|
263
|
+
<dl>
|
|
264
|
+
<dd>
|
|
265
|
+
|
|
266
|
+
**shortName:** `string`
|
|
267
|
+
|
|
268
|
+
</dd>
|
|
269
|
+
</dl>
|
|
270
|
+
|
|
271
|
+
<dl>
|
|
272
|
+
<dd>
|
|
273
|
+
|
|
274
|
+
**requestOptions:** `AuthProviders.RequestOptions`
|
|
275
|
+
|
|
276
|
+
</dd>
|
|
277
|
+
</dl>
|
|
278
|
+
</dd>
|
|
279
|
+
</dl>
|
|
280
|
+
|
|
281
|
+
</dd>
|
|
282
|
+
</dl>
|
|
283
|
+
</details>
|
|
284
|
+
|
|
126
285
|
## collections
|
|
127
286
|
|
|
128
287
|
<details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">list</a>({ ...params }) -> AirweaveSDK.Collection[]</code></summary>
|