@airweave/sdk 0.6.45 → 0.6.48

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 (54) hide show
  1. package/README.md +21 -1
  2. package/dist/cjs/Client.d.ts +8 -0
  3. package/dist/cjs/Client.js +4 -2
  4. package/dist/cjs/api/resources/collections/client/Client.d.ts +8 -0
  5. package/dist/cjs/api/resources/collections/client/Client.js +21 -21
  6. package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +8 -0
  7. package/dist/cjs/api/resources/sourceConnections/client/Client.js +24 -24
  8. package/dist/cjs/api/resources/sources/client/Client.d.ts +8 -0
  9. package/dist/cjs/api/resources/sources/client/Client.js +6 -6
  10. package/dist/cjs/api/types/BillingPeriod.d.ts +30 -0
  11. package/dist/cjs/api/types/BillingPeriod.js +5 -0
  12. package/dist/cjs/api/types/BillingPeriodStatus.d.ts +14 -0
  13. package/dist/cjs/api/types/BillingPeriodStatus.js +13 -0
  14. package/dist/cjs/api/types/BillingPlan.d.ts +14 -0
  15. package/dist/cjs/api/types/BillingPlan.js +13 -0
  16. package/dist/cjs/api/types/BillingStatus.d.ts +16 -0
  17. package/dist/cjs/api/types/BillingStatus.js +15 -0
  18. package/dist/cjs/api/types/BillingTransition.d.ts +15 -0
  19. package/dist/cjs/api/types/BillingTransition.js +14 -0
  20. package/dist/cjs/api/types/Organization.d.ts +12 -1
  21. package/dist/cjs/api/types/OrganizationBilling.d.ts +44 -0
  22. package/dist/cjs/api/types/OrganizationBilling.js +5 -0
  23. package/dist/cjs/api/types/OrganizationWithRole.d.ts +2 -0
  24. package/dist/cjs/api/types/index.d.ts +6 -0
  25. package/dist/cjs/api/types/index.js +6 -0
  26. package/dist/cjs/version.d.ts +1 -1
  27. package/dist/cjs/version.js +1 -1
  28. package/dist/esm/Client.d.mts +8 -0
  29. package/dist/esm/Client.mjs +4 -2
  30. package/dist/esm/api/resources/collections/client/Client.d.mts +8 -0
  31. package/dist/esm/api/resources/collections/client/Client.mjs +21 -21
  32. package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +8 -0
  33. package/dist/esm/api/resources/sourceConnections/client/Client.mjs +24 -24
  34. package/dist/esm/api/resources/sources/client/Client.d.mts +8 -0
  35. package/dist/esm/api/resources/sources/client/Client.mjs +6 -6
  36. package/dist/esm/api/types/BillingPeriod.d.mts +30 -0
  37. package/dist/esm/api/types/BillingPeriod.mjs +4 -0
  38. package/dist/esm/api/types/BillingPeriodStatus.d.mts +14 -0
  39. package/dist/esm/api/types/BillingPeriodStatus.mjs +10 -0
  40. package/dist/esm/api/types/BillingPlan.d.mts +14 -0
  41. package/dist/esm/api/types/BillingPlan.mjs +10 -0
  42. package/dist/esm/api/types/BillingStatus.d.mts +16 -0
  43. package/dist/esm/api/types/BillingStatus.mjs +12 -0
  44. package/dist/esm/api/types/BillingTransition.d.mts +15 -0
  45. package/dist/esm/api/types/BillingTransition.mjs +11 -0
  46. package/dist/esm/api/types/Organization.d.mts +12 -1
  47. package/dist/esm/api/types/OrganizationBilling.d.mts +44 -0
  48. package/dist/esm/api/types/OrganizationBilling.mjs +4 -0
  49. package/dist/esm/api/types/OrganizationWithRole.d.mts +2 -0
  50. package/dist/esm/api/types/index.d.mts +6 -0
  51. package/dist/esm/api/types/index.mjs +6 -0
  52. package/dist/esm/version.d.mts +1 -1
  53. package/dist/esm/version.mjs +1 -1
  54. package/package.json +1 -1
@@ -3,7 +3,16 @@
3
3
  */
4
4
  import * as AirweaveSDK from "../index.js";
5
5
  /**
6
- * Organization schema.
6
+ * Organization schema with billing and feature information.
7
+ *
8
+ * This is the primary organization schema used in API contexts, enriched with
9
+ * billing (including current period) and feature flags for efficient access
10
+ * without additional database queries.
11
+ *
12
+ * Access billing info compositionally:
13
+ * - organization.billing.plan
14
+ * - organization.billing.status
15
+ * - organization.billing.current_period
7
16
  */
8
17
  export interface Organization {
9
18
  name: string;
@@ -15,4 +24,6 @@ export interface Organization {
15
24
  org_metadata?: Record<string, unknown>;
16
25
  /** List of enabled feature flags for this organization */
17
26
  enabled_features?: AirweaveSDK.FeatureFlag[];
27
+ /** Complete billing information including current period */
28
+ billing?: AirweaveSDK.OrganizationBilling;
18
29
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.js";
5
+ /**
6
+ * Organization billing schema with current period information.
7
+ *
8
+ * This schema is enriched with the current active billing period for
9
+ * efficient access to rate limits and billing status without additional queries.
10
+ */
11
+ export interface OrganizationBilling {
12
+ /** Current billing plan */
13
+ billing_plan?: AirweaveSDK.BillingPlan;
14
+ /** Current billing status */
15
+ billing_status?: AirweaveSDK.BillingStatus;
16
+ /** Billing contact email */
17
+ billing_email: string;
18
+ id: string;
19
+ organization_id: string;
20
+ stripe_customer_id: string;
21
+ stripe_subscription_id?: string;
22
+ trial_ends_at?: string;
23
+ grace_period_ends_at?: string;
24
+ payment_method_added?: boolean;
25
+ current_period_start?: string;
26
+ current_period_end?: string;
27
+ cancel_at_period_end?: boolean;
28
+ pending_plan_change?: AirweaveSDK.BillingPlan;
29
+ pending_plan_change_at?: string;
30
+ payment_method_id?: string;
31
+ last_payment_status?: string;
32
+ last_payment_at?: string;
33
+ billing_metadata?: Record<string, unknown>;
34
+ has_yearly_prepay?: boolean;
35
+ yearly_prepay_started_at?: string;
36
+ yearly_prepay_expires_at?: string;
37
+ yearly_prepay_amount_cents?: number;
38
+ yearly_prepay_coupon_id?: string;
39
+ yearly_prepay_payment_intent_id?: string;
40
+ created_at: string;
41
+ modified_at: string;
42
+ /** Current active billing period */
43
+ current_period?: AirweaveSDK.BillingPeriod;
44
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -17,4 +17,6 @@ export interface OrganizationWithRole {
17
17
  org_metadata?: Record<string, unknown>;
18
18
  /** List of enabled feature flags for this organization */
19
19
  enabled_features?: AirweaveSDK.FeatureFlag[];
20
+ /** Complete billing information including current period */
21
+ billing?: AirweaveSDK.OrganizationBilling;
20
22
  }
@@ -9,7 +9,12 @@ export * from "./AuthProviderConnectionCreate.js";
9
9
  export * from "./AuthProviderConnectionUpdate.js";
10
10
  export * from "./AuthenticationDetails.js";
11
11
  export * from "./AuthenticationMethod.js";
12
+ export * from "./BillingPeriod.js";
13
+ export * from "./BillingPeriodStatus.js";
12
14
  export * from "./BillingPeriodUsage.js";
15
+ export * from "./BillingPlan.js";
16
+ export * from "./BillingStatus.js";
17
+ export * from "./BillingTransition.js";
13
18
  export * from "./BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js";
14
19
  export * from "./CheckoutSessionRequest.js";
15
20
  export * from "./CheckoutSessionResponse.js";
@@ -77,6 +82,7 @@ export * from "./OAuthBrowserAuthentication.js";
77
82
  export * from "./OAuthTokenAuthentication.js";
78
83
  export * from "./OAuthType.js";
79
84
  export * from "./Organization.js";
85
+ export * from "./OrganizationBilling.js";
80
86
  export * from "./OrganizationCreate.js";
81
87
  export * from "./OrganizationMetrics.js";
82
88
  export * from "./OrganizationWithRole.js";
@@ -25,7 +25,12 @@ __exportStar(require("./AuthProviderConnectionCreate.js"), exports);
25
25
  __exportStar(require("./AuthProviderConnectionUpdate.js"), exports);
26
26
  __exportStar(require("./AuthenticationDetails.js"), exports);
27
27
  __exportStar(require("./AuthenticationMethod.js"), exports);
28
+ __exportStar(require("./BillingPeriod.js"), exports);
29
+ __exportStar(require("./BillingPeriodStatus.js"), exports);
28
30
  __exportStar(require("./BillingPeriodUsage.js"), exports);
31
+ __exportStar(require("./BillingPlan.js"), exports);
32
+ __exportStar(require("./BillingStatus.js"), exports);
33
+ __exportStar(require("./BillingTransition.js"), exports);
29
34
  __exportStar(require("./BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js"), exports);
30
35
  __exportStar(require("./CheckoutSessionRequest.js"), exports);
31
36
  __exportStar(require("./CheckoutSessionResponse.js"), exports);
@@ -93,6 +98,7 @@ __exportStar(require("./OAuthBrowserAuthentication.js"), exports);
93
98
  __exportStar(require("./OAuthTokenAuthentication.js"), exports);
94
99
  __exportStar(require("./OAuthType.js"), exports);
95
100
  __exportStar(require("./Organization.js"), exports);
101
+ __exportStar(require("./OrganizationBilling.js"), exports);
96
102
  __exportStar(require("./OrganizationCreate.js"), exports);
97
103
  __exportStar(require("./OrganizationMetrics.js"), exports);
98
104
  __exportStar(require("./OrganizationWithRole.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.6.45";
1
+ export declare const SDK_VERSION = "v0.6.48";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "v0.6.45";
4
+ exports.SDK_VERSION = "v0.6.48";
@@ -12,6 +12,10 @@ export declare namespace AirweaveSDKClient {
12
12
  /** Specify a custom URL to connect the client to. */
13
13
  baseUrl?: core.Supplier<string>;
14
14
  apiKey: core.Supplier<string>;
15
+ /** Override the X-Framework-Name header */
16
+ frameworkName?: core.Supplier<string | undefined>;
17
+ /** Override the X-Framework-Version header */
18
+ frameworkVersion?: core.Supplier<string | undefined>;
15
19
  /** Additional headers to include in requests. */
16
20
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
17
21
  }
@@ -22,6 +26,10 @@ export declare namespace AirweaveSDKClient {
22
26
  maxRetries?: number;
23
27
  /** A hook to abort the request. */
24
28
  abortSignal?: AbortSignal;
29
+ /** Override the X-Framework-Name header */
30
+ frameworkName?: string | undefined;
31
+ /** Override the X-Framework-Version header */
32
+ frameworkVersion?: string | undefined;
25
33
  /** Additional query string parameters to include in the request. */
26
34
  queryParams?: Record<string, unknown>;
27
35
  /** Additional headers to include in the request. */
@@ -9,10 +9,12 @@ import { SourceConnections } from "./api/resources/sourceConnections/client/Clie
9
9
  export class AirweaveSDKClient {
10
10
  constructor(_options) {
11
11
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
12
+ "X-Framework-Name": _options === null || _options === void 0 ? void 0 : _options.frameworkName,
13
+ "X-Framework-Version": _options === null || _options === void 0 ? void 0 : _options.frameworkVersion,
12
14
  "X-Fern-Language": "JavaScript",
13
15
  "X-Fern-SDK-Name": "@airweave/sdk",
14
- "X-Fern-SDK-Version": "v0.6.45",
15
- "User-Agent": "@airweave/sdk/v0.6.45",
16
+ "X-Fern-SDK-Version": "v0.6.48",
17
+ "User-Agent": "@airweave/sdk/v0.6.48",
16
18
  "X-Fern-Runtime": core.RUNTIME.type,
17
19
  "X-Fern-Runtime-Version": core.RUNTIME.version,
18
20
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -10,6 +10,10 @@ export declare namespace Collections {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey: core.Supplier<string>;
13
+ /** Override the X-Framework-Name header */
14
+ frameworkName?: core.Supplier<string | undefined>;
15
+ /** Override the X-Framework-Version header */
16
+ frameworkVersion?: core.Supplier<string | undefined>;
13
17
  /** Additional headers to include in requests. */
14
18
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
19
  }
@@ -20,6 +24,10 @@ export declare namespace Collections {
20
24
  maxRetries?: number;
21
25
  /** A hook to abort the request. */
22
26
  abortSignal?: AbortSignal;
27
+ /** Override the X-Framework-Name header */
28
+ frameworkName?: string | undefined;
29
+ /** Override the X-Framework-Version header */
30
+ frameworkVersion?: string | undefined;
23
31
  /** Additional query string parameters to include in the request. */
24
32
  queryParams?: Record<string, unknown>;
25
33
  /** Additional headers to include in the request. */
@@ -41,7 +41,7 @@ export class Collections {
41
41
  }
42
42
  __list() {
43
43
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
44
- var _a, _b, _c;
44
+ var _a, _b, _c, _d, _e, _f, _g;
45
45
  const { skip, limit } = request;
46
46
  const _queryParams = {};
47
47
  if (skip != null) {
@@ -50,9 +50,9 @@ export class Collections {
50
50
  if (limit != null) {
51
51
  _queryParams["limit"] = limit.toString();
52
52
  }
53
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
53
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
54
  const _response = yield core.fetcher({
55
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "collections"),
55
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
56
56
  method: "GET",
57
57
  headers: _headers,
58
58
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -114,10 +114,10 @@ export class Collections {
114
114
  }
115
115
  __create(request, requestOptions) {
116
116
  return __awaiter(this, void 0, void 0, function* () {
117
- var _a, _b, _c;
118
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
117
+ var _a, _b, _c, _d, _e, _f, _g;
118
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
119
119
  const _response = yield core.fetcher({
120
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "collections"),
120
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
121
121
  method: "POST",
122
122
  headers: _headers,
123
123
  contentType: "application/json",
@@ -176,10 +176,10 @@ export class Collections {
176
176
  }
177
177
  __get(readableId, requestOptions) {
178
178
  return __awaiter(this, void 0, void 0, function* () {
179
- var _a, _b, _c;
180
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
179
+ var _a, _b, _c, _d, _e, _f, _g;
180
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
181
181
  const _response = yield core.fetcher({
182
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
182
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
183
183
  method: "GET",
184
184
  headers: _headers,
185
185
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -239,10 +239,10 @@ export class Collections {
239
239
  }
240
240
  __delete(readableId, requestOptions) {
241
241
  return __awaiter(this, void 0, void 0, function* () {
242
- var _a, _b, _c;
243
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
242
+ var _a, _b, _c, _d, _e, _f, _g;
243
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
244
244
  const _response = yield core.fetcher({
245
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
245
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
246
246
  method: "DELETE",
247
247
  headers: _headers,
248
248
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -303,10 +303,10 @@ export class Collections {
303
303
  }
304
304
  __refreshAllSourceConnections(readableId, requestOptions) {
305
305
  return __awaiter(this, void 0, void 0, function* () {
306
- var _a, _b, _c;
307
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
306
+ var _a, _b, _c, _d, _e, _f, _g;
307
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
308
308
  const _response = yield core.fetcher({
309
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
309
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
310
310
  method: "POST",
311
311
  headers: _headers,
312
312
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -372,7 +372,7 @@ export class Collections {
372
372
  }
373
373
  __searchGetLegacy(readableId, request, requestOptions) {
374
374
  return __awaiter(this, void 0, void 0, function* () {
375
- var _a, _b, _c;
375
+ var _a, _b, _c, _d, _e, _f, _g;
376
376
  const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
377
377
  const _queryParams = {};
378
378
  _queryParams["query"] = query;
@@ -388,9 +388,9 @@ export class Collections {
388
388
  if (recencyBias != null) {
389
389
  _queryParams["recency_bias"] = recencyBias.toString();
390
390
  }
391
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
391
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
392
392
  const _response = yield core.fetcher({
393
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
393
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
394
394
  method: "GET",
395
395
  headers: _headers,
396
396
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -452,10 +452,10 @@ export class Collections {
452
452
  }
453
453
  __search(readableId, request, requestOptions) {
454
454
  return __awaiter(this, void 0, void 0, function* () {
455
- var _a, _b, _c;
456
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
455
+ var _a, _b, _c, _d, _e, _f, _g;
456
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
457
457
  const _response = yield core.fetcher({
458
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
458
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
459
459
  method: "POST",
460
460
  headers: _headers,
461
461
  contentType: "application/json",
@@ -10,6 +10,10 @@ export declare namespace SourceConnections {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey: core.Supplier<string>;
13
+ /** Override the X-Framework-Name header */
14
+ frameworkName?: core.Supplier<string | undefined>;
15
+ /** Override the X-Framework-Version header */
16
+ frameworkVersion?: core.Supplier<string | undefined>;
13
17
  /** Additional headers to include in requests. */
14
18
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
19
  }
@@ -20,6 +24,10 @@ export declare namespace SourceConnections {
20
24
  maxRetries?: number;
21
25
  /** A hook to abort the request. */
22
26
  abortSignal?: AbortSignal;
27
+ /** Override the X-Framework-Name header */
28
+ frameworkName?: string | undefined;
29
+ /** Override the X-Framework-Version header */
30
+ frameworkVersion?: string | undefined;
23
31
  /** Additional query string parameters to include in the request. */
24
32
  queryParams?: Record<string, unknown>;
25
33
  /** Additional headers to include in the request. */
@@ -42,7 +42,7 @@ export class SourceConnections {
42
42
  }
43
43
  __list() {
44
44
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
45
- var _a, _b, _c;
45
+ var _a, _b, _c, _d, _e, _f, _g;
46
46
  const { collection, skip, limit } = request;
47
47
  const _queryParams = {};
48
48
  if (collection != null) {
@@ -54,9 +54,9 @@ export class SourceConnections {
54
54
  if (limit != null) {
55
55
  _queryParams["limit"] = limit.toString();
56
56
  }
57
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
57
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
58
58
  const _response = yield core.fetcher({
59
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
59
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
60
60
  method: "GET",
61
61
  headers: _headers,
62
62
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -131,10 +131,10 @@ export class SourceConnections {
131
131
  }
132
132
  __create(request, requestOptions) {
133
133
  return __awaiter(this, void 0, void 0, function* () {
134
- var _a, _b, _c;
135
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
134
+ var _a, _b, _c, _d, _e, _f, _g;
135
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
136
136
  const _response = yield core.fetcher({
137
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
137
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
138
138
  method: "POST",
139
139
  headers: _headers,
140
140
  contentType: "application/json",
@@ -193,10 +193,10 @@ export class SourceConnections {
193
193
  }
194
194
  __get(sourceConnectionId, requestOptions) {
195
195
  return __awaiter(this, void 0, void 0, function* () {
196
- var _a, _b, _c;
197
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
196
+ var _a, _b, _c, _d, _e, _f, _g;
197
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
198
198
  const _response = yield core.fetcher({
199
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
199
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
200
200
  method: "GET",
201
201
  headers: _headers,
202
202
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -252,10 +252,10 @@ export class SourceConnections {
252
252
  }
253
253
  __delete(sourceConnectionId, requestOptions) {
254
254
  return __awaiter(this, void 0, void 0, function* () {
255
- var _a, _b, _c;
256
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
255
+ var _a, _b, _c, _d, _e, _f, _g;
256
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
257
257
  const _response = yield core.fetcher({
258
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
258
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
259
259
  method: "DELETE",
260
260
  headers: _headers,
261
261
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -318,10 +318,10 @@ export class SourceConnections {
318
318
  }
319
319
  __update(sourceConnectionId_1) {
320
320
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
321
- var _a, _b, _c;
322
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
321
+ var _a, _b, _c, _d, _e, _f, _g;
322
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
323
323
  const _response = yield core.fetcher({
324
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
324
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
325
325
  method: "PATCH",
326
326
  headers: _headers,
327
327
  contentType: "application/json",
@@ -394,15 +394,15 @@ export class SourceConnections {
394
394
  }
395
395
  __run(sourceConnectionId_1) {
396
396
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
397
- var _a, _b, _c;
397
+ var _a, _b, _c, _d, _e, _f, _g;
398
398
  const { force_full_sync: forceFullSync } = request;
399
399
  const _queryParams = {};
400
400
  if (forceFullSync != null) {
401
401
  _queryParams["force_full_sync"] = forceFullSync.toString();
402
402
  }
403
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
403
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
404
404
  const _response = yield core.fetcher({
405
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
405
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
406
406
  method: "POST",
407
407
  headers: _headers,
408
408
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -461,15 +461,15 @@ export class SourceConnections {
461
461
  }
462
462
  __getSourceConnectionJobs(sourceConnectionId_1) {
463
463
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
464
- var _a, _b, _c;
464
+ var _a, _b, _c, _d, _e, _f, _g;
465
465
  const { limit } = request;
466
466
  const _queryParams = {};
467
467
  if (limit != null) {
468
468
  _queryParams["limit"] = limit.toString();
469
469
  }
470
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
470
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
471
471
  const _response = yield core.fetcher({
472
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
472
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
473
473
  method: "GET",
474
474
  headers: _headers,
475
475
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -530,10 +530,10 @@ export class SourceConnections {
530
530
  }
531
531
  __cancelJob(sourceConnectionId, jobId, requestOptions) {
532
532
  return __awaiter(this, void 0, void 0, function* () {
533
- var _a, _b, _c;
534
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
533
+ var _a, _b, _c, _d, _e, _f, _g;
534
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
535
535
  const _response = yield core.fetcher({
536
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
536
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
537
537
  method: "POST",
538
538
  headers: _headers,
539
539
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -10,6 +10,10 @@ export declare namespace Sources {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey: core.Supplier<string>;
13
+ /** Override the X-Framework-Name header */
14
+ frameworkName?: core.Supplier<string | undefined>;
15
+ /** Override the X-Framework-Version header */
16
+ frameworkVersion?: core.Supplier<string | undefined>;
13
17
  /** Additional headers to include in requests. */
14
18
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
19
  }
@@ -20,6 +24,10 @@ export declare namespace Sources {
20
24
  maxRetries?: number;
21
25
  /** A hook to abort the request. */
22
26
  abortSignal?: AbortSignal;
27
+ /** Override the X-Framework-Name header */
28
+ frameworkName?: string | undefined;
29
+ /** Override the X-Framework-Version header */
30
+ frameworkVersion?: string | undefined;
23
31
  /** Additional query string parameters to include in the request. */
24
32
  queryParams?: Record<string, unknown>;
25
33
  /** Additional headers to include in the request. */
@@ -40,10 +40,10 @@ export class Sources {
40
40
  }
41
41
  __list(requestOptions) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- var _a, _b, _c;
44
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
43
+ var _a, _b, _c, _d, _e, _f, _g;
44
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
45
45
  const _response = yield core.fetcher({
46
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "sources"),
46
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "sources"),
47
47
  method: "GET",
48
48
  headers: _headers,
49
49
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -99,10 +99,10 @@ export class Sources {
99
99
  }
100
100
  __get(shortName, requestOptions) {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
- var _a, _b, _c;
103
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
102
+ var _a, _b, _c, _d, _e, _f, _g;
103
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
104
  const _response = yield core.fetcher({
105
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `sources/${encodeURIComponent(shortName)}`),
105
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `sources/${encodeURIComponent(shortName)}`),
106
106
  method: "GET",
107
107
  headers: _headers,
108
108
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -0,0 +1,30 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Complete billing period representation.
7
+ */
8
+ export interface BillingPeriod {
9
+ /** Organization this period belongs to */
10
+ organization_id: string;
11
+ /** Period start (inclusive) */
12
+ period_start: string;
13
+ /** Period end (exclusive) */
14
+ period_end: string;
15
+ /** Plan for this period */
16
+ plan: AirweaveSDK.BillingPlan;
17
+ /** Period status */
18
+ status: AirweaveSDK.BillingPeriodStatus;
19
+ /** How this period was created */
20
+ created_from: AirweaveSDK.BillingTransition;
21
+ id: string;
22
+ stripe_subscription_id?: string;
23
+ stripe_invoice_id?: string;
24
+ amount_cents?: number;
25
+ currency?: string;
26
+ paid_at?: string;
27
+ previous_period_id?: string;
28
+ created_at: string;
29
+ modified_at: string;
30
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Status of a billing period.
6
+ */
7
+ export type BillingPeriodStatus = "active" | "completed" | "ended_unpaid" | "trial" | "grace";
8
+ export declare const BillingPeriodStatus: {
9
+ readonly Active: "active";
10
+ readonly Completed: "completed";
11
+ readonly EndedUnpaid: "ended_unpaid";
12
+ readonly Trial: "trial";
13
+ readonly Grace: "grace";
14
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const BillingPeriodStatus = {
5
+ Active: "active",
6
+ Completed: "completed",
7
+ EndedUnpaid: "ended_unpaid",
8
+ Trial: "trial",
9
+ Grace: "grace",
10
+ };