@runwayml/sdk 2.4.2 → 2.5.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/CHANGELOG.md +14 -0
- package/core.d.ts +2 -2
- package/core.d.ts.map +1 -1
- package/core.js +4 -2
- package/core.js.map +1 -1
- package/core.mjs +4 -2
- package/core.mjs.map +1 -1
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +4 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/character-performance.d.ts +106 -0
- package/resources/character-performance.d.ts.map +1 -0
- package/resources/character-performance.js +17 -0
- package/resources/character-performance.js.map +1 -0
- package/resources/character-performance.mjs +13 -0
- package/resources/character-performance.mjs.map +1 -0
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.ts +84 -1
- package/resources/organization.d.ts.map +1 -1
- package/resources/organization.js +7 -0
- package/resources/organization.js.map +1 -1
- package/resources/organization.mjs +7 -0
- package/resources/organization.mjs.map +1 -1
- package/src/core.ts +5 -3
- package/src/index.ts +25 -2
- package/src/resources/character-performance.ts +135 -0
- package/src/resources/index.ts +11 -1
- package/src/resources/organization.ts +115 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import { isRequestOptions } from '../core';
|
|
4
5
|
import * as Core from '../core';
|
|
5
6
|
|
|
6
7
|
export class Organization extends APIResource {
|
|
@@ -11,6 +12,26 @@ export class Organization extends APIResource {
|
|
|
11
12
|
retrieve(options?: Core.RequestOptions): Core.APIPromise<OrganizationRetrieveResponse> {
|
|
12
13
|
return this._client.get('/v1/organization', options);
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Fetch credit usage data broken down by model and day for the organization
|
|
18
|
+
* associated with the API key used to make the request. Up to 90 days of data can
|
|
19
|
+
* be queried at a time.
|
|
20
|
+
*/
|
|
21
|
+
retrieveUsage(
|
|
22
|
+
body?: OrganizationRetrieveUsageParams,
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<OrganizationRetrieveUsageResponse>;
|
|
25
|
+
retrieveUsage(options?: Core.RequestOptions): Core.APIPromise<OrganizationRetrieveUsageResponse>;
|
|
26
|
+
retrieveUsage(
|
|
27
|
+
body: OrganizationRetrieveUsageParams | Core.RequestOptions = {},
|
|
28
|
+
options?: Core.RequestOptions,
|
|
29
|
+
): Core.APIPromise<OrganizationRetrieveUsageResponse> {
|
|
30
|
+
if (isRequestOptions(body)) {
|
|
31
|
+
return this.retrieveUsage({}, body);
|
|
32
|
+
}
|
|
33
|
+
return this._client.post('/v1/organization/usage', { body, ...options });
|
|
34
|
+
}
|
|
14
35
|
}
|
|
15
36
|
|
|
16
37
|
export interface OrganizationRetrieveResponse {
|
|
@@ -51,6 +72,11 @@ export namespace OrganizationRetrieveResponse {
|
|
|
51
72
|
* An object containing model-specific limits. Each key represents a model.
|
|
52
73
|
*/
|
|
53
74
|
export interface Models {
|
|
75
|
+
/**
|
|
76
|
+
* Limits associated with the act_two model.
|
|
77
|
+
*/
|
|
78
|
+
act_two?: Models.ActTwo;
|
|
79
|
+
|
|
54
80
|
/**
|
|
55
81
|
* Limits associated with the gen3a_turbo model.
|
|
56
82
|
*/
|
|
@@ -73,6 +99,21 @@ export namespace OrganizationRetrieveResponse {
|
|
|
73
99
|
}
|
|
74
100
|
|
|
75
101
|
export namespace Models {
|
|
102
|
+
/**
|
|
103
|
+
* Limits associated with the act_two model.
|
|
104
|
+
*/
|
|
105
|
+
export interface ActTwo {
|
|
106
|
+
/**
|
|
107
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
108
|
+
*/
|
|
109
|
+
maxConcurrentGenerations: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The maximum number of generations that can be created each day for this model.
|
|
113
|
+
*/
|
|
114
|
+
maxDailyGenerations: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
76
117
|
/**
|
|
77
118
|
* Limits associated with the gen3a_turbo model.
|
|
78
119
|
*/
|
|
@@ -150,6 +191,11 @@ export namespace OrganizationRetrieveResponse {
|
|
|
150
191
|
* Usage data for each model.
|
|
151
192
|
*/
|
|
152
193
|
export interface Models {
|
|
194
|
+
/**
|
|
195
|
+
* Usage data for the act_two model.
|
|
196
|
+
*/
|
|
197
|
+
act_two?: Models.ActTwo;
|
|
198
|
+
|
|
153
199
|
/**
|
|
154
200
|
* Usage data for the gen3a_turbo model.
|
|
155
201
|
*/
|
|
@@ -172,6 +218,16 @@ export namespace OrganizationRetrieveResponse {
|
|
|
172
218
|
}
|
|
173
219
|
|
|
174
220
|
export namespace Models {
|
|
221
|
+
/**
|
|
222
|
+
* Usage data for the act_two model.
|
|
223
|
+
*/
|
|
224
|
+
export interface ActTwo {
|
|
225
|
+
/**
|
|
226
|
+
* The number of generations that have been run for this model in the past day.
|
|
227
|
+
*/
|
|
228
|
+
dailyGenerations: number;
|
|
229
|
+
}
|
|
230
|
+
|
|
175
231
|
/**
|
|
176
232
|
* Usage data for the gen3a_turbo model.
|
|
177
233
|
*/
|
|
@@ -215,6 +271,64 @@ export namespace OrganizationRetrieveResponse {
|
|
|
215
271
|
}
|
|
216
272
|
}
|
|
217
273
|
|
|
274
|
+
export interface OrganizationRetrieveUsageResponse {
|
|
275
|
+
/**
|
|
276
|
+
* The list of models with usage during the queried time range.
|
|
277
|
+
*/
|
|
278
|
+
models: Array<'upscale_v1' | 'act_two' | 'gen4_image' | 'gen3a_turbo' | 'gen4_turbo'>;
|
|
279
|
+
|
|
280
|
+
results: Array<OrganizationRetrieveUsageResponse.Result>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export namespace OrganizationRetrieveUsageResponse {
|
|
284
|
+
export interface Result {
|
|
285
|
+
/**
|
|
286
|
+
* The date of the usage data in ISO-8601 format (YYYY-MM-DD). All dates are in
|
|
287
|
+
* UTC.
|
|
288
|
+
*/
|
|
289
|
+
date: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The credits used per model for the given date.
|
|
293
|
+
*/
|
|
294
|
+
usedCredits: Array<Result.UsedCredit>;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export namespace Result {
|
|
298
|
+
export interface UsedCredit {
|
|
299
|
+
/**
|
|
300
|
+
* The number of credits used for the model.
|
|
301
|
+
*/
|
|
302
|
+
amount: number;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The model whose usage resulted in the credit usage.
|
|
306
|
+
*/
|
|
307
|
+
model: 'upscale_v1' | 'act_two' | 'gen4_image' | 'gen3a_turbo' | 'gen4_turbo';
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface OrganizationRetrieveUsageParams {
|
|
313
|
+
/**
|
|
314
|
+
* The end date of the usage data in ISO-8601 format (YYYY-MM-DD), not inclusive.
|
|
315
|
+
* If unspecified, it will default to thirty days after the start date. Must be
|
|
316
|
+
* less than or equal to 90 days after the start date. All dates are in UTC.
|
|
317
|
+
*/
|
|
318
|
+
beforeDate?: string;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The start date of the usage data in ISO-8601 format (YYYY-MM-DD). If
|
|
322
|
+
* unspecified, it will default to 30 days before the current date. All dates are
|
|
323
|
+
* in UTC.
|
|
324
|
+
*/
|
|
325
|
+
startDate?: string;
|
|
326
|
+
}
|
|
327
|
+
|
|
218
328
|
export declare namespace Organization {
|
|
219
|
-
export {
|
|
329
|
+
export {
|
|
330
|
+
type OrganizationRetrieveResponse as OrganizationRetrieveResponse,
|
|
331
|
+
type OrganizationRetrieveUsageResponse as OrganizationRetrieveUsageResponse,
|
|
332
|
+
type OrganizationRetrieveUsageParams as OrganizationRetrieveUsageParams,
|
|
333
|
+
};
|
|
220
334
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.5.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.5.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|