@databutton/firebase-types 1.14.1 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,7 +38,6 @@ export interface Profile {
|
|
|
38
38
|
*/
|
|
39
39
|
earlyAccessChangedAt?: Timestamp;
|
|
40
40
|
earlyAccess?: boolean;
|
|
41
|
-
enabledFeatures?: string[];
|
|
42
41
|
admin?: boolean;
|
|
43
42
|
referredAsCollaboratorBy?: PerformedBy | null;
|
|
44
43
|
referredAsViewerBy?: PerformedBy | null;
|
|
@@ -49,7 +48,47 @@ export interface Profile {
|
|
|
49
48
|
projectEventsReadMap?: ProjectEventsReadMap | null;
|
|
50
49
|
migratedToProfileRef?: string;
|
|
51
50
|
migratedFromProfileRef?: string;
|
|
51
|
+
segments?: string[];
|
|
52
|
+
enabledFeatures?: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface FeatureFlagBase {
|
|
55
|
+
createdBy: PerformedBy;
|
|
56
|
+
lastChangedBy: PerformedBy;
|
|
57
|
+
state: "ENABLED" | "DISABLED";
|
|
58
|
+
/**
|
|
59
|
+
* Key used when checkning if feature is enabled
|
|
60
|
+
*/
|
|
61
|
+
key: string;
|
|
62
|
+
description: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Enable a feature for a percentage of our users
|
|
66
|
+
*/
|
|
67
|
+
export interface PartialRolloutFeatureFlag extends FeatureFlagBase {
|
|
68
|
+
strategy: "PartialRollout";
|
|
69
|
+
enabledForPercentageOfUsers: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Enable a feature for all users at the same time
|
|
73
|
+
*/
|
|
74
|
+
export interface OnOffFeatureFlag extends FeatureFlagBase {
|
|
75
|
+
strategy: "OnOff";
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Enable a feature for one or more user segments
|
|
79
|
+
*
|
|
80
|
+
* A user can be added to one or more segments through the profile (such as "fans" or "databutlers")
|
|
81
|
+
*/
|
|
82
|
+
export interface SegmentFeatureFlag extends FeatureFlagBase {
|
|
83
|
+
strategy: "Segment";
|
|
84
|
+
enabledForSegments: string[];
|
|
85
|
+
}
|
|
86
|
+
export interface UserSegment {
|
|
87
|
+
createdBy: PerformedBy;
|
|
88
|
+
lastChangedBy: PerformedBy;
|
|
89
|
+
name: string;
|
|
52
90
|
}
|
|
91
|
+
export type FeatureFlag = PartialRolloutFeatureFlag | OnOffFeatureFlag | SegmentFeatureFlag;
|
|
53
92
|
/**
|
|
54
93
|
* Subcollection under projects
|
|
55
94
|
*
|