Skip to content

Commit b289636

Browse files
author
Athira M
committed
Address review comments
1 parent 7c67f85 commit b289636

File tree

8 files changed

+35
-129
lines changed

8 files changed

+35
-129
lines changed

common/api-review/remote-config.api.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export function fetchConfig(remoteConfig: RemoteConfig): Promise<void>;
4141
export interface FetchResponse {
4242
config?: FirebaseRemoteConfigObject;
4343
eTag?: string;
44+
// Warning: (ae-forgotten-export) The symbol "FirebaseExperimentDescription" needs to be exported by the entry point index.d.ts
4445
experiments?: FirebaseExperimentDescription[];
4546
status: number;
4647
templateVersion?: number;
@@ -52,22 +53,6 @@ export type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle';
5253
// @public
5354
export type FetchType = 'BASE' | 'REALTIME';
5455

55-
// @public
56-
export interface FirebaseExperimentDescription {
57-
// (undocumented)
58-
affectedParameterKeys?: string[];
59-
// (undocumented)
60-
experimentId: string;
61-
// (undocumented)
62-
experimentStartTime: string;
63-
// (undocumented)
64-
timeToLiveMillis: string;
65-
// (undocumented)
66-
triggerTimeoutMillis: string;
67-
// (undocumented)
68-
variantId: string;
69-
}
70-
7156
// @public
7257
export interface FirebaseRemoteConfigObject {
7358
// (undocumented)

docs-devsite/_toc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,6 @@ toc:
649649
path: /docs/reference/js/remote-config.customsignals.md
650650
- title: FetchResponse
651651
path: /docs/reference/js/remote-config.fetchresponse.md
652-
- title: FirebaseExperimentDescription
653-
path: /docs/reference/js/remote-config.firebaseexperimentdescription.md
654652
- title: FirebaseRemoteConfigObject
655653
path: /docs/reference/js/remote-config.firebaseremoteconfigobject.md
656654
- title: RemoteConfig

docs-devsite/remote-config.fetchresponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface FetchResponse
2626
| --- | --- | --- |
2727
| [config](./remote-config.fetchresponse.md#fetchresponseconfig) | [FirebaseRemoteConfigObject](./remote-config.firebaseremoteconfigobject.md#firebaseremoteconfigobject_interface) | Defines the map of parameters returned as "entries" in the fetch response body.<p>Only defined for 200 responses. |
2828
| [eTag](./remote-config.fetchresponse.md#fetchresponseetag) | string | Defines the ETag response header value.<p>Only defined for 200 and 304 responses. |
29-
| [experiments](./remote-config.fetchresponse.md#fetchresponseexperiments) | [FirebaseExperimentDescription](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescription_interface)<!-- -->\[\] | A/B Test and Rollout experiment metadata.<p>Only defined for 200 responses. |
29+
| [experiments](./remote-config.fetchresponse.md#fetchresponseexperiments) | FirebaseExperimentDescription\[\] | A/B Test and Rollout experiment metadata. |
3030
| [status](./remote-config.fetchresponse.md#fetchresponsestatus) | number | The HTTP status, which is useful for differentiating success responses with data from those without.<p>The Remote Config client is modeled after the native <code>Fetch</code> interface, so HTTP status is first-class.<p>Disambiguation: the fetch response returns a legacy "state" value that is redundant with the HTTP status code. The former is normalized into the latter. |
3131
| [templateVersion](./remote-config.fetchresponse.md#fetchresponsetemplateversion) | number | The version number of the config template fetched from the server. |
3232

@@ -58,7 +58,7 @@ eTag?: string;
5858

5959
A/B Test and Rollout experiment metadata.
6060

61-
<p>Only defined for 200 responses.
61+
Only defined for 200 responses.
6262

6363
<b>Signature:</b>
6464

docs-devsite/remote-config.firebaseexperimentdescription.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs-devsite/remote-config.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ The Firebase Remote Config Web SDK. This SDK does not work in a Node.js environm
4242
| [ConfigUpdateObserver](./remote-config.configupdateobserver.md#configupdateobserver_interface) | Observer interface for receiving real-time Remote Config update notifications.<!-- -->NOTE: Although an <code>complete</code> callback can be provided, it will never be called because the ConfigUpdate stream is never-ending. |
4343
| [CustomSignals](./remote-config.customsignals.md#customsignals_interface) | Defines the type for representing custom signals and their values.<p>The values in CustomSignals must be one of the following types:<ul> <li><code>string</code> <li><code>number</code> <li><code>null</code> </ul> |
4444
| [FetchResponse](./remote-config.fetchresponse.md#fetchresponse_interface) | Defines a successful response (200 or 304).<p>Modeled after the native <code>Response</code> interface, but simplified for Remote Config's use case. |
45-
| [FirebaseExperimentDescription](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescription_interface) | Defines experiment and variant attached to a config parameter. |
4645
| [FirebaseRemoteConfigObject](./remote-config.firebaseremoteconfigobject.md#firebaseremoteconfigobject_interface) | Defines a self-descriptive reference for config key-value pairs. |
47-
| [RemoteConfig](./remote-config.remoteconfig.md#remoteconfig_interface) | The Firebase Remote Config service interface. |
46+
| [RemoteConfig](./remote-config.remoteconfig.md#remoteconfig_interface) | /\*\* The Firebase Remote Config service interface. |
4847
| [RemoteConfigOptions](./remote-config.remoteconfigoptions.md#remoteconfigoptions_interface) | Options for Remote Config initialization. |
4948
| [RemoteConfigSettings](./remote-config.remoteconfigsettings.md#remoteconfigsettings_interface) | Defines configuration options for the Remote Config SDK. |
5049
| [Value](./remote-config.value.md#value_interface) | Wraps a value with metadata and type-safe getters. |

docs-devsite/remote-config.remoteconfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# RemoteConfig interface
13-
The Firebase Remote Config service interface.
13+
/\*\* The Firebase Remote Config service interface.
1414

1515
<b>Signature:</b>
1616

packages/remote-config/src/client/rest_client.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
CustomSignals,
2020
FetchResponse,
2121
FirebaseRemoteConfigObject,
22-
FirebaseExperimentDescription
2322
} from '../public_types';
2423
import {
2524
RemoteConfigFetchClient,
@@ -49,6 +48,32 @@ interface FetchRequestBody {
4948
/* eslint-enable camelcase */
5049
}
5150

51+
/**
52+
* Defines experiment and variant attached to a config parameter.
53+
*/
54+
export interface FirebaseExperimentDescription {
55+
// A string of max length 22 characters and of format: _exp_<experiment_id>
56+
experimentId: string;
57+
58+
// The variant of the experiment assigned to the app instance.
59+
variantId: string;
60+
61+
// When the experiment was started.
62+
experimentStartTime: string;
63+
64+
// How long the experiment can remain in STANDBY state. Valid range from 1 ms
65+
// to 6 months.
66+
triggerTimeoutMillis: string;
67+
68+
// How long the experiment can remain in ON state. Valid range from 1 ms to 6
69+
// months.
70+
timeToLiveMillis: string;
71+
72+
// A repeated of Remote Config parameter keys that this experiment is
73+
// affecting the value of.
74+
affectedParameterKeys?: string[];
75+
}
76+
5277
/**
5378
* Implements the Client abstraction for the Remote Config REST API.
5479
*/

packages/remote-config/src/public_types.ts

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
*/
1717

1818
import { FirebaseApp, FirebaseError } from '@firebase/app';
19+
import { FirebaseExperimentDescription } from './client/rest_client';
20+
21+
/**
1922
2023
/**
2124
* The Firebase Remote Config service interface.
@@ -59,32 +62,6 @@ export interface FirebaseRemoteConfigObject {
5962
[key: string]: string;
6063
}
6164

62-
/**
63-
* Defines experiment and variant attached to a config parameter.
64-
*/
65-
export interface FirebaseExperimentDescription {
66-
// A string of max length 22 characters and of format: _exp_<experiment_id>
67-
experimentId: string;
68-
69-
// The variant of the experiment assigned to the app instance.
70-
variantId: string;
71-
72-
// When the experiment was started.
73-
experimentStartTime: string;
74-
75-
// How long the experiment can remain in STANDBY state. Valid range from 1 ms
76-
// to 6 months.
77-
triggerTimeoutMillis: string;
78-
79-
// How long the experiment can remain in ON state. Valid range from 1 ms to 6
80-
// months.
81-
timeToLiveMillis: string;
82-
83-
// A repeated of Remote Config parameter keys that this experiment is
84-
// affecting the value of.
85-
affectedParameterKeys?: string[];
86-
}
87-
8865
/**
8966
* Defines a successful response (200 or 304).
9067
*
@@ -128,7 +105,7 @@ export interface FetchResponse {
128105
/**
129106
* A/B Test and Rollout experiment metadata.
130107
*
131-
* <p>Only defined for 200 responses.
108+
* @remarks Only defined for 200 responses.
132109
*/
133110
experiments?: FirebaseExperimentDescription[];
134111
}

0 commit comments

Comments
 (0)