Skip to main content

@swamp/gcp/gmail

v2026.04.23.1

Google Cloud gmail infrastructure models

Repository

https://github.com/systeminit/swamp-extensions

Labels

gcpgoogle-cloudgmailcloudinfrastructure

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/gcp/gmail

@swamp/gcp/gmail/users-draftsv2026.04.23.1users_drafts.ts

Global Arguments

ArgumentTypeDescription
id?stringThe immutable ID of the draft.
message?objectAn email message.
userIdstringThe user's email address. The special value `me` can be used to indicate the authenticated user.
createCreate a drafts
getGet a drafts
ArgumentTypeDescription
identifierstringThe id of the drafts
updateUpdate drafts attributes
deleteDelete the drafts
ArgumentTypeDescription
identifierstringThe id of the drafts
syncSync drafts state from GCP
sendsend
ArgumentTypeDescription
id?any
message?any

Resources

state(infinite)— A draft email in the user's mailbox.
@swamp/gcp/gmail/users-historyv2026.04.23.1users_history.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a history
ArgumentTypeDescription
identifierstringThe name of the history
syncSync history state from GCP

Resources

state(infinite)— A record of a change to the user's mailbox. Each history change may affect mu...
@swamp/gcp/gmail/users-labelsv2026.04.23.1users_labels.ts

Global Arguments

ArgumentTypeDescription
color?object
id?stringThe immutable ID of the label.
labelListVisibilityenumThe visibility of the label in the label list in the Gmail web interface.
messageListVisibilityenumThe visibility of messages with this label in the message list in the Gmail web interface.
messagesTotal?numberThe total number of messages with the label.
messagesUnread?numberThe number of unread messages with the label.
namestringThe display name of the label.
threadsTotal?numberThe total number of threads with the label.
threadsUnread?numberThe number of unread threads with the label.
type?enumThe owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the `INBOX` and `UNREAD` labels from messages and threads, but cannot apply or remove the `D
userIdstringThe user's email address. The special value `me` can be used to indicate the authenticated user.
createCreate a labels
getGet a labels
ArgumentTypeDescription
identifierstringThe id of the labels
updateUpdate labels attributes
deleteDelete the labels
ArgumentTypeDescription
identifierstringThe id of the labels
syncSync labels state from GCP

Resources

state(infinite)— Labels are used to categorize messages and threads within the user's mailbox....
@swamp/gcp/gmail/users-messagesv2026.04.23.1users_messages.ts

Global Arguments

ArgumentTypeDescription
classificationLabelValues?arrayClassification Label values on the message. Available Classification Label schemas can be queried using the Google Drive Labels API. Each classification label ID must be unique. If duplicate IDs are provided, only one will be retained, and the selection is arbitrary. Only used for Google Workspace accounts.
historyId?stringThe ID of the last history record that modified this message.
id?stringThe immutable ID of the message.
internalDate?stringThe internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
labelIds?arrayList of IDs of labels applied to this message.
payload?objectA single MIME message part.
rawstringThe entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
sizeEstimate?numberEstimated size in bytes of the message.
snippet?stringA short part of the message text.
threadId?stringThe ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
userIdstringThe user's email address. The special value `me` can be used to indicate the authenticated user.
deleted?stringMark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.
internalDateSource?stringSource for Gmail's internal date of the message.
createCreate a messages
getGet a messages
ArgumentTypeDescription
identifierstringThe id of the messages
deleteDelete the messages
ArgumentTypeDescription
identifierstringThe id of the messages
syncSync messages state from GCP
batch_deletebatch delete
ArgumentTypeDescription
ids?any
batch_modifybatch modify
ArgumentTypeDescription
addLabelIds?any
ids?any
removeLabelIds?any
importimport
ArgumentTypeDescription
classificationLabelValues?any
historyId?any
id?any
internalDate?any
labelIds?any
payload?any
raw?any
sizeEstimate?any
snippet?any
threadId?any
modifymodify
ArgumentTypeDescription
addLabelIds?any
ids?any
removeLabelIds?any
sendsend
ArgumentTypeDescription
classificationLabelValues?any
historyId?any
id?any
internalDate?any
labelIds?any
payload?any
raw?any
sizeEstimate?any
snippet?any
threadId?any
trashtrash
untrashuntrash

Resources

state(infinite)— An email message.
@swamp/gcp/gmail/users-messages-attachmentsv2026.04.23.1users_messages_attachments.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a attachments
ArgumentTypeDescription
identifierstringThe id of the attachments
syncSync attachments state from GCP

Resources

state(infinite)— The body of a single MIME message part.
@swamp/gcp/gmail/users-settings-cse-identitiesv2026.04.23.1users_settings_cse_identities.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
emailAddress?stringThe email address for the sending identity. The email address must be the primary email address of the authenticated user.
primaryKeyPairId?stringIf a key pair is associated, the ID of the key pair, CseKeyPair.
signAndEncryptKeyPairs?objectThe configuration of a CSE identity that uses different key pairs for signing and encryption.
userIdstringThe requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
createCreate a identities
getGet a identities
ArgumentTypeDescription
identifierstringThe name of the identities
updateUpdate identities attributes
deleteDelete the identities
ArgumentTypeDescription
identifierstringThe name of the identities
syncSync identities state from GCP

Resources

state(infinite)— The client-side encryption (CSE) configuration for the email address of an au...
@swamp/gcp/gmail/users-settings-cse-keypairsv2026.04.23.1users_settings_cse_keypairs.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
pkcs7?stringInput only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.
privateKeyMetadata?arrayMetadata for instances of this key pair's private key.
userIdstringThe requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
createCreate a keypairs
getGet a keypairs
ArgumentTypeDescription
identifierstringThe name of the keypairs
syncSync keypairs state from GCP
disabledisable
enableenable
obliterateobliterate

Resources

state(infinite)— A client-side encryption S/MIME key pair, which is comprised of a public key,...
@swamp/gcp/gmail/users-settings-delegatesv2026.04.23.1users_settings_delegates.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
delegateEmail?stringThe email address of the delegate.
verificationStatus?enumIndicates whether this address has been verified and can act as a delegate for the account. Read-only.
userIdstringUser\
createCreate a delegates
getGet a delegates
ArgumentTypeDescription
identifierstringThe name of the delegates
deleteDelete the delegates
ArgumentTypeDescription
identifierstringThe name of the delegates
syncSync delegates state from GCP

Resources

state(infinite)— Settings for a delegate. Delegates can read, send, and delete messages, as we...
@swamp/gcp/gmail/users-settings-filtersv2026.04.23.1users_settings_filters.ts

Global Arguments

ArgumentTypeDescription
action?objectA set of actions to perform on a message.
criteria?objectMessage matching criteria.
id?stringThe server assigned ID of the filter.
userIdstringUser\
createCreate a filters
getGet a filters
ArgumentTypeDescription
identifierstringThe id of the filters
deleteDelete the filters
ArgumentTypeDescription
identifierstringThe id of the filters
syncSync filters state from GCP

Resources

state(infinite)— Resource definition for Gmail filters. Filters apply to specific messages ins...
@swamp/gcp/gmail/users-settings-forwardingaddressesv2026.04.23.1users_settings_forwardingaddresses.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
forwardingEmail?stringAn email address to which messages can be forwarded.
verificationStatus?enumIndicates whether this address has been verified and is usable for forwarding. Read-only.
userIdstringUser\
createCreate a forwardingAddresses
getGet a forwardingAddresses
ArgumentTypeDescription
identifierstringThe name of the forwardingAddresses
deleteDelete the forwardingAddresses
ArgumentTypeDescription
identifierstringThe name of the forwardingAddresses
syncSync forwardingAddresses state from GCP

Resources

state(infinite)— Settings for a forwarding address.
@swamp/gcp/gmail/users-settings-sendasv2026.04.23.1users_settings_sendas.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
displayName?stringA name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
isDefault?booleanWhether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is `true`. Changing this from `false` to `true` for an address will result in this field becoming `false` for the other previous default address.
isPrimary?booleanWhether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
replyToAddress?stringAn optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header.
sendAsEmail?stringThe email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create.
signature?stringAn optional HTML signature that is included in messages composed with this alias in the Gmail web UI. This signature is added to new emails only.
smtpMsa?objectConfiguration for communication with an SMTP service.
treatAsAlias?booleanWhether Gmail should treat this address as an alias for the user\
verificationStatus?enumIndicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases.
userIdstringUser\
createCreate a sendAs
getGet a sendAs
ArgumentTypeDescription
identifierstringThe name of the sendAs
updateUpdate sendAs attributes
deleteDelete the sendAs
ArgumentTypeDescription
identifierstringThe name of the sendAs
syncSync sendAs state from GCP
verifyverify

Resources

state(infinite)— Settings associated with a send-as alias, which can be either the primary log...
@swamp/gcp/gmail/users-settings-sendas-smimeinfov2026.04.23.1users_settings_sendas_smimeinfo.ts

Global Arguments

ArgumentTypeDescription
encryptedKeyPassword?stringEncrypted key password, when key is encrypted.
expiration?stringWhen the certificate expires (in milliseconds since epoch).
id?stringThe immutable ID for the SmimeInfo.
isDefault?booleanWhether this SmimeInfo is the default one for this user's send-as address.
issuerCn?stringThe S/MIME certificate issuer's common name.
pem?stringPEM formatted X509 concatenated certificate string (standard base64 encoding). Format used for returning key, which includes public key as well as certificate chain (not private key).
pkcs12?stringPKCS#12 format containing a single private/public key pair and certificate chain. This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately.
userIdstringThe user's email address. The special value `me` can be used to indicate the authenticated user.
sendAsEmailstringThe email address that appears in the "From:" header for mail sent using this alias.
createCreate a smimeInfo
getGet a smimeInfo
ArgumentTypeDescription
identifierstringThe id of the smimeInfo
deleteDelete the smimeInfo
ArgumentTypeDescription
identifierstringThe id of the smimeInfo
syncSync smimeInfo state from GCP
set_defaultset default

Resources

state(infinite)— An S/MIME email config.
@swamp/gcp/gmail/users-threadsv2026.04.23.1users_threads.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a threads
ArgumentTypeDescription
identifierstringThe id of the threads
deleteDelete the threads
ArgumentTypeDescription
identifierstringThe id of the threads
syncSync threads state from GCP
modifymodify
ArgumentTypeDescription
addLabelIds?any
removeLabelIds?any
trashtrash
untrashuntrash

Resources

state(infinite)— A collection of messages representing a conversation.