@airweave/sdk 0.6.0 → 0.6.3
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/dist/cjs/Client.d.ts +0 -3
- package/dist/cjs/Client.js +2 -7
- package/dist/cjs/api/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/index.js +1 -3
- package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +31 -82
- package/dist/cjs/api/resources/sourceConnections/client/Client.js +45 -190
- package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +1 -7
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +21 -20
- package/dist/cjs/api/resources/sourceConnections/client/requests/index.d.ts +1 -3
- package/dist/cjs/api/types/ActionCheckRequest.d.ts +10 -0
- package/dist/cjs/api/types/ActionCheckResponse.d.ts +4 -16
- package/dist/cjs/api/types/ActionCheckResponse.js +0 -8
- package/dist/cjs/api/types/AuthProvider.d.ts +0 -2
- package/dist/cjs/api/types/AuthProviderAuthentication.d.ts +12 -0
- package/dist/cjs/api/types/AuthenticationDetails.d.ts +19 -0
- package/dist/cjs/api/types/AuthenticationMethod.d.ts +14 -0
- package/dist/cjs/api/types/AuthenticationMethod.js +13 -0
- package/dist/cjs/api/types/Destination.d.ts +0 -2
- package/dist/cjs/api/types/DestinationWithAuthenticationFields.d.ts +0 -1
- package/dist/cjs/api/types/DirectAuthentication.d.ts +10 -0
- package/dist/cjs/api/types/EmbeddingModel.d.ts +0 -2
- package/dist/cjs/api/types/EmbeddingModelWithAuthenticationFields.d.ts +0 -1
- package/dist/cjs/api/types/EntityCountWithDefinition.d.ts +1 -0
- package/dist/cjs/api/types/EntitySummary.d.ts +12 -0
- package/dist/cjs/api/types/EntityTypeStats.d.ts +10 -0
- package/dist/cjs/api/types/IntegrationCredentialInDb.d.ts +2 -1
- package/dist/cjs/api/types/IntegrationCredentialRawCreate.d.ts +2 -1
- package/dist/cjs/api/types/OAuthBrowserAuthentication.d.ts +14 -0
- package/dist/cjs/api/types/OAuthTokenAuthentication.d.ts +14 -0
- package/dist/cjs/api/types/OAuthType.d.ts +12 -0
- package/dist/cjs/api/types/OAuthType.js +11 -0
- package/dist/cjs/api/types/ScheduleConfig.d.ts +14 -0
- package/dist/cjs/api/types/ScheduleDetails.d.ts +13 -0
- package/dist/cjs/api/types/SingleActionCheckResponse.d.ts +23 -0
- package/dist/cjs/api/types/SingleActionCheckResponse.js +13 -0
- package/dist/cjs/api/types/Source.d.ts +11 -7
- package/dist/cjs/api/types/SourceConnection.d.ts +9 -52
- package/dist/cjs/api/types/SourceConnectionJob.d.ts +9 -34
- package/dist/cjs/api/types/SourceConnectionListItem.d.ts +13 -16
- package/dist/cjs/api/types/SourceConnectionStatus.d.ts +7 -4
- package/dist/cjs/api/types/SourceConnectionStatus.js +5 -2
- package/dist/cjs/api/types/SourceConnectionUpdate.d.ts +16 -0
- package/dist/cjs/api/types/SyncDetails.d.ts +13 -0
- package/dist/cjs/api/types/SyncJobDetails.d.ts +20 -0
- package/dist/cjs/api/types/SyncJobStatus.d.ts +2 -2
- package/dist/cjs/api/types/SyncJobStatus.js +1 -1
- package/dist/cjs/api/types/SyncSummary.d.ts +11 -0
- package/dist/cjs/api/types/SyncSummary.js +5 -0
- package/dist/cjs/api/types/index.d.ts +17 -9
- package/dist/cjs/api/types/index.js +17 -9
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +0 -3
- package/dist/esm/Client.mjs +2 -7
- package/dist/esm/api/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/index.mjs +0 -2
- package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +31 -82
- package/dist/esm/api/resources/sourceConnections/client/Client.mjs +45 -190
- package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +1 -7
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +21 -20
- package/dist/esm/api/resources/sourceConnections/client/requests/index.d.mts +1 -3
- package/dist/esm/api/types/ActionCheckRequest.d.mts +10 -0
- package/dist/esm/api/types/ActionCheckResponse.d.mts +4 -16
- package/dist/esm/api/types/ActionCheckResponse.mjs +1 -7
- package/dist/esm/api/types/AuthProvider.d.mts +0 -2
- package/dist/esm/api/types/AuthProviderAuthentication.d.mts +12 -0
- package/dist/esm/api/types/AuthenticationDetails.d.mts +19 -0
- package/dist/esm/api/types/AuthenticationMethod.d.mts +14 -0
- package/dist/esm/api/types/AuthenticationMethod.mjs +10 -0
- package/dist/esm/api/types/Destination.d.mts +0 -2
- package/dist/esm/api/types/DestinationWithAuthenticationFields.d.mts +0 -1
- package/dist/esm/api/types/DirectAuthentication.d.mts +10 -0
- package/dist/esm/api/types/EmbeddingModel.d.mts +0 -2
- package/dist/esm/api/types/EmbeddingModelWithAuthenticationFields.d.mts +0 -1
- package/dist/esm/api/types/EntityCountWithDefinition.d.mts +1 -0
- package/dist/esm/api/types/EntitySummary.d.mts +12 -0
- package/dist/esm/api/types/EntityTypeStats.d.mts +10 -0
- package/dist/esm/api/types/IntegrationCredentialInDb.d.mts +2 -1
- package/dist/esm/api/types/IntegrationCredentialRawCreate.d.mts +2 -1
- package/dist/esm/api/types/OAuthBrowserAuthentication.d.mts +14 -0
- package/dist/esm/api/types/OAuthTokenAuthentication.d.mts +14 -0
- package/dist/esm/api/types/OAuthType.d.mts +12 -0
- package/dist/esm/api/types/OAuthType.mjs +8 -0
- package/dist/esm/api/types/ScheduleConfig.d.mts +14 -0
- package/dist/esm/api/types/ScheduleDetails.d.mts +13 -0
- package/dist/esm/api/types/SingleActionCheckResponse.d.mts +23 -0
- package/dist/esm/api/types/SingleActionCheckResponse.mjs +10 -0
- package/dist/esm/api/types/Source.d.mts +11 -7
- package/dist/esm/api/types/SourceConnection.d.mts +9 -52
- package/dist/esm/api/types/SourceConnectionJob.d.mts +9 -34
- package/dist/esm/api/types/SourceConnectionListItem.d.mts +13 -16
- package/dist/esm/api/types/SourceConnectionStatus.d.mts +7 -4
- package/dist/esm/api/types/SourceConnectionStatus.mjs +5 -2
- package/dist/esm/api/types/SourceConnectionUpdate.d.mts +16 -0
- package/dist/esm/api/types/SyncDetails.d.mts +13 -0
- package/dist/esm/api/types/SyncJobDetails.d.mts +20 -0
- package/dist/esm/api/types/SyncJobStatus.d.mts +2 -2
- package/dist/esm/api/types/SyncJobStatus.mjs +1 -1
- package/dist/esm/api/types/SyncSummary.d.mts +11 -0
- package/dist/esm/api/types/SyncSummary.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +17 -9
- package/dist/esm/api/types/index.mjs +17 -9
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +30 -763
- package/dist/cjs/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.ts +0 -11
- package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.ts +0 -13
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +0 -34
- package/dist/cjs/api/resources/whiteLabels/client/Client.d.ts +0 -189
- package/dist/cjs/api/resources/whiteLabels/client/Client.js +0 -585
- package/dist/cjs/api/resources/whiteLabels/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/whiteLabels/client/index.js +0 -17
- package/dist/cjs/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +0 -16
- package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -28
- package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -23
- package/dist/cjs/api/resources/whiteLabels/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/whiteLabels/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/whiteLabels/index.d.ts +0 -1
- package/dist/cjs/api/resources/whiteLabels/index.js +0 -17
- package/dist/cjs/api/types/AuthType.d.ts +0 -27
- package/dist/cjs/api/types/AuthType.js +0 -16
- package/dist/cjs/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +0 -13
- package/dist/cjs/api/types/OAuth2AuthUrl.d.ts +0 -13
- package/dist/cjs/api/types/SourceConnectionContinuousResponse.d.ts +0 -67
- package/dist/cjs/api/types/SourceConnectionCreateContinuous.d.ts +0 -33
- package/dist/cjs/api/types/SourceConnectionCreateWithCredential.d.ts +0 -25
- package/dist/cjs/api/types/SourceConnectionCreateWithWhiteLabel.d.ts +0 -29
- package/dist/cjs/api/types/SourceConnectionMakeContinuous.d.ts +0 -14
- package/dist/cjs/api/types/WhiteLabel.d.ts +0 -32
- package/dist/esm/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.mts +0 -11
- package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.mts +0 -13
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +0 -34
- package/dist/esm/api/resources/whiteLabels/client/Client.d.mts +0 -189
- package/dist/esm/api/resources/whiteLabels/client/Client.mjs +0 -548
- package/dist/esm/api/resources/whiteLabels/client/index.d.mts +0 -2
- package/dist/esm/api/resources/whiteLabels/client/index.mjs +0 -1
- package/dist/esm/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.mts +0 -16
- package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.mts +0 -28
- package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.mts +0 -23
- package/dist/esm/api/resources/whiteLabels/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/whiteLabels/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/whiteLabels/index.d.mts +0 -1
- package/dist/esm/api/resources/whiteLabels/index.mjs +0 -1
- package/dist/esm/api/types/AuthType.d.mts +0 -27
- package/dist/esm/api/types/AuthType.mjs +0 -13
- package/dist/esm/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.mts +0 -13
- package/dist/esm/api/types/OAuth2AuthUrl.d.mts +0 -13
- package/dist/esm/api/types/SourceConnectionContinuousResponse.d.mts +0 -67
- package/dist/esm/api/types/SourceConnectionCreateContinuous.d.mts +0 -33
- package/dist/esm/api/types/SourceConnectionCreateWithCredential.d.mts +0 -25
- package/dist/esm/api/types/SourceConnectionCreateWithWhiteLabel.d.mts +0 -29
- package/dist/esm/api/types/SourceConnectionMakeContinuous.d.mts +0 -14
- package/dist/esm/api/types/WhiteLabel.d.mts +0 -32
- /package/dist/cjs/api/resources/sourceConnections/client/requests/{BodyRunSourceConnectionsSourceConnectionIdRunPost.js → GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js} +0 -0
- /package/dist/cjs/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.js → types/ActionCheckRequest.js} +0 -0
- /package/dist/cjs/api/{resources/sourceConnections/client/requests/SourceConnectionUpdate.js → types/AuthProviderAuthentication.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js → types/AuthenticationDetails.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.js → types/DirectAuthentication.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.js → types/EntitySummary.js} +0 -0
- /package/dist/cjs/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js → EntityTypeStats.js} +0 -0
- /package/dist/cjs/api/types/{OAuth2AuthUrl.js → OAuthBrowserAuthentication.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionContinuousResponse.js → OAuthTokenAuthentication.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateContinuous.js → ScheduleConfig.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateWithCredential.js → ScheduleDetails.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateWithWhiteLabel.js → SourceConnectionUpdate.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionMakeContinuous.js → SyncDetails.js} +0 -0
- /package/dist/cjs/api/types/{WhiteLabel.js → SyncJobDetails.js} +0 -0
- /package/dist/esm/api/resources/sourceConnections/client/requests/{BodyRunSourceConnectionsSourceConnectionIdRunPost.mjs → GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.mjs → types/ActionCheckRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/sourceConnections/client/requests/SourceConnectionUpdate.mjs → types/AuthProviderAuthentication.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs → types/AuthenticationDetails.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.mjs → types/DirectAuthentication.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.mjs → types/EntitySummary.mjs} +0 -0
- /package/dist/esm/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.mjs → EntityTypeStats.mjs} +0 -0
- /package/dist/esm/api/types/{OAuth2AuthUrl.mjs → OAuthBrowserAuthentication.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionContinuousResponse.mjs → OAuthTokenAuthentication.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateContinuous.mjs → ScheduleConfig.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateWithCredential.mjs → ScheduleDetails.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateWithWhiteLabel.mjs → SourceConnectionUpdate.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionMakeContinuous.mjs → SyncDetails.mjs} +0 -0
- /package/dist/esm/api/types/{WhiteLabel.mjs → SyncJobDetails.mjs} +0 -0
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { Sources } from "./api/resources/sources/client/Client.js";
|
|
|
7
7
|
import { AuthProviders } from "./api/resources/authProviders/client/Client.js";
|
|
8
8
|
import { Collections } from "./api/resources/collections/client/Client.js";
|
|
9
9
|
import { SourceConnections } from "./api/resources/sourceConnections/client/Client.js";
|
|
10
|
-
import { WhiteLabels } from "./api/resources/whiteLabels/client/Client.js";
|
|
11
10
|
export declare namespace AirweaveSDKClient {
|
|
12
11
|
interface Options {
|
|
13
12
|
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
@@ -34,11 +33,9 @@ export declare class AirweaveSDKClient {
|
|
|
34
33
|
protected _authProviders: AuthProviders | undefined;
|
|
35
34
|
protected _collections: Collections | undefined;
|
|
36
35
|
protected _sourceConnections: SourceConnections | undefined;
|
|
37
|
-
protected _whiteLabels: WhiteLabels | undefined;
|
|
38
36
|
constructor(_options: AirweaveSDKClient.Options);
|
|
39
37
|
get sources(): Sources;
|
|
40
38
|
get authProviders(): AuthProviders;
|
|
41
39
|
get collections(): Collections;
|
|
42
40
|
get sourceConnections(): SourceConnections;
|
|
43
|
-
get whiteLabels(): WhiteLabels;
|
|
44
41
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -43,14 +43,13 @@ const Client_js_1 = require("./api/resources/sources/client/Client.js");
|
|
|
43
43
|
const Client_js_2 = require("./api/resources/authProviders/client/Client.js");
|
|
44
44
|
const Client_js_3 = require("./api/resources/collections/client/Client.js");
|
|
45
45
|
const Client_js_4 = require("./api/resources/sourceConnections/client/Client.js");
|
|
46
|
-
const Client_js_5 = require("./api/resources/whiteLabels/client/Client.js");
|
|
47
46
|
class AirweaveSDKClient {
|
|
48
47
|
constructor(_options) {
|
|
49
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
50
49
|
"X-Fern-Language": "JavaScript",
|
|
51
50
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
52
|
-
"X-Fern-SDK-Version": "v0.6.
|
|
53
|
-
"User-Agent": "@airweave/sdk/v0.6.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.6.3",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.6.3",
|
|
54
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
55
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
56
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -71,9 +70,5 @@ class AirweaveSDKClient {
|
|
|
71
70
|
var _a;
|
|
72
71
|
return ((_a = this._sourceConnections) !== null && _a !== void 0 ? _a : (this._sourceConnections = new Client_js_4.SourceConnections(this._options)));
|
|
73
72
|
}
|
|
74
|
-
get whiteLabels() {
|
|
75
|
-
var _a;
|
|
76
|
-
return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new Client_js_5.WhiteLabels(this._options)));
|
|
77
|
-
}
|
|
78
73
|
}
|
|
79
74
|
exports.AirweaveSDKClient = AirweaveSDKClient;
|
|
@@ -2,8 +2,6 @@ export * as sources from "./sources/index.js";
|
|
|
2
2
|
export * as authProviders from "./authProviders/index.js";
|
|
3
3
|
export * as collections from "./collections/index.js";
|
|
4
4
|
export * as sourceConnections from "./sourceConnections/index.js";
|
|
5
|
-
export * as whiteLabels from "./whiteLabels/index.js";
|
|
6
5
|
export * from "./authProviders/client/requests/index.js";
|
|
7
6
|
export * from "./collections/client/requests/index.js";
|
|
8
7
|
export * from "./sourceConnections/client/requests/index.js";
|
|
9
|
-
export * from "./whiteLabels/client/requests/index.js";
|
|
@@ -36,13 +36,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.sourceConnections = exports.collections = exports.authProviders = exports.sources = void 0;
|
|
40
40
|
exports.sources = __importStar(require("./sources/index.js"));
|
|
41
41
|
exports.authProviders = __importStar(require("./authProviders/index.js"));
|
|
42
42
|
exports.collections = __importStar(require("./collections/index.js"));
|
|
43
43
|
exports.sourceConnections = __importStar(require("./sourceConnections/index.js"));
|
|
44
|
-
exports.whiteLabels = __importStar(require("./whiteLabels/index.js"));
|
|
45
44
|
__exportStar(require("./authProviders/client/requests/index.js"), exports);
|
|
46
45
|
__exportStar(require("./collections/client/requests/index.js"), exports);
|
|
47
46
|
__exportStar(require("./sourceConnections/client/requests/index.js"), exports);
|
|
48
|
-
__exportStar(require("./whiteLabels/client/requests/index.js"), exports);
|
|
@@ -31,12 +31,7 @@ export declare class SourceConnections {
|
|
|
31
31
|
protected readonly _options: SourceConnections.Options;
|
|
32
32
|
constructor(_options: SourceConnections.Options);
|
|
33
33
|
/**
|
|
34
|
-
* List source connections
|
|
35
|
-
*
|
|
36
|
-
* By default, returns ALL source connections from every collection in your
|
|
37
|
-
* organization. Use the 'collection' parameter to filter results to a specific
|
|
38
|
-
* collection. This is useful for getting an overview of all your data sources
|
|
39
|
-
* or managing connections within a particular collection.
|
|
34
|
+
* List source connections with minimal fields for performance.
|
|
40
35
|
*
|
|
41
36
|
* @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
|
|
42
37
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -49,20 +44,16 @@ export declare class SourceConnections {
|
|
|
49
44
|
list(request?: AirweaveSDK.ListSourceConnectionsGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionListItem[]>;
|
|
50
45
|
private __list;
|
|
51
46
|
/**
|
|
52
|
-
* Create a new source connection
|
|
53
|
-
*
|
|
54
|
-
* **This endpoint only works for sources that do not use OAuth2.0.**
|
|
55
|
-
* Sources that do use OAuth2.0 like Google Drive, Slack, or HubSpot must be
|
|
56
|
-
* connected through the UI where you can complete the OAuth consent flow
|
|
57
|
-
* or using Auth Providers (see [Auth Providers](/docs/auth-providers)).<br/><br/>
|
|
47
|
+
* Create a new source connection.
|
|
58
48
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
49
|
+
* The authentication configuration determines the flow:
|
|
50
|
+
* - DirectAuthentication: Immediate creation with provided credentials
|
|
51
|
+
* - OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
52
|
+
* - OAuthTokenAuthentication: Immediate creation with provided token
|
|
53
|
+
* - AuthProviderAuthentication: Using external auth provider
|
|
62
54
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* of authentication is used.
|
|
55
|
+
* BYOC (Bring Your Own Client) is detected when client_id and client_secret
|
|
56
|
+
* are provided in OAuthBrowserAuthentication.
|
|
66
57
|
*
|
|
67
58
|
* @param {AirweaveSDK.SourceConnectionCreate} request
|
|
68
59
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -71,17 +62,16 @@ export declare class SourceConnections {
|
|
|
71
62
|
*
|
|
72
63
|
* @example
|
|
73
64
|
* await client.sourceConnections.create({
|
|
74
|
-
*
|
|
75
|
-
*
|
|
65
|
+
* short_name: "short_name",
|
|
66
|
+
* readable_collection_id: "readable_collection_id"
|
|
76
67
|
* })
|
|
77
68
|
*/
|
|
78
69
|
create(request: AirweaveSDK.SourceConnectionCreate, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
79
70
|
private __create;
|
|
80
71
|
/**
|
|
81
|
-
*
|
|
72
|
+
* Get a source connection with optional depth expansion.
|
|
82
73
|
*
|
|
83
|
-
* @param {string} sourceConnectionId
|
|
84
|
-
* @param {AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest} request
|
|
74
|
+
* @param {string} sourceConnectionId
|
|
85
75
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
76
|
*
|
|
87
77
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -89,33 +79,12 @@ export declare class SourceConnections {
|
|
|
89
79
|
* @example
|
|
90
80
|
* await client.sourceConnections.get("source_connection_id")
|
|
91
81
|
*/
|
|
92
|
-
get(sourceConnectionId: string,
|
|
82
|
+
get(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
93
83
|
private __get;
|
|
94
84
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* Modify the configuration of an existing source connection including its name,
|
|
98
|
-
* authentication credentials, configuration fields, sync schedule, or source-specific settings.
|
|
85
|
+
* Delete a source connection and all related data.
|
|
99
86
|
*
|
|
100
|
-
* @param {string} sourceConnectionId
|
|
101
|
-
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
102
|
-
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
103
|
-
*
|
|
104
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* await client.sourceConnections.update("source_connection_id")
|
|
108
|
-
*/
|
|
109
|
-
update(sourceConnectionId: string, request?: AirweaveSDK.SourceConnectionUpdate, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
110
|
-
private __update;
|
|
111
|
-
/**
|
|
112
|
-
* Delete a source connection and all associated data.
|
|
113
|
-
*
|
|
114
|
-
* Permanently removes the source connection configuration and credentials.
|
|
115
|
-
* By default, previously synced data remains in your destination systems for continuity.
|
|
116
|
-
* Use delete_data=true to also remove all associated data from destination systems.
|
|
117
|
-
*
|
|
118
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection to delete
|
|
87
|
+
* @param {string} sourceConnectionId
|
|
119
88
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
89
|
*
|
|
121
90
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -126,14 +95,11 @@ export declare class SourceConnections {
|
|
|
126
95
|
delete(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
127
96
|
private __delete;
|
|
128
97
|
/**
|
|
129
|
-
*
|
|
98
|
+
* Trigger a sync run for a source connection.
|
|
130
99
|
*
|
|
131
|
-
*
|
|
132
|
-
* transforms it according to your configuration, and updates the destination systems.
|
|
133
|
-
* The job runs asynchronously and endpoint returns immediately with tracking information.
|
|
100
|
+
* Runs are always executed through Temporal workflow engine.
|
|
134
101
|
*
|
|
135
|
-
* @param {string} sourceConnectionId
|
|
136
|
-
* @param {AirweaveSDK.BodyRunSourceConnectionsSourceConnectionIdRunPost} request
|
|
102
|
+
* @param {string} sourceConnectionId
|
|
137
103
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
138
104
|
*
|
|
139
105
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -141,47 +107,30 @@ export declare class SourceConnections {
|
|
|
141
107
|
* @example
|
|
142
108
|
* await client.sourceConnections.run("source_connection_id")
|
|
143
109
|
*/
|
|
144
|
-
run(sourceConnectionId: string,
|
|
110
|
+
run(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
|
|
145
111
|
private __run;
|
|
146
112
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* Returns the complete history of data synchronization jobs including successful syncs,
|
|
150
|
-
* failed attempts, and currently running operations.
|
|
151
|
-
*
|
|
152
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection
|
|
153
|
-
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
154
|
-
*
|
|
155
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* await client.sourceConnections.listJobs("source_connection_id")
|
|
159
|
-
*/
|
|
160
|
-
listJobs(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
|
|
161
|
-
private __listJobs;
|
|
162
|
-
/**
|
|
163
|
-
* Get detailed information about a specific sync job.
|
|
113
|
+
* Get sync jobs for a source connection.
|
|
164
114
|
*
|
|
165
|
-
* @param {string} sourceConnectionId
|
|
166
|
-
* @param {
|
|
115
|
+
* @param {string} sourceConnectionId
|
|
116
|
+
* @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
|
|
167
117
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
168
118
|
*
|
|
169
119
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
170
120
|
*
|
|
171
121
|
* @example
|
|
172
|
-
* await client.sourceConnections.
|
|
122
|
+
* await client.sourceConnections.getSourceConnectionJobs("source_connection_id")
|
|
173
123
|
*/
|
|
174
|
-
|
|
175
|
-
private
|
|
124
|
+
getSourceConnectionJobs(sourceConnectionId: string, request?: AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
|
|
125
|
+
private __getSourceConnectionJobs;
|
|
176
126
|
/**
|
|
177
|
-
* Cancel a running sync job.
|
|
127
|
+
* Cancel a running sync job for a source connection.
|
|
178
128
|
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* Only jobs in 'created', 'pending', or 'in_progress' states can be cancelled.
|
|
129
|
+
* This will update the job status in the database to CANCELLED and
|
|
130
|
+
* send a cancellation request to the Temporal workflow if it's running.
|
|
182
131
|
*
|
|
183
|
-
* @param {string} sourceConnectionId
|
|
184
|
-
* @param {string} jobId
|
|
132
|
+
* @param {string} sourceConnectionId
|
|
133
|
+
* @param {string} jobId
|
|
185
134
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
186
135
|
*
|
|
187
136
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -59,12 +59,7 @@ class SourceConnections {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* List source connections
|
|
63
|
-
*
|
|
64
|
-
* By default, returns ALL source connections from every collection in your
|
|
65
|
-
* organization. Use the 'collection' parameter to filter results to a specific
|
|
66
|
-
* collection. This is useful for getting an overview of all your data sources
|
|
67
|
-
* or managing connections within a particular collection.
|
|
62
|
+
* List source connections with minimal fields for performance.
|
|
68
63
|
*
|
|
69
64
|
* @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
|
|
70
65
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -136,20 +131,16 @@ class SourceConnections {
|
|
|
136
131
|
});
|
|
137
132
|
}
|
|
138
133
|
/**
|
|
139
|
-
* Create a new source connection
|
|
140
|
-
*
|
|
141
|
-
* **This endpoint only works for sources that do not use OAuth2.0.**
|
|
142
|
-
* Sources that do use OAuth2.0 like Google Drive, Slack, or HubSpot must be
|
|
143
|
-
* connected through the UI where you can complete the OAuth consent flow
|
|
144
|
-
* or using Auth Providers (see [Auth Providers](/docs/auth-providers)).<br/><br/>
|
|
134
|
+
* Create a new source connection.
|
|
145
135
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
136
|
+
* The authentication configuration determines the flow:
|
|
137
|
+
* - DirectAuthentication: Immediate creation with provided credentials
|
|
138
|
+
* - OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
139
|
+
* - OAuthTokenAuthentication: Immediate creation with provided token
|
|
140
|
+
* - AuthProviderAuthentication: Using external auth provider
|
|
149
141
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* of authentication is used.
|
|
142
|
+
* BYOC (Bring Your Own Client) is detected when client_id and client_secret
|
|
143
|
+
* are provided in OAuthBrowserAuthentication.
|
|
153
144
|
*
|
|
154
145
|
* @param {AirweaveSDK.SourceConnectionCreate} request
|
|
155
146
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -158,8 +149,8 @@ class SourceConnections {
|
|
|
158
149
|
*
|
|
159
150
|
* @example
|
|
160
151
|
* await client.sourceConnections.create({
|
|
161
|
-
*
|
|
162
|
-
*
|
|
152
|
+
* short_name: "short_name",
|
|
153
|
+
* readable_collection_id: "readable_collection_id"
|
|
163
154
|
* })
|
|
164
155
|
*/
|
|
165
156
|
create(request, requestOptions) {
|
|
@@ -212,10 +203,9 @@ class SourceConnections {
|
|
|
212
203
|
});
|
|
213
204
|
}
|
|
214
205
|
/**
|
|
215
|
-
*
|
|
206
|
+
* Get a source connection with optional depth expansion.
|
|
216
207
|
*
|
|
217
|
-
* @param {string} sourceConnectionId
|
|
218
|
-
* @param {AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest} request
|
|
208
|
+
* @param {string} sourceConnectionId
|
|
219
209
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
220
210
|
*
|
|
221
211
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -223,22 +213,16 @@ class SourceConnections {
|
|
|
223
213
|
* @example
|
|
224
214
|
* await client.sourceConnections.get("source_connection_id")
|
|
225
215
|
*/
|
|
226
|
-
get(sourceConnectionId,
|
|
227
|
-
return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId,
|
|
216
|
+
get(sourceConnectionId, requestOptions) {
|
|
217
|
+
return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, requestOptions));
|
|
228
218
|
}
|
|
229
|
-
__get(
|
|
230
|
-
return __awaiter(this,
|
|
219
|
+
__get(sourceConnectionId, requestOptions) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
221
|
var _a, _b, _c;
|
|
232
|
-
const { show_auth_fields: showAuthFields } = request;
|
|
233
|
-
const _queryParams = {};
|
|
234
|
-
if (showAuthFields != null) {
|
|
235
|
-
_queryParams["show_auth_fields"] = showAuthFields.toString();
|
|
236
|
-
}
|
|
237
222
|
const _response = yield core.fetcher({
|
|
238
223
|
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, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
239
224
|
method: "GET",
|
|
240
225
|
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
241
|
-
queryParameters: _queryParams,
|
|
242
226
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
243
227
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
244
228
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -276,77 +260,9 @@ class SourceConnections {
|
|
|
276
260
|
});
|
|
277
261
|
}
|
|
278
262
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* Modify the configuration of an existing source connection including its name,
|
|
282
|
-
* authentication credentials, configuration fields, sync schedule, or source-specific settings.
|
|
283
|
-
*
|
|
284
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection to update
|
|
285
|
-
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
286
|
-
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
287
|
-
*
|
|
288
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* await client.sourceConnections.update("source_connection_id")
|
|
292
|
-
*/
|
|
293
|
-
update(sourceConnectionId, request = {}, requestOptions) {
|
|
294
|
-
return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
|
|
295
|
-
}
|
|
296
|
-
__update(sourceConnectionId_1) {
|
|
297
|
-
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
298
|
-
var _a, _b, _c;
|
|
299
|
-
const _response = yield core.fetcher({
|
|
300
|
-
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, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
301
|
-
method: "PUT",
|
|
302
|
-
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
303
|
-
contentType: "application/json",
|
|
304
|
-
requestType: "json",
|
|
305
|
-
body: request,
|
|
306
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
307
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
308
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
309
|
-
});
|
|
310
|
-
if (_response.ok) {
|
|
311
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
312
|
-
}
|
|
313
|
-
if (_response.error.reason === "status-code") {
|
|
314
|
-
switch (_response.error.statusCode) {
|
|
315
|
-
case 422:
|
|
316
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
317
|
-
default:
|
|
318
|
-
throw new errors.AirweaveSDKError({
|
|
319
|
-
statusCode: _response.error.statusCode,
|
|
320
|
-
body: _response.error.body,
|
|
321
|
-
rawResponse: _response.rawResponse,
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
switch (_response.error.reason) {
|
|
326
|
-
case "non-json":
|
|
327
|
-
throw new errors.AirweaveSDKError({
|
|
328
|
-
statusCode: _response.error.statusCode,
|
|
329
|
-
body: _response.error.rawBody,
|
|
330
|
-
rawResponse: _response.rawResponse,
|
|
331
|
-
});
|
|
332
|
-
case "timeout":
|
|
333
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /source-connections/{source_connection_id}.");
|
|
334
|
-
case "unknown":
|
|
335
|
-
throw new errors.AirweaveSDKError({
|
|
336
|
-
message: _response.error.errorMessage,
|
|
337
|
-
rawResponse: _response.rawResponse,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Delete a source connection and all associated data.
|
|
344
|
-
*
|
|
345
|
-
* Permanently removes the source connection configuration and credentials.
|
|
346
|
-
* By default, previously synced data remains in your destination systems for continuity.
|
|
347
|
-
* Use delete_data=true to also remove all associated data from destination systems.
|
|
263
|
+
* Delete a source connection and all related data.
|
|
348
264
|
*
|
|
349
|
-
* @param {string} sourceConnectionId
|
|
265
|
+
* @param {string} sourceConnectionId
|
|
350
266
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
351
267
|
*
|
|
352
268
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -401,14 +317,11 @@ class SourceConnections {
|
|
|
401
317
|
});
|
|
402
318
|
}
|
|
403
319
|
/**
|
|
404
|
-
*
|
|
320
|
+
* Trigger a sync run for a source connection.
|
|
405
321
|
*
|
|
406
|
-
*
|
|
407
|
-
* transforms it according to your configuration, and updates the destination systems.
|
|
408
|
-
* The job runs asynchronously and endpoint returns immediately with tracking information.
|
|
322
|
+
* Runs are always executed through Temporal workflow engine.
|
|
409
323
|
*
|
|
410
|
-
* @param {string} sourceConnectionId
|
|
411
|
-
* @param {AirweaveSDK.BodyRunSourceConnectionsSourceConnectionIdRunPost} request
|
|
324
|
+
* @param {string} sourceConnectionId
|
|
412
325
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
413
326
|
*
|
|
414
327
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -416,19 +329,16 @@ class SourceConnections {
|
|
|
416
329
|
* @example
|
|
417
330
|
* await client.sourceConnections.run("source_connection_id")
|
|
418
331
|
*/
|
|
419
|
-
run(sourceConnectionId,
|
|
420
|
-
return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId,
|
|
332
|
+
run(sourceConnectionId, requestOptions) {
|
|
333
|
+
return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, requestOptions));
|
|
421
334
|
}
|
|
422
|
-
__run(
|
|
423
|
-
return __awaiter(this,
|
|
335
|
+
__run(sourceConnectionId, requestOptions) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
424
337
|
var _a, _b, _c;
|
|
425
338
|
const _response = yield core.fetcher({
|
|
426
339
|
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, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
|
|
427
340
|
method: "POST",
|
|
428
341
|
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
429
|
-
contentType: "application/json",
|
|
430
|
-
requestType: "json",
|
|
431
|
-
body: request,
|
|
432
342
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
433
343
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
434
344
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -466,29 +376,33 @@ class SourceConnections {
|
|
|
466
376
|
});
|
|
467
377
|
}
|
|
468
378
|
/**
|
|
469
|
-
*
|
|
379
|
+
* Get sync jobs for a source connection.
|
|
470
380
|
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection
|
|
381
|
+
* @param {string} sourceConnectionId
|
|
382
|
+
* @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
|
|
475
383
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
476
384
|
*
|
|
477
385
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
478
386
|
*
|
|
479
387
|
* @example
|
|
480
|
-
* await client.sourceConnections.
|
|
388
|
+
* await client.sourceConnections.getSourceConnectionJobs("source_connection_id")
|
|
481
389
|
*/
|
|
482
|
-
|
|
483
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
390
|
+
getSourceConnectionJobs(sourceConnectionId, request = {}, requestOptions) {
|
|
391
|
+
return core.HttpResponsePromise.fromPromise(this.__getSourceConnectionJobs(sourceConnectionId, request, requestOptions));
|
|
484
392
|
}
|
|
485
|
-
|
|
486
|
-
return __awaiter(this,
|
|
393
|
+
__getSourceConnectionJobs(sourceConnectionId_1) {
|
|
394
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
487
395
|
var _a, _b, _c;
|
|
396
|
+
const { limit } = request;
|
|
397
|
+
const _queryParams = {};
|
|
398
|
+
if (limit != null) {
|
|
399
|
+
_queryParams["limit"] = limit.toString();
|
|
400
|
+
}
|
|
488
401
|
const _response = yield core.fetcher({
|
|
489
402
|
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, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
|
|
490
403
|
method: "GET",
|
|
491
404
|
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
405
|
+
queryParameters: _queryParams,
|
|
492
406
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
493
407
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
494
408
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -526,72 +440,13 @@ class SourceConnections {
|
|
|
526
440
|
});
|
|
527
441
|
}
|
|
528
442
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection
|
|
532
|
-
* @param {string} jobId - The unique identifier of the sync job
|
|
533
|
-
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
534
|
-
*
|
|
535
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
536
|
-
*
|
|
537
|
-
* @example
|
|
538
|
-
* await client.sourceConnections.getJob("source_connection_id", "job_id")
|
|
539
|
-
*/
|
|
540
|
-
getJob(sourceConnectionId, jobId, requestOptions) {
|
|
541
|
-
return core.HttpResponsePromise.fromPromise(this.__getJob(sourceConnectionId, jobId, requestOptions));
|
|
542
|
-
}
|
|
543
|
-
__getJob(sourceConnectionId, jobId, requestOptions) {
|
|
544
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
545
|
-
var _a, _b, _c;
|
|
546
|
-
const _response = yield core.fetcher({
|
|
547
|
-
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, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}`),
|
|
548
|
-
method: "GET",
|
|
549
|
-
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
550
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
551
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
552
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
553
|
-
});
|
|
554
|
-
if (_response.ok) {
|
|
555
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
556
|
-
}
|
|
557
|
-
if (_response.error.reason === "status-code") {
|
|
558
|
-
switch (_response.error.statusCode) {
|
|
559
|
-
case 422:
|
|
560
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
561
|
-
default:
|
|
562
|
-
throw new errors.AirweaveSDKError({
|
|
563
|
-
statusCode: _response.error.statusCode,
|
|
564
|
-
body: _response.error.body,
|
|
565
|
-
rawResponse: _response.rawResponse,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
switch (_response.error.reason) {
|
|
570
|
-
case "non-json":
|
|
571
|
-
throw new errors.AirweaveSDKError({
|
|
572
|
-
statusCode: _response.error.statusCode,
|
|
573
|
-
body: _response.error.rawBody,
|
|
574
|
-
rawResponse: _response.rawResponse,
|
|
575
|
-
});
|
|
576
|
-
case "timeout":
|
|
577
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs/{job_id}.");
|
|
578
|
-
case "unknown":
|
|
579
|
-
throw new errors.AirweaveSDKError({
|
|
580
|
-
message: _response.error.errorMessage,
|
|
581
|
-
rawResponse: _response.rawResponse,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Cancel a running sync job.
|
|
443
|
+
* Cancel a running sync job for a source connection.
|
|
588
444
|
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
* Only jobs in 'created', 'pending', or 'in_progress' states can be cancelled.
|
|
445
|
+
* This will update the job status in the database to CANCELLED and
|
|
446
|
+
* send a cancellation request to the Temporal workflow if it's running.
|
|
592
447
|
*
|
|
593
|
-
* @param {string} sourceConnectionId
|
|
594
|
-
* @param {string} jobId
|
|
448
|
+
* @param {string} sourceConnectionId
|
|
449
|
+
* @param {string} jobId
|
|
595
450
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
596
451
|
*
|
|
597
452
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -7,15 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface ListSourceConnectionsGetRequest {
|
|
9
9
|
/**
|
|
10
|
-
* Filter
|
|
10
|
+
* Filter by collection readable ID
|
|
11
11
|
*/
|
|
12
12
|
collection?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Number of source connections to skip for pagination
|
|
15
|
-
*/
|
|
16
13
|
skip?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Maximum number of source connections to return (1-1000)
|
|
19
|
-
*/
|
|
20
14
|
limit?: number;
|
|
21
15
|
}
|