Gcp/translate
@swamp/gcp/translatev2026.07.29.1
01README
Google Cloud translate infrastructure models
02Release Notes
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models, detections, languages, translations
03Models
@swamp/gcp/translate/adaptivemtdatasetsv2026.07.29.1adaptivemtdatasets.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| displayName? | string | The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. |
| exampleCount? | number | The number of examples in the dataset. |
| name? | string | Identifier. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` |
| sourceLanguageCode? | string | The BCP-47 language code of the source language. |
| targetLanguageCode? | string | The BCP-47 language code of the target language. |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn create()
Create a adaptiveMtDatasets
fn get(identifier: string)
Get a adaptiveMtDatasets
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtDatasets |
fn delete(identifier: string)
Delete the adaptiveMtDatasets
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtDatasets |
fn sync(identifier?: string)
Sync adaptiveMtDatasets state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific adaptiveMtDatasets by name (e.g. one discovered by list) |
fn list(filter?: string, pageSize?: number, maxPages?: number)
List adaptiveMtDatasets resources
| Argument | Type | Description |
|---|---|---|
| filter? | string | Optional. An expression for filtering the results of the request. Filter is not supported yet. |
| pageSize? | number | Optional. Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn import_adaptive_mt_file(fileInputSource?: any, gcsInputSource?: any)
import adaptive mt file
| Argument | Type | Description |
|---|---|---|
| fileInputSource? | any | |
| gcsInputSource? | any |
Resources
state(infinite)— An Adaptive MT Dataset.
@swamp/gcp/translate/adaptivemtdatasets-adaptivemtfilesv2026.07.29.1adaptivemtdatasets_adaptivemtfiles.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn get(identifier: string)
Get a adaptiveMtFiles
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtFiles |
fn delete(identifier: string)
Delete the adaptiveMtFiles
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtFiles |
fn sync(identifier?: string)
Sync adaptiveMtFiles state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific adaptiveMtFiles by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List adaptiveMtFiles resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | Optional. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— An AdaptiveMtFile.
@swamp/gcp/translate/adaptivemtdatasets-adaptivemtfiles-adaptivemtsentencesv2026.07.29.1adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn get(identifier: string)
Get a adaptiveMtSentences
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtSentences |
fn sync(identifier?: string)
Sync adaptiveMtSentences state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific adaptiveMtSentences by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List adaptiveMtSentences resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— An AdaptiveMt sentence entry.
@swamp/gcp/translate/adaptivemtdatasets-adaptivemtsentencesv2026.07.29.1adaptivemtdatasets_adaptivemtsentences.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn get(identifier: string)
Get a adaptiveMtSentences
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the adaptiveMtSentences |
fn sync(identifier?: string)
Sync adaptiveMtSentences state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific adaptiveMtSentences by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List adaptiveMtSentences resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— An AdaptiveMt sentence entry.
@swamp/gcp/translate/datasetsv2026.07.29.1datasets.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| displayName? | string | The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. |
| name? | string | The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` |
| sourceLanguageCode? | string | The BCP-47 language code of the source language. |
| targetLanguageCode? | string | The BCP-47 language code of the target language. |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn create()
Create a datasets
fn get(identifier: string)
Get a datasets
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the datasets |
fn delete(identifier: string)
Delete the datasets
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the datasets |
fn sync(identifier?: string)
Sync datasets state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific datasets by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List datasets resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | Optional. Requested page size. The server can return fewer results than requested. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn export_data(outputConfig?: any)
export data
| Argument | Type | Description |
|---|---|---|
| outputConfig? | any |
fn import_data(inputConfig?: any)
import data
| Argument | Type | Description |
|---|---|---|
| inputConfig? | any |
Resources
state(infinite)— A dataset that hosts the examples (sentence pairs) used for translation models.
@swamp/gcp/translate/datasets-examplesv2026.07.29.1datasets_examples.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn get(identifier: string)
Get a examples
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the examples |
fn sync(identifier?: string)
Sync examples state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific examples by name (e.g. one discovered by list) |
fn list(filter?: string, pageSize?: number, maxPages?: number)
List examples resources
| Argument | Type | Description |
|---|---|---|
| filter? | string | Optional. An expression for filtering the examples that will be returned. Example filter: * `usage=TRAIN` |
| pageSize? | number | Optional. Requested page size. The server can return fewer results than requested. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— A sentence pair.
@swamp/gcp/translate/detectionsv2026.07.29.1detections.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| q | string | The input text upon which to perform language detection. Repeat this parameter to perform language detection on multiple text inputs. |
fn get(identifier: string)
Get a detections
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the detections |
fn sync(identifier?: string)
Sync detections state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific detections by name (e.g. one discovered by list) |
fn detect(q?: any)
detect
| Argument | Type | Description |
|---|---|---|
| q? | any |
Resources
state(infinite)— An array of languages which we detect for the given text The most likely lang...
@swamp/gcp/translate/glossariesv2026.07.29.1glossaries.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| displayName? | string | Optional. The display name of the glossary. |
| inputConfig? | object | Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints. |
| languageCodesSet? | object | Used with equivalent term set glossaries. |
| languagePair? | object | Used with unidirectional glossaries. |
| name? | string | Identifier. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn create()
Create a glossaries
fn get(identifier: string)
Get a glossaries
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the glossaries |
fn update(identifier?: string)
Update glossaries attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific glossaries by name (e.g. one discovered by list) |
fn delete(identifier: string)
Delete the glossaries
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the glossaries |
fn sync(identifier?: string)
Sync glossaries state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific glossaries by name (e.g. one discovered by list) |
fn list(filter?: string, pageSize?: number, maxPages?: number)
List glossaries resources
| Argument | Type | Description |
|---|---|---|
| filter? | string | Optional. Filter specifying constraints of a list operation. Specify the constraint by the format of "key=value", where key must be "src" or "tgt", and the value must be a valid language code. For multiple restrictions, concatenate them by "AND" (uppercase only), such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used here, which means using \ |
| pageSize? | number | Optional. Requested page size. The server may return fewer glossaries than requested. If unspecified, the server picks an appropriate default. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— Represents a glossary built from user-provided data.
@swamp/gcp/translate/glossaries-glossaryentriesv2026.07.29.1glossaries_glossaryentries.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| description? | string | Describes the glossary entry. |
| name? | string | Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*` |
| termsPair? | object | Used for an unidirectional glossary. |
| termsSet? | object | Used for an equivalent term sets glossary. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn create()
Create a glossaryEntries
fn get(identifier: string)
Get a glossaryEntries
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the glossaryEntries |
fn update(identifier?: string)
Update glossaryEntries attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific glossaryEntries by name (e.g. one discovered by list) |
fn delete(identifier: string)
Delete the glossaryEntries
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the glossaryEntries |
fn sync(identifier?: string)
Sync glossaryEntries state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific glossaryEntries by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List glossaryEntries resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | Optional. Requested page size. The server may return fewer glossary entries than requested. If unspecified, the server picks an appropriate default. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— Represents a single entry in a glossary.
@swamp/gcp/translate/languagesv2026.07.29.1languages.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
fn get(identifier: string)
Get a languages
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the languages |
fn sync(identifier?: string)
Sync languages state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific languages by name (e.g. one discovered by list) |
fn list(model?: string, target?: string, maxPages?: number)
List languages resources
| Argument | Type | Description |
|---|---|---|
| model? | string | The model type for which supported languages should be returned. |
| target? | string | The language to use to return localized, human readable names of supported |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— Returns a list of supported languages for translation.
@swamp/gcp/translate/locationsv2026.07.29.1locations.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| name | string | The resource that owns the locations collection, if applicable. |
fn get(identifier: string)
Get a locations
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the locations |
fn sync(identifier?: string)
Sync locations state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific locations by name (e.g. one discovered by list) |
fn list(extraLocationTypes?: string, filter?: string, pageSize?: number, maxPages?: number)
List locations resources
| Argument | Type | Description |
|---|---|---|
| extraLocationTypes? | string | Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. |
| filter? | string | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| pageSize? | number | The maximum number of results to return. If not set, the service selects a default. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn adaptive_mt_translate(content?: any, dataset?: any, glossaryConfig?: any, referenceSentenceConfig?: any)
adaptive mt translate
| Argument | Type | Description |
|---|---|---|
| content? | any | |
| dataset? | any | |
| glossaryConfig? | any | |
| referenceSentenceConfig? | any |
fn batch_translate_document(customizedAttribution?: any, enableRotationCorrection?: any, enableShadowRemovalNativePdf?: any, formatConversions?: any, glossaries?: any, inputConfigs?: any, models?: any, outputConfig?: any, pdfNativeOnly?: any, sourceLanguageCode?: any, targetLanguageCodes?: any)
batch translate document
| Argument | Type | Description |
|---|---|---|
| customizedAttribution? | any | |
| enableRotationCorrection? | any | |
| enableShadowRemovalNativePdf? | any | |
| formatConversions? | any | |
| glossaries? | any | |
| inputConfigs? | any | |
| models? | any | |
| outputConfig? | any | |
| pdfNativeOnly? | any | |
| sourceLanguageCode? | any | |
| targetLanguageCodes? | any |
fn batch_translate_text(glossaries?: any, inputConfigs?: any, labels?: any, models?: any, outputConfig?: any, sourceLanguageCode?: any, targetLanguageCodes?: any)
batch translate text
| Argument | Type | Description |
|---|---|---|
| glossaries? | any | |
| inputConfigs? | any | |
| labels? | any | |
| models? | any | |
| outputConfig? | any | |
| sourceLanguageCode? | any | |
| targetLanguageCodes? | any |
fn detect_language(content?: any, documentInputConfig?: any, labels?: any, mimeType?: any, model?: any)
detect language
| Argument | Type | Description |
|---|---|---|
| content? | any | |
| documentInputConfig? | any | |
| labels? | any | |
| mimeType? | any | |
| model? | any |
fn get_supported_languages()
get supported languages
fn refine_text(refinementEntries?: any, sourceLanguageCode?: any, targetLanguageCode?: any)
refine text
| Argument | Type | Description |
|---|---|---|
| refinementEntries? | any | |
| sourceLanguageCode? | any | |
| targetLanguageCode? | any |
fn romanize_text(contents?: any, sourceLanguageCode?: any)
romanize text
| Argument | Type | Description |
|---|---|---|
| contents? | any | |
| sourceLanguageCode? | any |
fn translate_document(customizedAttribution?: any, enableRotationCorrection?: any, enableShadowRemovalNativePdf?: any, formatConversions?: any, glossaries?: any, inputConfigs?: any, models?: any, outputConfig?: any, pdfNativeOnly?: any, sourceLanguageCode?: any, targetLanguageCodes?: any)
translate document
| Argument | Type | Description |
|---|---|---|
| customizedAttribution? | any | |
| enableRotationCorrection? | any | |
| enableShadowRemovalNativePdf? | any | |
| formatConversions? | any | |
| glossaries? | any | |
| inputConfigs? | any | |
| models? | any | |
| outputConfig? | any | |
| pdfNativeOnly? | any | |
| sourceLanguageCode? | any | |
| targetLanguageCodes? | any |
fn translate_text(glossaries?: any, inputConfigs?: any, labels?: any, models?: any, outputConfig?: any, sourceLanguageCode?: any, targetLanguageCodes?: any)
translate text
| Argument | Type | Description |
|---|---|---|
| glossaries? | any | |
| inputConfigs? | any | |
| labels? | any | |
| models? | any | |
| outputConfig? | any | |
| sourceLanguageCode? | any | |
| targetLanguageCodes? | any |
Resources
state(infinite)— A resource that represents a Google Cloud location.
@swamp/gcp/translate/modelsv2026.07.29.1models.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| dataset? | string | Required. The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` |
| displayName? | string | The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. |
| name? | string | The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` |
| location? | string | The location for this resource (e.g., 'us', 'us-central1', 'europe-west1') |
fn create()
Create a models
fn get(identifier: string)
Get a models
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the models |
fn delete(identifier: string)
Delete the models
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the models |
fn sync(identifier?: string)
Sync models state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific models by name (e.g. one discovered by list) |
fn list(filter?: string, pageSize?: number, maxPages?: number)
List models resources
| Argument | Type | Description |
|---|---|---|
| filter? | string | Optional. An expression for filtering the models that will be returned. Supported filter: `dataset_id=${dataset_id}` |
| pageSize? | number | Optional. Requested page size. The server can return fewer results than requested. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— A trained translation model.
@swamp/gcp/translate/translationsv2026.07.29.1translations.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| q | string | The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs. |
| target | string | The language to use for translation of the input text, set to one of the language codes listed in Language Support. |
fn get(identifier: string)
Get a translations
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the translations |
fn sync(identifier?: string)
Sync translations state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific translations by name (e.g. one discovered by list) |
fn list(cid?: string, format?: string, model?: string, q?: string, source?: string, target?: string, maxPages?: number)
List translations resources
| Argument | Type | Description |
|---|---|---|
| cid? | string | The customization id for translate |
| format? | string | The format of the source text, in either HTML (default) or plain-text. A |
| model? | string | The `model` type requested for this translation. Valid values are |
| q? | string | The input text to translate. Repeat this parameter to perform translation |
| source? | string | The language of the source text, set to one of the language codes listed in |
| target? | string | The language to use for translation of the input text, set to one of the |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn translate(format?: any, model?: any, q?: any, source?: any, target?: any)
translate
| Argument | Type | Description |
|---|---|---|
| format? | any | |
| model? | any | |
| q? | any | |
| source? | any | |
| target? | any |
Resources
state(infinite)— Translates input text, returning translated text.
04Previous Versions
2026.07.21.4
- Added: detections, languages, translations
2026.07.21.1
- Updated: glossaries, glossaries_glossaryentries
2026.07.20.2
- Added: detections, languages, translations
Added 3 models
2026.07.20.1
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models
Removed 3 models
2026.07.19.2
- Updated: locations, detections, translations
2026.07.19.1
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models, detections, languages, translations
2026.07.18.2
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models, detections, languages, translations
2026.07.17.2
- Updated: adaptivemtdatasets, datasets, glossaries, glossaries_glossaryentries, models
2026.07.17.1
- Updated: adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models
2026.06.08.2
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models, detections, languages, translations
2026.06.07.1
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models, detections, languages, translations
2026.06.05.1
- Added: detections, languages, translations
Added 3 models
2026.05.25.1
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models
Modified 10 models
2026.05.24.1
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models
2026.05.21.2
- Updated: locations, adaptivemtdatasets, adaptivemtdatasets_adaptivemtfiles, adaptivemtdatasets_adaptivemtfiles_adaptivemtsentences, adaptivemtdatasets_adaptivemtsentences, datasets, datasets_examples, glossaries, glossaries_glossaryentries, models
2026.05.21.1
2026.05.19.2
2026.05.19.1
2026.05.18.1
05Stats
A
100 / 100
Downloads
0
Archive size
106.1 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
06Platforms
07Labels