@opengeni/sdk 1.1.0 → 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 (51) hide show
  1. package/dist/adapters/next.js +2 -2
  2. package/dist/artifacts.js +5 -4
  3. package/dist/browser.js +3 -2
  4. package/dist/chat/index.js +6 -5
  5. package/dist/chat/index.js.map +1 -1
  6. package/dist/{chunk-E3KHK7FG.js → chunk-2NIR4WBR.js} +2 -2
  7. package/dist/{chunk-T6HNHCN2.js → chunk-2ULNDOLD.js} +2 -2
  8. package/dist/{chunk-ZBMS2HCV.js → chunk-2VPO6IQC.js} +2 -2
  9. package/dist/{chunk-BNZNLUD4.js → chunk-5AN2FLNC.js} +35 -2
  10. package/dist/chunk-5AN2FLNC.js.map +1 -0
  11. package/dist/{chunk-YH3W3HZZ.js → chunk-66AKEWV6.js} +2 -2
  12. package/dist/{chunk-ZKPY6YAJ.js → chunk-6Z5QRYHG.js} +12 -1
  13. package/dist/chunk-6Z5QRYHG.js.map +1 -0
  14. package/dist/{chunk-H6WMYN23.js → chunk-TZFJUYCT.js} +2 -2
  15. package/dist/chunk-VPVMLM7Q.js +15 -0
  16. package/dist/chunk-VPVMLM7Q.js.map +1 -0
  17. package/dist/{chunk-RLLUZFOW.js → chunk-WIYAB33K.js} +1 -1
  18. package/dist/chunk-WIYAB33K.js.map +1 -0
  19. package/dist/client.d.ts +12 -0
  20. package/dist/core.js +4 -3
  21. package/dist/document-authority.js +4 -3
  22. package/dist/editable-artifacts.js +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +9 -8
  25. package/dist/index.js.map +1 -1
  26. package/dist/insights-usage.d.ts +33 -0
  27. package/dist/insights-usage.js +7 -0
  28. package/dist/insights-usage.js.map +1 -0
  29. package/dist/model-display.d.ts +1 -1
  30. package/dist/model-display.js +3 -1
  31. package/dist/session-proxy.js +2 -2
  32. package/dist/site-browser-runtime.gen.d.ts +1 -1
  33. package/dist/site-document.js +1 -1
  34. package/dist/site-document.js.map +1 -1
  35. package/dist/site.js +4 -3
  36. package/dist/types.d.ts +16 -0
  37. package/package.json +7 -3
  38. package/src/client.ts +69 -0
  39. package/src/index.ts +2 -0
  40. package/src/insights-usage.ts +61 -0
  41. package/src/model-display.ts +1 -0
  42. package/src/site-browser-runtime.gen.ts +1 -1
  43. package/src/types.ts +39 -0
  44. package/dist/chunk-BNZNLUD4.js.map +0 -1
  45. package/dist/chunk-RLLUZFOW.js.map +0 -1
  46. package/dist/chunk-ZKPY6YAJ.js.map +0 -1
  47. /package/dist/{chunk-E3KHK7FG.js.map → chunk-2NIR4WBR.js.map} +0 -0
  48. /package/dist/{chunk-T6HNHCN2.js.map → chunk-2ULNDOLD.js.map} +0 -0
  49. /package/dist/{chunk-ZBMS2HCV.js.map → chunk-2VPO6IQC.js.map} +0 -0
  50. /package/dist/{chunk-YH3W3HZZ.js.map → chunk-66AKEWV6.js.map} +0 -0
  51. /package/dist/{chunk-H6WMYN23.js.map → chunk-TZFJUYCT.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniDocumentAuthorityClient
3
- } from "./chunk-ZBMS2HCV.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-E3KHK7FG.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-BNZNLUD4.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-T6HNHCN2.js.map
639
+ //# sourceMappingURL=chunk-2ULNDOLD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-BNZNLUD4.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-ZBMS2HCV.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-RLLUZFOW.js";
18
+ } from "./chunk-WIYAB33K.js";
16
19
  import {
17
20
  OpenGeniInteractionClient,
18
21
  decodeComputerFrameMetadataHeader,
@@ -5991,6 +5994,36 @@ var OpenGeniClient = class {
5991
5994
  { signal: options.signal }
5992
5995
  );
5993
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
+ }
5994
6027
  async getBillingEntitlements(options = {}) {
5995
6028
  return await this.requestJson(
5996
6029
  "GET",
@@ -6768,4 +6801,4 @@ export {
6768
6801
  parseMediaGenerationResult,
6769
6802
  OpenGeniClient
6770
6803
  };
6771
- //# sourceMappingURL=chunk-BNZNLUD4.js.map
6804
+ //# sourceMappingURL=chunk-5AN2FLNC.js.map