Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove prefix from NamedCondition
  • Loading branch information
erikeldridge committed Mar 19, 2024
commit 689c6aa69df58ed6849b783f5dd48b93c1492178
4 changes: 2 additions & 2 deletions etc/firebase-admin.remote-config.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface ListVersionsResult {
}

// @public
export interface NamedServerCondition {
export interface NamedCondition {
name: string;
}

Expand Down Expand Up @@ -126,7 +126,7 @@ export interface ServerTemplate {

// @public
export interface ServerTemplateData {
conditions: NamedServerCondition[];
conditions: NamedCondition[];
readonly etag: string;
parameters: {
[key: string]: RemoteConfigParameter;
Expand Down
2 changes: 1 addition & 1 deletion src/remote-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export {
InAppDefaultValue,
ListVersionsOptions,
ListVersionsResult,
NamedServerCondition,
NamedCondition,
ParameterValueType,
RemoteConfigCondition,
RemoteConfigParameter,
Expand Down
4 changes: 2 additions & 2 deletions src/remote-config/remote-config-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface RemoteConfigCondition {
* A condition targets a specific group of users. A list of these conditions make up
* part of a Remote Config template.
*/
export interface NamedServerCondition {
export interface NamedCondition {

/**
* A non-empty and unique name of this condition.
Expand Down Expand Up @@ -187,7 +187,7 @@ export interface ServerTemplateData {
/**
* A list of conditions in descending order by priority.
*/
conditions: NamedServerCondition[];
conditions: NamedCondition[];

/**
* Map of parameter keys to their optional default values and optional conditional values.
Expand Down
4 changes: 2 additions & 2 deletions src/remote-config/remote-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
ServerConfig,
ServerTemplateData,
ServerTemplateOptions,
NamedServerCondition,
NamedCondition,
} from './remote-config-api';

/**
Expand Down Expand Up @@ -378,7 +378,7 @@ class ServerTemplateImpl implements ServerTemplate {
class ServerTemplateDataImpl implements ServerTemplateData {
public parameters: { [key: string]: RemoteConfigParameter };
public parameterGroups: { [key: string]: RemoteConfigParameterGroup };
public conditions: NamedServerCondition[];
public conditions: NamedCondition[];
public readonly etag: string;
public version?: Version;

Expand Down
6 changes: 3 additions & 3 deletions test/unit/remote-config/remote-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
} from '../../../src/remote-config/remote-config-api-client-internal';
import { deepCopy } from '../../../src/utils/deep-copy';
import {
NamedServerCondition, ServerTemplate, ServerTemplateData
NamedCondition, ServerTemplate, ServerTemplateData
} from '../../../src/remote-config/remote-config-api';

const expect = chai.expect;
Expand Down Expand Up @@ -584,7 +584,7 @@ describe('RemoteConfig', () => {

const c = template.cache.conditions.find((c) => c.name === 'ios');
expect(c).to.be.not.undefined;
const cond = c as NamedServerCondition;
const cond = c as NamedCondition;
expect(cond.name).to.equal('ios');

const parsed = JSON.parse(JSON.stringify(template.cache));
Expand Down Expand Up @@ -793,7 +793,7 @@ describe('RemoteConfig', () => {

const c = template.cache.conditions.find((c) => c.name === 'ios');
expect(c).to.be.not.undefined;
const cond = c as NamedServerCondition;
const cond = c as NamedCondition;
expect(cond.name).to.equal('ios');

const parsed = JSON.parse(JSON.stringify(template.cache));
Expand Down