Skip to content

Commit 6c6802c

Browse files
committed
chore: hookdeck api calls using latest version
1 parent 9e1d183 commit 6c6802c

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

pkg/hookdeck/auth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (c *Client) StartLogin(deviceName string) (*LoginSession, error) {
7575
return nil, err
7676
}
7777

78-
res, err := c.Post(context.Background(), "/cli-auth", jsonData, nil)
78+
res, err := c.Post(context.Background(), "/2025-07-01/cli-auth", jsonData, nil)
7979
if err != nil {
8080
return nil, err
8181
}
@@ -129,13 +129,13 @@ func (s *GuestSession) WaitForAPIKey(interval time.Duration, maxAttempts int) (*
129129

130130
// PollForAPIKeyWithKey polls for login completion using a CLI API key (for interactive login)
131131
func (c *Client) PollForAPIKeyWithKey(apiKey string, interval time.Duration, maxAttempts int) (*PollAPIKeyResponse, error) {
132-
pollURL := c.BaseURL.String() + "/cli-auth/poll?key=" + apiKey
132+
pollURL := c.BaseURL.String() + "/2025-07-01/cli-auth/poll?key=" + apiKey
133133
return pollForAPIKey(pollURL, interval, maxAttempts)
134134
}
135135

136136
// ValidateAPIKey validates an API key and returns user/project information
137137
func (c *Client) ValidateAPIKey() (*ValidateAPIKeyResponse, error) {
138-
res, err := c.Get(context.Background(), "/cli-auth/validate", "", nil)
138+
res, err := c.Get(context.Background(), "/2025-07-01/cli-auth/validate", "", nil)
139139
if err != nil {
140140
return nil, err
141141
}
@@ -244,7 +244,7 @@ func (c *Client) UpdateClient(clientID string, input UpdateClientInput) error {
244244
return err
245245
}
246246

247-
_, err = c.Put(context.Background(), "/cli/"+clientID, jsonData, nil)
247+
_, err = c.Put(context.Background(), "/2025-07-01/cli/"+clientID, jsonData, nil)
248248
return err
249249
}
250250

pkg/hookdeck/ci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (c *Client) CreateCIClient(input CreateCIClientInput) (CIClient, error) {
2929
if err != nil {
3030
return CIClient{}, err
3131
}
32-
res, err := c.Post(context.Background(), "/cli-auth/ci", input_bytes, nil)
32+
res, err := c.Post(context.Background(), "/2025-07-01/cli-auth/ci", input_bytes, nil)
3333
if err != nil {
3434
return CIClient{}, err
3535
}

pkg/hookdeck/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
// RetryEvent retries an event by ID
99
func (c *Client) RetryEvent(eventID string) error {
10-
retryURL := fmt.Sprintf("/events/%s/retry", eventID)
10+
retryURL := fmt.Sprintf("/2025-07-01/events/%s/retry", eventID)
1111
resp, err := c.Post(context.Background(), retryURL, []byte("{}"), nil)
1212
if err != nil {
1313
return err

pkg/hookdeck/guest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (c *Client) CreateGuestUser(input CreateGuestUserInput) (GuestUser, error)
2424
if err != nil {
2525
return GuestUser{}, err
2626
}
27-
res, err := c.Post(context.Background(), "/cli/guest", input_bytes, nil)
27+
res, err := c.Post(context.Background(), "/2025-07-01/cli/guest", input_bytes, nil)
2828
if err != nil {
2929
return GuestUser{}, err
3030
}

pkg/hookdeck/projects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Project struct {
1313
}
1414

1515
func (c *Client) ListProjects() ([]Project, error) {
16-
res, err := c.Get(context.Background(), "/teams", "", nil)
16+
res, err := c.Get(context.Background(), "/2025-07-01/teams", "", nil)
1717
if err != nil {
1818
return []Project{}, err
1919
}

pkg/hookdeck/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (c *Client) CreateSession(input CreateSessionInput) (Session, error) {
2929
if err != nil {
3030
return Session{}, err
3131
}
32-
res, err := c.Post(context.Background(), "/cli-sessions", input_bytes, nil)
32+
res, err := c.Post(context.Background(), "/2025-07-01/cli-sessions", input_bytes, nil)
3333
if err != nil {
3434
return Session{}, err
3535
}

0 commit comments

Comments
 (0)