@dereekb/firebase-server 9.25.16 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/mailgun/package.json +2 -49
- package/package.json +22 -46
- package/src/lib/auth/auth.service.d.ts +1 -2
- package/src/lib/env/env.service.d.ts +0 -4
- package/src/lib/env/env.service.js.map +1 -1
- package/src/lib/firestore/driver.d.ts +1 -1
- package/src/lib/firestore/driver.query.d.ts +1 -1
- package/src/lib/function/assert.d.ts +9 -1
- package/src/lib/function/assert.js +16 -1
- package/src/lib/function/assert.js.map +1 -1
- package/src/lib/function/context.d.ts +1 -1
- package/src/lib/function/error.d.ts +1 -1
- package/src/lib/function/type.d.ts +2 -2
- package/src/lib/nest/app.d.ts +2 -2
- package/src/lib/nest/app.js +1 -1
- package/src/lib/nest/app.js.map +1 -1
- package/src/lib/nest/auth/auth.module.d.ts +2 -2
- package/src/lib/nest/auth/auth.module.js +2 -3
- package/src/lib/nest/auth/auth.module.js.map +1 -1
- package/src/lib/nest/development/development.assert.function.d.ts +1 -1
- package/src/lib/nest/development/development.function.d.ts +2 -2
- package/src/lib/nest/env/env.service.d.ts +0 -4
- package/src/lib/nest/env/env.service.js +2 -9
- package/src/lib/nest/env/env.service.js.map +1 -1
- package/src/lib/nest/env/index.d.ts +0 -2
- package/src/lib/nest/env/index.js +0 -2
- package/src/lib/nest/env/index.js.map +1 -1
- package/src/lib/nest/firestore/firestore.module.d.ts +1 -1
- package/src/lib/nest/firestore/firestore.module.js +4 -6
- package/src/lib/nest/firestore/firestore.module.js.map +1 -1
- package/src/lib/nest/function/call.d.ts +5 -5
- package/src/lib/nest/function/context.d.ts +3 -3
- package/src/lib/nest/function/nest.d.ts +5 -5
- package/src/lib/nest/function/schedule.d.ts +7 -7
- package/src/lib/nest/function/v1/call.d.ts +4 -4
- package/src/lib/nest/function/v1/event.d.ts +12 -12
- package/src/lib/nest/function/v1/schedule.d.ts +3 -3
- package/src/lib/nest/function/v2/blocking.d.ts +6 -6
- package/src/lib/nest/function/v2/call.d.ts +3 -3
- package/src/lib/nest/function/v2/event.d.ts +7 -7
- package/src/lib/nest/function/v2/schedule.d.ts +4 -4
- package/src/lib/nest/function/v2/taskqueue.d.ts +6 -6
- package/src/lib/nest/middleware/appcheck.middleware.js +2 -3
- package/src/lib/nest/middleware/appcheck.middleware.js.map +1 -1
- package/src/lib/nest/middleware/appcheck.module.js +2 -3
- package/src/lib/nest/middleware/appcheck.module.js.map +1 -1
- package/src/lib/nest/middleware/rawbody.middleware.js +2 -3
- package/src/lib/nest/middleware/rawbody.middleware.js.map +1 -1
- package/src/lib/nest/middleware/webhook.js +2 -3
- package/src/lib/nest/middleware/webhook.js.map +1 -1
- package/src/lib/nest/model/create.model.function.d.ts +2 -2
- package/src/lib/nest/model/crud.assert.function.d.ts +1 -1
- package/src/lib/nest/model/delete.model.function.d.ts +2 -2
- package/src/lib/nest/model/read.model.function.d.ts +2 -2
- package/src/lib/nest/model/specifier.function.d.ts +3 -3
- package/src/lib/nest/model/update.model.function.d.ts +2 -2
- package/src/lib/nest/nest.provider.d.ts +5 -5
- package/src/lib/nest/storage/storage.module.d.ts +2 -2
- package/src/lib/nest/storage/storage.module.js +4 -6
- package/src/lib/nest/storage/storage.module.js.map +1 -1
- package/src/lib/storage/driver.accessor.d.ts +2 -2
- package/src/lib/storage/driver.d.ts +1 -1
- package/test/package.json +2 -48
- package/test/src/lib/firebase/firebase.admin.auth.d.ts +6 -6
- package/test/src/lib/firebase/firebase.admin.auth.js +1 -1
- package/test/src/lib/firebase/firebase.admin.auth.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.collection.d.ts +1 -1
- package/test/src/lib/firebase/firebase.admin.collection.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.d.ts +1 -1
- package/test/src/lib/firebase/firebase.admin.function.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.nest.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.nest.function.context.d.ts +4 -4
- package/test/src/lib/firebase/firebase.admin.nest.function.context.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.nest.function.d.ts +3 -3
- package/test/src/lib/firebase/firebase.d.ts +1 -1
- package/test/src/lib/firebase/firebase.function.d.ts +9 -9
- package/test/src/lib/firestore/firestore.admin.d.ts +1 -1
- package/test/src/lib/firestore/firestore.d.ts +1 -1
- package/test/src/lib/storage/storage.admin.d.ts +1 -1
- package/test/src/lib/storage/storage.d.ts +1 -1
- package/src/lib/nest/env/env.config.d.ts +0 -5
- package/src/lib/nest/env/env.config.js +0 -3
- package/src/lib/nest/env/env.config.js.map +0 -1
- package/src/lib/nest/env/env.nest.d.ts +0 -10
- package/src/lib/nest/env/env.nest.js +0 -14
- package/src/lib/nest/env/env.nest.js.map +0 -1
|
@@ -42,20 +42,20 @@ export interface OnScheduleConfig {
|
|
|
42
42
|
export interface OnScheduleRequest<S> {
|
|
43
43
|
scheduleContext?: S;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type OnScheduleWithNestApplicationRequest<S = unknown> = NestApplicationContextRequest<OnScheduleRequest<S>>;
|
|
46
46
|
/**
|
|
47
47
|
* Scheduled function that is passed an INestApplicationContext in addition to the OnScheduleRequest object.
|
|
48
48
|
*/
|
|
49
|
-
export
|
|
50
|
-
export
|
|
49
|
+
export type OnScheduleWithNestApplication<S = unknown> = (request: OnScheduleWithNestApplicationRequest<S>) => PromiseOrValue<void>;
|
|
50
|
+
export type OnScheduleWithNestContextRequest<N, S = unknown> = NestContextRequest<N, OnScheduleRequest<S>>;
|
|
51
51
|
/**
|
|
52
52
|
* Scheduled function that is passed an arbitrary nest context object in addition to the OnScheduleRequest object.
|
|
53
53
|
*/
|
|
54
|
-
export
|
|
54
|
+
export type OnScheduleWithNestContext<N, S = unknown> = (request: OnScheduleWithNestContextRequest<N, S>) => PromiseOrValue<void>;
|
|
55
55
|
export declare function setNestContextOnScheduleRequest<N, S>(makeNestContext: MakeNestContext<N>, request: OnScheduleWithNestApplicationRequest<S>): OnScheduleWithNestContextRequest<N, S>;
|
|
56
|
-
export
|
|
56
|
+
export type NestApplicationScheduleConfiguredFunction<F extends object = object> = F & {
|
|
57
57
|
_runNow(): PromiseOrValue<void>;
|
|
58
58
|
readonly _schedule: OnScheduleConfig;
|
|
59
59
|
};
|
|
60
|
-
export
|
|
61
|
-
export
|
|
60
|
+
export type NestApplicationScheduleConfiguredFunctionFactory<F extends object = object> = NestApplicationFunctionFactory<NestApplicationScheduleConfiguredFunction<F>>;
|
|
61
|
+
export type NestApplicationScheduleConfiguredFunctionMap = Record<string, NestApplicationScheduleConfiguredFunction>;
|
|
@@ -4,12 +4,12 @@ import { RunnableHttpFunction } from '../../../function/type';
|
|
|
4
4
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
5
5
|
import { OnCallWithNestApplication, OnCallWithNestApplicationRequest, OnCallWithNestContext } from '../call';
|
|
6
6
|
export declare function makeOnCallWithNestApplicationRequest<I>(nestApplication: INestApplicationContext, data: I, context: functions.https.CallableContext): OnCallWithNestApplicationRequest<I>;
|
|
7
|
-
export
|
|
7
|
+
export type NestApplicationRunnableHttpFunctionFactory<I> = NestApplicationFunctionFactory<RunnableHttpFunction<I>>;
|
|
8
8
|
/**
|
|
9
9
|
* Factory function for generating a NestApplicationFunctionFactory for a HttpsFunctions/Runnable firebase function.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type OnCallWithNestApplicationFactory = <I = unknown, O = unknown>(fn: OnCallWithNestApplication<I, O>) => NestApplicationRunnableHttpFunctionFactory<I>;
|
|
12
|
+
export type OnCallWithNestApplicationFactoryConfigFunctionBuilderFunction = (builder: functions.FunctionBuilder) => functions.FunctionBuilder;
|
|
13
13
|
/**
|
|
14
14
|
* Creates a factory for generating OnCallWithNestApplication functions.
|
|
15
15
|
*
|
|
@@ -20,7 +20,7 @@ export declare function onCallWithNestApplicationFactory(builderFunction?: OnCal
|
|
|
20
20
|
/**
|
|
21
21
|
* Factory function for generating HttpsFunctions/Runnable firebase function that returns the value from the input OnCallWithNestContext function.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type OnCallWithNestContextFactory<N> = <I = unknown, O = unknown>(fn: OnCallWithNestContext<N, I, O>) => NestApplicationRunnableHttpFunctionFactory<I>;
|
|
24
24
|
/**
|
|
25
25
|
* Creates a factory for generating OnCallWithNestContext functions with a nest context object that is generated by the input function.
|
|
26
26
|
*
|
|
@@ -3,19 +3,19 @@ import * as functions from 'firebase-functions';
|
|
|
3
3
|
import { EventContext } from 'firebase-functions';
|
|
4
4
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
5
5
|
import { NestApplicationContextRequest, NestContextRequest } from '../nest';
|
|
6
|
-
export
|
|
6
|
+
export type EventContextWithData<I> = EventContext & {
|
|
7
7
|
data: I;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
9
|
+
export type FirebaseEventNestApplicationRequest<I> = NestApplicationContextRequest<EventContextWithData<I>>;
|
|
10
|
+
export type FirebaseEventNestContextRequest<N, I> = NestContextRequest<N, EventContextWithData<I>>;
|
|
11
|
+
export type FirebaseEventContextHandler<I = unknown, O = unknown> = (data: I, context: EventContext) => PromiseOrValue<O>;
|
|
12
|
+
export type NestApplicationEventHandler<I = unknown, O = unknown> = (event: FirebaseEventNestApplicationRequest<I>) => PromiseOrValue<O>;
|
|
13
|
+
export type NestApplicationEventHandlerBuilder<I = unknown, O = unknown> = (handler: NestApplicationEventHandler<I, O>) => FirebaseEventContextHandler<I, O>;
|
|
14
|
+
export type OnEventWithNestApplicationBuilder<I = unknown, O = unknown> = (nest: NestApplicationEventHandlerBuilder<I, O>) => functions.CloudFunction<I>;
|
|
15
15
|
/**
|
|
16
16
|
* Factory function for generating a CloudFunctionHandler via a NestApplicationCloudFunctionHandler.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type OnEventWithNestApplicationFactory = <I, O>(fn: OnEventWithNestApplicationBuilder<I, O>) => NestApplicationFunctionFactory<functions.CloudFunction<I>>;
|
|
19
19
|
/**
|
|
20
20
|
* Creates a factory for generating OnEventWithNestApplicationBuilder values.
|
|
21
21
|
*
|
|
@@ -23,16 +23,16 @@ export declare type OnEventWithNestApplicationFactory = <I, O>(fn: OnEventWithNe
|
|
|
23
23
|
* @returns
|
|
24
24
|
*/
|
|
25
25
|
export declare function onEventWithNestApplicationFactory(): OnEventWithNestApplicationFactory;
|
|
26
|
-
export
|
|
27
|
-
export
|
|
26
|
+
export type NestContextEventHandler<N, I = unknown, O = unknown> = (request: FirebaseEventNestContextRequest<N, I>) => Promise<O>;
|
|
27
|
+
export type NestContextEventHandlerBuilder<N, I = unknown, O = unknown> = (handler: NestContextEventHandler<N, I, O>) => FirebaseEventContextHandler<I, O>;
|
|
28
28
|
/**
|
|
29
29
|
* Runnable function that is passed an arbitrary nest context object in addition to the usual data/context provided by firebase.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type OnEventWithNestContextBuilder<N, I = unknown, O = unknown> = (nest: NestContextEventHandlerBuilder<N, I, O>) => functions.CloudFunction<I>;
|
|
32
32
|
/**
|
|
33
33
|
* Factory function for generating a firebase CloudFunction for a specific event.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type OnEventWithNestContextFactory<N> = <I, O = unknown>(fn: OnEventWithNestContextBuilder<N, I, O>) => NestApplicationFunctionFactory<functions.CloudFunction<I>>;
|
|
36
36
|
/**
|
|
37
37
|
* Creates a factory for generating OnCallWithNestContext functions with a nest context object that is generated by the input function.
|
|
38
38
|
*
|
|
@@ -3,11 +3,11 @@ import { INestApplicationContext } from '@nestjs/common';
|
|
|
3
3
|
import { MakeNestContext } from '../../nest.provider';
|
|
4
4
|
import { NestApplicationScheduleConfiguredFunctionFactory, OnScheduleConfig, OnScheduleWithNestApplication, OnScheduleWithNestApplicationRequest, OnScheduleWithNestContext } from '../schedule';
|
|
5
5
|
export declare function makeOnScheduleWithNestApplicationRequest(nestApplication: INestApplicationContext, scheduleContext?: functions.EventContext): OnScheduleWithNestApplicationRequest<functions.EventContext>;
|
|
6
|
-
export
|
|
6
|
+
export type NestApplicationScheduleCloudFunctionFactory<I = unknown> = NestApplicationScheduleConfiguredFunctionFactory<functions.CloudFunction<I>>;
|
|
7
7
|
/**
|
|
8
8
|
* Factory function for generating a NestApplicationFunctionFactory for a HttpsFunctions/Runnable firebase function.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type OnScheduleWithNestApplicationFactory = (schedule: OnScheduleConfig, fn: OnScheduleWithNestApplication<functions.EventContext>) => NestApplicationScheduleCloudFunctionFactory;
|
|
11
11
|
/**
|
|
12
12
|
* Creates a factory for generating OnCallWithNestApplication functions.
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ export declare function onScheduleWithNestApplicationFactory(baseSchedule?: OnSc
|
|
|
18
18
|
/**
|
|
19
19
|
* Factory function for generating HttpsFunctions/Runnable firebase function that returns the value from the input OnCallWithNestContext function.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type OnScheduleWithNestContextFactory<N> = (schedule: OnScheduleConfig, fn: OnScheduleWithNestContext<N, functions.EventContext>) => NestApplicationScheduleCloudFunctionFactory;
|
|
22
22
|
/**
|
|
23
23
|
* Creates a factory for generating OnCallWithNestContext functions with a nest context object that is generated by the input function.
|
|
24
24
|
*
|
|
@@ -2,15 +2,15 @@ import { PromiseOrValue } from '@dereekb/util';
|
|
|
2
2
|
import { BlockingFunction } from 'firebase-functions';
|
|
3
3
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
4
4
|
import { NestContextRequest } from '../nest';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
export type BlockingFunctionNestContextRequest<N, E extends object> = NestContextRequest<N, E>;
|
|
6
|
+
export type BlockingFunctionHandler<E extends object, O = unknown> = (event: E) => PromiseOrValue<O>;
|
|
7
|
+
export type NestContextBlockingFunctionHandler<N, E extends object, O = unknown> = (request: BlockingFunctionNestContextRequest<N, E>) => PromiseOrValue<O>;
|
|
8
|
+
export type NestContextBlockingFunctionHandlerBuilder<N, E extends object, O = unknown> = (handler: NestContextBlockingFunctionHandler<N, E, O>) => BlockingFunctionHandler<E, O>;
|
|
9
|
+
export type BlockingFunctionHandlerWithNestContextBuilder<N, E extends object, O = unknown> = (nest: NestContextBlockingFunctionHandlerBuilder<N, E, O>) => BlockingFunction;
|
|
10
10
|
/**
|
|
11
11
|
* Factory function for generating a firebase BlockingFunction for a specific event.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type BlockingFunctionHandlerWithNestContextFactory<N> = <E extends object, O = unknown>(fn: BlockingFunctionHandlerWithNestContextBuilder<N, E, O>) => NestApplicationFunctionFactory<BlockingFunction>;
|
|
14
14
|
/**
|
|
15
15
|
* Creates a BlockingFunctionHandlerWithNestContextFactory.
|
|
16
16
|
*
|
|
@@ -2,11 +2,11 @@ import { https } from 'firebase-functions/v2';
|
|
|
2
2
|
import { CallableHttpFunction } from '../../../function/type';
|
|
3
3
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
4
4
|
import { OnCallWithNestApplication, OnCallWithNestContext } from '../call';
|
|
5
|
-
export
|
|
5
|
+
export type NestApplicationCallableHttpFunctionFactory<I, O = unknown> = NestApplicationFunctionFactory<CallableHttpFunction<I, O>>;
|
|
6
6
|
/**
|
|
7
7
|
* Factory function for generating a NestApplicationFunctionFactory for a HttpsFunctions/Runnable firebase function.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type OnCallHandlerWithNestApplicationFactory = <I, O>(fn: OnCallWithNestApplication<I, O>) => NestApplicationCallableHttpFunctionFactory<I, O>;
|
|
10
10
|
/**
|
|
11
11
|
* Creates a factory for generating OnCallWithNestApplication functions.
|
|
12
12
|
*
|
|
@@ -17,7 +17,7 @@ export declare function onCallHandlerWithNestApplicationFactory(opts?: https.Cal
|
|
|
17
17
|
/**
|
|
18
18
|
* Factory function for generating HttpsFunctions/Runnable firebase function that returns the value from the input OnCallWithNestContext function.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type OnCallHandlerWithNestContextFactory<C> = <I, O>(fn: OnCallWithNestContext<C, I, O>) => NestApplicationCallableHttpFunctionFactory<I>;
|
|
21
21
|
/**
|
|
22
22
|
* Creates a factory for generating OnCallWithNestContext functions with a nest context object that is generated by the input function.
|
|
23
23
|
*
|
|
@@ -2,16 +2,16 @@ import { PromiseOrValue } from '@dereekb/util';
|
|
|
2
2
|
import { CloudEvent, CloudFunction } from 'firebase-functions/v2';
|
|
3
3
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
4
4
|
import { NestContextRequest } from '../nest';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
5
|
+
export type CloudEventNestContextRequest<N, E extends CloudEvent<unknown>> = NestContextRequest<N, E>;
|
|
6
|
+
export type CloudEventHandler<E extends CloudEvent<unknown>, O = unknown> = (event: E) => PromiseOrValue<O>;
|
|
7
|
+
export type NestContextCloudEventHandler<N, E extends CloudEvent<unknown>, O = unknown> = (request: CloudEventNestContextRequest<N, E>) => PromiseOrValue<O>;
|
|
8
|
+
export type NestContextCloudEventHandlerBuilder<N, E extends CloudEvent<unknown>, O = unknown> = (handler: NestContextCloudEventHandler<N, E, O>) => CloudEventHandler<E, O>;
|
|
9
|
+
export type NestContextCloudEventHandlerWithData<N, I, O = unknown> = NestContextCloudEventHandler<N, CloudEvent<I>, O>;
|
|
10
|
+
export type CloudEventHandlerWithNestContextBuilder<N, E extends CloudEvent<unknown>, O = unknown> = (nest: NestContextCloudEventHandlerBuilder<N, E, O>) => CloudFunction<E>;
|
|
11
11
|
/**
|
|
12
12
|
* Factory function for generating a firebase CloudFunction for a specific event.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type CloudEventHandlerWithNestContextFactory<N> = <E extends CloudEvent<unknown>, O = unknown>(fn: CloudEventHandlerWithNestContextBuilder<N, E, O>) => NestApplicationFunctionFactory<CloudFunction<E>>;
|
|
15
15
|
/**
|
|
16
16
|
* Creates a CloudEventHandlerWithNestContextFactory.
|
|
17
17
|
*
|
|
@@ -3,13 +3,13 @@ import { scheduler } from 'firebase-functions/v2';
|
|
|
3
3
|
import { INestApplicationContext } from '@nestjs/common';
|
|
4
4
|
import { MakeNestContext } from '../../nest.provider';
|
|
5
5
|
import { NestApplicationScheduleConfiguredFunctionFactory, OnScheduleConfig, OnScheduleWithNestApplication, OnScheduleWithNestApplicationRequest, OnScheduleWithNestContext } from '../schedule';
|
|
6
|
-
export
|
|
6
|
+
export type OnScheduleConfigWithGlobalOptions = OnScheduleConfig & GlobalOptions;
|
|
7
7
|
export declare function makeOnScheduleHandlerWithNestApplicationRequest(nestApplication: INestApplicationContext, scheduleContext?: scheduler.ScheduledEvent): OnScheduleWithNestApplicationRequest<scheduler.ScheduledEvent>;
|
|
8
|
-
export
|
|
8
|
+
export type NestApplicationScheduleFunctionFactory = NestApplicationScheduleConfiguredFunctionFactory<scheduler.ScheduleFunction>;
|
|
9
9
|
/**
|
|
10
10
|
* Factory function for generating a NestApplicationFunctionFactory for a HttpsFunctions/Runnable firebase function.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type OnScheduleHandlerWithNestApplicationFactory = (schedule: OnScheduleConfig, fn: OnScheduleWithNestApplication<scheduler.ScheduledEvent>) => NestApplicationScheduleFunctionFactory;
|
|
13
13
|
/**
|
|
14
14
|
* Creates a factory for generating OnCallWithNestApplication functions.
|
|
15
15
|
*
|
|
@@ -20,7 +20,7 @@ export declare function onScheduleHandlerWithNestApplicationFactory(baseSchedule
|
|
|
20
20
|
/**
|
|
21
21
|
* Factory function for generating HttpsFunctions/Runnable firebase function that returns the value from the input OnCallWithNestContext function.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type OnScheduleHandlerWithNestContextFactory<N> = (schedule: OnScheduleConfig, fn: OnScheduleWithNestContext<N, scheduler.ScheduledEvent>) => NestApplicationScheduleFunctionFactory;
|
|
24
24
|
/**
|
|
25
25
|
* Creates a factory for generating OnCallWithNestContext functions with a nest context object that is generated by the input function.
|
|
26
26
|
*
|
|
@@ -2,15 +2,15 @@ import { PromiseOrValue } from '@dereekb/util';
|
|
|
2
2
|
import { TaskQueueFunction, Request } from 'firebase-functions/v2/tasks';
|
|
3
3
|
import { MakeNestContext, NestApplicationFunctionFactory } from '../../nest.provider';
|
|
4
4
|
import { NestContextRequest } from '../nest';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
export type TaskQueueNestContextRequest<N, I> = NestContextRequest<N, Request<I>>;
|
|
6
|
+
export type TaskQueueFunctionHandler<I = unknown> = (taskRequest: Request<I>) => PromiseOrValue<void>;
|
|
7
|
+
export type NestContextTaskQueueFunctionHandler<N, I = unknown> = (request: TaskQueueNestContextRequest<N, I>) => PromiseOrValue<void>;
|
|
8
|
+
export type NestContextTaskQueueFunctionHandlerBuilder<N, I = unknown> = (handler: NestContextTaskQueueFunctionHandler<N, I>) => TaskQueueFunctionHandler<I>;
|
|
9
|
+
export type TaskQueueFunctionHandlerWithNestContextBuilder<N, I = unknown> = (nest: NestContextTaskQueueFunctionHandlerBuilder<N, I>) => TaskQueueFunction<I>;
|
|
10
10
|
/**
|
|
11
11
|
* Factory function for generating a TaskQueueFunction for a specific task.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type TaskQueueFunctionHandlerWithNestContextFactory<N> = <I = unknown>(fn: TaskQueueFunctionHandlerWithNestContextBuilder<N, I>) => NestApplicationFunctionFactory<TaskQueueFunction<I>>;
|
|
14
14
|
/**
|
|
15
15
|
* Creates a TaskQueueFunctionHandlerWithNestContextFactory.
|
|
16
16
|
*
|
|
@@ -11,7 +11,7 @@ const nestjs_1 = require("@dereekb/nestjs");
|
|
|
11
11
|
*
|
|
12
12
|
* It ignores all webhook paths by default.
|
|
13
13
|
*/
|
|
14
|
-
let FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware_1 = class FirebaseAppCheckMiddleware {
|
|
14
|
+
let FirebaseAppCheckMiddleware = exports.FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware_1 = class FirebaseAppCheckMiddleware {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.logger = new common_1.Logger('FirebaseAppCheckMiddleware');
|
|
17
17
|
}
|
|
@@ -36,10 +36,9 @@ let FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware_1 = class FirebaseAp
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware_1 = tslib_1.__decorate([
|
|
39
|
+
exports.FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware_1 = tslib_1.__decorate([
|
|
40
40
|
(0, common_1.Injectable)()
|
|
41
41
|
], FirebaseAppCheckMiddleware);
|
|
42
|
-
exports.FirebaseAppCheckMiddleware = FirebaseAppCheckMiddleware;
|
|
43
42
|
/**
|
|
44
43
|
* Verifies the AppCheck parameter. If it fails, a value is returned.
|
|
45
44
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appcheck.middleware.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/appcheck.middleware.ts"],"names":[],"mappings":";;;;;AAAA,wCAAwC;AACxC,2CAAwF;AAKxF,4CAA4D;AAE5D;;;;GAIG;AAEI,IAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"appcheck.middleware.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/appcheck.middleware.ts"],"names":[],"mappings":";;;;;AAAA,wCAAwC;AACxC,2CAAwF;AAKxF,4CAA4D;AAE5D;;;;GAIG;AAEI,IAAM,0BAA0B,uEAAhC,MAAM,0BAA0B;IAAhC;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA4B,CAAC,CAAC;IA0BrE,CAAC;IAxBC,MAAM,CAAC,gBAAgB,CAAC,GAAY;QAClC,MAAM,cAAc,GAAI,GAAuB,CAAC,YAAY,IAAI,4BAA0B,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtH,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,IAAY;QAC/B,OAAO,IAAI,CAAC,UAAU,CAAC,kCAAyB,CAAC,CAAC;IACpD,CAAC;IAEK,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAuC;;YAC5E,MAAM,cAAc,GAAG,4BAA0B,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAExE,IAAI,KAAmB,CAAC;YAExB,IAAI,CAAC,cAAc,EAAE;gBACnB,KAAK,GAAG,MAAM,uBAAuB,CAAC,GAAG,CAAC,CAAC;gBAE3C,IAAI,KAAK,EAAE;oBACT,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;iBACpD;aACF;YAED,IAAI,CAAC,KAAK,CAAC,CAAC;QACd,CAAC;KAAA;CACF,CAAA;qCA3BY,0BAA0B;IADtC,IAAA,mBAAU,GAAE;GACA,0BAA0B,CA2BtC;AAED;;;;;;;GAOG;AACH,SAAsB,uBAAuB,CAAC,GAAY;;QACxD,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACxD,IAAI,KAAmB,CAAC;QAExB,IAAI,CAAC,aAAa,EAAE;YAClB,KAAK,GAAG,IAAI,2BAAkB,EAAE,CAAC;SAClC;aAAM;YACL,mBAAmB;YACnB,IAAI;gBACF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,KAAK,GAAG,IAAI,2BAAkB,EAAE,CAAC;aAClC;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAhBD,0DAgBC"}
|
|
@@ -7,7 +7,7 @@ const appcheck_middleware_1 = require("./appcheck.middleware");
|
|
|
7
7
|
/**
|
|
8
8
|
* Convenience class that mirrors the ConfigureAppCheckMiddlewareModule class in @dereekb/nestjs, but for Firebase apps.
|
|
9
9
|
*/
|
|
10
|
-
let ConfigureFirebaseAppCheckMiddlewareModule = class ConfigureFirebaseAppCheckMiddlewareModule {
|
|
10
|
+
let ConfigureFirebaseAppCheckMiddlewareModule = exports.ConfigureFirebaseAppCheckMiddlewareModule = class ConfigureFirebaseAppCheckMiddlewareModule {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.logger = new common_1.Logger('ConfigureFirebaseAppCheckMiddlewareModule');
|
|
13
13
|
}
|
|
@@ -16,8 +16,7 @@ let ConfigureFirebaseAppCheckMiddlewareModule = class ConfigureFirebaseAppCheckM
|
|
|
16
16
|
this.logger.debug('Configured firebase webhook routes with proper middleware.');
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
ConfigureFirebaseAppCheckMiddlewareModule = tslib_1.__decorate([
|
|
19
|
+
exports.ConfigureFirebaseAppCheckMiddlewareModule = ConfigureFirebaseAppCheckMiddlewareModule = tslib_1.__decorate([
|
|
20
20
|
(0, common_1.Module)({})
|
|
21
21
|
], ConfigureFirebaseAppCheckMiddlewareModule);
|
|
22
|
-
exports.ConfigureFirebaseAppCheckMiddlewareModule = ConfigureFirebaseAppCheckMiddlewareModule;
|
|
23
22
|
//# sourceMappingURL=appcheck.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appcheck.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/appcheck.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAoE;AACpE,+DAAmE;AAEnE;;GAEG;AAEI,IAAM,yCAAyC,
|
|
1
|
+
{"version":3,"file":"appcheck.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/appcheck.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAoE;AACpE,+DAAmE;AAEnE;;GAEG;AAEI,IAAM,yCAAyC,uDAA/C,MAAM,yCAAyC;IAA/C;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,2CAA2C,CAAC,CAAC;IAMpF,CAAC;IAJQ,SAAS,CAAC,QAA4B;QAC3C,QAAQ,CAAC,KAAK,CAAC,gDAA0B,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAClF,CAAC;CACF,CAAA;oDAPY,yCAAyC;IADrD,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,yCAAyC,CAOrD"}
|
|
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FirebaseRawBodyMiddleware = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
|
-
let FirebaseRawBodyMiddleware = class FirebaseRawBodyMiddleware {
|
|
6
|
+
let FirebaseRawBodyMiddleware = exports.FirebaseRawBodyMiddleware = class FirebaseRawBodyMiddleware {
|
|
7
7
|
use(req, res, next) {
|
|
8
8
|
req.body = req.rawBody;
|
|
9
9
|
next();
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
FirebaseRawBodyMiddleware = tslib_1.__decorate([
|
|
12
|
+
exports.FirebaseRawBodyMiddleware = FirebaseRawBodyMiddleware = tslib_1.__decorate([
|
|
13
13
|
(0, common_1.Injectable)()
|
|
14
14
|
], FirebaseRawBodyMiddleware);
|
|
15
|
-
exports.FirebaseRawBodyMiddleware = FirebaseRawBodyMiddleware;
|
|
16
15
|
//# sourceMappingURL=rawbody.middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rawbody.middleware.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/rawbody.middleware.ts"],"names":[],"mappings":";;;;AAAA,2CAA4D;AAKrD,IAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"rawbody.middleware.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/rawbody.middleware.ts"],"names":[],"mappings":";;;;AAAA,2CAA4D;AAKrD,IAAM,yBAAyB,uCAA/B,MAAM,yBAAyB;IACpC,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAgB;QAC/C,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,IAAI,EAAE,CAAC;IACT,CAAC;CACF,CAAA;oCALY,yBAAyB;IADrC,IAAA,mBAAU,GAAE;GACA,yBAAyB,CAKrC"}
|
|
@@ -10,7 +10,7 @@ const rawbody_middleware_1 = require("./rawbody.middleware");
|
|
|
10
10
|
*
|
|
11
11
|
* Requests to /webhook/* have their request.body value set to the rawBody.
|
|
12
12
|
*/
|
|
13
|
-
let ConfigureFirebaseWebhookMiddlewareModule = class ConfigureFirebaseWebhookMiddlewareModule {
|
|
13
|
+
let ConfigureFirebaseWebhookMiddlewareModule = exports.ConfigureFirebaseWebhookMiddlewareModule = class ConfigureFirebaseWebhookMiddlewareModule {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.logger = new common_1.Logger('ConfigureFirebaseWebhookMiddlewareModule');
|
|
16
16
|
}
|
|
@@ -19,8 +19,7 @@ let ConfigureFirebaseWebhookMiddlewareModule = class ConfigureFirebaseWebhookMid
|
|
|
19
19
|
this.logger.debug('Configured firebase webhook routes with proper middleware.');
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
ConfigureFirebaseWebhookMiddlewareModule = tslib_1.__decorate([
|
|
22
|
+
exports.ConfigureFirebaseWebhookMiddlewareModule = ConfigureFirebaseWebhookMiddlewareModule = tslib_1.__decorate([
|
|
23
23
|
(0, common_1.Module)({})
|
|
24
24
|
], ConfigureFirebaseWebhookMiddlewareModule);
|
|
25
|
-
exports.ConfigureFirebaseWebhookMiddlewareModule = ConfigureFirebaseWebhookMiddlewareModule;
|
|
26
25
|
//# sourceMappingURL=webhook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/webhook.ts"],"names":[],"mappings":";;;;AAAA,4CAAwE;AACxE,2CAAoE;AACpE,6DAAiE;AAEjE;;;;GAIG;AAEI,IAAM,wCAAwC,
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/middleware/webhook.ts"],"names":[],"mappings":";;;;AAAA,4CAAwE;AACxE,2CAAoE;AACpE,6DAAiE;AAEjE;;;;GAIG;AAEI,IAAM,wCAAwC,sDAA9C,MAAM,wCAAwC;IAA9C;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,0CAA0C,CAAC,CAAC;IAMnF,CAAC;IAJQ,SAAS,CAAC,QAA4B;QAC3C,QAAQ,CAAC,KAAK,CAAC,8CAAyB,CAAC,CAAC,SAAS,CAAC,8CAAqC,CAAC,CAAC;QAC3F,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAClF,CAAC;CACF,CAAA;mDAPY,wCAAwC;IADpD,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,wCAAwC,CAOpD"}
|
|
@@ -3,8 +3,8 @@ import { FirestoreModelType, FirestoreModelIdentity, FirestoreModelTypes, OnCall
|
|
|
3
3
|
import { OnCallWithAuthorizedNestContext } from '../function/call';
|
|
4
4
|
import { NestContextCallableRequestWithAuth } from '../function/nest';
|
|
5
5
|
import { AssertModelCrudRequestFunction } from './crud.assert.function';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type OnCallCreateModelFunction<N, I = unknown, O extends OnCallCreateModelResult = OnCallCreateModelResult> = (request: NestContextCallableRequestWithAuth<N, I> & ModelFirebaseCrudFunctionSpecifierRef) => PromiseOrValue<O>;
|
|
7
|
+
export type OnCallCreateModelMap<N, T extends FirestoreModelIdentity = FirestoreModelIdentity> = {
|
|
8
8
|
[K in FirestoreModelTypes<T>]?: OnCallCreateModelFunction<N, any, OnCallCreateModelResult>;
|
|
9
9
|
};
|
|
10
10
|
export interface OnCallCreateModelConfig<N> {
|
|
@@ -9,4 +9,4 @@ export interface AssertModelCrudRequestFunctionContext<N, I = unknown> {
|
|
|
9
9
|
/**
|
|
10
10
|
* Function that asserts something given the input request.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type AssertModelCrudRequestFunction<N, I = unknown> = (context: AssertModelCrudRequestFunctionContext<N, I>) => void;
|
|
@@ -3,8 +3,8 @@ import { FirestoreModelType, FirestoreModelIdentity, FirestoreModelTypes, OnCall
|
|
|
3
3
|
import { NestContextCallableRequestWithAuth } from '../function/nest';
|
|
4
4
|
import { OnCallWithAuthorizedNestContext } from '../function/call';
|
|
5
5
|
import { AssertModelCrudRequestFunction } from './crud.assert.function';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type OnCallDeleteModelFunction<N, I = unknown, O = void> = (request: NestContextCallableRequestWithAuth<N, I> & ModelFirebaseCrudFunctionSpecifierRef) => PromiseOrValue<O>;
|
|
7
|
+
export type OnCallDeleteModelMap<N, T extends FirestoreModelIdentity = FirestoreModelIdentity> = {
|
|
8
8
|
[K in FirestoreModelTypes<T>]?: OnCallDeleteModelFunction<N, any, any>;
|
|
9
9
|
};
|
|
10
10
|
export interface OnCallDeleteModelConfig<N> {
|
|
@@ -3,8 +3,8 @@ import { FirestoreModelType, FirestoreModelIdentity, FirestoreModelTypes, OnCall
|
|
|
3
3
|
import { OnCallWithAuthorizedNestContext } from '../function/call';
|
|
4
4
|
import { NestContextCallableRequestWithAuth } from '../function/nest';
|
|
5
5
|
import { AssertModelCrudRequestFunction } from './crud.assert.function';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type OnCallReadModelFunction<N, I = unknown, O = unknown> = (request: NestContextCallableRequestWithAuth<N, I> & ModelFirebaseCrudFunctionSpecifierRef) => PromiseOrValue<O>;
|
|
7
|
+
export type OnCallReadModelMap<N, T extends FirestoreModelIdentity = FirestoreModelIdentity> = {
|
|
8
8
|
[K in FirestoreModelTypes<T>]?: OnCallReadModelFunction<N, any, any>;
|
|
9
9
|
};
|
|
10
10
|
export interface OnCallReadModelConfig<N> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModelFirebaseCrudFunctionSpecifier, ModelFirebaseCrudFunctionSpecifierRef } from '@dereekb/firebase';
|
|
2
2
|
import { Maybe, PromiseOrValue } from '@dereekb/util';
|
|
3
3
|
import { NestContextCallableRequestWithAuth } from '../function/nest';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type OnCallSpecifierHandlerNestContextRequest<N, I = unknown> = NestContextCallableRequestWithAuth<N, I> & ModelFirebaseCrudFunctionSpecifierRef;
|
|
5
|
+
export type OnCallSpecifierHandlerFunction<N, I = unknown, O = void> = (request: OnCallSpecifierHandlerNestContextRequest<N, I>) => PromiseOrValue<O>;
|
|
6
|
+
export type OnCallSpecifierHandlerConfig<N> = {
|
|
7
7
|
/**
|
|
8
8
|
* The default handler function.
|
|
9
9
|
*/
|
|
@@ -3,8 +3,8 @@ import { FirestoreModelType, FirestoreModelIdentity, FirestoreModelTypes, OnCall
|
|
|
3
3
|
import { OnCallWithAuthorizedNestContext } from '../function/call';
|
|
4
4
|
import { NestContextCallableRequestWithAuth } from '../function/nest';
|
|
5
5
|
import { AssertModelCrudRequestFunction } from './crud.assert.function';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type OnCallUpdateModelFunction<N, I = unknown, O = void> = (request: NestContextCallableRequestWithAuth<N, I> & ModelFirebaseCrudFunctionSpecifierRef) => PromiseOrValue<O>;
|
|
7
|
+
export type OnCallUpdateModelMap<N, T extends FirestoreModelIdentity = FirestoreModelIdentity> = {
|
|
8
8
|
[K in FirestoreModelTypes<T>]?: OnCallUpdateModelFunction<N, any, any>;
|
|
9
9
|
};
|
|
10
10
|
export interface OnCallUpdateModelConfig<N> {
|
|
@@ -9,17 +9,17 @@ import { FirebaseServerActionsContext } from './function/context';
|
|
|
9
9
|
/**
|
|
10
10
|
* Getter for an INestApplicationContext promise. Nest should be initialized when the promise resolves.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type NestApplicationPromiseGetter = Getter<Promise<INestApplicationContext>>;
|
|
13
13
|
/**
|
|
14
14
|
* Generates a function from the passed NestApplicationPromiseGetter/context.
|
|
15
15
|
*
|
|
16
16
|
* This pattern is available to allow generating similar content for differenting contexts, such as production and testing.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type NestApplicationFunctionFactory<F> = (nestAppPromiseGetter: NestApplicationPromiseGetter) => F;
|
|
19
19
|
/**
|
|
20
20
|
* Getter for an INestApplicationContext promise. Nest should be initialized when the promise resolves.
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type MakeNestContext<C> = (nest: INestApplicationContext) => C;
|
|
23
23
|
/**
|
|
24
24
|
* Abstract class that wraps an INestApplicationContext value.
|
|
25
25
|
*/
|
|
@@ -68,10 +68,10 @@ export declare abstract class AbstractFirebaseNestContext<A, Y extends FirebaseM
|
|
|
68
68
|
useModel<T extends FirebaseModelsServiceTypes<Y>, O>(type: T, select: UseModelInput<FirebaseAppModelContext<A>, Y, T, O>): Promise<O>;
|
|
69
69
|
useModel<T extends FirebaseModelsServiceTypes<Y>>(type: T, select: UseModelInputForRolesReader<FirebaseAppModelContext<A>, Y, T>): Promise<FirebaseModelsServiceSelectionResultRolesReader<Y, T>>;
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export type UseModelInputForRolesReader<C extends FirebaseModelServiceContext, Y extends FirebaseModelsService<any, C>, T extends FirebaseModelsServiceTypes<Y>> = Omit<UseFirebaseModelsServiceSelection<Y, T>, 'type' | 'context'> & {
|
|
72
72
|
request: AuthDataRef;
|
|
73
73
|
buildFn?: BuildFunction<C>;
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type UseModelInput<C extends FirebaseModelServiceContext, Y extends FirebaseModelsService<any, C>, T extends FirebaseModelsServiceTypes<Y>, O> = UseModelInputForRolesReader<C, Y, T> & {
|
|
76
76
|
use: UseFirebaseModelsServiceSelectionUseFunction<Y, T, O>;
|
|
77
77
|
};
|
|
@@ -25,11 +25,11 @@ export declare class FirebaseServerStorageModule {
|
|
|
25
25
|
export declare class FirebaseServerStorageContextModule {
|
|
26
26
|
}
|
|
27
27
|
export declare function firebaseServerStorageDefaultBucketIdTokenProvider(input: StorageBucketId | FirebaseStorageContextFactoryConfig): Provider;
|
|
28
|
-
export
|
|
28
|
+
export type ProvideFirebaseServerStorageServiceSimple<T extends FirebaseServerStorageService> = Pick<FactoryProvider<T>, 'provide'> & {
|
|
29
29
|
useFactory: (context: FirebaseStorageContext) => T;
|
|
30
30
|
};
|
|
31
31
|
export declare function defaultProvideFirebaseServerStorageServiceSimple(): ProvideFirebaseServerStorageServiceSimple<FirebaseServerStorageService>;
|
|
32
|
-
export
|
|
32
|
+
export type ProvideFirebaseServerStorageService<T extends FirebaseServerStorageService> = FactoryProvider<T> | ProvideFirebaseServerStorageServiceSimple<T>;
|
|
33
33
|
export declare function provideFirebaseServerStorageService<T extends FirebaseServerStorageService = FirebaseServerStorageService>(provider: ProvideFirebaseServerStorageService<T>): Provider<T>[];
|
|
34
34
|
export interface FirebaseServerStorageModuleMetadataConfig<T extends FirebaseServerStorageService = FirebaseServerStorageService> extends AdditionalModuleMetadata {
|
|
35
35
|
readonly serviceProvider?: ProvideFirebaseServerStorageService<T>;
|
|
@@ -22,9 +22,9 @@ exports.FIREBASE_STORAGE_CONTEXT_FACTORY_CONFIG_TOKEN = 'FIREBASE_STORAGE_CONTEX
|
|
|
22
22
|
/**
|
|
23
23
|
* Nest provider module for Firebase that provides a firestore, etc. from the firestore token.
|
|
24
24
|
*/
|
|
25
|
-
let FirebaseServerStorageModule = class FirebaseServerStorageModule {
|
|
25
|
+
let FirebaseServerStorageModule = exports.FirebaseServerStorageModule = class FirebaseServerStorageModule {
|
|
26
26
|
};
|
|
27
|
-
FirebaseServerStorageModule = tslib_1.__decorate([
|
|
27
|
+
exports.FirebaseServerStorageModule = FirebaseServerStorageModule = tslib_1.__decorate([
|
|
28
28
|
(0, common_1.Module)({
|
|
29
29
|
providers: [
|
|
30
30
|
{
|
|
@@ -36,13 +36,12 @@ FirebaseServerStorageModule = tslib_1.__decorate([
|
|
|
36
36
|
exports: [exports.FIREBASE_STORAGE_TOKEN]
|
|
37
37
|
})
|
|
38
38
|
], FirebaseServerStorageModule);
|
|
39
|
-
exports.FirebaseServerStorageModule = FirebaseServerStorageModule;
|
|
40
39
|
/**
|
|
41
40
|
* Nest provider module for firebase that includes the FirebaseServerStorageModule and provides a value for STORAGE_CONTEXT_TOKEN using the googleCloudStorageContextFactory.
|
|
42
41
|
*/
|
|
43
|
-
let FirebaseServerStorageContextModule = class FirebaseServerStorageContextModule {
|
|
42
|
+
let FirebaseServerStorageContextModule = exports.FirebaseServerStorageContextModule = class FirebaseServerStorageContextModule {
|
|
44
43
|
};
|
|
45
|
-
FirebaseServerStorageContextModule = tslib_1.__decorate([
|
|
44
|
+
exports.FirebaseServerStorageContextModule = FirebaseServerStorageContextModule = tslib_1.__decorate([
|
|
46
45
|
(0, common_1.Module)({
|
|
47
46
|
imports: [FirebaseServerStorageModule],
|
|
48
47
|
providers: [
|
|
@@ -55,7 +54,6 @@ FirebaseServerStorageContextModule = tslib_1.__decorate([
|
|
|
55
54
|
exports: [FirebaseServerStorageModule, exports.FIREBASE_STORAGE_CONTEXT_TOKEN]
|
|
56
55
|
})
|
|
57
56
|
], FirebaseServerStorageContextModule);
|
|
58
|
-
exports.FirebaseServerStorageContextModule = FirebaseServerStorageContextModule;
|
|
59
57
|
// MARK: Token Configuration
|
|
60
58
|
function firebaseServerStorageDefaultBucketIdTokenProvider(input) {
|
|
61
59
|
const config = typeof input === 'string' ? { defaultBucketId: input } : input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/storage/storage.module.ts"],"names":[],"mappings":";;;;AACA,2CAAmG;AACnG,iEAAiE;AACjE,2CAAmJ;AACnJ,4CAA8G;AAG9G,eAAe;AACf;;GAEG;AACU,QAAA,sBAAsB,GAAmB,wBAAwB,CAAC;AAE/E;;GAEG;AACU,QAAA,8BAA8B,GAAmB,gCAAgC,CAAC;AAE/F;;GAEG;AACU,QAAA,6CAA6C,GAAmB,+CAA+C,CAAC;AAE7H;;GAEG;AAWI,IAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"storage.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/storage/storage.module.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,9 +3,9 @@ import { SlashPathFolder } from '@dereekb/util';
|
|
|
3
3
|
import { GetFilesOptions, Storage as GoogleCloudStorage, File as GoogleCloudFile } from '@google-cloud/storage';
|
|
4
4
|
export declare function googleCloudStorageBucketForStorageFilePath(storage: GoogleCloudStorage, path: StoragePath): import("@google-cloud/storage/build/src/bucket").Bucket;
|
|
5
5
|
export declare function googleCloudStorageFileForStorageFilePath(storage: GoogleCloudStorage, path: StoragePath): GoogleCloudFile;
|
|
6
|
-
export
|
|
6
|
+
export type GoogleCloudStorageAccessorFile = FirebaseStorageAccessorFile<GoogleCloudFile>;
|
|
7
7
|
export declare function googleCloudStorageAccessorFile(storage: GoogleCloudStorage, storagePath: StoragePath): GoogleCloudStorageAccessorFile;
|
|
8
|
-
export
|
|
8
|
+
export type GoogleCloudStorageAccessorFolder = FirebaseStorageAccessorFolder<GoogleCloudFile>;
|
|
9
9
|
export interface GoogleCloudListResult {
|
|
10
10
|
files: GoogleCloudFile[];
|
|
11
11
|
nextQuery?: GetFilesOptions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FirebaseStorageDrivers } from '@dereekb/firebase';
|
|
2
|
-
export
|
|
2
|
+
export type GoogleCloudFirebaseStorageDrivers = FirebaseStorageDrivers;
|
|
3
3
|
export declare function googleCloudFirebaseStorageDrivers(): GoogleCloudFirebaseStorageDrivers;
|