@@ -35,9 +35,13 @@ export const provider = 'google.firebase.remoteconfig';
3535export const service = 'firebaseremoteconfig.googleapis.com' ;
3636
3737/**
38- * Handle all updates (including rollbacks) that affect a Remote Config project.
39- * @param handler A function that takes the updated Remote Config template
40- * version metadata as an argument.
38+ * Registers a function that triggers on Firebase Remote Config template
39+ * update events.
40+ *
41+ * @param handler A function that takes the updated Remote Config
42+ * template version metadata as an argument.
43+ *
44+ * @return A Cloud Function that you can export and deploy.
4145 */
4246export function onUpdate (
4347 handler : (
@@ -97,8 +101,8 @@ export class UpdateBuilder {
97101}
98102
99103/**
100- * Interface representing a Remote Config template version metadata object that
101- * was emitted when the project was updated.
104+ * An interface representing a Remote Config template version metadata object
105+ * emitted when a project is updated.
102106 */
103107export interface TemplateVersion {
104108 /** The version number of the updated Remote Config template. */
@@ -107,27 +111,49 @@ export interface TemplateVersion {
107111 /** When the template was updated in format (ISO8601 timestamp). */
108112 updateTime : string ;
109113
110- /** Metadata about the account that performed the update. */
114+ /**
115+ * Metadata about the account that performed the update, of
116+ * type [`RemoteConfigUser`](/docs/reference/remote-config/rest/v1/Version#remoteconfiguser).
117+ */
111118 updateUser : RemoteConfigUser ;
112119
113- /** A description associated with the particular Remote Config template. */
120+ /** A description associated with this Remote Config template version . */
114121 description : string ;
115122
116- /** The origin of the caller. */
123+ /**
124+ * The origin of the caller - either the Firebase console or the Remote Config
125+ * REST API. See [`RemoteConfigUpdateOrigin`](/docs/reference/remote-config/rest/v1/Version#remoteconfigupdateorigin)
126+ * for valid values.
127+ */
117128 updateOrigin : string ;
118129
119- /** The type of update action that was performed. */
130+ /**
131+ * The type of update action that was performed, whether forced,
132+ * incremental, or a rollback operation. See
133+ * [`RemoteConfigUpdateType`](/docs/reference/remote-config/rest/v1/Version#remoteconfigupdatetype)
134+ * for valid values.
135+ */
120136 updateType : string ;
121137
122138 /**
123- * The version number of the Remote Config template that was rolled back to,
124- * if the update was a rollback.
139+ * The version number of the Remote Config template that this update rolled back to.
140+ * Only applies if this update was a rollback.
125141 */
126142 rollbackSource ?: number ;
127143}
128144
145+ /**
146+ * An interface representing metadata for a Remote Config account
147+ * that performed the update. Contains the same fields as
148+ * [`RemoteConfigUser`](/docs/reference/remote-config/rest/v1/Version#remoteconfiguser).
149+ */
129150export interface RemoteConfigUser {
151+ /** Name of the Remote Config account that performed the update. */
130152 name ?: string ;
153+
154+ /** Email address of the Remote Config account that performed the update. */
131155 email : string ;
156+
157+ /** Image URL of the Remote Config account that performed the update. */
132158 imageUrl ?: string ;
133159}
0 commit comments