invitation

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkCreate added in v2.2.0

func BulkCreate(ctx context.Context, params *BulkCreateParams) (*clerk.Invitations, error)

BulkCreate creates multiple invitations.

func Create

func Create(ctx context.Context, params *CreateParams) (*clerk.Invitation, error)

Create adds a new identifier to the allowlist.

func List

func List(ctx context.Context, params *ListParams) (*clerk.InvitationList, error)

List returns all invitations.

func Revoke

func Revoke(ctx context.Context, id string) (*clerk.Invitation, error)

Revoke revokes a pending invitation.

Types

type BulkCreateParams added in v2.2.0

type BulkCreateParams struct {
	clerk.APIParams
	Invitations []*CreateParams
}

func (BulkCreateParams) MarshalJSON added in v2.2.0

func (b BulkCreateParams) MarshalJSON() ([]byte, error)

type Client

type Client struct {
	Backend clerk.Backend
}

Client is used to invoke the Invitations API.

func NewClient

func NewClient(config *clerk.ClientConfig) *Client

func (*Client) BulkCreate added in v2.2.0

func (c *Client) BulkCreate(ctx context.Context, params *BulkCreateParams) (*clerk.Invitations, error)

BulkCreate creates multiple invitations.

func (*Client) Create

func (c *Client) Create(ctx context.Context, params *CreateParams) (*clerk.Invitation, error)

Create adds a new identifier to the allowlist.

func (*Client) List

func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.InvitationList, error)

List returns all invitations.

func (*Client) Revoke

func (c *Client) Revoke(ctx context.Context, id string) (*clerk.Invitation, error)

Revoke revokes a pending invitation.

type CreateParams

type CreateParams struct {
	clerk.APIParams
	EmailAddress   string           `json:"email_address"`
	PublicMetadata *json.RawMessage `json:"public_metadata,omitempty"`
	RedirectURL    *string          `json:"redirect_url,omitempty"`
	Notify         *bool            `json:"notify,omitempty"`
	IgnoreExisting *bool            `json:"ignore_existing,omitempty"`
	ExpiresInDays  *int64           `json:"expires_in_days,omitempty"`
}

type ListParams

type ListParams struct {
	clerk.APIParams
	clerk.ListParams
	OrderBy  *string  `json:"order_by,omitempty"`
	Query    *string  `json:"query,omitempty"`
	Statuses []string `json:"status,omitempty"`
}

func (*ListParams) ToQuery added in v2.0.7

func (params *ListParams) ToQuery() url.Values

ToQuery returns query string values from the params.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL