@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
package/src/types.ts CHANGED
@@ -1,4 +1,26 @@
1
1
  import type { WorkspaceTranscriptionPolicy } from "./transcription";
2
+ export type {
3
+ InsightsUsageRange,
4
+ InsightsUsageGroupBy,
5
+ InsightsUsagePayer,
6
+ InsightsUsageSource,
7
+ InsightsUsageTokens,
8
+ InsightsUsageClassMicros,
9
+ InsightsUsageMeasures,
10
+ InsightsUsageScope,
11
+ InsightsUsageGroup,
12
+ InsightsUsageSeriesPoint,
13
+ InsightsUsageFacets,
14
+ InsightsUsageResponse,
15
+ InsightsCall,
16
+ InsightsCallsResponse,
17
+ InsightsUsageWindowOptions,
18
+ WorkspaceInsightsUsageOptions,
19
+ OrganizationInsightsUsageOptions,
20
+ WorkspaceInsightsCallsOptions,
21
+ OrganizationInsightsCallsOptions,
22
+ InsightsCallsScope,
23
+ } from "./insights-usage";
2
24
  export type {
3
25
  ClaudeSubscriptionOAuthStartResponse,
4
26
  ClaudeSubscriptionOAuthCompleteRequest,
@@ -3605,6 +3627,8 @@ export type ClientModel = {
3605
3627
  label: string;
3606
3628
  /** Optional curated compact label for dense UI (e.g. mobile composer). */
3607
3629
  shortLabel?: string | undefined;
3630
+ /** Optional HTTPS maker logo supplied by the model catalog. */
3631
+ logoUrl?: string | undefined;
3608
3632
  /** Provider id (e.g. `openai`, `azure`, or a registry provider id). */
3609
3633
  provider: string;
3610
3634
  providerLabel: string;
@@ -3665,6 +3689,7 @@ export type ModelCredentialReadinessV1 = {
3665
3689
 
3666
3690
  export type WorkspaceModelCatalogModel = ClientModel & {
3667
3691
  credentialReadiness: ModelCredentialReadinessV1;
3692
+ creditFunding?: "promotional" | "general" | "unavailable" | undefined;
3668
3693
  /** Exact workspace-policy verdict without exposing provider identity. */
3669
3694
  policyAllowed?: boolean | undefined;
3670
3695
  availability: ModelAvailabilityV1;
@@ -6192,6 +6217,7 @@ export type ScheduledTaskAdmissionRefusal = {
6192
6217
  | "machine_enrollment_inactive"
6193
6218
  | "variable_set_unavailable"
6194
6219
  | "rig_version_unavailable"
6220
+ | "scheduled_model_unavailable"
6195
6221
  | "insufficient_credits"
6196
6222
  | "monthly_model_cost_limit"
6197
6223
  | "monthly_agent_run_limit"
@@ -8169,11 +8195,23 @@ export type BillingMode = "disabled" | "stripe";
8169
8195
 
8170
8196
  export type EntitlementsMode = "none" | "static" | "managed";
8171
8197
 
8198
+ export type PromotionalCreditScope = {
8199
+ label: string;
8200
+ eligibleModelIds: string[];
8201
+ };
8202
+
8203
+ export type PromotionalCreditBalance = PromotionalCreditScope & {
8204
+ grantId: string;
8205
+ remainingMicros: number;
8206
+ };
8207
+
8172
8208
  export type BillingBalance = {
8173
8209
  accountId: string;
8174
8210
  balanceMicros: number;
8175
8211
  currency: "usd";
8176
8212
  updatedAt: string;
8213
+ generalBalanceMicros?: number | undefined;
8214
+ promotionalCredits?: PromotionalCreditBalance[] | undefined;
8177
8215
  };
8178
8216
 
8179
8217
  export const KNOWN_USAGE_EVENT_TYPES = [
@@ -8520,6 +8558,7 @@ export type CreateCheckoutResponse = {
8520
8558
  url: string;
8521
8559
  /** The credits this checkout grants once it completes. */
8522
8560
  amountUsd?: number | undefined;
8561
+ promotionalScope?: PromotionalCreditScope | undefined;
8523
8562
  };
8524
8563
 
8525
8564
  /** Where one checkout stands, and whether its credits reached the balance. */
@@ -8532,6 +8571,7 @@ export type BillingCheckoutStatus = {
8532
8571
  currency: "usd";
8533
8572
  /** True when a coupon covered the whole checkout, so nothing was charged. */
8534
8573
  free: boolean;
8574
+ promotionalScope?: PromotionalCreditScope | undefined;
8535
8575
  };
8536
8576
  balance: BillingBalance | null;
8537
8577
  };