Skip to content

Commit 8a1ffdc

Browse files
authored
Re-export manifest types for use by internal packages. (#1260)
1 parent a322b2e commit 8a1ffdc

File tree

6 files changed

+26
-16
lines changed

6 files changed

+26
-16
lines changed

src/params/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,14 @@ export type ParamSpec<T extends string | number | boolean | string[]> = {
226226
input?: ParamInput<T>;
227227
};
228228

229-
// N.B: a WireParamSpec is just a ParamSpec with default expressions converted into a CEL literal
230-
/** @internal */
229+
/**
230+
* Representation of parameters for the stack over the wire.
231+
*
232+
* @remarks
233+
* N.B: a WireParamSpec is just a ParamSpec with default expressions converted into a CEL literal
234+
*
235+
* @alpha
236+
*/
231237
export type WireParamSpec<T extends string | number | boolean | string[]> = {
232238
name: string;
233239
default?: T | string;

src/runtime/manifest.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { WireParamSpec } from "../params/types";
2727
/**
2828
* An definition of a function as appears in the Manifest.
2929
*
30-
* @internal
30+
* @alpha
3131
*/
3232
export interface ManifestEndpoint {
3333
entryPoint?: string;
@@ -102,15 +102,18 @@ export interface ManifestEndpoint {
102102
};
103103
}
104104

105-
/** @internal */
105+
/**
106+
* Description of API required for this stack.
107+
* @alpha
108+
*/
106109
export interface ManifestRequiredAPI {
107110
api: string;
108111
reason: string;
109112
}
110113

111114
/**
112115
* An definition of a function deployment as appears in the Manifest.
113-
* @internal
116+
* @alpha
114117
*/
115118
export interface ManifestStack {
116119
specVersion: "v1alpha1";
@@ -123,7 +126,8 @@ export interface ManifestStack {
123126
* Returns the JSON representation of a ManifestStack, which has CEL
124127
* expressions in its options as object types, with its expressions
125128
* transformed into the actual CEL strings.
126-
* @internal
129+
*
130+
* @alpha
127131
*/
128132
export function stackToWire(stack: ManifestStack): Record<string, unknown> {
129133
const wireStack = stack as any;

src/v1/cloud-functions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ export interface Runnable<T> {
239239
export interface HttpsFunction {
240240
(req: Request, resp: Response): void | Promise<void>;
241241

242-
/** @internal */
242+
/** @alpha */
243243
__endpoint: ManifestEndpoint;
244244

245-
/** @internal */
245+
/** @alpha */
246246
__requiredAPIs?: ManifestRequiredAPI[];
247247
}
248248

@@ -259,10 +259,10 @@ export interface BlockingFunction {
259259
/** @public */
260260
(req: Request, resp: Response): void | Promise<void>;
261261

262-
/** @internal */
262+
/** @alpha */
263263
__endpoint: ManifestEndpoint;
264264

265-
/** @internal */
265+
/** @alpha */
266266
__requiredAPIs?: ManifestRequiredAPI[];
267267
}
268268

@@ -276,10 +276,10 @@ export interface BlockingFunction {
276276
export interface CloudFunction<T> extends Runnable<T> {
277277
(input: any, context?: any): PromiseLike<any> | any;
278278

279-
/** @internal */
279+
/** @alpha */
280280
__endpoint: ManifestEndpoint;
281281

282-
/** @internal */
282+
/** @alpha */
283283
__requiredAPIs?: ManifestRequiredAPI[];
284284
}
285285

src/v1/providers/tasks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ export interface TaskQueueOptions {
6565
export interface TaskQueueFunction {
6666
(req: Request, res: express.Response): Promise<void>;
6767

68-
/** @internal */
68+
/** @alpha */
6969
__endpoint: ManifestEndpoint;
7070

71-
/** @internal */
71+
/** @alpha */
7272
__requiredAPIs?: ManifestRequiredAPI[];
7373

7474
/**

src/v2/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export interface CloudEvent<T> {
7070
export interface CloudFunction<EventType extends CloudEvent<unknown>> {
7171
(raw: CloudEvent<unknown>): any | Promise<any>;
7272

73-
/** @internal */
73+
/** @alpha */
7474
__endpoint: ManifestEndpoint;
7575

7676
/**

src/v2/providers/https.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export type HttpsFunction = ((
173173
/** An Express response object, for this function to respond to callers. */
174174
res: express.Response
175175
) => void | Promise<void>) & {
176-
/** @internal */
176+
/** @alpha */
177177
__endpoint: ManifestEndpoint;
178178
};
179179

0 commit comments

Comments
 (0)