@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
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.Sources = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
52
53
  const core = __importStar(require("../../../../core"));
53
54
  const AirweaveSDK = __importStar(require("../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
55
56
  const serializers = __importStar(require("../../../../serialization/index"));
56
57
  const errors = __importStar(require("../../../../errors/index"));
57
58
  class Sources {
58
- constructor(_options) {
59
+ constructor(_options = {}) {
59
60
  this._options = _options;
60
61
  }
61
62
  /**
@@ -81,12 +82,13 @@ class Sources {
81
82
  */
82
83
  readSource(shortName, requestOptions) {
83
84
  return __awaiter(this, void 0, void 0, function* () {
85
+ var _a;
84
86
  const _response = yield core.fetcher({
85
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sources/detail/${encodeURIComponent(shortName)}`),
87
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sources/detail/${encodeURIComponent(shortName)}`),
86
88
  method: "GET",
87
89
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
88
90
  ? yield core.Supplier.get(this._options.apiKey)
89
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
91
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
92
  contentType: "application/json",
91
93
  requestType: "json",
92
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -148,12 +150,13 @@ class Sources {
148
150
  */
149
151
  readSources(requestOptions) {
150
152
  return __awaiter(this, void 0, void 0, function* () {
153
+ var _a;
151
154
  const _response = yield core.fetcher({
152
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sources/list"),
155
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sources/list"),
153
156
  method: "GET",
154
157
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
155
158
  ? yield core.Supplier.get(this._options.apiKey)
156
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
159
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
160
  contentType: "application/json",
158
161
  requestType: "json",
159
162
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as environments from "../../../../environments";
4
5
  import * as core from "../../../../core";
5
6
  import * as AirweaveSDK from "../../../index";
6
7
  export declare namespace Sync {
7
8
  interface Options {
8
- environment: core.Supplier<string>;
9
+ environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
9
10
  /** Override the x-api-key header */
10
11
  apiKey?: core.Supplier<string | undefined>;
11
12
  }
@@ -24,7 +25,7 @@ export declare namespace Sync {
24
25
  }
25
26
  export declare class Sync {
26
27
  protected readonly _options: Sync.Options;
27
- constructor(_options: Sync.Options);
28
+ constructor(_options?: Sync.Options);
28
29
  /**
29
30
  * List all syncs for the current user.
30
31
  *
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.Sync = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
52
53
  const core = __importStar(require("../../../../core"));
53
54
  const AirweaveSDK = __importStar(require("../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
55
56
  const serializers = __importStar(require("../../../../serialization/index"));
56
57
  const errors = __importStar(require("../../../../errors/index"));
57
58
  class Sync {
58
- constructor(_options) {
59
+ constructor(_options = {}) {
59
60
  this._options = _options;
60
61
  }
61
62
  /**
@@ -71,6 +72,7 @@ class Sync {
71
72
  */
72
73
  listSyncs() {
73
74
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
75
+ var _a;
74
76
  const { skip, limit, withSourceConnection } = request;
75
77
  const _queryParams = {};
76
78
  if (skip != null) {
@@ -83,11 +85,11 @@ class Sync {
83
85
  _queryParams["with_source_connection"] = withSourceConnection.toString();
84
86
  }
85
87
  const _response = yield core.fetcher({
86
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sync/"),
88
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
87
89
  method: "GET",
88
90
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
89
91
  ? yield core.Supplier.get(this._options.apiKey)
90
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
92
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
93
  contentType: "application/json",
92
94
  queryParameters: _queryParams,
93
95
  requestType: "json",
@@ -150,12 +152,13 @@ class Sync {
150
152
  */
151
153
  createSync(request, requestOptions) {
152
154
  return __awaiter(this, void 0, void 0, function* () {
155
+ var _a;
153
156
  const _response = yield core.fetcher({
154
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sync/"),
157
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
155
158
  method: "POST",
156
159
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
157
160
  ? yield core.Supplier.get(this._options.apiKey)
158
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
161
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
162
  contentType: "application/json",
160
163
  requestType: "json",
161
164
  body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -215,12 +218,13 @@ class Sync {
215
218
  */
216
219
  getSync(syncId, requestOptions) {
217
220
  return __awaiter(this, void 0, void 0, function* () {
221
+ var _a;
218
222
  const _response = yield core.fetcher({
219
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}`),
223
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
220
224
  method: "GET",
221
225
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
222
226
  ? yield core.Supplier.get(this._options.apiKey)
223
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
227
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
224
228
  contentType: "application/json",
225
229
  requestType: "json",
226
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -280,17 +284,18 @@ class Sync {
280
284
  */
281
285
  deleteSync(syncId_1) {
282
286
  return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
287
+ var _a;
283
288
  const { deleteData } = request;
284
289
  const _queryParams = {};
285
290
  if (deleteData != null) {
286
291
  _queryParams["delete_data"] = deleteData.toString();
287
292
  }
288
293
  const _response = yield core.fetcher({
289
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}`),
294
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
290
295
  method: "DELETE",
291
296
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
292
297
  ? yield core.Supplier.get(this._options.apiKey)
293
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
298
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
294
299
  contentType: "application/json",
295
300
  queryParameters: _queryParams,
296
301
  requestType: "json",
@@ -350,12 +355,13 @@ class Sync {
350
355
  */
351
356
  runSync(syncId, requestOptions) {
352
357
  return __awaiter(this, void 0, void 0, function* () {
358
+ var _a;
353
359
  const _response = yield core.fetcher({
354
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}/run`),
360
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/run`),
355
361
  method: "POST",
356
362
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
357
363
  ? yield core.Supplier.get(this._options.apiKey)
358
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
364
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
359
365
  contentType: "application/json",
360
366
  requestType: "json",
361
367
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -414,12 +420,13 @@ class Sync {
414
420
  */
415
421
  listSyncJobs(syncId, requestOptions) {
416
422
  return __awaiter(this, void 0, void 0, function* () {
423
+ var _a;
417
424
  const _response = yield core.fetcher({
418
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/${encodeURIComponent(syncId)}/jobs`),
425
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/jobs`),
419
426
  method: "GET",
420
427
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
421
428
  ? yield core.Supplier.get(this._options.apiKey)
422
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
429
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
423
430
  contentType: "application/json",
424
431
  requestType: "json",
425
432
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,15 +488,16 @@ class Sync {
481
488
  */
482
489
  getSyncJob(jobId, request, requestOptions) {
483
490
  return __awaiter(this, void 0, void 0, function* () {
491
+ var _a;
484
492
  const { syncId } = request;
485
493
  const _queryParams = {};
486
494
  _queryParams["sync_id"] = syncId;
487
495
  const _response = yield core.fetcher({
488
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/job/${encodeURIComponent(jobId)}`),
496
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}`),
489
497
  method: "GET",
490
498
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
491
499
  ? yield core.Supplier.get(this._options.apiKey)
492
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
500
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
493
501
  contentType: "application/json",
494
502
  queryParameters: _queryParams,
495
503
  requestType: "json",
@@ -549,12 +557,13 @@ class Sync {
549
557
  */
550
558
  subscribeSyncJob(jobId, requestOptions) {
551
559
  return __awaiter(this, void 0, void 0, function* () {
560
+ var _a;
552
561
  const _response = yield core.fetcher({
553
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sync/job/${encodeURIComponent(jobId)}/subscribe`),
562
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}/subscribe`),
554
563
  method: "GET",
555
564
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
556
565
  ? yield core.Supplier.get(this._options.apiKey)
557
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
566
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
558
567
  contentType: "application/json",
559
568
  requestType: "json",
560
569
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as environments from "../../../../environments";
4
5
  import * as core from "../../../../core";
5
6
  import * as AirweaveSDK from "../../../index";
6
7
  export declare namespace Users {
7
8
  interface Options {
8
- environment: core.Supplier<string>;
9
+ environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
9
10
  /** Override the x-api-key header */
10
11
  apiKey?: core.Supplier<string | undefined>;
11
12
  }
@@ -24,7 +25,7 @@ export declare namespace Users {
24
25
  }
25
26
  export declare class Users {
26
27
  protected readonly _options: Users.Options;
27
- constructor(_options: Users.Options);
28
+ constructor(_options?: Users.Options);
28
29
  /**
29
30
  * Get current user.
30
31
  *
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.Users = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
52
53
  const core = __importStar(require("../../../../core"));
53
54
  const AirweaveSDK = __importStar(require("../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
55
56
  const serializers = __importStar(require("../../../../serialization/index"));
56
57
  const errors = __importStar(require("../../../../errors/index"));
57
58
  class Users {
58
- constructor(_options) {
59
+ constructor(_options = {}) {
59
60
  this._options = _options;
60
61
  }
61
62
  /**
@@ -78,12 +79,13 @@ class Users {
78
79
  */
79
80
  readUser(requestOptions) {
80
81
  return __awaiter(this, void 0, void 0, function* () {
82
+ var _a;
81
83
  const _response = yield core.fetcher({
82
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "users/"),
84
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "users/"),
83
85
  method: "GET",
84
86
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
85
87
  ? yield core.Supplier.get(this._options.apiKey)
86
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
88
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
89
  contentType: "application/json",
88
90
  requestType: "json",
89
91
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as environments from "../../../../environments";
4
5
  import * as core from "../../../../core";
5
6
  import * as AirweaveSDK from "../../../index";
6
7
  export declare namespace WhiteLabels {
7
8
  interface Options {
8
- environment: core.Supplier<string>;
9
+ environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
9
10
  /** Override the x-api-key header */
10
11
  apiKey?: core.Supplier<string | undefined>;
11
12
  }
@@ -24,7 +25,7 @@ export declare namespace WhiteLabels {
24
25
  }
25
26
  export declare class WhiteLabels {
26
27
  protected readonly _options: WhiteLabels.Options;
27
- constructor(_options: WhiteLabels.Options);
28
+ constructor(_options?: WhiteLabels.Options);
28
29
  /**
29
30
  * List all white labels for the current user's organization.
30
31
  *
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.WhiteLabels = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
52
53
  const core = __importStar(require("../../../../core"));
53
54
  const AirweaveSDK = __importStar(require("../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
55
56
  const serializers = __importStar(require("../../../../serialization/index"));
56
57
  const errors = __importStar(require("../../../../errors/index"));
57
58
  class WhiteLabels {
58
- constructor(_options) {
59
+ constructor(_options = {}) {
59
60
  this._options = _options;
60
61
  }
61
62
  /**
@@ -70,12 +71,13 @@ class WhiteLabels {
70
71
  */
71
72
  listWhiteLabels(requestOptions) {
72
73
  return __awaiter(this, void 0, void 0, function* () {
74
+ var _a;
73
75
  const _response = yield core.fetcher({
74
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "white_labels/list"),
76
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/list"),
75
77
  method: "GET",
76
78
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
77
79
  ? yield core.Supplier.get(this._options.apiKey)
78
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.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),
80
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
81
  contentType: "application/json",
80
82
  requestType: "json",
81
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -140,12 +142,13 @@ class WhiteLabels {
140
142
  */
141
143
  createWhiteLabel(request, requestOptions) {
142
144
  return __awaiter(this, void 0, void 0, function* () {
145
+ var _a;
143
146
  const _response = yield core.fetcher({
144
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "white_labels/"),
147
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/"),
145
148
  method: "POST",
146
149
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
147
150
  ? yield core.Supplier.get(this._options.apiKey)
148
- : 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),
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
149
152
  contentType: "application/json",
150
153
  requestType: "json",
151
154
  body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -205,12 +208,13 @@ class WhiteLabels {
205
208
  */
206
209
  getWhiteLabel(whiteLabelId, requestOptions) {
207
210
  return __awaiter(this, void 0, void 0, function* () {
211
+ var _a;
208
212
  const _response = yield core.fetcher({
209
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
213
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
210
214
  method: "GET",
211
215
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
212
216
  ? yield core.Supplier.get(this._options.apiKey)
213
- : 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),
217
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
218
  contentType: "application/json",
215
219
  requestType: "json",
216
220
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -270,12 +274,13 @@ class WhiteLabels {
270
274
  */
271
275
  updateWhiteLabel(whiteLabelId_1) {
272
276
  return __awaiter(this, arguments, void 0, function* (whiteLabelId, request = {}, requestOptions) {
277
+ var _a;
273
278
  const _response = yield core.fetcher({
274
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
279
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
275
280
  method: "PUT",
276
281
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
277
282
  ? yield core.Supplier.get(this._options.apiKey)
278
- : 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),
283
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
284
  contentType: "application/json",
280
285
  requestType: "json",
281
286
  body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -335,12 +340,13 @@ class WhiteLabels {
335
340
  */
336
341
  deleteWhiteLabel(whiteLabelId, requestOptions) {
337
342
  return __awaiter(this, void 0, void 0, function* () {
343
+ var _a;
338
344
  const _response = yield core.fetcher({
339
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}`),
345
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
340
346
  method: "DELETE",
341
347
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
342
348
  ? yield core.Supplier.get(this._options.apiKey)
343
- : 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),
349
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
344
350
  contentType: "application/json",
345
351
  requestType: "json",
346
352
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -399,12 +405,13 @@ class WhiteLabels {
399
405
  */
400
406
  getWhiteLabelOauth2AuthUrl(whiteLabelId, requestOptions) {
401
407
  return __awaiter(this, void 0, void 0, function* () {
408
+ var _a;
402
409
  const _response = yield core.fetcher({
403
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/auth_url`),
410
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/auth_url`),
404
411
  method: "GET",
405
412
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
406
413
  ? yield core.Supplier.get(this._options.apiKey)
407
- : 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),
414
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
415
  contentType: "application/json",
409
416
  requestType: "json",
410
417
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -464,12 +471,13 @@ class WhiteLabels {
464
471
  */
465
472
  exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
466
473
  return __awaiter(this, void 0, void 0, function* () {
474
+ var _a;
467
475
  const _response = yield core.fetcher({
468
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/code`),
476
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/oauth2/code`),
469
477
  method: "POST",
470
478
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
471
479
  ? yield core.Supplier.get(this._options.apiKey)
472
- : 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),
480
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
473
481
  contentType: "application/json",
474
482
  requestType: "json",
475
483
  body: serializers.whiteLabels.exchangeWhiteLabelOauth2Code.Request.jsonOrThrow(request, {
@@ -531,12 +539,13 @@ class WhiteLabels {
531
539
  */
532
540
  listWhiteLabelSyncs(whiteLabelId, requestOptions) {
533
541
  return __awaiter(this, void 0, void 0, function* () {
542
+ var _a;
534
543
  const _response = yield core.fetcher({
535
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `white_labels/${encodeURIComponent(whiteLabelId)}/syncs`),
544
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/syncs`),
536
545
  method: "GET",
537
546
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
538
547
  ? yield core.Supplier.get(this._options.apiKey)
539
- : 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),
548
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@airweave/sdk/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
540
549
  contentType: "application/json",
541
550
  requestType: "json",
542
551
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2,8 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * @example
6
- * {}
5
+ * Schema for creating an APIKey object.
7
6
  */
8
7
  export interface ApiKeyCreate {
9
8
  expirationDate?: Date;
@@ -2,11 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * @example
6
- * {
7
- * name: "name",
8
- * syncId: "sync_id"
9
- * }
5
+ * Schema for creating a chat.
10
6
  */
11
7
  export interface ChatCreate {
12
8
  name: string;
@@ -2,10 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * @example
6
- * {
7
- * content: "content"
8
- * }
5
+ * Schema for creating a chat message.
9
6
  */
10
7
  export interface ChatMessageCreate {
11
8
  content: string;
@@ -2,8 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * @example
6
- * {}
5
+ * Schema for updating a chat.
7
6
  */
8
7
  export interface ChatUpdate {
9
8
  name?: string;
@@ -1,8 +1,12 @@
1
1
  export * from "./ApiKey";
2
+ export * from "./ApiKeyCreate";
2
3
  export * from "./ApiKeyWithPlainKey";
3
4
  export * from "./AuthType";
4
5
  export * from "./Chat";
6
+ export * from "./ChatCreate";
5
7
  export * from "./ChatMessage";
8
+ export * from "./ChatMessageCreate";
9
+ export * from "./ChatUpdate";
6
10
  export * from "./ConfigField";
7
11
  export * from "./Connection";
8
12
  export * from "./ConnectionStatus";
@@ -15,10 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ApiKey"), exports);
18
+ __exportStar(require("./ApiKeyCreate"), exports);
18
19
  __exportStar(require("./ApiKeyWithPlainKey"), exports);
19
20
  __exportStar(require("./AuthType"), exports);
20
21
  __exportStar(require("./Chat"), exports);
22
+ __exportStar(require("./ChatCreate"), exports);
21
23
  __exportStar(require("./ChatMessage"), exports);
24
+ __exportStar(require("./ChatMessageCreate"), exports);
25
+ __exportStar(require("./ChatUpdate"), exports);
22
26
  __exportStar(require("./ConfigField"), exports);
23
27
  __exportStar(require("./Connection"), exports);
24
28
  __exportStar(require("./ConnectionStatus"), exports);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare const AirweaveSDKEnvironment: {
5
+ readonly Production: "https://api.airweave.ai";
6
+ readonly Local: "http://localhost:8001";
7
+ };
8
+ export type AirweaveSDKEnvironment = typeof AirweaveSDKEnvironment.Production | typeof AirweaveSDKEnvironment.Local;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AirweaveSDKEnvironment = void 0;
7
+ exports.AirweaveSDKEnvironment = {
8
+ Production: "https://api.airweave.ai",
9
+ Local: "http://localhost:8001",
10
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * as AirweaveSDK from "./api";
2
2
  export { AirweaveSDKClient } from "./Client";
3
+ export { AirweaveSDKEnvironment } from "./environments";
3
4
  export { AirweaveSDKError, AirweaveSDKTimeoutError } from "./errors";
package/dist/index.js CHANGED
@@ -33,10 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.AirweaveSDKTimeoutError = exports.AirweaveSDKError = exports.AirweaveSDKClient = exports.AirweaveSDK = void 0;
36
+ exports.AirweaveSDKTimeoutError = exports.AirweaveSDKError = exports.AirweaveSDKEnvironment = exports.AirweaveSDKClient = exports.AirweaveSDK = void 0;
37
37
  exports.AirweaveSDK = __importStar(require("./api"));
38
38
  var Client_1 = require("./Client");
39
39
  Object.defineProperty(exports, "AirweaveSDKClient", { enumerable: true, get: function () { return Client_1.AirweaveSDKClient; } });
40
+ var environments_1 = require("./environments");
41
+ Object.defineProperty(exports, "AirweaveSDKEnvironment", { enumerable: true, get: function () { return environments_1.AirweaveSDKEnvironment; } });
40
42
  var errors_1 = require("./errors");
41
43
  Object.defineProperty(exports, "AirweaveSDKError", { enumerable: true, get: function () { return errors_1.AirweaveSDKError; } });
42
44
  Object.defineProperty(exports, "AirweaveSDKTimeoutError", { enumerable: true, get: function () { return errors_1.AirweaveSDKTimeoutError; } });
@@ -1,15 +1,10 @@
1
1
  export * as sync from "./sync";
2
2
  export * from "./sync/types";
3
- export * as health from "./health";
4
- export * as apiKeys from "./apiKeys";
5
3
  export * as sources from "./sources";
6
4
  export * as destinations from "./destinations";
7
5
  export * as embeddingModels from "./embeddingModels";
8
6
  export * as connections from "./connections";
9
7
  export * as whiteLabels from "./whiteLabels";
10
- export * as chat from "./chat";
11
- export * from "./apiKeys/client/requests";
12
8
  export * from "./connections/client/requests";
13
9
  export * from "./sync/client/requests";
14
10
  export * from "./whiteLabels/client/requests";
15
- export * from "./chat/client/requests";