mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-04 22:17:22 +00:00
apps
data analysis
website
functions
node_modules
.bin
@types
accepts
array-flatten
body-parser
buffer-equal-constant-time
bytes
content-disposition
content-type
cookie
cookie-signature
cors
debug
depd
destroy
ecdsa-sig-formatter
ee-first
encodeurl
escape-html
etag
express
finalhandler
firebase-functions
lib
providers
analytics.d.ts
analytics.js
auth.d.ts
auth.js
crashlytics.d.ts
crashlytics.js
database.d.ts
database.js
firestore.d.ts
firestore.js
https.d.ts
https.js
pubsub.d.ts
pubsub.js
remoteConfig.d.ts
remoteConfig.js
storage.d.ts
storage.js
apps.d.ts
apps.js
cloud-functions.d.ts
cloud-functions.js
config.d.ts
config.js
encoder.d.ts
encoder.js
function-builder.d.ts
function-builder.js
index.d.ts
index.js
utils.d.ts
utils.js
.npmignore
.prettierrc
LICENSE
README.md
changelog.txt
package.json
upgrade-warning
forwarded
fresh
http-errors
iconv-lite
inherits
ipaddr.js
jsonwebtoken
jwa
jws
lodash
lodash.includes
lodash.isboolean
lodash.isinteger
lodash.isnumber
lodash.isplainobject
lodash.isstring
lodash.once
media-typer
merge-descriptors
methods
mime
mime-db
mime-types
ms
negotiator
npm
object-assign
on-finished
parseurl
path-to-regexp
proxy-addr
qs
range-parser
raw-body
safe-buffer
safer-buffer
send
serve-static
setprototypeof
statuses
type-is
unpipe
utils-merge
vary
public
.firebaserc
.gitignore
.runtimeconfig.json
firebase.json
firestore.indexes.json
firestore.rules
package-lock.json
.gitattributes
.gitignore
86 lines
2.9 KiB
TypeScript
86 lines
2.9 KiB
TypeScript
import { CloudFunction, EventContext } from '../cloud-functions';
|
|
/**
|
|
* The optional bucket function allows you to choose which buckets' events to handle.
|
|
* This step can be bypassed by calling object() directly, which will use the default
|
|
* Cloud Storage for Firebase bucket.
|
|
* @param bucket Name of the Google Cloud Storage bucket to listen to.
|
|
*/
|
|
export declare function bucket(bucket?: string): BucketBuilder;
|
|
/**
|
|
* Handle events related to Cloud Storage objects.
|
|
*/
|
|
export declare function object(): ObjectBuilder;
|
|
export declare class BucketBuilder {
|
|
private triggerResource;
|
|
private opts;
|
|
/** Handle events for objects in this bucket. */
|
|
object(): ObjectBuilder;
|
|
}
|
|
export declare class ObjectBuilder {
|
|
private triggerResource;
|
|
private opts;
|
|
/** Respond to archiving of an object, this is only for buckets that enabled object versioning. */
|
|
onArchive(handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any): CloudFunction<ObjectMetadata>;
|
|
/** Respond to the deletion of an object (not to archiving, if object versioning is enabled). */
|
|
onDelete(handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any): CloudFunction<ObjectMetadata>;
|
|
/** Respond to the successful creation of an object. */
|
|
onFinalize(handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any): CloudFunction<ObjectMetadata>;
|
|
/** Respond to metadata updates of existing objects. */
|
|
onMetadataUpdate(handler: (object: ObjectMetadata, context: EventContext) => PromiseLike<any> | any): CloudFunction<ObjectMetadata>;
|
|
private onOperation(handler, eventType);
|
|
}
|
|
export interface ObjectMetadata {
|
|
kind: string;
|
|
id: string;
|
|
bucket: string;
|
|
storageClass: string;
|
|
size: string;
|
|
timeCreated: string;
|
|
updated: string;
|
|
selfLink?: string;
|
|
name?: string;
|
|
generation?: string;
|
|
contentType?: string;
|
|
metageneration?: string;
|
|
timeDeleted?: string;
|
|
timeStorageClassUpdated?: string;
|
|
md5Hash?: string;
|
|
mediaLink?: string;
|
|
contentEncoding?: string;
|
|
contentDisposition?: string;
|
|
contentLanguage?: string;
|
|
cacheControl?: string;
|
|
metadata?: {
|
|
[key: string]: string;
|
|
};
|
|
acl?: [{
|
|
kind?: string;
|
|
id?: string;
|
|
selfLink?: string;
|
|
bucket?: string;
|
|
object?: string;
|
|
generation?: string;
|
|
entity?: string;
|
|
role?: string;
|
|
email?: string;
|
|
entityId?: string;
|
|
domain?: string;
|
|
projectTeam?: {
|
|
projectNumber?: string;
|
|
team?: string;
|
|
};
|
|
etag?: string;
|
|
}];
|
|
owner?: {
|
|
entity?: string;
|
|
entityId?: string;
|
|
};
|
|
crc32c?: string;
|
|
componentCount?: string;
|
|
etag?: string;
|
|
customerEncryption?: {
|
|
encryptionAlgorithm?: string;
|
|
keySha256?: string;
|
|
};
|
|
}
|