@picsart/ai-sdk 7.21.0 → 7.23.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.
- package/_vendor/model-types/index.d.ts +1 -13
- package/_vendor/pa-model-pricing-sdk/index.d.ts +2 -2
- package/_vendor/pa-model-pricing-sdk/lib/ModelPricingClient.d.ts +2 -0
- package/_vendor/pa-model-pricing-sdk/lib/types.d.ts +114 -2
- package/_vendor/pa-model-pricing-sdk/lib/user-discount.util.d.ts +21 -0
- package/index.js +87 -22
- package/package.json +1 -1
|
@@ -11,7 +11,6 @@ export type ModelInputById = {
|
|
|
11
11
|
"bytedance-omnihuman-v2.0": { prompt?: string; imageUrls: [string, ...string[]]; audioUrl: string; enableWatermark?: boolean; };
|
|
12
12
|
"bytedance-video-enhance": { videoUrl: string; quality?: "standard" | "professional"; resolution?: "source" | "720p" | "1080p" | "2k" | "4k" | "8k"; fps?: 30 | 60 | 120; scene?: "common" | "ugc" | "short_series" | "aigc" | "old_film"; bitrateLevel?: "low" | "medium" | "high"; };
|
|
13
13
|
"bytedance-video-upscaler": { videoUrl: string; };
|
|
14
|
-
"captionsai-video-captions": { videoUrl: string; templateId?: string; };
|
|
15
14
|
"claude-fable-5": { prompt: string; imageUrls?: string[]; };
|
|
16
15
|
"claude-fable-5-1": { prompt: string; imageUrls?: string[]; };
|
|
17
16
|
"claude-fable-5-2": { prompt: string; imageUrls?: string[]; };
|
|
@@ -41,7 +40,6 @@ export type ModelInputById = {
|
|
|
41
40
|
"eleven-voice-create": { prompt: string; };
|
|
42
41
|
"eleven-voice-design-v2": { prompt: string; };
|
|
43
42
|
"eleven-voice-design-v3": { prompt: string; };
|
|
44
|
-
"eleven-voice-remix": { voiceId: string; prompt: string; };
|
|
45
43
|
"elevenlabs-music-v2": { prompt: string; duration?: 10 | 20 | 30 | 60 | 120 | 180 | 300 | 600; isInstrumental?: boolean; };
|
|
46
44
|
"elevenlabs-sfx": { prompt: string; duration?: number; };
|
|
47
45
|
"flux-2-flex": { prompt: string; aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21"; resolution?: "1K" | "2K" | "4K"; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; };
|
|
@@ -55,6 +53,7 @@ export type ModelInputById = {
|
|
|
55
53
|
"flux-kontext-max": { prompt: string; aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21"; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; };
|
|
56
54
|
"flux-kontext-pro": { prompt: string; aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21"; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; };
|
|
57
55
|
"flux-video-edit": { videoUrl: string; prompt: string; safetyTolerance?: number; };
|
|
56
|
+
"flux-video-outpaint": { videoUrl: string; prompt?: string; width: number; height: number; referenceOffsetX?: number; referenceOffsetY?: number; autoCrop?: boolean; duration?: "auto" | "5" | "10" | "15" | "20"; seed?: number; safetyTolerance?: number; };
|
|
58
57
|
"flux-video-upscale": { videoUrl: string; upscaleFactor?: number; creativity?: 0 | 1; prompt?: string; safetyTolerance?: number; };
|
|
59
58
|
"gemini-2.5-flash": { prompt: string; imageUrls?: string[]; thinking?: "off" | "low" | "medium" | "high"; };
|
|
60
59
|
"gemini-2.5-flash-image": { prompt: string; aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto"; count?: 1 | 2 | 4 | 6 | 8 | 10; seed?: number; imageUrls?: string[]; };
|
|
@@ -107,7 +106,6 @@ export type ModelInputById = {
|
|
|
107
106
|
"grok-imagine-video-1.5": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3"; resolution?: "480p" | "720p" | "1080p"; duration?: 3 | 5 | 6 | 8 | 10 | 12 | 15; imageUrls?: string[]; };
|
|
108
107
|
"grok-imagine-video-1.5-lite": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3"; resolution?: "480p" | "720p" | "1080p"; duration?: 3 | 5 | 6 | 8 | 10 | 12 | 15; imageUrls?: string[]; };
|
|
109
108
|
"grok-tts": { language?: string; accent?: string; prompt: string; voiceId?: string; };
|
|
110
|
-
"hailuo-02": { prompt: string; enhancePrompt?: boolean; resolution?: "512P" | "768P" | "1080P"; duration?: 6 | 10; startFrame?: string; endFrame?: string; imageUrls?: string[]; };
|
|
111
109
|
"hailuo-2.3": { prompt: string; enhancePrompt?: boolean; duration?: 6 | 10; imageUrls?: string[]; };
|
|
112
110
|
"hailuo-2.3-fast": { prompt: string; enhancePrompt?: boolean; duration?: 6 | 10; imageUrls: [string, ...string[]]; };
|
|
113
111
|
"hailuo-2.3-fast-pro": { prompt: string; enhancePrompt?: boolean; imageUrls: [string, ...string[]]; };
|
|
@@ -134,7 +132,6 @@ export type ModelInputById = {
|
|
|
134
132
|
"kimi-k3.1-pro-highspeed": { prompt: string; imageUrls?: string[]; thinking?: "low" | "high"; };
|
|
135
133
|
"kling-3.0-image": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "21:9" | "4:3" | "3:2" | "2:3" | "3:4"; resolution?: "1k" | "2k" | "4k"; count?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; imageUrls?: string[]; };
|
|
136
134
|
"kling-avatar": { prompt?: string; renderingSpeed?: "std" | "pro"; imageUrls: [string, ...string[]]; audioUrl: string; audioId?: string; };
|
|
137
|
-
"kling-elements": { elementName: string; elementDescription: string; referenceType: "image_refer" | "video_refer"; imageUrls?: string[]; videoUrl?: string; elementVoiceId?: string; };
|
|
138
135
|
"kling-motion-control": { prompt?: string; renderingSpeed?: "std" | "pro"; characterOrientation?: "image" | "video"; keepOriginalSound?: "yes" | "no"; imageUrls: [string, ...string[]]; videoUrl: string; };
|
|
139
136
|
"kling-motion-control-v3": { prompt?: string; renderingSpeed?: "std" | "pro"; characterOrientation?: "image" | "video"; keepOriginalSound?: "yes" | "no"; imageUrls: [string, ...string[]]; videoUrl: string; };
|
|
140
137
|
"kling-multi-image-v2-1": { prompt?: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "21:9" | "4:3" | "3:2" | "2:3" | "3:4"; count?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; imageUrls: [string, ...string[]]; sceneImage?: string; styleImage?: string; };
|
|
@@ -196,7 +193,6 @@ export type ModelInputById = {
|
|
|
196
193
|
"picsart-flow": { templateId: string; imageUrls: [string, ...string[]]; };
|
|
197
194
|
"picsart-flow-video": { templateId: string; imageUrls: [string, ...string[]]; };
|
|
198
195
|
"picsart-flux-2-klein": { prompt: string; aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4"; imageUrls?: string[]; };
|
|
199
|
-
"picsart-hidream-t2i": { prompt: string; aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4"; };
|
|
200
196
|
"picsart-qwen-image-edit": { imageUrls: [string, ...string[]]; prompt: string; negativePrompt?: string; };
|
|
201
197
|
"picsart-qwen-makeup": { imageUrls: [string, ...string[]]; prompt: string; negativePrompt?: string; };
|
|
202
198
|
"picsart-sana-sprint-v1": { prompt: string; aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2"; };
|
|
@@ -210,7 +206,6 @@ export type ModelInputById = {
|
|
|
210
206
|
"pixverse-v6-image": { prompt: string; quality?: "360p" | "540p" | "720p" | "1080p"; duration?: number; generateAudio?: boolean; imageUrls: [string, ...string[]]; };
|
|
211
207
|
"qwen-image-2": { prompt: string; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; };
|
|
212
208
|
"qwen-image-2-pro": { prompt: string; negativePrompt?: string; resolution?: "2048x2048" | "2688x1536" | "1536x2688" | "2368x1728" | "1728x2368"; count?: 1 | 2 | 4 | 6; enhancePrompt?: boolean; imageUrls?: string[]; seed?: number; };
|
|
213
|
-
"qwen-image-3.0": { prompt: string; negativePrompt?: string; resolution?: "2048x2048" | "2688x1536" | "1536x2688" | "2368x1728" | "1728x2368"; count?: 1 | 2 | 4 | 6; enhancePrompt?: boolean; imageUrls?: string[]; seed?: number; promptExtendMode?: "direct" | "agent"; enableThinking?: boolean; };
|
|
214
209
|
"qwen-image-3.0-pro": { prompt: string; negativePrompt?: string; resolution?: "2048x2048" | "2688x1536" | "1536x2688" | "2368x1728" | "1728x2368"; count?: 1 | 2 | 4 | 6; enhancePrompt?: boolean; imageUrls?: string[]; seed?: number; promptExtendMode?: "direct" | "agent"; enableThinking?: boolean; };
|
|
215
210
|
"recraft-creative-upscale": { imageUrls: [string, ...string[]]; };
|
|
216
211
|
"recraft-crisp-upscale": { imageUrls: [string, ...string[]]; };
|
|
@@ -237,7 +232,6 @@ export type ModelInputById = {
|
|
|
237
232
|
"recraftv4_styles_pro_vector": { prompt: string; imageUrls: [string, ...string[]]; aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2"; count?: 1 | 2 | 4 | 6; };
|
|
238
233
|
"recraftv4_styles_vector": { prompt: string; imageUrls: [string, ...string[]]; aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2"; count?: 1 | 2 | 4 | 6; };
|
|
239
234
|
"recraftv4_vector": { prompt: string; aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2"; count?: 1 | 2 | 4 | 6; imageUrls?: string[]; imageWeight?: number; };
|
|
240
|
-
"reve": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3"; count?: 1 | 2 | 4; imageUrls?: string[]; };
|
|
241
235
|
"runway-aleph2": { prompt: string; videoUrl: string; startFrame?: string; endFrame?: string; };
|
|
242
236
|
"runway-avatar-video": { style?: "game-character" | "music-superstar" | "game-character-man" | "cat-character" | "influencer" | "tennis-coach" | "human-resource" | "fashion-designer" | "cooking-teacher"; voiceId?: string; prompt?: string; audioUrl?: string; };
|
|
243
237
|
"runway-gen3a-turbo": { prompt: string; duration?: 5 | 10; aspectRatio?: "16:9" | "9:16"; startFrame: string; endFrame?: string; };
|
|
@@ -257,15 +251,9 @@ export type ModelInputById = {
|
|
|
257
251
|
"seedance-2.0-mini-video-extend": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; videoUrls: [string, ...string[]]; };
|
|
258
252
|
"seedance-2.0-video-edit": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p" | "4k"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; returnLastFrame?: boolean; videoUrl: string; imageUrls?: string[]; };
|
|
259
253
|
"seedance-2.0-video-extend": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p" | "4k"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; videoUrls: [string, ...string[]]; };
|
|
260
|
-
"seedance-2.0-without-moderation": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p" | "4k"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; returnLastFrame?: boolean; imageUrls?: string[]; videoUrls?: string[]; audioUrls?: string[]; startFrame?: string; endFrame?: string; };
|
|
261
|
-
"seedance-2.0-without-moderation-video-edit": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p" | "4k"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; returnLastFrame?: boolean; videoUrl: string; imageUrls?: string[]; };
|
|
262
|
-
"seedance-2.0-without-moderation-video-extend": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p" | "4k"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; generateAudio?: boolean; videoUrls: [string, ...string[]]; };
|
|
263
254
|
"seedance-2.5": { prompt?: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30; generateAudio?: boolean; returnLastFrame?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; draftTask?: { id: string }; omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend"; imageUrls?: string[]; videoUrls?: string[]; audioUrls?: string[]; startFrame?: string; endFrame?: string; };
|
|
264
255
|
"seedance-2.5-video-edit": { prompt: string; aspectRatio?: "adaptive"; resolution?: "480p" | "720p" | "1080p"; generateAudio?: boolean; returnLastFrame?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; videoUrl: string; imageUrls?: string[]; };
|
|
265
256
|
"seedance-2.5-video-extend": { prompt: string; aspectRatio?: "adaptive"; resolution?: "480p" | "720p" | "1080p"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30; generateAudio?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; videoUrls: [string, ...string[]]; };
|
|
266
|
-
"seedance-2.5-without-moderation": { prompt?: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30; generateAudio?: boolean; returnLastFrame?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; draftTask?: { id: string }; omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend"; imageUrls?: string[]; videoUrls?: string[]; audioUrls?: string[]; startFrame?: string; endFrame?: string; };
|
|
267
|
-
"seedance-2.5-without-moderation-video-edit": { prompt: string; aspectRatio?: "adaptive"; resolution?: "480p" | "720p" | "1080p"; generateAudio?: boolean; returnLastFrame?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; videoUrl: string; imageUrls?: string[]; };
|
|
268
|
-
"seedance-2.5-without-moderation-video-extend": { prompt: string; aspectRatio?: "adaptive"; resolution?: "480p" | "720p" | "1080p"; duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30; generateAudio?: boolean; outputFormat?: "mp4" | "mov"; colorDepth?: "10bit" | "8bit"; draft?: boolean; videoUrls: [string, ...string[]]; };
|
|
269
257
|
"seedance-i2v": { prompt: string; aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"; resolution?: "480p" | "720p" | "1080p"; duration?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; startFrame: string; };
|
|
270
258
|
"seedream-4.0": { resolution?: "1K" | "2K" | "4K"; prompt: string; aspectRatio?: "1:1" | "4:3" | "3:4" | "16:9" | "9:16" | "3:2" | "2:3" | "21:9"; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; negativePrompt?: string; };
|
|
271
259
|
"seedream-4.5": { resolution?: "2K" | "4K"; prompt: string; aspectRatio?: "1:1" | "4:3" | "3:4" | "16:9" | "9:16" | "3:2" | "2:3" | "21:9"; count?: 1 | 2 | 4 | 6 | 8 | 10; imageUrls?: string[]; negativePrompt?: string; };
|
|
@@ -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
|
-
|
|
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.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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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 =
|
|
247
|
+
const list = byTool.get(discount.toolId);
|
|
210
248
|
if (list == null)
|
|
211
|
-
|
|
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
|
|
222
|
-
if (
|
|
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
|
-
|
|
264
|
+
var _a2;
|
|
265
|
+
const discounts = byTool.get(item.operationId);
|
|
227
266
|
if (discounts == null || discounts.length === 0)
|
|
228
267
|
return item;
|
|
229
|
-
let
|
|
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
|
|
234
|
-
|
|
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 (
|
|
279
|
+
if (best == null)
|
|
238
280
|
return item;
|
|
239
|
-
const pct = Math.min(
|
|
281
|
+
const pct = Math.min(best.discountPercent, 100);
|
|
240
282
|
const discounted = Math.round(item.credits * (1 - pct / 100));
|
|
241
|
-
|
|
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
|
|