Skip to content

Commit bb961d3

Browse files
committed
go: Adjust to changes of the lower-level generated code
1 parent fc3e691 commit bb961d3

File tree

4 files changed

+14
-44
lines changed

4 files changed

+14
-44
lines changed

go/background_task.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (backgroundTask *BackgroundTask) List(
2929
ctx context.Context,
3030
options *BackgroundTaskListOptions,
3131
) (*ListResponseBackgroundTaskOut, error) {
32-
req := backgroundTask.api.BackgroundTasksAPI.ListBackgroundTasks(
32+
req := backgroundTask.api.BackgroundTasksAPI.V1BackgroundTaskList(
3333
ctx,
3434
)
3535

@@ -64,7 +64,7 @@ func (backgroundTask *BackgroundTask) Get(
6464
ctx context.Context,
6565
taskId string,
6666
) (*BackgroundTaskOut, error) {
67-
req := backgroundTask.api.BackgroundTasksAPI.GetBackgroundTask(
67+
req := backgroundTask.api.BackgroundTasksAPI.V1BackgroundTaskGet(
6868
ctx,
6969
taskId,
7070
)

go/message_attempt.go

+2-33
Original file line numberDiff line numberDiff line change
@@ -304,39 +304,8 @@ func (messageAttempt *MessageAttempt) ListAttemptsForEndpoint(
304304
endpointId string,
305305
options *MessageAttemptListOptions,
306306
) (*ListResponseMessageAttemptEndpointOut, error) {
307-
req := messageAttempt.api.MessageAttemptAPI.V1MessageAttemptListByEndpointDeprecated(ctx, appId, msgId, endpointId)
308-
if options != nil {
309-
if options.Iterator != nil {
310-
req = req.Iterator(*options.Iterator)
311-
}
312-
if options.Limit != nil {
313-
req = req.Limit(*options.Limit)
314-
}
315-
if options.Status != nil {
316-
req = req.Status(openapi.MessageStatus(*options.Status))
317-
}
318-
if options.EventTypes != nil {
319-
req = req.EventTypes(*options.EventTypes)
320-
}
321-
if options.Before != nil {
322-
req = req.Before(*options.Before)
323-
}
324-
if options.After != nil {
325-
req = req.After(*options.After)
326-
}
327-
if options.Channel != nil {
328-
req = req.Channel(*options.Channel)
329-
}
330-
if options.Tag != nil {
331-
req = req.Tag(*options.Tag)
332-
}
333-
}
334-
ret, res, err := req.Execute()
335-
if err != nil {
336-
return nil, wrapError(err, res)
337-
}
338-
339-
return ret, nil
307+
options.EndpointId = &endpointId
308+
return messageAttempt.ListByMsg(ctx, appId, msgId, options)
340309
}
341310

342311
// Resend a message to the specified endpoint.

go/operational_webhook_endpoint.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) List(
2525
ctx context.Context,
2626
options *OperationalWebhookEndpointListOptions,
2727
) (*ListResponseOperationalWebhookEndpointOut, error) {
28-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.ListOperationalWebhookEndpoints(
28+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointList(
2929
ctx,
3030
)
3131

@@ -67,7 +67,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) CreateWithOptions(
6767
operationalWebhookEndpointIn *OperationalWebhookEndpointIn,
6868
options *PostOptions,
6969
) (*OperationalWebhookEndpointOut, error) {
70-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.CreateOperationalWebhookEndpoint(
70+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointCreate(
7171
ctx,
7272
).OperationalWebhookEndpointIn(*operationalWebhookEndpointIn)
7373

@@ -90,7 +90,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) Get(
9090
ctx context.Context,
9191
endpointId string,
9292
) (*OperationalWebhookEndpointOut, error) {
93-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.GetOperationalWebhookEndpoint(
93+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointGet(
9494
ctx,
9595
endpointId,
9696
)
@@ -109,7 +109,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) Update(
109109
endpointId string,
110110
operationalWebhookEndpointUpdate *OperationalWebhookEndpointUpdate,
111111
) (*OperationalWebhookEndpointOut, error) {
112-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.UpdateOperationalWebhookEndpoint(
112+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointUpdate(
113113
ctx,
114114
endpointId,
115115
).OperationalWebhookEndpointUpdate(*operationalWebhookEndpointUpdate)
@@ -127,7 +127,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) Delete(
127127
ctx context.Context,
128128
endpointId string,
129129
) error {
130-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.DeleteOperationalWebhookEndpoint(
130+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointDelete(
131131
ctx,
132132
endpointId,
133133
)
@@ -144,7 +144,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) GetSecret(
144144
ctx context.Context,
145145
endpointId string,
146146
) (*OperationalWebhookEndpointSecretOut, error) {
147-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.GetOperationalWebhookEndpointSecret(
147+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointGetSecret(
148148
ctx,
149149
endpointId,
150150
)
@@ -180,7 +180,7 @@ func (operationalWebhookEndpoint *OperationalWebhookEndpoint) RotateSecretWithOp
180180
operationalWebhookEndpointSecretIn *OperationalWebhookEndpointSecretIn,
181181
options *PostOptions,
182182
) error {
183-
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.RotateOperationalWebhookEndpointSecret(
183+
req := operationalWebhookEndpoint.api.WebhookEndpointAPI.V1OperationalWebhookEndpointRotateSecret(
184184
ctx,
185185
endpointId,
186186
)

go/svix.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ type (
7474
ListResponseEndpointOut = openapi.ListResponseEndpointOut
7575
ListResponseEventTypeOut = openapi.ListResponseEventTypeOut
7676
ListResponseIntegrationOut = openapi.ListResponseIntegrationOut
77-
ListResponseMessageAttemptEndpointOut = openapi.ListResponseMessageAttemptEndpointOut
7877
ListResponseMessageAttemptOut = openapi.ListResponseMessageAttemptOut
7978
ListResponseMessageEndpointOut = openapi.ListResponseMessageEndpointOut
8079
ListResponseMessageOut = openapi.ListResponseMessageOut
@@ -97,8 +96,10 @@ type (
9796
ReplayOut = openapi.ReplayOut
9897
StatusCodeClass = openapi.StatusCodeClass
9998

100-
// Deprecated: Use EndpointGetStatsOptions directly
99+
// Deprecated: Use EndpointGetStatsOptions
101100
EndpointStatsOptions = EndpointGetStatsOptions
101+
// Deprecated: Use ListResponseMessageAttemptOut
102+
ListResponseMessageAttemptEndpointOut = openapi.ListResponseMessageAttemptOut
102103
)
103104

104105
var defaultHTTPClient = &http.Client{

0 commit comments

Comments
 (0)