@airweave/sdk 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -11
- package/Client.js +15 -30
- package/README.md +12 -8
- package/api/resources/connections/client/Client.d.ts +3 -2
- package/api/resources/connections/client/Client.js +38 -25
- package/api/resources/destinations/client/Client.d.ts +3 -2
- package/api/resources/destinations/client/Client.js +8 -5
- package/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/api/resources/embeddingModels/client/Client.js +8 -5
- package/api/resources/index.d.ts +0 -5
- package/api/resources/index.js +1 -6
- package/api/resources/sources/client/Client.d.ts +3 -2
- package/api/resources/sources/client/Client.js +8 -5
- package/api/resources/sync/client/Client.d.ts +3 -2
- package/api/resources/sync/client/Client.js +26 -17
- package/api/resources/users/client/Client.d.ts +3 -2
- package/api/resources/users/client/Client.js +5 -3
- package/api/resources/whiteLabels/client/Client.d.ts +3 -2
- package/api/resources/whiteLabels/client/Client.js +26 -17
- package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
- package/{dist/api/resources/chat/client/requests → api/types}/ChatCreate.d.ts +1 -5
- package/{dist/api/resources/chat/client/requests → api/types}/ChatMessageCreate.d.ts +1 -4
- package/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/Client.d.ts +3 -11
- package/dist/Client.js +15 -30
- package/dist/api/resources/connections/client/Client.d.ts +3 -2
- package/dist/api/resources/connections/client/Client.js +38 -25
- package/dist/api/resources/destinations/client/Client.d.ts +3 -2
- package/dist/api/resources/destinations/client/Client.js +8 -5
- package/dist/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/dist/api/resources/embeddingModels/client/Client.js +8 -5
- package/dist/api/resources/index.d.ts +0 -5
- package/dist/api/resources/index.js +1 -6
- package/dist/api/resources/sources/client/Client.d.ts +3 -2
- package/dist/api/resources/sources/client/Client.js +8 -5
- package/dist/api/resources/sync/client/Client.d.ts +3 -2
- package/dist/api/resources/sync/client/Client.js +26 -17
- package/dist/api/resources/users/client/Client.d.ts +3 -2
- package/dist/api/resources/users/client/Client.js +5 -3
- package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -2
- package/dist/api/resources/whiteLabels/client/Client.js +26 -17
- package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
- package/{api/resources/chat/client/requests → dist/api/types}/ChatCreate.d.ts +1 -5
- package/{api/resources/chat/client/requests → dist/api/types}/ChatMessageCreate.d.ts +1 -4
- package/dist/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +0 -5
- package/dist/serialization/resources/index.js +1 -6
- package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatCreate.d.ts +4 -4
- package/dist/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
- package/dist/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatMessageCreate.js +1 -1
- package/dist/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
- package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatUpdate.js +1 -1
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +8 -0
- package/environments.js +10 -0
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/package.json +1 -1
- package/reference.md +310 -1200
- package/serialization/resources/index.d.ts +0 -5
- package/serialization/resources/index.js +1 -6
- package/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatCreate.d.ts +4 -4
- package/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
- package/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatMessageCreate.js +1 -1
- package/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
- package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatUpdate.js +1 -1
- package/serialization/types/index.d.ts +4 -0
- package/serialization/types/index.js +4 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +0 -130
- package/api/resources/apiKeys/client/Client.js +0 -386
- package/api/resources/apiKeys/client/index.d.ts +0 -1
- package/api/resources/apiKeys/client/index.js +0 -17
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
- package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/api/resources/apiKeys/client/requests/index.js +0 -2
- package/api/resources/apiKeys/index.d.ts +0 -1
- package/api/resources/apiKeys/index.js +0 -17
- package/api/resources/chat/client/Client.d.ts +0 -133
- package/api/resources/chat/client/Client.js +0 -585
- package/api/resources/chat/client/index.d.ts +0 -1
- package/api/resources/chat/client/index.js +0 -17
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
- package/api/resources/chat/client/requests/index.d.ts +0 -4
- package/api/resources/chat/client/requests/index.js +0 -2
- package/api/resources/chat/index.d.ts +0 -1
- package/api/resources/chat/index.js +0 -17
- package/api/resources/health/client/Client.d.ts +0 -39
- package/api/resources/health/client/Client.js +0 -115
- package/api/resources/health/client/index.d.ts +0 -1
- package/api/resources/health/client/index.js +0 -2
- package/api/resources/health/index.d.ts +0 -1
- package/api/resources/health/index.js +0 -17
- package/dist/api/resources/apiKeys/client/Client.d.ts +0 -130
- package/dist/api/resources/apiKeys/client/Client.js +0 -386
- package/dist/api/resources/apiKeys/client/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/client/index.js +0 -17
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
- package/dist/api/resources/apiKeys/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/index.js +0 -17
- package/dist/api/resources/chat/client/Client.d.ts +0 -133
- package/dist/api/resources/chat/client/Client.js +0 -585
- package/dist/api/resources/chat/client/index.d.ts +0 -1
- package/dist/api/resources/chat/client/index.js +0 -17
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
- package/dist/api/resources/chat/client/requests/index.d.ts +0 -4
- package/dist/api/resources/chat/client/requests/index.js +0 -2
- package/dist/api/resources/chat/index.d.ts +0 -1
- package/dist/api/resources/chat/index.js +0 -17
- package/dist/api/resources/health/client/Client.d.ts +0 -39
- package/dist/api/resources/health/client/Client.js +0 -115
- package/dist/api/resources/health/client/index.d.ts +0 -1
- package/dist/api/resources/health/client/index.js +0 -2
- package/dist/api/resources/health/index.d.ts +0 -1
- package/dist/api/resources/health/index.js +0 -17
- package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/dist/serialization/resources/apiKeys/client/index.js +0 -41
- package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
- package/dist/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
- package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/dist/serialization/resources/apiKeys/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/index.js +0 -17
- package/dist/serialization/resources/chat/client/index.d.ts +0 -3
- package/dist/serialization/resources/chat/client/index.js +0 -42
- package/dist/serialization/resources/chat/client/listChats.d.ts +0 -11
- package/dist/serialization/resources/chat/client/listChats.js +0 -42
- package/dist/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
- package/dist/serialization/resources/chat/client/openaiKeySet.js +0 -41
- package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
- package/dist/serialization/resources/chat/client/requests/index.d.ts +0 -3
- package/dist/serialization/resources/chat/client/requests/index.js +0 -9
- package/dist/serialization/resources/chat/index.d.ts +0 -1
- package/dist/serialization/resources/chat/index.js +0 -17
- package/dist/serialization/resources/health/client/healthCheck.d.ts +0 -9
- package/dist/serialization/resources/health/client/healthCheck.js +0 -41
- package/dist/serialization/resources/health/client/index.d.ts +0 -1
- package/dist/serialization/resources/health/client/index.js +0 -37
- package/dist/serialization/resources/health/index.d.ts +0 -1
- package/dist/serialization/resources/health/index.js +0 -17
- package/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/serialization/resources/apiKeys/client/index.js +0 -41
- package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
- package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
- package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/serialization/resources/apiKeys/index.d.ts +0 -1
- package/serialization/resources/apiKeys/index.js +0 -17
- package/serialization/resources/chat/client/index.d.ts +0 -3
- package/serialization/resources/chat/client/index.js +0 -42
- package/serialization/resources/chat/client/listChats.d.ts +0 -11
- package/serialization/resources/chat/client/listChats.js +0 -42
- package/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
- package/serialization/resources/chat/client/openaiKeySet.js +0 -41
- package/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
- package/serialization/resources/chat/client/requests/index.d.ts +0 -3
- package/serialization/resources/chat/client/requests/index.js +0 -9
- package/serialization/resources/chat/index.d.ts +0 -1
- package/serialization/resources/chat/index.js +0 -17
- package/serialization/resources/health/client/healthCheck.d.ts +0 -9
- package/serialization/resources/health/client/healthCheck.js +0 -41
- package/serialization/resources/health/client/index.d.ts +0 -1
- package/serialization/resources/health/client/index.js +0 -37
- package/serialization/resources/health/index.d.ts +0 -1
- package/serialization/resources/health/index.js +0 -17
- /package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
- /package/api/{resources/chat/client/requests → types}/ChatUpdate.js +0 -0
- /package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
- /package/dist/api/{resources/chat/client/requests → types}/ChatUpdate.js +0 -0
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../core";
|
|
5
|
-
export declare namespace Health {
|
|
6
|
-
interface Options {
|
|
7
|
-
environment: core.Supplier<string>;
|
|
8
|
-
/** Override the x-api-key header */
|
|
9
|
-
apiKey?: core.Supplier<string | undefined>;
|
|
10
|
-
}
|
|
11
|
-
interface RequestOptions {
|
|
12
|
-
/** The maximum time to wait for a response in seconds. */
|
|
13
|
-
timeoutInSeconds?: number;
|
|
14
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
15
|
-
maxRetries?: number;
|
|
16
|
-
/** A hook to abort the request. */
|
|
17
|
-
abortSignal?: AbortSignal;
|
|
18
|
-
/** Override the x-api-key header */
|
|
19
|
-
apiKey?: string | undefined;
|
|
20
|
-
/** Additional headers to include in the request. */
|
|
21
|
-
headers?: Record<string, string>;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export declare class Health {
|
|
25
|
-
protected readonly _options: Health.Options;
|
|
26
|
-
constructor(_options: Health.Options);
|
|
27
|
-
/**
|
|
28
|
-
* Check if the API is healthy.
|
|
29
|
-
*
|
|
30
|
-
* Returns:
|
|
31
|
-
* dict: A dictionary containing the status of the API.
|
|
32
|
-
*
|
|
33
|
-
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* await client.health.healthCheck()
|
|
37
|
-
*/
|
|
38
|
-
healthCheck(requestOptions?: Health.RequestOptions): Promise<Record<string, string>>;
|
|
39
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.Health = void 0;
|
|
52
|
-
const core = __importStar(require("../../../../core"));
|
|
53
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
54
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
55
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
56
|
-
class Health {
|
|
57
|
-
constructor(_options) {
|
|
58
|
-
this._options = _options;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Check if the API is healthy.
|
|
62
|
-
*
|
|
63
|
-
* Returns:
|
|
64
|
-
* dict: A dictionary containing the status of the API.
|
|
65
|
-
*
|
|
66
|
-
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* await client.health.healthCheck()
|
|
70
|
-
*/
|
|
71
|
-
healthCheck(requestOptions) {
|
|
72
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "health"),
|
|
75
|
-
method: "GET",
|
|
76
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
77
|
-
? 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.11", "User-Agent": "@airweave/sdk/0.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
|
-
contentType: "application/json",
|
|
80
|
-
requestType: "json",
|
|
81
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
-
});
|
|
85
|
-
if (_response.ok) {
|
|
86
|
-
return serializers.health.healthCheck.Response.parseOrThrow(_response.body, {
|
|
87
|
-
unrecognizedObjectKeys: "passthrough",
|
|
88
|
-
allowUnrecognizedUnionMembers: true,
|
|
89
|
-
allowUnrecognizedEnumValues: true,
|
|
90
|
-
breadcrumbsPrefix: ["response"],
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
if (_response.error.reason === "status-code") {
|
|
94
|
-
throw new errors.AirweaveSDKError({
|
|
95
|
-
statusCode: _response.error.statusCode,
|
|
96
|
-
body: _response.error.body,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
switch (_response.error.reason) {
|
|
100
|
-
case "non-json":
|
|
101
|
-
throw new errors.AirweaveSDKError({
|
|
102
|
-
statusCode: _response.error.statusCode,
|
|
103
|
-
body: _response.error.rawBody,
|
|
104
|
-
});
|
|
105
|
-
case "timeout":
|
|
106
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /health.");
|
|
107
|
-
case "unknown":
|
|
108
|
-
throw new errors.AirweaveSDKError({
|
|
109
|
-
message: _response.error.errorMessage,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.Health = Health;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client"), exports);
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../core";
|
|
5
|
-
import * as AirweaveSDK from "../../../index";
|
|
6
|
-
export declare namespace ApiKeys {
|
|
7
|
-
interface Options {
|
|
8
|
-
environment: core.Supplier<string>;
|
|
9
|
-
/** Override the x-api-key header */
|
|
10
|
-
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
}
|
|
12
|
-
interface RequestOptions {
|
|
13
|
-
/** The maximum time to wait for a response in seconds. */
|
|
14
|
-
timeoutInSeconds?: number;
|
|
15
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
-
maxRetries?: number;
|
|
17
|
-
/** A hook to abort the request. */
|
|
18
|
-
abortSignal?: AbortSignal;
|
|
19
|
-
/** Override the x-api-key header */
|
|
20
|
-
apiKey?: string | undefined;
|
|
21
|
-
/** Additional headers to include in the request. */
|
|
22
|
-
headers?: Record<string, string>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export declare class ApiKeys {
|
|
26
|
-
protected readonly _options: ApiKeys.Options;
|
|
27
|
-
constructor(_options: ApiKeys.Options);
|
|
28
|
-
/**
|
|
29
|
-
* Retrieve all API keys for the current user.
|
|
30
|
-
*
|
|
31
|
-
* Args:
|
|
32
|
-
* ----
|
|
33
|
-
* db (AsyncSession): The database session.
|
|
34
|
-
* skip (int): Number of records to skip for pagination.
|
|
35
|
-
* limit (int): Maximum number of records to return.
|
|
36
|
-
* user (schemas.User): The current user.
|
|
37
|
-
*
|
|
38
|
-
* Returns:
|
|
39
|
-
* -------
|
|
40
|
-
* List[schemas.APIKey]: A list of API keys.
|
|
41
|
-
*
|
|
42
|
-
* @param {AirweaveSDK.ReadApiKeysApiKeysGetRequest} request
|
|
43
|
-
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
-
*
|
|
45
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* await client.apiKeys.readApiKeys()
|
|
49
|
-
*/
|
|
50
|
-
readApiKeys(request?: AirweaveSDK.ReadApiKeysApiKeysGetRequest, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Create a new API key for the current user.
|
|
53
|
-
*
|
|
54
|
-
* Returns a temporary plain key for the user to store securely.
|
|
55
|
-
* This is not stored in the database.
|
|
56
|
-
*
|
|
57
|
-
* Args:
|
|
58
|
-
* ----
|
|
59
|
-
* db (AsyncSession): The database session.
|
|
60
|
-
* api_key_in (schemas.APIKeyCreate): The API key creation data.
|
|
61
|
-
* user (schemas.User): The current user.
|
|
62
|
-
*
|
|
63
|
-
* Returns:
|
|
64
|
-
* -------
|
|
65
|
-
* schemas.APIKeyWithPlainKey: The created API key object, including the key.
|
|
66
|
-
*
|
|
67
|
-
* @param {AirweaveSDK.ApiKeyCreate} request
|
|
68
|
-
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
|
-
*
|
|
70
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* await client.apiKeys.createApiKey()
|
|
74
|
-
*/
|
|
75
|
-
createApiKey(request?: AirweaveSDK.ApiKeyCreate, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKeyWithPlainKey>;
|
|
76
|
-
/**
|
|
77
|
-
* Delete an API key.
|
|
78
|
-
*
|
|
79
|
-
* Args:
|
|
80
|
-
* ----
|
|
81
|
-
* db (AsyncSession): The database session.
|
|
82
|
-
* id (UUID): The ID of the API key.
|
|
83
|
-
* user (schemas.User): The current user.
|
|
84
|
-
*
|
|
85
|
-
* Returns:
|
|
86
|
-
* -------
|
|
87
|
-
* schemas.APIKey: The revoked API key object.
|
|
88
|
-
*
|
|
89
|
-
* Raises:
|
|
90
|
-
* ------
|
|
91
|
-
* HTTPException: If the API key is not found.
|
|
92
|
-
*
|
|
93
|
-
* @param {AirweaveSDK.DeleteApiKeyApiKeysDeleteRequest} request
|
|
94
|
-
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
-
*
|
|
96
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* await client.apiKeys.deleteApiKey({
|
|
100
|
-
* id: "id"
|
|
101
|
-
* })
|
|
102
|
-
*/
|
|
103
|
-
deleteApiKey(request: AirweaveSDK.DeleteApiKeyApiKeysDeleteRequest, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey>;
|
|
104
|
-
/**
|
|
105
|
-
* Retrieve an API key by ID.
|
|
106
|
-
*
|
|
107
|
-
* Args:
|
|
108
|
-
* ----
|
|
109
|
-
* db (AsyncSession): The database session.
|
|
110
|
-
* id (UUID): The ID of the API key.
|
|
111
|
-
* user (schemas.User): The current user.
|
|
112
|
-
*
|
|
113
|
-
* Returns:
|
|
114
|
-
* -------
|
|
115
|
-
* schemas.APIKey: The API key object.
|
|
116
|
-
*
|
|
117
|
-
* Raises:
|
|
118
|
-
* ------
|
|
119
|
-
* HTTPException: If the API key is not found.
|
|
120
|
-
*
|
|
121
|
-
* @param {string} id
|
|
122
|
-
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
-
*
|
|
124
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* await client.apiKeys.readApiKey("id")
|
|
128
|
-
*/
|
|
129
|
-
readApiKey(id: string, requestOptions?: ApiKeys.RequestOptions): Promise<AirweaveSDK.ApiKey>;
|
|
130
|
-
}
|