@airweave/sdk 0.8.90 → 0.8.91

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.
@@ -48,8 +48,8 @@ class AirweaveSDKClient {
48
48
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "@airweave/sdk",
51
- "X-Fern-SDK-Version": "v0.8.90",
52
- "User-Agent": "@airweave/sdk/v0.8.90",
51
+ "X-Fern-SDK-Version": "v0.8.91",
52
+ "User-Agent": "@airweave/sdk/v0.8.91",
53
53
  "X-Fern-Runtime": core.RUNTIME.type,
54
54
  "X-Fern-Runtime-Version": core.RUNTIME.version,
55
55
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -146,7 +146,7 @@ export declare class Webhooks {
146
146
  * include_secret: true
147
147
  * })
148
148
  */
149
- getSubscription(subscriptionId: string, request?: AirweaveSDK.GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<AirweaveSDK.WebhookSubscription>;
149
+ getSubscription(subscriptionId: string, request?: AirweaveSDK.GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<AirweaveSDK.WebhookSubscriptionDetail>;
150
150
  private __getSubscription;
151
151
  /**
152
152
  * Permanently delete a webhook subscription.
@@ -409,7 +409,10 @@ class Webhooks {
409
409
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
410
410
  });
411
411
  if (_response.ok) {
412
- return { data: _response.body, rawResponse: _response.rawResponse };
412
+ return {
413
+ data: _response.body,
414
+ rawResponse: _response.rawResponse,
415
+ };
413
416
  }
414
417
  if (_response.error.reason === "status-code") {
415
418
  switch (_response.error.statusCode) {
@@ -1,24 +1,17 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- /**
5
- * Webhook event types.
6
- *
7
- * All available event types that webhook subscribers can filter on.
8
- * Convention: {domain}.{action} — matches the event_type string
9
- * on the corresponding domain event class.
10
- */
11
- export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted" | "collection.created" | "collection.updated" | "collection.deleted";
4
+ export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "collection.created" | "collection.updated" | "collection.deleted" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted";
12
5
  export declare const EventType: {
13
6
  readonly SyncPending: "sync.pending";
14
7
  readonly SyncRunning: "sync.running";
15
8
  readonly SyncCompleted: "sync.completed";
16
9
  readonly SyncFailed: "sync.failed";
17
10
  readonly SyncCancelled: "sync.cancelled";
18
- readonly SourceConnectionCreated: "source_connection.created";
19
- readonly SourceConnectionAuthCompleted: "source_connection.auth_completed";
20
- readonly SourceConnectionDeleted: "source_connection.deleted";
21
11
  readonly CollectionCreated: "collection.created";
22
12
  readonly CollectionUpdated: "collection.updated";
23
13
  readonly CollectionDeleted: "collection.deleted";
14
+ readonly SourceConnectionCreated: "source_connection.created";
15
+ readonly SourceConnectionAuthCompleted: "source_connection.auth_completed";
16
+ readonly SourceConnectionDeleted: "source_connection.deleted";
24
17
  };
@@ -10,10 +10,10 @@ exports.EventType = {
10
10
  SyncCompleted: "sync.completed",
11
11
  SyncFailed: "sync.failed",
12
12
  SyncCancelled: "sync.cancelled",
13
- SourceConnectionCreated: "source_connection.created",
14
- SourceConnectionAuthCompleted: "source_connection.auth_completed",
15
- SourceConnectionDeleted: "source_connection.deleted",
16
13
  CollectionCreated: "collection.created",
17
14
  CollectionUpdated: "collection.updated",
18
15
  CollectionDeleted: "collection.deleted",
16
+ SourceConnectionCreated: "source_connection.created",
17
+ SourceConnectionAuthCompleted: "source_connection.auth_completed",
18
+ SourceConnectionDeleted: "source_connection.deleted",
19
19
  };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Health status of a webhook subscription based on recent delivery attempts.
6
+ */
7
+ export type HealthStatus = "healthy" | "degraded" | "failing" | "unknown";
8
+ export declare const HealthStatus: {
9
+ readonly Healthy: "healthy";
10
+ readonly Degraded: "degraded";
11
+ readonly Failing: "failing";
12
+ readonly Unknown: "unknown";
13
+ };
@@ -0,0 +1,12 @@
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.HealthStatus = void 0;
7
+ exports.HealthStatus = {
8
+ Healthy: "healthy",
9
+ Degraded: "degraded",
10
+ Failing: "failing",
11
+ Unknown: "unknown",
12
+ };
@@ -4,6 +4,10 @@
4
4
  import * as AirweaveSDK from "../index.js";
5
5
  /**
6
6
  * A webhook subscription (endpoint) configuration.
7
+ *
8
+ * This is the lightweight representation returned by list, create, update,
9
+ * and delete endpoints. For the full detail view (delivery attempts,
10
+ * signing secret) see ``WebhookSubscriptionDetail``.
7
11
  */
8
12
  export interface WebhookSubscription {
9
13
  /** Unique identifier for this subscription (UUID format) */
@@ -20,8 +24,6 @@ export interface WebhookSubscription {
20
24
  created_at: string;
21
25
  /** When this subscription was last updated (ISO 8601 format, UTC) */
22
26
  updated_at: string;
23
- /** Recent delivery attempts for this subscription. Only included when fetching a single subscription via GET /subscriptions/{id}. */
24
- delivery_attempts?: AirweaveSDK.DeliveryAttempt[];
25
- /** The signing secret for webhook signature verification. Only included when include_secret=true is passed to the API. Keep this secret secure. */
26
- secret?: string;
27
+ /** Health status of this subscription based on recent delivery attempts. Values: 'healthy' (all recent deliveries succeeded), 'degraded' (mix of successes and failures), 'failing' (consecutive failures beyond threshold), 'unknown' (no delivery data yet). */
28
+ health_status?: AirweaveSDK.HealthStatus;
27
29
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.js";
5
+ /**
6
+ * Full subscription detail, including delivery attempts and signing secret.
7
+ *
8
+ * Returned by ``GET /subscriptions/{id}`` only.
9
+ */
10
+ export interface WebhookSubscriptionDetail {
11
+ /** Unique identifier for this subscription (UUID format) */
12
+ id: string;
13
+ /** The URL where webhook events are delivered */
14
+ url: string;
15
+ /** Event types this subscription is filtered to receive. See EventType enum for all available types. */
16
+ filter_types?: string[];
17
+ /** Whether this subscription is currently disabled. Disabled subscriptions do not receive event deliveries. */
18
+ disabled?: boolean;
19
+ /** Optional human-readable description of this subscription */
20
+ description?: string;
21
+ /** When this subscription was created (ISO 8601 format, UTC) */
22
+ created_at: string;
23
+ /** When this subscription was last updated (ISO 8601 format, UTC) */
24
+ updated_at: string;
25
+ /** Health status of this subscription based on recent delivery attempts. Values: 'healthy' (all recent deliveries succeeded), 'degraded' (mix of successes and failures), 'failing' (consecutive failures beyond threshold), 'unknown' (no delivery data yet). */
26
+ health_status?: AirweaveSDK.HealthStatus;
27
+ /** Recent delivery attempts for this subscription. */
28
+ delivery_attempts?: AirweaveSDK.DeliveryAttempt[];
29
+ /** The signing secret for webhook signature verification. Only included when include_secret=true is passed to the API. Keep this secret secure. */
30
+ secret?: string;
31
+ }
@@ -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 });
@@ -64,6 +64,7 @@ export * from "./FeatureFlag.js";
64
64
  export * from "./Fields.js";
65
65
  export * from "./HttpValidationError.js";
66
66
  export * from "./HandlerConfig.js";
67
+ export * from "./HealthStatus.js";
67
68
  export * from "./IntegrationCredentialInDb.js";
68
69
  export * from "./IntegrationCredentialRawCreate.js";
69
70
  export * from "./IntegrationType.js";
@@ -131,3 +132,4 @@ export * from "./ValidationErrorResponse.js";
131
132
  export * from "./WebhookMessage.js";
132
133
  export * from "./WebhookMessageWithAttempts.js";
133
134
  export * from "./WebhookSubscription.js";
135
+ export * from "./WebhookSubscriptionDetail.js";
@@ -80,6 +80,7 @@ __exportStar(require("./FeatureFlag.js"), exports);
80
80
  __exportStar(require("./Fields.js"), exports);
81
81
  __exportStar(require("./HttpValidationError.js"), exports);
82
82
  __exportStar(require("./HandlerConfig.js"), exports);
83
+ __exportStar(require("./HealthStatus.js"), exports);
83
84
  __exportStar(require("./IntegrationCredentialInDb.js"), exports);
84
85
  __exportStar(require("./IntegrationCredentialRawCreate.js"), exports);
85
86
  __exportStar(require("./IntegrationType.js"), exports);
@@ -147,3 +148,4 @@ __exportStar(require("./ValidationErrorResponse.js"), exports);
147
148
  __exportStar(require("./WebhookMessage.js"), exports);
148
149
  __exportStar(require("./WebhookMessageWithAttempts.js"), exports);
149
150
  __exportStar(require("./WebhookSubscription.js"), exports);
151
+ __exportStar(require("./WebhookSubscriptionDetail.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.8.90";
1
+ export declare const SDK_VERSION = "v0.8.91";
@@ -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.8.90";
4
+ exports.SDK_VERSION = "v0.8.91";
@@ -12,8 +12,8 @@ export class AirweaveSDKClient {
12
12
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
13
13
  "X-Fern-Language": "JavaScript",
14
14
  "X-Fern-SDK-Name": "@airweave/sdk",
15
- "X-Fern-SDK-Version": "v0.8.90",
16
- "User-Agent": "@airweave/sdk/v0.8.90",
15
+ "X-Fern-SDK-Version": "v0.8.91",
16
+ "User-Agent": "@airweave/sdk/v0.8.91",
17
17
  "X-Fern-Runtime": core.RUNTIME.type,
18
18
  "X-Fern-Runtime-Version": core.RUNTIME.version,
19
19
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -146,7 +146,7 @@ export declare class Webhooks {
146
146
  * include_secret: true
147
147
  * })
148
148
  */
149
- getSubscription(subscriptionId: string, request?: AirweaveSDK.GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<AirweaveSDK.WebhookSubscription>;
149
+ getSubscription(subscriptionId: string, request?: AirweaveSDK.GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<AirweaveSDK.WebhookSubscriptionDetail>;
150
150
  private __getSubscription;
151
151
  /**
152
152
  * Permanently delete a webhook subscription.
@@ -373,7 +373,10 @@ export class Webhooks {
373
373
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
374
374
  });
375
375
  if (_response.ok) {
376
- return { data: _response.body, rawResponse: _response.rawResponse };
376
+ return {
377
+ data: _response.body,
378
+ rawResponse: _response.rawResponse,
379
+ };
377
380
  }
378
381
  if (_response.error.reason === "status-code") {
379
382
  switch (_response.error.statusCode) {
@@ -1,24 +1,17 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- /**
5
- * Webhook event types.
6
- *
7
- * All available event types that webhook subscribers can filter on.
8
- * Convention: {domain}.{action} — matches the event_type string
9
- * on the corresponding domain event class.
10
- */
11
- export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted" | "collection.created" | "collection.updated" | "collection.deleted";
4
+ export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "collection.created" | "collection.updated" | "collection.deleted" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted";
12
5
  export declare const EventType: {
13
6
  readonly SyncPending: "sync.pending";
14
7
  readonly SyncRunning: "sync.running";
15
8
  readonly SyncCompleted: "sync.completed";
16
9
  readonly SyncFailed: "sync.failed";
17
10
  readonly SyncCancelled: "sync.cancelled";
18
- readonly SourceConnectionCreated: "source_connection.created";
19
- readonly SourceConnectionAuthCompleted: "source_connection.auth_completed";
20
- readonly SourceConnectionDeleted: "source_connection.deleted";
21
11
  readonly CollectionCreated: "collection.created";
22
12
  readonly CollectionUpdated: "collection.updated";
23
13
  readonly CollectionDeleted: "collection.deleted";
14
+ readonly SourceConnectionCreated: "source_connection.created";
15
+ readonly SourceConnectionAuthCompleted: "source_connection.auth_completed";
16
+ readonly SourceConnectionDeleted: "source_connection.deleted";
24
17
  };
@@ -7,10 +7,10 @@ export const EventType = {
7
7
  SyncCompleted: "sync.completed",
8
8
  SyncFailed: "sync.failed",
9
9
  SyncCancelled: "sync.cancelled",
10
- SourceConnectionCreated: "source_connection.created",
11
- SourceConnectionAuthCompleted: "source_connection.auth_completed",
12
- SourceConnectionDeleted: "source_connection.deleted",
13
10
  CollectionCreated: "collection.created",
14
11
  CollectionUpdated: "collection.updated",
15
12
  CollectionDeleted: "collection.deleted",
13
+ SourceConnectionCreated: "source_connection.created",
14
+ SourceConnectionAuthCompleted: "source_connection.auth_completed",
15
+ SourceConnectionDeleted: "source_connection.deleted",
16
16
  };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Health status of a webhook subscription based on recent delivery attempts.
6
+ */
7
+ export type HealthStatus = "healthy" | "degraded" | "failing" | "unknown";
8
+ export declare const HealthStatus: {
9
+ readonly Healthy: "healthy";
10
+ readonly Degraded: "degraded";
11
+ readonly Failing: "failing";
12
+ readonly Unknown: "unknown";
13
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const HealthStatus = {
5
+ Healthy: "healthy",
6
+ Degraded: "degraded",
7
+ Failing: "failing",
8
+ Unknown: "unknown",
9
+ };
@@ -4,6 +4,10 @@
4
4
  import * as AirweaveSDK from "../index.mjs";
5
5
  /**
6
6
  * A webhook subscription (endpoint) configuration.
7
+ *
8
+ * This is the lightweight representation returned by list, create, update,
9
+ * and delete endpoints. For the full detail view (delivery attempts,
10
+ * signing secret) see ``WebhookSubscriptionDetail``.
7
11
  */
8
12
  export interface WebhookSubscription {
9
13
  /** Unique identifier for this subscription (UUID format) */
@@ -20,8 +24,6 @@ export interface WebhookSubscription {
20
24
  created_at: string;
21
25
  /** When this subscription was last updated (ISO 8601 format, UTC) */
22
26
  updated_at: string;
23
- /** Recent delivery attempts for this subscription. Only included when fetching a single subscription via GET /subscriptions/{id}. */
24
- delivery_attempts?: AirweaveSDK.DeliveryAttempt[];
25
- /** The signing secret for webhook signature verification. Only included when include_secret=true is passed to the API. Keep this secret secure. */
26
- secret?: string;
27
+ /** Health status of this subscription based on recent delivery attempts. Values: 'healthy' (all recent deliveries succeeded), 'degraded' (mix of successes and failures), 'failing' (consecutive failures beyond threshold), 'unknown' (no delivery data yet). */
28
+ health_status?: AirweaveSDK.HealthStatus;
27
29
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Full subscription detail, including delivery attempts and signing secret.
7
+ *
8
+ * Returned by ``GET /subscriptions/{id}`` only.
9
+ */
10
+ export interface WebhookSubscriptionDetail {
11
+ /** Unique identifier for this subscription (UUID format) */
12
+ id: string;
13
+ /** The URL where webhook events are delivered */
14
+ url: string;
15
+ /** Event types this subscription is filtered to receive. See EventType enum for all available types. */
16
+ filter_types?: string[];
17
+ /** Whether this subscription is currently disabled. Disabled subscriptions do not receive event deliveries. */
18
+ disabled?: boolean;
19
+ /** Optional human-readable description of this subscription */
20
+ description?: string;
21
+ /** When this subscription was created (ISO 8601 format, UTC) */
22
+ created_at: string;
23
+ /** When this subscription was last updated (ISO 8601 format, UTC) */
24
+ updated_at: string;
25
+ /** Health status of this subscription based on recent delivery attempts. Values: 'healthy' (all recent deliveries succeeded), 'degraded' (mix of successes and failures), 'failing' (consecutive failures beyond threshold), 'unknown' (no delivery data yet). */
26
+ health_status?: AirweaveSDK.HealthStatus;
27
+ /** Recent delivery attempts for this subscription. */
28
+ delivery_attempts?: AirweaveSDK.DeliveryAttempt[];
29
+ /** The signing secret for webhook signature verification. Only included when include_secret=true is passed to the API. Keep this secret secure. */
30
+ secret?: string;
31
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -64,6 +64,7 @@ export * from "./FeatureFlag.mjs";
64
64
  export * from "./Fields.mjs";
65
65
  export * from "./HttpValidationError.mjs";
66
66
  export * from "./HandlerConfig.mjs";
67
+ export * from "./HealthStatus.mjs";
67
68
  export * from "./IntegrationCredentialInDb.mjs";
68
69
  export * from "./IntegrationCredentialRawCreate.mjs";
69
70
  export * from "./IntegrationType.mjs";
@@ -131,3 +132,4 @@ export * from "./ValidationErrorResponse.mjs";
131
132
  export * from "./WebhookMessage.mjs";
132
133
  export * from "./WebhookMessageWithAttempts.mjs";
133
134
  export * from "./WebhookSubscription.mjs";
135
+ export * from "./WebhookSubscriptionDetail.mjs";
@@ -64,6 +64,7 @@ export * from "./FeatureFlag.mjs";
64
64
  export * from "./Fields.mjs";
65
65
  export * from "./HttpValidationError.mjs";
66
66
  export * from "./HandlerConfig.mjs";
67
+ export * from "./HealthStatus.mjs";
67
68
  export * from "./IntegrationCredentialInDb.mjs";
68
69
  export * from "./IntegrationCredentialRawCreate.mjs";
69
70
  export * from "./IntegrationType.mjs";
@@ -131,3 +132,4 @@ export * from "./ValidationErrorResponse.mjs";
131
132
  export * from "./WebhookMessage.mjs";
132
133
  export * from "./WebhookMessageWithAttempts.mjs";
133
134
  export * from "./WebhookSubscription.mjs";
135
+ export * from "./WebhookSubscriptionDetail.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.8.90";
1
+ export declare const SDK_VERSION = "v0.8.91";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v0.8.90";
1
+ export const SDK_VERSION = "v0.8.91";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "v0.8.90",
3
+ "version": "v0.8.91",
4
4
  "private": false,
5
5
  "repository": "github:airweave-ai/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -1672,7 +1672,7 @@ await client.webhooks.createSubscription({
1672
1672
  </dl>
1673
1673
  </details>
1674
1674
 
1675
- <details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">getSubscription</a>(subscriptionId, { ...params }) -> AirweaveSDK.WebhookSubscription</code></summary>
1675
+ <details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">getSubscription</a>(subscriptionId, { ...params }) -> AirweaveSDK.WebhookSubscriptionDetail</code></summary>
1676
1676
  <dl>
1677
1677
  <dd>
1678
1678