firebase-admin 9.100.0-alpha.0 → 10.0.2
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/README.md +7 -3
- package/lib/app/core.d.ts +15 -22
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +17 -33
- package/lib/app/credential-factory.js +17 -33
- package/lib/app/credential-internal.d.ts +10 -9
- package/lib/app/credential-internal.js +15 -13
- package/lib/app/credential.d.ts +3 -9
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +6 -30
- package/lib/app/firebase-app.js +72 -216
- package/lib/app/firebase-namespace.d.ts +28 -34
- package/lib/app/firebase-namespace.js +119 -99
- package/lib/app/index.d.ts +6 -1
- package/lib/app/index.js +1 -1
- package/lib/app/lifecycle.d.ts +24 -3
- package/lib/app/lifecycle.js +119 -25
- package/lib/app-check/app-check-api-client-internal.d.ts +32 -0
- package/lib/app-check/app-check-api-client-internal.js +197 -0
- package/lib/app-check/app-check-api.d.ts +95 -0
- package/lib/app-check/app-check-api.js +19 -0
- package/lib/app-check/app-check-namespace.d.ts +65 -0
- package/lib/app-check/app-check-namespace.js +18 -0
- package/lib/app-check/app-check.d.ts +49 -0
- package/lib/app-check/app-check.js +82 -0
- package/lib/app-check/index.d.ts +53 -0
- package/lib/app-check/index.js +63 -0
- package/lib/app-check/token-generator.d.ts +25 -0
- package/lib/app-check/token-generator.js +159 -0
- package/lib/app-check/token-verifier.d.ts +17 -0
- package/lib/app-check/token-verifier.js +151 -0
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +2 -2
- package/lib/auth/auth-api-request.d.ts +28 -32
- package/lib/auth/auth-api-request.js +167 -125
- package/lib/auth/auth-config.d.ts +123 -21
- package/lib/auth/auth-config.js +85 -34
- package/lib/auth/auth-namespace.d.ts +157 -4
- package/lib/auth/auth-namespace.js +1 -1
- package/lib/auth/auth.d.ts +5 -3
- package/lib/auth/auth.js +6 -4
- package/lib/auth/base-auth.d.ts +134 -116
- package/lib/auth/base-auth.js +213 -143
- package/lib/auth/identifier.d.ts +5 -5
- package/lib/auth/identifier.js +1 -1
- package/lib/auth/index.d.ts +10 -5
- package/lib/auth/index.js +9 -4
- package/lib/auth/tenant-manager.d.ts +19 -19
- package/lib/auth/tenant-manager.js +21 -25
- package/lib/auth/tenant.d.ts +14 -5
- package/lib/auth/tenant.js +19 -11
- package/lib/auth/token-generator.d.ts +7 -108
- package/lib/auth/token-generator.js +52 -145
- package/lib/auth/token-verifier.d.ts +3 -4
- package/lib/auth/token-verifier.js +96 -145
- package/lib/auth/user-import-builder.d.ts +11 -11
- package/lib/auth/user-import-builder.js +9 -9
- package/lib/auth/user-record.d.ts +23 -15
- package/lib/auth/user-record.js +30 -20
- package/lib/credential/index.d.ts +18 -35
- package/lib/credential/index.js +17 -33
- package/lib/database/database-namespace.d.ts +39 -10
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +16 -6
- package/lib/database/database.js +61 -6
- package/lib/database/index.d.ts +19 -18
- package/lib/database/index.js +21 -23
- package/lib/default-namespace.d.ts +7 -1
- package/lib/default-namespace.js +4 -4
- package/lib/esm/app/index.js +10 -0
- package/lib/esm/app-check/index.js +4 -0
- package/lib/esm/auth/index.js +14 -0
- package/lib/esm/database/index.js +6 -0
- package/lib/esm/firestore/index.js +24 -0
- package/lib/esm/installations/index.js +4 -0
- package/lib/esm/instance-id/index.js +4 -0
- package/lib/esm/machine-learning/index.js +5 -0
- package/lib/esm/messaging/index.js +4 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/project-management/index.js +8 -0
- package/lib/esm/remote-config/index.js +4 -0
- package/lib/esm/security-rules/index.js +6 -0
- package/lib/esm/storage/index.js +4 -0
- package/lib/firebase-namespace-api.d.ts +12 -6
- package/lib/firebase-namespace-api.js +5 -1
- package/lib/firestore/firestore-internal.d.ts +2 -2
- package/lib/firestore/firestore-internal.js +2 -2
- package/lib/firestore/firestore-namespace.d.ts +6 -1
- package/lib/firestore/firestore-namespace.js +2 -1
- package/lib/firestore/index.d.ts +36 -4
- package/lib/firestore/index.js +29 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/installations/index.d.ts +52 -0
- package/lib/installations/index.js +62 -0
- package/lib/installations/installations-namespace.d.ts +55 -0
- package/lib/installations/installations-namespace.js +18 -0
- package/lib/{instance-id/instance-id-request-internal.d.ts → installations/installations-request-handler.d.ts} +8 -8
- package/lib/{instance-id/instance-id-request-internal.js → installations/installations-request-handler.js} +23 -23
- package/lib/installations/installations.d.ts +38 -0
- package/lib/installations/installations.js +63 -0
- package/lib/instance-id/index.d.ts +20 -9
- package/lib/instance-id/index.js +20 -9
- package/lib/instance-id/instance-id-namespace.d.ts +9 -8
- package/lib/instance-id/instance-id-namespace.js +1 -1
- package/lib/instance-id/instance-id.d.ts +8 -6
- package/lib/instance-id/instance-id.js +20 -11
- package/lib/machine-learning/index.d.ts +29 -27
- package/lib/machine-learning/index.js +29 -27
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +4 -4
- package/lib/machine-learning/machine-learning-namespace.d.ts +33 -8
- package/lib/machine-learning/machine-learning-namespace.js +1 -1
- package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
- package/lib/machine-learning/machine-learning-utils.js +1 -1
- package/lib/machine-learning/machine-learning.d.ts +19 -19
- package/lib/machine-learning/machine-learning.js +20 -20
- package/lib/messaging/batch-request-internal.d.ts +3 -3
- package/lib/messaging/batch-request-internal.js +9 -9
- package/lib/messaging/index.d.ts +11 -9
- package/lib/messaging/index.js +11 -9
- package/lib/messaging/messaging-api-request-internal.d.ts +8 -8
- package/lib/messaging/messaging-api-request-internal.js +8 -8
- package/lib/messaging/messaging-api.d.ts +79 -75
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +5 -5
- package/lib/messaging/messaging-errors-internal.js +7 -7
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +6 -31
- package/lib/messaging/messaging-namespace.d.ts +105 -8
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +70 -86
- package/lib/messaging/messaging.js +76 -89
- package/lib/project-management/android-app.d.ts +11 -12
- package/lib/project-management/android-app.js +13 -14
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +11 -9
- package/lib/project-management/index.js +11 -9
- package/lib/project-management/ios-app.d.ts +6 -7
- package/lib/project-management/ios-app.js +6 -7
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -80
- package/lib/project-management/project-management-api-request-internal.js +14 -14
- package/lib/project-management/project-management-namespace.d.ts +31 -9
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +18 -21
- package/lib/project-management/project-management.js +19 -22
- package/lib/remote-config/index.d.ts +12 -10
- package/lib/remote-config/index.js +11 -9
- package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +2 -2
- package/lib/remote-config/remote-config-api.d.ts +12 -2
- package/lib/remote-config/remote-config-api.js +1 -1
- package/lib/remote-config/remote-config-namespace.d.ts +50 -9
- package/lib/remote-config/remote-config-namespace.js +1 -1
- package/lib/remote-config/remote-config.d.ts +19 -21
- package/lib/remote-config/remote-config.js +25 -25
- package/lib/security-rules/index.d.ts +12 -10
- package/lib/security-rules/index.js +12 -10
- package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-api-client-internal.js +1 -1
- package/lib/security-rules/security-rules-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-internal.js +1 -1
- package/lib/security-rules/security-rules-namespace.d.ts +43 -28
- package/lib/security-rules/security-rules-namespace.js +1 -1
- package/lib/security-rules/security-rules.d.ts +39 -42
- package/lib/security-rules/security-rules.js +38 -39
- package/lib/storage/index.d.ts +9 -7
- package/lib/storage/index.js +9 -7
- package/lib/storage/storage-namespace.d.ts +7 -6
- package/lib/storage/storage-namespace.js +1 -1
- package/lib/storage/storage.d.ts +3 -3
- package/lib/storage/storage.js +14 -4
- package/lib/utils/api-request.d.ts +24 -24
- package/lib/utils/api-request.js +25 -25
- package/lib/utils/crypto-signer.d.ts +128 -0
- package/lib/utils/crypto-signer.js +237 -0
- package/lib/utils/deep-copy.d.ts +6 -6
- package/lib/utils/deep-copy.js +6 -6
- package/lib/utils/error.d.ts +69 -36
- package/lib/utils/error.js +98 -43
- package/lib/utils/index.d.ts +30 -19
- package/lib/utils/index.js +47 -20
- package/lib/utils/jwt.d.ts +131 -0
- package/lib/utils/jwt.js +355 -0
- package/lib/utils/validator.d.ts +37 -37
- package/lib/utils/validator.js +37 -37
- package/package.json +126 -53
package/lib/utils/error.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v10.0.2 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FirebaseError as
|
|
18
|
+
import { FirebaseError as FirebaseErrorInterface } from '../app';
|
|
19
19
|
/**
|
|
20
20
|
* Defines error info type. This includes a code and message string.
|
|
21
21
|
*/
|
|
@@ -26,25 +26,25 @@ export interface ErrorInfo {
|
|
|
26
26
|
/**
|
|
27
27
|
* Firebase error code structure. This extends Error.
|
|
28
28
|
*
|
|
29
|
-
* @param
|
|
29
|
+
* @param errorInfo - The error information (code and message).
|
|
30
30
|
* @constructor
|
|
31
31
|
*/
|
|
32
|
-
export declare class FirebaseError extends Error implements
|
|
32
|
+
export declare class FirebaseError extends Error implements FirebaseErrorInterface {
|
|
33
33
|
private errorInfo;
|
|
34
34
|
constructor(errorInfo: ErrorInfo);
|
|
35
|
-
/** @
|
|
35
|
+
/** @returns The error code. */
|
|
36
36
|
get code(): string;
|
|
37
|
-
/** @
|
|
37
|
+
/** @returns The error message. */
|
|
38
38
|
get message(): string;
|
|
39
|
-
/** @
|
|
39
|
+
/** @returns The object representation of the error. */
|
|
40
40
|
toJSON(): object;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* A FirebaseError with a prefix in front of the error code.
|
|
44
44
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
45
|
+
* @param codePrefix - The prefix to apply to the error code.
|
|
46
|
+
* @param code - The error code.
|
|
47
|
+
* @param message - The error message.
|
|
48
48
|
* @constructor
|
|
49
49
|
*/
|
|
50
50
|
export declare class PrefixedFirebaseError extends FirebaseError {
|
|
@@ -54,16 +54,16 @@ export declare class PrefixedFirebaseError extends FirebaseError {
|
|
|
54
54
|
* Allows the error type to be checked without needing to know implementation details
|
|
55
55
|
* of the code prefixing.
|
|
56
56
|
*
|
|
57
|
-
* @param
|
|
58
|
-
* @
|
|
57
|
+
* @param code - The non-prefixed error code to test against.
|
|
58
|
+
* @returns True if the code matches, false otherwise.
|
|
59
59
|
*/
|
|
60
60
|
hasCode(code: string): boolean;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Firebase App error code structure. This extends PrefixedFirebaseError.
|
|
64
64
|
*
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
65
|
+
* @param code - The error code.
|
|
66
|
+
* @param message - The error message.
|
|
67
67
|
* @constructor
|
|
68
68
|
*/
|
|
69
69
|
export declare class FirebaseAppError extends PrefixedFirebaseError {
|
|
@@ -72,8 +72,8 @@ export declare class FirebaseAppError extends PrefixedFirebaseError {
|
|
|
72
72
|
/**
|
|
73
73
|
* Firebase Auth error code structure. This extends PrefixedFirebaseError.
|
|
74
74
|
*
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
75
|
+
* @param info - The error code info.
|
|
76
|
+
* @param [message] The error message. This will override the default
|
|
77
77
|
* message if provided.
|
|
78
78
|
* @constructor
|
|
79
79
|
*/
|
|
@@ -81,11 +81,11 @@ export declare class FirebaseAuthError extends PrefixedFirebaseError {
|
|
|
81
81
|
/**
|
|
82
82
|
* Creates the developer-facing error corresponding to the backend error code.
|
|
83
83
|
*
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
84
|
+
* @param serverErrorCode - The server error code.
|
|
85
|
+
* @param [message] The error message. The default message is used
|
|
86
86
|
* if not provided.
|
|
87
|
-
* @param
|
|
88
|
-
* @
|
|
87
|
+
* @param [rawServerResponse] The error's raw server response.
|
|
88
|
+
* @returns The corresponding developer-facing error.
|
|
89
89
|
*/
|
|
90
90
|
static fromServerError(serverErrorCode: string, message?: string, rawServerResponse?: object): FirebaseAuthError;
|
|
91
91
|
constructor(info: ErrorInfo, message?: string);
|
|
@@ -93,8 +93,8 @@ export declare class FirebaseAuthError extends PrefixedFirebaseError {
|
|
|
93
93
|
/**
|
|
94
94
|
* Firebase Database error code structure. This extends FirebaseError.
|
|
95
95
|
*
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
96
|
+
* @param info - The error code info.
|
|
97
|
+
* @param [message] The error message. This will override the default
|
|
98
98
|
* message if provided.
|
|
99
99
|
* @constructor
|
|
100
100
|
*/
|
|
@@ -104,8 +104,8 @@ export declare class FirebaseDatabaseError extends FirebaseError {
|
|
|
104
104
|
/**
|
|
105
105
|
* Firebase Firestore error code structure. This extends FirebaseError.
|
|
106
106
|
*
|
|
107
|
-
* @param
|
|
108
|
-
* @param
|
|
107
|
+
* @param info - The error code info.
|
|
108
|
+
* @param [message] The error message. This will override the default
|
|
109
109
|
* message if provided.
|
|
110
110
|
* @constructor
|
|
111
111
|
*/
|
|
@@ -115,30 +115,41 @@ export declare class FirebaseFirestoreError extends FirebaseError {
|
|
|
115
115
|
/**
|
|
116
116
|
* Firebase instance ID error code structure. This extends FirebaseError.
|
|
117
117
|
*
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
118
|
+
* @param info - The error code info.
|
|
119
|
+
* @param [message] The error message. This will override the default
|
|
120
120
|
* message if provided.
|
|
121
121
|
* @constructor
|
|
122
122
|
*/
|
|
123
123
|
export declare class FirebaseInstanceIdError extends FirebaseError {
|
|
124
124
|
constructor(info: ErrorInfo, message?: string);
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Firebase Installations service error code structure. This extends `FirebaseError`.
|
|
128
|
+
*
|
|
129
|
+
* @param info - The error code info.
|
|
130
|
+
* @param message - The error message. This will override the default
|
|
131
|
+
* message if provided.
|
|
132
|
+
* @constructor
|
|
133
|
+
*/
|
|
134
|
+
export declare class FirebaseInstallationsError extends FirebaseError {
|
|
135
|
+
constructor(info: ErrorInfo, message?: string);
|
|
136
|
+
}
|
|
126
137
|
/**
|
|
127
138
|
* Firebase Messaging error code structure. This extends PrefixedFirebaseError.
|
|
128
139
|
*
|
|
129
|
-
* @param
|
|
130
|
-
* @param
|
|
140
|
+
* @param info - The error code info.
|
|
141
|
+
* @param [message] The error message. This will override the default message if provided.
|
|
131
142
|
* @constructor
|
|
132
143
|
*/
|
|
133
144
|
export declare class FirebaseMessagingError extends PrefixedFirebaseError {
|
|
134
145
|
/**
|
|
135
146
|
* Creates the developer-facing error corresponding to the backend error code.
|
|
136
147
|
*
|
|
137
|
-
* @param
|
|
138
|
-
* @param
|
|
148
|
+
* @param serverErrorCode - The server error code.
|
|
149
|
+
* @param [message] The error message. The default message is used
|
|
139
150
|
* if not provided.
|
|
140
|
-
* @param
|
|
141
|
-
* @
|
|
151
|
+
* @param [rawServerResponse] The error's raw server response.
|
|
152
|
+
* @returns The corresponding developer-facing error.
|
|
142
153
|
*/
|
|
143
154
|
static fromServerError(serverErrorCode: string | null, message?: string | null, rawServerResponse?: object): FirebaseMessagingError;
|
|
144
155
|
static fromTopicManagementServerError(serverErrorCode: string, message?: string, rawServerResponse?: object): FirebaseMessagingError;
|
|
@@ -147,8 +158,8 @@ export declare class FirebaseMessagingError extends PrefixedFirebaseError {
|
|
|
147
158
|
/**
|
|
148
159
|
* Firebase project management error code structure. This extends PrefixedFirebaseError.
|
|
149
160
|
*
|
|
150
|
-
* @param
|
|
151
|
-
* @param
|
|
161
|
+
* @param code - The error code.
|
|
162
|
+
* @param message - The error message.
|
|
152
163
|
* @constructor
|
|
153
164
|
*/
|
|
154
165
|
export declare class FirebaseProjectManagementError extends PrefixedFirebaseError {
|
|
@@ -206,6 +217,10 @@ export declare class AuthClientErrorCode {
|
|
|
206
217
|
code: string;
|
|
207
218
|
message: string;
|
|
208
219
|
};
|
|
220
|
+
static EMAIL_NOT_FOUND: {
|
|
221
|
+
code: string;
|
|
222
|
+
message: string;
|
|
223
|
+
};
|
|
209
224
|
static FORBIDDEN_CLAIM: {
|
|
210
225
|
code: string;
|
|
211
226
|
message: string;
|
|
@@ -350,6 +365,10 @@ export declare class AuthClientErrorCode {
|
|
|
350
365
|
code: string;
|
|
351
366
|
message: string;
|
|
352
367
|
};
|
|
368
|
+
static INVALID_OAUTH_RESPONSETYPE: {
|
|
369
|
+
code: string;
|
|
370
|
+
message: string;
|
|
371
|
+
};
|
|
353
372
|
static INVALID_SESSION_COOKIE_DURATION: {
|
|
354
373
|
code: string;
|
|
355
374
|
message: string;
|
|
@@ -418,6 +437,10 @@ export declare class AuthClientErrorCode {
|
|
|
418
437
|
code: string;
|
|
419
438
|
message: string;
|
|
420
439
|
};
|
|
440
|
+
static MISSING_OAUTH_CLIENT_SECRET: {
|
|
441
|
+
code: string;
|
|
442
|
+
message: string;
|
|
443
|
+
};
|
|
421
444
|
static MISSING_PROVIDER_ID: {
|
|
422
445
|
code: string;
|
|
423
446
|
message: string;
|
|
@@ -510,6 +533,10 @@ export declare class AuthClientErrorCode {
|
|
|
510
533
|
code: string;
|
|
511
534
|
message: string;
|
|
512
535
|
};
|
|
536
|
+
static USER_DISABLED: {
|
|
537
|
+
code: string;
|
|
538
|
+
message: string;
|
|
539
|
+
};
|
|
513
540
|
static USER_NOT_DISABLED: {
|
|
514
541
|
code: string;
|
|
515
542
|
message: string;
|
|
@@ -596,7 +623,7 @@ export declare class MessagingClientErrorCode {
|
|
|
596
623
|
message: string;
|
|
597
624
|
};
|
|
598
625
|
}
|
|
599
|
-
export declare class
|
|
626
|
+
export declare class InstallationsClientErrorCode {
|
|
600
627
|
static INVALID_ARGUMENT: {
|
|
601
628
|
code: string;
|
|
602
629
|
message: string;
|
|
@@ -605,7 +632,7 @@ export declare class InstanceIdClientErrorCode {
|
|
|
605
632
|
code: string;
|
|
606
633
|
message: string;
|
|
607
634
|
};
|
|
608
|
-
static
|
|
635
|
+
static INVALID_INSTALLATION_ID: {
|
|
609
636
|
code: string;
|
|
610
637
|
message: string;
|
|
611
638
|
};
|
|
@@ -614,4 +641,10 @@ export declare class InstanceIdClientErrorCode {
|
|
|
614
641
|
message: string;
|
|
615
642
|
};
|
|
616
643
|
}
|
|
644
|
+
export declare class InstanceIdClientErrorCode extends InstallationsClientErrorCode {
|
|
645
|
+
static INVALID_INSTANCE_ID: {
|
|
646
|
+
code: string;
|
|
647
|
+
message: string;
|
|
648
|
+
};
|
|
649
|
+
}
|
|
617
650
|
export declare type ProjectManagementErrorCode = 'already-exists' | 'authentication-error' | 'internal-error' | 'invalid-argument' | 'invalid-project-id' | 'invalid-server-response' | 'not-found' | 'service-unavailable' | 'unknown-error';
|
package/lib/utils/error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v10.0.2 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -30,12 +30,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
30
30
|
};
|
|
31
31
|
})();
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.InstanceIdClientErrorCode = exports.MessagingClientErrorCode = exports.AuthClientErrorCode = exports.AppErrorCodes = exports.FirebaseProjectManagementError = exports.FirebaseMessagingError = exports.FirebaseInstanceIdError = exports.FirebaseFirestoreError = exports.FirebaseDatabaseError = exports.FirebaseAuthError = exports.FirebaseAppError = exports.PrefixedFirebaseError = exports.FirebaseError = void 0;
|
|
33
|
+
exports.InstanceIdClientErrorCode = exports.InstallationsClientErrorCode = exports.MessagingClientErrorCode = exports.AuthClientErrorCode = exports.AppErrorCodes = exports.FirebaseProjectManagementError = exports.FirebaseMessagingError = exports.FirebaseInstallationsError = exports.FirebaseInstanceIdError = exports.FirebaseFirestoreError = exports.FirebaseDatabaseError = exports.FirebaseAuthError = exports.FirebaseAppError = exports.PrefixedFirebaseError = exports.FirebaseError = void 0;
|
|
34
34
|
var deep_copy_1 = require("../utils/deep-copy");
|
|
35
35
|
/**
|
|
36
36
|
* Firebase error code structure. This extends Error.
|
|
37
37
|
*
|
|
38
|
-
* @param
|
|
38
|
+
* @param errorInfo - The error information (code and message).
|
|
39
39
|
* @constructor
|
|
40
40
|
*/
|
|
41
41
|
var FirebaseError = /** @class */ (function (_super) {
|
|
@@ -51,7 +51,7 @@ var FirebaseError = /** @class */ (function (_super) {
|
|
|
51
51
|
return _this;
|
|
52
52
|
}
|
|
53
53
|
Object.defineProperty(FirebaseError.prototype, "code", {
|
|
54
|
-
/** @
|
|
54
|
+
/** @returns The error code. */
|
|
55
55
|
get: function () {
|
|
56
56
|
return this.errorInfo.code;
|
|
57
57
|
},
|
|
@@ -59,14 +59,14 @@ var FirebaseError = /** @class */ (function (_super) {
|
|
|
59
59
|
configurable: true
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(FirebaseError.prototype, "message", {
|
|
62
|
-
/** @
|
|
62
|
+
/** @returns The error message. */
|
|
63
63
|
get: function () {
|
|
64
64
|
return this.errorInfo.message;
|
|
65
65
|
},
|
|
66
66
|
enumerable: false,
|
|
67
67
|
configurable: true
|
|
68
68
|
});
|
|
69
|
-
/** @
|
|
69
|
+
/** @returns The object representation of the error. */
|
|
70
70
|
FirebaseError.prototype.toJSON = function () {
|
|
71
71
|
return {
|
|
72
72
|
code: this.code,
|
|
@@ -79,9 +79,9 @@ exports.FirebaseError = FirebaseError;
|
|
|
79
79
|
/**
|
|
80
80
|
* A FirebaseError with a prefix in front of the error code.
|
|
81
81
|
*
|
|
82
|
-
* @param
|
|
83
|
-
* @param
|
|
84
|
-
* @param
|
|
82
|
+
* @param codePrefix - The prefix to apply to the error code.
|
|
83
|
+
* @param code - The error code.
|
|
84
|
+
* @param message - The error message.
|
|
85
85
|
* @constructor
|
|
86
86
|
*/
|
|
87
87
|
var PrefixedFirebaseError = /** @class */ (function (_super) {
|
|
@@ -103,8 +103,8 @@ var PrefixedFirebaseError = /** @class */ (function (_super) {
|
|
|
103
103
|
* Allows the error type to be checked without needing to know implementation details
|
|
104
104
|
* of the code prefixing.
|
|
105
105
|
*
|
|
106
|
-
* @param
|
|
107
|
-
* @
|
|
106
|
+
* @param code - The non-prefixed error code to test against.
|
|
107
|
+
* @returns True if the code matches, false otherwise.
|
|
108
108
|
*/
|
|
109
109
|
PrefixedFirebaseError.prototype.hasCode = function (code) {
|
|
110
110
|
return this.codePrefix + "/" + code === this.code;
|
|
@@ -115,8 +115,8 @@ exports.PrefixedFirebaseError = PrefixedFirebaseError;
|
|
|
115
115
|
/**
|
|
116
116
|
* Firebase App error code structure. This extends PrefixedFirebaseError.
|
|
117
117
|
*
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
118
|
+
* @param code - The error code.
|
|
119
|
+
* @param message - The error message.
|
|
120
120
|
* @constructor
|
|
121
121
|
*/
|
|
122
122
|
var FirebaseAppError = /** @class */ (function (_super) {
|
|
@@ -136,8 +136,8 @@ exports.FirebaseAppError = FirebaseAppError;
|
|
|
136
136
|
/**
|
|
137
137
|
* Firebase Auth error code structure. This extends PrefixedFirebaseError.
|
|
138
138
|
*
|
|
139
|
-
* @param
|
|
140
|
-
* @param
|
|
139
|
+
* @param info - The error code info.
|
|
140
|
+
* @param [message] The error message. This will override the default
|
|
141
141
|
* message if provided.
|
|
142
142
|
* @constructor
|
|
143
143
|
*/
|
|
@@ -157,11 +157,11 @@ var FirebaseAuthError = /** @class */ (function (_super) {
|
|
|
157
157
|
/**
|
|
158
158
|
* Creates the developer-facing error corresponding to the backend error code.
|
|
159
159
|
*
|
|
160
|
-
* @param
|
|
161
|
-
* @param
|
|
160
|
+
* @param serverErrorCode - The server error code.
|
|
161
|
+
* @param [message] The error message. The default message is used
|
|
162
162
|
* if not provided.
|
|
163
|
-
* @param
|
|
164
|
-
* @
|
|
163
|
+
* @param [rawServerResponse] The error's raw server response.
|
|
164
|
+
* @returns The corresponding developer-facing error.
|
|
165
165
|
*/
|
|
166
166
|
FirebaseAuthError.fromServerError = function (serverErrorCode, message, rawServerResponse) {
|
|
167
167
|
// serverErrorCode could contain additional details:
|
|
@@ -193,8 +193,8 @@ exports.FirebaseAuthError = FirebaseAuthError;
|
|
|
193
193
|
/**
|
|
194
194
|
* Firebase Database error code structure. This extends FirebaseError.
|
|
195
195
|
*
|
|
196
|
-
* @param
|
|
197
|
-
* @param
|
|
196
|
+
* @param info - The error code info.
|
|
197
|
+
* @param [message] The error message. This will override the default
|
|
198
198
|
* message if provided.
|
|
199
199
|
* @constructor
|
|
200
200
|
*/
|
|
@@ -210,8 +210,8 @@ exports.FirebaseDatabaseError = FirebaseDatabaseError;
|
|
|
210
210
|
/**
|
|
211
211
|
* Firebase Firestore error code structure. This extends FirebaseError.
|
|
212
212
|
*
|
|
213
|
-
* @param
|
|
214
|
-
* @param
|
|
213
|
+
* @param info - The error code info.
|
|
214
|
+
* @param [message] The error message. This will override the default
|
|
215
215
|
* message if provided.
|
|
216
216
|
* @constructor
|
|
217
217
|
*/
|
|
@@ -227,25 +227,48 @@ exports.FirebaseFirestoreError = FirebaseFirestoreError;
|
|
|
227
227
|
/**
|
|
228
228
|
* Firebase instance ID error code structure. This extends FirebaseError.
|
|
229
229
|
*
|
|
230
|
-
* @param
|
|
231
|
-
* @param
|
|
230
|
+
* @param info - The error code info.
|
|
231
|
+
* @param [message] The error message. This will override the default
|
|
232
232
|
* message if provided.
|
|
233
233
|
* @constructor
|
|
234
234
|
*/
|
|
235
235
|
var FirebaseInstanceIdError = /** @class */ (function (_super) {
|
|
236
236
|
__extends(FirebaseInstanceIdError, _super);
|
|
237
237
|
function FirebaseInstanceIdError(info, message) {
|
|
238
|
+
var _this =
|
|
238
239
|
// Override default message if custom message provided.
|
|
239
|
-
|
|
240
|
+
_super.call(this, { code: 'instance-id/' + info.code, message: message || info.message }) || this;
|
|
241
|
+
_this.__proto__ = FirebaseInstanceIdError.prototype;
|
|
242
|
+
return _this;
|
|
240
243
|
}
|
|
241
244
|
return FirebaseInstanceIdError;
|
|
242
245
|
}(FirebaseError));
|
|
243
246
|
exports.FirebaseInstanceIdError = FirebaseInstanceIdError;
|
|
247
|
+
/**
|
|
248
|
+
* Firebase Installations service error code structure. This extends `FirebaseError`.
|
|
249
|
+
*
|
|
250
|
+
* @param info - The error code info.
|
|
251
|
+
* @param message - The error message. This will override the default
|
|
252
|
+
* message if provided.
|
|
253
|
+
* @constructor
|
|
254
|
+
*/
|
|
255
|
+
var FirebaseInstallationsError = /** @class */ (function (_super) {
|
|
256
|
+
__extends(FirebaseInstallationsError, _super);
|
|
257
|
+
function FirebaseInstallationsError(info, message) {
|
|
258
|
+
var _this =
|
|
259
|
+
// Override default message if custom message provided.
|
|
260
|
+
_super.call(this, { code: 'installations/' + info.code, message: message || info.message }) || this;
|
|
261
|
+
_this.__proto__ = FirebaseInstallationsError.prototype;
|
|
262
|
+
return _this;
|
|
263
|
+
}
|
|
264
|
+
return FirebaseInstallationsError;
|
|
265
|
+
}(FirebaseError));
|
|
266
|
+
exports.FirebaseInstallationsError = FirebaseInstallationsError;
|
|
244
267
|
/**
|
|
245
268
|
* Firebase Messaging error code structure. This extends PrefixedFirebaseError.
|
|
246
269
|
*
|
|
247
|
-
* @param
|
|
248
|
-
* @param
|
|
270
|
+
* @param info - The error code info.
|
|
271
|
+
* @param [message] The error message. This will override the default message if provided.
|
|
249
272
|
* @constructor
|
|
250
273
|
*/
|
|
251
274
|
var FirebaseMessagingError = /** @class */ (function (_super) {
|
|
@@ -264,11 +287,11 @@ var FirebaseMessagingError = /** @class */ (function (_super) {
|
|
|
264
287
|
/**
|
|
265
288
|
* Creates the developer-facing error corresponding to the backend error code.
|
|
266
289
|
*
|
|
267
|
-
* @param
|
|
268
|
-
* @param
|
|
290
|
+
* @param serverErrorCode - The server error code.
|
|
291
|
+
* @param [message] The error message. The default message is used
|
|
269
292
|
* if not provided.
|
|
270
|
-
* @param
|
|
271
|
-
* @
|
|
293
|
+
* @param [rawServerResponse] The error's raw server response.
|
|
294
|
+
* @returns The corresponding developer-facing error.
|
|
272
295
|
*/
|
|
273
296
|
FirebaseMessagingError.fromServerError = function (serverErrorCode, message, rawServerResponse) {
|
|
274
297
|
// If not found, default to unknown error.
|
|
@@ -309,8 +332,8 @@ exports.FirebaseMessagingError = FirebaseMessagingError;
|
|
|
309
332
|
/**
|
|
310
333
|
* Firebase project management error code structure. This extends PrefixedFirebaseError.
|
|
311
334
|
*
|
|
312
|
-
* @param
|
|
313
|
-
* @param
|
|
335
|
+
* @param code - The error code.
|
|
336
|
+
* @param message - The error message.
|
|
314
337
|
* @constructor
|
|
315
338
|
*/
|
|
316
339
|
var FirebaseProjectManagementError = /** @class */ (function (_super) {
|
|
@@ -385,6 +408,10 @@ var AuthClientErrorCode = /** @class */ (function () {
|
|
|
385
408
|
code: 'email-already-exists',
|
|
386
409
|
message: 'The email address is already in use by another account.',
|
|
387
410
|
};
|
|
411
|
+
AuthClientErrorCode.EMAIL_NOT_FOUND = {
|
|
412
|
+
code: 'email-not-found',
|
|
413
|
+
message: 'There is no user record corresponding to the provided email.',
|
|
414
|
+
};
|
|
388
415
|
AuthClientErrorCode.FORBIDDEN_CLAIM = {
|
|
389
416
|
code: 'reserved-claim',
|
|
390
417
|
message: 'The specified developer claim is reserved and cannot be specified.',
|
|
@@ -532,6 +559,10 @@ var AuthClientErrorCode = /** @class */ (function () {
|
|
|
532
559
|
code: 'invalid-provider-uid',
|
|
533
560
|
message: 'The providerUid must be a valid provider uid string.',
|
|
534
561
|
};
|
|
562
|
+
AuthClientErrorCode.INVALID_OAUTH_RESPONSETYPE = {
|
|
563
|
+
code: 'invalid-oauth-responsetype',
|
|
564
|
+
message: 'Only exactly one OAuth responseType should be set to true.',
|
|
565
|
+
};
|
|
535
566
|
AuthClientErrorCode.INVALID_SESSION_COOKIE_DURATION = {
|
|
536
567
|
code: 'invalid-session-cookie-duration',
|
|
537
568
|
message: 'The session cookie duration must be a valid number in milliseconds ' +
|
|
@@ -604,6 +635,10 @@ var AuthClientErrorCode = /** @class */ (function () {
|
|
|
604
635
|
code: 'missing-oauth-client-id',
|
|
605
636
|
message: 'The OAuth/OIDC configuration client ID must not be empty.',
|
|
606
637
|
};
|
|
638
|
+
AuthClientErrorCode.MISSING_OAUTH_CLIENT_SECRET = {
|
|
639
|
+
code: 'missing-oauth-client-secret',
|
|
640
|
+
message: 'The OAuth configuration client secret is required to enable OIDC code flow.',
|
|
641
|
+
};
|
|
607
642
|
AuthClientErrorCode.MISSING_PROVIDER_ID = {
|
|
608
643
|
code: 'missing-provider-id',
|
|
609
644
|
message: 'A valid provider ID must be provided in the request.',
|
|
@@ -703,6 +738,10 @@ var AuthClientErrorCode = /** @class */ (function () {
|
|
|
703
738
|
code: 'not-found',
|
|
704
739
|
message: 'The requested resource was not found.',
|
|
705
740
|
};
|
|
741
|
+
AuthClientErrorCode.USER_DISABLED = {
|
|
742
|
+
code: 'user-disabled',
|
|
743
|
+
message: 'The user record is disabled.',
|
|
744
|
+
};
|
|
706
745
|
AuthClientErrorCode.USER_NOT_DISABLED = {
|
|
707
746
|
code: 'user-not-disabled',
|
|
708
747
|
message: 'The user must be disabled in order to bulk delete it (or you must pass force=true).',
|
|
@@ -811,27 +850,39 @@ var MessagingClientErrorCode = /** @class */ (function () {
|
|
|
811
850
|
return MessagingClientErrorCode;
|
|
812
851
|
}());
|
|
813
852
|
exports.MessagingClientErrorCode = MessagingClientErrorCode;
|
|
814
|
-
var
|
|
815
|
-
function
|
|
853
|
+
var InstallationsClientErrorCode = /** @class */ (function () {
|
|
854
|
+
function InstallationsClientErrorCode() {
|
|
816
855
|
}
|
|
817
|
-
|
|
856
|
+
InstallationsClientErrorCode.INVALID_ARGUMENT = {
|
|
818
857
|
code: 'invalid-argument',
|
|
819
858
|
message: 'Invalid argument provided.',
|
|
820
859
|
};
|
|
821
|
-
|
|
860
|
+
InstallationsClientErrorCode.INVALID_PROJECT_ID = {
|
|
822
861
|
code: 'invalid-project-id',
|
|
823
862
|
message: 'Invalid project ID provided.',
|
|
824
863
|
};
|
|
864
|
+
InstallationsClientErrorCode.INVALID_INSTALLATION_ID = {
|
|
865
|
+
code: 'invalid-installation-id',
|
|
866
|
+
message: 'Invalid installation ID provided.',
|
|
867
|
+
};
|
|
868
|
+
InstallationsClientErrorCode.API_ERROR = {
|
|
869
|
+
code: 'api-error',
|
|
870
|
+
message: 'Installation ID API call failed.',
|
|
871
|
+
};
|
|
872
|
+
return InstallationsClientErrorCode;
|
|
873
|
+
}());
|
|
874
|
+
exports.InstallationsClientErrorCode = InstallationsClientErrorCode;
|
|
875
|
+
var InstanceIdClientErrorCode = /** @class */ (function (_super) {
|
|
876
|
+
__extends(InstanceIdClientErrorCode, _super);
|
|
877
|
+
function InstanceIdClientErrorCode() {
|
|
878
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
879
|
+
}
|
|
825
880
|
InstanceIdClientErrorCode.INVALID_INSTANCE_ID = {
|
|
826
881
|
code: 'invalid-instance-id',
|
|
827
882
|
message: 'Invalid instance ID provided.',
|
|
828
883
|
};
|
|
829
|
-
InstanceIdClientErrorCode.API_ERROR = {
|
|
830
|
-
code: 'api-error',
|
|
831
|
-
message: 'Instance ID API call failed.',
|
|
832
|
-
};
|
|
833
884
|
return InstanceIdClientErrorCode;
|
|
834
|
-
}());
|
|
885
|
+
}(InstallationsClientErrorCode));
|
|
835
886
|
exports.InstanceIdClientErrorCode = InstanceIdClientErrorCode;
|
|
836
887
|
/** @const {ServerToClientCode} Auth server to client enum error codes. */
|
|
837
888
|
var AUTH_SERVER_TO_CLIENT_CODE = {
|
|
@@ -861,6 +912,8 @@ var AUTH_SERVER_TO_CLIENT_CODE = {
|
|
|
861
912
|
DUPLICATE_MFA_ENROLLMENT_ID: 'SECOND_FACTOR_UID_ALREADY_EXISTS',
|
|
862
913
|
// setAccountInfo email already exists.
|
|
863
914
|
EMAIL_EXISTS: 'EMAIL_ALREADY_EXISTS',
|
|
915
|
+
// /accounts:sendOobCode for password reset when user is not found.
|
|
916
|
+
EMAIL_NOT_FOUND: 'EMAIL_NOT_FOUND',
|
|
864
917
|
// Reserved claim name.
|
|
865
918
|
FORBIDDEN_CLAIM: 'FORBIDDEN_CLAIM',
|
|
866
919
|
// Invalid claims provided.
|
|
@@ -947,6 +1000,8 @@ var AUTH_SERVER_TO_CLIENT_CODE = {
|
|
|
947
1000
|
UNVERIFIED_EMAIL: 'UNVERIFIED_EMAIL',
|
|
948
1001
|
// User on which action is to be performed is not found.
|
|
949
1002
|
USER_NOT_FOUND: 'USER_NOT_FOUND',
|
|
1003
|
+
// User record is disabled.
|
|
1004
|
+
USER_DISABLED: 'USER_DISABLED',
|
|
950
1005
|
// Password provided is too weak.
|
|
951
1006
|
WEAK_PASSWORD: 'INVALID_PASSWORD',
|
|
952
1007
|
};
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v10.0.2 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -23,8 +23,8 @@ export declare function getSdkVersion(): string;
|
|
|
23
23
|
*
|
|
24
24
|
* For example, this can be used to map underscore_cased properties to camelCase.
|
|
25
25
|
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
26
|
+
* @param obj - The object whose properties to rename.
|
|
27
|
+
* @param keyMap - The mapping from old to new property names.
|
|
28
28
|
*/
|
|
29
29
|
export declare function renameProperties(obj: {
|
|
30
30
|
[key: string]: any;
|
|
@@ -34,9 +34,9 @@ export declare function renameProperties(obj: {
|
|
|
34
34
|
/**
|
|
35
35
|
* Defines a new read-only property directly on an object and returns the object.
|
|
36
36
|
*
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
37
|
+
* @param obj - The object on which to define the property.
|
|
38
|
+
* @param prop - The name of the property to be defined or modified.
|
|
39
|
+
* @param value - The value associated with the property.
|
|
40
40
|
*/
|
|
41
41
|
export declare function addReadonlyGetter(obj: object, prop: string, value: any): void;
|
|
42
42
|
/**
|
|
@@ -44,9 +44,9 @@ export declare function addReadonlyGetter(obj: object, prop: string, value: any)
|
|
|
44
44
|
* specified in either the Firebase app options, credentials or the local environment.
|
|
45
45
|
* Otherwise returns null.
|
|
46
46
|
*
|
|
47
|
-
* @param app A Firebase app to get the project ID from.
|
|
47
|
+
* @param app - A Firebase app to get the project ID from.
|
|
48
48
|
*
|
|
49
|
-
* @
|
|
49
|
+
* @returns A project ID string or null.
|
|
50
50
|
*/
|
|
51
51
|
export declare function getExplicitProjectId(app: App): string | null;
|
|
52
52
|
/**
|
|
@@ -56,16 +56,16 @@ export declare function getExplicitProjectId(app: App): string | null;
|
|
|
56
56
|
* configured, but the SDK has been initialized with ComputeEngineCredentials, this
|
|
57
57
|
* method attempts to discover the project ID from the local metadata service.
|
|
58
58
|
*
|
|
59
|
-
* @param app A Firebase app to get the project ID from.
|
|
59
|
+
* @param app - A Firebase app to get the project ID from.
|
|
60
60
|
*
|
|
61
|
-
* @
|
|
61
|
+
* @returns A project ID string or null.
|
|
62
62
|
*/
|
|
63
63
|
export declare function findProjectId(app: App): Promise<string | null>;
|
|
64
64
|
/**
|
|
65
65
|
* Encodes data using web-safe-base64.
|
|
66
66
|
*
|
|
67
|
-
* @param
|
|
68
|
-
* @
|
|
67
|
+
* @param data - The raw data byte input.
|
|
68
|
+
* @returns The base64-encoded result.
|
|
69
69
|
*/
|
|
70
70
|
export declare function toWebSafeBase64(data: Buffer): string;
|
|
71
71
|
/**
|
|
@@ -73,22 +73,33 @@ export declare function toWebSafeBase64(data: Buffer): string;
|
|
|
73
73
|
* with corresponding arguments {projectId: '1234', api: 'resource'}
|
|
74
74
|
* and returns output: 'project/1234/resource'.
|
|
75
75
|
*
|
|
76
|
-
* @param
|
|
76
|
+
* @param str - The original string where the param need to be
|
|
77
77
|
* replaced.
|
|
78
|
-
* @param
|
|
78
|
+
* @param params - The optional parameters to replace in the
|
|
79
79
|
* string.
|
|
80
|
-
* @
|
|
80
|
+
* @returns The resulting formatted string.
|
|
81
81
|
*/
|
|
82
82
|
export declare function formatString(str: string, params?: object): string;
|
|
83
83
|
/**
|
|
84
84
|
* Generates the update mask for the provided object.
|
|
85
85
|
* Note this will ignore the last key with value undefined.
|
|
86
86
|
*
|
|
87
|
-
* @param obj The object to generate the update mask for.
|
|
88
|
-
* @param terminalPaths The optional map of keys for maximum paths to traverse.
|
|
87
|
+
* @param obj - The object to generate the update mask for.
|
|
88
|
+
* @param terminalPaths - The optional map of keys for maximum paths to traverse.
|
|
89
89
|
* Nested objects beyond that path will be ignored. This is useful for
|
|
90
90
|
* keys with variable object values.
|
|
91
|
-
* @param root The path so far.
|
|
92
|
-
* @
|
|
91
|
+
* @param root - The path so far.
|
|
92
|
+
* @returns The computed update mask list.
|
|
93
93
|
*/
|
|
94
94
|
export declare function generateUpdateMask(obj: any, terminalPaths?: string[], root?: string): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Transforms milliseconds to a protobuf Duration type string.
|
|
97
|
+
* Returns the duration in seconds with up to nine fractional
|
|
98
|
+
* digits, terminated by 's'. Example: "3 seconds 0 nano seconds as 3s,
|
|
99
|
+
* 3 seconds 1 nano seconds as 3.000000001s".
|
|
100
|
+
*
|
|
101
|
+
* @param milliseconds - The duration in milliseconds.
|
|
102
|
+
* @returns The resulting formatted string in seconds with up to nine fractional
|
|
103
|
+
* digits, terminated by 's'.
|
|
104
|
+
*/
|
|
105
|
+
export declare function transformMillisecondsToSecondsString(milliseconds: number): string;
|