client

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedGroup added in v0.6.0

type AllowedGroup struct {
	GroupId      string   `json:"groupId" tfsdk:"group_id"`
	Roles        []string `json:"roles" tfsdk:"roles"`
	DefaultRoles []string `json:"default_roles" tfsdk:"default_roles"`
}

type App

type App struct {
	ID                               string  `json:"id,omitempty"`
	AcceptRolesInTheRegistration     bool    `json:"accept_roles_in_the_registration"`
	ClientId                         string  `json:"client_id,omitempty"`
	ClientSecret                     string  `json:"client_secret,omitempty"`
	ClientName                       string  `json:"client_name"`
	ClientDisplayName                string  `json:"client_display_name"`
	IsRememberMeSelected             bool    `json:"is_remember_me_selected"`
	ClientType                       string  `json:"client_type"`
	AllowDisposableEmail             bool    `json:"allow_disposable_email"`
	FdsEnabled                       bool    `json:"fds_enabled"`
	EnablePasswordlessAuth           bool    `json:"enable_passwordless_auth"`
	EnableDeduplication              bool    `json:"enable_deduplication"`
	MobileNumberVerificationRequired bool    `json:"mobile_number_verification_required"`
	HostedPageGroup                  string  `json:"hosted_page_group"`
	PrimaryColor                     string  `json:"primaryColor"`
	AccentColor                      string  `json:"accentColor"`
	AutoLoginAfterRegister           bool    `json:"auto_login_after_register"`
	CompanyName                      string  `json:"company_name"`
	CompanyAddress                   string  `json:"company_address"`
	CompanyWebsite                   string  `json:"company_website"`
	TemplateGroupId                  *string `json:"template_group_id"`
	TokenLifetimeInSeconds           int64   `json:"token_lifetime_in_seconds"`
	IdTokenLifetimeInSeconds         int64   `json:"id_token_lifetime_in_seconds"`
	RefreshTokenLifetimeInSeconds    int64   `json:"refresh_token_lifetime_in_seconds"`
	EmailVerificationRequired        bool    `json:"email_verification_required"`
	EnableBotDetection               bool    `json:"enable_bot_detection"`
	IsLoginSuccessPageEnabled        bool    `json:"is_login_success_page_enabled"`
	AllowGuestLogin                  bool    `json:"allow_guest_login"`
	JweEnabled                       bool    `json:"jwe_enabled"`
	AlwaysAskMfa                     bool    `json:"always_ask_mfa"`
	PasswordPolicy                   *string `json:"password_policy_ref,omitempty"`
	RegisterWithLoginInformation     bool    `json:"register_with_login_information"`
	AppOwner                         string  `json:"app_owner,omitempty"`
	BotProvider                      string  `json:"bot_provider,omitempty"`

	AppKey *AppKey `json:"appKey,omitempty"`

	AllowLoginWith               []string         `json:"allow_login_with"`
	OperationsAllowedGroups      []AllowedGroup   `json:"operations_allowed_groups"`
	AllowedGroups                []AllowedGroup   `json:"allowed_groups"`
	RedirectUris                 []string         `json:"redirect_uris"`
	AllowedLogoutUrls            []string         `json:"allowed_logout_urls"`
	AllowedScopes                []string         `json:"allowed_scopes"`
	SocialProviders              []SocialProvider `json:"social_providers"`
	AdditionalAccessTokenPayload []string         `json:"additional_access_token_payload"`
	AllowedFields                []string         `json:"allowed_fields"`
	RequiredFields               []string         `json:"required_fields"`
	ConsentRefs                  []string         `json:"consent_refs"`
	ResponseTypes                []string         `json:"response_types"`
	GrantTypes                   []string         `json:"grant_types"`
	AllowedWebOrigins            []string         `json:"allowed_web_origins"`
	AllowedOrigins               []string         `json:"allowed_origins"`
	AllowedMfa                   []string         `json:"allowed_mfa"`
	AllowedRoles                 []string         `json:"allowed_roles"`
}

type AppKey

type AppKey struct {
	ID         string `json:"id"`
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
}

type Client

type Client interface {
	GetHooks() ([]*Hook, error)
	GetHook(ID string) (*Hook, error)
	UpsertHook(hook Hook) (*Hook, error)
	DeleteHook(ID string) error

	GetSocialProvider(providerName string, name string) (*SocialProvider, error)

	GetConsentInstance(name string) (*ConsentInstance, error)

	UpdatePasswordPolicy(policy PasswordPolicy) (*PasswordPolicy, error)
	GetPasswordPolicy(id string) (*PasswordPolicy, error)
	GetPasswordPolicyByName(name string) (*PasswordPolicy, error)
	DeletePasswordPolicy(id string) error

	GetTenantInfo() (*TenantInfo, error)

	UpsertHostedPagesGroup(group HostedPageGroup) (*HostedPageGroup, error)
	DeleteHostedPagesGroup(id string) error
	GetHostedPagesGroup(id string) (*HostedPageGroup, error)

	CreateApp(app *App) (*App, error)
	GetApp(ClientId string) (*App, error)
	UpdateApp(app App) (*App, error)
	DeleteApp(ID string) error

	GetRegistrationField(key string) (*RegistrationField, error)
	UpsertRegistrationField(field *RegistrationField) error
	DeleteRegistrationField(key string) error

	CreateTemplateGroup(group string) (*TemplateGroup, error)
	GetTemplateGroup(groupId string) (*TemplateGroup, error)
	UpdateTemplateGroup(group *TemplateGroup) error
	DeleteTemplateGroup(groupId string) error

	UpdateTemplate(template Template) (*Template, error)
	GetTemplate(template Template) (*Template, error)
}

func NewClient

func NewClient(host *string, clientId *string, clientSecret *string) (Client, error)

type ConsentInstance

type ConsentInstance struct {
	ID          string `json:"id"`
	ConsentName string `json:"consent_name"`
}

type ConsentLabel added in v0.4.1

type ConsentLabel struct {
	Label     string `json:"label"`
	LabelText string `json:"label_text"`
}

type EmailSenderConfig added in v0.6.0

type EmailSenderConfig struct {
	Id        string   `json:"id,omitempty" tfsdk:"id"`
	FromName  string   `json:"from_name" tfsdk:"from_name"`
	FromEmail string   `json:"from_email" tfsdk:"from_email"`
	Provider  []string `json:"sender_names" tfsdk:"provider"`
}

type FieldDefinition added in v0.4.1

type FieldDefinition struct {
	Language string `json:"language"`
	Locale   string `json:"locale"`
}

type Hook

type Hook struct {
	Id            string            `json:"_id,omitempty"`
	AuthType      string            `json:"auth_type,omitempty"`
	Events        []string          `json:"events"`
	URL           string            `json:"url"`
	CreatedTime   string            `json:"createdTime,omitempty"`
	UpdatedTime   string            `json:"updatedTime,omitempty"`
	ApiKeyDetails HookApiKeyDetails `json:"apikeyDetails,omitempty"`
}

type HookApiKeyDetails

type HookApiKeyDetails struct {
	APIKeyPlacement   string `json:"apikey_placement,omitempty"`
	APIKey            string `json:"apikey,omitempty"`
	APIKeyPlaceholder string `json:"apikey_placeholder,omitempty"`
}

type HostedPage added in v0.7.0

type HostedPage struct {
	ID      string `json:"hosted_page_id" tfsdk:"id"`
	Content string `json:"content" tfsdk:"content"`
	Locale  string `json:"locale" tfsdk:"locale"`
	Url     string `json:"url" tfsdk:"url"`
}

type HostedPageGroup

type HostedPageGroup struct {
	ID            string       `json:"_id"`
	CreatedTime   string       `json:"createdTime,omitempty"`
	UpdatedTime   string       `json:"updatedTime,omitempty"`
	DefaultLocale string       `json:"default_locale"`
	GroupOwner    string       `json:"groupOwner"`
	HostedPages   []HostedPage `json:"hosted_pages"`
}

type IVRSenderConfig added in v0.6.0

type IVRSenderConfig struct {
	Id       string   `json:"id,omitempty" tfsdk:"id"`
	Provider []string `json:"sender_names" tfsdk:"provider"`
}

type LocaleText added in v0.4.1

type LocaleText struct {
	Locale       string       `json:"locale"`
	Language     string       `json:"language"`
	ConsentLabel ConsentLabel `json:"consentLabel"`
}

type PasswordPolicy

type PasswordPolicy struct {
	ID                string `json:"id"`
	PolicyName        string `json:"policy_name"`
	MinimumLength     int64  `json:"minimumLength"`
	NoOfDigits        int64  `json:"noOfDigits"`
	LowerAndUpperCase bool   `json:"lowerAndUpperCase"`
	NoOfSpecialChars  int64  `json:"noOfSpecialChars"`
}

type PushSenderConfig added in v0.6.0

type PushSenderConfig struct {
	Id       string   `json:"id,omitempty" tfsdk:"id"`
	Provider []string `json:"sender_names" tfsdk:"provider"`
}

type RegistrationField added in v0.4.1

type RegistrationField struct {
	Internal        bool            `json:"internal"`
	ReadOnly        bool            `json:"readOnly"`
	Claimable       bool            `json:"claimable"`
	Required        bool            `json:"required"`
	Scopes          []string        `json:"scopes"`
	Enabled         bool            `json:"enabled"`
	LocaleText      LocaleText      `json:"localeText"`
	IsGroup         bool            `json:"is_group"`
	IsList          bool            `json:"is_list"`
	ParentGroupID   string          `json:"parent_group_id"`
	FieldType       string          `json:"fieldType"`
	ConsentRefs     []string        `json:"consent_refs"`
	ID              *string         `json:"_id,omitempty"`
	FieldKey        string          `json:"fieldKey"`
	DataType        string          `json:"dataType"`
	Order           int64           `json:"order"`
	FieldDefinition FieldDefinition `json:"fieldDefinition"`
	BaseDataType    string          `json:"baseDataType"`
}

type SmsSenderConfig added in v0.6.0

type SmsSenderConfig struct {
	Id       string   `json:"id,omitempty" tfsdk:"id"`
	FromName string   `json:"from_name" tfsdk:"from_name"`
	Provider []string `json:"sender_names" tfsdk:"provider"`
}

type SocialProvider

type SocialProvider struct {
	Id           string `json:"id,omitempty"`
	SocialId     string `json:"social_id"`
	Name         string `json:"name"`
	ProviderName string `json:"provider_name"`
	ProviderType string `json:"provider_type,omitempty"`
}

type Template added in v0.5.0

type Template struct {
	ID             *string `json:"id,omitempty"`
	LastSeededBy   *string `json:"last_seeded_by,omitempty"`
	GroupId        string  `json:"group_id"`
	TemplateKey    string  `json:"templateKey"`
	TemplateType   string  `json:"templateType"`
	ProcessingType string  `json:"processingType"`
	Locale         string  `json:"locale"`
	Language       string  `json:"Language"`
	UsageType      string  `json:"usageType"`
	Subject        string  `json:"subject"`
	Content        string  `json:"content"`
}

type TemplateGroup added in v0.5.0

type TemplateGroup struct {
	Id                string            `json:"id,omitempty"`
	GroupId           string            `json:"group_id"`
	EmailSenderConfig EmailSenderConfig `json:"email_sender_config"`
	SmsSenderConfig   SmsSenderConfig   `json:"sms_sender_config"`
	IVRSenderConfig   IVRSenderConfig   `json:"ivr_sender_config"`
	PushSenderConfig  PushSenderConfig  `json:"push_sender_config"`
}

type TenantInfo

type TenantInfo struct {
	CustomFieldFlatten bool   `json:"Custom_field_flatten"`
	TenantKey          string `json:"tenant_key"`
	TenantName         string `json:"tenant_name"`
	VersionInfo        string `json:"versionInfo"`
}

Jump to

Keyboard shortcuts

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