Skip to content

Commit 19c0fd6

Browse files
author
Athira M
committed
Export firebaseExperimentDescription
1 parent aa7751e commit 19c0fd6

File tree

7 files changed

+128
-30
lines changed

7 files changed

+128
-30
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ 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
4544
experiments?: FirebaseExperimentDescription[];
4645
status: number;
4746
templateVersion?: number;
@@ -53,6 +52,22 @@ export type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle';
5352
// @public
5453
export type FetchType = 'BASE' | 'REALTIME';
5554

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+
5671
// @public
5772
export interface FirebaseRemoteConfigObject {
5873
// (undocumented)

docs-devsite/_toc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,8 @@ 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
652654
- title: FirebaseRemoteConfigObject
653655
path: /docs/reference/js/remote-config.firebaseremoteconfigobject.md
654656
- title: RemoteConfig

docs-devsite/remote-config.fetchresponse.md

Lines changed: 1 addition & 1 deletion
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\[\] | A/B Test and Rollout experiment metadata. |
29+
| [experiments](./remote-config.fetchresponse.md#fetchresponseexperiments) | [FirebaseExperimentDescription](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescription_interface)<!-- -->\[\] | 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

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# FirebaseExperimentDescription interface
13+
Defines experiment and variant attached to a config parameter.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface FirebaseExperimentDescription
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [affectedParameterKeys](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptionaffectedparameterkeys) | string\[\] | |
26+
| [experimentId](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptionexperimentid) | string | |
27+
| [experimentStartTime](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptionexperimentstarttime) | string | |
28+
| [timeToLiveMillis](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptiontimetolivemillis) | string | |
29+
| [triggerTimeoutMillis](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptiontriggertimeoutmillis) | string | |
30+
| [variantId](./remote-config.firebaseexperimentdescription.md#firebaseexperimentdescriptionvariantid) | string | |
31+
32+
## FirebaseExperimentDescription.affectedParameterKeys
33+
34+
<b>Signature:</b>
35+
36+
```typescript
37+
affectedParameterKeys?: string[];
38+
```
39+
40+
## FirebaseExperimentDescription.experimentId
41+
42+
<b>Signature:</b>
43+
44+
```typescript
45+
experimentId: string;
46+
```
47+
48+
## FirebaseExperimentDescription.experimentStartTime
49+
50+
<b>Signature:</b>
51+
52+
```typescript
53+
experimentStartTime: string;
54+
```
55+
56+
## FirebaseExperimentDescription.timeToLiveMillis
57+
58+
<b>Signature:</b>
59+
60+
```typescript
61+
timeToLiveMillis: string;
62+
```
63+
64+
## FirebaseExperimentDescription.triggerTimeoutMillis
65+
66+
<b>Signature:</b>
67+
68+
```typescript
69+
triggerTimeoutMillis: string;
70+
```
71+
72+
## FirebaseExperimentDescription.variantId
73+
74+
<b>Signature:</b>
75+
76+
```typescript
77+
variantId: string;
78+
```

docs-devsite/remote-config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ 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. |
4546
| [FirebaseRemoteConfigObject](./remote-config.firebaseremoteconfigobject.md#firebaseremoteconfigobject_interface) | Defines a self-descriptive reference for config key-value pairs. |
4647
| [RemoteConfig](./remote-config.remoteconfig.md#remoteconfig_interface) | The Firebase Remote Config service interface. |
4748
| [RemoteConfigOptions](./remote-config.remoteconfigoptions.md#remoteconfigoptions_interface) | Options for Remote Config initialization. |

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

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
import {
1919
CustomSignals,
2020
FetchResponse,
21-
FirebaseRemoteConfigObject
21+
FirebaseRemoteConfigObject,
22+
FirebaseExperimentDescription
2223
} from '../public_types';
2324
import {
2425
RemoteConfigFetchClient,
@@ -48,32 +49,6 @@ interface FetchRequestBody {
4849
/* eslint-enable camelcase */
4950
}
5051

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-
7752
/**
7853
* Implements the Client abstraction for the Remote Config REST API.
7954
*/

packages/remote-config/src/public_types.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717

1818
import { FirebaseApp, FirebaseError } from '@firebase/app';
19-
import { FirebaseExperimentDescription } from './client/rest_client';
2019

2120
/**
2221
* The Firebase Remote Config service interface.
@@ -60,6 +59,34 @@ export interface FirebaseRemoteConfigObject {
6059
[key: string]: string;
6160
}
6261

62+
/**
63+
* Defines experiment and variant attached to a config parameter.
64+
*
65+
* @public
66+
*/
67+
export interface FirebaseExperimentDescription {
68+
// A string of max length 22 characters and of format: _exp_<experiment_id>
69+
experimentId: string;
70+
71+
// The variant of the experiment assigned to the app instance.
72+
variantId: string;
73+
74+
// When the experiment was started.
75+
experimentStartTime: string;
76+
77+
// How long the experiment can remain in STANDBY state. Valid range from 1 ms
78+
// to 6 months.
79+
triggerTimeoutMillis: string;
80+
81+
// How long the experiment can remain in ON state. Valid range from 1 ms to 6
82+
// months.
83+
timeToLiveMillis: string;
84+
85+
// A repeated of Remote Config parameter keys that this experiment is
86+
// affecting the value of.
87+
affectedParameterKeys?: string[];
88+
}
89+
6390
/**
6491
* Defines a successful response (200 or 304).
6592
*

0 commit comments

Comments
 (0)