Skip to content

Commit f75580e

Browse files
Merge branch 'sdk-configs-handle-configs-dto' into configs-sdk-client
2 parents 7004f30 + aabd919 commit f75580e

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

src/dtos/types.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export interface IRBSegment {
215215
} | null
216216
}
217217

218-
// Similar to ISplit
218+
// Superset of ISplit (i.e., ISplit extends IConfig)
219219
// - with optional fields related to targeting information and
220220
// - an optional link fields that binds configurations to other entities
221221
export interface IConfig {
@@ -234,7 +234,7 @@ export interface IConfig {
234234
trafficAllocation?: number,
235235
trafficAllocationSeed?: number
236236
configurations: {
237-
[variantName: string]: string | object | null
237+
[treatmentName: string]: string | object | null
238238
},
239239
sets?: string[],
240240
impressionsDisabled?: boolean,
@@ -246,6 +246,21 @@ export interface IConfig {
246246
}
247247
}
248248

249+
/** Interface of the parsed JSON response of `/configs` */
250+
export interface IConfigsResponse {
251+
configs?: {
252+
t: number,
253+
s?: number,
254+
d: IConfig[]
255+
},
256+
rbs?: {
257+
t: number,
258+
s?: number,
259+
d: IRBSegment[]
260+
}
261+
}
262+
263+
// @TODO: rename to IDefinition (Configs and Feature Flags are definitions)
249264
export interface ISplit {
250265
name: string,
251266
changeNumber: number,
@@ -285,20 +300,6 @@ export interface ISplitChangesResponse {
285300
}
286301
}
287302

288-
/** Interface of the parsed JSON response of `/configs` */
289-
export interface IConfigsResponse {
290-
configs?: {
291-
t: number,
292-
s?: number,
293-
d: IConfig[]
294-
},
295-
rbs?: {
296-
t: number,
297-
s?: number,
298-
d: IRBSegment[]
299-
}
300-
}
301-
302303
/** Interface of the parsed JSON response of `/segmentChanges/{segmentName}` */
303304
export interface ISegmentChangesResponse {
304305
name: string,

0 commit comments

Comments
 (0)