@picsart/ai-sdk 7.20.0 → 7.22.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.
@@ -2,5 +2,5 @@ import { ModelPricingClient } from './lib/ModelPricingClient';
2
2
  import { ModelPricingClientError } from './lib/errors/ModelPricingClientError';
3
3
  import { ModelPricingServerError } from './lib/errors/ModelPricingServerError';
4
4
  import { ModelPricingUnknownError } from './lib/errors/ModelPricingUnknownError';
5
- import { UseCase, PricingUnit, ModelPricingFilters, ModelPricingMetadata, SkuEntry, VendorCostEntry, CreditOverride, MinTier, ModelPricing, ModelPricingListResponse, ModelPricingClientOptions, UserDiscount, UserDiscountListResponse } from './lib/types';
6
- export { ModelPricingClient, ModelPricingClientError, ModelPricingServerError, ModelPricingUnknownError, UseCase, PricingUnit, ModelPricingFilters, ModelPricingMetadata, SkuEntry, VendorCostEntry, CreditOverride, MinTier, ModelPricing, ModelPricingListResponse, ModelPricingClientOptions, UserDiscount, UserDiscountListResponse, };
5
+ import { UseCase, PricingUnit, PricingScope, ModelPricingFilters, ModelPricingMetadata, SkuEntry, VendorCostEntry, CreditOverride, MinTier, ModelPricing, ModelPricingListResponse, ModelPricingClientOptions, UserDiscount, ApplicableIn, DiscountConditions, DiscountThrottle, DiscountLimits, UserDiscountListResponse } from './lib/types';
6
+ export { ModelPricingClient, ModelPricingClientError, ModelPricingServerError, ModelPricingUnknownError, UseCase, PricingUnit, PricingScope, ModelPricingFilters, ModelPricingMetadata, SkuEntry, VendorCostEntry, CreditOverride, MinTier, ModelPricing, ModelPricingListResponse, ModelPricingClientOptions, UserDiscount, ApplicableIn, DiscountConditions, DiscountThrottle, DiscountLimits, UserDiscountListResponse, };
@@ -3,6 +3,7 @@ export declare class ModelPricingClient {
3
3
  private readonly options;
4
4
  private readonly modelPricingApiBaseUrl;
5
5
  private pricing;
6
+ /** Per userId, the user's discounts keyed by the tool (operationId) they cover. */
6
7
  private userDiscounts;
7
8
  private refreshTimer;
8
9
  private userDiscountsRefreshTimer;
@@ -27,6 +28,7 @@ export declare class ModelPricingClient {
27
28
  private loadUserDiscounts;
28
29
  private indexUserDiscounts;
29
30
  private applyUserDiscounts;
31
+ private applyUsdPrice;
30
32
  private applyFilters;
31
33
  private applyCreditOverrides;
32
34
  private toSuccessResponse;
@@ -13,7 +13,14 @@ export declare enum UseCase {
13
13
  SpeechToSpeech = "speech-to-speech",
14
14
  ChatCompletions = "chat-completions",
15
15
  AudioToVideo = "audio-to-video",
16
- VideoToAudio = "video-to-audio"
16
+ VideoToAudio = "video-to-audio",
17
+ /** Priced per request, not per media transformation (e.g. Magic Flow webhook runs). */
18
+ Request = "request"
19
+ }
20
+ /** Where a pricing is used: the API platform, the apps (UI), or both. */
21
+ export declare enum PricingScope {
22
+ Api = "api",
23
+ Apps = "apps"
17
24
  }
18
25
  export declare enum PricingUnit {
19
26
  Generation = "generation",
@@ -28,6 +35,7 @@ export declare enum PricingUnit {
28
35
  CacheWrite5mTokens = "cache_write_5m_tokens",
29
36
  CacheWrite1hTokens = "cache_write_1h_tokens",
30
37
  InputImageTokens = "input_image_tokens",
38
+ OutputTokens = "output_tokens",
31
39
  OutputImageTokens = "output_image_tokens",
32
40
  OutputAudioTokens = "output_audio_tokens",
33
41
  OutputTextTokens = "output_text_tokens",
@@ -43,11 +51,35 @@ export interface ModelPricingFilters {
43
51
  useCase?: UseCase;
44
52
  quality?: string;
45
53
  audio?: boolean;
54
+ /** Only the pricings used in this scope, among those the client loaded. */
55
+ scope?: PricingScope;
46
56
  countryCode?: string;
57
+ /**
58
+ * Touchpoint the price is requested from. Scopes credit overrides and,
59
+ * together with `appId`, touchpoint-scoped user discounts (`applicableIn`).
60
+ */
47
61
  touchpoint?: string;
48
62
  platform?: string;
49
63
  packageId?: string;
50
64
  userId?: string;
65
+ /**
66
+ * App id (not the bundle id) the price is requested from. App-bound user
67
+ * discount entries (`applicableIn[].appId`) apply only with it; entries
68
+ * without an appId apply in every app.
69
+ */
70
+ appId?: string;
71
+ /**
72
+ * Requested duration in seconds (tools priced per second, e.g. video). A
73
+ * duration-capped user discount (`conditions.maxDurationSeconds`) applies
74
+ * only when it is sent and within the cap.
75
+ */
76
+ duration?: number;
77
+ /**
78
+ * When true, each pricing's `credits` is replaced by its `usdPrice`
79
+ * (items without a `usdPrice` keep their credits). Credit overrides and
80
+ * user discounts are not applied in this mode.
81
+ */
82
+ useUsdPrice?: boolean;
51
83
  }
52
84
  export interface ModelPricingMetadata {
53
85
  vendor: string;
@@ -95,10 +127,23 @@ export interface ModelPricing {
95
127
  * getModelPricing is called with a userId.
96
128
  */
97
129
  originalCredits?: number;
130
+ /**
131
+ * Throttling and concurrency limits of the applied user discount, for the
132
+ * caller (the service running the generations) to enforce. Present only
133
+ * when a discount that has limits was applied, i.e. on the backend when
134
+ * getModelPricing is called with a userId.
135
+ */
136
+ limits?: DiscountLimits;
98
137
  costPerUnit: number;
138
+ /** Price in USD, when one is set. */
139
+ usdPrice?: number;
99
140
  legacy: boolean;
141
+ /** Where the pricing is used: the API platform, the apps, or both. Never empty. */
142
+ scopes: PricingScope[];
100
143
  /** Minimum subscription tier required to use this model, when one is set. */
101
144
  minTier?: MinTier;
145
+ /** Permission the user's subscription tier must grant to use this model, when one is set. */
146
+ requiredPermission?: string;
102
147
  creditOverrides: CreditOverride[];
103
148
  created: string;
104
149
  updated: string;
@@ -107,12 +152,66 @@ export interface ModelPricingListResponse {
107
152
  status: string;
108
153
  response: ModelPricing[];
109
154
  }
155
+ /**
156
+ * Where a discount applies: an app (missing = any app), optionally narrowed to some touchpoints (none = all of
157
+ * them) and/or some wallets (none = all of them).
158
+ */
159
+ export interface ApplicableIn {
160
+ /** App id (not the bundle id) the discount applies in; missing = any app. */
161
+ appId?: string;
162
+ /** Touchpoints the discount applies on; empty = all of them. */
163
+ touchpoints: string[];
164
+ /**
165
+ * Wallets the discount applies to; empty or missing = all of them. Not matched when pricing (a price request
166
+ * names no wallet): the service charging the generation applies them.
167
+ */
168
+ wallets?: string[];
169
+ }
170
+ /** When a request is eligible for the discount; a missing cap applies to every request. */
171
+ export interface DiscountConditions {
172
+ /** The discount applies only to generations of at most this many seconds (tools priced per second, e.g. video). */
173
+ maxDurationSeconds?: number;
174
+ }
175
+ /**
176
+ * Slows down discounted generations: once a rolling window of `windowSeconds`
177
+ * holds `n >= after` generations, the next one waits
178
+ * `min(maxDelaySeconds, delaySeconds * growthFactor ^ (n - after))` seconds.
179
+ * The pricing service only stores this; the service running the generations
180
+ * counts them and enforces it.
181
+ */
182
+ export interface DiscountThrottle {
183
+ /** Generations at full speed before throttling starts (0 = from the first one). */
184
+ after: number;
185
+ /** Rolling window (seconds) the generations are counted in; missing = the lifetime of the discount. */
186
+ windowSeconds?: number;
187
+ /** Wait (seconds) before the generation after the `after`-th one. */
188
+ delaySeconds: number;
189
+ /** Each further generation waits this many times longer than the previous one; missing or 1 = flat. */
190
+ growthFactor?: number;
191
+ /** Cap of the wait (seconds); always set when `growthFactor` is above 1, never below `delaySeconds`. */
192
+ maxDelaySeconds?: number;
193
+ }
194
+ /** How much discounted usage to allow; enforced by the service running the generations, not by pricing. */
195
+ export interface DiscountLimits {
196
+ /** Discounted generations of the user running at once. */
197
+ maxConcurrent?: number;
198
+ throttle?: DiscountThrottle;
199
+ }
110
200
  export interface UserDiscount {
111
201
  id: string;
112
202
  userId: string;
113
- modelId: string;
203
+ /** The discounted tool: the `operationId` of a model pricing. */
204
+ toolId: string;
205
+ /** Id of the campaign this discount originates from, when it comes from one. */
206
+ campaignId?: string;
114
207
  expirationDate: string;
115
208
  discountPercent: number;
209
+ /** Where the discount applies; missing or empty = everywhere. */
210
+ applicableIn?: ApplicableIn[];
211
+ /** When a request is eligible for the discount; missing = every request. */
212
+ conditions?: DiscountConditions;
213
+ /** How much discounted usage to allow; missing = no limit. */
214
+ limits?: DiscountLimits;
116
215
  created: string;
117
216
  updated: string;
118
217
  }
@@ -144,4 +243,17 @@ export interface ModelPricingClientOptions {
144
243
  * @default 5_000
145
244
  */
146
245
  timeoutMs?: number;
246
+ /**
247
+ * Loads only the pricings used in this scope. Takes precedence over
248
+ * `includePostCharging`. Without either, only the pricings used in the
249
+ * apps are loaded.
250
+ */
251
+ scope?: PricingScope;
252
+ /**
253
+ * When true, and no `scope` is set, loads every pricing whatever its
254
+ * scope — what a service that charges needs, as it resolves any tool.
255
+ * The name dates from when API-only pricings were marked `postCharging`.
256
+ * @default false
257
+ */
258
+ includePostCharging?: boolean;
147
259
  }
@@ -0,0 +1,21 @@
1
+ import { UserDiscount } from './types';
2
+ /** Where and for what a price is requested. */
3
+ export interface DiscountContext {
4
+ /** App id (not the bundle id) the price is requested from. */
5
+ appId?: string;
6
+ touchpoint?: string;
7
+ /** Requested duration in seconds (tools priced per second). */
8
+ duration?: number;
9
+ }
10
+ /**
11
+ * Whether the discount applies where the price is requested: an empty applicableIn applies everywhere; an entry
12
+ * without an appId applies in every app, one without touchpoints on every touchpoint. An app-bound entry needs the
13
+ * request's appId, as without one the request can't show it comes from that app. Wallets are not matched here: a
14
+ * price request names no wallet, so the service charging the generation applies them. Mirrors the pricing service.
15
+ */
16
+ export declare function matchesApplicableIn({ applicableIn }: Pick<UserDiscount, 'applicableIn'>, { appId, touchpoint }: DiscountContext): boolean;
17
+ /**
18
+ * Whether the request is eligible for the discount: a duration-capped discount applies only to a request stating a
19
+ * duration within the cap, as a request without one can't show it is. Mirrors the pricing service's rule.
20
+ */
21
+ export declare function matchesConditions({ conditions }: Pick<UserDiscount, 'conditions'>, { duration }: DiscountContext): boolean;
package/index.d.ts CHANGED
@@ -264,6 +264,15 @@ interface FileDescriptor {
264
264
  * Omit for no client-side floor.
265
265
  */
266
266
  minDurationSec?: number;
267
+ /**
268
+ * Max COMBINED duration (seconds) of every video/audio file in an array slot:
269
+ * the sum of the clips' lengths, not any single one. Vendors cap the total
270
+ * apart from the per-file `maxDurationSec` (Seedance 2.5 takes ten reference
271
+ * clips of up to 30.2 s each, but refuses them when they add up to more than
272
+ * 30.2 s). Enforced client-side before submit; the backend worker stays the
273
+ * authoritative gate. Omit for no combined cap.
274
+ */
275
+ maxTotalDurationSec?: number;
267
276
  /**
268
277
  * Max intrinsic frame rate (fps) accepted for a video file. Enforced
269
278
  * client-side at upload by measuring the media before it is sent; the backend
package/index.js CHANGED
@@ -49,6 +49,30 @@ var require_ModelPricingUnknownError = __commonJS({
49
49
  }
50
50
  });
51
51
 
52
+ // ../../node_modules/@picsart/pa-model-pricing-sdk/build/lib/user-discount.util.js
53
+ var require_user_discount_util = __commonJS({
54
+ "../../node_modules/@picsart/pa-model-pricing-sdk/build/lib/user-discount.util.js"(exports) {
55
+ Object.defineProperty(exports, "__esModule", { value: true });
56
+ exports.matchesApplicableIn = matchesApplicableIn;
57
+ exports.matchesConditions = matchesConditions;
58
+ var equalsIgnoreCase = (a, b) => a.toLowerCase() === b.toLowerCase();
59
+ function matchesApplicableIn({ applicableIn }, { appId, touchpoint }) {
60
+ if (!(applicableIn === null || applicableIn === void 0 ? void 0 : applicableIn.length))
61
+ return true;
62
+ return applicableIn.some((entry) => {
63
+ var _a;
64
+ return (!entry.appId || !!appId && equalsIgnoreCase(entry.appId, appId)) && (!((_a = entry.touchpoints) === null || _a === void 0 ? void 0 : _a.length) || touchpoint != null && entry.touchpoints.some((item) => equalsIgnoreCase(item, touchpoint)));
65
+ });
66
+ }
67
+ function matchesConditions({ conditions }, { duration }) {
68
+ const maxDurationSeconds = conditions === null || conditions === void 0 ? void 0 : conditions.maxDurationSeconds;
69
+ if (maxDurationSeconds == null)
70
+ return true;
71
+ return duration != null && duration <= maxDurationSeconds;
72
+ }
73
+ }
74
+ });
75
+
52
76
  // ../../node_modules/@picsart/pa-model-pricing-sdk/build/lib/ModelPricingClient.js
53
77
  var require_ModelPricingClient = __commonJS({
54
78
  "../../node_modules/@picsart/pa-model-pricing-sdk/build/lib/ModelPricingClient.js"(exports) {
@@ -84,6 +108,7 @@ var require_ModelPricingClient = __commonJS({
84
108
  var ModelPricingClientError_1 = require_ModelPricingClientError();
85
109
  var ModelPricingServerError_1 = require_ModelPricingServerError();
86
110
  var ModelPricingUnknownError_1 = require_ModelPricingUnknownError();
111
+ var user_discount_util_1 = require_user_discount_util();
87
112
  var DEFAULT_REFRESH_INTERVAL_MS = 6e5;
88
113
  var USER_DISCOUNTS_REFRESH_INTERVAL_MS = 3e4;
89
114
  var DEFAULT_TIMEOUT_MS = 5e3;
@@ -148,17 +173,23 @@ var require_ModelPricingClient = __commonJS({
148
173
  * Throws if pricing has not been loaded yet — call and await init() first.
149
174
  */
150
175
  getModelPricing(filters = {}) {
151
- var _a, _b, _c, _d, _e;
176
+ var _a, _b, _c, _d, _e, _f;
152
177
  if (this.pricing == null) {
153
178
  throw new Error("ModelPricingClient: pricing not loaded. Call and await init() before getModelPricing().");
154
179
  }
155
180
  const filtered = this.applyFilters(this.pricing, filters);
181
+ if (filters.useUsdPrice)
182
+ return this.applyUsdPrice(filtered);
156
183
  const countryCode = ((_a = filters.countryCode) === null || _a === void 0 ? void 0 : _a.trim()) || void 0;
157
184
  const touchpoint = ((_b = filters.touchpoint) === null || _b === void 0 ? void 0 : _b.trim()) || void 0;
158
185
  const platform = ((_c = filters.platform) === null || _c === void 0 ? void 0 : _c.trim()) || void 0;
159
186
  const packageId = ((_d = filters.packageId) === null || _d === void 0 ? void 0 : _d.trim()) || void 0;
160
187
  const withOverrides = this.applyCreditOverrides(filtered, countryCode, touchpoint, platform, packageId);
161
- return this.applyUserDiscounts(withOverrides, ((_e = filters.userId) === null || _e === void 0 ? void 0 : _e.trim()) || void 0);
188
+ return this.applyUserDiscounts(withOverrides, ((_e = filters.userId) === null || _e === void 0 ? void 0 : _e.trim()) || void 0, {
189
+ appId: ((_f = filters.appId) === null || _f === void 0 ? void 0 : _f.trim()) || void 0,
190
+ touchpoint,
191
+ duration: filters.duration
192
+ });
162
193
  }
163
194
  loadAll() {
164
195
  return __awaiter(this, void 0, void 0, function* () {
@@ -168,7 +199,12 @@ var require_ModelPricingClient = __commonJS({
168
199
  loadPricing() {
169
200
  return __awaiter(this, void 0, void 0, function* () {
170
201
  try {
171
- const url = `${this.modelPricingApiBaseUrl}/pricing-management/model-pricing`;
202
+ const url = new URL(`${this.modelPricingApiBaseUrl}/pricing-management/model-pricing`);
203
+ if (this.options.scope != null) {
204
+ url.searchParams.set("scope", this.options.scope);
205
+ } else if (this.options.includePostCharging) {
206
+ url.searchParams.set("includePostCharging", "true");
207
+ }
172
208
  const response = yield this._fetch(url, {
173
209
  method: "GET",
174
210
  signal: AbortSignal.timeout(this.options.timeoutMs)
@@ -201,48 +237,65 @@ var require_ModelPricingClient = __commonJS({
201
237
  indexUserDiscounts(discounts) {
202
238
  const index = /* @__PURE__ */ new Map();
203
239
  for (const discount of discounts) {
204
- let byModel = index.get(discount.userId);
205
- if (byModel == null) {
206
- byModel = /* @__PURE__ */ new Map();
207
- index.set(discount.userId, byModel);
240
+ if (!discount.toolId)
241
+ continue;
242
+ let byTool = index.get(discount.userId);
243
+ if (byTool == null) {
244
+ byTool = /* @__PURE__ */ new Map();
245
+ index.set(discount.userId, byTool);
208
246
  }
209
- const list = byModel.get(discount.modelId);
247
+ const list = byTool.get(discount.toolId);
210
248
  if (list == null)
211
- byModel.set(discount.modelId, [discount]);
249
+ byTool.set(discount.toolId, [discount]);
212
250
  else
213
251
  list.push(discount);
214
252
  }
215
253
  return index;
216
254
  }
217
- applyUserDiscounts(items, userId) {
255
+ applyUserDiscounts(items, userId, context) {
218
256
  var _a;
219
257
  if (userId == null)
220
258
  return items;
221
- const byModel = (_a = this.userDiscounts) === null || _a === void 0 ? void 0 : _a.get(userId);
222
- if (byModel == null || byModel.size === 0)
259
+ const byTool = (_a = this.userDiscounts) === null || _a === void 0 ? void 0 : _a.get(userId);
260
+ if (byTool == null || byTool.size === 0)
223
261
  return items;
224
262
  const now = Date.now();
225
263
  return items.map((item) => {
226
- const discounts = byModel.get(item.metadata.modelId);
264
+ var _a2;
265
+ const discounts = byTool.get(item.operationId);
227
266
  if (discounts == null || discounts.length === 0)
228
267
  return item;
229
- let bestPercent = 0;
268
+ let best;
230
269
  for (const discount of discounts) {
231
270
  const expiresAt = Date.parse(discount.expirationDate);
232
271
  const active = Number.isNaN(expiresAt) || expiresAt >= now;
233
- if (active && discount.discountPercent > bestPercent) {
234
- bestPercent = discount.discountPercent;
235
- }
272
+ if (!active)
273
+ continue;
274
+ if (!(0, user_discount_util_1.matchesApplicableIn)(discount, context) || !(0, user_discount_util_1.matchesConditions)(discount, context))
275
+ continue;
276
+ if (discount.discountPercent > ((_a2 = best === null || best === void 0 ? void 0 : best.discountPercent) !== null && _a2 !== void 0 ? _a2 : 0))
277
+ best = discount;
236
278
  }
237
- if (bestPercent <= 0)
279
+ if (best == null)
238
280
  return item;
239
- const pct = Math.min(bestPercent, 100);
281
+ const pct = Math.min(best.discountPercent, 100);
240
282
  const discounted = Math.round(item.credits * (1 - pct / 100));
241
- return Object.assign(Object.assign({}, item), { credits: discounted, originalCredits: item.credits });
283
+ const result = Object.assign(Object.assign({}, item), { credits: discounted, originalCredits: item.credits });
284
+ if (best.limits != null)
285
+ result.limits = best.limits;
286
+ return result;
287
+ });
288
+ }
289
+ applyUsdPrice(items) {
290
+ return items.map((item) => {
291
+ if (item.usdPrice == null)
292
+ return item;
293
+ return Object.assign(Object.assign({}, item), { credits: item.usdPrice });
242
294
  });
243
295
  }
244
296
  applyFilters(items, filters) {
245
297
  return items.filter((item) => {
298
+ var _a;
246
299
  if (filters.vendor != null && item.metadata.vendor !== filters.vendor)
247
300
  return false;
248
301
  if (filters.modelId != null && item.metadata.modelId !== filters.modelId)
@@ -255,6 +308,8 @@ var require_ModelPricingClient = __commonJS({
255
308
  return false;
256
309
  if (filters.audio != null && item.metadata.audio !== filters.audio)
257
310
  return false;
311
+ if (filters.scope != null && !((_a = item.scopes) === null || _a === void 0 ? void 0 : _a.includes(filters.scope)))
312
+ return false;
258
313
  return true;
259
314
  });
260
315
  }
@@ -341,7 +396,7 @@ var require_ModelPricingClient = __commonJS({
341
396
  var require_types = __commonJS({
342
397
  "../../node_modules/@picsart/pa-model-pricing-sdk/build/lib/types.js"(exports) {
343
398
  Object.defineProperty(exports, "__esModule", { value: true });
344
- exports.PricingUnit = exports.UseCase = void 0;
399
+ exports.PricingUnit = exports.PricingScope = exports.UseCase = void 0;
345
400
  var UseCase;
346
401
  (function(UseCase2) {
347
402
  UseCase2["TextToImage"] = "text-to-image";
@@ -359,7 +414,13 @@ var require_types = __commonJS({
359
414
  UseCase2["ChatCompletions"] = "chat-completions";
360
415
  UseCase2["AudioToVideo"] = "audio-to-video";
361
416
  UseCase2["VideoToAudio"] = "video-to-audio";
417
+ UseCase2["Request"] = "request";
362
418
  })(UseCase || (exports.UseCase = UseCase = {}));
419
+ var PricingScope;
420
+ (function(PricingScope2) {
421
+ PricingScope2["Api"] = "api";
422
+ PricingScope2["Apps"] = "apps";
423
+ })(PricingScope || (exports.PricingScope = PricingScope = {}));
363
424
  var PricingUnit;
364
425
  (function(PricingUnit2) {
365
426
  PricingUnit2["Generation"] = "generation";
@@ -374,6 +435,7 @@ var require_types = __commonJS({
374
435
  PricingUnit2["CacheWrite5mTokens"] = "cache_write_5m_tokens";
375
436
  PricingUnit2["CacheWrite1hTokens"] = "cache_write_1h_tokens";
376
437
  PricingUnit2["InputImageTokens"] = "input_image_tokens";
438
+ PricingUnit2["OutputTokens"] = "output_tokens";
377
439
  PricingUnit2["OutputImageTokens"] = "output_image_tokens";
378
440
  PricingUnit2["OutputAudioTokens"] = "output_audio_tokens";
379
441
  PricingUnit2["OutputTextTokens"] = "output_text_tokens";
@@ -389,7 +451,7 @@ var require_types = __commonJS({
389
451
  var require_build = __commonJS({
390
452
  "../../node_modules/@picsart/pa-model-pricing-sdk/build/index.js"(exports) {
391
453
  Object.defineProperty(exports, "__esModule", { value: true });
392
- exports.PricingUnit = exports.UseCase = exports.ModelPricingUnknownError = exports.ModelPricingServerError = exports.ModelPricingClientError = exports.ModelPricingClient = void 0;
454
+ exports.PricingScope = exports.PricingUnit = exports.UseCase = exports.ModelPricingUnknownError = exports.ModelPricingServerError = exports.ModelPricingClientError = exports.ModelPricingClient = void 0;
393
455
  var ModelPricingClient_1 = require_ModelPricingClient();
394
456
  Object.defineProperty(exports, "ModelPricingClient", { enumerable: true, get: function() {
395
457
  return ModelPricingClient_1.ModelPricingClient;
@@ -413,6 +475,9 @@ var require_build = __commonJS({
413
475
  Object.defineProperty(exports, "PricingUnit", { enumerable: true, get: function() {
414
476
  return types_1.PricingUnit;
415
477
  } });
478
+ Object.defineProperty(exports, "PricingScope", { enumerable: true, get: function() {
479
+ return types_1.PricingScope;
480
+ } });
416
481
  }
417
482
  });
418
483
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "7.20.0",
3
+ "version": "7.22.0",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, audio, and text generation with Picsart",
6
6
  "license": "MIT",