@discomedia/utils 1.0.63 → 1.0.65
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/dist/index-frontend.cjs +41 -5
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +41 -5
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +320 -208
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +320 -208
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +2 -2
- package/dist/test.js +364 -210
- package/dist/test.js.map +1 -1
- package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types/alpaca-trading-api.d.ts +8 -1
- package/dist/types/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types/llm-config.d.ts.map +1 -1
- package/dist/types/llm-images.d.ts.map +1 -1
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/alpaca-types.d.ts +29 -0
- package/dist/types/types/alpaca-types.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +2 -2
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-trading-api.d.ts +8 -1
- package/dist/types-frontend/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types-frontend/llm-config.d.ts.map +1 -1
- package/dist/types-frontend/llm-images.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/alpaca-types.d.ts +29 -0
- package/dist/types-frontend/types/alpaca-types.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +2 -2
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index-frontend.cjs
CHANGED
|
@@ -7,6 +7,7 @@ function isOpenRouterModel(model) {
|
|
|
7
7
|
const openRouterModels = [
|
|
8
8
|
'openai/gpt-5',
|
|
9
9
|
'openai/gpt-5-mini',
|
|
10
|
+
'openai/gpt-5.4-mini',
|
|
10
11
|
'openai/gpt-5-nano',
|
|
11
12
|
'openai/gpt-5.1',
|
|
12
13
|
'openai/gpt-5.4',
|
|
@@ -262,7 +263,7 @@ const safeJSON = (text) => {
|
|
|
262
263
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
263
264
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
264
265
|
|
|
265
|
-
const VERSION = '6.
|
|
266
|
+
const VERSION = '6.32.0'; // x-release-please-version
|
|
266
267
|
|
|
267
268
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
268
269
|
const isRunningInBrowser = () => {
|
|
@@ -3506,7 +3507,7 @@ class Speech extends APIResource {
|
|
|
3506
3507
|
* const speech = await client.audio.speech.create({
|
|
3507
3508
|
* input: 'input',
|
|
3508
3509
|
* model: 'string',
|
|
3509
|
-
* voice: '
|
|
3510
|
+
* voice: 'string',
|
|
3510
3511
|
* });
|
|
3511
3512
|
*
|
|
3512
3513
|
* const content = await speech.blob();
|
|
@@ -6787,7 +6788,7 @@ class Videos extends APIResource {
|
|
|
6787
6788
|
* Create a new video generation job from a prompt and optional reference assets.
|
|
6788
6789
|
*/
|
|
6789
6790
|
create(body, options) {
|
|
6790
|
-
return this._client.post('/videos',
|
|
6791
|
+
return this._client.post('/videos', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6791
6792
|
}
|
|
6792
6793
|
/**
|
|
6793
6794
|
* Fetch the latest metadata for a generated video.
|
|
@@ -6807,6 +6808,12 @@ class Videos extends APIResource {
|
|
|
6807
6808
|
delete(videoID, options) {
|
|
6808
6809
|
return this._client.delete(path `/videos/${videoID}`, options);
|
|
6809
6810
|
}
|
|
6811
|
+
/**
|
|
6812
|
+
* Create a character from an uploaded video.
|
|
6813
|
+
*/
|
|
6814
|
+
createCharacter(body, options) {
|
|
6815
|
+
return this._client.post('/videos/characters', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6816
|
+
}
|
|
6810
6817
|
/**
|
|
6811
6818
|
* Download the generated video bytes or a derived preview asset.
|
|
6812
6819
|
*
|
|
@@ -6820,6 +6827,25 @@ class Videos extends APIResource {
|
|
|
6820
6827
|
__binaryResponse: true,
|
|
6821
6828
|
});
|
|
6822
6829
|
}
|
|
6830
|
+
/**
|
|
6831
|
+
* Create a new video generation job by editing a source video or existing
|
|
6832
|
+
* generated video.
|
|
6833
|
+
*/
|
|
6834
|
+
edit(body, options) {
|
|
6835
|
+
return this._client.post('/videos/edits', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6836
|
+
}
|
|
6837
|
+
/**
|
|
6838
|
+
* Create an extension of a completed video.
|
|
6839
|
+
*/
|
|
6840
|
+
extend(body, options) {
|
|
6841
|
+
return this._client.post('/videos/extensions', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6842
|
+
}
|
|
6843
|
+
/**
|
|
6844
|
+
* Fetch a character.
|
|
6845
|
+
*/
|
|
6846
|
+
getCharacter(characterID, options) {
|
|
6847
|
+
return this._client.get(path `/videos/characters/${characterID}`, options);
|
|
6848
|
+
}
|
|
6823
6849
|
/**
|
|
6824
6850
|
* Create a remix of a completed video using a refreshed prompt.
|
|
6825
6851
|
*/
|
|
@@ -7101,8 +7127,9 @@ class OpenAI {
|
|
|
7101
7127
|
new URL(path)
|
|
7102
7128
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
7103
7129
|
const defaultQuery = this.defaultQuery();
|
|
7104
|
-
|
|
7105
|
-
|
|
7130
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
7131
|
+
if (!isEmptyObj$1(defaultQuery) || !isEmptyObj$1(pathQuery)) {
|
|
7132
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
7106
7133
|
}
|
|
7107
7134
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
7108
7135
|
url.search = this.stringifyQuery(query);
|
|
@@ -10322,6 +10349,11 @@ const openAiModelCosts = {
|
|
|
10322
10349
|
cacheHitCost: 0.025 / 1_000_000,
|
|
10323
10350
|
outputCost: 2 / 1_000_000,
|
|
10324
10351
|
},
|
|
10352
|
+
'gpt-5.4-mini': {
|
|
10353
|
+
inputCost: 0.25 / 1_000_000,
|
|
10354
|
+
cacheHitCost: 0.025 / 1_000_000,
|
|
10355
|
+
outputCost: 2 / 1_000_000,
|
|
10356
|
+
},
|
|
10325
10357
|
'gpt-5-nano': {
|
|
10326
10358
|
inputCost: 0.05 / 1_000_000,
|
|
10327
10359
|
cacheHitCost: 0.005 / 1_000_000,
|
|
@@ -10832,6 +10864,7 @@ const isSupportedModel = (model) => {
|
|
|
10832
10864
|
'gpt-4.1-nano',
|
|
10833
10865
|
'gpt-5',
|
|
10834
10866
|
'gpt-5-mini',
|
|
10867
|
+
'gpt-5.4-mini',
|
|
10835
10868
|
'gpt-5-nano',
|
|
10836
10869
|
'gpt-5.1',
|
|
10837
10870
|
'gpt-5.4',
|
|
@@ -10860,6 +10893,7 @@ function supportsTemperature(model) {
|
|
|
10860
10893
|
'o3',
|
|
10861
10894
|
'gpt-5',
|
|
10862
10895
|
'gpt-5-mini',
|
|
10896
|
+
'gpt-5.4-mini',
|
|
10863
10897
|
'gpt-5-nano',
|
|
10864
10898
|
'gpt-5.1',
|
|
10865
10899
|
'gpt-5.4',
|
|
@@ -10889,6 +10923,7 @@ function isGPT5Model(model) {
|
|
|
10889
10923
|
const gpt5Models = [
|
|
10890
10924
|
'gpt-5',
|
|
10891
10925
|
'gpt-5-mini',
|
|
10926
|
+
'gpt-5.4-mini',
|
|
10892
10927
|
'gpt-5-nano',
|
|
10893
10928
|
'gpt-5.1',
|
|
10894
10929
|
'gpt-5.4',
|
|
@@ -11198,6 +11233,7 @@ const MULTIMODAL_VISION_MODELS = new Set([
|
|
|
11198
11233
|
'gpt-4o',
|
|
11199
11234
|
'gpt-5',
|
|
11200
11235
|
'gpt-5-mini',
|
|
11236
|
+
'gpt-5.4-mini',
|
|
11201
11237
|
'gpt-5-nano',
|
|
11202
11238
|
'gpt-5.1',
|
|
11203
11239
|
'gpt-5.4',
|