1 |
|
2 | "use strict";
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | var __extends = (this && this.__extends) || (function () {
|
20 | var extendStatics = function (d, b) {
|
21 | extendStatics = Object.setPrototypeOf ||
|
22 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
23 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
24 | return extendStatics(d, b);
|
25 | };
|
26 | return function (d, b) {
|
27 | extendStatics(d, b);
|
28 | function __() { this.constructor = d; }
|
29 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
30 | };
|
31 | })();
|
32 | Object.defineProperty(exports, "__esModule", { value: true });
|
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 | var deep_copy_1 = require("../utils/deep-copy");
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | var FirebaseError = (function (_super) {
|
42 | __extends(FirebaseError, _super);
|
43 | function FirebaseError(errorInfo) {
|
44 | var _this = _super.call(this, errorInfo.message) || this;
|
45 | _this.errorInfo = errorInfo;
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | _this.__proto__ = FirebaseError.prototype;
|
51 | return _this;
|
52 | }
|
53 | Object.defineProperty(FirebaseError.prototype, "code", {
|
54 |
|
55 | get: function () {
|
56 | return this.errorInfo.code;
|
57 | },
|
58 | enumerable: false,
|
59 | configurable: true
|
60 | });
|
61 | Object.defineProperty(FirebaseError.prototype, "message", {
|
62 |
|
63 | get: function () {
|
64 | return this.errorInfo.message;
|
65 | },
|
66 | enumerable: false,
|
67 | configurable: true
|
68 | });
|
69 |
|
70 | FirebaseError.prototype.toJSON = function () {
|
71 | return {
|
72 | code: this.code,
|
73 | message: this.message,
|
74 | };
|
75 | };
|
76 | return FirebaseError;
|
77 | }(Error));
|
78 | exports.FirebaseError = FirebaseError;
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | var PrefixedFirebaseError = (function (_super) {
|
88 | __extends(PrefixedFirebaseError, _super);
|
89 | function PrefixedFirebaseError(codePrefix, code, message) {
|
90 | var _this = _super.call(this, {
|
91 | code: codePrefix + "/" + code,
|
92 | message: message,
|
93 | }) || this;
|
94 | _this.codePrefix = codePrefix;
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | _this.__proto__ = PrefixedFirebaseError.prototype;
|
100 | return _this;
|
101 | }
|
102 | |
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | PrefixedFirebaseError.prototype.hasCode = function (code) {
|
110 | return this.codePrefix + "/" + code === this.code;
|
111 | };
|
112 | return PrefixedFirebaseError;
|
113 | }(FirebaseError));
|
114 | exports.PrefixedFirebaseError = PrefixedFirebaseError;
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | var FirebaseAppError = (function (_super) {
|
123 | __extends(FirebaseAppError, _super);
|
124 | function FirebaseAppError(code, message) {
|
125 | var _this = _super.call(this, 'app', code, message) || this;
|
126 |
|
127 |
|
128 |
|
129 |
|
130 | _this.__proto__ = FirebaseAppError.prototype;
|
131 | return _this;
|
132 | }
|
133 | return FirebaseAppError;
|
134 | }(PrefixedFirebaseError));
|
135 | exports.FirebaseAppError = FirebaseAppError;
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 | var FirebaseAuthError = (function (_super) {
|
145 | __extends(FirebaseAuthError, _super);
|
146 | function FirebaseAuthError(info, message) {
|
147 | var _this =
|
148 |
|
149 | _super.call(this, 'auth', info.code, message || info.message) || this;
|
150 |
|
151 |
|
152 |
|
153 |
|
154 | _this.__proto__ = FirebaseAuthError.prototype;
|
155 | return _this;
|
156 | }
|
157 | |
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 | FirebaseAuthError.fromServerError = function (serverErrorCode, message, rawServerResponse) {
|
167 |
|
168 |
|
169 | var colonSeparator = (serverErrorCode || '').indexOf(':');
|
170 | var customMessage = null;
|
171 | if (colonSeparator !== -1) {
|
172 | customMessage = serverErrorCode.substring(colonSeparator + 1).trim();
|
173 | serverErrorCode = serverErrorCode.substring(0, colonSeparator).trim();
|
174 | }
|
175 |
|
176 | var clientCodeKey = AUTH_SERVER_TO_CLIENT_CODE[serverErrorCode] || 'INTERNAL_ERROR';
|
177 | var error = deep_copy_1.deepCopy(AuthClientErrorCode[clientCodeKey]);
|
178 |
|
179 | error.message = customMessage || message || error.message;
|
180 | if (clientCodeKey === 'INTERNAL_ERROR' && typeof rawServerResponse !== 'undefined') {
|
181 | try {
|
182 | error.message += " Raw server response: \"" + JSON.stringify(rawServerResponse) + "\"";
|
183 | }
|
184 | catch (e) {
|
185 |
|
186 | }
|
187 | }
|
188 | return new FirebaseAuthError(error);
|
189 | };
|
190 | return FirebaseAuthError;
|
191 | }(PrefixedFirebaseError));
|
192 | exports.FirebaseAuthError = FirebaseAuthError;
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 | var FirebaseDatabaseError = (function (_super) {
|
202 | __extends(FirebaseDatabaseError, _super);
|
203 | function FirebaseDatabaseError(info, message) {
|
204 |
|
205 | return _super.call(this, { code: 'database/' + info.code, message: message || info.message }) || this;
|
206 | }
|
207 | return FirebaseDatabaseError;
|
208 | }(FirebaseError));
|
209 | exports.FirebaseDatabaseError = FirebaseDatabaseError;
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 | var FirebaseFirestoreError = (function (_super) {
|
219 | __extends(FirebaseFirestoreError, _super);
|
220 | function FirebaseFirestoreError(info, message) {
|
221 |
|
222 | return _super.call(this, { code: 'firestore/' + info.code, message: message || info.message }) || this;
|
223 | }
|
224 | return FirebaseFirestoreError;
|
225 | }(FirebaseError));
|
226 | exports.FirebaseFirestoreError = FirebaseFirestoreError;
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 | var FirebaseInstanceIdError = (function (_super) {
|
236 | __extends(FirebaseInstanceIdError, _super);
|
237 | function FirebaseInstanceIdError(info, message) {
|
238 | var _this =
|
239 |
|
240 | _super.call(this, { code: 'instance-id/' + info.code, message: message || info.message }) || this;
|
241 | _this.__proto__ = FirebaseInstanceIdError.prototype;
|
242 | return _this;
|
243 | }
|
244 | return FirebaseInstanceIdError;
|
245 | }(FirebaseError));
|
246 | exports.FirebaseInstanceIdError = FirebaseInstanceIdError;
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 | var FirebaseInstallationsError = (function (_super) {
|
256 | __extends(FirebaseInstallationsError, _super);
|
257 | function FirebaseInstallationsError(info, message) {
|
258 | var _this =
|
259 |
|
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;
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 | var FirebaseMessagingError = (function (_super) {
|
275 | __extends(FirebaseMessagingError, _super);
|
276 | function FirebaseMessagingError(info, message) {
|
277 | var _this =
|
278 |
|
279 | _super.call(this, 'messaging', info.code, message || info.message) || this;
|
280 |
|
281 |
|
282 |
|
283 |
|
284 | _this.__proto__ = FirebaseMessagingError.prototype;
|
285 | return _this;
|
286 | }
|
287 | |
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | FirebaseMessagingError.fromServerError = function (serverErrorCode, message, rawServerResponse) {
|
297 |
|
298 | var clientCodeKey = 'UNKNOWN_ERROR';
|
299 | if (serverErrorCode && serverErrorCode in MESSAGING_SERVER_TO_CLIENT_CODE) {
|
300 | clientCodeKey = MESSAGING_SERVER_TO_CLIENT_CODE[serverErrorCode];
|
301 | }
|
302 | var error = deep_copy_1.deepCopy(MessagingClientErrorCode[clientCodeKey]);
|
303 | error.message = message || error.message;
|
304 | if (clientCodeKey === 'UNKNOWN_ERROR' && typeof rawServerResponse !== 'undefined') {
|
305 | try {
|
306 | error.message += " Raw server response: \"" + JSON.stringify(rawServerResponse) + "\"";
|
307 | }
|
308 | catch (e) {
|
309 |
|
310 | }
|
311 | }
|
312 | return new FirebaseMessagingError(error);
|
313 | };
|
314 | FirebaseMessagingError.fromTopicManagementServerError = function (serverErrorCode, message, rawServerResponse) {
|
315 |
|
316 | var clientCodeKey = TOPIC_MGT_SERVER_TO_CLIENT_CODE[serverErrorCode] || 'UNKNOWN_ERROR';
|
317 | var error = deep_copy_1.deepCopy(MessagingClientErrorCode[clientCodeKey]);
|
318 | error.message = message || error.message;
|
319 | if (clientCodeKey === 'UNKNOWN_ERROR' && typeof rawServerResponse !== 'undefined') {
|
320 | try {
|
321 | error.message += " Raw server response: \"" + JSON.stringify(rawServerResponse) + "\"";
|
322 | }
|
323 | catch (e) {
|
324 |
|
325 | }
|
326 | }
|
327 | return new FirebaseMessagingError(error);
|
328 | };
|
329 | return FirebaseMessagingError;
|
330 | }(PrefixedFirebaseError));
|
331 | exports.FirebaseMessagingError = FirebaseMessagingError;
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 | var FirebaseProjectManagementError = (function (_super) {
|
340 | __extends(FirebaseProjectManagementError, _super);
|
341 | function FirebaseProjectManagementError(code, message) {
|
342 | var _this = _super.call(this, 'project-management', code, message) || this;
|
343 |
|
344 |
|
345 |
|
346 |
|
347 | _this.__proto__ = FirebaseProjectManagementError.prototype;
|
348 | return _this;
|
349 | }
|
350 | return FirebaseProjectManagementError;
|
351 | }(PrefixedFirebaseError));
|
352 | exports.FirebaseProjectManagementError = FirebaseProjectManagementError;
|
353 |
|
354 |
|
355 |
|
356 | var AppErrorCodes = (function () {
|
357 | function AppErrorCodes() {
|
358 | }
|
359 | AppErrorCodes.APP_DELETED = 'app-deleted';
|
360 | AppErrorCodes.DUPLICATE_APP = 'duplicate-app';
|
361 | AppErrorCodes.INVALID_ARGUMENT = 'invalid-argument';
|
362 | AppErrorCodes.INTERNAL_ERROR = 'internal-error';
|
363 | AppErrorCodes.INVALID_APP_NAME = 'invalid-app-name';
|
364 | AppErrorCodes.INVALID_APP_OPTIONS = 'invalid-app-options';
|
365 | AppErrorCodes.INVALID_CREDENTIAL = 'invalid-credential';
|
366 | AppErrorCodes.NETWORK_ERROR = 'network-error';
|
367 | AppErrorCodes.NETWORK_TIMEOUT = 'network-timeout';
|
368 | AppErrorCodes.NO_APP = 'no-app';
|
369 | AppErrorCodes.UNABLE_TO_PARSE_RESPONSE = 'unable-to-parse-response';
|
370 | return AppErrorCodes;
|
371 | }());
|
372 | exports.AppErrorCodes = AppErrorCodes;
|
373 |
|
374 |
|
375 |
|
376 | var AuthClientErrorCode = (function () {
|
377 | function AuthClientErrorCode() {
|
378 | }
|
379 | AuthClientErrorCode.BILLING_NOT_ENABLED = {
|
380 | code: 'billing-not-enabled',
|
381 | message: 'Feature requires billing to be enabled.',
|
382 | };
|
383 | AuthClientErrorCode.CLAIMS_TOO_LARGE = {
|
384 | code: 'claims-too-large',
|
385 | message: 'Developer claims maximum payload size exceeded.',
|
386 | };
|
387 | AuthClientErrorCode.CONFIGURATION_EXISTS = {
|
388 | code: 'configuration-exists',
|
389 | message: 'A configuration already exists with the provided identifier.',
|
390 | };
|
391 | AuthClientErrorCode.CONFIGURATION_NOT_FOUND = {
|
392 | code: 'configuration-not-found',
|
393 | message: 'There is no configuration corresponding to the provided identifier.',
|
394 | };
|
395 | AuthClientErrorCode.ID_TOKEN_EXPIRED = {
|
396 | code: 'id-token-expired',
|
397 | message: 'The provided Firebase ID token is expired.',
|
398 | };
|
399 | AuthClientErrorCode.INVALID_ARGUMENT = {
|
400 | code: 'argument-error',
|
401 | message: 'Invalid argument provided.',
|
402 | };
|
403 | AuthClientErrorCode.INVALID_CONFIG = {
|
404 | code: 'invalid-config',
|
405 | message: 'The provided configuration is invalid.',
|
406 | };
|
407 | AuthClientErrorCode.EMAIL_ALREADY_EXISTS = {
|
408 | code: 'email-already-exists',
|
409 | message: 'The email address is already in use by another account.',
|
410 | };
|
411 | AuthClientErrorCode.EMAIL_NOT_FOUND = {
|
412 | code: 'email-not-found',
|
413 | message: 'There is no user record corresponding to the provided email.',
|
414 | };
|
415 | AuthClientErrorCode.FORBIDDEN_CLAIM = {
|
416 | code: 'reserved-claim',
|
417 | message: 'The specified developer claim is reserved and cannot be specified.',
|
418 | };
|
419 | AuthClientErrorCode.INVALID_ID_TOKEN = {
|
420 | code: 'invalid-id-token',
|
421 | message: 'The provided ID token is not a valid Firebase ID token.',
|
422 | };
|
423 | AuthClientErrorCode.ID_TOKEN_REVOKED = {
|
424 | code: 'id-token-revoked',
|
425 | message: 'The Firebase ID token has been revoked.',
|
426 | };
|
427 | AuthClientErrorCode.INTERNAL_ERROR = {
|
428 | code: 'internal-error',
|
429 | message: 'An internal error has occurred.',
|
430 | };
|
431 | AuthClientErrorCode.INVALID_CLAIMS = {
|
432 | code: 'invalid-claims',
|
433 | message: 'The provided custom claim attributes are invalid.',
|
434 | };
|
435 | AuthClientErrorCode.INVALID_CONTINUE_URI = {
|
436 | code: 'invalid-continue-uri',
|
437 | message: 'The continue URL must be a valid URL string.',
|
438 | };
|
439 | AuthClientErrorCode.INVALID_CREATION_TIME = {
|
440 | code: 'invalid-creation-time',
|
441 | message: 'The creation time must be a valid UTC date string.',
|
442 | };
|
443 | AuthClientErrorCode.INVALID_CREDENTIAL = {
|
444 | code: 'invalid-credential',
|
445 | message: 'Invalid credential object provided.',
|
446 | };
|
447 | AuthClientErrorCode.INVALID_DISABLED_FIELD = {
|
448 | code: 'invalid-disabled-field',
|
449 | message: 'The disabled field must be a boolean.',
|
450 | };
|
451 | AuthClientErrorCode.INVALID_DISPLAY_NAME = {
|
452 | code: 'invalid-display-name',
|
453 | message: 'The displayName field must be a valid string.',
|
454 | };
|
455 | AuthClientErrorCode.INVALID_DYNAMIC_LINK_DOMAIN = {
|
456 | code: 'invalid-dynamic-link-domain',
|
457 | message: 'The provided dynamic link domain is not configured or authorized ' +
|
458 | 'for the current project.',
|
459 | };
|
460 | AuthClientErrorCode.INVALID_EMAIL_VERIFIED = {
|
461 | code: 'invalid-email-verified',
|
462 | message: 'The emailVerified field must be a boolean.',
|
463 | };
|
464 | AuthClientErrorCode.INVALID_EMAIL = {
|
465 | code: 'invalid-email',
|
466 | message: 'The email address is improperly formatted.',
|
467 | };
|
468 | AuthClientErrorCode.INVALID_ENROLLED_FACTORS = {
|
469 | code: 'invalid-enrolled-factors',
|
470 | message: 'The enrolled factors must be a valid array of MultiFactorInfo objects.',
|
471 | };
|
472 | AuthClientErrorCode.INVALID_ENROLLMENT_TIME = {
|
473 | code: 'invalid-enrollment-time',
|
474 | message: 'The second factor enrollment time must be a valid UTC date string.',
|
475 | };
|
476 | AuthClientErrorCode.INVALID_HASH_ALGORITHM = {
|
477 | code: 'invalid-hash-algorithm',
|
478 | message: 'The hash algorithm must match one of the strings in the list of ' +
|
479 | 'supported algorithms.',
|
480 | };
|
481 | AuthClientErrorCode.INVALID_HASH_BLOCK_SIZE = {
|
482 | code: 'invalid-hash-block-size',
|
483 | message: 'The hash block size must be a valid number.',
|
484 | };
|
485 | AuthClientErrorCode.INVALID_HASH_DERIVED_KEY_LENGTH = {
|
486 | code: 'invalid-hash-derived-key-length',
|
487 | message: 'The hash derived key length must be a valid number.',
|
488 | };
|
489 | AuthClientErrorCode.INVALID_HASH_KEY = {
|
490 | code: 'invalid-hash-key',
|
491 | message: 'The hash key must a valid byte buffer.',
|
492 | };
|
493 | AuthClientErrorCode.INVALID_HASH_MEMORY_COST = {
|
494 | code: 'invalid-hash-memory-cost',
|
495 | message: 'The hash memory cost must be a valid number.',
|
496 | };
|
497 | AuthClientErrorCode.INVALID_HASH_PARALLELIZATION = {
|
498 | code: 'invalid-hash-parallelization',
|
499 | message: 'The hash parallelization must be a valid number.',
|
500 | };
|
501 | AuthClientErrorCode.INVALID_HASH_ROUNDS = {
|
502 | code: 'invalid-hash-rounds',
|
503 | message: 'The hash rounds must be a valid number.',
|
504 | };
|
505 | AuthClientErrorCode.INVALID_HASH_SALT_SEPARATOR = {
|
506 | code: 'invalid-hash-salt-separator',
|
507 | message: 'The hashing algorithm salt separator field must be a valid byte buffer.',
|
508 | };
|
509 | AuthClientErrorCode.INVALID_LAST_SIGN_IN_TIME = {
|
510 | code: 'invalid-last-sign-in-time',
|
511 | message: 'The last sign-in time must be a valid UTC date string.',
|
512 | };
|
513 | AuthClientErrorCode.INVALID_NAME = {
|
514 | code: 'invalid-name',
|
515 | message: 'The resource name provided is invalid.',
|
516 | };
|
517 | AuthClientErrorCode.INVALID_OAUTH_CLIENT_ID = {
|
518 | code: 'invalid-oauth-client-id',
|
519 | message: 'The provided OAuth client ID is invalid.',
|
520 | };
|
521 | AuthClientErrorCode.INVALID_PAGE_TOKEN = {
|
522 | code: 'invalid-page-token',
|
523 | message: 'The page token must be a valid non-empty string.',
|
524 | };
|
525 | AuthClientErrorCode.INVALID_PASSWORD = {
|
526 | code: 'invalid-password',
|
527 | message: 'The password must be a string with at least 6 characters.',
|
528 | };
|
529 | AuthClientErrorCode.INVALID_PASSWORD_HASH = {
|
530 | code: 'invalid-password-hash',
|
531 | message: 'The password hash must be a valid byte buffer.',
|
532 | };
|
533 | AuthClientErrorCode.INVALID_PASSWORD_SALT = {
|
534 | code: 'invalid-password-salt',
|
535 | message: 'The password salt must be a valid byte buffer.',
|
536 | };
|
537 | AuthClientErrorCode.INVALID_PHONE_NUMBER = {
|
538 | code: 'invalid-phone-number',
|
539 | message: 'The phone number must be a non-empty E.164 standard compliant identifier ' +
|
540 | 'string.',
|
541 | };
|
542 | AuthClientErrorCode.INVALID_PHOTO_URL = {
|
543 | code: 'invalid-photo-url',
|
544 | message: 'The photoURL field must be a valid URL.',
|
545 | };
|
546 | AuthClientErrorCode.INVALID_PROJECT_ID = {
|
547 | code: 'invalid-project-id',
|
548 | message: 'Invalid parent project. Either parent project doesn\'t exist or didn\'t enable multi-tenancy.',
|
549 | };
|
550 | AuthClientErrorCode.INVALID_PROVIDER_DATA = {
|
551 | code: 'invalid-provider-data',
|
552 | message: 'The providerData must be a valid array of UserInfo objects.',
|
553 | };
|
554 | AuthClientErrorCode.INVALID_PROVIDER_ID = {
|
555 | code: 'invalid-provider-id',
|
556 | message: 'The providerId must be a valid supported provider identifier string.',
|
557 | };
|
558 | AuthClientErrorCode.INVALID_PROVIDER_UID = {
|
559 | code: 'invalid-provider-uid',
|
560 | message: 'The providerUid must be a valid provider uid string.',
|
561 | };
|
562 | AuthClientErrorCode.INVALID_OAUTH_RESPONSETYPE = {
|
563 | code: 'invalid-oauth-responsetype',
|
564 | message: 'Only exactly one OAuth responseType should be set to true.',
|
565 | };
|
566 | AuthClientErrorCode.INVALID_SESSION_COOKIE_DURATION = {
|
567 | code: 'invalid-session-cookie-duration',
|
568 | message: 'The session cookie duration must be a valid number in milliseconds ' +
|
569 | 'between 5 minutes and 2 weeks.',
|
570 | };
|
571 | AuthClientErrorCode.INVALID_TENANT_ID = {
|
572 | code: 'invalid-tenant-id',
|
573 | message: 'The tenant ID must be a valid non-empty string.',
|
574 | };
|
575 | AuthClientErrorCode.INVALID_TENANT_TYPE = {
|
576 | code: 'invalid-tenant-type',
|
577 | message: 'Tenant type must be either "full_service" or "lightweight".',
|
578 | };
|
579 | AuthClientErrorCode.INVALID_TESTING_PHONE_NUMBER = {
|
580 | code: 'invalid-testing-phone-number',
|
581 | message: 'Invalid testing phone number or invalid test code provided.',
|
582 | };
|
583 | AuthClientErrorCode.INVALID_UID = {
|
584 | code: 'invalid-uid',
|
585 | message: 'The uid must be a non-empty string with at most 128 characters.',
|
586 | };
|
587 | AuthClientErrorCode.INVALID_USER_IMPORT = {
|
588 | code: 'invalid-user-import',
|
589 | message: 'The user record to import is invalid.',
|
590 | };
|
591 | AuthClientErrorCode.INVALID_TOKENS_VALID_AFTER_TIME = {
|
592 | code: 'invalid-tokens-valid-after-time',
|
593 | message: 'The tokensValidAfterTime must be a valid UTC number in seconds.',
|
594 | };
|
595 | AuthClientErrorCode.MISMATCHING_TENANT_ID = {
|
596 | code: 'mismatching-tenant-id',
|
597 | message: 'User tenant ID does not match with the current TenantAwareAuth tenant ID.',
|
598 | };
|
599 | AuthClientErrorCode.MISSING_ANDROID_PACKAGE_NAME = {
|
600 | code: 'missing-android-pkg-name',
|
601 | message: 'An Android Package Name must be provided if the Android App is ' +
|
602 | 'required to be installed.',
|
603 | };
|
604 | AuthClientErrorCode.MISSING_CONFIG = {
|
605 | code: 'missing-config',
|
606 | message: 'The provided configuration is missing required attributes.',
|
607 | };
|
608 | AuthClientErrorCode.MISSING_CONTINUE_URI = {
|
609 | code: 'missing-continue-uri',
|
610 | message: 'A valid continue URL must be provided in the request.',
|
611 | };
|
612 | AuthClientErrorCode.MISSING_DISPLAY_NAME = {
|
613 | code: 'missing-display-name',
|
614 | message: 'The resource being created or edited is missing a valid display name.',
|
615 | };
|
616 | AuthClientErrorCode.MISSING_EMAIL = {
|
617 | code: 'missing-email',
|
618 | message: 'The email is required for the specified action. For example, a multi-factor user ' +
|
619 | 'requires a verified email.',
|
620 | };
|
621 | AuthClientErrorCode.MISSING_IOS_BUNDLE_ID = {
|
622 | code: 'missing-ios-bundle-id',
|
623 | message: 'The request is missing an iOS Bundle ID.',
|
624 | };
|
625 | AuthClientErrorCode.MISSING_ISSUER = {
|
626 | code: 'missing-issuer',
|
627 | message: 'The OAuth/OIDC configuration issuer must not be empty.',
|
628 | };
|
629 | AuthClientErrorCode.MISSING_HASH_ALGORITHM = {
|
630 | code: 'missing-hash-algorithm',
|
631 | message: 'Importing users with password hashes requires that the hashing ' +
|
632 | 'algorithm and its parameters be provided.',
|
633 | };
|
634 | AuthClientErrorCode.MISSING_OAUTH_CLIENT_ID = {
|
635 | code: 'missing-oauth-client-id',
|
636 | message: 'The OAuth/OIDC configuration client ID must not be empty.',
|
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 | };
|
642 | AuthClientErrorCode.MISSING_PROVIDER_ID = {
|
643 | code: 'missing-provider-id',
|
644 | message: 'A valid provider ID must be provided in the request.',
|
645 | };
|
646 | AuthClientErrorCode.MISSING_SAML_RELYING_PARTY_CONFIG = {
|
647 | code: 'missing-saml-relying-party-config',
|
648 | message: 'The SAML configuration provided is missing a relying party configuration.',
|
649 | };
|
650 | AuthClientErrorCode.MAXIMUM_TEST_PHONE_NUMBER_EXCEEDED = {
|
651 | code: 'test-phone-number-limit-exceeded',
|
652 | message: 'The maximum allowed number of test phone number / code pairs has been exceeded.',
|
653 | };
|
654 | AuthClientErrorCode.MAXIMUM_USER_COUNT_EXCEEDED = {
|
655 | code: 'maximum-user-count-exceeded',
|
656 | message: 'The maximum allowed number of users to import has been exceeded.',
|
657 | };
|
658 | AuthClientErrorCode.MISSING_UID = {
|
659 | code: 'missing-uid',
|
660 | message: 'A uid identifier is required for the current operation.',
|
661 | };
|
662 | AuthClientErrorCode.OPERATION_NOT_ALLOWED = {
|
663 | code: 'operation-not-allowed',
|
664 | message: 'The given sign-in provider is disabled for this Firebase project. ' +
|
665 | 'Enable it in the Firebase console, under the sign-in method tab of the ' +
|
666 | 'Auth section.',
|
667 | };
|
668 | AuthClientErrorCode.PHONE_NUMBER_ALREADY_EXISTS = {
|
669 | code: 'phone-number-already-exists',
|
670 | message: 'The user with the provided phone number already exists.',
|
671 | };
|
672 | AuthClientErrorCode.PROJECT_NOT_FOUND = {
|
673 | code: 'project-not-found',
|
674 | message: 'No Firebase project was found for the provided credential.',
|
675 | };
|
676 | AuthClientErrorCode.INSUFFICIENT_PERMISSION = {
|
677 | code: 'insufficient-permission',
|
678 | message: 'Credential implementation provided to initializeApp() via the "credential" property ' +
|
679 | 'has insufficient permission to access the requested resource. See ' +
|
680 | 'https://firebase.google.com/docs/admin/setup for details on how to authenticate this SDK ' +
|
681 | 'with appropriate permissions.',
|
682 | };
|
683 | AuthClientErrorCode.QUOTA_EXCEEDED = {
|
684 | code: 'quota-exceeded',
|
685 | message: 'The project quota for the specified operation has been exceeded.',
|
686 | };
|
687 | AuthClientErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED = {
|
688 | code: 'second-factor-limit-exceeded',
|
689 | message: 'The maximum number of allowed second factors on a user has been exceeded.',
|
690 | };
|
691 | AuthClientErrorCode.SECOND_FACTOR_UID_ALREADY_EXISTS = {
|
692 | code: 'second-factor-uid-already-exists',
|
693 | message: 'The specified second factor "uid" already exists.',
|
694 | };
|
695 | AuthClientErrorCode.SESSION_COOKIE_EXPIRED = {
|
696 | code: 'session-cookie-expired',
|
697 | message: 'The Firebase session cookie is expired.',
|
698 | };
|
699 | AuthClientErrorCode.SESSION_COOKIE_REVOKED = {
|
700 | code: 'session-cookie-revoked',
|
701 | message: 'The Firebase session cookie has been revoked.',
|
702 | };
|
703 | AuthClientErrorCode.TENANT_NOT_FOUND = {
|
704 | code: 'tenant-not-found',
|
705 | message: 'There is no tenant corresponding to the provided identifier.',
|
706 | };
|
707 | AuthClientErrorCode.UID_ALREADY_EXISTS = {
|
708 | code: 'uid-already-exists',
|
709 | message: 'The user with the provided uid already exists.',
|
710 | };
|
711 | AuthClientErrorCode.UNAUTHORIZED_DOMAIN = {
|
712 | code: 'unauthorized-continue-uri',
|
713 | message: 'The domain of the continue URL is not whitelisted. Whitelist the domain in the ' +
|
714 | 'Firebase console.',
|
715 | };
|
716 | AuthClientErrorCode.UNSUPPORTED_FIRST_FACTOR = {
|
717 | code: 'unsupported-first-factor',
|
718 | message: 'A multi-factor user requires a supported first factor.',
|
719 | };
|
720 | AuthClientErrorCode.UNSUPPORTED_SECOND_FACTOR = {
|
721 | code: 'unsupported-second-factor',
|
722 | message: 'The request specified an unsupported type of second factor.',
|
723 | };
|
724 | AuthClientErrorCode.UNSUPPORTED_TENANT_OPERATION = {
|
725 | code: 'unsupported-tenant-operation',
|
726 | message: 'This operation is not supported in a multi-tenant context.',
|
727 | };
|
728 | AuthClientErrorCode.UNVERIFIED_EMAIL = {
|
729 | code: 'unverified-email',
|
730 | message: 'A verified email is required for the specified action. For example, a multi-factor user ' +
|
731 | 'requires a verified email.',
|
732 | };
|
733 | AuthClientErrorCode.USER_NOT_FOUND = {
|
734 | code: 'user-not-found',
|
735 | message: 'There is no user record corresponding to the provided identifier.',
|
736 | };
|
737 | AuthClientErrorCode.NOT_FOUND = {
|
738 | code: 'not-found',
|
739 | message: 'The requested resource was not found.',
|
740 | };
|
741 | AuthClientErrorCode.USER_DISABLED = {
|
742 | code: 'user-disabled',
|
743 | message: 'The user record is disabled.',
|
744 | };
|
745 | AuthClientErrorCode.USER_NOT_DISABLED = {
|
746 | code: 'user-not-disabled',
|
747 | message: 'The user must be disabled in order to bulk delete it (or you must pass force=true).',
|
748 | };
|
749 | return AuthClientErrorCode;
|
750 | }());
|
751 | exports.AuthClientErrorCode = AuthClientErrorCode;
|
752 |
|
753 |
|
754 |
|
755 | var MessagingClientErrorCode = (function () {
|
756 | function MessagingClientErrorCode() {
|
757 | }
|
758 | MessagingClientErrorCode.INVALID_ARGUMENT = {
|
759 | code: 'invalid-argument',
|
760 | message: 'Invalid argument provided.',
|
761 | };
|
762 | MessagingClientErrorCode.INVALID_RECIPIENT = {
|
763 | code: 'invalid-recipient',
|
764 | message: 'Invalid message recipient provided.',
|
765 | };
|
766 | MessagingClientErrorCode.INVALID_PAYLOAD = {
|
767 | code: 'invalid-payload',
|
768 | message: 'Invalid message payload provided.',
|
769 | };
|
770 | MessagingClientErrorCode.INVALID_DATA_PAYLOAD_KEY = {
|
771 | code: 'invalid-data-payload-key',
|
772 | message: 'The data message payload contains an invalid key. See the reference documentation ' +
|
773 | 'for the DataMessagePayload type for restricted keys.',
|
774 | };
|
775 | MessagingClientErrorCode.PAYLOAD_SIZE_LIMIT_EXCEEDED = {
|
776 | code: 'payload-size-limit-exceeded',
|
777 | message: 'The provided message payload exceeds the FCM size limits. See the error documentation ' +
|
778 | 'for more details.',
|
779 | };
|
780 | MessagingClientErrorCode.INVALID_OPTIONS = {
|
781 | code: 'invalid-options',
|
782 | message: 'Invalid message options provided.',
|
783 | };
|
784 | MessagingClientErrorCode.INVALID_REGISTRATION_TOKEN = {
|
785 | code: 'invalid-registration-token',
|
786 | message: 'Invalid registration token provided. Make sure it matches the registration token ' +
|
787 | 'the client app receives from registering with FCM.',
|
788 | };
|
789 | MessagingClientErrorCode.REGISTRATION_TOKEN_NOT_REGISTERED = {
|
790 | code: 'registration-token-not-registered',
|
791 | message: 'The provided registration token is not registered. A previously valid registration ' +
|
792 | 'token can be unregistered for a variety of reasons. See the error documentation for more ' +
|
793 | 'details. Remove this registration token and stop using it to send messages.',
|
794 | };
|
795 | MessagingClientErrorCode.MISMATCHED_CREDENTIAL = {
|
796 | code: 'mismatched-credential',
|
797 | message: 'The credential used to authenticate this SDK does not have permission to send ' +
|
798 | 'messages to the device corresponding to the provided registration token. Make sure the ' +
|
799 | 'credential and registration token both belong to the same Firebase project.',
|
800 | };
|
801 | MessagingClientErrorCode.INVALID_PACKAGE_NAME = {
|
802 | code: 'invalid-package-name',
|
803 | message: 'The message was addressed to a registration token whose package name does not match ' +
|
804 | 'the provided "restrictedPackageName" option.',
|
805 | };
|
806 | MessagingClientErrorCode.DEVICE_MESSAGE_RATE_EXCEEDED = {
|
807 | code: 'device-message-rate-exceeded',
|
808 | message: 'The rate of messages to a particular device is too high. Reduce the number of ' +
|
809 | 'messages sent to this device and do not immediately retry sending to this device.',
|
810 | };
|
811 | MessagingClientErrorCode.TOPICS_MESSAGE_RATE_EXCEEDED = {
|
812 | code: 'topics-message-rate-exceeded',
|
813 | message: 'The rate of messages to subscribers to a particular topic is too high. Reduce the ' +
|
814 | 'number of messages sent for this topic, and do not immediately retry sending to this topic.',
|
815 | };
|
816 | MessagingClientErrorCode.MESSAGE_RATE_EXCEEDED = {
|
817 | code: 'message-rate-exceeded',
|
818 | message: 'Sending limit exceeded for the message target.',
|
819 | };
|
820 | MessagingClientErrorCode.THIRD_PARTY_AUTH_ERROR = {
|
821 | code: 'third-party-auth-error',
|
822 | message: 'A message targeted to an iOS device could not be sent because the required APNs ' +
|
823 | 'SSL certificate was not uploaded or has expired. Check the validity of your development ' +
|
824 | 'and production certificates.',
|
825 | };
|
826 | MessagingClientErrorCode.TOO_MANY_TOPICS = {
|
827 | code: 'too-many-topics',
|
828 | message: 'The maximum number of topics the provided registration token can be subscribed to ' +
|
829 | 'has been exceeded.',
|
830 | };
|
831 | MessagingClientErrorCode.AUTHENTICATION_ERROR = {
|
832 | code: 'authentication-error',
|
833 | message: 'An error occurred when trying to authenticate to the FCM servers. Make sure the ' +
|
834 | 'credential used to authenticate this SDK has the proper permissions. See ' +
|
835 | 'https://firebase.google.com/docs/admin/setup for setup instructions.',
|
836 | };
|
837 | MessagingClientErrorCode.SERVER_UNAVAILABLE = {
|
838 | code: 'server-unavailable',
|
839 | message: 'The FCM server could not process the request in time. See the error documentation ' +
|
840 | 'for more details.',
|
841 | };
|
842 | MessagingClientErrorCode.INTERNAL_ERROR = {
|
843 | code: 'internal-error',
|
844 | message: 'An internal error has occurred. Please retry the request.',
|
845 | };
|
846 | MessagingClientErrorCode.UNKNOWN_ERROR = {
|
847 | code: 'unknown-error',
|
848 | message: 'An unknown server error was returned.',
|
849 | };
|
850 | return MessagingClientErrorCode;
|
851 | }());
|
852 | exports.MessagingClientErrorCode = MessagingClientErrorCode;
|
853 | var InstallationsClientErrorCode = (function () {
|
854 | function InstallationsClientErrorCode() {
|
855 | }
|
856 | InstallationsClientErrorCode.INVALID_ARGUMENT = {
|
857 | code: 'invalid-argument',
|
858 | message: 'Invalid argument provided.',
|
859 | };
|
860 | InstallationsClientErrorCode.INVALID_PROJECT_ID = {
|
861 | code: 'invalid-project-id',
|
862 | message: 'Invalid project ID provided.',
|
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 = (function (_super) {
|
876 | __extends(InstanceIdClientErrorCode, _super);
|
877 | function InstanceIdClientErrorCode() {
|
878 | return _super !== null && _super.apply(this, arguments) || this;
|
879 | }
|
880 | InstanceIdClientErrorCode.INVALID_INSTANCE_ID = {
|
881 | code: 'invalid-instance-id',
|
882 | message: 'Invalid instance ID provided.',
|
883 | };
|
884 | return InstanceIdClientErrorCode;
|
885 | }(InstallationsClientErrorCode));
|
886 | exports.InstanceIdClientErrorCode = InstanceIdClientErrorCode;
|
887 |
|
888 | var AUTH_SERVER_TO_CLIENT_CODE = {
|
889 |
|
890 | BILLING_NOT_ENABLED: 'BILLING_NOT_ENABLED',
|
891 |
|
892 | CLAIMS_TOO_LARGE: 'CLAIMS_TOO_LARGE',
|
893 |
|
894 | CONFIGURATION_EXISTS: 'CONFIGURATION_EXISTS',
|
895 |
|
896 | CONFIGURATION_NOT_FOUND: 'CONFIGURATION_NOT_FOUND',
|
897 |
|
898 | INSUFFICIENT_PERMISSION: 'INSUFFICIENT_PERMISSION',
|
899 |
|
900 | INVALID_CONFIG: 'INVALID_CONFIG',
|
901 |
|
902 | INVALID_CONFIG_ID: 'INVALID_PROVIDER_ID',
|
903 |
|
904 | INVALID_CONTINUE_URI: 'INVALID_CONTINUE_URI',
|
905 |
|
906 | INVALID_DYNAMIC_LINK_DOMAIN: 'INVALID_DYNAMIC_LINK_DOMAIN',
|
907 |
|
908 | DUPLICATE_EMAIL: 'EMAIL_ALREADY_EXISTS',
|
909 |
|
910 | DUPLICATE_LOCAL_ID: 'UID_ALREADY_EXISTS',
|
911 |
|
912 | DUPLICATE_MFA_ENROLLMENT_ID: 'SECOND_FACTOR_UID_ALREADY_EXISTS',
|
913 |
|
914 | EMAIL_EXISTS: 'EMAIL_ALREADY_EXISTS',
|
915 |
|
916 | EMAIL_NOT_FOUND: 'EMAIL_NOT_FOUND',
|
917 |
|
918 | FORBIDDEN_CLAIM: 'FORBIDDEN_CLAIM',
|
919 |
|
920 | INVALID_CLAIMS: 'INVALID_CLAIMS',
|
921 |
|
922 | INVALID_DURATION: 'INVALID_SESSION_COOKIE_DURATION',
|
923 |
|
924 | INVALID_EMAIL: 'INVALID_EMAIL',
|
925 |
|
926 | INVALID_DISPLAY_NAME: 'INVALID_DISPLAY_NAME',
|
927 |
|
928 | INVALID_ID_TOKEN: 'INVALID_ID_TOKEN',
|
929 |
|
930 | INVALID_NAME: 'INVALID_NAME',
|
931 |
|
932 | INVALID_OAUTH_CLIENT_ID: 'INVALID_OAUTH_CLIENT_ID',
|
933 |
|
934 | INVALID_PAGE_SELECTION: 'INVALID_PAGE_TOKEN',
|
935 |
|
936 | INVALID_PHONE_NUMBER: 'INVALID_PHONE_NUMBER',
|
937 |
|
938 | INVALID_PROJECT_ID: 'INVALID_PROJECT_ID',
|
939 |
|
940 | INVALID_PROVIDER_ID: 'INVALID_PROVIDER_ID',
|
941 |
|
942 | INVALID_SERVICE_ACCOUNT: 'INVALID_SERVICE_ACCOUNT',
|
943 |
|
944 | INVALID_TESTING_PHONE_NUMBER: 'INVALID_TESTING_PHONE_NUMBER',
|
945 |
|
946 | INVALID_TENANT_TYPE: 'INVALID_TENANT_TYPE',
|
947 |
|
948 | MISSING_ANDROID_PACKAGE_NAME: 'MISSING_ANDROID_PACKAGE_NAME',
|
949 |
|
950 | MISSING_CONFIG: 'MISSING_CONFIG',
|
951 |
|
952 | MISSING_CONFIG_ID: 'MISSING_PROVIDER_ID',
|
953 |
|
954 | MISSING_DISPLAY_NAME: 'MISSING_DISPLAY_NAME',
|
955 |
|
956 |
|
957 | MISSING_EMAIL: 'MISSING_EMAIL',
|
958 |
|
959 | MISSING_IOS_BUNDLE_ID: 'MISSING_IOS_BUNDLE_ID',
|
960 |
|
961 | MISSING_ISSUER: 'MISSING_ISSUER',
|
962 |
|
963 | MISSING_LOCAL_ID: 'MISSING_UID',
|
964 |
|
965 | MISSING_OAUTH_CLIENT_ID: 'MISSING_OAUTH_CLIENT_ID',
|
966 |
|
967 | MISSING_PROVIDER_ID: 'MISSING_PROVIDER_ID',
|
968 |
|
969 | MISSING_SAML_RELYING_PARTY_CONFIG: 'MISSING_SAML_RELYING_PARTY_CONFIG',
|
970 |
|
971 | MISSING_USER_ACCOUNT: 'MISSING_UID',
|
972 |
|
973 | OPERATION_NOT_ALLOWED: 'OPERATION_NOT_ALLOWED',
|
974 |
|
975 | PERMISSION_DENIED: 'INSUFFICIENT_PERMISSION',
|
976 |
|
977 | PHONE_NUMBER_EXISTS: 'PHONE_NUMBER_ALREADY_EXISTS',
|
978 |
|
979 | PROJECT_NOT_FOUND: 'PROJECT_NOT_FOUND',
|
980 |
|
981 | QUOTA_EXCEEDED: 'QUOTA_EXCEEDED',
|
982 |
|
983 | SECOND_FACTOR_LIMIT_EXCEEDED: 'SECOND_FACTOR_LIMIT_EXCEEDED',
|
984 |
|
985 | TENANT_NOT_FOUND: 'TENANT_NOT_FOUND',
|
986 |
|
987 | TENANT_ID_MISMATCH: 'MISMATCHING_TENANT_ID',
|
988 |
|
989 | TOKEN_EXPIRED: 'ID_TOKEN_EXPIRED',
|
990 |
|
991 | UNAUTHORIZED_DOMAIN: 'UNAUTHORIZED_DOMAIN',
|
992 |
|
993 | UNSUPPORTED_FIRST_FACTOR: 'UNSUPPORTED_FIRST_FACTOR',
|
994 |
|
995 | UNSUPPORTED_SECOND_FACTOR: 'UNSUPPORTED_SECOND_FACTOR',
|
996 |
|
997 | UNSUPPORTED_TENANT_OPERATION: 'UNSUPPORTED_TENANT_OPERATION',
|
998 |
|
999 |
|
1000 | UNVERIFIED_EMAIL: 'UNVERIFIED_EMAIL',
|
1001 |
|
1002 | USER_NOT_FOUND: 'USER_NOT_FOUND',
|
1003 |
|
1004 | WEAK_PASSWORD: 'INVALID_PASSWORD',
|
1005 | };
|
1006 |
|
1007 | var MESSAGING_SERVER_TO_CLIENT_CODE = {
|
1008 |
|
1009 |
|
1010 | InvalidParameters: 'INVALID_ARGUMENT',
|
1011 |
|
1012 | MismatchSenderId: 'MISMATCHED_CREDENTIAL',
|
1013 |
|
1014 | Unavailable: 'SERVER_UNAVAILABLE',
|
1015 |
|
1016 | InternalServerError: 'INTERNAL_ERROR',
|
1017 |
|
1018 |
|
1019 | InvalidRegistration: 'INVALID_REGISTRATION_TOKEN',
|
1020 |
|
1021 | NotRegistered: 'REGISTRATION_TOKEN_NOT_REGISTERED',
|
1022 |
|
1023 | InvalidPackageName: 'INVALID_PACKAGE_NAME',
|
1024 |
|
1025 | MessageTooBig: 'PAYLOAD_SIZE_LIMIT_EXCEEDED',
|
1026 |
|
1027 | InvalidDataKey: 'INVALID_DATA_PAYLOAD_KEY',
|
1028 |
|
1029 | InvalidTtl: 'INVALID_OPTIONS',
|
1030 |
|
1031 | DeviceMessageRateExceeded: 'DEVICE_MESSAGE_RATE_EXCEEDED',
|
1032 |
|
1033 | TopicsMessageRateExceeded: 'TOPICS_MESSAGE_RATE_EXCEEDED',
|
1034 |
|
1035 | InvalidApnsCredential: 'THIRD_PARTY_AUTH_ERROR',
|
1036 |
|
1037 | NOT_FOUND: 'REGISTRATION_TOKEN_NOT_REGISTERED',
|
1038 | PERMISSION_DENIED: 'MISMATCHED_CREDENTIAL',
|
1039 | RESOURCE_EXHAUSTED: 'MESSAGE_RATE_EXCEEDED',
|
1040 | UNAUTHENTICATED: 'THIRD_PARTY_AUTH_ERROR',
|
1041 |
|
1042 | APNS_AUTH_ERROR: 'THIRD_PARTY_AUTH_ERROR',
|
1043 | INTERNAL: 'INTERNAL_ERROR',
|
1044 | INVALID_ARGUMENT: 'INVALID_ARGUMENT',
|
1045 | QUOTA_EXCEEDED: 'MESSAGE_RATE_EXCEEDED',
|
1046 | SENDER_ID_MISMATCH: 'MISMATCHED_CREDENTIAL',
|
1047 | THIRD_PARTY_AUTH_ERROR: 'THIRD_PARTY_AUTH_ERROR',
|
1048 | UNAVAILABLE: 'SERVER_UNAVAILABLE',
|
1049 | UNREGISTERED: 'REGISTRATION_TOKEN_NOT_REGISTERED',
|
1050 | UNSPECIFIED_ERROR: 'UNKNOWN_ERROR',
|
1051 | };
|
1052 |
|
1053 | var TOPIC_MGT_SERVER_TO_CLIENT_CODE = {
|
1054 |
|
1055 | NOT_FOUND: 'REGISTRATION_TOKEN_NOT_REGISTERED',
|
1056 | INVALID_ARGUMENT: 'INVALID_REGISTRATION_TOKEN',
|
1057 | TOO_MANY_TOPICS: 'TOO_MANY_TOPICS',
|
1058 | RESOURCE_EXHAUSTED: 'TOO_MANY_TOPICS',
|
1059 | PERMISSION_DENIED: 'AUTHENTICATION_ERROR',
|
1060 | DEADLINE_EXCEEDED: 'SERVER_UNAVAILABLE',
|
1061 | INTERNAL: 'INTERNAL_ERROR',
|
1062 | UNKNOWN: 'UNKNOWN_ERROR',
|
1063 | };
|