Skip to content

Commit 6af49e0

Browse files
feat(api): manual updates
1 parent 156a718 commit 6af49e0

File tree

5 files changed

+66
-130
lines changed

5 files changed

+66
-130
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 953
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-468db8755f6720426973f4b8760203bd7fec40843c75627fe4c667ac7dfbedec.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-82c1afa45ee737b39ce508fd8383d93b9c05d307a1c975893523451b99515112.yml
33
openapi_spec_hash: 3077927f7391151deb5ef556be246b25
4-
config_hash: e7634559d6e4119c31101d73379495b4
4+
config_hash: 5360c8b0113ee08335377331f5fc5440

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,6 +3730,7 @@ Methods:
37303730

37313731
Response Types:
37323732

3733+
- <a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4">telnyx</a>.<a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4#BulkSimCardAction">BulkSimCardAction</a>
37333734
- <a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4">telnyx</a>.<a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4#SimCardAction">SimCardAction</a>
37343735
- <a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4">telnyx</a>.<a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4#SimCardActionGetResponse">SimCardActionGetResponse</a>
37353736
- <a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4">telnyx</a>.<a href="https://pkg.go.dev/github.com/team-telnyx/telnyx-go/v4#SimCardActionBulkDisableVoiceResponse">SimCardActionBulkDisableVoiceResponse</a>

simcardaction.go

Lines changed: 59 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,62 @@ func (r *SimCardActionService) ValidateRegistrationCodes(ctx context.Context, bo
218218
return res, err
219219
}
220220

221+
// This object represents a bulk SIM card action. It groups SIM card actions
222+
// created through a bulk endpoint under a single resource for further lookup.
223+
type BulkSimCardAction struct {
224+
// Identifies the resource.
225+
ID string `json:"id" format:"uuid"`
226+
// The action type. It can be one of the following: <br/>
227+
//
228+
// <ul>
229+
// <li><code>bulk_disable_voice</code> - disable voice for every SIM Card in a SIM Card Group.</li>
230+
// <li><code>bulk_enable_voice</code> - enable voice for every SIM Card in a SIM Card Group.</li>
231+
// <li><code>bulk_set_public_ips</code> - set a public IP for each specified SIM Card.</li>
232+
// </ul>
233+
//
234+
// Any of "bulk_disable_voice", "bulk_enable_voice", "bulk_set_public_ips".
235+
ActionType BulkSimCardActionActionType `json:"action_type"`
236+
// ISO 8601 formatted date-time indicating when the resource was created.
237+
CreatedAt string `json:"created_at"`
238+
RecordType string `json:"record_type"`
239+
// A JSON object representation of the bulk action payload.
240+
Settings map[string]any `json:"settings"`
241+
// ISO 8601 formatted date-time indicating when the resource was updated.
242+
UpdatedAt string `json:"updated_at"`
243+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
244+
JSON struct {
245+
ID respjson.Field
246+
ActionType respjson.Field
247+
CreatedAt respjson.Field
248+
RecordType respjson.Field
249+
Settings respjson.Field
250+
UpdatedAt respjson.Field
251+
ExtraFields map[string]respjson.Field
252+
raw string
253+
} `json:"-"`
254+
}
255+
256+
// Returns the unmodified JSON received from the API
257+
func (r BulkSimCardAction) RawJSON() string { return r.JSON.raw }
258+
func (r *BulkSimCardAction) UnmarshalJSON(data []byte) error {
259+
return apijson.UnmarshalRoot(data, r)
260+
}
261+
262+
// The action type. It can be one of the following: <br/>
263+
//
264+
// <ul>
265+
// <li><code>bulk_disable_voice</code> - disable voice for every SIM Card in a SIM Card Group.</li>
266+
// <li><code>bulk_enable_voice</code> - enable voice for every SIM Card in a SIM Card Group.</li>
267+
// <li><code>bulk_set_public_ips</code> - set a public IP for each specified SIM Card.</li>
268+
// </ul>
269+
type BulkSimCardActionActionType string
270+
271+
const (
272+
BulkSimCardActionActionTypeBulkDisableVoice BulkSimCardActionActionType = "bulk_disable_voice"
273+
BulkSimCardActionActionTypeBulkEnableVoice BulkSimCardActionActionType = "bulk_enable_voice"
274+
BulkSimCardActionActionTypeBulkSetPublicIPs BulkSimCardActionActionType = "bulk_set_public_ips"
275+
)
276+
221277
// This object represents a SIM card action. It allows tracking the current status
222278
// of an operation that impacts the SIM card.
223279
type SimCardAction struct {
@@ -330,7 +386,7 @@ func (r *SimCardActionGetResponse) UnmarshalJSON(data []byte) error {
330386
type SimCardActionBulkDisableVoiceResponse struct {
331387
// This object represents a bulk SIM card action. It groups SIM card actions
332388
// created through a bulk endpoint under a single resource for further lookup.
333-
Data SimCardActionBulkDisableVoiceResponseData `json:"data"`
389+
Data BulkSimCardAction `json:"data"`
334390
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
335391
JSON struct {
336392
Data respjson.Field
@@ -345,51 +401,10 @@ func (r *SimCardActionBulkDisableVoiceResponse) UnmarshalJSON(data []byte) error
345401
return apijson.UnmarshalRoot(data, r)
346402
}
347403

348-
// This object represents a bulk SIM card action. It groups SIM card actions
349-
// created through a bulk endpoint under a single resource for further lookup.
350-
type SimCardActionBulkDisableVoiceResponseData struct {
351-
// Identifies the resource.
352-
ID string `json:"id" format:"uuid"`
353-
// The action type. It can be one of the following: <br/>
354-
//
355-
// <ul>
356-
// <li><code>bulk_disable_voice</code> - disable voice for every SIM Card in a SIM Card Group.</li>
357-
// <li><code>bulk_enable_voice</code> - enable voice for every SIM Card in a SIM Card Group.</li>
358-
// <li><code>bulk_set_public_ips</code> - set a public IP for each specified SIM Card.</li>
359-
// </ul>
360-
//
361-
// Any of "bulk_disable_voice", "bulk_enable_voice", "bulk_set_public_ips".
362-
ActionType string `json:"action_type"`
363-
// ISO 8601 formatted date-time indicating when the resource was created.
364-
CreatedAt string `json:"created_at"`
365-
RecordType string `json:"record_type"`
366-
// A JSON object representation of the bulk action payload.
367-
Settings map[string]any `json:"settings"`
368-
// ISO 8601 formatted date-time indicating when the resource was updated.
369-
UpdatedAt string `json:"updated_at"`
370-
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
371-
JSON struct {
372-
ID respjson.Field
373-
ActionType respjson.Field
374-
CreatedAt respjson.Field
375-
RecordType respjson.Field
376-
Settings respjson.Field
377-
UpdatedAt respjson.Field
378-
ExtraFields map[string]respjson.Field
379-
raw string
380-
} `json:"-"`
381-
}
382-
383-
// Returns the unmodified JSON received from the API
384-
func (r SimCardActionBulkDisableVoiceResponseData) RawJSON() string { return r.JSON.raw }
385-
func (r *SimCardActionBulkDisableVoiceResponseData) UnmarshalJSON(data []byte) error {
386-
return apijson.UnmarshalRoot(data, r)
387-
}
388-
389404
type SimCardActionBulkEnableVoiceResponse struct {
390405
// This object represents a bulk SIM card action. It groups SIM card actions
391406
// created through a bulk endpoint under a single resource for further lookup.
392-
Data SimCardActionBulkEnableVoiceResponseData `json:"data"`
407+
Data BulkSimCardAction `json:"data"`
393408
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
394409
JSON struct {
395410
Data respjson.Field
@@ -404,51 +419,10 @@ func (r *SimCardActionBulkEnableVoiceResponse) UnmarshalJSON(data []byte) error
404419
return apijson.UnmarshalRoot(data, r)
405420
}
406421

407-
// This object represents a bulk SIM card action. It groups SIM card actions
408-
// created through a bulk endpoint under a single resource for further lookup.
409-
type SimCardActionBulkEnableVoiceResponseData struct {
410-
// Identifies the resource.
411-
ID string `json:"id" format:"uuid"`
412-
// The action type. It can be one of the following: <br/>
413-
//
414-
// <ul>
415-
// <li><code>bulk_disable_voice</code> - disable voice for every SIM Card in a SIM Card Group.</li>
416-
// <li><code>bulk_enable_voice</code> - enable voice for every SIM Card in a SIM Card Group.</li>
417-
// <li><code>bulk_set_public_ips</code> - set a public IP for each specified SIM Card.</li>
418-
// </ul>
419-
//
420-
// Any of "bulk_disable_voice", "bulk_enable_voice", "bulk_set_public_ips".
421-
ActionType string `json:"action_type"`
422-
// ISO 8601 formatted date-time indicating when the resource was created.
423-
CreatedAt string `json:"created_at"`
424-
RecordType string `json:"record_type"`
425-
// A JSON object representation of the bulk action payload.
426-
Settings map[string]any `json:"settings"`
427-
// ISO 8601 formatted date-time indicating when the resource was updated.
428-
UpdatedAt string `json:"updated_at"`
429-
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
430-
JSON struct {
431-
ID respjson.Field
432-
ActionType respjson.Field
433-
CreatedAt respjson.Field
434-
RecordType respjson.Field
435-
Settings respjson.Field
436-
UpdatedAt respjson.Field
437-
ExtraFields map[string]respjson.Field
438-
raw string
439-
} `json:"-"`
440-
}
441-
442-
// Returns the unmodified JSON received from the API
443-
func (r SimCardActionBulkEnableVoiceResponseData) RawJSON() string { return r.JSON.raw }
444-
func (r *SimCardActionBulkEnableVoiceResponseData) UnmarshalJSON(data []byte) error {
445-
return apijson.UnmarshalRoot(data, r)
446-
}
447-
448422
type SimCardActionBulkSetPublicIPsResponse struct {
449423
// This object represents a bulk SIM card action. It groups SIM card actions
450424
// created through a bulk endpoint under a single resource for further lookup.
451-
Data SimCardActionBulkSetPublicIPsResponseData `json:"data"`
425+
Data BulkSimCardAction `json:"data"`
452426
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
453427
JSON struct {
454428
Data respjson.Field
@@ -463,47 +437,6 @@ func (r *SimCardActionBulkSetPublicIPsResponse) UnmarshalJSON(data []byte) error
463437
return apijson.UnmarshalRoot(data, r)
464438
}
465439

466-
// This object represents a bulk SIM card action. It groups SIM card actions
467-
// created through a bulk endpoint under a single resource for further lookup.
468-
type SimCardActionBulkSetPublicIPsResponseData struct {
469-
// Identifies the resource.
470-
ID string `json:"id" format:"uuid"`
471-
// The action type. It can be one of the following: <br/>
472-
//
473-
// <ul>
474-
// <li><code>bulk_disable_voice</code> - disable voice for every SIM Card in a SIM Card Group.</li>
475-
// <li><code>bulk_enable_voice</code> - enable voice for every SIM Card in a SIM Card Group.</li>
476-
// <li><code>bulk_set_public_ips</code> - set a public IP for each specified SIM Card.</li>
477-
// </ul>
478-
//
479-
// Any of "bulk_disable_voice", "bulk_enable_voice", "bulk_set_public_ips".
480-
ActionType string `json:"action_type"`
481-
// ISO 8601 formatted date-time indicating when the resource was created.
482-
CreatedAt string `json:"created_at"`
483-
RecordType string `json:"record_type"`
484-
// A JSON object representation of the bulk action payload.
485-
Settings map[string]any `json:"settings"`
486-
// ISO 8601 formatted date-time indicating when the resource was updated.
487-
UpdatedAt string `json:"updated_at"`
488-
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
489-
JSON struct {
490-
ID respjson.Field
491-
ActionType respjson.Field
492-
CreatedAt respjson.Field
493-
RecordType respjson.Field
494-
Settings respjson.Field
495-
UpdatedAt respjson.Field
496-
ExtraFields map[string]respjson.Field
497-
raw string
498-
} `json:"-"`
499-
}
500-
501-
// Returns the unmodified JSON received from the API
502-
func (r SimCardActionBulkSetPublicIPsResponseData) RawJSON() string { return r.JSON.raw }
503-
func (r *SimCardActionBulkSetPublicIPsResponseData) UnmarshalJSON(data []byte) error {
504-
return apijson.UnmarshalRoot(data, r)
505-
}
506-
507440
type SimCardActionDisableResponse struct {
508441
// This object represents a SIM card action. It allows tracking the current status
509442
// of an operation that impacts the SIM card.

texttospeech.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ type TextToSpeechGenerateParams struct {
425425
// ElevenLabs provider-specific parameters.
426426
Elevenlabs TextToSpeechGenerateParamsElevenlabs `json:"elevenlabs,omitzero"`
427427
// Inworld provider-specific parameters.
428-
Inworld any `json:"inworld,omitzero"`
428+
Inworld map[string]any `json:"inworld,omitzero"`
429429
// Minimax provider-specific parameters.
430430
Minimax TextToSpeechGenerateParamsMinimax `json:"minimax,omitzero"`
431431
// Determines the response format. `binary_output` returns raw audio bytes,

texttospeech_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ func TestTextToSpeechGenerateWithOptionalParams(t *testing.T) {
5252
"foo": "bar",
5353
},
5454
},
55-
Inworld: map[string]any{},
55+
Inworld: map[string]any{
56+
"foo": "bar",
57+
},
5658
Language: telnyx.String("language"),
5759
Minimax: telnyx.TextToSpeechGenerateParamsMinimax{
5860
LanguageBoost: telnyx.String("language_boost"),

0 commit comments

Comments
 (0)