@sanity/personalization-plugin 2.3.0-launch-darkly.1 → 2.3.0

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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import {ArrayOfObjectsInputProps} from 'sanity'
2
- import {Dispatch} from 'react'
3
2
  import {FieldDefinition} from 'sanity'
4
3
  import {ObjectField} from 'sanity'
5
4
  import {Path} from 'sanity'
@@ -7,7 +6,6 @@ import {Plugin as Plugin_2} from 'sanity'
7
6
  import {PreviewProps} from 'sanity'
8
7
  import {SanityClient} from 'sanity'
9
8
  import {SchemaType} from 'sanity'
10
- import {SetStateAction} from 'react'
11
9
 
12
10
  export declare type ArrayInputProps = ArrayOfObjectsInputProps & {
13
11
  variantName: string
@@ -17,8 +15,6 @@ export declare type ArrayInputProps = ArrayOfObjectsInputProps & {
17
15
 
18
16
  export declare type ExperimentContextProps = Required<FieldPluginConfig> & {
19
17
  experiments: ExperimentType[]
20
- setSecret: Dispatch<SetStateAction<string | undefined>>
21
- secret: string | undefined
22
18
  }
23
19
 
24
20
  export declare type ExperimentGeneric<T> = {
@@ -60,194 +56,192 @@ export declare type FieldPluginConfig = {
60
56
  */
61
57
  export declare function flattenSchemaType(schemaType: SchemaType): ObjectFieldWithPath[]
62
58
 
63
- export declare const launchDarklyFieldLevel: Plugin_2<LaunchDarklyFieldLevelConfig>
64
-
65
- export declare type LaunchDarklyFieldLevelConfig = {
66
- fields: (string | FieldDefinition)[]
67
- projectKey: string
68
- tags?: string[]
69
- }
70
-
71
- export declare type LaunchDarklyFlagItem = {
59
+ export declare type GrowthbookExperiment = {
60
+ id: string
61
+ dateCreated: string
62
+ dateUpdated: string
72
63
  name: string
73
- kind: string
74
- key: string
75
- _version: number
76
- creationDate: number
77
- variations: Array<{
78
- value: boolean
79
- _id: string
80
- name: string
81
- }>
82
- temporary: boolean
83
- tags: string[]
84
- _links: {
85
- parent: {
86
- href: string
87
- type: string
88
- }
89
- self: {
90
- href: string
91
- type: string
92
- }
93
- }
94
- experiments: {
95
- baselineIdx: number
96
- items: Array<{
97
- metricKey: string
98
- _metric: {
99
- _id: string
100
- _versionId: string
101
- key: string
102
- name: string
103
- kind: string
104
- _links: {
105
- parent: {
106
- href: string
107
- type: string
108
- }
109
- self: {
110
- href: string
111
- type: string
112
- }
64
+ project: string
65
+ hypothesis: string
66
+ description: string
67
+ tags: [string]
68
+ owner: string
69
+ archived: boolean
70
+ status: string
71
+ autoRefresh: boolean
72
+ hashAttribute: string
73
+ fallbackAttribute: string
74
+ hashVersion: number
75
+ disableStickyBucketing: boolean
76
+ bucketVersion: number
77
+ minBucketVersion: number
78
+ variations: [
79
+ {
80
+ variationId: string
81
+ key: string
82
+ name: string
83
+ description: string
84
+ screenshots: [string]
85
+ },
86
+ ]
87
+ phases: [
88
+ {
89
+ name: string
90
+ dateStarted: string
91
+ dateEnded: string
92
+ reasonForStopping: string
93
+ seed: string
94
+ coverage: 0
95
+ trafficSplit: [
96
+ {
97
+ variationId: string
98
+ weight: 0
99
+ },
100
+ ]
101
+ namespace: {
102
+ namespaceId: string
103
+ range: []
104
+ }
105
+ targetingCondition: string
106
+ savedGroupTargeting: [
107
+ {
108
+ matchType: string
109
+ savedGroups: [string]
110
+ },
111
+ ]
112
+ },
113
+ ]
114
+ settings: {
115
+ datasourceId: string
116
+ assignmentQueryId: string
117
+ experimentId: string
118
+ segmentId: string
119
+ queryFilter: string
120
+ inProgressConversions: string
121
+ attributionModel: string
122
+ statsEngine: string
123
+ regressionAdjustmentEnabled: boolean
124
+ goals: [
125
+ {
126
+ metricId: string
127
+ overrides: {
128
+ delayHours: 0
129
+ windowHours: 0
130
+ window: string
131
+ winRiskThreshold: 0
132
+ loseRiskThreshold: 0
113
133
  }
114
- tags: string[]
115
- _creationDate: number
116
- experimentCount: number
117
- metricGroupCount: number
118
- _attachedFlagCount: number
119
- maintainerId: string
120
- _maintainer: {
121
- _links: {
122
- self: {
123
- href: string
124
- type: string
125
- }
126
- }
127
- _id: string
128
- role: string
129
- email: string
130
- firstName: string
131
- lastName: string
134
+ },
135
+ ]
136
+ secondaryMetrics: [
137
+ {
138
+ metricId: string
139
+ overrides: {
140
+ delayHours: 0
141
+ windowHours: 0
142
+ window: string
143
+ winRiskThreshold: 0
144
+ loseRiskThreshold: 0
132
145
  }
133
- category: string
134
- isNumeric: boolean
135
- percentileValue: number
146
+ },
147
+ ]
148
+ guardrails: [
149
+ {
150
+ metricId: string
151
+ overrides: {
152
+ delayHours: 0
153
+ windowHours: 0
154
+ window: string
155
+ winRiskThreshold: 0
156
+ loseRiskThreshold: 0
157
+ }
158
+ },
159
+ ]
160
+ activationMetric: {
161
+ metricId: string
162
+ overrides: {
163
+ delayHours: 0
164
+ windowHours: 0
165
+ window: string
166
+ winRiskThreshold: 0
167
+ loseRiskThreshold: 0
136
168
  }
137
- }>
138
- }
139
- customProperties: {
140
- key: {
141
- name: string
142
- value: string[]
143
169
  }
144
170
  }
171
+ resultSummary: {
172
+ status: string
173
+ winner: string
174
+ conclusions: string
175
+ releasedVariationId: string
176
+ excludeFromPayload: boolean
177
+ }
178
+ }
179
+
180
+ export declare type GrowthbookFeature = {
181
+ id: string
182
+ dateCreated: string
183
+ dateUpdated: string
145
184
  archived: boolean
146
185
  description: string
147
- maintainerId: string
148
- _maintainer: {
149
- _links: {
150
- self: {
151
- href: string
152
- type: string
153
- }
154
- }
155
- _id: string
156
- role: string
157
- email: string
158
- firstName: string
159
- lastName: string
160
- }
161
- maintainerTeamKey: string
162
- _maintainerTeam: {
163
- key: string
164
- name: string
165
- _links: {
166
- parent: {
167
- href: string
168
- type: string
169
- }
170
- roles: {
171
- href: string
172
- type: string
173
- }
174
- self: {
175
- href: string
176
- type: string
177
- }
178
- }
179
- }
180
- archivedDate: number
181
- deprecated: boolean
182
- deprecatedDate: number
183
- defaults: {
184
- onVariation: number
185
- offVariation: number
186
- }
187
- _purpose: string
188
- migrationSettings: {
189
- contextKind: string
190
- stageCount: number
191
- }
186
+ owner: string
187
+ project: string
188
+ valueType: string
189
+ defaultValue: string
190
+ tags: string[]
192
191
  environments: {
193
192
  [key: string]: {
194
- on: boolean
195
- archived: boolean
196
- salt: string
197
- sel: string
198
- lastModified: number
199
- version: number
200
- _site: {
201
- href: string
193
+ enabled: boolean
194
+ defaultValue: string
195
+ rules: {
196
+ description: string
197
+ condition: string
198
+ savedGroupTargeting: {
199
+ matchType: string
200
+ savedGroups: string[]
201
+ }[]
202
+ id: string
203
+ enabled: boolean
202
204
  type: string
203
- }
204
- _environmentName: string
205
- trackEvents: boolean
206
- trackEventsFallthrough: boolean
207
- targets: Array<{
208
- values: string[]
209
- variation: number
210
- contextKind: string
211
- }>
212
- contextTargets: Array<{
213
- values: string[]
214
- variation: number
215
- contextKind: string
216
- }>
217
- rules: Array<{
218
- clauses: Array<{
219
- attribute: string
220
- op: string
221
- values: unknown[]
222
- negate: boolean
223
- }>
224
- trackEvents: boolean
225
- }>
226
- fallthrough: {
227
- variation: number
228
- }
229
- offVariation: number
230
- prerequisites: Array<{
231
- key: string
232
- variation: number
233
- }>
234
- _summary: {
205
+ value: string
235
206
  variations: {
236
- [key: string]: {
237
- rules: number
238
- nullRules: number
239
- targets: number
240
- contextTargets: number
241
- isFallthrough?: boolean
242
- isOff?: boolean
243
- }
244
- }
245
- prerequisites: number
207
+ value: string
208
+ variationId: string
209
+ }[]
210
+ }[]
211
+ definition: string
212
+ draft: {
213
+ enabled: boolean
214
+ defaultValue: string
215
+ rules: {
216
+ description: string
217
+ condition: string
218
+ savedGroupTargeting: {
219
+ matchType: string
220
+ savedGroups: string[]
221
+ }[]
222
+ id: string
223
+ enabled: boolean
224
+ type: string
225
+ value: string
226
+ variations: {
227
+ value: string
228
+ variationId: string
229
+ }[]
230
+ }[]
231
+ definition: string
246
232
  }
247
233
  }
248
234
  }
249
- includeInSnippet: boolean
250
- goalIds: string[]
235
+ prerequisites: {
236
+ parentId: string
237
+ parentCondition: string
238
+ }[]
239
+ revision: {
240
+ version: number
241
+ comment: string
242
+ date: string
243
+ publishedBy: string
244
+ }
251
245
  }
252
246
 
253
247
  export declare type ObjectFieldWithPath = ObjectField<SchemaType> & {