deepline 0.1.66 → 0.1.67

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.mjs CHANGED
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
179
179
 
180
180
  // src/release.ts
181
181
  var SDK_RELEASE = {
182
- version: "0.1.66",
182
+ version: "0.1.67",
183
183
  apiContract: "2026-05-play-bootstrap-dataset-summary",
184
184
  supportPolicy: {
185
- latest: "0.1.66",
185
+ latest: "0.1.67",
186
186
  minimumSupported: "0.1.53",
187
187
  deprecatedBelow: "0.1.53"
188
188
  }
@@ -433,6 +433,9 @@ var HttpClient = class {
433
433
  headers
434
434
  });
435
435
  }
436
+ async patch(path, body, headers) {
437
+ return this.request(path, { method: "PATCH", body, headers });
438
+ }
436
439
  /**
437
440
  * Send a DELETE request.
438
441
  *
@@ -1556,6 +1559,61 @@ var DeeplineClient = class {
1556
1559
  return this.http.delete(`/api/v2/plays/${encodedName}`);
1557
1560
  }
1558
1561
  // ——————————————————————————————————————————————————————————
1562
+ // Plays — public share pages
1563
+ // ——————————————————————————————————————————————————————————
1564
+ /**
1565
+ * Current share status for a play: the public page (if any), the published
1566
+ * copy, and the revision picker. Read-only.
1567
+ */
1568
+ async getSharePage(name) {
1569
+ const encodedName = encodeURIComponent(name);
1570
+ return this.http.get(`/api/v2/plays/${encodedName}/share`);
1571
+ }
1572
+ /**
1573
+ * Publish (or repoint) the play's public share page to a revision. Requires
1574
+ * `acknowledgedUnlisted: true` — the page is publicly viewable. Org-admin only.
1575
+ */
1576
+ async publishSharePage(name, request) {
1577
+ const encodedName = encodeURIComponent(name);
1578
+ return this.http.post(
1579
+ `/api/v2/plays/${encodedName}/share`,
1580
+ request
1581
+ );
1582
+ }
1583
+ /**
1584
+ * Update share-page settings (SEO indexing, credit-cost / latency display)
1585
+ * without moving the published pointer. Org-admin only.
1586
+ */
1587
+ async updateSharePage(name, request) {
1588
+ const encodedName = encodeURIComponent(name);
1589
+ return this.http.patch(
1590
+ `/api/v2/plays/${encodedName}/share`,
1591
+ request
1592
+ );
1593
+ }
1594
+ /**
1595
+ * Unshare: hard-delete the play's public page and its cards. Returns the
1596
+ * fresh status (now `share: null`). Org-admin only. Idempotent — a no-op when
1597
+ * the play was never published.
1598
+ */
1599
+ async unpublishSharePage(name) {
1600
+ const encodedName = encodeURIComponent(name);
1601
+ return this.http.delete(
1602
+ `/api/v2/plays/${encodedName}/share`
1603
+ );
1604
+ }
1605
+ /**
1606
+ * Regenerate the LLM landing-page copy for a revision (defaults to the
1607
+ * published one). Org-admin only.
1608
+ */
1609
+ async regenerateSharePage(name, request = {}) {
1610
+ const encodedName = encodeURIComponent(name);
1611
+ return this.http.post(
1612
+ `/api/v2/plays/${encodedName}/share/regenerate`,
1613
+ request
1614
+ );
1615
+ }
1616
+ // ——————————————————————————————————————————————————————————
1559
1617
  // Plays — high-level orchestration
1560
1618
  // ——————————————————————————————————————————————————————————
1561
1619
  /**
@@ -57,6 +57,9 @@ import type {
57
57
  PublishPlayVersionResult,
58
58
  StartPlayRunRequest,
59
59
  DeletePlayResult,
60
+ SharePageStatus,
61
+ PublishSharePageRequest,
62
+ UpdateSharePageRequest,
60
63
  ToolDefinition,
61
64
  ToolSearchOptions,
62
65
  ToolSearchResult,
@@ -1625,6 +1628,76 @@ export class DeeplineClient {
1625
1628
  return this.http.delete<DeletePlayResult>(`/api/v2/plays/${encodedName}`);
1626
1629
  }
1627
1630
 
1631
+ // ——————————————————————————————————————————————————————————
1632
+ // Plays — public share pages
1633
+ // ——————————————————————————————————————————————————————————
1634
+
1635
+ /**
1636
+ * Current share status for a play: the public page (if any), the published
1637
+ * copy, and the revision picker. Read-only.
1638
+ */
1639
+ async getSharePage(name: string): Promise<SharePageStatus> {
1640
+ const encodedName = encodeURIComponent(name);
1641
+ return this.http.get<SharePageStatus>(`/api/v2/plays/${encodedName}/share`);
1642
+ }
1643
+
1644
+ /**
1645
+ * Publish (or repoint) the play's public share page to a revision. Requires
1646
+ * `acknowledgedUnlisted: true` — the page is publicly viewable. Org-admin only.
1647
+ */
1648
+ async publishSharePage(
1649
+ name: string,
1650
+ request: PublishSharePageRequest,
1651
+ ): Promise<SharePageStatus> {
1652
+ const encodedName = encodeURIComponent(name);
1653
+ return this.http.post<SharePageStatus>(
1654
+ `/api/v2/plays/${encodedName}/share`,
1655
+ request,
1656
+ );
1657
+ }
1658
+
1659
+ /**
1660
+ * Update share-page settings (SEO indexing, credit-cost / latency display)
1661
+ * without moving the published pointer. Org-admin only.
1662
+ */
1663
+ async updateSharePage(
1664
+ name: string,
1665
+ request: UpdateSharePageRequest,
1666
+ ): Promise<SharePageStatus> {
1667
+ const encodedName = encodeURIComponent(name);
1668
+ return this.http.patch<SharePageStatus>(
1669
+ `/api/v2/plays/${encodedName}/share`,
1670
+ request,
1671
+ );
1672
+ }
1673
+
1674
+ /**
1675
+ * Unshare: hard-delete the play's public page and its cards. Returns the
1676
+ * fresh status (now `share: null`). Org-admin only. Idempotent — a no-op when
1677
+ * the play was never published.
1678
+ */
1679
+ async unpublishSharePage(name: string): Promise<SharePageStatus> {
1680
+ const encodedName = encodeURIComponent(name);
1681
+ return this.http.delete<SharePageStatus>(
1682
+ `/api/v2/plays/${encodedName}/share`,
1683
+ );
1684
+ }
1685
+
1686
+ /**
1687
+ * Regenerate the LLM landing-page copy for a revision (defaults to the
1688
+ * published one). Org-admin only.
1689
+ */
1690
+ async regenerateSharePage(
1691
+ name: string,
1692
+ request: { revisionId?: string } = {},
1693
+ ): Promise<SharePageStatus> {
1694
+ const encodedName = encodeURIComponent(name);
1695
+ return this.http.post<SharePageStatus>(
1696
+ `/api/v2/plays/${encodedName}/share/regenerate`,
1697
+ request,
1698
+ );
1699
+ }
1700
+
1628
1701
  // ——————————————————————————————————————————————————————————
1629
1702
  // Plays — high-level orchestration
1630
1703
  // ——————————————————————————————————————————————————————————
@@ -35,7 +35,7 @@ import {
35
35
  const MAX_DIAGNOSTIC_HEADER_LENGTH = 120;
36
36
 
37
37
  interface RequestOptions {
38
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
38
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
39
39
  body?: unknown;
40
40
  formData?: FormData | (() => FormData);
41
41
  headers?: Record<string, string>;
@@ -392,6 +392,14 @@ export class HttpClient {
392
392
  });
393
393
  }
394
394
 
395
+ async patch<T = unknown>(
396
+ path: string,
397
+ body: unknown,
398
+ headers?: Record<string, string>,
399
+ ): Promise<T> {
400
+ return this.request<T>(path, { method: 'PATCH', body, headers });
401
+ }
402
+
395
403
  /**
396
404
  * Send a DELETE request.
397
405
  *
@@ -50,10 +50,10 @@ export type SdkRelease = {
50
50
  };
51
51
 
52
52
  export const SDK_RELEASE = {
53
- version: '0.1.66',
53
+ version: '0.1.67',
54
54
  apiContract: '2026-05-play-bootstrap-dataset-summary',
55
55
  supportPolicy: {
56
- latest: '0.1.66',
56
+ latest: '0.1.67',
57
57
  minimumSupported: '0.1.53',
58
58
  deprecatedBelow: '0.1.53',
59
59
  },
@@ -889,3 +889,62 @@ export interface DeletePlayResult {
889
889
  deletedBindingCount: number;
890
890
  deletedRunCount: number;
891
891
  }
892
+
893
+ // ——————————————————————————————————————————————————————————
894
+ // Shareable play pages
895
+ // ——————————————————————————————————————————————————————————
896
+
897
+ /** Owner-facing view of a play's public share page. */
898
+ export interface SharePageOwnerView {
899
+ shareSlug: string;
900
+ publishedRevisionId: string;
901
+ publishedVersion: number;
902
+ visibility: string;
903
+ seoIndexing: 'index' | 'noindex';
904
+ showAverageDeeplineCost: boolean;
905
+ showAverageLatency: boolean;
906
+ /** Stable public path, e.g. `/p/{shareSlug}`. */
907
+ publicPath: string;
908
+ /** Version-pinned canonical path, e.g. `/p/{shareSlug}/v/{version}`. */
909
+ canonicalPath: string;
910
+ createdAt: number;
911
+ updatedAt: number;
912
+ }
913
+
914
+ /** One row in the owner-facing revision picker for sharing. */
915
+ export interface SharePageRevisionOption {
916
+ revisionId: string;
917
+ version: number;
918
+ isLive: boolean;
919
+ isWorking: boolean;
920
+ isPublished: boolean;
921
+ hasMap: boolean;
922
+ hasCard: boolean;
923
+ createdAt: number;
924
+ }
925
+
926
+ /** Status payload from `GET/POST/PATCH /api/v2/plays/:name/share`. */
927
+ export interface SharePageStatus {
928
+ playName: string;
929
+ share: SharePageOwnerView | null;
930
+ publishedCopy: unknown | null;
931
+ revisions: SharePageRevisionOption[];
932
+ /** Present on publish responses when share-card generation was non-strict. */
933
+ warning?: string | null;
934
+ }
935
+
936
+ export interface PublishSharePageRequest {
937
+ /** The revision to publish/repoint the public page to. */
938
+ revisionId: string;
939
+ /** Must be true — acknowledges the page is publicly viewable. */
940
+ acknowledgedUnlisted: true;
941
+ showAverageDeeplineCost?: boolean;
942
+ showAverageLatency?: boolean;
943
+ seoIndexing?: 'index' | 'noindex';
944
+ }
945
+
946
+ export interface UpdateSharePageRequest {
947
+ showAverageDeeplineCost?: boolean;
948
+ showAverageLatency?: boolean;
949
+ seoIndexing?: 'index' | 'noindex';
950
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {