@picsart/ai-sdk 6.47.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.
- package/_vendor/workflows-client/index.d.ts +2 -0
- package/index.d.ts +7 -2
- package/index.js +2 -1
- package/package.json +1 -1
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 —
|
|
48
|
-
*
|
|
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
|
@@ -15158,7 +15158,8 @@ function createClient(config) {
|
|
|
15158
15158
|
},
|
|
15159
15159
|
/**
|
|
15160
15160
|
* Same /options call as getCredits(), returning the whole response:
|
|
15161
|
-
* credits plus billable amount, unit, rate,
|
|
15161
|
+
* credits plus billable amount, unit, rate, whether they are estimated, and
|
|
15162
|
+
* whether the caller has the permissions the request needs.
|
|
15162
15163
|
*/
|
|
15163
15164
|
async options(model, params2) {
|
|
15164
15165
|
return fetchOptions(model, params2);
|