@dereekb/firebase-server 13.12.3 → 13.12.4
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/index.cjs.js +86 -18
- package/index.esm.js +85 -19
- package/mailgun/index.cjs.js +6 -3
- package/mailgun/index.esm.js +6 -3
- package/mailgun/package.json +9 -9
- package/mcp/index.cjs.js +10 -8
- package/mcp/index.esm.js +11 -9
- package/mcp/package.json +11 -11
- package/mcp/src/lib/service/analytics/mcp.analytics.config.d.ts +5 -3
- package/mcp/src/lib/service/analytics/mcp.analytics.service.d.ts +3 -2
- package/model/package.json +9 -9
- package/oidc/index.cjs.js +116 -8
- package/oidc/index.esm.js +115 -10
- package/oidc/package.json +10 -10
- package/oidc/src/lib/oidc.config.d.ts +40 -2
- package/oidc/src/lib/oidc.module.d.ts +39 -2
- package/oidc/src/lib/service/oidc.client.service.d.ts +12 -4
- package/package.json +10 -10
- package/src/lib/auth/auth.service.d.ts +84 -17
- package/test/index.cjs.js +29 -0
- package/test/index.esm.js +29 -0
- package/test/package.json +11 -11
- package/test/src/lib/firebase/firebase.admin.auth.d.ts +22 -0
- package/twilio/package.json +8 -8
- package/zoho/package.json +9 -9
|
@@ -13,14 +13,19 @@ export declare class OidcClientService {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new OIDC client through the oidc-provider.
|
|
15
15
|
*
|
|
16
|
-
* Generates `client_id` and `client_secret` using the
|
|
17
|
-
* registration flow, validates via `Client.validate`, and
|
|
16
|
+
* Generates `client_id` (and, when the auth method requires one, a `client_secret`) using the
|
|
17
|
+
* same defaults as oidc-provider's registration flow, validates via `Client.validate`, and
|
|
18
|
+
* persists through the adapter.
|
|
19
|
+
*
|
|
20
|
+
* A secret is only generated when `ProviderClient.needsSecret()` returns `true`. The secret-less
|
|
21
|
+
* methods `private_key_jwt` and `'none'` (public PKCE client) therefore persist no secret and the
|
|
22
|
+
* returned `client_secret` is `undefined`.
|
|
18
23
|
*
|
|
19
24
|
* @param params - Client registration parameters.
|
|
20
25
|
* @param validatedMetadata - Optional pre-validated metadata to merge into the client properties.
|
|
21
26
|
* Use this for server-side fields (e.g., inline `jwks`) that have already been validated
|
|
22
27
|
* and should not be exposed through the API params.
|
|
23
|
-
* @returns The generated client ID and secret (plaintext, returned only once).
|
|
28
|
+
* @returns The generated client ID and, for secret-based methods, the secret (plaintext, returned only once).
|
|
24
29
|
*/
|
|
25
30
|
createClient(params: CreateOidcClientParams, validatedMetadata?: Partial<Pick<ClientMetadata, 'jwks'>>): Promise<CreateOidcClientResult>;
|
|
26
31
|
/**
|
|
@@ -42,9 +47,12 @@ export declare class OidcClientService {
|
|
|
42
47
|
* Generates a new `client_secret`, re-validates via `Client.validate()`, and persists.
|
|
43
48
|
* The new secret is returned in plaintext — this is the only time it is available.
|
|
44
49
|
*
|
|
50
|
+
* Rejects public PKCE clients (`token_endpoint_auth_method === 'none'`): they have no secret,
|
|
51
|
+
* so there is nothing to rotate.
|
|
52
|
+
*
|
|
45
53
|
* @param clientId - The client's document/adapter entry ID.
|
|
46
54
|
* @returns The client ID and new secret (plaintext, returned only once).
|
|
47
|
-
* @throws {Error} When the client is not found.
|
|
55
|
+
* @throws {Error} When the client is not found, or is a public PKCE (`none`) client.
|
|
48
56
|
*/
|
|
49
57
|
rotateClientSecret(clientId: OidcEntryClientId): Promise<RotateOidcClientSecretResult>;
|
|
50
58
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"exports": {
|
|
6
6
|
"./test": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"types": "./src/index.d.ts",
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@cantoo/pdf-lib": "^2.6.5",
|
|
60
|
-
"@dereekb/analytics": "13.12.
|
|
61
|
-
"@dereekb/date": "13.12.
|
|
62
|
-
"@dereekb/dbx-core": "13.12.
|
|
63
|
-
"@dereekb/firebase": "13.12.
|
|
64
|
-
"@dereekb/model": "13.12.
|
|
65
|
-
"@dereekb/nestjs": "13.12.
|
|
66
|
-
"@dereekb/rxjs": "13.12.
|
|
67
|
-
"@dereekb/util": "13.12.
|
|
68
|
-
"@dereekb/zoho": "13.12.
|
|
60
|
+
"@dereekb/analytics": "13.12.4",
|
|
61
|
+
"@dereekb/date": "13.12.4",
|
|
62
|
+
"@dereekb/dbx-core": "13.12.4",
|
|
63
|
+
"@dereekb/firebase": "13.12.4",
|
|
64
|
+
"@dereekb/model": "13.12.4",
|
|
65
|
+
"@dereekb/nestjs": "13.12.4",
|
|
66
|
+
"@dereekb/rxjs": "13.12.4",
|
|
67
|
+
"@dereekb/util": "13.12.4",
|
|
68
|
+
"@dereekb/zoho": "13.12.4",
|
|
69
69
|
"@google-cloud/firestore": "^7.11.6",
|
|
70
70
|
"@google-cloud/storage": "^7.19.0",
|
|
71
71
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
@@ -669,23 +669,82 @@ export interface FirebaseServerAuthPasswordResetSendContentConfig<D = unknown> {
|
|
|
669
669
|
*/
|
|
670
670
|
readonly data?: Maybe<D>;
|
|
671
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
* Opaque composite token returned to the user during a password reset. Encodes both
|
|
674
|
+
* the raw reset code and the target uid in a single value so the completion call does
|
|
675
|
+
* not need a separate uid argument (which a logged-out forgot-password flow cannot provide).
|
|
676
|
+
*
|
|
677
|
+
* The on-the-wire shape is `<code>-<uid>`. The raw code is the numeric string produced by
|
|
678
|
+
* {@link DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR}, so the first `-` cleanly splits the token.
|
|
679
|
+
* Do not split or mutate the token outside of {@link decodeFirebaseServerUserPasswordResetOobCode}.
|
|
680
|
+
*/
|
|
681
|
+
export type FirebaseServerUserPasswordResetOobCode = string & {
|
|
682
|
+
__firebaseServerUserPasswordResetOobCode: true;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Builds the composite oob code from a raw reset code (the numeric value stored in
|
|
686
|
+
* {@link FirebaseServerAuthResetUserPasswordClaims.resetPassword}) and the target user's uid.
|
|
687
|
+
*
|
|
688
|
+
* @param uid - The target user's UID.
|
|
689
|
+
* @param code - The raw reset code from the user's claims.
|
|
690
|
+
*
|
|
691
|
+
* @example
|
|
692
|
+
* ```typescript
|
|
693
|
+
* const oobCode = encodeFirebaseServerUserPasswordResetOobCode(user.uid, claims.resetPassword);
|
|
694
|
+
* // e.g. '482910-abcDEF123'
|
|
695
|
+
* ```
|
|
696
|
+
*/
|
|
697
|
+
export declare function encodeFirebaseServerUserPasswordResetOobCode(uid: FirebaseAuthUserId, code: string): FirebaseServerUserPasswordResetOobCode;
|
|
698
|
+
/**
|
|
699
|
+
* Decodes a composite oob code back into its `{ uid, code }` parts. Returns `undefined`
|
|
700
|
+
* when the token is malformed (missing separator, non-numeric code, empty uid).
|
|
701
|
+
*
|
|
702
|
+
* @param token - The composite oob token, typically received from the password-reset email.
|
|
703
|
+
*
|
|
704
|
+
* @example
|
|
705
|
+
* ```typescript
|
|
706
|
+
* const decoded = decodeFirebaseServerUserPasswordResetOobCode('482910-abcDEF123');
|
|
707
|
+
* // decoded = { uid: 'abcDEF123', code: '482910' }
|
|
708
|
+
* ```
|
|
709
|
+
*/
|
|
710
|
+
export declare function decodeFirebaseServerUserPasswordResetOobCode(token: string): {
|
|
711
|
+
uid: FirebaseAuthUserId;
|
|
712
|
+
code: string;
|
|
713
|
+
} | undefined;
|
|
672
714
|
/**
|
|
673
715
|
* Details about a user that is in the password reset phase, including their user context,
|
|
674
|
-
* reset claims data, and the send configuration that was used.
|
|
716
|
+
* reset claims data, the encoded oob code intended for the user, and the send configuration that was used.
|
|
675
717
|
*/
|
|
676
718
|
export interface FirebaseServerAuthPasswordResetDetails<U extends FirebaseServerAuthUserContext = FirebaseServerAuthUserContext, D = unknown> extends FirebaseServerAuthPasswordResetSendContentConfig<D> {
|
|
677
719
|
readonly userContext: U;
|
|
678
720
|
readonly claims: FirebaseAuthResetUserPasswordClaimsData;
|
|
721
|
+
/**
|
|
722
|
+
* The encoded oob code intended for the user (carries the raw reset code AND the target uid).
|
|
723
|
+
* Subclasses that send password-reset emails should embed this value, not `claims.resetPassword`.
|
|
724
|
+
*/
|
|
725
|
+
readonly oobCode: FirebaseServerUserPasswordResetOobCode;
|
|
679
726
|
}
|
|
680
727
|
/**
|
|
681
|
-
*
|
|
682
|
-
* and the
|
|
728
|
+
* Result of {@link FirebaseServerUserPasswordResetService.beginPasswordReset}, exposing both the
|
|
729
|
+
* stored reset claims and the encoded composite oob code intended for the user.
|
|
730
|
+
*/
|
|
731
|
+
export interface FirebaseServerAuthBeginPasswordResetResult {
|
|
732
|
+
readonly claims: FirebaseServerAuthResetUserPasswordClaims;
|
|
733
|
+
/**
|
|
734
|
+
* The encoded oob code that should be delivered to the user (e.g. embedded in the reset email).
|
|
735
|
+
*/
|
|
736
|
+
readonly oobCode: FirebaseServerUserPasswordResetOobCode;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Input for completing a password reset, containing the composite oob code from the recovery email
|
|
740
|
+
* (which encodes both the temporary reset code AND the target uid) and the desired new password.
|
|
683
741
|
*/
|
|
684
742
|
export interface FirebaseServerAuthCompletePasswordResetInput {
|
|
685
743
|
/**
|
|
686
|
-
* The
|
|
744
|
+
* The full oob token from the recovery email — encodes both the raw reset code AND the target uid.
|
|
745
|
+
* The service decodes this internally to resolve the user and verify the embedded code.
|
|
687
746
|
*/
|
|
688
|
-
readonly
|
|
747
|
+
readonly oobCode: FirebaseServerUserPasswordResetOobCode;
|
|
689
748
|
/**
|
|
690
749
|
* The new password to set after verification succeeds.
|
|
691
750
|
*/
|
|
@@ -700,9 +759,9 @@ export interface FirebaseServerAuthCompletePasswordResetInput {
|
|
|
700
759
|
* @example
|
|
701
760
|
* ```typescript
|
|
702
761
|
* const resetSvc = authService.passwordReset();
|
|
703
|
-
* const
|
|
704
|
-
* // Later, after user
|
|
705
|
-
* await resetSvc.completePasswordReset(
|
|
762
|
+
* const { oobCode } = await resetSvc.beginPasswordReset({ uid: 'some-uid', sendResetContent: true });
|
|
763
|
+
* // Later, after the user clicks the link in their reset email:
|
|
764
|
+
* await resetSvc.completePasswordReset({ oobCode, newPassword: 'newSecure' });
|
|
706
765
|
* ```
|
|
707
766
|
*/
|
|
708
767
|
export interface FirebaseServerUserPasswordResetService<D = unknown, U extends FirebaseServerAuthUserContext = FirebaseServerAuthUserContext> {
|
|
@@ -713,13 +772,16 @@ export interface FirebaseServerUserPasswordResetService<D = unknown, U extends F
|
|
|
713
772
|
* When `sendResetContent` is true, this method delegates to {@link sendResetContent} and
|
|
714
773
|
* may throw the same errors (throttle, send-once, no-config) depending on the configuration.
|
|
715
774
|
*
|
|
775
|
+
* Returns both the stored reset claims and the encoded composite oob code that should be
|
|
776
|
+
* delivered to the user (the value the user will later submit to {@link completePasswordReset}).
|
|
777
|
+
*
|
|
716
778
|
* @param input - Configuration for the reset, including user identification and send options.
|
|
717
779
|
* @throws {Error} Throws if neither uid nor email is provided.
|
|
718
780
|
* @throws {FirebaseServerAuthPasswordResetThrottleError} When send is throttled and `sendResetThrowErrors` is true.
|
|
719
781
|
* @throws {FirebaseServerAuthPasswordResetSendOnceError} When already sent and `sendResetDetailsOnce` + `sendResetThrowErrors` are true.
|
|
720
782
|
* @throws {FirebaseServerAuthPasswordResetNoResetConfigError} When no reset claims exist and `sendResetThrowErrors` is true.
|
|
721
783
|
*/
|
|
722
|
-
beginPasswordReset(input: FirebaseServerAuthInitiatePasswordReset<D>): Promise<
|
|
784
|
+
beginPasswordReset(input: FirebaseServerAuthInitiatePasswordReset<D>): Promise<FirebaseServerAuthBeginPasswordResetResult>;
|
|
723
785
|
/**
|
|
724
786
|
* Sends reset content (e.g., a reset email) to the user.
|
|
725
787
|
*
|
|
@@ -750,14 +812,19 @@ export interface FirebaseServerUserPasswordResetService<D = unknown, U extends F
|
|
|
750
812
|
*/
|
|
751
813
|
loadResetDetailsForUserContext(userContext: U, config?: FirebaseServerAuthPasswordResetSendContentConfig<D>): Promise<Maybe<FirebaseServerAuthPasswordResetDetails<U, D>>>;
|
|
752
814
|
/**
|
|
753
|
-
* Completes the password reset by
|
|
754
|
-
* claims and setting the new password.
|
|
815
|
+
* Completes the password reset by decoding the composite oob token, resolving the target user,
|
|
816
|
+
* verifying the embedded reset code against the user's claims, and setting the new password.
|
|
817
|
+
* Clears reset claims on success.
|
|
755
818
|
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
819
|
+
* The target uid is read from the encoded token — callers do not need to know it separately,
|
|
820
|
+
* which is what enables the logged-out "forgot password" flow.
|
|
821
|
+
*
|
|
822
|
+
* @param input - The encoded oob token and new password.
|
|
823
|
+
* @throws {FirebaseServerAuthPasswordResetInvalidCodeError} When the token is malformed, the
|
|
824
|
+
* embedded uid does not own an active reset, the code is expired, or the code does not match.
|
|
825
|
+
* The same opaque error is thrown for every failure mode.
|
|
759
826
|
*/
|
|
760
|
-
completePasswordReset(
|
|
827
|
+
completePasswordReset(input: FirebaseServerAuthCompletePasswordResetInput): Promise<admin.auth.UserRecord>;
|
|
761
828
|
}
|
|
762
829
|
/**
|
|
763
830
|
* Default throttle duration (60 seconds) between reset content re-sends to prevent spam while
|
|
@@ -798,7 +865,7 @@ export declare abstract class AbstractFirebaseServerUserPasswordResetService<U e
|
|
|
798
865
|
protected resetThrottleTime: Milliseconds;
|
|
799
866
|
constructor(authService: FirebaseServerAuthService<U, C>);
|
|
800
867
|
get authService(): FirebaseServerAuthService<U, C>;
|
|
801
|
-
beginPasswordReset(input: FirebaseServerAuthInitiatePasswordReset<D>): Promise<
|
|
868
|
+
beginPasswordReset(input: FirebaseServerAuthInitiatePasswordReset<D>): Promise<FirebaseServerAuthBeginPasswordResetResult>;
|
|
802
869
|
sendResetContent(uid: FirebaseAuthUserId, config?: FirebaseServerAuthPasswordResetSendContentConfig<D>): Promise<boolean>;
|
|
803
870
|
loadResetDetails(uid: FirebaseAuthUserId, config?: FirebaseServerAuthPasswordResetSendContentConfig<D>): Promise<Maybe<FirebaseServerAuthPasswordResetDetails<U, D>>>;
|
|
804
871
|
loadResetDetailsForUserContext(userContext: U, config?: FirebaseServerAuthPasswordResetSendContentConfig<D>): Promise<Maybe<FirebaseServerAuthPasswordResetDetails<U, D>>>;
|
|
@@ -808,7 +875,7 @@ export declare abstract class AbstractFirebaseServerUserPasswordResetService<U e
|
|
|
808
875
|
* @param details - The user's reset details containing the user context.
|
|
809
876
|
*/
|
|
810
877
|
protected updateResetContentSentTime(details: FirebaseServerAuthPasswordResetDetails<U, D>): Promise<void>;
|
|
811
|
-
completePasswordReset(
|
|
878
|
+
completePasswordReset(input: FirebaseServerAuthCompletePasswordResetInput): Promise<admin.auth.UserRecord>;
|
|
812
879
|
/**
|
|
813
880
|
* Delivers reset content (e.g., reset email, SMS) to the user.
|
|
814
881
|
*
|
package/test/index.cjs.js
CHANGED
|
@@ -320,6 +320,20 @@ function _ts_generator$a(thisArg, body) {
|
|
|
320
320
|
return this.instance.callWrappedFunction(fn, params, skipJsonConversion);
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
|
+
{
|
|
324
|
+
/**
|
|
325
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
326
|
+
*
|
|
327
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
328
|
+
*
|
|
329
|
+
* @param fn
|
|
330
|
+
* @param params
|
|
331
|
+
* @returns
|
|
332
|
+
*/ key: "callWrappedFunctionWithoutUserContext",
|
|
333
|
+
value: function callWrappedFunctionWithoutUserContext(fn, params, options) {
|
|
334
|
+
return this.instance.callWrappedFunctionWithoutUserContext(fn, params, options);
|
|
335
|
+
}
|
|
336
|
+
},
|
|
323
337
|
{
|
|
324
338
|
key: "callCloudFunction",
|
|
325
339
|
value: function callCloudFunction(fn, params) {
|
|
@@ -436,6 +450,21 @@ function _ts_generator$a(thisArg, body) {
|
|
|
436
450
|
});
|
|
437
451
|
}
|
|
438
452
|
},
|
|
453
|
+
{
|
|
454
|
+
/**
|
|
455
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
456
|
+
*
|
|
457
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
458
|
+
*
|
|
459
|
+
* @param fn - Wrapped gen 2 callable request to invoke.
|
|
460
|
+
* @param params - Request payload to pass to the callable, simulating the JSON body of an HTTP call.
|
|
461
|
+
* @param options - Optional callable options.
|
|
462
|
+
* @returns Promise resolving to the callable's return value.
|
|
463
|
+
*/ key: "callWrappedFunctionWithoutUserContext",
|
|
464
|
+
value: function callWrappedFunctionWithoutUserContext(fn, params, options) {
|
|
465
|
+
return fn(params, options !== null && options !== void 0 ? options : {});
|
|
466
|
+
}
|
|
467
|
+
},
|
|
439
468
|
{
|
|
440
469
|
key: "callCloudFunction",
|
|
441
470
|
value: function callCloudFunction(fn, params) {
|
package/test/index.esm.js
CHANGED
|
@@ -319,6 +319,20 @@ function _ts_generator$a(thisArg, body) {
|
|
|
319
319
|
return this.instance.callWrappedFunction(fn, params, skipJsonConversion);
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
|
+
{
|
|
323
|
+
/**
|
|
324
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
325
|
+
*
|
|
326
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
327
|
+
*
|
|
328
|
+
* @param fn
|
|
329
|
+
* @param params
|
|
330
|
+
* @returns
|
|
331
|
+
*/ key: "callWrappedFunctionWithoutUserContext",
|
|
332
|
+
value: function callWrappedFunctionWithoutUserContext(fn, params, options) {
|
|
333
|
+
return this.instance.callWrappedFunctionWithoutUserContext(fn, params, options);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
322
336
|
{
|
|
323
337
|
key: "callCloudFunction",
|
|
324
338
|
value: function callCloudFunction(fn, params) {
|
|
@@ -435,6 +449,21 @@ function _ts_generator$a(thisArg, body) {
|
|
|
435
449
|
});
|
|
436
450
|
}
|
|
437
451
|
},
|
|
452
|
+
{
|
|
453
|
+
/**
|
|
454
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
455
|
+
*
|
|
456
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
457
|
+
*
|
|
458
|
+
* @param fn - Wrapped gen 2 callable request to invoke.
|
|
459
|
+
* @param params - Request payload to pass to the callable, simulating the JSON body of an HTTP call.
|
|
460
|
+
* @param options - Optional callable options.
|
|
461
|
+
* @returns Promise resolving to the callable's return value.
|
|
462
|
+
*/ key: "callWrappedFunctionWithoutUserContext",
|
|
463
|
+
value: function callWrappedFunctionWithoutUserContext(fn, params, options) {
|
|
464
|
+
return fn(params, options !== null && options !== void 0 ? options : {});
|
|
465
|
+
}
|
|
466
|
+
},
|
|
438
467
|
{
|
|
439
468
|
key: "callCloudFunction",
|
|
440
469
|
value: function callCloudFunction(fn, params) {
|
package/test/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/test",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.12.
|
|
6
|
-
"@dereekb/date": "13.12.
|
|
7
|
-
"@dereekb/firebase": "13.12.
|
|
8
|
-
"@dereekb/firebase-server": "13.12.
|
|
9
|
-
"@dereekb/firebase-server/oidc": "13.12.
|
|
10
|
-
"@dereekb/model": "13.12.
|
|
11
|
-
"@dereekb/nestjs": "13.12.
|
|
12
|
-
"@dereekb/rxjs": "13.12.
|
|
13
|
-
"@dereekb/util": "13.12.
|
|
5
|
+
"@dereekb/analytics": "13.12.4",
|
|
6
|
+
"@dereekb/date": "13.12.4",
|
|
7
|
+
"@dereekb/firebase": "13.12.4",
|
|
8
|
+
"@dereekb/firebase-server": "13.12.4",
|
|
9
|
+
"@dereekb/firebase-server/oidc": "13.12.4",
|
|
10
|
+
"@dereekb/model": "13.12.4",
|
|
11
|
+
"@dereekb/nestjs": "13.12.4",
|
|
12
|
+
"@dereekb/rxjs": "13.12.4",
|
|
13
|
+
"@dereekb/util": "13.12.4",
|
|
14
14
|
"@google-cloud/firestore": "^7.11.6",
|
|
15
15
|
"@google-cloud/storage": "^7.19.0",
|
|
16
16
|
"@nestjs/common": "^11.1.19",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"supertest": "^7.2.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@dereekb/nestjs": "13.12.
|
|
26
|
+
"@dereekb/nestjs": "13.12.4"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
"./package.json": "./package.json",
|
|
@@ -42,6 +42,7 @@ export interface AuthorizedUserTestContext {
|
|
|
42
42
|
loadDecodedIdToken(): Promise<DecodedIdToken>;
|
|
43
43
|
makeContextOptions(): Promise<ContextOptions>;
|
|
44
44
|
callWrappedFunction<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, skipJsonConversion?: boolean): Promise<WrappedCallableRequestOutput<F>>;
|
|
45
|
+
callWrappedFunctionWithoutUserContext<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, options?: CallableContextOptions): Promise<WrappedCallableRequestOutput<F>>;
|
|
45
46
|
/**
|
|
46
47
|
* Used for calling any non-callable gen 2 function (e.g. scheduled functions, cloud functions, blocking functions) or any gen 1 function.
|
|
47
48
|
*
|
|
@@ -75,6 +76,16 @@ export declare class AuthorizedUserTestContextFixture<PI extends FirebaseAdminTe
|
|
|
75
76
|
loadDecodedIdToken(): Promise<DecodedIdToken>;
|
|
76
77
|
makeContextOptions(): Promise<ContextOptions>;
|
|
77
78
|
callWrappedFunction<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, skipJsonConversion?: boolean): Promise<WrappedCallableRequestOutput<F>>;
|
|
79
|
+
/**
|
|
80
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
81
|
+
*
|
|
82
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
83
|
+
*
|
|
84
|
+
* @param fn
|
|
85
|
+
* @param params
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
callWrappedFunctionWithoutUserContext<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, options?: CallableContextOptions): Promise<WrappedCallableRequestOutput<F>>;
|
|
78
89
|
callCloudFunction<F extends WrappedCloudFunction<I, O>, I extends object, O = unknown>(fn: F, params: I, skipJsonConversion?: boolean): Promise<O>;
|
|
79
90
|
callCloudFunction<F extends WrappedScheduledFunction, O = unknown>(fn: F): Promise<O>;
|
|
80
91
|
callCloudFunction<F extends WrappedBlockingFunctionWithHandler<E, O>, E extends object, O>(fn: F, params: E): Promise<O>;
|
|
@@ -115,6 +126,17 @@ export declare class AuthorizedUserTestContextInstance<PI extends FirebaseAdminT
|
|
|
115
126
|
* @returns Promise resolving to the callable's return value.
|
|
116
127
|
*/
|
|
117
128
|
callWrappedFunction<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, skipJsonConversion?: boolean): Promise<WrappedCallableRequestOutput<F>>;
|
|
129
|
+
/**
|
|
130
|
+
* Convenience function for calling the function without an authenticated user context.
|
|
131
|
+
*
|
|
132
|
+
* Equivalent to `fn(params, options ?? {})`.
|
|
133
|
+
*
|
|
134
|
+
* @param fn - Wrapped gen 2 callable request to invoke.
|
|
135
|
+
* @param params - Request payload to pass to the callable, simulating the JSON body of an HTTP call.
|
|
136
|
+
* @param options - Optional callable options.
|
|
137
|
+
* @returns Promise resolving to the callable's return value.
|
|
138
|
+
*/
|
|
139
|
+
callWrappedFunctionWithoutUserContext<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, options?: CallableContextOptions): Promise<WrappedCallableRequestOutput<F>>;
|
|
118
140
|
/**
|
|
119
141
|
* Calls a wrapped gen 2 scheduled/blocking/event function with the input params and context options from makeContextOptions().
|
|
120
142
|
*
|
package/twilio/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/twilio",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/date": "13.12.
|
|
6
|
-
"@dereekb/firebase": "13.12.
|
|
7
|
-
"@dereekb/firebase-server": "13.12.
|
|
8
|
-
"@dereekb/model": "13.12.
|
|
9
|
-
"@dereekb/nestjs": "13.12.
|
|
10
|
-
"@dereekb/rxjs": "13.12.
|
|
11
|
-
"@dereekb/util": "13.12.
|
|
5
|
+
"@dereekb/date": "13.12.4",
|
|
6
|
+
"@dereekb/firebase": "13.12.4",
|
|
7
|
+
"@dereekb/firebase-server": "13.12.4",
|
|
8
|
+
"@dereekb/model": "13.12.4",
|
|
9
|
+
"@dereekb/nestjs": "13.12.4",
|
|
10
|
+
"@dereekb/rxjs": "13.12.4",
|
|
11
|
+
"@dereekb/util": "13.12.4"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
"./package.json": "./package.json",
|
package/zoho/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/zoho",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.12.
|
|
6
|
-
"@dereekb/date": "13.12.
|
|
7
|
-
"@dereekb/model": "13.12.
|
|
8
|
-
"@dereekb/nestjs": "13.12.
|
|
9
|
-
"@dereekb/rxjs": "13.12.
|
|
10
|
-
"@dereekb/firebase": "13.12.
|
|
11
|
-
"@dereekb/util": "13.12.
|
|
12
|
-
"@dereekb/zoho": "13.12.
|
|
5
|
+
"@dereekb/analytics": "13.12.4",
|
|
6
|
+
"@dereekb/date": "13.12.4",
|
|
7
|
+
"@dereekb/model": "13.12.4",
|
|
8
|
+
"@dereekb/nestjs": "13.12.4",
|
|
9
|
+
"@dereekb/rxjs": "13.12.4",
|
|
10
|
+
"@dereekb/firebase": "13.12.4",
|
|
11
|
+
"@dereekb/util": "13.12.4",
|
|
12
|
+
"@dereekb/zoho": "13.12.4"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": "./package.json",
|