From 040529bffdbb3565ced9cf2216592a9e56b23550 Mon Sep 17 00:00:00 2001 From: Eric Rabinowitz Date: Wed, 12 Oct 2022 14:03:22 -0400 Subject: [PATCH] add configuration typings --- index.d.ts | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..2603418 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,189 @@ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type ErrorCode = string; +export type CloudFunctionRuntime = + | 'nodejs6' + | 'nodejs8' + | 'nodejs10' + | 'nodejs12' + | 'nodejs14' + | 'nodejs16' + | 'python37' + | 'python38' + | 'python39' + | 'go111' + | 'go113' + | 'go116' + | 'java11' + | 'dotnet3' + | 'ruby26' + | 'ruby27'; +export type CloudFunctionMemory = 128 | 256 | 512 | 1024 | 2048 | 4096; +export type CloudFunctionVpcEgress = 'ALL' | 'ALL_TRAFFIC' | 'PRIVATE' | 'PRIVATE_RANGES_ONLY'; +export type CloudFunctionRegion = + | 'us-central1' + | 'us-east1' + | 'us-east4' + | 'europe-west1' + | 'europe-west2' + | 'asia-east1' + | 'asia-east2' + | 'asia-northeast1' + | 'asia-northeast2' + | 'us-west2' + | 'us-west3' + | 'us-west4' + | 'northamerica-northeast1' + | 'southamerica-east1' + | 'europe-west3' + | 'europe-west6' + | 'europe-central2' + | 'australia-southeast1' + | 'asia-south1' + | 'asia-southeast1' + | 'asia-southeast2' + | 'asia-northeast3'; +export type ServiceName = string; + +export interface GCP { + configValidationMode?: 'error' | 'warn' | 'off'; + console?: + | boolean + | { + monitoring?: { + logs?: { + disabled?: boolean; + }; + request?: { + disabled?: boolean; + }; + response?: { + disabled?: boolean; + }; + }; + org?: string; + }; + custom?: { + [k: string]: unknown; + }; + dashboard?: { + disableMonitoring?: boolean; + }; + deprecationNotificationMode?: 'error' | 'warn' | 'warn:summary'; + disabledDeprecations?: '*' | ErrorCode[]; + frameworkVersion?: string; + functions?: { + /** + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^[a-zA-Z0-9-_]+$". + */ + [k: string]: { + name?: string; + events?: ( + | { + __schemaWorkaround__: null; + } + | { + http: string; + } + | { + event: { + eventType: string; + path?: string; + resource: string; + failurePolicy?: { + retry?: { + [k: string]: unknown; + }; + }; + }; + } + )[]; + handler?: string; + runtime?: CloudFunctionRuntime; + serviceAccountEmail?: string; + memorySize?: CloudFunctionMemory; + timeout?: string; + minInstances?: number; + environment?: CloudFunctionEnvironmentVariables; + secrets?: CloudFunctionSecretEnvironmentVariables; + vpc?: string; + vpcEgress?: CloudFunctionVpcEgress; + labels?: ResourceManagerLabels; + }; + }; + package?: { + artifact?: string; + exclude?: string[]; + excludeDevDependencies?: boolean; + include?: string[]; + individually?: boolean; + path?: string; + patterns?: string[]; + }; + params?: { + /** + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^[a-zA-Z0-9-]+$". + */ + [k: string]: { + [k: string]: unknown; + }; + }; + plugins?: + | { + localPath?: string; + modules: string[]; + } + | string[]; + projectDir?: string; + provider: { + name: 'google'; + credentials?: string; + project?: string; + region?: CloudFunctionRegion; + runtime?: CloudFunctionRuntime; + serviceAccountEmail?: string; + memorySize?: CloudFunctionMemory; + timeout?: string; + environment?: CloudFunctionEnvironmentVariables; + secrets?: CloudFunctionSecretEnvironmentVariables; + vpc?: string; + vpcEgress?: CloudFunctionVpcEgress; + labels?: ResourceManagerLabels; + stage?: string; + }; + service: ServiceName; + useDotenv?: true; + variablesResolutionMode?: '20210219' | '20210326'; +} +export interface CloudFunctionEnvironmentVariables { + /** + * This interface was referenced by `CloudFunctionEnvironmentVariables`'s JSON-Schema definition + * via the `patternProperty` "^.*$". + */ + [k: string]: string; +} +export interface CloudFunctionSecretEnvironmentVariables { + /** + * This interface was referenced by `CloudFunctionSecretEnvironmentVariables`'s JSON-Schema definition + * via the `patternProperty` "^[a-zA-Z0-9_]+$". + */ + [k: string]: { + projectId?: string; + secret: string; + version: string; + [k: string]: unknown; + }; +} +export interface ResourceManagerLabels { + /** + * This interface was referenced by `ResourceManagerLabels`'s JSON-Schema definition + * via the `patternProperty` "^[a-z][a-z0-9_.]*$". + */ + [k: string]: string; +}