gmail

package
v0.0.0-...-e639e21 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ComposeTrigger_DraftAccess_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "NONE",
		2: "METADATA",
	}
	ComposeTrigger_DraftAccess_value = map[string]int32{
		"UNSPECIFIED": 0,
		"NONE":        1,
		"METADATA":    2,
	}
)

Enum value maps for ComposeTrigger_DraftAccess.

View Source
var File_google_apps_script_type_gmail_gmail_addon_manifest_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ComposeTrigger

type ComposeTrigger struct {

	// Defines the set of actions for compose time add-on. These are actions
	// that user can trigger on a compose time addon.
	Actions []*_type.MenuItemExtensionPoint `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"`
	// Define the level of data access when a compose time addon is triggered.
	DraftAccess ComposeTrigger_DraftAccess `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

A trigger that activates when user is composing an email.

func (*ComposeTrigger) Descriptor deprecated

func (*ComposeTrigger) Descriptor() ([]byte, []int)

Deprecated: Use ComposeTrigger.ProtoReflect.Descriptor instead.

func (*ComposeTrigger) GetActions

func (x *ComposeTrigger) GetActions() []*_type.MenuItemExtensionPoint

func (*ComposeTrigger) GetDraftAccess

func (x *ComposeTrigger) GetDraftAccess() ComposeTrigger_DraftAccess

func (*ComposeTrigger) ProtoMessage

func (*ComposeTrigger) ProtoMessage()

func (*ComposeTrigger) ProtoReflect

func (x *ComposeTrigger) ProtoReflect() protoreflect.Message

func (*ComposeTrigger) Reset

func (x *ComposeTrigger) Reset()

func (*ComposeTrigger) String

func (x *ComposeTrigger) String() string

type ComposeTrigger_DraftAccess

type ComposeTrigger_DraftAccess int32

An enum defining the level of data access this compose trigger requires.

const (
	// Default value when nothing is set for DraftAccess.
	ComposeTrigger_UNSPECIFIED ComposeTrigger_DraftAccess = 0
	// NONE means compose trigger won't be able to access any data of the draft
	// when a compose addon is triggered.
	ComposeTrigger_NONE ComposeTrigger_DraftAccess = 1
	// METADATA gives compose trigger the permission to access the metadata of
	// the draft when a compose addon is triggered. This includes the audience
	// list (To/cc list) of a draft message.
	ComposeTrigger_METADATA ComposeTrigger_DraftAccess = 2
)

func (ComposeTrigger_DraftAccess) Descriptor

func (ComposeTrigger_DraftAccess) Enum

func (ComposeTrigger_DraftAccess) EnumDescriptor deprecated

func (ComposeTrigger_DraftAccess) EnumDescriptor() ([]byte, []int)

Deprecated: Use ComposeTrigger_DraftAccess.Descriptor instead.

func (ComposeTrigger_DraftAccess) Number

func (ComposeTrigger_DraftAccess) String

func (ComposeTrigger_DraftAccess) Type

type ContextualTrigger

type ContextualTrigger struct {

	// The type of trigger determines the conditions Gmail uses to show the
	// add-on.
	//
	// Types that are assignable to Trigger:
	//
	//	*ContextualTrigger_Unconditional
	Trigger isContextualTrigger_Trigger `protobuf_oneof:"trigger"`
	// Required. The name of the endpoint to call when a message matches the
	// trigger.
	OnTriggerFunction string `protobuf:"bytes,4,opt,name=on_trigger_function,json=onTriggerFunction,proto3" json:"on_trigger_function,omitempty"`
	// contains filtered or unexported fields
}

Defines a trigger that fires when the open email meets a specific criteria. When the trigger fires, it executes a specific endpoint, usually in order to create new cards and update the UI.

func (*ContextualTrigger) Descriptor deprecated

func (*ContextualTrigger) Descriptor() ([]byte, []int)

Deprecated: Use ContextualTrigger.ProtoReflect.Descriptor instead.

func (*ContextualTrigger) GetOnTriggerFunction

func (x *ContextualTrigger) GetOnTriggerFunction() string

func (*ContextualTrigger) GetTrigger

func (m *ContextualTrigger) GetTrigger() isContextualTrigger_Trigger

func (*ContextualTrigger) GetUnconditional

func (x *ContextualTrigger) GetUnconditional() *UnconditionalTrigger

func (*ContextualTrigger) ProtoMessage

func (*ContextualTrigger) ProtoMessage()

func (*ContextualTrigger) ProtoReflect

func (x *ContextualTrigger) ProtoReflect() protoreflect.Message

func (*ContextualTrigger) Reset

func (x *ContextualTrigger) Reset()

func (*ContextualTrigger) String

func (x *ContextualTrigger) String() string

type ContextualTrigger_Unconditional

type ContextualTrigger_Unconditional struct {
	// UnconditionalTriggers are executed when any mail message is opened.
	Unconditional *UnconditionalTrigger `protobuf:"bytes,1,opt,name=unconditional,proto3,oneof"`
}

type GmailAddOnManifest

type GmailAddOnManifest struct {

	// Defines an endpoint that will be executed in contexts that don't
	// match a declared contextual trigger. Any cards generated by this function
	// will always be available to the user, but may be eclipsed by contextual
	// content when this add-on declares more targeted triggers.
	//
	// If present, this overrides the configuration from
	// `addOns.common.homepageTrigger`.
	HomepageTrigger *_type.HomepageExtensionPoint `protobuf:"bytes,14,opt,name=homepage_trigger,json=homepageTrigger,proto3" json:"homepage_trigger,omitempty"`
	// Defines the set of conditions that trigger the add-on.
	ContextualTriggers []*ContextualTrigger `protobuf:"bytes,3,rep,name=contextual_triggers,json=contextualTriggers,proto3" json:"contextual_triggers,omitempty"`
	// Defines set of [universal
	// actions](/gmail/add-ons/how-tos/universal-actions) for the add-on. The user
	// triggers universal actions from the add-on toolbar menu.
	UniversalActions []*UniversalAction `protobuf:"bytes,4,rep,name=universal_actions,json=universalActions,proto3" json:"universal_actions,omitempty"`
	// Defines the compose time trigger for a compose time add-on. This is the
	// trigger that causes an add-on to take action when the user is composing an
	// email.
	// All compose time addons are required to have the
	// gmail.addons.current.action.compose scope even though it might not edit the
	// draft.
	ComposeTrigger *ComposeTrigger `protobuf:"bytes,12,opt,name=compose_trigger,json=composeTrigger,proto3" json:"compose_trigger,omitempty"`
	// The name of an endpoint that verifies that the add-on has
	// all the required third-party authorizations, by probing the third-party
	// APIs. If the probe fails, the function should throw an exception to
	// initiate the authorization flow. This function is called before each
	// invocation of the add-on, in order to ensure a smooth user experience.
	AuthorizationCheckFunction string `` /* 141-byte string literal not displayed */
	// contains filtered or unexported fields
}

Properties customizing the appearance and execution of a Gmail add-on.

func (*GmailAddOnManifest) Descriptor deprecated

func (*GmailAddOnManifest) Descriptor() ([]byte, []int)

Deprecated: Use GmailAddOnManifest.ProtoReflect.Descriptor instead.

func (*GmailAddOnManifest) GetAuthorizationCheckFunction

func (x *GmailAddOnManifest) GetAuthorizationCheckFunction() string

func (*GmailAddOnManifest) GetComposeTrigger

func (x *GmailAddOnManifest) GetComposeTrigger() *ComposeTrigger

func (*GmailAddOnManifest) GetContextualTriggers

func (x *GmailAddOnManifest) GetContextualTriggers() []*ContextualTrigger

func (*GmailAddOnManifest) GetHomepageTrigger

func (x *GmailAddOnManifest) GetHomepageTrigger() *_type.HomepageExtensionPoint

func (*GmailAddOnManifest) GetUniversalActions

func (x *GmailAddOnManifest) GetUniversalActions() []*UniversalAction

func (*GmailAddOnManifest) ProtoMessage

func (*GmailAddOnManifest) ProtoMessage()

func (*GmailAddOnManifest) ProtoReflect

func (x *GmailAddOnManifest) ProtoReflect() protoreflect.Message

func (*GmailAddOnManifest) Reset

func (x *GmailAddOnManifest) Reset()

func (*GmailAddOnManifest) String

func (x *GmailAddOnManifest) String() string

type UnconditionalTrigger

type UnconditionalTrigger struct {
	// contains filtered or unexported fields
}

A trigger that fires when any email message is opened.

func (*UnconditionalTrigger) Descriptor deprecated

func (*UnconditionalTrigger) Descriptor() ([]byte, []int)

Deprecated: Use UnconditionalTrigger.ProtoReflect.Descriptor instead.

func (*UnconditionalTrigger) ProtoMessage

func (*UnconditionalTrigger) ProtoMessage()

func (*UnconditionalTrigger) ProtoReflect

func (x *UnconditionalTrigger) ProtoReflect() protoreflect.Message

func (*UnconditionalTrigger) Reset

func (x *UnconditionalTrigger) Reset()

func (*UnconditionalTrigger) String

func (x *UnconditionalTrigger) String() string

type UniversalAction

type UniversalAction struct {

	// Required. User-visible text describing the action, for example, "Add a new
	// contact."
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// The type of the action determines the behavior of Gmail when the user
	// invokes the action.
	//
	// Types that are assignable to ActionType:
	//
	//	*UniversalAction_OpenLink
	//	*UniversalAction_RunFunction
	ActionType isUniversalAction_ActionType `protobuf_oneof:"action_type"`
	// contains filtered or unexported fields
}

An action that is always available in the add-on toolbar menu regardless of message context.

func (*UniversalAction) Descriptor deprecated

func (*UniversalAction) Descriptor() ([]byte, []int)

Deprecated: Use UniversalAction.ProtoReflect.Descriptor instead.

func (*UniversalAction) GetActionType

func (m *UniversalAction) GetActionType() isUniversalAction_ActionType
func (x *UniversalAction) GetOpenLink() string

func (*UniversalAction) GetRunFunction

func (x *UniversalAction) GetRunFunction() string

func (*UniversalAction) GetText

func (x *UniversalAction) GetText() string

func (*UniversalAction) ProtoMessage

func (*UniversalAction) ProtoMessage()

func (*UniversalAction) ProtoReflect

func (x *UniversalAction) ProtoReflect() protoreflect.Message

func (*UniversalAction) Reset

func (x *UniversalAction) Reset()

func (*UniversalAction) String

func (x *UniversalAction) String() string
type UniversalAction_OpenLink struct {
	// A link that is opened by Gmail when the user triggers the action.
	OpenLink string `protobuf:"bytes,2,opt,name=open_link,json=openLink,proto3,oneof"`
}

type UniversalAction_RunFunction

type UniversalAction_RunFunction struct {
	// An endpoint that is called when the user triggers the
	// action. See the [universal actions
	// guide](/gmail/add-ons/how-tos/universal-actions) for details.
	RunFunction string `protobuf:"bytes,3,opt,name=run_function,json=runFunction,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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