deepline 0.2.39 → 0.2.40

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.
package/dist/index.d.mts CHANGED
@@ -1170,6 +1170,57 @@ interface PlayListItem {
1170
1170
  currentRevision?: PlayRevisionSummary | null;
1171
1171
  liveRevision?: PlayRevisionSummary | null;
1172
1172
  aliases?: string[];
1173
+ triggerStatus?: {
1174
+ cron: string | null;
1175
+ webhook: string | null;
1176
+ blockedReason: string | null;
1177
+ };
1178
+ }
1179
+ interface ProductNotificationEventDefinition {
1180
+ id: string;
1181
+ label: string;
1182
+ description: string;
1183
+ source: 'cron' | 'webhook';
1184
+ outcome: 'succeeded' | 'failed';
1185
+ defaultEnabled: boolean;
1186
+ }
1187
+ interface ProductNotificationSettings {
1188
+ contractVersion: number;
1189
+ catalog: ProductNotificationEventDefinition[];
1190
+ notifications?: ProductNotification[];
1191
+ providers?: Array<{
1192
+ kind: string;
1193
+ targetLabel: string;
1194
+ }>;
1195
+ destinations: Array<Record<string, unknown>>;
1196
+ subscriptions: Array<{
1197
+ eventType: string;
1198
+ enabled: boolean;
1199
+ destinationId: string;
1200
+ }>;
1201
+ dlq: {
1202
+ count: number;
1203
+ capped: boolean;
1204
+ };
1205
+ slackConnection?: {
1206
+ connected: boolean;
1207
+ status: string;
1208
+ };
1209
+ }
1210
+ interface ProductNotification {
1211
+ id: string;
1212
+ name: string;
1213
+ provider: string;
1214
+ target: {
1215
+ id: string;
1216
+ name: string;
1217
+ };
1218
+ enabled: boolean;
1219
+ status: string;
1220
+ eventTypes: string[];
1221
+ lastTestedAt?: number;
1222
+ lastTestStatus?: string;
1223
+ lastErrorMessage?: string;
1173
1224
  }
1174
1225
  interface PlayDescription {
1175
1226
  name: string;
@@ -3119,6 +3170,88 @@ declare class DeeplineClient {
3119
3170
  grep?: string;
3120
3171
  grepMode?: 'all' | 'any' | 'phrase';
3121
3172
  }): Promise<PlayListItem[]>;
3173
+ /** Read product-notification destinations, subscriptions, event catalog, and DLQ health. */
3174
+ getNotificationSettings(): Promise<ProductNotificationSettings>;
3175
+ /** Start the Slack OAuth flow required by product notifications. */
3176
+ connectNotificationSlack(options?: {
3177
+ successUrl?: string;
3178
+ failureUrl?: string;
3179
+ }): Promise<{
3180
+ ok: boolean;
3181
+ redirect_url: string;
3182
+ }>;
3183
+ /** List Slack channels visible to the connected Deepline Slack app. */
3184
+ listNotificationSlackChannels(query?: string): Promise<{
3185
+ identity: {
3186
+ teamId: string;
3187
+ teamName?: string;
3188
+ };
3189
+ channels: Array<{
3190
+ id: string;
3191
+ name: string;
3192
+ isPrivate: boolean;
3193
+ }>;
3194
+ }>;
3195
+ /** Select the Slack channel used for product notifications. */
3196
+ setNotificationSlack(channel: string): Promise<unknown>;
3197
+ /** Send one synchronous test ping and return Slack's delivery result. */
3198
+ testNotificationSlack(): Promise<{
3199
+ ok: boolean;
3200
+ deliveryId: string;
3201
+ state: string;
3202
+ message: string;
3203
+ }>;
3204
+ /** Disable Slack product notifications without deleting the OAuth connection. */
3205
+ disableNotificationSlack(): Promise<unknown>;
3206
+ /** Enable or disable event IDs from the server-provided notification catalog. */
3207
+ setNotificationSubscriptions(eventTypes: string[], enabled: boolean): Promise<unknown>;
3208
+ /** List exhausted deliveries. Dead-lettered messages never replay automatically. */
3209
+ listNotificationDlq(limit?: number): Promise<unknown>;
3210
+ /** Inspect one exhausted notification delivery. */
3211
+ getNotificationDlqDelivery(deliveryId: string): Promise<unknown>;
3212
+ /** Explicitly retry or archive one dead-lettered notification delivery. */
3213
+ updateNotificationDlqDelivery(deliveryId: string, action: 'retry' | 'archive'): Promise<unknown>;
3214
+ /** List the workspace's named notification rules. */
3215
+ getNotifications(): Promise<ProductNotificationSettings>;
3216
+ /** List Slack channels available to an already-connected Slack integration. */
3217
+ listNotificationChannels(query?: string): Promise<{
3218
+ identity: {
3219
+ teamId: string;
3220
+ teamName?: string;
3221
+ };
3222
+ channels: Array<{
3223
+ id: string;
3224
+ name: string;
3225
+ isPrivate: boolean;
3226
+ }>;
3227
+ }>;
3228
+ /** Create a named notification routed through an existing provider integration. */
3229
+ createNotification(input: {
3230
+ name: string;
3231
+ provider: 'slack';
3232
+ channel: string;
3233
+ eventTypes: string[];
3234
+ }): Promise<unknown>;
3235
+ /** Update a notification's target, event selection, or enabled state. */
3236
+ updateNotification(notificationId: string, input: {
3237
+ enabled: boolean;
3238
+ } | {
3239
+ name: string;
3240
+ channel: string;
3241
+ eventTypes: string[];
3242
+ }): Promise<unknown>;
3243
+ /** Send a validation ping to one notification. */
3244
+ testNotification(notificationId: string): Promise<{
3245
+ ok: boolean;
3246
+ deliveryId: string;
3247
+ state: string;
3248
+ message: string;
3249
+ }>;
3250
+ /** Archive one notification without touching its provider integration. */
3251
+ deleteNotification(notificationId: string): Promise<{
3252
+ deleted: boolean;
3253
+ id: string;
3254
+ }>;
3122
3255
  /**
3123
3256
  * Search callable plays and return compact play descriptions.
3124
3257
  *
package/dist/index.d.ts CHANGED
@@ -1170,6 +1170,57 @@ interface PlayListItem {
1170
1170
  currentRevision?: PlayRevisionSummary | null;
1171
1171
  liveRevision?: PlayRevisionSummary | null;
1172
1172
  aliases?: string[];
1173
+ triggerStatus?: {
1174
+ cron: string | null;
1175
+ webhook: string | null;
1176
+ blockedReason: string | null;
1177
+ };
1178
+ }
1179
+ interface ProductNotificationEventDefinition {
1180
+ id: string;
1181
+ label: string;
1182
+ description: string;
1183
+ source: 'cron' | 'webhook';
1184
+ outcome: 'succeeded' | 'failed';
1185
+ defaultEnabled: boolean;
1186
+ }
1187
+ interface ProductNotificationSettings {
1188
+ contractVersion: number;
1189
+ catalog: ProductNotificationEventDefinition[];
1190
+ notifications?: ProductNotification[];
1191
+ providers?: Array<{
1192
+ kind: string;
1193
+ targetLabel: string;
1194
+ }>;
1195
+ destinations: Array<Record<string, unknown>>;
1196
+ subscriptions: Array<{
1197
+ eventType: string;
1198
+ enabled: boolean;
1199
+ destinationId: string;
1200
+ }>;
1201
+ dlq: {
1202
+ count: number;
1203
+ capped: boolean;
1204
+ };
1205
+ slackConnection?: {
1206
+ connected: boolean;
1207
+ status: string;
1208
+ };
1209
+ }
1210
+ interface ProductNotification {
1211
+ id: string;
1212
+ name: string;
1213
+ provider: string;
1214
+ target: {
1215
+ id: string;
1216
+ name: string;
1217
+ };
1218
+ enabled: boolean;
1219
+ status: string;
1220
+ eventTypes: string[];
1221
+ lastTestedAt?: number;
1222
+ lastTestStatus?: string;
1223
+ lastErrorMessage?: string;
1173
1224
  }
1174
1225
  interface PlayDescription {
1175
1226
  name: string;
@@ -3119,6 +3170,88 @@ declare class DeeplineClient {
3119
3170
  grep?: string;
3120
3171
  grepMode?: 'all' | 'any' | 'phrase';
3121
3172
  }): Promise<PlayListItem[]>;
3173
+ /** Read product-notification destinations, subscriptions, event catalog, and DLQ health. */
3174
+ getNotificationSettings(): Promise<ProductNotificationSettings>;
3175
+ /** Start the Slack OAuth flow required by product notifications. */
3176
+ connectNotificationSlack(options?: {
3177
+ successUrl?: string;
3178
+ failureUrl?: string;
3179
+ }): Promise<{
3180
+ ok: boolean;
3181
+ redirect_url: string;
3182
+ }>;
3183
+ /** List Slack channels visible to the connected Deepline Slack app. */
3184
+ listNotificationSlackChannels(query?: string): Promise<{
3185
+ identity: {
3186
+ teamId: string;
3187
+ teamName?: string;
3188
+ };
3189
+ channels: Array<{
3190
+ id: string;
3191
+ name: string;
3192
+ isPrivate: boolean;
3193
+ }>;
3194
+ }>;
3195
+ /** Select the Slack channel used for product notifications. */
3196
+ setNotificationSlack(channel: string): Promise<unknown>;
3197
+ /** Send one synchronous test ping and return Slack's delivery result. */
3198
+ testNotificationSlack(): Promise<{
3199
+ ok: boolean;
3200
+ deliveryId: string;
3201
+ state: string;
3202
+ message: string;
3203
+ }>;
3204
+ /** Disable Slack product notifications without deleting the OAuth connection. */
3205
+ disableNotificationSlack(): Promise<unknown>;
3206
+ /** Enable or disable event IDs from the server-provided notification catalog. */
3207
+ setNotificationSubscriptions(eventTypes: string[], enabled: boolean): Promise<unknown>;
3208
+ /** List exhausted deliveries. Dead-lettered messages never replay automatically. */
3209
+ listNotificationDlq(limit?: number): Promise<unknown>;
3210
+ /** Inspect one exhausted notification delivery. */
3211
+ getNotificationDlqDelivery(deliveryId: string): Promise<unknown>;
3212
+ /** Explicitly retry or archive one dead-lettered notification delivery. */
3213
+ updateNotificationDlqDelivery(deliveryId: string, action: 'retry' | 'archive'): Promise<unknown>;
3214
+ /** List the workspace's named notification rules. */
3215
+ getNotifications(): Promise<ProductNotificationSettings>;
3216
+ /** List Slack channels available to an already-connected Slack integration. */
3217
+ listNotificationChannels(query?: string): Promise<{
3218
+ identity: {
3219
+ teamId: string;
3220
+ teamName?: string;
3221
+ };
3222
+ channels: Array<{
3223
+ id: string;
3224
+ name: string;
3225
+ isPrivate: boolean;
3226
+ }>;
3227
+ }>;
3228
+ /** Create a named notification routed through an existing provider integration. */
3229
+ createNotification(input: {
3230
+ name: string;
3231
+ provider: 'slack';
3232
+ channel: string;
3233
+ eventTypes: string[];
3234
+ }): Promise<unknown>;
3235
+ /** Update a notification's target, event selection, or enabled state. */
3236
+ updateNotification(notificationId: string, input: {
3237
+ enabled: boolean;
3238
+ } | {
3239
+ name: string;
3240
+ channel: string;
3241
+ eventTypes: string[];
3242
+ }): Promise<unknown>;
3243
+ /** Send a validation ping to one notification. */
3244
+ testNotification(notificationId: string): Promise<{
3245
+ ok: boolean;
3246
+ deliveryId: string;
3247
+ state: string;
3248
+ message: string;
3249
+ }>;
3250
+ /** Archive one notification without touching its provider integration. */
3251
+ deleteNotification(notificationId: string): Promise<{
3252
+ deleted: boolean;
3253
+ id: string;
3254
+ }>;
3122
3255
  /**
3123
3256
  * Search callable plays and return compact play descriptions.
3124
3257
  *
package/dist/index.js CHANGED
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
763
763
  // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
764
764
  // exposed storage-dependent synchronous access. This deliberate minor
765
765
  // release keeps lazy paging semantics independent of row residency.
766
- version: "0.2.39",
766
+ version: "0.2.40",
767
767
  contracts: {
768
768
  api: {
769
769
  name: "sdk-http-api",
@@ -1391,6 +1391,9 @@ var HttpClient = class {
1391
1391
  headers
1392
1392
  });
1393
1393
  }
1394
+ async put(path, body, headers) {
1395
+ return this.request(path, { method: "PUT", body, headers });
1396
+ }
1394
1397
  /**
1395
1398
  * Send a DELETE request.
1396
1399
  *
@@ -1541,6 +1544,61 @@ function withCoworkNetworkHint(message) {
1541
1544
  ${COWORK_NETWORK_HINT}`;
1542
1545
  }
1543
1546
 
1547
+ // ../shared_libs/product-notifications/contract.ts
1548
+ var PRODUCT_NOTIFICATION_EVENT_CATALOG = [
1549
+ {
1550
+ id: "play.cron.succeeded",
1551
+ label: "Cron success",
1552
+ description: "A scheduled Play run completed successfully.",
1553
+ source: "cron",
1554
+ outcome: "succeeded",
1555
+ defaultEnabled: true
1556
+ },
1557
+ {
1558
+ id: "play.cron.failed",
1559
+ label: "Cron failure",
1560
+ description: "A scheduled Play could not start or its run reached a failed terminal state.",
1561
+ source: "cron",
1562
+ outcome: "failed",
1563
+ defaultEnabled: true
1564
+ },
1565
+ {
1566
+ id: "play.webhook.succeeded",
1567
+ label: "Webhook success",
1568
+ description: "An accepted webhook-triggered Play completed successfully.",
1569
+ source: "webhook",
1570
+ outcome: "succeeded",
1571
+ defaultEnabled: true
1572
+ },
1573
+ {
1574
+ id: "play.webhook.failed",
1575
+ label: "Webhook failure",
1576
+ description: "An accepted webhook-triggered Play reached a failed terminal state.",
1577
+ source: "webhook",
1578
+ outcome: "failed",
1579
+ defaultEnabled: true
1580
+ }
1581
+ ];
1582
+ var PRODUCT_NOTIFICATION_EVENT_TYPE_SET = new Set(
1583
+ PRODUCT_NOTIFICATION_EVENT_CATALOG.map((event) => event.id)
1584
+ );
1585
+ var PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES = [
1586
+ "channels:read",
1587
+ "chat:write",
1588
+ "groups:read"
1589
+ ];
1590
+ var PRODUCT_NOTIFICATION_RETRY_DELAYS_MS = [
1591
+ 0,
1592
+ 6e4,
1593
+ 5 * 6e4,
1594
+ 15 * 6e4,
1595
+ 60 * 6e4
1596
+ ];
1597
+ var PRODUCT_NOTIFICATION_MAX_ATTEMPTS = PRODUCT_NOTIFICATION_RETRY_DELAYS_MS.length;
1598
+ var PRODUCT_NOTIFICATION_DELIVERY_LEASE_MS = 2 * 6e4;
1599
+ var PRODUCT_NOTIFICATION_SUCCESS_TTL_MS = 15 * 6e4;
1600
+ var PRODUCT_NOTIFICATION_FAILURE_TTL_MS = 24 * 60 * 6e4;
1601
+
1544
1602
  // src/stream-reconnect.ts
1545
1603
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
1546
1604
  var STREAM_RECONNECT_MAX_DELAY_MS = 15e3;
@@ -5097,6 +5155,95 @@ var DeeplineClient = class {
5097
5155
  );
5098
5156
  return response.plays ?? [];
5099
5157
  }
5158
+ /** Read product-notification destinations, subscriptions, event catalog, and DLQ health. */
5159
+ async getNotificationSettings() {
5160
+ return this.http.get("/api/v2/settings/notifications");
5161
+ }
5162
+ /** Start the Slack OAuth flow required by product notifications. */
5163
+ async connectNotificationSlack(options) {
5164
+ return this.http.post("/api/v2/integrations/connect", {
5165
+ provider: "slack",
5166
+ scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5167
+ ...options?.successUrl ? { success_url: options.successUrl } : {},
5168
+ ...options?.failureUrl ? { failure_url: options.failureUrl } : {}
5169
+ });
5170
+ }
5171
+ /** List Slack channels visible to the connected Deepline Slack app. */
5172
+ async listNotificationSlackChannels(query) {
5173
+ const suffix = query ? `?query=${encodeURIComponent(query)}` : "";
5174
+ return this.http.get(`/api/v2/settings/notifications/channels${suffix}`);
5175
+ }
5176
+ /** Select the Slack channel used for product notifications. */
5177
+ async setNotificationSlack(channel) {
5178
+ return this.http.put("/api/v2/settings/notifications", { channel });
5179
+ }
5180
+ /** Send one synchronous test ping and return Slack's delivery result. */
5181
+ async testNotificationSlack() {
5182
+ return this.http.post("/api/v2/settings/notifications/test", {});
5183
+ }
5184
+ /** Disable Slack product notifications without deleting the OAuth connection. */
5185
+ async disableNotificationSlack() {
5186
+ return this.http.delete("/api/v2/settings/notifications");
5187
+ }
5188
+ /** Enable or disable event IDs from the server-provided notification catalog. */
5189
+ async setNotificationSubscriptions(eventTypes, enabled) {
5190
+ return this.http.patch("/api/v2/settings/notifications/subscriptions", {
5191
+ eventTypes,
5192
+ enabled
5193
+ });
5194
+ }
5195
+ /** List exhausted deliveries. Dead-lettered messages never replay automatically. */
5196
+ async listNotificationDlq(limit = 25) {
5197
+ return this.http.get(
5198
+ `/api/v2/settings/notifications/dlq?limit=${encodeURIComponent(String(limit))}`
5199
+ );
5200
+ }
5201
+ /** Inspect one exhausted notification delivery. */
5202
+ async getNotificationDlqDelivery(deliveryId) {
5203
+ return this.http.get(
5204
+ `/api/v2/settings/notifications/dlq/${encodeURIComponent(deliveryId)}`
5205
+ );
5206
+ }
5207
+ /** Explicitly retry or archive one dead-lettered notification delivery. */
5208
+ async updateNotificationDlqDelivery(deliveryId, action) {
5209
+ return this.http.post(
5210
+ `/api/v2/settings/notifications/dlq/${encodeURIComponent(deliveryId)}`,
5211
+ { action }
5212
+ );
5213
+ }
5214
+ /** List the workspace's named notification rules. */
5215
+ async getNotifications() {
5216
+ return this.http.get("/api/v2/notifications");
5217
+ }
5218
+ /** List Slack channels available to an already-connected Slack integration. */
5219
+ async listNotificationChannels(query) {
5220
+ const suffix = query ? `?search=${encodeURIComponent(query)}` : "";
5221
+ return this.http.get(`/api/v2/notifications/slack/channels${suffix}`);
5222
+ }
5223
+ /** Create a named notification routed through an existing provider integration. */
5224
+ async createNotification(input) {
5225
+ return this.http.post("/api/v2/notifications", input);
5226
+ }
5227
+ /** Update a notification's target, event selection, or enabled state. */
5228
+ async updateNotification(notificationId, input) {
5229
+ return this.http.patch(
5230
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}`,
5231
+ input
5232
+ );
5233
+ }
5234
+ /** Send a validation ping to one notification. */
5235
+ async testNotification(notificationId) {
5236
+ return this.http.post(
5237
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}/test`,
5238
+ {}
5239
+ );
5240
+ }
5241
+ /** Archive one notification without touching its provider integration. */
5242
+ async deleteNotification(notificationId) {
5243
+ return this.http.delete(
5244
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}`
5245
+ );
5246
+ }
5100
5247
  /**
5101
5248
  * Search callable plays and return compact play descriptions.
5102
5249
  *
package/dist/index.mjs CHANGED
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
689
689
  // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
690
690
  // exposed storage-dependent synchronous access. This deliberate minor
691
691
  // release keeps lazy paging semantics independent of row residency.
692
- version: "0.2.39",
692
+ version: "0.2.40",
693
693
  contracts: {
694
694
  api: {
695
695
  name: "sdk-http-api",
@@ -1317,6 +1317,9 @@ var HttpClient = class {
1317
1317
  headers
1318
1318
  });
1319
1319
  }
1320
+ async put(path, body, headers) {
1321
+ return this.request(path, { method: "PUT", body, headers });
1322
+ }
1320
1323
  /**
1321
1324
  * Send a DELETE request.
1322
1325
  *
@@ -1467,6 +1470,61 @@ function withCoworkNetworkHint(message) {
1467
1470
  ${COWORK_NETWORK_HINT}`;
1468
1471
  }
1469
1472
 
1473
+ // ../shared_libs/product-notifications/contract.ts
1474
+ var PRODUCT_NOTIFICATION_EVENT_CATALOG = [
1475
+ {
1476
+ id: "play.cron.succeeded",
1477
+ label: "Cron success",
1478
+ description: "A scheduled Play run completed successfully.",
1479
+ source: "cron",
1480
+ outcome: "succeeded",
1481
+ defaultEnabled: true
1482
+ },
1483
+ {
1484
+ id: "play.cron.failed",
1485
+ label: "Cron failure",
1486
+ description: "A scheduled Play could not start or its run reached a failed terminal state.",
1487
+ source: "cron",
1488
+ outcome: "failed",
1489
+ defaultEnabled: true
1490
+ },
1491
+ {
1492
+ id: "play.webhook.succeeded",
1493
+ label: "Webhook success",
1494
+ description: "An accepted webhook-triggered Play completed successfully.",
1495
+ source: "webhook",
1496
+ outcome: "succeeded",
1497
+ defaultEnabled: true
1498
+ },
1499
+ {
1500
+ id: "play.webhook.failed",
1501
+ label: "Webhook failure",
1502
+ description: "An accepted webhook-triggered Play reached a failed terminal state.",
1503
+ source: "webhook",
1504
+ outcome: "failed",
1505
+ defaultEnabled: true
1506
+ }
1507
+ ];
1508
+ var PRODUCT_NOTIFICATION_EVENT_TYPE_SET = new Set(
1509
+ PRODUCT_NOTIFICATION_EVENT_CATALOG.map((event) => event.id)
1510
+ );
1511
+ var PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES = [
1512
+ "channels:read",
1513
+ "chat:write",
1514
+ "groups:read"
1515
+ ];
1516
+ var PRODUCT_NOTIFICATION_RETRY_DELAYS_MS = [
1517
+ 0,
1518
+ 6e4,
1519
+ 5 * 6e4,
1520
+ 15 * 6e4,
1521
+ 60 * 6e4
1522
+ ];
1523
+ var PRODUCT_NOTIFICATION_MAX_ATTEMPTS = PRODUCT_NOTIFICATION_RETRY_DELAYS_MS.length;
1524
+ var PRODUCT_NOTIFICATION_DELIVERY_LEASE_MS = 2 * 6e4;
1525
+ var PRODUCT_NOTIFICATION_SUCCESS_TTL_MS = 15 * 6e4;
1526
+ var PRODUCT_NOTIFICATION_FAILURE_TTL_MS = 24 * 60 * 6e4;
1527
+
1470
1528
  // src/stream-reconnect.ts
1471
1529
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
1472
1530
  var STREAM_RECONNECT_MAX_DELAY_MS = 15e3;
@@ -5023,6 +5081,95 @@ var DeeplineClient = class {
5023
5081
  );
5024
5082
  return response.plays ?? [];
5025
5083
  }
5084
+ /** Read product-notification destinations, subscriptions, event catalog, and DLQ health. */
5085
+ async getNotificationSettings() {
5086
+ return this.http.get("/api/v2/settings/notifications");
5087
+ }
5088
+ /** Start the Slack OAuth flow required by product notifications. */
5089
+ async connectNotificationSlack(options) {
5090
+ return this.http.post("/api/v2/integrations/connect", {
5091
+ provider: "slack",
5092
+ scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5093
+ ...options?.successUrl ? { success_url: options.successUrl } : {},
5094
+ ...options?.failureUrl ? { failure_url: options.failureUrl } : {}
5095
+ });
5096
+ }
5097
+ /** List Slack channels visible to the connected Deepline Slack app. */
5098
+ async listNotificationSlackChannels(query) {
5099
+ const suffix = query ? `?query=${encodeURIComponent(query)}` : "";
5100
+ return this.http.get(`/api/v2/settings/notifications/channels${suffix}`);
5101
+ }
5102
+ /** Select the Slack channel used for product notifications. */
5103
+ async setNotificationSlack(channel) {
5104
+ return this.http.put("/api/v2/settings/notifications", { channel });
5105
+ }
5106
+ /** Send one synchronous test ping and return Slack's delivery result. */
5107
+ async testNotificationSlack() {
5108
+ return this.http.post("/api/v2/settings/notifications/test", {});
5109
+ }
5110
+ /** Disable Slack product notifications without deleting the OAuth connection. */
5111
+ async disableNotificationSlack() {
5112
+ return this.http.delete("/api/v2/settings/notifications");
5113
+ }
5114
+ /** Enable or disable event IDs from the server-provided notification catalog. */
5115
+ async setNotificationSubscriptions(eventTypes, enabled) {
5116
+ return this.http.patch("/api/v2/settings/notifications/subscriptions", {
5117
+ eventTypes,
5118
+ enabled
5119
+ });
5120
+ }
5121
+ /** List exhausted deliveries. Dead-lettered messages never replay automatically. */
5122
+ async listNotificationDlq(limit = 25) {
5123
+ return this.http.get(
5124
+ `/api/v2/settings/notifications/dlq?limit=${encodeURIComponent(String(limit))}`
5125
+ );
5126
+ }
5127
+ /** Inspect one exhausted notification delivery. */
5128
+ async getNotificationDlqDelivery(deliveryId) {
5129
+ return this.http.get(
5130
+ `/api/v2/settings/notifications/dlq/${encodeURIComponent(deliveryId)}`
5131
+ );
5132
+ }
5133
+ /** Explicitly retry or archive one dead-lettered notification delivery. */
5134
+ async updateNotificationDlqDelivery(deliveryId, action) {
5135
+ return this.http.post(
5136
+ `/api/v2/settings/notifications/dlq/${encodeURIComponent(deliveryId)}`,
5137
+ { action }
5138
+ );
5139
+ }
5140
+ /** List the workspace's named notification rules. */
5141
+ async getNotifications() {
5142
+ return this.http.get("/api/v2/notifications");
5143
+ }
5144
+ /** List Slack channels available to an already-connected Slack integration. */
5145
+ async listNotificationChannels(query) {
5146
+ const suffix = query ? `?search=${encodeURIComponent(query)}` : "";
5147
+ return this.http.get(`/api/v2/notifications/slack/channels${suffix}`);
5148
+ }
5149
+ /** Create a named notification routed through an existing provider integration. */
5150
+ async createNotification(input) {
5151
+ return this.http.post("/api/v2/notifications", input);
5152
+ }
5153
+ /** Update a notification's target, event selection, or enabled state. */
5154
+ async updateNotification(notificationId, input) {
5155
+ return this.http.patch(
5156
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}`,
5157
+ input
5158
+ );
5159
+ }
5160
+ /** Send a validation ping to one notification. */
5161
+ async testNotification(notificationId) {
5162
+ return this.http.post(
5163
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}/test`,
5164
+ {}
5165
+ );
5166
+ }
5167
+ /** Archive one notification without touching its provider integration. */
5168
+ async deleteNotification(notificationId) {
5169
+ return this.http.delete(
5170
+ `/api/v2/notifications/${encodeURIComponent(notificationId)}`
5171
+ );
5172
+ }
5026
5173
  /**
5027
5174
  * Search callable plays and return compact play descriptions.
5028
5175
  *
@@ -202,6 +202,7 @@
202
202
  "dist/bundling-sources/shared_libs/plays/static-pipeline.ts",
203
203
  "dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts",
204
204
  "dist/bundling-sources/shared_libs/plays/tool-codegen.ts",
205
+ "dist/bundling-sources/shared_libs/product-notifications/contract.ts",
205
206
  "dist/bundling-sources/shared_libs/runtime-env.ts",
206
207
  "dist/bundling-sources/shared_libs/security/outbound-url-policy.ts",
207
208
  "dist/bundling-sources/shared_libs/security/safe-fetch.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.2.39",
3
+ "version": "0.2.40",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {