@opengeni/sdk 1.0.2 → 1.2.0

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/dist/adapters/next.js +2 -2
  2. package/dist/artifact-catalog.d.ts +7 -0
  3. package/dist/artifacts.js +5 -4
  4. package/dist/browser.js +3 -2
  5. package/dist/chat/index.js +9 -7
  6. package/dist/chat/index.js.map +1 -1
  7. package/dist/{chunk-AH5D5Q5V.js → chunk-2NIR4WBR.js} +2 -2
  8. package/dist/{chunk-DUVIYER4.js → chunk-2ULNDOLD.js} +2 -2
  9. package/dist/{chunk-HMGADJGZ.js → chunk-2VPO6IQC.js} +2 -2
  10. package/dist/{chunk-FG3OO5LM.js → chunk-5AN2FLNC.js} +45 -2
  11. package/dist/chunk-5AN2FLNC.js.map +1 -0
  12. package/dist/{chunk-RWKB6YZG.js → chunk-66AKEWV6.js} +2 -2
  13. package/dist/{chunk-ZKPY6YAJ.js → chunk-6Z5QRYHG.js} +12 -1
  14. package/dist/chunk-6Z5QRYHG.js.map +1 -0
  15. package/dist/{chunk-MOTJYIYL.js → chunk-TZFJUYCT.js} +2 -2
  16. package/dist/chunk-VPVMLM7Q.js +15 -0
  17. package/dist/chunk-VPVMLM7Q.js.map +1 -0
  18. package/dist/{chunk-YIKA2QT4.js → chunk-WIYAB33K.js} +1 -1
  19. package/dist/chunk-WIYAB33K.js.map +1 -0
  20. package/dist/client.d.ts +17 -1
  21. package/dist/core.js +4 -3
  22. package/dist/document-authority.js +4 -3
  23. package/dist/editable-artifacts.js +1 -1
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +9 -8
  26. package/dist/index.js.map +1 -1
  27. package/dist/insights-usage.d.ts +33 -0
  28. package/dist/insights-usage.js +7 -0
  29. package/dist/insights-usage.js.map +1 -0
  30. package/dist/model-display.d.ts +1 -1
  31. package/dist/model-display.js +3 -1
  32. package/dist/session-proxy.js +2 -2
  33. package/dist/site-browser-runtime.gen.d.ts +1 -1
  34. package/dist/site-document.js +1 -1
  35. package/dist/site-document.js.map +1 -1
  36. package/dist/site.js +4 -3
  37. package/dist/types.d.ts +17 -1
  38. package/package.json +9 -4
  39. package/src/artifact-catalog.ts +8 -0
  40. package/src/chat/opengeni.ts +3 -2
  41. package/src/client.ts +92 -1
  42. package/src/index.ts +3 -0
  43. package/src/insights-usage.ts +61 -0
  44. package/src/model-display.ts +1 -0
  45. package/src/site-browser-runtime.gen.ts +1 -1
  46. package/src/types.ts +40 -0
  47. package/dist/chunk-FG3OO5LM.js.map +0 -1
  48. package/dist/chunk-YIKA2QT4.js.map +0 -1
  49. package/dist/chunk-ZKPY6YAJ.js.map +0 -1
  50. /package/dist/{chunk-AH5D5Q5V.js.map → chunk-2NIR4WBR.js.map} +0 -0
  51. /package/dist/{chunk-DUVIYER4.js.map → chunk-2ULNDOLD.js.map} +0 -0
  52. /package/dist/{chunk-HMGADJGZ.js.map → chunk-2VPO6IQC.js.map} +0 -0
  53. /package/dist/{chunk-RWKB6YZG.js.map → chunk-66AKEWV6.js.map} +0 -0
  54. /package/dist/{chunk-MOTJYIYL.js.map → chunk-TZFJUYCT.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniDocumentAuthorityClient
3
- } from "./chunk-HMGADJGZ.js";
3
+ } from "./chunk-2VPO6IQC.js";
4
4
 
5
5
  // src/artifact-client.ts
6
6
  var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
@@ -121,4 +121,4 @@ var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
121
121
  export {
122
122
  OpenGeniClient
123
123
  };
124
- //# sourceMappingURL=chunk-AH5D5Q5V.js.map
124
+ //# sourceMappingURL=chunk-2NIR4WBR.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4SMEOV3P.js";
4
4
  import {
5
5
  OpenGeniClient
6
- } from "./chunk-FG3OO5LM.js";
6
+ } from "./chunk-5AN2FLNC.js";
7
7
  import {
8
8
  OpenGeniApiError
9
9
  } from "./chunk-V6GIY62B.js";
@@ -636,4 +636,4 @@ export {
636
636
  isOpenGeniSiteBridgeCancelMessage,
637
637
  sanitizeOpenGeniSiteToolCallRequest
638
638
  };
639
- //# sourceMappingURL=chunk-DUVIYER4.js.map
639
+ //# sourceMappingURL=chunk-2ULNDOLD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-FG3OO5LM.js";
3
+ } from "./chunk-5AN2FLNC.js";
4
4
 
5
5
  // src/document-authority-client.ts
6
6
  var OpenGeniDocumentAuthorityClient = class extends OpenGeniClient {
@@ -147,4 +147,4 @@ var OpenGeniDocumentAuthorityClient = class extends OpenGeniClient {
147
147
  export {
148
148
  OpenGeniDocumentAuthorityClient
149
149
  };
150
- //# sourceMappingURL=chunk-HMGADJGZ.js.map
150
+ //# sourceMappingURL=chunk-2VPO6IQC.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ insightsUsageQueryString
3
+ } from "./chunk-VPVMLM7Q.js";
1
4
  import {
2
5
  jitteredDelay,
3
6
  parseSseStream,
@@ -12,7 +15,7 @@ import {
12
15
  OPENGENI_API_CONTRACT_REVISION,
13
16
  OPENGENI_CORRELATION_HEADER,
14
17
  RETAINED_OUTPUT_MAX_PAGE_BYTES
15
- } from "./chunk-YIKA2QT4.js";
18
+ } from "./chunk-WIYAB33K.js";
16
19
  import {
17
20
  OpenGeniInteractionClient,
18
21
  decodeComputerFrameMetadataHeader,
@@ -5129,6 +5132,16 @@ var OpenGeniClient = class {
5129
5132
  options
5130
5133
  );
5131
5134
  }
5135
+ /** Idempotently set a workspace-shared pin; refresh the catalog after completion. */
5136
+ async updateArtifactPin(workspaceId, kind, artifactId, pinned, options = {}) {
5137
+ return this.requestJson(
5138
+ "PUT",
5139
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/artifact-catalog/${encodeURIComponent(kind)}/${encodeURIComponent(artifactId)}/pin`,
5140
+ { pinned },
5141
+ void 0,
5142
+ options
5143
+ );
5144
+ }
5132
5145
  async listWorkspaceArtifacts(workspaceId, options = {}) {
5133
5146
  const query = new URLSearchParams();
5134
5147
  if (options.limit !== void 0) query.set("limit", String(options.limit));
@@ -5981,6 +5994,36 @@ var OpenGeniClient = class {
5981
5994
  { signal: options.signal }
5982
5995
  );
5983
5996
  }
5997
+ /** Shared usage under the existing workspace access gate. */
5998
+ async getWorkspaceInsightsUsage(workspaceId, options = {}, requestOptions = {}) {
5999
+ return await this.requestJson(
6000
+ "GET",
6001
+ `/v1/workspaces/${encodeURIComponent(workspaceId)}/insights/usage${insightsUsageQueryString(options)}`,
6002
+ void 0,
6003
+ {},
6004
+ requestOptions
6005
+ );
6006
+ }
6007
+ /** Shared usage under the existing organization access gate. */
6008
+ async getOrganizationInsightsUsage(accountId, options = {}, requestOptions = {}) {
6009
+ return await this.requestJson(
6010
+ "GET",
6011
+ `/v1/organizations/${encodeURIComponent(accountId)}/insights/usage${insightsUsageQueryString(options)}`,
6012
+ void 0,
6013
+ {},
6014
+ requestOptions
6015
+ );
6016
+ }
6017
+ async listInsightsCalls(scope, options = {}, requestOptions = {}) {
6018
+ const path = scope.kind === "workspace" ? `/v1/workspaces/${encodeURIComponent(scope.workspaceId)}/insights/calls` : `/v1/organizations/${encodeURIComponent(scope.accountId)}/insights/calls`;
6019
+ return await this.requestJson(
6020
+ "GET",
6021
+ `${path}${insightsUsageQueryString(options)}`,
6022
+ void 0,
6023
+ {},
6024
+ requestOptions
6025
+ );
6026
+ }
5984
6027
  async getBillingEntitlements(options = {}) {
5985
6028
  return await this.requestJson(
5986
6029
  "GET",
@@ -6758,4 +6801,4 @@ export {
6758
6801
  parseMediaGenerationResult,
6759
6802
  OpenGeniClient
6760
6803
  };
6761
- //# sourceMappingURL=chunk-FG3OO5LM.js.map
6804
+ //# sourceMappingURL=chunk-5AN2FLNC.js.map