Skip to content

Commit d5ca8f9

Browse files
authored
Merge branch 'v11' into dl/es5-deprecation
2 parents 2719bbb + 09ba48f commit d5ca8f9

File tree

96 files changed

+1482
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1482
-644
lines changed

.changeset/large-snakes-march.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': major
3+
'@firebase/vertexai': major
4+
---
5+
6+
Release VertexAI in Firebase for general availability.

.changeset/plenty-beers-decide.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@firebase/rules-unit-testing': patch
3+
'@firebase/firestore-compat': patch
4+
'@firebase/functions-compat': patch
5+
'@firebase/storage-compat': patch
6+
'@firebase/auth-compat': patch
7+
'@firebase/firestore': patch
8+
'@firebase/functions': patch
9+
'@firebase/storage': patch
10+
'@firebase/auth': patch
11+
---
12+
13+
Removed dependency on undici and node-fetch in our node bundles, replacing them with the native fetch implementation.

.changeset/slimy-cups-promise.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/functions-compat': patch
3+
'@firebase/functions': patch
4+
---
5+
6+
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.

.changeset/small-geckos-mix.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': patch
3+
---
4+
5+
Refactor Firestore client instantiation. This prepares for future features that require client to restart.

.github/workflows/canary-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7171
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
7272
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
73-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
73+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
7474
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7575
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
7676
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/prerelease-manual-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
7474
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
7575
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
76-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
76+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
7777
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
7878
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
7979
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/release-prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
8484
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
8585
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
86-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
86+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
8787
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
8888
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
8989
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

.github/workflows/release-staging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
110110
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
111111
NPM_TOKEN_UTIL: ${{secrets.NPM_TOKEN_UTIL}}
112-
NPM_TOKEN_VERTEXAI_PREVIEW: ${{secrets.NPM_TOKEN_VERTEXAI_PREVIEW}}
112+
NPM_TOKEN_VERTEXAI: ${{secrets.NPM_TOKEN_VERTEXAI}}
113113
NPM_TOKEN_WEBCHANNEL_WRAPPER: ${{secrets.NPM_TOKEN_WEBCHANNEL_WRAPPER}}
114114
NPM_TOKEN_FIREBASE: ${{secrets.NPM_TOKEN_FIREBASE}}
115115
NPM_TOKEN_APP_COMPAT: ${{ secrets.NPM_TOKEN_APP_COMPAT }}

common/api-review/vertexai-preview.api.md renamed to common/api-review/vertexai.api.md

+139-39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "@firebase/vertexai-preview"
1+
## API Report File for "@firebase/vertexai"
22

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

12+
// @public
13+
export class ArraySchema extends Schema {
14+
constructor(schemaParams: SchemaParams, items: TypedSchema);
15+
// (undocumented)
16+
items: TypedSchema;
17+
// @internal (undocumented)
18+
toJSON(): SchemaRequest;
19+
}
20+
1221
// @public
1322
export interface BaseParams {
1423
// (undocumented)
@@ -27,6 +36,11 @@ export enum BlockReason {
2736
SAFETY = "SAFETY"
2837
}
2938

39+
// @public
40+
export class BooleanSchema extends Schema {
41+
constructor(schemaParams?: SchemaParams);
42+
}
43+
3044
// @public
3145
export class ChatSession {
3246
// Warning: (ae-forgotten-export) The symbol "ApiSettings" needs to be exported by the entry point index.d.ts
@@ -203,42 +217,7 @@ export interface FunctionCallPart {
203217
export interface FunctionDeclaration {
204218
description?: string;
205219
name: string;
206-
parameters?: FunctionDeclarationSchema;
207-
}
208-
209-
// @public
210-
export interface FunctionDeclarationSchema {
211-
description?: string;
212-
properties: {
213-
[k: string]: FunctionDeclarationSchemaProperty;
214-
};
215-
required?: string[];
216-
type: FunctionDeclarationSchemaType;
217-
}
218-
219-
// @public
220-
export interface FunctionDeclarationSchemaProperty {
221-
description?: string;
222-
enum?: string[];
223-
example?: unknown;
224-
format?: string;
225-
items?: FunctionDeclarationSchema;
226-
nullable?: boolean;
227-
properties?: {
228-
[k: string]: FunctionDeclarationSchema;
229-
};
230-
required?: string[];
231-
type?: FunctionDeclarationSchemaType;
232-
}
233-
234-
// @public
235-
export enum FunctionDeclarationSchemaType {
236-
ARRAY = "ARRAY",
237-
BOOLEAN = "BOOLEAN",
238-
INTEGER = "INTEGER",
239-
NUMBER = "NUMBER",
240-
OBJECT = "OBJECT",
241-
STRING = "STRING"
220+
parameters?: ObjectSchemaInterface;
242221
}
243222

244223
// @public
@@ -331,6 +310,7 @@ export interface GenerationConfig {
331310
// (undocumented)
332311
presencePenalty?: number;
333312
responseMimeType?: string;
313+
responseSchema?: TypedSchema | SchemaRequest;
334314
// (undocumented)
335315
stopSequences?: string[];
336316
// (undocumented)
@@ -478,6 +458,11 @@ export interface InlineDataPart {
478458
videoMetadata?: VideoMetadata;
479459
}
480460

461+
// @public
462+
export class IntegerSchema extends Schema {
463+
constructor(schemaParams?: SchemaParams);
464+
}
465+
481466
// @public
482467
export interface ModelParams extends BaseParams {
483468
// (undocumented)
@@ -490,6 +475,34 @@ export interface ModelParams extends BaseParams {
490475
tools?: Tool[];
491476
}
492477

478+
// @public
479+
export class NumberSchema extends Schema {
480+
constructor(schemaParams?: SchemaParams);
481+
}
482+
483+
// @public
484+
export class ObjectSchema extends Schema {
485+
constructor(schemaParams: SchemaParams, properties: {
486+
[k: string]: TypedSchema;
487+
}, optionalProperties?: string[]);
488+
// (undocumented)
489+
optionalProperties: string[];
490+
// (undocumented)
491+
properties: {
492+
[k: string]: TypedSchema;
493+
};
494+
// @internal (undocumented)
495+
toJSON(): SchemaRequest;
496+
}
497+
498+
// @public
499+
export interface ObjectSchemaInterface extends SchemaInterface {
500+
// (undocumented)
501+
optionalProperties?: string[];
502+
// (undocumented)
503+
type: SchemaType.OBJECT;
504+
}
505+
493506
// @public
494507
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart;
495508

@@ -549,6 +562,82 @@ export interface SafetySetting {
549562
threshold: HarmBlockThreshold;
550563
}
551564

565+
// @public
566+
export abstract class Schema implements SchemaInterface {
567+
constructor(schemaParams: SchemaInterface);
568+
[key: string]: unknown;
569+
// (undocumented)
570+
static array(arrayParams: SchemaParams & {
571+
items: Schema;
572+
}): ArraySchema;
573+
// (undocumented)
574+
static boolean(booleanParams?: SchemaParams): BooleanSchema;
575+
description?: string;
576+
// (undocumented)
577+
static enumString(stringParams: SchemaParams & {
578+
enum: string[];
579+
}): StringSchema;
580+
example?: unknown;
581+
format?: string;
582+
// (undocumented)
583+
static integer(integerParams?: SchemaParams): IntegerSchema;
584+
nullable: boolean;
585+
// (undocumented)
586+
static number(numberParams?: SchemaParams): NumberSchema;
587+
// (undocumented)
588+
static object(objectParams: SchemaParams & {
589+
properties: {
590+
[k: string]: Schema;
591+
};
592+
optionalProperties?: string[];
593+
}): ObjectSchema;
594+
// (undocumented)
595+
static string(stringParams?: SchemaParams): StringSchema;
596+
// @internal
597+
toJSON(): SchemaRequest;
598+
type: SchemaType;
599+
}
600+
601+
// @public
602+
export interface SchemaInterface extends SchemaShared<SchemaInterface> {
603+
type: SchemaType;
604+
}
605+
606+
// @public
607+
export interface SchemaParams extends SchemaShared<SchemaInterface> {
608+
}
609+
610+
// @public
611+
export interface SchemaRequest extends SchemaShared<SchemaRequest> {
612+
required?: string[];
613+
type: SchemaType;
614+
}
615+
616+
// @public
617+
export interface SchemaShared<T> {
618+
// (undocumented)
619+
[key: string]: unknown;
620+
description?: string;
621+
enum?: string[];
622+
example?: unknown;
623+
format?: string;
624+
items?: T;
625+
nullable?: boolean;
626+
properties?: {
627+
[k: string]: T;
628+
};
629+
}
630+
631+
// @public
632+
export enum SchemaType {
633+
ARRAY = "array",
634+
BOOLEAN = "boolean",
635+
INTEGER = "integer",
636+
NUMBER = "number",
637+
OBJECT = "object",
638+
STRING = "string"
639+
}
640+
552641
// @public (undocumented)
553642
export interface Segment {
554643
// (undocumented)
@@ -571,6 +660,15 @@ export interface StartChatParams extends BaseParams {
571660
tools?: Tool[];
572661
}
573662

663+
// @public
664+
export class StringSchema extends Schema {
665+
constructor(schemaParams?: SchemaParams, enumValues?: string[]);
666+
// (undocumented)
667+
enum?: string[];
668+
// @internal (undocumented)
669+
toJSON(): SchemaRequest;
670+
}
671+
574672
// @public
575673
export interface TextPart {
576674
// (undocumented)
@@ -592,6 +690,9 @@ export interface ToolConfig {
592690
functionCallingConfig: FunctionCallingConfig;
593691
}
594692

693+
// @public
694+
export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema;
695+
595696
// @public
596697
export interface UsageMetadata {
597698
// (undocumented)
@@ -616,15 +717,14 @@ export class VertexAIError extends FirebaseError {
616717
readonly code: VertexAIErrorCode;
617718
// (undocumented)
618719
readonly customErrorData?: CustomErrorData | undefined;
619-
// (undocumented)
620-
readonly message: string;
621720
}
622721

623722
// @public
624723
export const enum VertexAIErrorCode {
625724
ERROR = "error",
626725
FETCH_ERROR = "fetch-error",
627726
INVALID_CONTENT = "invalid-content",
727+
INVALID_SCHEMA = "invalid-schema",
628728
NO_API_KEY = "no-api-key",
629729
NO_MODEL = "no-model",
630730
NO_PROJECT_ID = "no-project-id",

config/functions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
},
99
"private": true,
1010
"engines": {
11-
"node": "16"
11+
"node": ">=18.0.0"
1212
}
1313
}

e2e/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@
3838
"webpack": "5.76.0",
3939
"webpack-cli": "4.10.0",
4040
"webpack-dev-server": "4.11.1"
41+
},
42+
"engines": {
43+
"node": ">=18.0.0"
4144
}
4245
}

integration/compat-interop/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
},
2626
"devDependencies": {
2727
"typescript": "4.7.4"
28+
},
29+
"engines": {
30+
"node": ">=18.0.0"
2831
}
2932
}

integration/compat-typings/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
},
1212
"devDependencies": {
1313
"typescript": "4.7.4"
14+
},
15+
"engines": {
16+
"node": ">=18.0.0"
1417
}
15-
}
18+
}

integration/firebase/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
"mocha": "9.2.2",
2222
"npm-run-all": "4.1.5",
2323
"typescript": "4.7.4"
24+
},
25+
"engines": {
26+
"node": ">=18.0.0"
2427
}
2528
}

integration/firestore/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@
3232
"typescript": "4.2.2",
3333
"webpack": "5.76.0",
3434
"webpack-stream": "7.0.0"
35+
},
36+
"engines": {
37+
"node": ">=18.0.0"
3538
}
3639
}

integration/messaging/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"express": "4.19.2",
1616
"geckodriver": "2.0.4",
1717
"mocha": "9.2.2",
18-
"undici": "6.19.7",
1918
"selenium-assistant": "6.1.1"
19+
},
20+
"engines": {
21+
"node": ">=18.0.0"
2022
}
2123
}

0 commit comments

Comments
 (0)