@sogni-ai/sogni-client 5.76.0 → 5.77.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.
@@ -11,6 +11,10 @@ export interface EstimationResponse {
11
11
  dailyFairUse?: {
12
12
  pct: number;
13
13
  };
14
+ /** Optional monthly capacity share requested by the caller. */
15
+ monthlyFairUse?: {
16
+ pct: number;
17
+ };
14
18
  }
15
19
  export interface Benchmark {
16
20
  estimatedRenderTimeSec: number;
@@ -1195,6 +1195,8 @@ export type MediaUrlParams = {
1195
1195
  contentType?: string;
1196
1196
  };
1197
1197
  export interface EstimateRequest {
1198
+ /** Request the optional monthly capacity share alongside the daily estimate. */
1199
+ includeMonthlyFairUse?: boolean;
1198
1200
  /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1199
1201
  priorityMode?: boolean;
1200
1202
  /**
@@ -1278,6 +1280,8 @@ export interface EstimateRequest {
1278
1280
  billingMode?: BillingMode;
1279
1281
  }
1280
1282
  export interface VideoEstimateRequest {
1283
+ /** Request the optional monthly capacity share alongside the daily estimate. */
1284
+ includeMonthlyFairUse?: boolean;
1281
1285
  /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1282
1286
  priorityMode?: boolean;
1283
1287
  /** FlashVSR source geometry for an estimate. The server verifies the uploaded file at admission. */
@@ -1353,6 +1357,8 @@ export interface VideoEstimateRequest {
1353
1357
  billingMode?: BillingMode;
1354
1358
  }
1355
1359
  export interface AudioEstimateRequest {
1360
+ /** Request the optional monthly capacity share alongside the daily estimate. */
1361
+ includeMonthlyFairUse?: boolean;
1356
1362
  /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1357
1363
  priorityMode?: boolean;
1358
1364
  tokenType: TokenType;
@@ -1406,6 +1412,8 @@ export interface CostEstimation {
1406
1412
  * for guests, premium-vendor models, token billing, trials and Relaxed.
1407
1413
  */
1408
1414
  dailyFairUsePct?: number;
1415
+ /** Estimated share of monthly Fast capacity, when requested and supplied by the server. */
1416
+ monthlyFairUsePct?: number;
1409
1417
  }
1410
1418
  export type EnhancementStrength = 'light' | 'medium' | 'heavy';
1411
1419
  /**
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "5.76.0";
1
+ export declare const LIB_VERSION = "5.77.0";
package/dist/version.js CHANGED
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
4
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
5
5
  // Source of truth: package.json version.
6
- exports.LIB_VERSION = '5.76.0';
6
+ exports.LIB_VERSION = '5.77.0';
7
7
  //# sourceMappingURL=version.js.map
@@ -2791,7 +2791,7 @@ class ProjectsApi extends ApiGroup {
2791
2791
  * Estimate image project cost
2792
2792
  */
2793
2793
  estimateCost(_a) {
2794
- return __awaiter(this, arguments, void 0, function* ({ network = 'fast', tokenType, model, imageCount, stepCount, previewCount, cnEnabled, startingImageStrength, width, height, sizePreset, guidance, sampler, contextImages, gptImageQuality, gptImageFrameCount, gptImageFrameDurationMs, gptImageComplexity, outputFormat, billingMode, priorityMode }) {
2794
+ return __awaiter(this, arguments, void 0, function* ({ network = 'fast', tokenType, model, imageCount, stepCount, previewCount, cnEnabled, startingImageStrength, width, height, sizePreset, guidance, sampler, contextImages, gptImageQuality, gptImageFrameCount, gptImageFrameDurationMs, gptImageComplexity, outputFormat, billingMode, priorityMode, includeMonthlyFairUse }) {
2795
2795
  var _b, _c, _d;
2796
2796
  let apiVersion = 2;
2797
2797
  const modelOptions = yield this.getModelOptions(model);
@@ -2846,17 +2846,11 @@ class ProjectsApi extends ApiGroup {
2846
2846
  queryParams.set('billingMode', billingMode);
2847
2847
  if (priorityMode !== undefined)
2848
2848
  queryParams.set('priorityMode', String(priorityMode));
2849
+ if (includeMonthlyFairUse === true)
2850
+ queryParams.set('includeMonthlyFairUse', 'true');
2849
2851
  const query = queryParams.toString();
2850
2852
  const r = yield this.client.socket.get(`/api/v${apiVersion}/job/estimate/${pathParams.join('/')}${query ? `?${query}` : ''}`);
2851
- return {
2852
- token: r.quote.project.costInToken,
2853
- usd: r.quote.project.costInUSD,
2854
- spark: r.quote.project.costInSpark,
2855
- sogni: r.quote.project.costInSogni,
2856
- estimatedRenderSeconds: (_b = r.benchmark) === null || _b === void 0 ? void 0 : _b.estimatedRenderTimeSec,
2857
- estimatedTotalSeconds: (_c = r.benchmark) === null || _c === void 0 ? void 0 : _c.estimatedTotalTimeSec,
2858
- dailyFairUsePct: (_d = r.dailyFairUse) === null || _d === void 0 ? void 0 : _d.pct
2859
- };
2853
+ return Object.assign({ token: r.quote.project.costInToken, usd: r.quote.project.costInUSD, spark: r.quote.project.costInSpark, sogni: r.quote.project.costInSogni, estimatedRenderSeconds: (_b = r.benchmark) === null || _b === void 0 ? void 0 : _b.estimatedRenderTimeSec, estimatedTotalSeconds: (_c = r.benchmark) === null || _c === void 0 ? void 0 : _c.estimatedTotalTimeSec, dailyFairUsePct: (_d = r.dailyFairUse) === null || _d === void 0 ? void 0 : _d.pct }, (r.monthlyFairUse ? { monthlyFairUsePct: r.monthlyFairUse.pct } : {}));
2860
2854
  });
2861
2855
  }
2862
2856
  /**
@@ -2959,6 +2953,8 @@ class ProjectsApi extends ApiGroup {
2959
2953
  query.set('billingMode', params.billingMode);
2960
2954
  if (params.priorityMode !== undefined)
2961
2955
  query.set('priorityMode', String(params.priorityMode));
2956
+ if (params.includeMonthlyFairUse === true)
2957
+ query.set('includeMonthlyFairUse', 'true');
2962
2958
  if (params.seedanceDraft === true)
2963
2959
  query.set('seedanceDraft', '1');
2964
2960
  if (params.seedanceDraftJobId !== undefined) {
@@ -2966,15 +2962,7 @@ class ProjectsApi extends ApiGroup {
2966
2962
  }
2967
2963
  const queryString = query.toString();
2968
2964
  const r = yield this.client.socket.get(`/api/v1/job-video/estimate/${path}${queryString ? `?${queryString}` : ''}`);
2969
- return {
2970
- token: r.quote.project.costInToken,
2971
- usd: r.quote.project.costInUSD,
2972
- spark: r.quote.project.costInSpark,
2973
- sogni: r.quote.project.costInSogni,
2974
- estimatedRenderSeconds: (_d = r.benchmark) === null || _d === void 0 ? void 0 : _d.estimatedRenderTimeSec,
2975
- estimatedTotalSeconds: (_e = r.benchmark) === null || _e === void 0 ? void 0 : _e.estimatedTotalTimeSec,
2976
- dailyFairUsePct: (_f = r.dailyFairUse) === null || _f === void 0 ? void 0 : _f.pct
2977
- };
2965
+ return Object.assign({ token: r.quote.project.costInToken, usd: r.quote.project.costInUSD, spark: r.quote.project.costInSpark, sogni: r.quote.project.costInSogni, estimatedRenderSeconds: (_d = r.benchmark) === null || _d === void 0 ? void 0 : _d.estimatedRenderTimeSec, estimatedTotalSeconds: (_e = r.benchmark) === null || _e === void 0 ? void 0 : _e.estimatedTotalTimeSec, dailyFairUsePct: (_f = r.dailyFairUse) === null || _f === void 0 ? void 0 : _f.pct }, (r.monthlyFairUse ? { monthlyFairUsePct: r.monthlyFairUse.pct } : {}));
2978
2966
  });
2979
2967
  }
2980
2968
  /**
@@ -3008,17 +2996,11 @@ class ProjectsApi extends ApiGroup {
3008
2996
  query.set('billingMode', params.billingMode);
3009
2997
  if (params.priorityMode !== undefined)
3010
2998
  query.set('priorityMode', String(params.priorityMode));
2999
+ if (params.includeMonthlyFairUse === true)
3000
+ query.set('includeMonthlyFairUse', 'true');
3011
3001
  const queryString = query.toString();
3012
3002
  const r = yield this.client.socket.get(`/api/v1/job-audio/estimate/${path}${queryString ? `?${queryString}` : ''}`);
3013
- return {
3014
- token: r.quote.project.costInToken,
3015
- usd: r.quote.project.costInUSD,
3016
- spark: r.quote.project.costInSpark,
3017
- sogni: r.quote.project.costInSogni,
3018
- estimatedRenderSeconds: (_b = r.benchmark) === null || _b === void 0 ? void 0 : _b.estimatedRenderTimeSec,
3019
- estimatedTotalSeconds: (_c = r.benchmark) === null || _c === void 0 ? void 0 : _c.estimatedTotalTimeSec,
3020
- dailyFairUsePct: (_d = r.dailyFairUse) === null || _d === void 0 ? void 0 : _d.pct
3021
- };
3003
+ return Object.assign({ token: r.quote.project.costInToken, usd: r.quote.project.costInUSD, spark: r.quote.project.costInSpark, sogni: r.quote.project.costInSogni, estimatedRenderSeconds: (_b = r.benchmark) === null || _b === void 0 ? void 0 : _b.estimatedRenderTimeSec, estimatedTotalSeconds: (_c = r.benchmark) === null || _c === void 0 ? void 0 : _c.estimatedTotalTimeSec, dailyFairUsePct: (_d = r.dailyFairUse) === null || _d === void 0 ? void 0 : _d.pct }, (r.monthlyFairUse ? { monthlyFairUsePct: r.monthlyFairUse.pct } : {}));
3022
3004
  });
3023
3005
  }
3024
3006
  // ============================================