@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.
Files changed (203) hide show
  1. package/Client.d.ts +3 -11
  2. package/Client.js +15 -30
  3. package/README.md +12 -8
  4. package/api/resources/connections/client/Client.d.ts +3 -2
  5. package/api/resources/connections/client/Client.js +38 -25
  6. package/api/resources/destinations/client/Client.d.ts +3 -2
  7. package/api/resources/destinations/client/Client.js +8 -5
  8. package/api/resources/embeddingModels/client/Client.d.ts +3 -2
  9. package/api/resources/embeddingModels/client/Client.js +8 -5
  10. package/api/resources/index.d.ts +0 -5
  11. package/api/resources/index.js +1 -6
  12. package/api/resources/sources/client/Client.d.ts +3 -2
  13. package/api/resources/sources/client/Client.js +8 -5
  14. package/api/resources/sync/client/Client.d.ts +3 -2
  15. package/api/resources/sync/client/Client.js +26 -17
  16. package/api/resources/users/client/Client.d.ts +3 -2
  17. package/api/resources/users/client/Client.js +5 -3
  18. package/api/resources/whiteLabels/client/Client.d.ts +3 -2
  19. package/api/resources/whiteLabels/client/Client.js +26 -17
  20. package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
  21. package/{dist/api/resources/chat/client/requests → api/types}/ChatCreate.d.ts +1 -5
  22. package/{dist/api/resources/chat/client/requests → api/types}/ChatMessageCreate.d.ts +1 -4
  23. package/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
  24. package/api/types/index.d.ts +4 -0
  25. package/api/types/index.js +4 -0
  26. package/dist/Client.d.ts +3 -11
  27. package/dist/Client.js +15 -30
  28. package/dist/api/resources/connections/client/Client.d.ts +3 -2
  29. package/dist/api/resources/connections/client/Client.js +38 -25
  30. package/dist/api/resources/destinations/client/Client.d.ts +3 -2
  31. package/dist/api/resources/destinations/client/Client.js +8 -5
  32. package/dist/api/resources/embeddingModels/client/Client.d.ts +3 -2
  33. package/dist/api/resources/embeddingModels/client/Client.js +8 -5
  34. package/dist/api/resources/index.d.ts +0 -5
  35. package/dist/api/resources/index.js +1 -6
  36. package/dist/api/resources/sources/client/Client.d.ts +3 -2
  37. package/dist/api/resources/sources/client/Client.js +8 -5
  38. package/dist/api/resources/sync/client/Client.d.ts +3 -2
  39. package/dist/api/resources/sync/client/Client.js +26 -17
  40. package/dist/api/resources/users/client/Client.d.ts +3 -2
  41. package/dist/api/resources/users/client/Client.js +5 -3
  42. package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -2
  43. package/dist/api/resources/whiteLabels/client/Client.js +26 -17
  44. package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +1 -2
  45. package/{api/resources/chat/client/requests → dist/api/types}/ChatCreate.d.ts +1 -5
  46. package/{api/resources/chat/client/requests → dist/api/types}/ChatMessageCreate.d.ts +1 -4
  47. package/dist/api/{resources/chat/client/requests → types}/ChatUpdate.d.ts +1 -2
  48. package/dist/api/types/index.d.ts +4 -0
  49. package/dist/api/types/index.js +4 -0
  50. package/dist/environments.d.ts +8 -0
  51. package/dist/environments.js +10 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +3 -1
  54. package/dist/serialization/resources/index.d.ts +0 -5
  55. package/dist/serialization/resources/index.js +1 -6
  56. package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
  57. package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
  58. package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatCreate.d.ts +4 -4
  59. package/dist/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
  60. package/dist/serialization/types/ChatMessageCreate.d.ts +13 -0
  61. package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatMessageCreate.js +1 -1
  62. package/dist/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
  63. package/{serialization/resources/chat/client/requests → dist/serialization/types}/ChatUpdate.js +1 -1
  64. package/dist/serialization/types/index.d.ts +4 -0
  65. package/dist/serialization/types/index.js +4 -0
  66. package/dist/version.d.ts +1 -1
  67. package/dist/version.js +1 -1
  68. package/environments.d.ts +8 -0
  69. package/environments.js +10 -0
  70. package/index.d.ts +1 -0
  71. package/index.js +3 -1
  72. package/package.json +1 -1
  73. package/reference.md +310 -1200
  74. package/serialization/resources/index.d.ts +0 -5
  75. package/serialization/resources/index.js +1 -6
  76. package/serialization/types/ApiKeyCreate.d.ts +12 -0
  77. package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
  78. package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatCreate.d.ts +4 -4
  79. package/serialization/{resources/chat/client/requests → types}/ChatCreate.js +1 -1
  80. package/serialization/types/ChatMessageCreate.d.ts +13 -0
  81. package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatMessageCreate.js +1 -1
  82. package/serialization/{resources/chat/client/requests → types}/ChatUpdate.d.ts +4 -4
  83. package/{dist/serialization/resources/chat/client/requests → serialization/types}/ChatUpdate.js +1 -1
  84. package/serialization/types/index.d.ts +4 -0
  85. package/serialization/types/index.js +4 -0
  86. package/version.d.ts +1 -1
  87. package/version.js +1 -1
  88. package/api/resources/apiKeys/client/Client.d.ts +0 -130
  89. package/api/resources/apiKeys/client/Client.js +0 -386
  90. package/api/resources/apiKeys/client/index.d.ts +0 -1
  91. package/api/resources/apiKeys/client/index.js +0 -17
  92. package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  93. package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
  94. package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
  95. package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
  96. package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  97. package/api/resources/apiKeys/client/requests/index.js +0 -2
  98. package/api/resources/apiKeys/index.d.ts +0 -1
  99. package/api/resources/apiKeys/index.js +0 -17
  100. package/api/resources/chat/client/Client.d.ts +0 -133
  101. package/api/resources/chat/client/Client.js +0 -585
  102. package/api/resources/chat/client/index.d.ts +0 -1
  103. package/api/resources/chat/client/index.js +0 -17
  104. package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
  105. package/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
  106. package/api/resources/chat/client/requests/index.d.ts +0 -4
  107. package/api/resources/chat/client/requests/index.js +0 -2
  108. package/api/resources/chat/index.d.ts +0 -1
  109. package/api/resources/chat/index.js +0 -17
  110. package/api/resources/health/client/Client.d.ts +0 -39
  111. package/api/resources/health/client/Client.js +0 -115
  112. package/api/resources/health/client/index.d.ts +0 -1
  113. package/api/resources/health/client/index.js +0 -2
  114. package/api/resources/health/index.d.ts +0 -1
  115. package/api/resources/health/index.js +0 -17
  116. package/dist/api/resources/apiKeys/client/Client.d.ts +0 -130
  117. package/dist/api/resources/apiKeys/client/Client.js +0 -386
  118. package/dist/api/resources/apiKeys/client/index.d.ts +0 -1
  119. package/dist/api/resources/apiKeys/client/index.js +0 -17
  120. package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  121. package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +0 -5
  122. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
  123. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +0 -5
  124. package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  125. package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
  126. package/dist/api/resources/apiKeys/index.d.ts +0 -1
  127. package/dist/api/resources/apiKeys/index.js +0 -17
  128. package/dist/api/resources/chat/client/Client.d.ts +0 -133
  129. package/dist/api/resources/chat/client/Client.js +0 -585
  130. package/dist/api/resources/chat/client/index.d.ts +0 -1
  131. package/dist/api/resources/chat/client/index.js +0 -17
  132. package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +0 -11
  133. package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +0 -5
  134. package/dist/api/resources/chat/client/requests/index.d.ts +0 -4
  135. package/dist/api/resources/chat/client/requests/index.js +0 -2
  136. package/dist/api/resources/chat/index.d.ts +0 -1
  137. package/dist/api/resources/chat/index.js +0 -17
  138. package/dist/api/resources/health/client/Client.d.ts +0 -39
  139. package/dist/api/resources/health/client/Client.js +0 -115
  140. package/dist/api/resources/health/client/index.d.ts +0 -1
  141. package/dist/api/resources/health/client/index.js +0 -2
  142. package/dist/api/resources/health/index.d.ts +0 -1
  143. package/dist/api/resources/health/index.js +0 -17
  144. package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
  145. package/dist/serialization/resources/apiKeys/client/index.js +0 -41
  146. package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
  147. package/dist/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
  148. package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
  149. package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  150. package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
  151. package/dist/serialization/resources/apiKeys/index.d.ts +0 -1
  152. package/dist/serialization/resources/apiKeys/index.js +0 -17
  153. package/dist/serialization/resources/chat/client/index.d.ts +0 -3
  154. package/dist/serialization/resources/chat/client/index.js +0 -42
  155. package/dist/serialization/resources/chat/client/listChats.d.ts +0 -11
  156. package/dist/serialization/resources/chat/client/listChats.js +0 -42
  157. package/dist/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
  158. package/dist/serialization/resources/chat/client/openaiKeySet.js +0 -41
  159. package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
  160. package/dist/serialization/resources/chat/client/requests/index.d.ts +0 -3
  161. package/dist/serialization/resources/chat/client/requests/index.js +0 -9
  162. package/dist/serialization/resources/chat/index.d.ts +0 -1
  163. package/dist/serialization/resources/chat/index.js +0 -17
  164. package/dist/serialization/resources/health/client/healthCheck.d.ts +0 -9
  165. package/dist/serialization/resources/health/client/healthCheck.js +0 -41
  166. package/dist/serialization/resources/health/client/index.d.ts +0 -1
  167. package/dist/serialization/resources/health/client/index.js +0 -37
  168. package/dist/serialization/resources/health/index.d.ts +0 -1
  169. package/dist/serialization/resources/health/index.js +0 -17
  170. package/serialization/resources/apiKeys/client/index.d.ts +0 -2
  171. package/serialization/resources/apiKeys/client/index.js +0 -41
  172. package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
  173. package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
  174. package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +0 -12
  175. package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  176. package/serialization/resources/apiKeys/client/requests/index.js +0 -5
  177. package/serialization/resources/apiKeys/index.d.ts +0 -1
  178. package/serialization/resources/apiKeys/index.js +0 -17
  179. package/serialization/resources/chat/client/index.d.ts +0 -3
  180. package/serialization/resources/chat/client/index.js +0 -42
  181. package/serialization/resources/chat/client/listChats.d.ts +0 -11
  182. package/serialization/resources/chat/client/listChats.js +0 -42
  183. package/serialization/resources/chat/client/openaiKeySet.d.ts +0 -9
  184. package/serialization/resources/chat/client/openaiKeySet.js +0 -41
  185. package/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +0 -13
  186. package/serialization/resources/chat/client/requests/index.d.ts +0 -3
  187. package/serialization/resources/chat/client/requests/index.js +0 -9
  188. package/serialization/resources/chat/index.d.ts +0 -1
  189. package/serialization/resources/chat/index.js +0 -17
  190. package/serialization/resources/health/client/healthCheck.d.ts +0 -9
  191. package/serialization/resources/health/client/healthCheck.js +0 -41
  192. package/serialization/resources/health/client/index.d.ts +0 -1
  193. package/serialization/resources/health/client/index.js +0 -37
  194. package/serialization/resources/health/index.d.ts +0 -1
  195. package/serialization/resources/health/index.js +0 -17
  196. /package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
  197. /package/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
  198. /package/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
  199. /package/api/{resources/chat/client/requests → types}/ChatUpdate.js +0 -0
  200. /package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.js +0 -0
  201. /package/dist/api/{resources/chat/client/requests → types}/ChatCreate.js +0 -0
  202. /package/dist/api/{resources/chat/client/requests → types}/ChatMessageCreate.js +0 -0
  203. /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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- }