@picsart/ai-sdk 6.46.0 → 6.48.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.
@@ -48,6 +48,8 @@ interface WorkflowOptions {
48
48
  estimated?: boolean;
49
49
  unit?: string;
50
50
  price?: number;
51
+ hasPermission?: boolean;
52
+ missingPermissions?: string[];
51
53
  }
52
54
  type HistoryResponse<R> = PicsartResponse & {
53
55
  response: {
package/index.d.ts CHANGED
@@ -44,8 +44,9 @@ interface CreditUsage {
44
44
  balance?: number;
45
45
  }
46
46
  /**
47
- * What a model's `/options` endpoint answers for one request — today its price
48
- * and how it was derived (mirrors `WorkflowOptions` from `@picsart/workflows-client`).
47
+ * What a model's `/options` endpoint answers for one request — its price, how
48
+ * it was derived, and whether the caller is permitted to run it (mirrors `WorkflowOptions` from
49
+ * `@picsart/workflows-client`).
49
50
  */
50
51
  interface OptionsResult {
51
52
  /** Monetization tool the request is billed under. */
@@ -62,6 +63,10 @@ interface OptionsResult {
62
63
  unit?: string;
63
64
  /** Rate per `unit`. */
64
65
  price?: number;
66
+ /** False when the caller lacks a permission the request needs — see `missingPermissions`. */
67
+ hasPermission?: boolean;
68
+ /** Permissions the caller is missing for this request, when `hasPermission` is false. */
69
+ missingPermissions?: string[];
65
70
  }
66
71
  interface WorkflowPollOptions {
67
72
  intervalMs?: number;
package/index.js CHANGED
@@ -3023,7 +3023,6 @@ var { MODELS: MODELS6 } = defineModels("bytedance", [
3023
3023
  estimatedTime: 250,
3024
3024
  mode: "video",
3025
3025
  inputType: "i2v",
3026
- release: "preview",
3027
3026
  description: "Animate one or more subjects with realistic body movement driven by audio.",
3028
3027
  features: [
3029
3028
  feat("Image Input", "input"),
@@ -15159,7 +15158,8 @@ function createClient(config) {
15159
15158
  },
15160
15159
  /**
15161
15160
  * Same /options call as getCredits(), returning the whole response:
15162
- * credits plus billable amount, unit, rate, and whether they are estimated.
15161
+ * credits plus billable amount, unit, rate, whether they are estimated, and
15162
+ * whether the caller has the permissions the request needs.
15163
15163
  */
15164
15164
  async options(model, params2) {
15165
15165
  return fetchOptions(model, params2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.46.0",
3
+ "version": "6.48.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",