@airweave/sdk 0.1.46 → 0.1.49

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 (134) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/collections/client/Client.d.ts +54 -0
  3. package/dist/cjs/api/resources/collections/client/Client.js +114 -1
  4. package/dist/cjs/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +16 -0
  5. package/dist/cjs/api/resources/collections/client/requests/SearchRequest.d.ts +40 -0
  6. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +3 -0
  8. package/dist/cjs/api/resources/sourceConnections/client/Client.js +3 -0
  9. package/dist/cjs/api/resources/sources/client/Client.d.ts +3 -0
  10. package/dist/cjs/api/resources/sources/client/Client.js +3 -0
  11. package/dist/cjs/api/resources/whiteLabels/client/Client.d.ts +10 -7
  12. package/dist/cjs/api/resources/whiteLabels/client/Client.js +12 -9
  13. package/dist/cjs/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.d.ts → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts} +1 -1
  14. package/dist/cjs/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +5 -0
  15. package/dist/cjs/api/resources/whiteLabels/client/requests/index.d.ts +1 -1
  16. package/dist/cjs/api/types/DatetimeRange.d.ts +34 -0
  17. package/dist/cjs/api/types/DatetimeRange.js +5 -0
  18. package/dist/cjs/api/types/FieldCondition.d.ts +33 -0
  19. package/dist/cjs/api/types/FieldCondition.js +5 -0
  20. package/dist/cjs/api/types/Filter.d.ts +28 -0
  21. package/dist/cjs/api/types/Filter.js +5 -0
  22. package/dist/cjs/api/types/GeoBoundingBox.d.ts +13 -0
  23. package/dist/cjs/api/types/GeoBoundingBox.js +5 -0
  24. package/dist/cjs/api/types/GeoLineString.d.ts +11 -0
  25. package/dist/cjs/api/types/GeoLineString.js +5 -0
  26. package/dist/cjs/api/types/GeoPoint.d.ts +12 -0
  27. package/dist/cjs/api/types/GeoPoint.js +5 -0
  28. package/dist/cjs/api/types/GeoPolygon.d.ts +13 -0
  29. package/dist/cjs/api/types/GeoPolygon.js +5 -0
  30. package/dist/cjs/api/types/GeoRadius.d.ts +13 -0
  31. package/dist/cjs/api/types/GeoRadius.js +5 -0
  32. package/dist/cjs/api/types/HasIdCondition.d.ts +16 -0
  33. package/dist/cjs/api/types/HasIdCondition.js +5 -0
  34. package/dist/cjs/api/types/HasVectorCondition.d.ts +10 -0
  35. package/dist/cjs/api/types/HasVectorCondition.js +5 -0
  36. package/dist/cjs/api/types/IsEmptyCondition.d.ts +11 -0
  37. package/dist/cjs/api/types/IsEmptyCondition.js +5 -0
  38. package/dist/cjs/api/types/IsNullCondition.d.ts +11 -0
  39. package/dist/cjs/api/types/IsNullCondition.js +5 -0
  40. package/dist/cjs/api/types/MatchAny.d.ts +16 -0
  41. package/dist/cjs/api/types/MatchAny.js +5 -0
  42. package/dist/cjs/api/types/MatchExcept.d.ts +16 -0
  43. package/dist/cjs/api/types/MatchExcept.js +5 -0
  44. package/dist/cjs/api/types/MatchText.d.ts +10 -0
  45. package/dist/cjs/api/types/MatchText.js +5 -0
  46. package/dist/cjs/api/types/MatchValue.d.ts +16 -0
  47. package/dist/cjs/api/types/MatchValue.js +5 -0
  48. package/dist/cjs/api/types/MinShould.d.ts +16 -0
  49. package/dist/cjs/api/types/MinShould.js +5 -0
  50. package/dist/cjs/api/types/Nested.d.ts +13 -0
  51. package/dist/cjs/api/types/Nested.js +5 -0
  52. package/dist/cjs/api/types/NestedCondition.d.ts +8 -0
  53. package/dist/cjs/api/types/NestedCondition.js +5 -0
  54. package/dist/cjs/api/types/PayloadField.d.ts +10 -0
  55. package/dist/cjs/api/types/PayloadField.js +5 -0
  56. package/dist/cjs/api/types/QueryExpansionStrategy.d.ts +12 -0
  57. package/dist/cjs/api/types/QueryExpansionStrategy.js +11 -0
  58. package/dist/cjs/api/types/Range.d.ts +16 -0
  59. package/dist/cjs/api/types/Range.js +5 -0
  60. package/dist/cjs/api/types/ValuesCount.d.ts +16 -0
  61. package/dist/cjs/api/types/ValuesCount.js +5 -0
  62. package/dist/cjs/api/types/index.d.ts +23 -0
  63. package/dist/cjs/api/types/index.js +23 -0
  64. package/dist/cjs/version.d.ts +1 -1
  65. package/dist/cjs/version.js +1 -1
  66. package/dist/esm/Client.mjs +2 -2
  67. package/dist/esm/api/resources/collections/client/Client.d.mts +54 -0
  68. package/dist/esm/api/resources/collections/client/Client.mjs +114 -1
  69. package/dist/esm/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.mts +16 -0
  70. package/dist/esm/api/resources/collections/client/requests/SearchRequest.d.mts +40 -0
  71. package/dist/esm/api/resources/collections/client/requests/index.d.mts +1 -0
  72. package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +3 -0
  73. package/dist/esm/api/resources/sourceConnections/client/Client.mjs +3 -0
  74. package/dist/esm/api/resources/sources/client/Client.d.mts +3 -0
  75. package/dist/esm/api/resources/sources/client/Client.mjs +3 -0
  76. package/dist/esm/api/resources/whiteLabels/client/Client.d.mts +10 -7
  77. package/dist/esm/api/resources/whiteLabels/client/Client.mjs +12 -9
  78. package/dist/esm/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.d.mts → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.mts} +1 -1
  79. package/dist/esm/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs +4 -0
  80. package/dist/esm/api/resources/whiteLabels/client/requests/index.d.mts +1 -1
  81. package/dist/esm/api/types/DatetimeRange.d.mts +34 -0
  82. package/dist/esm/api/types/DatetimeRange.mjs +4 -0
  83. package/dist/esm/api/types/FieldCondition.d.mts +33 -0
  84. package/dist/esm/api/types/FieldCondition.mjs +4 -0
  85. package/dist/esm/api/types/Filter.d.mts +28 -0
  86. package/dist/esm/api/types/Filter.mjs +4 -0
  87. package/dist/esm/api/types/GeoBoundingBox.d.mts +13 -0
  88. package/dist/esm/api/types/GeoBoundingBox.mjs +4 -0
  89. package/dist/esm/api/types/GeoLineString.d.mts +11 -0
  90. package/dist/esm/api/types/GeoLineString.mjs +4 -0
  91. package/dist/esm/api/types/GeoPoint.d.mts +12 -0
  92. package/dist/esm/api/types/GeoPoint.mjs +4 -0
  93. package/dist/esm/api/types/GeoPolygon.d.mts +13 -0
  94. package/dist/esm/api/types/GeoPolygon.mjs +4 -0
  95. package/dist/esm/api/types/GeoRadius.d.mts +13 -0
  96. package/dist/esm/api/types/GeoRadius.mjs +4 -0
  97. package/dist/esm/api/types/HasIdCondition.d.mts +16 -0
  98. package/dist/esm/api/types/HasIdCondition.mjs +4 -0
  99. package/dist/esm/api/types/HasVectorCondition.d.mts +10 -0
  100. package/dist/esm/api/types/HasVectorCondition.mjs +4 -0
  101. package/dist/esm/api/types/IsEmptyCondition.d.mts +11 -0
  102. package/dist/esm/api/types/IsEmptyCondition.mjs +4 -0
  103. package/dist/esm/api/types/IsNullCondition.d.mts +11 -0
  104. package/dist/esm/api/types/IsNullCondition.mjs +4 -0
  105. package/dist/esm/api/types/MatchAny.d.mts +16 -0
  106. package/dist/esm/api/types/MatchAny.mjs +4 -0
  107. package/dist/esm/api/types/MatchExcept.d.mts +16 -0
  108. package/dist/esm/api/types/MatchExcept.mjs +4 -0
  109. package/dist/esm/api/types/MatchText.d.mts +10 -0
  110. package/dist/esm/api/types/MatchText.mjs +4 -0
  111. package/dist/esm/api/types/MatchValue.d.mts +16 -0
  112. package/dist/esm/api/types/MatchValue.mjs +4 -0
  113. package/dist/esm/api/types/MinShould.d.mts +16 -0
  114. package/dist/esm/api/types/MinShould.mjs +4 -0
  115. package/dist/esm/api/types/Nested.d.mts +13 -0
  116. package/dist/esm/api/types/Nested.mjs +4 -0
  117. package/dist/esm/api/types/NestedCondition.d.mts +8 -0
  118. package/dist/esm/api/types/NestedCondition.mjs +4 -0
  119. package/dist/esm/api/types/PayloadField.d.mts +10 -0
  120. package/dist/esm/api/types/PayloadField.mjs +4 -0
  121. package/dist/esm/api/types/QueryExpansionStrategy.d.mts +12 -0
  122. package/dist/esm/api/types/QueryExpansionStrategy.mjs +8 -0
  123. package/dist/esm/api/types/Range.d.mts +16 -0
  124. package/dist/esm/api/types/Range.mjs +4 -0
  125. package/dist/esm/api/types/ValuesCount.d.mts +16 -0
  126. package/dist/esm/api/types/ValuesCount.mjs +4 -0
  127. package/dist/esm/api/types/index.d.mts +23 -0
  128. package/dist/esm/api/types/index.mjs +23 -0
  129. package/dist/esm/version.d.mts +1 -1
  130. package/dist/esm/version.mjs +1 -1
  131. package/package.json +1 -1
  132. package/reference.md +119 -9
  133. /package/dist/cjs/api/resources/{whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.js → collections/client/requests/SearchRequest.js} +0 -0
  134. /package/dist/esm/api/resources/{whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.mjs → collections/client/requests/SearchRequest.mjs} +0 -0
@@ -15,6 +15,9 @@ import * as core from "../../../../core/index.mjs";
15
15
  import * as AirweaveSDK from "../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
+ /**
19
+ * API endpoints for managing collections - logical groups of data sources that provide unified search capabilities
20
+ */
18
21
  export class Collections {
19
22
  constructor(_options) {
20
23
  this._options = _options;
@@ -350,6 +353,9 @@ export class Collections {
350
353
  /**
351
354
  * Search across all data sources within the specified collection.
352
355
  *
356
+ * This GET endpoint provides basic search functionality. For advanced filtering
357
+ * and options, use the POST /search endpoint.
358
+ *
353
359
  * @param {string} readableId - The unique readable identifier of the collection to search
354
360
  * @param {AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest} request
355
361
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -367,12 +373,24 @@ export class Collections {
367
373
  __searchCollection(readableId, request, requestOptions) {
368
374
  return __awaiter(this, void 0, void 0, function* () {
369
375
  var _a, _b, _c;
370
- const { query, response_type: responseType } = request;
376
+ const { query, response_type: responseType, limit, offset, score_threshold: scoreThreshold, expansion_strategy: expansionStrategy, } = request;
371
377
  const _queryParams = {};
372
378
  _queryParams["query"] = query;
373
379
  if (responseType != null) {
374
380
  _queryParams["response_type"] = responseType;
375
381
  }
382
+ if (limit != null) {
383
+ _queryParams["limit"] = limit.toString();
384
+ }
385
+ if (offset != null) {
386
+ _queryParams["offset"] = offset.toString();
387
+ }
388
+ if (scoreThreshold != null) {
389
+ _queryParams["score_threshold"] = scoreThreshold.toString();
390
+ }
391
+ if (expansionStrategy != null) {
392
+ _queryParams["expansion_strategy"] = expansionStrategy;
393
+ }
376
394
  const _response = yield core.fetcher({
377
395
  url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
378
396
  method: "GET",
@@ -414,6 +432,101 @@ export class Collections {
414
432
  }
415
433
  });
416
434
  }
435
+ /**
436
+ * Advanced search with comprehensive filtering and options.
437
+ *
438
+ * This endpoint supports:
439
+ * - Metadata filtering using Qdrant's native filter syntax
440
+ * - Pagination with offset and limit
441
+ * - Score threshold filtering
442
+ * - Query expansion strategies
443
+ * - Result summarization
444
+ * - Control over included metadata and vectors
445
+ *
446
+ * Example request body:
447
+ * ```json
448
+ * {
449
+ * "query": "customer payment issues",
450
+ * "filter": {
451
+ * "must": [
452
+ * {"key": "source", "match": {"value": "stripe"}},
453
+ * {"key": "created_at", "range": {"gte": "2024-01-01T00:00:00Z"}}
454
+ * ]
455
+ * },
456
+ * "limit": 50,
457
+ * "score_threshold": 0.7,
458
+ * "response_type": "completion"
459
+ * }
460
+ * ```
461
+ *
462
+ * @param {string} readableId - The unique readable identifier of the collection to search
463
+ * @param {AirweaveSDK.SearchRequest} request
464
+ * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
465
+ *
466
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
467
+ *
468
+ * @example
469
+ * await client.collections.searchCollectionAdvanced("readable_id", {
470
+ * query: "customer payment issues",
471
+ * filter: {
472
+ * must: {
473
+ * key: "key"
474
+ * }
475
+ * },
476
+ * limit: 50,
477
+ * score_threshold: 0.7,
478
+ * response_type: "completion"
479
+ * })
480
+ */
481
+ searchCollectionAdvanced(readableId, request, requestOptions) {
482
+ return core.HttpResponsePromise.fromPromise(this.__searchCollectionAdvanced(readableId, request, requestOptions));
483
+ }
484
+ __searchCollectionAdvanced(readableId, request, requestOptions) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ var _a, _b, _c;
487
+ const _response = yield core.fetcher({
488
+ url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
489
+ method: "POST",
490
+ headers: mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
491
+ contentType: "application/json",
492
+ requestType: "json",
493
+ body: request,
494
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
495
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
496
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
497
+ });
498
+ if (_response.ok) {
499
+ return { data: _response.body, rawResponse: _response.rawResponse };
500
+ }
501
+ if (_response.error.reason === "status-code") {
502
+ switch (_response.error.statusCode) {
503
+ case 422:
504
+ throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
505
+ default:
506
+ throw new errors.AirweaveSDKError({
507
+ statusCode: _response.error.statusCode,
508
+ body: _response.error.body,
509
+ rawResponse: _response.rawResponse,
510
+ });
511
+ }
512
+ }
513
+ switch (_response.error.reason) {
514
+ case "non-json":
515
+ throw new errors.AirweaveSDKError({
516
+ statusCode: _response.error.statusCode,
517
+ body: _response.error.rawBody,
518
+ rawResponse: _response.rawResponse,
519
+ });
520
+ case "timeout":
521
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search.");
522
+ case "unknown":
523
+ throw new errors.AirweaveSDKError({
524
+ message: _response.error.errorMessage,
525
+ rawResponse: _response.rawResponse,
526
+ });
527
+ }
528
+ });
529
+ }
417
530
  /**
418
531
  * Trigger data synchronization for all source connections in the collection.
419
532
  *
@@ -17,4 +17,20 @@ export interface SearchCollectionCollectionsReadableIdSearchGetRequest {
17
17
  * Format of the response: 'raw' returns search results, 'completion' returns AI-generated answers
18
18
  */
19
19
  response_type?: AirweaveSDK.ResponseType;
20
+ /**
21
+ * Maximum number of results to return
22
+ */
23
+ limit?: number;
24
+ /**
25
+ * Number of results to skip for pagination
26
+ */
27
+ offset?: number;
28
+ /**
29
+ * Minimum similarity score threshold
30
+ */
31
+ score_threshold?: number;
32
+ /**
33
+ * Query expansion strategy (auto, llm, or no_expansion)
34
+ */
35
+ expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
20
36
  }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * query: "customer payment issues",
9
+ * filter: {
10
+ * must: {
11
+ * key: "key"
12
+ * }
13
+ * },
14
+ * limit: 50,
15
+ * score_threshold: 0.7,
16
+ * response_type: "completion"
17
+ * }
18
+ */
19
+ export interface SearchRequest {
20
+ /** The search query text */
21
+ query: string;
22
+ /** Qdrant native filter for metadata-based filtering */
23
+ filter?: AirweaveSDK.Filter;
24
+ /** Number of results to skip */
25
+ offset?: number;
26
+ /** Maximum number of results to return */
27
+ limit?: number;
28
+ /** Minimum similarity score threshold */
29
+ score_threshold?: number;
30
+ /** Whether to summarize results */
31
+ summarize?: boolean;
32
+ /** Type of response (raw or completion) */
33
+ response_type?: AirweaveSDK.ResponseType;
34
+ /** Query expansion strategy */
35
+ expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
36
+ /** Whether to include metadata in results */
37
+ include_metadata?: boolean;
38
+ /** Whether to include vectors in response */
39
+ with_vectors?: boolean;
40
+ }
@@ -3,3 +3,4 @@ export { type CollectionCreate } from "./CollectionCreate.mjs";
3
3
  export { type CollectionUpdate } from "./CollectionUpdate.mjs";
4
4
  export { type DeleteCollectionCollectionsReadableIdDeleteRequest } from "./DeleteCollectionCollectionsReadableIdDeleteRequest.mjs";
5
5
  export { type SearchCollectionCollectionsReadableIdSearchGetRequest } from "./SearchCollectionCollectionsReadableIdSearchGetRequest.mjs";
6
+ export { type SearchRequest } from "./SearchRequest.mjs";
@@ -24,6 +24,9 @@ export declare namespace SourceConnections {
24
24
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
25
  }
26
26
  }
27
+ /**
28
+ * API endpoints for managing live connections to data sources. Source connections are the actual configured instances that Airweave uses to sync data from your apps and databases, transforming it into searchable, structured information within collections
29
+ */
27
30
  export declare class SourceConnections {
28
31
  protected readonly _options: SourceConnections.Options;
29
32
  constructor(_options: SourceConnections.Options);
@@ -15,6 +15,9 @@ import * as core from "../../../../core/index.mjs";
15
15
  import * as AirweaveSDK from "../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
+ /**
19
+ * API endpoints for managing live connections to data sources. Source connections are the actual configured instances that Airweave uses to sync data from your apps and databases, transforming it into searchable, structured information within collections
20
+ */
18
21
  export class SourceConnections {
19
22
  constructor(_options) {
20
23
  this._options = _options;
@@ -24,6 +24,9 @@ export declare namespace Sources {
24
24
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
25
  }
26
26
  }
27
+ /**
28
+ * API endpoints for discovering available data source connectors and their configuration requirements
29
+ */
27
30
  export declare class Sources {
28
31
  protected readonly _options: Sources.Options;
29
32
  constructor(_options: Sources.Options);
@@ -15,6 +15,9 @@ import * as core from "../../../../core/index.mjs";
15
15
  import * as AirweaveSDK from "../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
+ /**
19
+ * API endpoints for discovering available data source connectors and their configuration requirements
20
+ */
18
21
  export class Sources {
19
22
  constructor(_options) {
20
23
  this._options = _options;
@@ -24,6 +24,9 @@ export declare namespace WhiteLabels {
24
24
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
25
  }
26
26
  }
27
+ /**
28
+ * API endpoints for managing custom OAuth2 integrations with your own branding and credentials
29
+ */
27
30
  export declare class WhiteLabels {
28
31
  protected readonly _options: WhiteLabels.Options;
29
32
  constructor(_options: WhiteLabels.Options);
@@ -137,10 +140,10 @@ export declare class WhiteLabels {
137
140
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
138
141
  *
139
142
  * @example
140
- * await client.whiteLabels.getWhiteLabelOauth2AuthUrl("white_label_id")
143
+ * await client.whiteLabels.getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions("white_label_id")
141
144
  */
142
- getWhiteLabelOauth2AuthUrl(whiteLabelId: string, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<string>;
143
- private __getWhiteLabelOauth2AuthUrl;
145
+ getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions(whiteLabelId: string, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<string>;
146
+ private __getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions;
144
147
  /**
145
148
  * List all source connections created through a specific white label integration.
146
149
  *
@@ -168,18 +171,18 @@ export declare class WhiteLabels {
168
171
  * tracking and branding purposes.
169
172
  *
170
173
  * @param {string} whiteLabelId - The unique identifier of the white label integration
171
- * @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
174
+ * @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions} request
172
175
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
173
176
  *
174
177
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
175
178
  *
176
179
  * @example
177
- * await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
180
+ * await client.whiteLabels.exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions("white_label_id", {
178
181
  * code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
179
182
  * })
180
183
  */
181
- exchangeWhiteLabelOauth2Code(whiteLabelId: string, request: AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
182
- private __exchangeWhiteLabelOauth2Code;
184
+ exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions(whiteLabelId: string, request: AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
185
+ private __exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions;
183
186
  protected _getCustomAuthorizationHeaders(): Promise<{
184
187
  "x-api-key": string;
185
188
  }>;
@@ -15,6 +15,9 @@ import * as core from "../../../../core/index.mjs";
15
15
  import * as AirweaveSDK from "../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
+ /**
19
+ * API endpoints for managing custom OAuth2 integrations with your own branding and credentials
20
+ */
18
21
  export class WhiteLabels {
19
22
  constructor(_options) {
20
23
  this._options = _options;
@@ -355,12 +358,12 @@ export class WhiteLabels {
355
358
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
356
359
  *
357
360
  * @example
358
- * await client.whiteLabels.getWhiteLabelOauth2AuthUrl("white_label_id")
361
+ * await client.whiteLabels.getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions("white_label_id")
359
362
  */
360
- getWhiteLabelOauth2AuthUrl(whiteLabelId, requestOptions) {
361
- return core.HttpResponsePromise.fromPromise(this.__getWhiteLabelOauth2AuthUrl(whiteLabelId, requestOptions));
363
+ getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions(whiteLabelId, requestOptions) {
364
+ return core.HttpResponsePromise.fromPromise(this.__getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions(whiteLabelId, requestOptions));
362
365
  }
363
- __getWhiteLabelOauth2AuthUrl(whiteLabelId, requestOptions) {
366
+ __getWhiteLabelOauth2AuthUrlWhiteLabelsWhiteLabelIdOauth2AuthUrlOptions(whiteLabelId, requestOptions) {
364
367
  return __awaiter(this, void 0, void 0, function* () {
365
368
  var _a, _b, _c;
366
369
  const _response = yield core.fetcher({
@@ -477,20 +480,20 @@ export class WhiteLabels {
477
480
  * tracking and branding purposes.
478
481
  *
479
482
  * @param {string} whiteLabelId - The unique identifier of the white label integration
480
- * @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
483
+ * @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions} request
481
484
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
482
485
  *
483
486
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
484
487
  *
485
488
  * @example
486
- * await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
489
+ * await client.whiteLabels.exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions("white_label_id", {
487
490
  * code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
488
491
  * })
489
492
  */
490
- exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
491
- return core.HttpResponsePromise.fromPromise(this.__exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions));
493
+ exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions(whiteLabelId, request, requestOptions) {
494
+ return core.HttpResponsePromise.fromPromise(this.__exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions(whiteLabelId, request, requestOptions));
492
495
  }
493
- __exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
496
+ __exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions(whiteLabelId, request, requestOptions) {
494
497
  return __awaiter(this, void 0, void 0, function* () {
495
498
  var _a, _b, _c;
496
499
  const _response = yield core.fetcher({
@@ -8,7 +8,7 @@ import * as AirweaveSDK from "../../../../index.mjs";
8
8
  * code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
9
9
  * }
10
10
  */
11
- export interface BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost {
11
+ export interface BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions {
12
12
  /** The OAuth2 authorization code received from the OAuth callback after customer authentication */
13
13
  code: string;
14
14
  /** Optional configuration for the source connection. If not provided, a source connection will be created automatically with default settings. The white label integration is automatically linked to the source connection. */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,3 +1,3 @@
1
1
  export { type WhiteLabelCreate } from "./WhiteLabelCreate.mjs";
2
2
  export { type WhiteLabelUpdate } from "./WhiteLabelUpdate.mjs";
3
- export { type BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost } from "./BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.mjs";
3
+ export { type BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions } from "./BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Range filter request
6
+ */
7
+ export interface DatetimeRange {
8
+ /** point.key &lt; range.lt */
9
+ lt?: DatetimeRange.Lt;
10
+ /** point.key &gt; range.gt */
11
+ gt?: DatetimeRange.Gt;
12
+ /** point.key &gt;= range.gte */
13
+ gte?: DatetimeRange.Gte;
14
+ /** point.key &lt;= range.lte */
15
+ lte?: DatetimeRange.Lte;
16
+ }
17
+ export declare namespace DatetimeRange {
18
+ /**
19
+ * point.key &lt; range.lt
20
+ */
21
+ type Lt = string | string;
22
+ /**
23
+ * point.key &gt; range.gt
24
+ */
25
+ type Gt = string | string;
26
+ /**
27
+ * point.key &gt;= range.gte
28
+ */
29
+ type Gte = string | string;
30
+ /**
31
+ * point.key &lt;= range.lte
32
+ */
33
+ type Lte = string | string;
34
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * All possible payload filtering conditions
7
+ */
8
+ export interface FieldCondition {
9
+ /** Payload key */
10
+ key: string;
11
+ /** Check if point has field with a given value */
12
+ match?: FieldCondition.Match;
13
+ /** Check if points value lies in a given range */
14
+ range?: AirweaveSDK.Range;
15
+ /** Check if points geolocation lies in a given area */
16
+ geo_bounding_box?: AirweaveSDK.GeoBoundingBox;
17
+ /** Check if geo point is within a given radius */
18
+ geo_radius?: AirweaveSDK.GeoRadius;
19
+ /** Check if geo point is within a given polygon */
20
+ geo_polygon?: AirweaveSDK.GeoPolygon;
21
+ /** Check number of values of the field */
22
+ values_count?: AirweaveSDK.ValuesCount;
23
+ /** Check that the field is empty, alternative syntax for `is_empty: \&quot;field_name\&quot;` */
24
+ is_empty?: boolean;
25
+ /** Check that the field is null, alternative syntax for `is_null: \&quot;field_name\&quot;` */
26
+ is_null?: boolean;
27
+ }
28
+ export declare namespace FieldCondition {
29
+ /**
30
+ * Check if point has field with a given value
31
+ */
32
+ type Match = AirweaveSDK.MatchValue | AirweaveSDK.MatchText | AirweaveSDK.MatchAny | AirweaveSDK.MatchExcept;
33
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ export interface Filter {
6
+ /** At least one of those conditions should match */
7
+ should?: Filter.Should;
8
+ /** At least minimum amount of given conditions should match */
9
+ min_should?: AirweaveSDK.MinShould;
10
+ /** All conditions must match */
11
+ must?: Filter.Must;
12
+ /** All conditions must NOT match */
13
+ must_not?: Filter.MustNot;
14
+ }
15
+ export declare namespace Filter {
16
+ /**
17
+ * At least one of those conditions should match
18
+ */
19
+ type Should = (AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter)[] | AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter;
20
+ /**
21
+ * All conditions must match
22
+ */
23
+ type Must = (AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter)[] | AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter;
24
+ /**
25
+ * All conditions must NOT match
26
+ */
27
+ type MustNot = (AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter)[] | AirweaveSDK.FieldCondition | AirweaveSDK.IsEmptyCondition | AirweaveSDK.IsNullCondition | AirweaveSDK.HasIdCondition | AirweaveSDK.HasVectorCondition | AirweaveSDK.NestedCondition | AirweaveSDK.Filter;
28
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Geo filter request Matches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges
7
+ */
8
+ export interface GeoBoundingBox {
9
+ /** Geo filter request Matches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges */
10
+ top_left: AirweaveSDK.GeoPoint;
11
+ /** Geo filter request Matches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges */
12
+ bottom_right: AirweaveSDK.GeoPoint;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Ordered sequence of GeoPoints representing the line
7
+ */
8
+ export interface GeoLineString {
9
+ /** Ordered sequence of GeoPoints representing the line */
10
+ points: AirweaveSDK.GeoPoint[];
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Geo point payload schema
6
+ */
7
+ export interface GeoPoint {
8
+ /** Geo point payload schema */
9
+ lon: number;
10
+ /** Geo point payload schema */
11
+ lat: number;
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Geo filter request Matches coordinates inside the polygon, defined by `exterior` and `interiors`
7
+ */
8
+ export interface GeoPolygon {
9
+ /** Geo filter request Matches coordinates inside the polygon, defined by `exterior` and `interiors` */
10
+ exterior: AirweaveSDK.GeoLineString;
11
+ /** Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same. */
12
+ interiors?: AirweaveSDK.GeoLineString[];
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Geo filter request Matches coordinates inside the circle of `radius` and center with coordinates `center`
7
+ */
8
+ export interface GeoRadius {
9
+ /** Geo filter request Matches coordinates inside the circle of `radius` and center with coordinates `center` */
10
+ center: AirweaveSDK.GeoPoint;
11
+ /** Radius of the area in meters */
12
+ radius: number;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ID-based filtering condition
6
+ */
7
+ export interface HasIdCondition {
8
+ /** ID-based filtering condition */
9
+ has_id: HasIdCondition.HasId.Item[];
10
+ }
11
+ export declare namespace HasIdCondition {
12
+ type HasId = HasId.Item[];
13
+ namespace HasId {
14
+ type Item = number | string;
15
+ }
16
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Filter points which have specific vector assigned
6
+ */
7
+ export interface HasVectorCondition {
8
+ /** Filter points which have specific vector assigned */
9
+ has_vector: string;
10
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};