Skip to content

Commit

Permalink
Merge branch 'v11' into dl/es5-deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque authored Sep 24, 2024
2 parents 2719bbb + 09ba48f commit d5ca8f9
Show file tree
Hide file tree
Showing 96 changed files with 1,482 additions and 644 deletions.
6 changes: 6 additions & 0 deletions .changeset/large-snakes-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'firebase': major
'@firebase/vertexai': major
---

Release VertexAI in Firebase for general availability.
13 changes: 13 additions & 0 deletions .changeset/plenty-beers-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@firebase/rules-unit-testing': patch
'@firebase/firestore-compat': patch
'@firebase/functions-compat': patch
'@firebase/storage-compat': patch
'@firebase/auth-compat': patch
'@firebase/firestore': patch
'@firebase/functions': patch
'@firebase/storage': patch
'@firebase/auth': patch
---

Removed dependency on undici and node-fetch in our node bundles, replacing them with the native fetch implementation.
6 changes: 6 additions & 0 deletions .changeset/slimy-cups-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/functions-compat': patch
'@firebase/functions': patch
---

Remove node bundle from the functions SDK as the node-specific fetch code has been removed in favor of using native fetch throughout the SDK.
5 changes: 5 additions & 0 deletions .changeset/small-geckos-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/firestore': patch
---

Refactor Firestore client instantiation. This prepares for future features that require client to restart.
2 changes: 1 addition & 1 deletion .github/workflows/canary-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease-manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "@firebase/vertexai-preview"
## API Report File for "@firebase/vertexai"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
Expand All @@ -9,6 +9,15 @@ import { FirebaseApp } from '@firebase/app';
import { FirebaseAuthTokenData } from '@firebase/auth-interop-types';
import { FirebaseError } from '@firebase/util';

// @public
export class ArraySchema extends Schema {
constructor(schemaParams: SchemaParams, items: TypedSchema);
// (undocumented)
items: TypedSchema;
// @internal (undocumented)
toJSON(): SchemaRequest;
}

// @public
export interface BaseParams {
// (undocumented)
Expand All @@ -27,6 +36,11 @@ export enum BlockReason {
SAFETY = "SAFETY"
}

// @public
export class BooleanSchema extends Schema {
constructor(schemaParams?: SchemaParams);
}

// @public
export class ChatSession {
// Warning: (ae-forgotten-export) The symbol "ApiSettings" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -203,42 +217,7 @@ export interface FunctionCallPart {
export interface FunctionDeclaration {
description?: string;
name: string;
parameters?: FunctionDeclarationSchema;
}

// @public
export interface FunctionDeclarationSchema {
description?: string;
properties: {
[k: string]: FunctionDeclarationSchemaProperty;
};
required?: string[];
type: FunctionDeclarationSchemaType;
}

// @public
export interface FunctionDeclarationSchemaProperty {
description?: string;
enum?: string[];
example?: unknown;
format?: string;
items?: FunctionDeclarationSchema;
nullable?: boolean;
properties?: {
[k: string]: FunctionDeclarationSchema;
};
required?: string[];
type?: FunctionDeclarationSchemaType;
}

// @public
export enum FunctionDeclarationSchemaType {
ARRAY = "ARRAY",
BOOLEAN = "BOOLEAN",
INTEGER = "INTEGER",
NUMBER = "NUMBER",
OBJECT = "OBJECT",
STRING = "STRING"
parameters?: ObjectSchemaInterface;
}

// @public
Expand Down Expand Up @@ -331,6 +310,7 @@ export interface GenerationConfig {
// (undocumented)
presencePenalty?: number;
responseMimeType?: string;
responseSchema?: TypedSchema | SchemaRequest;
// (undocumented)
stopSequences?: string[];
// (undocumented)
Expand Down Expand Up @@ -478,6 +458,11 @@ export interface InlineDataPart {
videoMetadata?: VideoMetadata;
}

// @public
export class IntegerSchema extends Schema {
constructor(schemaParams?: SchemaParams);
}

// @public
export interface ModelParams extends BaseParams {
// (undocumented)
Expand All @@ -490,6 +475,34 @@ export interface ModelParams extends BaseParams {
tools?: Tool[];
}

// @public
export class NumberSchema extends Schema {
constructor(schemaParams?: SchemaParams);
}

// @public
export class ObjectSchema extends Schema {
constructor(schemaParams: SchemaParams, properties: {
[k: string]: TypedSchema;
}, optionalProperties?: string[]);
// (undocumented)
optionalProperties: string[];
// (undocumented)
properties: {
[k: string]: TypedSchema;
};
// @internal (undocumented)
toJSON(): SchemaRequest;
}

// @public
export interface ObjectSchemaInterface extends SchemaInterface {
// (undocumented)
optionalProperties?: string[];
// (undocumented)
type: SchemaType.OBJECT;
}

// @public
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart;

Expand Down Expand Up @@ -549,6 +562,82 @@ export interface SafetySetting {
threshold: HarmBlockThreshold;
}

// @public
export abstract class Schema implements SchemaInterface {
constructor(schemaParams: SchemaInterface);
[key: string]: unknown;
// (undocumented)
static array(arrayParams: SchemaParams & {
items: Schema;
}): ArraySchema;
// (undocumented)
static boolean(booleanParams?: SchemaParams): BooleanSchema;
description?: string;
// (undocumented)
static enumString(stringParams: SchemaParams & {
enum: string[];
}): StringSchema;
example?: unknown;
format?: string;
// (undocumented)
static integer(integerParams?: SchemaParams): IntegerSchema;
nullable: boolean;
// (undocumented)
static number(numberParams?: SchemaParams): NumberSchema;
// (undocumented)
static object(objectParams: SchemaParams & {
properties: {
[k: string]: Schema;
};
optionalProperties?: string[];
}): ObjectSchema;
// (undocumented)
static string(stringParams?: SchemaParams): StringSchema;
// @internal
toJSON(): SchemaRequest;
type: SchemaType;
}

// @public
export interface SchemaInterface extends SchemaShared<SchemaInterface> {
type: SchemaType;
}

// @public
export interface SchemaParams extends SchemaShared<SchemaInterface> {
}

// @public
export interface SchemaRequest extends SchemaShared<SchemaRequest> {
required?: string[];
type: SchemaType;
}

// @public
export interface SchemaShared<T> {
// (undocumented)
[key: string]: unknown;
description?: string;
enum?: string[];
example?: unknown;
format?: string;
items?: T;
nullable?: boolean;
properties?: {
[k: string]: T;
};
}

// @public
export enum SchemaType {
ARRAY = "array",
BOOLEAN = "boolean",
INTEGER = "integer",
NUMBER = "number",
OBJECT = "object",
STRING = "string"
}

// @public (undocumented)
export interface Segment {
// (undocumented)
Expand All @@ -571,6 +660,15 @@ export interface StartChatParams extends BaseParams {
tools?: Tool[];
}

// @public
export class StringSchema extends Schema {
constructor(schemaParams?: SchemaParams, enumValues?: string[]);
// (undocumented)
enum?: string[];
// @internal (undocumented)
toJSON(): SchemaRequest;
}

// @public
export interface TextPart {
// (undocumented)
Expand All @@ -592,6 +690,9 @@ export interface ToolConfig {
functionCallingConfig: FunctionCallingConfig;
}

// @public
export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema;

// @public
export interface UsageMetadata {
// (undocumented)
Expand All @@ -616,15 +717,14 @@ export class VertexAIError extends FirebaseError {
readonly code: VertexAIErrorCode;
// (undocumented)
readonly customErrorData?: CustomErrorData | undefined;
// (undocumented)
readonly message: string;
}

// @public
export const enum VertexAIErrorCode {
ERROR = "error",
FETCH_ERROR = "fetch-error",
INVALID_CONTENT = "invalid-content",
INVALID_SCHEMA = "invalid-schema",
NO_API_KEY = "no-api-key",
NO_MODEL = "no-model",
NO_PROJECT_ID = "no-project-id",
Expand Down
2 changes: 1 addition & 1 deletion config/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"private": true,
"engines": {
"node": "16"
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@
"webpack": "5.76.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "4.11.1"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
},
"devDependencies": {
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
5 changes: 4 additions & 1 deletion integration/compat-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
},
"devDependencies": {
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
}
3 changes: 3 additions & 0 deletions integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"mocha": "9.2.2",
"npm-run-all": "4.1.5",
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"typescript": "4.2.2",
"webpack": "5.76.0",
"webpack-stream": "7.0.0"
},
"engines": {
"node": ">=18.0.0"
}
}
4 changes: 3 additions & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"express": "4.19.2",
"geckodriver": "2.0.4",
"mocha": "9.2.2",
"undici": "6.19.7",
"selenium-assistant": "6.1.1"
},
"engines": {
"node": ">=18.0.0"
}
}
Loading

0 comments on commit d5ca8f9

Please sign in to comment.