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.
Files changed (188) hide show
  1. package/README.md +7 -3
  2. package/lib/app/core.d.ts +15 -22
  3. package/lib/app/core.js +1 -1
  4. package/lib/app/credential-factory.d.ts +17 -33
  5. package/lib/app/credential-factory.js +17 -33
  6. package/lib/app/credential-internal.d.ts +10 -9
  7. package/lib/app/credential-internal.js +15 -13
  8. package/lib/app/credential.d.ts +3 -9
  9. package/lib/app/credential.js +1 -1
  10. package/lib/app/firebase-app.d.ts +6 -30
  11. package/lib/app/firebase-app.js +72 -216
  12. package/lib/app/firebase-namespace.d.ts +28 -34
  13. package/lib/app/firebase-namespace.js +119 -99
  14. package/lib/app/index.d.ts +6 -1
  15. package/lib/app/index.js +1 -1
  16. package/lib/app/lifecycle.d.ts +24 -3
  17. package/lib/app/lifecycle.js +119 -25
  18. package/lib/app-check/app-check-api-client-internal.d.ts +32 -0
  19. package/lib/app-check/app-check-api-client-internal.js +197 -0
  20. package/lib/app-check/app-check-api.d.ts +95 -0
  21. package/lib/app-check/app-check-api.js +19 -0
  22. package/lib/app-check/app-check-namespace.d.ts +65 -0
  23. package/lib/app-check/app-check-namespace.js +18 -0
  24. package/lib/app-check/app-check.d.ts +49 -0
  25. package/lib/app-check/app-check.js +82 -0
  26. package/lib/app-check/index.d.ts +53 -0
  27. package/lib/app-check/index.js +63 -0
  28. package/lib/app-check/token-generator.d.ts +25 -0
  29. package/lib/app-check/token-generator.js +159 -0
  30. package/lib/app-check/token-verifier.d.ts +17 -0
  31. package/lib/app-check/token-verifier.js +151 -0
  32. package/lib/auth/action-code-settings-builder.d.ts +1 -1
  33. package/lib/auth/action-code-settings-builder.js +2 -2
  34. package/lib/auth/auth-api-request.d.ts +28 -32
  35. package/lib/auth/auth-api-request.js +167 -125
  36. package/lib/auth/auth-config.d.ts +123 -21
  37. package/lib/auth/auth-config.js +85 -34
  38. package/lib/auth/auth-namespace.d.ts +157 -4
  39. package/lib/auth/auth-namespace.js +1 -1
  40. package/lib/auth/auth.d.ts +5 -3
  41. package/lib/auth/auth.js +6 -4
  42. package/lib/auth/base-auth.d.ts +134 -116
  43. package/lib/auth/base-auth.js +213 -143
  44. package/lib/auth/identifier.d.ts +5 -5
  45. package/lib/auth/identifier.js +1 -1
  46. package/lib/auth/index.d.ts +10 -5
  47. package/lib/auth/index.js +9 -4
  48. package/lib/auth/tenant-manager.d.ts +19 -19
  49. package/lib/auth/tenant-manager.js +21 -25
  50. package/lib/auth/tenant.d.ts +14 -5
  51. package/lib/auth/tenant.js +19 -11
  52. package/lib/auth/token-generator.d.ts +7 -108
  53. package/lib/auth/token-generator.js +52 -145
  54. package/lib/auth/token-verifier.d.ts +3 -4
  55. package/lib/auth/token-verifier.js +96 -145
  56. package/lib/auth/user-import-builder.d.ts +11 -11
  57. package/lib/auth/user-import-builder.js +9 -9
  58. package/lib/auth/user-record.d.ts +23 -15
  59. package/lib/auth/user-record.js +30 -20
  60. package/lib/credential/index.d.ts +18 -35
  61. package/lib/credential/index.js +17 -33
  62. package/lib/database/database-namespace.d.ts +39 -10
  63. package/lib/database/database-namespace.js +1 -1
  64. package/lib/database/database.d.ts +16 -6
  65. package/lib/database/database.js +61 -6
  66. package/lib/database/index.d.ts +19 -18
  67. package/lib/database/index.js +21 -23
  68. package/lib/default-namespace.d.ts +7 -1
  69. package/lib/default-namespace.js +4 -4
  70. package/lib/esm/app/index.js +10 -0
  71. package/lib/esm/app-check/index.js +4 -0
  72. package/lib/esm/auth/index.js +14 -0
  73. package/lib/esm/database/index.js +6 -0
  74. package/lib/esm/firestore/index.js +24 -0
  75. package/lib/esm/installations/index.js +4 -0
  76. package/lib/esm/instance-id/index.js +4 -0
  77. package/lib/esm/machine-learning/index.js +5 -0
  78. package/lib/esm/messaging/index.js +4 -0
  79. package/lib/esm/package.json +1 -0
  80. package/lib/esm/project-management/index.js +8 -0
  81. package/lib/esm/remote-config/index.js +4 -0
  82. package/lib/esm/security-rules/index.js +6 -0
  83. package/lib/esm/storage/index.js +4 -0
  84. package/lib/firebase-namespace-api.d.ts +12 -6
  85. package/lib/firebase-namespace-api.js +5 -1
  86. package/lib/firestore/firestore-internal.d.ts +2 -2
  87. package/lib/firestore/firestore-internal.js +2 -2
  88. package/lib/firestore/firestore-namespace.d.ts +6 -1
  89. package/lib/firestore/firestore-namespace.js +2 -1
  90. package/lib/firestore/index.d.ts +36 -4
  91. package/lib/firestore/index.js +29 -1
  92. package/lib/index.d.ts +1 -1
  93. package/lib/index.js +1 -1
  94. package/lib/installations/index.d.ts +52 -0
  95. package/lib/installations/index.js +62 -0
  96. package/lib/installations/installations-namespace.d.ts +55 -0
  97. package/lib/installations/installations-namespace.js +18 -0
  98. package/lib/{instance-id/instance-id-request-internal.d.ts → installations/installations-request-handler.d.ts} +8 -8
  99. package/lib/{instance-id/instance-id-request-internal.js → installations/installations-request-handler.js} +23 -23
  100. package/lib/installations/installations.d.ts +38 -0
  101. package/lib/installations/installations.js +63 -0
  102. package/lib/instance-id/index.d.ts +20 -9
  103. package/lib/instance-id/index.js +20 -9
  104. package/lib/instance-id/instance-id-namespace.d.ts +9 -8
  105. package/lib/instance-id/instance-id-namespace.js +1 -1
  106. package/lib/instance-id/instance-id.d.ts +8 -6
  107. package/lib/instance-id/instance-id.js +20 -11
  108. package/lib/machine-learning/index.d.ts +29 -27
  109. package/lib/machine-learning/index.js +29 -27
  110. package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
  111. package/lib/machine-learning/machine-learning-api-client.js +4 -4
  112. package/lib/machine-learning/machine-learning-namespace.d.ts +33 -8
  113. package/lib/machine-learning/machine-learning-namespace.js +1 -1
  114. package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
  115. package/lib/machine-learning/machine-learning-utils.js +1 -1
  116. package/lib/machine-learning/machine-learning.d.ts +19 -19
  117. package/lib/machine-learning/machine-learning.js +20 -20
  118. package/lib/messaging/batch-request-internal.d.ts +3 -3
  119. package/lib/messaging/batch-request-internal.js +9 -9
  120. package/lib/messaging/index.d.ts +11 -9
  121. package/lib/messaging/index.js +11 -9
  122. package/lib/messaging/messaging-api-request-internal.d.ts +8 -8
  123. package/lib/messaging/messaging-api-request-internal.js +8 -8
  124. package/lib/messaging/messaging-api.d.ts +79 -75
  125. package/lib/messaging/messaging-api.js +1 -1
  126. package/lib/messaging/messaging-errors-internal.d.ts +5 -5
  127. package/lib/messaging/messaging-errors-internal.js +7 -7
  128. package/lib/messaging/messaging-internal.d.ts +1 -1
  129. package/lib/messaging/messaging-internal.js +6 -31
  130. package/lib/messaging/messaging-namespace.d.ts +105 -8
  131. package/lib/messaging/messaging-namespace.js +1 -1
  132. package/lib/messaging/messaging.d.ts +70 -86
  133. package/lib/messaging/messaging.js +76 -89
  134. package/lib/project-management/android-app.d.ts +11 -12
  135. package/lib/project-management/android-app.js +13 -14
  136. package/lib/project-management/app-metadata.d.ts +1 -1
  137. package/lib/project-management/app-metadata.js +1 -1
  138. package/lib/project-management/index.d.ts +11 -9
  139. package/lib/project-management/index.js +11 -9
  140. package/lib/project-management/ios-app.d.ts +6 -7
  141. package/lib/project-management/ios-app.js +6 -7
  142. package/lib/project-management/project-management-api-request-internal.d.ts +1 -80
  143. package/lib/project-management/project-management-api-request-internal.js +14 -14
  144. package/lib/project-management/project-management-namespace.d.ts +31 -9
  145. package/lib/project-management/project-management-namespace.js +1 -1
  146. package/lib/project-management/project-management.d.ts +18 -21
  147. package/lib/project-management/project-management.js +19 -22
  148. package/lib/remote-config/index.d.ts +12 -10
  149. package/lib/remote-config/index.js +11 -9
  150. package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
  151. package/lib/remote-config/remote-config-api-client-internal.js +2 -2
  152. package/lib/remote-config/remote-config-api.d.ts +12 -2
  153. package/lib/remote-config/remote-config-api.js +1 -1
  154. package/lib/remote-config/remote-config-namespace.d.ts +50 -9
  155. package/lib/remote-config/remote-config-namespace.js +1 -1
  156. package/lib/remote-config/remote-config.d.ts +19 -21
  157. package/lib/remote-config/remote-config.js +25 -25
  158. package/lib/security-rules/index.d.ts +12 -10
  159. package/lib/security-rules/index.js +12 -10
  160. package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
  161. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  162. package/lib/security-rules/security-rules-internal.d.ts +1 -1
  163. package/lib/security-rules/security-rules-internal.js +1 -1
  164. package/lib/security-rules/security-rules-namespace.d.ts +43 -28
  165. package/lib/security-rules/security-rules-namespace.js +1 -1
  166. package/lib/security-rules/security-rules.d.ts +39 -42
  167. package/lib/security-rules/security-rules.js +38 -39
  168. package/lib/storage/index.d.ts +9 -7
  169. package/lib/storage/index.js +9 -7
  170. package/lib/storage/storage-namespace.d.ts +7 -6
  171. package/lib/storage/storage-namespace.js +1 -1
  172. package/lib/storage/storage.d.ts +3 -3
  173. package/lib/storage/storage.js +14 -4
  174. package/lib/utils/api-request.d.ts +24 -24
  175. package/lib/utils/api-request.js +25 -25
  176. package/lib/utils/crypto-signer.d.ts +128 -0
  177. package/lib/utils/crypto-signer.js +237 -0
  178. package/lib/utils/deep-copy.d.ts +6 -6
  179. package/lib/utils/deep-copy.js +6 -6
  180. package/lib/utils/error.d.ts +69 -36
  181. package/lib/utils/error.js +98 -43
  182. package/lib/utils/index.d.ts +30 -19
  183. package/lib/utils/index.js +47 -20
  184. package/lib/utils/jwt.d.ts +131 -0
  185. package/lib/utils/jwt.js +355 -0
  186. package/lib/utils/validator.d.ts +37 -37
  187. package/lib/utils/validator.js +37 -37
  188. package/package.json +126 -53
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -50,25 +50,25 @@ export declare class MachineLearning {
50
50
  private readonly client;
51
51
  private readonly appInternal;
52
52
  /**
53
- * The {@link app.App} associated with the current `MachineLearning`
53
+ * The {@link firebase-admin.app#App} associated with the current `MachineLearning`
54
54
  * service instance.
55
55
  */
56
56
  get app(): App;
57
57
  /**
58
58
  * Creates a model in the current Firebase project.
59
59
  *
60
- * @param model The model to create.
60
+ * @param model - The model to create.
61
61
  *
62
- * @return A Promise fulfilled with the created model.
62
+ * @returns A Promise fulfilled with the created model.
63
63
  */
64
64
  createModel(model: ModelOptions): Promise<Model>;
65
65
  /**
66
66
  * Updates a model's metadata or model file.
67
67
  *
68
- * @param modelId The ID of the model to update.
69
- * @param model The model fields to update.
68
+ * @param modelId - The ID of the model to update.
69
+ * @param model - The model fields to update.
70
70
  *
71
- * @return A Promise fulfilled with the updated model.
71
+ * @returns A Promise fulfilled with the updated model.
72
72
  */
73
73
  updateModel(modelId: string, model: ModelOptions): Promise<Model>;
74
74
  /**
@@ -76,33 +76,33 @@ export declare class MachineLearning {
76
76
  *
77
77
  * A published model can be downloaded to client apps.
78
78
  *
79
- * @param modelId The ID of the model to publish.
79
+ * @param modelId - The ID of the model to publish.
80
80
  *
81
- * @return A Promise fulfilled with the published model.
81
+ * @returns A Promise fulfilled with the published model.
82
82
  */
83
83
  publishModel(modelId: string): Promise<Model>;
84
84
  /**
85
85
  * Unpublishes a Firebase ML model.
86
86
  *
87
- * @param modelId The ID of the model to unpublish.
87
+ * @param modelId - The ID of the model to unpublish.
88
88
  *
89
- * @return A Promise fulfilled with the unpublished model.
89
+ * @returns A Promise fulfilled with the unpublished model.
90
90
  */
91
91
  unpublishModel(modelId: string): Promise<Model>;
92
92
  /**
93
93
  * Gets the model specified by the given ID.
94
94
  *
95
- * @param modelId The ID of the model to get.
95
+ * @param modelId - The ID of the model to get.
96
96
  *
97
- * @return A Promise fulfilled with the model object.
97
+ * @returns A Promise fulfilled with the model object.
98
98
  */
99
99
  getModel(modelId: string): Promise<Model>;
100
100
  /**
101
101
  * Lists the current project's models.
102
102
  *
103
- * @param options The listing options.
103
+ * @param options - The listing options.
104
104
  *
105
- * @return A promise that
105
+ * @returns A promise that
106
106
  * resolves with the current (filtered) list of models and the next page
107
107
  * token. For the last page, an empty list of models and no page token
108
108
  * are returned.
@@ -111,7 +111,7 @@ export declare class MachineLearning {
111
111
  /**
112
112
  * Deletes a model from the current project.
113
113
  *
114
- * @param modelId The ID of the model to delete.
114
+ * @param modelId - The ID of the model to delete.
115
115
  */
116
116
  deleteModel(modelId: string): Promise<void>;
117
117
  private setPublishStatus;
@@ -158,7 +158,7 @@ export declare class Model {
158
158
  get tfliteModel(): TFLiteModel | undefined;
159
159
  /**
160
160
  * True if the model is locked by a server-side operation. You can't make
161
- * changes to a locked model. See {@link waitForUnlocked `waitForUnlocked()`}.
161
+ * changes to a locked model. See {@link Model.waitForUnlocked}.
162
162
  */
163
163
  get locked(): boolean;
164
164
  /**
@@ -170,10 +170,10 @@ export declare class Model {
170
170
  /**
171
171
  * Wait for the model to be unlocked.
172
172
  *
173
- * @param maxTimeMillis The maximum time in milliseconds to wait.
173
+ * @param maxTimeMillis - The maximum time in milliseconds to wait.
174
174
  * If not specified, a default maximum of 2 minutes is used.
175
175
  *
176
- * @return A promise that resolves when the model is unlocked
176
+ * @returns A promise that resolves when the model is unlocked
177
177
  * or the maximum wait time has passed.
178
178
  */
179
179
  waitForUnlocked(maxTimeMillis?: number): Promise<void>;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -29,7 +29,7 @@ var machine_learning_utils_1 = require("./machine-learning-utils");
29
29
  */
30
30
  var MachineLearning = /** @class */ (function () {
31
31
  /**
32
- * @param app The app for this ML service.
32
+ * @param app - The app for this ML service.
33
33
  * @constructor
34
34
  * @internal
35
35
  */
@@ -46,7 +46,7 @@ var MachineLearning = /** @class */ (function () {
46
46
  }
47
47
  Object.defineProperty(MachineLearning.prototype, "app", {
48
48
  /**
49
- * The {@link app.App} associated with the current `MachineLearning`
49
+ * The {@link firebase-admin.app#App} associated with the current `MachineLearning`
50
50
  * service instance.
51
51
  */
52
52
  get: function () {
@@ -58,9 +58,9 @@ var MachineLearning = /** @class */ (function () {
58
58
  /**
59
59
  * Creates a model in the current Firebase project.
60
60
  *
61
- * @param model The model to create.
61
+ * @param model - The model to create.
62
62
  *
63
- * @return A Promise fulfilled with the created model.
63
+ * @returns A Promise fulfilled with the created model.
64
64
  */
65
65
  MachineLearning.prototype.createModel = function (model) {
66
66
  var _this = this;
@@ -72,10 +72,10 @@ var MachineLearning = /** @class */ (function () {
72
72
  /**
73
73
  * Updates a model's metadata or model file.
74
74
  *
75
- * @param modelId The ID of the model to update.
76
- * @param model The model fields to update.
75
+ * @param modelId - The ID of the model to update.
76
+ * @param model - The model fields to update.
77
77
  *
78
- * @return A Promise fulfilled with the updated model.
78
+ * @returns A Promise fulfilled with the updated model.
79
79
  */
80
80
  MachineLearning.prototype.updateModel = function (modelId, model) {
81
81
  var _this = this;
@@ -90,9 +90,9 @@ var MachineLearning = /** @class */ (function () {
90
90
  *
91
91
  * A published model can be downloaded to client apps.
92
92
  *
93
- * @param modelId The ID of the model to publish.
93
+ * @param modelId - The ID of the model to publish.
94
94
  *
95
- * @return A Promise fulfilled with the published model.
95
+ * @returns A Promise fulfilled with the published model.
96
96
  */
97
97
  MachineLearning.prototype.publishModel = function (modelId) {
98
98
  return this.setPublishStatus(modelId, true);
@@ -100,9 +100,9 @@ var MachineLearning = /** @class */ (function () {
100
100
  /**
101
101
  * Unpublishes a Firebase ML model.
102
102
  *
103
- * @param modelId The ID of the model to unpublish.
103
+ * @param modelId - The ID of the model to unpublish.
104
104
  *
105
- * @return A Promise fulfilled with the unpublished model.
105
+ * @returns A Promise fulfilled with the unpublished model.
106
106
  */
107
107
  MachineLearning.prototype.unpublishModel = function (modelId) {
108
108
  return this.setPublishStatus(modelId, false);
@@ -110,9 +110,9 @@ var MachineLearning = /** @class */ (function () {
110
110
  /**
111
111
  * Gets the model specified by the given ID.
112
112
  *
113
- * @param modelId The ID of the model to get.
113
+ * @param modelId - The ID of the model to get.
114
114
  *
115
- * @return A Promise fulfilled with the model object.
115
+ * @returns A Promise fulfilled with the model object.
116
116
  */
117
117
  MachineLearning.prototype.getModel = function (modelId) {
118
118
  var _this = this;
@@ -122,9 +122,9 @@ var MachineLearning = /** @class */ (function () {
122
122
  /**
123
123
  * Lists the current project's models.
124
124
  *
125
- * @param options The listing options.
125
+ * @param options - The listing options.
126
126
  *
127
- * @return A promise that
127
+ * @returns A promise that
128
128
  * resolves with the current (filtered) list of models and the next page
129
129
  * token. For the last page, an empty list of models and no page token
130
130
  * are returned.
@@ -151,7 +151,7 @@ var MachineLearning = /** @class */ (function () {
151
151
  /**
152
152
  * Deletes a model from the current project.
153
153
  *
154
- * @param modelId The ID of the model to delete.
154
+ * @param modelId - The ID of the model to delete.
155
155
  */
156
156
  MachineLearning.prototype.deleteModel = function (modelId) {
157
157
  return this.client.deleteModel(modelId);
@@ -307,7 +307,7 @@ var Model = /** @class */ (function () {
307
307
  Object.defineProperty(Model.prototype, "locked", {
308
308
  /**
309
309
  * True if the model is locked by a server-side operation. You can't make
310
- * changes to a locked model. See {@link waitForUnlocked `waitForUnlocked()`}.
310
+ * changes to a locked model. See {@link Model.waitForUnlocked}.
311
311
  */
312
312
  get: function () {
313
313
  var _a, _b;
@@ -347,10 +347,10 @@ var Model = /** @class */ (function () {
347
347
  /**
348
348
  * Wait for the model to be unlocked.
349
349
  *
350
- * @param maxTimeMillis The maximum time in milliseconds to wait.
350
+ * @param maxTimeMillis - The maximum time in milliseconds to wait.
351
351
  * If not specified, a default maximum of 2 minutes is used.
352
352
  *
353
- * @return A promise that resolves when the model is unlocked
353
+ * @returns A promise that resolves when the model is unlocked
354
354
  * or the maximum wait time has passed.
355
355
  */
356
356
  Model.prototype.waitForUnlocked = function (maxTimeMillis) {
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  /*!
3
3
  * Copyright 2019 Google Inc.
4
4
  *
@@ -47,8 +47,8 @@ export declare class BatchRequestClient {
47
47
  * Sends the given array of sub requests as a single batch, and parses the results into an array
48
48
  * of HttpResponse objects.
49
49
  *
50
- * @param {SubRequest[]} requests An array of sub requests to send.
51
- * @return {Promise<HttpResponse[]>} A promise that resolves when the send operation is complete.
50
+ * @param requests - An array of sub requests to send.
51
+ * @returns A promise that resolves when the send operation is complete.
52
52
  */
53
53
  send(requests: SubRequest[]): Promise<HttpResponse[]>;
54
54
  private getMultipartPayload;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -44,8 +44,8 @@ var BatchRequestClient = /** @class */ (function () {
44
44
  * Sends the given array of sub requests as a single batch, and parses the results into an array
45
45
  * of HttpResponse objects.
46
46
  *
47
- * @param {SubRequest[]} requests An array of sub requests to send.
48
- * @return {Promise<HttpResponse[]>} A promise that resolves when the send operation is complete.
47
+ * @param requests - An array of sub requests to send.
48
+ * @returns A promise that resolves when the send operation is complete.
49
49
  */
50
50
  BatchRequestClient.prototype.send = function (requests) {
51
51
  var _this = this;
@@ -89,10 +89,10 @@ exports.BatchRequestClient = BatchRequestClient;
89
89
  * API, sets the content-type header to application/http, and the content-transfer-encoding to
90
90
  * binary.
91
91
  *
92
- * @param {SubRequest} request A sub request that will be used to populate the part.
93
- * @param {string} boundary Multipart boundary string.
94
- * @param {number} idx An index number that is used to set the content-id header.
95
- * @return {string} The part as a string that can be included in the HTTP body.
92
+ * @param request - A sub request that will be used to populate the part.
93
+ * @param boundary - Multipart boundary string.
94
+ * @param idx - An index number that is used to set the content-id header.
95
+ * @returns The part as a string that can be included in the HTTP body.
96
96
  */
97
97
  function createPart(request, boundary, idx) {
98
98
  var serializedRequest = serializeSubRequest(request);
@@ -110,8 +110,8 @@ function createPart(request, boundary, idx) {
110
110
  * format of the string is the wire format of a typical HTTP request, consisting of a header and a
111
111
  * body.
112
112
  *
113
- * @param request {SubRequest} The sub request to be serialized.
114
- * @return {string} String representation of the SubRequest.
113
+ * @param request - The sub request to be serialized.
114
+ * @returns String representation of the SubRequest.
115
115
  */
116
116
  function serializeSubRequest(request) {
117
117
  var requestBody = JSON.stringify(request.body);
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -14,19 +14,21 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ /**
18
+ * Firebase Cloud Messaging (FCM).
19
+ *
20
+ * @packageDocumentation
21
+ */
17
22
  import { App } from '../app';
18
23
  import { Messaging } from './messaging';
19
24
  export { Messaging, } from './messaging';
20
25
  export { AndroidConfig, AndroidFcmOptions, AndroidNotification, ApnsConfig, ApnsFcmOptions, ApnsPayload, Aps, ApsAlert, BaseMessage, BatchResponse, CriticalSound, ConditionMessage, FcmOptions, LightSettings, Message, MessagingTopicManagementResponse, MulticastMessage, Notification, SendResponse, TokenMessage, TopicMessage, WebpushConfig, WebpushFcmOptions, WebpushNotification, DataMessagePayload, MessagingConditionResponse, MessagingDeviceGroupResponse, MessagingDeviceResult, MessagingDevicesResponse, MessagingOptions, MessagingPayload, MessagingTopicResponse, NotificationMessagePayload, } from './messaging-api';
21
26
  /**
22
- * Gets the {@link messaging.Messaging `Messaging`} service for the
23
- * default app or a given app.
27
+ * Gets the {@link Messaging} service for the default app or a given app.
24
28
  *
25
29
  * `admin.messaging()` can be called with no arguments to access the default
26
- * app's {@link messaging.Messaging `Messaging`} service or as
27
- * `admin.messaging(app)` to access the
28
- * {@link messaging.Messaging `Messaging`} service associated with a
29
- * specific app.
30
+ * app's `Messaging` service or as `admin.messaging(app)` to access the
31
+ * `Messaging` service associated with aspecific app.
30
32
  *
31
33
  * @example
32
34
  * ```javascript
@@ -40,10 +42,10 @@ export { AndroidConfig, AndroidFcmOptions, AndroidNotification, ApnsConfig, Apns
40
42
  * const otherMessaging = getMessaging(otherApp);
41
43
  * ```
42
44
  *
43
- * @param app Optional app whose `Messaging` service to
45
+ * @param app - Optional app whose `Messaging` service to
44
46
  * return. If not provided, the default `Messaging` service will be returned.
45
47
  *
46
- * @return The default `Messaging` service if no
48
+ * @returns The default `Messaging` service if no
47
49
  * app is provided or the `Messaging` service associated with the provided
48
50
  * app.
49
51
  */
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -17,19 +17,21 @@
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.getMessaging = void 0;
20
+ /**
21
+ * Firebase Cloud Messaging (FCM).
22
+ *
23
+ * @packageDocumentation
24
+ */
20
25
  var app_1 = require("../app");
21
26
  var messaging_1 = require("./messaging");
22
27
  var messaging_2 = require("./messaging");
23
28
  Object.defineProperty(exports, "Messaging", { enumerable: true, get: function () { return messaging_2.Messaging; } });
24
29
  /**
25
- * Gets the {@link messaging.Messaging `Messaging`} service for the
26
- * default app or a given app.
30
+ * Gets the {@link Messaging} service for the default app or a given app.
27
31
  *
28
32
  * `admin.messaging()` can be called with no arguments to access the default
29
- * app's {@link messaging.Messaging `Messaging`} service or as
30
- * `admin.messaging(app)` to access the
31
- * {@link messaging.Messaging `Messaging`} service associated with a
32
- * specific app.
33
+ * app's `Messaging` service or as `admin.messaging(app)` to access the
34
+ * `Messaging` service associated with aspecific app.
33
35
  *
34
36
  * @example
35
37
  * ```javascript
@@ -43,10 +45,10 @@ Object.defineProperty(exports, "Messaging", { enumerable: true, get: function ()
43
45
  * const otherMessaging = getMessaging(otherApp);
44
46
  * ```
45
47
  *
46
- * @param app Optional app whose `Messaging` service to
48
+ * @param app - Optional app whose `Messaging` service to
47
49
  * return. If not provided, the default `Messaging` service will be returned.
48
50
  *
49
- * @return The default `Messaging` service if no
51
+ * @returns The default `Messaging` service if no
50
52
  * app is provided or the `Messaging` service associated with the provided
51
53
  * app.
52
54
  */
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
@@ -25,25 +25,25 @@ export declare class FirebaseMessagingRequestHandler {
25
25
  private readonly httpClient;
26
26
  private readonly batchClient;
27
27
  /**
28
- * @param app The app used to fetch access tokens to sign API requests.
28
+ * @param app - The app used to fetch access tokens to sign API requests.
29
29
  * @constructor
30
30
  */
31
31
  constructor(app: App);
32
32
  /**
33
33
  * Invokes the request handler with the provided request data.
34
34
  *
35
- * @param {string} host The host to which to send the request.
36
- * @param {string} path The path to which to send the request.
37
- * @param {object} requestData The request data.
38
- * @return {Promise<object>} A promise that resolves with the response.
35
+ * @param host - The host to which to send the request.
36
+ * @param path - The path to which to send the request.
37
+ * @param requestData - The request data.
38
+ * @returns A promise that resolves with the response.
39
39
  */
40
40
  invokeRequestHandler(host: string, path: string, requestData: object): Promise<object>;
41
41
  /**
42
42
  * Sends the given array of sub requests as a single batch to FCM, and parses the result into
43
43
  * a BatchResponse object.
44
44
  *
45
- * @param {SubRequest[]} requests An array of sub requests to send.
46
- * @return {Promise<BatchResponse>} A promise that resolves when the send operation is complete.
45
+ * @param requests - An array of sub requests to send.
46
+ * @returns A promise that resolves when the send operation is complete.
47
47
  */
48
48
  sendBatchRequest(requests: SubRequest[]): Promise<BatchResponse>;
49
49
  private buildSendResponse;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.100.0-alpha.0 */
1
+ /*! firebase-admin v10.0.2 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -38,7 +38,7 @@ var LEGACY_FIREBASE_MESSAGING_HEADERS = {
38
38
  */
39
39
  var FirebaseMessagingRequestHandler = /** @class */ (function () {
40
40
  /**
41
- * @param app The app used to fetch access tokens to sign API requests.
41
+ * @param app - The app used to fetch access tokens to sign API requests.
42
42
  * @constructor
43
43
  */
44
44
  function FirebaseMessagingRequestHandler(app) {
@@ -48,10 +48,10 @@ var FirebaseMessagingRequestHandler = /** @class */ (function () {
48
48
  /**
49
49
  * Invokes the request handler with the provided request data.
50
50
  *
51
- * @param {string} host The host to which to send the request.
52
- * @param {string} path The path to which to send the request.
53
- * @param {object} requestData The request data.
54
- * @return {Promise<object>} A promise that resolves with the response.
51
+ * @param host - The host to which to send the request.
52
+ * @param path - The path to which to send the request.
53
+ * @param requestData - The request data.
54
+ * @returns A promise that resolves with the response.
55
55
  */
56
56
  FirebaseMessagingRequestHandler.prototype.invokeRequestHandler = function (host, path, requestData) {
57
57
  var request = {
@@ -86,8 +86,8 @@ var FirebaseMessagingRequestHandler = /** @class */ (function () {
86
86
  * Sends the given array of sub requests as a single batch to FCM, and parses the result into
87
87
  * a BatchResponse object.
88
88
  *
89
- * @param {SubRequest[]} requests An array of sub requests to send.
90
- * @return {Promise<BatchResponse>} A promise that resolves when the send operation is complete.
89
+ * @param requests - An array of sub requests to send.
90
+ * @returns A promise that resolves when the send operation is complete.
91
91
  */
92
92
  FirebaseMessagingRequestHandler.prototype.sendBatchRequest = function (requests) {
93
93
  var _this = this;