openai 6.0.1 → 6.1.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 +8 -0
- package/package.json +1 -1
- package/resources/realtime/calls.d.mts +142 -0
- package/resources/realtime/calls.d.mts.map +1 -0
- package/resources/realtime/calls.d.ts +142 -0
- package/resources/realtime/calls.d.ts.map +1 -0
- package/resources/realtime/calls.js +75 -0
- package/resources/realtime/calls.js.map +1 -0
- package/resources/realtime/calls.mjs +71 -0
- package/resources/realtime/calls.mjs.map +1 -0
- package/resources/realtime/client-secrets.d.mts +6 -0
- package/resources/realtime/client-secrets.d.mts.map +1 -1
- package/resources/realtime/client-secrets.d.ts +6 -0
- package/resources/realtime/client-secrets.d.ts.map +1 -1
- package/resources/realtime/client-secrets.js +6 -0
- package/resources/realtime/client-secrets.js.map +1 -1
- package/resources/realtime/client-secrets.mjs +6 -0
- package/resources/realtime/client-secrets.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/src/resources/realtime/calls.ts +204 -0
- package/src/resources/realtime/client-secrets.ts +6 -0
- package/src/resources/realtime/index.ts +1 -0
- package/src/resources/realtime/realtime.ts +11 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.1.0 (2025-10-02)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v6.0.1...v6.1.0](https://github.com/openai/openai-node/compare/v6.0.1...v6.1.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for realtime calls ([5de9585](https://github.com/openai/openai-node/commit/5de958556679182dfbdce95b4db6b65ca742aa61))
|
|
10
|
+
|
|
3
11
|
## 6.0.1 (2025-10-01)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v6.0.0...v6.0.1](https://github.com/openai/openai-node/compare/v6.0.0...v6.0.1)
|
package/package.json
CHANGED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as RealtimeAPI from "./realtime.mjs";
|
|
3
|
+
import * as ResponsesAPI from "../responses/responses.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
export declare class Calls extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Accept an incoming SIP call and configure the realtime session that will handle
|
|
9
|
+
* it.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* await client.realtime.calls.accept('call_id', {
|
|
14
|
+
* type: 'realtime',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
accept(callID: string, body: CallAcceptParams, options?: RequestOptions): APIPromise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* End an active Realtime API call, whether it was initiated over SIP or WebRTC.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* await client.realtime.calls.hangup('call_id');
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
hangup(callID: string, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Transfer an active SIP call to a new destination using the SIP REFER verb.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* await client.realtime.calls.refer('call_id', {
|
|
34
|
+
* target_uri: 'tel:+14155550123',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
refer(callID: string, body: CallReferParams, options?: RequestOptions): APIPromise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Decline an incoming SIP call by returning a SIP status code to the caller.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* await client.realtime.calls.reject('call_id');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
reject(callID: string, body?: CallRejectParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
48
|
+
}
|
|
49
|
+
export interface CallAcceptParams {
|
|
50
|
+
/**
|
|
51
|
+
* The type of session to create. Always `realtime` for the Realtime API.
|
|
52
|
+
*/
|
|
53
|
+
type: 'realtime';
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for input and output audio.
|
|
56
|
+
*/
|
|
57
|
+
audio?: RealtimeAPI.RealtimeAudioConfig;
|
|
58
|
+
/**
|
|
59
|
+
* Additional fields to include in server outputs.
|
|
60
|
+
*
|
|
61
|
+
* `item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
|
62
|
+
* transcription.
|
|
63
|
+
*/
|
|
64
|
+
include?: Array<'item.input_audio_transcription.logprobs'>;
|
|
65
|
+
/**
|
|
66
|
+
* The default system instructions (i.e. system message) prepended to model calls.
|
|
67
|
+
* This field allows the client to guide the model on desired responses. The model
|
|
68
|
+
* can be instructed on response content and format, (e.g. "be extremely succinct",
|
|
69
|
+
* "act friendly", "here are examples of good responses") and on audio behavior
|
|
70
|
+
* (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
|
71
|
+
* instructions are not guaranteed to be followed by the model, but they provide
|
|
72
|
+
* guidance to the model on the desired behavior.
|
|
73
|
+
*
|
|
74
|
+
* Note that the server sets default instructions which will be used if this field
|
|
75
|
+
* is not set and are visible in the `session.created` event at the start of the
|
|
76
|
+
* session.
|
|
77
|
+
*/
|
|
78
|
+
instructions?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Maximum number of output tokens for a single assistant response, inclusive of
|
|
81
|
+
* tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
|
82
|
+
* `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
|
83
|
+
*/
|
|
84
|
+
max_output_tokens?: number | 'inf';
|
|
85
|
+
/**
|
|
86
|
+
* The Realtime model used for this session.
|
|
87
|
+
*/
|
|
88
|
+
model?: (string & {}) | 'gpt-realtime' | 'gpt-realtime-2025-08-28' | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';
|
|
89
|
+
/**
|
|
90
|
+
* The set of modalities the model can respond with. It defaults to `["audio"]`,
|
|
91
|
+
* indicating that the model will respond with audio plus a transcript. `["text"]`
|
|
92
|
+
* can be used to make the model respond with text only. It is not possible to
|
|
93
|
+
* request both `text` and `audio` at the same time.
|
|
94
|
+
*/
|
|
95
|
+
output_modalities?: Array<'text' | 'audio'>;
|
|
96
|
+
/**
|
|
97
|
+
* Reference to a prompt template and its variables.
|
|
98
|
+
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
99
|
+
*/
|
|
100
|
+
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
101
|
+
/**
|
|
102
|
+
* How the model chooses tools. Provide one of the string modes or force a specific
|
|
103
|
+
* function/MCP tool.
|
|
104
|
+
*/
|
|
105
|
+
tool_choice?: RealtimeAPI.RealtimeToolChoiceConfig;
|
|
106
|
+
/**
|
|
107
|
+
* Tools available to the model.
|
|
108
|
+
*/
|
|
109
|
+
tools?: RealtimeAPI.RealtimeToolsConfig;
|
|
110
|
+
/**
|
|
111
|
+
* Realtime API can write session traces to the
|
|
112
|
+
* [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
|
|
113
|
+
* tracing is enabled for a session, the configuration cannot be modified.
|
|
114
|
+
*
|
|
115
|
+
* `auto` will create a trace for the session with default values for the workflow
|
|
116
|
+
* name, group id, and metadata.
|
|
117
|
+
*/
|
|
118
|
+
tracing?: RealtimeAPI.RealtimeTracingConfig | null;
|
|
119
|
+
/**
|
|
120
|
+
* Controls how the realtime conversation is truncated prior to model inference.
|
|
121
|
+
* The default is `auto`.
|
|
122
|
+
*/
|
|
123
|
+
truncation?: RealtimeAPI.RealtimeTruncation;
|
|
124
|
+
}
|
|
125
|
+
export interface CallReferParams {
|
|
126
|
+
/**
|
|
127
|
+
* URI that should appear in the SIP Refer-To header. Supports values like
|
|
128
|
+
* `tel:+14155550123` or `sip:agent@example.com`.
|
|
129
|
+
*/
|
|
130
|
+
target_uri: string;
|
|
131
|
+
}
|
|
132
|
+
export interface CallRejectParams {
|
|
133
|
+
/**
|
|
134
|
+
* SIP response code to send back to the caller. Defaults to `603` (Decline) when
|
|
135
|
+
* omitted.
|
|
136
|
+
*/
|
|
137
|
+
status_code?: number;
|
|
138
|
+
}
|
|
139
|
+
export declare namespace Calls {
|
|
140
|
+
export { type CallAcceptParams as CallAcceptParams, type CallReferParams as CallReferParams, type CallRejectParams as CallRejectParams, };
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=calls.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calls.d.mts","sourceRoot":"","sources":["../../src/resources/realtime/calls.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,EAAE,UAAU,EAA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AAC;IAE5C;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,cAAc,GAAG,IAAI,CAAC;IAE5C;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,wBAAwB,CAAC;IAEnD;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;IAExC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as RealtimeAPI from "./realtime.js";
|
|
3
|
+
import * as ResponsesAPI from "../responses/responses.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
export declare class Calls extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Accept an incoming SIP call and configure the realtime session that will handle
|
|
9
|
+
* it.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* await client.realtime.calls.accept('call_id', {
|
|
14
|
+
* type: 'realtime',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
accept(callID: string, body: CallAcceptParams, options?: RequestOptions): APIPromise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* End an active Realtime API call, whether it was initiated over SIP or WebRTC.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* await client.realtime.calls.hangup('call_id');
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
hangup(callID: string, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Transfer an active SIP call to a new destination using the SIP REFER verb.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* await client.realtime.calls.refer('call_id', {
|
|
34
|
+
* target_uri: 'tel:+14155550123',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
refer(callID: string, body: CallReferParams, options?: RequestOptions): APIPromise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Decline an incoming SIP call by returning a SIP status code to the caller.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* await client.realtime.calls.reject('call_id');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
reject(callID: string, body?: CallRejectParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
48
|
+
}
|
|
49
|
+
export interface CallAcceptParams {
|
|
50
|
+
/**
|
|
51
|
+
* The type of session to create. Always `realtime` for the Realtime API.
|
|
52
|
+
*/
|
|
53
|
+
type: 'realtime';
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for input and output audio.
|
|
56
|
+
*/
|
|
57
|
+
audio?: RealtimeAPI.RealtimeAudioConfig;
|
|
58
|
+
/**
|
|
59
|
+
* Additional fields to include in server outputs.
|
|
60
|
+
*
|
|
61
|
+
* `item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
|
62
|
+
* transcription.
|
|
63
|
+
*/
|
|
64
|
+
include?: Array<'item.input_audio_transcription.logprobs'>;
|
|
65
|
+
/**
|
|
66
|
+
* The default system instructions (i.e. system message) prepended to model calls.
|
|
67
|
+
* This field allows the client to guide the model on desired responses. The model
|
|
68
|
+
* can be instructed on response content and format, (e.g. "be extremely succinct",
|
|
69
|
+
* "act friendly", "here are examples of good responses") and on audio behavior
|
|
70
|
+
* (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
|
71
|
+
* instructions are not guaranteed to be followed by the model, but they provide
|
|
72
|
+
* guidance to the model on the desired behavior.
|
|
73
|
+
*
|
|
74
|
+
* Note that the server sets default instructions which will be used if this field
|
|
75
|
+
* is not set and are visible in the `session.created` event at the start of the
|
|
76
|
+
* session.
|
|
77
|
+
*/
|
|
78
|
+
instructions?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Maximum number of output tokens for a single assistant response, inclusive of
|
|
81
|
+
* tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
|
82
|
+
* `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
|
83
|
+
*/
|
|
84
|
+
max_output_tokens?: number | 'inf';
|
|
85
|
+
/**
|
|
86
|
+
* The Realtime model used for this session.
|
|
87
|
+
*/
|
|
88
|
+
model?: (string & {}) | 'gpt-realtime' | 'gpt-realtime-2025-08-28' | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17';
|
|
89
|
+
/**
|
|
90
|
+
* The set of modalities the model can respond with. It defaults to `["audio"]`,
|
|
91
|
+
* indicating that the model will respond with audio plus a transcript. `["text"]`
|
|
92
|
+
* can be used to make the model respond with text only. It is not possible to
|
|
93
|
+
* request both `text` and `audio` at the same time.
|
|
94
|
+
*/
|
|
95
|
+
output_modalities?: Array<'text' | 'audio'>;
|
|
96
|
+
/**
|
|
97
|
+
* Reference to a prompt template and its variables.
|
|
98
|
+
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
99
|
+
*/
|
|
100
|
+
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
101
|
+
/**
|
|
102
|
+
* How the model chooses tools. Provide one of the string modes or force a specific
|
|
103
|
+
* function/MCP tool.
|
|
104
|
+
*/
|
|
105
|
+
tool_choice?: RealtimeAPI.RealtimeToolChoiceConfig;
|
|
106
|
+
/**
|
|
107
|
+
* Tools available to the model.
|
|
108
|
+
*/
|
|
109
|
+
tools?: RealtimeAPI.RealtimeToolsConfig;
|
|
110
|
+
/**
|
|
111
|
+
* Realtime API can write session traces to the
|
|
112
|
+
* [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
|
|
113
|
+
* tracing is enabled for a session, the configuration cannot be modified.
|
|
114
|
+
*
|
|
115
|
+
* `auto` will create a trace for the session with default values for the workflow
|
|
116
|
+
* name, group id, and metadata.
|
|
117
|
+
*/
|
|
118
|
+
tracing?: RealtimeAPI.RealtimeTracingConfig | null;
|
|
119
|
+
/**
|
|
120
|
+
* Controls how the realtime conversation is truncated prior to model inference.
|
|
121
|
+
* The default is `auto`.
|
|
122
|
+
*/
|
|
123
|
+
truncation?: RealtimeAPI.RealtimeTruncation;
|
|
124
|
+
}
|
|
125
|
+
export interface CallReferParams {
|
|
126
|
+
/**
|
|
127
|
+
* URI that should appear in the SIP Refer-To header. Supports values like
|
|
128
|
+
* `tel:+14155550123` or `sip:agent@example.com`.
|
|
129
|
+
*/
|
|
130
|
+
target_uri: string;
|
|
131
|
+
}
|
|
132
|
+
export interface CallRejectParams {
|
|
133
|
+
/**
|
|
134
|
+
* SIP response code to send back to the caller. Defaults to `603` (Decline) when
|
|
135
|
+
* omitted.
|
|
136
|
+
*/
|
|
137
|
+
status_code?: number;
|
|
138
|
+
}
|
|
139
|
+
export declare namespace Calls {
|
|
140
|
+
export { type CallAcceptParams as CallAcceptParams, type CallReferParams as CallReferParams, type CallRejectParams as CallRejectParams, };
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=calls.d.ts.map
|
|
@@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AAyB,GACzB,yBAAyB,GACzB,oCAAoC,GACpC,oCAAoC,GACpC,oCAAoC,GACpC,8BAA8B,GAC9B,yCAAyC,CAAC;IAE9C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;IAE5C;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,cAAc,GAAG,IAAI,CAAC;IAE5C;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,wBAAwB,CAAC;IAEnD;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;IAExC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Calls = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Calls extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Accept an incoming SIP call and configure the realtime session that will handle
|
|
11
|
+
* it.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await client.realtime.calls.accept('call_id', {
|
|
16
|
+
* type: 'realtime',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
accept(callID, body, options) {
|
|
21
|
+
return this._client.post((0, path_1.path) `/realtime/calls/${callID}/accept`, {
|
|
22
|
+
body,
|
|
23
|
+
...options,
|
|
24
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* End an active Realtime API call, whether it was initiated over SIP or WebRTC.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* await client.realtime.calls.hangup('call_id');
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
hangup(callID, options) {
|
|
36
|
+
return this._client.post((0, path_1.path) `/realtime/calls/${callID}/hangup`, {
|
|
37
|
+
...options,
|
|
38
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Transfer an active SIP call to a new destination using the SIP REFER verb.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* await client.realtime.calls.refer('call_id', {
|
|
47
|
+
* target_uri: 'tel:+14155550123',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
refer(callID, body, options) {
|
|
52
|
+
return this._client.post((0, path_1.path) `/realtime/calls/${callID}/refer`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Decline an incoming SIP call by returning a SIP status code to the caller.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* await client.realtime.calls.reject('call_id');
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
reject(callID, body = {}, options) {
|
|
67
|
+
return this._client.post((0, path_1.path) `/realtime/calls/${callID}/reject`, {
|
|
68
|
+
body,
|
|
69
|
+
...options,
|
|
70
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Calls = Calls;
|
|
75
|
+
//# sourceMappingURL=calls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calls.js","sourceRoot":"","sources":["../../src/resources/realtime/calls.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,MAAM,SAAS,EAAE;YAC/D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,MAAM,SAAS,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAc,EAAE,IAAqB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,MAAM,QAAQ,EAAE;YAC9D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,MAAc,EACd,OAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,MAAM,SAAS,EAAE;YAC/D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAxED,sBAwEC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Calls extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Accept an incoming SIP call and configure the realtime session that will handle
|
|
8
|
+
* it.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* await client.realtime.calls.accept('call_id', {
|
|
13
|
+
* type: 'realtime',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
accept(callID, body, options) {
|
|
18
|
+
return this._client.post(path `/realtime/calls/${callID}/accept`, {
|
|
19
|
+
body,
|
|
20
|
+
...options,
|
|
21
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* End an active Realtime API call, whether it was initiated over SIP or WebRTC.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* await client.realtime.calls.hangup('call_id');
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
hangup(callID, options) {
|
|
33
|
+
return this._client.post(path `/realtime/calls/${callID}/hangup`, {
|
|
34
|
+
...options,
|
|
35
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Transfer an active SIP call to a new destination using the SIP REFER verb.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* await client.realtime.calls.refer('call_id', {
|
|
44
|
+
* target_uri: 'tel:+14155550123',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
refer(callID, body, options) {
|
|
49
|
+
return this._client.post(path `/realtime/calls/${callID}/refer`, {
|
|
50
|
+
body,
|
|
51
|
+
...options,
|
|
52
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Decline an incoming SIP call by returning a SIP status code to the caller.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* await client.realtime.calls.reject('call_id');
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
reject(callID, body = {}, options) {
|
|
64
|
+
return this._client.post(path `/realtime/calls/${callID}/reject`, {
|
|
65
|
+
body,
|
|
66
|
+
...options,
|
|
67
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
68
|
+
});
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AED;;;;;;;OAOG;IACH,MAAM,CACJ,MAAc,EACd,OAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,mBAAmB,MAAM,SAAS,EAAE;YAC/D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -7,6 +7,12 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class ClientSecrets extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a Realtime client secret with an associated session configuration.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const clientSecret =
|
|
14
|
+
* await client.realtime.clientSecrets.create();
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
create(body: ClientSecretCreateParams, options?: RequestOptions): APIPromise<ClientSecretCreateResponse>;
|
|
12
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-secrets.d.mts","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"client-secrets.d.mts","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5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AM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAC,YAAY,CAAC;IAEtD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,4BAA4B,GAAG,WAAW,CAAC,yCAAyC,CAAC;CAC5G;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;;;;OAKG;IACH,UAAiB,YAAY;QAC3B;;;;WAIG;QACH,MAAM,CAAC,EAAE,YAAY,CAAC;QAEtB;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -7,6 +7,12 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class ClientSecrets extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a Realtime client secret with an associated session configuration.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const clientSecret =
|
|
14
|
+
* await client.realtime.clientSecrets.create();
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
create(body: ClientSecretCreateParams, options?: RequestOptions): APIPromise<ClientSecretCreateResponse>;
|
|
12
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-secrets.d.ts","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"client-secrets.d.ts","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAGzG;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,aAAa,EAAE,2BAA2B,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,6BAA6B,CAAC,KAAK,CAAC;IAE5C;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAE3D;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EACF,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,oCAAoC,GACpC,oCAAoC,GACpC,oCAAoC,GACpC,8BAA8B,GAC9B,yCAAyC,CAAC;IAE9C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC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E,MAAM,CAAC;IAE7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,6BAA6B,GAAG,0CAA0C,CAAC;IAEpF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAC,YAAY,CAAC;IAEtD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,4BAA4B,GAAG,WAAW,CAAC,yCAAyC,CAAC;CAC5G;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;;;;OAKG;IACH,UAAiB,YAAY;QAC3B;;;;WAIG;QACH,MAAM,CAAC,EAAE,YAAY,CAAC;QAEtB;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -6,6 +6,12 @@ const resource_1 = require("../../core/resource.js");
|
|
|
6
6
|
class ClientSecrets extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create a Realtime client secret with an associated session configuration.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const clientSecret =
|
|
13
|
+
* await client.realtime.clientSecrets.create();
|
|
14
|
+
* ```
|
|
9
15
|
*/
|
|
10
16
|
create(body, options) {
|
|
11
17
|
return this._client.post('/realtime/client_secrets', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-secrets.js","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAOlD,MAAa,aAAc,SAAQ,sBAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"client-secrets.js","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAOlD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAbD,sCAaC"}
|
|
@@ -3,6 +3,12 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
3
3
|
export class ClientSecrets extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Create a Realtime client secret with an associated session configuration.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const clientSecret =
|
|
10
|
+
* await client.realtime.clientSecrets.create();
|
|
11
|
+
* ```
|
|
6
12
|
*/
|
|
7
13
|
create(body, options) {
|
|
8
14
|
return this._client.post('/realtime/client_secrets', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-secrets.mjs","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"client-secrets.mjs","sourceRoot":"","sources":["../../src/resources/realtime/client-secrets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Calls, type CallAcceptParams, type CallReferParams, type CallRejectParams } from "./calls.mjs";
|
|
1
2
|
export { ClientSecrets, type RealtimeSessionClientSecret, type RealtimeSessionCreateResponse, type RealtimeTranscriptionSessionCreateResponse, type RealtimeTranscriptionSessionTurnDetection, type ClientSecretCreateResponse, type ClientSecretCreateParams, } from "./client-secrets.mjs";
|
|
2
3
|
export { Realtime } from "./realtime.mjs";
|
|
3
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,yCAAyC,EAC9C,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE;OAC7E,EACL,aAAa,EACb,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,yCAAyC,EAC9C,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Calls, type CallAcceptParams, type CallReferParams, type CallRejectParams } from "./calls.js";
|
|
1
2
|
export { ClientSecrets, type RealtimeSessionClientSecret, type RealtimeSessionCreateResponse, type RealtimeTranscriptionSessionCreateResponse, type RealtimeTranscriptionSessionTurnDetection, type ClientSecretCreateResponse, type ClientSecretCreateParams, } from "./client-secrets.js";
|
|
2
3
|
export { Realtime } from "./realtime.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,yCAAyC,EAC9C,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE;OAC7E,EACL,aAAa,EACb,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,yCAAyC,EAC9C,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Realtime = exports.ClientSecrets = void 0;
|
|
4
|
+
exports.Realtime = exports.ClientSecrets = exports.Calls = void 0;
|
|
5
|
+
var calls_1 = require("./calls.js");
|
|
6
|
+
Object.defineProperty(exports, "Calls", { enumerable: true, get: function () { return calls_1.Calls; } });
|
|
5
7
|
var client_secrets_1 = require("./client-secrets.js");
|
|
6
8
|
Object.defineProperty(exports, "ClientSecrets", { enumerable: true, get: function () { return client_secrets_1.ClientSecrets; } });
|
|
7
9
|
var realtime_1 = require("./realtime.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAQ0B;AAPxB,+GAAA,aAAa,OAAA;AAQf,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/realtime/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAAoG;AAA3F,8FAAA,KAAK,OAAA;AACd,sDAQ0B;AAPxB,+GAAA,aAAa,OAAA;AAQf,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|