-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsessions.go
More file actions
36 lines (31 loc) · 1.23 KB
/
Copy pathsessions.go
File metadata and controls
36 lines (31 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Code generated by internal/cmd/gen; DO NOT EDIT.
package flashduty
import "context"
// SessionsService handles the "AI SRE/Sessions" API resource.
type SessionsService service
// Get session detail.
//
// Fetch one session plus a backward-paged window of its most recent events. Use search_after_ctx to page through older history.
//
// API: POST /safari/session/get (session-read-info).
func (s *SessionsService) Info(ctx context.Context, req *SessionGetRequest) (*SessionGetResponse, *Response, error) {
out := new(SessionGetResponse)
resp, err := s.client.do(ctx, "/safari/session/get", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// List sessions.
//
// List agent sessions visible to the caller within the resolved account, filtered by app, entry surface, archive status, and team scope, with pagination. Reads are scoped to the person the app_key resolves to.
//
// API: POST /safari/session/list (session-read-list).
func (s *SessionsService) List(ctx context.Context, req *SessionListRequest) (*SessionListResponse, *Response, error) {
out := new(SessionListResponse)
resp, err := s.client.do(ctx, "/safari/session/list", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}