mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 13:56:01 +00:00
Modules
This commit is contained in:
39
node_modules/@firebase/functions/dist/src/api/error.d.ts
generated
vendored
Normal file
39
node_modules/@firebase/functions/dist/src/api/error.d.ts
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { HttpsError, FunctionsErrorCode } from '@firebase/functions-types';
|
||||
import { Serializer } from '../serializer';
|
||||
import { HttpResponseBody } from './service';
|
||||
/**
|
||||
* An explicit error that can be thrown from a handler to send an error to the
|
||||
* client that called the function.
|
||||
*/
|
||||
export declare class HttpsErrorImpl extends Error implements HttpsError {
|
||||
/**
|
||||
* A standard error code that will be returned to the client. This also
|
||||
* determines the HTTP status code of the response, as defined in code.proto.
|
||||
*/
|
||||
readonly code: FunctionsErrorCode;
|
||||
/**
|
||||
* Extra data to be converted to JSON and included in the error response.
|
||||
*/
|
||||
readonly details?: unknown;
|
||||
constructor(code: FunctionsErrorCode, message?: string, details?: unknown);
|
||||
}
|
||||
/**
|
||||
* Takes an HTTP response and returns the corresponding Error, if any.
|
||||
*/
|
||||
export declare function _errorForResponse(status: number, bodyJSON: HttpResponseBody | null, serializer: Serializer): Error | null;
|
90
node_modules/@firebase/functions/dist/src/api/service.d.ts
generated
vendored
Normal file
90
node_modules/@firebase/functions/dist/src/api/service.d.ts
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app-types';
|
||||
import { FirebaseService } from '@firebase/app-types/private';
|
||||
import { FirebaseFunctions, HttpsCallable, HttpsCallableOptions } from '@firebase/functions-types';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
||||
import { FirebaseMessagingName } from '@firebase/messaging-types';
|
||||
/**
|
||||
* Describes the shape of the HttpResponse body.
|
||||
* It makes functions that would otherwise take {} able to access the
|
||||
* possible elements in the body more easily
|
||||
*/
|
||||
export interface HttpResponseBody {
|
||||
data?: unknown;
|
||||
result?: unknown;
|
||||
error?: {
|
||||
message?: unknown;
|
||||
status?: unknown;
|
||||
details?: unknown;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* The main class for the Firebase Functions SDK.
|
||||
*/
|
||||
export declare class Service implements FirebaseFunctions, FirebaseService {
|
||||
private app_;
|
||||
private region_;
|
||||
private readonly contextProvider;
|
||||
private readonly serializer;
|
||||
private emulatorOrigin;
|
||||
private cancelAllRequests;
|
||||
private deleteService;
|
||||
/**
|
||||
* Creates a new Functions service for the given app and (optional) region.
|
||||
* @param app_ The FirebaseApp to use.
|
||||
* @param region_ The region to call functions in.
|
||||
*/
|
||||
constructor(app_: FirebaseApp, authProvider: Provider<FirebaseAuthInternalName>, messagingProvider: Provider<FirebaseMessagingName>, region_?: string);
|
||||
get app(): FirebaseApp;
|
||||
INTERNAL: {
|
||||
delete: () => Promise<void>;
|
||||
};
|
||||
/**
|
||||
* Returns the URL for a callable with the given name.
|
||||
* @param name The name of the callable.
|
||||
*/
|
||||
_url(name: string): string;
|
||||
/**
|
||||
* Changes this instance to point to a Cloud Functions emulator running
|
||||
* locally. See https://firebase.google.com/docs/functions/local-emulator
|
||||
*
|
||||
* @param origin The origin of the local emulator, such as
|
||||
* "http://localhost:5005".
|
||||
*/
|
||||
useFunctionsEmulator(origin: string): void;
|
||||
/**
|
||||
* Returns a reference to the callable https trigger with the given name.
|
||||
* @param name The name of the trigger.
|
||||
*/
|
||||
httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable;
|
||||
/**
|
||||
* Does an HTTP POST and returns the completed response.
|
||||
* @param url The url to post to.
|
||||
* @param body The JSON body of the post.
|
||||
* @param headers The HTTP headers to include in the request.
|
||||
* @return A Promise that will succeed when the request finishes.
|
||||
*/
|
||||
private postJSON;
|
||||
/**
|
||||
* Calls a callable function asynchronously and returns the result.
|
||||
* @param name The name of the callable trigger.
|
||||
* @param data The data to pass as params to the function.s
|
||||
*/
|
||||
private call;
|
||||
}
|
18
node_modules/@firebase/functions/dist/src/config.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/functions/dist/src/config.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { _FirebaseNamespace } from '@firebase/app-types/private';
|
||||
export declare function registerFunctions(instance: _FirebaseNamespace): void;
|
21
node_modules/@firebase/functions/dist/src/context.d.ts
generated
vendored
Normal file
21
node_modules/@firebase/functions/dist/src/context.d.ts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import { FirebaseMessagingName } from '@firebase/messaging-types';
|
||||
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
||||
import { Provider } from '@firebase/component';
|
||||
/**
|
||||
* The metadata that should be supplied with function calls.
|
||||
*/
|
||||
export interface Context {
|
||||
authToken?: string;
|
||||
instanceIdToken?: string;
|
||||
}
|
||||
/**
|
||||
* Helper class to get metadata that should be included with a function call.
|
||||
*/
|
||||
export declare class ContextProvider {
|
||||
private auth;
|
||||
private messaging;
|
||||
constructor(authProvider: Provider<FirebaseAuthInternalName>, messagingProvider: Provider<FirebaseMessagingName>);
|
||||
getAuthToken(): Promise<string | undefined>;
|
||||
getInstanceIdToken(): Promise<string | undefined>;
|
||||
getContext(): Promise<Context>;
|
||||
}
|
20
node_modules/@firebase/functions/dist/src/serializer.d.ts
generated
vendored
Normal file
20
node_modules/@firebase/functions/dist/src/serializer.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare class Serializer {
|
||||
encode(data: unknown): unknown;
|
||||
decode(json: unknown): unknown;
|
||||
}
|
Reference in New Issue
Block a user