@opengeni/sdk 2.0.1 → 2.0.2-canary.38789554071001

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 (74) hide show
  1. package/dist/adapters/next.js +4 -4
  2. package/dist/artifacts.js +7 -7
  3. package/dist/browser.js +6 -6
  4. package/dist/chat/index.js +9 -9
  5. package/dist/{chunk-UPTXNM2T.js → chunk-4AHR4KGA.js} +2 -2
  6. package/dist/{chunk-DVJAK3RA.js → chunk-7AHX3WYM.js} +315 -10
  7. package/dist/chunk-7AHX3WYM.js.map +1 -0
  8. package/dist/{chunk-W6PTFKPT.js → chunk-7ECHPP7G.js} +434 -32
  9. package/dist/chunk-7ECHPP7G.js.map +1 -0
  10. package/dist/{chunk-HTFTNJ5Y.js → chunk-7EWT3PV6.js} +9 -1
  11. package/dist/{chunk-HTFTNJ5Y.js.map → chunk-7EWT3PV6.js.map} +1 -1
  12. package/dist/{chunk-ACYSTGHF.js → chunk-FZBIDTB2.js} +2 -2
  13. package/dist/{chunk-YS56XJYT.js → chunk-HCK5K3TU.js} +2 -2
  14. package/dist/{chunk-LHDKZT6R.js → chunk-KDRLQU5V.js} +4 -4
  15. package/dist/{chunk-7ZYDT364.js → chunk-M3PLACP4.js} +2 -2
  16. package/dist/{chunk-W3DHELJ6.js → chunk-O7KANXC3.js} +2 -2
  17. package/dist/chunk-O7KANXC3.js.map +1 -0
  18. package/dist/{chunk-ZHHHRWBL.js → chunk-P6M3D5MN.js} +1 -1
  19. package/dist/chunk-P6M3D5MN.js.map +1 -0
  20. package/dist/{chunk-HINIVNYI.js → chunk-P7UWKORG.js} +2 -2
  21. package/dist/{chunk-EEH55DMJ.js → chunk-WVCJRSGJ.js} +2 -2
  22. package/dist/{chunk-QYVUI6O3.js → chunk-XA7HVIHI.js} +2 -2
  23. package/dist/client.d.ts +158 -2
  24. package/dist/codex-realtime-controller.js +2 -2
  25. package/dist/core.js +9 -9
  26. package/dist/document-authority.js +6 -6
  27. package/dist/editable-artifacts.js +4 -4
  28. package/dist/index.d.ts +5 -3
  29. package/dist/index.js +16 -12
  30. package/dist/index.js.map +1 -1
  31. package/dist/interaction.d.ts +10 -8
  32. package/dist/interaction.js +2 -2
  33. package/dist/realtime.js +2 -2
  34. package/dist/session-proxy.js +4 -4
  35. package/dist/session-usage-limits.js +1 -1
  36. package/dist/site-bridge-host.d.ts +112 -0
  37. package/dist/site-bridge-host.js +285 -0
  38. package/dist/site-bridge-host.js.map +1 -0
  39. package/dist/site-browser-runtime.gen.d.ts +1 -1
  40. package/dist/site-data.d.ts +3 -1
  41. package/dist/site-document.js +1 -1
  42. package/dist/site-document.js.map +1 -1
  43. package/dist/site-sql.d.ts +31 -0
  44. package/dist/site-tool-bridge.d.ts +6 -1
  45. package/dist/site.d.ts +64 -1
  46. package/dist/site.js +13 -7
  47. package/dist/tenant-workspaces.js +2 -2
  48. package/dist/{tools-KMZBIKKM.js → tools-37DCTCNZ.js} +3 -3
  49. package/dist/types.d.ts +4 -2
  50. package/package.json +7 -3
  51. package/src/client.ts +502 -6
  52. package/src/errors.ts +8 -0
  53. package/src/index.ts +59 -0
  54. package/src/interaction.ts +10 -8
  55. package/src/site-bridge-host.ts +422 -0
  56. package/src/site-browser-runtime.gen.ts +1 -1
  57. package/src/site-data.ts +3 -0
  58. package/src/site-sql.ts +153 -0
  59. package/src/site-tool-bridge.ts +62 -5
  60. package/src/site.ts +183 -3
  61. package/src/types.ts +18 -0
  62. package/dist/chunk-DVJAK3RA.js.map +0 -1
  63. package/dist/chunk-W3DHELJ6.js.map +0 -1
  64. package/dist/chunk-W6PTFKPT.js.map +0 -1
  65. package/dist/chunk-ZHHHRWBL.js.map +0 -1
  66. /package/dist/{chunk-UPTXNM2T.js.map → chunk-4AHR4KGA.js.map} +0 -0
  67. /package/dist/{chunk-ACYSTGHF.js.map → chunk-FZBIDTB2.js.map} +0 -0
  68. /package/dist/{chunk-YS56XJYT.js.map → chunk-HCK5K3TU.js.map} +0 -0
  69. /package/dist/{chunk-LHDKZT6R.js.map → chunk-KDRLQU5V.js.map} +0 -0
  70. /package/dist/{chunk-7ZYDT364.js.map → chunk-M3PLACP4.js.map} +0 -0
  71. /package/dist/{chunk-HINIVNYI.js.map → chunk-P7UWKORG.js.map} +0 -0
  72. /package/dist/{chunk-EEH55DMJ.js.map → chunk-WVCJRSGJ.js.map} +0 -0
  73. /package/dist/{chunk-QYVUI6O3.js.map → chunk-XA7HVIHI.js.map} +0 -0
  74. /package/dist/{tools-KMZBIKKM.js.map → tools-37DCTCNZ.js.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createSessionProxyHandler
3
- } from "../chunk-LHDKZT6R.js";
3
+ } from "../chunk-KDRLQU5V.js";
4
4
  import "../chunk-UM4ZXXJR.js";
5
5
  import "../chunk-QGEIL4TR.js";
6
- import "../chunk-UPTXNM2T.js";
7
- import "../chunk-ZHHHRWBL.js";
8
- import "../chunk-HTFTNJ5Y.js";
6
+ import "../chunk-4AHR4KGA.js";
7
+ import "../chunk-P6M3D5MN.js";
8
+ import "../chunk-7EWT3PV6.js";
9
9
 
10
10
  // src/adapters/next.ts
11
11
  function toNextRouteHandlers(handler) {
package/dist/artifacts.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-YS56XJYT.js";
4
- import "./chunk-7ZYDT364.js";
5
- import "./chunk-DVJAK3RA.js";
3
+ } from "./chunk-HCK5K3TU.js";
4
+ import "./chunk-M3PLACP4.js";
5
+ import "./chunk-7AHX3WYM.js";
6
6
  import "./chunk-VPVMLM7Q.js";
7
- import "./chunk-UPTXNM2T.js";
8
- import "./chunk-ZHHHRWBL.js";
9
- import "./chunk-W3DHELJ6.js";
10
- import "./chunk-HTFTNJ5Y.js";
7
+ import "./chunk-4AHR4KGA.js";
8
+ import "./chunk-P6M3D5MN.js";
9
+ import "./chunk-O7KANXC3.js";
10
+ import "./chunk-7EWT3PV6.js";
11
11
  export {
12
12
  OpenGeniClient
13
13
  };
package/dist/browser.js CHANGED
@@ -5,17 +5,17 @@ import {
5
5
  OpenGeniToolCallError,
6
6
  OpenGeniToolReapprovalRequiredError,
7
7
  OpenGeniToolsClient
8
- } from "./chunk-HINIVNYI.js";
8
+ } from "./chunk-P7UWKORG.js";
9
9
  import {
10
10
  OpenGeniClient
11
- } from "./chunk-DVJAK3RA.js";
11
+ } from "./chunk-7AHX3WYM.js";
12
12
  import "./chunk-VPVMLM7Q.js";
13
- import "./chunk-UPTXNM2T.js";
13
+ import "./chunk-4AHR4KGA.js";
14
14
  import {
15
15
  OPENGENI_API_CONTRACT_HEADER,
16
16
  OPENGENI_API_CONTRACT_REVISION
17
- } from "./chunk-ZHHHRWBL.js";
18
- import "./chunk-W3DHELJ6.js";
17
+ } from "./chunk-P6M3D5MN.js";
18
+ import "./chunk-O7KANXC3.js";
19
19
  import {
20
20
  OpenGeniAllowanceExhaustedError,
21
21
  OpenGeniApiContractMismatchError,
@@ -28,7 +28,7 @@ import {
28
28
  OpenGeniStreamError,
29
29
  formatErrorMessage,
30
30
  isRetryableStreamError
31
- } from "./chunk-HTFTNJ5Y.js";
31
+ } from "./chunk-7EWT3PV6.js";
32
32
  export {
33
33
  OPENGENI_API_CONTRACT_HEADER,
34
34
  OPENGENI_API_CONTRACT_REVISION,
@@ -6,28 +6,28 @@ import {
6
6
  createWorkspaceIdResolver,
7
7
  isUuid,
8
8
  uuidV5
9
- } from "../chunk-QYVUI6O3.js";
9
+ } from "../chunk-XA7HVIHI.js";
10
10
  import {
11
11
  EMPTY_FINAL_REPLY_NOTICE,
12
12
  OpenGeniEmbeddingClient,
13
13
  turnCompletedWithEmptyFinalReply
14
- } from "../chunk-ACYSTGHF.js";
15
- import "../chunk-YS56XJYT.js";
16
- import "../chunk-7ZYDT364.js";
14
+ } from "../chunk-FZBIDTB2.js";
15
+ import "../chunk-HCK5K3TU.js";
16
+ import "../chunk-M3PLACP4.js";
17
17
  import {
18
18
  chatDefaults
19
19
  } from "../chunk-UM4ZXXJR.js";
20
- import "../chunk-DVJAK3RA.js";
20
+ import "../chunk-7AHX3WYM.js";
21
21
  import "../chunk-VPVMLM7Q.js";
22
22
  import {
23
23
  parseSseStream
24
- } from "../chunk-UPTXNM2T.js";
25
- import "../chunk-ZHHHRWBL.js";
26
- import "../chunk-W3DHELJ6.js";
24
+ } from "../chunk-4AHR4KGA.js";
25
+ import "../chunk-P6M3D5MN.js";
26
+ import "../chunk-O7KANXC3.js";
27
27
  import {
28
28
  OpenGeniApiError,
29
29
  OpenGeniSetupError
30
- } from "../chunk-HTFTNJ5Y.js";
30
+ } from "../chunk-7EWT3PV6.js";
31
31
 
32
32
  // src/chat/types.ts
33
33
  var OpenGeniChatError = class extends Error {
@@ -2,7 +2,7 @@ import {
2
2
  OpenGeniStreamError,
3
3
  isAbortError,
4
4
  isRetryableStreamError
5
- } from "./chunk-HTFTNJ5Y.js";
5
+ } from "./chunk-7EWT3PV6.js";
6
6
 
7
7
  // src/sse.ts
8
8
  async function* parseSseStream(stream) {
@@ -298,4 +298,4 @@ export {
298
298
  withStreamInactivityTimeout,
299
299
  sessionEventStreamCoveredThrough
300
300
  };
301
- //# sourceMappingURL=chunk-UPTXNM2T.js.map
301
+ //# sourceMappingURL=chunk-4AHR4KGA.js.map
@@ -7,7 +7,7 @@ import {
7
7
  runBeforeLive,
8
8
  streamSessionEvents,
9
9
  withStreamInactivityTimeout
10
- } from "./chunk-UPTXNM2T.js";
10
+ } from "./chunk-4AHR4KGA.js";
11
11
  import {
12
12
  COMPUTER_SCREENSHOT_MAX_BYTES,
13
13
  GENERATED_VIDEO_MAX_BYTES,
@@ -15,12 +15,12 @@ import {
15
15
  OPENGENI_API_CONTRACT_REVISION,
16
16
  OPENGENI_CORRELATION_HEADER,
17
17
  RETAINED_OUTPUT_MAX_PAGE_BYTES
18
- } from "./chunk-ZHHHRWBL.js";
18
+ } from "./chunk-P6M3D5MN.js";
19
19
  import {
20
20
  OpenGeniInteractionClient,
21
21
  decodeComputerFrameMetadataHeader,
22
22
  parseBrowserFrameMetadata
23
- } from "./chunk-W3DHELJ6.js";
23
+ } from "./chunk-O7KANXC3.js";
24
24
  import {
25
25
  OpenGeniAllowanceExhaustedError,
26
26
  OpenGeniApiContractMismatchError,
@@ -37,7 +37,7 @@ import {
37
37
  rejectsStartModeField,
38
38
  sessionUsageLimitNotConfirmed,
39
39
  sessionUsageLimitReachedFields
40
- } from "./chunk-HTFTNJ5Y.js";
40
+ } from "./chunk-7EWT3PV6.js";
41
41
 
42
42
  // src/vaults-api.ts
43
43
  function asVaultClient(client) {
@@ -812,6 +812,16 @@ function defaultApiContractMode(options) {
812
812
  const browser = typeof window !== "undefined" && typeof document !== "undefined";
813
813
  return browser && !options.apiKey ? "strict" : "compatible";
814
814
  }
815
+ function interactionSessionListQuery(options) {
816
+ const { associatedSessionId, includeTerminal, ...request } = options;
817
+ return {
818
+ query: {
819
+ ...associatedSessionId ? { associatedSessionId } : {},
820
+ ...includeTerminal !== void 0 ? { includeTerminal: String(includeTerminal) } : {}
821
+ },
822
+ request
823
+ };
824
+ }
815
825
  function createSingleFlightReadEntry(generation, onRequestStart) {
816
826
  let resolve;
817
827
  let reject;
@@ -863,7 +873,7 @@ function createLazyToolsFacade(transport) {
863
873
  const normalizedWorkspaceId = workspaceId.trim();
864
874
  if (!normalizedWorkspaceId) throw new TypeError("workspaceId is required");
865
875
  let workspaceTools;
866
- const load = () => workspaceTools ??= import("./tools-KMZBIKKM.js").then(
876
+ const load = () => workspaceTools ??= import("./tools-37DCTCNZ.js").then(
867
877
  ({ OpenGeniToolsClient }) => new OpenGeniToolsClient(transport).forWorkspace(normalizedWorkspaceId)
868
878
  );
869
879
  const node = (path) => new Proxy(
@@ -3088,12 +3098,13 @@ var OpenGeniClient = class {
3088
3098
  /** Workspace-wide BrowserSession inventory. Associations express relevance,
3089
3099
  * not access: peers and child agents intentionally remain discoverable. */
3090
3100
  async listBrowserSessions(workspaceId, options = {}) {
3101
+ const { query, request } = interactionSessionListQuery(options);
3091
3102
  return await this.requestJson(
3092
3103
  "GET",
3093
3104
  `/v1/workspaces/${workspaceId}/browser-sessions`,
3094
3105
  void 0,
3095
- {},
3096
- options
3106
+ query,
3107
+ request
3097
3108
  );
3098
3109
  }
3099
3110
  async getBrowserSession(workspaceId, browserSessionId, options = {}) {
@@ -3367,12 +3378,13 @@ var OpenGeniClient = class {
3367
3378
  /** Workspace-wide ComputerSession inventory. Associations express
3368
3379
  * relevance, not access; peer sessions intentionally remain discoverable. */
3369
3380
  async listComputerSessions(workspaceId, options = {}) {
3381
+ const { query, request } = interactionSessionListQuery(options);
3370
3382
  return await this.requestJson(
3371
3383
  "GET",
3372
3384
  `/v1/workspaces/${workspaceId}/computer-sessions`,
3373
3385
  void 0,
3374
- {},
3375
- options
3386
+ query,
3387
+ request
3376
3388
  );
3377
3389
  }
3378
3390
  async getComputerSession(workspaceId, computerSessionId, options = {}) {
@@ -5810,6 +5822,296 @@ var OpenGeniClient = class {
5810
5822
  options
5811
5823
  );
5812
5824
  }
5825
+ /**
5826
+ * A Site's SQL database (optional Cloudflare storage): availability, whether
5827
+ * it is on, migrations, named queries, usage and limits. Needs a manager.
5828
+ */
5829
+ async getSiteSql(workspaceId, siteId, options = {}) {
5830
+ return await this.requestJson(
5831
+ "GET",
5832
+ `${siteDataPath(workspaceId, siteId)}/sql`,
5833
+ void 0,
5834
+ void 0,
5835
+ options
5836
+ );
5837
+ }
5838
+ /** Turn a Site's SQL database on or off; turning it off keeps its data. */
5839
+ async updateSiteSqlSettings(workspaceId, siteId, request, options = {}) {
5840
+ return await this.requestJson(
5841
+ "PUT",
5842
+ `${siteDataPath(workspaceId, siteId)}/sql/settings`,
5843
+ request,
5844
+ void 0,
5845
+ options
5846
+ );
5847
+ }
5848
+ /** Add a named schema migration to a Site's SQL database. */
5849
+ async migrateSiteSql(workspaceId, siteId, request, options = {}) {
5850
+ return await this.requestJson(
5851
+ "POST",
5852
+ `${siteDataPath(workspaceId, siteId)}/sql/migrations`,
5853
+ request,
5854
+ void 0,
5855
+ options
5856
+ );
5857
+ }
5858
+ /** Create or replace a named query Site pages run with site.sql.run. */
5859
+ async defineSiteSqlQuery(workspaceId, siteId, name, request, options = {}) {
5860
+ return await this.requestJson(
5861
+ "PUT",
5862
+ `${siteDataPath(workspaceId, siteId)}/sql/queries/${encodeURIComponent(name)}`,
5863
+ request,
5864
+ void 0,
5865
+ options
5866
+ );
5867
+ }
5868
+ async deleteSiteSqlQuery(workspaceId, siteId, name, options = {}) {
5869
+ return await this.requestJson(
5870
+ "DELETE",
5871
+ `${siteDataPath(workspaceId, siteId)}/sql/queries/${encodeURIComponent(name)}`,
5872
+ void 0,
5873
+ void 0,
5874
+ options
5875
+ );
5876
+ }
5877
+ /** Run a named query with the caller's access (its audience decides who may). */
5878
+ async runSiteSqlQuery(workspaceId, siteId, name, request = {}, options = {}) {
5879
+ return await this.requestJson(
5880
+ "POST",
5881
+ `${siteDataPath(workspaceId, siteId)}/sql/queries/${encodeURIComponent(name)}`,
5882
+ request,
5883
+ void 0,
5884
+ options
5885
+ );
5886
+ }
5887
+ /** Run one read-only statement on a Site's SQL database. Needs a manager. */
5888
+ async querySiteSql(workspaceId, siteId, request, options = {}) {
5889
+ return await this.requestJson(
5890
+ "POST",
5891
+ `${siteDataPath(workspaceId, siteId)}/sql/query`,
5892
+ request,
5893
+ void 0,
5894
+ options
5895
+ );
5896
+ }
5897
+ /** Run one data-changing statement on a Site's SQL database. Needs a manager. */
5898
+ async executeSiteSql(workspaceId, siteId, request, options = {}) {
5899
+ return await this.requestJson(
5900
+ "POST",
5901
+ `${siteDataPath(workspaceId, siteId)}/sql/execute`,
5902
+ request,
5903
+ void 0,
5904
+ options
5905
+ );
5906
+ }
5907
+ /** Tables, columns, row counts and applied migrations of a Site's SQL database. */
5908
+ async inspectSiteSql(workspaceId, siteId, options = {}) {
5909
+ return await this.requestJson(
5910
+ "GET",
5911
+ `${siteDataPath(workspaceId, siteId)}/sql/inspect`,
5912
+ void 0,
5913
+ void 0,
5914
+ options
5915
+ );
5916
+ }
5917
+ /**
5918
+ * Export a Site's SQL database as SQL, CSV (one table) or JSON. One call
5919
+ * returns at most `maxBytes` (16 MiB at most); when `nextCursor` is set,
5920
+ * call again with it as `cursor` and append the pieces in order.
5921
+ */
5922
+ async exportSiteSql(workspaceId, siteId, options = {}) {
5923
+ const format = options.format ?? "sql";
5924
+ const response = await this.requestResponse(
5925
+ "GET",
5926
+ `${siteDataPath(workspaceId, siteId)}/sql/export`,
5927
+ {
5928
+ format,
5929
+ ...options.table ? { table: options.table } : {},
5930
+ ...options.cursor ? { cursor: options.cursor } : {},
5931
+ ...options.maxBytes !== void 0 ? { maxBytes: String(options.maxBytes) } : {}
5932
+ },
5933
+ { ...options, accept: format === "json" ? "application/json" : "*/*" }
5934
+ );
5935
+ return {
5936
+ content: await response.text(),
5937
+ contentType: response.headers.get("content-type") ?? "",
5938
+ truncated: response.headers.get("x-opengeni-export-truncated") === "true",
5939
+ nextCursor: response.headers.get("x-opengeni-export-next-cursor") || null
5940
+ };
5941
+ }
5942
+ /** Import SQL statements, CSV or JSON rows into a Site's SQL database. */
5943
+ async importSiteSql(workspaceId, siteId, request, options = {}) {
5944
+ return await this.requestJson(
5945
+ "POST",
5946
+ `${siteDataPath(workspaceId, siteId)}/sql/import`,
5947
+ request,
5948
+ void 0,
5949
+ options
5950
+ );
5951
+ }
5952
+ /** Empty a Site's SQL database, keeping (rebuilding) or dropping its schema. */
5953
+ async resetSiteSql(workspaceId, siteId, request = {}, options = {}) {
5954
+ return await this.requestJson(
5955
+ "POST",
5956
+ `${siteDataPath(workspaceId, siteId)}/sql/reset`,
5957
+ { confirm: true, ...request },
5958
+ void 0,
5959
+ options
5960
+ );
5961
+ }
5962
+ /**
5963
+ * A Site's web publication: hostname, access, embedded agent, limits,
5964
+ * status and moderation. 404 when the Site was never published; 503
5965
+ * `sites_publishing_disabled` when the deployment has no Sites domain.
5966
+ */
5967
+ async getSitePublication(workspaceId, siteId, options = {}) {
5968
+ return await this.requestJson(
5969
+ "GET",
5970
+ sitePublicationPath(workspaceId, siteId),
5971
+ void 0,
5972
+ void 0,
5973
+ options
5974
+ );
5975
+ }
5976
+ /**
5977
+ * Publish a Site on its own hostname or change its publication. Omitted
5978
+ * fields keep their current values. 409 `site_hostname_taken` when the
5979
+ * label belongs to another Site; 403 when the Site is Only me or the
5980
+ * caller cannot manage it.
5981
+ */
5982
+ async updateSitePublication(workspaceId, siteId, request, options = {}) {
5983
+ return await this.requestJson(
5984
+ "PUT",
5985
+ sitePublicationPath(workspaceId, siteId),
5986
+ request,
5987
+ void 0,
5988
+ options
5989
+ );
5990
+ }
5991
+ /** Stop serving a published Site. Its hostname stays held for the workspace. */
5992
+ async unpublishSite(workspaceId, siteId, options = {}) {
5993
+ return await this.requestJson(
5994
+ "DELETE",
5995
+ sitePublicationPath(workspaceId, siteId),
5996
+ void 0,
5997
+ void 0,
5998
+ options
5999
+ );
6000
+ }
6001
+ /**
6002
+ * Apply a readiness warning's one-click fix (`publication.warnings[].fix`):
6003
+ * a Site Data collection's guest access or a Site SQL query's audience.
6004
+ * Answers the publication with fresh warnings. 404
6005
+ * `site_fix_target_missing` when the collection or query no longer exists.
6006
+ */
6007
+ async applySitePublicationFix(workspaceId, siteId, fix, options = {}) {
6008
+ return await this.requestJson(
6009
+ "POST",
6010
+ `${sitePublicationPath(workspaceId, siteId)}/fixes`,
6011
+ fix,
6012
+ void 0,
6013
+ options
6014
+ );
6015
+ }
6016
+ /**
6017
+ * This month's Site platform usage of the workspace (gateway requests,
6018
+ * Site SQL rows read and written, Site SQL and Site Data storage) against
6019
+ * its monthly allowance, with the billing mode and the Opengeni-wide
6020
+ * brake state.
6021
+ */
6022
+ async getSitePlatformUsage(workspaceId, options = {}) {
6023
+ return await this.requestJson(
6024
+ "GET",
6025
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/site-platform-usage`,
6026
+ void 0,
6027
+ void 0,
6028
+ options
6029
+ );
6030
+ }
6031
+ /** Whether a hostname label is valid and free for a Site in this workspace. */
6032
+ async checkSiteHostname(workspaceId, label, options = {}) {
6033
+ return await this.requestJson(
6034
+ "GET",
6035
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/site-hostnames/${encodeURIComponent(label)}`,
6036
+ void 0,
6037
+ void 0,
6038
+ options
6039
+ );
6040
+ }
6041
+ /** Take a published Site down at once; visitors see a takedown notice. */
6042
+ async takeDownSite(workspaceId, siteId, request, options = {}) {
6043
+ return await this.requestJson(
6044
+ "POST",
6045
+ `${sitePublicationPath(workspaceId, siteId)}/takedown`,
6046
+ request,
6047
+ void 0,
6048
+ options
6049
+ );
6050
+ }
6051
+ /** Serve a Site that was taken down again. */
6052
+ async restoreSite(workspaceId, siteId, options = {}) {
6053
+ return await this.requestJson(
6054
+ "POST",
6055
+ `${sitePublicationPath(workspaceId, siteId)}/restore`,
6056
+ {},
6057
+ void 0,
6058
+ options
6059
+ );
6060
+ }
6061
+ /** Abuse reports visitors filed against a published Site. */
6062
+ async listSiteAbuseReports(workspaceId, siteId, options = {}) {
6063
+ return await this.requestJson(
6064
+ "GET",
6065
+ `${sitePublicationPath(workspaceId, siteId)}/reports`,
6066
+ void 0,
6067
+ void 0,
6068
+ options
6069
+ );
6070
+ }
6071
+ /** Close an abuse report as dismissed or actioned. */
6072
+ async updateSiteAbuseReport(workspaceId, siteId, reportId, request, options = {}) {
6073
+ return await this.requestJson(
6074
+ "PATCH",
6075
+ `${sitePublicationPath(workspaceId, siteId)}/reports/${encodeURIComponent(reportId)}`,
6076
+ request,
6077
+ void 0,
6078
+ options
6079
+ );
6080
+ }
6081
+ /** The workspace's default limit profile for published Sites. */
6082
+ async getSiteLimitProfile(workspaceId, options = {}) {
6083
+ return await this.requestJson(
6084
+ "GET",
6085
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/site-limit-profile`,
6086
+ void 0,
6087
+ void 0,
6088
+ options
6089
+ );
6090
+ }
6091
+ /** Change the workspace's default limit profile for published Sites. Needs a workspace admin. */
6092
+ async updateSiteLimitProfile(workspaceId, profile, options = {}) {
6093
+ return await this.requestJson(
6094
+ "PUT",
6095
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/site-limit-profile`,
6096
+ profile,
6097
+ void 0,
6098
+ options
6099
+ );
6100
+ }
6101
+ /**
6102
+ * Let the signed-in person open a published Site: returns a one-time code,
6103
+ * bound to the Site host, PKCE challenge and redirect, inside `redirectTo`.
6104
+ * 403 `site_access_denied` when they may not open the Site.
6105
+ */
6106
+ async authorizeSiteViewer(request, options = {}) {
6107
+ return await this.requestJson(
6108
+ "POST",
6109
+ "/v1/site-auth/authorize",
6110
+ request,
6111
+ void 0,
6112
+ options
6113
+ );
6114
+ }
5813
6115
  /** Search the official MCP registry for installable capabilities. */
5814
6116
  async discoverMcpCapabilities(workspaceId, options = {}) {
5815
6117
  return await this.requestJson(
@@ -7594,6 +7896,9 @@ async function readBoundedResponseBytes(response, maxBytes, expectedBytes) {
7594
7896
  function siteDataPath(workspaceId, siteId) {
7595
7897
  return `/v1/workspaces/${encodeURIComponent(workspaceId)}/published-artifacts/${encodeURIComponent(siteId)}`;
7596
7898
  }
7899
+ function sitePublicationPath(workspaceId, siteId) {
7900
+ return `${siteDataPath(workspaceId, siteId)}/publication`;
7901
+ }
7597
7902
 
7598
7903
  export {
7599
7904
  asVaultClient,
@@ -7615,4 +7920,4 @@ export {
7615
7920
  parseMediaGenerationResult,
7616
7921
  OpenGeniClient
7617
7922
  };
7618
- //# sourceMappingURL=chunk-DVJAK3RA.js.map
7923
+ //# sourceMappingURL=chunk-7AHX3WYM.js.map