-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/braces-3.0.3
- Loading branch information
Showing
33 changed files
with
1,144 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* TaskQueue/LifecycleEvent/RuntimeStatus Tester SDK for [email protected] | ||
* | ||
* When filing bugs or feature requests please specify: | ||
* "Extensions SDK v1.0.0 for Local extension. | ||
* https://github.com/firebase/firebase-tools/issues/new/choose | ||
* | ||
* GENERATED FILE. DO NOT EDIT. | ||
*/ | ||
export type DoBackfillParam = "True" | "False"; | ||
export type LocationParam = | ||
| "us-central1" | ||
| "us-east1" | ||
| "us-east4" | ||
| "europe-west1" | ||
| "europe-west2" | ||
| "europe-west3" | ||
| "asia-east2" | ||
| "asia-northeast1"; | ||
/** | ||
* Parameters for [email protected] extension | ||
*/ | ||
export interface BackfillParams { | ||
/** | ||
* Do a backfill | ||
*/ | ||
DO_BACKFILL: DoBackfillParam; | ||
/** | ||
* Cloud Functions location | ||
*/ | ||
LOCATION: LocationParam; | ||
} | ||
export declare function backfill(instanceId: string, params: BackfillParams): Backfill; | ||
/** | ||
* TaskQueue/LifecycleEvent/RuntimeStatus Tester | ||
* A tester for the TaskQueue/LCE/RuntimeStatus project | ||
*/ | ||
export declare class Backfill { | ||
private instanceId; | ||
private params; | ||
readonly FIREBASE_EXTENSION_LOCAL_PATH = | ||
"./functions/generated/extensions/local/backfill/0.0.2/src"; | ||
constructor(instanceId: string, params: BackfillParams); | ||
getInstanceId(): string; | ||
getParams(): BackfillParams; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"use strict"; | ||
/** | ||
* TaskQueue/LifecycleEvent/RuntimeStatus Tester SDK for [email protected] | ||
* | ||
* When filing bugs or feature requests please specify: | ||
* "Extensions SDK v1.0.0 for Local extension. | ||
* https://github.com/firebase/firebase-tools/issues/new/choose | ||
* | ||
* GENERATED FILE. DO NOT EDIT. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.backfill = exports.backfill = void 0; | ||
function backfill(instanceId, params) { | ||
return new Backfill(instanceId, params); | ||
} | ||
exports.backfill = backfill; | ||
/** | ||
* TaskQueue/LifecycleEvent/RuntimeStatus Tester | ||
* A tester for the TaskQueue/LCE/RuntimeStatus project | ||
*/ | ||
class Backfill { | ||
constructor(instanceId, params) { | ||
this.instanceId = instanceId; | ||
this.params = params; | ||
this.FIREBASE_EXTENSION_LOCAL_PATH = "./functions/generated/extensions/local/backfill/0.0.2/src"; | ||
} | ||
getInstanceId() { return this.instanceId; } | ||
getParams() { return this.params; } | ||
} | ||
exports.Backfill = Backfill; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@firebase-extensions/local-backfill-sdk", | ||
"main": "./index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
/** | ||
* Translate Text in Firestore SDK for [email protected] | ||
* | ||
* When filing bugs or feature requests please specify: | ||
* "Extensions SDK v1.0.0 for [email protected]" | ||
* https://github.com/firebase/firebase-tools/issues/new/choose | ||
* | ||
* GENERATED FILE. DO NOT EDIT. | ||
*/ | ||
import { CloudEvent } from "../../../../v2"; | ||
import { EventarcTriggerOptions } from "../../../../v2/eventarc"; | ||
export type EventCallback<T> = (event: CloudEvent<T>) => unknown | Promise<unknown>; | ||
export type SimpleEventarcTriggerOptions = Omit< | ||
EventarcTriggerOptions, | ||
"eventType" | "channel" | "region" | ||
>; | ||
export type EventArcRegionType = "us-central1" | "us-west1" | "europe-west4" | "asia-northeast1"; | ||
export type SystemFunctionVpcConnectorEgressSettingsParam = | ||
| "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" | ||
| "PRIVATE_RANGES_ONLY" | ||
| "ALL_TRAFFIC"; | ||
export type SystemFunctionIngressSettingsParam = | ||
| "ALLOW_ALL" | ||
| "ALLOW_INTERNAL_ONLY" | ||
| "ALLOW_INTERNAL_AND_GCLB"; | ||
export type SystemFunctionLocationParam = | ||
| "us-central1" | ||
| "us-east1" | ||
| "us-east4" | ||
| "us-west1" | ||
| "us-west2" | ||
| "us-west3" | ||
| "us-west4" | ||
| "europe-central2" | ||
| "europe-west1" | ||
| "europe-west2" | ||
| "europe-west3" | ||
| "europe-west6" | ||
| "asia-east1" | ||
| "asia-east2" | ||
| "asia-northeast1" | ||
| "asia-northeast2" | ||
| "asia-northeast3" | ||
| "asia-south1" | ||
| "asia-southeast1" | ||
| "asia-southeast2" | ||
| "northamerica-northeast1" | ||
| "southamerica-east1" | ||
| "australia-southeast1"; | ||
export type SystemFunctionMemoryParam = "128" | "256" | "512" | "1024" | "2048" | "4096" | "8192"; | ||
/** | ||
* Parameters for [email protected] extension | ||
*/ | ||
export interface FirestoreTranslateTextParams { | ||
/** | ||
* Target languages for translations, as a comma-separated list | ||
*/ | ||
LANGUAGES: string; | ||
/** | ||
* Collection path | ||
*/ | ||
COLLECTION_PATH: string; | ||
/** | ||
* Input field name | ||
*/ | ||
INPUT_FIELD_NAME: string; | ||
/** | ||
* Translations output field name | ||
*/ | ||
OUTPUT_FIELD_NAME: string; | ||
/** | ||
* Languages field name | ||
*/ | ||
LANGUAGES_FIELD_NAME?: string; | ||
/** | ||
* Event Arc Region | ||
*/ | ||
_EVENT_ARC_REGION?: EventArcRegionType; | ||
/** | ||
* Function timeout seconds | ||
*/ | ||
_FUNCTION_TIMEOUT_SECONDS?: string; | ||
/** | ||
* VPC Connector | ||
*/ | ||
_FUNCTION_VPC_CONNECTOR?: string; | ||
/** | ||
* VPC Connector Egress settings | ||
*/ | ||
_FUNCTION_VPC_CONNECTOR_EGRESS_SETTINGS?: SystemFunctionVpcConnectorEgressSettingsParam; | ||
/** | ||
* Minimum function instances | ||
*/ | ||
_FUNCTION_MIN_INSTANCES?: string; | ||
/** | ||
* Maximum function instances | ||
*/ | ||
_FUNCTION_MAX_INSTANCES?: string; | ||
/** | ||
* Function ingress settings | ||
*/ | ||
_FUNCTION_INGRESS_SETTINGS?: SystemFunctionIngressSettingsParam; | ||
/** | ||
* Function labels | ||
*/ | ||
_FUNCTION_LABELS?: string; | ||
/** | ||
* KMS key name | ||
*/ | ||
_FUNCTION_KMS_KEY_NAME?: string; | ||
/** | ||
* Docker repository | ||
*/ | ||
_FUNCTION_DOCKER_REPOSITORY?: string; | ||
/** | ||
* Cloud Functions location | ||
*/ | ||
_FUNCTION_LOCATION: SystemFunctionLocationParam; | ||
/** | ||
* Function memory | ||
*/ | ||
_FUNCTION_MEMORY?: SystemFunctionMemoryParam; | ||
} | ||
export declare function firestoreTranslateText( | ||
instanceId: string, | ||
params: FirestoreTranslateTextParams | ||
): FirestoreTranslateText; | ||
/** | ||
* Translate Text in Firestore | ||
* Translates strings written to a Cloud Firestore collection into multiple languages (uses Cloud Translation API). | ||
*/ | ||
export declare class FirestoreTranslateText { | ||
private instanceId; | ||
private params; | ||
events: string[]; | ||
readonly FIREBASE_EXTENSION_REFERENCE = "firebase/[email protected]"; | ||
readonly EXTENSION_VERSION = "0.1.18"; | ||
constructor(instanceId: string, params: FirestoreTranslateTextParams); | ||
getInstanceId(): string; | ||
getParams(): FirestoreTranslateTextParams; | ||
/** | ||
* Occurs when a trigger has been called within the Extension, and will include data such as the context of the trigger request. | ||
*/ | ||
onStart<T = unknown>( | ||
callback: EventCallback<T>, | ||
options?: SimpleEventarcTriggerOptions | ||
): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>; | ||
/** | ||
* Occurs when image resizing completes successfully. The event will contain further details about specific formats and sizes. | ||
*/ | ||
onSuccess<T = unknown>( | ||
callback: EventCallback<T>, | ||
options?: SimpleEventarcTriggerOptions | ||
): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>; | ||
/** | ||
* Occurs when an issue has been experienced in the Extension. This will include any error data that has been included within the Error Exception. | ||
*/ | ||
onError<T = unknown>( | ||
callback: EventCallback<T>, | ||
options?: SimpleEventarcTriggerOptions | ||
): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>; | ||
/** | ||
* Occurs when the function is settled. Provides no customized data other than the context. | ||
*/ | ||
onCompletion<T = unknown>( | ||
callback: EventCallback<T>, | ||
options?: SimpleEventarcTriggerOptions | ||
): import("firebase-functions/v2").CloudFunction<CloudEvent<T>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
"use strict"; | ||
/** | ||
* Translate Text in Firestore SDK for [email protected] | ||
* | ||
* When filing bugs or feature requests please specify: | ||
* "Extensions SDK v1.0.0 for [email protected]" | ||
* https://github.com/firebase/firebase-tools/issues/new/choose | ||
* | ||
* GENERATED FILE. DO NOT EDIT. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FirestoreTranslateText = exports.firestoreTranslateText = void 0; | ||
const eventarc_1 = require("firebase-functions/v2/eventarc"); | ||
function firestoreTranslateText(instanceId, params) { | ||
return new FirestoreTranslateText(instanceId, params); | ||
} | ||
exports.firestoreTranslateText = firestoreTranslateText; | ||
/** | ||
* Translate Text in Firestore | ||
* Translates strings written to a Cloud Firestore collection into multiple languages (uses Cloud Translation API). | ||
*/ | ||
class FirestoreTranslateText { | ||
constructor(instanceId, params) { | ||
this.instanceId = instanceId; | ||
this.params = params; | ||
this.events = []; | ||
this.FIREBASE_EXTENSION_REFERENCE = "firebase/[email protected]"; | ||
this.EXTENSION_VERSION = "0.1.18"; | ||
} | ||
getInstanceId() { return this.instanceId; } | ||
getParams() { return this.params; } | ||
/** | ||
* Occurs when a trigger has been called within the Extension, and will include data such as the context of the trigger request. | ||
*/ | ||
onStart(callback, options) { | ||
this.events.push("firebase.extensions.firestore-translate-text.v1.onStart"); | ||
return (0, eventarc_1.onCustomEventPublished)(Object.assign(Object.assign({}, options), { "eventType": "firebase.extensions.firestore-translate-text.v1.onStart", "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`, "region": `${this.params._EVENT_ARC_REGION}` }), callback); | ||
} | ||
/** | ||
* Occurs when image resizing completes successfully. The event will contain further details about specific formats and sizes. | ||
*/ | ||
onSuccess(callback, options) { | ||
this.events.push("firebase.extensions.firestore-translate-text.v1.onSuccess"); | ||
return (0, eventarc_1.onCustomEventPublished)(Object.assign(Object.assign({}, options), { "eventType": "firebase.extensions.firestore-translate-text.v1.onSuccess", "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`, "region": `${this.params._EVENT_ARC_REGION}` }), callback); | ||
} | ||
/** | ||
* Occurs when an issue has been experienced in the Extension. This will include any error data that has been included within the Error Exception. | ||
*/ | ||
onError(callback, options) { | ||
this.events.push("firebase.extensions.firestore-translate-text.v1.onError"); | ||
return (0, eventarc_1.onCustomEventPublished)(Object.assign(Object.assign({}, options), { "eventType": "firebase.extensions.firestore-translate-text.v1.onError", "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`, "region": `${this.params._EVENT_ARC_REGION}` }), callback); | ||
} | ||
/** | ||
* Occurs when the function is settled. Provides no customized data other than the context. | ||
*/ | ||
onCompletion(callback, options) { | ||
this.events.push("firebase.extensions.firestore-translate-text.v1.onCompletion"); | ||
return (0, eventarc_1.onCustomEventPublished)(Object.assign(Object.assign({}, options), { "eventType": "firebase.extensions.firestore-translate-text.v1.onCompletion", "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`, "region": `${this.params._EVENT_ARC_REGION}` }), callback); | ||
} | ||
} | ||
exports.FirestoreTranslateText = FirestoreTranslateText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@firebase-extensions/firebase-firestore-translate-text-sdk", | ||
"main": "./index.js" | ||
} |
Oops, something went wrong.