openai 7.22.0 → 7.24.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 +57 -0
- package/README.md +4 -1
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +43 -5
- package/client.js.map +1 -1
- package/client.mjs +43 -5
- package/client.mjs.map +1 -1
- package/internal/responses/canonical-output-text.d.mts +8 -4
- package/internal/responses/canonical-output-text.d.mts.map +1 -1
- package/internal/responses/canonical-output-text.d.ts +8 -4
- package/internal/responses/canonical-output-text.d.ts.map +1 -1
- package/internal/responses/canonical-output-text.js +11 -0
- package/internal/responses/canonical-output-text.js.map +1 -1
- package/internal/responses/canonical-output-text.mjs +11 -0
- package/internal/responses/canonical-output-text.mjs.map +1 -1
- package/internal/responses/response-accumulator.d.mts +12 -1
- package/internal/responses/response-accumulator.d.mts.map +1 -1
- package/internal/responses/response-accumulator.d.ts +12 -1
- package/internal/responses/response-accumulator.d.ts.map +1 -1
- package/internal/responses/response-accumulator.js +99 -25
- package/internal/responses/response-accumulator.js.map +1 -1
- package/internal/responses/response-accumulator.mjs +97 -26
- package/internal/responses/response-accumulator.mjs.map +1 -1
- package/internal/ws.d.mts +6 -2
- package/internal/ws.d.mts.map +1 -1
- package/internal/ws.d.ts +6 -2
- package/internal/ws.d.ts.map +1 -1
- package/internal/ws.js +5 -3
- package/internal/ws.js.map +1 -1
- package/internal/ws.mjs +5 -3
- package/internal/ws.mjs.map +1 -1
- package/lib/live/transcript-grouping.d.mts.map +1 -1
- package/lib/live/transcript-grouping.d.ts.map +1 -1
- package/lib/live/transcript-grouping.js +6 -5
- package/lib/live/transcript-grouping.js.map +1 -1
- package/lib/live/transcript-grouping.mjs +6 -5
- package/lib/live/transcript-grouping.mjs.map +1 -1
- package/lib/responses/responses-websocket-accumulator.d.mts +72 -0
- package/lib/responses/responses-websocket-accumulator.d.mts.map +1 -0
- package/lib/responses/responses-websocket-accumulator.d.ts +72 -0
- package/lib/responses/responses-websocket-accumulator.d.ts.map +1 -0
- package/lib/responses/responses-websocket-accumulator.js +291 -0
- package/lib/responses/responses-websocket-accumulator.js.map +1 -0
- package/lib/responses/responses-websocket-accumulator.mjs +287 -0
- package/lib/responses/responses-websocket-accumulator.mjs.map +1 -0
- package/package.json +1 -1
- package/realtime/translations/ws.d.mts +84 -0
- package/realtime/translations/ws.d.mts.map +1 -0
- package/realtime/translations/ws.d.ts +84 -0
- package/realtime/translations/ws.d.ts.map +1 -0
- package/realtime/translations/ws.js +444 -0
- package/realtime/translations/ws.js.map +1 -0
- package/realtime/translations/ws.mjs +439 -0
- package/realtime/translations/ws.mjs.map +1 -0
- package/resources/admin/organization/audit-logs.d.mts +1 -1
- package/resources/admin/organization/audit-logs.d.mts.map +1 -1
- package/resources/admin/organization/audit-logs.d.ts +1 -1
- package/resources/admin/organization/audit-logs.d.ts.map +1 -1
- package/resources/admin/organization/external-storage.d.mts +19 -3
- package/resources/admin/organization/external-storage.d.mts.map +1 -1
- package/resources/admin/organization/external-storage.d.ts +19 -3
- package/resources/admin/organization/external-storage.d.ts.map +1 -1
- package/resources/admin/organization/index.d.mts +1 -1
- package/resources/admin/organization/index.d.mts.map +1 -1
- package/resources/admin/organization/index.d.ts +1 -1
- package/resources/admin/organization/index.d.ts.map +1 -1
- package/resources/admin/organization/index.js.map +1 -1
- package/resources/admin/organization/index.mjs.map +1 -1
- package/resources/admin/organization/organization.d.mts +2 -2
- package/resources/admin/organization/organization.d.mts.map +1 -1
- package/resources/admin/organization/organization.d.ts +2 -2
- package/resources/admin/organization/organization.d.ts.map +1 -1
- package/resources/admin/organization/organization.js.map +1 -1
- package/resources/admin/organization/organization.mjs.map +1 -1
- package/resources/audio/speech.d.mts +1 -1
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +1 -1
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +2 -1
- package/resources/audio/transcriptions.d.mts.map +1 -1
- package/resources/audio/transcriptions.d.ts +2 -1
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/beta/agents/agents.d.mts +14 -8
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +14 -8
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/environments/templates.d.mts +6 -6
- package/resources/beta/agents/environments/templates.d.ts +6 -6
- package/resources/beta/agents/sessions/sessions.d.mts +4 -2
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +4 -2
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.mts +24 -7
- package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.ts +24 -7
- package/resources/beta/agents/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/agents/vaults/credentials.js +2 -6
- package/resources/beta/agents/vaults/credentials.js.map +1 -1
- package/resources/beta/agents/vaults/credentials.mjs +2 -6
- package/resources/beta/agents/vaults/credentials.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +69 -10
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +69 -10
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/files.d.mts +2 -2
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +2 -2
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/live/forks/ws-base.js +1 -1
- package/resources/live/forks/ws-base.js.map +1 -1
- package/resources/live/forks/ws-base.mjs +1 -1
- package/resources/live/forks/ws-base.mjs.map +1 -1
- package/resources/live/sideband/ws-base.js +1 -1
- package/resources/live/sideband/ws-base.js.map +1 -1
- package/resources/live/sideband/ws-base.mjs +1 -1
- package/resources/live/sideband/ws-base.mjs.map +1 -1
- package/resources/live/ws-base.js +1 -1
- package/resources/live/ws-base.js.map +1 -1
- package/resources/live/ws-base.mjs +1 -1
- package/resources/live/ws-base.mjs.map +1 -1
- package/resources/realtime/index.d.mts +1 -0
- package/resources/realtime/index.d.mts.map +1 -1
- package/resources/realtime/index.d.ts +1 -0
- package/resources/realtime/index.d.ts.map +1 -1
- package/resources/realtime/index.js +3 -1
- package/resources/realtime/index.js.map +1 -1
- package/resources/realtime/index.mjs +1 -0
- package/resources/realtime/index.mjs.map +1 -1
- package/resources/realtime/realtime.d.mts +4 -0
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +4 -0
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js +4 -0
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs +4 -0
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/realtime/translations/client-secrets.d.mts +67 -0
- package/resources/realtime/translations/client-secrets.d.mts.map +1 -0
- package/resources/realtime/translations/client-secrets.d.ts +67 -0
- package/resources/realtime/translations/client-secrets.d.ts.map +1 -0
- package/resources/realtime/translations/client-secrets.js +39 -0
- package/resources/realtime/translations/client-secrets.js.map +1 -0
- package/resources/realtime/translations/client-secrets.mjs +35 -0
- package/resources/realtime/translations/client-secrets.mjs.map +1 -0
- package/resources/realtime/translations/index.d.mts +3 -0
- package/resources/realtime/translations/index.d.mts.map +1 -0
- package/resources/realtime/translations/index.d.ts +3 -0
- package/resources/realtime/translations/index.d.ts.map +1 -0
- package/resources/realtime/translations/index.js +9 -0
- package/resources/realtime/translations/index.js.map +1 -0
- package/resources/realtime/translations/index.mjs +4 -0
- package/resources/realtime/translations/index.mjs.map +1 -0
- package/resources/realtime/translations/translations.d.mts +10 -0
- package/resources/realtime/translations/translations.d.mts.map +1 -0
- package/resources/realtime/translations/translations.d.ts +10 -0
- package/resources/realtime/translations/translations.d.ts.map +1 -0
- package/resources/realtime/translations/translations.js +17 -0
- package/resources/realtime/translations/translations.js.map +1 -0
- package/resources/realtime/translations/translations.mjs +12 -0
- package/resources/realtime/translations/translations.mjs.map +1 -0
- package/resources/realtime/translations.d.mts +2 -0
- package/resources/realtime/translations.d.mts.map +1 -0
- package/resources/realtime/translations.d.ts +2 -0
- package/resources/realtime/translations.d.ts.map +1 -0
- package/resources/realtime/translations.js +6 -0
- package/resources/realtime/translations.js.map +1 -0
- package/resources/realtime/translations.mjs +3 -0
- package/resources/realtime/translations.mjs.map +1 -0
- package/resources/responses/responses.d.mts +66 -7
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +66 -7
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +3 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +3 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/videos.d.mts +7 -0
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +7 -0
- package/resources/videos.d.ts.map +1 -1
- package/src/client.ts +42 -6
- package/src/internal/responses/canonical-output-text.ts +30 -5
- package/src/internal/responses/response-accumulator.ts +155 -56
- package/src/internal/ws.ts +5 -3
- package/src/lib/live/transcript-grouping.ts +6 -5
- package/src/lib/responses/responses-websocket-accumulator.ts +374 -0
- package/src/realtime/translations/ws.ts +539 -0
- package/src/resources/admin/organization/audit-logs.ts +2 -1
- package/src/resources/admin/organization/external-storage.ts +34 -2
- package/src/resources/admin/organization/index.ts +1 -0
- package/src/resources/admin/organization/organization.ts +2 -0
- package/src/resources/audio/speech.ts +3 -0
- package/src/resources/audio/transcriptions.ts +2 -1
- package/src/resources/beta/agents/agents.ts +15 -7
- package/src/resources/beta/agents/environments/templates.ts +6 -6
- package/src/resources/beta/agents/sessions/sessions.ts +4 -2
- package/src/resources/beta/agents/vaults/credentials.ts +21 -7
- package/src/resources/beta/responses/responses.ts +79 -6
- package/src/resources/files.ts +3 -3
- package/src/resources/index.ts +1 -1
- package/src/resources/live/forks/ws-base.ts +1 -1
- package/src/resources/live/sideband/ws-base.ts +1 -1
- package/src/resources/live/ws-base.ts +1 -1
- package/src/resources/realtime/api.md +8 -0
- package/src/resources/realtime/index.ts +1 -0
- package/src/resources/realtime/realtime.ts +6 -0
- package/src/resources/realtime/translations/client-secrets.ts +93 -0
- package/src/resources/realtime/translations/index.ts +4 -0
- package/src/resources/realtime/translations/translations.ts +15 -0
- package/src/resources/realtime/translations.ts +3 -0
- package/src/resources/responses/responses.ts +73 -6
- package/src/resources/shared.ts +5 -2
- package/src/resources/videos.ts +6 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -422,7 +422,7 @@ export interface Agent {
|
|
|
422
422
|
/**
|
|
423
423
|
* The resolved service-tier policy used for model requests.
|
|
424
424
|
*/
|
|
425
|
-
service_tier: 'auto' | 'default' | 'flex' | 'priority' | 'fast';
|
|
425
|
+
service_tier: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast';
|
|
426
426
|
|
|
427
427
|
/**
|
|
428
428
|
* The resolved configuration for text generated by the agent.
|
|
@@ -1085,7 +1085,7 @@ export namespace AgentSession {
|
|
|
1085
1085
|
/**
|
|
1086
1086
|
* The effective service-tier policy for model requests. Defaults to `auto`.
|
|
1087
1087
|
*/
|
|
1088
|
-
service_tier: 'auto' | 'default' | 'flex' | 'priority' | 'fast';
|
|
1088
|
+
service_tier: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast';
|
|
1089
1089
|
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Configuration for text generated by the agent.
|
|
@@ -3155,7 +3155,8 @@ export namespace EnvironmentParam {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
|
|
3157
3157
|
/**
|
|
3158
|
-
* An OpenAI-hosted environment
|
|
3158
|
+
* An existing OpenAI-hosted environment or new inline/template-based hosted
|
|
3159
|
+
* configuration.
|
|
3159
3160
|
*/
|
|
3160
3161
|
export interface EnvironmentParamOpenAIHosted {
|
|
3161
3162
|
/**
|
|
@@ -3187,7 +3188,7 @@ export namespace EnvironmentParam {
|
|
|
3187
3188
|
|
|
3188
3189
|
/**
|
|
3189
3190
|
* Network access policy for the environment. Defaults to disabled for GA requests
|
|
3190
|
-
* and enabled for
|
|
3191
|
+
* and enabled for beta requests.
|
|
3191
3192
|
*/
|
|
3192
3193
|
network?: EnvironmentParamOpenAIHosted.Network | null;
|
|
3193
3194
|
|
|
@@ -3216,7 +3217,7 @@ export namespace EnvironmentParam {
|
|
|
3216
3217
|
export namespace EnvironmentParamOpenAIHosted {
|
|
3217
3218
|
/**
|
|
3218
3219
|
* Network access policy for the environment. Defaults to disabled for GA requests
|
|
3219
|
-
* and enabled for
|
|
3220
|
+
* and enabled for beta requests.
|
|
3220
3221
|
*/
|
|
3221
3222
|
export interface Network {
|
|
3222
3223
|
/**
|
|
@@ -4316,8 +4317,11 @@ export interface SessionTurnError {
|
|
|
4316
4317
|
* billing limit.
|
|
4317
4318
|
* - `credit_balance_exhausted` - The organization has no API credits remaining.
|
|
4318
4319
|
* - `rate_limit_exceeded` - The request exceeds the available rate limit.
|
|
4320
|
+
* - `flex_unavailable` - Flex processing is temporarily unavailable.
|
|
4319
4321
|
* - `server_overloaded` - The model service is temporarily overloaded.
|
|
4320
4322
|
* - `cyber_policy` - The request was rejected by a safety policy.
|
|
4323
|
+
* - `misalignment_policy_violation` - The request was blocked by the safety
|
|
4324
|
+
* systems.
|
|
4321
4325
|
* - `connection_failed` - The request could not connect to the model service.
|
|
4322
4326
|
* - `server_error` - The model service encountered an unexpected error.
|
|
4323
4327
|
* - `authentication_error` - The API credentials are invalid or lack the required
|
|
@@ -4339,8 +4343,10 @@ export interface SessionTurnError {
|
|
|
4339
4343
|
| 'usage_limit_exceeded'
|
|
4340
4344
|
| 'credit_balance_exhausted'
|
|
4341
4345
|
| 'rate_limit_exceeded'
|
|
4346
|
+
| 'flex_unavailable'
|
|
4342
4347
|
| 'server_overloaded'
|
|
4343
4348
|
| 'cyber_policy'
|
|
4349
|
+
| 'misalignment_policy_violation'
|
|
4344
4350
|
| 'connection_failed'
|
|
4345
4351
|
| 'server_error'
|
|
4346
4352
|
| 'authentication_error'
|
|
@@ -4678,8 +4684,9 @@ export interface AgentCreateParams {
|
|
|
4678
4684
|
* - `flex` - Uses the flex service tier.
|
|
4679
4685
|
* - `priority` - Uses the priority service tier.
|
|
4680
4686
|
* - `fast` - Uses the fast service tier.
|
|
4687
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
4681
4688
|
*/
|
|
4682
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
4689
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
4683
4690
|
|
|
4684
4691
|
/**
|
|
4685
4692
|
* Configuration for generated text. Defaults to the `text` format and medium
|
|
@@ -4736,8 +4743,9 @@ export interface AgentUpdateParams {
|
|
|
4736
4743
|
* - `flex` - Uses the flex service tier.
|
|
4737
4744
|
* - `priority` - Uses the priority service tier.
|
|
4738
4745
|
* - `fast` - Uses the fast service tier.
|
|
4746
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
4739
4747
|
*/
|
|
4740
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
4748
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
4741
4749
|
|
|
4742
4750
|
/**
|
|
4743
4751
|
* Configuration for text generated by the agent.
|
|
@@ -581,7 +581,7 @@ export interface TemplateCreateParams {
|
|
|
581
581
|
|
|
582
582
|
/**
|
|
583
583
|
* Network access policy for the environment. Defaults to disabled for GA requests
|
|
584
|
-
* and enabled for
|
|
584
|
+
* and enabled for beta requests.
|
|
585
585
|
*/
|
|
586
586
|
network?: TemplateCreateParams.Network | null;
|
|
587
587
|
|
|
@@ -610,7 +610,7 @@ export interface TemplateCreateParams {
|
|
|
610
610
|
export namespace TemplateCreateParams {
|
|
611
611
|
/**
|
|
612
612
|
* Network access policy for the environment. Defaults to disabled for GA requests
|
|
613
|
-
* and enabled for
|
|
613
|
+
* and enabled for beta requests.
|
|
614
614
|
*/
|
|
615
615
|
export interface Network {
|
|
616
616
|
/**
|
|
@@ -672,8 +672,8 @@ export interface TemplateUpdateParams {
|
|
|
672
672
|
|
|
673
673
|
/**
|
|
674
674
|
* Network access available after setup completes. Omit to preserve the current
|
|
675
|
-
* policy, or pass `null` to reset to disabled for GA requests or enabled for
|
|
676
|
-
*
|
|
675
|
+
* policy, or pass `null` to reset to disabled for GA requests or enabled for beta
|
|
676
|
+
* requests.
|
|
677
677
|
*/
|
|
678
678
|
network?: TemplateUpdateParams.Network | null;
|
|
679
679
|
|
|
@@ -701,8 +701,8 @@ export interface TemplateUpdateParams {
|
|
|
701
701
|
export namespace TemplateUpdateParams {
|
|
702
702
|
/**
|
|
703
703
|
* Network access available after setup completes. Omit to preserve the current
|
|
704
|
-
* policy, or pass `null` to reset to disabled for GA requests or enabled for
|
|
705
|
-
*
|
|
704
|
+
* policy, or pass `null` to reset to disabled for GA requests or enabled for beta
|
|
705
|
+
* requests.
|
|
706
706
|
*/
|
|
707
707
|
export interface Network {
|
|
708
708
|
/**
|
|
@@ -473,8 +473,9 @@ export namespace SessionCreateParams {
|
|
|
473
473
|
* - `flex` - Uses the flex service tier.
|
|
474
474
|
* - `priority` - Uses the priority service tier.
|
|
475
475
|
* - `fast` - Uses the fast service tier.
|
|
476
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
476
477
|
*/
|
|
477
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
478
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
478
479
|
|
|
479
480
|
/**
|
|
480
481
|
* Configuration for text generated by the agent.
|
|
@@ -542,8 +543,9 @@ export namespace SessionUpdateParams {
|
|
|
542
543
|
* - `flex` - Uses the flex service tier.
|
|
543
544
|
* - `priority` - Uses the priority service tier.
|
|
544
545
|
* - `fast` - Uses the fast service tier.
|
|
546
|
+
* - `ultrafast` - Uses the ultrafast service tier.
|
|
545
547
|
*/
|
|
546
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | null;
|
|
548
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'priority' | 'fast' | 'ultrafast' | null;
|
|
547
549
|
}
|
|
548
550
|
|
|
549
551
|
export namespace Agent {
|
|
@@ -187,8 +187,7 @@ export class Credentials extends APIResource {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
191
|
-
* metadata. See
|
|
190
|
+
* Updates credential metadata or rotates its write-only secret. See
|
|
192
191
|
* [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).
|
|
193
192
|
*
|
|
194
193
|
* @example
|
|
@@ -196,10 +195,7 @@ export class Credentials extends APIResource {
|
|
|
196
195
|
* const credential =
|
|
197
196
|
* await client.beta.agents.vaults.credentials.update(
|
|
198
197
|
* 'credential_id',
|
|
199
|
-
* {
|
|
200
|
-
* vault_id: 'vault_id',
|
|
201
|
-
* auth: { type: 'mcp_oauth' },
|
|
202
|
-
* },
|
|
198
|
+
* { vault_id: 'vault_id', metadata: {} },
|
|
203
199
|
* );
|
|
204
200
|
* ```
|
|
205
201
|
*/
|
|
@@ -397,6 +393,11 @@ export interface Credential {
|
|
|
397
393
|
*/
|
|
398
394
|
created_at: number;
|
|
399
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Application-defined key-value pairs associated with this credential.
|
|
398
|
+
*/
|
|
399
|
+
metadata: { [key: string]: string };
|
|
400
|
+
|
|
400
401
|
/**
|
|
401
402
|
* The human-readable name of the credential.
|
|
402
403
|
*/
|
|
@@ -1002,6 +1003,12 @@ export interface CredentialCreateParams {
|
|
|
1002
1003
|
* trimming.
|
|
1003
1004
|
*/
|
|
1004
1005
|
name: string;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
1009
|
+
* characters. Defaults to an empty map.
|
|
1010
|
+
*/
|
|
1011
|
+
metadata?: { [key: string]: string };
|
|
1005
1012
|
}
|
|
1006
1013
|
|
|
1007
1014
|
export interface CredentialRetrieveParams {
|
|
@@ -1021,7 +1028,14 @@ export interface CredentialUpdateParams {
|
|
|
1021
1028
|
* Body param: Replacement values for the credential's existing authentication
|
|
1022
1029
|
* method.
|
|
1023
1030
|
*/
|
|
1024
|
-
auth
|
|
1031
|
+
auth?: CredentialAuthRotateParam;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Body param: Replaces all metadata. Omit to preserve it, or pass {} to clear it.
|
|
1035
|
+
* Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
1036
|
+
* characters.
|
|
1037
|
+
*/
|
|
1038
|
+
metadata?: { [key: string]: string };
|
|
1025
1039
|
}
|
|
1026
1040
|
|
|
1027
1041
|
export interface CredentialListParams extends Omit<CursorPageParams, 'limit'> {
|
|
@@ -1376,6 +1376,8 @@ export interface BetaResponse {
|
|
|
1376
1376
|
*/
|
|
1377
1377
|
id: string;
|
|
1378
1378
|
|
|
1379
|
+
access_programs: BetaResponse.AccessPrograms | null;
|
|
1380
|
+
|
|
1379
1381
|
/**
|
|
1380
1382
|
* Unix timestamp (in seconds) of when this Response was created.
|
|
1381
1383
|
*/
|
|
@@ -1419,6 +1421,7 @@ export interface BetaResponse {
|
|
|
1419
1421
|
*/
|
|
1420
1422
|
model:
|
|
1421
1423
|
| 'gpt-6-astra'
|
|
1424
|
+
| 'gpt-6.1-sol'
|
|
1422
1425
|
| 'gpt-6-sol'
|
|
1423
1426
|
| 'gpt-6-luna'
|
|
1424
1427
|
| 'gpt-5.6-sol'
|
|
@@ -1525,6 +1528,7 @@ export interface BetaResponse {
|
|
|
1525
1528
|
| 'gpt-daybreak-blue-latest'
|
|
1526
1529
|
| 'gpt-daybreak-red-latest'
|
|
1527
1530
|
| 'gpt-5.6-cyber'
|
|
1531
|
+
| 'gpt-rosalind-research'
|
|
1528
1532
|
| (string & {});
|
|
1529
1533
|
|
|
1530
1534
|
/**
|
|
@@ -1798,6 +1802,13 @@ export interface BetaResponse {
|
|
|
1798
1802
|
}
|
|
1799
1803
|
|
|
1800
1804
|
export namespace BetaResponse {
|
|
1805
|
+
export interface AccessPrograms {
|
|
1806
|
+
/**
|
|
1807
|
+
* The effective Cyber access program used for this response.
|
|
1808
|
+
*/
|
|
1809
|
+
cyber: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1801
1812
|
/**
|
|
1802
1813
|
* Details about why the response is incomplete.
|
|
1803
1814
|
*/
|
|
@@ -9460,7 +9471,7 @@ export namespace BetaResponseOutputText {
|
|
|
9460
9471
|
filename: string;
|
|
9461
9472
|
|
|
9462
9473
|
/**
|
|
9463
|
-
* The index
|
|
9474
|
+
* The index in the output text at which to insert the file citation.
|
|
9464
9475
|
*/
|
|
9465
9476
|
index: number;
|
|
9466
9477
|
|
|
@@ -9648,7 +9659,7 @@ export namespace BetaResponseOutputTextAnnotationAddedEvent {
|
|
|
9648
9659
|
filename: string;
|
|
9649
9660
|
|
|
9650
9661
|
/**
|
|
9651
|
-
* The index
|
|
9662
|
+
* The index in the output text at which to insert the file citation.
|
|
9652
9663
|
*/
|
|
9653
9664
|
index: number;
|
|
9654
9665
|
|
|
@@ -11903,6 +11914,11 @@ export namespace BetaResponsesClientEvent {
|
|
|
11903
11914
|
*/
|
|
11904
11915
|
type: 'response.create';
|
|
11905
11916
|
|
|
11917
|
+
/**
|
|
11918
|
+
* Domain-specific access programs to use for this request.
|
|
11919
|
+
*/
|
|
11920
|
+
access_programs?: ResponseCreate.AccessPrograms;
|
|
11921
|
+
|
|
11906
11922
|
/**
|
|
11907
11923
|
* Whether to run the model response in the background.
|
|
11908
11924
|
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
@@ -12000,6 +12016,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12000
12016
|
*/
|
|
12001
12017
|
model?:
|
|
12002
12018
|
| 'gpt-6-astra'
|
|
12019
|
+
| 'gpt-6.1-sol'
|
|
12003
12020
|
| 'gpt-6-sol'
|
|
12004
12021
|
| 'gpt-6-luna'
|
|
12005
12022
|
| 'gpt-5.6-sol'
|
|
@@ -12106,6 +12123,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12106
12123
|
| 'gpt-daybreak-blue-latest'
|
|
12107
12124
|
| 'gpt-daybreak-red-latest'
|
|
12108
12125
|
| 'gpt-5.6-cyber'
|
|
12126
|
+
| 'gpt-rosalind-research'
|
|
12109
12127
|
| (string & {});
|
|
12110
12128
|
|
|
12111
12129
|
/**
|
|
@@ -12352,6 +12370,25 @@ export namespace BetaResponsesClientEvent {
|
|
|
12352
12370
|
}
|
|
12353
12371
|
|
|
12354
12372
|
export namespace ResponseCreate {
|
|
12373
|
+
/**
|
|
12374
|
+
* Domain-specific access programs to use for this request.
|
|
12375
|
+
*/
|
|
12376
|
+
export interface AccessPrograms {
|
|
12377
|
+
/**
|
|
12378
|
+
* The Cyber access program to use for this request. Supported values are
|
|
12379
|
+
* `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
12380
|
+
* the program from the model's Cyber tier and your organization and project
|
|
12381
|
+
* access, subject to model-specific eligibility restrictions. By default, models
|
|
12382
|
+
* without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
12383
|
+
* authorized; otherwise they fall back to Standard unless the model requires
|
|
12384
|
+
* Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
12385
|
+
* Requests that require unavailable Daybreak access return 403. An implicit
|
|
12386
|
+
* Standard fallback is represented by null in the response's access_programs
|
|
12387
|
+
* field, rather than an explicit Standard selection.
|
|
12388
|
+
*/
|
|
12389
|
+
cyber?: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
12390
|
+
}
|
|
12391
|
+
|
|
12355
12392
|
export interface ContextManagement {
|
|
12356
12393
|
/**
|
|
12357
12394
|
* The context management entry type. Currently only 'compaction' is supported.
|
|
@@ -14035,14 +14072,18 @@ export interface BetaWebSearchPreviewTool {
|
|
|
14035
14072
|
search_context_size?: 'low' | 'medium' | 'high';
|
|
14036
14073
|
|
|
14037
14074
|
/**
|
|
14038
|
-
* The
|
|
14075
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14076
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14077
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14039
14078
|
*/
|
|
14040
14079
|
user_location?: BetaWebSearchPreviewTool.UserLocation | null;
|
|
14041
14080
|
}
|
|
14042
14081
|
|
|
14043
14082
|
export namespace BetaWebSearchPreviewTool {
|
|
14044
14083
|
/**
|
|
14045
|
-
* The
|
|
14084
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14085
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14086
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14046
14087
|
*/
|
|
14047
14088
|
export interface UserLocation {
|
|
14048
14089
|
/**
|
|
@@ -14103,7 +14144,9 @@ export interface BetaWebSearchTool {
|
|
|
14103
14144
|
search_context_size?: 'low' | 'medium' | 'high';
|
|
14104
14145
|
|
|
14105
14146
|
/**
|
|
14106
|
-
* The approximate location of the user.
|
|
14147
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14148
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14149
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14107
14150
|
*/
|
|
14108
14151
|
user_location?: BetaWebSearchTool.UserLocation | null;
|
|
14109
14152
|
}
|
|
@@ -14123,7 +14166,9 @@ export namespace BetaWebSearchTool {
|
|
|
14123
14166
|
}
|
|
14124
14167
|
|
|
14125
14168
|
/**
|
|
14126
|
-
* The approximate location of the user.
|
|
14169
|
+
* The approximate location of the user. If omitted or null, defaults to the United
|
|
14170
|
+
* States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
14171
|
+
* fields. To localize results, provide the relevant location fields.
|
|
14127
14172
|
*/
|
|
14128
14173
|
export interface UserLocation {
|
|
14129
14174
|
/**
|
|
@@ -14158,6 +14203,11 @@ export namespace BetaWebSearchTool {
|
|
|
14158
14203
|
export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
|
|
14159
14204
|
|
|
14160
14205
|
export interface ResponseCreateParamsBase {
|
|
14206
|
+
/**
|
|
14207
|
+
* Body param: Domain-specific access programs to use for this request.
|
|
14208
|
+
*/
|
|
14209
|
+
access_programs?: ResponseCreateParams.AccessPrograms;
|
|
14210
|
+
|
|
14161
14211
|
/**
|
|
14162
14212
|
* Body param: Whether to run the model response in the background.
|
|
14163
14213
|
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
@@ -14256,6 +14306,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14256
14306
|
*/
|
|
14257
14307
|
model?:
|
|
14258
14308
|
| 'gpt-6-astra'
|
|
14309
|
+
| 'gpt-6.1-sol'
|
|
14259
14310
|
| 'gpt-6-sol'
|
|
14260
14311
|
| 'gpt-6-luna'
|
|
14261
14312
|
| 'gpt-5.6-sol'
|
|
@@ -14362,6 +14413,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14362
14413
|
| 'gpt-daybreak-blue-latest'
|
|
14363
14414
|
| 'gpt-daybreak-red-latest'
|
|
14364
14415
|
| 'gpt-5.6-cyber'
|
|
14416
|
+
| 'gpt-rosalind-research'
|
|
14365
14417
|
| (string & {});
|
|
14366
14418
|
|
|
14367
14419
|
/**
|
|
@@ -14609,6 +14661,25 @@ export interface ResponseCreateParamsBase {
|
|
|
14609
14661
|
}
|
|
14610
14662
|
|
|
14611
14663
|
export namespace ResponseCreateParams {
|
|
14664
|
+
/**
|
|
14665
|
+
* Domain-specific access programs to use for this request.
|
|
14666
|
+
*/
|
|
14667
|
+
export interface AccessPrograms {
|
|
14668
|
+
/**
|
|
14669
|
+
* The Cyber access program to use for this request. Supported values are
|
|
14670
|
+
* `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
14671
|
+
* the program from the model's Cyber tier and your organization and project
|
|
14672
|
+
* access, subject to model-specific eligibility restrictions. By default, models
|
|
14673
|
+
* without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
14674
|
+
* authorized; otherwise they fall back to Standard unless the model requires
|
|
14675
|
+
* Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
14676
|
+
* Requests that require unavailable Daybreak access return 403. An implicit
|
|
14677
|
+
* Standard fallback is represented by null in the response's access_programs
|
|
14678
|
+
* field, rather than an explicit Standard selection.
|
|
14679
|
+
*/
|
|
14680
|
+
cyber?: 'standard' | 'daybreak_blue' | 'daybreak_red';
|
|
14681
|
+
}
|
|
14682
|
+
|
|
14612
14683
|
export interface ContextManagement {
|
|
14613
14684
|
/**
|
|
14614
14685
|
* The context management entry type. Currently only 'compaction' is supported.
|
|
@@ -14928,6 +14999,7 @@ export interface ResponseCompactParams {
|
|
|
14928
14999
|
*/
|
|
14929
15000
|
model:
|
|
14930
15001
|
| 'gpt-6-astra'
|
|
15002
|
+
| 'gpt-6.1-sol'
|
|
14931
15003
|
| 'gpt-6-sol'
|
|
14932
15004
|
| 'gpt-6-luna'
|
|
14933
15005
|
| 'gpt-5.6-sol'
|
|
@@ -15034,6 +15106,7 @@ export interface ResponseCompactParams {
|
|
|
15034
15106
|
| 'gpt-daybreak-blue-latest'
|
|
15035
15107
|
| 'gpt-daybreak-red-latest'
|
|
15036
15108
|
| 'gpt-5.6-cyber'
|
|
15109
|
+
| 'gpt-rosalind-research'
|
|
15037
15110
|
| (string & {})
|
|
15038
15111
|
| null;
|
|
15039
15112
|
|
package/src/resources/files.ts
CHANGED
|
@@ -324,8 +324,6 @@ export class Files extends APIResource {
|
|
|
324
324
|
|
|
325
325
|
export type FileObjectsPage = CursorPage<FileObject>;
|
|
326
326
|
|
|
327
|
-
export type FileContent = string;
|
|
328
|
-
|
|
329
327
|
export interface FileDeleted {
|
|
330
328
|
id: string;
|
|
331
329
|
|
|
@@ -408,6 +406,8 @@ export interface FileObject {
|
|
|
408
406
|
*/
|
|
409
407
|
export type FilePurpose = 'assistants' | 'batch' | 'fine-tune' | 'vision' | 'user_data' | 'evals';
|
|
410
408
|
|
|
409
|
+
export type FileContent = string;
|
|
410
|
+
|
|
411
411
|
export interface FileCreateParams {
|
|
412
412
|
/**
|
|
413
413
|
* The File object (not file name) to be uploaded.
|
|
@@ -468,10 +468,10 @@ export interface FileListParams extends CursorPageParams {
|
|
|
468
468
|
|
|
469
469
|
export declare namespace Files {
|
|
470
470
|
export {
|
|
471
|
-
type FileContent as FileContent,
|
|
472
471
|
type FileDeleted as FileDeleted,
|
|
473
472
|
type FileObject as FileObject,
|
|
474
473
|
type FilePurpose as FilePurpose,
|
|
474
|
+
type FileContent as FileContent,
|
|
475
475
|
type FileObjectsPage as FileObjectsPage,
|
|
476
476
|
type FileCreateParams as FileCreateParams,
|
|
477
477
|
type FileListParams as FileListParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -671,7 +671,7 @@ export abstract class ForksWSBase<TSocket extends WebSocketLike> extends ForksEm
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
try {
|
|
674
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
674
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
675
675
|
} catch (err) {
|
|
676
676
|
this._onError(null, 'could not send queued data', err);
|
|
677
677
|
}
|
|
@@ -681,7 +681,7 @@ export abstract class SidebandWSBase<TSocket extends WebSocketLike> extends Side
|
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
try {
|
|
684
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
684
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
685
685
|
} catch (err) {
|
|
686
686
|
this._onError(null, 'could not send queued data', err);
|
|
687
687
|
}
|
|
@@ -667,7 +667,7 @@ export abstract class LiveWSBase<TSocket extends WebSocketLike> extends LiveEmit
|
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
try {
|
|
670
|
-
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)));
|
|
670
|
+
this._sendQueue.flush((data) => this.socket.send(flattenRawData(data)), { requeueFailed: false });
|
|
671
671
|
} catch (err) {
|
|
672
672
|
this._onError(null, 'could not send queued data', err);
|
|
673
673
|
}
|
|
@@ -144,3 +144,11 @@ Methods:
|
|
|
144
144
|
- <code title="post /realtime/calls/{call_id}/hangup">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">hangup</a>(callID) -> void</code>
|
|
145
145
|
- <code title="post /realtime/calls/{call_id}/refer">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">refer</a>(callID, { ...params }) -> void</code>
|
|
146
146
|
- <code title="post /realtime/calls/{call_id}/reject">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">reject</a>(callID, { ...params }) -> void</code>
|
|
147
|
+
|
|
148
|
+
## Translations
|
|
149
|
+
|
|
150
|
+
### ClientSecrets
|
|
151
|
+
|
|
152
|
+
Methods:
|
|
153
|
+
|
|
154
|
+
- <code title="post /realtime/translations/client_secrets">client.realtime.translations.clientSecrets.<a href="./src/resources/realtime/translations/client-secrets.ts">create</a>({ ...params }) -> RealtimeTranslationClientSecretCreateResponse</code>
|
|
@@ -16,10 +16,13 @@ import {
|
|
|
16
16
|
RealtimeTranscriptionSessionTurnDetection,
|
|
17
17
|
} from './client-secrets';
|
|
18
18
|
import * as ResponsesAPI from '../responses/responses';
|
|
19
|
+
import * as TranslationsAPI from './translations/translations';
|
|
20
|
+
import { Translations } from './translations/translations';
|
|
19
21
|
|
|
20
22
|
export class Realtime extends APIResource {
|
|
21
23
|
clientSecrets: ClientSecretsAPI.ClientSecrets = new ClientSecretsAPI.ClientSecrets(this._client);
|
|
22
24
|
calls: CallsAPI.Calls = new CallsAPI.Calls(this._client);
|
|
25
|
+
translations: TranslationsAPI.Translations = new TranslationsAPI.Translations(this._client);
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface AudioTranscription {
|
|
@@ -5444,6 +5447,7 @@ export namespace TranscriptionSessionUpdatedEvent {
|
|
|
5444
5447
|
|
|
5445
5448
|
Realtime.ClientSecrets = ClientSecrets;
|
|
5446
5449
|
Realtime.Calls = Calls;
|
|
5450
|
+
Realtime.Translations = Translations;
|
|
5447
5451
|
|
|
5448
5452
|
export declare namespace Realtime {
|
|
5449
5453
|
export {
|
|
@@ -5584,4 +5588,6 @@ export declare namespace Realtime {
|
|
|
5584
5588
|
type CallReferParams as CallReferParams,
|
|
5585
5589
|
type CallRejectParams as CallRejectParams,
|
|
5586
5590
|
};
|
|
5591
|
+
|
|
5592
|
+
export { Translations as Translations };
|
|
5587
5593
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as RealtimeAPI from '../realtime';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
function resolveResourceRequestOptions(
|
|
9
|
+
options: RequestOptions | undefined,
|
|
10
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
11
|
+
): Promise<RequestOptions> {
|
|
12
|
+
return Promise.resolve(options).then(buildOptions);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ClientSecrets extends APIResource {
|
|
16
|
+
/**
|
|
17
|
+
* Create a Realtime translation client secret with an associated translation
|
|
18
|
+
* session configuration.
|
|
19
|
+
*
|
|
20
|
+
* Client secrets are short-lived tokens that can be passed to a client app, such
|
|
21
|
+
* as a web frontend or mobile client, which grants access to the Realtime
|
|
22
|
+
* Translation API without leaking your main API key. You can configure a custom
|
|
23
|
+
* TTL for each client secret.
|
|
24
|
+
*
|
|
25
|
+
* Returns the created client secret and the effective translation session object.
|
|
26
|
+
* The client secret is a string that looks like `ek_1234`.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const realtimeTranslationClientSecretCreateResponse =
|
|
31
|
+
* await client.realtime.translations.clientSecrets.create(
|
|
32
|
+
* { session: { model: 'model' } },
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
create(
|
|
37
|
+
body: ClientSecretCreateParams,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<RealtimeAPI.RealtimeTranslationClientSecretCreateResponse> {
|
|
40
|
+
return this._client.post(
|
|
41
|
+
'/realtime/translations/client_secrets',
|
|
42
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
43
|
+
body,
|
|
44
|
+
...options,
|
|
45
|
+
__security: { bearerAuth: true },
|
|
46
|
+
})),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ClientSecretCreateParams {
|
|
52
|
+
/**
|
|
53
|
+
* Realtime translation session configuration. Translation sessions stream source
|
|
54
|
+
* audio in and translated audio plus transcript deltas out continuously.
|
|
55
|
+
*/
|
|
56
|
+
session: RealtimeAPI.RealtimeTranslationSessionCreateRequest;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for the client secret expiration. Expiration refers to the time
|
|
60
|
+
* after which a client secret will no longer be valid for creating sessions. The
|
|
61
|
+
* session itself may continue after that time once started. A secret can be used
|
|
62
|
+
* to create multiple sessions until it expires.
|
|
63
|
+
*/
|
|
64
|
+
expires_after?: ClientSecretCreateParams.ExpiresAfter;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export namespace ClientSecretCreateParams {
|
|
68
|
+
/**
|
|
69
|
+
* Configuration for the client secret expiration. Expiration refers to the time
|
|
70
|
+
* after which a client secret will no longer be valid for creating sessions. The
|
|
71
|
+
* session itself may continue after that time once started. A secret can be used
|
|
72
|
+
* to create multiple sessions until it expires.
|
|
73
|
+
*/
|
|
74
|
+
export interface ExpiresAfter {
|
|
75
|
+
/**
|
|
76
|
+
* The anchor point for the client secret expiration, meaning that `seconds` will
|
|
77
|
+
* be added to the `created_at` time of the client secret to produce an expiration
|
|
78
|
+
* timestamp. Only `created_at` is currently supported.
|
|
79
|
+
*/
|
|
80
|
+
anchor?: 'created_at';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The number of seconds from the anchor point to the expiration. Select a value
|
|
84
|
+
* between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if
|
|
85
|
+
* not specified.
|
|
86
|
+
*/
|
|
87
|
+
seconds?: number;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare namespace ClientSecrets {
|
|
92
|
+
export { type ClientSecretCreateParams as ClientSecretCreateParams };
|
|
93
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ClientSecretsAPI from './client-secrets';
|
|
5
|
+
import { ClientSecretCreateParams, ClientSecrets } from './client-secrets';
|
|
6
|
+
|
|
7
|
+
export class Translations extends APIResource {
|
|
8
|
+
clientSecrets: ClientSecretsAPI.ClientSecrets = new ClientSecretsAPI.ClientSecrets(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Translations.ClientSecrets = ClientSecrets;
|
|
12
|
+
|
|
13
|
+
export declare namespace Translations {
|
|
14
|
+
export { ClientSecrets as ClientSecrets, type ClientSecretCreateParams as ClientSecretCreateParams };
|
|
15
|
+
}
|