Skip to content

Commit b62e627

Browse files
authored
Merge branch 'v11' into dl/functions-esm-file
2 parents 2188267 + 36cb017 commit b62e627

File tree

116 files changed

+1660
-1519
lines changed

Some content is hidden

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

116 files changed

+1660
-1519
lines changed

.changeset/little-cows-tie.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
'@firebase/installations-compat': patch
3+
'@firebase/remote-config-compat': patch
4+
'@firebase/performance-compat': patch
5+
'@firebase/rules-unit-testing': patch
6+
'@firebase/webchannel-wrapper': patch
7+
'@firebase/analytics-compat': patch
8+
'@firebase/app-check-compat': patch
9+
'@firebase/firestore-compat': patch
10+
'@firebase/functions-compat': patch
11+
'@firebase/messaging-compat': patch
12+
'@firebase/database-compat': patch
13+
'@firebase/storage-compat': patch
14+
'@firebase/installations': patch
15+
'@firebase/remote-config': patch
16+
'@firebase/auth-compat': patch
17+
'@firebase/performance': patch
18+
'@firebase/app-compat': patch
19+
'@firebase/analytics': patch
20+
'@firebase/app-check': patch
21+
'@firebase/component': patch
22+
'@firebase/firestore': patch
23+
'@firebase/functions': patch
24+
'@firebase/messaging': patch
25+
'@firebase/database': patch
26+
'firebase': patch
27+
'@firebase/template': patch
28+
'@firebase/vertexai-preview': patch
29+
'@firebase/storage': patch
30+
'@firebase/logger': patch
31+
'@firebase/auth': patch
32+
'@firebase/util': patch
33+
'@firebase/app': patch
34+
---
35+
36+
Remove ES5 bundles. The minimum required ES version is now ES2017.

common/api-review/vertexai.api.md

Lines changed: 145 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
@@ -19,14 +28,17 @@ export interface BaseParams {
1928

2029
// @public
2130
export enum BlockReason {
22-
// (undocumented)
23-
BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED",
2431
// (undocumented)
2532
OTHER = "OTHER",
2633
// (undocumented)
2734
SAFETY = "SAFETY"
2835
}
2936

37+
// @public
38+
export class BooleanSchema extends Schema {
39+
constructor(schemaParams?: SchemaParams);
40+
}
41+
3042
// @public
3143
export class ChatSession {
3244
// Warning: (ae-forgotten-export) The symbol "ApiSettings" needs to be exported by the entry point index.d.ts
@@ -145,8 +157,6 @@ export interface FileDataPart {
145157

146158
// @public
147159
export enum FinishReason {
148-
// (undocumented)
149-
FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED",
150160
// (undocumented)
151161
MAX_TOKENS = "MAX_TOKENS",
152162
// (undocumented)
@@ -182,8 +192,6 @@ export enum FunctionCallingMode {
182192
// (undocumented)
183193
AUTO = "AUTO",
184194
// (undocumented)
185-
MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
186-
// (undocumented)
187195
NONE = "NONE"
188196
}
189197

@@ -201,44 +209,9 @@ export interface FunctionCallPart {
201209

202210
// @public
203211
export interface FunctionDeclaration {
204-
description?: string;
212+
description: string;
205213
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"
214+
parameters?: ObjectSchemaInterface;
242215
}
243216

244217
// @public
@@ -331,6 +304,7 @@ export interface GenerationConfig {
331304
// (undocumented)
332305
presencePenalty?: number;
333306
responseMimeType?: string;
307+
responseSchema?: TypedSchema | SchemaRequest;
334308
// (undocumented)
335309
stopSequences?: string[];
336310
// (undocumented)
@@ -401,8 +375,6 @@ export interface GroundingMetadata {
401375

402376
// @public (undocumented)
403377
export enum HarmBlockMethod {
404-
// (undocumented)
405-
HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED",
406378
// (undocumented)
407379
PROBABILITY = "PROBABILITY",
408380
// (undocumented)
@@ -418,9 +390,7 @@ export enum HarmBlockThreshold {
418390
// (undocumented)
419391
BLOCK_NONE = "BLOCK_NONE",
420392
// (undocumented)
421-
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
422-
// (undocumented)
423-
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
393+
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
424394
}
425395

426396
// @public
@@ -432,15 +402,11 @@ export enum HarmCategory {
432402
// (undocumented)
433403
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
434404
// (undocumented)
435-
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
436-
// (undocumented)
437-
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED"
405+
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT"
438406
}
439407

440408
// @public
441409
export enum HarmProbability {
442-
// (undocumented)
443-
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
444410
// (undocumented)
445411
HIGH = "HIGH",
446412
// (undocumented)
@@ -460,9 +426,7 @@ export enum HarmSeverity {
460426
// (undocumented)
461427
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
462428
// (undocumented)
463-
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
464-
// (undocumented)
465-
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED"
429+
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE"
466430
}
467431

468432
// @public
@@ -478,6 +442,11 @@ export interface InlineDataPart {
478442
videoMetadata?: VideoMetadata;
479443
}
480444

445+
// @public
446+
export class IntegerSchema extends Schema {
447+
constructor(schemaParams?: SchemaParams);
448+
}
449+
481450
// @public
482451
export interface ModelParams extends BaseParams {
483452
// (undocumented)
@@ -490,6 +459,34 @@ export interface ModelParams extends BaseParams {
490459
tools?: Tool[];
491460
}
492461

462+
// @public
463+
export class NumberSchema extends Schema {
464+
constructor(schemaParams?: SchemaParams);
465+
}
466+
467+
// @public
468+
export class ObjectSchema extends Schema {
469+
constructor(schemaParams: SchemaParams, properties: {
470+
[k: string]: TypedSchema;
471+
}, optionalProperties?: string[]);
472+
// (undocumented)
473+
optionalProperties: string[];
474+
// (undocumented)
475+
properties: {
476+
[k: string]: TypedSchema;
477+
};
478+
// @internal (undocumented)
479+
toJSON(): SchemaRequest;
480+
}
481+
482+
// @public
483+
export interface ObjectSchemaInterface extends SchemaInterface {
484+
// (undocumented)
485+
optionalProperties?: string[];
486+
// (undocumented)
487+
type: SchemaType.OBJECT;
488+
}
489+
493490
// @public
494491
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart;
495492

@@ -499,7 +496,7 @@ export const POSSIBLE_ROLES: readonly ["user", "model", "function", "system"];
499496
// @public
500497
export interface PromptFeedback {
501498
// (undocumented)
502-
blockReason: BlockReason;
499+
blockReason?: BlockReason;
503500
// (undocumented)
504501
blockReasonMessage?: string;
505502
// (undocumented)
@@ -549,6 +546,82 @@ export interface SafetySetting {
549546
threshold: HarmBlockThreshold;
550547
}
551548

549+
// @public
550+
export abstract class Schema implements SchemaInterface {
551+
constructor(schemaParams: SchemaInterface);
552+
[key: string]: unknown;
553+
// (undocumented)
554+
static array(arrayParams: SchemaParams & {
555+
items: Schema;
556+
}): ArraySchema;
557+
// (undocumented)
558+
static boolean(booleanParams?: SchemaParams): BooleanSchema;
559+
description?: string;
560+
// (undocumented)
561+
static enumString(stringParams: SchemaParams & {
562+
enum: string[];
563+
}): StringSchema;
564+
example?: unknown;
565+
format?: string;
566+
// (undocumented)
567+
static integer(integerParams?: SchemaParams): IntegerSchema;
568+
nullable: boolean;
569+
// (undocumented)
570+
static number(numberParams?: SchemaParams): NumberSchema;
571+
// (undocumented)
572+
static object(objectParams: SchemaParams & {
573+
properties: {
574+
[k: string]: Schema;
575+
};
576+
optionalProperties?: string[];
577+
}): ObjectSchema;
578+
// (undocumented)
579+
static string(stringParams?: SchemaParams): StringSchema;
580+
// @internal
581+
toJSON(): SchemaRequest;
582+
type: SchemaType;
583+
}
584+
585+
// @public
586+
export interface SchemaInterface extends SchemaShared<SchemaInterface> {
587+
type: SchemaType;
588+
}
589+
590+
// @public
591+
export interface SchemaParams extends SchemaShared<SchemaInterface> {
592+
}
593+
594+
// @public
595+
export interface SchemaRequest extends SchemaShared<SchemaRequest> {
596+
required?: string[];
597+
type: SchemaType;
598+
}
599+
600+
// @public
601+
export interface SchemaShared<T> {
602+
// (undocumented)
603+
[key: string]: unknown;
604+
description?: string;
605+
enum?: string[];
606+
example?: unknown;
607+
format?: string;
608+
items?: T;
609+
nullable?: boolean;
610+
properties?: {
611+
[k: string]: T;
612+
};
613+
}
614+
615+
// @public
616+
export enum SchemaType {
617+
ARRAY = "array",
618+
BOOLEAN = "boolean",
619+
INTEGER = "integer",
620+
NUMBER = "number",
621+
OBJECT = "object",
622+
STRING = "string"
623+
}
624+
552625
// @public (undocumented)
553626
export interface Segment {
554627
// (undocumented)
@@ -571,6 +644,15 @@ export interface StartChatParams extends BaseParams {
571644
tools?: Tool[];
572645
}
573646

647+
// @public
648+
export class StringSchema extends Schema {
649+
constructor(schemaParams?: SchemaParams, enumValues?: string[]);
650+
// (undocumented)
651+
enum?: string[];
652+
// @internal (undocumented)
653+
toJSON(): SchemaRequest;
654+
}
655+
574656
// @public
575657
export interface TextPart {
576658
// (undocumented)
@@ -589,9 +671,12 @@ export type Tool = FunctionDeclarationsTool;
589671
// @public
590672
export interface ToolConfig {
591673
// (undocumented)
592-
functionCallingConfig: FunctionCallingConfig;
674+
functionCallingConfig?: FunctionCallingConfig;
593675
}
594676

677+
// @public
678+
export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema;
679+
595680
// @public
596681
export interface UsageMetadata {
597682
// (undocumented)
@@ -616,15 +701,15 @@ export class VertexAIError extends FirebaseError {
616701
readonly code: VertexAIErrorCode;
617702
// (undocumented)
618703
readonly customErrorData?: CustomErrorData | undefined;
619-
// (undocumented)
620-
readonly message: string;
621704
}
622705

623706
// @public
624707
export const enum VertexAIErrorCode {
708+
API_NOT_ENABLED = "api-not-enabled",
625709
ERROR = "error",
626710
FETCH_ERROR = "fetch-error",
627711
INVALID_CONTENT = "invalid-content",
712+
INVALID_SCHEMA = "invalid-schema",
628713
NO_API_KEY = "no-api-key",
629714
NO_MODEL = "no-model",
630715
NO_PROJECT_ID = "no-project-id",

0 commit comments

Comments
 (0)