// Code generated by "gen"; DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package session

import (
	"context"

	"github.com/clerk/clerk-sdk-go/v2"
)

// Get retrieves details for a session.
func Get(ctx context.Context, id string) (*clerk.Session, error) {
	return getClient().Get(ctx, id)
}

// List returns a list of sessions.
func List(ctx context.Context, params *ListParams) (*clerk.SessionList, error) {
	return getClient().List(ctx, params)
}

// Revoke marks the session as revoked.
func Revoke(ctx context.Context, params *RevokeParams) (*clerk.Session, error) {
	return getClient().Revoke(ctx, params)
}

// Creates a session token for the specified session
// If a template is provided, return a token created with the specified template
func CreateToken(ctx context.Context, params *CreateTokenParams) (*clerk.SessionToken, error) {
	return getClient().CreateToken(ctx, params)
}

// Creates a session for the specified user
//
// This operation is intended only for use in testing, and is not available for production instances.
func Create(ctx context.Context, params *CreateParams) (*clerk.Session, error) {
	return getClient().Create(ctx, params)
}

// Verify verifies the session.
//
// Deprecated: The operation is deprecated and will be removed in future versions.
// It is recommended to switch to networkless verification using short-lived
// session tokens instead.
// See https://clerk.com/docs/backend-requests/resources/session-tokens
func Verify(ctx context.Context, params *VerifyParams) (*clerk.Session, error) {
	return getClient().Verify(ctx, params)
}

func getClient() *Client {
	return &Client{
		Backend: clerk.GetBackend(),
	}
}
